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.
Printable View
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.
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.
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
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)
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)
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.
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).
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.
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.