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.

auto Detection of the devices on the microcontroller

Status
Not open for further replies.

khanna_gunjan

Member level 3
Member level 3
Joined
Jul 18, 2006
Messages
64
Helped
9
Reputation
18
Reaction score
7
Trophy points
1,288
Location
Nürnberg, Germany
Activity points
1,699
Hello All,

I am working on a project where we need to detect automatically if there is any sensor conected to the Analog or digital Input ports of the microcontroller. (like Plug and Play devices). The voltage for the digital Input is 5V and it is normally high, when no input is there or if the contact for the device is open. And for the analog port the input range is 4 to 20 mA current.

Does anzone has a idea how this can be achived so that if the user conects something on this port it is detected automatically.

Thanks in advance.
 

For the analog signals, it is easy: the 4-20mA range actually was designed especially to allow you to distinguish a loss of signal from a zero signal. Therefore, if you measure something that is much less than 4mA, you know there is no sensor present (or the wires are broken or shorted).

For the digital signals you are describing, things are not so easy. The only way I can think of is to use an additional connection on the connector, a pin which would be pulled either high or low only when the connector is plugged in. Not a very elegant solution, and possibly not feasible, since it requires doubling the number of inputs.
 
As VVV says puting your 4-20mA across a 250Ω resistor wil give you 1 to 5 V, anything less than say .5V means not connected.

The Digital signal has several solutions depending on whether its a data stream or a digital on/off signal, and whether you wish to add more hardware or software.

Because your still in the project phase Id look at either the spare input if you can, or converting the digital signal to a four state analog (Open circuit, High, Low, Short circuit) - if its *not* a data stream and you have a spare analog input.

I've used this on some 2 wire remote sensors when I needed to know the circuit is operational.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top