Have had my encoder setup working for a couple of weeks now and very happy with it. Can set the target angle by pressing a button and have a light on it that comes on as soon as the target angle is passed.
Many thanks to MackkyBrown and RoughCreations for helping me putting this together. Their ongoing advice through what turned out to be a marathon thread “Faceting machine head assembly” was invaluable. It took me seven months in total from start to finish, working on it an average of about 15-20 hours per week, nearly all of it looking at YouTube vids on programming and wiring up the components. The basic code for this already exists, written by Tom Herbst which can be downloaded from his website
www.facetingbook.com. In his book Amateur Gemstone Faceting volume two, he dedicated 24 pages to fitting an encoder to a faceting machine. This is the code I used, but its way out of date and trying to modify it to suit the newer electronics without understanding the basics of programming can’t be done. Also, he has a lot of code in there for his depth of cut indicator and buzzer, which I want to change to a simple light indicator.
I thought I could help those who wanted to have a go at fitting one, by pointing out which are the best YouTube vids for beginners and what I found to be the most suitable components.
Good YouTube vids.
Paul McWhorter has 36 vids on Arduino programming for beginners. My best choice to get started, though a bit of unnecessary banter in them.
Arduino Tutorial for Beginners. A series of vids on the subject.
Rachel De Barros has a couple of good vids, a bit more advanced and more banter.
There are heaps more to look at.
Apart from the encoder, the other main components I used are being used by the people in the vids. That’s a simple LED screen and a 32 pin DUINO board with an ESP32 processor on it, that board is near identical to the ones used by people in the vids. This makes following their wiring instructions a piece of cake. Excluding the encoder the above components, plus the required lights, buttons, wiring etc. would come to about $100
Don’t start off with a TFT touch screen, wait till you know what you’re doing with this stuff first.
My encoder is an Avago Technologies AEDM-5810-Z12 5000cpr encoder with a 6mm hollow shaft. That gives 20,000 positions through 360deg, which means it has an accuracy of 0.018deg per step.
Another bit of useful info is a PDF file called Arduino programming notebook by Brian W Evans. It describes what all the different commands mean and how they are used.
I joined Facebook forums and Arduino programming forums with mixed results. I would suggest you get past the total beginner stage before using them. Otherwise, you won’t have a clue what they’re on about.