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.

Digital Output from Computer?

Status
Not open for further replies.

debraye

New Member
Be warned, i am a complete newbie.

i've been working on a project but now im stumped and seemed to have hit a brick wall, i need to send a starting signal to a circuit by activating a 6Vcc relay, but i need to send that signal from the computer, i think i need to convert the digital signal to analog, but then again im not sure how to conect something like a DAC00800 which i can get quite easily but i've seen the tech sheets and i cant understand a thing. And second of all what would i connect to it? the Serial port from my computer comes into mind, but im not sure if its possible or what would i need.

Other ideas also popped up, i can send a digital signal via my audio out port also, but then again i would be sending signals out every time a windows sound starts and it just sounds kinda messy doesnt it?

The last one is using the Digital outputs from a OMB-DAQ-2416 data aquisition board, but again i've seen the tech sheets and i dont understand a thing of what is needed to connect them properly :'( i do have all the tech sheets if you guys need it, also if u need any more information, or to clear any doubt ill be checking the post frequently.

Ty for your time :D
 
This would work much better if you better explained the project. I have no clue what a DAC00800 is but I do know what the OMB-DAQ-2416 is. The latter is not that difficult to write software for using the tools provided by Omega. However, if you just want to send one bit to activate a relay the OMB-DAQ-2416 is substantial overkill. If the computer has one, using the parallel port (the old printer port LPT) can be used. Additionally if the computer has an RS232 serial port it can be used.

You really need to better define exactly what you want to do and what ports the computer you plan to use has. You only want for example a digital out? Just a single channel DO (Digital Out)? You don't plan to read anything coming back? Strictly digital and no analog?

And per Mike the USB Bitwhacker may be a perfect solution.

Ron
 
Last edited:
ugh my previous reply is taking ages to be approved, but to be quick
i only need to read anything coming back, it can be either digital or analog but enough to activate the coil on the relay.
Im not sure the computer has a LPT port cause its quite new, but im pretty sure it has an RS232 port.

The DAQ is being used in the project to receive data from other sources and all the digital in/out ports are free
 
The DAQ is being used in the project to receive data from other sources and all the digital in/out ports are free

Then use the DAQ. If the DAQ is already in the project and has an available Digital Out I would use it. If you can explain the project in more detail it would help. My guess is you are using the Omega software and using the analog input channels.

Ron
 
yes, im using the soft, thats the thing im more of a programmer than the other. The thing is, i dont understand how to connect a line to the DAQ digital out. In the tech specs i see a diagram on how to connect it, i wish i could link to the diagram, do you know how to connect those Reloadron?
 
Just a few things real quick. The relay you want to control? I saw a mention of 6Vcc so I can assume this is a 6 volt DC coil relay? If that is true we need to know the relay coil current? The data sheet for the relay would be a big help.

My next concern is if you are using the Omega software to measure and record for example temperatures that is fine but ... you can only run one instance of the hardware at a time. Meaning I don't think you can run the factory Omega software plus something you write at the same time. I am not sure if the Omega software allows or has a feature to turn the DIO ports on or off? Driving a relay from a DIO port is simple but the relay data needs to be known.

Ron
 
Ehmm i hate it that i cant post links without it taking ages to get approved, the relay is a Sun Hold electronics RAS - 0610

NOMINAL VOLTAGE (VDC)
6V
COIL RESISTANCE () (+/- 10%)
100 Ω
POWER CONSUMPTION (W)
0.36W
NOMINAL CURRENT (mA) (+/- 10%)
60 mA
PULL IN VOLTAGE (VDC)
75 % MAX.
DROP OUT VOLTAGE (VDC)
10 % MIN.
MAX. ALLOWABLE VOLTAGE (VDC)
130 %


Also Im not using the default software to measure, im calling the Universal Library from a C++ Program so in theory i could call the Digital out procedure from the same proggie in the moment i need it. (i suck at Electronics, but im ok in proggraming :D
 
OK, great! In theory your DO port will sink something like 150 mA @ 5V but all you need to really do it right is a simple transistor to drive your relay. Attached is a circuit using a 2N2222 transistor, very common. The diode across the relay coil (observe polarity) is there to snub the inductive kick when the relay field coil collapses.

Another way to go about this would be to use an opto-coupler but the attached should work fine.

That Omega module is a nice data acquisition module. I may get one to experiment with for a future product.

Ron
 

Attachments

  • Base Resistor.gif
    Base Resistor.gif
    6.6 KB · Views: 304
Wonderful! now, i have some questions, that would be connected directly to a digital output in the DAQ or would i need another setup before this diagram?
Second The Digital Com. What does that stand for? the Digital Ground from the DAQ? The Arrow to F is Analog Ground?

Also by checking online i can quickly locate a 2n2222A Transistor and a 1n4004 Diode, will they work? should i look arround for those exact part numbers?
 
Wonderful! now, i have some questions, that would be connected directly to a digital output in the DAQ or would i need another setup before this diagram?
Second The Digital Com. What does that stand for? the Digital Ground from the DAQ? The Arrow to F is Analog Ground?

Also by checking online i can quickly locate a 2n2222A Transistor and a 1n4004 Diode, will they work? should i look arround for those exact part numbers?

On the DAQ output digital comm is digital ground. Different manufacturers use slightly different terms. You would connect exactly as drawn and that is it. Not much to it. The transistor base resistor connects right directly to the DAQ output port and common in my little circuit is digital ground. Yes, the arrow to F is ground or common. The top of the relay coil connects to your 6 volt relay power.

The 2N2222A is just fine as is the 1N4004. The transistor can handle up to about 200 mA so driving your 60 mA coil should be easy and not require a heat sink for the transistor. It is just a simple switching circuit. We drive the transistor into saturation so it acts like a switch. This way we don't place the burden on the DAQ output.

Ron
 
Last edited:
My pleasure, don't give it a thought and have a nice weekend.

Ron
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top