Walking through town I spotted a toy ambulance outside a charity shop for a £5. Not sure why it’s an ambulance with a ladder. Water damaged. Bit of paint we can convert it to a fire engine. Fan of Sam the Fireman so would make a good birthday/christmas present. Water damaged so will need a bit of TLC and with a few elecronic components we can take the tired squeaker button out and replace it with some lights.
Adafruit Feather RP2040
Well known feather form factor it’s cheapest of the lot C++ or micropython Future extensions into some PIO cleverness but not relly required. one of the biggest reasons for going with a feather form factor Laziness Onboard LiPo Charging circuit Pulling EN pin to ground disables the regulator powering down the chip
Lights
WS2812 leds contained with some cheap lorry side lights found on ebay. Only really used for the reflectors and the style that fits with lights on top of a fire engine. The lenses are clear so I can change the colour of the LEDs underneath from the typical Red/Blue combo to more interesting displays. Currently just Red/Blue and Red/Green.
Software
It’s a simple program only really handling the flashing of the lights, detecting user input and keeping the power pin active. I first used a simple python script and the micropython firmware however the RP2040 board waits for a few seconds before starting the main script and therefore enabling my power pin. This would mean my son would have to hold the button for 2-3 seconds for it to start up. Not gonna happen. As it’s a simple application this isn’t too difficult to write in C++. Some relatively simplistic debouncing to not rely on sleep() between the light changes allows future extensions to make button presses whilst it’s on do something. Changing the lighting displays, including a siren etc.
Power and charging
Custom power saving circuit to re-use the same button for turning it on and providing limited user input Once powered one of the RP2040 pins is pulled high to keep powering the circuit. When this pin is returned low then the power cuts and the lights turn off. The time is configurable in code so I can choose to keep it enabled for about 30 seconds before turning off.
Benefits are it’s simple to the user, (my 3 year old) as I don’t need a separate power switch. I can use a small lipo battery, admittedly a fire hazzard as you need to treat them with care but it is buried in a box with the circuitry out of reach of prying fingers. Charging is via the USB C cable although this could be extended to a 5v power supply and make it more of a feature.
With semi-regular use it only really requires charging every fortnight or so, usually overnight.
RP2040 Feather was the cheapest, any of the others would fulfill the same ask. Feather Huzzah was considered but who really wants their childs toy connected to the internet?
Painting
I bought toy friendly safe paint. Chips easily
Probably would’ve spray painted it. Ladder was sprayed with a metalic silver paint and looks significantly better than the dripping red and black paints.
Could easily have spent forever putting doors and etc, but TBH our user doesn’t care and it’d only take more time.
The Result
What is the future?
People have asked why doesn’t it have an siren? It’s because I have enough noisy toys in my house. The lights it seems are enough for now. I can configure the button to perform different actions, (for the moment just change the light flashing sequence). My primary stakeholder is 3 years old so hasn’t requested further additions. It does still remain the second most popular toy in our house after the Fireman Sam helmet.
Bill of Materials
- Ride on fire engine
- Paint
- Arcade style button
- Adafruit RP2040 Feather
- Lipo Battery
- Case
- Feather board
- Headers
- 6 WS2812 Leds
- Lorry side lights
- Wire