Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Model train controller

Status
Not open for further replies.
Hi. I am new to this forum and I wonder if someone may be able to give me a hand.

I am planing to use a wireless link to control the speed and direction of a model train and am wondering what would be the best approach. I am familiar with DCC for model trains, but this is too complicated and expensive. Anyway I would like to design my own.

I could use a potentiometer with an A/D at the transmitter plus a suitable PIC to code the Tx, and generate PWM at the receiver, again using a suitable PIC. But I have seen a controller based on a Keeloq transmitter and receiver from RF Solutions in the UK. (I live in Wales). This is based on a 3 or 4 button keyfob Tx. Thus there would be an emergency stop, forward, reverse and an auxiliary switch for something else. But I am not quite sure of the sequence of events that will have to take place in the Rx. eg press the forward switch sends a code to the Rx. I could have a built-in rate of acceleration and a maximum speed so that the motor would start running, but what if I only want to go at a slow speed. I suppose I could press the forward button again to halt the acceleration and proceed at a constant speed. Then press forward again to speed up to a new speed. It is this control of speed with one button that I am not sure about.

Any ideas for a suitable algorithm?

Eddie Price
 
Hi Eddie,

Just spit-balling here so bear with me. How about using a Sony (SIRC) remote? Then you could easily decode two keys at the receiver for "Forward" and "Reverse" and another two keys to "Increase" or "Decrease" speed. The receiver could be as simple or elaborate as you like; a 55 cent 6-pin PIC at one extreme or a $3 18-pin or 20-pin PIC driving a 7-segment or LCD display at the other extreme.

Regards, Mike
 
Hi Mike

Found a description of the Sony SIRC plus a video of someone using a tv remote to control some leds, but it is infra-red. I want to use wireless, because it will end up being used for a garden railway.

Eddie
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top