kranenborg
Senior Member
In a joint project my son Joost and I built an airport model a while ago (Joost built and painted the hardboard-based construction, I took care of the electronics part). The model includes 68 programmable LEDs, all of them in three main landing and departure tracks as well as the support tracks. This is probably the one-and-only remote-controlled airport available on the globe that can be steered by a Sony RC!
The system is based on PICAXE-18X directly connected to an IR receiver (the latter part being an IRM-3638 which has a 2.7 V minimum operating voltage) and connected via i2c with a MAX6955 for controlling the LEDs. The system is powered with a Nokia mobile phone wall unit and a 3.3V voltage regulator. For each track individually, the LEDs can be programmed to be on continuously, to blink or to be off, allowing children to select the departure and/or landing tracks themselves. The global illumination level of the LEDS and the blinking speed can be controlled with RC as well.
Included as attachments are a picture of the model and the program for running the show (which has comments in Dutch only so I mention that the program is basically a state machine which alters state after an IR signal has been received). The IR receiver output is connected with the interrupt input (input 0), and the interrupt routine sets a parameter "NieuweIRCode" as a signal that a new command has been received:
The variable "NieuweIRCode" is then used together with the "infra" variable (that is associated with the INFRAIN2 command) by the state machine in the program body to decide what to do.
This IR-interrupt approach is useful in general as it allows the PICAXE to do other work whilst being receptive to IR commands.
Best regards,
Jurjen
http://www.kranenborg.org/electronics
The system is based on PICAXE-18X directly connected to an IR receiver (the latter part being an IRM-3638 which has a 2.7 V minimum operating voltage) and connected via i2c with a MAX6955 for controlling the LEDs. The system is powered with a Nokia mobile phone wall unit and a 3.3V voltage regulator. For each track individually, the LEDs can be programmed to be on continuously, to blink or to be off, allowing children to select the departure and/or landing tracks themselves. The global illumination level of the LEDS and the blinking speed can be controlled with RC as well.
Included as attachments are a picture of the model and the program for running the show (which has comments in Dutch only so I mention that the program is basically a state machine which alters state after an IR signal has been received). The IR receiver output is connected with the interrupt input (input 0), and the interrupt routine sets a parameter "NieuweIRCode" as a signal that a new command has been received:
Code:
interrupt:
infrain2
NieuweIRCode = TRUE
PAUSE 200
SETINT %00000000,%00000001 ' Enable interrupt (active low) on input 0
RETURN
This IR-interrupt approach is useful in general as it allows the PICAXE to do other work whilst being receptive to IR commands.
Best regards,
Jurjen
http://www.kranenborg.org/electronics
Attachments
-
96.6 KB Views: 128
-
7.5 KB Views: 24
Last edited: