Tiny85 dev/target boards

NewBoards1750Just a quickie, but it seems to delight me.  I finally got around to making up a little bunch of generic Tiny85 boards so I can knock out some simple projects.  They’re a lot like the I2C slave boards for the dollhouse, but have all the pins brought out and have a 6-pin ICSP header so programming is easy.  I laid out the board several months ago, but hadn’t gotten around to making any.

Of course, the first one didn’t work.  I’m pretty good about putting a mark on the PCB for Pin 1 on ICs and connectors, but I missed it for the Tiny on this board.  (It’s fixed now :)  No problem – the board is so simple I can reverse engineer it visually.  Let’s see – I always put a pullup on the RESET pin, and there are only two 1206 pad pairs, and that one is a jumper, so the pullup must be here – and that goes to the Vcc pin, which is pin 8, so the chip must go this way.  Done!  I put all the SMT parts down and reflowed it – and it looked about perfect.  A couple of minutes to hand solder the header, and it was time to test.

But it didn’t even get as far as running avrdude for a signature check.  As soon as I plugged it into the Arduino ISP, all the lights on the Arduino went out.  I held it to my lip, and the Tiny was fairly warm.  Not good.  Then I proceeded to make myself crazy trying to more carefully reverse engineer it visually.  Was the header layout backwards so the pins came out the back of the board?  Did I actually lay out that nice big ground pad wrong?

When I finally looked up the original Eagle layout files (like I should have in the first place!) it became frustratingly clear:  I didn’t put a pullup on RESET (it’s not really needed) – and those pads are for a cap across +5/Gnd, not a resistor!  And sure enough, my reverse engineering based on the non-existent pullup led me to put the Tiny in backwards!  Rats.

I made up another board (correctly, this time), and it worked first try.  Same for the next one, and the same for another set of 3 I reflowed all together.  So I had 5 working boards plus the bad one (now with an X on the back, since they all look very similar) as a continuous reminder of my sloppiness.  Guess I better fix it.  (The picture was taken before the fix.  Can you find the one with the Pin 1 dimple opposite all the others?)

Hmm – it really should just be a 5 minute job with the hot air station.  But did I fry the chip?  (Fires up the hot air.)  Eight minutes later, reusing the original Tiny, I had another working board!  To reward the board for surviving being powered up with the chip in backwards, I even replaced the wimpy green LED with a nice bright red one.  Now I not only have 6 boards at the ready, but no longer have the reminder dud staring at me.


What will they be used for?  One of the first applications will be a beeper to remind me the hot melt glue gun is plugged in.  When I need it I plug it in and, having better things to do than watch the glue melt, walk away.  I usually come back a few minutes later to use it.  But sometimes it’s an hour.  And once it a while it’s many hours.  Ouch.  So one of the Tinys will wait until the gun is hot (open loop timing), and sound a piezo buzzer once.  A minute later, 2 beeps, then 3, etc.  That should work well.  (When I get around to making it.)

Another application will be making the house stereo amp more robust.  The dumb Sherwood RX-4109 that lives in the basement and drives speakers in the kitchen, living room and bedroom has a ‘soft’ power switch that defaults to OFF after a power cycle.  Since the music it provides is also my alarm clock, the priority of a fix jumped much higher on the list after I overslept the morning after a brief power outage shut it off.

I’ll decode the Power ON sequence from the Sherwood’s IR remote, program a Tiny to reproduce that signal to drive an IR LED taped to the front of the amp, and have the music startup script tell the Tiny to send Power On to the amplifier every time some music starts.  Overkill, but at least it should always come back after a power failure.  Since the music script is on the main PC, I’ll have to invent a channel to send a message to the home automation system which can in turn actually operate the IR sender Tiny.  Several steps, but it will be nice to not have the (upstairs) music fail after a power failure.

Another possible application will be at least doing initial datalogging to see how much power I can get from a small solar panel in a tree where I really want to put a camera looking at the house.  Solar (or possibly wind?) is the only way I can power it to take a picture every few minutes and radio it back to the house.  Doing this initial energy monitoring/logging has been on the list for oh, maybe 5 years.  Maybe these Tinys will let me make it happen.

But just having that little stash of Tinys there – each one eagerly awaiting its chance to serve – gives me a little delight each time I see it.

Posted in Tiny 85 stuff | Tagged | 2 Comments

Quickie 1-cell discharger

Wow – I wasn’t planning to make this.  But as I fantasized about just building a simple discharger while struggling with 1-cell problem on the big 18 cell discharge tester, it sounded too simple to resist.  I could get to a couple of analog inputs and ground with a mini-shield just on one side of an InUse1681Arduino.  (And I seem to like mini-shields.)  And a MOSFET instead of a relay would make it simpler and more robust.  It sounded so simple I just made it up on perfboard rather than laying out a PCB.

The extra juicy bit of simple was realizing that the Drain-Source resistance Rds was pretty constant, and for this MOSFET was in the neighborhood of what I needed for a current sense resistor.  If I put the MOSFET at ground and measured the voltage on the Drain, I’d have the current reading – for free!  And it doesn’t take a fancy 1% 0.1Ω resistor – as long as it’s a fairly constant value, a calibration constant in the code will deal with it.

LittleDischargerIt uses screw terminals to connect an external load resistor like the big discharger, but stayed very simple with just a single pair of clip leads for the single cell.  An LED on the Gate (really on the Arduino pin driving the Gate) to show when it’s discharging is nice.  The 1.1V internal reference on an Arduino (328P) is fine for the current sense, and just took tweaking a voltage divider to make a good fit for the voltage sensor.  Setting up for ~5V full scale gives me very good resolution for either 1.2 or 3.6V cells fresh off the charger.  By putting in an extra pin, it’s pretty unambiguous how it aligns with the Arduino header pins.  (OK, unambiguous on a Duemilanove, though not on a Mega.)

The code was pretty simple, and as it matured, I was able to steal some bits from the other discharger code.  The one open issue at the moment is to verify whether Rds is constant enough to treat as a constant for the current sense.  I guess worst case I can code up a piecewise fit for it.  (Done – see update.)  But the device is booked solid for a while testing some AA NiMH cells, so I can’t even get it to the bench for the calibration/linearity test.

Ever infected with the “Ooh – and with just a little change I could make it do something even cooler…!” bug, I thought about making up a PCB and having it as a giveaway tool for a class on battery tools and technology.  Like I need one more prep-for-a-class project on the list.  But if I were to do that, the choice of MOSFET becomes important.  I even ordered some nice ones with Rds of 20 milliohms or some such, but they’re not ideal for the Rds-as-a-current-sense-resistor bit.  It’s kind of interesting to need to select a part with resistance not too high but not too low, either!

PerfboardJoy1677Anyway, I’m surprised with how pleased I am with this little guy.  The fact that I can just throw it on an Arduino, and that I didn’t even have to make up a PCB means I’m not even sad it’s not Tiny85-based.  The fact that it’s completely junk box parts makes me smile, too.  This little bit of perfboard’s a winner!

Update 6/2/14: Here are the results of a current calibration on the bench (all in mA):

Actual    20   50  100  200  300  400  500  600  750  1000  2000
Reported  14   45   96  197  308  420  545  675  840  1200   1700
Corrected      55  100  189  288  387  498  612  739  1015

Between those observations and the datasheet, it looks like at Vgs of say 4.8V we’re at the edge of linearity of Rds at an amp.  The transistor got quite hot at 2A, so it looks like the practical upper limit is 1A.  The current calibration constant is 1.67mV/count, so we’re at the ragged edge of digitization problems at say 20 mA.  Let’s say a practical lower limit is 50 mA (and rocky at that).

CurrentCalibrationTaking the A/D count as Reported/1.67 and doing en embarrassing amount of manual cut and try in Excel, a final formula with corrections (A/D count=A):  (A+10)*1.48-(IF(A>400)then((A-400)*0.2); else 0)) gives a pretty good fit over the range of interest.  (Apologies for the Excel expression.)  Red is ideal, green is corrected.  Guess I better code that in (and test it again :( ).  Done.

Selection of a new MOSFET for building multiple units would like:

  • Max continuous Ids > 2A, Vds > 5V (trivial)
  • Rds(on) ~0.5 ohms  (requires finding suitable part)
  • Vgs of 4.5V fully saturates at 2A  (requires finding suitable part)

OK, now I’m pretty comfortable with the current calibration, know the device limits and what next steps might be.  I’m still really pleased with this little guy.  And it’s done!

Posted in Little Discharger | Tagged , , , , | Leave a comment

Battery discharger problem with 1 cell

UnderTest2The big battery discharger works well (or so I thought) except for the case of testing single 1.xV cells.  It just doesn’t work – reporting 0V often.  There’s even a comment in the code dated 2/15/11 (right under the V1.3 update comments) that it doesn’t work with 1.5V cells.  The comment was that the A/D returned 0 counts, and that it worked with 2 or more cells, and that I hadn’t looked for the threshold.

I had a bunch of NiMH cells I wanted to test and had forgotten about this problem.  After going thru 3 battery holders, I started to make better observations, and rediscovered this problem.  There are various debug prints commented out in the code, so it looked like it wouldn’t be too hard to figure out what was going on.  (Wrong.)

Setup1664To get a handle on what voltage the problem happened at, I hooked a 2.5K pot across my good bench Li-ion battery for a stable adjustable voltage source.  I put a good DVM across the main discharge leads (clear zipcord, R/B clips).  The discharger code displays the voltage across the main leads while waiting for a CR to start the test.  That should be a good test setup.

With the pot in the middle, the voltage on the DVM bounced all over the place – by several tenths of of volt.  After a bunch of head scratching and other test configurations – including using the (AC) bench scope while powering the Arduino with the 1xAA 5V supply, I’m fairly confident in the following observations:

  • There is a substantial – tenths of a volt or maybe much more – noise signal on the main discharge leads.  I think I saw it as a more or less a symmetrical sawtooth.
  • As I watched the “waiting” output voltage indication and played with the pot, there seemed to be a threshold around 2.1V.  I’d occasionally see values in the range 0<V<2.1, but never stable.  But that 2.1V indication was NOT at a pot slider value of 2.1V!  There’s something VERY wonky about the voltage indications at low values.  A few points: (Actual=pot set with leads disconnected, Reported = leads connected)
Actual V    0.06  0.11  0.65  1.0   1.4   1.5   4.0
Reported V  2.1   2.5   3.5   3.6   3.75  3.75  3.98
  • With the pot set for 1.40V (measured with the discharger leads disconnected), with leads connected, the DVM bounced between 1.41 and 1.82 (watching for a minute or so).
  • Hmm – that’s not consistent with the misbehavior:  With a AA NiMH cell fairly fresh off the charger and measuring 1.38V, when I connected the main leads to it, the reported voltage dropped instantly and consistently to 0.  With the leads floating, they showed ~4.1V.  The source impedance of whatever’s on those main leads is very unclear.
  • Scary question:  Does this mean all the tests I’ve done for the past few years (on higher voltage batteries) have produced inaccurate results?
  • HackedBoard1673For reference, here’s the board as it has been in service for the past couple of years.  From what I can see/reverse engineer, the voltage out of the mux (from whichever input lead) goes thru a 12K/1K voltage divider (0.077 of orig) to Arduino A/D input A0 which is referenced to an external (on the discharger shield) 1.88V zener (sourced from 5V in from the USB/serial connection).  That would give a theoretical max voltage of 24.4V for 1024 A/D counts.  (Reasonable for nominal 18V Nicads, which were the original max target.)
  • Continuing the theory, that would give a formula of (A/D counts) * (24.4/1024=.024) to get actual voltage.  The code has a comment with that as the “expected” value and a #define of 0.0263 as the working calibration constant.  For a 1 V input that would give around 38 counts on the A/D.  Not a lot, but unless the A/D isn’t working well, it shouldn’t give any weird threshold effects.

I’ve spent way more time than I should on what I thought would be a fairly quick fix, and am grudgingly pulling the plug for now.

Next steps

  • NextTest3Put a bench supply on the 1K/12K junction and watch the indicated “waiting” voltage compared to actual.  Yeah, I’m driving one side of the mux with that, but it’s thru 12K.  Hmm – seems to me the specs of the mux chip say no inputs > some V+ voltage.  I think that means I need to put at least as high voltage on the main discharge pins (which go to that V+ on the mux) as I’ll put on the mentioned test point.  (That jives with a vague recollection of strong requirement that the outer ends of a battery MUST be connected before any of the per-cell leads.)  Maybe a red LED to make that V+ about 1.7V higher than the test point?  That ought to do it.  Heck, even a Schottky should do it.  Next step after that depends on what we see with this (if I ever get time to do it).  But at least these notes will help me remember what I saw today.

There was a lot of daydream level consideration given to making up an even more “appliance” discharger, maybe for just one cell, probably with a Tiny85.  By using a 1:1 voltage divider with 1% resistors (maybe 4.7K?) and the internal 2.56V band gap voltage reference and 5V power from the fake FTDI cable, it should handle a fresh 4.2V lithium cell and give good resolution.  I even ordered some IRLB8721 MOSFETs with ~20milliohm RDS(on) for the discharge switch.  (Thanks to Adafruit for choosing that part!)  They’ll handle several amps, so keeping the external load resistor approach, it would handle most everything I’d be likely to throw at it.  If I just had time to build it…

A little later:  Oops – on 328P it’s a 1.1V reference.  Rats.

Posted in Discharge tester - PCB build | Tagged | Leave a comment

Working with recycled HDPE

This is just draft stuff – sort of so I might remember things I did.  Needs actual rewrite, pictures, more meat.  But at least I have a place to capture some efforts.

It really seems like scrap HDPE – like from milkbottles – should be a wonderful source of material for making stuff – if I could figure out how to work with it.

Some time ago I tried to melt sheets of HDPE from milk bottles into a sheet maybe 6″ square.  A few layers between sheets of silicone parchment on a cookie sheet with a flat piece of metal on top and an anvil to smush it in the over at what – 250? – for half an hour or something.  Results were poor – lots  of voids, poor adhesion.  Needs more pressure (force/in²) to stick.  Or maybe more active smushing/working.  I really thought I took pics of that, too, but can’t find.  Or maybe I just planned to take them.  I’ve seen several videos of people making flat stock from scrap, but most cut it up really fine before melting.  Seems like a lot of work.

Inspired by maybe a youtube of an Indian kid repairing plastic buckets on the street with a torch, scrap plastic and screen?paper clips?, I thought I should try some repairs.  Other videos showed others doing HDPE repairs, like on canoes and water tanks using similar methods.  There’s some skill to it that will come with exposure and familiarity with the materials.

Did a repair of a broken Rubbermaid laundry basket handle with hot air station.  Came out OK.  Some hardware cloth for reinforcement one place, wire in another.  Used milk bottle plastic for welding rod.  Not ideal – seems to have higher working temp and less soft than original.  It was easy to melt thru original, and when I did it was almost liquid.  The Milk Bottle HDPE (MBH) didn’t get that soft.  Made a smoothing tool and a poking tool – both quite useful.  I think cooling/wetting the smoother in water helped.  Thought I took pics, but can’t find.

Did a second almost identical repair with almost identical results.  Again used sheet patches of MBH over the very rough top of the handle.  Made it considerably smoother.  Took several minutes with a new Xacto knife to make it feel fairly nice.  Sanding would have made it smoother more easily, but not left a polished surface.  Maybe I could have flame polished it afterwards?  Meaning hot air probably rather than flame – but should try it with a torch as well.  If that worked, it would be faster and better.

Still looking for softer welding rod, I tried strips of plastic grocery bags.  Finally made a strip maybe 1″ wide, twisted quite tightly, then sort of fused while twisted with hot air.  Didn’t make nearly as nice a rod as I hoped – didn’t stick together well.  Anyway, it didn’t melt any better than the MBH, so nice try but no cigar.  I have an old dish drainer I should try to use for scrap.

I’d really like some softer stuff for welding rods, especially for those laundry baskets.  Maybe Rubbermaid stuff from Goodwill?

I’m considering fusing some MBH together for a bottom bracket for the 1/2″ PVC AA battery trickle charger tube.  Shapelock would work fine, but it’s infinitely more expensive than free MBH.  Actually, what I’m thinking of is using MBH sort of like Shapelock but at higher and harder to manage temps.  Yeah, I could make the whole bracket from wire, but plastic would be nicer.  Maybe just acrylic.  Or maybe shut up Jim, and work on what you’re supposed to be doing.

Posted in HDPE | Tagged , , , | 2 Comments

Protected: RF Starter’s gun project status

This content is password protected. To view it please enter your password below:

Posted in Rf starter's gun | Enter your password to view comments.

Car has music again!

It’s always nice when a little DIY work can save you $30,000.

The 6 CD changer in the Prius wouldn’t play the other day.  I noticed a CD partially ejected and when I couldn’t get the unit to eject it, pulled it out by hand.  It has never played or loaded or ejected a CD since, showing errors including “seek error”.   (The radio still works fine).  A little googling revealed that a jammed changer seems to be a common failure in the Prius, and that having Toyota replace it might run $1000.  The car has just about 100,000 miles, so I took it as a sign that it was about time for a new car.

I don’t know for sure what happened, but I suspect the “eject” DiscJammer1646button was hit accidentally, and the supports for the new GPS prevented the disc from ejecting fully.  Thwarted by the failed eject, the mechanism damaged itself and got stuck in an unrecoverable position.  But that’s just a guess.

I’ve long wanted a better aux input than the cassette tape spoof, but hadn’t found a cheap way to do it.  Google showed that others suffering from the jammed changer syndrome elected to add a third party input adapter, usually including an iPod interface that was actually integrated into the car’s audio controls/display.  I’ve never owned anything Apple, so that was uninteresting, but integration with the MultiFunction Display and steering wheel controls was very attractive.  With no music in the car, the $100 price tag for an adapter suddenly seemed less of a show stopper.

I exchanged a couple of emails with GTA with questions about the unit.  They were very prompt and provided completely helpful answers, so I would happily recommend them to anyone else considering such a purchase.  I ordered a GTA Car Kits adapter ($115), a beat up 4GB iPod Nano ($22) and cable ($1.45!) from Ebay and a few days later had new toys in the mailbox.  A youtube video from GTA showed how to tear the dash apart to get the old radio out.  Doable, but a big production.  Thankfully, they also provided a “shortcut” video that provided just enough access to get your hand in to plug in the cable by pulling only the glove box (trivial), the right center vent panel (no tools) and a wiring distribution block (one 10mm bolt).  Given those choices, I decided not to even bother trying to (remove and!) fix the changer.  The 3 CDs still in it will go with the dead car to the crusher.

Toyota_new_short - Copycanbus2 - CopyThe one 12 pin connector from the GTA adapter plugged into an open connector in the back of the changer (despite the fact that they sent a Y cable for those connectors).  Apparently the nav system is connected similarly.  I think the TX+/- are data for a CAN bus.  That discovery led to a rabbit hole of reading about CAN bus info and hacks.  There may be multiple such busses in the Prius, but an interesting one is accessible through the ODB-II connector.  Hey – I bet I could get a $12 ODB-II USB or bluetooth adapter and look at all kinds of stuff going around the car network – maybe even the text of song titles from the iPod!  And I’d been thinking about getting a cheap ODB-II tool just so I’d have it if I needed it for diagnostics.  But in a rare moment of restraint, I listened to the little voice that said “Let it go, Jim!”  I really don’t need more hardware to add yet another project to the list.

AdapterMounted1624RubberBacking1613Back to the task at hand, I decided to mount the GTA unit to the wiring distribution block.  Some inner tube rubber should keep it from slipping around.  The connectors for the iPod cable and a 3.5mm aux input jack were still accessible by just dropping the glove box.  Looks fine.

Grommet1633While the main glove box is always full of stuff, the top compartment is quite underused, and looked like a good location for the iPod.  Some closed-cell foam made a reasonable grommet for the cable as it exits a 1/2″ hole drilled in the side of the compartment.  Though not visible here, I did notch the corners to make it slightly more grommet-shaped and help it stay in place.

A gracious loan of a 30 pin Apple cable from Mike M let me start playing with the iPod a few days before the cable I ordered came.  Putting music on the iPod was an ordeal, though mostly of my own making.  In trying to use good old Winamp playlists with it, I formatted the flash, making it unusable with the GTA adapter.  Due to a parallel project repairing a square dance recorder, at one point the iPod had a Rockbox firmware directory on it.  Oops.  ITunes was unable to “restore” the iPod firmware despite several attempts.  Fortunately by installing iTunes on another computer I was able to get the iPod “restored” so it would once again work with the GTA adapter.  Of course that meant that I’d have to use iTunes to put music on it.

While I eventually made peace with iTunes, I swore at it a lot in the beginning.  I tried to create a login, but when it required a credit card, I gave up.  It said I could just drag and drop .m3u playlists in, but they came in empty.  I got some malware while installing a tool to convert .m3u playlists to Apple (that didn’t even work).  I eventually found a forum post saying .m3u playlists would work, but only if they had full paths.  After globally prepending “I:” to the file pointers beginning with just “\mp3\playlists…” the playlists imported to iTunes OK – and brought all the associated music files with them!  There was a bunch of time spent deciding on and cutting down playlists to limit the music to about 45 hours to fit the 4GB flash, but that wasn’t iTunes’ fault.  I’m still not comfortable with iTunes, but it got the job done.

NewCD1626With the iPod plugged in, sure enough it showed up as CD Changer 2!  Of course the original non-functional one still showed up (as CD1), but I could skip over it with the steering wheel Mode button (but only that way!).  Disc 1 shows up as “Hybrid”, and might play the audio from either iPod or 3.5mm jack (or both?), but discs 2-6 are Playlist 1 – 5.  The 6th playlist shows up in some places as “Disc 7″, but there’s no extension of the Disc 1-6 display.  While I’d told the iPod to “Shuffle 1 Playlist”, each playlist seems to play in order unless I touch the Disc Rand button.  Not a big deal.  And when I touch Title, another screen shows the actual track title!  I never found a way to name the playlists, though.

FinalHome1643Here’s the iPod in its final bubble-wrapped home.  It’s completely functional, sounds great, and is exactly the hands-off installation I’d hoped for.  And now that I have music again, it saved me from having to buy a new car!


Posted in Miscellaneous | Leave a comment

But I marked it so that wouldn’t happen!

MarkedConnectors1595Yeah, I use unpolarized connectors.  Good old 0.1″ headers are cheap, small, plentiful, and I’m pretty comfortable using them.  For the power/I2C bus in the dollhouse, they were an obvious choice.  But because they’re unpolarized (OK, unless you make them considerably bigger by adding a dummy pin and a plug) I’ve been extremely careful to mark every connector I make with whiteout: White sides go together.  I’ve even usually marked the +5V  pin as an extra caution  (though white-to-white is sufficient.)  But Murphy still managed to bite me.  Repeatedly.

Troubleshooting time

Something screwy is happening on the I2C bus in the Workshop 88 dollhouse. It sorta works, but especially the light sensors trigger erratically. It needs to be a lot more solid before we can claim it “just works”. Time for some troubleshooting.  Two obvious places to look are for electrically invalid signals on the bus and logically invalid messages between the nodes.

To make sure the electrical signals are good first, I wanted to look at them with a scope, but connecting grounds between the scope and the PC USB connection might introduce some noise.  So with the scope’s ground not connected, I looked at the DH ground with the scope probe to see.  There was what looked like a significant data signal.  Whatever’s going on, connecting those grounds isn’t a good idea.  (Bite #1.)

XprotolabScope1598OK – I’ve got this cute little ($20!) dual trace Xprotolab USB scope.  If I use that with a laptop running on battery, the grounds are completely isolated.  Surely that will give me good results.  The laptop’s battery isn’t great, but it should last long enough to make some observations.

Since I’d be connecting to the DH I2C bus repeatedly, I made up a nice little adapter with rings for scope probes or clip leads on a bit of perfboard and a “standard” 4 pin header to plug into the bus.  I was very careful to check and BreakoutAngle1585double check the pinout to mark the correct side white, and did a further step of independently figuring which the +5V pin was and then comparing that to a known working connector.  Looks good.  Fired up the DH so there would be continuous clocks and data, connected Xprotolab ground and CH1/CH2 to SDA/SCL and looked at the scope display on the laptop.

WTH?  (Bite #2.)  The signal on both channels is almost exactly the same – a pretty clean I2C data line.  (The clock line would look different, with regular clocks.)  But that’s impossible!  I reconnected just one scope channel first to SDA, then SCL.  Both were the same.  I did various combinations and always got crazy results.  Sometimes the signals would even be upside down (going negative from ground).  I’d had an arcane problem with that little scope before (trying to show Lissajous patterns in X-Y mode for the Glen Ellyn Library STEAM event).  Was it being weird yet again?  My head hurt and I gave up.

A little yak shaving…

I did take a little break to integrate the nice immediate I2C command sketch i2crepl from the I2C package I was using into the DH master code.  That gave me a tool to exercise  individual input and output nodes.  Very helpful for a confused DH with sensors triggering randomly.  But doesn’t help with looking at electrical signals on the bus.

Then there was another side excursion looking at buying a better scope.  My target had been a decent USB scope, but Dave at EEVblog made me consider a venerable Rigol DS1052E.  Rats – it doesn’t have a battery option, so no isolated ground.  Read a couple of threads on proposed hacks to run it on battery, including designing a new power supply from scratch.  Give it up, Jim.  Even if you decide to get a new scope, you won’t have it in time to work on the dumb DH.  (Interesting, but the wasted time was bite #3.)

I’ve also got a (cheap, little) USBeeSX logic analyzer.  I planned to hook that up to capture the actual I2C traffic (again using a laptop on battery) once I was convinced the signals were clean.  But I needed to see clean signals on a scope first.

Back to work

Putting the Xprotolab scope (and Rigol reviews) aside, I tried with a trusted bench scope again.  The DH also has a coax barrel connector to supply 5V power for “normal operation” mode.  I had a little 5V wall wart, and figured powering the DH from that would give me an isolated ground.  (Bad assumption, I think.  The unit is too light to have a transformer, so it’s probably just a big 250V cap dropping line voltage down followed by a regulator.  That wishful thinking was sloppy of me.)

I tried about everything I could think of, including finally boldly connecting the grounds (after measuring voltages first).  When I did that the DH went into looping mode, playing sounds that didn’t make sense.  Again, some times I’d see impossible signals – logically inverted, and going below ground.  Oh – and if I connected directly to the 4 pin connector from the Master Arduino, the behavior was different (and less baffling).  It’s biting me again!

IsolatedGround1602Feeling a little uneasy about the wall wart (and getting desperate), I looked around for another isolated 5V supply.  Hey – I think I picked up some cheap Chinese DC-DC 5V USB out converters.  <digs around a little>  OK sucker – just TRY to tell me that ground’s not completely isolated!

But the bizarre behavior continued.  Including inverted and negative-going signals.


Then I happened to look at the “hub” I’d been plugging my adapter into.  Hey wait:  looking at the side of the hub, both the female connector I’d been using and the one next to it showed white sides.  But the way the hub PCB was laid out, those should have been one white and one not.  And then it started to fall into place.

RootCauseHubB1586During its travels, the shell of one of the 4 female connectors on that hub had come off, leaving the pins still soldered to the PCB.  I found or made another female shell, and forced it on.  I’d painted one side of that shell white, but apparently was asleep when I put it on, and put it on backwards.  And that was the connector I’d been plugging in to!  So all the testing I’d been doing plugged into that hub (with white sides together) had been with the wiring reversed!  (When I plugged straight into the Arduino, the hub was not involved, and it behaved much better.)

Damn.  With the pinout (+5, Gnd, SDA, SCL)  reversed, the “ground” I’d been using was in fact SDA.  So with the Xprotolab scope, the pins I thought were SDA/SCL were in fact Gnd/+5V.  Both of those showed the same signal (DC shifted, but that’s hard to tell on the Xprotolab) compared to the real SDA as reference.  And it explained why some signals seemed inverted, or going negative with respect to the assumed ground (SDA).  I guess I’m just lucky I didn’t blow anything out (especially with that probably non-isolated wall wart supply!).

 Ah, sanity

Clock+DataWith the DC-DC inverter as supply, I reconnected the Xprotolab scope (with the adapter plugged in the right way this time!) and its display on the main PC.  It looked terrible.  Then I remembered I was going through a USB hub, and plugged the Xprotolab USB cable into its own USB port on the computer.  Much better – it’s completely clear which is clock and which is data.  And I looked at how it was hooked up and that agreed. :)

It still wasn’t great, and it was at the ragged edge of what that little scope could handle.  The screen shot above was at 32 μsec/div.  It looked a little better at 16μsec/div, but wouldn’t run at all at 8μsec/div (the fastest setting).  At a max of 2Msamp/sec (1M per channel), that’s only ~100KHz – which is the nominal I2C clock rate!  It’s not quite enough to see how clean the MasterI2Cshield1606waveforms are, but it does look a little rounded, especially the top corner of the rising edge.  The pullups on the I2C bus connector on the Arduino are 3300Ω.  Lowering them would presumably sharpen those corners.  (Hmm – looks like I put a switch in from A3-Gnd for future use.  I’d forgotten that!)

Clocks1612OK – let’s get a little better bandwidth look at this.  On the old clunker – but trusted – 5MHz Telequipment scope next to the computer, we see useful information.  With most of the DH nodes connected, the clock signal looks pretty good.  This says pretty definitively that lowering those pullups would be a good idea, but at least the bottom corners are all nice and sharp.  The data line, though much harder to sync on, looked similar.  There were some spikes on the high level – nearly a volt – but since that’s not where the logic thresholds are, it’s probably not a problem.  Probably.

The next steps will be looking at what’s happening at the messaging and software levels, but that’s for another post.  This one – about how much trouble came from one moment of inattention reassembling a connector so a mark was on the wrong side – is resolved.

Update 5/12/14: It’s not part of the I2C bus electrical questions, but just for a little continuity: I resolved the very flaky behavior of the DH.  Long story, but after reverse engineering the I2C lib I was using, I found additional read functions that returned status as well as data.  By checking the status of each read and ignoring the data on bad reads, it suddenly got much better.  I guess checking return values is right up there with not being asleep when you put connectors together.

Posted in Dollhouse, I2C bus | Tagged , , , , | Leave a comment

Bandsaw light

OldLight1514The bandsaw has needed a light since day 1 (which was a long time ago).  I did a quick and dirty – and not very effective – hack with a clamp-on lamp, but it was behind the saw, and didn’t illuminate where the blade was cutting.  I finally got around to making a good light.

There’s just enough clearance behind the blade guard for a couple of LEDs.  While I’d generally shy away from battery powered lights for a permanent tool like this, Li-ion 18650s from old laptops pack a lot of energy, don’t suffer much self-discharge, and will run a white LED, so they’re OK for a low-duty cycle use like this.  With 3 LEDs for 60 mA max, even if the used 2000 mA-hr cell was down to say 600 mA-hr, that’s still 10 hours of operation.  That’ll do.

I fretted about a constant current source for a while, but finally gave in to 47Ω resistors.  They give barely over 20 mA for a white LED with the cell hot off the charger, and still nice and bright near the end of the cell life.  And it’s quick and easy.  Parts1468I made up a little PCB for 3 LEDs and resistors, and fitted it into the blade guard.  But how to hold the 18650 cell?

BatteryHolder1489The W88 Cupcake 3D printer happened to be at the house (finishing up some prints for the Addison library gig), so I went for a printed holder.  I did the design in tinkercad (don’t say it) in maybe 20 minutes.  To my delight, it actually printed first try without the printer jamming.

BhCracked1494Even though all I wanted was a stub to keep the cell from sliding out (it was to be mounted vertically), I made the end full height to give the extruder a path between the sides to avoid a lot of strings.  I figured I could cut it down with a hacksaw after it was done.  Unfortunately, one side cracked as I sawed.

HollowSide1498From an end view, it looks like the slicer was able to fill the center of one side, but left the other hollow.  Of course it was the hollow one that broke.  I wasn’t very confident, but epoxied the broken side back together.  It didn’t hold against the stress of putting the cell in.  Nice try, no cigar.  But there’s always zip ties :)

Insides1507While cruder than I wanted, a zip tie (and some inner tube rubber) holds the cell in place quite well.  It has my standard 0.1″ female header so I can disconnect and charge it.  I’ll decide in a year or 2 when I have to recharge it whether I’ll haul the charger to the saw or replace the zip tie.  (The wires don’t come close to the wheel, despite appearances here.)

LightInPlace1477Here’s how it looks from the saw operator’s point of view.  It’s just about BackView1483perfect!  From the back it looks kind of unprotected, but there’s really not much happening where it’s mounted, so I think it will be fine.

Here’s the switch (and the slightly Done+Switch1509embarrassing zip tie).  It’s easy to reach, provides great light, and it’s done!  This is another one of those little things that keeps providing a little bit of delight every time I’ll use it.  Inspired by this, I think I’m going to replace that old clamp-on lamp on the drill press with some cleverly located LEDs next!

Posted in Miscellaneous | Tagged , , , | 1 Comment

Pollywogs/Recyclers Tom Pauer Hilton

TopFront1420This is some background and history of the Hilton Micro 75A Tom Pauer bequeathed to Pollywogs/Recyclers.  It lives at Arlene Klemp’s house and she graciously schleps it out when we have visiting callers for either/both clubs.

Bill Haynes complained about having to crank Tom’s Hilton way up for Recyclers on 4/11/14, so out of an abundance of caution, Back1424Phil graciously grabbed the MA-150 from Ebenezer and Bill used that for the C2 and C3A dances the next day without reported problems.

I brought Tom’s Hilton to Chi-Town last Monday and had Sandie try it.  She did a quick check with her computer and got good volume at a normal setting of the control.  But then she All1428remarked about the MA-150 that somebody had left it with the music volume cranked up unusually high, and Bill had been the last one to use it.  She drew a kind of immediate conclusion that there was probably something wrong with Bill’s computer – like its volume had somehow been turned down some.

I wrote to Bill and with appropriate apology asked if that might have been the case.  He replied that he had in fact checked his laptop, and that he didn’t notice anything unusual with the MA-150.  I’m not sure what to make of all that.

There is one other common component, though:  I think Bill used the same speaker (maybe a 2-driver Tom P special?) for all the dances.  If that speaker had a problem, it might have manifested by requiring both Hiltons to be cranked up higher than usual.

I checked Tom’s Hilton out as well, and had no problem getting lots of volume out of it with a half Yak.  I ran it pretty loud continuously for 45 minutes and didn’t notice any distortion or change in volume and it didn’t smell or feel unusually hot.

I don’t have a laptop I routinely use with Hiltons, and so can’t comment on how the music volume control level “feels”.  I did run the same audio source (a red iRiver IFP790) at the same output setting (40 – the max) with Ray Clow’s old Micro 75, and compared to that I think I have seen what Bill saw.  To get the same speaker volume, the music volume control on Tom’s Hilton had to be set considerably higher than on Ray’s, and with the controls both cranked up full I got a lot more out of Ray’s.  Unfortunately, that’s not a great point of comparison since Ray’s unit has an unusual history, having been rebuilt by me.  Voice levels/settings seemed fairly comparable between the two in informal testing with Tom’s old mic.

Tom’s unit has 2 places to put music audio in:  one marked Tape Music on the front and one marked Monitor All on the back.  I got a little more volume using the one on the back, but the music was brighter using the one on the front.  I think both the “inputs” above were really designed as outputs to record dances, and sort of accidentally work as inputs.  As such, it’s not surprising that they don’t work ideally, and I’ve heard that comment elsewhere including the nice hookup pdf here.  Hilton even makes “boosters” to address this issue.  What’s surprising is that Bill reacted as he did to a known “weak” input.

I considered building a booster transformer in, but decided not to take the liberty of doing that.  Another possibility would be making a custom block (no cables) with a transformer and RCA in and out that would plug directly into the Tape Music jack, fitting tightly against the Hilton.  A quick check indicates that the lid could close with it in place so it could just live there forever.  Yet another is a blob containing a transformer with RCA male and females on short pigtails that would at worst just live in the black bag/case for that Hilton.  I have not done neither of those (yet).

My overall take is:

  • There’s nothing wrong with Tom’s Hilton.  It’s an old unit whose workaround music input isn’t very sensitive and works best with a booster.  We should continue to use it as we have in the past.
  • We should still keep an eye on it for a couple of dances.  Having a spare Hilton for those dances would be a good idea.
  • It’s vaguely possible Tom’s/Polywogs/Recyclers speaker is questionable.


Posted in polywogs, Square dance | Tagged , , , , , | Leave a comment

Adventures with the Workshop 88 Cupcake

Driven by both my desire to be able to 3D print stuff for myself and desperation at needing to be able to do reasonable 3D printing demos for the schools and libraries that are asking us to do them, I decided to jump into Workshop 88′s old Makerbot Cupcake printer.  Many thanks to Bill Paulson for shepherding me through my first prints (and repairs).

This post has 2 main parts: The first is some details about the Cupcake for (me or) whoever needs to work on it.  That’s a mix of just factual stuff about the hardware and some history behind how some of it came to be.

The other part – probably much longer and less organized – is my history of making peace with the beast, fixing it, maybe some successes.  Here we go.

W88 Cupcake Details and Background


We bought the Cupcake kit from Makerbot for maybe $575 on a near end-of-life Father’s day sale in <some year>.  Various people put it together, and we got it running.

Early in its life, we took it to an OSMOCES event.  Due to a misunderstanding of how the table legs worked (!?), it fell from table height to the floor.  It suffered some cracks, but still worked.


The brains of the printer is a RepRap V1.2 Sanguino motherboard (A).  It has its own power switch (not visible under the ATX power cable) which is rarely turned off, but is helpful to know about for when it is.  The board talks to the PC via an FTDI USB cable plugged into a 6 pin serial header (B).  (The chip must be in the slightly extended USB plug.)  We run replicatorg v40 software on the PC, but there’s another package from Makerbot that should also work.  This is all the “Gen 3″ electronics, and the mother board seems to be running 3.0 “firmware”.  There is a later version, but since it was said to only contain new code for stepper extruders – which we don’t have (yet) – there was no reason to upgrade.   I think later firmware may also support acceleration – alleged to dramatically reduce the noise and vibration the bot see from its X and Y steppers, so it may still be helpful.

The motherboard was set up to talk to other controller boards both via TTL over ribbon cable and via RS485 over Cat5/RJ45 cables that are NOT ETHERNET!  The only 485 link on ours (C) is to the V2.2 Extruder Controller board (D).  That board provides several things for the extruder:

  • A thermistor input for controlling the hot end temperature.
  • FET-switched DC to the extruder heater.
  • FET-switched DC to the Heated Build Platform.
  • A thermistor input for controlling the temperature of the HBP.
  • H-bridge output to run the DC extruder motor.

Unfortunately, the combination of the H-bridge and the DC motor often fails.  We (Bill, I think) implemented a published hack using a beefy MOSFET on a bit of perfboard (E) to control the motor.  That hack board also gets power directly from one of the power supply’s 12V DC connectors – a much better source than the extruder controller – which gets power for both heaters and the motor over the Cat5 cable!  The hack board still uses the H-bridge output from the extruder controller, but with virtually no current draw to run the MOSFET.  That hack failed ~3/14, and Bill replaced the MOSFET, returning the extruder to operation.  There’s currently a blue LED across the 12V leads to the extruder motor so we can see when it’s getting power.

While the Extruder Controller does provide power directly to the Heated Build Platform, the large current to the extruder hot end heater was judged too much for that board to supply.  So the FET-switched 12V that would go to the heater goes to an added-on dual relay board (G), which again gets power directly from the power supply, and noisily connects and disconnects that power to the heater.  There’s currently a red LED across the power leads to the heater for a less subtle indication of whether the heater’s on than the slightly different clicks from the relay when it makes and breaks.  Its second relay is not (yet) used.  There’s also an LED on the Extruder Controller board for each of its FET-switched power outputs.  That controller board has one unused FET-switched DC  channel, one unused H-bridge, and I think an unused thermistor input (A7).

The motherboard’s non-RS485 connections go via short 10-conductor ribbon cables to the 3 Makerbot V2.3 stepper controller boards (F) (one hidden by the heater relay board (G)).  The RJ45 RS485 connectors on those boards are unused.  The stepper controller boards get power directly from familiar 5/12V “disk drive” power connectors from the power supply, and have wires running directly to the X, Y, and Z stepper motors.

That about covers the imposing mish-mosh of electronics on the side of the bot.


The extruder is a MK5.  This clunker uses a geared down DC motor with a hobbed drive wheel to push the 3mm filament into the hot end.  A delrin block forces the filament against the drive wheel, adding friction and requiring a thumbscrew to be properly tightened.  (The setting is “very tight”.)

Nozzle1306It looks like the nozzle is 0.5mm.  The diameter of freely extruded filament is about 0.65mm.  Hmm – looks like I should wipe the nozzle off more often.

This combo fails a lot – stopping feeding either by stripping the filament or the delrin block being too loose or motor failing or failure of the original H-bridge on the controller board.  All the cool kids have long since replaced them with stepper extruders.  The steppers can reverse and suck the filament back out of the hot end, essentially cutting off the flow of molten plastic almost instantly – and restarting it just as quickly.  This provides dramatically fewer “strings” of filament in places where they shouldn’t be.  In addition, it provides much better control of the filament feed rate.  The word on the ‘net is that a stepper extruder is the best upgrade you can do for a Cupcake.

The DC motor provides quite poor speed regulation, and although it can nominally be controlled via PWM, most people just run it at full speed (PWM value 255) or stopped.  I haven’t found whether the original extruder controller would ever try to run the DC motor backwards to get better stop/start control, but the MOSFET hack only allows it to run forward.

DumbThumbscrew1361A major limitation is the thumbscrew/delrin block that holds the filament against the drive wheel.  It has virtually no ability to adapt to variations in filament thickness.  I guess the designers always used perfect filament.  Completely in agreement with a comment by Jim H, I’ve tried hard to figure how simply to insert a spring in series between the thumbscrew and where the delrin block touches the filament.  A leaf spring?  A block of crushproof rubber of the same cross section as the block?  The location of the nut in the current setup doesn’t leave much room to work with.  Maybe plates on front/back of the whole thing extending off to the right so the nut could be relocated much farther out?  That would give a lot more room to play, but would be a hassle.  Then maybe nut in the same place but supported by a spring instead of those 2 bolts?  Hmm – the nut’s got to resist torque, too.  There are spring loaded parts on Thingiverse – even for the DC motor, I think – to do what we want.  But by the time we do all that, it wouldn’t be much more trouble to build a (spring loaded) stepper drive.

It doesn’t make sense to put much more money into this printer, especially since we’re ordering a new Kossel kit.  But it looks like Bill has some steppers and Pololu controllers, and had even started printing a mounting for a stepper extruder.  He’s buried in this year’s Thotcon badges right now, but I’ll investigate whether I can parlay those parts into a stepper extruder before the next kit comes in in a few months.

Jim’s Adventures and Lessons

Aside from tightening some loose idlers on the Z-axis belt and taking the top part of the extruder apart to clear out a filament jam, the first real repair I made to the Cupcake was on 4/3/14 when the HBP stopped heating (and lighting).  The replicatorg control panel showed its temperature as 1024 C.  If it were actually that hot, it would make sense that the heater wasn’t on, but that seemed unlikely.  While Makerbot has removed a lot of the support info for Cupcake from its web site (Boo!), I was able to find a schematic of the HBP, and verified that 3 wires with +5, Gnd, and signal went to a voltage divider on the platform consisting of a 4.7K resistor and the thermistor.  An ohmmeter on the end of that cable that went to the A6 connector on the Extruder Controller showed 4.7K between 2 leads, with the other open.

HBPthermistorBreak1234StrainRelief1244I took the HBP off and opened it up.  Sure enough, the ground wire had come unsoldered.  I was a little surprised – I expected the failure to be a wire fatigued and broken from the constant movement of the platform.  After I soldered the wire back, I added a little strain relief as protection from the failure I expected.  It worked fine when I put it back together.

Don’t print small

While trying to find something I could print and hand out at a session at Addison Public Library, Jim H suggested (3D) printing on paper or cardboard.  The idea of printing up an array – maybe 3×3 on the 10cm x 10cm print bed – of small cards with some minimal 3D printing seemed like a great fit.  Some googling found that others had succeeded in having prints stick to paper.

So I made up a little “3D” in inkscape, imported to my new friend tinkercad and exported a .stl ready to print.  I made it pretty small – 1.5 x 1.5 cm – so I could print a bunch in one round.  The results were terrible.  I’d had similar problems with other small prints.  I think it stays too warm and mushy and it’s too unsolid to provide a good base for higher layers.  Maybe without a heated platform?  Anyway, small prints seem pretty well doomed, at least on the Cupcake.

SmallIsBad1286So I made it bigger – 3 x 3 cm.  That was much better.  Unfortunately, that shot my idea of printing a whole bunch at once.  Once there was anything to make the card a little more interesting, I wasn’t going to be able to print more than maybe 2 in one shot.

AbsJuice1283The first print on paper just didn’t stick at all.  But when I swabbed the paper with “ABS juice” first, it stuck pretty well.  I’d made up some ABS juice – bits of ABS scrap dissolved in acetone – after reading rave reviews from almost everyone who’d tried it.  I guess it left a thin layer of ABS on the paper that let the printing grab hold.

FirstCardPrint700-1268Unfortunately, while the bottom layer did adhere to the paper, the curling forces of the ABS shrinking as it cooled were way too much for the paper to resist.  (I’m sure even the 110lb card stock I stock would be no match for it.)  So in curling, the ABS lifted some from the paper.  It was still fairly well attached, but clearly not completely bonded.  I could make a much nicer handout by printing on the Kapton-covered bed to get flat prints, then gluing them on the paper.  But that’s just too inappropriate for the task.  I’m not sure what I’ll do.  But it was a really neat idea!

Hmm – I think PLA is supposed to shrink a lot less.  I’m not a fan of it, as it’s much weaker than ABS, and for most of what I’d print, the mechanical strength is important.  But for a thin throw-away demo on paper, it might be fine.  Guess I’ll have to try to beg some on the W88 list.  Boo.

W88 logo

I’ve been working on a good .svg of various flavors of the Workshop 88 logos for quite a while, first inspired by wanting to carve it on the Shapeoko.  But I’ve finally gotten something decent, and now that I’ve found I can import to tinkercad (thanks, Andrew!), I’ve tried to 3D print it.

W88Logo700-1227The first attempt wasn’t too bad.  I happened to run out of filament near the end, and switched colors – a nice touch.  But it’s supposed to have a background, and have the letters attached by more than strings that shouldn’t be there in the first place.

Unfortunately, tinkercad has precious few tools, and nothing that can capture an existing shape (like the overall outline of the shield).  Back to inkscape to add the bottom.  Then import to tinkercad, tweak, save as .stl.  RBW88CoinBefore1253RBW88Coin700-1257But it does give me something I can print.  This time I changed colors on purpose, very slightly before the bottom layer was done so most of the top layer would be the new color.  Here it is before and after about 10 minutes with an Xacto knife.

Flaw1-1264Flaw2-1265Even besides the strings, the print was far from perfect.  It lifted up in one corner.  (I might have mashed that down repeatedly with the spatula as it was printing.)  And for reasons mysterious to me it screwed up across the top, starting and finishing nicely, but messed up in the middle.  Mystery.  Update:  Bill suggests, and I believe, that the problem across the top was that the errant layers just didn’t stick to the layers below.  The natural tendency of the stretchy filament is to take the shortest path between places it’s tacked down to, and I expect that’s what’s happening here.  My best guess would be to decrease layer height so each layer is better smushed to the prior, allowing it to stick.  And the weird thing near the bottom was probably due to bad adhesion to the platform in that section (missing kapton, I think).  The stretchy thing explains the path.  As the extruder tried and tried to put the filament in the right place, it eventually got better.  I like the stretchy explanation.

I still haven’t gotten a formula for how fast the filament moves or even the time between say when filament enters at the top and when the new color is printing clean.  I really need those if I’m going to try to make good multi-color-via-multiple-layer prints.  Someday.

Update 4/4/14:  I did some actual tests at the space last night.  At full speed (from the control panel, extruding into space) it took 50.8 sec to suck in 2″ of filament, for a filament consumption rate of 2.36″/min.  Feeding a new color in, it took 2:50 between the time the old color disappeared into the opening at the top and when the new color was pretty completely in the output stream.  That’s 150 seconds of all-old color plus  20 seconds during which the color fades from first to the second.  I note that even after it’s all new color coming out, if the feed stops (print done), head stays hot, and then flow restarts minutes later, there’s a short burst – a few seconds, fading – of the original color again.

Update 4/7/14:  RPBlogo1311I played with the slicing config some more, and while it’s not perfect, I think I’ve improved it.  I added another layer to the logo to get an actual red, white and blue print.  Figuring what the red layer needed to look like was slightly more challenging than I expected.  But how do I know when to change the filament?  I came close, but not quite a cigar.  If I had started the white just a little earlier – one more layer of white – it would have been pretty good.  But I didn’t, and it wasn’t.

The “WORKSHOP” letters are just below what the filament size resolution can reproduce decently.  But now that I’m this close, I’m willing to make it bigger.  If I fill the whole print bed, the 6.5cm object becomes nearly 10.  That can only help the fidelity of the letters.  For the record, let’s go thru the whole process of making it bigger and figuring out when to change colors.

Back in tinkercad, I took the logo above and stretched it to 9.8cm tall.  I reduced the just-increased height to 7mm.  (The first one was 5.)  In Design, did Download for 3D Printing -> STL.  I opened that file (w88logorwb3.stl) in repg.  Apparently I’d clicked Download before it was quite done with the size change, as it was the old size.  Redownloaded as w88logorwb4.stl.  Bigger.

Not10x10-1313Unfortunately, our build platform isn’t actually 10cm x 10cm, due to screws holding the platform together.  Looks like I have barely 8.5cm clear side to side.  Resized in tinkercad to 8.9 x 8.33 x 0.7, downloaded as w88logorwb5.stl, opened in repg, generated gcode, opened gcode in 3DGenius.

OK.  Looking at the layers, the last blue is layer 5.  That layer takes 217 seconds.  If I want half of the 150 seconds of all-old color on that layer, I need to start about 142/217=2/3 of the way thru that layer, or after ~2:22 into that layer.  The first layer prints vertical lines, then horiz, vert, horiz, vert, then horizontal layer 5.  I have to keep track of that to know when to switch to red.  The total time for layers 0-5 is 1676 seconds, so I’d expect the change to occur after about 1600, or 26:40.  At 2.36″/min, I’ll need ~63″ of blue.

Red is layers 6-12.  The last 3 layers print the top area with vertical, horizontal, vertical lines.  Layer 12 takes 139 seconds, so again if half the old color is on that layer, I need to change just about 1 minute into that layer.  Total time for red is 712 sec, so I’ll need ~28″ of red.  Assuming the 3DGenius times are right, that should happen just about 37:36 into the print.  Yeah, right.  I’ll try to run a timer and see when it actually happens.

SpoolHolder1319White is layers 13-18, for 814+75 sec, so I’ll need ~35″ of white.  I guess I better set up a spool holder.  Here’s a crude one using a tripod.

Back to finding when to change colors.  If you turn on “Analyze” in the slicing profile, repg pops up a nice screen that lets you look at each layer of the print.  From that and the knowledge of how I’d created the object, I could see what layer each color could start at.  And while it did give line numbers from the gcode file, there was no time information.  I needed to know where 2:50 before the color change was in the print.

I found an online gcode visualizer called 3DGenius here that lets you upload gcode and provides a similar layer by layer view, but also provides time for each layer.  Stepping thru the model, I recorded the time for each layer.

Bigger W88 logo and extruder stuff

Took about 5 tries to get it started, for various hardware and operator issues.  Screwed up ~19 min in (layer 1) and stopped feeding.  Retightened thumbscrew, got it started again.  Same again next layer.  Maybe the thickness of the blue varies a lot?  Stopped again.  Paused print, pulled filament out, cut off, reinserted, restarted – seems to be extruding!  Added maybe a minute to the build.  Failed again soon; gave up and stopped the print.

Cleaned it all off, started fresh.  Failed a few minutes in.  Tightened screw, got it going again.  Failed again.  Gave up.

BlueFilament1293Read up on bad filament.  Amazon reviewers of the JAG blue stuff we have uniformly gave it 1 or 2 stars.  Main complaints were off size and embedded air.  Made 10 pairs of measurements on the blue stuff maybe 4-8″ apart, at 90º to check roundness.  It’s pretty bad.  Mean inside-outside of spool curve was 2.74mm, std dev .05mm.  Side to side mean 3.16mm, std dev .042.  That’s pretty oval for a delivery mechanism with a thumbscrew for diameter adjustment and no spring to adapt to variations.

NewSpoolMount1327OK – I can see that the dumb thumbscrew set for one way would be pretty bad the other.  I had set the spool up kind of at the corner, so if it twisted, maybe it went from fatways to skinnyways.  So I cleaned up, moved the spool exactly to one side, so it should always feed the skinny way, and tried again.  Failed just the same way.

Thinking about it, I’ve loosened the thumbscrew and pulled the filament out a few times now.  When it’s not extruding despite tightening the thumbscrew, it’s very hard to pull out, even to the point that  I’m even a little concerned about breaking something.  When I pull it out when it’s working (like to change colors) it pulls out easily.

But uniformly, whenever I put a new filament in and push it down by hand into the hot end, it will start extruding with only moderate pressure on the filament.  That says the nozzle isn’t clogged – but somehow the whole extruder was when it wasn’t feeding.  So maybe the filament gets soft above the actual heating chamber, gets fat (or bends) and runs against the sides of the tube, and won’t move much.

I don’t know exactly what the design thinking was for this hot end, but there has to be some kind of thermal brinksmanship:

  • When the cold filament goes into the top of the stainless steel tube, it’s clearly in the state we see when we handle it.  It’s quite stiff against lengthwise compression, and slides freely in the tube.
  • In the heating chamber, the filament material is very much melted, and while viscous, can easily be squirted out the nozzle.
  • Exactly where is the transition between the two?  It has to be somewhat spread out vertically in the tube.

If the bottom of the tube is too hot, the filament can get gooey too early.  So is the problem that the tube (which has a little dinky heat sink ring on it) too hot?  Would cooling it help?

Thingiverse has several fan shrouds for the common 40mm fans – which won’t quite fit between the 35mm spaced dinos.  (Is that the right word?)  So others must have wanted to cool the tube.  OK, we’re desperate – let’s install a fan.

KilnPaper1331KilnPaper1357Because of vertical pieces of structural plastic blocking crosswise air flow, I decided to blow air from front to back across the tube, but didn’t want to cool the actual hot end.  The dino blocked most of where I wanted air to go, but had enough open that it felt like I could get at least some air on the tube – including on the hottest part.  I had some ceramic kiln paper and fashioned a little protective pad to keep the airflow away from the hot end.

Fan1332I found a 12V 90mA 40mm fan in the junk box and made up a little bracket for it from two thicknesses of the 0.009″ heavy aluminum foil from a catered-in lunch tray that just fit over two screws on a FanInstalled1339horizontal plate.  The only air flow is from the lower third of the fan, but I hoped that would be enough.  After all, the original design didn’t have a fan at all!

FanPowerConn1351Continuing that logic, I figured just the gentle breeze from running the 12V fan on 5V would be sufficient.  There was a free 5/12V disk connector with 0.1″ sockets, so I made one of my usual hot melt-insulated male connectors for the fan, using 2 adjacent pins for 5V (red) and ground.  I tried another print, and while it might have held out a little longer, it still stopped extruding about 10 minutes in.  Damn.

Thankfully, the symmetry of the disk connector provided a plan B:  By flipping the male around, it got 12V instead of 5 (as shown in the picture).  The fan makes a lot more noise, but is still running completely within its voltage spec.  (Although blocking much of its airflow may not be.)

One last try.  It failed, but I paused the print, pulled the filament out, cut it off, stuck it back in, restarted – and it started extruding again.  I smushed the little lump where the head sat while I was changing filament with the spatula.  A couple more restarts, but it got all the way through the blue layer!  Maybe the red isn’t as finicky.  And the red worked and didn’t jam!  And neither did the white!  I got a print!

LiftedEdges1352There were a couple of places where it stopped printing before I noticed, so there are moderate gaps in some layers.  I only had enough kapton tape for 3 stripes instead of 4, so the edges lifted a little, despite applying several layers of ABS juice to the naked aluminum plate.  There were a few of the strings stretched across the top outside like in the first one.  But it worked!

LogoRWBbigRaw1345W88LogoRWB1348Here’s before and after some quality time with an Xacto knife.  As hoped, the letters are a little wider and look better.  I guess the ‘K’ was just the victim of digitization.

I promised wouldn’t spam the email list with any more updates on this, so I’ll just post the nicer picture on the W88 blog with a link here.

Extruder collected thoughts

As of 4/8/14, here’s a summary of what I think about the extruder (with additional musings on the Cupcake proper).

  • The number one problem I see is the non-particulate clogging of the hot end where (I think) the filament above the melting chamber gets soft enough or sticky enough to stick/jam in the tube.  This only seems to happen after ~10 minutes of extruding.
  • As long as #1 persists, it’s not worth putting much energy into the printer.
  • A stepper probably won’t help the #1 problem.
  • I fear there may be contamination in the tube that eventually gets hot enough to slow down the fresh filament.  That’s just a theory, and would require tearing the hot end apart to clean/check it out.  That’s a fair amount of work, but it’s the only way to fix it (if that’s indeed the problem) short of replacing the hot end – an expensive fix for an old printer that’s about to be superseded.
  • I think the fan helps the #1 problem, but clearly doesn’t eliminate it.
  • I suspect the many people who claim a stepper extruder is the best thing you can do for a Cupcake are right.
  • Problem #1 notwithstanding, I’m tempted to consider somehow spring loading the delrin block to remove filament variation problems from the situation.
  • I’d be tempted to continue the work Bill started on a Wade’s stepper extruder – taking advantage of his prints, his stepper and his Pololu stepper controller.  The “ugly cable hack” sounds pretty easy and is free.  But #1 stands staunchly in the way.
  • The blue filament is clearly out of spec.  Its ovalness is bad, but if fed at a suitable angle (so the pinch wheel always sees the same (narrow) dimension) it’s probably not a very big problem.  I’m pretty curious whether it has a particular thermal problem and other colors/suppliers are better.
  • I’ve ordered some 5cm PET tape for the build platform.  It’s alleged to be a little better than kapton, and 2 strips would cover the bed.
  • ABS juice (1 cm 3mm filament in 10cc acetone) really is a big help making prints stick.
  • The little work platform out the back makes re-taping the HBP easier.
  • If we keep prints short, the Cupcake is probably still useful as a beater to drag out to demos, though it certainly doesn’t show what current printers can do.
  • Maybe we haul the Cupcake plus a box full of sample of high quality prints.  We have a box of some on loan from James – thanks!


In hopes of someday being able to provide audible indication of when to change filament color, I added a small noisemaker to the bot.  (I couldn’t find a way to display an indication on the repg screen.  M01 displays, but stops the print!)  After digging thru the code a Beeper1293lot, I discovered that M106/M107 gcode commands will make it thru the maze of software and hardware and control Channel C on the extruder controller board.  I added one of the square piezo buzzers from the space with a 100uF cap across it to that output.

(There was moderate false hope with M70/M71 for a while, but those print messages on the bot – assuming the bot hw/sw support it.  Obviously, there’s no display on a Cupcake, so that can’t work.  But it made very clear the distinction between something happening in repg and on the bot.)

I don’t want to delay the print with much time between the M106 (on) and M107 (off) codes, so the cap allows even a short on time to give a reasonable decaying noise.  Now if I can just get a method of finding where to insert those codes…

Update 4/8/14:  Still no way to find where to insert the codes.  I did try to insert some at a random place or 2, but don’t remember hearing the beeper (though I wasn’t intently standing there listening for it).  Either it didn’t actually work or the machine makes so much noise it drowned the beeper out.

Opening the gcode up in 3DGenius provides enough information for you to figure out about where you might put the warnings, but only by line number.  You still need to open the gcode in an editor with line numbers and re-save it.  The skeinlayer feature under Analyze in repg probably also provides enough information.

While changing colors on the fly by cutting off the old filament and pushing the new in (hard) until it catches in the drive wheel pretty much works, if you push very hard you’re likely to crash the extruder head into the print, possibly doing damage.  An alternative is to pause the print, loosen the thumbscrew, pull out the old filament, insert the new, push it down (all the way into the melt chamber, but not too hard), retighten the screw and unpause the print.  There will be some combination of a gap in the extrusion while it restarts plus a little lump of drizzle where the head parked.  Flattening the lump out with the spatula is pretty workable, and a small gap isn’t a big deal, either.

USB cable clamp

Since the Cupcake is getting moved a lot these days – home, space, gigs – I’m a little more aware of the cabling.  The power cable is fine, but the FTDI USB cable isn’t.

CableClamp1298UsbCabledClampedB1305There wasn’t one the right size in the junk box, but this cable clamp bent from a sheet of ~50 mil white HDPE scavenged from a large bottle looks almost like the real thing!  And now I’m a lot more comfortable that the USB cable isn’t going to do something bad in transport.  I’ll probably replace the 6-32 with one of the black hex M3 screws the cool kids use when it gets back to the space.

HBP tape replacement support platform

PlatformWorkSupport1317During a recent print attempt, the filament stopped extruding, and I pushed it down into the extruder to try to get it started again.   Unfortunately that crashed the nozzle into the HBP and scraped some of the kapton tape off, and I had to replace the tape again.  Since it’s awkward to work on the HBP because the heater and thermistor wires are short,  I made up a crude support platform to make it a little more convenient.  It seems to work OK.

Tip:  To restart a stuck/stripped filament, don’t push it down.  The Z platform isn’t rigid enough to resist that force, and you’ll damage the print or the build platform.  Since the problem is usually a stripped spot in the filament, just turn the filament so a fresh place is exposed to the hobbed shaft.

Addison library printer demo


I agreed to do a 3D printer demo for Liz Lynch at the Addison Public Library on April 30, 2014.  Negotiations for the gig were interesting:  I expected to go in, dump some printed samples out to look at, have the printer running, let kids gather round and ooh and aah while I explained some about what it was doing, do maybe a 15 minute talk on CNC/3D printing, then hang around with another print and answer questions.  Liz said that was a great start, but she’d also like to teach the kids a 3D design program, have them design their own objects, then print them.  Me: In 2 hours?  No way!

Andrew responded to a query on the W88 list that I should look at Tinkercad.  Some other discussions ensued, but it fit perfectly, we used it at Addison, and it worked out about perfectly.  My “No way!” was completely wrong.

Unfortunately, when I got there, I couldn’t get the printer working right.  In a failure I’ve never seen before or since, right after replicatorg did a little test extrusion and was told to continue, the head went down a little, then UP, not back to the print bed!  Of course when it started printing in the air, I aborted.  After several cycles of that, including a PC reboot and power cycle of the printer with no improvement and already being 15 minutes into the session, I gave up.

Adding insult to injury, the slides I’d done for the talk didn’t make it on to my laptop, so I didn’t have those, either.  Not an auspicious start.

I did a little impromptu talk about 3D printing, pointing to the dead printer and holding up printed samples.  Then we showed the kids tinkercad.  While Liz proctored, I played with the printer.  The first object different from the one I planned to have printing when they walked in  worked fine.  If I’d changed objects, I could have had it running long ago.  Ugh.

The kids did great, and banged out their various creative objects.  We got one printed and failed trying to squeeze in a second before we had to go.  At least the kids got to see the printer in action and ask some questions.  Feeling guilty that the talk had gone so poorly (printer malfunction, no slides, but they still paid W88), I agreed to print all the kids’ things at home.  Liz went thru all their accounts, made their objects public, and sent me the usernames.

AllAddisonPrints1575That was an adventure, too.  I finally gave my self permission to make executive decisions and modify (copies of) their objects for easier printing.  I kept some notes while I was printing the kids’ objects, and gave Liz a paper copy when I dropped them off.  For reference, here’s a pdf.

The printer behaved pretty well, jamming only twice.  I decided to try the “support” mechanism in replicatorg with an object with impossible overhangs (the white one).  Seemed to work pretty well, adding one more arrow to my quiver.

ScrewHangUp1546The most interesting glitch was when part way into a print it started extruding above the print surface, but wasn’t jammed.  After various considerations, my best guess is that a repair I made to the broken green filament spool got hung up on the new spool holder.  Screw heads on a bit of scrap I screwed into the spool both for reinforcement and to hold things in place while the epoxy cured might have caught on the spool support/carrying handle and stopped the spool.  The extruder motor then might have caused the whole Z axis to climb up the immobilized filament.  Cool.

Facing that big print job I tuned replicatorg up some more, including finding where the “preheat” values were so I can keep the bed and head hot after a print with one click instead of entering 2 temperatures in the control panel screen.  I think I found all the start and end gcode, and changed default temperatures and added a “go up 1.5cm after print is done” bit.  It’s coming along.

Lots more to be added…

Posted in Cupcake 3D printer, Uncategorized | Tagged , , , , | 4 Comments