go_away

Author Topic: USB Device detect signal  (Read 828 times)

0 Members and 1 Guest are viewing this topic.

Offline PolemusTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
USB Device detect signal
« on: February 04, 2013, 05:15:33 AM »
Hi Everyone, I know this might be a little bit off topic, but i am looking for a couple of suggestions.

I have a device, that sends electrical signals... basically, a power cable that emits a current. I need to plug that into a pc's usb port, and detect that current.

Do you know of any schematics that can assist me in sending a bit value to my pc based on a current received? i am not interested in the power levels or anything, i just want to know that a power signal was detected.

I would really appreciate any help.

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: USB Device detect signal
« Reply #1 on: February 04, 2013, 06:10:04 AM »
To detect current one can use very small value resistor.



What You do is measure voltage across that resistor and use Ohm's Law to calculate how much current is flowing. Voltage level across resistor can be measured using ADC pin of microntroller, then ADC value can be transmitted via serial interface to USB, to achieve that one would use microcontroller with USART feature and an external TTL to USB converter.

If You give us more info on what exactly You want to achieve (do You want to know exact current flow in amps, or You just want to detect that current is flowing in general), what voltages and currents are involved, can circuit be only ON or OFF, or can it operate in low power mode (anything in between full ON or full OFF) with lower current draw, etc etc, someone possibly might offer to draw You free circuit required for the task. The more info You give to us, the more we are able to help You :)
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline PolemusTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
Re: USB Device detect signal
« Reply #2 on: February 04, 2013, 06:18:11 AM »
The power that is transmitted is low, probably 12v.

When my alarm goes off, it sends a power signal to my alarm speaker, i basically want to detect when the alarm goes off. the easiest way would be to run a cable from the speaker to "a device" that will connect to my usb port.

i can interface with the usb port from within windows, but i am not sure how to convert that power signal into a readable format on USB.

All i want to know is On or OFF... i'm not interested in levels
« Last Edit: February 04, 2013, 06:23:26 AM by Polemus »

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: USB Device detect signal
« Reply #3 on: February 04, 2013, 11:15:03 AM »
Quote
The power that is transmitted is low, probably 12v.

First: Power is measured in Watts. Electric potential in volts, and current in Amperes. But we call them voltage and amperage for short :-)

Have you measured it? 12V over a 8 Ohm speaker would be 18 watts of power; that's a pretty loud alarm (car stereo cranked up level.)

So, you have a speaker, and you want to have a USB device that detects whether the speaker is making sound louder than X, or not. I can think of a number of ways of doing this:

1) You can use an inductor next to the speaker, that energizes and generates voltage when the speaker is on. Then use a rectifier, a capacitor, and the ADC input on an Arduino to read this voltage.

2) You can use a microphone to read the output of the speaker. (OK, corny, but it would work :-)

3) You can couple a rectifier bridge to the speaker. Use small signal diodes with low forward voltage drop. Couple a capacitor and resistor (to bleed the cap) across the rectifier output. Then couple the rectifier output to an ADC input on the Arduino. I'd use a 10 uF capacitor and 10k resistor.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: USB Device detect signal
« Reply #4 on: February 05, 2013, 10:48:42 AM »
If you just need to know it's working, some people connect an LED from the Tx (and/or) Rx signal line. So when data is being transmitted, the LED flickers.

Offline PolemusTopic starter

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
Re: USB Device detect signal
« Reply #5 on: February 08, 2013, 04:10:21 AM »
nope... i want to do more than just see a light, i have software that needs to know it is alarming

 


Get Your Ad Here