Author Archives: Paul Rako

About Paul Rako

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

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.

Two Atmel chips in the new Microsoft Surface 2 tablet

Crack Atmel sales engineer Stuart Cording brought to my attention a teardown of the new Microsoft Surface 2 tablet. While it looks very much like the legacy Surface RT, it is a complete redesign. There is another nice teardown over from my pals at iFixit.

Surface_2_teardown

The Surface 2 internals are a complete redesign from the Surface RT (courtesy iFixit).

I was delighted to see that the Surface 2 contains two Atmel chips. There is one of our high-performance touch controller chips, the mXT1664S S-series, and our 32-bit AVR chip, the AT32UC3L0256. I have a soft-spot for the AVR 232-bit UC3 chip. It’s got all the cool peripherals and low power from the XMEGA family, but it is a 32 bit chip. I know everybody loves ARM chips and we make a whole bunch of ARM architecture chips, including the SAM D20, but UC3 is a pretty sweet little chip itself, as evidenced by Microsoft’s selection of it in this cost-sensitive consumer application.

The S-series touch chip is a capacitive touch controller chip that provides high performance. It is based on the 32-bit UC3 AVR part, so if you want to write assembly code, you only have to learn once instruction set to use both chips that Microsoft picked.  Look to see our T-series chips start to show up on tablets. It raised the performance bar even higher, with precise 0.2mm stylus accuracy, as well as hover and gloved-hand multi touch. We did a little video demo and I asked the engineer if it could do multi-touch with one glove and one stylus and he proved it could.

So keep an eye out for more Atmel touch hardware in tablets, phones, and car dashboards. We had one engineer tell us that while we did have superior hardware, our touch algorithms were also far superior. So you can image how good you can make your display with good hardware and firmware from Atmel.

Single wire communication, with power too

I don’t like the term “single-wire communication, since you always need a ground path. My buddy Joe Betts-Lacroix worked on a system at IBM Research where if you shook hands with someone, your PDA (personal digital assistants) would exchange information like your business cards. The “one wire” was your handshake, and the return path was your body’s capacitance to earth.

Most times when you see “one wire communication”, they really mean two wires, they just don’t count the ground return as a wire. No matter, I still think this is a great technology. So I was delighted to see that Dick Cappels had a great article in Circuit Cellar on implementing a one-wire system using an Atmel ATmega8515 microcontroller.

Single-wire-communication

You can tell Dick Cappels is the real deal since he actually builds the one-wire circuit he describes in the article.

This is Dick’s vamp off the Maxim one-wire products that send power and communicate to a device over a single wire (not counting that return path). This was dreamed up by Dallas Semiconductor, before Maxim bought them in 2001. What I like about Dick’s solution, besides his using an Atmel MCU, is that for a couple of cheap parts, you can do one-wire communications with any peripheral made by anyone, as long as you go slow enough. He calls it analog communication, which I also love.

This does not send a lot of power along with the bits; in fact, you don’t have to send any power if you don’t want to, but you should be able to scale things as needed. It is a subject near to my heart, since I dreamed up a system a few years ago to send power to a motorcycle headlight and communicate to the switches and gauges all over one wire. I will check out Cappel’s design, since we can all learn from each other.

Now a word about Circuit Cellar. You can read that blog post I linked to above, but the article itself is behind a paywall. I can attest, Circuit Cellar is worth every dime if you are a system engineer that is interest in hardware, firmware, and even mechanical hacks. It’s a little on the hobby side, but nobody will do your engineering job for you for 30 or 40 bucks a year.

I mentioned a Circuit Cellar article on a homebuilt DNA sequencer a while back—and I say it again, subscribe and pay the bucks for this great magazine. I thing they have a money-back deal, and best of all, for 230 bucks or so you can get all the old issues on a memory stick, and then add your pdf issues to that stick. Do be aware that it costs extra to get both print and pdf versions.

The Internet of things, stalk by stalk

The Internet of things (IoT) will enable profound improvements in productivity

Bob Dible is an engineer that now works on his family farm in Kansas. He describes the technological strides made in agriculture. “We generate GPS (global positioning system) yield maps using data from the combine as it harvests. That helps us determine what nutrients are needed the next season at various parts of our 4-square-mile farm. We then program those different nutrient mixes and locations onto the crop sprayer aircraft. As the crop sprayer flies over the field, it uses GPS to locate itself.” The airplane sprays out nutrients or pesticides based on the GPS programming. It dynamically changes the mix of fertilizer based on its location over the field.

The $900,000 Air Tractor model 802 has 1300hp and a payload of 9,249 lbs. In 2013 the plane can change its fertilizer mix every dozen meters. Dible, the former engineer, knows what is coming. “One day we will monitor and grow the corn on a stalk-by-stalk basis. When we plant crops, GPS with RTK (Real Time Kinematics) gives us 1-inch accuracy.” It’s not hard to see Dible’s vision even now. With today’s technology, a small autonomous robot could drive down the rows of wheat (Figure 1).

Figure-1_Rosphere-537x300

Figure 1. A team from the Robotics and Cybernetics Research Group (Technical University of Madrid) has built an experimental farm robot they dubbed the Rosphere.

Sensors on the robot could monitor each and every stalk of corn. Those robots can communicate with each other over a mesh network. A mesh network is like a chat room for gizmos. They identify themselves and their capabilities, and are then a shared resource.

But the real enabling technology is when we put all these mesh networks on the Internet. This is the so-called Internet of Things (IoT). If the robots that evaluate your individual stalks of wheat have a port to the Internet, you get a cascading set of benefits. The server computer on a farm can store and manipulate the corn stalk information. But it can also analyze those crop yields. And it might contact Monsanto’s computers to get the best price and delivery on fertilizers, seeds, and pesticides.

Figure-2_Modern_John_Deere_Tractor

Figure 2. The tractor on the Dible farm, similar to this one, represents a capital investment of almost one million dollars.

The farm’s server computer can contact and execute automated negotiation with several silos in the area, to insure you get the best price for the crop. The tractor Bob uses on the farm has GPS as well (Figure 2). “GPS has really taken over in the past decade in farming. Not only do aerial sprayers use GPS, but we use GPS to spray with ground sprayers such as the John Deer 4720.”

One day ground sprayers will share information with the farm’s server computer. And that server can go on the Internet to order parts, or schedule maintenance on the mechanic’s smart phone while re-scheduling the driver’s time. Already the nearby dairy farm’s newest tractors and loaders “talk” to John Deere’s and Caterpillar’s local dealers.  “The dealers know where the machinery is, how it is running, and when it needs service,” reports Dible.

Perhaps your mesh network of corn examination robots finds a particularly virulent pest or fungus. They could go on the Internet and notify all the farms around yours, as well as the USDA (United States Department of Agriculture). Perhaps you’re a cattle rancher. You use RFID (radio frequency identification tags) on each cow. Foreign countries might embargo your beef if any cases of Mad Cow disease strike anywhere else in your country. But with individual identification of the cattle, you can prove their provenance, and if your tracking systems are linked to the Internet, your sales to foreign markets will continue unimpeded.

Mesh network antecedents

There are antecedents for the mesh network and the Internet of things. In the 1970’s the American military was bedeviled by North Vietnam soldiers using the Ho-Chi-Minh trail to bring supplies south to support the war effort.

Figure-3_Seismometer_patent_US3984804-2

Figure 3. A patent filed in 1971 and granted in 1976 put vibration sensors into radio darts that could be dropped from aircraft.

So the Navy invented small darts that had seismometers inside (Figure 3, Reference 1). These darts could detect footsteps and vehicle traffic and communicated over a radio network. They formed a literal mesh, and although they did not connect to the yet-to-be-invented Internet, they did report to an overarching communications network.

The Mesh in space

The military benefits of a sensor mesh hooked to a network were apparent to people in the science and space communities. NASA Airborne Science operates a fleet of aircraft that can communicate with orbiting satellites (Reference 2). In 2004 NASA started missions that would allow the satellites, the aircraft, and ground stations to interact and communicate over a network. This lets NASA better track and understand hurricanes, polar ice conditions and other changing geophysical events. The real-time knowledge of events is an obvious improving, but a system like this also gives real-time knowledge of itself. Researchers might schedule a mission and only after the planes had landed did they see that the data form a sensor was corrupt of missing. Equally frustrating, they might not have seen that there was an event of interest they could have included in the mission if they only could follow it as the data was taken.

Figure-4_NASA_Dryden_Global_Hawk

Figure 4. NASA uses the Global Hawk drone in a network of satellites and ground stations (courtesy Wikipedia).

The use of unmanned aerial vehicles (UAV) has made this NASA “network of things” even more useful. Now the operation of the Global Hawk UAV can be moderated and maintained by the network (Figure 4). While not the canonical “Internet of Things”, the NASA network, dubbed NASDAT (NASA Airborne Science Data Acquisition and Transmission) is an Ethernet network just like the Internet.

NASA connecting disparate things together such as airplanes, satellites, instruments, and ground control, presages what the Internet of things will do. With the NASA system, now the airplanes “know” what instruments they are carrying. The instruments in the plane can be fed location, speed, altitude and other flight parameters. The satellites “know” what airplanes and instruments they are connected to and the airplanes “know” what satellites are tasked to its flight. Missions can be far more dynamic and opportunistic. If ground controllers detect some condition or location, the instruments and airplanes can interact and modify the mission to get some important data collected. Flights can be changed in mid-mission by ground control, and all the varied implications will be “understood” by the interconnected instruments, airplanes, satellites, and people.

The Internet lets a mesh network see the future

The power of communications between networks is just one aspect that the IoT can do. Sprinklers are another application close to the hearts of farmers. Having sprinklers on a mesh network brings benefits. For instance, the network nodes that mount on the sprinkler could control and monitor water flow. They could report back to the farm server computer on usage and maintenance problems that reduce water flow. The mesh could even measure rainfall and adjust water delivery accordingly. The system becomes even more potent when you connect it to the internet. Now the farmer’s water system can connect to weather services that predict the rainfall. That way the sprinklers won’t waste water irrigating immediately before a big rainfall.

Industry Leads the Way

Industrial sprinkler systems for farms have led the way (Figure 5).

Figure-5_PivotIrrigationOnCotton

Figure 5. Crop irrigation systems have hundreds of microcontrollers in them. Now they will be linked to the Internet (courtesy Wikipedia).

Carl Giroux works for electronics distributor Avnet as a technical account manager selling into the sprinkler manufacturers. He estimates that a typical farm sprinkler setup boasts over 300 MCUs (microcontroller units), or about one MCU per sprinkler nozzle.

While industrial sprinklers for farms are already connected, they are a glimpse into what will become available for consumers. Ugmo makes a sprinkler system that is suited to golf courses and expensive homes (Figure 6).

Figure-6_Ugmo_UG1000

Figure 6. The UgMO sprinker system measures ground moisture and adapts the water usage.

It has a network of moisture sensors that communicate over RF links to monitor and adjust water usage (Reference 3). This wireless sensor network can reduce you water usage 50%. With the constant cost reductions in electric products, you can bet this system will find use in more and more homes. You can also see how the next step is to connect this system to the Internet so home owners can get the same benefits as farmers and commercial installations.

The IoT helps consumers

Consumers will benefit the most from IoT.

Figure-7_Omron_HJ112

Figure 7. This older pedometer uses sophisticated electronics to evaluate your motion and connects to your PC with a USB port. Future devices will wirelessly connect to the Internet (courtesy Wikipedia).

Dave Mathis is a software consultant in Silicon Valley. He advises his overweight friends to buy a pedometer, to keep track of how much walking they do (Figure 7). “Don’t get a 5-dollar pedometer— the sensor is a little ball and spring, like the tilt mechanism in a pin-ball machine,” he warns. “Get the 50-dollar pedometer.” Mathis notes the expensive pedometers use accelerometers, like a video game controller. These are much more accurate in counting your steps and level of activity. It’s only fitting that you would spend more money for something that helps keep you healthy. Of all the machines and gizmos you own, your body is the most important. Your automobile has millions of lines of software and dedicated hardware to monitor its condition. Your body deserve as much.

It’s nice if your pedometer can connect with your treadmill. That way the treadmill can adapt its routine to how much walking or running you have already done. Its better when your pedometer can communicate to your phone. Now the phone can tabulate and record your progress, and remind you when you lag. But it is a whole new opportunity when your pedometer can go on the Internet. Now your progress can go on your Facebook page. When you lag, your friends might send a tweet or email or even call you on a telephone to remind you to not give up. The exercise information from your pedometer might go to your doctor or pharmacy. That way they can adjust the dosages of medication based on your level of activity.

It’s pretty obvious that the industrial farm is leading the way for consumer technology. We can dream when auto makers talk about autonomous cars that drive themselves. But this is already reality on a farm. Dible notes that the tractors and combines use GPS to control steering. “This relieves the operator from having to concentrate on driving. It allows closer monitoring of the equipment which helps lessen mistakes.” Between seed technology, special fungicides, herbicides, pesticides, new methods, and improved control, farming is changing as fast as any other high-tech endeavor.  But it is also like working on an engineering program – lots of long hours, and attention to details. “The only thing about being an engineer is that you spend your time solving other people’s problems.  Now I have to solve my own problems,” quips Dible.

The IoT means safer roads

Already legislative bodies are having automakers look at having connected automobiles to provide for safer roads (Reference 4). The NTSB (National Traffic Safety Board) knows that having vehicles communicate with each other will help reduce fatalities. This technology might first be applied to trucks and busses. But the benefits are obvious for all vehicles. Even motorcyclists will benefit from connected vehicles (Reference 5). Every year, thousands of motorcyclist die or get injured because the other driver did not see them. With connected vehicles the motorcycle can have the car warn the driver of an impending collision. Autos might even simulate the noise of a motorcycle in the surround-sound audio system in the car, to help call attention to the motorcycle.

Having the vehicles talk to each other is just the first step, similar to an occasional dynamic mesh network. When the vehicles can go on the Internet, it brings all the same beneficial network effects. You can collect, organize and share data worldwide. This might be anonymous data, to alert highway engineers of a dangerous intersection. Or maybe you will use the data to automatically lower your car insurance rates, since you have so few near-accidents on the road. There will be no need to worry about telling your teenager to drive safety. The car will do that for you, and even take the keys away if he is being reckless.

The IoT in your home

All this industrial and automotive technology is poised to leap into the consumer electronics world. We are on the cusp of an interconnected revolution. Gary Shapiro is President and CEO of the Consumer Electronics Association (CEA). He recently wrote an article about smart homes (Reference 6). He notes that the Consumer Electronics Association (CEA) and HGTV (Home and Garden Television) have partnered to build the first-ever high-tech smart home (Figure 8).

Figure-8_HGTV_Smart_home_kitchen

Figure 8. The HGTV Smart Home 2013 is intimately linked to the Internet and its own devices (courtesy HGTV).

“The HGTV Smart Home 2013 connects many of the home’s appliances and devices,” notes Shapiro. The outdoors has pool automation that controls lighting, temperature, and fountains from a tablet. You can operate the exterior awnings remotely on demand, but they also include sensors that automatically close the awning to protect against rain and wind. The garage door sends an alert to a smart phone when a door is left open, and families can control the home’s door locks remotely. The occupants can remotely program pre-set temperatures for the shower. The window shades are also connected, and you can raise or lower them remotely.

The Internet of Things will not only let each of these devices communicate to you, it will let them communicate with each other. That way, opening the window shades might cause the microcontroller running the shade to communicate to the air conditioner, to make sure the house stays comfortable with sunlight streaming into the rooms.

Shapriro notes “Who knows, we might surpass the The Jetsons, and the consumer electronics industry might revolutionize the concept of smart living altogether.”  If Dible’s farm can monitor and care for each stalk of corn, it’s not hard to see that our homes and cars will monitor and care for each of their occupants. The Internet of things is ready to let us make another great stride in human progress.

References

1 Theodore C. Herring, A. Reed 3rd Edgar “Acoustic and seismic troop movement detector.”  Patent US3984804 A. 29 Nov 1971.

2 Forgione, Joshua B, Sorneson, Carl, Bahl, Amit, “Network Interface Links Sensor-Web Instruments,” NASA Tech Briefs, pg 14, July 2013. http://ntbpdf.techbriefs.net/2013/NTB0713.pdf

3 http://www.appliancedesign.com/articles/93619-eid-gold-ugmo-ug1000

4 http://usnews.nbcnews.com/_news/2013/07/23/19643634-ntsb-calls-for-wireless-technology-to-let-all-vehicles-talk-to-each-other

5 http://www.americanmotorcyclist.com/blog/13-06-27/DC_Insider_Vehicle-to-vehicle_communication_technology_is_coming_%E2%80%93_What_does_it_mean_for_motorcyclists.aspx

6 http://www.appliancedesign.com/articles/93643-association-report-cea-smart-living

The home lab of Bo Lojek

I was touring Atmel’s fab in Colorado Springs, so I made a point of contacting Bo Lojek, the author of the great book, the History of Semiconductor Engineering. Although Bo is now a professor at University of Colorado, he worked at Atmel for 15 years. I was honored that he asked me to his home in Colorado Springs. Well, I have a pretty good home lab, but Bo’s lab just blew me away. Bo said he wanted to be an engineer from the time he was 7 years old. It runs in the family, his dad was an engineer too.

So Bo told me that he built his house in Colorado Springs. If one of my Silicon Valley buddies says this he means that he had a custom floor plan home built by a homebuilder. For Bo, it means he had an engineer design the house to his specs, using metal studs, and Bo himself constructed the house, driving all 37,000 self-tapping drywall screws. I think he said it was 3600 square feet. Yes, it’s an engineer’s paradise.

KONICA MINOLTA DIGITAL CAMERA This is what meets you at the foyer just inside the front door of Bo’s house. Bo said if I came back at daytime I could check out his collection of Dumont scopes in the garage.

KONICA MINOLTA DIGITAL CAMERA Every engineer worth his salt needs a Data General Eclipse computer in the hallway, just for data processing emergencies. Bo has arranged for all his stuff to go to the University of Colorado when he dies. It will be great to keep this museum together. It will also be a great excuse to visit Colorado Springs, other than to meet the space aliens that the Stargate people have inside the NORAD mountain.

KONICA MINOLTA DIGITAL CAMERA Bo has some early computer boards nicely framed on the wall.

KONICA MINOLTA DIGITAL CAMERA Lojek has a huge collection of voltmeters, including this Cubic model V-46A. It uses telephone stepper relays and a handful of transistors to measure voltage. Pretty cool for 1960.

KONICA MINOLTA DIGITAL CAMERA On Bo Lojek’s bookshelf are propped up some vacuum tube modules from a very early computer.

KONICA MINOLTA DIGITAL CAMERA And let’s enjoy Bo checking out the whole bookshelf. His house is not only engineer paradise, its college professor paradise.

KONICA MINOLTA DIGITAL CAMERA While Bo does not have the disorganization of dear departed Bob Pease, he does have a few things littering the floor. I used to use the same Data IO programmers to program the microcontrollers I designed into my consulting work.

KONICA MINOLTA DIGITAL CAMERA It does not disturb me that Lojek has a stack of early Tektronix mainframe scopes. What bothers me is I have several friends that have the same sort of stack.

KONICA MINOLTA DIGITAL CAMERA How about these early 2N1302 transistors from honored competitor Texas Instruments?

KONICA MINOLTA DIGITAL CAMERA Lojek has drawer after drawer full of electronic components, including these vacuum tube computer boards.

KONICA MINOLTA DIGITAL CAMERA Bo told me that when Bob Pease visited his house, he could not tear him away from these two analog computers. I should mention that I knew of Bo because Pease told me what a cool guy he was. Bob knew Bo because Bob edited Bo’s book. Since English is Bo’s second language that was a lot of work, but Pease was happy to do it since it was such an important contribution from such a cool guy.

KONICA MINOLTA DIGITAL CAMERA Here is a close-up of the analog computer that so entranced Bob Pease.

KONICA MINOLTA DIGITAL CAMERA All this cool stuff above is just stacked like cordwood all over the house. This is where we finally got to Bo Lojek’s lab bench.  Bo told me he likes to write or read for a while, but then he has to go to the bench to do some experimentation. It reminds me so much of my mentor Bob Pease, who had an equal love for working with his hands a soldering iron.

KONICA MINOLTA DIGITAL CAMERA Every surface in Bo Lojek’s house is a treasure trove of memorabilia and electronic equipment.

KONICA MINOLTA DIGITAL CAMERA Here is a very early computer board that used “air gap” integrated circuits. Analog Devices’ Barrie Gilbert told me that he got into electronics because surplus WWII magnetrons were so beautiful to look at he had to learn how they worked.

KONICA MINOLTA DIGITAL CAMERA And how about this, a Bob Widlar business card? I love the title “ROAD AGENT”. Widlar had style.

KONICA MINOLTA DIGITAL CAMERA And when your engineer friend tells you he has a walk-in closet— this is what he means.

KONICA MINOLTA DIGITAL CAMERA Lojek has an artistic streak. Amongst the pretty glass are a handful over very early galvanometers, some from the 1800s.

KONICA MINOLTA DIGITAL CAMERA More cool galvos and such. I wonder if the founder of Digi-Key has that same telegraph key? Ronald Stordahl started out Digi-Key by selling electronic telegraph key kits to Ham radio operators.

KONICA MINOLTA DIGITAL CAMERA Here Bo Lojek admires a framed set of Minuteman missile circuit boards. Jim Williams had an interconnected set on his living room. Check the Minuteman missile PCBs and Jim Williams out in this video.

KONICA MINOLTA DIGITAL CAMERA OK, so I lied. That picture earlier, the one I called Bo Lojek’s lab bench. That was just the emergency downstairs lab bench useful of quick jobs. Here is the real lab bench. Next time I get to his house, I will fire up that big soldering iron and put it down right before the picture, so there will be a wisp of smoke coming off of it, like a Cowboy’s 6-shooter.

KONICA MINOLTA DIGITAL CAMERA That main bench above has a side bench on another wall.

KONICA MINOLTA DIGITAL CAMERA And books, boy do college professors love books.

It was a real treat to see Bo. He said he is going to try and make it to the next Analog Aficionados party, so I will remind him so he can be among like-minded souls out here in Silicon Valley. The party will be Feb 8 2014, the Saturday before the IEEE ISSCC conference.

DC distribution in your house and 42-volt cars

I spotted an article in Electronic Products about ac-to-dc converters that fit inside a wall plug. At least that was the intent of the article. Unfortunately it started with a comment about how so much of the stuff in houses run off dc, yet according the author, we waste energy by distributing ac and then having every gizmo make dc inside of it. He noted, “A far more efficient solution would be a central dc-grid supply that would power all of your home electronics appliances, as one large PSU wastes less energy than many separate ac/dc converters.” It’s the old Edison versus Tesla/Steinmetz argument over a century later. Edison wanted to distribute dc, since he thought it safer. In fact the problem with ac is losses. Steinmetz and Tesla wanted to distribute ac, since it is easier to convert up and down. You can step it up to kilovolts to transport across long distances and then step it down to run you toaster or iPod. Now lets examine the argument is that it would be simpler to make one big batch of dc, and wire it to all the gizmos in your house.

RECOM_power-supply

First, lets pay the rent and give credit where credit is due. These RECOM power supplies are really neat. Rather than making you read 1000 words, here is the deal. 3 Watts, universal input, isolated, fits in a wall plug, CE, UL. So that is a few syllables more than a Haiku, but still most of what you need to know. Oh I forgot the most important spec, 20 bucks in single quantity at Digi-Key.

OK, back to dc versus ac power distribution. So Edison thought ac was more dangerous for electrocution, but that is not true. In fact the danger with electricity is in starting fires. That is why dc distribution is so tricky. When you get an arc in ac, it is self-quenching. 100 or 120 times a second, 50 and 60Hz power goes to zero. That really helps extinguish the arc.

Electric_arc

Lesson 1: I designed a 48-Volt 200W power supply. I was testing it’s short-circuit capability. I took the output and ran it across a metal file, like my mentor showed me. He maintains that dragging the wires across a bastard-cut file is even more effective at finding control loop problems than just touching the wires together. Then the wires did touch together, and when they parted, I got a nice ¼-inch arc that just stayed there, melting the copper wire strands. See, 48 volts is a nice arc-welding voltage. Once you start an arc it just burns and burns.

Lesson 2: When I worked at GMC Truck and Coach, we made trucks and buses with 24V dc power. All the relays and switches would fail much quicker. We could not use the dirt-cheap relays and switches used on 12V cars, they would fail within a year. As a note, the 24V headlamps and tail lamps failed more often too, since the filaments were twice as long and hence much more delicate and prone to breakage. They also sagged and were hard to aim or focus.

Lesson 3: 42 volt cars. There has been this MIT professor that has been pushing 42 volt system in cars for over two decades. At first it was supposed to save cost because you make the wires thinner. But we used 18ga wire in cars even for milliamp signals since 18ga wires did not break when dragged through a hole in the body during assembly. So then the rational was because 42-Volt systems could run electrically-operated intake and exhaust valves in the engine. Well we still don’t have electrical valves, although I think they use them in Formula 1 racing. And it turns out you can operate them with 12V if you have to. The real reason 42V cars are not here gets back to that arcing in relays and switches. With 42-V cars, every single load has to be switched with transistors, you just can’t use relays or contacts. That might still pay out, many loads these days are handled with FETs anyway. But the deal is, you can use 30V FETs with a 12V car, but you need 200V FETs to handle 36V cars. (The charging voltage is 42, the system just uses three 12-V batteries, so the uncharged voltage is 36.) But the die size of FETs goes up as the square of the voltage. So tripling the voltage makes the FET die nine times bigger. So you don’t get any real cost savings with 42 Volt cars, if you still need 18ga wires and can’t use relays or switches. And worse yet, all the loads you control with FETs have to be 9 times the cost. Sorry, engineering is science crossed with economics, and college professors never appreciate that cost is king to an engineer.

So now think about distributing dc in your house. If you use 12 Volts you need copper 10 times thicker and more expensive than the wires that carry 120V. If you up the voltage, even a little, you can’t use any mechanical switches or relays anywhere. On top of that, you still have this incredibly lethal wiring that can kill you in a flash, or will arc like crazy if it gets shorted. Heck even with ac distribution, the NSA data center keeps exploding since they can’t quench the arcs.

Put on the headphones for this little video:

It has taken a while to kill Edison’s dc distribution. The last bit of it was only decommissioned in 2007. The 120-Volt ac power in your house is darn-near perfect. Our good-ol-American power is much safer than 240V European power. I have read that 60Hz has less chance to screw up your heart when you get shocked than 50Hz. And old time CRT (cathode ray tube) televisions were much brighter since the American TV refreshed 60 times a second instead of 50. And the frame rates of our video are 60, which is smoother. No, give me 120V 60Hz. It is not perfect for any one thing, but it is darn near perfect compromise for everything it has to do. If you want to improve power in the home lets go to 400Hz like the airplane people.

Now don’t think that dc is all bad. It makes sense to distribute dc if you have to send power to an island or through a single cable. With the wires so close together, the ac losses go way up, and it makes sense to distribute dc. I hear that semiconductors are almost cheap enough that it might make sense to transmit dc over long distances over land, but you will have to run it into an inverter so that you end up with ac that you can distribute to homes.

And I saw a Fairchild presentation where they claim their SuperFET has broken the square law relationship between die size and breakdown voltage. So with that and a way to reliably run thin-gauge wires in automobiles, maybe it does make sense to go to 42V cars. But remember, you now need to have 42V bulbs and such. Maybe with LEDs the bulbs last forever, and who cares what voltage they are. The economics could all change in a few years. But it is economics, not “neat” that determines what will happen.

So please don’t take any of this as a fixed absolute statement. After all, the trucks and buses I worked on were 24V because we needed that much to run a starter motor that could turn over a Diesel engine. But that higher voltage was a pain in every other part of the truck, including when the circuit breakers would arc, catch fire, and burn down the truck, killing some poor guy in the sleeper cab. The world is full of specialists that only think about one small aspect of a problem. To be a good systems engineer you have to look at the whole picture, all while keeping cost, service, and reliability in mind.

Batteries with potential 40-year life

I just saw an ad for a Tadiran battery that claims a 40-year life. This is for a primary battery, not a rechargeable. That is based on the 1% per year self-discharge rate. So the math is pretty basic— 40 years at 1% per year and that is more than 50% charge remaining to do your bidding. Now the ad, being marketing and all, does not say if its 1% of rated capacity per year, or 1% of remaining capacity per year. You should have plenty of charge left if you figure your power budget with a factor of two over rating to allow for that self-discharge.

Tadiran-lithium-thionyl-chloride-battery

Tadiran’s previous lifetime champ was also (Li/SOCl2 ) cells. They would claim 15-year lifespans for those. SAFT makes lithium thionyl chloride cells too. I assume Tadiran have made further improvements to get to such a low self-discharge rate for this line, which they call lithium inorganic. But I note the Tadiran ad has the words “…in certain applications.”  You see, they can’t tell where or how you use the batteries. If you leave flux all over the board so that there are leakage paths, you won’t get the 40 year life. If you run them at hot or cold temperatures, you won’t get the 40 year life. If you take out the current in high pulses instead of a gentle steady current, you won’t get the 40-year life. It is not Tadiran’s fault. They have to give you the optimum spec— that is for a battery with no leakage paths other than its own case. And measured in a comfortable temperature in a dry environment.

When I was at EDN I wrote about the 15-year batteries. An alert reader notified me of a scandal in Houston Texas since the gas meters needed new batteries much sooner than expected. Once again, it was not the battery maker’s fault. Houston Texas is extremely humid, almost tropical. The batteries in the meters were exposed to this humidly and high temperature and their life was much shorter.

I designed the power system for an automotive diagnostic tool when I consulted at HP. I thought I had all the battery quiescent currents figured out in a neat little spreadsheet. Then I prototyped the design. The leakage current was much higher than my spreadsheet showed. Turns out that battery voltage was flowing through the body diode of a back-to-back FET and then into a gate pull-down resistor. I used a 1meg resistor, but 12 volts into 1 MΩ resistor is still 12μA. That is way more than the 200nA memory retention current of an AVR XMEGA in shutdown, so don’t let some power supply leakage path screw up your battery life calculations like I did.

In 2007 I did a follow-on post about smart meter batteries. The broken first link in it is the EDN article I linked above. So just remember, it is your job, not Tadiran’s, to insure that the battery life is what you expect in a smart meter. Tadiran can give you the battery, and Atmel can give you the MCU and smart meter ICs, but you have to verify the leakage and current consumption in your exact application, running your exact code, with your exact manufacturing methods. My buddy Eric Schlaepfer, now at Google, was over at Maxim when some customer contacted him and called Maxim liars since the customer was getting much greater power consumption on one of Maxim’s micro-amp supervisor chips. It turns out the customer was letting the PCB get contaminated with sweaty conductive fingerprints in assembly. The leakage current through those fingerprints on the PCB was passing way more current than the integrated circuit.

So brush up on the Keithley low-level measurement handbook (pdf), so you can measure those nanoamperes. And be sure to test your system in temperature and humidity chambers that simulate the real world. And then take measurements in the field to validate all your assumptions. Then and only then will you get 40-year battery life in your products.

Automotive circuit design headaches

I wrote an article for Electronic Design magazine about Bob Pease and his solenoid driver circuit. Former National Semiconductor employee Myles H. Kitchen was nice enough to drop me an encouraging note.

“Thanks for your great article on Bob Pease and the solenoid drivers. Having worked with Bob in the late 1970s and early 1980s at National Semiconductor, I came to appreciate his wisdom and simplicity for addressing issues that seemed simple, but were really quite involved. As someone who’s worked on automotive electronics my entire career, an issue such as a solenoid driver is critical. I recall when testing early automotive product designs at one company, we would put the module under test in a car, and then turn on the 4-way flashers to see if operation was affected, or if it stopped working completely. The combination of multiple inductive and high-current resistive loads operating on and off at several hertz would play havoc with the power supply, and immediately point out design deficiencies in module power supplies, regulation, protection, and noise immunity…. some of which could be traced to poor relay or solenoid driver circuits.  Surviving the 4-way flasher test was only a quick way to see how robust the new design might be, but it was a quick indicator if we had things right up to that point. I miss Bob and his ramblings in ED, but hope to see more of your work in the future.  Loved it.”

Well, having been an automotive engineer at both GM and Ford before moving out to Silicon Valley, Myles’s note sparked a flood of memories. His four-way flasher story was prophetic. When I was in college at GMI (General Motors Institute) one of my pals worked at Delco. They were just coming out with the integrated electronic voltage regulator in the back of the alternator, circa 1973. So all the executives were standing around at a demo and after they ohhhh and ahhhh, and congratulate themselves, my buddy gets in the car, and knowing what Myles knows, he cycles the air conditioning switch a few times. The “Charge” light promptly came on.

Auto-warning-lights

I asked my fellow student if he was in trouble or if they hated him for causing the failure, and to GM’s credit, he told me “No, they were actually glad I found it before it went into production.” It must have been some serious egg on some faces, though. After that, survival after repeated AC clutch cycling became part of the spec for the voltage regulator. I bet four-way flashers are included as well.

I later worked on anti-lock brakes for GMC heavy duty trucks. This was way before anti-lock brakes on cars, about 1975. We dutifully shielded all the wires to the sensors with expensive braided cable. When we pulled the truck out on the road, the brakes started modulating, with the truck just sitting there. We realized that the entire 24V power system was a pretty nice antenna and that noise can get into a module from the power side as easy as from the sensors. We begged the government to give us more time, and they did. Indeed, I don’t know if they ever put in antilock brakes on heavy trucks. Let me check, yeah, wow, it’s still called MVSS 121 (motor vehicle safely standard) and it finally went into effect in 1997. That was at least a 20-year delay in getting it working.

I told Bob Reay over at Linear Tech that automotive design was the toughest, because you had a military temperature and vibration, but consumer cost. He added another factor, the chips for automotive have to yield well, since you need to ship millions. What a crazy challenge.

When I thanked Myles Kitchen for his kind words and told him the above stories, he responded with a great story about load dump. The phenomena called load dump is usually caused by a mechanic who is troubleshooting the battery and charging system of a car. You get the car running, rev it up a bit, and yank off the battery cable. If the car keeps running, that means the alternator and regulator are OK, it is just a bad battery. Thing is, the alternator is often putting full output into this bad battery. And when you yank the cable off the battery, the voltage regulator controlling the alternator cannot react instantly. So there is this huge overvoltage spike as all the stored energy in the alternators magnetic field has to dissipate into whatever loads are still connected, like your radio. A load dump can put over 100 volts on electrical system. And it is not a fast spike; it can last for hundreds of milliseconds. Smart mechanics just leave the battery cable on and hook up a voltmeter to see if the alternator is putting 13.75 to 14.2 volts on the battery. So Myles recounts:

“Thanks for your email.  Yes, sounds like we’ve run up against many of the common automotive issues in our time.  I’ll add one brief anecdote here.  When I worked at Motorola’s automotive division, I certainly learned all about what a load dump is, but I’d never really heard of anyone experiencing one first-hand and what it could do.  One day, our admin complained that her 70’s vintage Plymouth Duster wasn’t running right, and that her headlamps and radio quit working.  She had been driving it the night before when something went wrong.  We brought it into the garage at Motorola, and found that she had a very discharged battery with very loose battery connections. You could just lift them off with your hand.  As a result, her battery was discharged, and when she hit a Chicago pothole it all went bad.  The resulting load dump had blown out every light bulb filament in the car, along with the radio.  Only the alternator/regulator had survived.  The ignition was still a points and condenser system, or that would have probably died as well.  A new battery, tight connections, and a bunch of replacement bulbs got her back on the road again.  And, I’ve never doubted the need for a load-dump-tolerant design since!”

Those are wise words from someone who has been there and seen it first-hand. And I wonder if the voltage regular in that old Duster was a mechanical points type. In the early days we automotive engineers would try to protect each individual component for load dump. The radio would have a Zener diode clamp, so would the cruise control module. Then manufactures put a big Zener clamp right in the voltage regulator that clamps the voltage on the whole car. Maybe that was too low an impedance to clamp, because now I see there are a lot of smaller distributed TVS (transient voltage suppressor) clamps that you use to protect the circuitry of your module.

There are two other approaches. One, you can just disconnect your circuit with a high-voltage FET when the load dump happens:

Overvoltage-cut-out-circuit

I used this circuit to keep automotive overvoltage from destroying an LT1513 chip I used as a battery charger. When the DC Bus voltage exceeds the 24V Zener plus the base-emitter drop of Q10, it turns Q10 on and that turns Q12 off and protects downstream circuitry from overvoltage.

Alternative two, you can put a high-voltage regulator in front of your circuit that will maintain power to your circuit through the load dump, at the risk that the pass transistor will overheat since it is dropping a lot of voltage while passing current during the load dump. Linear Tech makes such a part.

There is one more tip for every engineer regarding automotive electronics. Remember that there are laws that make auto manufacturers offer service parts for 10 or 15 years. So no matter what your application, you might consider using an automotive part like Atmel’s line of MCUs, memory, CAN/LIN bus, and RF remote controls. We state that we will be making many of these parts for over a decade. If you design them into your industrial, medical or scientific application (ISM) you can have some assurance you can still get the part for years, or at least a pin-for-pin compatible part. That means no board spins. On top of that assurance, most of the parts have extended temperature range, which might help in your application as well. Since we make the parts for high-volume automotive customers, they are usually priced very reasonably.

Boot Linux in a second

When I worked at EDN Magazine I wrote up a story about MontiVista Software. They had gotten a real-time Linux to boot in under a second. This was for an automotive dashboard, the Linux was displaying a gauge so it had to start working as soon as you turned the key. Since I just fired up two Atmel MPU (microprocessor unit) demo boards that could support Linux, I thought it would be cool to bring the article to the attention to our MPU group.

It turns out that Atmel 3rd party partner Timesys was way ahead of me. Frederic in our MCU group pointed me to a video where you can see our Atmel SAM5D33 eval board in booting in a couple seconds (mp4). Note that this eval board is not just a passive display like an instrument cluster. It also has a full user interface that takes touch, mouse, and keyboard inputs. Frederic noted: “An application without a UI will certainly boot in less than a second.”

Linux-fast-boot_Atmel-SAMA5D33

Timesys can get a real-time Linux to boot in less than 3 seconds. It would be even faster if you don’t need a user interface like touch, keyboard, or mouse.

Speaking of big-iron MPUs with external memory, be sure to check out ARM Techcon this week in Silicon Valley. Atmel will be there, and I see MontiVista is an exhibiter as well. I will be at the Atmel booth on and off, as well as checking out some of the conference.

Precision resistors and tolerance stackup in general

This must be the season for great graphics. After seeing the solar cell output over temperature graph a couple days ago, today I see this great article about the reality of using precision resistors. It is from the great folks at Vishay, by way of my former co-workers at ECN Magazine.

Resistor-tolerence

Vishay shows what can happen to their beautiful resistors once you and your customers get your grubby hands on them. TCR means temperature coefficient of resistance.

The same chart got used in an article in EDN, where I worked. The graph also saw use in an Electronic Design article about foil and thin-film resistors. The mother lode was from a Vishay app note by Yuval Hernik.

If you are using a resistor to measure current you should not trivialize the accuracy problems that come with the real world. You can see in the chart that the ±0.05% resistor you buy from Vishay can end up being a ±1% resistor after a few years in the field. It’s not Vishay’s fault. They did not stress the resistor soldering into the board. They didn’t expose it to humidity and temperature gradients that damage the device. They didn’t drop it and shock it and over-voltage it.

The point of this is that you can’t build a product that specs ±0.05% accuracy if you start with ±0.05% resistors. You customers don’t care what you buy from Vishay and they don’t care what you built. They care about they use, perhaps years later, at some horrible temperate in some inhospitable humidity over some astronomical altitude. When I was at Analog Devices they had a test for voltage references that was running for years. Years! This was to evaluate the long-term drift that the parts would exhibit. I am happy to say that the ADI parts seemed better than most.

And here is the thing— when it comes to these drift problems, no one can tell you what is going on. We simply don’t understand the physics of it. I contend we really don’t understand noise either, but that is an argument for another day. But drift, which you can think of as “dc noise” if you want mess with your head, is a universal problem. We older folks that used to wait for tube radios to “warm up” seem more comfortable with the concept. But op-amps and maybe even discrete components have to settle in as well. This is not the few microseconds it takes for the internal circuits to start working. It is the minutes or days it takes for the amplifier to come to its final dc offset error.

I have several pals that are trying to make their own test equipment to save money or just build things like a Maker movement. That is fine if you don’t really have to trust it. Believe me, Fluke and Agilent and Tektronix earns every penny they ask you for. This is why I am wary of cheap knock-off test equipment. I would rather buy used name-brand equipment that I can trust to keep accurate over their lifetime.

As to these resistor tolerance issues, one answer is that you calibrate the product every time it’s turned on, or even more often. When I did automotive test equipment at HP (before Agilent split off) my solution was to use the best voltage reference that money can buy. Back then it was Thaler. Since then (1998) I found out that the Thaler part I used was a National Semiconductor part that was hand-selected by Thaler. No matter where you get it, you have to have a low-drift and low TC (temperature coefficient) part. I also used very good initial accuracy parts, since I did not want to have to calibrate the board the first time in the factory.

This way, I had the acquisition system measure its own reference. That way I could calibrate any errors or drift in the attenuator resistors. The other aspect was using a very good crystal. This way you know voltage and time. Most everything else you can derive in firmware. I called it “a rock and a ref,” since rock was slang for the quartz crystals. I still remember Bob Shaw asking me what pots had to be adjusted on the board for manufacturing. I told him there were no trim pots or trim capacitors. He was astonished. I told him about a rock and a ref. I joked that if he really wanted pots I could add them back in. He told me no, and thanked me for designing something that did not need factory calibration, since it just calibrated itself. The other horrible thing about pots is that they are terribly unreliable components. Only electrolytic and tantalum capacitors are worse. If you have vibration, pots are a really bad idea.

OK, product pitch time, these accuracy problems are why you should think about using Atmel AFE (analog front ends). We make them for the smart power meters. And I don’t mean to imply that Atmel is the only outfit. All the semiconductor makers make AFEs for various tasks. If it can offload your accuracy problems with calibration or the precise accuracy that comes with semiconductor processes, it is always a good deal to pay for an integrated solution rather than build it yourself. For years I told National Semi that people would pay for precise ratiometric resistors. It took Linear Technology to actually make the parts.