I'm using a computer to gather data using LPT1 port. The input pins of the lpt accept 0-5V.
I want to know when three utility motors using 30V start and when they end. When a motor starts it gets 30V. Actually they should get 24V but occasional bursts to
30V are normal. The motors themself can handle the extra voltage.
What is the simplest way lower the voltage to 5V for my LPT port? I've done simple electronics but a simple schematic would be great. I want to know when each of the motors start.
The safest way to couple signal from a "dirty" source -motors are notorious sources of noise and spikes- into a logic circuit is to use an optoisolator, a device with a lamp (usually an LED) on the dirty side and a phototransistor on the logic side. These are common parts, available from any of the online distributors. You connect the phototransistor side between a logic input and ground, with a pullup resistor. The LED side goes across the motor, with a series resistor whose value depends on the motor voltage and the current required by the LED.
Another approach is a simple 6:1 resistive voltage divider, but you have to protect the logic input from overvoltage and from the negative voltage you get when you switch the motor off. Two diodes may be enough: one from the logic input to ground (anode to ground) to catch the negative back EMF from the motor, and one from the logic input to the 5V logic supply (anode to the logic input) to dump any overvoltage spikes into the
5V supply's filter capacitors. The optoisolator is safer. They typically offer several hundred volts of isolation.
Using a Photo coupler is the safest method that I know of. Just pull one of the input pins of your port using the photo output transistor.
Since you stated 30 V's maybe the max at times I would use ~ 2 thirds of the LED (If) which is ~ 45 ma. R = (30-1.2)=(28.8)/0.045 = 640 ohms. W = 0.045*1.2 = 0.054 watts.
formatting link
P.S. Might be advisable to use a zener diode of around 30 volts so that it can be protected from reverse voltage exceeding (Vr)
6 and forward voltages exceeding 30 volts.
If this is a brushed motor, it can generate inductive energy that isn't safe even for the coupler. A cheap zener diode helps this out in minor cases and the photo coupler helps in major cases to protect the computer.
Yes, I made a mistake there. got my 1.2 mixed up with my 28.8.
No, I didn't miss it.
I just wouldn't subject the PC port to a motor circuit. Although you have covered all bases as far as over voltage and reverse voltage, you didn't account for current loops on the ground path between the devices which loves to make PC's miss behave. Motors are notorious for generating such currents if improper installation is performed.
--
The OP didn\'t ask for installation instructions, he asked for the
_simplest_ way to get ~ to 5V to his printer port when the motor was
running, and my circuit will get it for him.
I don\'t think you can get much simpler than a resistor and a Zener.
Well, maybe a two resistor voltage divider, but that won\'t provide much
protection...
Just changing the voltage is possibly not enough, things like ground loops cour damage your pc or stop the other equipment from working.
the easiest way is use a 24V relay, or to use optocouplers.
The parallel port inputs have internal pull-ups so you only need to connect them to the pc's digital ground or disconnect them - you don't need to provide a 5v signal.
Thanks. I was rather surprised for the AC. I was testing teh first simple setup with another transformer that was DC. I'll have to rethink the system over again.
I would not bet on the fact that your motors are referenced with the same ground. If you connect the wrong wire to your PC parallel port, and you have ground issues, you can destroy your mainboard.
You can test this by using a DC voltmeter between the ground at the parallel port and the ground at the motor.
a resistor used to increase the voltage at a point in a circuit whenever it's not connected to any input signal.
what this means is that you don't need to provide 5v to the printer port, you need to take it away from the printer port.
I had suspicion it might be...
you'll just need to change that a adding a rectifier so that the relay gets DC, and a capacitor to stop it switching off while the AC voltage altenates, and reduce the resistor so that the relay gets enough power....
An opto-coupler will use less power than a relay and is less fussy about how much power it gets which makes the design easier (cheaper and more reliable too)
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.