Author Archives: Paul Rako

About Paul Rako

I'm an engineer that writes and a writer that engineers.

AVR ATtiny10 runs LED blinker for 6 months

Check out our new AVR site. In celebration, I want to tell you about a neat project. My buddy Wayne Yamaguchi had a whole bunch of tiny coin cells left over from a project. So he whipped up a little AVR blinker using an AVR ATtiny10. The one he gave me flashes every two seconds and is quite bright. Wayne’s design intent was to put this inside a phosphor-coated globe and have a UV LED charge up the phosphors every few seconds. For this round he is just using a white LED, but you can see “UV” on the silkscreen. Wayne has done some quick calculations and it looks like if you slow it down to one 3mA flash every 8 seconds it should last for 6 months. Wayne’s trick it to take the AVR out of active mode and put it to sleep, and use the Watch Dog Timer to wake it up, flash the LED and then go back to sleep. Wayne describes the ATtiny10 project here.

ATtiny10-blinker_Yamaguchi_finger

This flasher works 6 months off a CR1220 lithium cell. Using the ATtiny watchdog timer is the secret to such miniscule power consumption.

It’s interesting to note that Wayne started out with a MCU from an Atmel competitor and found it unsuitable. As many other friends have noted about these other MCUs, Wayne said, “…a lot more coding had to be done to get the job accomplished.” He also ran into limitations where he had to do a work-around in the competitor’s chip. Another friend has commented that competing MCUs can often do one thing well, but when it needs to do two tasks, even simple ones, there are real headaches. That is why they love AVR chips. AVRs were “invented” as a complete modern architecture. Once you know one chip, it’s easy to move around to others in the AVR family, even the AVR 32-bit chips.

The only reason Wayne did not start with the AVR is that he thought he could not keep his obsolete Studio 4 install, which he knows and trusts, and still program the ATtiny10. I asked around, and my Atmel pals told me that everything Wayne would need is in the Atmel Software Framework (ASF). Sure enough that lead Wayne to a solution, and he had his ATtiny10s working under Studio 4. I kept telling Wayne to just upgrade to Studio 6, which will let you program AVR-32 and our ARM-based MCUs as well as all the 8-bit AVRs. Wayne did not want to risk changing environments, since he has several existing products that he changes and customizes and supports with Studio 4. My friends say the answer there is to just run virtual computers with VM Ware or Virtual Box. You can have Studio 4 on one Windows install and Studio 6 on another. Or you can set restore points and go back and forth between the two Studios on one install.

ATtiny10-blinker_Yamaguchi_prototype

Wayne Yamaguchi uses toner-transfer and a homemade acid bath to make prototypes in an hour.

Another interesting thing in Wayne’s blog linked above is a picture he has of the prototype. At first blush it looks like he used a router like a LPKF machine to do the board. But if you look closely, you can see some un-etched copper at the edges. Wayne uses toner transfer and a ferric chloride tank to make his own PCBs in a couple hours. The reason they look like routed boards is that Wayne is smart enough to generate the Gerbers this way so that he uses the minimum amount of ferric chloride to etch the copper. Why etch off big areas if you don’ have to? He outlines this technique in an article about prototyping I wrote a few years ago.

Now wayne did the prototype raw-copper PCB in a day to get started, but he wanted a nicer board for development (see pics and below). For this he turned to OSH Park up in Oregon. He panalized the boards as you can see from the break-away tabs on the edge. The bottom line is each PCB ended up costing him a dollar. I think he was out 20 bucks for the order and got 18 boards. OSH Park collects orders for small lots and puts them all onto a 18×24 panel used in the PCB fab industry. I like the looks of the boards since you get a silkscreen and soldermask. Don’t think, “Its just a prototype, I don’t need a silk or soldermask.” It’s you the one soldering on the board and a silkscreen tells you what goes where. It’s you re-soldering stuff and hand-soldering stuff and the soldermask is a blessing, especially with tiny parts. You want your prototype to be as close to production as possible. OSH Park panelizes two-layer boards every other day and gets a four-layer panel together every four days. You might wait a bit, but I have heard of several happy customers. For small boards like the Blinkie, they make great sense. For anything more serious I will stick with Proto-Express, right here in Silicon Valley. They do 4-mil spacing, can do 24oz copper (not at the same time!) and once your board is perfect, they have a partner in China to do high-volume for cheap. Three standard 2-layer boards in 4 days for about $90 and three 4-layer boards for $150 or so. And that is silk both sides if I remember right.

In addition to the info on his blog post linked above, Wayne sent me an email with the information about the flasher. He uses Evernote to store his notes as he does a project, so below are his notes to himself. I put in current Digi-Key pricing.

Wayne-Yamaguchi_Blinkie-LED-flasher

Wayne Yamaguchi shows the Blinkie flasher he designed.

Wayne did this project a couple months ago. What was interesting was how much longer the flasher ran compared to his calculations. We are not sure if this is because the batteries really have more energy when you discharge them this way, or maybe there is some other factor we don’t understand. It’s good news nevertheless. I can tell you the flasher he gave me a couple months ago is still flashing every 2 seconds. Here are Wayne’s notes:

CR2016, CR2032 Battery Info UV Blinker

2016 – 90mAH

2032 – 240mAH

Compute the average current if LED is pulsed 1 sec every 10 minutes.

1 minute = 60 seconds, 10 minutes = 600 seconds.

1 out of 600.  0.17% duty cycle.

If the LED current is 10mA then average is 17uA.

Attiny10 Power down supply current @3V is 4.5uA.

Attiny10 pricing (Sept 17, 2013):

All prices are in US dollars.
Digi-Key Part Number ATTINY10-TSHRCT-ND Price Break Unit Price Extended Price
Quantity Available Digi-Key Stock: 21,464

1

0.69

0.69

Can ship immediately

25

0.576

14.4

Manufacturer Atmel

100

0.464

46.4

1,000

0.4256

425.6

Manufacturer Part Number ATTINY10-TSHR
Description IC MCU 8BIT 1KB FLASH SOT23
Lead Free Status / RoHS Status Lead free / RoHS Compliant

CR1220 battery Energizer Specifications.  Typical Capacity 40mA/Hr.  down to 2V.

$0.90 each at Digi-Key (Panasonic)

The Nichia 310 in the open bag measure 3mA @3V.

Watch Dog Timer table (from ATtiny10 full datasheet):

ATtiny10_WDT_prescale

CR1220 UV Blinker Board as rendered by OSH Park.

Yamaguchi_CR1220_PCB

Here is the PCB layout for the CR1220 battery Blinkie

 Using 3mA for LED current and 40mA/hr battery capacity gives these run-times:

Delay

tiny10current

average LED current

Estimated Run Time

1 sec

4.5uA

30uA

1,159hrs – 48.3days (~1.61 mos)

2 sec

4.5uA

15uA

2,051hrs – 85.47days (~2.84 mos)

4 sec

4.5uA

7.5uA

3,333hrs – 139 days (~4.62 mos)

8 sec

4.5uA

3.75uA

4,848hrs – 202 days  (~6 mos)

0.25 sec

4.5uA

120uA

240hrs – 10.04 days

0.125 sec

4.5uA

240uA

163.6hrs – 6.82 days

64mS

4.5uA

480uA

82hrs – 3.4 days

CR2016 (20mm lithium) UV Blinker Board as rendered by OSH Park.

Yamaguchi_CR2016_PCB

Here is a PCB layout for the Blinkie using the larger CR2016 battery.

Note to self: It appears that the ISPmk2 (in-circuit programmer) does program at 3V or other voltages.  The error message during programming is verification failed.  But, it appears to be programmed correct.

As a side note, future blinkies should have the LED driven from the free pin PB2.

Run-time test: 64ms sec Blinkie.  1220 battery.

6/22/2013 2.975v

6/26/2013 – 2.750V 6:16   (Should have ended today)

6/27/2013 – 2.736V 10:08am

6/28/2013 – 2.728V 2:06pm

7/3/2013 – 2.43V 9:57am

7/4/2013 – no LED.  Could be still running, but, LED is not visible.

Wayne-Yamaguchi_Francis-Lau_Blinkie-LED-flasher

Wayne Yamaguchi (L) explains the LED flasher held by crack protégé Francis Lau. Lunch was at the Pho Kim restaurant in San Jose.

ATtiny10-blinker_Yamaguchi_flash

It took a few tries, but I finally caught the Blinkie flashing when I snapped the picture.

-30-

PCB layout tips for thermal vias

I came across an article on PCB layout in Electronic Design magazine. It’s a pretty good article and I am glad to see the trade magazines realize we care as much about PCB layout as the bus-caching architecture of some DSP chip. The article talks about using vias to take heat away from the die-attach-paddle (DAP) of integrated circuits:

“To reduce operating temperatures easily, use more layers of solid ground or power planes connected directly to heat sources with multiple vias. Establishing effective heat and high-current routes will optimize heat transfer by means of convection. The use of thermally conductive planes to spread the heat evenly dramatically lowers the temperature by maximizing the area used for heat transfer to the atmosphere (Fig. 4).”

No there is a lot of caution you need to exercise when trying to get the heat out of a part just using a circuit board. You have to realize the guidelines in the datasheet are usually based on one part making heat, sitting on a standard board of a certain dimensions. If you have a lot of hot components you can’t expect the same die temperatures for the part in question. Same goes if you have the board covered with some tight enclosure.

WEBENCH_thermal_simulation

WEBENCH can estimate thermal performance of a switching regulator, but it is just an estimate, highly dependent on your particular layout and application. Note the buck regulator catch diode is the hottest thing on the board, and how little heat is radiated out the bottom, despite the thermal vias.

Texas Instruments WEBENCH is a neat program, especially because it has Mentor Graphic’s FloTherm built in to help you see the hot spots in switching regulators. This is what taught me that a modern buck regulator will have more heat coming out of the catch diode than the pass FET. It made perfect sense once I saw the heat diagram. After all, a diode has 0.6 to 0.9 volts across it, while a modern FET has such low on-resistance it hardly drops any voltage at all.

But realize a simulation is just that, for both electrical and thermal designs. You have to rely on my brother’s maxim from Bell Labs: “An ounce of trial is worth a pound of opinion.” And any simulation is just that, a computer’s opinion on what your circuit will do. So I and several pals have learned a few things with real-world experience. One is that vias rarely work as well as you need them to. The first problem is that the amount of copper in the “barrel” is dependent on the circuit board fabricator. Thin plating means low heat transfer.

Thermal-vias

Here is a nice side-view of some thermal vias in a PCB. Note the thicker copper on the top and bottom helps to dissipate the heat, and the bigger the area, the better.

The best thing is to fill the vias, which really gets the heat out, but is an extra-cost option. Other than that, plan on a lot of vias under the part. The article excerpt above talks about using inner layers to get heat out, but in my experience that has limited usefulness. Do top-side and bottom-side copper pours. If you can get several square inches, that is great, but if you have a top-side pour, which you should, and a bottom-side pour, well there is not a lot of heat that can radiate from the inner layers unless you can dump heat into an entire ground plane. Remember you have to stop the CAD program from putting thermal reliefs in all the vias. And realize that without thermal reliefs, to de-solder the part you will need a Metcal hot-air rework station or a Hakko hot air gun, (or two). You will need a good iron to solder the part as well, and you have to tell the assembly house that they may have to modify the thermal profiles of their IR reflow ovens so that the parts get soldered correctly.

As far as heat transfer to the atmosphere, it’s something like 100 times worse than getting the heat out of the leadframe. Even if the part does not have a die-attach paddle, you can figure out what pins are connected to the substrate of the die and make sure those pins have a lot of copper area. All the same tricks apply, you can pour topside copper from the pin and be sure to pave over any thermal reliefs the CAD program puts around the pin pad. Vias down through the board to copper pours on the bottom side will get more heat out. Raw copper, or copper with nickel or gold will dissipate more heat than copper covered with soldermask.

I sent the article to my pal Wayne Yamaguchi, who has worked on getting the heat out of LED flashlights for a decade. He learned that not all “rules of thumb” you read in datasheets will accurately forecast the heat you can dissipate into a circuit board. Regarding the article, Yamaguchi wisely notes: “Everything said is correct, but, practically speaking and implementing is something else.” Wayne then sent a link to a thermal calculator for vias that he likes. Wayne notes: “Playing with the via calculator you can determine that FR4 is some pretty awful stuff and also you will find out that 1 oz copper foil is not a good thermal conductor.” He notes the same site has some other great tools. Wayne also pointed me to a Cree technical article (pdf) about thermal vias for high-power LEDs.

Mathis, Proffitt, and Evans on FCC and CE testing

After reading my article about Bob Pease’s solenoid drivers, Howard Evans wrote me a letter explaining how he drives solenoids with an H-bridge. Its great stuff and we are working on a follow-up article. Evans mentioned some FCC approval things and that got an email thread started between my consultant pal Dave Mathis, who has already weighed in on FCC requirements here and here. Then Howard asked his pal Scott Proffitt to chip in. Scott runs an EMC approval lab and was kind enough to clear the air.

FCC_logo

The first lesson is that I have been too cavalier in my terminology. Saying “FCC certification” is different than saying “FCC approval”. Dave Mathis kept calling me on this, because we were talking orthogonally. Dave was thinking about radios and I was thinking about computer equipment. Understand that a radio is an “intentional radiator” and it gets its own section in the hundreds of pages of rules. A computer without a wireless system is an “unintentional radiator”.

Dave_Mathis

Dave would get exasperated with me when I would say something “…needs to get FCC approval”. To him that sounded like I wanted to get a TV station or some other licensed use where you need FCC permission to operate. As Dave keep reminding me, Zigbee and Wi-fi are unlicensed. That means the end user does not need to ask the FCC for approval to use the device. It does not mean there are no rules and you can just build anything you want and sell anything you want. Dave does note that you are allowed to build 5 units for personal use, but prototypes for a salable product are not personal use, so you need to worry about the FCC right from the start. Dave reminded me of the $10,000 per device penalty if you exceed the FCC limits on your Gizmo.

So let’s get Scott Proffitt to clear the air about what FCC things you need with what gizmos:

“It all depends on the type product and category it falls under.”

“FCC ‘Certification’ is intended for all radio transmitters (Intentional radiators) per FCC 47 CFR, Part 15, Subpart C, Section 15.201.  Certification is also required for Scanning Receivers, Radar Detectors and Access BPL and is an option for TV interface devices, personal computers, computer peripherals, personal computer mother boards and supplies and all other receivers except TV and radio broadcast receivers per FCC 47 CFR Part 15, Subpart B, Section 15.101.

fcc-conformitiy

“FCC ‘DoC’ [Declaration of Conformity] is required for Cable System Terminal Devices and a personal computer employing certified components.  A “DoC” is an option for a TV interface device, personal computer, PC peripheral and all receivers except a scanning receiver and broadcast receivers.

“FCC Verification is for everything else, that is not captured above, to include broadcast receivers and all other digital devices.

“The above categories have two classes.  Class B is intended for residential environments… including apartments, nursing homes, etc… any living situation.  Class A devices are anything that is not Class B.  Class A would be office environments, commercial, retail, public areas that are not residential areas.

Scott-Proffitt_Advanced-Compliance-Solutions_sfw

“Now, given all that… there are some exceptions and exemptions, laboratory equipment for example, as long as it’s not a radio transmitter.  These are too many and too complex to list.  So at this point we ask what the device is and what it does and see if any of the exemptions apply.”

Now in the context of the solenoid circuits Howard Evans and I were talking about, I asked if you would need FCC anything if you used an Atmel chip and did not bring the oscillator out to any pin. I thought I was being clever and beating the FCC requirement that you have to test and self-certify (using Scott’s lab or equivalent) anything with a clock that runs faster than 9kHz. This is a big deal, the fact that anything with a clock frequency over 9kHz falls into the perview of the FCC rules. Dave parsed the FCC rules and told me that even a clock internal to the IC will still require testing. But Scott Proffitt chimed in with the reminder that testing is only needed for end user equipment:

“Your last point of discussion regarding your and Dave’s pondering on the chip… I think if I understand it correctly, this chip is a component not to be defined as an electronic device requiring FCC approval.  The end user device that the chip will be integrated within, will be subject to FCC rules, but not the chip itself.  The end user device is where all compliance requirements should be applied.  (There is the exception for modular components of a system, such as components for a PC per Part 15, Section 15.101 where those components require authorization.)“

“If the intent of the question may have been regarding what sources should be considered in determining the maximum Radiated Emissions measurement frequency, then you are correct, it is above the threshold and the end device the chip is integrated in, would fall under the FCC requirements for testing and approval.”

So this means that the certainly the chip itself is not tested, but if you make a solenoid driver board that is for sale to companies that integrate into their equipment, then you don’t have to test it either. But both Proffitt and Mathis agree that just because the 32kHz in internal to the chip and does not appear on any pin, if you do sell it as part of an end-use device, you still have to test it. Howard Evans had some advice as well, and note how he too got confused when I used the term “FCC approval” instead of FCC verification”:

“Well as long as you are not an intentional radiator of RF you do not need FCC approval.  By law you are still required to meet FCC limits for emissions, but you can test this yourself or go to a compliance lab.  If it is later found your emissions are too high, the government could force you to pull your product from the market.  In practice, you can get away with radiating too much as long as it doesn’t interfere with enough people to garner the FCC’s attention.   That said, you should be a good citizen and not pollute the RF spectrum.  Your IC will radiate some, but it is usually the traces from a bad PCB layout and the cables that radiate the most.  If you keep your edge rates no faster than necessary and keep your signals well coupled to their return paths (i.e. follow good EMC design practices), you will be well on your way.”

Making your devices FCC compliant is being a good citizen. I note that the engineers who seem to care most about this are also ham radio operators who want to keep the radio spectrum clean of unwanted junk.

CE-conformity-marking

This graphic points out mis-designed CE logos. More serious is when a wireless system just forges an FCC number for their product.

And although I have been talking about FCC compliance, getting world-wide approvals under CE (Conformité Européenne) is similar. Howard Evans notes those are even tougher:

“I am by no means a certifications expert and being that my background is in industrial equipment, I can only speak to how we deal with the FCC in relation to our class of equipment which is to say we do not deal with the FCC at all. So I was incorrect in saying that as long as the device is not an intentional radiator, it does not need certification.  That is only true for my situation.  It is safe to say that unless your device falls into an exempted category, it does indeed need FCC certification for sale in the US.  Sorry for the misinformation.”

Howard-Evans

“We perform emissions testing to CE levels which are stricter than the FCC’s, so we give no mind to passing FCC limits.  Yes, when doing emissions, we must operate the device in its intended worst case scenario (highest expected emissions state for standard use).  So the cycle rate and duty cycle that you operate the solenoid will have a dramatic effect on your average and quasi-peak readings.

“We test at only one distance, usually 3 or 10meters depending on the size of the test facility’s semi-anechoic chamber or OATS [Open Air Test Site].  I believe the standard for the class of equipment we test to (CISPR 11) allows us a choice of distance as long as you adjust the limits accordingly.  I don’t have the standard in front of me so I may be incorrect and that it is a device class standard that allows us to do that.  CISPR 11 is a generic standard that applies to industrial equipment in general but there are device class specific standards that override parts of the generic one.  You should consult with a competent EMC engineer to determine which standards apply to your product.”

I noted that some engineers dither the clock frequency to spread out the interference. This does not really lower the interference, it just looks lower since the spectrum analyzer is sweeping a narrow bandwidth as it tests so the dithering just gives a lower reading, it doesn’t really make the interference go away. Evans, agreed, pointing out,

“Dithering is certainly frowned upon by most engineers I know because, like you suggest, it doesn’t really lower your emissions.  It just spreads them out and takes advantage of the fact that testing limits pertain to average and quasi-peak measurements, not peak measurements.  It might lower interference if the victim equipment is susceptible to only a narrow band within the dithering band.  Without dithering, the polluting equipment could be radiating continuously in that band causing continuous interference while only some of the time with dithering, but is interfering some of the time really acceptable?  It really depends on how well the victim handles the interference, but practically I’d rather just lower the total emissions than play games with the test method.  But that said, it is a tool which you can use if needed.”

“With PWM circuits like this and assuming the PCB layout is solid, it really comes down to containing the edge rates on the signals leaving the board.  It is hardly the switching frequency that bites me, but the edge rate of all the signals.  I always use gate resistors on my MOSFETs to slow the turn-on and turn-off which has worked well for me in the past.  It does increase the switching losses some but not too much if the resistance is reasonable.  I also usually add some capacitors between the outputs and the rail to divert the high frequencies back in to the driver.   “I also often add a common-mode choke (either ferrite or wound) for the common-mode noise which radiates very well from your cables given the miniscule currents involved.  Cable design is critical.  I always use shielded twisted pair with the shield bonded (360 degree is best) to the metal enclosure of the driver.  The shield limits E-field radiation while the twisting helps lower the H-field in the far field.  It helps too if the coil is in an enclosure with a decent RF ground.

“Finally, I would encourage you to keep the cable distance as short as possible.  There can be some very high voltages (3X the bus voltage or more) that can develop along the cable that can surpass the insulation rating of the cable and/or the magnet wire of the coil.  This has been well written about with regard to variable frequency motor drives.  This is probably not an issue for you unless you run the bus from rectified line.”

Howard Evan’s comments about cable length reminded me of a problem I had with CE immunity when I was a consultant. Many engineers are finding it is tougher to pass immunity than emissions. Immunity testing is when you bombard your machine and its cables with RF and verify that it does not malfunction. I will tell that story in a future blog post, since Evans also points out: “I’ll comment on immunity in a future email.  I just went through a somewhat difficult issue with that.”

Apple plans on giant touchscreens in your car

I recently came across an article about how Apple is planning to have your automobile use giant touch screens to interact with the driver. Atmel is well-known for its microcontrollers, but we are also big on touch screen chips, like our new maxTouch T-series. The parts use the high-performance AVR core engineers love. This is why they can run big screens like the one Apple is talking about. The parts can do both self-capacitance and mutual capacitance. They work well with gloves, even thick ones.

mitsubishi_touch_sensitive_display

This Mitsubishi curved touch screen uses projection and lasers, complexity that XSense will eliminate.

But what really got me thinking was the thought that stylists will not want boring flat screens. Atmel’s XSense touchscreen is a perfect solution to boring flat panels. We just got qualified for high-volume production by a major electronics OEM at the Colorado factory. I suspect the car folks are beating on the door as well.

You can get a feeling for what XSense can when you look at this video we did last year.

But if you want to see something really beautiful, check out this video of the near future with formable touchscreens:

Here is a re-cut of that beautiful futuristic video.

Now with all that pretty video, perhaps I should put in a little note to my fellow engineers. The deal with XSense is that it uses a microscopic copper mesh instead of ITO (indium-tin-oxide). ITO is brittle, so you can’t bend it. But also remember that it is an oxide, and if you remember sophomore chemistry, oxides don’t conduct. So the XSense mesh is not only bendable, it is far more conductive than ITO. This makes for higher performance. When used with a touch controller chip, it can detect more accurately and much faster. Hover, glove tolerance, all kinds of user interface improvements occur. There are competing technologies that use silver ink, but remember, although silver is more conductive than copper by 7%, the ink is not as conductive, nor, in my opinion, as repeatable and as durable.

Indium-tin-oxide

Note that this slab of indium tin oxide from the Kurt J. Lesker Company is not transparent. You can only see through an ITO touch screen because the film is so thin, which also makes it highly resistive.

The cool thing about XSense is that it can’t be a wire mesh that interferes with the miniscule sub-pixels in a modern LCD. So there is some cool intellectual property in the shape of the mesh so it does not make moiré patterns on the screen. Oh, I forgot to mention, the copper mesh is so small, the panel passes more light than an ITO touch screen.

So, XSense is formable, flexible, higher-performing, and more transmissive. See why we love it? I hope to visit the factory in Colorado soon, where I can see the panels coming off the end of the line. I will keep you posted.

The 1955 Heathkit 500V PS-3 power supply

Reginald-Neale_Rochester-NY_PS-3

New York engineer Reginald Neale recently sent pictures of his antique and unusual electronic collection. So I figured it would be a great idea to feature one of his interesting gizmos for our #ThrowbackThursday blog.

Heathkit-PS-3-power-supply_Reginald-Neale

Here is Reginald’s Heathkit PS-3 500-Volt power supply. Neale notes, “Heathkit. The Big Name in build-it-yourself electronics. I built this one in the late 1950’s.” After getting this image from Reg, I found a scan of the spec page on the internet, and used the fantastic ABBYY FineReader OCR (optical character recognition) to change it into text:

                  SPECIFICATIONS
Output............................Continuously variable from 0-500 volts, 
                                   no load
Regulation, Line Voltage 117 volts AC: Linear 0-10 MA at 450 volts output < 0.5%
                                              0-20 MA at 400
                                              0-40 MA at 350
                                              0-70 MA at 300
                                             0-100 MA at 250
                                             0-130 MA at 200
Line Variation 105-120 volts..........Output variation less than ±2.0%
Meter.................................4 1/2" streamlined case
      Sensitivity.....................1 MA full scale
      Range...........................0-500 volts DC, 0-200 MA DC
Tubes.................................1 - 5V4G Rectifier
                                      1 - 6X5GT Rectifier
                                      2 - OA2 Regulator tubes
                                      2 - 1619 Control tubes
                                      1 - 6SJ7 Control Amplifier
Power Requirements....................105-125 volts 50/60 cycles AC 90 watts
Dimensions............................8 1/2" high x 13" wide x 7" deep
Shipping Weight.......................17 lbs.

Heathkit-PS-3-power-supply_manual_Reginald-Neale

Neale points out: “Heathkit was famous for their easy-to-follow manuals and large, detailed pictorial instructions.”

Heathkit-PS-3-power-supply_schematic

There was a nice schematic on the Sal’s Antique Radios site. Note how the unit makes 6.3V to power the filaments of any tubes you have in your circuit, as well as the high-voltage output.

Heathkit-PS-3-power-supply_inside

The Old Tube Radio Archives had this nice interior shot.

Heathkit-PS-3-power-supply_underside

The same site had this shot of under the chassis.

The RadioMuseum site has a page on the PS-3 as well. It a heck of supply, putting out 500 Volts, enough to bias up tube circuits. Be sure to read up on how my mentor Bob Pease made a low-noise 300V supply. Both Reginald and Bob go back to the day when your lab supply could kill you.

Here is an ad from 1955 that Reginald scanned for your enjoyment (1.2MB pdf). Heathkit-ad_1955

Computers on the moon

My pals just exchanged a great email thread about the computing technology NASA used to put folks on the moon back in the 1960s.

KONICA MINOLTA DIGITAL CAMERA

Richard King loves vacuum tubes, old computers, and high technology.

It started with Richard King, crack EE and the Altium guru over at STEM, sending out this video with a note: “At last a documentary film on the Apollo guidance computer that’s more in-depth than the usual talking heads about how ground-breaking it was and the marriages that were sacrificed to make it.”

Audio guru Steve Williams was first to respond:

=========

Hard to go back that far and remember what did and didn’t exist and was or was not used for any type of electronics construction, even though I was alive back then.

Let’s see, no LSI, not even sure if those cans were really multi-transistor gates or just 3 lead transistors. Spot welded, not soldered into headers in the particular configuration to make a potted logic module. Same with the hand assembled core memory modules. All plugged into a machine assisted assembled, wire wrapped “mother board” / back plane / card cage sort of housing.  No pc boards in sight. Don’t know if the displays were very very  early LED, (black and white film) but I think it pre-dates them as well.  Punch cards and paper tape to help the assemblers control the assembly processes.

KONICA MINOLTA DIGITAL CAMERA

Audio guru Steve Williams hold up a Stone Poneys album with Linda Ronstadt on the cover.

Wow, seems so “stone knives and bear claws”. Some of it must have been chosen for the beyond normal mil spec construction needed for space flight. Analog consumer electronics in the same era was using cheap phenolic pc boards with all soldered connections to it’s components, and had been for 10 years, even back to the tube era.

=========

Google hotshot Eric Schlaepfer replied:

=========

They used Fairchild Micrologic. Basically RTL gates in a TO-99 metal can. The functionality was comparable to the more familiar 74 series. I think they avoided using PC boards due to reliability issues (especially with the cheap phenolic types), which is also why they went with welded connections instead of soldered ones. The displays were electroluminescent. Each segment had its own individual latching relay, and the DSKY had a multiplexed I/O arrangement to select and change any relay. The multiplexing was very slow, so in the video you can see the updates propagate through all the segments.

KONICA MINOLTA DIGITAL CAMERA

Eric Schlaepfer holds a radio he made with a 555 timer chip. When shown to Hans Camenzind, the inventor of the 555, Camenzind said: “I never expected it to do that!”

The machine itself has very interesting software. It runs a primitive multitasking OS with multiple programs running (tasks). Some tasks ran as native machine code on the machine but others used an interpreter/virtual machine. Someone’s built a replica in his basement. Someone else wrote a simulator.

==========

That got Richard King, the originator of the thread, to comment:

=========

I was particularly amazed by the “Rope memory” system. Whereas traditional R/W [read-write] core memory uses only 3 wires per core (X-address, Y-Address, R/W), rope memory adds an additional wire for each word I presume. Thus for a 128 word memory you’d thread 130 wires through the cores (adding 2 lines for addressing). To read a particular word you’d set the address to access one of its bits and then read its wire. 0’s and 1’s of any given bit were apparently encoded by either passing the wire through the core for the bit or not. You’d build the word by reading it a bit at a time. To keep the number of wires down you could string words together, making long words. The film said that the capacity of the memory block was 8K (65,536 bits) and packing 8000 wires through even one core stretches credulity.

“Stone knives and bear skins” it might have been but it was very, very clever and apparently “stone axe” reliable, a critical requirement. As for the logic, my understanding (from exactly where I can’t recall) is that all the logic gates were the same type, NOR gates. They could build any logic function including flip-flops (storage) from that.

I’m also mildly surprised that they used wire-wrap for the module interconnect in the rack. Working at Link Flight where we did 40MHz pipeline logic boards with 100’s of ICs all connected very reliably with wirewrap it wasn’t a total shock though. It was also interesting to see how much automation was put into the Apollo computer’s manufacturing, since I doubt they made more than a 100 or so computers for the entire program.

=========

Industrial designer and ME Dave Ruigh found a one-hour CAD simulation of Apollo 13 mashed up with the real CAPCOM communications right when the O2 tank blew up. It shows a simulated control panel and a CAD rendering of the spacecraft.

Dave notes:

=======

That little computer sure got a workout this day (text transcript here). Amazing, 3 guys in a spacecraft 180,000 miles from earth, going through checklists and talking to Houston. No raised voices, no confusion, no panic. As calm as Southwest 2795 talking to ATC [air traffic control] on long final to SJC San Jose airport]. Nothing like the movie, as great as it was.

Dave_Ruigh_Go-1

Dave Ruigh installing $1500 of Kokam lithium-polymer batteries into his GO-1 carbon fiber recumbent tricycle.

=========

I remember seeing the Apollo 13 movie when it came out. When we came out of the theater, my girlfriend told me “You started breathing hard towards the end”. What a testament to Tom Hanks and Ron Howard, that they got me so emotionally involved when I already knew there would be a happy ending. And I do agree with Mission Control, this was their finest hour.

Back to the computers that made all this happen—Eric Schlaepfer finished the thread with another cool video. He reported: “There’s a really good video series on the Apollo program on Youtube. Here’s the one on the computer:”

Eric goes on to comment, “Apparently at one time the guidance computer program was consuming 60% of US integrated circuit production!”

All this space talk fits right into what I have been working here at Atmel. We have one program with a startup aptly names Made In Space. They are launching an Atmel-powered 3D printer into orbit. There are a lot off cool things that happen when you have a zero-gravity environment to make parts.

Atmel is also involved with Infinity Aerospace and the Ardulab. The Ardulab is an Arduino-powered laboratory module meant to be launched into space. The XMEGA chip in the Arduino will automate a lot of the data collection and lab control tedium, sparing the astronauts for more useful work. Stay tuned, in a week or two I can tell you about the 9/15 launch of the Cygnus rocket to the ISS (International Space Station). There will some cool Atmel hardware on board, besides the Arduino.

In-circuit emulation for AVR and ARM SAM D20 chips

You can do a firmware upgrade on your JTAGICE3 and it will work with the ARM M0+ based SAM D20. If you don’t want to use a separate emulator, there is also a debugger on the $39 SAM D20 Xplained Pro eval board. Atmel has a long history of providing inexpensive development tools. The $49 “Butterfly” eval board and $200 STK200 in-circuit emulator (ICE) was what got me to switch to Atmel micros back in 2000. These days we have three in-circuit emulators, sometimes called debuggers. The $49 Dragon is low cost and does all AVR chips, even the 32-bit AVR chips. The AVR ONE! is much more expensive, about 500 bucks, but it does have trace. That means you can go back and see where your program went as it executed. This can be worth every penny if you have complicated program flows with internal and external interrupts.

Most engineers like the JTAGICE3 emulator Atmel offers for only $99. Like the JTAGICE2, that predates it, the JTAGICE Mark3 can do all the AVR chips, including the newest XMEGA families. The great news is that Studio 6, the integrated development environment (IDE) program Atmel gives away for free, can do a firmware upgrade on your JTAGICE3 so it can work with the new SAM D20 ARM chip Atmel just released.  From the news bulletin:

Atmel Studio 6.1 SP2 includes a firmware update for the JTAGICE3 which adds programming and debugging support for the SAM D20 devices. The JTAGICE3 firmware will be automatically updated when a programming or debugging session is started in Atmel Studio 6.1 SP2.

Atmel Studio 6 users who want to take advantage of this firmware update will have to upgrade to Atmel Studio 6.1 SP2, which will be available for download at http://www.atmel.com/tools/atmelstudio.aspx starting August 15th.

Technical details can be found at http://www.atmel.no/webdoc/jtagice3/jtagice3.whats_new.html.

This is just too cool. Studio 6 has always supported code development of Atmel’s ARM MCU (microcontroller) chips, the ones with internal flash. Now you can debug the M0+ ARM-based SAM D20 with the same JTAGICE3 you use for AVR and AVR-32 chips.

I have to laugh when my buddies say Atmel tries to make money on our eval boards and emulators. We don’t look to make any appreciable profit on the tools. We give away Studio 6 for crying out loud, and anyone that has done product design knows what a cheap deal the eval boards and these emulators are. Atmel sells chips and touchscreens (XSense). That is where we make our money. So you folks that have bought a JTAGICE3, celebrate, you can now debug our great SAM D20 with it. Like I said, “Friends don’t let friends go without a debugger.

Computer programming tips

I ran across a neat article in Forbes (of all places!). Titled ”What Does It Take To Be An Expert In Computer Programming?” When I went to look up the author, Eric Pepke, there was not a lot of information other than he worked in Atlanta. Then I noticed he posted a YouTube video titled “DimiDraw v. 0.1”. The description explains “DimiDraw v.0.1 is an as yet unreleased graphics library for the Arduino and similar microcontrollers.” Well anyone that writes code for Atmel-powered Arduinos is OK in my book. So I sent the article to a couple crack programmers I know. Michael said:

Before reading it, I was also thinking that having a basic understanding of hardware architecture was important.  Also, for me, learning Assembly code back in the day gave me a very good understanding of how a processors “thinks” especially when it came to registers and writing complex arithmetic operations.

Back then we didn’t have these fancy development environments with debugging tools, breakpoints, stepping, etc.  Well, actually we had some of that but we were also taught the basics to understand programming better.  Speaking of “basics”, I actually taught myself that in the early 80s.

And Andreas over on the 3rd floor noted: “All I can add is that of all the classes I had during my education ‘algorithms and data structures’ was by far the hardest one. (But also really useful.)”

Basic

And regarding Basic, I note Peske was a contributor to the NS Basic language. Modeled on Microsoft Visual Basic, and meant for phones and mobile platforms, a code snippet might be:

Function OKButton_onclick()

   MsgBox “Hello World”

End Function

Now that is a language I can endorse—less gibberish and more directness. I never thought there was any shame in programming in Basic. Especially once I came across complied Basic, QBasic I think it was. I did an little program that spit stepper motor commands out the printer port to exercise a wafer elevator that was in a million-dollar semiconductor etcher I was working on. Once I compiled it, I had to add loops to slow the thing down. It ran so fast the motor could not keep up.

QBasic_Opening_Screen

I remember BASIC programming in 9th grade back in the 1960s. Yeah, the Brecksville Ohio school system was really that advanced (still is). One of the problems was to take 5 numbers from the keyboard and then print them out in order. We all slogged into it– a bunch of if-than compares. I think most of us ended up with 200 lines of code. Except for one kid. I think it was Gooding, can’t remember his first name. He just counted from 1 to 1000 and printed out when a match to any of the input numbers hit. There there were, printed out, in order. I think it was 10 lines of code. We all went ballistic– pretty much accusing him of cheating– “It only works for integers!”  or “It won’t do negatives!” or “It stops at 1000!” The teacher was probably trying to get us to think more than to reward Gooding, but she gave him full credit– saying he solved the problem, and in a very elegant way. Yeah, merit badge for Gooding– that is thinking outside the box, and he deserved more than full credit. I hope he is rich and famous now.

And as an added bonus, that Forbes website as a good privacy tip about never giving out your zip code when you shop.

3D printing for sheet metal, sort of

Incremental_sheet_forming

Incremental sheet forming makes a single sheet metal part by pushing a polished ball against the metal while under CNC control.

My mechanical engineer buddy Dave Ruigh came across a Ford Motor video of how they can prototype a single sheet metal part using CNC (computer numerical control). It’s technically called “Two Point Incremental Sheet Forming.”

Dave noted: “I see a Faro logo on the stylus head (they make 3D digitizers). Looks like they are generating the toolpath in Catia V5. These are Fanuc hexapod robots. Pretty damned slick.”

Then audio guru Steve Williams chimed in: “Is this truly 3D printing? Is there a class of this that involves plastic sheet deformation as an alternative to sheet metal stamping, which was sort of what they were comparing. What is the plastic and how common is the sheet deformation (presumably through heat) method, compared to depositing layers of material as in normal 3D stuff?” To this Dave replied:

“They are forming metal sheets with this process, not plastic. 3D printing is just a made up buzzword that broadly covers any rapid prototyping technique. I guess we could call it “unconventional fabrication technology,” or UFT, if you would prefer. That said, you might do a similar process with plastic sheet using heat. Plastics tend to deform nonlinearly though (they stretch a lot, then spring back), which makes predicting their formed shape difficult.”

“Guess we’re gonna have to call it “Incremental Sheet Forming.” Specifically, “Two Point Incremental Sheet Forming.” Ford claims this tech is patented, but I’ve yet to find it. This work at the Computer and Automation Research Institute of the Hungarian Academy of Sciences does seem to predate the Ford work.”

This is a slap-my-forehead, “why didn’t I think of that” technology. When I was in the auto biz we did short-run prototyping with Kirksite dies. Instead of H3 tool steel, the die was machined out of a high-strength zinc + 4% aluminum alloy that had a brand name of Kirksite. It was invented in 1929 and called Zamak by the Germans. Thing is, how often do you want just one prototype part? I always said you need three. One to hold, one to install and compare against the old part, and one that gets shipped to the show in Duluth so the sales guys can peddle it before its ready to sell.

So Dave Ruigh was the guy that told me how modern tool and die folks just carve the male form in carbon with a 5-axis machine and then EDM (electrical discharge machine) the tool steel to near-net shape. Polish it up and stamp away. So now I assume you could just high-speed machine (another thing Dave taught me) the Kirksite, mount it into a press and bang out 10 to 500 parts depending on how rude the die had to get with the sheet metal.

The major problem with this incremental forming is that it will not show if the die is manufacturable or if the shape of the sheet-metal can be made in high volume with a die. When you prototype something you should also be prototyping whether you can make more than one. So if Ferrari wants to make some goofy fighter-plane-looking chin spoiler, this “incremental sheet forming” is ideal. They are only going to make 5 parts total. Better yet, when some rich yuppie prangs the car as he drives home from the dealership, the fine folks at Ferrari can slooooooowly make another one for him and charge him the requisite $10 or $20 grand of machine time it takes.

What do you figure Dave? A big expensive machine like in the video needs to make $150 per hours of spindle time? A stylus, a spindle, either way you have to pay for the machine. So I wonder if a part that you can incrementally form cost $10k, could you make 100 parts for $20k using Kirksite?

Oh, I suspect that Ford claim of “first” is because they have a lower cup that follows the stylus whereas the Hungarians just pushed the sheet metal into a female die.

And here is 26 glorious minutes melting steel and stamping it out the old-fashioned way in the 1936 Flint Michigan GM plant.

Aaaarrrrrgggg matey, that thar is real sheet metal work,….

Kenneth Finnegan on the AVR Dragon eval board

I met a great engineer at the eFlea electronic flea market here in Silicon Valley. Kenneth already had an ME degree. Now he wants to get an MSEE with an emphasis in networking embedded systems. He is at Cal Poly. So he asked me if I could get him an AVR Dragon, a debugger board Atmel sells. A debugger is a gizmo that lets you see “inside” a chip. You can read its internal registers and see memory values. It makes it way easy to troubleshoot what is going wrong with your program. The Dragon works with most AVR microcontrollers. I got him a deal through our University program and asked if he would write a review when he got the board. He did a great job, and posted it on his website, with the understanding I would just cut-and-paste it to Bits and Pieces.

Kenneth_Finnegan_AVR_Dragon

One of my good friends at Atmel, Paul Rako, recently sent me a sample of the AVR Dragon (Atmel store page), which is a in-circuit serial programmer (ISP) and On-Chip Debugger (OCD). The ISP functionality is familiar to most hobbyists in the AVR embedded programming scene; through the standard 2×3 pin header, you can erase the flash memory on an AVR and download new program code onto the chip. A typical example of an ISP programmer, and what I’ve been using exclusively up until now, is the wonderful, if sometimes a bit flaky, AdaFruit USBtinyISP.

As you look back through my blog, you can probably tell that only having ISP capabilities will get you pretty far, but where the Dragon really shines is in its ability to perform on-chip debugging. Most of the third-party programmers only implement the basic SPI-based erase-and-burn cycle you use when programming an AVR, but OCD allows you to set break-points in your program on the actual chip, and then step through your program code, read variable values, etc. All those glorious interactive debugging features that computer programmers have been spoiled with for decades. This makes embedded development MUCH easier, and an ability I’ve been suffering without while my projects have grown progressively more sophisticated.

AVR_Dragon_box

 When I first opened the shipment from Atmel, I was very happy to see a piece of dev kit finally come in a reasonably sized, and attractive, box. I’ll actually be able to store this thing in its box instead of having to shuck it and store the PCB floating around in gallon ziplocks like most of my other dev kits.

AVR_Dragon_box_inside

 Look at that minimally wasted space! ESD foam on top and bottom, so over all, I’m happy with the packaging, which is surprisingly important when you literally have an entire closet dedicated to development kits collected over the years.

AVR_Dragon_PCB_backside

 Nice touch on the backside silk screen logo. I’d like to have seen the pin-out references on the top, particularly since they’re oriented for “top view,” but it’s still a handier reference than the printout I have floating around in one of my electronics binders.

AVR_Dragon_PCB_frontside

Looking at the headers from the top of the board:

  • The first row has 3x Vcc and 3x GND, which seems a little strange for a programmer, but might be handy for some projects?
  • The second row has your 10 pin JTAG and 6 pin ISP headers, which are your two work-horse programming interfaces for AVRs big and small, and finally an unpopulated high voltage programming interface. The HV_PROG interface allows you to burn AVRs like old-school EEPROMs, and allows you to get around having to use the SPI ISP bus for programming. This is most useful when you want to use the reset pin as an IO pin (did you ever wonder why Atmel bothers assigning an IO port number to the reset pin?).
  • And below the three programming interfaces… six rows of unpopulated, unlabeled, headers? Uhhh…

So the bottom third of the board’s real estate dedicated to empty headers threw me for a loop until I noticed the sentence in the description, “A development area lets designers build their own circuitry or add sockets for the desired device footprint.”

Fair enough; I can load the bottom of my Dragon with a socket and make it an AVR target board. I’ll just pull up the manual and figure out what the on-PCB pinout looks like…

AVR_Dragon_screenshot

Uhhh…

So apparently, Atmel didn’t feel the need to put the Dragon’s users manual on its product page? After finally resorting to searching through Google, I managed to find the users manual in Atmel’s online help system, which quickly lead me to what I was looking for. I’m not entirely impressed with the rats-nest of jumper wires they have in the tutorial, and the three pairs of Vcc/GND make a lot more sense now, but I’m not convinced I’ll not just stick to my standard practice of building separate target boards for each AVR model I use and keeping them in a ziplock in my drawer. I’d have expected a target area like that to use a bilateral switch array to allow for automatic retargetting to a specific AVR model, but that’s asking a bit much of a $50 dev tool.

So overall, I’m happy with the packaging and feature set, but am a little disappointed that they made the board 50% larger for what seems like a half-thought-out target area. I look forward to being able to use a less kludgy programmer than the USBtinyISP, and finally being able to set break points in my code. As Paul says, “friends don’t let friends go without on-chip debugging.”

Hey, I told Kenneth to give an honest review, and I am not going to edit out his criticism. And as you folks realize, it’s not like “Atmel didn’t feel the need” to put the docs in the product page. My buddy Gil over in the next cube just told me we have over 2000 English-language product pages. And those come in four languages. So I showed our web team the blog, and they point out it is not that simple. See the doc Kenneth found was a help page for the Atmel Software Framework (ASF). So it should not go in the documentation tab, since it is not technically product documentation. But Michael in the web team feels Kenneth’s pain. So he is adding that link Kenneth found to the product page description, which will keep the CMS (content management systems) happy. Like I joke “the other guy’s job is always easy.” That is the nice thing about coming to work here, where you can see how hard everybody is working to make the website do what you folks want it to. Kudos to the whole team—they really “get it”.

Now, the really cool thing is that we cleaned out a storage room and I found a Dragon I can play with too. As I mess with it, I will keep you posted on my trials and tribulations. Bear in mind my Atmel programming has all been in assembly language, so this might be exciting if I have to learn C.

Although I joke about “Friends don’t let friends go without a debugger,” it’s also true that “simple is good”. Kenneth was the guy I asked what was so cool about Arduino. He said: “Two big buttons. Compile, and Program, and that is all.” So if you can debug with printf statements out the serial port, go right ahead. When you want a real debugger we have the Dragon, and our Xplained boards not only have a debugger built in, but some of them have a header, so that after you get your board laid out and built, you can connect the header on the Xplained board to your target hardware, and it will be a debugger for the AVR in your production board too. Nice.