RFM12-Lib in operation: Remote control of toy train Royal Express [130160-I]
What can you do as Electronic-based grandfather if you have two grandsons, two toy trains and two remote control units, but only one control path? How to avoid the problems if each remote control unit does operate both trains simultaneously?
What can you do as Electronic-based grandfather if you have two grandsons, two toy trains and two remote control units, but only one control path? How to avoid the problems if each remote control unit does operate both trains simultaneously?
My grandsons own toy trains branded Royal Express, which are battery powered and controlled via infrared control. It runs back and forth with different speeds and produces nice sounds like bell and horn. The remote control cannot be changed, so with one control unit both trains do react. In order to keep piece during play sessions, I must separate the control systems. Because I had finished the adaptation of the RFM12 transceiver (433 Mhz) for my house control, I took this solution for the control of one train.
The infrared control unit has been exchanged by a RF transmitter, the infrared receiver of the train has been disconnected and a little RF receiver was integrated instead. Both units, transmitter and receiver, are equipped with a small PIC18F14K22 and a RFM12. The schematics are rather simple and attached. PIC and RFM12 communicate via SPI protocol. The RF communication is simple as well, the status of some push buttons for sound and an analog value for speed control are transmitted several times per second. The receiver firmware decodes the transmitted packets and converts it to telegrams, which originally would be sent by the infrared control.
These telegrams go then to the MC of the train doing the requested actions. With this solution, the control effort of the receiver is rather small and the nice sound is still available. The firmware is compiled with Pascal Pro version 5.60 from MikroElektronika. The projects for both items, transmitter (Sender) and receiver (Empfang), are attached.
Discussion (6 commentaire(s))