Let's Make Robots!

mini tank

hello everyone im in the middle of making a robot which uses an arduino and an ultra sonic sensor (clone of ping so it has the same pinouts) ive got the robot and i have a code but the code has servos an one of my servos just broke so i was wondering if it was possible to convert this code to a code that uses dc motors ive tried this a couple times but i havent had any luck heres i tried pasting my current code but i just ended landscape format?? first is this code even correct and can i change it to one that uses dc motors?also might i need a motor shield im pretty sure mines busted. and one last thing which pins on the arduino do i connect the motors to? ive looked online with no useful information thanks alot

hello again heres a little update since chuckcrunch is making a robot like mine but his has a servo i put one on mine too also ive got my motor shield

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Add more pictures so that we can get a better look at the robot, i think standoffs will be an option for you.

i took thing just a little bit further could not help my self ive put a servo on the front of mine to pan the ping just made it that but more complicated , i came across 1 problem but i think it's a soldering issue ,had to disconnect  the enable pin for 1 side of my moter driver ?  i think it's a miner short between my direction pins  still works not shour how got me stumped i think i might start running it to more problems when i start using PWM  . i was also thinking of using a 4 bit port to set the directions need to clean it up a bunch but after 2 re writes of the main loop i have some real basic object dodging and that took 14 hours of my day im going to put up a vidio i hope in like 10 hours sleep now  man it's ugly 

I do have an adafruit motor shield will that work? Also I can't wait to your clone of my robot maybe you can help me with mine when your done

Like this one? Yep, that shield should be fine.

i have all those parts hummm oh man it be like a hour 3 tops from go to stop if i don't get side tracked i might just clone for fun see what happens tomorrow 11:20 pm not a great time to start a project so ill get 8 im hoping by 10 or 12tomorrow ill have a clone of this just to see if i know what im talking about

any of the digital outs will run most chips  not 1 or 2 tx and rx, 3 pin's for each motor enable pin forward pin and revers pin it is as simple setting the direction pin high and the enable pin if you send PWM to the enable pin you can change your speed     the L293D chip will do the job and realy easy to set up . L298HN but will do the job verry well and thay come in a kit with an 5v reg on it and has a higher Amp rating    both chips work the same 

http://www.solarbotics.com/products/k_cmd/   L298HN kit

http://www.solarbotics.com/products/k_smd/  L293D kit

if the electronicks still work in your servos hack it to run ya bot

you can use 1 of these to run your your motor drivers from just 3 lins in total from the arduino and if you expand on this idea you can also run 4 moters  and PWM the enables

Yeah, you will need a motor shield or DIY h-bridge. I love the look of your mini tank, though. Looking forward to seeing it in action.

you'll need an H bridge or some other type of motor controller to get the motors running off the arduino, or else you will fry your Arduino pins. Try an L298HN for free sampling. Also, if possible, try to get 2 different supplay battery packs for your arduino and the motors so that there is less interference going to the arduino.