Close

Closed loop motor under construction

A project log for mail2code

Mail your code to my microcontroller and see what happens via webcam. One hardware setup for many students, availability: Worldwide 24/7

norbert-heinzNorbert Heinz 04/23/2023 at 20:220 Comments

Blinking LEDs are the introduction into the world of "Physical Computing", but sooner or later you'll want to add movement to your projects. To give you a playground in motor control, I will add a DC motor with sensor discs, so that you can study closed loop systems:

The sensor discs are green and orange to make it easy to address them in tutorials. However, the PLA filament doesn't absorb the infrared light of the sensors that good, so I had to paint them black on the bottom side:

The assembled servo motor:


Of course, in practice there is absolutely no need for two sensor disc, but the mail2code project is for students. With a reduction of 150:7 the orange disc spins slow enough so that humans can actually count the revolutions, which helps to understand how it works.

The green disc is directly on the motor shaft and generates pulses on the sensor inputs with such a pace that you will have to make use of interrupts on the microcontroller to count them all.

With that, one setup is good for at least two tutorials on sensor inputs.

Discussions