Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

multiplexer for sensor detection

Status
Not open for further replies.

dika

Member level 4
Joined
May 3, 2006
Messages
72
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Activity points
1,897
i'm trying to build a multiplexer for sensor detection using 8051 (89s52). this device communicates to a data concentrator which used msp430. i'm using UART to communicate between both mcu.

there's 16 analog sensors thats going to be read and they're approx. 10 meters away from the mcu units. and they're using AC voltage

these sensors only triggered (sends a voltage value) when it's active, so i'm thinking to use relays or some comparators to detect some voltage limit and sends it to the 8051.

the thing is i'm too sure whether the signal from the sensor will be read by the 8051 because of the distance. and whether using relays and comparator is a good idea

and how do i detect if there's a sensor triggering without using interrupts, coz i'dont think there's enough interrupts and polling isn't a good idea (isn't it)

anybody have suggestion or advice or objection?
thanks before
 

send me the schematic in .pdf and may be i can help. if the sensor signal varies as a frwquency, legnth will matter. if it is a volatge level, you need not worry. do put a 10uf cap on the sensor inputs to filter the nosie although, if your sampling is not time critical.
 

here's the schematic
i'm using 3 optocoupler to interface the sensor to 8051
thanks before
 

It looks like this microcontroller has nothing else to do but to scan inputs ..
Put it into an endless loop, read inputs and if any change is detected program it to send message through the serial port ..

Having optocouplers between sensors and the microcontroller is a good idea ..
Because of the distance you may also consider wiring up sensors using shielded cables ..

Regards,
IanP
 

thanks IanP,

i was thinking to use an RJ for the socket, can u advise on which type should i use? and about the cables, can u specify any category that suits my application?

and for the firmware, if i want to detect the incoming signals using a single interrupt (maybe to parallel the signal and hook it to the INT port), is it possible?

cmiiw, but i think to poll every single input isnt a good way to do it. coz i have to monitor the condition of the other mcu (msp430), before i can try to send data to it.
 

Cable: I would probably go for:
"Belden
1533R Category 5e DataTwist Five
Shielded Twisted Pair Data Cable
Category 5e ScTP
24 awg solid bare copper conductors
Twisted pairs
Overall Beldfoil shield with 24 awg stranded tinned copper drain wire.
PVC jacket sequentially marked a two foot intervals.
Third party verified to TIA/EIA 568-A Category 5e
RJ45 compatible."

Interrupt:
There is no simple solution to generate interrupt by several signals ..
Even if you use diodes for signal separation, if one input goes low and in the meantime another is active low you will loose one of them ..

Maybe you can use "PLC-approach" and generate an interrupt every, say, 5ms, and then make the input scans ..

Another option is to use port expander such as, for example, the PCF8575 (8574) as this IC has an interrupt output which is active on transitions on the I/O pins .. and having sensors connected to the microcontroller use this chip as a smart interrupt generator ..
**broken link removed**

Regards,
IanP
 

hello everyone,
can anybody help me to code a 1 second interrupt using timer 0,1 or 2 from at89s52.
kindly guide me on how to use the timer configuration.
i'm trying to use the code for polling the i/o pins and to send data through UART.
thanks
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top