Wireless Serial Data
with
Infra-RED

It all started in 2004 when I got experimented with the SerOut and SerIn commands with the PICAXE. Great I thought! Now I can control another PICAXE with, wait for it... another PICAXE!!

Yea, I know, no more of this:
if input3 = 0 then flash1
if input3 = 1 then flash2
if input4 = 0 then flash3
if input4 = 1 then flash4

Yeap! No more of this, all I now need to do is...
serin 3,n300,b0
if b0 = 0 then flash1
if b0 = 1 then flash2
if b0 = 2 then flash3
if b0 = 3 then flash4

Not only does this use just ONE (1) instead of TWO (2) (or more for that matter, imagine if I wanted to have flash166? I'd need 8 Inputs instead of just 1!!!) of the scarce PICAXE pins, but it makes the processing much easier!

Okay, but what does this have to do with Infra-RED?? I thought about this zany circuit and thought, geez, using wires to communicate would mean that the 2 PICAXE's communicating would need a PHYSICAL connection between them. Well, Adrian/John being John/Adrian meant that this limitation would totally be unacceptable!

Now, at this time, I was experimenting around with 555 Timers (Frequency Generators) and put short, I made one JUST for Infra-RED purposes. Heres a picture...

Here it is, Tic-Sieu, a friend of mine actually made it for me. If you wanna find out more on this, check out 555IC section under the Projechs of 2004

All I needed to do now was to somehow hook this 38kHz signal make it active when Serial Data was put into it and then put this 38kHz Serial Data be outputted to an IR LED.

This could be achieved using the SerOut command.

And at the receiving end, just have a PICAXE on receive with an IR Sensor. Obviously, when the IR sensor received some IR it would turn on and off corresponding to the Serial Data. All I need to do is to unscramble the message BACK into Serial Data.

This could be achieved using the SerIn command.

Using a Transistor in conjunction with a 38kHz signal, a Serial Data signal meant that I can make an IR LED flash with those characteristics!

Okay. Now, remembering that this happened in February sometime... Back then I wasn't as electronic literate as I am now (3 months later) but back then, I connected the Transistor with the 38kHz signal, Serial Data signal incorrectly; the IR LED however was connect to the emitter leg of the Transistor - where it's supposed to be!

Now think, how would you do it?
You've only two options right? Yea... just two options either:


A. The 38kHz signal in BASE & Serial Data signal in COLLECTOR

OR

B. The 38kHz signal in COLLECTOR & Serial Data signal in BASE

 

This is the million dollar question, which one would you choose? A or B?
Lock in A?
Lock in B?
The correct answer is...
...
...
Right after the break!

Yea of course, the right answer is B isn't it? Well back then I chose A! Stupid me!
Didn't work, and I was convinced that the PICAXE / IR Receiver was not fast enough to handle Serial Data at the speed of light. That's total B!

Anyways, just days ago the Bright Spark Admin, Andrew wrote that he did just what I did, and it worked... no not wiring up the Transistor incorrectly, but Serial Data over IR! Upon reading this I was sooo peeved off! WHY OH WHY did it not work for me?!?! mmm, so I did it again!

This time choosing B. as my choice of wiring up the Transistor. Yup, and it worked, that day was the 24th April 2004, about 2 months after!

Ladies and Gentlemen, that was my story, and now heres the PROJECHT

 

Equipment:
38kHz Frequncy generator
IR Led
IR Receiver
2x PICAXEs
Resistors
Wires
Programming Cable

The Idea:
Outputting serial data to an IR LED (which is modulated at 38kHz) which is then received by an IR recevier so that wireless serial transmission is achieved.

The Pictures:
 

 

This is the 38kHz generator.
On the main components on this are the 555 TimerIC and the variable resistor.

The variable resistor is so that I can change the frequency of the 555 Timer, I use a DMM that can measure the Hz to see what frequency the 555IC is running at. The current range is is 29kHz - 43kHz, 38kHz is well within this range.

 

 

This is the receiver circuit.
Visible are the programming resistors and wires.
See that 3 legged black thing? That's the IR receiver! It's connected to Pin3 on the PICAXE (see my receiving PICAXE code). The programming cable is just plugged in and that LED there does nothing - it was just there...

 

This is just the top of the Receiving PICAXE circuit.

 

This is the top of my Transmitting PICAXE. The main things in this picture is the IRLED and the PNP Transistor.
The 38kHz signal is plugged into the collector of the transistor.
The Wire going into Base is connected to the Serial Output of the Transmitting PICAXE.
The IRLED is then connected to the emitter of the transistor. That blue-white wire coming from the IRLED is just connecting it to ground.

 

Now, here I am aiming the Transmitting IR LED towards to Receiving IR module.

 

Cool aye? Digicams can SEE IR light, but we humans and moths cant!

 

Now this is what you see in the PICAXE terminal when the programming cable is plugged into the Receiving circuit!
Wanna close up? SURE!

 

As you can see, its spelling my name! Scary aye!!
Well, not really considering I told it to! (see my Transmitting and Receiving code!)
You can also see that it's not receiving PERFECTO, some characters are a bit off, like that y with the 2 dots above it? and the Euro sign...

BUT this is only because there is a bit of light distortion and I'm using my hand to aim it etc... I actually held it right up, and it received data with 100% accuracy!

Well there you have it ladies 'n' gents - an idea/project that should have been completed the FIRST time round! Ah well, better late than never!