Maker Pro
Maker Pro

Trouble with PIC and Relay controlled model train point motors PART II

AimSkyward

Jan 28, 2013
4
Joined
Jan 28, 2013
Messages
4
Hi All,

Some time ago I posted a thread regarding a problem I am having when using a dspic30f4011 to control a Hornby Point Motor.
To summarise I ultimately have to control a number of points motors using momentary toggle switches with corresponding LED indicators to show which tracks are live and which are not. I am using four Port Expanders with the dspic using I2C. Two of the Port Expanders read the toggle switch inputs and two output the corresponding LED pattern.
I am using relays to switch 14V through to the points motors with a standard 5V coil voltage connected to the COMMON pin of the SPDT toggle switch. When switched the 5V signal is passed to the input of the Port Expander as well as the relay coil so I can determine which switch has been activated.
I have put a diode across the coil to eliminate back emf (kindly pointed out thanks to my previous post) but I am still having the problem of the program halting whenever the points motor is switched. When I remove the motor and run the program when only the relay itself is being operated everything works fine so I am wondering what could be the reason.
I am using separate supplies for the 5V which supplies the main board and relay coil and the 14V for switching the points motor.
Any help would be much appreciated as I have been stuck with this for some time :).

Thanks in advance for your help
 
Top