Рет қаралды 101,149
This is a simple hack to a fire alarm to make it play pretty much anything you want.
One of these fire alarms use a speaker (similar to a speaker that you would find in the earpiece of an old rotary phone), the other uses a massively large 2" piezoelectric disc (I've never seen one that large).
If you simply follow the positive lead on the speaker or piezo element, it will lead you to a transistor that is driving the speaker. On both these units, the base of the transistor (use the datasheet for the transistor to find out which one is the base) is tied to a resistor, which then leads to an IC. The IC outputs a square wave signal to make the fire alarm sound.
On both these units, I cut the link between the IC and the resistor. I then tied a microprocessor (in this case, an Arduino atmega328) right to the resistor. I made the assumption that the resistor value to the transistor was good, since both ICs on each board output a signal at 5 volts. I also assumed that if it was good enough for the circuit's IC, then it's good enough for mine.
I cannot take credit for composing the theme, as it was brilliantly done by REYBOZ @ blog.reyboz.it/...
So if you want the code, go there. This is a simple project that anyone could do.