[Home]Bellcode Repeater

HomePage | RecentChanges | Preferences | My Website home page

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.

With the cover off we see the coils on wooden bobbins.

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

I have a version for the DigiSpark:- eBay was selling these for £1.26 - but not at the moment.

The LED is on P1, so I used P0 for the bell button.

http://www.dougrice.plus.com/wetString/bellcode/bellcodeDigispark.ino

more information at:-

http://ccgi.dougrice.plus.com/cgi-bin/wiki.pl?DigiSparks

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. You can modify the bell to bypass the interrupter that makes it dong repeatedly. We only want the dong.

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

Here is a picture of Two UARTS

Its time to wait as the signal is at danger!

Arduino and DigiSpark

resources:- http://www.dougrice.plus.com/wetString/bellcode/

I have a version for the DigiSpark:- eBay was selling these for £1.26 - but not at the moment.

The LED is on P1, so I used P0 for the bell button. http://www.dougrice.plus.com/wetString/bellcode/bellcodeDigispark.ino

more information at:-

http://ccgi.dougrice.plus.com/cgi-bin/wiki.pl?DigiSparks

I have a version for the Arduino UNO:-

http://www.dougrice.plus.com/wetString/bellcode/bellcodeUno.ino


HomePage | RecentChanges | Preferences | My Website home page
This page is read-only | View other revisions
Last edited January 29, 2022 9:27 pm by dougrice.plus.com
Search: