Converting from 30V to 5V or less

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.

Reply to
spam_filter
Loading thread data ...

to

--
View in Courier:

          1/2 WATT
30V----+--[1000]--+------>4.7V
       |          |
    [MOTOR]   [1N5230B]
       |          |
GND>---+----------+------>GND


JF
Reply to
John Fields

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.
Reply to
Stephen J. Rush

When

to

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.

formatting link
"

Reply to
Jamie

When

bursts to

--
     P = Iled (Vin - Vled) = 0.045A * (30V - 1.2V) ~ 1.3 watts
Reply to
John Fields

When

bursts to

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.

To each, his own.

Reply to
Jamie

lpt

When

bursts to

--
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...
Reply to
John Fields

When

to

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.

Bye. Jasen

Reply to
Jasen Betts

He asked for that, but what he wants is a way to get 0V to the printer port. the input pins have interal pull-ups.

For it to read zero the motor must have sufficiently low voltage drop to ground the data pin through your 1K resistor...

If it's a (for example) a brushless DC motor the voltage drop may be sufficient to present as logic high with the DC supply disconnected.

I'd add a resistor in parallel with the zener to provide a reliable path for the off-state signal current, 470 ohms would be a good choice.

Bye. Jasen

Reply to
Jasen Betts

lpt

When

bursts to

when

Reply to
Test

--
You\'re right; I didn\'t think about the pullup. :-(

Thanks. :-)

JF
Reply to
John Fields

When

bursts to

What is a "pull up"? How would I connect this to my printer pins? The 30V is btw AC (just found out).

Right now I have John Field's:

1/2 WATT 30V----+--[1000]--+------>4.7V | | [MOTOR] [1N5230B] | | GND>---+----------+------>GND

Just to be safe I'll do this:

30V----+--[1000]--+------+ +---------+ | | +---+ +----> pin? in LPTport [MOTOR] [1N5230B] | 5V relay| | | +---+ +----> pin? in LPTport GND>---+----------+------+ +---------+

My aim is to find out when the motor is powered up. In above the voltage is dropped to

Reply to
Test

--- It's a resistor connected to the logic supply positive rail, and you don't have do anything; it's already connected internally.

---

--- Aarghhhhh!!!

---

Reply to
John Fields

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.

Thank you for your time.

Reply to
Test

This is what you need to make it simple and still safe for AC work. You only too use a cap on the port side so you don't get a pulse on the pin.

formatting link

This is an AC input version much like the one's used in the front ends of PLC cards that accept AC as the input type.

Found at digikey.. as

formatting link
?name=TLP620GRFT-ND

formatting link
"

Reply to
Jamie

to

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.

FYI

Regards, Bob Monsen

Reply to
Robert Monsen

lpt

When

bursts to

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)

1N4002 .------. --+-------->|---+---[3300]--[|o \\/ |] PC | | | | | 10uF=== .---[| 4N25 |]-- pin 10/12/13 30VAC (M) 50V |- | | | | | | [| |]-- pin 20 --+-------------+-------' `------'

the diode can be 1N4002 to 1n4010, the capacitor should be rated for atleast 50V (more than 50V is fine)

with those pins (pick one of 10/12/13) it'll come up as the bit

6/5/4 on port 0x379.

which current?

Bye. Jasen

Reply to
Jasen Betts

lpt

When

bursts to

Thanks.

Reply to
Test

--
Transformers don\'t put out DC, they put out AC.

What you were using is called a "DC power supply" or an "AC to DC
converter."
Reply to
John Fields

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.