Author Archives: Paul Rako

About Paul Rako

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

A tiny low-cost logic analyzer

When I was at Maker Faire this year (2013), my friend Phil Sittner came up to the Atmel booth and told me that I had to see something on the other side of the show floor. Phil is the guy that built a $400 network analyzer kit a few years ago. So he takes me over to the Saleae Logic booth. Lo and behold he had managed to find a small, inexpensive logic analyzer housed in a beautiful billet aluminum case.

KONICA MINOLTA DIGITAL CAMERA

The Saleae logic analyzer hooked to an Arduino. It’s cross-platform and will display on your Mac, PC, or Linux box.

Saleae makes two versions—the $300 Logic 16 has 16 channels. You can sample two of them at 100MHz, or 4 channels at 50MHz, 8 channels at 25MHz, or all 16 channels at 12.5MHz.  The Logic 16 has an input voltage range of -0.9V to 6V, and works with 1.8V, 2.5V, 3.3V, and 5V systems. The original model, the $150 Logic, has 8 channels that you can sample at 24MHz. Logic accepts voltages from -0.5V to 5.25V, and has standard CMOS thresholds of 0.8V for logic low, 2.0V for logic high.

KONICA MINOLTA DIGITAL CAMERA

Nathaniel Lozier handles marketing for Saleae while Jonathan Georgino is the hardware and firmware engineer that made the magic.

Nathaniel and Jonathan were clearly proud of the beautiful job they did with Saleae products. An engineer from Gould Biomation told me designing test equipment is a real challenge since it has to be better than whatever it is testing. He confided that Gould designed to typicals and just swapped boards until they got a machine that met the spec.

KONICA MINOLTA DIGITAL CAMERA

You can troubleshoot your Arduino system with a Saleae logic analyzer.

At the Maker Faire booth Nate and Jonathan had the Saleae logic analyzer hooked to an Atmel-based Arduino. Any working engineer can appreciate the tiny footprint of the Saleae Logic analyzer. I remember consulting at Teledyne 15 years ago where we had the classic and expensive HP 16500 mainframe. It was nice because you could stuff a 2GHz scope card in one the slots, but the thing was gigantic. Since it was so big you had to push it way back on a shelf out of the way. That meant you had to reach out and lean to touch the screen or spin the accursed single-knob user interface. Our solution was to get a mouse for it so we could interact with it no matter how far back it was on the bench. Even the pods were big, larger than the entire Saleae Logic 16. As Russell Crowe said in Master and Commander “What a fascinating modern age we live in.”

Saleae_screen_shot

The Saleae Logic 16 is not just pretty on the outside—the cross-platform user interface is sleek and modern.

Speaking of fascinating and modern—check out a screen shot of the Saleae Logic analyzer. It’s obvious the device can sort through basic logic problems. But Nate told me you can also capture higher-level protocols to help you figure out what is going on in your SPI ports. My consultant buddy John Haggis says any serial port will eat up 6 person-months of time to get working. That is not just hooking up the wires, but getting all the low-level and high-level protocols and error conditions figured out. He was half-joking, but I suspect he is closer to the truth than far from it.

KONICA MINOLTA DIGITAL CAMERA

Google’s Eric Schlaepfer, Consolidated Electrical Distributors’ Phil Sittner, and Atmel’s Eric Weddington are all smiles while they check out the Saleae Logic products at Maker Faire 2013.

Nate told me he would send me a Logic 16 to try out. You can bet I will be showing it off to Eric, Phil and my other pals at the next eFlea breakfast. My mechanical engineer pal Dave Ruigh will be especially delighted to scope out the Saleae, since he was the guy that made a billet aluminum Palm case years ago. I hope Nate realizes that my maniac friends will whip out tiny tools and have his beautiful Logic 16 in pieces on the table—that’s what happens when you toss cool hardware at a group of engineers. It’s like raw meat to hungry lions.

Atmel is everywhere at the 2013 Maker Faire, episode 4

MonkeyLectric_spinning_wheel

So after seeing Atmel in the parking lot, a hexapod 3-D printer, and a Geiger counter powered by Atmel, I went over to the “dark” pavilion with all the light shows and Tesla coil. I immediately was drawn to a booth with spinning bicycle wheels that had LED lights spelling out custom messages as you ride.

KONICA MINOLTA DIGITAL CAMERA

MonkeyLectric makes an LED display that mounts on your bike wheel.

I didn’t want to ask the secrets of MonkeyLectric’s LED display, but my guess is that they use an accelerometer to determine “down.” Remember, gravity is an acceleration and you can sense it with an accurate accelerometer. Now that you know “down” you can flash the LEDs at precise times to spell out whatever you want or even draw pictures. Human persistence of vision takes care of the rest.

KONICA MINOLTA DIGITAL CAMERA

Laurent Rains from MonkeyLectric explains the system to interested Faire-goers.

So I really loved the images MonkeyLectric spells out, the pictures cannot do them justice. I ask who the technical genius is that came up with this. Laurent points me to Dan Goldwater, the engineer. Dan tells me that he used Atmel chips developed with the GNU tool chain. Like I said—every cool thing I was attracted to at Maker Faire had Atmel chips inside.

KONICA MINOLTA DIGITAL CAMERA

Dan Goldwater did the engineering at MonkeyLectric.

Dan is having a great time at MonkeyLectric, coming up with new and improved products and living every engineer’s dream of working on his own project. Even the support stuff at their booth was cool—below is a Zero-Halliburton case with the control panel for one of their lights.

KONICA MINOLTA DIGITAL CAMERA

Even the support stuff at MonkeyLectric is cool.

Atmel is everywhere at the 2013 Maker Faire, episode 3

So after seeing Atmel in the parking lot, and a hexapod 3-D printer powered by Atmel, I meet Eric Wilner, a local Silicon Valley engineer. Eric pointed to some Atmel-based Arduino boards we had on display. He said: “Those are big boards for such a little chip.”

I knew he was setting me up for something, so I did not bother to point out that Arduino boards are great for prototyping precisely because they are big enough to add stuff to, including the Arduino Shield add-on boards. Then Eric pulls a cigarette-sized board out and shows me his Atmel-powered Geiger counter.

KONICA MINOLTA DIGITAL CAMERA

Eric Wilner made this tiny Geiger counter using a tiny Atmel chip.

I was delighted to see such a great example of miniaturization, since Atmel makes some physically tiny parts that can do a lot of processing, thanks to their Harvard Architecture and the fact that they execute most instructions on a single clock.

KONICA MINOLTA DIGITAL CAMERA

A close up of Eric Wilner’s Geiger counter shows a board that is tightly laid out— but not so tight that you can’t get in and do re-work or repair.

Having been a consultant that specialized in quick-turn design and prototyping, I was duly impressed by Eric’s great work. It’s getting easier and easier to make prototypes. Sure, you start off with an Arduino or an Atmel Xplained demo board. You get your code working, and then lay out a purpose-built board. I liked OrCAD 9.3, a lot of pals have switched to Altium, not liking the new OrCAD, which has a crippleware Allegro as the layout package.

Once you get the schematic and layout done you can send the design to a PCB (printed circuit board) fab house. I like local outfit ProtoExpress. Sunstone up in Oregon is great, and they offer a free layout program, PCB123, that is free as long as you make the boards at Sunstone. You can buy the Gerbers for 30 or 40 bucks if you do want to take the design elsewhere. Also there is Advanced Circuits in Colorado. They do good work and have a free on-line design rule checker, FreeDFM (design for manufacturing) for your Gerber files. All three of these fab houses have relationships with assembly houses who can stuff your board with components.

Me, I like to build at least 3 boards myself, to see any problems. Then you can have subsequent lots assembled. ProtoExpress also has a partner fab in China that they guarantee can make the same fine-line high-tech boards as ProtoExpress makes in Silicon Valley. So if you want some really large volumes, Proto Express can help set you up, while keeping you in prototypes you can get in a day or two.

Atmel is everywhere at the 2013 Maker Faire, episode 2

So after seeing Atmel in the parking lot, I go and check in at the Atmel booth. Suffering from ADHD and OCD, it was less than 20 minutes later and I was wandering the pavilion. It seemed every cool thing I liked had Atmel parts in it. This time it was a Hexapod style 3-D printer. I had no idea the fine folks at SeeMeCNC used Atmel, until I got talking to John Oly. He explained they were from Indiana and got hit as hard as anybody by this here depression we just went through. So rather than close their machine shop, the folks at SeeMeCNC decided that they could build a clever 3-D printer and sell it at a fair price.

KONICA MINOLTA DIGITAL CAMERA

John Oly from SeeMeCNC shows off the board containing the Atmel chip used to run their hexapod-style 3-D printer.

As a former auto engineer I admired the great mechanical engineering in the SeeMeCNC 3-D printer. I also admired their Indiana roots, since I am from Ohio and Michigan. I mentioned that the aluminum extrusions they used on the uprights of the machine were quite expense, a friend had just used that system to build an RC sailplane field bench. John smiled and said: “A lot of people think you have to use the expensive stuff, but you can go to a local extrusion shop and they well make you the same sections of a lot less money.” See, this is why we are lucky to live in an industrial society—you can pop down to your local extruder, and get them to make you some nice structural framing, while helping your local economy. It’s not just lettuce that we should encourage the local production of.

KONICA MINOLTA DIGITAL CAMERA

Here are the Atmel chips on the board from the SeeMeCNC printer near the aluminum structural uprights they had made locally for 1/10 the price of the ready-made stuff.

So I took a little movie of the SeeMeCNC printer working—that’s John you might hear in the background. Let’s see if I can embed the video into our blog. I love these motion control applications for Atmel chips, you can watch your code working. Only downside is that a crash is really a crash.

Atmel is everywhere at the 2013 Maker Faire, episode 1

As I walked around the 2013 Maker Faire in San Mateo, it seemed that everything that interested me had Atmel chips inside of it. Even before I got inside a pavilion Saturday, there was a full-sized flight simulator as I walked in the gate.

KONICA MINOLTA DIGITAL CAMERA

The Viper Flight simulator is a kickstarter project that actually got built. Created by a team of high-school students, the Viper was at Maker Faire with its mentor’s family, the DeRoses.

KONICA MINOLTA DIGITAL CAMERA

Dad Tony DeRose told me “we use Atmel all over” the project.

KONICA MINOLTA DIGITAL CAMERA

Something tells me the real brains of the outfit is mom Cindy DeRose, here standing next to some of the simulator’s controls.

KONICA MINOLTA DIGITAL CAMERA

And every engineer can commiserate with having to crawl under the control panel to work on the electronics. We can see dad Tony handing a circuit board to ——

KONICA MINOLTA DIGITAL CAMERA

……his son Sam, who he described as the EE and ME of the project. Tony is no slouch himself, working over at Pixar as senior scientist and lead of research.

Frankly, it’s great to see something that actually gets finished on Kickstarter. We need another website called Kickfinisher, where Cindy comes over to your lab and tells you to stop playing video games and screwing off so you can get some work done. If you are a good boy she might bring some cookies and orange juice. In addition to a passionate core of mentors, it helps to have some sponsors, and Viper got support from Autodesk, Nvidia, and automotive repair shop Hawker Inc.

ATmega32 in your home-built DNA sequencer

The May 2013 issue of Circuit Cellar magazine has a great article by Fergus Dixon, who uses an Atmel ATmega32 microcontroller to operate a DNA sequencer.

One of the dozen ways to sequence DNA is to apply a reagent to the DNA sample. If the reagent reacts with the base pair on the end of the DNA strand it splits the pair and emits a tiny burst of light. If it is a double pair the burst of light is twice as strong. Then you just work your way up the DNA strand “zipper,” breaking the pairs and recording which of the 4 pairs you just broke. Now you understand why it took years to sequence even a short DNA strand.

Fergus_Dixon_DNA_sequencer_ATmega32

Here is a control board from a DNA sequencer designed by Fergus Dixon

Fergus had the usual engineering fun you might expect when doing something this cool. The flat-black box he housed the light sensor in had a tiny hole. Light variance in the room showed up as noise. He had to figure out a method to drive stepper motors so they were smooth and got to 3000 RPM. He designed reagent solenoid injector drivers that worked off of 100V pulses, while also fiddling with the SPI ports. My consultant buddy John Haggis swears that any serial interface will take up 6-person months of labor.

I used to laugh at that – but I now think he is right. You have to get the hardware working, develop protocols, test for exception conditions – yeah, I can see six months just getting two devices to talk to each other.

You can see that Circuit Cellar has some great articles. The same May 2013 issue has an article on a wi-fi connected energy monitor, a serial port to SPI programmer, a G-code CNC router, a MIDI communication device, and a reprint of a radiation monitor – like a Geiger counter.

Now I can’t show you these articles on-line, since Circuit Cellar is a print magazine. And you have to give them 50 bucks a year to get it. You can get it as a digital pdf if you want to save trees. Its $85 a year for the both print and digital versions. There are large discounts for two- or three-year subscriptions. Best of all, you can give them something like $225 and get every single issue in history on a thumb drive. Then with your combo subscription you can add your monthly pdf to the archive thumb drive, and still have the print edition to impress your friends and boss.

Keep the FCC happy with Atmel’s ZigBit modules

So the other day my pal Dave Mathis calls me up to talk about how some people don’t seem to understand the FCC requirements on certain wireless chips. See, a lot of people hear “unlicensed” ISM (industrial scientific and medical) bands and think that means “unregulated.”

Nothing could be further from the truth. What “unlicensed” means is that the end user does not have to register your wireless device to use it. But the FCC does put power level restrictions and harmonic spur requirements on your gizmo. And it is not just for the radio, it is for the whole system including the power supply. So if you have some sloppy switching power supply churning out interference, you will fail your FCC certification, even if you use a wonderful Atmel wireless chip for the radio.

Selling uncertified wireless gear can get you in trouble. The FCC puts a $10,000 fine per gizmo on infringers. That adds up pretty quick. Now it seems like the FCC is ignoring a lot of the wireless systems coming into the country without certification. And you are welcome to take your chances just slapping a chip on a board and hoping you would pass if you ever go to get certified.

Dave tells me the testing costs about $10,000, so it is not cheap. But if you want to be sure you are squeaky clean and legal, just buy a pre-built module. Atmel makes them under the name ZigBit. They are pre-certified so you can sell them without worrying about the FCC busting you. You get an MCU, the radio and power and everything you need for low-volume wireless systems – all in a well-built and tested module.

zigbit-dev-kit zigbit

Evil Mad Science and Atmel at the 2013 Maker Faire

Many Atmel employees will be at our Maker Faire booth this weekend. I will be there both days and open-source guru Eric Weddington has flown in as well. The Atmel booth is right next to the Arduino booth, so we should be easy to find. Be sure to bring your sun hats and sunscreen since many attractions are outside and it is easy to get burned.

I also wanted to give a shout out to my pals Lenore and Windell from Sunnyvale kit maker Evil Mad Science. We met at the eFlea and I have visited their shop. I have bought two Alpha-5 clocks from them, knowing that the super-accurate real-time-clock combined with an Atmel processor will keep precise time.

I went to an open-house they had last year, and got these snaps. Be sure to visit their booth and check out their really cool kits. Here are some pictures:

Evil_Mad_Science_01

Here is Windell showing off his latest project— The Digi-Comp, a ball-bearing operated mechanical computer.

Evil_Mad_Science_03

Evil Mad Science does not re-sell cheap imported junk. They design, test, and package their kits right here in Silicon Valley.

Evil_Mad_Science_04

Here are just a few of the kits Evil Mad Science sells. They all have great style, panache and entertainment value.

Evil_Mad_Science_05

Every engineer needs a powerful CO2 laser cutter.

Evil_Mad_Science_06

I wanted to show Windell’s bench, since we all can relate. Even young guys like Windell need microscopes to work on modern electronics.

Evil_Mad_Science_07

They have this awesome CNC router at Evil Mad Science. That is one of their motion-sensitive LED panels on the bed. You wave your hand over it, and the lights modulate.

Evil_Mad_Science_08

Here is a close-up of the light panel. I am pretty sure they use Atmel chips in it.

Evil_Mad_Science_10

Typical Maker—Windell spent months designing and perfecting this custom cabinet, rather than buying some chipboard stuff from Ikea.

Evil_Mad_Science_15

Here is Lenore, the co-founder of Evil Mad Science. She is holding up my pal Ron Quan’s new book on building your own transistor radio.

Evil_Mad_Science_17

And here is Ron, who came down to the open house at Evil Mad Science because he is a maker as well as a brilliant engineer with 65 patents and membership in SMPTE, IEEE, and the AES.

Hope you like the peek inside Evil Mad Science. I will be writing up experiences at Maker Faire as well as keeping you up to date on Ron and Atmel and my other pals.

Why on-chip EEPROM is cool

EEPROM costs more to make than flash memory. But you don’t have to write to it in blocks. And you can write to it more times without wearing it out. Flash is good for about 10k to 100k writes. EEPROM can do more.

Better yet, you can arrange the EEROM as a circular buffer so it is unlikely to ever wear out. That is a benefit of EEPROM, you don’t have to program it in blocks. The reason EEROM costs more is not simply the size of the cells. It’s that you need to do extra process steps. You have to realize that those extra process steps penalize the whole die, since you are adding steps to making a finished wafer.

So integrating EEPROM onto an MCU does have a cost penalty. But when you do it, you have some solid reliable non-volatile memory that can be written to individually instead of an entire block a time.

Adding EEPROM to some large die like an ARM core carries too much of a cost penalty, so you won’t see then there. But many Atmel MCUs have embedded EEPROM and you should check them out for any critical non-volatile functions you need in your system. If you do need some big iron, like an ARM core, well then you can always use some Atmel serial EEPROMs and have the same benefits in you larger systems.

EEPROM_cell

When you live here in Silicon Valley, you get to meet all kinds of engineers. Some are programmers, some are hardware folks. But some of the most interesting are semiconductor process engineers, and their kindred spirits, the product engineer.

When you hang around those folks, you really do see how difficult it is to make the high-performance silicon that is coming out in this day and age. You might not directly see the work of the process engineers, but they are just as important as the IC designers, apps and test engineers in bringing you the remarkable parts you can use in modern designs.

Atmel SAM4L Cortex M4 ARM versus a Z-80

At the risk of exposing you to how ancient I am, I thought it would be fun to compare our new SAM4L MCU to an old Z-80.

I was inspired to do this as a parsed the datasheet and saw that the SAM4L can use only 90uA/MHz. So the Z-80 was a 4-MHz CPU, so the Atmel chip could knock out 4-MHz with 650uA. That’s a third of a milliampere. And that is not even a good comparison, since the Z-80 was a 5V part. But the Z-80 sucked up 60mA at 5V.

And a Z-80 was just a CPU, you still needed to add memory, and peripherals like UARTS, DMA, and PIO chips. So really saying a SAM4L at 4MHz sucks 650uA at 3 volts versus 60mA at 5 volts does not even begin to tell how much better the SAM4L is in terms of power management.

Z-80-cpu

The venerable ancient Z-80 microprocessor, designed by Frederico Faggin in 1976.

At least all the heat pouring out of a Z-80 heat keeps the plastic dry.