Tracked Vehicle, Netduino powered

There's something about tracked vehicles, I mean what's cooler than watching a tracked vehicle run over something? When you do the running over with Netduino of course!

Netduino powered tracked vehicle, Part 1

A couple of weeks ago I picked up this Tamiya Tracked Vehicle Chassis Kit with the intention of using it with my Netduino. I put it together, but didn’t get around to doing anything with the kit and the Netduino until tonight. Part of the reason I didn’t get it going was the fact that I didn’t have my Adafruit Motor Shield together, I managed to get that completed over the weekend (minus one solder I found that I had missed tonight).

...

Well, it ends up, the Netduino, at least when powered off the USB connection from the PC (haven’t tried it any other way) can’t provide enough power to the motor through the motor shield. I had a simple enough fix, the motor shield has a header for external power, so I took the original power supply from the Tamiya chassis (2 AA batteries) and wired that into the EXT power for the shield. Once I did that I got enough juice for the motor to be controlled by the Netduino.

Here’s a video of the whole rig powering up off the USB connection and starting up.

Let me say, this is all really really basic stuff for you hard core hackers, making a motor go forward or backwards, I could do that as soon as I put the chassis together as there was a built in switch included with the kit. I am pretty stoked that I was able to get this going though, I’ve got some ideas on where I want to take this thing, we’ll see if it works out.

Rather than include sample code in this first blog I decided to store all the code in a Codeplex project. In future blog posts I will likely include more sample code. To access the code that I have put together (with the help of this thread on Netduino.com) visit my newly created Codeplex Project "Christoc’s Netduino Samples" (http://christocnetduino.codeplex.com/). Via Codeplex if you want to see the code, go to the Source page of the project.

Here's a code snip;

namespace com.christoc.netduino.MotorTest
{
    public class Program
    {
        public static void Main()
        {
           
            //get an instance of the DcMotor class passing in the enumerated header M4 (netduino can access M3 and M4 on the adafruit motor shield)
            var goJuice = new DcMotor(MotorHeaders.M4);
            
            //set the speed to 0 to start
            goJuice.SetSpeed(0);
            
            //set the direction of the motor
            goJuice.Run(MotorDirection.Forward);
            
            //set the speed
            goJuice.SetSpeed(90);
            
            while(true)
            {
                //wait for 3 seconds
                Thread.Sleep(3000);

                //switch directions
                goJuice.Run(MotorDirection.Reverse);

                //wait for 3 seconds
                Thread.Sleep(3000);

                //switch directions
                goJuice.Run(MotorDirection.Forward);
            }
        }
    }
}

Like Chris said, it's a simple example, but the start of many great things often begin that way...

Here’s a few more links you might find interesting:

Follow the Discussion

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.