franchiseolz.blogg.se

L298n motor driver arduino fritzing
L298n motor driver arduino fritzing







l298n motor driver arduino fritzing

If test 2 DOES work, then the problem is in your Arduino code. You can also try repeating test 2, but connecting the motor to Out3, and using In3 and EnB for the tests. If this test doesn't work, then something is amiss in the wiring, or, relatively unlikely, with the 298 itself. Disconnect In1 and EnA from ground and connect them instead to +5V. Power up the 5V supply, and attach the 9V supply. Check that ground and 5V wires are connected to the 298 as shown. Disconnect the Arduino from the 298 entirely. Reattach the motor to the 298 as shown in your diagram.

l298n motor driver arduino fritzing

In the following, attach and detach the motor only with power off or disconnected. To be honest, a slot car motor is going to drain one of those common small rectangular 9V batteries quite quickly, so beware of that during testing. If not, address either the battery or the motor. Test the motor: Separate from the circuit you showed: Connect the motor to the 9V battery - does it run? If so, it can be used to test the next step. (But perhaps you're going to use it in more elaborate fashion later?) That's OK, though it would be less confusing if you just used a transistor. You appear to be using the 298 just as a simple transistor switch, rather than as the full-bridge driver it's intended to be. Questions, which, with any luck, might turn into an answer.









L298n motor driver arduino fritzing