Infrared (IR) Communications Basic Tutorial

westaust55

Moderator
Attached is a basic tutorial covering the concepts and with some working PICAXE program examples and schematic for Infra Red communications between two PICAXE chips.

The 40X1 program code is representative of that required for X1, X2 and M2 parts (watch your pin IO allocations) for a "Master device.
The 08M program code is representative of a "Slave" device and representative of that for any of the M series parts.

Obviously a lot more can be added including data verification and other encoding schemes but this tutorial was primarily aimed at getting the basics down.


EDIT: See post 3 below for latest version
 

Attachments

Last edited:

techElder

Well-known member
Dang! The instant I'm thinking about this here you are with a tutorial. I'm digging in right now.

I have a little project for an enclosed area where I need some remote sensors to report activity to a central receiver that will accumulate that data and store it.

PS. westaust55, you have ESP and don't anyone tell him different! :D
 

westaust55

Moderator
Infrared (IR) Communications Basic Tutorial - Rev B

With some input from TC, I have also now read through a paper copy which found a number of spelling and grammatical errors. The attached version does not change the programs but corrects errors in the descriptive sections.

EDIT:
New version at Rev C added with corrected heading for section 6.1 as identified by IWP

EDIT2:
New version D added with a few spied typos corrected.
 

Attachments

Last edited:

inglewoodpete

Senior Member
Just noticed that the heading of section 6.1 is the reverse of what you want. Should be IR Sender or similar.

(I tried to send this as a PM but your 'box is overflowing!)
 

westaust55

Moderator
Just noticed that the heading of section 6.1 is the reverse of what you want. Should be IR Sender or similar.

(I tried to send this as a PM but your 'box is overflowing!)
Thanks for picking that up IWP.
New Rev C added at post 3 since I have referred some on the forum to that specific post in recent days

With respect to the PM inbox,
I seem to get so many messages from members (not only newbies) who would better post here where all can see the answers, for the education of all rather than the education of one.
I do occasionally clear out some of the PM's and quickly get more to refill the box.
I do respond to some PM's but many cannot then even bother to reply with a quick "thanks" and a few even then go so far as to post the information given here on the forum as part of their program with no acknowledgment.
I did at one time try posting the questions and answers on the forum and then PM back with a link to the forum post but that did not receive any response either way.
 
Last edited:

Phil bee

Member
This is just briliant, gives all the information needed by a newbe like myself.
Thank you and more like this would be great I.E. how to use Hpwm to drive an H-Bridge please. :)
 

smolder

New Member
WOW! This tutorial is amazing, so much useful, detailed information. This is exactly what I've been looking for. Thank you sooooo much! :D
 

sedeap

Senior Member
Translation... to LA-Spanish

So tell me Westy... do you give me the permit (allow) to translate your Tutorial to LA-Spanish ???
:rolleyes:
Will be nice... to many lang-unskilled students/hobbyists.

:)
 

chipwich

Member
These guides are fantastic. I just read the optimization one which gave great insight into the PICAXE bit-packing scheme. And this one has good background info on comm methods beyond just IR.

But I only come across these guides by browsing these forums or getting lucky with my searches. Is there a central index or repository for these documents?
 

Jamster

Senior Member
I would think you can translate it, there isn't copyright on it (as far as I can see) and Westy's a nice fellow... :rolleyes:
 

hippy

Technical Support
Staff member
There's implied copyright in most works created unless explicitly stated otherwise, but Westaust55 is a nice fellow.
 

westaust55

Moderator
translation of tutorial

So tell me Westy... do you give me the permit (allow) to translate your Tutorial to LA-Spanish ???
:rolleyes:
Will be nice... to many lang-unskilled students/hobbyists.

:)
Hello Sedeap,
Been a bit busy and away from home for work of recent but catching up with a few posts . . . (only so much one can do via iphone . . . )

Yes, feel free to translate this and any of my other tutorials on this forum to Spanish. I do appreciate you asking -the better protocol ;)
While as hippy states, there is always implied copyright on documents posted on the internet, my whole purpose in posting information on the PICAXE forum is so that my efforts are available to and hopefully may help others.
Appreciate if you can include a line to indicate that I was the Author with a link to the PICAXE forum in general and this thread in particular.
 

justbennett

New Member
Detecting IR with a digital Camera

With some input from TC, I have also now read through a paper copy which found a number of spelling and grammatical errors. The attached version does not change the programs but corrects errors in the descriptive sections.
Thanks for these tutorials!

A note for iPhone 4S users (and probably many others). The tutorial suggests using a digital camera to test if an IR transmitter is transmitting. I discovered that my main iPhone camera doesn't work for this purpose. However, the rear facing camera (self-portrait mode) will still work for detecting IR emissions.
 

westaust55

Moderator
Thanks for these tutorials!

A note for iPhone 4S users (and probably many others). The tutorial suggests using a digital camera to test if an IR transmitter is transmitting. I discovered that my main iPhone camera doesn't work for this purpose. However, the rear facing camera (self-portrait mode) will still work for detecting IR emissions.
@justbennett,

welcome to the PICAXE forum.

Also thank you for the information regarding the iPhone camera - I am sure in time that will help others who may otherwise think their IR LED is not working. :)
 

Bernie_of_CPE

New Member
Hi guys,
My first post but had to say how useful this tutorial is to me. I am a total novice to pickaxe but so glad I found them. I have need to operate a small motor to drive a display model suspended in flight mode and this would seem to fit the bill exactly. I realise this thread is a few months old but is still valuable. Thanks WestAust55 I will try this to see if I can breadboard a successful design.
Bernie
 

westaust55

Moderator
Hi guys,
My first post but had to say how useful this tutorial is to me. I am a total novice to pickaxe but so glad I found them. I have need to operate a small motor to drive a display model suspended in flight mode and this would seem to fit the bill exactly. I realise this thread is a few months old but is still valuable. Thanks WestAust55 I will try this to see if I can breadboard a successful design.
Bernie
Keep in mind that since I wrote the IR comms tutorial the PICAXE M2 and X2 parts have been released.
These have additional commands – IRIN and IROUT which can help simplify IR comms.
In summary the methods I had provided in my tutorial will still work but there are other options using newer inbuilt commands..
 
Top