[Home]Bellcode Repeater

HomePage | RecentChanges | Preferences | My Website home page

Showing revision 4

Bellcode repeater for model railway

I went to a preserved railway with a visit to the signal box.

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

I had an old door bell with a nice gong on it.

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 pick. It worked well enough as a demo.

  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.

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