Michael Fogleman

Projects • About • Resume • More

Projects tagged "hardware"

This page highlights several of my personal software projects.

Table of Contents


Thermal Camera April 2024

11 Python Hardware

Python driver for the MLX90640 thermal sensor, using an Arduino as a simple I2C to serial relay.

The MLX90640 is a neat little thermal sensor with a resolution of just 32x24 pixels. That doesn't sound like much, but it's plenty for recognizing a person, as you can see in the animation.

ATmega-based Arduinos like the Arduino Nano don't have enough RAM to hold the 16-bit image in memory, so the usual MLX90640 libraries don't work. Instead, my code uses the Arduino as a simple I2C to serial relay and leaves all of the calibration and image processing to Python code running on the computer. The calibration math comes straight from the datasheet and is implemented with numpy. (The sensor reads its pixels in two passes using an interleaved checkerboard pattern, which is why you can see a checkerboard around anything that moves quickly.)

I also mounted the sensor on a motorized pan-tilt head and wrote a follow mode that steers it toward the warmest thing in view!


AxiDraw January 2017

285 Python Vector Hardware

Unofficial Python library for working with the AxiDraw pen plotter.

The AxiDraw is a very nice modern pen plotter. It ships with Inkscape-based software for controlling it, but I was more interested in programmatically controlling it myself. So I wrote this library that controls the plotter directly over the USB serial port.

The most interesting part of this project, for me, was writing my own motion planning algorithm. I stuck with constant-acceleration for simplicity, and the code for the planner came out to just a couple hundred lines of Python!

See the motion planning algorithm in action in this web-based visualization.

Features

  • control the AxiDraw directly from Python with a simple API
  • convenient command-line utility
  • constant acceleration (trapezoidal velocity) motion planning
  • path drawing order optimization
  • drawing transformations
  • preview drawing (render to png)
  • turtle graphics
  • lindenmayer systems

GPS September 2014

70 Python OpenGL 3D Hardware

Real-time 3D visualization of actual GPS satellite locations.

This code interfaces with a USB GPS receiver and produces a 3D visualization of GPS satellite positions for all of the satellites that are currently in view.

Read more...