I've always wanted to make that SmartKno, and now you go making a video about it and go into more details. Love it!!
@greatscottlab7 ай бұрын
I will see what I can do :-)
@jatinkrumkar76897 ай бұрын
I also wanna make one please help me out
@nimoy0077 ай бұрын
Me too.
@Madthrax237 ай бұрын
Please make one for home assistant :)
@spikero7 ай бұрын
me too
@runger17 ай бұрын
Hey Scott, thanks for your great and always so informative videos. I just wanted to add a small correction, namely that the CUI encoder has a PPR of 2048 - but that is pulses, on each A and B outputs. Because these outputs are in "quadrature", they form a 2-bit Gray code, and the actual resolution is 4x higher than the number of pulses, because you count both the up and down transitions on both signal lines. So the CUI encoder has a PPR (pulses per revolution) of 2048, but a CPR (counts per revolution == resolution) of 8192, which works out to an amazing 0.044° resolution, twice that of the AS5600...
@greatscottlab7 ай бұрын
Awesome. Thanks for the feedback.
@Munjaal77 ай бұрын
One of the primary issues I've had with quadrature outputs is needing to read them on interrupts to avoid missing position (which causes a bunch of issues on slow microcontrollers) or needing peripheral microcontrollers just to keep track of position that can be polled when required. Having raw angle from the encoder would make it simpler, at least for cases I've been having trouble with. If you do know of any way to simplify reading from quadrature outputs, please do let me know.
@runger17 ай бұрын
@@Munjaal7 Yes, depending on the hardware you choose, you can read encoders with no interrupts and zero overhead. It depends on the MCU having support for this, but for example STM32 MCUs or SAMD51 MCUs can do this using their encoder inputs (part of their timer peripherals). ESP32 has support for it also, although its a bit more complicated there, and RP2040 can do it using its handy PIO units. But a magnetic encoder such as the AS5600 used in this video, or the faster SPI based encoders like a AS5047, AS5048, MA732, MA330, MT6835 and many others can also be read out using digital protocols like I2C or SPI. Compared to using ABZ mode in quadrature using SPI or I2C has higher latency, but for most applications that's not a problem. Using the digital protocols to read the encoders means you don't need any interrupts and can't miss counting them 🙂 If you're interested in this, please drop by www.simplefoc.com and check out our "Drivers Library" where we have Arduino drivers for a variety of magnetic encoders...
@Munjaal77 ай бұрын
@@runger1 I had no idea about MCUs with such support built-in. Thanks a bunch for the info, it'd help me out quite a lot :D. I'll certainly look into simple FOC as well, looks quite interesting tbh.
@Lighthouse_out_of_order7 ай бұрын
So many amateur astronomers that build encoders to their rig need to know this!
@DUIofPhysics7 ай бұрын
The repeatability / accuracy is pretty bad for on axis magnetic encoders. They're better off with optical / off axis magnetic tape / capacitive encoders.
@bobert45227 ай бұрын
Technology has been around for decades. They know about it.
@imbass81517 ай бұрын
@@DUIofPhysics beat me to it lol. still has room for improvement tho!
@101blender7 ай бұрын
They're known as digital setting circles. We already have them.
@Poult1007 ай бұрын
I was going to make the same comment! Thank you for sparing me 😊 However, I wonder how expensive an encoder with 10 arc seconds resolution would be 😬
@Orionrobots6 ай бұрын
Encoders on motors have been a key part of my robotics builds, being one of the ways to estimate how far a robot has moved, or try to keep multiple motors going at the same speed. Paired with PID loops they are a key component.
@mathieusan7 ай бұрын
one more advantage is there is no mechanical mating between the motor shaft and encoder, so there is no wear or strain induced by the assembly due to possible slight misalignment. This is a huge advantage for durability. Once the magnet is secured and positioned in the center, and the sensor board is secured in an assembly, only initial calibration is needed. This means, it should be stable under vibration, bumps, etc.
@SkelaKing7 ай бұрын
Encoders have been around forever, we already knew this
@Qeswara6 ай бұрын
At this level, these matters that you mentioned are very small to the point of neglect. In fact, this can be approximated to the generation of heat and electromagnetic pollution as a result of the flow of electricity in electronic circuits and wires !! also the sensor in this video is a type of mechanical sensor.
@randyscorner94347 ай бұрын
When working on a ventilator system over covid shutdown we got exposed to encoders on motor shafts and I've never looked back. Great way to control all aspects of the motor and now being used on my CNC machine to avoid any skips. Worked extremely well in the ventilator also.
@MotoMattMania7 ай бұрын
I Ordered this to test for a project at work. Thanks Scott! This should work perfectly!
@greatscottlab7 ай бұрын
Glad I could help :-)
@batata_adb26067 ай бұрын
GreatScott never disappoints!
@greatscottlab7 ай бұрын
Thank you so much :-) I try my best.
@gamesnic7 ай бұрын
he was better back then
@Eewokney7 ай бұрын
ahh i loved the original video and i checked 3 weeks ago if there where any updates on the project. i hope with this attention somebody will pick it up.
@live2serv6 ай бұрын
Scott, You have the finest drawing hand/skills of any youtuber..
@MiguelDeMarchena7 ай бұрын
About 2 yrs ago someone invented the HAL effect sensor analog stick for gaming controllers and handheld consoles as a solution for the drift issue of the potentiometer wearing off on the traditional analog sticks, the same principle can be use to replace any potentiometer. My respect and admiration for you Mr. Scott
@yodal_7 ай бұрын
Hall effect sensor joysticks have been around in consumer electronics since the 1990s at least. They only just started coming back into the light due to stick drift becoming more of a problem.
@donutsleader7 ай бұрын
They also have their share of issues AFAIK, like overshooting artefacts when releasing a stick.
@MCsCreations7 ай бұрын
Yeah, my old Taranis X9D has hall effect gimbals. And it's a pretty old radio already.
@Aethid7 ай бұрын
The first thumbstick, that found in the N64, uses a hall effect sensor. They are still common in higher end flight sim equipment and radio controllers. Modern consoles don't use them because they are more expensive. They were not invented 2 years ago.
@MiguelDeMarchena7 ай бұрын
@@Aethid thnx
@sneakythumbs99007 ай бұрын
This is a game changer for building rotary actuators with feedback. I also have plans to build a homespun weather station and the wind direction sensor is always hard to make accurate with mechanical encoding
@zachwilliams6397 ай бұрын
With all love I appreciate the statement of any kind saying can fix all problems. That’s the a right attitude for someone who is into something. Know the humor of a statement so bold it’s worth giving it a look. One who stands behind an all.
@Jose-tw9bl7 ай бұрын
I love this topic! I am trying to learn more about encoders. I'd love to see you going a bit "low level" and read an encoder position using a dedicated peripheral of a microcontroller. Showing how to configure the peripheral and all
@Fantaman9005 ай бұрын
This is how my Open Sim Wheel works. Just a big motor with an encoder on the back and a steering wheel on the front. I might not remember properly but it's at least 15000 steps or 0.024 degree, crazy accurate 1kW 10Nm servo motor. Super good force feedback wheel way before direct drive wheels became affordable. And became an instant fan of encoders on regular motors over stepper motor crap.
@thisfeatureisbad7 ай бұрын
This would be awesome in a custom sim steering wheel. Even though such encoders are already being used for precision control.
@nimoy0077 ай бұрын
My thoughts as well
@conorstewart22147 ай бұрын
Force feedback is already used in sim steering wheels. Cheap ones use belts or gears but more expensive ones use direct drive. What do you think that could be added from this video that they don't already do?
@mitchellwilson123547 ай бұрын
Glad to see someone keeping the smart knob view alive!
@ammmze7 ай бұрын
👍🏻 i recently had a pull request merged to esphome to support that AS5600 encoder. Hopefully will be in the next feature release.
@ZekeTrimmer7 ай бұрын
Nothing like another great Scott video
@greatscottlab7 ай бұрын
Glad you enjoyed it
@boywithbrain75566 ай бұрын
I was planning to make a gaming wheel and, all the rotary encoders were too expensive and the potentiometers were not accurate. But I found out about those magnetic encoders from this video. Thank you!
@nerdaxic5 ай бұрын
Best explanation of rotary encoders I've seen up to date. Thank you! ^^
@paulroberto22867 ай бұрын
Wow, the magnetic encoder is perfect for my project! I didn't even know they existed till now, thanks! The physical ones have a pretty low rpm limit.
@greatscottlab7 ай бұрын
Glad I could help!
@dogwalker6667 ай бұрын
Been around decades, The early ones had lots of problems, That's why optical encoders using glass plates became industry standard. Optical encoders easily cope with 2800 Rpm. Servo drives all have optical encoders and tacho generators.
@conorstewart22147 ай бұрын
@@dogwalker666 you also get magnetic encoders that work similarly to other relative encoders too, the ones shown in the video were absolute magnetic encoders though. For relative encoders rather than just a magnet put on the shaft it needs a disc with alternating magnetic poles and just produces a similar output to mechanical or optical rotary encoders. Optical is good because of the high number of pulses it can produce per rotation, it is common to use a plastic disc with black paint on it to block the light.
@dogwalker6667 ай бұрын
@@conorstewart2214 true and obviously an optical will have much higher PPR than a magnetic, For absolute encoders it is always optical, The plastic disks don’t have the temperature range of the glass due to warping. and the pattern is photo etched rather than paint.
@JonathanDeWitt19887 ай бұрын
A good introduction video. It might be a good project to show implementing an encoder setup on the RC car you showed in the video to synchronize the motor speeds. I bet there would be a lot of hobbyists who build RC cars for Arduino projects who would take notice of that. It's a common issue as you pointed out.
@SRG-Learn7 ай бұрын
Fuck yeah! I revisited the video to see any updates but not luck... and suddenly one of my favorite youtubers revive the project!!
@Dagor7 ай бұрын
Missed opportunity to talk about SimpleFOC, a true open-source project to drive brushless motors and what the SmartKnob project actually uses under the hood.
@candas17 ай бұрын
😂
@pixelfairy7 ай бұрын
The marketing dept might have had issues
@matthewremington7 ай бұрын
Yah SimpleFOC is a great library to use and the source code is quite readable to understand what's happening under the hood. I wish there were more driver boards in the 50A range that were compatible though.
@copper280z7 ай бұрын
@@matthewremington Almost every driver board is compatible, anything that has an stm32, esp32, or rp2040. That means anything vesc compatible, along with all sorts of other stuff.
@matthewremington7 ай бұрын
@@copper280z Yah I should look more into those VESC boards, many of them have great specs and prices.
@nrdgrrrl7 ай бұрын
Thank you, I've been trying to figure out how to add rotary encoders to my mechanum drive robot and this is exactly what I need. I just ordered 5 off Ali express.
@mcspikesky7 ай бұрын
Genuine AS5047P development boarsds can be bought :)
@DanielFSmith7 ай бұрын
The magnetic encoders work like magic, except on motors. Especially on BLDC using PWM, they get very confused by all the stray magnetic fields. After evaluations, we went with a glass optical disc to get absolute positioning on hobby-style, high performance, compact drives.
@metalspoon694 ай бұрын
I wish i knew this years ago when we were building a drawing robot with lego motors. We had constant issues with the motors being inconsistent, an encoder would've fixed that right up
@EmoBrianEno7 ай бұрын
Still better than watching the Super Bowl. Thanks for the great videos!
@sokrates2977 ай бұрын
Perfect timing, I just rewatched that video, and was curious about the motor used.
@kektikektus7 ай бұрын
I was reading up the project few hours ago! Thanks for uploading this
@karthikeyajavangula84237 ай бұрын
When I first saw that Haptic Thermostat video, I had a gut feeling that you're going to make a video related to it!
@Foberowsky3 ай бұрын
You could use eccentric 3d printed disc with reflective optical sensor for even more precision.
@massimotardio17077 ай бұрын
The first time i used a magnetic rotary position sensor was in 2011, a wonderful device from STmicroelectronics
@lander15917 ай бұрын
Careful using the Delay function in Arduino it Pauses the whole sketch and stops anything from being sensed conrolled or computed during the delay. It is preferable to establish a timer variable that is updated by the ms of the microcontroller up time and using that to reference on and off timer states.
@nerfthecows7 ай бұрын
For 50 bucks you can get a bldc motor with built in encoder that’s really beefy if you just look for a AE8Z-7C604-A it’s the clutch motor for the ford automated manual transmission and it’s has the 5 pins you want the 3 phases and 2 encoder outputs
@dcallan8127 ай бұрын
Very handy. great video 2x👍
@greatscottlab7 ай бұрын
Thanks 👍
@schaltnetzteil4957 ай бұрын
Thanks for your video! Your videos always make my day. Great work! Keep it up!
@greatscottlab7 ай бұрын
Glad you like them!
@j.tann19707 ай бұрын
The optical encoder diagram you created is slightly off. Generally it's easier to manufacture the encoder if you put sensors A and B on opposite sides of the wheel. That way they can be at the same height making it easier to build. For example, from your diagram, if you put sensor B over to the left of the wheel at the same height as A you will see it will be on the same side of the hole as where you drew it on the right. But I guess you put them together like that to make it easier to show they are offset from each other.
@mrGovnoff7 ай бұрын
Just for information sake: once I took apart a broken Y-axis driver from a vinyl cutting plotter and it had an optical encoder attached to a simple brushed DC motor as one unit, so may be there're some cheap off-the-shelf motors with feedback one could buy online, I mean "cheap and affordable", because in my case the spare motor for that fancy cutting machine cost just unreasonable and ridiculous money.
@sprechendemulltonne50516 ай бұрын
I put such a magnetic rotary sensor on the crankshaft of my Moped (Simson 2-stroke). 😂 I tried to move a BLDC motor according to the crankshaft of the engine. I never finished this project though. It's interesting to read out the engine rotation though.
@ultravioletdream7 ай бұрын
I have to get one of those Motor controllers, thankyou for showing how awesome they are :-)
@ytrew97177 ай бұрын
Very well (simply) explained, thanks!
@hssnov7 ай бұрын
Entering the motor driver and controller realm is a big one, maybe tomorrow you will use sensorless control using current and voltage values to estimate the angle and speed. Filed-oriented control is a go and maybe later you will use model predictive control.
@microdesigns20007 ай бұрын
Almost all modern industrial servomotors come with high resolution encoders, usually resolvers, that send position using a protocol, like the royalty-free BISS protocol. By high resolution, I mean 2 million counts per turn. The reason for such a high resolution is that PID calculations are much more accurate and therefore the servo follows the target path mich better amd handles small errors better. I used 2000 count encoders for years, and when I switched to 2M, life with servos got a lot better. Now of only there was a hobby grade high resolution encoder.
@shadeofsound237 ай бұрын
I love scottbez1's smart knob. Thanks for this video!
@DFX2KX7 ай бұрын
I can see a few handy uses for this. didn't know there was an encoder that could handle the sort of torque a big BLDC motor could generate
@Blinkerd00d7 ай бұрын
I saw his video on this like a week ago. Good timing
@YRR_J7 ай бұрын
I immediately in my mind placed like 3 or 4 of these in a dash of a modern car. Then you would just select the function for each knob. Be it temperature, fan speed, air flow position, volume etc. the option for a given knob could be on something like a sliding multiposition switch.
@roboman24447 ай бұрын
Those magnetic encoders aren't entirely linear, but its pretty easy to use a stepper to slowly go through its range and map out the error, then correct for it in software.
@ddegn7 ай бұрын
I think you'd need to figure out how to calibrate the encoder while the encoder is connected with the motor you plan to use. I think the act of mounting the encoder would introduce small errors to the calibration.
@roboman24447 ай бұрын
@@ddegn . Yeah, use a small stepper to rotate your whole motor-encoder assembly. Those encoders tend to have less than 1 or 2 * of non-linearity, so if you don't need THAT much precision, don't worry about it.
@ddegn7 ай бұрын
@@roboman2444 It's been a while (about ten years) since I've worked with this sort of encoder. I have a video titled *"EncoderPositionAndSpeed130824a"* which shows my attempt to mount an AS5055 encoder inside a hobby servo. My setup had lots of error since the PCB and magnet weren't precisely mounted. Since my setup included the servo's gear train, I don't think your stepper motor idea would have worked for me. If I were to try this again, I think I'd just use a good quality quadrature encoder on the servo's output to use to measure the actual vs. theoretical position. It's nice to see these sorts of encoders being commonly used now. Back when I made my video, I had to order a large batch (100) of diamagnetically magnetized magnets. These sorts of magnets weren't nearly as easy to find ten years ago.
@DrGeta666Ай бұрын
how would you do this on the software side? i'm assuming generating some kind of table of angle vs encoder value measured and then somehow applying that table to your code? or is this something you need a SOLO motor controller for?
@roboman2444Ай бұрын
@@DrGeta666 I think for the most part it can be corrected with a sine... but you could also really easily just have a small table and linear or trillinear interpolate between some cells.
@S547 ай бұрын
you probably know but you can also control position of bldc motor without encoders using HFI in VESC
@wojciechzielinski78255 ай бұрын
This may be usefull to build cheap wire encoders, for doors/windows or anything that cannot be done with normal encoder.
@ChristieNel7 ай бұрын
I've been building encoders, decoders and motor controllers for years and they are so fun. Just hard to sell. I'm currently working on a very affordable absolute nonius encoder.
@sethrice99394 ай бұрын
Add that to a low wing RC plane with twin engines and twin prop. Then set a switch to kill the motors and position them parallel to the wing. So you can belly land and not stick a prop into the ground.
@drmosfet7 ай бұрын
So now I know what to uses when I can't find anymore old mechanical computer mices.👍
@DrFiero7 ай бұрын
Not like anyone would ACTUALLY use a rotary encoder grafted onto a motor shaft... but along with the reasons you mentioned, you'd burn out the shaft bushing in no time flat since it's only meant to be turned slowly (ish) by hand!
@CesarAnton7 ай бұрын
Maybe 1/8" square neodymium would be easy to align N-S horizontally for such sensor and they are tiny 🤔 Thanks for the video Scott!
@MMuraseofSandvich7 ай бұрын
Me: _reads title_ Oh, this one's about motor encoders? Me: _1 minute in_ Ohhhh the smart knob thing? Now you got my attention.
@bob_mosavo7 ай бұрын
Thanks 👍 I am building a CNC machine and will definitely check out SOLO Motor Controllers‼
@greatscottlab7 ай бұрын
Awesome :-)
@Lampe20207 ай бұрын
"solomotorcontrollers" ist 'n richtiges Spitzmundwort XD
@martial4matters6 ай бұрын
Your take on a programmable smartknob would be highly appreciated!
@petint5 ай бұрын
This could be so useful for an Icom RC-28 alternative.
@parameshpavin27087 ай бұрын
Great scott worth watching it..
@TD-er7 ай бұрын
The capacitive encoder looks like it might work very similar to how most calipers work. I guess when using 2 encoder-rails internal you might even be able to make an absolute encoder which doesn't need cross a reset point to know the position. But those absolute encoders often use a different interface, thus not A/B quadrature encoding.
@khurram.0.0.7 ай бұрын
At last you came to know if it. I hope you make good use of it
@tiagotiagot6 ай бұрын
Would additional magnetic sensors, spaced a little further, be useful to subtract external magnetic fields from the signal of the magnetic encoder?
@TundeEszlari7 ай бұрын
Brilliant video.
@noanyobiseniss74627 ай бұрын
I printed out 125/128 gearing to use my 1024 encoders with locked 1000 count drivers.
@SimonCoates7 ай бұрын
You need to have a look at M5Stack ESP32-S3 Smart Rotary Knob.
@greatscottlab7 ай бұрын
Looks very nice. Thanks.
@tdata5457 ай бұрын
I looked into that, but it seems to be a ratcheting one, that was my only problem with it. Their video even makes it sound like it is a ratcheting one. Limiting its "resolution".
@bob_mosavo7 ай бұрын
Yeah, I have one on order. It looks really nice 🤩
@DrFiero7 ай бұрын
Mine showed up about a month ago - it's totally cool!
@tdata5457 ай бұрын
@@DrFiero Is it ratcheting/clicky or smooth?
@NiMareQ6 ай бұрын
Hi Scott, please don't take me wrong, I am a subscriber and love your content. You are ending a lot of words with an additional "s". Can you focus on it?
@tba36795 ай бұрын
The display is very cute. I wonder if I could be able to program it
@RobinGerritsen19956 ай бұрын
If this project would eventually become the new SpaceMouse🤔
@electronichome11537 ай бұрын
Great as always!
@fedeyoutub7 ай бұрын
beautiful 👌, is a economical closed loop motor,. i use this sistem in my cnc ( stepper + driver ),. but whit this sistem you can control all motor, very interessing ❤
@lasciencedelamusique62457 ай бұрын
you are very great!
@PatrykAndrzejewski06 ай бұрын
there is one car that got main infotainment knob with magnetic encoder and brake. It features not only multiple resolutlion of force feedbacks when rotating but also it locks when you turn it to the end of selection menu, it would be nice to implement sort of feature as this.
@Mechatro-e8p7 ай бұрын
Great 👍
@greatscottlab7 ай бұрын
Thank you! Cheers!
@aminuadejoh41687 ай бұрын
Wow, great video 😊 I learnt something new❤ Thanks very much ❤
@greatscottlab7 ай бұрын
My pleasure 😊
@koi_krapfen7 ай бұрын
Man, I love your intro
@LucasVonk76257 ай бұрын
Always interesting and always learning!! Thanks!
@greatscottlab7 ай бұрын
My pleasure!
@Marini2327 ай бұрын
You said magnetic encoders are affected by strong magnetic fields. So how about the magnetic field produced by the Motor? Are there simple ways to shield the Sensor from external fields, like wraping it in aluminum foil?
@matthewremington7 ай бұрын
A neodymium magnet a couple millimeters from the encoder is going overwhelm any stray electrically generated magnetic fields. In practice, I don't think any shielding is necessary.
@Wegetsignal7 ай бұрын
Very interesting, wasn't aware how encoders work!
@greatscottlab7 ай бұрын
Glad I could help!
@Yakov-i9j5 ай бұрын
inspirational
@CppExpedition7 ай бұрын
Genius Great Scott!
@NickkoG5 ай бұрын
Thanks for this video, it's very interesting!
@caseydbani14197 ай бұрын
How big is the error with off-axis magnet? Did you try it instead of the "black box" capacitve? Great topic great Scott!
@temyraverdana64217 ай бұрын
Great explanation. Thanks a lot
@MCsCreations7 ай бұрын
Really interesting indeed! Thanks, dude! 😃 Stay safe there with your family! 🖖😊
@elektroniktommi7 ай бұрын
There are inductive Sensors available with good resistance against magnetic stray fields, from Renesas or Melexis.
@thebasementengineer7 ай бұрын
I think that I would still put an encoder on my stepper motors if using them with industrial robots to get the exact position of the machine.
@Kaloyan-trains7 ай бұрын
Looks interesting, wonder if I can make something like it DIY
@greatscottlab7 ай бұрын
Go for it!
@ZildiST7 ай бұрын
How about resolvers? Could have been interesting to mention them. They are analog but that means the resolution is only up to the extra component used on the side.
@christophero19697 ай бұрын
Thanks!
@sepitbeats7 ай бұрын
Last one is great for building DIY sim racing wheels i think
@REDxFROG7 ай бұрын
It looks like it bounces back a lot when coming to a stop. Always overshooting the position.
@aliawrang95037 ай бұрын
Really great video, I was looking for such driver.
@greatscottlab7 ай бұрын
Glad I could help
@raduboboc7 ай бұрын
Is any of this feedback going back to the original project? Maybe we can contribute some how to make the smart knob better
@hmb.12247 ай бұрын
Great work! Keep it up!👍🏻
@greatscottlab7 ай бұрын
Thank you 🙌
@utube5215 ай бұрын
So if I want to control gimbal motor 3 meters away fromh arduino, I have to run 6 3 meter wires to it? wow! super efficient and clever system :)
@joemwangi58137 ай бұрын
Hi greatscott, how would it be possible to do a basics video on impedance matching