Skip to content

Test code for micro:bit quadrature decoder driver

Notifications You must be signed in to change notification settings

sh1boot/testqdec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Some test code for changes to the micro:bit driver code, plus a software quadrature decoder and PID control loop.

The EV3 intelligent brick used to control Lego Mindstorms motors is kind of pricey, and it sets an upper limit on the number of robotics project that can be built from a finite set of lego, since every project needs some kind of controller.

I happened to have a micro:bit on my desk when I was thinking about this and I decided it might be a helpful to offer driver support for motors like the Mindstorms ones on much cheaper hardware. This is kind of the same idea (though far less developed) as ev3dev, but with a different OS.

Mindstorms motors are straightforward DC motors with a quadrature encoder attached to the output so that speed and position can be monitored and motor control adjusted accordingly.

All you need is a micro:bit and a few bits of interface hardware wired together, like so:

interface logic

Parts: board, edge connector, driver, connector (cheap in principle but that's all prototyping kits)

The nRF51822 on micro:bit has a single hardware quadrature decoder, and establishing a driver for that is the very first step.

Here we have test code for that driver along with some provisional next steps: a software quadrature decoder (to monitor two motors concurrently) and some motor control logic. I'd intended to contribute to microbit-dal and build upon those drivers within MicroPython once they were done, but that may no longer be the right way forward.

About

Test code for micro:bit quadrature decoder driver

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages