mini ir beacon
So this is the mini ir beacon I've had mulling around but never got around to building one....or finally built it. I'll post the current code for this in a bit.
The circuit is pretty basic in that it just uses a picaxe, an ir emitter, led, some resistors and a npn transistor. Ialso wanted to keep it small(hence the mini) so decided to use some lr44 batteries to get around 4.5v out. The battery holder was fashioned out of some 18ga colid copper wire which does a great job of holding things together.
The setup
pin 2 of the picaxe goes to the collector and this is the where the 38khz carrier comes from
pin 1 is the serial data that goes to the base. There is also a led connected to the base so any signal that goes out causes it to blink.
The main ir extender uses a 2 pin m to f connector at the bas of the unit so I can easily remove it and modify it for other purposes.
Expanding on the system to utilize the rest of the axe options to make it configurable.
I plan to expand this to take advantage of the other couple pins that aren't in use. pin 3 will be used as a simple button input.
pin 4 will be used to tune serial signal via adc input and based on a set of predefined strings that I will want to send out.
The application flow would be something like so: turn on beacon, have a delay that waits to see if it will be tuned(input 3 is triggered). if not, read variable in stored memory to find out what signal to output. go to beacon mode.
if 3 is triggered read stored memory and output the current beacon setting.
when 3 is triggered again, this sets the config mode.
read adc and output blinks from pin 1 to let user know which beacon definition the proc is configured to.
when this is set trigger input 3 again to set the beacon output string to memory. go to beacon mode.
the setup switch and dial to set the beacon will mounted on a small perfboard so as to be used on multiple beacons.
images of the beacon so far.
![]()
![]()
Edit:
I have the receiver side as well, which be be another post later.
To expand a little more, the configurable ones could be set in a different room/location while (dummy)beacons using 555/556 timers can be set in the room/location to help in triangulation. These should be simpler and cheaper to build.
Edit 5/24: -code update -see new post
Edit 5/25 -code update -see new post file size 2.83k
Edit 6/14 - added video of ir beacon and receiver in action.
| Attachment | Size |
|---|---|
| 38khz_code.bas | 3.77 KB |
| beacon_test_tracker_use_ctc_method.bas | 2.42 KB |
| beacon_test_tracker_use_ctc_method.bas | 2.83 KB |



@ Mon, 2009-06-15 00:17
Nicely done! How about
Nicely done!
How about adding
1. a laser pointer in parallel to "see" wehere the semspor is looking
2. a lock on LED, indicating it found the beacon
Myc
@ Mon, 2009-06-15 01:02
Thanks! :) 1. can't always
Thanks! :)
1. can't always see the laser
2. Already done. when looking at the second part of the video(top down), you may notice a green led blink(front left side of servo). thats indicating it's getting the signal.
@ Mon, 2009-06-15 01:37
I see the greeen LED now. I
I see the greeen LED now.
I was thinking placing it on top of the tube.
Yo have plenty of program space and a spare putput pins left in the chip, why not 2 LEDs, left and right when movoing and flashing when locked on? I'm thinking of adding them to my Start Here Robot on the the Sharp Sensor.
You might even consider making it a self contain unit. Scanning unit it find the beacon and then sending the location back to the main.
@ Sun, 2009-06-14 23:41
Video post of ir beacon in
@ Mon, 2009-05-25 22:51
added int code to mid sweep
added int code to mid sweep points to pic up more beacons just in case.
now outputs to serial, can be commented out if necessary.
Added some code that helps to smooth out the setfreq command and how it causes spikes in the servo.
Adding a cap also smoothed it somewhat but the spike mostly persisted.
cleaned up code after inital pulsin. added a low/high command which didn't affect the current functionality but made more sense as the pin is active low.
@ Mon, 2009-05-25 00:31
Added updated version of
Added updated version of beacon code and the lastest seeker code.
The seeker code is a complete rewrite that started using ctc's code but became it's own beast through testing. I ran into some interesting issues while writing this code, one being when doing a pulsin seemed to cause issues with further attempts at reading the ir signal(serin part of it). I commented this in the code as such. I think I worked around the issue, but not totally convinced as of yet.
I use pulsin to solve the issue of checking to see if the pin is in a low state , as just checking if the pin is low can miss the high/low state and just keep scanning....at least this is what I found. The pulsin seems to be a nice mix as the ir beacon blinks long enough to detect the high state.
I also tried the "lookdown" function(very cool btw) for comparing what ir beacon I'm looking at. this vaule will later be used in a select/case code block.
There are a lot of timing issues which again I have tried to get around through adding pauses throughout the code.
@ Sun, 2009-05-10 19:54
could the ir reciver on a
@ Sun, 2009-05-10 20:48
yes
Yes, and I actually run another 08m on the receiver side but any proc can be used(I've used an arduino and bs2 already as tests). I'll post a schematic of this along with the code that I've used. I have I have not written the expanded code that I mentioned above for configuring the devices, but I figure that'll be pretty easy to do.
I'm currently working on a receiver end and tracking the ir beacon though not successfully...I think I mayhave made it overly complex... :/
I'm going to work with ctc's code to see if I can get better results.
@ Sun, 2009-05-10 22:14
i was planing on having 4 or
@ Mon, 2009-05-11 03:00
This is a link to the other
This is a link to the other sub project that I worked on to use the ir beacon. This is when I was working with ctc to get some wireless stuff up and running.
I posted the code there.
The 38khz code 2 file is the ir beacon code. I've tried to get as much commented as possible so people could understand it. Let me know if you have any questions on it.
I have to note that the timing and that first high low high prior to sending out the signal seemed to improve overall readings though I think this is due to the fact that I'm using an interupt to detect the serial signal on the receiver end, so this would be a hello, then I 'd read the input.
The bt test file is the receiver end of things, though I have to note that I modified it heavily due to needing to use a servo to do directional location, one area being the frequency as I was using 8mhz which didn't jive with other components I was working with. but this will give you an idea of what you need to do.
I'll post the modified version when I have it improved as I'm still not happy with it.
EDIT: also if you have any material on how you're going to make the dummy ones, I'd love to check it out. I have some ideas....but never hurts to see what others might use as well. For mine I currently plan to use a 555 or a 556 dual timer chip as they seem to be the most basic out there. :D