This question already has an answer here:

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.

Thanks.

marked as duplicate by Tom Carpenter, ThreePhaseEel, Dmitry Grigoryev, laptop2d, Dave Tweed Dec 20 '16 at 1:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from stackoverflow.com Dec 18 '16 at 0:26

This question came from our site for professional and enthusiast programmers.

  • Why don't you use Serial? Arduino has great support for it – martianwars Dec 17 '16 at 20:24
  • 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. – sliders_alpha Dec 17 '16 at 20:33
  • Which uC do you have? – martianwars Dec 17 '16 at 20:33
  • mostly 16F628A from microchip, edit : and I just found a 16F877A – sliders_alpha Dec 17 '16 at 20:35
  • 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. – 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.