8 comments

[ 3.3 ms ] story [ 39.0 ms ] thread
Direct link to video here:

https://www.youtube.com/watch?v=780A0cv1qgA

Any comments or questions about how the robot/audio programming works are more than welcome :)

Could you go into more detail about how the main decoding circuit works? How does it turn an audio signal into UART?
Serial/UART is just a simple way of organizing how 1s and 0s are sent (start bit, data bits, optional parity, and stop bit, all at an agreed upon baud rate).

To send data to the robot, the transmitter (computer + headphones) encodes 1s as tone (9876Hz) and 0s at another frequency (12345Hz).

So for the decoding circuit all you really need are 3 stages: a microphone, an amplifier (opamp chip), and something that can very tightly look to see if the 0s frequency (12345Hz) is present since UART rests high when idle. A phase locked loop (PLL) is excellent for frequency locking, but can be a little hairy to use. The LM567 tone decoder chip however has a PLL inside but is a simple chip to work with.

A little variable resistor next to the tone decoder is used to precisely dial in the frequency. Lots of other resistors and capacitors in there to hook everything together, but that's essentially it. Does that make sense? Happy to answer more questions if you have any :)

Circuit schematic for reference here: http://research.kumpf.cc/2015-ProgrammingWithHeadphones/imgs...

(comment deleted)
Ah that does make sense! On first read I thought there was some other level of processing, like converting specific tones into bytes (9520Hz -> 0x42). You're translating the pulses directly to and from bits, which seems more sane.