Topic: [WiP] Electronics overhaul (Updated to part 4)
Okay, this will be a several-part mod. I will post details each weekend as I progress.
With the stock solidoodle I didn't like a few things, so here is my plan:
Get rid of wireporn behind it. I'm too lazy to unpack up my nice 8 atm. air compressor each time I need to clean it.
Pop in a nice&fast minipc for network-friendly printing.
Remove filament holder. It takes tup too much space
Hook a 450W ATX PSU, instead of stock one. Delivers more current, has a nice green wire to turn off&on from an AVR, develivers 5V standby voltage.
PROFIT
Part one.
I have reorganised the electronics a little bit, added a USB hub (1.1 actually, but so far 12Mbits of bandwidth should be sufficient for both the printer and the webcam.)
I hacked the hub a little bit, so that I can inject 5v via a JST cable, and have a shorter cable to sanguinololu and a shorter USB cord
This will deliver 5v power for both the minipc and sanguinololu. Lucky me, the minipc have all 5v rails wired directly to
As the brains I picked a nice 40-buck minipc based off allwinner a10 armed with debian wheezy armhf. Raspberry is far to big, ugly and slow for that. This one just boots, hooks to my wlan network, and all I have to do is type "http://solidoodle/" in my browser. For the UI I'm using octoprint.
I ripped all the mali and gfx stuff from kernel, so that it will not eat up any ram and I will have a solid 1GiB of SDRAM for my stuff.
I also posted some info on these cs102 variation of those, with instructions how to add a serial terminal here: http://ncrmnt.org/wp/2013/05/27/cs102-i … ng-a-uart/
The results look somewhat like this
Next part will be hooking a heavily modded ATX power supply and printing a full cover for electronics. Since motor drivers tend to heat up, a10 can get also quite hot under load, I plan to install a fan with a dust filter in the cover.
P.S. Does anyone need bootable SD card images for allwinner a10 minipc? Please note, that these may be tricky, since some of those need AXP209 driver enabled in the kernel to work properly, others lack the axp209 PMIC and may not boot. They may also have different wireless chips, some need some linux kernel hackery to work, so these may not suit for all.
Part two: ATX adventures
PLEASE NOTE: THIS PART MESSES WITH THE GUTS OF A PART THAT DEALS WITH MAINS VOLTAGE, THAT CAN BE LETHAL FOR SOME PEOPLE. IF YOU DON'T HAVE THE SKILL - DO NOT DO THAT. EVER. I TAKE NO RESPONSIBILITY IF YOU SCREW UP.
Oh, and make sure you do not drink any alcohol before that. Drinking and messing with mains voltage has never been a good idea, but alcohol also lowers body resistance, so you'll have a worse shock.
The following shit may also void solidoodle warranty.
Enough of scary stuff. Since image upload on PunBB just freaks me out, you can follow all the pictures of this hack right in here
ATX looks like the PSU of choice here, since it has all the goodies:
A dedicated pin to turn it on/off
A voltage status pin
stdby voltage
Can deliver a lot of current
Cheap
So, I looked around and picked a 500W PSU I had around. Despite an ATX PSU has a LOT of wires, there are only 5 voltage rails there. Mine had a nice chart with curent rating:
28A @ +3.3v
38A @ +5.0v
20A @ +12v
0.8A @ -12v
2A +5v standby
-5v is dead and buried long ago and removed from the spec. We don't need that anyway.
As you can see from the table above, this is a LOT of current. Enough to power 2 solidoodles with that 12V rails at the same time. However the stock ATX wires didn't look like they could handle that much current. Or may be they could, but I didn't want to experiment. Therefore I cracked the ATX supply open, removed all the GND, 12v, 5v and 3.3v wires and replaced them with extra thick 4 mm^2 wires that connect to the screw terminals.
That may be a little bit of an overkill, but I only had 1.2 mm^2 and 4mm^2 wires, so I picked the bigger ones.
(Spec recommends using 4mm^2 - 6mm^2 wires when routing mains voltage into a house. Just for you to know that this was indeed an overkill. AWG18 looks like the sane choice here).
2 Soldering irons (a usual smt rework and a powerful 60W), hot air gun, and a hot glue gun are required here.
The procesure is simple:
Note the voltages.
First, gently remove all the stock ATX wires, by heating the side the board with hot air.
You will only want to keep Green (/PS_ON), Grey (PWR_OK), Blue (-12V), Purple (+5VSB). These can hadle the current. We'll need them later.
There's also a brown wire connected to 3.3v. This is the sense wire, that allows the PSU to compensate the voltage drops on the wires. A good idea is to solder a 100 Ohm variable resistor so that we can adjust it whenever we need it. I did that and hot-glued it the case.
Then, drill the board so that 4mm wires would fit.
Fit in new wires, use a powerful soldering iron (60W or more) to solder them.
Use hot glue to fix them in place, so that they won't break away, when you assemble the whole thing.
Since the solder blobs may be rather big, it's a good idea to lift the PCB a little bit with brass M3 standoffs. Covering the bottom of the board with urethane is also a good idea. Just give it 2-3 layers and give the time to dry. It stinks, but gets the job done.
Finally, drill the metal case of the power supply, where you want to fit some screw terminals with 2.55mm drill bit and tap M3 threads. We can save a little bit on nuts this way.
Next, cover this part of the PSU with capton. It will serve as an insulation and provide a little protection against accidental shorts.
Now, assemble the whole thing, check it for shorts. Tripple check it for shorts. Quadruple check it for shorts. Then test it. If you don't get smoke and sparks, and multimeter shows realistic voltages - you're good to go.
Next we'll need to connect it to solidoodle. Follow sanguinololu pinout, and connect the 12V voltages. +5 V standby voltage in my case powers the sanguinololu and the CS102 minipc. I'd rather NOT use raspberry pi, since it's huge, ugly and really slow. 1Ghz Cortex-a8 gives a very fast&snappy web-ui.
Next, we need to control the PSU from sangunololu. I used the ISP header MISO, and SCK for that, although you can use any GPIO pins for that. Since /PS_ON is routed directly to a base of the transistor, nothing more required. Just hook this and PWR_OK directly to the pins.
Part Three
Firmware hacking.
This is rather simple. The curent git has Makefile broken yet again, now missing hysteresis.cpp from sources.
I quickly added P0/1/2 commands so that I can disable the PSU with P0, enable by P1 and check PWR_OK status with P2
Rather hacky, but still.
The patch is attached to this post.
Mind, that it also reorganises the steppers a little bit, since I had to swap some of these for the wires to fit in new placement.
Part Four
Web UI.
For WeUI I picked Octoprint. It needs a few hacks to work properly with solidoodle.
First, manual baud is broked for 250000, and AUTO connects at 38400 (?) according to the log. The way out of it here is to increase the timeout.
Next, I wanted PSU on/off buttons right on the WebUI. Easily done.
Next, Octoprint had separate buttons for HOME X/Y and HOME Z. I wanted another button that just sends out G28 and add some more distances to the bar.
Patches:
0001-Add-buttons-for-PSU-hacks.patch
0002-Increase-timeout-so-that-solidoodle-would-work.patch
0003-Rework-control-panel.patch
Screenshot of the modded UI below.
That's it for this weekend. To be continued.
TODO:
* Stock on ABS
* Print back cover
* Print PSU top cover
* See if Octoprint's API is of any good and write an android app. Managing from phone via web-ui is not really comfortable.
* Rework fan control and an a custom fan control board.
* Firmware update via bootloader broken after octoprint exit. See if this can be fixed.