4
\$\begingroup\$

UPDATE: I really appreciate your help! I´ve found the error, and it was a very basic one. I´m posting it here in case it helps someone out there in the future. I didn´t realised (I´m still learning), that you have to power up your arduino AND your motors separately! So Connecting the arduino to power supply (in my case a 9v adaptor, and then a 12v adaptor) didn´t help at all, because the motors have to get ANOTHER power source, in this case using the Vin pin connected to a positive row of the breadboard. Yes, I realise its a silly newbie mistake, but I wanted to go and write this down anyway. I didn´t undertand at first when people answering and commenting asked about what powered my motors... now I get it! THANKS!!!

About the squematics... I´m trying to get acquainted with circuitlab, because it is more complicated to understand -to me al least- than fritzing.

I´m not posting this as an answer because it is more than a clarification, and there are several comments already to post yet another one :)

I'm trying my first Arduino project, a Bluetooth controlled car. I've divided the project into two parts, one that connects the Arduino to Bluetooth and one that makes the DC motors work. I've found lots of tutorials, but I stuck with following one:

Controlling speed of DC Motors using Arduino

I've been reading a lot about Arduino and DC motors the last couple of weeks and I've tried some smaller things first (LEDs, buttons, light sensors etc). The problem here is that the motors are quite slow (the wheels won't even move when on the floor). I have an Arduino Mega and an Adafruit motor controller.

As I don't have a voltmeter right now I started to test without the motor sensor, because I thought that maybe it was consuming too much power. These are the tests results so far:

  1. If I connect three AA batteries to both motors directely, they spin vividly, so I think there's no problem with them. The motors are two DC 4.5/6 V.

  2. If I connect a 9V/1A DC adaptor, it's even worse: the motors won't move at all. I thought that maybe the adapter was faulty, but I've tried with another one. The second one is a DC adaptor 12V/1.5A center pin positive and the result is the same. No movement. The LED that I've added to the board for test purposes does light though.

  3. I've attached those three AA batteries to the Arduino like the diagram below and it moves but oh so slowly!

  4. I've added a simple alkaline 9V battery instead of the three AA (and I've put it together with the three AA too!) and the result is the same, no movement or very, very slow movement.

As the motors do spin I don't think that I've set the pins incorrectly or that the code isn't working but I fail to understand why this is happening?

UPDATE: Sorry about the diagram (I havent posted it, but I did provide the link though). Im new to the arduino and thought that was the kind of diagram that it should be posted. What should I attach instead?

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Show a block diagram of the overall system, paying particular attention to power and ground connection, and show a schematic of how exactly the motors are being driving from the digital signals. \$\endgroup\$ – Olin Lathrop Jul 17 '13 at 13:14
  • \$\begingroup\$ What motors are these? \$\endgroup\$ – Phil Frost Jul 17 '13 at 13:47
  • 1
    \$\begingroup\$ I asked for a overall block diagram and a schematic of the motor driving details. This wiring diagram is hard. \$\endgroup\$ – Olin Lathrop Jul 17 '13 at 14:06
  • \$\begingroup\$ At first I thought the diagram was not what was built, but after looking more closely (they are hard to read, after all) I decided maybe it is. It would explain the behavior described. \$\endgroup\$ – Phil Frost Jul 17 '13 at 14:26
  • 1
    \$\begingroup\$ Please, sorry about the diagram (I havent posted it, but I did provide the link though). Im new to the arduino and thought that was the kind of diagram that it should be posted. What should I attach instead? \$\endgroup\$ – Rosamunda Jul 17 '13 at 16:15
9
\$\begingroup\$

Your breadboard diagram shows the 9V battery shorted. That is, its terminals are connected by nothing but a wire (internal to the breadboard). This doesn't accomplish anything except make the battery hot. There's no way for the current from the battery to go anywhere except through this short wire. Notably, there's no way it will go through the motors.

The only power source for anything on the breadboard is coming from the GND and +5V connections on the Arduino, which are not sufficient to power the motors, because they are not designed to supply much current.

You need a voltmeter to do electronics. Trying to troubleshoot a circuit without a voltmeter is like trying to repair a car with your eyes shut. It's impossible to say exactly what is wrong with your circuit if all you can know about it is "it doesn't work".

\$\endgroup\$
5
\$\begingroup\$

What Phil (and others) are saying is ...

The black wire from the battery should plug into anywhere in the second row (from bottom) of the breadboard, not the first row. There is an error in the Fritzing diagram in the article you are reading.

In that Fritzing diagram, the 9V battery is powering the Arduino through it's "Vin" pin. You probably aren't intended to have any other power supply connected to the Arduino.

As you can tell almost everyone who answers questions on this website prefers real circuit diagrams. This is because it makes it much much easier to understand the circuit.

\$\endgroup\$
  • \$\begingroup\$ Thanks for your reply! But Im not using the battery anymore, Im using a wall adaptor plugged directely to the board (and still doesnt work). Anyway, Im drawing a different schematic (I think this one will be better, and easier to read). \$\endgroup\$ – Rosamunda Jul 17 '13 at 21:24
2
\$\begingroup\$

Not mentioned so far : how are the wheels coupled to the motors?

If they are direct driven, fitted directly to the motor shafts, then you are simply stalling the motors and draining the batteries faster than you can replace them : or in the 9V adapter case, simply placing it into short-circuit shutdown mode.

I'm guessing this is the case because you say the motors spin ... guessing again, you mean they spin when they are off the road so there is no load to slow them down.

Forget schematics; forget Arduino programming. First gear the motors down!

Gear them down : at least 10:1 or better 30:1 as a first guess; this multiplies the motor torque by 30:1 - or alternatively, reduces the torque the motor has to provide to move the robot by 30:1, and thereby reduces the current by the same amount (ignoring the motor's own friction and other losses).

Either replace them with gearmotors; or add gearboxes between motor and wheels; or simply use friction drive (rubber sleeve on the motor shaft, in contact with the wheel's tire.)

Having got it basically moving, then learn the relationship between voltage and motor speed; and torque and drive current. Learn this and you can control speed and torque to suit your needs and the motors you have available.

THEN worry about the electronics and programming.

\$\endgroup\$
  • \$\begingroup\$ Thanks for your reply! But Ive bought a robot and put all pieces together according to the instructions, so (I think) the distance is ok... \$\endgroup\$ – Rosamunda Jul 17 '13 at 21:27
  • \$\begingroup\$ Then they may well be geared motors already. A link to the kit or the motors might have helped. However it's academic; it seems you have solved the problem anyway. \$\endgroup\$ – Brian Drummond Jul 18 '13 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.