Electronics > Electronics

USB Device detect signal

(1/2) > >>

Polemus:
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.

newInRobotics:
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 :)

Polemus:
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

jwatte:

--- Quote ---The power that is transmitted is low, probably 12v.
--- End quote ---

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.

Admin:
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.

Navigation

[0] Message Index

[#] Next page

Go to full version