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.

How to conect multiple Sensors and a Relay array to PC (to serial and paralel ports)

Status
Not open for further replies.

roig

New Member
Hello all!

I want to control multiple Relays from a PC and get the values from various sensors (temperature and humidity). But my skills in electronics are low, so anyone can help me to design a smalll circuit to interact with the relays and with the sensors from any port of the pc please?

I did a research in internet and i found the pinouts of the parallel port and the pinouts of the serial port and various schematics but i don't know if they are what i need. Here is what i found:

**broken link removed**

This is for the relays i think, is it ok? zero resistors?

I want to use about 5-6 sensors (humidity and temperature). I looked in Digikey.com but i don't know which one is the best for my use, and or the easy ones to conect to the serial or parallel port. Any suggestions here please?

Thanks!
P.D. Sorry for my english! I'm still learning.
 
hi,
That looks OK as a guide for controlling remote devices using the PC parallel port.
Look at the MCP3204 and MCP3208 for reading remote sensor amplifier outputs, using the PC port.

I have attached two files, the 'exe' file requires that you have the Visual Basic run time files in the PC's Windows/System folder [ free web download]

EDIT:
The zip file is not accessible, site problem.
 

Attachments

  • ParPort2.exe
    33.5 KB · Views: 354
  • Parport4.zip
    0 bytes · Views: 0
Last edited:
Thank you Ericgibbs, the small program that you post works very well.

Now the problem are the sensors, i am totally lost here, i don't understand at all the MCP3204 and MCP3208 usage. Which type of sensor output i need?? I can see the cheap ones output "capacitance value" and the more expensive output "digital".

Thanks

P.D. What programm do you recommend me to use to simulate the circuit before i burn it all? :D
 
Thank you Ericgibbs, the small program that you post works very well.

Now the problem are the sensors, i am totally lost here, i don't understand at all the MCP3204 and MCP3208 usage. Which type of sensor output i need?? I can see the cheap ones output "capacitance value" and the more expensive output "digital".

Thanks

P.D. What programm do you recommend me to use to simulate the circuit before i burn it all? :D

hi,
Do you have Visual Basic in your PC, if yes, I will post you a source code program for communicating with MCP devices through the PC's parallel port.
When using external sensors, you may require OPA [operational amplifiers] to condition the sensor signals.
The conditioned signal outputs are then connected to a MCP input pin, the MCP is a 12bit Analog to digital converter that is connected to input pins on the PC port. A visual basic program generates 'SPI' signals which read the MCP outputs and displays them on the PC.

This image shows a PC program I use for the MCP3204, I will post a copy for you, if you write in visual basic.
 

Attachments

  • AAesp05.gif
    AAesp05.gif
    15.7 KB · Views: 414
Yes i write in Visual Basic. But eric, which sensor are you using with the MCP3204? And another important question, can i use the SAME parallel port to control the relays and input the values of the sensors to PC?

Thank you!
 
Yes i write in Visual Basic. But eric, which sensor are you using with the MCP3204? And another important question, can i use the SAME parallel port to control the relays and input the values of the sensors to PC?

Thank you!

hi,
Yes its possible to control a number of output relays, how many are you considering.?

I have used temperature and humidity sensors etc, which give a voltage output.
Its a good idea to have a signal conditioning amplifier between the sensor output and the MCP 12bit ADC.
By using an amplifier its possible to amplify, offset and filter the sensor signals.

Look at this image, it shows a dual MCP and a dual CA3240, it is drawn as a general purpose interface, adjust the potentiometers to suit your application.
Using a MCP3204 [quad], all the lines are the same except a another CA3240 is required.
There are 5 PC free output pins that could be used to drive relays.
To increase the number of relays, add a 4 to 16 decoder, with latches.
 

Attachments

  • MCP_IF1.gif
    MCP_IF1.gif
    18.9 KB · Views: 482
Wow Eric, that's awesome :D. I'm going to study this diagram and i will make another one with a decoder and latchs to learn, i will post the result here. Which software for simulating will you use to do this?

P.D. Send me the visual basic code if you want i will learn from it, but the program i want to make is in C and for GNU/Linux :p

Again, Thank you!
 
Wow Eric, that's awesome :D. I'm going to study this diagram and i will make another one with a decoder and latchs to learn, i will post the result here. Which software for simulating will you use to do this?

P.D. Send me the visual basic code if you want i will learn from it, but the program i want to make is in C and for GNU/Linux :p

Again, Thank you!

Hi,
I have posted the MCP3204, the 4 channel circuit.
Also a provisional layout for a strip PCB [needs to be checked]

I will tidy and comment my VB5 source file and post.

EDIT:
Attached a zip file, includes the complete DVM4 [VB5] folder.
Create a folder named DVM4 on your C:\drive and unzip into that folder.
 

Attachments

  • MCP3204cct1.gif
    MCP3204cct1.gif
    61.7 KB · Views: 739
  • MCP3204pcb1.gif
    MCP3204pcb1.gif
    47.3 KB · Views: 379
  • DVM3204a.zip
    101.5 KB · Views: 240
Last edited:
Ericgibbs, thanks!

Sorry but now im in my final exams, i will be there in a few weeks with more freedom and time :p
 
Ericgibbs, thanks!

Sorry but now im in my final exams, i will be there in a few weeks with more freedom and time :p

No problem, do very well in your finals.:)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top