Low Resolution Contactless Rotation Sensor

Hi Everyone,

I’m thinking about making a toy which will have several removable dials indicating direction, from these dials I need to read which direction the arrow on the dial is facing, out of 8 (maybe 16) direction, as well as if the dial is actually in the toy.

The dial will be round, fitting into a recess in the main part of the toy, and will snap to the nearest key direction, with a magnet most likely.

Speed is not an issue as the position will only be read once the operator has pressed a ‘go’ button.

There are plenty of Hall effect chips that can do what I need, though I require an array of 16-20 dials, which at around $6.00AUD ea adds up fast.

I am happy to use multiple digital Hall effect sensors in an absolute encoder type set up, or even pogo-pins, though the total cost per dial will need to be under around $2.00AUD.
Magnets/contacts on the dial is fine.

I know Google Project Bloks used a capacitive sensor in some way, though don’t know exactly how, but it is a similar problem: https://projectbloks.withgoogle.com/

The simpler the better, though I am willing to sacrifice some simplicity to reduce cost.
Any feedback or insights would be very much appreciated. Thanks!

Reed switches might be a possibility. Certainly cheap enough and easy to use.

Yes, reed switches would be ok, my concern would be alignment. Do they come in a LED type package or something, where an up/down operational orientation is guaranteed?

Switch operation is controlled by proximity to the magnet. I have no idea what you mean by up/down orientation. Your original description would benefit from a basic sketch of the concept.

Agreed regarding the image, I had tried, but uploading failed.
I’ll try again.

Regarding the reed switches, if I am understanding correctly, they are a small pill shaped glass vial with two metal plates inside, upon exposure to a magnetic field, one flexes making contact with the other. This is dependant on the orientation of the internal wires. Each would need to be positioned so that they operate when a magnet is above them, if one was twisted along its axis by 90°, it would no longer operate as intended.

With such a large number of switches, I would be concerned about insuring alignment of each sensor.

Untitled_Artwork.pdf (196 KB)

Generic reed switches do not require any rotational orientation in order to operate, only proximity of the contacts to a magnetic field for switch closure. There are relatively small surface mount devices with molded packages in addition to the typical hermetic glass tube versions. Tons of variations available, 1400 entries in the DigiKey parametric search.

https://www.digikey.com/products/en/switches/magnetic-reed-switches/193?k=Reed%20switches

Depending on durability, you may look at hex rotary switches.
You make your disks to key into the centre ‘knob’ of the switch rotor.
Low cost, 16 positions, 4-bits do it all.

https://www.google.com/search?q=hex+rotary+switch&rlz=1C9BKJA_enAU768AU768&hl=en-GB&prmd=isvn&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjOi7r86qbiAhUP8XMBHejtCfgQ_AUoAXoECA0QAQ&biw=768&bih=911&dpr=2

WattsThat:
Thankyou for pointing that out, I had no idea! This is most certainly an option. Thanks!

lastchancename:
I didn’t think of that either. This would add some difficulty to putting a dial on the toy, as it would require alignment. But it is a neat solution in terms of the sensing. I’ll keep this in mind. Thanks!

Could you use a magnetic encoder like the as5030 in the toy and have a suitable magnet on the removable dial knob.

...or, a super low cost rotary encoder + one reed switch.
When you place the disc with one magnet, make one turn max to locate the index reference, then track movement with the encoder.
2 reed switches = max half turn, 3=1/3, 4=1/4 etc.

Swap reed switches for Hall effect, then you can use/skip the magnet on the disk.
Slots on the disk can act as shunts to a fixed static magnet..?

Lansteys:
I’m thinking about making a toy which will have several removable dials indicating direction, from these dials I need to read which direction the arrow on the dial is facing, out of 8 (maybe 16) direction, as well as if the dial is actually in the toy.

That sounds like you need some form of absolute position detection which does not seem to have been discussed in any of the comments so far.

Suppose someone removes a dial when it's facing north and replaces it facing west - how is that to be detected?

If you just want a contactless way of detecting pulses when something rotates a reflective optical sensor (such as a QRE1113) would be a simple solution.

...R

Hi- that’s what I was leading to in reply #9
Adding a continuous rotation method of encoding, and some form of index to get the known positions.
Or of course, add parts to make a complete 4-bit encoder out of the disc.

Thanks everyone for taking the time to help!

The AS5030 is unfortunately a bit out of reach cost-wise. Ultimately this may become an open source design, so affordability is key. It does do what I need though.

Also, yes it needs to be absolute, without the need to ‘home’. In use, each dial would be set, then the toy activated, at which point each dial is read sequentially, informing the action of the toy.

I am wondering if simple pogo-pins in the configuration attached would be the cheapest option? Basically with a centre pin for power, and 4 ‘sensor’ pins at the quadrants, so at positions 1,3,5 and 7. The dial would have a pcb base and have connections from the centre (for power) to the 1,4 and 6 positions when pointing to position 1.
I think this gives a unique output for each position, with 5 pogo-pins per disc (about $1.50 cost per dial)
In the image, the blue overlay is the tracks of the rotatable dial, the rest forms the base.

A set of reflective optical sensor could be used in the same configuration, to the same effect.

Connection Example.pdf (198 KB)

That’s exactly what you can do.
A 4-bit encoder.

Suggest to Use 0V as the switched pole rather than 5V. Your power supply isn’t exposed to the elements.

As you know, there are several switch technologies possible.
Mechanical is probably the least attractive in an exposed mechanism like this.
Maybe reflective, magnetic etc with no moving part than the disk.

A BCD or Gray code on the disks so that gives you the unique position.?
Add an extra bit to identify which disk is loaded...

If the reed switch option still works you could wire them up in concert with resistors to analog pins. Any switch made by the single magnet in the key gives a non-default value (+5V?) which takes care of presence sensing and analog read finds switch number is made.

.02

Just a note...
From your image, it suggests you may have a 3D printer.
If so, as long as you constrain the outer ‘box’ of the switch mechanism, there’s no reason you can’t experiment with a range of options on the inside.

Lastchancename:
Well deduced, that is a possibility. Currently I am thinking more of stacked laser cut sheets, but I can still modify the sensing component to some degree.
One of the purposes for asking here was to make sure I wasn’t missing the perfect cheap solution, or some completely different option I had overlooked.

You are also correct about a non mechanical solution, this would be best cost permitting. I like the IR reflector idea in a similar setup. One concern would be when a dial isn’t loaded, will the sensors trigger under sunlight?

Dougp:
I could use an analog pin with a series of resistors. The sensors will be set up in a matrix, as there is a 4 x 5/6 grid of dials, which would otherwise be a lot of pins used, having the input side analog is an option though.

A - it’s a toy you should never put magnets in the disc.

Looking at your concept art and what I think you want to achieve, I would place maybe two low strength magnets in the base of the toy around the rim and install small iron sections around perimeter of the disc so that when inserted into the whole as it turns the magnets will pull on the metal in the disc giving your index points.

Then to really keep things cheap, I would use multiple phototransitors in a circle that gets covered by the disc and by building the disc with light guides, you could send a source light into disc, and read which phototransistors received light. Maybe have two rings of phototransistors, one to decode which disc is installed and the others to determine orientation.

As I noted in an earlier reply - the cheapest, techie way of doing this in my mind is Hall Effect switches.

Whether they're arrayed radially around the circle, or as a bar detecting radial bit patterns on the disk.
No magnet required on the disk. Disk should be larger than child's mouth!

Use the hall/disk combination to 'shunt' the magnetic fields - not as direct magnet-present 1:1 pairs.

There are several types of hall switch that can be applied - read more on Allegro's website.
Allegro 1
Allegro 2
Allegro 3

Thanks Slumpert, and good point. I’ll have to read up on the requirements. The dials will be around 40mm and the magnets could be sandwiched between layers, effectively being on the inside of the dial. I don’t know if that makes a difference.

I like the phototransitors idea though! I wanted to have LEDs that show the dials being read sequentially, this led could double as the light source for the phototransitors if I can shield them from sunlight still. That way the dials contain no electronics/connections/magnets, it’s just their geometry that informs the sensors...

lastchancename:
I’ll take a look at those sensors, but basically you are thinking magnets in the base, with some metal plate/s on the dials that bend the field to influence the sensors, also on the base?