-1

My friends and I tried to make our own controllable car. We managed to set up the motor with the Arduino in a way which allowed the motor to be driven back and forth.

The setup we use

schematic

simulate this circuit – Schematic created using CircuitLab

As is visible in the picture above, to drive the motor forward, we sent a signal from the Arduino to transistor 1 and 2. To drive is backward, we sent a signal to transistor 3 and 4. This however proved to be most ineffective. There is some form of energy loss going on. We haven't quite figured it out. But we do have an idea of what might be happening.

The Arduino and the motor is driven by the same battery. Also, the battery at the top of the diagram above and the bottom is the same one. Perhaps a portion of the voltage is lost due to the current that is entering the wire diagram through the transistors from the Arduino is being lost. In the following manner:

Potential loss of voltage

We tried to amend this by putting resistors at the base of the transistors. This did not help however. There is most likely some major mistake with this setup.

To clarify, we wish to be able to run a motor backward and forward without any major energy loss due to faulty wiring. We do not have a motor controller and wished to make one ourselves. Can anyone please help us understand what the mistake is? When we run the motor with the above wiring diagram the motor runs at extremely low speeds.

Thanks!

closed as off-topic by gre_gor, per1234, jose can u c, Avamander, Edgar Bonet Dec 21 '17 at 9:12

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about Arduino, within the scope defined in the help center." – gre_gor, per1234, jose can u c, Avamander
If this question can be reworded to fit the rules in the help center, please edit the question.

  • you have left out so much information – jsotola Dec 19 '17 at 1:18
  • 2
    Energy loss? Did you measured it? Current, voltages? – user31481 Dec 19 '17 at 9:08
  • Search for H-bridge in the Electrical Stack Exchange. electronics.stackexchange.com/search?q=H+bridge+hbridge – sa_leinad Dec 20 '17 at 5:01
  • You need schottky catch diodes on transistors (perhaps not on MOSFETs), or your bridge will die. Using two PNPs and two NPNs is common. If you didn’t start out with base-resistors, your transistors are probably already dead. H-bridges are tricky. What parts are you using? – user2497 Dec 21 '17 at 8:41
1

H-bridges are great fun. One little mistake, and you get to start over. Since you don’t seem very experienced, try the TB6612FNG IC. It has two channels (can drive two motors) at reasonable voltages and 1.2A each, and a logic voltage of 5V. With the library in the resource below, control becomes trivial. You can control speed, direction and duration easily. The TB6612FNG is a ~1$ IC. Examples:

motor1.drive(255, 5000); // Full speed fwd, run 5 secs

motor2.drive(-127, 2500); // Half speed rev, run 2.5 secs

motor1.brake();

There’s a 0.3V drop on output, compared to the voltage going to VM pin.

See this resource: https://learn.sparkfun.com/tutorials/tb6612fng-hookup-guide?_ga=2.99092638.1888871631.1509788582-1169375069.1509788582#board-overview

Without the library, you need to handle PWM and high/low pins manually, and instantly, usually with port register manipulation.

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