Notifications
Clear all

L298N H-bridge 5v output

2 Posts
1 Users
0 Likes
1,079 Views
 Royz
(@royz)
Member
Joined: 4 years ago
Posts: 9
Topic starter  

I loaded a sketch from github (ESP_cam_RC_car)to run a robot car using an esp32 cam.  The included cpp file includes all stuff to control the car with your phone.  I wired it up using two 18650's giving about 8v and used the 5 volt L298N out to power the esp cam.  Put in the IP  on my phone and camera cam up with the controls for motors.  Note this sketch was full on/off motor speed and not PWM.  I tested motor a couple of times and control seemed to work then nothing.  The esp appeared to have been fried? and would not accept reprogramming.  The motors have small caps across them, but thinking might have gotten a spike that fried the esp?  I put 3.3 volts on one pair of L298N control pins (3v and gnd from power supply) and scope on 5 volt L298N output but did not see any spike (but I am new to working with a scope).  If I removed the scope leads, the motor will not run.  Putting the 5v out on the control pins will also run the motors. Why does the 5v out need a load of some sort for the motor to run?  Not sure what fried the esp?


   
Quote
 Royz
(@royz)
Member
Joined: 4 years ago
Posts: 9
Topic starter  

Ok, figured out what was happening when used power supply to trigger inputs to L298 while rest powered by battery.  The scope was tying the earth ground from the PS to the floating battery ground.  Motors worked once the PS ground was tied in.  Not a matter of having a load on the 5v out. (I note that Bill's numerous tutorials always have the various grounds tied together.)  Still do not know what killed the ESP32 cam when all was battery powered. 


   
ReplyQuote