# Summer ’22 Projects – Part 1

Well, today is the official last day of summer for me, as next week faculty return to school to prepare for the semester which starts the following week. The summer went by too quickly, but I was nonetheless able to get a few projects completed. Here’s one of them.

Use the Force – BoB

A couple years back, I started building my own lightsaber according to Adafruit’s instructions. As with many Ruiz Brothers builds, I found it fun yet a bit frustrating, as there always seems to be some part of the build that isn’t quite beta-tested. Of course, as makers, we should be able to handle such challenges, so maybe Ruiz intentionally includes small goofs in his designs – perhaps.

Anyway, here’s a video summarizing the build, including my modifications to the original design.

# Signal processing with Mathematica

I’ve been working on some instrument design projects and have hit a brick wall of sorts. My prototypes are riddled with noise, most likely 60 hz. My thought here was to learn a bit more about signal processing to (a) see if I can get a better understanding of what’s going on and (b) see if this is a possible project for students.

So the setup is as follows. I’ve got an Arduino microcontroller that does one of two things, it either reads the signal from a noisy light detector (in this case, an LED connected to an op amp in a current-to-voltage configuration) or – for debugging purposes – outputs a fixed signal frequency by printing $A0 + A cos(2 Pi f millis()/1000)$ where $A0$ and $A$ are amplitude offset and signal amplitude, respectively, $f$ is the frequency and since millis() returns a value in milliseconds, it is divided by 1000. To enact a sampling rate, I set a delay(dt) in the loop routine where dt is the delay time in milliseconds.

On the *Mathematica* side, it’s pretty easy to read the serial data from the Arduino with d = DeviceOpen["Serial", {<port>, "BaudRate"-><baudrate>}] with replacing <port> and <baudrate> with your values. The code below is a tad clunky, but works well at grabbing data and converting it into a format that Mathematica wants.

# Dual peristaltic pump prototype

Another project I’ve been working on this summer while stuck not in my lab was an inexpensive dual peristaltic pump design. It consists of two 12 Volt peristaltic pumps from Adafruit along with a Metro (Adafruit’s Arduino clone) as the brain.

# New Year’s project

I received some servo motors for Christmas, so naturally I need to start working on a robot. Details to come on the project, but for now I’ve been trying to figure out how to (a) control two servos with an ATTiny85 microcontroller and (b) talk to that microcontroller with an Arduino that is telling the ATTiny85 how to position the servos.

It took the better part of several days (including some learning and additional trips down rabbit holes, but here we go.