BMOW title
Floppy Emu banner

Archive for the 'Bit Bucket' Category

How to Clean a PCB

Lately I’ve been assembling a lot of Retro USB boards, and that’s got me thinking about the best way to clean them after assembly. I use a “no clean” flux for my assembly work, so in theory I don’t have to have to clean it off, but if I don’t then it will leave an ugly sticky mess. Unfortunately the black soldermask of Retro USB boards seems to highlight flux residues more than other colors. I’ve also recently started using a gel flux in a syringe instead of a flux pen, and it’s stickier and leaves more residue. So good cleaning is more important now than ever.

In the past, my standard cleaning method was regular cotton swabs (Q-tips) with 99% isopropyl alcohol. It dissolves the flux residue, but the swabs snag easily on the sharp corners of parts, quickly become shredded, and leave tiny cotton fibers everywhere. I’ve now started using Chemtronics cotton tips, which are basically fancy Q-tips designed for industrial use. The cotton is packed and wound more tightly than Q-tips, and they’re “low lint”, whatever that means. It helps reduce shredding and stray cotton fibers, but doesn’t completely eliminate them.

The isopropyl alcohol also leaves a residue that’s visually unattractive, as you can see here. Its visibility depends greatly on the angle of the light, and I’ve intentionally chosen the worst angle for the photo. I’m uncertain if this residue is really from the alcohol, or whether it’s the remnants of the flux dissolved in the alcohol, but whatever it is leaves streaks on the PCB when it dries. I’ve found I need to wait until it dries, then use another dry cotton swab to buff the dried areas and remove the streaks. The end result still isn’t perfect, though it’s pretty good. But the whole cleaning process can be very time consuming, requiring several minutes per board.

It’s my understanding that commercial PCB assemblers wash the finished boards in hot deionized water and some kind of solvent. It’s essentially a special dishwasher for electronics. I don’t have that kind of equipment though, and I wouldn’t be excited about washing PCBs where my kitchen dishware and utensils go. In the past I’ve tried hand-washing finished boards with ordinary hot water and dish soap, and it worked OK but still wasn’t squeaky clean. Washed boards also require a special dryer, or a long period of air-drying to ensure all the water is out before powering the board.

Do you have a favorite method of board cleaning? Leave a note in the comments.

Read 2 comments and join the conversation 

The Emerging Retrocomputer Industry

While visiting the Bay Area Maker Faire this past weekend, I was struck by something: we’re seeing the emergence of a full-fledged retrocomputer industry. There were at least two retrocomputing-specific businesses exhibiting (GGLABS and Manila Gear), and a couple of others selling newly-designed systems running BASIC that would have been at home in 1982. Yes, this stuff has been around since back when retrocomputing was just “computing”, and there have always been vendors providing replacement parts for obsolete machines. But it’s only within the past few years that we’ve seen businesses developing new hardware for 25-year-old computers with no practical purpose beyond nostalgia.

This is a surprisingly big market. Name any brand of computer from the 1980s, and there’s almost sure to be someone in 2017 who will sell you new peripherals and expansion hardware for it. Just within the retro-Apple community, besides BMOW and the two others I already mentioned who are developing new retro-centric hardware, there’s Rich Dreher, Nishida Radio, Michael McMaster, A2retrosystems, RetroConnector, Sigma Seven Systems, Plamen Vaysilov, and many many others (let me know who I’ve forgotten). Then there are also general merchandise stores of retro-Apple products, like A2Heaven, UltimateApple2, and Reactive Micro. I’m not always clear whether those are storefronts for a single business’s own products, or whether they’re reselling products developed by others, but either way they’re impressive. If you’re in love with old computer nostalgia from decades past, then these are the golden years.

Read 4 comments and join the conversation 

Bay Area Maker Faire Meetup

The Bay Area Maker Faire is this weekend. Who’s going? I’ll be there today – and if you want to meet up and say hi, I’ll be at the Make: Electronics stage in building 2 at 3:00 PM. Look for the guy in the BMOW t-shirt.

This will be my first Maker Faire in several years. In the early days I went every year, but after the crowds passed the 200,000 mark I got scared off. Hopefully I won’t get crushed and trampled this time!

Read 4 comments and join the conversation 

Electronic Junk Mail Teardown

I recently got some very surprising junk mail that contained a full-fledged embedded computer. This was a first for me, but I wonder if there will be more to come? Of course I couldn’t resist the temptation to tear it apart and see what was inside.

The mail was something related to “The New Arconic”, which appears to be a proxy fight over control of the Arconic corporation (formerly Alcoa, the Aluminum Company of America). They want me to vote for new candidates for the board of directors – blah blah boring. But instead of sending me a persuasive letter or glossy brochure, they mailed a purpose-built video player with a 3 inch TFT screen and control buttons built into a small cardboard envelope.

Nothing happened when I pressed the power button. Dead battery? I located a micro-USB connector on the side, plugged in a charger, and waited. After a few minutes, the distinct aroma of fried electronics began to fill the air, and the cardboard was extremely hot. Doh! Of course, the only thing left to do was tear the paper apart and see what was inside.

The guts contained a TFT display module, with a piece of paper glued to the back, and a small circuit board affixed to the paper. Everything was connected by point-to-point wiring, and appeared to be hand-soldered. A 500 mAh 1.85 Wh LiPo battery powered the system. Five standard 12 mm tactile switches were taped around the edges, and a circular element in the corner I’m guessing was a piezo speaker. The only component I couldn’t identify was a tiny circuit board containing a single 3-pin chip, attached to a 1cm circular metal disk. It’s labeled Q5, and I’m guessing it’s the transistor used to enable power to the main board. [It’s actually a magnetic relay that turns on the power when you open the box cover.]

The burnt part of the circuit was clearly identifiable, in a corner of the main board near what looked like two inductors.

The main board contained three large chips: a Toshiba FV194 14399AE, a Hynix _Y5DU561622DT-J, and an unbranded E200 GC137DA. The first letter of the Hynix part number was obscured by burnt crud. I couldn’t find any info on the Toshiba chip, but based on its appearance and by process of elimination I’m guessing it’s a flash ROM containing the video file to be played. The Hynix part is DRAM of some type, though I couldn’t find an exact match on the part. The E200 is a PowerPC based system-on-a-chip. While searching for info about it, I found this Hackaday article from 2014 describing a teardown of very similar hardware. It looks like this is a standard platform for disposable electronic advertising, and the Italian company that makes them is here.

Given that they mailed me a fire hazard that needs to be specially recycled, I’m not too sympathetic to New Arconic’s advertising.

Read 9 comments and join the conversation 

Managing Multiple Power Supplies

I’ve been investigating ways to handle multiple supplies and consumers of +5V 500mA power in a single project, and it’s surprisingly complicated. My circuit may have up to three simultaneous external connections: a device needing +5V power at “A”, an external +5V supply at “B”, and something at “C” that might either supply +5V power or need +5V provided to it, depending on what mode the circuit is operating in. Any of these three could be present or absent, and the external +5V supplies could possibly be connected but turned off and not delivering power.

The simple solution would be to directly connect all of those +5V lines within my circuit. That would work, and maybe it’s what I’ll do, but it presents some risks of unintended current backflow into a supply. Imagine if B and C are both connected, with C configured as a supply. If one is turned off, the other would feed +5V into it. Depending on what that supply is and how it’s designed, feeding external +5V back into a device that’s turned off may cause weird behavior or damage. A similar problem could arise if a poorly-designed device on A actually powers the +5V line instead of drawing power from it, because it has batteries or an independent supply of its own.

I’m willing to handle the bidirectional nature of C with a physical switch. But I still need something that ensures current only flows in the intended direction in/out of A, B, and C, as shown in the diagram above. The ground connections aren’t shown, but they are all tied together. Current direction arrows mean diodes, right? I think diodes would theoretically work, but probably aren’t the best choice. A diode would cause a substantial voltage drop between the supply and whatever it was powering, and you need a diode that’s physically large in order to handle significant amounts of current.

A better solution might be a transistor. From studying similar circuits, a good choice might be a power MOSFET. These have a very low resistance when switched on, resulting in only a small voltage drop. A small-sized MOSFET could also handle all the 500mA current I need for this project. But I don’t have any experience working with single MOSFETs in this kind of application. I get a bit bogged down in discussions of N and P type, enhancement and depletion, high-side and low-side switching, and so forth. I’m not completely confident I’d know which specific MOSFET to select for my purpose, and how to connect it in the circuit, and what limitations or unexpected behaviors it might have.

An even better and simpler solution might be a power distribution switch IC, like the Microchip MIC2005A. This is basically a MOSFET, but one that’s designed for this specific purpose, with some extra features like soft start, current limiting, and thermal protection. And in the SOT-23 package I’d likely use, it’s not much more expensive than a generic MOSFET.

Power distribution ICs are designed to conditionally enable a power supply, and they have an /ENABLE pin to determine when to energize OUT from the supply at IN. But I would be using them always enabled, just to get the reverse current protection feature. Maybe that means this is the wrong tool for the job, and a different solution would be better?

A second question is whether a power distribution IC like the Microchip MIC2005A actually provides reverse current protection. It has terminals labeled IN and OUT, but it’s not clear if anything prevents current flowing from OUT to IN if OUT is energized by something else. I skimmed the datasheet, but couldn’t find any mention of this.

A final question is whether connecting the OUT terminals of several MIC2005A chips would cause problems. That’s what I’d need to do, if both B and C might function as +5V supplies. I can imagine this might cause a problem if one of the MIC2005A chips finds its OUT terminal at +5V even though its IN terminal is at 0. Or it might be a problem if both B and C were turned on at the same time, both delivering “5 volts”, but one was 4.9V and the other 5.1V. I didn’t see anything in the datasheet that addresses this either.

I’m trying very hard to keep the total cost of this solution low, like 50 cents or less. There are more complex power management ICs that might simplify things, but cost $2 or more apiece. Add the cost of assembly, and a retail markup sufficient to get acceptable margins, and the final sales price of the product would have to be increased by an unacceptable amount. I would probably choose to eliminate functionality instead, or just use the “connect all +5V supplies” approach, before I made a significant increase in product price just to support power management.

My diagram shows five current direction arrows, so potentially I would need five MOSFETs or MIC2005As. But I don’t actually need one on the line to the “circuit” cloud, because there’s no possibility of current flowing the wrong way. And the two arrows at C could probably be collapsed into a single arrow, if I used a DPDT switch that reversed the connections to the MOSFET or MIC2005A terminals. And I maybe don’t really need the arrow at A. If a device at A were to backflow +5V power, it would turn on the circuit, and possibly also supply power to C depending on the switch setting. That would be unexpected, but I don’t think it would harm anything. Applying all those simplifications, I might be able to get away with as few as two MOSFETs or MIC2005As, squeaking under my arbitrary $0.50 budget.

Read 21 comments and join the conversation 

Fruit + Electronics = Piano

The human body is electrically conductive. A piece of fruit will also conduct electricity, as will basically anything else that’s organic. We can leverage this fact to create a fun little afternoon project: a digital fruit piano. No soldering is necessary, and the whole thing takes less than an hour, even for a total beginner like my 9-year-old daughter. What sound does a banana make? Let’s fine out.

While humans and fruit do conduct electricity, they’re pretty bad at it. Both typically have an electrical resistance that’s in the 1-megaohm range, depending on how moist your skin or nectarine is. This design uses your body and the fruit as part of the circuit, flowing current through the human-fruit “wire”, but the high resistance means that the currents involved are tiny. The piano player isn’t going to feel a shock, or even feel anything at all. She’ll just lightly touch different bits of fruit to play a song, almost as if by magic.

This isn’t my original design. The idea of controlling a digital device by using the human body as part of the circuit has been around for quite a while, and the Makey Makey has popularized it with a nice little kit. If you like this type of project, definitely check out the Makey Makey! But if you’re lazy and cheap like me, you can build a similar device yourself with only an Arduino and some hookup wire, a few resistors, an audio speaker, and a selection of bananas, pears, and peaches.

How does it Work?

The basic concept is simple. Each piano key is a voltage divider circuit involving two resistors: one 1-megaohm resistor and one piece of fruit. Touching the fruit will change the resistance in the circuit, resulting in a change to the voltage at the junction between the two resistors. The Arduino can measure this changing voltage with an analog input, and use it to control an audio speaker.

To complete the circuit, one hand should be connected to the Arduino’s ground pin, while the other touches the fruit. Current will flow through one hand, up the arm, across the chest, down the other arm, and back to Arduino GND. For convenience’s sake I connected GND to a metal ruler, but a plain jumper wire also works fine. For the fruit connection, just stab a wire straight into the fruit. Soldering a banana works poorly…

banana piano

If the hand isn’t touching the fruit, then the whole fruit-hand-body section becomes an open circuit with infinite resistance. In this case, the circuit simplifies to just +5V connected through a 1 meg resistor to the analog input. Because the analog input draws virtually zero current by itself, there will be no current flowing in the circuit and no voltage drop across the 1 meg resistor (remember Ohm’s law V = iR, so when i = 0 then V = 0). The voltage measured at the analog input will still be +5V, and Arduino’s analogRead(A0) function will return 1023, the maximum possible value for its 10-bit resolution.

When the hand touches the fruit, the fruit-hand-body section forms an organic resistor of about 1 megaohm. Current will flow from +5V through the real 1 megaohm resistor, then through the fruit-hand-body 1 megaohm resistor and down to ground. The total resistance between +5V and GND is 2 megaohms, and with two equal value resistors, the voltage at the point midway between them will be half the total voltage drop. That means the Arduino’s analog input will see 2.5V, and the analogRead(A0) function will return a value around 512.

To make a piano, a simple Arduino program is needed to continuously poll each analog input, and play a tone if the analog value is below an appropriate threshold. I used a threshold of 800, but you’ll need to experiment to find the value that works best for you. The sample program uses tone frequencies corresponding to the notes CDEFGA of a C major scale, making it easy to bang out favorites like Mary Has a Little Lamb, Hot Cross Buns, and I Ate the G Key.

Each of the six fruits is connected to one of the six Arduino analog inputs A0 to A5. If you’re wiring this up at home, duplicate the pictured banana circuit six times, connecting the first to A0, the second to A1, and so on up to A5. Then connect your speaker’s black wire to GND and red wire to Arduino pin 8. Happy fruit playing!

void setup() {

void loop() {
  if (analogRead(A0) < 800)
    tone(8, 523, 130);
  else if (analogRead(A1) < 800)
    tone(8, 587, 130);
  else if (analogRead(A2) < 800)
    tone(8, 659, 130);
  else if (analogRead(A3) < 800)
    tone(8, 699, 130);
  else if (analogRead(A4) < 800)
    tone(8, 784, 130);
  else if (analogRead(A5) < 800)
    tone(8, 880, 130);
Be the first to comment! 

Older Posts »