This is our schematic for all of our hardware for the final project. Very simple, I know. That is on purpose. We chose peripherals that required very little hardware. The 4×3 Keypad was almost plug and play, with only a little code required to receive and use user inputs as a passcode.
The piezoelectric speaker was the same deal, with us piping out a particular frequency which corresponded to a musical mote. The notes weren’t perfect, in part because of the speaker quality and also because the duty cycle was not at 100%. Perhaps if we up the duty cycle to very close to 100% we would get something closer, but as is the notes fall flat. Originally an 8 ohm 1 W speaker in series with a resistor was going to be used but the PE speaker is much smaller and required mo extra hardware, making it a simple design choice when going for minimalist designs.
The relay powered and controlled by the board and opening/closing the circuit for the electromagnet and battery pack is the most complicated hardware in our project, and took a little bit of troubleshooting in the code to get it to work. The battery pack is a set of four 1.5V AA Batteries and provided a nice ~3.3A of current to work with. It also stayed steady enough to last a while, plenty of time to do a demo several times over.
Overall, because of our design choices we kept everything as sleek as possible to drive the EM, turn it on and off with a keypad and implement success/failure tones.