Category Archives: 3D Printing

AutoScope 2.0 : In Search Of Home

It’s so simple a problem that it’s a giant pain in the neck! To further automate the microscope, I need a way for the program to find a “home” position — a starting point. Something that won’t strip gears, crack slides, or otherwise cause mayhem.

Most X/Y/Z devices (3D printers, laser cutters, CNC routers, etc) use limit switches. The trouble is the way the microscope stage moves.

X – Moves just the slide left/right
Y – Moves the stage forward/back
Z – Moves the entire stage up/down

So, you either start attaching switches in weird places (on the stage, on the body) or come up with something else. Added fun? The top limit of Z should change depending on the objective lens. And, by the way, not the entire stage moves for Y — just the very top of it. But, Z does move everything. You start to see my problem.

How to cleanly find home, inexpensively, with as little modification to the microscope as possible?

I’ve looks at more sensors than I wish to admit:

Time of Flight (Laser) — Good for finding a single direction of movement, but I’d need three at $15 each. I tried some ideas of using just one for X and Y, but that didn’t pan out.

RGB Sensor Through Eyepiece — Find the “dark” / black and you determine the edges of the sample. Works fine, in a controlled (dark) environment, but reflected light (from the room light, bouncing off the top of the slide) messes with the readings.

Hall Effect Sensors — Like switches, but triggered by magnets. Most promising, but when Z is moved, their point of triggering changes. I pretty much need a constant/known distance between magnet and sensor.

Accelerometer / Magnetometer — AKA Gyroscope and Compass — Good for finding Yaw/Pitch/Roll, but since the microscope doesn’t Yaw/Pitch/Roll, not helpful for me. The stage movements are too small to accurately tell if its moving in a particular direction. Perhaps this is a solution, but I’ve not figured out how to tease out good data.

I was also thinking of a proximity sensor, like the one found on our Prusa 3D printer. Kinda like a Hall Effect without the magnets. But, the sensors aren’t cheap ($15-$30 each), pretty big, and I’d need three. And the whole range of motion problems and where to mount them.

This is the Y switch. You can see how part of the stage (toward top) moves, bottom part doesn’t.

So, for now, I’ve admitted defeat and gone back to micro switches. I’m hoping to get them working “good enough” so that I can write code. For now, the focus (ha-ha) is on X and Y. I’ll add Z later. (Z is less important, as the focus really needs a human eye, or smart AI.)

The X switch. Using a “finger” on the stage I printed. The program will find Y first, to move the stage closest to the user/switches. Then will look for X. Final program will lower to find Z, then Y, then X.

ESP8266 Digital Pocketwatch — And Network Sniffer

Pocket watch or network sniffer? Not sure. Both? A portable web server? I haven’t figured it out yet.

Using a recycled LiPo battery from an eCigarette. MakerFocus ESP8266 WiFi dev board with 0.91″ OLED display and charging circuit.

The 3D printer makes iterating though designs easier. A lot of unused parts, but we use them during classes to illustrate the progression of work — it’s not right the first time! Or the 5th!

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).

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: https://amzn.to/2Q8Z8Mj

Or, four packs (4 pieces per pack) of these: https://amzn.to/2SripW9

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: https://amzn.to/2KO6ore

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: https://amzn.to/2KOH9Fl

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: http://html5gamepad.com/

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 (https://github.com/nelsonii/XBOX-Adaptive-Controller).

You can also find the 3D Model at Thingiverse: https://www.thingiverse.com/thing:3250017