Go Down

Topic: Problem with LCD and Motor (Read 11255 times) previous topic - next topic

floresta

Quote
Nope. Potentiometer is OK. I even swapped it out.

OK - Can you verify that the voltage at pin 3 is varying when you turn the potentiometer knob?

Don

wbegg

Quote
Can you verify that the voltage at pin 3 is varying when you turn the potentiometer knob?


That's the first thing I checked. Yes. 0V to 5V. Meter connected  Pin 3 to ground. Fluke 175 meter.



DRBArduino

I'm having the same symptoms when using a 5v relay to switch current from a 12v supply to a solenoid. I put a 2n4004 diode across the coils of the relay and the solenoid to short the back EMF, but no joy.  It works OK with just the relay clicking on and off, but one or two cycles of the 12v solenoid takes out the LCD.  Should I try the capacitor across either or both DC supplies?

liudr

I'm confused. Is it working already or do you still have problems?! BTW, if you intend to use a pot to adjust back light, use a 100 ohm pot and have a 47 ohm resistor in series. You don't use 10Kohm pot for back light, which only gives you like, on (burn the back light) and off.

wbegg

liudr,

Read the past posts. I hooked up wrong to the backlite, and the pot worked to dim the backlight. I hooked up as it should have been, and the LCD contrast does not work.

Now I have a 330 ohm in series with the backlight and control the brightness with a 10k pot. It works. Still, pin 3 does not adjust contrast.

wbegg

DRBArduino,

yes, It worked for me. Filtering is your friend and caps seem to work.

liudr


liudr,

Read the past posts. I hooked up wrong to the backlite, and the pot worked to dim the backlight. I hooked up as it should have been, and the LCD contrast does not work.

Now I have a 330 ohm in series with the backlight and control the brightness with a 10k pot. It works. Still, pin 3 does not adjust contrast.



That's good summary. I still don't recommend using 10K pot for backlight though but I get how overconfident you are so do what you want. So now you can't make the contrast to change. Please disconnect all data, RS, EN wires from the LCD if you want to try the contrast. I didn't get whether you are running some LCD code or not. Just don't run LCD code and get the contrast step to work first. Bear in mind, you did connect up wrong wires so the LCD may have already been damaged beyond operation. Things happen rather quickly when wires are connected up wrong. Again, where are those pictures? You apparently were overconfident and under-organized but a few pictures will redeem yourself here. You were "connecting everything correctly" and that made several helpers think hard what other things could have gone wrong, all wasting their time, only if you showed a pic or two.

wbegg

Tried another LCD and it works. Guess the contrast circuit on the one in question is Fubared.

liudr

That's good news. So in this case, there is no need for a picture unless you want to show a working LCD. Electronics just don't like to be connected up wrong. I fried a $30 accelerometer once. It only took seconds.

daytrader152

I am having similar issue. My LCD connected to the UNO displays strange characters after turning on/off the 5V relay for a dozen times. The relay controls a 12V solenoid (an electric strike for a door). I know it has to do with the EMF because if I disconnect the solenoid, the problem does not happen. My relay setup is similar to this: http://www.instructables.com/id/Connecting-a-12V-Relay-to-Arduino, except my relay is 5V, and I am powering the relay with 5V from the UNO. Here are the things I have tried so far:

- used an external power adaptor to power the 5V relay
- placed 6.8uF cap across the coil of the relay
- placed 90uF cap across the 12V rail
- used a separate 12V power supply for the solenoid

Does anyone have any suggestion for me to how suppress the EMF? Thanks.

dc42

#40
Oct 11, 2012, 11:06 am Last Edit: Oct 11, 2012, 11:10 am by dc42 Reason: 1
Assuming the solenoid is powered from DC, connect a diode (1N400x or similar, x = 1 to 7) in parallel with the solenoid, wired so that when the solenoid is engaged it does not conduct (otherwise it would short out the power supply).

Also, don't run the solenoid wires close to the LCD or its wiring, and do run the solenoid wires close to each other so that the area enclosed by the 12V supply - relay contacts - solenoid circuit is kept to a minimum.

Also, make sure that the +5v and ground wires from the LCD go directly to the Arduino, not to some common connection that then has a shared wire connecting it to the Arduino.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

daytrader152

Thanks a lot, mate! Placing the diode across the solenoid did the trick! It's much more stable now. I think I just need to place the diode even closer to the solenoid to completely get rid off the problem. Right now the diode is about 30cm away from the solenoid.

I have another similar circuit with a LCD and 256 relays (to control 256 electronic solenoids). This setup also experiences the same rubbish character problem on the LCD, so I will need to place the diode across all the solenoids as shown in the attachment. Is there an easier way to place the diodes? It's quite a bit of work to cut the wires and solder the diodes on all 256 solenoids. Thanks again!

dc42

From the photo, it looks as if those solenoids are held together by 4 screws with hex or Torx heads. It might be worth disassembling one, to see whether there is room to fit a diode inside (although that will probably invalidate the warranty). If space is limited, then depending on the current taken by the solenoid, you may be able to use a smaller diode. You can also get 1N400x diodes in SMD packages.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

amitkrj

I am also having similar issue. My LCD connected to the UNO displays strange characters after turning on/off the 5V relay for a 10-15 times. The relay controls a 220v AC solenoid and another relay controls a Contactor (220V AC). Both relay has diode contected (IN4007).
I tryed putting cap 100uF around display but LCD still displays strange characters.
Does anyone have any suggestion for me. Thanks

liudr

You tried a 1n4004 diode yet?

Go Up