Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

What relay should I use with Parallel Port?

Status
Not open for further replies.

Triple-H

New Member
Hi

I am working on a project to control a car toy. The toy car is controlled via a controller that is connected to it via a wire, so it's not radio controlled.

I would like to use relays to control toy via parallel port. I think there are many relay types and models, and I would like to know which one is the most suitable one for this case. [ I never used relays before]

Also, I may try to use the parallel port to control a desk lamp that runs on AC power, so I need the model number of a relay that can be used in this case [any circuit schematic would be appreciated too :D ]

Note: In my country, it is very hard to get electronic components, and getting them online is not an available option for me, so can you please give me more than one model number of relays that can do the thing I need?
Note2: It seems that the shop the sells electronic components in my city gets all its stuff from this supplier: Velleman nv - Start - Overview
If it is possible, can you tell me which one of their relays is mostly suitable for me? I simply don't know how to determine the suitable one for my case :(

Thanks a lot ! :D
 
The parallel port will not directly drive relays (0V and ~3.5V). Your best bet is to use an external power supply (12 or 24V to match commonly available relays) and use a NPN switching transistor to drive the relay coil. Use a 1K resistor between the parallel port pin and the base of the transistor. Use a silicon rectifier (1N400x type) as a snubber across the relay coil; anode to collector, cathode to V+. This way you should be able to use commonly available automotive 12V relays.
 
This link is very good to get you started using the parallel port and shows exactly what MikeMI was getting at using transistors. The link also has dozens of other useful links.

Additionally **broken link removed** is for a relay card designed for parallel port operation. The nice thing is they give a link to their board showing the circuit in schematic form. Also very good is a link to their software for controlling a parallel port.

I believe a Google of Parallel Port Central will bring up some great info also.

Something I noticed is the above software will run on Windows XP and earlier Microsoft operating systems as well as Linux. Newer systems like Vista and Windows 7 don't run it.

Ron
 
Hi

Thanks for helping, but I want a relay model that can be switched directly from the Parallel Port [no transistor]. Isn't there a relay that can be switched directly from Parallel Port?
 
Triple-H,

I use Opto 22 relays for interfacing the parallel port. You can most always find their products listed in eBay and they care very inexpensive.

Yep,
I'mClueless
 
...I want a relay model that can be switched directly from the Parallel Port [no transistor]. Isn't there a relay that can be switched directly from Parallel Port?

No mechanical relay. An SSR typically will operate at 3V @3mA.

Do this test. Write a 1 to a given pin on your parallel port. Tie a 1K resistor from that pin to one of the PP ground pins. Measure the voltage across the resistor. If you get three volts or more, then your port will drive the SSR. If less than three volts, then you will need some sort of powered driver. You could steal 5V to power a driver off the USB.
 
Hi

I really like the USB power suggestion, but let's say I managed to get 3V from my PP, will ANY model of an SSR work? or is there a specific one?

Thanks a lot!
 
Hi

I really like the USB power suggestion, but let's say I managed to get 3V from my PP, will ANY model of an SSR work? or is there a specific one?

Thanks a lot!

Did you try as Mike suggested? If you place a 1 KΩ resistor and drive the bit high and measure at least 3 volts or more it tells you that the port can source at least 3 mA. No, not all SSRs are the same. Much like all parallel ports are not the same. If you had taken the time to read the first link I posted you would have a basic understanding of what a parallel port can sink or source as to current.

You haven't mentioned what you want to drive with the parallel port? That would be a big factor in determining what SSR may or may not work for your application. There are hundreds of SSRs out there. Additionally short of a DC SSR using an everyday SSR assumes your load will be AC and not DC. Planning on an AC load?

Ron
 
The relay is switching the car's internal battery voltage to a motor, right? Is so, you dont need a relay, you just need a transistor whose base is supplied by the PP, and whose collector circuit switches one end of the motor to battery -, while the battery+ is tied to the other end of the motor. Still only two wires running from the PP to the car; the transistor will be located in the car.
 
Did you try as Mike suggested? If you place a 1 KΩ resistor and drive the bit high and measure at least 3 volts or more it tells you that the port can source at least 3 mA. No, not all SSRs are the same. Much like all parallel ports are not the same. If you had taken the time to read the first link I posted you would have a basic understanding of what a parallel port can sink or source as to current.

You haven't mentioned what you want to drive with the parallel port? That would be a big factor in determining what SSR may or may not work for your application. There are hundreds of SSRs out there. Additionally short of a DC SSR using an everyday SSR assumes your load will be AC and not DC. Planning on an AC load?

Ron

The relay is switching the car's internal battery voltage to a motor, right? Is so, you dont need a relay, you just need a transistor whose base is supplied by the PP, and whose collector circuit switches one end of the motor to battery -, while the battery+ is tied to the other end of the motor. Still only two wires running from the PP to the car; the transistor will be located in the car.

I am actually planning to do two projects. One of them is switching a regular desk lamp [AC powered] via the computer. The second project is controlling a toy car [DC Power], so I guess I'm gonna need to different SSRs. I can't use a transistor because it will cause some problems to my circuit, it just doesn't work with a transistor, that's why I need to use a relay.

The problem with my circuit is that I need to make each motor able to spin clockwise and counterclockwise. My circuit uses the a similar concept to this schematic [bit exactly the same though, but it has the same concept]:
**broken link removed**
When using transistors with my circuit, current will prefer to go to the branch with lower resistance and will not flow to the motor.

I just wanna know what type of SSR should I use with this project and with AC lamp project.

Thanks a lot!
 
Last edited:
"I just wanna know what type of SSR should I use with this project and with AC lamp project. "

As mentioned previously, you'll have to do some testing and researching on your own.

First, determine as Reloadron suggested, if your port will have the capability to drive a SSR directly. Use the 1K and measure with a meter. I would go even lower, 470 ohms, for the reasons outline below.
Then google SSRs, and read the spec sheets for the minimum required drive current. In the past, I've seen SSRs that require at least 5 mA, some as high as 10 mA; that is the reason I suggested the lower resistor value.
 
No mechanical relay. An SSR typically will operate at 3V @3mA.

Do this test. Write a 1 to a given pin on your parallel port. Tie a 1K resistor from that pin to one of the PP ground pins. Measure the voltage across the resistor. If you get three volts or more, then your port will drive the SSR. If less than three volts, then you will need some sort of powered driver. You could steal 5V to power a driver off the USB.

I'm really sorry for taking so much time to do the test, my PC was having problems (damn stupid Windows XP) lol.
Fortunately, I did the test, and i got 3.12 volts across the 1K resistor ( so my PP can source about 3.12 mA).

For now, I will only need an SSR relay for my circuit that will drive a DC motor. The DC motor I have needs at least 100mA in order to spin fast enough (it has it's own 6V battery source and runs great when connected directly to to battery) i want to make sure the relay doesn't alter the current to the motor in any way (it should merely act like a switch when PP data pin connected to it is high).

I have seen circuits of relays connected to PP, but they use a transistor and need an external power source (usually 12V). That doesn't work for me since I will need 4 relays for every circuit I make. (i am planning to make a lot of these circuits, so an external supply to each relay is a bad idea).

I just need the model numbers of a few kinds of popular SSR relays that only need 3mA to switch on (i am using DC load for this project).

Thanx so much, guys!!
I really appreciate your help!
 
I'll tell you what. I should have some spare time this weekend. I'll do a little experimenting on my own and get back to you with what may help.

Ron
 
from what i could understand, photo-MOS SSRs don't alter the output current to the load, right? Their resistance (as indicated in the datasheets) is very little (like 0.3 ohms).

since im not very good at reading datasheets, i just want make sure of a few things, if you don't mind.

for the first datasheet you gave me (model AQV101(A)) :

Input ---> LED operate current ---> Typical ---> 2.3 mA ---> this means that it will be switched on when at least 2.3 mA flows through it's input, right? can my PP (3 mA max) switch it on?
Input ---> LED turn off current ---> Typical ---> 0.8 mA ---> this means that less than 0.8 mA of current switches it off, right ?
Output ---> On resistance ---> Typical ---> 0.3 ohms ---> is this the resistance of the part of the SSR involving the load?
Output ---> Continuous load current (DC) Max ---> 0.7 A ---> if i use it to switch on a motor , the max current to the load is 0.7 A, right?
the turn On time is about 0.2ms (which is great for my circuit)

from what i found out, it looks like the first datasheet you posted has the perfect relay (AQV101(A)) for my circuit. But i want to check, will that relay lower the current in the circuit with the load? I am asking because I tried building my circuit with transistors instead of relays, but the transistors I used dramatically reduced the current in the circuit (although I supplied the collector pin of the transistor with 6 Volts and very little resistance, very little current flowed out of the emitter pin and into my circuit. I double-checked that I was supplying the the base pin with enough voltage. what happened was that only 10mA was flowing through the whole circuit. my DC motor didn't run at 10mA and it needs at least 100mA. I guess I should've checked the emitter current of 2N3904 NPN transistors before building the circuit.)

would this relay work if i used it to switch on a DC motor and used PP (3 mA) to turn ON and OFF?

thank you for your time.
So, i guess i should try to find this relay AQV101(A).
 
Last edited:
The answer to all your questions is essentially YES. But you'll need to calculate a series resistance from the PP which will provide the 3 ma...remember now there will be a LED in series with the resistor, so the actual current will be less than using the resistor to ground alone

Other things;
If you motor draws 100mA, and the SSR's equivalent resistance is 0.3 ohm, then motor's voltage drop will be 0.1 * 0.3 = 0.03 volts.....really nothing.

However, DC motors in stall condition will draw a lot of current. You need to measure what the stall current will not exceed the maximum rating.

This is all theoretical discussion......... Time to get the soldering iron warm and the multimeter on! Purchase a couple and start doing experiments.
 
First of all, I would like to thank you again for all the help!

I have done a little experimenting, but I still can't figure out how to use an NPN transistor (2N3409) to switch a DC motor ON and OFF (this was my original circuit design), despite the fact that this transistor (according to the datasheets) has a max load current of 200mA (my motor only needs 100 mA). The PP switches the transistor ON and OFF through the base pin, but the current I get flowing through the emitter pin is less than 70 mA, and the motor doesn't spin. I tested to see if my voltage source was defect, and I connected it directly to the DC motor, and got 170 mA. So it seems that the transistor was lowering the current passing from collector to emitter pins. (does this have to do with hFE and other stuff that I don't understand?) This is the reason why I sought a relay, because I thought that it could be a better switch for my circuit, and I thought that it would act as a simple switch (without changing the current). Do relays (this SSR particularly) act just like simple mechanical switches?

I will continue experimenting with my circuits now.
Thanx a lot! I hope I didn't bore you to death with my silly questions!
 
I know that it would be stupid to ask you to tell me how to learn all the ins and outs of electronics (there is no easy way for it), but I just wanted to ask you this:

Is there any way in hell that some average-IQ guy like me can learn about electronics without having to attend a college and getting a degree in Electrical Engineering? Well, I'm still 18 and I tried to learn more about electronics by reading text books and stuff, but I really couldn't understand much. Do you think if I took a Calculus course (i am taking one this year), I might have a chance of learning about electronics without having to get a degree in Electrical engineering at a college?
I know I sound desperate, but it's only because I'm really into Electronics and I really dont want to quit just because I hit a giant wall!

Without the help of guys like you, no one would ever have a chance of learning anything about electronics, so keep it up!!!
 
A little off topic drift here:

Learning electronics is likely like learning anything else. My own thoughts is to start with the basics and slowly move along from there. Calc is not needed for the basics. Everything starts with basic math and DC circuits and like anything else there is a learning curve. Books about the basics are a good starting point. Forums like this can be a great help. However, something about the forums you need to know and understand.

When I read your initial post my butt is sitting in Cleveland, Ohio USA. I have no clue about you and more important is I have no clue what your level or knowledge base is. If I know you are learning and just learning the basics I can try to tailor my replies much better. I think the same is true of most people here who enjoy helping others. Nobody here knows all of it but combined this place has one hell of a knowledge base. Those of us who work this stuff for a living (beanies and weenies on table) all have specialized areas we excel in because it is what we do.

Just ask questions! If you are pointed to a link and don't understand then come back and say it went over your head. You will get it eventually and rest assured at 18 years old you have plenty of time to learn. Failed projects, smoke and fried parts are part of the learning curve. Don't get discouraged. Must have been about 47 years ago I peddled my butt off on a bike to a parts house and bought my first two transistors (CK722) and peddled my butt home after blowing my five bucks. One hour after getting home I had two toasted CK722 transistors. That EBC thing was a bummer when you did it backwards. First parts I toasted and sure as hell weren't the last! :)

We will get you going with this project so don't get discouraged. You will be happy when things work. I dug out one of my old XP machines as working with the parallel port is not as easy in Vista or Windows 7. So how do you plan to communicate with the port? I will have more time as we get into the weekend.

Ron
 
Thanx Ron.
The thing is, I want to know this: Is it necessary to go to college to learn about electronics? Or can someone learn it at home by scouring the web, searching for books and stuff? I realize that it will take me a long time to learn about electronics, and i have a lot of time. So, i have no worries now.

You needn't worry about the parallel port. I already know how to use it and I can choose which of the data pins to set HIGH or LOW. ( I am actually using a programming language called Processing, which enables easy access to Parallel Port). No problem with the parallel port itself. Thanx for caring! :)

But the problem is getting the PP to switch my motor ON and OFF. I tried using a NPN transistor (2N3904), but it just lowered the current to the motor.
Some more details:
I connected the collector of transistor to + terminal of 6V battery, and emitter to one side of the motor. Then , the other side of motor is connected to - terminal of battery. The PP is connected to base (switching it ON or OFF). I also did not forget to connect ground of PP to - terminal of battery (without that, it doesnt work). Using my multimeter, I detected that the transistor was being switched ON and OFF, however, I only got 70 mA at the motor (instead of a hundred and so mA). So, the transistor was changing the current.
My question is:
will the SSR relay also change the current? or will it act as a mechanical (although it really isn't) switch?

once again, I am sorry for rushing you guys so much. Take your time (really). Thank you! :)
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top