ALEX HATTORI

View Original

I <3 3PCB

I recently spent some time working on some new PCBs for a few projects.

First I made a two motor brushed controller for small robots (beetleweights in particular). It’s based on the Ti DRV8872 chip which has an h-bridge, current limiting, and over temperature protection. The board takes in RC pwm and controls two motors for normal robot use. It uses an atmega328p for the microcontroller since I already had arduino code for reading an rc receiver, and the atmega328p is cheap and certainly fast enough.

To save space in my robot, this is the first board I made that doesn’t have a programming connector. Instead I solder some 26 gauge wire on once to program it and then desolder. I considered using pogo pins but will save that for if I have to make more than 5 of these.

The whole board is only .7”x.75” so it fits in any robot I have.

Assembling the boards is not too bad. I use my heatgun to flow the solder paste initially and then use my newly acquired metcal to clean up any bridged connections.

I also use a modified firmware version of the board for my swerve drive modules.

Another project I’ve been working on is a side project for YoYoFactory. At the moment I’m playing catch up with what they designed 10+ years ago since the hardware they used no longer exists.

Essentially it’s a yoyo that is a brushless motor. Magnets are embedded in the walls of the yoyo, and a pcb floats on bearings and remains stationary relative to the yoyo. It uses an electromagnet to push the magnets on the yoyo, and remains still due to the torque from gravity on the eccentric board.

The problem they ran into is that they can only make the outside of the yoyo so light, and the pcb occasionally starts spinning. To fix this I’m adding a simple analog gyro to detect rotation and shut off the coil. Only problem is that I need to recreate what they did with modern hardware and my own firmware first. Previously they also only used a low side mosfet to drive the coil but I’m swapping that to an h bridge in case I want to try other techniques for controlling the yoyo.

I only spent about 30 minutes on the firmware so its nowhere near done yet. The yoyo can continue its spinning for a bit but in reality it needs to be able to accelerate itself to high speeds. More firmware diddling to come.