software for audio and vibration is done

A project log for Don't Moo! the Cow

DIY Creative project based on the classic game "Don't touch the wire"

Louis HLouis H 12/06/2021 at 21:250 Comments


Atmega328p has unexpected moo capability !
Thanks to David Mellis who has made all the work for us:

I have to warn that sound has very poor quality and only two moo audio samples already takes all program memory. So you may not build your DIY MP3 player with this but it is surprisingly suitable for this project.

The S9014 NPN transistor as shown on schematic (see project gallery) enable to increase the volume a bit. This transistor has higher gain than classical S8050 or 2N2222.


Vibrating drive is made considering the vibrating motor as a small motor, which it is as far as I know. It is possible to modulate vibration intensity using pwm. For this project, we have a better surprising effect on the player with a simple all-or-none drive.

Low power

The device is battery powered. So the autonomy is optimized using LowPower library from LowPowerLab. The hook is connected to pin 2 (through a transitor), on which we attach a wake up interrupt before powering down the device. So basically, the device is always sleeping. It wakes only when the wire is touched, plays the sound, vibrates and go back to sleep.

Code is available here :