Click here to Skip to main content
15,881,588 members
Please Sign up or sign in to vote.
3.33/5 (3 votes)
See more:
Hi,

I am trying to detect a fixed voltage(etc 5 Volt) on a wire, initially I used parallel port and it was working fine.
Can anyone help me to detect the same on USB port ?
I am using C# for the project..

Thanks,
Puneet.
Posted
Updated 13-Apr-11 1:18am
v2
Comments
Toli Cuturicu 13-Apr-11 8:11am    
Google?
apaka 13-Apr-11 11:04am    
Try using http://sourceforge.net/projects/libusbdotnet/

1 solution

You can use Windows Management Instrumentation for that.

Have a look at these articles:
How To Get Hardware Information (CPU ID, MainBoard Info, Hard Disk Serial, System Information , ...)[^]

Windows Management Instrumentation (WMI) Implementation[^]

Good luck!
 
Share this answer
 
Comments
puneetdhawan2000 21-Apr-11 3:44am    
Hi, Thanks for the information, but these can only be helpful in showing the information about the devices, and not the data/signals from USB.
I think that any voltage/current cannot be detected directly from USB port ??? :(

Thanks.
E.F. Nijboer 21-Apr-11 5:40am    
Normally the USB would supply approximately 5 volt and 0.5 mA. (http://www.hardwarebook.info/Universal_Serial_Bus_%28USB%29) To measure it you could something like this:
http://www.instructables.com/id/USB-Voltage-and-Current-Tester-version-2/
But I don't think it is possible to get a good reading from pc software. I also think that you can't simply compare usb with a parallel port, but maybe a usb-to-parallel module could also help out.
puneetdhawan2000 27-May-11 2:37am    
Hi,
I learned many things using the link (and the site you reffered). Thanks a lot for that.
It took me away from the actual problem for a few days :), I am still working that.

Thanks a lot.
E.F. Nijboer 27-May-11 8:20am    
Nice that it could provide you an interesting journey away from your actual problem. By the way, several years ago I also got somewhat interested in electronics and got me a nice experimental USB interface kit. Just for the fun of it and also to get some nice soldering practice. It is a fairly cheap (< $50) USB board with some digital and analogue in and output. Maybe this is something that can be used or gives some new inspiration to solve the problem. Check out these links for more info:
http://www.velleman.eu/distributor/products/view/?country=be&lang=en&id=351346
http://www.apogeekits.com/usb_interface.htm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900