Maker Pro
Maker Pro

Protecting microcontroller from inputs

eem2am

Aug 3, 2009
429
Joined
Aug 3, 2009
Messages
429
Hello,

I wasnt gong to post this schem, but it looks so bad, that i may as well, as its not likely to be useful to competitors.....

A contract electronics company has designed for us a LED lamp which can be flashed in synchrony with other LED lamps of exactly the same type.

I think they have made mistakes……do you think so too?

Here is the schematic surrounding the microcontroller that flashes the LEDs on and off, and communicates with the other LED lamps to allow it to flash in synchrony with them.

http://i45.tinypic.com/2cd8wf7.jpg

These LED lamps, could , for example, be mounted on a big lorry, etc.

My problem is that GP5 can never “see” a high input because of the 5V6 zener (D2) in series with it.
GP5 is supposed to be checking that when a (logic high) SYNC pulse is sent (by turning on Q1), that the SYNC pulse really does get sent……i.e., that P3 goes high.
…the reason to check to see if turning Q1 on takes P3 high is to check if the sync line is shorted to ground……
…but as you can clearly see, GP5 will simply never see a high input due to the zener diode D2.

…..Why didn’t they just use GP2 to sense whether the SYNC pulse is actually sent or not.?

It appears to me that the designers were worried about overvoltages destroying the microcontroller. This is why , I think, they used the 5V6 zener, D2.

The problem with sync’ing these LED units is that each lamp has a local ground, and of course, this may be different (due to I*R drops) than the ground local to the other lamps.

With 200 lamps potentially mounted on a truck, and each lamp potentially drawing 0A75, then theres potential to have well over 20V difference between the various bits of ground at each lamp……..so why did the designers think that a mere 5V6 zener diode would be enough to protect the microcontroller pin?

…….and why have they only protected against excessively high input voltages……..excessively low input voltages on the sync wire are just as likely…..so why not back to back zeners?

Anyway, do you agree that the only way to correctly do this job is to use like a 420mA signalling approach, and use optocouplers to receive/send the sync signal?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I think they have made mistakes……do you think so too?

Well, let's see...

My problem is that GP5 can never “see” a high input because of the 5V6 zener (D2) in series with it.

Maybe that's a "fault" input? It seems to me that GP2 is the sync input.

GP5 is supposed to be checking that...

That would require seeing the code to check.

…..Why didn’t they just use GP2 to sense whether the SYNC pulse is actually sent or not.?

As above...

It appears to me that the designers were worried about overvoltages destroying the microcontroller.

Possibly. That is why they have resistors (and reasonably high value ones) in series with the input pins.

This is why , I think, they used the 5V6 zener, D2.

I disagree. D2 is there for another reason. If it was for input protection, it GP2 would have one.

The problem with sync’ing these LED units is that each lamp has a local ground, [...] theres potential to have well over 20V difference between the various bits of ground at each lamp……..so why did the designers think that a mere 5V6 zener diode would be enough to protect the microcontroller pin?

I suspect that the 5v6 zener is there to either detect an overvoltage condition on the input, or, possibly to extend the potential range of measurements by another 5V or so.

My first thought was that it may have been better to capacitively couple the sync inputs to the sync output, however in an electrically noisy environment, this may have increased false triggering.

…….and why have they only protected against excessively high input voltages……..excessively low input voltages on the sync wire are just as likely…..so why not back to back zeners?

That's another reason to suggest that the zener is not there for that reason.

Anyway, do you agree that the only way to correctly do this job is to use like a 420mA signalling approach, and use optocouplers to receive/send the sync signal?

I'm not sure what a 420mA signalling approach is.

Do these devices work? If not, what are the drawbacks? When do they fail to sync?

How are they connected? Do they use a three-wire cable (+. -, sync), or 2 wire (+, sync), or 1 wire (sync -- and must be powered from some nearby source of 5V?)?
 
Top