tags:

views:

1182

answers:

6

Hi guys,

I'm looking for a program that can read the weight on a USB scale, namely the Pelouze 10lb USB Portable Scale. I thought it would have a virtual COM port driver but instead, it uses HID drivers. I've been searching for a whole month for a program that can help me transfer the reading of the scale to Microsoft Excel. Can someone help me out or point me in the right direction? I am absolutely illiterate to programming. Much gratitude any help given.

A: 

I would assume that output from a USB HID device like this should appear to the USB host exactly as if the input was typed on a keyboard, i.e. on the scale stabilising, the weight would be sent over USB. This is the way most USB barcode scanners work.

If this is the case then the scale should just fire across the weight and it would appear in whatever application was active; Excel if that is where you wanted the input to end up.

However, I've looked over the specs and manual for the scale you specify and, unless I'm looking at the wrong model, although it is powered by USB I don't see any mention of the fact that it also communicates over USB. Do you have a URL or part number?

Lunatik
That's certainly not true. A mouse is also a HID device, and that's certainly not a keyboard.
MSalters
Very true. I'm used to dealing with scanners etc, and assumed that a scale would follow the keyboard device profile as it wouldn't make much sense for it to constantly emit a fluctuating reading.
Lunatik
The fluctuations aren't the problem; the problem is that a scale should produce its reading when the PC wants it. A keyboard and a bar scanner push events towards the PC as they happen.
MSalters
As would a scale, but only when the reading stabilises.
Lunatik
That assumes a scale stabilizes. Just put a human on top to see a clear example when it doesn't.
MSalters
This is a mailing scale, it will have an indicator to show when the reading is stable. Our Pitney Bowes equipment prints a label automatically when the device senses a stable load, one simply needs to remove the item and place another to get the next label. I assumed a much simpler USB device would work in a similar fashion.
Lunatik
Here are some screenshots of the SimpleHIDWrite program output. Hope this helps.http://www.freeimagehosting.net/image.php?dc59b02ecc.jpghttp://www.freeimagehosting.net/image.php?2916c4a9a9.jpg
Alex
Have a look at this PDF file from page 27 onwards: http://www.dymo.com/media/UserGuides/HID_POS_USB_Spec.pdf That might help slightly in mapping hex values to behaviours
barrowc
haha thanks for the reference but unfortunately, i can't make use of it as i dont know much about programming. =P
Alex
A: 

The first question that you will need to answer is the exact HID use. USB describes a wide family of related protocols. USB HID is a subset, but this still covers a large array of devices. The HID specs defines a 32 bits "usage" identifier supporting up to 4 billion different types of HID devices, although only a fraction of those values have been assigned so far.

The Windows API you'll probably need is Raw Input. Unfortunately, this is not an interface for the programming illiterate.

MSalters
+2  A: 

I can offer some helpful links.

The scales use the "HID point of sale" USB spec, a link to which can be found in the comments section of the blog post I mention below. I'd link direct, but the spam prevention mechanism prevents me.

There's a blog post on addressing the 25lb version of the scale from C#, here: http://nicholas.piasecki.name/blog/2008/11/reading-a-stamps-com-usb-scale-from-c-sharp/

The comments on that post are helpful - that's where you find the USB spec, there's also a comment showing how to get at the data without using the full HID library.

Good luck with your project!

Thorsten
A: 

For USB devices not supported directly by the O/S, you either need to be a programmer, or you need a program supplied by the device vendor. In this case, as it sounds like you're not a programmer, you should contact the manufacturer to see if they can provide any diagnostic or testware programs that could be used to read and capture the scale data. If you're lucky, such a program can be "batched" and it's output redirected, or something like that. Good luck.

Bob
A: 

Thanks for the details Bob. Are there any scales you can recommend that have a max weight around 50 pound? I need something that is directly supported by the O/S. I want to be able insert a weight value into a web based form.

jeff
A: 

Elane sells a line of USB HID scales and also has a Windows program to read the weight. Unfortunately, because of Stamps.com, that program is no longer free. At $15.50, it's not necessarily something I'd want to blindly try, but here it is: http://www.elane.net/index.php?go=USB_pcsoftware

erjiang