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

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

Updated 13-Apr-11 1:18am
Toli Cuturicu 13-Apr-11 8:11am    
apaka 13-Apr-11 11:04am    
Try using

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
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 ??? :(

E.F. Nijboer 21-Apr-11 5:40am    
Normally the USB would supply approximately 5 volt and 0.5 mA. ( To measure it you could something like this:
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    
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:

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