Last Hurrah!¶
Final Countdown¶
Hopefully this is my last week as a Fab Academy student. At this point I’m Conditionally Graduated so just tiddying up some loose ends. Namely a quick last update on the development of Dotum. Last as a Fab Academy Progress Update at least. I still own a Dotum domain, maybe I’ll have an actual page there, or redirect to GitLab…
What’s finished¶
This year things changed a bit but at least there weren’t any catastrophic failures like electronics just refusing to cooperate…
Mechanics¶
Moving to metalic springs means I could shrink everything way down. I only kept the steel structure for the weight, the slew bearing and the sensor distance flexure. Scrapped everything else and started from scratch.
1st Prints came out nice.
I wasn’t 100% sure the tiny slit would let the spring but I was hopeful.
Worked like a charm…
Making sure every hole/thread lined up took soooo looooong.... Had to change objects from solid to wireframe so much. Now that I think about it I didn’t even remember to check for keyboard shortcuts.
Should have left these holes slightly wider appart.
Just barely…
Everything looks decent, they don’t fit too well because the overhangs weren’t very tight so the bearing’s pushing out a bit. Didn’t want to sand anything. I always avoid sanding plastics; there’s enough micro-plastic problems to justify sanding an early prototype.
Magnet needed a bit of a shove. Also should have mounted it on the other side. That flipped the orientation of the sensor and complicated things a bit later on.
Everything lined up on the old slew bearing.
Modeling the threads works so well. At least the first few times they tap their own threads and hold on pretty well. Especially if they weren’t printed vertically. Resin printers should have enough resolution that the screws don’t tap themselves. Harder, brittle resins might not like this.
The problems of modeling without wires is we sometimes forget they exist and need to be routed somewhere…
Old flexures new holders.
They give me a few milimeters of adjustment. Sensors are mostly identical but magnets strength may not be. There has to be some way to fine tune magnet distance at least during testing. In manufacturing it’s probably cheaper to test every magnet batch. And deal with any runaways.
Also line up. #Yey
The MDF top plate was easier to carry to FCT. But everything looks awesome.
After so long it feels so good to see things working exactly how we designed them.
Moving things around.
Electronics¶
Electronics gave me such a headache… Mostly my fault. I now have a very specific hate towards milling pads for Quad Flat Package chips. Just FabAcademy stuff I guess.
Mostly wrong assumptions. Electronics on simpler, smaller scales aren’t as fool-proof as the large modern stuff is.
Eventually I did get everything working. Just about. There was so much to debug and document I made a 2nd Input Assignment page.
First time testing the sensors in place!
Getting some action from all 3.
What’s Almost finished¶
Now that I had electornics I could finally test the code I wrote last year. Somethings were fine, some weren’t. I didn’t do a physical wired remote to trigger the coordinate readings as I figured I could use the ESP32-C3’s potential and control it with my phone or something. So between a lot of updating and finetuning everything had to play nice with a webserver on the ESP32..
I didn’t manage to get it 100% working but I think there’s enough to graduate at least.
Code¶
The code I wrote last year was just shy of 300 lines of code so manageable but I wanted to tidy things up into different files so I didn’t have to scroll up and down as much as things grew in complexity.
As I was also getting tired of how long it took Arduino IDE to compile everytime I started looking at alternatives and Visual Studio Code with PlatformIO were worth a shot.
I’m quite happy
Ended up with 7 files.
- Main.cpp - Holds the very basic code that makes Dotum run. Basic variables and the Setup() and Loop() functions.
- ServerSetup.h - Is a basic Header file that contains details on the ServerSetup.cpp file. Declaration of variables and functions.
- ServerSetup.cpp - This one contains the basic innerworkings of the webserver (I’m using the official Espressif library). These are the functions that control the interactions between the web page and the program running within the Micro-controller.
- WifiSettings.h - Welp, pretty self explainatory. I moved variables related to connecting to the Wifi to this file. SSID, Static IPs, etc…
- htmlContent.h - Just the char variable that stores the full html code of the site running on the webserver. In the future I’d like to try and test the ESP32 file systems and include an actual .html file.
- CMMfunctions.cpp and CMMfunctions.h - These have everything that manages interactions with the sensors and coordinate conversions.
Maybe the thing that ate up more of my time was dealing with the Radial sensor readings.
It probably should have been an incremental encoder instead of an absolute one like the others… The precision is great but there are a lot of logic checks to deal with underflow and overflow whenever the sensor wraps around.
A larger diameter on the reel, faster polling rate, higher threshold delta threshold and maybe throw in the trigonometry checks I thought off last year and I’m sure I can fix it. Even if it’s more cpu demanding. The ESP32 can take it. Or I’ll throw in another micro-controller just to run the math and the ESP32 handles everything else.
Since I had the LEDs might as well use them to make sure the webserver is working 100%. Clicking the buttons give me some coordinate number that in theory should be .asc Point Cloud compatible. Not the best delivery vehicle and they’re surely wrong for now but the basics are working… Mostly.
Box, Handle and Trumpet Thing¶
No box, did one last year and the electronics bailed on me. Now they are working but I also know a few things I should change so no point. Next version might get a nice enclosure.
Did the resin handle for Casting and Molding but didn’t get to use it.
I couldn’t find a model I did last year of the tip that helps the wire act as a lever to move the assembly. I needed it because to be as precise as possible that part needs to have the tiniest hole possible for the wire to pass through and that needs testing on the prints to make sure it doesn’t close on itself. I didn’t have time to test it again as I didn’t go as much to FCT this year so I’ll skip it for now. There are modeled threads to stick one in though.
Once that’s done it’s worth at least printing a handle again.
What I Did Wrong¶
Assuming I2C just worked was a mistake. Trying to print the springs was a fun and interesting mistake but a mistake nonetheless.
Putting the Radial magnet on the wrong side also flipped the sensor’s orientation and direction so when dealing with the wrap arounds that took a bit extra mental power to manage.
What’s Next¶
I dunno. I’d like to take another crack at this in a bit. Redo some things that are easy to fix. Finish the program that I know I’m close. By the end only 1 of 2 boards were working so I was scared to push it too hard with the programs I was testing.
We’ll see. Next year I want to maybe be an Instructor but I dunno if there are enough applications at my local Fab Lab. And I’ve been meaning to help Krisjanis a bit with the Fab KiCAD library for quite some time now but haven’t managed yet.
Toodeloo! =)