Tag Archives: Industrial Automation

SAMA5 and SAM9: Atmel’s big iron microprocessors

Atmel is rightly famous for its AVR line of 8-bit Flash microcontrollers. But we also have “big iron” chips like the SAMA5 and SAM9 ARM-core microprocessors. A microcontroller has its own internal Flash memory. A microprocessor uses external memory, as much or as little as your application might need.

Hardware engineers have two big worries with any “big iron” microprocessor. First, they are in big packages, hundreds of pins in a ball-grid array. That can be hard to prototype with, since it needs a fine-line PCB that costs a lot to spin. The other big concern is laying out the DDR memory interface. These are wickedly fast and require best layout practices and some register tweaking to get them up to full speed.

SAMA5D3_Xplained_angle

The SAMA5D3 Xplained kit has connectors for Arduino Shields and dual Ethernet ports.

Thankfully, Atmel has solved both problems with a series of evaluation systems. For the SAMA5, you can start with a 79-dollar SAMA5D3 Xplained Kit. It has solved your DDR memory problem since it’s got 256MB on-board. One of the coolest things is that it has connectors where you can plug in any Arduino Shield. Now you can’t use the Arduino libraries, those are based on Atmel’s 8-bit AVR, but it’s not hard to re-write the open source code libraries into something that will run on ARM, if someone hasn’t done it already. The eval board has Atmel’s SAMA5D36 Cortex-A5 Microprocessor, 256Mbytes of NAND Flash, LCD connectors, dual Ethernet (GMAC + EMAC) with PHY and connectors, three USB connectors (2 Host + 1 Device), one SD/eMMC and one MicroSD slots, expansions headers, and power measurement straps.

SAM9N12-EK_SAM5D3x-MB

Atmel makes eval kits for the SAM9N12 (left) and SAM5D3x ARM-based microprocessors.

For those that are doing higher-level applications, the fact that you can run Linux brings all the advantages of open-source development to the SAMA5 and SAM9 microprocessors. And best yet, you get a powerful CPU that uses very little power thanks to Atmel’s architecture. The SAMA5 uses 150mW when running at full speed. It has a DDR controller that give you 1328MB/s of bandwidth. It comes with for gigabit Ethernet, 3 USB ports, dual CAN, UARTs, SPI, and an LCD controller with a graphics accelerator. There is a camera interface, a 12-bit analog to digital converter (ADC) and 32-bit timers.

A SAMA5 chip can run Linux and even has the power to run Android in a “headless” application, that is, where there is not a high-resolution display to eat up your CPU cycles. With an ARM core it’s ideal if you want to do “bare metal” development, where you are writing native ARM code.

SAM9N12-block-diagram

The SAM9N12 architecture gives you low power and a great peripheral set.

Looking at the SAM9, the SAM9CN runs at 400MHz. They have security built in with a cryptographic engine and a secure boot. There is an LCD controller with touchscreen interface, USB, MLC NAND memory support, along with multiple UARTs and I2C. It sips 103mW at 400MHz.

You can get separate LCD panels made to work with the SAMA5 Xplained kit. But if you want to get a SAMA5 kit with the LCD already included, look at the 595-dollar SAMA5D31, SAMA5D33, SAMA5D34 and SAMA5D36 kits. There is also the 445-dollar SAMA5D35 kit, which is cheaper since it does not have an LCD system. These kits cost more but they come ready to go. These are a small working computer that you can immediately start programming in high-level languages or Linux scripts. The kits come with installed applications for its Qt-based GUI.

SAMA5D3-EK_launch-screen

The SAM5A5Dx-EK demo kit comes with Linux and some demo applications pre-installed.

And if you dread laying out a PCB with a working DDR memory interface, but don’t need the whole $595 kit, you can get help there as well. You will notice that the microprocessor and memory are on a little mezzanine PCB in the SAMA5D3 demo kits. This PCB will be available from Embest and other partners. The SAM9 is also available as a tiny SBC (single-board computer).

SAMA5D3-EK_mezzinine_PCB

The SAMA5D3-EK series are designed with a mezzanine card holding the CPU and DDR memory. You can use this card in your high-volume designs.

So now you can develop your custom hardware starting with the SAMA5D3 kit, and then make your own custom hardware that still uses the same exact CPU+memory mezzanine card. While you are perfecting and troubleshooting that hardware, your software team can be working on the Atmel eval kit. This paralleled development will substantially speed up your time to market. And best yet, you won’t be bogged down trying to troubleshoot the DDR memory interface, since it is already working on the mezzanine card.

So don’t just think of 8-bit AVRs when you consider Atmel. We make some really high-power MPU products for everything from IoT (Internet of Things) servers to routers and industrial automation. With Atmel’s kits and our extensive partner network, we can get you up and running in no time, for very little cost, and you can have confidence you designs will work on that final hardware spin.

Passing CE immunity testing

When I was working on semiconductor machinery, we used TUV to get CE certification so we could sell the machines in Europe. We got through emissions alright, it’s similar to the FCC testing we already did, but immunity testing was brutal. When we broadcast RF at a machine, the wafer elevators went nuts and started breaking wafers. We had managed to convince the TUV guy that the speckles and snow on the monitor were not technically a failure, since you could still read it. But robots going open-loop? No, nobody could talk that past TUV. Turns out the cabling was the culprit. There was shielded twisted pair to the Banner sensors that located the elevator stops. In fact, I think they even used braid+foil shielded wire. But the semiconductor machinery company connected the cables with those red-brick AMP connectors, the MR series.

MR-connector

MR These MR (miniature rectangular) connectors work great for appliance wiring, but they provide no continuous shielded path for radio frequency interference (RFI).

Now designing cabling is often thought of as a mechanical engineering function. But mechanical engineers often don’t understand the principles of RF shielding. Get this— they cut the cable shielding about 2 inches back, connected the power, ground, and signal to pins, and yeah, they connected the braid to a pin, and sent it into the connector, to mate with another cable that had 2 inches pulled back. The cables were all dressed beautifully and shrink tubing everywhere. But like my buddy says—“4 inches of untwisted unshielded wire is a nice antenna.”

D-sub_metal-shell

D-sub The D-sub connector was developed for military applications and then picked up by PC makers for serial, parallel and video ports. One reason is its good RF performance. Make sure your cable braid contacts the metal shell.

I switched them to D-subs using 9 pins with a metal shell, and we finally passed. So remember, RF energy is like light—it can leak into the smallest spaces and screw things up. Make sure the EE department revises the detailed design of the cable, or your machine might get held up in certification too.

Crushed avionics from a 737 nose wheel collapse

I have several pals that work on airplane avionics. Talking to one last week, he mentioned that he has a picture of what happens to the high-dollar avionics bay of a 737NG when the nose wheel folds back and collapses on landing.

737NG-avionics-bay-crushed

Ouch. This 737NG avionics bag got pretty well crushed when the nose gear folded up on landing.

Be glad your electronics was not in this mess. I guess this is a case of just taking out the whole rack and putting in a new one. It was nice that the collapsing electronics sort of cushioned the blow, and protected the airframe from a high-g impact.

My pal Jerry Alvarado (RIP) worked as a machinist for United up in San Francisco airport. He told me that they were constantly rebuilding nose gears, as the load when the plane drops onto it is pretty severe. I asked if they pushed him to rush out a job, and he said “No way, I can take as long as I need. Hey, our mothers ride on airplanes too.”

That was certainly comforting in this day of cutting corners and slapping things together.

Video: The Gingerbread Arduino

Gingerbread_Arduino

My pal Andreas over in the microcontroller business group sent me this great video showing the kind of fun non-technical folks can have with Arduino.

He writes:

My cousin who is a math/physics geek wanted to learn embedded  programming and decided to make an fancy gingerbread santa for Christmas using an Arduino. Turns out not only kids but also grownups play with Arduino. ☺

OK, so a math physics guy is not exactly non-technical, but it is safe to say he is not an engineer. That is the great thing about Arduino, it can get you started with some results the same day you start to play with it.

A Tesla hacked into a Vanagon

My buddy Otmar Ebenhoech is hacking a wrecked Tesla chassis underneath a VW Vanagon van. And not just any Vanagon, he is doing it to a stretched Vanagon that has two side doors.

Otmar_Ebenhoech_Vanagon

Otmar Ebenhoech stretched this Vanagon years ago. When the engine blew out he decided to hack a wrecked Tesla S into the undercarriage.

I met Otmar when he lived in Silicon Valley. I was converting a 1975 Honda Civic to all-electric, and he was the go-to guy for help and advice. He sold his house during the housing craze, and went up and bought a house and a shop up in Corvalis Oregon. If anyone has the can-do spirit to pull this off, it is Otmar. He is the designer of the Zilla dc motor controller used in the White Zombie electric drag car.

Here is a video from the project blog:

Hopefully Burning Man and all Otmar’s other projects won’t keep him from this great adventure. I saw he paid about $38k for the Tesla so its not something you want to just let sit. When I watched the video  above I wrote Otmar and asked if that hoist was his personal shop. He replied:

“Yes, that’s the Garage Mahal you see in the background. I spoiled myself by moving to Oregon where I can afford a shop, and seemingly to buy a wrecked model S though I’m still in a bit of shock over that!”

Arc explosions illustrate the dangers of electricity

I wrote a blog post a while back about the difficulty or having cars with 42V instead of 12V batteries. I also pointed out the difficulties of distributing dc inside your house and to your house. It got picked up by EDN, and the comments were interesting. Someone challenged my assertion that 24V relays switches are less reliable. Sorry, I worked for GMC Truck and Coach as an auto engineer in the electrical group. Heck, just read any switch or relay datasheet and you can see you have to de-rate for dc and de-rate even more for higher-voltage dc. Someone pointed out the phone company uses 48V dc, and I had to explain that the 48V the POTS (plain-old telephone system) sends to your house is also high impedance, 600 ohms, so that make is much less arc-prone and easier to switch.

Arc-flash-person

Others challenged my observation that it is hard to distribute dc in your house due to the fire hazard from the arcs and the same problems with switches and relays. Well, even ac has arcs that are hard to quench. Bigger dc circuit breakers have magnets in them to pull the arc one side and make it longer so it can break. Really big breakers, both ac and dc, have compressed air that blows the arc out just like your kid with a birthday candle.

Arc-flash-box-person

So here is a nice video of an ac arc flash that should give you some idea of the difficulty of quenching an arc. Palo Verde had a horrible arc flash in 2008 that thankfully had no injuries. And here is a training video of an arc flash form the fine folks at e-Hazard.com

Here is another training video from Westex flameproof clothing:

And if you wondered if there was any glory left in the American worker, check out this high-voltage lineman working from a helicopter.

So that’s the trouble with dc. Since the voltage is not going through zero 120 times a second it is much harder to quench the arc. The operative word is “plasma”. That is what Fran Hoffart from Linear Tech taught me about li-ion batteries. He said that the burning lithium is certainly a problem. But the real mess is that a plasma ball forms, and that shorts out any other battery cells in the vicinity. An arc is plasma, and that is some nasty stuff. I mentioned to Fran that the iron phosphate chemistry lithium cells are supposed to be burn-proof. Fran looked at me with an expression that said “you can’t be that stupid” and replied “they all burn”. It is remarkable the difference you hear when talking to people who are making and selling the battery cells versus the people like Fran, that are making the chips to reliably charge the cells.

Arc-Flash-outside

I guess that is why that outlaw biker told me that the only thing that he was really scared of was electricity. I asked why and he said “Because it can kill you and you can’t see it.”

Ground, earth ground, common, shield, and power supply return

A recent edition of Design News had a nice story about ground bounce causing problems in LCD panels. Poor or incorrect grounding causes all kinds of horrible problems in electronic systems. The first thing you need to understand is that silly little symbol on your schematic does not magically create an ocean of zero impedance. The ground symbols are just a convention so we don’t have to draw all the separate return paths in our electronic circuits. Many days I think it would be better if we did draw all the grounds as separate wires on our schematics.

The article above bemoans that LCD panel suppliers are connecting their power supply returns to the chassis of the display. The author seems to think this is bad, and I tend to agree, if I understand the problem correctly. He says the LCD panel people do this to lower EMI radiation out of the panel. I have to assume what is going on is that the ITO (indium tin oxide) transparent electrodes on the panel need to be at least ac referenced to earth ground, so they can serve as a shield for the EMI caused by the digital signals inside the panel. But he points out that these fast digital signals can cause the ground to bounce up and that causes memory erasure and all kinds of other problems.

Now a Ham radio person would know the difference between a ground, a shield, and a power supply return. Those RF folks really understand EMI and radiation and low-impedance, even if they are not engineers. Ideally you would have an ITO layer on the display that was continuous and connected to the chassis of the product. That would serve as an EMI shield for all the fast edges inside the LCD panel.

To reduce EMI you want the tightest shortest loops between current carrying conductors. So if there is a ribbon cable to the display, you would want a return line next to each and every signal line. If the ribbon is that twisted pair type that is even better. In addition to putting in power supply returns for the signals, what you folks love to call “ground,” you could also shield the cable by running it a conduit or wrapping it with copper tape. But you have to be very careful where you connect that shield to the power supply returns (aka ground) and also to earth ground, which is that third round pin on your wall plug.

Earth-chassis-signal

The three grounds in your electronic system.

If you connect that shield in multiple places, it will start sharing current with the power supply returns. Now you have changing currents in space, and EMI. I am starting to film a whole YouTube series on schematics, and the first 6 shows are all on the humble ground. So remember, that upside-down Christmas tree that everyone calls ground—that is earth ground. Linear Tech has routinely used it as a signal ground on their datasheets and app notes for 30 years. It is absolutely wrong and sloppy to do this. They are chip guys, maybe brilliant chip guys, but they don’t do system design. If you try to take a product through UL or CE they would like you using earth ground symbols all over the place.

The middle symbol above is chassis ground. That is what you use for a chassis of a car or radio. Unfortunately car makers do use the chassis to return electrical signals, but they are getting smarter and putting in copper wires to make sure the return currents really do return. What we should be using for most all our circuits is the little triangle symbol. And yeah, the power supply common does connect to the chassis common, and you should show that on your schematic. And if your product plugs into a wall, you have to connect the metal chassis to earth ground, unless it is a double insulated product, in which case the plug need not carry the earth ground.

Stay tuned, I will start filming these shows in our new studio here at Atmel and will back-post to them on this blog once I start getting them up.