Wednesday 24 July 2019

Music and a fun fair


Here is a video of a new addition to my layout.



This is the Faller HO Polyp fairground ride. It comes with an AC motor, which I have discarded and replaced with an Amazon sourced 12V DC motor with gearbox.

12V DC motor

This has been hooked up to an Arduino with complex components. One is an L298N H Bridge motor controller. The other is a DF Player Mini - plays mp3s from a micro SD card.

You can see the resulting mess on the prototyping board here

UserPostedImage


Basically, there are 10 rock and roll tunes on the SD card. The Arduino picks one at random and calculates its length in seconds from an inbuilt table. It the spins the motor up gradually for 14 seconds, runs the ride for the required length and spins it down for 15 seconds. It then delays for a random period and starts all over again. The idea is to recreate the ride that my wife remembers from Raphaels Park, Romford in the 60s when she was a teenager! The L298N is there to drive the motor as the Arduino doesn't have enough oomph. The power to the L298N comes from a Chinese 12V power supply in the pink box behind. This is the source of the hum. I am currently working on a thermistor driven Arduino to go inside the box and control the fan, which is what is making all the noise! Mind you, as it is 85F in my living room at the moment, now is not a good time to work out the settings!

No comments: