I am a complete beginner with Arduino. I have designed the project in which I want to control 24V DC motor with Arudino uno and L298N module.
I have drawn the basic wiring schematics that you can find on this link: https://ibb.co/4mqVkMD
I haven't found any good free tools to design this schematics so it looks a bit weird, but it will serve its purpose for this thread. If you know any good free (or even better online) tools please let me know.
From what I understand. Motor needs 24V power supply and L298N logic works with up to 12V. Jumper has to be removed from L298N for that reason. Voltage drop for L298N is about 2V so at least 26V should be provided to power the motor correctly. Motor power supply + is connected to 12V L298N input, and motor power supply - is connected to the ground. Arduino UNO is powered from USB cable which provides 5V. 5V is working voltage for Arduino.
L298N can't use 24V from motor power supply because is's logic works on 5V and requires to be powered differently. That is why the 12V jumper is removed and by removing the jumper L298N 5V output pin is now turned into 5V input pin. For that reason, ground input on L298N is connected to ground output pin on Arduino UNO and 5V input pin on L298N is connected to 5V output pin on Arduino UNO.
I do not expect problems with the rest of connections. ENA input of L298N is connected to PWM 5 output on Arduino. IN1 and IN2 inputs of L298N are connected to 6 and 7 outputs on Arduino (6 is PWM and 7 is not).
Can somebody please tell me if my logic is correct?
Please take some time to read the first topic telling how to get the best from this forum. Post schematics here. Pen and paper often do well.
Don't spend time on cocking word sallad. No helper appreciates that.
Any code written?
@TomGeorge Tnx for reply but I do not understand. Can you please explain or maybe tell me what can be done to fix that. Does that mean that the wiring is connected prpoperly and voltages should work fine, currents are wrong?
Your motor is capable of drawing up to 39.5A if the motor is stalled.
The starting current will also be possibly higher than 2A the controller is rated for.
It would be advisable if you are going to use a SLA battery to fit a fuse in the positive lead to protect the driver.
I am working on small laboratory setup designed to test different metods of robust control. Something like this: LINK
Can you please confrim that the wires are connected to the correct pins. Is there any way I use the equipment and solve the problem of stall current being too high? As far as power suplly, I wanted to use some type of laboratory power supply so I can changes voltages and currents.
I am no expert, but they appear to be right to me. To turn motor on set enable high and in1 and in2 high/low depending on which direction you want to turn motor.
Edit: I believe the enable pin can be set high or low depending on which way you have the jumper connected.
You would obviously need another motor driver to power the motor if not using the l298. I think the suggestion of fusing the line would allow you to use the l298 with your motor, but would blow the fuse if you draw too much current.