Go Down

Topic: Reverse Circuit Protection advice (Read 656 times) previous topic - next topic


Please bear with the rambling as I try to explain...

I've built myself a very cool load cell circuit with LCD attached and a few other bells and whistles. The basic jist is the LCD displays the actual load cell value and it displays a target load cell value which you input using a pot. it all works rather swimmingly even if I have created an abomination on the breadboard.

The part I'm having trouble with is I need to use a physical key switch to essentially lock the system so settings can't be changed and so the machine can't be powered off. I've attached a picture of what I have tried to do. basically the 5V feed is fed to both the switches. I've connected the other side of the switches to pins on the chip to detect which switch is closed and act appropriate. The live feed also comes off the switches. through a diode to prevent the current reversing and then the two feeds join back up to create the live feed for the rest of the system.

having never used diodes in this capacity before I was dead chuffed at how well this worked as it allowed the atmega pins to just monitor the switch they are connected too without the current flowing through the other switch leaking through. However I soon noticed the LED had gone really dim...everything else works fine...

After hours of google searching I start wrapping my head around this whole voltage drop thing (not a smart man!) and it seems to me that this could be the problem. half confirmed to me because when I attach the live after the diode the LCD springs back in full force.

I've attached a crudely drawn picture to explain as that probably made zero sense. I was just wondering if anyone had some advice on how to get around this so I can have both switches work, be able to detect which switches are closed and have the LCD at full brightness.


Please include the whole circuit. I don't understand what you are doing.




A rather novel and clever use of a power mosfet for reverse protection with very little voltage drop.
Do not look into laser with remaining good eye.


The whole circuit is a complete birds nest of jumpers and would probably over complicate this. However I'll try and do a better job of explaining it.

Theres 4 scenerios having the two switches create:

Scenario one - Both switches are off and no power to circuitry

Scenario two - Power switch is on and lock switch is off. in this state pin 1 is read as high by the ATMega and pin 2 is read as low. The program will allow the settings to be altered when in this combination

Scenario three - Power switch is on and lock switch is on. Both pins will be read as high and the programme will disable the inputs on the machine, meaning none of the settings can be altered, and the machine will still be powered even if someone turns the power switch off (such a shame people can't be trusted :P)

Scenario four - locking switch is on and Power switch is off. In this scenario the programme will check if the power switch has previously been switched on by checking a variable that goes high when pin one has gone high. If the power switch has previously been high it looks the controls. if the power switch hasn't previously been turned to high then LCD displays a message telling user to turn off the lock switch and turn on the power switch.

The things I need are to allow the power to stay on even if the power switch is turned off. and to detect when the lock switch is on so I can disable the controls for the machine. I have put the diodes in place as without them if pin 1 went high so would pin 2 and it wouldn't allow me to detect which switch is active. The programme works like a dream it's just the voltage drop I believe from 5V to 4.3V that is causing the LCD display to become dim. I didn't know if there was a work around or perhaps a better way to accomplish this


Sep 21, 2016, 01:56 am Last Edit: Sep 21, 2016, 01:57 am by Graynomad
The easiest thing to do is just use schottky diodes, they have a lower Vf (forward voltage) than standard diodes and that may be just enough to make things work.

Otherwise use FETs as mentioned above or get a "perfect diode" chip or two.

Another option is to use dual pole switches, one pole for the power and the other for the logic (assuming that the power is in fact the same source as they will be shorted if both switches are on).
Rob Gray aka the GRAYnomad www.robgray.com


Thank you Due_unto  for the link. It looks promising but currently is a little over my head. some googling required on my end :) but thank you for the suggestion.

Graynomad - The dual pole switches would probably be the simpliest...however me being a dumdum I have already drilled the enclosure for the switches I have, so for now I'm going to rule that solution out (however if I bugger up the other suggestions it's a great back up so thank you!)

on the schottky diode side of things, do you think something like the following would be suitable?


It appears to only have a voltage drop of 450mV so I'd hit 4.55V instead of 4.3V. do you reckon the bump of 250mV would be enough to bring the display back to a more spritely level? The display itself is a LCM1602C. I've just found a datasheet for one and it mentions the operating voltage being 4.5-5.5V so I'm hoping that could be a viable and simple solution (here's the datasheet http://www.datasheetspdf.com/PDF/LCM1602C/710096/4)


t appears to only have a voltage drop of 450mV
Vf depends on current and the data sheet only shows this for 1A and 3A, I can't see the current requirements for the LCD but I'd say it's a lot less than 1A so i think you would get even better Vf. For 18p give it a try, especially if you have a Maplin shop down the street.

However I soon noticed the LED had gone really dim
Mind you it's hard to imagine that an LED would much care about a few 100mV, are you convinced this is the problem? If you short across a diode does the display pop back to being nice and bright?
Rob Gray aka the GRAYnomad www.robgray.com


Yup fairly certain my current requirements are less than 1A for this (although I have yet to do the maths). Will be popping out in the morning to go grab a couple to try...what's the worst that could happen :P

sorry that's me getting my words muddled on the LED front. It's not the LED (backlight) that's dimmed. It's the actual letters in the LCD. but yes when I chuck the live the other side of the diode the words brighten up again. I'm hoping that's the tell tale sign that it's the diode being the issue as the drop in voltage is the only thing that's different with the live behind the diode...

Thank you very much for the help and guidance...really has been appreciated


Quick update - The schottky diode's were a complete success. appears the problem was the voltage just being below the recommended operating voltage of the LCD and with the new Diodes it brings the voltage up above the level and the LCD is displaying in all it's glory. Thank you for the help


Rob Gray aka the GRAYnomad www.robgray.com

Go Up