I have an electronic system waiting to be triggered (no microcontroller for now). My laptop only has USB ports.

I want to trigger it using voice recognition (this part is ok).

For now the only think I can think of is :

Once the right keyword is detected, send a 19 KHz sine on the audio output, because it's inaudible, for 0.1 seconds and uses a microcontroller analog port to detect it.

I only have microcontroller with no USB support available and I've never used a USB connection.

I'm not looking for something perfect, a dirty solution would be all right, this is just to do a prank tomorrow.


  • \$\begingroup\$ Why don't you use Serial? Arduino has great support for it \$\endgroup\$ – martianwars Dec 17 '16 at 20:24
  • \$\begingroup\$ no serial port on the laptop or usb to serial converter at home, I have 20h to finish now. I'm already building the 19Khz version but if anyone has a better idea I'm all ears. \$\endgroup\$ – sliders_alpha Dec 17 '16 at 20:33
  • \$\begingroup\$ Which uC do you have? \$\endgroup\$ – martianwars Dec 17 '16 at 20:33
  • \$\begingroup\$ mostly 16F628A from microchip, edit : and I just found a 16F877A \$\endgroup\$ – sliders_alpha Dec 17 '16 at 20:35
  • \$\begingroup\$ Oh I'm stupid, The audio line in't used, I just have to unplug the speakers, send audio, put a low pass filter to get an average and use a comparator to know when it needs to be triggered, that will do it for now. \$\endgroup\$ – sliders_alpha Dec 17 '16 at 20:42

Use a USB to Serial Port adapter with your microcontroller.


You might use a tone decoder (LM567 is typical) to detect that and only that frequency, and give a logic output. TI LM567 These devices can be driven from a microphone, and are insensitive to other sounds they might pick up, so your laptop could switch the target circuit wirelessly.


Not the answer you're looking for? Browse other questions tagged or ask your own question.