Author Archives: Paul Rako

About Paul Rako

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

Benchmarks for embedded processors

Crack applications engineer Bob Martin was walking by just now and we got to talking about people we both knew from our National Semiconductor days. One name that came up was Markus Levy. Bob told me about EEMBC® — the Embedded Microprocessor Benchmark Consortium.

EEMBC

When I read up on the organization, I was delighted to see that Markus started work on embedded benchmarks when he worked at EDN magazine, where I also worked as an editor for 5 years. Back in 1996, it was clear that the old Dhrystone MIPS benchmark was not really meaningful to embedded systems. So Markus got a bunch of industry companies together and proposed the new benchmarks. They got 12 members right off the bat and got funding to establish real-world benchmarks that would be suitable for phones, tablets, routers and other embedded systems. As their about page explains:

“EEMBC benchmarks are built upon objective, clearly defined, application-based criteria. The EEMBC benchmarks reflect real-world applications and have expanded beyond processor benchmarks, also heavily focusing on benchmarks for smartphones/tablets and browsers (including Android platforms) and networking firewall appliances.”

I was glad to see that not only is Atmel a member, but so is ARM, who invented the cores used in Atmel’s 32-bit SAM line of microprocessors and microcontrollers. When you look at Atmel’s benchmark results, You can see our original 8051 processors get a score of 0.1. An AVR 8-bit MCU like the ATmega644 will get a benchmark score of 0.54. In contrast our ARM-core SAM3 and SAM4 chips will get a benchmark score up to 3.3. When I looked at a competitor’s ARM4 offering, I was delighted to see they ranged from 2.0 to 2.8, significantly slower than Atmel’s ARM4 SAM4 chips.

This is congruent with what I hear in the hallways here at Atmel. We just didn’t slap some counter-timers on an ARM core and release it. We took the time to do it right, adapting and improving the really cool peripheral system from our XMEGA 8-bit micros. I assume these benchmarks are just for raw speed, but the cool thing about Atmel’s peripheral event system is that you can have peripherals interact and do DMA without waking up the CPU core and sucking up a lot of power. Still it’s nice that the benchmark shows us as faster. This might mean you can get some chunk of code to execute faster and then get the micro put to sleep, saving power overall. This can be non-intuitive. If the micro’s compiler has more efficient code creation, you can get way more done with the same amount or less power. I know this is true for AVR 8- and 32-bit processors. The AVR was invented and crafted by hardware engineers that understood the importance of C and computer science in general. Although the entire AVR line did not spring fully-formed from the head of Thor, there were some really crafty Norwegians involved.

While the ARM-core SAM chips run ARM instruction sets, they too are optimized for compiling. After all, AVR showed the world how to do this in 1996. And with Atmel peripheral concepts, the SAM chips are really something. Check out the new SAM D20 Cortex M0+ micro for a nice inexpensive chip that can do a whole lot on minimal power.

Current sensing for smart meters and solar panels

In the recent edition of Electronic Products there was a fantastic I/V (current / voltage) diagram of a solar panel. It may have originated at Allegro, where, the authors of the article work. It confirmed something I suspected for a long time. The power output of a solar panel falls as it gets hotter. I will put a low-res version of the graph below but you really need to look at the EP article.

Solar-cell_I-V_curve_sfw

This diagram shows how you get less power out of a hot solar cell. Dotted lines are power out, equivalent to the area under the I/V operating point.

This connects with my realization that a solar cell is like any other photodiode. The forward voltage goes down as it gets hotter. But I was not sure what happened in reverse mode I/V. But with what we call a photodiode, you are usually trying to measure light, not draw power from it. So with many photodiode amplifiers, you short the diode into a virtual ground. With no voltage across it, it is not making any power. But the current output is very linear with respect to the light falling on the diode. And note that this current is a reverse current in the diode. You can think of it as a reverse leakage current that gets way worse when light hits the diode. Indeed, the baseline leakage is called dark current.

Photodide_I-V_curve

A photodiode I/V curve.

So here is the diode I/V curve you might see published in a photodiode amplifier book. Note that you can short the diode and its output has to fall on the –I axis. If you put a negative bias on the diode, and still keep it working into a virtual node so there is no voltage generated across it, then it is like the leftmost response. The negative (aka reverse) bias does not materially change the output, but it does greatly lower the diodes capacitance, since a photodiode is also a varactor. If you hook a photodiode, which is pretty much any diode there is, to a resistor, it will make current but the current into the resistor will also make a voltage. That gives you the output of a resistive load in the chart. The value of the resistor sets the slope of that load line. Note that the output is no longer linear. Doubling the light does not double the output current.

Realize the Allegro solar cell curve is showing you the bottom right quadrant of the generalized photodiode curve above. What the solar cell folks do is re-define positive current as what really comes out of the cell, as opposed to having positive current be defined as a forward diode current. So if you can image flipping photodiode curve up around its x-axis, and then tossing out the left side and the whole bottom half as well, you get the Allegro curve. Note that shining light on a solar cell or photodiode will never make forward diode current, but it will affect the operating point if you are putting forward current into the diode.

And note that you can’t get any power out of a cell unless you get both current and voltage at the same time. You short the solar cell and you will get the most current, but no power. If you leave the cell open circuit, you get the most voltage, but with no current flowing you are not getting power. So what you want to do is change the load on the cell until its operating point on the I/V curve has the most area under it.

Solar-cell_I-V_MPPT

The red rectangle is smaller since it does not have enough voltage. The blue rectangle is smaller because it does not have enough current. The green rectangle has the maximum area and hence is the MPP (maximum power point) of the solar cell.

So that is what the MPP (maximum power point) or MPPT (maximum power point tracking) concepts are all about. You get no power if you short the cell or leave it unconnected. What you are trying to do is maximize the area under the operation point. That is because power is current times voltage, just like area is X times Y. So the MPP chart I hacked up above shows three different operating points. You can see that the big dot corresponds to the rectangle with the greatest area. If your magnificent Atmel microcontroller multiplies out the voltage and current in real time, it can dither the operating point by changing the operating point of the dc-dc converter that is taking the solar cell power and putting into a battery or onto the ac line. This is the “T” in MPPT. By tracking the maximum power point, you get the most power you can for any particular solar cell, at any particular temperature, at any give illumination.

Now please read that Electronic Products article about measuring current, since you may want to use those Allegro current sensors in your MPPT inverter, or smart meter or other application. Atmel makes the microcontrollers with security and some have integrated power line communications (PLC) modems. We also have parts that integrate the AFE, so you don’t need these external parts in your smart meter. So if you need to measure and log and report and control current, keep Atmel in mind.

Atmel_Smart-energy-metrology-platform

Oh and in case somebody hasn’t thought of it yet, it seems obvious to one skilled in the arts that you can combine the shaded evaporative cooling systems that spray water on your roof beneath shutters, with solar panels as the shutters, so now you are cooling both the roof and your panels. Step C, more power.

Evaluating the SAM9N12 and SAMA5D3 MPUs

I was lucky enough to catch a presentation on our big-iron MPU (microprocessor unit) chips. Atmel is rightly famous for our MCUs, microcontroller units that have flash memory inside the chip. That includes our 8- and 32-bit AVRs and our ARM-core SAM D20 and SAM3 and SAM4. Indeed, one of the cool things Atmel did was license the ARM7 TDMI Thumb MPU core and make it into our SAM7 series MCUs. But Atmel makes MPUs as well, microprocessor units. These have external memory. These parts, such as the SAM9N series and the newer SAMA5D3 are much more powerful than the average microcontroller of any make.

SAM9N12-EK_SAM5D3x-MB

The SAM9N12 eval board (left), and the SAMA5D3 eval board. These are complete computers that sip a few Watts of power.

SAM9N12-EK_SAM5D3x-MB_backside

The SAM9N12 eval board (left), and the SAMA5D3 eval board from the back.

SAM5D3x-MB_jumpers

You can tell Atmel has experienced hardware folks. We put the SAMA5D3-EX jumper settings right on the silkscreen. Nice.

You could use the parts to make a human-machine interface (HMI) for industrial control, or a kiosk, or one of those super-fancy thermostats. Bar code scanners or gateways and routers can be fashioned from the A5, since it has good on-board communication. The SAMA5D3x can run Linux just fine. It can even do Android, but there it is better for “headless” applications, since the Android interpreted language overhead makes it hard on the A5 to both run the code and do the LCD display plus touch interface at the same time.

SAM9N12-block-diagram

The SAM9N12 block diagram. The eval board has even more functions, including a Zigbee module socket. There is also a pot or volume knob on the board not shown here.

And be sure to consider the older SAM9N12. It’s not as powerful, but as you would expect, uses even less power to do its thing. Right now (2013) the SAM9N12-EK eval kit is discounted and you can pick one up for $199 bucks from the Atmel store. I could not find a power spec on the eval kit, so I brought in my handy Kilowatt meter.

SAM9N12-EK_boot-screen

The Kilowatt never goes above 2W as the SAM9N12-EK boots and runs. Ignore that old Atmel logo—this was an old board laying around, although we still use this logo on our chips as a distinctive mark.

I was delighted to see the KiloWatt never got above 2 Watts. And that is 2W from the wall outlet, including the losses in the wall wart transformer. This just astonishes me. The pre-loaded app on the SAM9N12-EK runs Linux and boots into a slide show. You can select Qt display driver demos and several graphics displays to show off the capabilities of the chip. There is a resistive touch screen on the LCD. It does not work near as well Atmel’s capacitive touch screens, but it comes with the LCD module.

I fired up the SAM5AD3-EX as well, and was pleased to see the KiloWatt only showed 3W coming from the wall outlet. For as powerful as the SAM5 is, this is an amazing achievement.

SAMA5D3-EK_launch-screen

The SAMA5D3 uses 3 Watts while providing a full operating system and Ethernet connectivity.

A quick check at the Atmel Store shows the SAMA5D3-EK to go for $595. That is not pocket change, but remember this thing has the power of the desktop computer you used a few years ago. And we give you the schematics, the design files and sample applications to get you started. One great thing about the SAMA5D3x board is that the CPU and memory is on its own module. When I talked to the head of the business unit, he explained that we thought that this was the best way to give customers a leg-up on their development. Now you don’t have to worry about touchy PCB layout of the CPU and memory system, you can buy it as a module, even in higher volumes, from Atmel’s 3rd party partners.

So I just wanted to give an overview of these powerful Atmel chips, this time. Next I will fire up and show each board in more detail. And stay tuned, Atmel has some more powerful chips and systems coming, and I will be sure to tell you all about that.

Made in Space 3D printing startup speaks at Atmel

Friday saw quite a buzz here at Atmel when founders of the start-up Made in Space participated at a speaking event.

Made-in-Space_Atmel-sponsor

Atmel hosted start-up Made in Space to talk about their 3-D printer.

The first-floor training room was packed. In attendance was the Mayor of Mountain View, a retired astronaut and people from NBC News. Made in Space founder Jason Dunn talked about how useful it would be to have a manufacturing method in space. In keeping with the recent craze for 3D printing, Made in Space is well along the way to sending a 3D-printer to space.

Made-in-Space_Jason-Dunn

Jason Dunn expands and explains his rationale for putting a 3D printer in space.

At first the team tried to adapt an existing 3D printer for space use. They rented time on those parabolic flights where you are weightless for a minute or two. Every 3D printer they tried had severe limitations. Indeed a recent review in Product Design and Development indicates that many 3-D printers don’t work on Earth, much less in orbit. You can see how if a 3D printer needs to be precisely leveled in order to not damage itself, there is little chance it would ever work in space. And don’t forget a 3D printer intended for space use will need to withstand the G-force of launch.

Made-in-Space-diagram

There was a definite startup vibe in the room. I’ve been to those edgy companies that scribble directly on the wall. I guess brown paper serves when you are on the road.

Now last time I checked it was $10,000 a pound to put something into orbit. So the business case for 3D printing in space is that you make parts that you need as you need them. Jason maintains that 3D printing could make 30% of the spare parts on the Space Station. I find that a little hard to believe. Let’s face it, 3D printing makes inferior structural components that have nowhere near the properties of injection molded or machined parts. The space program uses Delrin and polyamide and thermoset high-performance engineering plastics. To my knowledge the “additive string” type of printer cannot use these high-zoot engineering thermoplastics. Even if they did, the resulting parts are never as strong as an injection molded part.

Made-in-Space-crowd

There was a healthy crowd at the Atmel-sponsored function.

Still, you can see how compelling it is to be able to manufacture in space. You can check out Jason’s TEDx talk to see his vision. The second he started his presentation here at Atmel, I could not help but think of the Apollo 13 disaster. If only those astronauts had a 3D printer, they could have easily made a part to adapt the Command module CO2 scrubber canisters to the Lunar module design. Sure enough, the Made in Space people also thought of this scenario. So they gave an intern the job to design and build a part that would have done the job. It took him less than an hour to design the part and the printer had the part built in a few hours more. That would sure have lowered the blood pressure of those three stranded astronauts. And Jason noted that it is the ground crew that can be designing the parts, further offloading the astronauts so they can concentrate on the space-based tasks that they need to get done.

Mechanical CAD software for 3D printing and general use

My pal and audio guru Steve Williams saw a news item where UPS (yes, United Parcel Service), will be offering 3D printing services in select stores. Always thinking ahead, Steve wrote me:

“What do people use to generate print ready 3D files?  Not everyone has Solidworks like Dave [Ruigh, our ME pal]. Are there now programs that are low cost and simple to use that can generate files that 3D printers can use? Is the printing technology and hardware becoming standardized enough that software and files do not need to be tailored to a specific machine or printing process. I know that there have been a lot of machines and processes developed which I would think would require somewhat different design and files to make a useable part. Can Google Sketchup do this? Guess I wasn’t paying enough attention @ Maker Faire this year.”

My answer is “Solidworks”. If you can’t scrape up $4000, then live with the watermarks on the $89/yr student version. It turns out Steve is on the right track. I found a site that lists a bunch of solid modeling CAD programs. Google Sketchup was first on the list. I noted with dismay they didn’t list TurboCAD which is what I use for simple things. At least they listed Solidworks, which is what I would call a “real” 3D CAD program.

3D-printer-at-UPS

Select UPS stores will have this Stratasys uPrint SE Plus 3D printer that you can buy time on.

One of the severe limitations of the Maker movement is that everybody thinks everything has to be free. It reminds of the Frank Zappa song making fun of the Hippies, where he sings: “Free is when you don’t have to do nothing or pay for nothing. We want to be free, free as the wind.” Despite my populist leanings, I at least realize that programmers have families to support and they need to get paid for what they do.

So I looked at Google Sketchup 5 years ago and I found it laughable. It has some primitives, and I remember it being a simple Boolean CAD modeler. This website seems to agree. A Boolean CAD program means you build your virtual gizmo by adding and subtracting primitive shapes. Furthermore, that website said Sketchup is more intended for architectural modeling, which makes sense; it may well be intended to make all those 3D buildings that people have put into Google Earth.

Google-Earth-3D-buildings_San-Francisco

This is not a picture; it is what the 3D buildings look like in Google Earth. San Francisco would never look this clean and tidy in real life.

That Sketchup is meant to draw buildings makes sense after my pal Otmar Ebenhoech noted that you can create a building or other solid and then see what it looks like as the sun passes over it for various times of the year. But if you want to make gizmos, Sketchup is not the program you want to spend time learning.

I myself did not understand the whole mechanical CAD world until I met a lot of cool mechanical engineers and machinists out here in Silicon Valley. A “real” CAD program needs two things: 1) parametric design (instead of Boolean), and 2) assemblies. Solidworks does this, but so much more. You can have the program calculate casting shrinkage, so that you design the part the way it fits, but then Solidworks will expand everything so that now the part represents the mold you need to make in order to cast it. Everything is a little bigger, but when the part cools down and solidifies, it will be the size you want.

Solidworks also does modifications to your sheet metal designs to allow for metal stretching over a bend. Once again, you build the part for what fits, and Solidworks will flatten it out and help you make the drawing of what the sheet metal shop has to start with as a blank.

Back to the two main criteria, Solidworks and all the other expensive solid modelers are parametric. There used to be this IronCAD that was Boolean—hang on—Yeah, they actually brag about being “drag and drop” as opposed to parametric, yet they still cost 3 or 4 grand. This sounds like yet another case of programmers who have no experience deciding how other people should work. Trust me, you want parametric. With Solidworks you don’t subtract a hole from a block. You select a face, and enter the parameters of the hole. It might be dimensions from the edges. Or it might be a percentage, like 50%, or it might be to center it. The diameter of the hole is just another parameter. All the parameters can be calculated by a formula.

Indeed the parameters in Solidworks can come from a different part, so the holes will always line up. This is a case of “OLE overshoot” like when Microsoft put in object linking and embedding into Word and all it did was make the Word document unless unless the person you gave it to had all the other Word docs and spreadsheets and all the other crap you linked to. I asked my ME buddy about relations in Solidworks. They can really get you in trouble. If you change one part on purpose, and have relationships between parts, then Solidworks will blithely go and change all the other parts, but in the old days did not tell you, so all of a sudden, your drawings don’t match your design intent or ECO (engineering change order) trail. My buddy says everyone does what I do—use relationships to initially build the part, then when it is right, break all the relationships, so you don’t have a festival of automatic changes rippling thought your assemblies. Like OLE, it’s just another case of programmer over-reach.

Solidworks did show how you could make a V-8 engine completely parametrically. Then they would type in a displacement number to a box, and the whole engine would change to accommodate that displacement. The bores and stroke would change, every single dimension would adjust and the whole casting would grow or shrink. Really cool, but unlike me, the programmers never worked in the engine design section of GMC Truck and Coach, where the last thing you want to do is change every part on the engine, when you could just put in a crankshaft with more stroke, or bore the existing casting a bit more. Sigh, programmers.

The other thing real CAD programs do is assemblies. See, when you are designing something other than a simple box, you really need to use the CAD program to fit things together. You want to either build the circuits board in CAD, or even old OrCAD 9.2 will export a 3-D representation if you put a “height” parameter in your parts. The newer Altium has native 3D that everyone loves. Then you get this into your mechanical CAD program and you can make sure all the holes line up and the case and cover and everything else is fitting. The essence of 3D design is building a new part in the context of existing parts—in other words, as part of an assembly. Sure, if you are like me, you break all the relationships and make each part stand alone. But with a real CAD program, you can also do 3D rendering to show the boss, or your friends, and you can generate assembly drawings and the “flatlander” drawings used to inspect the part.

Anyway, this gets to a touchy ethical issue. Rather than learn all these free hobbyist CAD programs, I would strongly encourage makers and system design engineers to learn a real CAD program. But who can afford the 5 or 10 grand to just do occasional work? Now in 1983, AutoCAD got popular since they went on record saying if an engineer took his copy home and installed it, it was just fine. I have been told by PCB CAD representatives that know people are stealing the program to take home, but that they would never go after these engineers, since their side project is teaching them to use the program and one day they may have 20 employees and buy legal copies of the software. All the CAD programs are available cracked, especially in Asia. Now remember, those programmers need to feed their family and it really is stealing to use cracked software.

When I was a consultant I would buy my software since I felt that was the righteous thing to do. The fact that I paid well over $10,000 for AutoCAD 10, 11, 12, 13 and 14 is one reason that I feel justified in never looking at their new products. Once I used Solidworks, I never wanted to use Autocad again. Solidworks is not the best for 2D drawings and architectural, so I bought TurboCAD for that. Both TurboCAD and Solidworks have a user interface paradigm that puts AutoCAD to shame. I fired up my AutoCAD 14 last month, and marveled at how obscure it was to get a printout from it. Then I took it off the computer for good. Solidworks shook up the whole industry when it came out. The people that became Solidworks were a bunch of folks that worked at Pro-Engineer, another monster hard-to-use program like AutoCAD. The management did not want to make an easy-to-use program that was based on a 3rd party kernel and that used all the Windows API to do the graphics.

Bad move by the Pro-Engineer management. I knew they were in trouble when I saw companies not installing upgrades since it would mean nobody could use the new version and if installed, a bunch of things would break. So now, 20 years after Solidworks came out, Pro-Engineer has adopted a lot of the ease-of use. They augmented ProE with Wildfire, and now when I look at their website, I can’t even recognize the products, but it looks like Creo is what their main-line software is.

AutoCAD was crushed in mechanical design by SolidWorks, while holding on to their GIS and architectural customers, since they were trapped by their own custom LISP programming extensions. Autodesk went on to offer Invent, which I hear is pretty decent. I won’t look at it since I still feel the sting of Autocad 14 every single day.

Some of my most brilliant ME pals love Unigraphics, which came from Ross Perot’s EDS, and then got bought GM, then by Siemens. There are two major cool things about NX, which is what they call Unigraphics now. One is that it is really good at surface modeling. If you are doing block billet designs for Harleys or etch chambers for semiconductor machinery, you may never use a single surface command. But remember EDS was bought by General Motors, who adopted Unigraphics for car design. To do car bodies you have to swoop and loft surfaces, and eventually turn it into sheet metal. Unigraphics excels at this. The ME buddies tell me that Unigraphics (now NX) will let you bulge and deform solids like they were surfaces, and they surface generation is unparalleled in Unigraphics.

The other great thing about Unigraphics/NX is that it also is a CAM (computer aided manufacturing) program that makes the G-code files for your milling machine, or the .stl (stereo lithography) file you need in your solid printer. Doing the CAM is an intimate part of getting your prototype, and my buddies tell me that the great thing about Unigraphics is that if you can design it, it will “post” to a G-code file that actually works and makes the part in a milling machine. With Solidworks you have to transfer the file to MasterCAM or SurfCAM and hope for the best. Note that Solidworks will output that .stl file you need for 3-D printing or transferring a dumb lump to another CAD program.

Like electronic CAD, mechanic CAD has evolved into a tri-state system. There are the old monster “enterprise” programs, where you need to work on it 8 hours a day to learn and remember the complex program. You will also need a staff of 5 to 20 people to install and maintain it. There are modern programs easier to use, like Solidworks. And there are the free and hobby programs that will take you so far and leave you stranded or waste hours or days of your life trying to get them to work.

Company Hard to use, crusty Easy to use, modern Note
Dassault Catia Solidworks
PTC Creo (was Pro/E) Co-Create (wrapped into Creo)
Siemens NX (was Unigraphics) Solidedge Unrelated programs but they are trying to put Solidedge UI inot NX
Autodesk AutoCAD Inventor AutoCAD not really for mechanical design any more.

Second tier and Hobby

Company Product paradigm
ZWSOFT ZW3D Solidworks clone $1000, Chinese company
Ironcad Ironcad Boolean Tries too hard to be easy to use.
IMSA TurboCAD AutoCAD clone but improved. Boolean Great for 2-D and house design, but program split into 4 or 5 versions
Autodesk AudoCAD LT Used to be just crippled AutoCAD Simple flatland and hard to use
Microsoft Visio Threat to Autocad LT Best for org charts and nothing else.
Bentley Microstation GIS and architecture Not for mechanical CAD
Ashlar-Vellum Cobalt Idea software that you have to use Solidworks anyway For stylists, not engineers.
Corel CorelCAD Autocad clone Just found them, Boolean Might be good TurboCAD replacement
Kubotek KeyCreator Boolean, Cadkey UI Used to be the beloved CADkey
think3 thinkdesign Lease model (now bankrupt) Maybe Think 4 will do the trick

If you really like to suffer, the free ones:

Sketchup, any GNU project, FeeCAD or any other freeware or shareware.

[Update 10/18/2013:] My ME genius pal Dave Ruigh just read this and had some things to add:

“Don’t forget Spaceclaim, the “un-parametric” CAD modeler, or at least that’s how they seem to be pitching it. Also, re integrated CAM (computer-aided manufacturing), that is available via 3rd party add-on with Solidworks (Inventor and SolidEdge too, I think), in the form of Camworks and Solidcam. I always get the two transposed in my mind. One has better 2.5-axis roughing cycles, and the other does surfaces and 5-axis better. This is old info though, things may have changed. Mastercam has a Solidworks add in, as do a few of the other standalone CAM guys, but the Mastercam flavor is still the same moldy old kernel they have been pitching for the last couple decades.”

“Mastercam would be on my hate-list anyway, because they picked the worst point in my career to blackmail me by “sunsetting” my $15,000 seat, making it permanently non-upgradeable (I would have to repurchase at full price). Solidworks, at least as of a few weeks ago when I talked to Hawkridge, doesn’t do this to their old customers. You just pay a $500 penalty + $1300 yearly maintenance and you’re back on the air.”

Let Arduino control your dishwasher or washing machine

My buddy Rob works over at Brocade in the IT department. He is not an engineer, but he loves technology. So I was delighted when he asked me if I had ever heard of Arduino. I gleefully told him that the Arduino Uno was built around an Atmel AVR chip and was loved by Makers and Hobbyists and Engineers the world over.

What Rob is interested in is hacking on his dishwasher so he can control it with an Arduino.

Washing-machine_Arduino

Arduino aficionado Unaclocker is adapting an Arduino to run his dishwasher.

Rob’s source has a great story. The controller on his dishwasher failed. The repairman wanted $150 just the board. So in the true Maker spirit, the “Unaclocker” decided it would be easier, cheaper, and more satisfying to build his own controller using an Arduino. The best part is that now he can control water times to insure that the temperature in the dishwasher gets high enough to really clean and disinfect the dishes.

So Rob went out and bought and Arduino kit, and is starting to play with it. Being a curious fellow, it didn’t take Rob long to find another whitegoods application, this time with the Arduino controlling a washing machine (pdf). This is courtesy of the fine folks at the Gokaraju Rangaraju Institute of Engineering and Technology over in Hyderabad.

You can easily see that the whole world is embracing using the Arduino as a control system building block. You can also see that many companies are using the Arduino as a component in their products, like this commercial printer.

AVR XMEGA-A3BU Xplained demo board unboxing

So we cleaned out a storage area and lo and behold, there was an XMEGA Xplained demo board. So I scrounged up a USB cable and plugged it into my computer. I don’t have Studio 6 installed yet, but I thought it would be fun to just un-box it. This is what happened:

KONICA MINOLTA DIGITAL CAMERA

You can get your very own XMEGA Xplained eval board for on $29. The LCD alone is worth that.

KONICA MINOLTA DIGITAL CAMERA

What a score, the seals are still on the box. I think this was used in FAE training in May.

KONICA MINOLTA DIGITAL CAMERA

This is what is inside. There is that great LCD, a CR1225 battery for the real-time-clock (RTC), 3 tact switches and a touch switch, a temp sensor, a light sensor, all the signals on headers, and a JTAG port so you can hang a Dragon on it and see inside the chip while it executes. Sweet.

KONICA MINOLTA DIGITAL CAMERA

Here is a close-up. Oh, there is a non-volatile serial memory chip too. Needless to say, I have not read any manuals or paperwork yet, heck I am a man, like my buddy Tim who didn’t read the manual on his $60,000 Cadillac before he drove it to San Diego.

KONICA MINOLTA DIGITAL CAMERA

On the backside, you can see the 2010 date, but it turned out the board was way newer, stay tuned. You can see the flux residue where they hand-soldered the LCD. You can’t send an LCD through an IR reflow oven.

KONICA MINOLTA DIGITAL CAMERA

I stick a USB cable on it, and wow, it has a backlight on the LCD. It was obvious that the welcome screen here is telling you how to navigate the pre-installed program. That is not a touch-screen, it is telling you the tact switches and the one touch pad on bottom left are your navigation buttons.

KONICA MINOLTA DIGITAL CAMERA

Here is the screen with a flash picture—you can read the LCD either way. You can bet I am thinking how to mount this on my Harley and make a voltmeter/ammeter, temp sensor system out of it.

KONICA MINOLTA DIGITAL CAMERA

This is what you see if you press “Enter” (the top left button). It’s a sub-menu that displays the temperature, the light intensity, or the production date.

KONICA MINOLTA DIGITAL CAMERA

Here is the production date screen.

KONICA MINOLTA DIGITAL CAMERA

It took me a while to figure out that there was a touch-pad on the bottom left instead of a tact switch. This is how you go back up the menu tree.

KONICA MINOLTA DIGITAL CAMERA

Here is the temperature display. It seems pretty accurate, despite the board saying “NTC SENSOR”. I assume there is a linearization program, negative temperature coefficient sensors are notoriously non linear. This is reading hot since I put my finger on the sensor to see it work.

KONICA MINOLTA DIGITAL CAMERA

The top menu had more items and would scroll. This is the page for setting date and time. It was set to Norway time, but the date was right after 6 months.

KONICA MINOLTA DIGITAL CAMERA

This is a menu choice that shows how long the board has had its real-time clock powered.

KONICA MINOLTA DIGITAL CAMERA

When you stick in the USB the computer prompts you to add a driver. I don’t think that is a good idea. The way this is meant to be used is that you install Studio 6 or use some other IDE or the Atmel Software Framework (ASF) and that has the driver the card needs. So I cancelled. We have all been burned installing things on Windows.

Well this got me pretty fired up. It never occurred to me one of our demo boards would have such a nice program on it pre-loaded. I guess it’s time to install Studio 6. I have been avoiding it, since I am an assembly language dinosaur, and I am sure all this code is in C. After all that is one of the coolest things about AVRs, they were designed to run C and run it well.

In addition to installing our free Studio 6, I will hang a Dragon debugger/emulator onto the card. Thata is another cheap purchase from Atmel, about 50 bucks. There were a couple of those in the storage room too. With a Dragon I can see inside the chip as it runs, single step programs, and read the registers and memory locations.

ECO 1 (engineering change order). Let’s make that navigation screen show more representative symbols for the tact switches, and the touch pad. And let’s move the symbols to the outside corner of the screen, like they are on the PCB (printed circuit board).

ECO 2. Lets add a menu pick to read analog voltages—hang on—holy cow, this thing not only has two 12-bit ADCs, it has 4 comparators. I can see there is a lot to love. And get this—6, count ‘em, 6 USARTs. That will satisfy my buddy Dave who insists on one dedicated UART just for software debug. Sure you can use the debugger when it is hooked to Studio 6 or your IDE, but it is also nice to have a port you can query or that spits out status when the system is deployed in production.

Stay tuned, I will be hooking up one of those Dragons and installing Studio 6 next. Just remember the first rule, never keep a handgun in the same desk you have a computer on. I do expect to be frustrated, it’s been 12 years since I programmed in assembly, and never have used C, but let’s take this little adventure together and see what happens.

AVR video synthesizer and an analog video game prototype

Like most of the folks that come to the annual Analog Aficionados party, my buddy Todd Bailey has a bunch of interests. Todd helped Atmel out at the NY Maker Faire working at our booth, showing off his Atmel AVR-powered video synthesizer.

Todd-Bailey_Video-synthesizer

Todd Bailey’s video synthesizer getting a workout by Dan Friel as he performs Thumper

Todd does a lot of work with AVRs, some of which I can’t tell you about because he is under NDA (non-disclosure agreement). The video synth was a personal fun project perfectly aligned with the open-source and Maker movement. The synth generates all sync, blanking, and colorburst signals on an Atmega168a running at 14.31818MHz (four times the color carrier frequency for NTSC). The one at the Faire was a prototype and Todd might move up to an Xmega just so he can run at 8 times the color carrier rate for tighter timings.

It’s currently written in mixed C and assembly.

Todd-Bailey_Video-synthesizer-PCB

Todd Bailey demonstrated this AVR-powered video synthesizer at the Atmel booth at NY Maker Faire 2013.

In addition to synthesized video, Bailey also loves old vector arcade games. These are games where the CRT (cathode ray tube) is not a raster unit like in your old analog TV. A vector tube is more like an oscilloscope, where you draw lines at any angle. Todd wrote:

“As some of you may have known or been involved in, a couple buddies and I have been working on a new arcade game using old vector monitors to take advantage of how beautiful and alien they look.  We built an FPGA-based vector generator, a high-bandwidth and resolution XYZ DAC/amp and have gotten really intimate with the guts of the Electohome G05 monitor.”

Todd-Bailey_video game

“Anyway, most of the hardware and engine stuff is done and we decided it was time to show it off to our friends.  The storyboard as it stands is about cryogenically frozen Soviet pilots descending from space and blowing up Chicago, although the prototype game right now is just about blasting polygons.  It’s in full 3D wireframe, and it also features a separately-driven monochrome ATM CRT as the ship’s HUD. We’d like it to become a proper stand up arcade game pretty soon but have basically no idea what to do with it when we’re done.”

I got into vector CRTs when I saw the schematics for the HV (high voltage) section of the Tempest vector monitor. They would have been better off running open-loop. What the flyback circuit does is try to maintain voltage on a system with a static load, so all you really get is excessive current as the flyback windings start to short, and the well-known smoke effect from these systems. A universal input current-mode flyback would be just the ticket– protecting the transformer from fire and I bet even that could run open-loop once you set it at the factory.

Kilobots, small vibrating robots use the ATmega328

Thanks to pals at Evil Mad Scientist, I learned about these small self-powered autonomous robots called Kilobits. Brought to you by Harvard University, the little gizmos are run by an Atmel ATmega328.

kilobots-stacked

The little robots move on the little wire pins. There are two vibrating motors, like in a pager. They are arranged in “quadrature” so to speak. One will rotate the robot clockwise, and the other will rotate the robot counterclockwise. If you run both motors, the robot will move forward.

kilobot_callouts

The robots can communicate with an IR (infrared) transceiver. This allows them to exhibit swarm behavior like insects. Check out this video of the Kilobots doing their thing.

Harvard is doing this to study complex self organizing behavior. This may help psychologists and economists understand complex human behavior that just appears, like the open-source movement, the Dabbawala lunch delivery system in India, and how day workers outside of the Home Depot settle on rates and seniority.

The hi-zoot Harvard Kilobots are preceded by the Make community Vibrobot. Evil Mad Scientist did a great vamp with their BristleBot, which uses the head of a toothbrush.

BristleBot

While created for research, to their credit, Harvard made this is an open-source project that is just perfect to be picked up by the Maker Movement. NY Maker 2013 starts Saturday, the Atmel team is setting up and the Evil Mad Science people will be at our booth to show off their cool Atmel-powered kits.

Bob Pease says: “My favorite programming language is solder”

The famous analog engineer and writer Bob Pease mentored me over at National Semiconductor. I was deeply saddened by his tragic death and I miss him every day. So you can imagine my delight when Lenore over at Evil Mad Scientist told me a pal had made a fun little tribute circuit board in honor of Pease.

Bob-Pease_My-favorite-programming-language-is-solder

Saar Drimer at boldport.com made up this cute PCB in honor of Bob Pease.

One of Pease’s exasperations was engineers that would rely solely on computer simulations. Bad enough they didn’t rely on real hardware, but when the real hardware did not agree with the simulation, these engineers would blame the hardware, not the computer. I touched on this tendency of engineers to rely on pretty simulations in a recent article in Electronic Design.

So when engineers would as Bob Pease what his favorite Spice or his favorite programming language, Bob would loudly pronounce “My favorite programming language is solder!” I really get his point. When I was a consultant, clients wanted to see working hardware, not computer print-outs. So my doing minimal Spice, I got prototype hardware in their hands sooner, and then we could use Spice to optimize component values, or for what it is really good for—doing Monte-Carlo simulations with your discrete component tolerances so you could see the corner cases of performance of your design.

Pease_with_iron

To kid Bob Pease about his saying “My favorite programming language is solder,” I bought him this hefty 200W unit at the Silicon Valley Flea Market.

Saar Drimer was hoping that I could send one of his Pease PCBs to Bob’s widow Nancy. I will do that tonight, and I am sure she will be delighted as I was.

Bob-Pease_My-favorite-programming-language-is-solder_back

The backside of the Pease tribute PCB has a nice silkscreen that emulates Bob’s classic handwritten schematics.

saar_drimer_cl

So thanks to Saar over at Boldport, for keeping the Pease flame alive, just the way Bob would want— in some hardware.