Тёмный

4-bit absolute position encoder build 

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

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

 

15 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 22   
@michaelbuchholz992
@michaelbuchholz992 8 месяцев назад
I have something like a "data ready" on my mind, where an extra detector with a very short hole tells the CPU to "read now". This has the disadvantage of not knowing, where the encoder is when the system is powered on. But the reading of the position while it's moving will always be at the best position - the center of a obscured or open area. And who will stop you from implementing a Hamming code here too together with the Grey code 😀
@idahobob
@idahobob Год назад
Nice work there! A couple suggestions I can think of, are to have the copper side of the encoder near the detectors, to minimize the difusion of their edges to the detectors. Next a slit mask over the detectors, so they only can see light from a think slit of the encoder. Leave off the solder mask of you next encoder, or test to find which mask transmits the most Near IR. Your code can be quite simplified with a lookup table. You can go from a HUGE if() tree, down to just a few lines. (smaller code space, much faster execution) EXAMPLE with 2 bit grey code : int Grey2Pos[ ] = 0b00, 0b01, 0b11, 0b10 ; gray = (encoder) posTest = Grey2Pos[ grey & 0b11 ]; // the "& 0b11" masks for wrap around, aka mod-4 If ( (posTest == (pos + 1) ) || (posTest == (pos -1) ) // has it moved to the next or privous posistion? pos = posTest; // YES, Save the new position else glitch++; // No, there's been a glitch... so record it In the future, say in your next project, you should look into how digital calipers work, as they give dozens of microns of resolution, with a simple capacitor array.
@365robots
@365robots Год назад
Thank's for that great suggestion! Really appreciate your detailed and constructive feedback.
@carljohangrevby7217
@carljohangrevby7217 Год назад
Nice feedback! Very interesting read! 😊
@idahobob
@idahobob Год назад
OPS! There's a bug in the code... it missed the edge cases of "pos = 0" and "pos = MAXpos" The test for if "pos" should be updated needs to expand.... add to top: greyMASK = 0b11; MAXpos = 3; and change the one if() test to 4 tests... if (pos == 0) // test for underflow of posPrev posPrev = MAXpos; else posPrev = posTest =1; if (pos == MAXpos) // test for overflow of posNex posNext = 0; else posNext = pos+1; if (posTest == posPrev) pos = posPrev; if (posTest == posNext); pos = posNext; Not only will this actually work, it's easier to follow what it's doing.
@karmanyaahm
@karmanyaahm Год назад
Wow, love making things simpler to assemble and consolidate BOM variety
@TheAMadMan
@TheAMadMan 11 месяцев назад
I'd want an absurd amount of these to use for smart home stuff, but I'd hide them in innocuous items and decorations. Then I get to have fun controlling light or volume or whatever by interacting with my room in a weird way
@lucaskilly2656
@lucaskilly2656 Год назад
Nice job, this could be very useful in detecting the angular position of a non constrained rotor like the rotor of a lidar or radar. Thank you for sharing!
@christophersfactory
@christophersfactory 11 месяцев назад
Nice! Great job. As a fellow absolute position encoder enthusiast, you did a great job!
@duncanmarks1590
@duncanmarks1590 10 месяцев назад
Hi, thank you for the effort on this series; my use case would be a much lower frequency application as a wind vane position indicator to show and record wind direction. bye
@mikeydk
@mikeydk Год назад
Very interesting series making this encoder!
@kylejewiss659
@kylejewiss659 Год назад
Thankyou for sharing your awesome work
@carljohangrevby7217
@carljohangrevby7217 Год назад
Very interesting video! Thank you!
@gordoncouger9648
@gordoncouger9648 Год назад
You are on a good track that will work. It will be interesting to see how fine a resolution you can get. There are certainly uses for 4-bit absolute encoders, but the greater the resolution, the more uses for the encoder. I always wanted to work with these when I had the facilities to do so, but I never had the time. Now, it is much less expensive to do these kinds of things, so it is good to see you doing them.. Using a single light fiber smaller than the width of the copper trace to precisely illuminate each trace of the encoder would reduce the cross talk at the price of added parts and complexity. Moving the light sensor to 8 different positions around the axis of the encoder should eliminate cross-talk and the cost of the need to very accurately position the light sensors or do a fix-up in software needing a much faster CPU to race the same speed the simple encoder can achieve.
@365robots
@365robots Год назад
Thanks for watching! Spacing the pairs of photodiodes and LEDs around the circumference is a great suggestion! I think the fibers will be too expensive for the intended use cases. Feel free to check out the latest video It features an updated 8-bit version.
@Scrogan
@Scrogan Год назад
Nice. If you do get the thing remade again, I’d try it with copper on both sides. Also no solder mask. 3D printed light funnels might help to prevent crosstalk. For a use-case? A cheap brushless servo to replace stepper motors on CNC machines like 3D printers. If only TMC4671s were cheaper, maybe there’s a Chinese company making something equivalent.
@365robots
@365robots Год назад
Great suggestion! A brushless servo Is what I am having in mind as well.
@richdobbs6595
@richdobbs6595 10 месяцев назад
I'm interested in a really cheap absolute linear position encoder. It doesn't need to be particularly fast, since it is tracking the movement of a 3d printed mechanism being positioned by a servo motor. This approach seems like it could be adapted to this use case, and it could be implemented by PCBs with surface mount components, so it would be cheap to prototype. Do you think this approach would be feasible and yield the results that I'm looking for? Anybody have an open source example of somebody doing something similar?
@gcod3d161
@gcod3d161 Год назад
Why not use a printed RGB pattern and a few RGB photodiodes?
@asmotaku
@asmotaku Год назад
Your FR4 disc would work nicely for capacitive coupling or induction sensing. Just sayin'. 🤫
@chaosordeal294
@chaosordeal294 Год назад
Build a simple neural net and train it to dynamically compensate for errors and hardware shortcomings.
@365robots
@365robots Год назад
Would for sure be a fun software project!
Далее
Designing a simple vibration sensor
17:13
Просмотров 110 тыс.
Absolute Position Encoding
12:54
Просмотров 6 тыс.
ЗАБЛУДИЛИСЬ В ТРАВЕ #shorts
00:25
Просмотров 370 тыс.
Putting an end to the WORST kind of gears.
16:35
Просмотров 218 тыс.
NRF24 Frustration - Radio module doesn't work?
12:46
Просмотров 90 тыс.
Magnetic rotary encoder vs stepper motor accuracy
5:41
I made a VGA card that blew my mind
15:44
Просмотров 427 тыс.
AI can't cross this line and we don't know why.
24:07
Просмотров 326 тыс.
building a closed-loop pcb motor from scratch
5:57
Просмотров 10 тыс.
diy 8-bit absolute encoder
4:02
Просмотров 4,3 тыс.