I made a custom "friction-less" jog wheel for working on long documents - Page 1
Forum section: electronics / projects

author: evglabs
author_rank: Contributor
timestamp: December 08, 2019, 07:02:07 pm
content: I've been getting into teaching myself STM32s and made a jog wheel.It uses an STM32F042C6T6 to read a small DC motor connected to a differential opamp and works as the scroll wheel of a standard USB mouse.The case measures 44mm diameter by about 50mm tall.I now it's not as fancy as a lot of the other projects I've seen here but I'm proud of it!Video in action:

author: Yansi
author_rank: Super Contributor
timestamp: December 08, 2019, 07:03:27 pm
content: Great, but this is already long made and supported on many computer mice. Just a click to switch between cogged and freespinning mouse wheel.Also, you shall learn how to split source code into files.//EDIT: Also, to stay on topic. Adding an ESD protection device on the USB would not hurt. USBLC6-2SC6, to name one.Also, having just only a small ceramic cap on the power supply input without overvoltage protection or additional dampening is asking for trouble.Add via stitching to your ground plane!Why does the NRST pin appear to not be decoupled to ground with a 100n cap, rather to some other trace common with likely BOOT0 pin? Where is the BOOT0 pull-up resistor? This pin is HiZ, there is NO integrated pull-up.And lastly a design note: Why a DC motor as the encoder? You need a POSITION encoder, not velocity one.

author: evglabs
author_rank: Contributor
timestamp: December 08, 2019, 07:12:03 pm
content: Quote from: Yansi on December 08, 2019, 07:03:27 pmYeah, I have a Logitech (a few actually) with that, but every Logitech mouse I've had I have to replace the left button a couple of times. So, I figured it'd be a good learning project and give me the functionality of it without being dependent on the mice.Plus it's nice when reading a datasheet of reference manual to be able to use my whole hand to scroll instead of my finger.QuoteNever!Give me one monolithic file or give me death!

author: evglabs
author_rank: Contributor
timestamp: December 08, 2019, 07:19:31 pm
content: QuoteI'm still learning, and half the time (all the time) I don't know any better. Right now, it's if it works, it works. Any problems are for future me to deal with. Screw that guy.QuoteThe NRST is actually decoupled to ground with a 100n cap. The BOOT0 pin has a jumper to connect to ground (and the two share the same ground connection).QuoteThe DC motor is cheap (a salvage from a DVD drive) and really, I don't care what the position of the encoder is. Just the direction it's moving. 1/2 VDD no movement. < 1/2 VDD = scrolling down (and lower voltage equals to scrolling down faster) and vise versa for scrolling up.

author: t1d
author_rank: Super Contributor
timestamp: December 09, 2019, 12:01:21 am
content: Bravo, evglabs, for wanting to learn by doing! This is a great project and comes from the heart of DIY-ing. I am sure you learned a large amount and that was the point of it all. I salute your efforts. Keep at it. Please keep posting, so we all can learn together... mistakes included.

author: Ysjoelfir
author_rank: Frequent Contributor
timestamp: December 10, 2019, 03:31:11 pm
content: I like itBefore I got my 3dconnexion CADMouse and Space Navigator I would have loved to rebuilt one of those for myself.Very nice project!

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 10, 2019, 03:55:35 pm
content: This is a simple, yet creative project. Good job! Most importantly, it appears to work fine, and the use of a DC motor is actually not bad. You could have used some kind of rotary encoder instead, but most of the cheap ones will certainly have more friction than this (even the friction-less ones). You would have needed something a lot more expensive, or designed the encoder part yourself with ball bearings and maybe just an optical sensor. The DC motor is definitely creative here, at least for a hobbyist project.One thing to consider, if you haven't already, is to make sure you have protected your inputs properly, as the DC motor could generate relatively high voltages in some cases when spinning.Stand-alone USB "jog wheels" similar to this do exist, but it's of course no reason not to DIY this.

author: evglabs
author_rank: Contributor
timestamp: December 10, 2019, 06:58:47 pm
content: Quote from: SiliconWizard on December 10, 2019, 03:55:35 pmThanks, it fit the main two reasons I try to pick a project:Can I use it?And do I already know how to do it? (No is better because then I can learn something new).If by protection, you mean something clamping voltage with diodes, then no. I haven't delved into that much yet.

author: JuanGg
author_rank: Regular Contributor
timestamp: December 10, 2019, 09:14:54 pm
content: This application is ideal for a DC motor to be used as an encoder. Often comes for free, and it's strong enough for this sort of thing without additional bearings.I did a similar thing on my electronic load:https://www.eevblog.com/forum/projects/arduino-based-electronic-load/,but I ended up changing the dc motor to a mechanical encoder, because having a free-spinning knob is not necessarily something one would want to use to set current...Juan