collapse

Author Topic: Magnetic Encoders  (Read 1142 times)

RoughCreations

  • Administrator
  • ALF'er Platinum
  • *****
  • Posts: 409
    • Rough Creations homepage
Magnetic Encoders
« on: January 06, 2025, 09:53:54 AM »
I have recently had two new members contact me privately about fitting a magnetic encoder to a faceting machine. I am hoping by starting a thread on this topic that we can spur some discussion happening as it is clear the members have put a lot of research in already. I don't know much about the topic personally, but it appears to me that it may now be possible to buy these types of encoders at an affordable price, and their specifications have improved to the point such that they may be able to be used successfully for fitment to a faceting machine.
Apparently, 15 bit magnetic encoders may be the minimum in practice. The OSRAM  AS5048A is only 14 bit and not quite suitable for fitting to a faceting machine.
Some more suitable contenders may be:
  • The Infineon TLE5012BE1000 magnetic encoder - represents 32,768 steps per revolution (15 bit), 0.010986328125 value per step, 0.01 degree resolution.
  • The Broadcom AEAT-6600-T16 which is a 16 bit chip with a resolution of 0.00549º = 65,536 positions per revolution
It is theoretically possible to mount a small diametrically magnetised magnet to, say, a facetron in the rotating position where I have a 6mm shaft glued, and an optical encoder attached. A small board with a magnetic encoder would be mounted just above it in a suitable enclosure.
I have heard that the new owners of Facetron are working on a retro-fitting solution for Facetron machines that will allow a digital readout, I have no idea what sort of encoders (if at all) they will employ.

RC

« Last Edit: January 06, 2025, 10:48:19 AM by RoughCreations »
Rough Creations - Beauty from rough beginnings

Faceting Frank

  • Global Moderator
  • ALF'er VIP
  • *****
  • Posts: 583
Re: Magnetic Encoders
« Reply #1 on: January 06, 2025, 04:32:43 PM »
Looks very impressive and could be a lot easier to fit than the optical encoders.

MakkyBrown

  • Administrator
  • ALF'er VIP
  • *****
  • Posts: 1813
    • Andrew Brown Faceting Designs
Re: Magnetic Encoders
« Reply #2 on: January 07, 2025, 07:24:09 PM »
https://au.mouser.com/ProductDetail/Infineon-Technologies/TLE5012BE1000MS2GOTOBO1?qs=byeeYqUIh0PoEVI6GN3gFQ%3D%3D

It uses hall effect, I wonder if there could be issues when it is stationary. I will have to do more reading.
« Last Edit: January 07, 2025, 09:19:54 PM by MakkyBrown »


Nerb

  • ALF'er Bronze Member
  • *
  • Posts: 5
Re: Magnetic Encoders
« Reply #4 on: January 08, 2025, 12:30:32 AM »
That is their little project board. The TLE5012BE1000 is not to hard to solder compared to other smd parts like resistors so I picked up a couple of them and soldered one to a SOP8 to DIP8 SMD Adapter PCB so it could plug into breadboards.  That way I can experiment The gotcha with them same as the Broadcom part is they default to a lower resolution.

The magnets were actually harder to find than the chips. They are disc magnets with the poles on the sides instead of top and bottom. Diametrically magnetized disc magnets. You need very good alignment of the magnet over the Infineon chip so the sensor signal does not vary in strength.  While I have not tried it yet the people I am working with say the Broadcom AEAT-6600-T16 is a bit more forgiving and has alignment routines you can use. It also has a higher resolution. I bought one and am waiting on the adapter pcb for it to arrive.

Testing showed the Infineon part so far to be accurate and repeatable. I build a concrete block mount in the garage for it with a laser and aimed it across the street at the neighbors house. ( house is vacant ) Once the magnet alignment issue was resolved it could be aimed at points on the wall and give the same readings.
« Last Edit: January 08, 2025, 02:18:49 AM by Nerb »

Konstantin Rudloff

  • Newbie
  • *
  • Posts: 1
Re: Magnetic Encoders
« Reply #5 on: January 08, 2025, 08:14:33 AM »
Hello everyone, my name is Konstantin and i wanted to share the progress i made with a magnetic encoder in the last month. Ive been cutting on a Facetron for the past two years, bit i always felt like the dial indicator wasnt as precise as i wanted my machine to be. So I bought a second one and started fitting a magnetic encoder to it.

Im using the following parts:
AS5600 magnetic encoder
Arduino Uno
ArduinoIDE (for programming the Arduino)
Processing (for visualization)
A windows Pc and screen
Diamtrically magnetised ring magnet
Jumper wires

So far I managed to connect the AS5600 to the Arduino and wrote a code using chatGPT to read the values.
Than i wrote a Processing Code to visualize the values. I can type in the target angle. The half circle shows a range of -8 to +8 degrees around the target angle and a needle indicates the current distance to the target. When the target angle is reached, the red light turns green and a beep sound will ring out.

Im planning to fit the encoder to the back of the Facetron by milling a custom backplate. The magnet will be glued to the shaft. I turned a part on the lathe to mount the magnet right in the center.

RC was worried about the precision and its safe to say that this method with a 14bit encoder will be less accurate than an optical encoder. Im expecting an angle precision of about 0.1 degrees, which i guess is enough for me. My main goal is to have a repeatability that enables me to cut a whole tear without checking the stone. Im not really into competition cutting and my main goal is to produce high quality stones for our goldsmith shop and for other german goldsmiths.

What do you guys think about my plan and visualization?
Feedback and discussion is really appreciated!

So far i didnt figure out how to post videos and pictures, ill add some when i get it!
Greeting, Konstantin


Nerb

  • ALF'er Bronze Member
  • *
  • Posts: 5
Re: Magnetic Encoders
« Reply #6 on: January 08, 2025, 10:54:44 AM »
Did you consider the Infinion TLE5012BE1000? It is twice the resolution so would give you 0.01.
Code wise it is similar to the AS5600 with an available Arduino library and easy to wire.
I started with the AS5048A. Found it did not do what I wanted so started trying different ideas.

There is also the Broadcom AEAT-6600-T16 which is 16 bit so could do .005° = 65 536 positions per revolution. A group that is working on telescope control is trying that one. Only problem is not a lot of programming data available so they are having to work out the code. I bought one to try. The TLE5012 chips have a 15 bit representation of absolute angle value on the output (resolution of 0.01°).
Suspect that is plenty and probably will stick to that for anything I do try since I can access an arduino library to help. Facetron is developing their own so I am waiting to see what they come up with  while I work on the idea of making the big 3d printer closed loop with the Infineon chips.
« Last Edit: January 08, 2025, 12:48:58 PM by Nerb »

MakkyBrown

  • Administrator
  • ALF'er VIP
  • *****
  • Posts: 1813
    • Andrew Brown Faceting Designs
Re: Magnetic Encoders
« Reply #7 on: January 09, 2025, 03:09:47 PM »
Looking forward to seeing how you go with these encoders as they are a LOT cheaper option than optical encoders.  beers

MakkyBrown

  • Administrator
  • ALF'er VIP
  • *****
  • Posts: 1813
    • Andrew Brown Faceting Designs
Re: Magnetic Encoders
« Reply #8 on: January 09, 2025, 03:16:38 PM »
Also a big welcome to both Konstantin Rudloff and Nerb.  beers   I have a 10000cpr optical encoder I purchase from USDigital some time ago, I'll have to get that going as a comparison.  It has 0.009 degree steps. I will wait to see how you both go before purchasing a magnetic one to try/compare).

Cheers
MB

RoughCreations

  • Administrator
  • ALF'er Platinum
  • *****
  • Posts: 409
    • Rough Creations homepage
Re: Magnetic Encoders
« Reply #9 on: January 09, 2025, 04:20:23 PM »
So far i didnt figure out how to post videos and pictures, ill add some when i get it!
Greeting, Konstantin
Hi Konstantin,
thanks for all the info regarding your project. Here is some info regarding how to use the Gallery. You can just upload to the 'Public' Gallery or your own Gallery. Then the links that you can insert into your message are shown:
https://aussielapidaryforum.com/forum/index.php?topic=3316.0
RC
Rough Creations - Beauty from rough beginnings

Nerb

  • ALF'er Bronze Member
  • *
  • Posts: 5
Re: Magnetic Encoders
« Reply #10 on: February 08, 2025, 01:50:39 PM »
Paused my project when I was told Facetron was going to shortly release their own electronic display.
I'm back to working on mine. Was using a Wemos mini D1 ESP32 with a .96 display and decided it needs a bigger display.
Bought a WT32-SC01 a few years ago and shelved it due to lack of info on how to pgm it at the time.  These are a 3.5 inch 320x480 Capacitive Touch Screen LCD Display with an ESP32 and now enough info out there on them to do something. Test program was send to it and appears to be working after a few rewrites. I built a laser protractor and am using the neighbor across the roads house wall as a target. My measurements are repeatable and accurate.

Still working on display flutter and when solved will look at the code in Tom Herbst book for features I might be able to use. As well as enabling the touch feature.
Added an averaging function with it set to ten reads and might need another method like timed reads to stop the constant up and down of the hundredth scale if there is slight movement. I do not display that right now only the tenths and noticed the hundredths were very active with the slight vibrations of walking on the concrete floor. So the faceting machine probably will be even worse.

Now to design the circuit board and holder for the encoder on the machine.
« Last Edit: February 08, 2025, 02:00:58 PM by Nerb »

Faceting Frank

  • Global Moderator
  • ALF'er VIP
  • *****
  • Posts: 583
Re: Magnetic Encoders
« Reply #11 on: February 08, 2025, 10:22:28 PM »
 A very interesting thread for sure, I never knew they were such things as magnetic encoders.
I’m a total newbie with this programming and electronic stuff, but not with making faceting machines. If you apply any pressure to the facet onto the lap any play or flex will go backward, through the quill, quill support to the mast. The encoder is roughly midway between the stone and the mast, so it will be affected by that pressure, So, will sweeping the stone from side to side across the lap.
You mention putting an averaging function in the code Nerd, your right with it being a must have feature. RoughCreations pointed that out to me a while back when I was working on my encoder setup, something on my to do list.
I don’t have a problem with screen flutter because I have it running on a 100ms delay and use a light as a stop.

Nerb

  • ALF'er Bronze Member
  • *
  • Posts: 5
Re: Magnetic Encoders
« Reply #12 on: February 08, 2025, 11:10:43 PM »
I take it the 100 ms delay is what I am thinking of as timed reads. Like taking readings every 100ms?  Wonder if I could do something like take a reading every 50ms and average 10 of them for a 1/2 seconds delay. Will have to give that a try next week. Going to be heading out for the weekend.

Faceting Frank

  • Global Moderator
  • ALF'er VIP
  • *****
  • Posts: 583
Re: Magnetic Encoders
« Reply #13 on: February 08, 2025, 11:28:04 PM »
Tom Herbst has a 100 millis() delay in the loop, that is altered on line 52 of his code, which is the basis of my code. So, the display only prints every 100ms and the encoder only reads every 100ms. Ok for the screen no good for the encoder. I was thinking of having the encoder read ever 10ms and average it over 10 readings, much the same as you are thinking of doing.

MakkyBrown

  • Administrator
  • ALF'er VIP
  • *****
  • Posts: 1813
    • Andrew Brown Faceting Designs
Re: Magnetic Encoders
« Reply #14 on: February 09, 2025, 02:34:20 PM »
I don't think I am running any delays. I hate delays, average if you have to but best to avoid delays in your main loop. I'd only use one after a digital read on a button. Same as serial prints, comment them out in your final version as they will slow the main loop.Use timers instead of delays. 100ms is a huge delay. Use a timer to adjust the screen refresh rate [Edit : if you have to] but keep your main loop running full speed.
MB
« Last Edit: February 09, 2025, 02:38:33 PM by MakkyBrown »

 

Recent Activities

Recently cut gems (AB Facet Designs) by mehoose
[Today at 03:40:59 PM]


Magnetic Encoders by MakkyBrown
[Today at 01:18:03 PM]


rock or stone by Jimnyjerry
[February 08, 2025, 02:07:53 PM]


Hi Back again by Butts
[February 03, 2025, 02:51:19 PM]


Pendant findings by Faceting Frank
[February 01, 2025, 09:54:45 AM]


Castlemaine Victoria by Rusted
[January 29, 2025, 09:43:25 AM]


Faceting machine encoder by RoughCreations
[January 24, 2025, 10:57:36 AM]


Good vs Bad cutting by RoughCreations
[January 21, 2025, 09:52:33 PM]


Save the Gemfields. by pc bowe
[January 21, 2025, 06:48:25 AM]


Question re tumbling with 80 grit for more than one week by Rock gal
[January 21, 2025, 12:39:30 AM]


Tooraweenah opal by ann3244
[January 19, 2025, 05:34:50 PM]


Cutting Oregon Sunstones: A Step-by-Step Guide by Azard_faza
[January 16, 2025, 08:37:53 PM]


Tolmie / toombullup by swirly
[January 16, 2025, 03:09:28 PM]


Mount Eliza quarry Mornington Peninsula by RufusD
[January 15, 2025, 10:29:11 PM]


Tumbled and polished Chinchilla petrified wood by MakkyBrown
[January 12, 2025, 01:36:23 PM]

SimplePortal 2.3.7 © 2008-2025, SimplePortal