Tag Archives: hardware

Conference Badges are the Newest Form of Hardware Art

via Hackaday » hardware

About four decades ago, many European truck drivers started placing electronic LED badges in their windshields. Most of them were simple; nothing more than an animated heart pierced by an arrow. It became a common distraction in the highway night panorama of that time, at least until it became illegal. Most motorists became accustomed to seeing them, and the idea of the truck drivers making a statement with electronics always stuck with me. Now I have the chance to help people make a similar statement. Conference badges are not just a way to identify those who have registered, but a fashion statement and a mark of pride for conference organizers. They’ve become an art form, and engineers always want to stretch the limits of what is possible.

Every September, we have BalCCon, an international hacker’s conference at Novi Sad, Serbia. I was asked to design a badge for the 2016 event, and this is the first (well, the second) release. It is based on the PIC18LF24K50 and consists of a circle of LEDs which randomly displays pre-defined patterns. Every badge has its own infrared transceiver (LED-receiver pair), so the fun begins when two or more badges spot each other: they go from Adagio to full on Rondo, losing their default, dull visual pattern for a more dynamic, attention grabbing one, but most importantly – they synchronize. This means that, in a group of people, all badges will play the same pattern in unison. Every badge can spread the pattern code, so the whole group, however large, soon becomes synchronized. But if one of them “gets lost” somehow, it will try to learn it back from a neighbor or it might even launch into its own, randomly generated one. Sometimes it manages to spread it further and you get to witness a battle for light show domination.

This isn’t merely a story of designing badges, but of design choices that come in on budget while achieving a look that will delight those who end up wearing the hardware.

Up to the point at which this video was filmed, only eight prototypes were built and previewed at BalCCon 2K15, which was held on September 11th-13th. The reception was very positive! The algorithm is quite simple: every badge plays its own pattern, while keeping its infrared eye open for someone else’s code. If it receives it and verifies the checksum, it stops the current pattern, transmits the special acknowledge code via infrared LED and starts playing the received pattern. If nothing was received, it randomly generates a new pattern code, transmits it, looks if someone acknowledged it and then runs the pattern. If there was an acknowledge, it switches to the “fast” mode. That’s it.

More Features

The beauty of microcontroller designs is that you can always add new features later, without affecting the cost. In this case, the infrared transmitter support was implemented in hardware, so the badge got upgraded with [Mitch Altman’s] TV-B-Gone function. I took Mitch’s database for switch-off codes for several hundred different models of TV sets, and wrote a PIC driver routine to transmit them.

The first badge was released about two months ago – it’s the red one in the photo. I decided to give it another feature which would require only the addition of a USB connector to the Bill Of Material. So, the Badge now functions as a Hardware Password Manager, at almost the same cost. It also improves on the visual interest of the badge. It looks like something purposeful, and not merely a fob for hanging around your neck.

There’s plenty of time to brainstorm some more features before next September is upon us. One of the things I will certainly be adding is contact information swapping — a steadfast of conference hardware badges like the Parallax’ badge. Of course this feature will not affect the cost, as both infrared transceiver and USB interface are already present. My son has also suggested adding some form of a Rock-Paper-Scissors game. It will play automatically when two players are connected.

Every badge will have its unique serial number, which will be transmitted by request. It has yet to be defined how this feature will be used, and which kind of external units will be built, as we don’t want to disturb anyone’s privacy.

Low Budget as an Inspiration

badge_detailI’m always open, and grateful for any new idea thrown my way . The only restriction is the cost, as the project has already reached the budget limit. Only features that do not require any new hardware are acceptable. You can see that there are no displays, no large batteries and no radio or audio units.

Such a simple design has certain advantages which have contributed to comfort. There is enough space to spread the components on the PCB with some breathing room between them, making room for the 3 mm thick acrylic bezel to be glued in place, with laser cut holes for every single part on the PCB. You can comfortably hold the badge in your hands, keep it in your pocket, or even let it drop on the floor without the fear of it getting damaged. Also, all the components are on the upper layer, leaving the back of the badge flat and clean. All the electronic parts amount to an attractive look so there is no need to hide them. There are only a few pads for an in-circuit programming connector on the back side, if someone wants to play around with firmware (which is open, of course).

hal9000Originally, the hardware was not meant to be expandable, but I will probably use the bottom PCB layer, which is currently blank, to add traces and footprints for SMD peripherals. Then again, I wonder how many users really hack or expand the hardware of their badges?

I enjoy designing gadgets like these on a limited budget. With a lot of money, any designer can be tempted into overpowering the system and bloating the design with every feature imaginable. But who knows, maybe I will change my attitude some day when we get rich and I get to design a badge for BalCCon 3K45… or so.

How Can You Design a Badge with a Budget of 2€ Per Unit

Designing a badge for another conference, BIZIT 2015, was even more challenging. It is being organized by PC Press, our computer magazine publisher, on November the 3rd and 4th. It is not a hacker meeting but a business conference, but it is based on Information and Communications Technologies. The budget for the badge was as tight as 2€/unit (about $2.25 USD), based on 500 units.

I had to tap into a more common type of love for technology, since I couldn’t count on a passion for DIY or playing around with microcontrollers. I turned to science fiction, or more precisely – I ripped off Kubrick’s 2001: A Space Odyssey , which I assume most people will have seen. I made the badge resemble the iconic image of HAL 9000’s terminal. Very importantly, its elegant design was something which could be mimicked with just a few components.

To stay within the budget, I simplified the badge as much as possible. Luckily, almost all of the physical aspects of the design can be achieved through currently available PCBs. The front surface should be black, so I ordered a black 2-layer PCB. The shiny metal surface on HAL 9000’s terminal is simulated by HAL PCB (don’t be confused – it does not stand for HAL 9000, it is an abbreviation for Hot Air Levelling). The white letters (BIZIT 2015 instead of HAL 9000) are printed as the Top Overlay layer, and the lower grilled area consists of a lot of small PCB pads with no holes. The “HAL” text is originally on a light blue background, which is in this case a PCB base with copper layers and solder mask layers removed, so that it is semi-transparent. When you paint the back side with a blue marker, you get the exact blue tone that you need!

All of that is achieved with just the PCB. There are a few items left which have to be improvised, and some compromises have to be made. The price for one 5×15 cm 2-layer PCB, based on 500 pieces, is 1.5€, so I had only 0.5€ left to spend.


Kubrick originally used Nikkor Fisheye 8mm lens for HAL 9000’s eye. At the moment it costs several thousand dollars, which is significantly more than 0.5€, so I had to make a different choice. I used the laser cut acrylic bezel again, and glued it on the PCB. As simple as that! It is flat, so it doesn’t look as good as the original Nikkor lens, but it fits the budget. I also wanted to achieve the red fuzzy aura effect around the red dot, for which I sprayed some red paint through a 15 mm hole on a piece of cardboard held at about 10 mm distance from the PCB. It looks quite passable.

The one thing that I had to do right was to make HAL “alive”, which means to put the red LED in the center. I used an SMD LED in a 3528 case, placed halfway through the square hole on the PCB and soldered it on the bottom layer. It is powered by a CR2032 Lithium coin battery at the back, with an addition of SMD resistor for current limiting, bringing the expected battery life to several weeks, with no ON-OFF switch. It acts similarly to an LED throwie.

In the end, I broke the budget only by a few eurocents and everyone was happy. There was not enough money to make it talk, play chess or sing Daisy, but yet I’ll take good care not to leave it alone and unattended on my spaceship.

​​Voja_AntonicVoja Antonic works as a freelance microcontroller engineer in Belgrade. His first microprocessor projects, based on Z80, date back to 1977, just a few years after the appearance of the first Intel’s 4004. He assembled the firmware manually, by pen and paper. In 1983, he published his original DIY microcomputer project called Galaksija, which was built by around 8000 enthusiasts in the former Yugoslavia. To date he has published more than 50 projects, mostly based on microcontrollers, and released all of them in the public domain.

Filed under: cons, Featured, hardware

WiFi Power Monitor

via Hackaday » hardware

Building your own hardware to measure AC power isn’t a simple task. There’s a number of things to measure, including voltage, current, power, and power factor. The Atmel 90E24 is a single chip solution designed for this exact purpose. Connect a few components, and all the power data is available to a microcontroller over SPI.

[hwstar] built a custom power monitoring board based on this IC. His AC-Emeter will give you all the measurements you’d want, and includes an ESP12 module for data collection and WiFi connectivity. Aside from the Atmel 90E24 device, a high power and low resistance resistor is needed for shunt sense current measurement. An external module is used to convert mains voltage down to 5V to power the board.

Of course, working with mains voltages can be a dangerous endeavour. Fortunately, [hwstar] provides some tips on how to prevent “equipment from being BLOWN UP” along with the open source hardware and firmware.

[via Embedded Lab]

Filed under: hardware

Arduino WiFi Shield 101 is now available in the US store!

via Arduino Blog


We are excited to announce Arduino Wifi Shield 101 developed with Atmel is now available for purchase on the Arduino Store US (49.90$).

Arduino WiFi Shield 101 is a powerful IoT shield with crypto-authentication that connects your Arduino or Genuino board to the internet wirelessly. Connecting it to a WiFi network is simple, no further configuration in addition to the SSID and the password are required. The WiFI library allows you to write sketches which connect to the internet using the shield.

The shield is based on the Atmel SmartConnect-WINC1500 module, compliant with the IEEE 802.11 b/g/n standard. The WINC1500 module provided is a network controller capable of both TCP and UDP protocols.  The main feature is an hardware encryption/decryption security protocol provided by the ATECC508A CryptoAuthentication chip that is an ultra secure method to provide key agreement for encryption/decryption, specifically designed for the IoT market.

Last year, Massimo Banzi introduced the shield:

“In this increasingly connected world, the Arduino Wi-Fi Shield 101 will help drive more inventions in the IoT market. Expanding our portfolio of Arduino extensions, this new shield can flawlessly connect to any modern Arduino board giving our community more options for connectivity, along with added security elements to their creative projects.”

The WiFi Shield 101 is the first Arduino product fully supporting SSL and all the communication between your board and our secured server. With the power of the Arduino Zero and the WiFi Shield 101 it is possible to make secure IoT applications simply and just using the Arduino Language.

A working example and instructions on how to get started are available on Arduino Cloud, a work-in-progress project that gives you access to a pre-configured MQTT server for your IoT sketches using only your Arduino account. More examples and features will be available in the next months.

Feel like knowing more about the shield? Explore the  Getting Started guide.

Becoming A Zombie with the Hackable Electronic Badge

via Hackaday » hardware

Last week, Parallax released an open hackable electronic badge that will eventually be used at dozens of conferences. It’s a great idea that allows badge hacks developed during one conference to be used at a later conference.

[Mark] was at the Hackable Electronics Badge premier at the 2015 Open Hardware Summit last weekend, and he just finished up the first interactive hack for this badge. It’s the zombie apocalypse in badge form, pitting humans and zombies against each other at your next con.

The zombie survival game works with the IR transmitter and receiver on the badge normally used to exchange contact information. Upon receiving the badge, the user chooses to be either a zombie or survivor. Pressing the resistive buttons attacks, heals, or infects others over IR. The game is your standard zombie apocalypse affair: zombies infect survivors, survivors attack zombies and heal the infected, and the infected turn into zombies.

Yes, a zombie apocalypse is a simple game for a wearable with IR communications, but for the Hackable Electronics Badge, it’s a great development. There will eventually be tens of thousands of these badges floating around at cons, and having this game available on day-one of a conference will make for a lot of fun.

Filed under: cons, hardware, wearable hacks

Learn and Build a High Side Switch

via Hackaday » hardware

As electronics engineer I have a mental collection of circuits that I’ve gathered over the years, much like a mechanic collects specialized tools as they work. All engineers do this and the tools in their tool boxes usually represent their project history and breadth.

A useful circuit to have in designer’s toolbox is the “high side switch”. Like it sounds, this is a circuit that switches the “high side” or positive voltage to a load.

We usually tend to switch things to ground as seen by outputs such as an Open Collector output, the reason being that ground usually is a known entity and is usually low impedance and is at a known voltage. But there are advantages to using a high-side switch in your circuits.

Turning on the Voltage

Switching the high side deals with more unknowns than low side; the input voltage, the required output voltage, and the impedance of the source voltage are pretty much all variable. Most often we also need to present a low impedance output meaning that the resistance of the high side switch itself doesn’t form a voltage divider with the load where a significant voltage is dropped across the switch.

Different ways to implement a High Side Switch.

We could make a high side switch with a relay for example, and there are times when this is still done. Typically the properties of current usage, current capability, coil voltage, cost and size are at odds with each other.

If we use a standard transistor it’s a given that we are going to have to live with a voltage drop of some sort. On one end this means that we can’t have a 5 volt output from a 5 volt source as we typically lose 0.3v in the process. At high currents the power dissipation also quickly gets out of hand.

Enter the FET (again)

Using a Field Effect Transistor (FET) we can make use of some of its best qualities to make a switch. To narrow down on which FET we would use we can start by saying we want a part that normally is turned off and has to be turned on by applying a control voltage, meaning we want an Enhancement Mode FET. Next we decide whether we want to control the device by using a voltage greater than the voltage we are switching (if available) or less than the voltage. For example if we want to turn on 5 volts do we want to do that using 8 volts or more or 4 volts or less? In the example here we want to turn on the high side switch without an additional voltage, in fact grounding a signal is somewhat attractive. That leaves a P-Channel Enhancement FET as our choice.

A high side switch using 2 components.

The traits of any part can be wide and varied so we start by looking for a few important parameters. In switching applications, as opposed to something like a linear audio amplifier application, a low Drain to Source On Resistance is important. This parameter known as Resistance Drain to Source ON or RDS(ON) and a good usable part typically is measured in milliohms. Using ohms law a quick shortcut tells us that at one Amp of current, the voltage drop of milliohms will be millivolts.

Turning it on

Next we want to make sure that we can turn the part on with the voltage we have available. This equates to the Voltage Gate to Source Threshold VGS(thresh) specification. A VGS(thresh) of -1 v means that if we want to switch 3.3 volts we need to pull the gate at least 1 volt below 3.3 v. Using a transistor or open collector device typically can pull a signal within 0.3-0.5v of ground, plenty of room in this case to switch 2.5V using a part with a VGS(thresh) of a volt or so.

A small selection of FET’s and their properties.

Looking at the specifications for several devices shown in the table, we see lots of trade-offs happening. If we select smaller TO-92 packages we get larger, unusable in our case, RDS(ON) values of an ohm or greater. If we go too small of an RDS(ON) the price quadruples. Other parts have too large of VGS(thresh) but the reality is it wasn’t too hard to find parts that were usable for the project shown here.

It’s About the Electrons, I Mean Holes

For those interested in peeking under the covers, the reason a larger case like a TO-220 has lower ON resistance is because the case holds a larger chip die. A larger chip die has a larger surface area which offers less resistance. The fact we are using a P Channel device means we need more surface area also, as P-Channel device are generally less efficient than N-Channel devices as they use “holes” for their carrier instead of electrons. The simplest statement is that hole mobility is less than electron mobility.

The switch circuit consists of two basic components, not counting add-on components that we would look at for a production worthy design such as reverse protection diode for the FET. With that said the FET shown does have a reverse avalanche diode built in for both overvoltage and reverse protection but it is the engineer’s job to determine if additional protection is needed.

The resistor shown is a bias resistor and keeps the gate at a known value with no other input present, in this case it keeps the FET in the turned off or non-conductive state. In short the resistor keeps the FET in a VGS state of 0v when at least -1v is needed to turn it on.

Putting it to the Test

To demonstrate the effects of low RDS(ON) I have a circuit shown with a 5 Ohm load. Remembering Ohms Law and that E=IR, 5 Ohms load on 5 Volts yields a load current of 1 Amp. Using the same equation the RDS(ON) is easy to demonstrate using 1 Amp of current: A voltage drop of .057 ohms at 1 Amp means that the resistance of the FET in this case is .057 Ohms! To put that in perspective for us, the power being dissipated by the device is P=I2R, or .057 milliwatts. We don’t really even have to do our thermal calculations to know that no heat sink is needed and that the device will work reliably used this way. To put it in perspective, the power dissipation of the load resistor is 5 watts, 87 times that of the switch itself.

Measuring .057 Volts drop across the FET at 1 Amp.

Since we only lose .057 volts in the process of turning on the load this means we can use a 5V supply as a source and still turn on a 5V load such as one of the many 5V controller or microcomputer boards available today…. this is almost as good as a mechanical switch.

Clap On, Clap Off

With the addition of a simple transistor and a resistor on its base to limit current, we can invert the signal needed to turn on the FET. This means we can create a push-on situation by having the load side voltage connect to the inverting transistor; once high the transistor will keep the FET turned on until something turns off the transistor.

A self latching circuit gives us a “Push On” function.

My thoughts in showing a push-on circuit stems from thoughts about battery powered assemblies or applications where maybe a timer is used to turn off after a some amount of time. A controller based load can even turn off its own power supply, though this is a little more complicated where the load needs time to shut down cleanly such as a Linux based system, Raspbery PI for example.


Hopefully this is an example of a simple circuit which you may find useful at some point, at the very least we have explored the properties of a high side switch and a little bit about selecting a component by its specifications.

Powering a 5V Raspberry PI from the standard 5V supply and only losing .06 volts in the process.

Filed under: Featured, hardware, how-to

How CMOS Works: Some Final Words About CMOS

via Hackaday » hardware

Finishing up on the topic of CMOS bus logic I am going to show a couple of families with unique properties that may come in handy one day.

High Voltage Tolerant Family: AHC/AHCT

AHCT w/o high side diode
Note the missing diode to VDD

First up is a CMOS logic family  AHC/AHCT that has one of the protection diodes on the input removed.  This allows a 5V input voltage to be applied to a device powered by 3.3V so that I don’t have to add a gate just for the translation.  Any time I can translate and do it without any additional gate delays I am a happy engineer.

Of course the example above works in a single direction and bidirectional does start to get more complicated. Using a bidirectional buffer such as a 74AHCT245 will work for TTL translation when going from 3.3V back to 5V providing there is a direction control signal present.

Dual Voltage Translating Transceiver

lvc2t45Another logic family by way of a true voltage translation is the dual supply translating transceiver, such as the 74LVC2T245.   This part can translate from any voltage between 1.2-5.5V to any other voltage in that same range making it useful for the voltages below 2V up to TTL, and other combinations.  This type device actually uses two power pins, one for each of the voltages being translated.

The 74LVC2T245 includes a “bus hold” function which can also be found in other logic families where they family name has an “H” in the name denoting the bus hold.

Bus Hold Function

The need for a bus hold function stems from the same concerns that makes us use lots of pull-up resistors; one for every single signal that has moments or possibilities of a high impedance tri-sate for any length of time, i.e. during a moment of tri-state where none  of the possible bus drivers are turned on.  This is a “floating” state where the voltage is free to wander around, unfortunately it can wander into the unspecified logic level state that is neither a logical high nor a low.  Bad things happen at this point, current consumption goes way up (remember from last post when we talk about both transistors turning on at once between VCC and ground?) and things can actually oscillate, in fact you may not even see the oscillations with an oscilloscope as the oscillation could be occurring on the insides of chips attached to the bus.

Source: [EE-Times]

Weak pullups, meaning pull up resistors, can be added to all of the signals so that any signals left floating will eventually be pulled to a high state.  There are several problems with pullups in general however; they add to the current consumption and the load on the bus and they can take a relatively long time to pull a voltage up into the “safe” high logic  zone.  By relatively long time I mean between 20-50ns  or longer as a passive resistor  suffers from an RC taper  due to the inevitable capacitance found on a bus.

Making the pullup stronger, i.e. a smaller value, can have the undesired effect of more drastically increasing power consumption and reducing noise margin by “lifting“ the low voltage signals and making the buffers work harder when driving a low.

IC Chips and Dies

Holding and old chip wafer

Switching gears I am going to talk a bit about the physical layout of integrated circuits. Shown is an old wafer I have left around from my time at Commodore in the 1980s.  Looking under the microscope on my bench you can see the individual chip dies on the wafer.  In production these would, after the appropriate testing and QA steps, be scribed and cut so that the individual dies can be mounted in individual chip packages.

If we zoom in further we can see some of what’s on the chip. Note that we are looking through a semi-transparent layer of insulation called passivation.  At one time the chip designers could ask that a couple of wafers/dies skip the passivation step so that later  they could better see and probe the chips under the microscope, though the lifetime of the chips was measured in months when exposed to the air without the protective passivation coating.

die1 die2 Chip wafer

FET Side View

Showing a side view of how a Field Effect Transistor (FET) is made, the process starts by laying down an insulating layer and then masking a layer of polysilicon, a fairly conductive material that is used for the gate contact. It’s important to note that the gate will remain insulated from everything below it though there can be contacts upward to route to metal conductors and eventually to the pad and pins of the IC.  The insulative layer can be seen under the gate in the drawing.FETs

Once the gate is laid down the ends of what will be the transistor are then “implanted” by exposing the material to an ion implanter.  We were always breaking our implanter back in the Commodore days as we were running ion densities higher than the implanter was designed for.  This layer is called the diffusion layer harking back to a time when the layer was diffused via chemical doping.

The two diffusion zones now called the Source and Drain which are next to a polysilicon gate are what we need for the transistor to operate: apply the correct voltage to the gate and a conductive channel forms under the gate between the gate and source (shown in dotted lines above). Unlike a transistor which is bipolar, meaning it has a P and an N layer which are the makings of a diode (which conducts in only one direction), the FET supports current flow in either direction as the device is symmetrical, the drain and source are made of the same material with substrate between them.

[Source: Wikipedia]
[Source: Wikipedia]

Speaking of substrate or the base layer that everything is grown on, it is either a N type or a P type. Most often it is a P-substrate these days which allows the N-channel devices to be grown directly on it, like NMOS technology did, the predecessor to CMOS. Before we can fabricate a P-channel transistor we have to first create a miniature version of some N-substrate that completely encompasses the area where the P-channel device will be.  Looking at the diagram you will see the N-well which acts like an N-substrate.  When CMOS first came out I remember reading about the pros and cons of using “dual tub” or both a P-well and N-well vs. just using a P-substrate, but I believe “single tub” or single well has won out, though there may be more parasitic considerations without the isolative properties of putting everything into a well (takes more room also!)

Now for the P-channel device, the same steps are basically the same once the N-well is implemented.   When implanting, a different dopant is used to implant a P-diffusion drain and source than that used for N-diffusion.  Examples of dopants are Boron for P+ diffusion and Arsenic for N+ diffusion.

Top View

Looking down from the top things look like a bunch of overlapping polygons, mostly because they are in fact a bunch of overlapping polygons.  Most of the chip layout people I know have mentioned that they have dreamed about polygons in their sleep at some point.


If we look for the polysilicon and where it appears to overlap diffusion, though we know that it doesn’t really overlap as we saw in the side view, we can spot the transistors. The length of the channel underneath the polysilicon gate is where we get the “design rules” when talking about size, for example saying something is using 90nm rules means that the effective channel length between source and drain is 90 nanometers long.

In the video I trace out the layout of the simple CMOS inverter as compared to the schematic.

Open Source “Magic” VLSI Editor

magic 1
Open source Magic VLSI editor.

Lastly I wanted to show an open-source editing tool that allows us to play with some chip layout ourselves. The program is called Magic and its history and a download can be found here.

This is a great learning tool and design rule checks (DRC) built-in to the software can help someone first starting out in the craft to understand clearances and other rules regarding layout and production.  The software can be hard to use at first: one must left click on a grid then right-click on the opposite corner of the desired polygon and then select the layer by middle clicking on the layer on the toolbar.  Different rules can be loaded including scalable features and how a resistor or capacitor is made using various processes. Under the covers the DRC’s start kicking in and the various layers, masks and other photolithographic data can be extracted to start the process of going to chip fabrication.

But Why?

My style of engineering was always to look under the covers and I was fortunate to work at a couple of places where very smart people were there to explain to me what I was seeing or wanted to know.  Understanding how ESD protection is implemented for example, can help an engineer understand what and what not may be a good design in various unusual circumstances where the datasheet alone doesn’t tell you everything.

Filed under: Featured, hardware