Wednesday, September 18, 2019

Ender 3: Buying and Upgrades

It has been a LONG summer without access to a CNC mill, I need something that can turn my CAD into parts with the power of robots. CNC mills are expensive and heavy, so I settled for the next best thing: a 3D printer.

I found what looks like the cheapest viable printer: the Ender 3. I bought it for just over $200 and it can print PLA and ABS out of the box. The frame is all-metal so it is pretty rigid and since it ships as a kit everything is pretty modular and easy to change.

As soon as it arrived I set it up following their guide and started printing some PLA.


I played around with the temperature, feed rate, and acceleration and ended in a good spot for PLA; the benchy didn't look too bad and I can do small parts in 2-3 hours.

Manually leveling the bed takes a long time and the stock adjustment springs aren't strong enough so the leveling knobs move from vibration and the bed only stays level for a few prints. I found that by moving the Z limit switch down the new Z0 position compresses the springs more, which puts more friction on the knobs and prevents them from rotating.

The extruder has a temperature limit of 260C and the bed has a limit of 125C so I can't print anything that takes too high of a temperature. The extruder temperature limit is low because there is a PTFE tube in the hotend heat break and even running it at 260 for an extended period sears it. I want to be able to print some more exotic materials like nylon and polycarbonate in the future so the hotend is going to be upgrded.

The bowden extruder also ended up causing some minor issues with stringing and the high retract distance slowed down printing times. PLA and ABS weren't too bad but I tried printing some TPU and that created full walls out of strings.

I found a thingiverse model of a prusa print head that was modified to mount onto an ender 3. This combines an e3d all metal hotend with bondtech gears and a stepper for direct drive. It also has a bltouch probe mount so I was sold. All I had to do was buy a $15 extruder, $10 bondtech knockoff gears, and a $20 bltouch kit. 

Here are all of the parts needed after I printed them:


The knockoff e3d hotend I bought was taller than the original, so I had to modify the STL files and cut away a big cylinder where the tall fitting intersected. 

I also changed a few hole locations and diameters because I wanted to use some spare plastite screws from BDE to assemble the entire thing.

Here is the finished hotend:


I ordered a roll of nylon filament that I will try printing with when it arrives. With these modifications I am hoping for some good results.

Dual Brushed Motor Controller

So far, I have been using modified vex 29 motor controllers for the drive motors on all of my robots. These are fine for small, lower power drive setups in 1lb and 3lb robots; but I want my newer robot, BDE, to move faster to maximize weapon bite on opponents. BDE's weapon already runs at 6s so if I can build a 2 in 1 motor controller that can run at that voltage, I can increase the speed of BDE while decreasing the size of the drive electronics by integrating two motor controllers into one.

Additionally, I found that spektrum has documentation of their satellite receiver protocol for toy manufacturers. If the board I design can use the satellite receiver instead of accepting two PWM inputs, I can reduce the amount of wiring needed and decrease the size of the receiver. The receiver I have been using, the orangerx R610 is far larger than satellite receivers I have found.

I started off browsing electronics vendor websites, looking for suitable hardware to run 2 motors at 30V and a small microcontroller that run with a small footprint (integrated clock etc.). I ended up selecting:
STM32F041 (small and easy to program microcontroller)
DRV8870 (30V, 1.5A H-bridge driver)
IFX91041 (3.3v switching regulator)

All of these components are pretty small, so laying them out in a small package wasn't too difficult. I actually ended up with a board smaller than a single vex 29 controller, so I think I did pretty good.



I sent the boards out and two weeks later I had all of the components to assemble a few.

I procrastinated a little on the programming, so naturally I had to make all of it after assembling a board. Luckily it wasn't too difficult. The main problems I encountered while programming was from the built-in HAL drivers. I had some issues with the microcontroller functioning correctly for a small amount of time, then getting stuck in loops that weren't in my code and not going into a failsafe correctly. I had to make my own startup assembly code and completely cut out all of the HAL drivers, but after I had code that did exactly what I wanted it to.

Here is the board next to a Vex 29:

And here is a comparison between my old and new drive motor controller and receiver combo:


I'm happy with this motor controller so far, It can handle my stupid 6s botkits drive pretty well. In the process of finding documentation for the satellite receiver, I also found some information about how somebody reverse engineered the DSMX protocol and made their own telemetry receiver using only a CYRF6936 chip. A future board will probably have an integrated receiver.