Quiz Box from hell

From Electriki
Jump to: navigation, search
Fig.1: wrong thinking. Original idea was to have serial interface to program simple tunes/delays for both contestants, using PNP/NPN transistors to control carhorn-current, which failed even most basic smoketest.
Fig.2: still not ok. This time using a Darlington-setup to control current (thx Jan), but car-horn was apparently very PSU-unfriendly.
Fig.3: little board ready for 1st real test. Of course, this test failed. MCU kept on resetting; after much measuring and swearing I concluded either the PSU was not up for it, or fast switching caused some spike/dip on MCU's pins.
Fig.4: infernal sound-device. Almost got a heart-attack hearing it actually pulled 3A (as per spec); measurements even showed 4A. Oh dear Lord.
Fig.5: car-horn and PC-PSU on scope. Blue line is voltage over 0.5 Ohm shunt in series with car-horn; yellow line is PSU-voltage. I am seriously guessing this PSU was not very happy about switching 4A on/off at 260Hz, because at some point it started behaving... funny. (Voltage would decrease a LOT when connecting car-horn as load; leaving PSU alone a bit seemed to make it 'ok' again.) So many, many things I still don't understand.
Fig.6: another schematic, ok this time. Actually, taking new buzzer made all the difference (of course); not that much was actually changed, schematic-wise.
Fig.7: inside the box of mayhem. You can see 110mA 12VDC siren, and little board in front of it.
Fig.8: buzzer-box, front. On/off switch with power-LED; Dremel came in very handy.
Fig.9: back of box. Connectors for 2 buttons and 12V PSU, not that interesting.
Fig.10: serial dongle, not needed. Ok, original idea of having serial interface to the device was quickly dropped, and so was this thing: basically a max232-clone and a regulator, carrying 12VDC, gnd, and TTL-level Tx/Rx from/to the MCU. Thanks to Domen for putting idea into my head of actually not putting line driver on quiz-board itself, but on dongle.


Yes. A lot of fsckups were made, a lot of things I still don't understand; in fact it's good to have this thing finished, now let's never ever look at it again :-)

The main reason for even writing this is not having to buy anyone a 2010.04-beer for not doing wiki-update.

But what is it?

Simple quiz-button thing:

  • 2 buttons can be connected to 'box' through wries
  • distinct sound is played for whichever player pushes the fastest
  • short immune-/lock-period after someone pressed their button, to let quizmaster do his talk

Good, and how is this causing Trouble?

Things that went wrong, in this order (all PEBCAK-caused of course):

  • ISP-programming wouldn't work for some reason, has never worked, eventually forgot about it and played disk jockey with MCU in/out of sockets
  • STK500 began to act flakey, I think it's at the end of its prolonged life, may it rest in pieces
  • burned resistor at base of driving transistor due to thinko
  • made 2 PSU's instable (prolly) due to switching of high current, causing cursing, hair-pulling and in general dissatisfaction
  • spontaneous buzzing sounds because of disabled brownout-detect on MCU
  • spontaneous buzzing sounds because of fscked up adapter-connector
  • spontaneous buzzing sounds because of short spikes/dips on button-wire
  • code to program tunes, software UART, serial interface didn't fit into 1k (without wasting too much time)

Nice Things

But ok, in the end it works; software waits for button A/B being pressed for 25ms continuously, and if so, plays 'beeeep', or 'beep-beep' for A and B respectively.

Fitting all into the casing was also nice; some mild woodwork, drilling, working with Dremel(tm), glueing, and then some. It actually looks presentable; the on/off-button in particular is very nice to work with - I'll use it again some time.

Software is so extremely simple I CBA to put it somewhere; it's pretty obvious.

Also try having some fun -- Michai