My very first "non breadboard" circuit!

I just finished and tested my first non-breadboard circuit. I know it's not pretty but you have to cut me some slack... I've only owned an Arduino for a little over a week and I've only been soldering for a week as well so I'm an extreme noob to electronics! ;D

Basically my first project is going to be a little tank that can navigate a room using an ultrasonic sensor.. nothing crazy but something to get my feet wet. I picked up a small, two motor set of Tamiya tank tracks to use for my base and I needed something to control the motors. I didn't want to buy a motor controller since I'm trying to learn as much as I can, so I made my own. I prototyped it up on my breadboard and once I tested it I decided to move it onto a circuit board since I need my breadboard to test other circuits.

Hopefully it doesn't catch fire once I start using it regularly ;D

A picture of my masterpiece (heavy sarcasm)

Looks good :wink:

You should be aware though that the H bridge you used only outs 1A per motor, so you might not be getting all the power from the motors (they might be built for 3A, or something)... just something to keep in mind if you see that the motors move slower than you hoped.

Yeah that should be ok. I believe the motors are 2.1A peak so we shall see how it performs when I get it driving around.

goes forward and back ok... doesn't have enough juice to turn lol

Increased the duty cycle when I turn it since it has to fight against the other stationary track. Seemed to do the trick.

Why don't you tell the other track to either move a little forward, thus increasing the turning radius, or have it move a little in reverse, thus shortening the turning radius - both of these would allow for faster turning.

That's a good idea, I never thought of that. I'll just apply a small throttle to the "non-turning" track so the turning motor doesn't have to work so hard. Thanks for the suggestion!

No problem m8. You mind throwing up a vid once it's done?

I will!

Ok so I now have a problem.

I got confident and added a spot to hookup a servo on my board (full size image: http://i33.tinypic.com/29ay9fp.jpg). I can control the servo just fine when the motors aren't engaged, but if I engage the motors my servo goes hard left and stays there. Can you see anything obvious?

Row 5 on my board is power from a 6V battery pack btw.

No ideas? Any tips on how I can troubleshoot it?

You say it goes full left on its own? Double check the code, maybe there is some strange interference there. If not, make sure you wired the servo correctly. If not, you may be lacking the power to run the servo (makes sense, since it doesn't work when the motors are operating).

Code seems ok from what I can tell. Power could be an issue. I'm going to try only running one motor at a time and see if the servo still does the same hard left. Now that I think of it, I'm running two 1.5V motors and (what I assume) a 5V servo off of a 6V power supply.

ok so the servo still does the same thing when only one motor is running.

Actually, now that I think about it, power shouldn't be an issue as I don't ever plan on running the servo at the same time as the DC motors. If the servo would just stay put instead of pulling left when the motors run, I'd be fine.

Check the wiring, seems one of your motor wires (enable perhaps, or maybe something else) is hitting the servo's signal wire.

I've been doing some investigating and noticed something and I'm not sure why it's happening or if it's related to my problem.

On my L293 (http://focus.ti.com/lit/ds/symlink/l293d.pdf) I have my external power supply running to pin 8 and the arduino 5V running to pin 16. When the Arduino is powered on and the external battery pack isn't, pin 8 is putting out 1.9V ... is that normal?

Sorry to be posting so much but I'm trying to figure this out :-[

I just did a controlled test. I made my sketch do the following:

  1. set servo to position 78 (just so happens to the position I want it aimed in)

then loop:

  1. enable motor one at 1/2 power
  2. delay for 3 seconds
  3. turn motor one off

As expected, when the motor turns on the servo get's jumpy and heads hard left. When the motor turns off the servo returns to the proper position. Using a multimeter on the servo's signal wire I see that the voltage when the motor is off is a solid 0.34V yet when the motor engages it drops to 0.33V.

I also tried the same test with the motor running full power and I see the same 0.01V drop on the servo signal pin. Does this point to anything obvious?

Measure your +5vdc during the operation rather then the signal wires. You probably are drawing more current then the Arduino board can supply.

Lefty

Lefty I have two power sources, the Arduino and a battery pack. I measured the voltages on them both with the same parameters as above.

Arduino (+5V) stays rock solid
Battery Pack (+6V) 5.76V at idle drops to 4.90V when the motor comes on.