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.

Sensor Used to Light up an LED

Status
Not open for further replies.

jeff77789

Junior Member level 1
Joined
Feb 23, 2013
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,427
So you guys have to pardon my ignorance since i am new here...and new to general electronics as well but hopefully what i will say will make sense once you get to the end of it

Basically, I have this sensor that takes a reading. This reading is a voltage and it can range from 0 mV to 2490.2 mV. This reading is going to be transferred wirelessly over 20ft to a receiver in which it interprets the data and acts as a switch to turn an LED on or off. The threshold voltage for this is going to be 1171.9 mV. When the voltage drops below 1171.9 mV, the light needs to turn on. (In the image, i wrote 2 volts but it is actually 1172 mV)

The sensor/transmitter unit is powered by 14v DC and the receiver/LED unit is powered by 9v DC. There is actually 2 sensor units and 1 receiver unit. I plan on using RF links with different frequencies for the 2 Tx/Rx pairs to transfer data.


1zx9m48.jpg


What I circled in black is what I am having an issue with. I need components that will encode the analog output into something that the rf link can send (i also think that the AN output needs to be grounded but i am not sure about that)

on the receiver side, i need something that can interpret the signal being transferred over, set a threshold of <1172 mV, and then act as a switch for the LED



bonus:
it would be nice if the LED's would start flashing if the voltage was <586 mV
it would also be nice if the voltage threshold could be variable by a potentiometer

^those would be nice, but i guess that's out of my knowledge to implement

thanks in advance everybody!
 

It's perfectly do-able but quickly gets complicated as you expanded the 'bonus' part!

You mention 'Receiver' but show two in the diagram. Are LED1 and LED 2 located in the same place or are there two seperate receivers, each with one LED?

The easiest way to do this, especially as you are asking for reasonably precise values it to do it digitally. You woud measure the sensor output using an ADC (your black circle) to derive a number of mV reading and transmit that. The receivers would pick it up and compare the number with one sourced from their own potentiometer and ADC. If the transmitted number was greatest, the LED would be turned on. You could do any other math on the numbers to set the threshold at which the LEDs flashed.

It's actually much easier than it sounds because most small (even 8-pin) microcontrollers have built in ADC modules that do most of the work for you. They can also drive LEDs, either directly if they are small or through a transistor if more current is needed and they can do things like pulsing their pins to make the LED flash.

Brian.
 

It's perfectly do-able but quickly gets complicated as you expanded the 'bonus' part!

You mention 'Receiver' but show two in the diagram. Are LED1 and LED 2 located in the same place or are there two seperate receivers, each with one LED?

The easiest way to do this, especially as you are asking for reasonably precise values it to do it digitally. You woud measure the sensor output using an ADC (your black circle) to derive a number of mV reading and transmit that. The receivers would pick it up and compare the number with one sourced from their own potentiometer and ADC. If the transmitted number was greatest, the LED would be turned on. You could do any other math on the numbers to set the threshold at which the LEDs flashed.

It's actually much easier than it sounds because most small (even 8-pin) microcontrollers have built in ADC modules that do most of the work for you. They can also drive LEDs, either directly if they are small or through a transistor if more current is needed and they can do things like pulsing their pins to make the LED flash.

Brian.

there are 2 sensor/transmitter units and 2 receiver/led units, except that the receiver units are located in the same circuit. i mention "receiver" because both of them will have the same exact function.

not only is there a voltage output from the sensor, but there is also a "Tx" output in which:
delivers asynchronous serial with an RS232 format, except voltages are 0-Vcc.
The output is an ASCII capital “R”, followed by three ASCII character
digits representing the range in inches up to a maximum of 255,
followed by a carriage return (ASCII 13). The baud rate is 9600, 8
bits, no parity, with one stop bit. Although the voltage of 0-Vcc is
outside the RS232 standard, most RS232 devices have sufficient
margin to read 0-Vcc serial data. If standard voltage level RS232 is
desired, invert, and connect an RS232 converter such as a MAX232.
When BW pin is held high the TX output sends a single pulse, suitable
for low noise chaining. (no serial data).
[this is an ultrasonic sensor]


how would this change things if i choose to use the Tx pin instead of the analog voltage pin?
 

It's probably easier that way. Basically, all you have to do is send the ASCII data to the transmitter. The receivers pick it up and convert the three characters back to a single number then compare it to the value from a potentiometer.

Most micros have UARTS in them which are specifically designed to convert values into serial data and back again so you sent the characters out from a UART at the sending end and feed the resulting serial stream to the transmitter and at the other end, you take the data from the receiver and feed it into a UART to recover the characters again.

Brian.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top