Steam Pop Noise Machine
The Steam Pop Noise Machine (SPNM) is part of the Steam Pop Machine project. The Steam Pop Machine is a large mobile popcorn machine build in Steampunk style. This machine is used for selling popcorn on huge festivals/events in an atractive/interactive way. To make the machine more realistic some background-, random- and trigged noises are used to spice things up. That's what the SPNM is for.
A 4 channel relay board is added to control some more powerfull stuff like lights or motors.
- Arduino UNO controller http://arduino.cc/en/Main/ArduinoBoardUno
- MP3 Player Shield by Sparkfun https://www.sparkfun.com/products/10628
- 4 channel relay board https://iprototype.nl/products/components/buttons-switches/relay-board-4-channels-5v
- Power Supply 12/3A
A4inputs for triggered samples
A5Potentiometer input used for volume setting
5relay channel 1...4
10 seems to be used by the SPI library during startup. Causing the relay on this channel to switch shortly. Since the pin is not used by the MP3 shield there is no problem in using it for general IO.
Used software libraries
The SPNM uses three types of samples:
- Background noises (played continious in random order)
- Random noises (played in random order at random intervals)
- Trigged noises (played when trigged by an external switch)
The samples are stored, in the root, on a SD card with the following naming convention:
X= the sample type. 1 = background, 2 = random, 3 = trigged
YY= the sample number, starting at 01. Don't leave gaps in the numbering otherwise not all files are found at startup.
For the triggered samples inputs:
The relays can simply turned on and of by using:
// turn relay on digitalWrite(relay_ch1, HIGH); // turn relay off digitalWrite(relay_ch1, LOW);
To use the relay to blink (e.g. a lamp) use
//turn on a relay in blink mode blinkrate_ch1 = N; digitalWrite(relay_ch1, HIGH); // turn off a relay in blink mode blinkrate_ch1 = 0; digitalWrite(relay_ch1, LOW);
- N = blink rate in 0.1s resolution.