Sunday, November 14, 2010
Friday, November 12, 2010
This firmware has reached the point where it needs wider testing. You'll need a system that has gnu make, avr-libc, avr-gcc and friends to compile as I have no idea how to wrangle the various IDEs into doing what I want. You'll also need avrdude, or some other way of getting the compiled firmware onto your atmega.
git clone git://github.com/triffid/FiveD_on_Arduino.git git branch -r git checkout release-candidate-triffid cp config.h.dist config.h ### edit config.h and Makefile in your favourite editor ### make make program
If you have ideas on how to make this firmware easier to access, please post in the forum thread ("compile and load in my favourite IDE" a given- but what needs to change?). Other ideas and contributions are welcome too :)
Thanks to traumflug for his numerous contributions, jakepoz for gen3 electronics support, and numerous others who helped with suggestions and patches.
Thursday, February 25, 2010
Here's my homebrew motherboard freshly kitted out.
The arduino sits in a reverse shield of my own design, with pin sockets either side and bridges going from one line of sockets to the other. Hard to see in the photos are some wire clips that hold onto the mounting holes to help keep it steady. It's surprisingly snug with this arrangement, barely moving even when I connect the usb plug.
The ATX connector is made simply from some tinned copper wire. I'll probably put in a proper connector when one becomes available. The 12v connector in the middle of the board is vestigial, and will be removed when I add some pins for the ATX 12v extension. Multiple 12v and ground wires are absolutely essential, considering how much current will be drawn from them, as well as the likelihood of vibration.
The jumpers near the motor controllers are connected to MS1-3 so I can change the microstep amount simply and quickly. Z needs none, extruder needs it all and I'm still undecided on how much X and Y need.
At the bottom of the board next to my MAX6675 are a pair of power mosfets for controlling the extruder heater and one other item- bed heater or fan or something. The mosfets are IRL3803s which according to my calculations can handle 16A with no heatsink and 4.5v on the gate.
The headers between the arduino and the atx connector are for the end-stops which I'm yet to make.
The bottom view shows a rat's nest of point to point wiring which I'll clean up if it proves to be problematic. Signal lines next to high frequency high current PWM lines are usually a recipe for disaster, but the motor modules are so small that I'll just have to see how I go. Twisting and decoupling helps immensely, but is by no means a magic pill.
Wednesday, February 17, 2010
Here's my X carriage 360 end assembled. Despite the significant errors made in these pieces, they fit together surprisingly well. I haven't fitted the adjustment bolts as the wings hold on quite tight enough without them. I think this is the first bearing runner I've made to date that doesn't try to rotate around the bar while moving along it- all my errors must cancel each other out, or this particular section can deal with gross imperfections better than any of the others I've made.
In other news, I found some linear acceleration stuff to put in my firmware and I seem to have most of the bugs out of it.
The acceleration code ganked from the official FiveD firmware acclerates by a set amount each step but steps get closer together, so acceleration is exponential and deceleration is logarithmic, making really high speeds impossible to attain. The above mathematics allow a constant acceleration profile with only a little integer math each step, which is ideal for us.
It needed some adaption because it was created to move a fixed distance in a certain period of time rather than change from one speed to another while moving a fixed distance, but everything needed to adapt it is there.
Thursday, February 11, 2010
Here's my first X 360 Z Bearing Plate and mirror. Tolerances are lovely and wide in the mendel design- even though these plates are so obviously out of whack, they still roll nicely up and down the rod. Despite this, I will re-do some of the holes, and endeavour to make the next pair a bit more neatly.
These pieces I think are some that should be made from hardwood. Pine and similar softwoods simply don't have the structural integrity to stand up to the forces involved in machining them, and would probably snap after a while in use due to the forces applied.
Monday, February 8, 2010
Here's my MAX6675 hooked up and talking to my arduino via SPI. It reports the temperature of the thermocouple every 1/4th of a second with a precision of 0.25 degrees and an accuracy of about 2 degrees. This particular thermocouple may prove a bit awkward for my extruder, but I haven't yet found any bead-ended ones that could handle more than 250 celsius locally.
In other news, my FiveD on Arduino project is coming along nicely. It's at the stage where I need to complete my mechanical construction and start testing with an actual machine. Feel free to help me on that score ;)
Saturday, January 30, 2010
Here's four A4983s under a 40mm chipset cooler. Since my first experiment with heatsinking worked so well, and at the same time showed where things could be done better, I cogitated for a while and came up with the above. As you may notice, they're not nearly finished yet- only two have sprouted enough wires to control, and they're only temporary until I obtain some more headers and some more screw terminals.
The current adjustment pots are sticking out the sides, and I cut channels in the heatsink base so as to not foul the onboard Vmotor capacitors. If ever I remove the heatsink I'll grab a photo, but if you imagine a keyway in the face of the heatsink you already know what it looks like. There's also a 7805 and a large capacitor, and a liberal sprinkling of 100nF decoupling capacitors. You can never have too much decoupling when high frequency, high current PWM and logic signals are in the same vicinity. The motor wires are twisted even over these short runs for exactly the same reason.
Although I haven't measured the new maximum currents I don't think I need forced air, but I prefer having it set up to remove rather than trying to shoehorn it in later.
I think that this may become my reprap motherboard- what more do I need? A temperature sensor interface (max6675 and thermocouple waiting to be hooked up and tested), a mosfet (I have some of the amazing IRL3803s on the way) for the heater and some end-stops (already arrived, ironically lacking 390R). Should be plenty of room for all that plus my arduino on the unused board space, and I can run the lot off the 7805.
Wednesday, January 20, 2010
Official FiveD has a liberal sprinkling of floating point math, some even in interrupt context! The floating point library for Atmega takes up over 2k. The FiveD firmware is written in C++, which is lovely on desktop systems but adds lots of costly and unnecessary overhead in the context of microcontrollers.
So, I'm rewriting the firmware in C with 100% integer math. My target is to keep it under 14k so I can keep the bootloader, but I'll settle for 16k if necessary. So far, I've replicated about 95% of the functionality and have used less than 9k of the 16k available on my Arduino.
Currently it compiles but is mostly untested. At this stage, expect serious bugs and frequent radical changes. I will make a release when I have successfully printed my first mendel part with it.
If you want to see where I'm up to, FiveD on Arduino at github.
Comments? Suggestions? Bug Fixes? FiveD on Arduino Forum Thread
Thursday, January 14, 2010
Race End View
Here's my X Carriage. I'm really not sure why the top is pine and the bottom is hardwood- perhaps because I prefer doing weird angles and things in hardwood. You may notice that the belt clamp section is missing a piece, this is because I didn't have any pieces of wood tall enough. I'll just screw/glue a section on if necessary, however I may not need to since I'm using ball chain. You may also note the print-outs glued on the ends, which guided me beautifully.
The trapped nuts were fun to do, about 20 mins each with my dremel's small round engraving bit. I then glue the nuts in with PVA to stop them escaping, without making them impossible to remove.
I also added some cut-outs to the bottom so the angled bearing screws would sit nicely.
Friday, January 8, 2010
Some spent hacksaw blade sacrificed itself for this adventure, providing a lovely balance of springiness, machinability and rigidity. The heatsink itself is part of an original pentium heatsink, cut to size. With this in place, I can squeeze 1.5A from my drivers, 3x what I had available before. Some forced air would probably increase that again.
Invisible in these shots is the paper shim I made to prevent components shorting against the heatsink's bare aluminium base. I simply cut some paper the same width as a saw blade, then placed it in about the right spot and rubbed with a pencil to give a lovely outline of the chip. A few deft swipes with the box-cutter later and I have a neat shim. I may remake them from plastic if necessary, but this is fine for now. Electrical tape would probably work beautifully too.
Here's the extruder block from yesterday with a motor installed. I've been extruding satay sticks and things to test, and it seems to work nicely. Vexingly, the friction in the holes in the wood seems to be enough to jam the sticks enough that the motor just rips strips off the outside. Not sure what I'll do about this, maybe widen the hole and stick in a plastic barrel or something.
Thursday, January 7, 2010
Extruder Block Front
Here's my extruder block. The addition of a usable bandsaw has helped immensely, and the pedestal drill is significantly tighter, although still can't drill a straight hole. As you can see, this piece is a fair bit neater than my others. I have tried it with my splined motor (no pics yet though), and it works fairly well on some copper cored wire. I haven't made the large cut-out for the thermal break yet as I haven't actually decided whether or not I'm going to make my melt barrel that way.
Originally, the bearing was too far over by about half a mm, so I enlarged the hole a little bit and put in a matchstick to hold it in the proper place.
I have read the A4983 datasheet with an eye to current capacity, and I will have to heatsink them. The current pot and Vbb capacitor on the pololu breakout boards are taller than the chip, so that will make it a fun exercise. I think I will leave the pot sticking out the side, and either put a copper strap over the chips or cut a recess for the Vbb capacitor. A 40mm chipset heatsink has made itself available for this project.