[Home]Bellcode Repeater

HomePage | RecentChanges | Preferences | My Website home page

Showing revision 12

Bellcode repeater for model railway

I went to a preserved railway with a visit to the signal box. All the bells and block instruments are quite confusing.

However the sounds or the bell codes is all part of the experience.

I wondered if I could use a micro controller to strike a bell gong and repeat the sequence as if the remote box repeated it.

http://www.railwaycodes.org.uk/signal/bellcodes.shtm#lyr

 Lancashire & Yorkshire Railway codes
 These codes were in use in 1919.

 Code	Meaning
 1	Call attention
 1-2	Is line clear for branch goods trains?
 1-2-2	Is line clear for ballast train or officers' special requiring to stop in section
 1-3	Is line clear for branch passenger train?
 1-3-1	Is line clear for engine and one or two break vans?
 1-3-3	Is line clear for "right away" goods train
 1-4	Is line clear for express cattle or express goods train class B?
 1-5-5	Shunt train for following train to pass
 2	Train entering section
 2-1	Train out of section, or obstruction removed
 and many more....

I did a house clearance and acquired a door bell with a good gong.

For my model railway I could use it to pretend to pass on the train to the next block.

It might not be prototypical, but it was good fun to try out.

Originally for a PIC16F628 http://www.dougrice.plus.com/wetString/bellcode/bc001_asm.txt

Now for an Arduino UNO. http://www.dougrice.plus.com/wetString/bellcode/bellcodeUno.ino

And a javascript version on a webpage. http://www.dougrice.plus.com/wetString/bellcode/BellCodesTrimmed.htm

You need some electronics to drive the bell. At the moment the Arduino LED is the bell. The bell I found need more than the three batteries I used to power the PIC chip. It worked well enough as a demo. Directly connecting the bell to the PIC or Arduino is sure to damage them. I used a transistor to buffer the voltages. eBay may be able to help.

  Bell code Replayer - press button in bell code sequence. After a pause, it is repeated back.
  Doug Rice

  description
     ___
  ---0 0--2[ Arduino @ BellcodeUNO ]13---|>|---
     button                    LED or gong

/*

  Bell code Replayer - press button in bell code sequence. After a pause it is repeated back.
  Doug Rice

  description
     ___
  ---0 0--2[ Arduino @ BellcodeUNO ]13---|>|---
     button                    LED or gong

  When you press the button it remembers the sequence.
  After HOLDTIMER it plays back the sequence.
  A FIFO or Queue is required.

  On ButtonPress, button -> /BUTTON edge. 
    save time from last press in FIFO and restart HOLDTIMER

  On HOLDTIMER:  
    start delay timer

  On DELAYTMR: 
    start RINGBELL and
    turnon LED 
    if another delay start DELAYTMR

  On RINGBELL:
    turn OFF LED

  Timers are variables that are decremented each loop() down to zero.
  They are running if > 0.

I did wonder if this was a project other modellers would be interested it and have a commercial value!

You need a supply of good gongs and electronics to drive them off a 3.3V or 5V PIC pin.

Directly connecting the bell to the PIC or Arduino is sure to damage them.

Block Instruments and signalling.

http://ccgi.dougrice.plus.com/cgi-bin/wiki_doug.pl?Signalling

A web page to try and emulate six signal boxes in a line.

It uses an object per signalling box, with methods to accept bell codes and set block instruments.

It also uses a function to dump the object as debug output so you can see the state of each Signal box in real time.

http://www.dougrice.plus.com/wetString/blockSignalling/signalling.htm

This is similar to buffering information down a chain of computers

Its time to wait as the signal is at danger!


HomePage | RecentChanges | Preferences | My Website home page
This page is read-only | View other revisions | View current revision
Edited January 29, 2022 9:02 am by dougrice.plus.com
Search: