Music box reacting knocking

Anonim

Music box reacting knocking

Let's knock on the music box - inside the dwarf musicians will be woken and the melody will play. In fact, there - of course, Arduino, which is involved only one conclusion - and for control, and for the output of the audio signal. As you managed to do this, tells the author of Arduino Project Hub under the nickname Johan Van Vugt. License - GPL version 3 or more of your choice.

ARDUINO PRO MINI is applied in the homemade, which the master is modifies. It is not necessary to add anything, on the contrary, the two components will have to remove, if you do it carefully, they can be applied to your next constructions. You need to drop the stabilizer and the power indication LED. The supply voltage of 4.5 V to the microcontroller is directly. Of course, Arduino alterations after firmware and disconnect from the computer. The author calculated that without the refinement of the power supply board of 800 mAh, there is enough for 35 days in standby mode, and with refinement for several years.

Due to the fact that Arduino's conclusions can be programmatically switch between the input and output modes, it was possible to apply a piezo-emitter both as a trigger sensor and directly intended. It should be stunned by a resistor for 1 MΩ and connect between the output 2 arduino and the total wire. After the first impact on the casket case, the microcontroller comes out of the sleep mode, during the second - switches the "foot" to the output mode and starts "magging". Then switches back to the input mode and goes back to sleep mode.

ARDUINO IDE has a deep sleeping mode with very low power consumption is not provided. But since on this platform you can implement a lot with third-party libraries, the master did it. The library required for this is lined here. The master is a sketch and lay out here. Then takes a suitable plastic box and collects a casket in it. It turns out:

Music box reacting knocking

Music box reacting knocking

Marking 06 PS on one of the half of the case means that it is made of polystyrene - a good dielectric. More often, similar to the size of the boxes from lollipops, made of tin. Outside, they are usually painted, from the inside - lacquered. The varnish is easily scratched, so relying on it as an insulating layer can not be. It is necessary to separate all the components from the walls of the box with a thin sheet plastic, tracing so that it does not stick anything.

304.

Read more