loading
 
Roborealm to read an analog meter
Steve Ciciora from United States  [1 posts]
14 year
STeven,
  It was great talking with you at the MiniMaker Fair yesterday!  Here are some sample images you asked for.  As a refresher, I had asked about using Roborealm to read an analog meter on a type of instrument I need to calibrate.  How I envision the procedure is as follows: First I would set up a web cam in front of the meter, then I would apply my resistors to be measured so that I get a zero reading and a full scale reading.  I've not explored how to interface Roborealm with LabVIEW but ultimately a LabVIEW program will be automating the procedure.  After I get meter angles for 'zero' and 'full scale' I will then apply different resistances and then I would like RoboRealm to return the angle of the needle on the meter.  It can be in pretty much whatever units are easy.

I'm wondering what would be a good approach?  maybe if the camera taking the images is fixed enough, would a good approach be to subtract the 'zero' image from the current 'reading' image to see what has changed?  Or look for the red needle on the black and white background?  

Attached are 4 images.  They all start with today's date (20100718) then a space, then a number proportional to the needle reading (0, 40, 60 and 100).  Unfortunately, the (cheap) web cam moved between images, but for the final setup I'll have it more rigidly mounted.  Another thing I learned; it is very likely I'll need a much better web cam!  I couldn't consistently get it to provide 640x480 resolution (the option wasn't there in the pull down box).

Thank you for your time,

- Steven Ciciora

    
Anonymous 14 year
Steve,

The LabVIEW RoboRealm integration works via the API. Have a look at the API page and download the examples which include how one can communicate from LabVIEW to RoboRealm. For simple variable results (like an angle) is it quite straightforward.

http://www.roborealm.com/help/API.php

For the reading of the analog meter, yes, doing a calibration of min and max measurements is probably a good way to ensure that the webcam position is not as relevant. Assuming the structure stays motionless between calibration and sensing that should be fine.

Seems that really the only thing that should not change is the horizontal orientation of the webcam to the meter. If you shift the meter/cam from side to side that's not too bad as along as the meter hand shows in the image. Rotating the meter/cam would be and issue since your angles would then no longer be calibrated with respect to the min/max measurements.

Attached below is a robofile that shows how to isolate just the meter hand using the hough transform that looks for straight lines. Note that the angle filter in that module is used to remove pure horizontal lines as they are assumed NOT to be part of the meter hand.

Have a look at this robofile and see if it works for you. Note that the final angle is store in a variable called mill_angle (name's not important ... you can change it in the calculate angle module).

Nice meeting you on Sat. It was a great show and we're all a little exhausted from it but very happy to have been a part of it! :-)

STeven.
program.robo
Anonymous 14 year
Oh, and you will need to download the most recent copy of RR as we just added in the angle filter into the hough module to make this extraction easier.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index