cheap easy way to measure rotation of a platform? - Page 1
Forum section: electronics / projects

author: CopperCone
author_rank: Super Contributor
timestamp: September 17, 2017, 09:48:06 am
content: I wanted to put a platform that rotates some where, and have some kind of display that tells me the angle its at.Is there some kind of easy existing (and cheap, the platform will be home made) project for this?. The accuracy does not need to be great, maybe only 5%. I don't see an easy solution, everything I can think of involves gear and slop error... can't exactly make gears at home easily, would need to order brass etc.I would prefer some kind of analog solution, with an analog signal proportional to rotation angle, that resets when it gets to 360. This way I can make a scaling network out of op-amps and use a multimeter as a display.Also, I can do a 1-1 ratio accurately (i will be cutting the platters with a hole saw out of wood), the size is not a problemI may just use a camera and a feed to visually ascertain the rotation angle (I have all these things).Also, I have two identical hard drive motors. If its possible so that they mimic each others position some how ( i think I saw something like this in an old military system), I could put one up on the wall with a disk on it to show me the rotation (this would be even better and simpler). I forget how they linked magnetic encoders together, if they were special some how, etc. Really don't give a hoot about how I get the information, so long I can decode it. I have considered using a long stick with a handle like a periscope too (though unappealing).

author: Benta
author_rank: Super Contributor
timestamp: September 17, 2017, 10:50:54 am
content: Put a track with 5- or 6-bit Grey code on the underside of the platform and read it with reflective optical sensors. That'll give you a resolution of 1/32 or 1/64.

author: tooki
author_rank: Super Contributor
timestamp: September 17, 2017, 10:57:34 am
content: Or what about using analog optical sensing, with either a gray gradient, or a black ramp, in either case, read with a reflective optocoupler?

author: tautech
author_rank: Super Contributor
timestamp: September 17, 2017, 11:12:31 am
content: CC, it's called a rotary table or dividing head. If you have stepper motors you can cobble them onto something like this for precise adjustment.https://www.aliexpress.com/item/CSS-Home-Stainless-Steel-Round-Base-Wall-Mounting-Door-Stopper-Holder/32597769591.html?spm=2114.search0104.3.168.WXbL35&ws_ab_test=searchweb0_0,searchweb201602_1_10152_10065_10151_10068_10344_10342_10343_10340_10341_10307_10137_10060_10155_10154_10056_10055_10054_10059_100031_10099_10338_10339_10103_10102_440_10052_10053_10142_10107_10050_10051_10326_10084_10083_10080_10082_10081_10110_10175_10111_10112_10113_10114_143_10312_10313_10314_10078_10079_10073,searchweb201603_11,ppcSwitch_5&btsid=aa391694-c17f-465c-87cb-2094d7d9df06&algo_expid=976cb595-cd1b-4f8b-9f98-1348657eae7f-22&algo_pvid=976cb595-cd1b-4f8b-9f98-1348657eae7f

author: Benta
author_rank: Super Contributor
timestamp: September 17, 2017, 11:35:24 am
content: Quote from: tooki on September 17, 2017, 10:57:34 amNice idea, but compensating for ambient light would be a nightmare.

author: SeanB
author_rank: Super Contributor
timestamp: September 17, 2017, 11:47:11 am
content: 360 degree potentiometer, like used in RC servos as feedback, or if you only have a limited range of rotation how about a regular 270 degree pot as a potential divider. Otherwise a shaft encoder with index pulse to give an absolute reset point, and use an up/down counter to measure the rotation around the axis. This can be implemented as 3 LED reflective sensors and a suitable white and black checkerboard on the turning part.As to the HDD motors, that will work if you want to transmit speed information, using a syncro transmission, but it does not work well at low speed as the magnetic field change will not be enough to overcome friction in the bearings, plus the slow rate will induce a low voltage. There you need to have a wound rotor that is excited with AC, so that the 3 phases transmit a voltage phase and amplitude proportional to angular displacement to the receiving endm it will only wokr with permanent magnet as speed transmission otherwise.

author: brucehoult
author_rank: Super Contributor
timestamp: September 17, 2017, 01:18:30 pm
content: Quote from: Benta on September 17, 2017, 11:35:24 amWhy? Is it likely to be extreme?A laser-printed Gray-coded ring is dead easy and cheap to make, and accurate. Laminated, if it will be in the elements.You could calibrate by pointing an extra sensor at a known white or known black area. Or, you could use a modified Gray code that doesn't have all-0s and all-1s codes, so you can calibrate the sensors against each other.A quick Google search doesn't find anything about this idea, but I just made something up myself. Here's a 3 bit Gray code without 000 or 111:001 011 010 110 100 101From there, you can construct codes with more bits by the usual technique: reverse the sequence, append it to the original, and add a 0 to all the elements of one half and a 1 to all the elements of the other half. i.e. for 4 bits:0001 0011 0010 0110 0100 0101 1101 1100 1110 1010 1011 1001This construction will always give 3/4 * N^2 codes for an N bit code (instead of the usual 2^N). There may be another construction that would allow you to use 0111 and 1000 as well, which are not used in the above code, but it will probably be more complex.

author: Assafl
author_rank: Frequent Contributor
timestamp: September 17, 2017, 01:34:45 pm
content: You could pilfer an encoder disk and the respective slot sensor from a discarded inkjet printer. They work well even under ambient lighting condition...

author: Benta
author_rank: Super Contributor
timestamp: September 17, 2017, 01:37:18 pm
content: Quote from: brucehoult on September 17, 2017, 01:18:30 pmIf you'd bother to read the thread, you'll see that a Grey-coded ring is exactly what I proposed. My comment was on a suggestion to use an analoggray gradientscale, which is something completely different.Note the difference between "Grey" and "gray".

author: Benta
author_rank: Super Contributor
timestamp: September 17, 2017, 01:42:59 pm
content: Quote from: Assafl on September 17, 2017, 01:34:45 pmYeah, but those only give pulse signals, no absolute position. So you'd have to bring the platform to a known position and count from there. And if the platform goes back and forth, your signal would be gibberish. Even a quadrature encoder does not handle that situation well.

author: Assafl
author_rank: Frequent Contributor
timestamp: September 17, 2017, 01:59:07 pm
content: Quote from: Benta on September 17, 2017, 01:42:59 pmYup - I thought he controlled the rotation with the motors but reread it and he wants the motors to act like 3 phase Selsyns. BTW - Selsyn's would work but they are difficult to find cheap (and need a supply)...

author: brucehoult
author_rank: Super Contributor
timestamp: September 17, 2017, 02:01:33 pm
content: Quote from: Benta on September 17, 2017, 01:37:18 pmI think you'll find the name of the gentleman who invented the one-bit-changes-at-a-time code was Frank Gray.

author: Benta
author_rank: Super Contributor
timestamp: September 17, 2017, 02:07:53 pm
content: Meh.

author: Richard Crowley
author_rank: Super Contributor
timestamp: September 17, 2017, 02:23:19 pm
content: http://www.dgkelectronics.com/inkscape-optical-rotary-encoder-disc-generator-added-gray-encoder-support/

author: EmmanuelFaure
author_rank: Regular Contributor
timestamp: September 17, 2017, 07:49:57 pm
content: Magnetometer. Nowadays they're available for a bargain, and they requiere no additional hardware.

author: Fungus
author_rank: Super Contributor
timestamp: September 17, 2017, 07:54:27 pm
content: Quote from: EmmanuelFaure on September 17, 2017, 07:49:57 pmYep. Just glue one anywhere on the turntable and take a reading from the vertical axis.So long as there's no huge spinning magnets near it, it should work.nb. They're a bit jumpy so you'll need to average multiple readings.

author: bson
author_rank: Unknown
timestamp: September 17, 2017, 08:13:36 pm
content: The gray code strip and two sensors 90 degrees (half a period) apart and you get a quadrature encoded signal. Benefit: super simple. Drawbacks: requires illumination and light sensors tend to require regular realignment. Great for prototyping with sheet metal or aluminum.If the diameter is large enough you can attach a gear belt inside out and couple it with a suitable gear to a shafted optical quadrature encoder. Can also be manufactured with teeth (no belt needed) and a rock solid encoder mount slot.You can also run a friction belt drive shaft-to-encoder shaft. Simple but prone to slipping when worn.

author: CopperCone
author_rank: Super Contributor
timestamp: September 17, 2017, 08:32:52 pm
content: I like seanB's idea the best, it can be decoded very easily, even using a cheap multimeter. for some reason I totally forgot about potentiometers. If they have wire versions that don't ware then I'm in.I did not want to code anything...The grey-code strips are also interesting, but I think my base diameter would be longer then one printer paper, so I would need to go to some place with a super printer to print it. It reminds me of what a digital caliper does. I can see it having problems at the interface, maybe.

author: Benta
author_rank: Super Contributor
timestamp: September 17, 2017, 08:33:20 pm
content: QuoteOK, intriguing concept.What's the advantage of a Gray-coded output AND a quadrature output?The Gray-code strip will give you 5- or 6-bit (or more) static parallel logic outputs. What more is needed for position detection?I'm not trying to put this concept down, but more interested in the additional benefits.

author: Benta
author_rank: Super Contributor
timestamp: September 17, 2017, 08:39:20 pm
content: Quote from: CopperCone on September 17, 2017, 08:32:52 pmIf you can find a 360-degree pot, go for it. Nice and simple solution.Concerning the Gray-code strips: no problem. With your limited demand for resolution, glue them together from two or more pieces.

author: CopperCone
author_rank: Super Contributor
timestamp: September 17, 2017, 09:04:11 pm
content: got a nice 360 degree potentiometer from ebay. I will put it into a scaling circuit so that a harbor freight 5$ multi meter will read from 0-3.6 volts. I found one of the meters to be accurate to the 0.01 count (+- ~1 count most of the time, so one degree)Much nicer then having to program or decode binary in my head.A little bit pricey (25$ total + 4 wire shielded cable), but so much better then trying to figure out why encoders are being funny, counting backwards, micro controller issues, etc. It looks like the microcontroller solution would be like, 3$ for the screen, 3$ for the MCU, 3-10$ for the encoder off ebay, and chassis work (plus coding).Hopefully I can fit the scaling circuit and its power supply inside of the multimeter battery compartment.

author: zeqing
author_rank: Regular Contributor
timestamp: September 21, 2017, 03:34:37 am
content: Quote from: tooki on September 17, 2017, 10:57:34 am+1, once measured a DC motor rotary speed upto 10 K/minite with the reflective optocoupler.... just add or write a black line on white paper, and makes the paper rotate with the platform.

author: Mechatrommer
author_rank: Super Contributor
timestamp: September 21, 2017, 05:18:44 am
content: gray code you need 7 bit if you need 5 degree and more accuracy. 6 bit only give you 360/64 = 5.6 degree if you can live with that, but graycode is digital solution. from what you described, 360 degree potentiometer (just like a modded servo motor) will be opamp (analog) friendly...

author: Jeroen3
author_rank: Super Contributor
timestamp: September 21, 2017, 06:20:20 am
content: Quote from: CopperCone on September 17, 2017, 09:48:06 amContinous mechanical rotation potentiometers.

author: Leo Bodnar
author_rank: Frequent Contributor
timestamp: September 21, 2017, 05:53:26 pm
content: Quote from: CopperCone on September 17, 2017, 09:04:11 pm4 wires? You might have a bought a sin/cos output potentiometer. No big deal but still needs decoding.Leo