Best Approach - 24+VDC Digital Signal with 5v Logic  - Page 1
Forum section: electronics / beginners

author: ed_reardon
author_rank: Regular Contributor
timestamp: May 11, 2017, 09:10:06 am
content: Hello all,I've been mulling this over, any suggestions:I need to use a comparatively 'high' voltage DC signal to be used as a signal for interpretation by logic (using an Arduino for prototyping), this signal is digital but the voltages aren't especially consistent between areas the unit will be deployed and can vary from say 18VDC to as much as 50VDC allowing some margin for safety.Ideally this signal circuit will be galvanicly isolated from the instrument.1) Use a current sense circuit, simple logic for 'if current present = circuit on'.2) Transisitor logic.3) Opto circuit.Are there any benefits and constraints I should know about with each approach? I'm struggling to find Optos which can deal with such a high degree of voltage values.Any pointers or advice welcome,Cheers,Ed

author: Ian.M
author_rank: Super Contributor
timestamp: May 11, 2017, 10:57:28 am
content: How fast is the signal - do you need to add any filtering etc.?It depends how much you want to 'gold plate' the solution.e.g. this optoisolator driver circuit will protect against reverse polarity and any voltage up to 100V, turns on between 10V and 14V, and holds the Opto LED If constant at 5mA +/-10% over the range 18V to 50V.D1 provides reverse polarity protection and D3 sets the logic '0' threshold ('holdoff' voltage). Q1, D2 and R1 limit the voltage available, and R2 sets the opto LED current. You'll probably have to tweak it a bit fr your chosen opto's Vf@5mA.MPSA29G is a 'jellybean' Darlington that can be got for $0.10 each, and the two Zeners are low dissipation so just about any 5% part of a suitable voltage can be substituted.The closer you make the holdoff voltage to the emitter voltage of Q1, the closer the tolerance the Zeners need to be to maintain the desired If. Make D3 a 5.1V Zener and increase R2 to 1K5, and you can use 10% Zeners, but it spreads out the turn-on region to 7V to 15V

author: sokoloff
author_rank: Super Contributor
timestamp: May 11, 2017, 01:24:32 pm
content: @Ian, what app is that? It looks super-useful.

author: Ian.M
author_rank: Super Contributor
timestamp: May 11, 2017, 03:39:56 pm
content: LTspiceis a free download from Linear Technology - its a favourite here.

author: ed_reardon
author_rank: Regular Contributor
timestamp: May 12, 2017, 07:33:25 am
content: Many thanks Ian, the signal could be deathly slow, it's for a fail alarm for an instrument so it theoretically should rarely switch off anyway, the logic will only sample this input at 900s intervals anyway - a high frequency system this is not.There may be some dead-banding etc but this will be in logic.That's a really great circuit block, thank you very much for your input

author: Ian.M
author_rank: Super Contributor
timestamp: May 12, 2017, 08:38:16 am
content: In that case, you can slug its frequency response with a little capacitance across D2 so it doesn't trigger on impulse noise.However if you don't actually need opto-isolation, you can do it better and cheaper.Its threshold depends on the divider ratio and the switching point of the Schmitt trigger gate, but for this example, where its set to 2.5V (+/-0.1V), is 10V (+/-0.4V) at 'in'. Depending on the negative input limit of the gate, you may need 10K between point 'i' and its input to limit the protection diode current when D1 is forward biassed.Its pretty much idiot-proof as it will survive its input being connected to 415V AC line indefinitely! Just watch the voltage rating on the resistors used for R1.Of course if the mouth-breathing muppet in unlicensed possession of a screwdriver hooks the input ground to the line it gets more exciting, but you can add a HRC fuse in the input ground to protect against that sort of idiocy.