Open comments for this post
Rewrote all firmware; Fixing Servo Cover and a ton of other CAD; Almost fried everything
For the CAD, it doesn’t look like much changed, but I’ve basically redesigned a bunch of things and fixed tolerances and now it should move really smoothly. With the bearings added, everything moves incredibly smoothly now
Especially the servo cover was annoying. I needed to attach a magnet to the shaft which was really annoying.
I haven’t logged that well, I’ve done more like 15 hours of work instead of just 5 but whatever
Most of those hours was the painful debugging. RS-485 busses, JSON not communcating with the PC, dropped connections, corrupted data, disconnected jumpers, FTDI programmer becoming flaky for some reason
It’s just been pain :(((
Now the PC (screenshot) recieves all the data and sends all the data
You can see a lot (not all) of the telemetry being received. Ignore the volts though my math is wrong. Realtime connecting now works smoothly, as you can see the other RS485 servos are offline.
Open comments for this post
Bidirectional Communication To PC/RPi 5 with LeRobot & More CAD changes
I setup a basic class for my robot in LeRobot (which was a little confusing) and then I also got communication between the Pico and my PC working. Originally I have SPI pins exposed on my mainboard PCB to connect to the RPi 5’s GPIO pins, but for some reason after lots of debugging, even running it at super low speeds it just would not work. So I switched to just using serial over USB, and using the SerialTransfer library to send data more reliably.
The script on the PC now can send target joint angles, and receive a lot of data back, like if the joint is online, temp, current, angle, homing sensor, home status, LED, firmware version, voltage, etc
I also iterated on the CAD for everything, and it should be done soon. It’s just a bunch of tolerance fixes to make everything fit at this point and some new things like mounts for encoders and DC buck modules and fixing the CAD for the custom MG996R case.
Open comments for this post
Mainboard and other CAD
I got the mainboard to stack on top of each other with a weird jumper and two piece jumper holder and some screws setup which required some revisions and trying to get everything to fit. I’ve squeezed one of the DC buck modules into between the mainboard, and the second arm segment will hold the two remaining DC buck modules. The bottom mainboard PCB also has 2 smaller buck modules. There’s a lot of things going on with the voltages in this project due to the servos peak current draw being so large.
I also refined the arm segment CAD by some reprints and made the DS5180 servo fit better. I’ve also made one of the buck module mounts for the second arm segment to fit more cleanly.
Open comments for this post
Servo Control Working, More CAD and 3D Printing
I got the mainboard to be able to control the servo on the servo PCBs. I also tested a bunch of the functions, like the magnetic sensor, neopixel LED, etc
The communication now sends the PCB ID, and the target speed and the servo PCB echos it back and moves the servo.
I also worked on the CAD (and refined) for the mainboard connector that will make connecting the two mainboards not a total pain.
I also soldered the connectors on the mainboard PCBs for them to connect to each other.
Open comments for this post
Servo PCB Daisy Chaining Working
I plugged in the JST VH and JST 1.25mm wires into the PCBs, and they seem to work!
I adjusted the message struct to hold a desired PCB sort of address or ID. When the MCU detects that the ID matches the PCB (by using the solder jumpers at the bottom of each PCB to program the PCB ID), only then it lights up the LED and replies to the main board.
The mainboard now loops through IDs and sends a message and waits for a response.
I’m very very happy this worked without any really big problems.
Open comments for this post
Crimped JST VH wires, Connected JST 1.25mm wires, Soldered more PCB connectors
Crimping JST VH wires is a ton easier than JST 1.25mm, and after a bunch of failed attempts still, I got some okay crimps that work finally. It took me a long time because I didn’t know that I had to rotate the wire for the hook on the terminal to go into the housing hole, and then also that the box shape part on the terminal actually has to stick out of the crimper or the crimper will crush the whole terminal into bits
Open comments for this post
Finished Soldering all Smaller PCBs & Got RS-485 communication
working from main board to servo PCBs
First, I finished soldering the PCBs. I added the connectors for power
and the small data connectors. I also finished the servo expansion
boards that hold the magnetic encoder and sensor. I also finished
soldering the joint encoder PCBs that will track shoulder and elbow lift
servo positions.
I also got the bus communication to work. It was really really painful
and I was really scared it wouldn’t work.
First, the PCBs wouldn’t communicate at all. But eventually, I realized
that it was because I wasn’t supplying 3.3V to the main board. This is
when I realized that I haven’t adjusted the buck converters on the main
board to supply the correct voltage, so I was about to unsolder the buck
converter when I realized that I could just set the power supply to 5V
(which the ICs on the mainboard can handle luckily), and then adjust the
voltage down to 3.3V.
But after a really long time of debugging, it still wasn’t working. The
connection would sometimes work but was really flaky.
Eventually, I soldered on the RPi Pico 2 onto the board completely and
then found out the reason, it was because the ATtiny3216 was set to
clock at a slow speed that would mess with the communication. I made
them use the SerialTransfer library to send data more reliably and it now can communicate properly :)
Open comments for this post
Done Soldering Most PCBs, Crimped JST wires kind of
I’m pretty much done soldering, I just have like 3 more tiny PCBs and I should be done. The big main board PCBs are pretty much done, I just need to make some botched tall headers since the clearance of regular headers are too small, and the servo PCBs are almost done, with just some connectors left to solder.
Soldering JST 1.25mm wires ARE THE WORST EVER THING TO EVER EXIST
I spent 2 hours crimping terminals on multiple wires and its so so so annoying. I can barely hold the terminal itself and they are so easy to bend. I couldn’t afford the real tool to crimp them, so I have cheap crimpers that are the wrong size and can’t technically crimp these. If crimping the metal things wasn’t bad enough, inserting the terminals into the housing was even worse. The housing would bend, or I would accidentally somehow insert it where it shorts the pin next to it???
Also while soldering a JST 1.25mm connector on a PCB, I ripped the pads clean off the PCB. I guess that one just will be missing the daisy chain feature because it only has one connector for data now and all the components and MCU are already soldered on, which really sucks.
The rest of the servo PCB (4 in total for now) went fine though, and I’m getting faster at it.
Open comments for this post
Worked on firmware & CAD & Soldered Second PCB
I got the PCB and ATtiny3216 to power a servo. I soldered on the remaining components on it, like the custom LED (which just turns on when the motor is spinning for now) and the 100uF capacitor and also the RS485 bus IC.
I also changed the CAD of the arm to use a bearing and changed the servo horn to fit inside of the bearing. I’ve ordered right angle headers and the bearing and metal servo horn already. I also added some transparent parts to the arm design to make it look more interesting hopefully.
I also am almost done soldering the second servo PCB. Now that I have all the parts ready and I actually got better at soldering ICs I can do it faster now.
Open comments for this post
Finally got ATtiny3216 on PCB Working
This took so so long. Basically, I spent hours trying to get it to work. First, the 3.3V rail wasn’t getting power and the LED wasn’t lighting so I had to resolder the voltage regulator and then both green LEDs lit up, meaning everything was working.
Then I got my FTDI programmer, and plugged it into my PCB. Because I have a FTDI programmer and the ATtiny3216 has a UPDI programming interface, there is a resistor on the board to combine the two pins into one.
Even just getting megaTinyCore installed in Arduino IDE was a pain. The website that hosted the package info was down again, with an expired certificate. Apparently, this happens very often with it but I found an alternative mirror.
Then I tried flashing code, and it didn’t work. Then I realized that the board type I was using was the Optiboot version, and I couldn’t find the non Optiboot version so I had to flash Optiboot onto the MCU. I did not realize that doing this would cause problems later on. I also had to switch the programmer from the one that programs Arduinos to the UPDI programmer. But I STILL couldn’t get any GPIO to work.
I just tried things for hours. I switched to PlatformIO. I tried switching from C to Arduino in PlatformIO. I tried unplugging the programmer because I saw some voltage leaking from it. I tried emptying the caps and trying again. I probed every single pin to see if I wrote the wrong pin.
Then after all of that, when I switched to non Optiboot (having to find online that I have to downgrade megaTinyCore), and flashing that, it works. I think it was because flashing a bootloader burns some fuses to expect a bootloader, but when I flash my code it actually overwrites the bootloader code because I don’t have access to the TX and RX pins typically used to flash when Optiboot is installed, and that just caused the code to not run.
Open comments for this post
Finally got stuff to work
I’ve been dealing with the weirdest issues ever, and after just doing random stuff and waiting it finally works. I think. At least more than before
Downloading models from HuggingFace was freezing too, so I had to disable XET or whatever and it’s working now
Literally everything is not working for me. I have no idea why. These hours tracked don’t reflect time finding how to fix it its terrible
Some stuff with torchcodec being annoying and refusing to use my stupid FFMPEG dll files
Open comments for this post
Started on backend, Annoying bug that I’m trying to fix
I’m making a journaling app, where you can easily journal projects and then make media from it afterwards
I’ve set up a queue and server file to process jobs. When a journal is uploaded right now all files are added to a queue in the database. Images are analyzed using a local AI model, and videos are segmented first, and then each segment is analyzed. Only useful segments are kept
But I can’t get the segmenting model to work, this super weird FFMPEG and Torch/torchcodec thing just isn’t working for some reason
Open comments for this post
Worked on Model tab and Working on Refactoring Backend & Renderer Component
There’s now a model tab, also I made some more animations and things to make the app more fun to use. I’m also in the process of rebuilding the data types and completely redoing the reusable Renderer component since it was an absolute disaster before.
Open comments for this post
Completely Revamped UI and Working On Refactoring Entire Engine
I really tried making the UI look a lot nicer than the generic UI it was before, and I think it looks pretty nice. I might need to simplify some stuff, but I spent a long time trying to make the UI more welcoming and easy to use and for the UI to seem more playful in a way I guess, than the more mono font boring gray it was last time.
I also have started on completely refactoring the engine. The previous data stores and data types were too limiting and I made some bad decisions early on so starting from scratch is kind of necessary
Open comments for this post
Soldered Smaller PCBs, Ordered Missing Parts, Continued CAD work
I soldered most of the small PCBs, but now I need to order the parts I missed from the first order I placed. I’m also running out of 0.1uF caps, which sucks.
I added a spot and holes for a fan on the camera mount and also some arm segment CAD improvements and back plating to hold the metal rods in. I printed out a test and it works fine.
As for the PCBs, I’m still waiting for a few parts.
Open comments for this post
Continued Soldering PCB (Diodes/LEDs, power circuitry, etc) and worked on arm CAD.
For the PCB, after some time, I got the power switching circuit to output power. It’s a collection of things that I hope will make it safer, with a some diodes and a fuse, some MOSFETs, so the main MCU can command to send power, and also another stage that requires the E-STOP to not be pressed to actually be able to send power through with two MOSFETs (one main power, another switch the main MOSFET).
I added a fan to the global shutter main wrist camera since it gets hot, and added a new “head” to the arm segment CAD (the heads are swappable depending on what you need to print) for the smaller motor for the last DOFs in the arm. It fits my custom daisy chaining two part PCB hat for the MG996R to give it current, temp, power sensing, and daisy chaining power and data via a RS485 bus with an onboard MCU to provide communication and control. I added some holes for airflow for this PCB. I also added some screw holes to actually connect the halves of the arm together.
Open comments for this post
Continued Soldering and Working on CAD
I snapped some headers and soldered on some more ICs on the PCBs. I did also mess up and ordered a wrong footprint for a part, so now I have to delay that too. It’s so tiny I can barely see the pins.
I also worked on the CAD, where I designed the stereo camera holder, added a spot for the RPi 5 to go on top, and maybe a display. I also made a V2 of my grabber since the old one didn’t work well.
It also seems that Stardance isn’t syncing my time properly, and it’s missing a few hours so that’s annoying :(
Open comments for this post
I soldered some parts on the PCB, and worked on the CAD files some more
I did realize that I forgot some parts, so I ordered them on DigiKey. I’ll continue soldering the rest tomorrow. One of the parts was the LDO, which I only found out because I soldered the parts and realized that the voltage being put on the 3.3V rail is 5V
My project needs both versions of the same LDO and I only bought the 5V one
I also bought the wrong resistors. I’ve ordered them and they should arrive in a week or so.
My design of stacking the PCBs and then adding the buck modules in the middle might be very challenging, and I might need to stack multiple headers on top of each other to fit the modules inside. Hopefully it will still fit inside my arm segment and not short anything. There also needs to be sufficient airflow, which is def a challenge
Open comments for this post
Added constraints, which took a while because the way I store objects just isn’t sustainable
I’m going to redo the entire architechure of this app, mostly the backend because it’s just such a mess. I’ve been piling on features and the technical debt and poor early decisions are catching up to me and it’s making development slower so I’m going to start refactoring a lot of stuff. This should mean everything will be less buggy and make it faster for me to develop new features
Now that I know how the app will be I can make smarter decisions
Open comments for this post
Added Bottom Reinforcements with holes for magnets and wiring
Added Fans and airflow holes
And just fixed and refined the CAD, like adding spots for magnetic attached front and back plates and more