Тёмный

building a absolute position encoder from scratch 

365 Robots
Подписаться 1,5 тыс.
Просмотров 17 тыс.
50% 1

Опубликовано:

 

15 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 67   
@365robots
@365robots 11 месяцев назад
Go and check out the update implementing Gray code and copper-patch-based patterns in this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-O8CtjtqY2iI.htmlsi=OhyIqiVN8XmEPFhG
@Clark-Mills
@Clark-Mills Год назад
For the encoder disc use grey-code rather than binary. Maybe get the encoder disc cut from metal stock similar to how the solder paste mask sheets are made. Very good work, thanks! Keep it up.
@flo47able
@flo47able Год назад
A pcb with full copper player should do it. Probably cheaper if you order pcbs anyway.
@AndersJackson
@AndersJackson Год назад
​@@flo47ableI eould, as you say, go for PCB encoding plate. BUT seriously, Grey coding is the way to go. You really can not even theoretically construct detectors that manage all binary readings of for example 1111 - 0000 and also all other readings, like 0000 - 1111 where more then two bits change att the same time. Grey code is the proper engineering solution. But except for that, I don't see any obviously errors in the design.
@peepopalaber
@peepopalaber Год назад
Thin Metal-Sheets would deform with higher rpm, PCB's would delaminate. Industrial absolute rotary encoders are thick magnetised rings with precise hall-sensors or thick encoding wheels that are one sided etched and/or printed, that a black/white pattern result.
@qwerty3663
@qwerty3663 Год назад
Go with a Single Track Gray Code instead.
@Clark-Mills
@Clark-Mills Год назад
@@qwerty3663 Thank you, just looked it up and it's rather good! Excellent pointer, Cheers! :)
@JonnyDeRico
@JonnyDeRico Год назад
to increase signal to noise ratio, I would not have placed the leds in one line to each other - this is prone to interference on the receiving side. You could modulate the amplitude of the leds signals and only read the inputs on high amplitute. Doing this with phase offset for each led driving signal. If there are allways on - build some kind of mask / tunnel before the photo transistors to narrow their field of view. use a schmidt trigger on the receiving side. build a calibration routine... their are plenty of improvements :) But you will get there. Fill free to ask me :)
@365robots
@365robots Год назад
A lot of great suggestions! I will keep them in mind whilst debugging.
@AndersJackson
@AndersJackson Год назад
That is a great suggestion to solve the interfearence problem, and using Grey encoding of position. Nothing that is hard to do.
@Sekir80
@Sekir80 Год назад
@@365robots Gray code, Gray code, Gray code!
@idahobob
@idahobob Год назад
I've had problems with blocking IR LED's with opaque maaterials. Paint your encoder wheel black and see if the dark signal is stronger. On your next encoder, leave the copper on it to block all light, as well as use Grey Code which will double your resolution, as well as eliminate many other problems.
@Spacefish007
@Spacefish007 Год назад
why not just use a photodiode with a TIA? It works quite well. reverse bias the photodiode to use the diode in photoconductive mode, this increases response time. One way to increase the signal amplitude is to use a very high resistor for the feedback loop in the Op-Amp and apply an controllable offset-voltage at the positive terminal (potentiometer between GND and VCC). That way you can substract a fixed offset (ambient light) but still get the high gain / signal amplitude. Regarding the gray-code slot disk: Why not order it made from PCB-Stencil? It has way sharper edges/resolution in the slots and is thinner / does not as easily colide with other things. Just make a 95% circular slot arround the outline and leave 4 small bridges to cut it out of the stencil manually.
@365robots
@365robots Год назад
Offsetting the Ambient is a great suggestion. I was even thinking about including an additional diode to measure the ambient light and automatically adjust the offset voltage using a DAC.
@SojournerDidimus
@SojournerDidimus 6 месяцев назад
Using flip chips for the LEDs might allow for a completely flat surface on the LED and photodiode PCBs.
@DisorderedArray
@DisorderedArray Год назад
You could 3d print a thin disc that has fitting slots for the smd components on the pcb boards. It only has to be as thick as the largest z dimension of the smds, and could be glued to the pcb. It would stop the encoder disc rubbing on the pcb components, and if its printed in black filament, then it would help stop stray light. I use such thin 3d printed shields on my pcbs, as light guides or just for aesthetic reasons.
@GorgotMM
@GorgotMM Год назад
You should stagger the LEDs coverng the whole circumference to limit interference. It would also make construction easier. And as others have noted, use gray code.
@sleepib
@sleepib Год назад
Can get rid of a whole PCB by using reflecting vs absorbing segments and putting the LEDs on the same board as the phototransistors. Can just use a regular 2d printer to make those. If you don't want to use gray code, add another copy of the finest encoder ring, but offset it. You can use this signal to time the absolute reads so you don't get messed up by imperfect transitions, or you can just use those two finest channels as a quadrature encoder. Before going to an opamp, I'd try a BJT to amplify the signal.
@ОлександрВонорд
I made this technology but for Linear type encoder in my room. But I compensated for the interference by changing the brightness of the LEDs. IR light passes well through plastics. Use a different type of disk partition.
@365robots
@365robots Год назад
Thanks for your contribution! Noted the easy passage trough the FR4 as well. Will probably use copper traces to block the light on the next revision.
@SarahKchannel
@SarahKchannel Год назад
I built something similar, not an absolute position encoder - just an encoder. I ran into the same issue with the LED/Transistors. Your encoder disc should not be translucent, have not reflective edges etc.. so there is not spill of IR. Further I had to add a Schmitt-Trigger circuit to get the signal clean and digitized for the MCU to read.
@duncanmarks1590
@duncanmarks1590 10 месяцев назад
Hi, very good start and impressive assembly but as others have already said an optically solid disk may solve most of the signal to noise issues. also Grey code is designed specifically for this application. bye
@Vandy_fpv
@Vandy_fpv Год назад
Keep it up big dawg! Awesome stuff
@polkiipo
@polkiipo Год назад
Very interresting, I had a lot of surprise using phototransistor in the past. I'm curious about how you will handle this :)
@jr0th
@jr0th Год назад
Beside many good ideas from other comments, here's are my two cents: - as FR4 PCB is partially transparent to IR, you may design your disc without any cutouts, but using top and bottom copper layers to block the light, this will also help to not instantly rip the components off the board, - on your phototransistor, you most likely need a pulldown as the phototransistor is not totally cut-off, so the more your input impedance, the less the voltage difference, (probably adding some pulldown around 30k to 60k will quite surely make your current design usable), - you may need to reduce your emitter power: at the usual power, the IR will bounce off everything, making the detection harder than needed, or better, you may command each emitter individually to eliminate interference.
@artrock8175
@artrock8175 Год назад
Awesome project! Thanks for sharing! 🙏
@Kilohercas
@Kilohercas Год назад
Use higher power LED, as well as with lens on top to focus light more (narrow beam LED, it will give 10x more light). Also IR will be transmitter over FR4, you need to make it opaque for IR. Use black paint or stencil on your optical scale.
@adam207321
@adam207321 Год назад
avoid photo transistors they are slow to respond to light changes. Even if your cransconductance amplifier will work for detecting the small changes your finest most dense holes will be muffled together and the phototransistor just wont be able to keep up after a few kHz (assuming the number of holes the resolution, the speed of switching of the finest holes will be above a 100kHz. This requires SERIOUS processing power to say the least. Use photo diodes instead, with a transconductance amplifier with schmidt triggering. This will get you closest to what you need on a cheap scale. I can help you with the schematic and building the thing if you wish. I have myself considered a high speed photo measuring device for calibrating camera shutters where you measure the exposure time, essentially how long is the photodiode recieving light. My device would work up to 1/10000 of a second ( 10kHz) but that will not be fast enough for your encoder at 5k rpm. I would also consider a different solution for the photo interupting wheel. How about printing it on thin translucent foil with an ink jet? This would get you a thin and smooth surface against which rubbing is not such a huge problen (except maybe wear). Also at 5krpm the expansion might be too large so accound for that. Such thin PCB stuff does not appreciate such high forces and I am willing to bet this will become a high speed shrapnell hazard at 3k rpm. But there is a solution! Ever heard of SMT stencils? Yes those. You could have them made by JLCpcb and such. This would offer you a easy cheap way to make a precise and thin encoder wheel. Good luck man.
@365robots
@365robots Год назад
Thanks for the detailed response! Moving towards photodiodes is probably unavoidable at this point. Ideally I would still like to keep the PCB encoder wheel, just to keep the price down.
@adam207321
@adam207321 Год назад
@@365robots fair. Also you should have the wheel painted black and separate light paths for each photodiode to avoid crosstalk problems.
@conorstewart2214
@conorstewart2214 Год назад
How do you plan to use this? If you just attach it to the motor output shaft it won’t be much use as an absolute encoder as the motor will rotate it many times when moving from one end to the other, so there will be many points with the same encoder output, so it probably won’t be much more useful than just an off the shelf magnetic absolute encoder used like that or just a quadrature encoder. Even if that wasn’t an issue it looks like you only have an 8 bit encoder which means a maximum resolution of 1.4 degrees, which isn’t really small enough to deal with the 1.8 degree step angle of most stepper motors and definitely not if microstepping is used. If you plan on gearing the encoder off of the motor shaft so the encoder gives its linear position along the axis then your resolution will be pretty bad, a maximum of around 2 mm on a 500 mm axis. If you just used an off the shelf absolute magnetic encoder then your resolution would be better, even cheap ones are 12 bit and they have the advantage of not adding much inertia to the shaft. A PCB disc, that rubs, mounted on bearings might not hold up at high speeds, but a tiny magnet added to the end of a shaft with no need for bearings may be better.
@365robots
@365robots Год назад
I have plans to integrate it into a custom robotics actuator. The absolute encoding will enable FOC for the motor.
@conorstewart2214
@conorstewart2214 Год назад
@@365robots wouldn't using a magnetic encoder be better and easier? That seems to be what odrive and other projects use.
@Corbot130
@Corbot130 Год назад
Super cool stuff!
@GeekDetour
@GeekDetour Год назад
Hi there! You made an 8-bit encoder right? I was about to suggest the AS5600 - it's a 12bit magnetic encoder - but the RPM will be FAR less than what you want to achieve... Wow... 5000 RPM!? Good luck! Excellent video.
@Nicolas_dG
@Nicolas_dG Год назад
MA702 should be a great replacement, works up to 12000rpm for sure, dont remember of the precision but should be 12bit
@neilbarnett3046
@neilbarnett3046 Год назад
I'd put everything except the LEDs on the other side of the PCB, maybe even put them in holes, really reduce the depth of the extraneous components on the disk.
@UmbraAtrox_
@UmbraAtrox_ Год назад
good channel. subscribed
@Ambassador_Kobi
@Ambassador_Kobi Год назад
Why didn't you use gray code for the encoding wheel?
@365robots
@365robots Год назад
Wanted to keep everything easily understandable. But that’s for sure one of the first upgrades happening.
@AndersJackson
@AndersJackson Год назад
​@@365robotsgray coding isn't hard to understand, and covering it back to binary encoding in software is really just a lookup in a array of constants. Not hard to understand at all. And reduces hardware detection of false positions.
@adam207321
@adam207321 Год назад
@@AndersJackson however we dont really know what kind of processing power he has at hand. While it would be easy to do so, an arduino will definitely not be able to keep up real time positioning at 5k rpm (there would be tooo mich data for the arduino to crunch trough including driving the motor into the precise spot)
@godfreypoon5148
@godfreypoon5148 Год назад
@@AndersJackson or a few logic gates
@AndersJackson
@AndersJackson Год назад
@@adam207321 fetching data from an array isn't a hard problem to solve. And if that IS a problem, then he really should consider another CPU. Yes, it isn't a problem in a Arduino.
@gxurma
@gxurma 11 месяцев назад
Hey, ever heard of Grey coded or brujin encoder disks? Muuuch easier to handle, and the alignment of the sensors is also much easier.
@ibrahimkocaalioglu
@ibrahimkocaalioglu Год назад
Have you considered magnetic encoder ?
@tommays56
@tommays56 Год назад
Ya by the time the kick stepper current is high enough to develop full torque the motion get very cog ⚙️
@Leonelfreak
@Leonelfreak 9 месяцев назад
do you know how someone is able to make an encoder code disk the size of a penny? im trying to build something for a video game controller and the disc holes need to be around .40mm and the disc it self has to be around 10mm
@schorschoppenheim1825
@schorschoppenheim1825 10 месяцев назад
just cannot reach very high resolution, not properly for motor control itself. for some limited application, for example, after the reduced gearbox, if the motor already equipped with a high resolution encoder.
@heartminer5487
@heartminer5487 Год назад
rather than using milled pcb I would recommend laser printed vinyl sheet
@hugoelec
@hugoelec Год назад
You should use steel sheet plate instead of pcb board. Or at least paint that pcb black to increase signal
@365robots
@365robots Год назад
Thanks for the suggestion! Tried to avoid this initially but might have to go there at some point.
@AndersJackson
@AndersJackson Год назад
Or just use a solid copper layer on the encoding plate.
@Noconstitutionfordemocrats1
Does anybody know if this video was made by AI?
@godfreypoon5148
@godfreypoon5148 Год назад
Buddy, you urgently need to learn what "Gray Code" is.
@DaisyWang-ss7pl
@DaisyWang-ss7pl Год назад
Nice video! Don't know if any PCB or 3D printing services are needed for your upcoming content, if so, would love to sponsor and achieve any cooperation together! (PCBWay Daisy)
Далее
Magnetic rotary encoder vs stepper motor accuracy
5:41
Absolute Position Encoding
12:54
Просмотров 6 тыс.
Куда пропали ЗДРАЙВЕРЫ?
11:38
Просмотров 599 тыс.
ЗАБЛУДИЛИСЬ В ТРАВЕ #shorts
00:25
Просмотров 370 тыс.
I Built The First LAMINAR FLOW ROCKET ENGINE
15:51
Просмотров 1,9 млн
Putting an end to the WORST kind of gears.
16:35
Просмотров 218 тыс.
HACKED!: Using an HDD Motor as a Rotary Encoder?!
8:21
Building an Internal Cycloidal Robotic Actuator
19:01
Просмотров 568 тыс.
Ultra-Thin Flexure Actuators with Printed Circuits!
7:06
building a closed-loop pcb motor from scratch
5:57
Просмотров 10 тыс.
My New Linear Actuators are SO MUCH BETTER! | PDJ #21
21:03
My New Pick & Place Machine [Liteplacer]
13:37
Просмотров 284 тыс.
AI can't cross this line and we don't know why.
24:07
Просмотров 326 тыс.