Category Archives: Electronics

AutoScope 2.0 : X Axis Slippage

I noticed that the X knob needed just a bit of tightening. This, of course, required that most of the microscope be taken apart.

A nice find was that there’s a cutout in the lower casting. Almost exactly the correct size for an OLED display.

Back together again, with one of my “home sensor” tests (in this case, a laser Time of Flight sensor).

AutoScope 2.0 : Home : RGB Sensor

I thought the TCS-34725 RGB color sensor ( might be the solution, but it’s not. I printed a little slide carrier in black, so I could cut out the ‘scopes light when out of range. That worked great, until the next day and I had sunlight.

The sensor is good at picking up reflected light off the top of the slide. Which is fine for other applications, but no good for us. (Unless we run the ‘scope in a dark room.) I’m not able to get clear in/out of range readings with the reflected light getting in the way.

I still may use the sensor, as a very-rough “print preview” of the scan. It does change values as I move across a sample. However, if ambient light changes, you get shifts in the color. So it’s not very repeatable.

XBOX Adaptive Controller : DIY Joysticks

I think that the Microsoft XBOX Adaptive Controller is a great idea. What I don’t like is that the accessories (like buttons or joysticks) are expensive. Here are some hints to making things less expensive and more accessible.

I’m testing PS2 style thumbsticks along with Arduino Leonardo (Micro Pro — the tiny board) as joysticks (for left and right USB of the Adaptive Controller). I’ve successfully connected and am getting good X/Y values on both sides.  Check out these YouTube videos for details:

For the buttons (which can connect with 3.5mm / 1/8″ headphone jacks), get two packs (10 pieces per pack) of these:

Or, four packs (4 pieces per pack) of these:

They allow you to easily wire stuff without having to solder. You need 19 of them. If you want just Up/Down/Left/Right/A/B/X/Y you need 8.

The stereo ones are cheaper (go figure) and work fine — wire L and Gnd. For the mono ones, + and -. Polarity does not matter, as these are switches.

These are the little joysticks I’m testing with:

Any analog type joystick (with Power, Ground, X, Y, Button [not needed]) should work. I’m using these because they are cheap, on hand, and good for the proof of concept. For actual designs, I’ll use bigger sticks.

I wire them to work with one of these:

You must use an Arduino Pro Micro (aka Leonardo) which has the Atmega32U4 chip — because this chip can emulate a keyboard or mouse or joystick. The Arduino reads the values from the stick, and has code running on it that makes it act like a HID. It’s recognized both as a normal (albeit limited) game controller, and the XBOX Adaptive Controller recognizes it. (X/Y — have not figured out what Push Button to send under.)

I’m using the HTML5 Gamepad Tester which can be found here:

Ports on the back of the Adaptive Controller map like this:

Left Digital – 14
Down Digital – 13
Up Digital – 12
Right Digital – 15
LS Press – 10 (don’t have this working yet)
LB – 4
XBOX – ?
X1 – Think this goes to analog
X2 – Think this goes to analog
Windows/Squares – 8
Three Lines – 9
L Trigger – 6
R Trigger – 7
RB – 5
RS Press – 11 (don’t have this working yet)
A – 0
B – 1
X – 2
Y – 3

Again, these are the default mappings I’m seeing via the Gamepad Tester. Your results may vary. Also: Regardless of the chip and controller, the built in “Controller Check” in the Windows 10 Control Panel keeps going to non-responding / locking up. I have no idea why. So I gave up trying to test with that and moved to the web based tester.

More to come, but know that I was able to hook up my own custom sticks to the XBOX Adaptive Controller and can use my own buttons with easy connections.

E-mail me (address is in left nav bar) if you are working on an accessibility project and need assistance.

Arduino Code, Joystick Library, and 3D Models can be found on GitHub (

You can also find the 3D Model at Thingiverse:




AutoScope 2.0 : The Reboot!

It’s been a long time since I’ve worked on this project. But, thanks to students and professors around the world, I’ve been prodded and motivated to restart the project.

Sometimes waiting pays off, as someone designed a while new mount for the AmScope that fits it perfectly. No more belts! After much tweaking I’ve got gears properly sized, in OpenSCAD (so you can modify for your scope), and X and Y are moving fine.

I’ll be doing more write-ups soon, and all files will be posted (likely on Thingiverse and GitHub). Here are some links to keep you busy for now:


AutoScope : Part 5 : Displays

Dr.  Dan Kott is a task master. At this point I’ve got steppers working, IR and Joystick Control, and have figured out our 3D printed part issues (at least when it comes to gears). In about a week. But, what does he have, more!

Take this with a grain of salt, because I consider Dan a friend. This is an inspiring person. A Renaissance Man in the truest sense. Tell me how many 85+ year olds are have more Raspberry Pis and Arduinos than most people have TVs. I’ve joked with him that his living room has enough computing power to send mankind to the moon. But, the moon would not be good enough for him — Mars, at least.

So, Dan wanted a display. I wanted to go with a large scale LCD display, but — I don’t have enough free pins on the microcontroller. (Most basic LCDs require at least 6 pins, and I’m using a cheapie Nano — which is busy doing motor control and IR remotes.)

And so I hunted down a cheap I2C (serial) OLED display on Amazon. These are pretty amazing devices, since you just need two pins to drive them (clock and data), plus power. Horray! A display that uses fewer pins.


Oh, but so small! Here it is next to a larger sized LCD display:

AutoScope_DisplaysAnd can you guess what problem I had? Not enough I/O pins? No, I went with a serial display to avoid that. But, the library size!

LadyAda has created an excellent OLED library for this type of display. But, when I try to compile — not enough memory. At first I was going to “slim down” her library. But I gave up. Instead, as a good programmer does, s/he finds an optimized version of the code.

Now, don’t get me wrong, Limor’s library is excellent. But I didn’t need graphics. I just needed text. And found (on github, again) a basic library called SSD1306Ascii. The SSD part is the display driver chip. The Ascii tells us that it only displays ASCII text (letters/numbers/basic characters).

With this slimmed down library I was able to compile and load the code onto my Arduino Nano board and get things running. With the remote, I can even enter direct coordinates:


Next up: improving the motor mounts