-
1 Attachment(s)
Quick electronics question
I've spent far too much time this evening thinking about this, and my head is now scrambled for something that should be pretty trivial!
In the attached diagram, will the LED/resistor cause any current to flow in the line marked as 12-24v (that's the voltage to be switched to gnd, not an actual 12-24V source)
Attachment 27361
I'm pretty sure it won't, due to the LED blocking any flow from the 12-24V, so it won't cause the 12-24V to be reduced as no current will be able to flow, but I've thought about this that much now, I'm doubting myself...
-
Re: Quick electronics question
In theory with 5v on the anode and 24v on the cathode the LED is reverse biased and no current will flow. In practice you might well be exceeding the reverse breakdown voltage of the LED which will break it. LEDs tend to have quite low reverse breakdown voltages so check the spec of the device you're using.
-
Re: Quick electronics question
I can't see what it is supposed to do! I presume it is some sort of switchable state indicator for the 12-24v and you don't want it to interfere with the logic of the 12-24v line. Do you have any resistor values yet. I presume that you are intending to use a small signal NPN, in which case you will need a current limiting resistor to stop the magic smoke (or is the 12-24v line already limited).
-
Re: Quick electronics question
m_c,
Another option which avoids the risk of reverse breakdown of the LED would be to connect the LED (with a suitable series resistor) to ground after the switch to 5v. This will not fully confirm that the 24v is pulled down but will indicate that the circuit has been operated.
I assume that 'switch' isn't really a switch (otherwise you'd be switching the 24v directly) so you would have to confirm the actual device can deliver the LED current as well as the base current of the transistor.
If you stick with the design as shown remember that the LED current must be added to the load current when rating the transistor and calculating the base current and hence resistor value.
-
Re: Quick electronics question
Just put a small diode in series with LED, with adjustment to resistor value to allow for forward voltage drop when on? Should ensure that reverse voltage across LED is not excessive. Or put LED plus bigger resistor across the load directly?
-
Re: Quick electronics question
Thanks guys.
I never thought about checking the reverse breakdown voltage of the LED, but as Neale has suggested, I can just add a normal diode in series to solve that problem.
It's actually for a buffer for a touch probe, which is the last part I need so I can get the cabinet for my Triac shut and moved off the desk. The probe is designed for 5V at 20mA, and although I could connect it directly to the 24V 4K opto, I want an indicator on the machine. All the LEDs I've looked at are around 20mA, so some form of buffer will be better for long term reliability.
The final circuit will have sockets for two probes (touchprobe + toolsetter), and detection for the touchprobe being plugged in (so I can disable the spindle). This is just the basic bit of the circuit, which I just hit a complete mental block with.
-
Re: Quick electronics question
Are you concerned about the long-term effect of switching 20mA on the switch contacts in the probe? This is the kind of thing that I might have worried about until I had an interesting conversation with a friend who had spent many years working with industrial control systems. His comment was that using 24V was not just useful for noise rejection but the slightly higher switching currents also helped with long-term contact life and reliability. Switch too low a current for too long and the eventual oxide build-up could lead to poor contact but the higher currents (but much too low for arcing to occur) helped break through any potential oxide. Not sure if it's relevant here but I thought I'd lob it in anyway!
I spend many an hour musing on touch probes, generally based around the published designs for three-contact types, but wonder about mechanical switching reliability, where can I easily source gold wires/contacts, etc. In fact, anything to stop me actually getting on with the project...
-
Re: Quick electronics question
Quote:
Originally Posted by
Neale
where can I easily source gold wires/contacts, etc. In fact, anything to stop me actually getting on with the project...
https://www.proopsbrothers.com/gold-...1103-595-p.asp
-
Re: Quick electronics question
The transistor will attempt to short the 12-24V supply to ground and something will go bang.
-
Re: Quick electronics question
Quote:
Originally Posted by
cropwell
Whose side are you on, Rob? Another good excuse up the swannee...
-
Re: Quick electronics question
I am obviously not understanding.
Why not 5V through the resistor through the switch to ground?
The switch carries 5V minus the voltage drop across the LED.
Or less another 0.8V drop across the transistor if kept.
-
Re: Quick electronics question
Quote:
Originally Posted by
Neale
Are you concerned about the long-term effect of switching 20mA on the switch contacts in the probe? This is the kind of thing that I might have worried about until I had an interesting conversation with a friend who had spent many years working with industrial control systems. His comment was that using 24V was not just useful for noise rejection but the slightly higher switching currents also helped with long-term contact life and reliability. Switch too low a current for too long and the eventual oxide build-up could lead to poor contact but the higher currents (but much too low for arcing to occur) helped break through any potential oxide. Not sure if it's relevant here but I thought I'd lob it in anyway!
In the old days, this was referred to as having enough 'wetting current' through the contacts. AC was thought to be more reliable than DC though the introduction of these new-fangled transistor thingies into previously all-relay control systems made the use of DC inevitable.
-
Re: Quick electronics question
m_c,
I would do it all with a 4066 quad analogue switch. Presuming the '12-24v line' is actually the logic input on the controller for the touch probe, which is resistor strapped high and the probe output is +5v when triggered.
You would use 1/4 of the 4066 to convert the probe output. 1/4 to switch the LED and you have 2 spare to use for other things, like inhibiting the spindle.
The 4066 has an 'on' resistance of about 80ohm (if my memory serves me).
Cheers,
Rob
-
Re: Quick electronics question
If the 'switch' is the physical probe then it should be good for 24v I'd have thought. As long as the closed current is limited to the 20mA mentioned before I can't see why it has to limited to 5v. The transistor can be reconfigured to drive the LED from the 24v supply (which is NOT the '24v' connection seen in the drawing by the way. Read post #1 if confused by that)
-
Re: Quick electronics question
Quote:
Originally Posted by
cropwell
m_c,
I would do it all with a 4066 quad analogue switch.
Might work but not at 24V... or at least without spilling some smoke. Also CMOS tends to have a high switching voltage at high VSS - the 5V sensor voltage wouldn't cut it at 12V. Max current through a single channel is 10mA so rate the LED resistor accordingly.
Sorry!, not a dig!
OP: Why not use a common ground as a sense input, rather than a 5V input? (if you have 5V handy then ignore)
-
Re: Quick electronics question
The probe is (allegedly) designed to not need lots of current to keep the contacts cleaned/wetted, which is why I'm not concerned about the switching current being too low.
I'm trying to keep this buffer as simple as possible, with the exception I want LEDs where it plugs in, hence the above circuit.
By using the 5V to power the LED, it avoids having to swap the resistor values for different controller voltages.
-
Re: Quick electronics question
Quote:
Originally Posted by
Doddy
Might work but not at 24V... or at least without spilling some smoke. Also CMOS tends to have a high switching voltage at high VSS - the 5V sensor voltage wouldn't cut it at 12V. Max current through a single channel is 10mA so rate the LED resistor accordingly.
Sorry!, not a dig!
OP: Why not use a common ground as a sense input, rather than a 5V input? (if you have 5V handy then ignore)
No - you are right, 15v abs max and 10mA. But I still can't see how the original circuit would work. I would need some resistor values then I could simulate it or even bread board it. Also it would be useful to know the impedance on the 12-24v.
-
Re: Quick electronics question
m_c,
You're original circuit is absolutely fine bar the low reverse breakdown voltage spec for most LEDs (which may be very conservative in practice). As suggested previously this could be overcome by putting a standard diode such as the ever-popular 1N4148 (reverse breakdown voltage = 100v) in series with the LED. Just spec the resistor for 2 lots of diode volt drop and make sure the transistor can handle the combined current from the switched 24v circuit and the LED.
Rob,
I think the point you are missing is that the 24v line in the diagram in post #1 is NOT a supply but is an input to a controller which has a pull-up resistor to 24v. When the probe contacts close, the transistor pulls both the controller input and the LED cathode to ground. When the contacts are open the diode action of the LED prevents the controller input being connected to the 5v supply.
I'm in the process of converting my machine from microswitches to inductive sensors for the limit switches and will use diodes in a similar way to prevent the un-triggered sensor outputs (pulled up to the 12v supply by an internal 10k resistor) connecting to the breakout board inputs (pulled up to the 5v supply by an internal 10k resistor).
-
2 Attachment(s)
Re: Quick electronics question
Quote:
Originally Posted by
Kitwn
m_c,
Rob,
I think the point you are missing is that the 24v line in the diagram in post #1 is NOT a supply but is an input to a controller which has a pull-up resistor to 24v. When the probe contacts close, the transistor pulls both the controller input and the LED cathode to ground. When the contacts are open the diode action of the LED prevents the controller input being connected to the 5v supply.
No Kit, I understood, that is why I was wondering what the impedance was (i.e. the value of the pull up resistor). I would presume it is in excess of 10K to keep the current down.
I have just done a quick emulation :-
Attachment 27370
Attachment 27371
So it would seem to be OK apart from the reverse voltage on the LED.
-
Re: Quick electronics question
Rob,
Sorry to have impugned your intelligence!
Looking at your diagrams:
If you're dropping nearly 12v across R1 with SW1 open there is something seriously wrong! The collector of Q1 should be at the full 24v. On reflection there should be a pull-down resistor (10k would do) on the base of Q1 to hold it to 0v when the contacts are open, otherwise the base is left floating which should never be allowed to happen. I suspect your emulation software has picked up on that fault and is allowing Q1 to partially conduct.
-
Re: Quick electronics question
Quote:
Originally Posted by
Kitwn
otherwise the base is left floating which should never be allowed to happen
I should have remembered the lessons I learnt in the '70's when I was doing circuits with 4066's and leaving inputs floating, with unfathomable results (until the penny dropped). My emulation software is crap and out of date (IC library is woefully lacking), but it is OK for quick checks.
Yes, I put the voltmeter on to show what was happening across Q1 and did wonder why, but with the SW there should not be enough Ib to turn Q1 on. (???)
Even with strapping the base of Q1 to Gnd there is an e-v voltage of 10v with the switch open - curious... Putting a diode in series with the LED puts the emulation right, so I am going to presume that the circuit emulator has a large reverse leakage on the LED.
-
Re: Quick electronics question
Quote:
Originally Posted by
cropwell
Even with strapping the base of Q1 to Gnd there is an e-v voltage of 10v with the switch open - curious... Putting a diode in series with the LED puts the emulation right, so I am going to presume that the circuit emulator has a large reverse leakage on the LED.
That agrees with LEDs having such a low specs for reverse voltage, usually only 5v.
So we can finally give m_c a definitive answer that might actually work! Strap the transistor base to ground via a large-ish resistor to avoid letting it float with the contacts open and add an ordinary diode in series with the LED.
-
Re: Quick electronics question
Nope, look at the current flow from base to 5V supply - it's modelled the reverse leakage current of the LED. This is the point where modelling with idealised circuit models will give you a somewhat distorted view of reality, the Vce of 6-7mV (on state) will be... unusually low. Similarly the reverse bias current flow through the LED will be highly variable during manufacture and you're likely to see Vc vary quite wildly with component selection and temperature. But the principle of the simulation is correct and shows that the OP pretty much got a workable solution - with the addition of a diode to limit the reverse-bias current flow through the LED. Of course, with this making the 21st post on the subject it would be quicker to breadboard the sucker and just test it :)
EDIT: Dammit - that was looking at new posts and believing post#20 was the latest.
-
Re: Quick electronics question
Thanks for the simulation. I've been a bit quiet since posting the initial query as my head's been a bit cloudy due to a leg infection courtesy of a mishap at work last week :-/
The 'load' will be either 24v at 4K or 10K, or 12V at 10K.
I need to decide on components, as I probably have enough surplus parts. I think I've probably got suitable SMD resistors, LEDs, and either transistors or mosfets, but I need to dig through the collection and see exactly what I have and if it'll work.
-
2 Attachment(s)
Re: Quick electronics question
only just found this thread
I would add a diode to block reverse leakage current through the LED when the switch is open
a 10K resistor between the base and emitter will prevent the base from floating when the switch is open
original circuit
Attachment 27406
revised circuit
Attachment 27407
john