I'm not sure if I may link to Aliexpress for the parts I used, so I'll list them.
Parts :
- Uno (Arduino Uno copy)
- L298N board
- tank chassis with 2 "universal motor 130, support 3-8v voltage"
- HC-05 Bluetooth module (optional)
Currently, I run a 4 AA-Battery pack in the 12V in of the L298N and amm powering the Arduino over USB.
This setup only works if I also connect the 5V output of the Arduino to the V output of the L298N.
As soon as I connect the bluetooth module, it won't work anymore.
I'm pretty sure my whole setup is lacking power.
The datasheet of the L298N says that the minimum supply voltage has to be Inut High Voltage +2.5V., so I understand that if I'm using the digital IO of the Arduino for the enable pins, the supply voltage should be at least 7.5V.
Can someone confirm my assumtions and if yes, what should I do ?
If that's correct, I suppose a "smaller" H-Bridge or more batteries are the solution (but the tank chassis has only place for 4 AA's.
Thanks in advane for your help on my first project.
Is the Bluetooth connected to the same tx/rx signals as the USB?
Do you have a GND wire between L298 and Arduino?
4 AA recharagable batteries (when fully charged) generate about 5.2V and will drop below 5.0V after a short time. The L298N typically needs signal voltages lenss the 1.5V for low and greater than 2.3V for high.
It is normal you have to supply 5V to the logic part of the L298N board.
Have you tested separately the 298N board and the BT module, before using them together ?
The HC-05 BT module can take up to 6V, so I doubt it is the origin of your problem. Go step by step, check one module after the other to avoid mixing issues and make diagnostics easier.
It is normal to provide 5V for the logic inputs; but in order to make the board work, I have to connect the Arduino 5V out to the board’s 5V out (which is next to the 12V in and GND). This connection was not intentional, but later I ealized it only works this way.
So the L298 board works without the bluetooth module IF I connect Arduino 5V out to L298 5V out.
The HC05 works without any issues on it’s own with the Arduino
I think the more proper terminology is 5V in for the LM298 board. The board does not generate 5V, it only consumes. The 12V is also a input. Running logic and motors off the same supply can cause problems.
The motors may consume enough current to cause the battery voltage to drop. Any devices that need a reliable 5V may fail. If it drops too far it may reset the CPU.
Motors generate noise spikes due to the commutator.
Motors will act as generators and pump current back to the battery. May give voltage rise.
This not to say it can’t be wired as you described but you should be aware of the potential problems.
- Having your Arduino powered by USB - Supply 5V to the LM298 module logic from the Arduino - Supply 5V to the BT module from the Arduino - Supply xV to the LM298 (power) from the batteries.
This way, only your motors will run on the batteries and all the logic components will run from 5V USB.