I'm using LCD display and keypad to control my stepper motor. My stepper motor uses a 12Volts, 2Amperes power supply and I used L298N as its driver. My code functions well but the problem is everytime I plug in the power source for the stepper, the LCD starts malfunctioning. The display texts disappears but the light is still on. LCD gets its power source in arduino mega 5v, the l298N driver also utilizes the same 5v source from it. I think that's the problem, currents jamming in because l298N also has a pin connected the the 12Volts, 2Amperes power source..... I'm not sure if that's the problem guys pls help me fix it. THANKS


Clearly the combination of the loads that you are placing on the +5V pin is causing a sag of the voltage to a level that is lower than the LCD can still remain functional. This could be a constant sag with too much load or it could be a transient fault that happens when a load switches or you try to hot plug a load.

A constant sag situation would require that you find a separate hefty 5V supply to drive some of your load requirement.

For the transient type situation stop hot plugging. And for a transient due to the load switching you can benefit from adding bulk capacitance to the 5V line to GND at the loads that are switching.

| improve this answer | |
  • \$\begingroup\$ i think so too =) ...but I wasn't sure until you said it. Now I have some similar answer ...thanks a lot \$\endgroup\$ – Alyzha Orejudos Jun 13 '15 at 12:54
  • \$\begingroup\$ The thing is I only plug-in the 2amps power source when I'm about to press the button to switch on the stepper motor because i don't want the l298N driver to get so hot it is because I didn't put the heatsink on yet. I tried to plug the 2amps powersource before I power up the arduino and it no problems occurred. But, in my project the powersource for the stepper motor should not be always switched on. It will only turned on when i pressed a button \$\endgroup\$ – Alyzha Orejudos Jun 13 '15 at 13:07
  • \$\begingroup\$ If you insist that you must hot plug your loads then you have to get an oscilloscope on the 5V line and start evaluating why it has a transient when the load is plugged in. This could be some surge through the driver device. As a minimum try placing the input signals to the driver at various different states to see if some will reduce the surge that occurs. \$\endgroup\$ – Michael Karas Jun 13 '15 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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