ErickIR
Posts: 8
Joined: Sat Jul 20, 2013 3:29 am

Receive signal to turn on an LED

Sun Jan 19, 2014 4:03 am

Hi guys, I'm working on a simple project that is not so simple for since I'm new to this.

So what I'm trying to do is to create a simple circuit that sends a certain frequency to another circuit that receives signals to turn on the LED but the problem is that I don't know how to create a circuit that will be able to receive a signal. I'm doing this so I can understand how signals work and so I can work on a more complex circuit involving this.

Please try to make it simple to understand, I tried researching a circuit diagram but they look complicated.

So here is what I would like to know:
-What electrical components are needed to make the "receiver" to receive a signal?(Please try to answer this one :))
-What electrical components are needed to make the "transmitter" send a signal?(If you can answer this, please do, if not, no biggy)

Thanks! :D

ErickIR
Posts: 8
Joined: Sat Jul 20, 2013 3:29 am

Re: Receive signal to turn on an LED

Sun Jan 19, 2014 4:26 am

This is what I have for my receiver circuit but I don't know if this is right.
Attachments
schematic.png
schematic.png (6.99 KiB) Viewed 1746 times

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Receive signal to turn on an LED

Sun Jan 19, 2014 3:26 pm

Hi,
ErickIR wrote:Please try to make it simple to understand, I tried researching a circuit diagram but they look complicated.
Communication via light (visible or IR/UV) is highly prone to environment "noise" - if you have a very simple circuit that works in the nighttime, then, most likely, it would not during daytime due to light saturation. If you tune it to daytime intensity, then its working point drops outside the range during night time...

Ok, so you need to filter-out environment light from sun, lights, etc. Since the changes of the sun intensity are slow, your communication must be based on quick changes of light intensity. This allows you to perform mentioned filtering.
Going further... your communication contains "1" and "0" states... so, in case of "1", you have to create "some pulses" (= changes of light intensity), in case of "0", you don't generate any light on sender side.

Ok, so ... what would be proper frequency of pulses ? Something what is away from 50 (or 60) Hz AC frequency, because some lights radiate light related to this frequency (actually doubled). Ok, so our lower limit is 120Hz... but we need to take some margin and the carrier frequency needs to be higher, to be on the safer side...

But, we don't want to complicate our life here, so we take a look what elements are available... and we see, that there are quite some of them fine-tuned to accept signals with carrier frequency around 38kHz...
So, they are designed to "pass trough" just digital signals with mentioned carrier frequency...

Ok... so what you need to do on the sender side ? ... You have to create a generator for base (carrier) signal equal to the receiver's frequency (eg. 38kHz) and you need to feed this signal to LED. (Since most receivers are sensitive to IR light, you need to take IR LED.)
When you want to send one logical state, you "turn on this 38kHz generator for some moments". For the other state, you leave it turned off. If you don't want to deal with the carrier signal generator in sofware, you can search for a circuit to make a discrete one with electronics. Most likely, you will google one built around NE555 chip.

So, what you need to do next... go to Google and type "38kHz IR sender" and "38kHz IR receiver".. and you'll find circuit examples. Pick one that meets your needs best... and spent some time reading additional descriptions. Uncle google knows all about this...


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13092
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Receive signal to turn on an LED

Sun Jan 19, 2014 8:22 pm

ErickIR wrote:This is what I have for my receiver circuit but I don't know if this is right.
that actually looks more like a (badly designed) transmitter circuit, than any receiver circuit.

As a transmitter, it is missing at least two current limiting resistors, one in series with the LED (because that is what you have drawn, a light emitting diode, the arrows pointing out indicate that it is emitting light, not receiving light) that limits the current running though the LED, which otherwise (the LED being a diode) would not be limited once the voltage over the diode exceeds 2 Volt, think about a resistor around a couple of hundred ohms. Another resistor that is missing is the one that is needed between the GPIO and the base of the resistor (the base to the emitter is another diode, and so needs current limiting) think a few kilo ohm. With that in place you can actually control the LED, and if its an infra-red LED, you could in theory send infrared light pulses, if you toggle the GPU fast enough. Normally what is needed are very short pulses with an equally long (relative to the length of the pulse) off periodes between each pulse. We are normally talking about streams of pulses with a frequency of 38 kilohertz. The data is encoded in the absence or presence of burst of these pulses, lasting a few hundred microseconds. These infrared pulse bursts can then be detected with a special infrared receiver (photodiode plus amplifying detecting filtering and other stuff) all contained in a three pin device, like this one https://www.sparkfun.com/datasheets/Sen ... sop382.pdf
the output of the device gives ones or zeroes according to the presence or absence of 600 microsecond long pulse trains.

If you feed the device with 3.3V you can directly connect the output of the device to a GPIO.

anita2r
Posts: 226
Joined: Sun Dec 23, 2012 6:55 pm
Location: Ottawa, Canada

Re: Receive signal to turn on an LED

Mon Jan 20, 2014 1:24 am

Hello,

Were you thinking of wireless communication or light/infrared communication.

The receiver circuit you showed has, as already mentioned problems. You must have a resistor in the LED circuit to limit the current to the LED - depends on the LED - but 20mA is a common maximum.

The unlabelled connection is I guess a Pi's gpio pin. Although the gpio pin will be set as an output, you still need to tie the pin to 3.3v or ground, so that it doesn't float at any time.

That part of the circuit is very basic and there are lots of posts here and elsewhere telling you how to drive a LED from a microprocessor pin.

Your main issue is how to communicate between two Pi's - presumably without using a typical WiFi network through a common access point.

You could do a direct WiFi connection between two Pi's using WiFi (usb) dongles, or use a local wireless connection system such as ZigBee.

Regards

anita2R

Return to “Other projects”