Environment education package, train set with various themes |
It is part of a environment education package with various themes, including energy, mobility, waste management and biodiversity. It is part of the City of Turku Ekotuki action.
I've done the technical side of it using an AVR/Arduino as a main controller. The track has 3 (The two that are positioned at the parallel track location are combined into one.) IR sensors to track where the train is. The IR sensors are monitored using interrupts and as there are only two on the ATmega328P the two sensors needs to be combined into one.
A H-bridge motor controller is used to run the train itself using one pin PWM for speed and a couple of pins for direction control.
The system, a bit of a mess yes :) |
To help debug the system a character LCD is connected trough i2c, it displays the current state, input voltage, speed, wait counters and various other data.
Debug character LCD |
The run time and stop time can be adjusted with two potentiometers so code changes are not required for basic adjustments. These are read at startup with analog inputs.
Configuration potentiometers |
We are considering adding a automatic/manual model toggle with some kind of a remote controller (IR might work).
All buildings have LED lights and are also controlled by the Arduino, currently some are combined because a lack of hardware (need to add a PWM LED controller) but all lights can be controlled separately.
Building lights |
Recycling point with street light |
There is also a tiny i2c connected B&W LCD screen (the red thing by the blue car, supposed to be a charge point for electric cars) that is used to display logos of the sponsors (Föli, Turku Energia, Lounais-suomen jätehuolto and Turun seudun puhdistamo Oy) and train timetables (fixed for now). This will be upgraded to a color LCD sometime in future.
Electric car charge point with advertisment screen |
The system can be powered by the exercise bike to demonstrate electricity generation and usage. It is also possible to power the system with a AC-adaptor in cases where using the bike is not possible.
The Arduino source code is open and available on github. It is of course very specific to this particular setup but still, it is there.
The small house at the top has also a working solar panel.
Solar panel with LED light in the window |
The package is still evolving and one of the features in the pipeline is to add environmental and train sounds, upgrade the sponsor LCD to a color version and fully separate light control. Also a way to run the set in manual mode is
Various kits was used to build the whole thing, you can find links to the major parts below if you are interested:
- Faller 130459 Wohnhaus "Backstrasse 3"
- Faller 130801 Plattenbau P2
- Faller 131242 Kleine Mühle
- Faller 130468 Biogasanlage
- PIKO 57194 ICE 3 set
No comments:
Post a Comment