Tiny(melon)Troller?

In the spirit of eventually working towards running in-house developed equipment on all of my vehicles , I decided to man up and finally pitch Tinytroller at the final boss fight of scooter controllers: controlling the Turnigy C80/100 “melon” motor that runs melon-scooter.

Melon-scooter has been out of service for about a week and a half – the chopped Jasontroller worked extremely well until I let it out of my sight one Friday night at MITERS when a bunch of freshmen and new members were in attendance. When I attempted to leave later, I found that the motor was shorted through the controller and there was no response from it when powered on. And of course the froshlings had all quietly left by then, with nobody telling me that my scooter was behaving a little strangely and not like… going and stuff.

Hmph.

Anyways, I’ve found derpybike to be quite useful in the mean time. Since the failure was totally not under my control, I can’t quite tell what went wrong. When I opened the case of that controller, nothing appeared to be burnt or detonated, but some FETs are most definitely shorted through and the drive circuitry is dead. I’ll probably just order up another Jasontroller (or use one of those 500W bricks?).

The C80-100 is a pretty formidable control challenge for a homebrew motor driver because it has both very low resistance and very low inductance. I measured the line to line resistance to be around 20 milliohms – meaning any little twitch or fuckup by Tinytroller can send pulses of hundreds of amps through the system. The low inductance means the current through the stator cannot be modeled as approximately constant, especially at my relatively low (8khz) PWM frequency, wreaking havoc with non-robust current controllers. It’s built similarly to many other huge electric flight motors, so if I can control the Melon, I can probably take on other scarier airplane motors too.

Melon-scooter normally runs sensorless since I originally built it with a Hobbyking 100A airplane ESC, then subsequently a sensorless Jasontroller. To use it with Tinytroller (which is not yet sensorless), I had to append sensors in a similar fashion to Straight RazEr. It’s that red thing by the motor:

I bodged together Make-a-Bot’s heater one more time (last time, I swear!) and used the last 2 feet of my 3mm ABS filament to make this sensor mount. Unlike Straight RazEr’s mount, this is a two-piece since I needed to fit it into the very close gap between the motor and my frame.

Like so. Unfortunately I made this one a little too close – the ABS plastic actually rubs alot on the motor. It doesn’t seem to be affecting sensor operation, but it just makes an ugly scratchy sound. Oh well – it will have to do for now.

The first test was performed on 24 volts so I could (more) safely full throttle the motor in order to time the sensors properly. For a while, I was trying to find the absolute minimum point of phase current draw at no load, full speed, which corresponded to the point of optimal sensor timing. Wandering even a little outside this region caused the current to increase very quickly, some times up to 40+ amps no load… that’s 1000 watts dumping into the motor just spinning while sitting there. However, Tinytroller handled the mis-timed excessive current draw just fine – no fiery death like I expected.

I was able to get the motor current down to 7.5-8 amps no load, where it has generally been.

I did still have plenty of PLA plastic left, and I was going to print out a Nice Case for Tinytroller that enveloped the whole thing and had custom wire entrance and exit holes and whatnot, but decided PET film tape was enough for now. I made a little greenhouse (literally?) for Tinytroller which should keep most of the gunk out of it.

Plus, I figured it was going to explode anyway, so why waste time on a nice case?

All bundled up and connected.

I tried something a little different with this attempt at running melon-scooter. While Straight RazEr’s control scheme relied on a single throttle, with the bottom (released position) being a slight brake (negative current), neutral coast somewhere in the middle, and the top being full driving current, I put a handlebar throttle next to the thumb throttle on melon scooter and had Tinytroller read both.

The handlebar throttle controlled the amount of driving current and the thumb throttle controlled the variable regenerative braking. When neither was actuated, neutral coast (zero current) was commanded. Actuating one blocks out the reading of the other such that the readings don’t conflict and sum to a net zero, though that itself is a valid control scheme too.

After making sure it did indeed survive a no-load spin on the 12S battery pack, I threw the deck back on and went for a test ride. If it was going to explode, it might as well do it while the motor is running full bore on 40 volts. The no-load speed was measured to be 4330 RPM, a fair amount slower than even the Jasontroller’s 4700 RPMs. It could be attributed to sensored control with the sensors at the point of zero timing advance (sensorless will always tend to be faster) or it could be my battery being low after not being charged for a week.

The low speed terrible sound was still present – and boy was it ever noticeable on the melon. The “terrible sound” is a bug feature that has been with Tinytroller ever since I added the timer interrupt routine. It can be clearly heard as a clacking sound at very low speeds in the etek test video. I’m completely unsure as to where it comes from, and I can shift the Band of Terrible Sound up and down in the PWM output range if I add various length delays to the interrupt service routine & state changer. This just tells me my timers (1 and 2 on the ATmega) must be running into eachtoher somehow.

Regardless, Terrible Sound mode results in very high current draw for the duration of that “band”, and with the massive windings and rotor of the melon, it was felt as a very strong rumble or high frequency ripple torque. I can’t imagine it being too good for Tinytroller. As soon as the band of terrible sound is passed, the ride instant becomes smoother and more controllable, but transitioning back into the band results in the motor suddenly slowing and becoming rough. Considering that the Band of Terrible Sound occurs at a useful low cruising speed of about 4-5 mph, this is indeed quite a problem. I might have to dig deeper into the ATmega manual to find out what timer registers are being refreshed or reset when I dont’ expect them to be.

poor tinytroller

Melon-scooter managed to make it 90% of the way around the block before it suddenly flaked and shut off. I was able to cycle power and have it function again, but only for a very short while. After which it seemed that at least two low-side FETs were shorted, since the motor was reluctant to turn even with the power off.

Before that, during bench testing, I had noticed my big red key switch becoming flaky and occasionally shutting off or dithering on and off, power-cycling the controller many times. It very well could have been a flaky switch that shut off from vibration, and the sudden power kill would result in huge negative voltage spikes which could have destroyed components.

I’d hate to think that the only thing that took down Tinytroller this time was a flaky power switch, but the performance was fairly smooth and flawless once the Band of Terrible Sound was passed. Slowing down was difficult – re-entering the Band of Terrible Sound meant I  had to hold on to prevent the handlebar from punching me in the stomach as the motor suddenly acted like I had jammed a rock into it. Getting something reliably working is, in my opinion, 90% of the challenge of actually making a useful product or project, so I’ll just continue the Tragedy of the Tinytroller some time.

more 3d printers

I’ve also been sketching out some more designs for the Next 3D Printer. Adding a filament guide to the interior of the machine that had to be flexible enough to reach the far corners of the axes while folding up neatly and predictably has been a fun engineering exercise, and I now understand why commercial 3d plastic extrusion printers are so damn huge. I need alot of buffer space to run the set of wire and cable guides which hold the filament and the electric umbilical.

However, one thing I did decide on and finish designing was my new Z axis. In the first post about the new machine, I sketched out an idea for a combined chamber heater and build surface heater. Well, that idea has since been turned into reality Solidworks.

Hey, it’s like the exact same thing. The resistors are 10 watt types, currently spec’d to be 0.22 ohms each and to be run in series for a roughly 1.8 ohm string, which ought to net me about a hot 80 watts of heating power. The surface itself was made transparent for imaging purposes, and actually is supposed to be aluminum and not clear plastic or something.

I’m not a thermal systems engineer, so I just whipped up a radiator pattern for the resistors that kind of made sense in my head.

Some more design progress on the Z table. The parts here are “edge stitched” together in my usual style with tabs, slots, and interspersed t-nuts. Four LME12UU type linear bearings comprise the guide system, two on each side, held apart by spring washers. I’m reusing the central leadscrew nut from MaB because for some reason it cost $30 and I still have 5 more feet of the same leadscrew, and I’m not buying a whole new one. The structure is mostly 1/4″ aluminum beams and 1/8″ bracing plates – I’m trying to minimize the use of giant 1/4″ stock on this machine, but because the Z table is so big (250mm square build plate, with a total length of about 290mm front to back!) it was warranted here.

Did you know that they make PC case fans that are 250mm across? I didn’t know either until I accidentally found one on eBay while looking for real industrial 200-300mm class fans. In fact, they make case fans up to 360mm. Why the hell do you need a fan that big on your computer?

It turns out they don’t actually move much air at all – I ordered a sample one from xoxide for kicks, and it seems to be for case modders and PC builders who want to take the “large but slow moving air mass” school of case ventilation to the absurd limit.

But that’s actually exactly what I need – I’m not trying to build a hair dryer  or a heat gun, but something which will gently fan the sweat of my 8 power resistors onto the back of the build plate. Time will tell if they survive 60-70 celsius (I’m guessing not), but for now I have one designed in. More industrial grade fans are spec’d out if I need them, but if these fans do work out then more gaudy internal lighting for me. Maybe it’s time to start case modding your 3d printers.

More Tiny Things

This week has been filled with tiny things.

tinytroller

First, tinytroller testing on a tinykart.

But unfortunately it didn’t last too long. As in, all of like 20 feet or something.

I’m not sure why this trace ended up blowing out. The controller was behaving normally during wheels-up testing and under low speed driving with or without heavy acceleration command. However, as the speed picked up under sustained heavy throttle, something must have hiccuped, causing a very high current pulse to flow and detonate the trace.

Nothing was damaged – the gate drive and both FETs on that channel still function, the Arduino still works (and lights up!), and I patched that trace with a copper braid afterwards. Tinytroller’s current limit was set at 60 amps using the same software from before with no Serial writes, I swear, so I can’t imagine it was running substantially overcurrent for a long period of time. But then again, I haven’t ever seen trace failures that weren’t associated with total malfunction before.

Time to lob it on another vehicle and see if it does this again.

update!

Oh yeah, I forgot about this:

Those are the phase voltage readings from Tinytroller while slowly commutating a Kitmotter. This was sampled once every slow loop just to test the phase sensors, so the values really do not reflect what’s going on in the motor (those would be updated 7800 times a second otherwise). If you squint at it, it looks vaguely trapezoidal.

That’s good. That means once I muster up the software balls to try it, Tinytroller can be SENSORLESS!!!… and maybe one day I’ll even have ArduSensorlessFOC or something…. SensorlessFOC-duino?

…and now for the more interesting thing.

tinystruder

I mentioned before I was playing with a native, integrated twin-head extruder design for the Next Sensation 3D Printer. Over the past few days, I’ve refined the idea a little and created a design which I will build and test to see if it’s valid. It mounts two NEMA 14 (not 17) motors side by side with a symmetric filament path and adjustable roller-based feed tension, which is something I wanted over the solid plunger of MaB’s current extruder.

I’m fairly positive the NEMA 14 steppers will have enough torque to push the filament, but to be even more certain, that’s why I’m going to build one.

Oh right, I’m doing this in SOLIDWORKS! I’ve always been a Child of Autodesk Inventor since they were the first to indoctrinate me in 2005 by sponsoring FIRST teams (and because they give out free 3 year student licenses with nary more than a .edu email address), but the chief solid modeling program around here is Solidworks. When approached with Solidworks questions, I’ve always tried to figure them out and give directions in terms of Inventor equivalent functions. Not all of these map 1 to 1, and SW still has several user interface tics I’m not used to, so in my capacity as future mother duck of engineering students I’ve decided to force myself to use SW and become acclimated to it. SW still seems a little rigid and less liable to letting me fudge everything, but that’s most likely because I haven’t discovered all the shortcuts and tricks yet.

Anyways, it took the longest time to get to this stage in the solid geometry modeling since I thought of several ways to keep the filament properly compressed between idler and drive rollers, as well as different ways of arranging the motors (face to face versus side by side, etc.).  I tend to mentally visualize a design completely before actually CADing it – since mistakes in creating geometry in CAD still implies starting over and wasting time, so this stage was accompanied by several cumulative hours of staring at the ceiling intently while rolling through maybe 3 or 4 unique designs.

I’m going to use teflon tubing (and quick fittings) as filament guides, so the two fittings are shown. They might not be the final ones, since McMaster doesn’t have many CAD files for its fittings. I ordered a bunch of candidates for measuring, so that part might change.  The “stalks” that the hot ends will be mounted to (3d printer speak: “thermal barriers”) are modified 1/4″-20 vented cap screws, their center vents drilled out to 2mm. While 5/16-18 screws have a native 0.08″ center vent (which is like 2mm anyway), I determined they were excessively large. The 1/4″-20 cap screw will be machined down such that its head is 6mm in diameter to clear the future filament tensioner.

While I would rather do the modern worldly hipster engineer thing and use 100% metric parts, McMaster doesn’t sell metric vented cap screws – the nearest source I found was Small Parts, and they cost $26 for 10. This, along with the fact that it is much easier for me to buy 1/8″ and 1/4″ aluminum instead of 3mm and 6mm, and there are no such things as miniature U.S. unit bearings, means the whole thing is an ugly mashup of metric and U.S. units. I might start totally over with U.S. unit components as much as possible to save having to do the ugly dual unit thing for the entire design – but we’ll see.

I already bought a ton of metric screws <:(

I yoinked the MK7 drive roller and cartridge heater models from the Stepstruder MK7 CAD files to fill in for placement. Since I think the Makerbot drive roller is the most nifty thing ever, I’ll definitely end up keeping that.

The filament tensioner is a cage-like assembly that slides over the drive roller and is pulled towards and away from it by an external thumbscrew. I had previously thought of using a cam-like assembly in the center, such that twisting a knob releases both filaments, but this method is more straightforward if not tightly integrated and cute. A 693 type miniature metric bearing (because they do not make miniature US bearings) is the compression element.

The cage is guided by the 6mm machined head of the cap screw and axially fixed by the threaded portion of the knob. The cage edges are also just wide enough to fit between the four motor mounting screws, constraining it (kind of) further. These three not-really-contraints would make MechE professors cry, but I think they’re enough.

Now with both cages in place!

I rarely insert screw models into parts unless I really need to test clearances, like in this case. This is where I’m glad McMaster-Carr has digitized something like all of their common screws. The modeling is almost excessively detailed. I mean, the screws have actual helical threads of the proper geometry. If I made an equivalently real-helically-threaded hole and turned on Collision Detection, Solidworks would let me Real-Screwdriver it in.

This is why I want a multitouch Minority Report interface for CADing. Right now.

The box has been closed off and some of the slotting work has been started. Tinystruder is too small to use a 40mm fan per motor – instead, I’m using just one. I might consider a high speed 20mm tall type rather than the conventional low speed, 10mm profile fans in popular use.

Now with more t-nuts. There aren’t many places to t-nut extensively on this, unlike my larger creations, so I partially depend on extending the fan mounting bracket towards the back using 50mm long M3 bolts to supplement the attachment at the edges. The crossing M3 bolts restrain the box at the points of highest bending stress – where the filament is being pushed downwards – and also keep the top and bottom together in the center.

I borrowed the MK7 hot end model for visual representation. You can’t get the heater blocks separately (grr), but they seem easy enough to duplicate with my own block of aluminum. I wouldn’t have been able to use the MK7 stock hot end anyway – my block needs to be half-threaded 1/4″-20 and half-threaded M6 x 1. Otherwise, the hot end is about as small as it can get – I briefly played with making the thing even narrower so the two heaters can sit in the middle between the stalks, but I began running into sub millimeter wall thicknesses on the parts.

So what is the fan blowing into? It’s just pressurizing a plenum in the above image and not really contributing to keeping the motors cool (as cool as 60-75C can be) or preventing 250+C extruder heat from seeping into the extruder body.

At least to address the second problem, the fan exhaust will blow through these vents on the bottom. The vent geometry is mostly for representation at the moment, and they might be widened or shrunk later. The idea is to have the center set act primarily as heatsink fins for the cap screw thermal barrier, which I will also turn down in diameter in the middle to minimize heat leakage. The exhaust also blows directly downwards and so can “hot chill” the part being printed to chamber temperature quickly. Certainly another argument in favor of a fan with some extra push to it.

If I were a better graduate student, I would actually heat-flow simulate this whole thing to validate the vent design.

I haven’t really thought about how to keep the motor temperature acceptable yet. In the final mounting scheme, there might be another set of fans at the back just to direct chamber air over the motors. They are very close together, however, so I lose two entire sides of convection area. Thus, Tinystruder might grow a little.

Up until now, I didn’t even think about how the thing would be mounted. Ideally, tinystruder will be hung under the head gantry, so I focused my attention on the top plate for mounting purposes. I didn’t want to directly thread into 1/8″ thick aluminum – it just seemed like a bad idea, nor could I reasonably mount a loose nut on the other side for a nut and bolt connection.

The answer came in the form of press-in nut inserts for sheet metal. These things have a splined section you hammer/press into an appropriately sized hole, and it acts as a hardpoint in your sheet metal assembly.

Final assembly, with virtual transparent faceplate so the action inside is visible. For some reason, my fan model suddenly became white. Hmm, weird Solidworks behavior…

The two thumbscrews will be the mounting interface to the not-CADed-yet gantry interface, which will have two little ears to accept the thumb screws. Otherwise, the top surface is flush on either side so the mounting ears have a seating location. For ultimate MechE trollage, I might try making this interface a kinematic coupling (as if the rest of the machine is precise enough to warrant it).

Tinystruder is 3.3″ (84mm) wide, 2.34″ (60mm) deep, and 2.84″ (72mm) tall from top plate surface to the tip of the nozzle, and the nozzles are space 24mm apart. According to SW, it should weigh about 17 ounces (480 grams).

I’ve already ordered all of the hardware and screws as well as nozzles and the drive rollers from Makerbot. I’ll need to locate 1.75mm filament somewhere else, since they seemed to be out of stock at the time. The frame parts will be waterjet-cut from stock I already have, so I’m hoping this can be built by the end of the week. However, more problematic is that the cartridge heaters were out of stock too – should have gotten them a week ago when I figured I’d needed them. I suppose I have no qualms about sticking a ceramic resistor in place of it or zip tying a soldering iron to the thing.

The big test for tinystruder is actually running inside a 60-75C ambient environment, which I will probably supply with a space heater in close proximity. If it can reliably push plastic for extended periods of time in such a test, then I’ll be satisfied.

By the way, mad props ducted fans to whoever pitched in 20 bucks the other day in the tips jar.  It’s well appreciated (and in fact it was absorbed into an order for stepper motors)!