- Indicators of arrival in the shadow station
- Making the "Polyp" ride operate
- Coordinating 60's rock and roll music to the "Polyp".
Shadow Station
Because of my arthritis, I can't turn to see the trains when they reach the end of the shadow station board and control the loco from the ECOS. The simple answer was to put up some visual indicator of position for each of the shadow station tracks. The final answer was to use light dependent resistors (ldr) buried in the track to control coloured LEDs on the fascia board beside the ECOS. After a lot of messing around due to a faulty ldr, it was all resolved and in place. LDRs are very expensive - NOT. £4.99 for 70! Once I replaced the dodgy one, everything works. I now have this nice little display in front of me where each track is aligned to a coloured LED which lights up when a loco moves over it.
The white light is just to show that it is working because, when there are no locos in the shadow station, all the lights are off so it is nice to have a pilot light.
Although this is the one for the level crossing, it shows you how the LDR is placed in the track. It is not at all noticeable.
Making the Polyp ride operate
The Faller kit for a fairground ride is called the "Polyp". It looks like our Octopus ride. My wife remembers going on something similar in her early teens at the Funfair in Raphael's Park in Romford. I think that she remembers "The Whip" where the boys from the ride would hit the brake in one of the compartments to make it swing round. As she say, she always remembers not only the ride but the music that was played. This was all the excuse I needed. First off, I have to make the ride operate. It comes with a motor but this is a simple 16VAC motor that can be turned on and off. It needs an AC power supply, which I didn't have. I had a nice 12V Chinese PS sitting there from an earlier attempt to put under-shelf LED lighting in my old railway room. I was able to get a nice little 12V motor and gearbox from Amazon and fit it instead of the provided one.
The problem was making a "lightweight" Arduino control a motor that would pull current in excess of the Arduino's capability. The answer turned out to be an L298N Dual H Bridge Stepper Motor Driver . This sits between the Arduino and the motor and provides the extra power required. It can also be controlled for speed and direction. Here is the L298N attached to the Arduino and wired into the motor. The pink box contains the Chinese PS as the 240V connections were somewhat exposed!
The Arduino program drives the motor for a period and then keeps it still for another - random - period when the whole things starts over again. Notice that it starts up slowly and slows down nicely at the end.
Now, we have the problem of the "rock" music. That's the next step.
Coordinating 60's rock and roll music to the "Polyp".
There are so many cheap add-ons for the Arduino that you can manage almost anything that you can think of. I have a little thing called a DF PLayer Mini which is a little board that wires into the Arduino and provides music off a mini-SD card. All for £3.50 or so. This little thing can manage up to 100 folders with MP3 files inside. It can be started, stopped, make a selection, etc. The trick is to get it working! I had to mess about for a good few hours trying to get the correct include files and the matching code until I hit on the right combination.
Currently, I am running it through a Boombar Bluetooth speaker but I have a natty little AUX driven one coming. Along with all of this, I have got hold of a set of CDs for Dion and the Belmonts, Del Shannon and Eddie Cochran. Tunes from these such as "Runaway" and "The Wanderer" should provide a great background to the fair.
Now to tie it all in
Now, the big problem! I have to make the Arduino running the ride drive the other one running the music. Amazingly, there is an include file called Wire which does all of this. Provided I keep to a single character, I can send it from one to the other. '0' to '9' should do for the tracks, 'G' for Go and 'S' for stop should make it all workable.
The ride will decide on a random tune. Both will know how long the tune is. The ride can tell the music which track and when to start it. They will both run for the length of the tune and then the ride will tell the music to stop. The ride will then wait a random time and it will all start again.
Needless to say, it will be a bit like Christmas songs in a shop! Hence, we change the tunes by refreshing the SD card and we can turn the whole thing off on demand. This is where an LDR comes in. Sitting on the ground in the fun fair will be a police car. When the ride is active, the police car will be over the LDR. To stop the ride, just pick up the car and move it sideways to expose the LDR. Job done!
1 comment:
Nicely done, of at least it's a workable plan.
Post a Comment