Sonic Screwdriver Electronic Circuit

All the programming info from this project is in my previous thread Electronics for Sonic Screwdriver prop HELP

So.. After getting the circuit to work on a breadboard I soldered it all together and that's where I've run into a bit of a problem. For starters, the speaker is very quiet. I've used the same speaker to replace a broken one from a sonic screwdriver toy so I know it can produce alot more volume than this. The main issue, however, is the batteries drain extremely fast. After getting all this working last night I left it all wired up and found the batteries had completely drained by the morning.

The actual wiring is a bit of a confusing mess but I've attached a picture anyway, along with a drawing that hopefully shows the circuit alot clearer.

My main question is, how do I stop the batteries from discharging so quickly? Any ideas on how to get more volume out of the speaker would also be helpful but that's slightly lower on my list of priorities!

Thanks in advance - do let me know if any more info is needed!

Please confirm that you have the speaker, switch and LED in series as shown.

Please confirm that the LED is wired backwards. Or say the schematic is in error.

Is the circuit identical to the successful circuit? I haven't time to look, but wasn't it on different Arduino?

Can you measure the current drawn from your batteries when the device is resting?

Please post the code you are using. I assume you have made no steps towards exploring the low power or "sleep" features of the microprocessor. Which will be essential if is to be left on and ready.

You could throw some hardware at that aspect of the problem. A power switch module would let the pushbutton turn the hole thing on, and the code coukd reach out and turn itself off. Or very nearly good enough off.

You may not have room or budget for this, but see

and select the least one that van handle the current.

a7

1 Like

Hi! yes it's all wired in series, the LED lights up when the button is pressed so that means it's wired correctly, yes? Also, how do I measure the current from the batteries?

Here's the code used, taken from an Instructables post linked in the first thread

//MODIFIED Version of Adafruit Trinket code to give attiny85 PCM capability
//The Attiny will take a very short sound sample that will sound good if looped
//I used the sound of a sonic screwdriver to example this capability
//Crete PCM using a program such as http://thieumsweb.free.fr/english/gbacss.html, copy the code right after PROGMEM = {    and make sure that it ends with the };
//I use 8000 as my sample rate as allows the longest soundbyte to be uploaded to the chip
/*
if you change the sample rate, alter the sample_rate value
Otherwise the program will create a looped sound on pin 4 of the attiny85
*/
// Audio playback sketch for Adafruit Trinket.  Requires 3.3V
// Trinket board and Winbond W25Q80BV serial flash loaded with
// audio data.  PWM output on pin 4; add ~25 KHz low-pass filter
// prior to amplification.  Uses ATtiny-specific registers;
// WILL NOT RUN ON OTHER ARDUINOS.



int sample_rate = 17000;
const unsigned char sample[] PROGMEM = {
  
128, 128, 128, 128, 128, 128, 127, 128, /* 0-7 */
130, 128, 129, 132, 130, 126, 130, 130, /* 8-15 */
126, 130, 134, 127, 127, 132, 125, 120, /* 16-23 */
133, 130, 119, 134, 132, 112, 126, 131, /* 24-31 */
112, 129, 137, 111, 124, 130, 101, 120, /* 32-39 */
131, 107, 125, 131, 101, 115, 115,  95, /* 40-47 */
120, 120, 106, 127, 113,  95, 110,  99, /* 48-55 */
103, 116, 107, 117, 119,  95, 101, 104, /* 56-63 */
 92, 101, 110, 112, 111, 109, 102,  98, /* 64-71 */
 99,  98, 101, 113, 114, 107, 112, 102, /* 72-79 */
 93,  95,  98, 108, 113, 112, 118, 109, /* 80-87 */
 88,  88,  96,  91,  99, 119, 115, 105, /* 88-95 */
110,  94,  76,  92,  96,  85, 106, 125, /* 96-103 */
100,  91, 111,  94,  62,  91, 114,  81, /* 104-111 */
 87, 126, 111,  75,  91, 104,  75,  69, /* 112-119 */
105, 110,  93, 103, 118, 102,  75,  86, /* 120-127 */
108,  92,  85, 118, 125,  99,  97, 108, /* 128-135 */
101,  90,  93, 108, 120, 113, 107, 123, /* 136-143 */
123, 101, 100, 118, 116, 113, 127, 134, /* 144-151 */
133, 132, 129, 123, 125, 126, 125, 129, /* 152-159 */
138, 144, 147, 151, 147, 147, 148, 138, /* 160-167 */
130, 147, 155, 150, 157, 175, 173, 154, /* 168-175 */
157, 165, 151, 141, 161, 173, 162, 168, /* 176-183 */
190, 178, 157, 175, 172, 137, 158, 183, /* 184-191 */
153, 162, 198, 172, 159, 193, 171, 140, /* 192-199 */
171, 168, 135, 173, 187, 148, 174, 196, /* 200-207 */
152, 158, 176, 146, 155, 167, 144, 161, /* 208-215 */
172, 150, 164, 175, 157, 157, 155, 143, /* 216-223 */
147, 142, 140, 156, 150, 144, 159, 155, /* 224-231 */
143, 149, 142, 127, 132, 134, 129, 138, /* 232-239 */
146, 143, 145, 144, 141, 137, 129, 125, /* 240-247 */
124, 121, 124, 131, 131, 136, 140, 133, /* 248-255 */
137, 133, 121, 124, 124, 110, 120, 135, /* 256-263 */
126, 133, 145, 131, 125, 135, 123, 110, /* 264-271 */
129, 129, 105, 123, 143, 115, 117, 153, /* 272-279 */
131, 102, 131, 134,  94,  98, 136, 121, /* 280-287 */
 98, 132, 149, 116, 113, 140, 119,  96, /* 288-295 */
111, 125, 115, 110, 129, 139, 124, 116, /* 296-303 */
130, 121, 104, 106, 117, 117, 116, 124, /* 304-311 */
132, 132, 123, 116, 117, 117, 107, 110, /* 312-319 */
123, 126, 122, 126, 131, 124, 118, 115, /* 320-327 */
109, 107, 116, 120, 119, 123, 128, 123, /* 328-335 */
115, 104, 104, 111, 102,  96, 114, 126, /* 336-343 */
109, 106, 122, 109,  83,  91, 111,  98, /* 344-351 */
 94, 120, 126,  99,  98, 116,  95,  74, /* 352-359 */
110, 120,  88, 108, 136,  99,  87, 118, /* 360-367 */
 99,  82, 118, 122,  97, 121, 125,  88, /* 368-375 */
102, 120,  93, 107, 136, 113, 116, 133, /* 376-383 */
109, 104, 120, 111, 117, 132, 128, 127, /* 384-391 */
133, 121, 111, 118, 116, 117, 133, 134, /* 392-399 */
129, 144, 129, 113, 127, 123, 122, 138, /* 400-407 */
137, 141, 148, 137, 137, 132, 125, 134, /* 408-415 */
127, 132, 149, 137, 144, 153, 126, 132, /* 416-423 */
143, 115, 129, 151, 128, 144, 162, 131, /* 424-431 */
138, 153, 116, 116, 149, 127, 122, 164, /* 432-439 */
151, 127, 159, 154, 112, 134, 148, 115, /* 440-447 */
133, 168, 145, 139, 169, 156, 126, 139, /* 448-455 */
147, 129, 134, 157, 158, 153, 162, 164, /* 456-463 */
153, 145, 147, 148, 143, 144, 159, 163, /* 464-471 */
158, 166, 168, 157, 151, 151, 148, 149, /* 472-479 */
150, 156, 164, 161, 165, 169, 164, 162, /* 480-487 */
164, 155, 145, 153, 160, 147, 154, 178, /* 488-495 */
175, 160, 164, 171, 162, 139, 133, 157, /* 496-503 */
161, 142, 151, 175, 176, 155, 147, 159, /* 504-511 */
164, 136, 121, 151, 161, 131, 133, 172, /* 512-519 */
163, 126, 144, 166, 131, 111, 138, 136, /* 520-527 */
108, 118, 147, 135, 117, 146, 150, 112, /* 528-535 */
120, 135,  95,  91, 125, 110,  99, 126, /* 536-543 */
125, 105, 116, 120, 100,  98, 107,  90, /* 544-551 */
 89, 108, 100, 103, 122, 116, 108, 113, /* 552-559 */
104,  96,  97,  96,  98, 105, 109, 111, /* 560-567 */
118, 120, 111, 108, 109,  98, 101, 110, /* 568-575 */
107, 114, 122, 119, 122, 119, 116, 112, /* 576-583 */
101, 110, 115, 107, 124, 126, 114, 127, /* 584-591 */
117, 105, 121, 108, 104, 126, 111, 116, /* 592-599 */
137, 114, 116, 134, 102, 105, 129, 107, /* 600-607 */
112, 146, 122, 112, 146, 125,  99, 129, /* 608-615 */
120,  93, 126, 138, 113, 131, 149, 120, /* 616-623 */
105, 123, 114,  96, 119, 138, 122, 125, /* 624-631 */
137, 119, 109, 114, 112, 111, 116, 124, /* 632-639 */
125, 124, 128, 120, 110, 111, 108, 106, /* 640-647 */
119, 129, 125, 127, 130, 118, 102, 109, /* 648-655 */
118, 116, 125, 135, 137, 132, 119, 114, /* 656-663 */
120, 120, 119, 128, 146, 146, 126, 126, /* 664-671 */
142, 126, 112, 126, 151, 150, 135, 146, /* 672-679 */
159, 143, 122, 126, 150, 161, 142, 147, /* 680-687 */
180, 167, 127, 137, 167, 153, 131, 156, /* 688-695 */
185, 164, 138, 158, 171, 147, 143, 166, /* 696-703 */
165, 148, 157, 169, 156, 154, 166, 164, /* 704-711 */
155, 156, 157, 152, 151, 160, 163, 164, /* 712-719 */
166, 162, 154, 147, 145, 148, 148, 153, /* 720-727 */
164, 164, 160, 158, 149, 142, 138, 133, /* 728-735 */
143, 149, 149, 158, 161, 155, 155, 141, /* 736-743 */
134, 144, 131, 133, 156, 148, 155, 166, /* 744-751 */
148, 156, 150, 125, 141, 136, 123, 151, /* 752-759 */
148, 145, 167, 150, 147, 155, 135, 137, /* 760-767 */
134, 129, 150, 137, 145, 168, 150, 159, /* 768-775 */
166, 137, 149, 143, 117, 147, 145, 131, /* 776-783 */
168, 165, 150, 173, 154, 134, 153, 138, /* 784-791 */
119, 148, 152, 133, 160, 170, 146, 156, /* 792-799 */
160, 136, 135, 136, 123, 130, 140, 137, /* 800-807 */
143, 153, 154, 146, 147, 140, 129, 132, /* 808-815 */
124, 119, 133, 136, 130, 143, 143, 137, /* 816-823 */
132, 130, 128, 113, 109, 123, 117, 108, /* 824-831 */
121, 136, 124, 116, 135, 132, 100,  97, /* 832-839 */
115, 104,  89, 103, 124, 124, 105, 107, /* 840-847 */
126, 114,  80,  83, 116, 102,  75,  99, /* 848-855 */
131, 122,  97, 100, 123, 115,  74,  73, /* 856-863 */
117, 121,  87,  96, 130, 129, 104,  95, /* 864-871 */
109, 112,  82,  85, 125, 116, 103, 123, /* 872-879 */
128, 112, 102, 103, 108,  97, 104, 125, /* 880-887 */
120, 122, 131, 119, 116, 110, 101, 109, /* 888-895 */
112, 117, 128, 128, 128, 131, 121, 114, /* 896-903 */
112, 109, 113, 118, 126, 135, 132, 129, /* 904-911 */
131, 115, 109, 118, 114, 119, 135, 125, /* 912-919 */
132, 139, 115, 123, 122, 100, 122, 127, /* 920-927 */
112, 143, 132, 115, 136, 105,  98, 124, /* 928-935 */
109, 120, 136, 123, 133, 118, 105, 118, /* 936-943 */
 98, 110, 134, 112, 135, 140, 105, 127, /* 944-951 */
117,  91, 128, 122, 109, 148, 128, 114, /* 952-959 */
138, 110, 102, 133, 120, 115, 144, 133, /* 960-967 */
117, 130, 121, 108, 123, 135, 126, 134, /* 968-975 */
142, 125, 120, 126, 119, 122, 138, 138, /* 976-983 */
143, 148, 134, 129, 134, 126, 130, 149, /* 984-991 */
148, 141, 151, 149, 130, 133, 150, 144, /* 992-999 */
135, 155, 156, 133, 133, 146, 148, 143, /* 1000-1007 */
150, 166, 159, 128, 135, 152, 137, 136, /* 1008-1015 */
161, 167, 149, 136, 146, 153, 134, 126, /* 1016-1023 */
153, 165, 139, 122, 150, 167, 136, 122, /* 1024-1031 */
156, 161, 128, 116, 138, 151, 139, 133, /* 1032-1039 */
151, 158, 134, 118, 133, 141, 126, 123, /* 1040-1047 */
141, 146, 133, 132, 144, 144, 130, 125, /* 1048-1055 */
132, 125, 118, 127, 137, 139, 139, 143, /* 1056-1063 */
146, 137, 126, 126, 123, 112, 122, 131, /* 1064-1071 */
130, 143, 148, 138, 143, 138, 120, 118, /* 1072-1079 */
128, 118, 113, 134, 136, 124, 140, 150, /* 1080-1087 */
125, 130, 144, 111, 107, 133, 110, 101, /* 1088-1095 */
144, 129, 111, 152, 132, 105, 141, 113, /* 1096-1103 */
 89, 129, 105,  92, 137, 114, 111, 145, /* 1104-1111 */
114, 114, 130,  93, 103, 116,  88, 103, /* 1112-1119 */
115, 101, 113, 117, 115, 117, 103, 105, /* 1120-1127 */
 96,  85, 103,  98,  93, 118, 111, 104, /* 1128-1135 */
116, 104,  97, 100,  83,  90, 100,  91, /* 1136-1143 */
105, 117, 109, 107, 107,  99,  91,  88, /* 1144-1151 */
 95,  96,  95, 106, 111, 110, 111, 104, /* 1152-1159 */
 93,  92,  93,  88,  93, 112, 112, 103, /* 1160-1167 */
117, 124,  99,  96, 111,  99,  86, 112, /* 1168-1175 */
129, 107, 114, 140, 114,  92, 113, 115, /* 1176-1183 */
 94, 100, 130, 129, 105, 119, 143, 115, /* 1184-1191 */
 88, 111, 127, 108,  99, 135, 153, 117, /* 1192-1199 */
104, 130, 129, 102, 103, 130, 136, 116, /* 1200-1207 */
118, 137, 137, 112, 103, 124, 128, 113, /* 1208-1215 */
115, 138, 137, 124, 119, 122, 125, 121, /* 1216-1223 */
118, 129, 140, 137, 129, 131, 132, 120, /* 1224-1231 */
120, 130, 131, 131, 142, 141, 130, 132, /* 1232-1239 */
132, 124, 124, 139, 142, 135, 146, 149, /* 1240-1247 */
130, 131, 144, 132, 130, 153, 150, 133, /* 1248-1255 */
149, 148, 121, 130, 149, 133, 141, 166, /* 1256-1263 */
145, 132, 149, 134, 117, 148, 154, 132, /* 1264-1271 */
158, 162, 127, 144, 148, 123, 151, 155, /* 1272-1279 */
133, 159, 148, 124, 151, 140, 131, 161, /* 1280-1287 */
143, 138, 157, 129, 128, 145, 137, 147, /* 1288-1295 */
156, 149, 149, 136, 130, 140, 137, 149, /* 1296-1303 */
157, 146, 148, 145, 130, 138, 146, 144, /* 1304-1311 */
149, 146, 141, 138, 132, 135, 144, 147, /* 1312-1319 */
143, 142, 141, 131, 130, 140, 143, 143, /* 1320-1327 */
148, 138, 127, 130, 133, 133, 141, 149, /* 1328-1335 */
132, 120, 133, 127, 113, 138, 149, 119, /* 1336-1343 */
117, 135, 117, 106, 136, 142, 115, 110, /* 1344-1351 */
129, 115,  98, 128, 146, 116, 104, 126, /* 1352-1359 */
119,  96, 109, 132, 117,  95, 109, 127, /* 1360-1367 */
113, 105, 124, 124,  99,  95, 110, 110, /* 1368-1375 */
100, 108, 120, 113, 101, 108, 121, 111, /* 1376-1383 */
 96, 101, 109,  99,  96, 111, 120, 112, /* 1384-1391 */
104, 112, 119, 104,  94, 108, 106,  90, /* 1392-1399 */
105, 124, 109, 107, 127, 115,  92, 108, /* 1400-1407 */
115,  89,  94, 128, 116, 100, 134, 133, /* 1408-1415 */
 92, 112, 120,  83, 105, 125,  95, 114, /* 1416-1423 */
138, 103, 112, 132,  95,  95, 116,  98, /* 1424-1431 */
103, 127, 114, 121, 135, 111, 106, 117, /* 1432-1439 */
 98,  98, 118, 113, 122, 131, 125, 124, /* 1440-1447 */
114, 103, 108, 107, 114, 127, 125, 129, /* 1448-1455 */
132, 117, 114, 115, 111, 115, 122, 125, /* 1456-1463 */
128, 129, 124, 124, 117, 108, 117, 125, /* 1464-1471 */
119, 126, 138, 126, 122, 127, 110, 114, /* 1472-1479 */
131, 112, 120, 151, 123, 111, 147, 124, /* 1480-1487 */
 94, 131, 142, 108, 132, 159, 122, 111, /* 1488-1495 */
149, 128,  98, 142, 153, 111, 127, 164, /* 1496-1503 */
128, 103, 139, 143, 116, 128, 156, 143, /* 1504-1511 */
123, 137, 142, 120, 123, 147, 146, 134, /* 1512-1519 */
143, 145, 132, 126, 132, 139, 142, 141, /* 1520-1527 */
139, 145, 140, 132, 136, 138, 139, 142, /* 1528-1535 */
139, 145, 145, 132, 136, 140, 136, 145, /* 1536-1543 */
151, 141, 142, 145, 135, 128, 140, 153, /* 1544-1551 */
148, 141, 146, 147, 136, 126, 136, 150, /* 1552-1559 */
145, 139, 140, 142, 136, 126, 138, 158, /* 1560-1567 */
141, 128, 149, 141, 115, 133, 155, 136, /* 1568-1575 */
132, 155, 141, 109, 127, 151, 128, 125, /* 1576-1583 */
161, 140, 103, 131, 143, 113, 139, 156, /* 1584-1591 */
121, 124, 135, 112, 122, 147, 133, 128, /* 1592-1599 */
140, 118, 110, 136, 132, 128, 143, 127, /* 1600-1607 */
110, 123, 119, 120, 138, 126, 121, 123, /* 1608-1615 */
112, 116, 125, 127, 124, 115, 113, 117, /* 1616-1623 */
116, 124, 129, 122, 118, 111, 106, 114, /* 1624-1631 */
123, 123, 118, 116, 112, 110, 120, 121, /* 1632-1639 */
121, 119, 102, 106, 125, 112, 117, 135, /* 1640-1647 */
104,  98, 120, 109, 113, 132, 106,  96, /* 1648-1655 */
121, 112,  97, 128, 128,  89, 105, 131, /* 1656-1663 */
 99, 101, 137,  97,  82, 127, 116,  91, /* 1664-1671 */
126, 127,  81,  92, 122, 105, 101, 127, /* 1672-1679 */
115,  92, 100, 115, 114, 111, 115, 114, /* 1680-1687 */
105,  97, 110, 126, 120, 115, 120, 117, /* 1688-1695 */
104, 112, 127, 120, 117, 127, 122, 111, /* 1696-1703 */
126, 136, 127, 132, 137, 119, 115, 129, /* 1704-1711 */
127, 128, 140, 140, 134, 140, 138, 133, /* 1712-1719 */
142, 139, 124, 133, 137, 126, 135, 152, /* 1720-1727 */
148, 144, 149, 145, 135, 135, 134, 130, /* 1728-1735 */
136, 137, 138, 147, 145, 145, 153, 142, /* 1736-1743 */
143, 141, 121, 128, 133, 123, 135, 144, /* 1744-1751 */
144, 152, 137, 143, 146, 116, 126, 133, /* 1752-1759 */
110, 135, 142, 119, 154, 148, 111, 149, /* 1760-1767 */
143,  98, 134, 134,  94, 134, 140, 104, /* 1768-1775 */
144, 155, 105, 130, 154, 100,  98, 138, /* 1776-1783 */
110,  94, 133, 133, 109, 132, 140, 106, /* 1784-1791 */
105, 121,  99,  94, 123, 122, 109, 126, /* 1792-1799 */
132, 112, 111, 114, 102, 100, 104, 107, /* 1800-1807 */
117, 119, 118, 119, 118, 109, 102, 104, /* 1808-1815 */
104, 103, 106, 112, 115, 122, 117, 105, /* 1816-1823 */
116, 112,  90,  99, 119, 111, 104, 119, /* 1824-1831 */
129, 117, 104, 100, 109, 106,  93, 101, /* 1832-1839 */
127, 130, 112, 109, 117, 114,  96,  86, /* 1840-1847 */
116, 134, 112, 105, 130, 133, 100,  90, /* 1848-1855 */
114, 123, 101, 103, 137, 138, 110, 111, /* 1856-1863 */
126, 109,  93, 116, 132, 119, 123, 139, /* 1864-1871 */
127, 105, 116, 122, 106, 121, 143, 129, /* 1872-1879 */
125, 143, 124, 103, 126, 127, 113, 130, /* 1880-1887 */
145, 135, 127, 130, 126, 120, 124, 129, /* 1888-1895 */
136, 139, 140, 135, 132, 132, 121, 127, /* 1896-1903 */
141, 139, 139, 149, 142, 129, 131, 129, /* 1904-1911 */
131, 141, 143, 147, 143, 138, 135, 122, /* 1912-1919 */
130, 147, 133, 143, 158, 132, 134, 142, /* 1920-1927 */
124, 145, 148, 136, 160, 141, 126, 149, /* 1928-1935 */
124, 131, 165, 132, 141, 173, 124, 121, /* 1936-1943 */
160, 126, 128, 168, 140, 131, 158, 131, /* 1944-1951 */
122, 158, 144, 132, 161, 148, 120, 138, /* 1952-1959 */
148, 132, 143, 161, 145, 127, 138, 137, /* 1960-1967 */
123, 139, 154, 141, 140, 142, 127, 125, /* 1968-1975 */
138, 142, 141, 141, 137, 135, 129, 130, /* 1976-1983 */
140, 143, 140, 138, 131, 127, 135, 130, /* 1984-1991 */
131, 147, 145, 124, 120, 135, 139, 129, /* 1992-1999 */
130, 148, 142, 114, 120, 146, 143, 125, /* 2000-2007 */
128, 139, 139, 122, 118, 144, 156, 123, /* 2008-2015 */
107, 134, 143, 121, 114, 140, 154, 126, /* 2016-2023 */
101, 129, 151, 118, 108, 128, 130, 119, /* 2024-2031 */
108, 131, 151, 116, 104, 134, 118, 102, /* 2032-2039 */
125, 128, 119, 117, 118, 126, 118, 110, /* 2040-2047 */
118, 115, 102, 114, 126, 115, 117, 125, /* 2048-2055 */
108, 101, 114, 108, 108, 117, 112, 115, /* 2056-2063 */
120, 111, 107, 109, 104, 101, 108, 116, /* 2064-2071 */
115, 114, 119, 103,  96, 108, 101,  97, /* 2072-2079 */
115, 120, 110, 105, 111, 109,  90,  92, /* 2080-2087 */
115, 109,  96, 114, 124, 101,  89, 107, /* 2088-2095 */
114,  95,  96, 122, 124,  99,  97, 118, /* 2096-2103 */
115,  91,  96, 128, 136, 106,  98, 129, /* 2104-2111 */
126,  90,  95, 133, 141, 118, 108, 128, /* 2112-2119 */
132, 104,  97, 133, 143, 126, 117, 130, /* 2120-2127 */
133, 115, 111, 132, 146, 135, 131, 144, /* 2128-2135 */
141, 119, 123, 145, 138, 137, 151, 149, /* 2136-2143 */
141, 136, 136, 143, 142, 144, 152, 146, /* 2144-2151 */
145, 145, 139, 147, 156, 148, 152, 154, /* 2152-2159 */
137, 139, 149, 142, 155, 166, 147, 147, /* 2160-2167 */
150, 133, 142, 158, 147, 149, 162, 141, /* 2168-2175 */
134, 155, 143, 141, 166, 145, 138, 154, /* 2176-2183 */
129, 141, 160, 136, 156, 155, 123, 147, /* 2184-2191 */
139, 127, 162, 141, 134, 153, 120, 132, /* 2192-2199 */
147, 129, 151, 140, 121, 141, 127, 127, /* 2200-2207 */
152, 132, 126, 138, 115, 119, 141, 131, /* 2208-2215 */
138, 141, 114, 116, 131, 116, 128, 144, /* 2216-2223 */
119, 121, 130, 117, 130, 139, 126, 125, /* 2224-2231 */
121, 120, 131, 130, 135, 136, 120, 119, /* 2232-2239 */
126, 132, 134, 131, 130, 122, 118, 130, /* 2240-2247 */
137, 134, 130, 129, 122, 120, 137, 143, /* 2248-2255 */
125, 121, 127, 121, 117, 132, 148, 126, /* 2256-2263 */
107, 131, 133, 113, 122, 142, 129, 103, /* 2264-2271 */
111, 142, 134, 111, 125, 138, 117,  99, /* 2272-2279 */
120, 143, 127, 104, 117, 132, 112, 100, /* 2280-2287 */
126, 139, 117, 100, 107, 114, 114, 109, /* 2288-2295 */
115, 126, 111,  92, 101, 111, 109, 111, /* 2296-2303 */
111, 108, 101,  90,  97, 107, 107, 111, /* 2304-2311 */
113, 102,  97,  95, 100, 110, 107, 107, /* 2312-2319 */
106,  96,  97, 103, 106, 114, 117, 108, /* 2320-2327 */
 99, 103, 102,  99, 118, 122, 110, 122, /* 2328-2335 */
117,  95, 119, 120, 104, 131, 136, 110, /* 2336-2343 */
120, 128, 108, 117, 140, 122, 125, 148, /* 2344-2351 */
117, 111, 146, 123, 123, 162, 135, 130, /* 2352-2359 */
150, 120, 130, 146, 130, 157, 158, 135, /* 2360-2367 */
156, 149, 130, 147, 146, 150, 156, 140, /* 2368-2375 */
153, 157, 136, 145, 161, 157, 152, 147, /* 2376-2383 */
152, 152, 135, 137, 155, 157, 148, 152, /* 2384-2391 */
157, 150, 138, 135, 137, 142, 140, 138, /* 2392-2399 */
146, 149, 143, 138, 133, 129, 126, 122, /* 2400-2407 */
127, 128, 133, 137, 133, 131, 130, 117, /* 2408-2415 */
114, 118, 119, 129, 131, 127, 135, 130, /* 2416-2423 */
110, 119, 124, 113, 119, 135, 129, 121, /* 2424-2431 */
136, 129, 109, 125, 129, 104, 125, 147, /* 2432-2439 */
118, 126, 150, 119, 107, 130, 116, 109, /* 2440-2447 */
143, 134, 118, 145, 127,  95, 127, 122, /* 2448-2455 */
 96, 138, 136, 110, 141, 128,  96, 120, /* 2456-2463 */
114, 103, 131, 124, 119, 133, 115, 112, /* 2464-2471 */
116, 107, 116, 124, 119, 126, 122, 115, /* 2472-2479 */
113, 101, 111, 121, 114, 124, 127, 111, /* 2480-2487 */
109, 102,  96, 107, 112, 112, 119, 116, /* 2488-2495 */
105,  96,  96, 101, 102, 109, 114, 108, /* 2496-2503 */
100, 100,  88,  92, 107,  99, 103, 119, /* 2504-2511 */
101,  83, 101,  98,  83, 101, 117,  98, /* 2512-2519 */
 94, 108,  98,  83,  99, 113, 100,  97, /* 2520-2527 */
113, 107,  82,  93, 123, 110,  94, 122, /* 2528-2535 */
124,  84,  86, 122, 121, 100, 119, 140, /* 2536-2543 */
112,  88, 112, 132, 118, 113, 137, 140, /* 2544-2551 */
114, 107, 133, 141, 129, 133, 144, 140, /* 2552-2559 */
126, 125, 143, 151, 146, 141, 144, 145, /* 2560-2567 */
138, 137, 150, 164, 153, 143, 148, 147, /* 2568-2575 */
145, 152, 164, 161, 154, 157, 154, 149, /* 2576-2583 */
164, 173, 160, 153, 159, 155, 154, 162, /* 2584-2591 */
175, 177, 154, 148, 166, 161, 149, 170, /* 2592-2599 */
178, 146, 141, 169, 162, 149, 171, 170, /* 2600-2607 */
137, 143, 162, 148, 151, 168, 148, 131, /* 2608-2615 */
154, 153, 136, 160, 158, 120, 137, 155, /* 2616-2623 */
126, 148, 164, 115, 125, 150, 118, 135, /* 2624-2631 */
161, 118, 120, 138, 114, 133, 147, 122, /* 2632-2639 */
128, 129, 110, 128, 140, 127, 127, 122, /* 2640-2647 */
118, 122, 120, 129, 132, 122, 119, 118, /* 2648-2655 */
116, 124, 127, 125, 124, 116, 113, 118, /* 2656-2663 */
123, 130, 135, 127, 119, 116, 115, 119, /* 2664-2671 */
128, 133, 124, 119, 118, 110, 119, 136, /* 2672-2679 */
132, 123, 128, 118, 104, 119, 129, 119, /* 2680-2687 */
129, 139, 112, 104, 133, 127, 105, 128, /* 2688-2695 */
142, 108,  97, 132, 129, 101, 126, 149, /* 2696-2703 */
108,  93, 130, 122,  93, 121, 148, 119, /* 2704-2711 */
104, 128, 119,  95, 115, 129, 117, 126, /* 2712-2719 */
126, 108, 115, 112, 100, 123, 130, 111, /* 2720-2727 */
118, 121, 101, 103, 118, 117, 116, 119, /* 2728-2735 */
113, 105, 105, 106, 111, 120, 118, 113, /* 2736-2743 */
110,  99, 100, 111, 110, 113, 120, 105, /* 2744-2751 */
 93,  97, 103, 110, 112, 111, 112,  96, /* 2752-2759 */
 89, 110, 108, 108, 122, 108,  97, 110, /* 2760-2767 */
 99, 109, 131, 114, 112, 120,  95, 104, /* 2768-2775 */
131, 109, 123, 144, 102, 101, 143, 119, /* 2776-2783 */
108, 156, 133,  90, 130, 148, 112, 134, /* 2784-2791 */
173, 129, 106, 151, 147, 117, 149, 169, /* 2792-2799 */
129, 122, 158, 155, 133, 156, 170, 136, /* 2800-2807 */
127, 158, 162, 149, 155, 159, 150, 139, /* 2808-2815 */
153, 167, 160, 147, 148, 155, 150, 152, /* 2816-2823 */
164, 161, 144, 147, 153, 154, 162, 164, /* 2824-2831 */
152, 143, 149, 160, 156, 155, 165, 157, /* 2832-2839 */
135, 137, 159, 161, 147, 147, 154, 148, /* 2840-2847 */
135, 133, 154, 165, 140, 126, 144, 151, /* 2848-2855 */
136, 130, 147, 157, 131, 113, 137, 156, /* 2856-2863 */
131, 120, 152, 143, 102, 117, 154, 129, /* 2864-2871 */
111, 143, 140,  98, 107, 147, 128, 107, /* 2872-2879 */
144, 141,  92, 101, 131, 112, 110, 141, /* 2880-2887 */
123,  97, 113, 115, 101, 118, 131, 112, /* 2888-2895 */
113, 115, 102, 106, 118, 116, 120, 124, /* 2896-2903 */
108, 100, 108, 105, 108, 123, 120, 115, /* 2904-2911 */
114, 103,  97, 110, 115, 111, 121, 120, /* 2912-2919 */
108, 106, 108, 106, 116, 119, 115, 122, /* 2920-2927 */
109, 102, 107, 100, 112, 119, 111, 121, /* 2928-2935 */
114,  94, 106, 101,  96, 119, 112, 109, /* 2936-2943 */
122, 100,  89, 103,  93,  96, 122, 111, /* 2944-2951 */
102, 119,  95,  78, 109, 101,  84, 125, /* 2952-2959 */
124,  85, 107, 115,  74,  85, 125, 101, /* 2960-2967 */
 93, 134, 122,  83, 100, 112,  88,  98, /* 2968-2975 */
128, 125, 113, 121, 121, 104,  97, 112, /* 2976-2983 */
123, 117, 121, 136, 129, 112, 119, 126, /* 2984-2991 */
113, 115, 134, 133, 126, 134, 137, 127, /* 2992-2999 */
120, 127, 126, 124, 140, 148, 137, 137, /* 3000-3007 */
144, 134, 121, 128, 148, 145, 138, 156, /* 3008-3015 */
162, 151, 139, 135, 147, 151, 133, 143, /* 3016-3023 */
174, 169, 147, 148, 161, 153, 132, 131, /* 3024-3031 */
156, 166, 146, 144, 171, 163, 129, 135, /* 3032-3039 */
158, 144, 125, 148, 167, 137, 124, 159, /* 3040-3047 */
157, 121, 127, 152, 137, 111, 128, 150, /* 3048-3055 */
137, 130, 139, 129, 126, 123, 107, 117, /* 3056-3063 */
144, 130, 106, 124, 139, 111,  98, 128, /* 3064-3071 */
138, 103,  94, 119, 115,  98, 112, 128, /* 3072-3079 */
114,  94, 104, 112,  98, 100, 120, 105, /* 3080-3087 */
 88, 106, 107,  97, 113, 119,  99,  97, /* 3088-3095 */
102,  96, 105, 118, 113, 108, 108, 101, /* 3096-3103 */
106, 112, 113, 114, 108, 105, 109, 115, /* 3104-3111 */
122, 126, 120, 109, 112, 119, 123, 129, /* 3112-3119 */
129, 123, 123, 122, 129, 143, 133, 133, /* 3120-3127 */
136, 125, 136, 148, 138, 143, 136, 130, /* 3128-3135 */
146, 143, 149, 158, 138, 143, 149, 134, /* 3136-3143 */
162, 162, 140, 161, 152, 137, 166, 153, /* 3144-3151 */
149, 174, 146, 144, 171, 147, 144, 174, /* 3152-3159 */
151, 145, 173, 153, 142, 171, 159, 135, /* 3160-3167 */
162, 163, 136, 156, 174, 145, 145, 160, /* 3168-3175 */
150, 148, 162, 161, 148, 148, 149, 143, /* 3176-3183 */
151, 163, 153, 143, 148, 147, 145, 153, /* 3184-3191 */
154, 145, 135, 139, 146, 151, 158, 151, /* 3192-3199 */
132, 140, 146, 134, 139, 155, 147, 127, /* 3200-3207 */
130, 148, 149, 132, 128, 137, 137, 126, /* 3208-3215 */
131, 153, 149, 115, 115, 144, 144, 124, /* 3216-3223 */
128, 152, 146, 110, 108, 151, 156, 121, /* 3224-3231 */
116, 141, 144, 118, 105, 137, 158, 125, /* 3232-3239 */
 98, 125, 148, 126, 112, 139, 144, 109, /* 3240-3247 */
105, 128, 130, 118, 124, 134, 122, 103, /* 3248-3255 */
114, 124, 113, 118, 131, 121, 103, 104, /* 3256-3263 */
115, 111, 111, 124, 118, 103, 103, 104, /* 3264-3271 */
102, 108, 113, 115, 106,  98, 101, 100, /* 3272-3279 */
 98, 103, 109, 104, 100, 101,  91,  94, /* 3280-3287 */
106, 101, 103, 109,  94,  93,  95,  88, /* 3288-3295 */
102, 107,  98, 113,  99,  84, 101,  91, /* 3296-3303 */
 93, 113, 103, 103, 107,  86,  90,  97, /* 3304-3311 */
 92, 108, 109, 108, 108,  90,  98, 104, /* 3312-3319 */
 88, 112, 121, 101, 116, 112,  93, 113, /* 3320-3327 */
111,  99, 130, 129, 108, 128, 121,  99, /* 3328-3335 */
124, 129, 110, 136, 147, 117, 126, 139, /* 3336-3343 */
114, 121, 144, 135, 134, 152, 142, 130, /* 3344-3351 */
134, 131, 127, 134, 145, 147, 147, 149, /* 3352-3359 */
142, 132, 134, 135, 134, 145, 149, 148, /* 3360-3367 */
153, 148, 133, 133, 136, 134, 133, 145, /* 3368-3375 */
156, 150, 137, 138, 137, 125, 124, 135, /* 3376-3383 */
148, 143, 133, 140, 141, 118, 112, 135, /* 3384-3391 */
142, 124, 122, 139, 138, 112, 106, 139, /* 3392-3399 */
143, 105, 107, 142, 130,  93, 107, 148, /* 3400-3407 */
138,  98, 108, 137, 119,  88, 111, 150, /* 3408-3415 */
135, 100, 114, 134, 116,  99, 114, 140, /* 3416-3423 */
137, 108, 109, 131, 123, 109, 122, 139, /* 3424-3431 */
136, 118, 115, 129, 133, 128, 131, 140, /* 3432-3439 */
134, 119, 122, 135, 139, 138, 137, 138, /* 3440-3447 */
132, 127, 134, 142, 146, 143, 136, 135, /* 3448-3455 */
141, 137, 143, 159, 147, 132, 143, 141, /* 3456-3463 */
134, 156, 158, 136, 142, 146, 132, 141, /* 3464-3471 */
162, 147, 136, 149, 134, 128, 157, 149, /* 3472-3479 */
135, 154, 137, 128, 158, 152, 137, 153, /* 3480-3487 */
137, 122, 148, 148, 146, 162, 135, 128, /* 3488-3495 */
150, 132, 144, 162, 129, 132, 143, 132, /* 3496-3503 */
146, 149, 141, 135, 120, 134, 142, 135, /* 3504-3511 */
151, 138, 123, 131, 123, 131, 147, 132, /* 3512-3519 */
130, 131, 115, 126, 139, 134, 139, 138, /* 3520-3527 */
122, 120, 130, 128, 134, 144, 131, 124, /* 3528-3535 */
131, 128, 129, 142, 141, 129, 124, 123, /* 3536-3543 */
128, 132, 131, 139, 146, 123, 114, 132, /* 3544-3551 */
132, 118, 129, 147, 124, 103, 128, 128, /* 3552-3559 */
105, 126, 147, 119, 103, 119, 123, 101, /* 3560-3567 */
105, 137, 130,  95, 104, 132, 114,  85, /* 3568-3575 */
115, 144, 106,  79, 110, 125,  93,  85, /* 3576-3583 */
120, 135, 100,  80, 103, 110,  88,  85, /* 3584-3591 */
109, 116,  94,  81,  91,  98,  90,  84, /* 3592-3599 */
 99, 115,  98,  77,  82,  90,  89,  86, /* 3600-3607 */
 97, 114, 105,  87,  87,  89,  84,  89, /* 3608-3615 */
 97, 105, 106, 100,  94,  92,  95,  95, /* 3616-3623 */
 98, 108, 114, 108, 101, 106, 104,  95, /* 3624-3631 */
109, 124, 110, 115, 133, 115,  96, 114, /* 3632-3639 */
119, 101, 123, 147, 122, 122, 139, 110, /* 3640-3647 */
104, 131, 122, 118, 150, 141, 123, 146, /* 3648-3655 */
131, 105, 140, 138, 115, 157, 147, 127, /* 3656-3663 */
162, 135, 120, 153, 128, 132, 160, 139, /* 3664-3671 */
152, 159, 130, 142, 143, 130, 147, 146, /* 3672-3679 */
153, 161, 149, 155, 151, 134, 143, 142, /* 3680-3687 */
146, 160, 152, 155, 163, 144, 138, 150, /* 3688-3695 */
137, 136, 156, 150, 146, 159, 149, 134, /* 3696-3703 */
141, 141, 129, 134, 147, 144, 138, 144, /* 3704-3711 */
147, 135, 127, 132, 132, 131, 138, 142, /* 3712-3719 */
136, 139, 141, 134, 137, 142, 129, 121, /* 3720-3727 */
134, 140, 132, 137, 157, 141, 121, 138, /* 3728-3735 */
143, 128, 132, 142, 134, 132, 144, 148, /* 3736-3743 */
144, 140, 137, 137, 130, 134, 150, 150, /* 3744-3751 */
139, 134, 143, 145, 137, 145, 160, 144, /* 3752-3759 */
122, 140, 149, 134, 142, 161, 148, 123, /* 3760-3767 */
136, 156, 134, 134, 165, 150, 117, 141, /* 3768-3775 */
159, 125, 141, 172, 131, 122, 157, 133, /* 3776-3783 */
119, 164, 154, 118, 150, 145, 107, 145, /* 3784-3791 */
155, 123, 153, 155, 113, 136, 147, 113, /* 3792-3799 */
139, 160, 126, 135, 139, 115, 131, 140, /* 3800-3807 */
129, 145, 137, 122, 129, 118, 122, 135, /* 3808-3815 */
126, 130, 134, 110, 117, 126, 113, 127, /* 3816-3823 */
134, 119, 115, 120, 110, 108, 123, 126, /* 3824-3831 */
119, 125, 118, 106, 111, 109, 110, 120, /* 3832-3839 */
117, 115, 119, 107, 105, 117, 107, 104, /* 3840-3847 */
126, 122, 100, 115, 118,  87, 103, 128, /* 3848-3855 */
 99, 103, 133, 104,  84, 116, 107,  81, /* 3856-3863 */
110, 129,  97,  96, 125, 108,  76,  99, /* 3864-3871 */
129, 100,  87, 130, 129,  81,  87, 112, /* 3872-3879 */
 96,  92, 115, 127, 116, 103, 107, 110, /* 3880-3887 */
 93,  95, 121, 125, 112, 118, 124, 114, /* 3888-3895 */
104, 105, 114, 120, 117, 123, 134, 130, /* 3896-3903 */
120, 118, 118, 113, 117, 128, 129, 135, /* 3904-3911 */
140, 129, 119, 121, 120, 118, 123, 135, /* 3912-3919 */
141, 138, 139, 134, 126, 125, 123, 128, /* 3920-3927 */
140, 138, 140, 142, 141, 138, 127, 121, /* 3928-3935 */
132, 134, 131, 137, 147, 154, 139, 129, /* 3936-3943 */
138, 138, 127, 125, 140, 156, 146, 135, /* 3944-3951 */
148, 154, 132, 118, 136, 146, 133, 132, /* 3952-3959 */
153, 159, 144, 139, 152, 148, 122, 128, /* 3960-3967 */
154, 142, 129, 161, 167, 137, 141, 163, /* 3968-3975 */
135, 117, 144, 146, 128, 146, 164, 145, /* 3976-3983 */
143, 157, 138, 122, 141, 135, 120, 145, /* 3984-3991 */
153, 134, 148, 159, 133, 131, 142, 127, /* 3992-3999 */
123, 139, 135, 134, 145, 143, 140, 144, /* 4000-4007 */
140, 133, 131, 131, 125, 128, 132, 133, /* 4008-4015 */
144, 144, 140, 146, 137, 124, 129, 123, /* 4016-4023 */
117, 129, 127, 131, 140, 137, 141, 137, /* 4024-4031 */
128, 131, 117, 113, 126, 115, 120, 138, /* 4032-4039 */
121, 129, 142, 120, 128, 137, 109, 112, /* 4040-4047 */
128, 105, 112, 140, 124, 114, 141, 130, /* 4048-4055 */
106, 130, 133, 104, 119, 131, 102, 114, /* 4056-4063 */
140, 117, 115, 140, 120, 102, 129, 126, /* 4064-4071 */
105, 123, 119, 105, 127, 127, 123, 138, /* 4072-4079 */
118, 109, 128, 117, 119, 137, 119, 113, /* 4080-4087 */
127, 125, 131, 136, 128, 121, 115, 118, /* 4088-4095 */
130, 134, 140, 139, 122, 121, 126, 127, /* 4096-4103 */
136, 141, 137, 128, 126, 129, 132, 142, /* 4104-4111 */
143, 137, 135, 132, 128, 144, 148, 141, /* 4112-4119 */
154, 138, 123, 144, 143, 132, 156, 155, /* 4120-4127 */
127, 139, 149, 132, 141, 162, 145, 131, /* 4128-4135 */
145, 138, 124, 150, 160, 141, 144, 157, /* 4136-4143 */
137, 121, 148, 160, 134, 139, 167, 143, /* 4144-4151 */
117, 145, 163, 137, 131, 157, 155, 121, /* 4152-4159 */
125, 156, 145, 129, 144, 157, 134, 117, /* 4160-4167 */
137, 147, 129, 130, 150, 143, 124, 122, /* 4168-4175 */
132, 137, 127, 126, 141, 136, 121, 118, /* 4176-4183 */
128, 130, 127, 127, 132, 128, 118, 114, /* 4184-4191 */
117, 118, 120, 127, 126, 123, 124, 115, /* 4192-4199 */
106, 107, 113, 117, 120, 120, 122, 120, /* 4200-4207 */
104,  98, 108, 114, 107, 112, 126, 116, /* 4208-4215 */
 99, 103, 109,  99,  99, 117, 115, 100, /* 4216-4223 */
113, 116,  89,  92, 117,  99,  98, 124, /* 4224-4231 */
112,  91, 109, 104,  82, 107, 119,  94, /* 4232-4239 */
111, 130,  91,  95, 116,  83,  92, 124, /* 4240-4247 */
 96, 109, 138,  97,  99, 118,  82,  93, /* 4248-4255 */
115,  95, 116, 127, 105, 120, 111,  90, /* 4256-4263 */
107, 102,  97, 121, 116, 118, 126, 113, /* 4264-4271 */
111, 108 /* 4272-4273 */



 };

int fish = 0;
int sizesample = sizeof(sample);

void setup() {

  delayMicroseconds(100);  // Stabilize

  // Set up Timer/Counter1 for PWM output
  TIMSK = 0;                         // Timer interrupts OFF
  TCCR1 = _BV(CS10);                 // 1:1 prescale
  GTCCR = _BV(PWM1B) | _BV(COM1B1);  // PWM B, clear on match
  OCR1C = 255;                       // Full 8-bit PWM cycle
  OCR1B = 127;                       // 50% duty at start

  pinMode(4, OUTPUT);  // Enable PWM output pin

  // Set up Timer/Counter0 for sample-playing interrupt.
  // TIMER0_OVF_vect is already in use by the Arduino runtime,
  // so TIMER0_COMPA_vect is used.  This code alters the timer
  // interval, making delay(), micros(), etc. useless (the
  // overflow interrupt is therefore disabled).

  // Timer resolution is limited to either 0.125 or 1.0 uS,
  // so it's rare that the playback rate will precisely match
  // the data, but the difference is usually imperceptible.
  TCCR0A = _BV(WGM01) | _BV(WGM00);  // Mode 7 (fast PWM)
  if (sample_rate >= 31250) {
    TCCR0B = _BV(WGM02) | _BV(CS00);  // 1:1 prescale
    OCR0A = ((F_CPU + (sample_rate / 2)) / sample_rate) - 1;
  } else {                            // Good down to about 3900 Hz
    TCCR0B = _BV(WGM02) | _BV(CS01);  // 1:8 prescale
    OCR0A = (((F_CPU / 8L) + (sample_rate / 2)) / sample_rate) - 1;
  }
  TIMSK = _BV(OCIE0A);  // Enable compare match, disable overflow
}

void loop() {
  delay(1000);
}

ISR(TIMER0_COMPA_vect) {
  OCR1B = pgm_read_byte(&sample[fish]);  // Read flash, write PWM reg.
  fish++;
  if (fish >= sizesample) { fish = 0; }
  /*
  if(++index >= samples) {           // End of audio data?
    index = 0;                       // We must repeat!
    flash.endRead();
    flash.beginRead(6);              // Skip 6 byte header
  }
  */
}

There's very little space inside the Sonic Screwdriver prop body so I don't think a power switch module is an option, but I appreciate the suggestion! Are there any other components (resistors etc) that could be used instead?

OK THX.

I looked for as long as I could and never saw a schematic for the device other than the one you posted.

In the picture there is a resistor, there is not one in the schematic.

If it worked on the breadbox and functions differently when you wire it up otherwise, there must be some difference that would account for that.

Did anything change? Or could you have made a wiring error? A wiring error might also account for the relatively low battery life.

The current can be measured with an ammeter, or the current measurement settings on a multimeter.

The connection to the positive battery terminal can be disconnected and the path that breaks completed by running it through the meter. You should measure that current both with and without the device activated by the pushbutton.

If you have no meter but plan to do much of this kinda stuff the good news is that an entirely adequate DMM digital multimeter is not need to be a budget buster.

a7

No.

Your schematic doesnt show the value of the led resisitor. Lets suppose its 150 ohm, to limit the LED current to 20mA. The voltage across your speaker is then 4.5V * 8/170 = 0.2V. and the power is a few mW.

An 8 ohm speaker is not suitable; from the instructable

Electronics:
2 - Attiny85 Microcontrollers
2 super-bright LED, 3mm. They may be different colors. A self cycling RGB led would also be cool (If there is interest I should be able to add control of an RGB led to the sound circuit)
1 long range IR led, 3mm or 5mm
1 UV Led, 3mm or 5mm
1 Piezo SpeakerPiezo Speaker, less than .5 inch di (working on finding a new speaker and adding a transformer)

However the series connection ois also wrong.

Apologie - forgot to add the resistor to the drawing! The resistor currently in use is 51ohm (I know it's wrong but it was the best I had when I first wired this up, I do have some 150ohm resistors on order though)

It's probably obvious by now that I know very little about electronics, but if an 8 ohm speaker isn't suitable then what kind of speaker would be? Or could I just add something to lower current going into the speaker?

I've ordered a cheap Multimeter so in a couple of days I should be able to test the current, aswell as see how the circuit works when using the correct resistor for the LED!

"The resistor currently in use is 51ohm"
Two in series = 102Ω, and 3 are 153Ω

Hi,
You need to use Google;
Try;

what is the difference between a piezo speaker and regular speaker

Piezo devices have a very high impedance whereas a loudspeaker has relatively low impedance.

Tom... :grinning: :+1: :coffee: :australia:

2 Likes

You need a high impedance speaker (80 ohm or piezo) WITH a series capacitor to block DC from pin 3 to ground.
I cant make ANY sense of what the button and LED are doing.

Thankyou! I've rearranged the circuit according to your revised diagram and it all seems to be working - I'll leave it a little while and hopefully the batteries will still have some charge!

Now I just need to find a piezo speaker that'll fit inside the prop body..

What strength of capacitor would that need to be?

As for the button and LED, the idea is that when the button is pressed, the LED lights up and the speaker produces a sound that's been coded onto the ATtiny85.

What are you using to hold these LR44's together?

I'm using one of these battery holders Button Cell Battery Holder (with batteries - 4.5v) [Discontinued] | The Pi Hut
They're discontinued but I have a few of them lying around as they're a convenient size for sonic screwdrivers!

The PiHut - where practically everything is 'Sold Out'.
Amazing.

Does anyone have a source for a small piezo speaker that'd be suitable for this project? I've looked and all I can find is piezo buzzers which, as far as I can tell, are not what I need. Maximum diameter I can use is about 14mm.

Hi, @pointyendprops

Google;

piezo element

For your project you will need the basic piezo element, not a loudspeaker.

Tom.. :grinning: :+1: :coffee: :australia:

This is how it SHOULD be connected.

image

Looks like the LED was reducing the speaker voltage (probably a good thing - if unintentional?).

like these? 10x Piezoelectric Piezo Ceramic Wafer Plate Dia 15mm For Buzzer Loudspeaker W02 | eBay