Assembling the CupCake

August 17th, 2009 by Keith Neufeld

After leaving the case parts outside in the van for a week to cure, by Saturday they were nice and dry and didn’t feel squooshy when I was putting together tight-fitting pieces. Saturday evening I got the case assembled and the Z stage installed:

MakerBot CupCake with Z stage and some electronics installed

And more yesterday afternoon and evening.

Read the rest of this entry »

Finishing CupCake Case

August 9th, 2009 by Keith Neufeld

I received my CupCake kit around the end of April; it’s now August and I haven’t completed it yet. What’s up with that??? Well, I’ve been finishing the case.

That’s a pun. Here, let me spell it out: I’ve been completing the case by applying wood finish to it.

White “Stain”

I decided early on that I wanted the case to be as light-colored as possible so the interior would illuminate well to watch and photograph builds; but that I wanted to honor the fact that it’s made of plywood and let the wood grain show through.

Back side of plywood from MakerBot CupCake case

That said, the back sides of some of the plywood pieces are a bit rough. (The fronts are all very nice, and both sides of the 1/8″ pieces are nice.) Although the rough sides all face the interior, the interior is where I’m going to be looking and photographing a lot. So a lightening agent with a bit of opacity –but not too much — seemed like a good idea.

Vicki the Paint Lady at Graber’s Ace Hardware led me to a Zar “country white” oil-based wood stain that she had used before and which very closely resembles an oil-based paint. It applies like a stain, but the color particles are white and more opaque than I’m used to from regular wood stain. I had to be a bit careful in the application not to leave it on so thick as to completely hide the wood grain; but I was pleased with the result.

Unfinished plywood against plywood with one coat of white stain

The smaller, upper piece is untreated; the lower background piece has one coat.

Read the rest of this entry »

External Filter Capacitor for Cisco Physical Access Gateway

August 3rd, 2009 by Keith Neufeld

At work, we’re upgrading our sixteen-year-old physical access control (keycard) system. We went with a newish Cisco solution in part because our reseller promised the whole works could run from Power over Ethernet (PoE), so we wouldn’t need separate power supplies.

It turns out the subcontracted hardware installer had never seen this done before, the Cisco documentation doesn’t even reference powering door strikes from the access gateways, the contractor and subcontractor couldn’t stop the gateways from locking up when the door strikes open and/or close, and migration to the new system didn’t happen last week while I was on vacation like it was scheduled to.

I came in yesterday afternoon to have some quiet time to apply a little rigor to the testing. In a couple of hours, I had a bench system broken in the same way as the installed systems, and then the bench system fixed.

Probably the most annoying part of the process is the 70 seconds it takes from powering up the gateway until the gateway powers up the card reader, and another 60 seconds until the gateway is ready for the reader to read. That’s a long wait when you’re frequently rebooting the gateway to try different things.

Basic Wiring

The Cisco physical access gateway has a PoE input for network plus power. It breaks out the power and provides 12V nominal to power the card reader. The subcontractor used these same pins to provide door strike power, with the ground connection interrupted by the gateway’s NO relay output.

I removed all of the electrical tape and twisted wires and provided gator wires for my own testing.

Cisco Power Injector, Short Patch Cord

Cisco physical access gateway running from local power injector on short patch cord

Works fine with a Cisco power injector and a 1.2m patch cord.

Cisco Power Injector, Long Patch Cord

Cisco physical access gateway running from local power injector on 265' cable plus two patch cords

Works fine with the Cisco power injector, 265′ of cable, and two patch cords.

Rack Power Injector, Long Patch Cord

rackmount power injector

It fails with the same setup but powered from our regular PowerDsine rackmount power injectors in the wiring closet. The moment the door strike energizes to unlock (it’s fail-secure), the whole gateway loses power and reboots.

Okay; now we’re getting somewhere — now we have the same problem on the bench that we have in the wild, so I can fix it and it’s meaningful. (As far as I can tell, in all of their searching for solutions, the contractor never recreated the same problem on the bench that was occurring at the installed doors, so their solutions probably weren’t likely to translate well to the real world.)

Capacitor

I installed a 1000μF capacitor across the reader/strike power terminals … and the reader went dead. Whaaaaa?

Further experimentation with the voltmeter, the capacitor, and numerous 130-second reboots suggests that the gateway internally switches the power feed to the reader port (and doesn’t turn it on until 70 seconds after booting), monitors the load, and disables it if it exceeds a threshold. And the inrush current to charge the capacitor is enough to trip the disable.

Capacitor, Resistor, and Diodes

Capacitor/diode assembly for power dips

Mmmokay, need to limit the current into the capacitor to charge it, sounds like a series resistor. But need instantaneous power from the capacitor, sounds like a couple of diodes.

Diode / diode-resistor arrangement for slow filter capacitor charge

Diode / diode-resistor arrangement for slow filter capacitor charge, closeup

Worked great! I ran a bunch of successful “entries” yesterday afternoon with no more glitches.

Making More

Filter capacitor with diode / diode-resistor arrangement for slow charge

Last night I soldered up a couple to try on some real doors today.

Filter capacitor with diode / diode-resistor arrangement for slow charge, heatshrinked

Heatshrinked and ready to go.

Catch Diode

This morning I put one into the bench test setup in place of the loose components I had used yesterday and it worked several times in a row — but one time when the door strike relocked, the whole gateway rebooted.

All righty, we’ll put a catch diode in there yet to shunt the back EMF from the strike coil. Ran a few dozen consecutive simulated entries with no problems. Looks like we’re good.

The contractor is back on site and testing with different strike hold-open times. I’ve explained how to use my capacitor assemblies with extra 1N4001s (reversed), and he’s just added the capacitor and diode to one of the troublesome pilot doors to test in situ. After that we’ll regroup and figure out whether and how to deploy this widely.

As Jeremy would say (approximately), “Science. It works.

Is This Even Reasonable?

Power over Ethernet is supposed to give you 12.95W to use at the device. The only power specification I can find for the gateway says to budget 1.5A for the gateway, which would be at least 18W and already more than PoE delivers.

HES electric door strike, power sticker

The gateway is supplying about 13V to the reader (and strike). The reader’s datasheet says 90mA maximum average current at 12V, so let’s say 100mA, thus 1.3W. The strike says .45A at 12V, so figure about 5.9W. I don’t have figures for the motion sensor and closure contact, but I expect they’re pretty minimal.

Component Power
gateway 18W
reader 1.3W
strike 5.9W
total 25.2W

And that’s well over the 15W nominal, ~13W delivered that PoE promises — but we already were with just the conservative figures from the gateway.

Going the other way, the reader and strike require 7.2W of the ~13W available, leaving only 5.8W for the gateway at the end of a long cable, or maybe 7.8W for the gateway right next to a power injector on a short cable.

Kind of sounds like it’s not a reasonable expectation and it just happens to work right now, which is a little disappointing. Cutting the strike power in half would make a significant difference — but it’s hard to know whether it would truly be enough to fall within spec without knowing the actual power consumption of the gateway, and these are already brand new, low-power strikes.

I don’t want to install the system and have it work intermittently, nor fail quickly. Sounds like a call to Cisco is in order to see what they think of all this.

Disabling Wireless Transmission on a VR3 Automotive Backup Camera

August 2nd, 2009 by Keith Neufeld

After backing my bus into my neighbor’s mailbox, I ordered a backup camera from Amazon. The camera touts wired and wireless operation, and I already knew I’d want to use the wired connection for best picture quality.

VR3 backup camera with LCD

Since the Amazon product description for the related VR3 backup camera with 2.5″ LCD says the wireless connection is 2.4GHz and that’s the same frequency band as 802.11b/g, I also knew I’d want to be sure the wireless transmission was inactive so it didn’t interfere with wi-fi reception in the bus. The support document says:

Some of our cameras have the ability to be hardwired to the monitor. This will eliminate interference by completely shutting down the wireless reception.

Which sounded pretty good. All you need is their $20 extension cable … well, no. Their cable is only 25′, and I’ll need about 50′ to get from the back of the bus to the front. Plus I don’t feel like paying $20 each for cables I’d have to chain together when I can just as well build a cable customized to my own liking.

Testing Wired Operation

I was visiting Cort in July anyway, so I took my new camera along for him to help me try out wiring it up and disabling the wireless transmission. As an avid amateur radio operator and repeater maintainer, he’s even better equipped for this than I, and his spectrum analyzer sure came in handy.

Read the rest of this entry »

Constant-Current LED String Driver

August 1st, 2009 by Keith Neufeld

As mentioned previously, I was contacted this spring by Amanda McClellan of Coordinate It about an LED design project. Amanda is a civil engineer turned wedding planner and needs about a hundred lighted paper lanterns for a large reception on Labor Day weekend.

There don’t seem to be (m)any LED lighting solutions for paper lanterns, and Amanda was interested in the lower power consumption of LEDs without having to go around to each lantern to e.g. hook up LED throwies. She also indicated a willingness to advise me on packaging the system/solution to sell to other event planners out there, which sounds pretty good to me.

LED string driver, all LEDs on

Between distractions, I’ve been working on a design for her. The prototype looks okay, and I think it’s about ready to send out to have boards manufactured.

Specifications

  • Make LED drivers to power 10 lanterns with 2-3 white or warm white LEDs each, with some combination of parallel-series wiring.
  • Cost should be not more than $2.50 per lantern, or possibly somewhat more if the system is completely reusable.
  • Use constant-current drive, for the initial application in the 20mA range but ideally expandable to as high as 100mA.
  • Ideally make the string(s) dimmable through optional analog and/or PWM input — but full-brightness when no dimming input is present.
  • For Amanda’s use, pack 100 lanterns’ worth of drivers into a monolithic case for the sake of aesthetics and convenience.
  • If easily done, make the same driver boards fit into fob-sized cases for smaller applications — Jeremy’s basement, interior lighting for CNC plastic-extrusion machines, etc.
  • LEDs supplied separately. I don’t want to be in the business of soldering and testing LED strings that are going to get used by other people. It’s up to the customer to determine and meet their own LED requirements.
  • If possible, run from 48VDC source, as I have several hundred 48VDC .38A power supplies I’d love to get rid of for the right price.

Driver Selection

I looked over a lot of LED string drivers before making my selection. Here are some drivers I considered and application notes I looked through:

Given that Amanda wants 100 lanterns with 2 or 3 LEDs each, the 3-channel MAX16823 really leaped out at me. Even though some of the other drivers could support higher drive voltages hence more LEDs per string, the 16823′s three strings trump the higher voltages in the “power more LEDs per driver” category, hence providing a lower overall cost to drive large numbers of LEDs.

Because so many of the drivers have a maximum input of 40V, I gave up on using my 48V power supplies and looked for power supplies in the 24-36V range. I’m having a hard time finding power supplies in that voltage range whose price I consider reasonable, and it’s much worse for anything other than 24V, so it looks like that’s what it’ll be. I’d welcome suggestions on sources for inexpensive 24-40V ~1A power supplies, if you know of any.

With a white LED forward voltage drop at 3.4-3.6V and the MAX16823′s dropout voltage of .3-.7V, a 24V power supply could comfortably run 6 LEDs per string or 18 LEDs per driver. With 2 LEDs per lantern, that’s 9 lanterns; with 3 per lantern, it’s 6 lanterns per driver. It’d be nice to have an even 10 lanterns per driver, but I can live with this.

One nice thing about the MAX16823′s circuit is that it doesn’t require a fixed supply voltage or number of LEDs. Just leave a little headroom between your LED string series forward voltage and your supply voltage and you’re good to go. This means I can set it up for Amanda on 24V with 6 white LEDs per string, but Jeremy could use 12V with 3 LEDs per string, and someone with a 40V source wanting to power red LEDs at ~2V each could connect about 20 LEDs per string. That indifference to the details — as long as you don’t make the linear current controller sink way too much current — is really handy.

Circuit Design

MAX16823 LED driver board schematic

The schematic is pretty straightforward — some decoupling capacitors, current-sense resistors for the LED strings, and inputs for PWM dimming. Because I’d like the same board to work in a fob or plugged into a backplane in a larger case, I included dual power supply and PWM dimming inputs.

I figure if you have a large case of these (at least one I make), you’re more likely to want to dim all of the LEDs at the same time than to dim individual strings, so I used resistor-diode logic to tie the three dimming inputs together to a single dimming input pin on the backplane connector.

I also ran the “LEDGOOD” indicator output to the backplane, to invert and provide “LEDBAD” indicators on the monolithic case to show which strings are disconnected or having trouble. Having discussed it extensively with Jeremy (my first fob presale), I didn’t bother to provide LEDGOOD/LEDBAD indication on the board itself for the fob version — if you’re using the fob to power one to three strings, you can just look to see whether the LED strings are working or not.

Circuit Board

After laying out the circuit board, I tried my usual iron-on toner transfer to set up PCB etch resist, but I had much worse luck than usual and gave up. Tom McGuire graciously agreed to mill me a couple of boards at work and even provided pictures of their awesome commercial PCB mill doing its thing.

PCB mill, wide

PCB mill, table

PCB mill, cutterhead

Here are my sad iron-on attempts shown next to Tom’s awesome milled boards.

Circuit boards: Iron-on transfer attempts, milled

Tom “peeled” the waste copper from the top side of one of the boards, because he’s CRAZY.
Two milled circuit boards, one peeled

With Tinnit, verra nice.

Completed Prototype

LED string driver

I assembled this a while back and actually don’t remember for sure whether I used the hotplate or hand-soldered and used braid to soak up solder bridges. Given the lack of waste flux around the driver IC, I think I did it on the hotplate.

I intend to use standard 1206 (or smaller) SMT diodes; but these cute round SMT diodes were on hand (salvaged from something) and they fit well enough. Sadly, I couldn’t find any .203V sense voltage / 20mA target current ≈ 10Ω current-sense SMT resistors in my bin; so as you can see, I improvised.

For now, I’ve populated only the connectors I need to test the prototype, and not even with the type of connectors to be used in the production versions. I bodged this together to work on a breadboard; but the real thing will have right-angle male headers for all the connectors.

LED string driver, all LEDs on

The LEDs stay exactly the same brightness with a supply of 12-19V (as high as my slightly broken bench power supply will go),

LED string driver with LEDs shorted

and also stay the same brightness with several of the LEDs shorted out to simulate a string of fewer LEDs. Looks like pretty good current regulation to me.

Next Steps

Right now I need to get boards built quickly for Amanda, so I’ll probably order a batch of 20 boards (enough for 120 or 180 lanterns) just like this, plus silkscreen labels for the connectors. But for the fob version, I want to include a power switch; so I already know there’ll be revisions coming.

I think when the time comes, I’ll print the fob cases using my CupCake.

Availability

I’d like to sell these to anyone who wants them, and I think they’re going to come to $20-25 each by the time I have the PCB, driver, passives, and connectors. (That feels like a lot to me; but in batches of 100, I think that’s about what it’s going to be.) I’m by no means ready to take orders, but I’d take a straw poll. If you think you might be interested, drop me a comment indicating

  • likely quantity
  • PC board only, fob version, or case with lots of boards
  • configured for 20mA drive, something else, or you want to supply your own current-sense resistor
  • or “$20-25 is just way too darn much for an LED string driver”

I promise I won’t hold you to it, unless you give me answer #4. :-)

Installing a Behringer DSP8024 Equalizer and Upgrading Firmware

June 8th, 2009 by Keith Neufeld

I’m interested in faithful audio reproduction on my home stereo, not just sheer loudness; and even if I don’t end up choosing to stay there, I’ve always wanted to start with a flat frequency response — that is, every pitch that’s played back coming out of the speakers (more to the point, reaching the listener) at the same volume.

My Sony TA-E9000ES preamp / processor has a white noise generator for calibrating the volume of the surround speakers — it sends “static” to each speaker one at a time going around the room. Because I can hear a distinct difference in the “color” of the static when it goes from my main front speakers to my center channel, I already assumed that my different speakers are not providing the same reproduction of the signal going into them — which means that at least some of them (and probably all of them) are not delivering a flat playback.

Behringer 8024 digital equalizer

While poking around on Behringer’s web site, I came across their discontinued DSP8024 digital equalizer. It offers thirty-one 1/3-octave bands of graphic equalization from 20Hz to 20kHz — but more importantly, it offers real-time analysis of your audio system. Connect a reference microphone and turn on auto-equalization and it plays pink noise through your speakers and adjusts the EQ to give you flat response.

And because it’s discontinued, I figured a used one would be a cheap way to get into real-time analysis and flat frequency response. Within a week or so I had picked one up on eBay with the ECM8000 reference microphone.

After flattening my room response, the sound coming through my DSP8024 is simultaneously absolutely awful and absolutely glorious.

Read the rest of this entry »

Recommend a Temperature Logger?

June 6th, 2009 by Keith Neufeld

Any recommendations for a battery-operated two-channel standalone temperature logger that collects data for a while in the field, then uploads via USB or serial to a computer? If proprietary software is required for the upload, then it’s provided? The whole works for under $150?

Insulating Paint for Bus Roofs

I’ve seen a couple of descriptions of mixing ceramic and glass microspheres into paint for repainting bus roofs, with the claim that it’s supposed to have thermal insulating value. One person actually took temperature measurements before and after — but acknowledged that he was going from a schoolbus-yellow roof to white, and the increased albedo obviously helped slow heat absorption into the bus as well.

I have a hard time imagining how — in the paint thickness and mixture proportions described — the microspheres could have much of an insulating effect. It seems as though there must be a whole lot more brittle than peanut, and the heat would go right through the brittle. But I’m willing to be convinced.

The Proposal

Converted schoolbus, front

Let’s do the empirical test of insulating microspheres on a bus roof. Half of my bus roof is already an extremely light grey that looks white. I want to paint it white. I’ll even pre-paint the purple roof edges white for the sake of the test. The magic spheres are relatively inexpensive and I’m willing to try them in the “real” roof paint job.

Help me find a two-channel temperature sensor — or two one-channel sensors — for under $150 and I’ll put one inside and one outside the bus for a month, taking readings every five minutes so we can graph outside and inside temperature. Then I’ll paint the roof with magic spheres mixed in and graph the inside and outside bus temperature for another month and we can compare the two.

Is this a proper test? Care to change the methodology and/or add constraints?

Of Course I Could Build One …

But I have enough things to build right now, I’d rather buy this. ‘Kay?

I Bought a Bus

June 2nd, 2009 by Keith Neufeld

For years, I’ve been enthralled with the idea of buying an old schoolbus, ripping out the seats, and converting it approximately into an RV. While in college, I thought it should have a B/W darkroom and that I should cross the country taking and printing photos; but today film is out of fashion and I’d rather it have an electronics laboratory (that’s “la-BOHR-a-tree”).

Converted schoolbus, left front

My dream appears to be taking shape in reality. Last week I won an auction for a half-converted former schoolbus previously owned by a university athletics fan and used as a tailgate bus. It already has the seats removed, potable and waste water tanks plumbed, and many other interesting “features.”

I’ve started a new schoolbus conversion blog to describe the project. I’ll cross-post to the electronics blog only when work pertains to electronics; so if you’re interested in the schoolbus conversion in general, you should subscribe to that blog separately.

Posts will be relatively infrequent as I expect the projects to be larger and take longer.

(Mostly) Assembling My CupCake Motherboard

May 25th, 2009 by Keith Neufeld

The MakerBot CupCake‘s motherboard (RepRap generation 3 motherboard) is Arduino-compatible, connects to all the other boards in the CupCake / RepRap, and has lots of spare connectors to boot.

Ah, spare connectors to prototype, I mean; the spare connectors aren’t needed in order to get the board to boot. Ha ha.

Mostly-assembled CupCake motherboard

I got mine mostly assembled last week. Like every other piece of electronics in my CupCake kit, my motherboard had missing parts — I got five extra 4.7KΩ resistors instead of the five 1.8KΩ resistors. And unfortunately, that was another part for which I couldn’t find replacements at hand — although I did end up sorting and filing a bunch more SMT components while searching.

After waiting a week for the missing resistors as the solder paste was drying out and getting crusty, I gave up and baked the thing without them. I can hand-solder the 1.8KΩ resistors onto the board when they arrive. And because they’re voltage dividers for 5V → 3.3V level conversion to the mini-SD card and pull-ups for the I2C bus — neither of which is needed for basic operation — I can even run the darn thing without them. I just need to get them on there eventually.

Crusty solder paste bakes just as nicely as gooey solder paste, by the way.

Unlabelled R1 on MakerBot Cupcake motherboard

I did spend a while searching for the placement of R1 on the PC board. I eventually found it through a combination of the process of elimination and checking the schematic. As far as I can tell, the name label didn’t make it anywhere onto the silkscreen — can you spot it?

Simple LED Brightness Tester

May 25th, 2009 by Keith Neufeld

Back in March, I was contacted by Amanda McClellan of Coordinate It wedding planning. She’s interested in LED lighting for paper party lanterns; and although she has an engineering degree, electronics is not specifically her forte. She wondered whether I help her figure out how to drive the LEDs, and, well, you know how I feel about LEDs. :-) So of course I was interested.

The challenge, of course, is that LEDs need a constant-current drive; and it’s not easy to drive a string of LEDs at a constant current (hence constant brightness) using a simple current-limiting resistor. I’ve looking at constant-current LED driver ICs, and am close to putting together a simple but useful LED driver circuit, with intention to both open-source the design and offer the hardware for sale. More on that soon.

LED Tester

Meanwhile, as I’ve researched driver chips, Amanda and I have been talking about how many LEDs (and indirectly how many mA) it takes to light a paper lantern. She wants the lanterns for decoration, not illumination — Last weekend I assembled and shipped her a simple LED tester to allow her to try some LEDs inside lanterns and see how many LEDs and how much current she’s going to want.

My idea was to make something that could:

  • run off a 9V battery (enough to power a series string of two white LEDs at ~3.4V each)
  • allow her to vary the LED brightness for testing
  • allow her to measure the LED current without having to stick an ammeter in the circuit

LED tester schematic

Regarding that last point — ammeters have to be connected in series with the circuit under test, so the LEDs would go dark when the meter wasn’t connected. Instead, I used a 1.0Ω current-sensing resistor in series with the LED string. Across the 1Ω resistor one can measure 1mV for each 1mA of LED current; and removing the voltmeter from the circuit has no effect on the LED operation.

R1 (20Ω) is there to save things if the potentiometer is turned to its minimum value of (theoretically) 0Ω. With two 3.4V LEDs in series, the combined LED voltage drop is 6.8V and the voltage remaining across the various resistors is 2.2V (or .4V with the NiMH “9V” battery I use at home). 2.2V / 21Ω ≈ 105mA, which is way too high for a normal LED and puts almost a quarter watt across R1. Not great; but it’s a last resort instead of a dead short, not a desired operating mode.

The Board

PC board with iron-on 'silkscreen' layer

I used the laser printer and household iron to do toner transfer for etch resist, and also to transfer the “silkscreen” on the top side. I get best results on the silkscreen side peeling off the paper while everything is still hot, and I was particularly pleased with the transfer quality here. Not perfect, but it’s pretty legible for 70-mil text.

LED tester PC board

Here’s the populated board, sized the same as the battery it runs from. In retrospect, I should have moved the potentiometer further down or the LED connector further up, but I was intending to use a right-angle connector that would lay flat on the board. Couldn’t find any in my parts bin when I went to assemble it.

The test points at the bottom are wire loops sized to friction-fit my voltmeter probes. They’ll also work well for clips or gator wires.

In Use

LED tester

Here it is in action with a couple of amber LEDs plugged in. They don’t look bright enough to me — but letting Amanda determine that is the whole point of this exercise. She’s the expert on event planning; and it’s her assessment that matters, not mine.

Paper lantern with LED lighting

This is two warm white LEDs inside a paper lantern. Under normal room lighting, you can tell there’s light inside, but it doesn’t look dramatically lighted and diffused as I think one would want it to.

Paper lantern with LED lighting in the dark

In evening darkness, the lighting is more noticeable. And in spite of having set white balance carefully before taking the shot, my old camera changes the warm yellowish white light into cold blueish white light. Ach, what can a fellow do. Looks good in person, though — if not necessarily bright enough (to me).