Tutorial: DHT22 sensor with a PICmicro

via Dangerous Prototypes


Gianni Bernardo has published a tutorial for usage of DHT22 sensor with a PICmicro (machine translation).

Tutorial about DHT22 / AM2302 Digital Humidity and Temperature sensor usage on picmicro, using XC Compiler. Code is for a PIC12F1822, data from sensor are formatted and sent on UART @9600baud

Source code is available on github.

Via the contact form.

Play beautiful music on an Arduino thumb piano

via Arduino Blog

With an accelerometer and capacitive sensing, even a beginner can produce some great tunes with this DIY device.

If you like making beautiful music, but would rather not actually practice this skill, perhaps this thumb piano and controller by producer/DJ Rob Blazey would be a good instrument to pick up. His project, called “Kalimbo,” employs an Arduino to translate manipulations of metal rods, along with movement of the piano itself, into Open Sound Control (OSC) messages. These are then be used to produce music.

You first hear its awesomeness around the 1:00 mark in the video seen below. Even just moving it around sounds good, but it becomes incredible when he really starts playing just before 2:00!

Inside the instrument there is an Arduino with an accelerometer and a capacitive sensing wire, which is connected to the insulated bridge at the back, so touching the edge of that bridge acts as a trigger or switch or can control things more precisely depending on how hard you press it.

Intrigued? You can find more background on this project in mrblazey’s video description.


Taking a U2F Hardware Key from Design to Production

via hardware – Hackaday

Building a circuit from prototyping to printed circuit board assembly is within the reach of pretty much anyone with the will to get the job done. If that turns out to be something that everyone else wants, though, the job gets suddenly much more complex. This is what happened to [Conor], who started with an idea to create two-factor authentication tokens and ended up manufacturing an selling them on Amazon. He documented his trials and tribulations along the way, it’s both an interesting and perhaps cautionary tale.

[Conor]’s tokens themselves are interesting in their simplicity: they use an Atmel ATECC508A specifically designed for P-256 signatures and keys, a the cheapest USB-enabled microcontroller he could find: a Silicon Labs EFM8UB1. His original idea was to solder all of the tokens over the course of one night, which is of course overly optimistic. Instead, he had the tokens fabricated and assembled before being shipped to him for programming.

Normally the programming step would be straightforward, but using identical pieces of software for every token would compromise their security. He wrote a script based on the Atmel chip and creates a unique attestation certificate for each one. He was able to cut a significant amount of time off of the programming step by using the computed values with a programming jig he built to flash three units concurrently. This follows the same testing and programming path that [Bob Baddeley] advocated for in his Tools of the Trade series.

From there [Conor] just needed to get set up with Amazon. This was a process worthy of its own novel, with Amazon requiring an interesting amount of paperwork from [Conor] before he was able to proceed. Then there was an issue of an import tariff, but all-in-all everything seems to have gone pretty smoothly.

Creating a product from scratch like this can be an involved process. In this case it sounds like [Conor] extracted value from having gone through the entire process himself. But he also talks about a best-case-scenario margin of about 43%. That’s a tough bottom line but a good lesson anyone looking at building low-cost electronics.

Filed under: hardware

Enginursday: Lessons Learned at the Workbench

via SparkFun Electronics Blog Posts

While working my way to the release of the Proto Pedal, I’d been breadboarding lots of circuits. I thought I’d share some of the techniques I’ve been using to build and troubleshoot breadboards on my workbench.

alt text

Work in progress

Work From a Hard-Copy Schematic

In the world of computers and online documentation, it can be tempting to try to work strictly from onscreen documentation, but sometimes there’s an advantage to having a paper copy. Here’s one example, pulled right out of my notebook:

alt text

Iterating on paper

Having the schematic on paper is more convenient to use on my workbench while I’m building. You’ll notice that the op-amp terminals are numbered with the package pins, and some of the wires have been marked with colors to make them easier to find. You’ll also notice the red ink where some part values and connections were revised as it was being tested.

You’ll also notice that the schematic was hand drawn, not just printed from a digital copy. This gave me one more chance to internalize the circuit and consider how it was going to be assembled.

Work From A Soft-Copy Schematic

In direct contradiction to the previous advice, there are also advantages to using schematic-drawing software.

The hand-drawn circuit above was actually transcribed from one drawn in LT-Spice, which I used to verify that it was functional and select the gyrator capacitor values. In particular, it allowed me to experiment with a couple different versions of the AC-coupling circuits.

alt text

Iterating off paper

Assembly Diagram.

Moving from the schematic to breadboard means actually building the circuit from real, physical components, proving that theory and practice correspond. It’s an exciting milestone in the development of a circuit. As such, it can be tempting to plunge in and throw components on the breadboard wherever they fit.

It can also be a recipe for headaches as the circuit grows unpredictably, and you may find that you’ve painted yourself into a corner.

To help circumvent the headache, I’ll draw an assembly diagram.

alt text

It’s just like playing Battleship.

This diagram is drawn on graph paper. The rows, columns and power buses of the breadboard have been outlined in ink, and components sketched in pencil, transcribed from the schematic. As things took shape, some details got rearranged, and components were erased and redrawn.

Node Analysis

We often think about the components, but sometimes we need to more carefully consider how they’re connected. For example, consider the following schematic snippet:

alt text

At first glance, we see that there’s an op-amp, a couple resistors and a cap – this is useful information because it informs the components we’ll need before we can build it. But if we look at how they’re connected, we notice that there’s a point where C5 meets both R7 and R8. Somewhere in the circuit, we need to be sure those three parts are joined.

When you’re troubleshooting a circuit, this can be a useful way to look at things – counting and making sure that each node is joining the correct number of components.

Assembly Instructions

After drawing the assembly diagram, I slowly worked through it, looking at each of the penciled symbols. For each mark, I classified it (jumper wire, resistor, capacitor, semiconductor, etc.), took note of its value and location and logged it in a list. The lists were double- and triple-checked for completeness before moving on (that’s where the tally marks in the corner of the assembly diagram came from).

alt text

Build instructions

With these lists, assembling the board became a matter of following each list and installing the corresponding item at the listed coordinates. As each one gets installed, it gets checked off of both the list and the diagram.

First Powerup

Powering up a brand new breadboard the first time can be a bit nerve-wracking. Will it work? Will it explode?

You can begin to address the “will it explode” question before first applying power. Check that the power polarity is correct, and that the chips and electrolytic capacitors are the right way ‘round. You can also use a continuity checker to verify that the power and ground rails aren’t shorted together.

When I’m finally confident enough with my construction, I power it up. For the first power up, I turn the current limit on my power supply down, and watch the readout on the power supply. Most circuits will draw a bunch of current as they power up, then settle to something much lower.

If the circuit is drawing a bunch of current continuously, the supply should indicate that the current limit has been reached, and the voltage output will be less than the setting. If that’s the case, power down quickly and look for shorts!

Neatness Counts

As I start breadboarding circuits, I usually leave the component leads long in case something is wrong and I need some flexibility to work around it.

alt text

A young breadboard

Eventually, flexibility becomes a liability. The components with long leads can bend, creating unanticipated short circuits. To prevent that, once a portion of a circuit is working, I’ll snip the leads and cinch the component up against the breadboard.

alt text

A more mature specimen

So How Does It Work?

I’m extremely happy to report that the circuit shown in these examples worked on the first try.

As they say: Proper Planning Prevents Poor Performance.

comments | comment feed

A multimeter heads-up display with Arduino glasses

via Arduino Blog

With Alain Mauer’s Arduino glasses and a Bluetooth multimeter, electrical data is always in view!

If you’re in a job where you have to take readings inside a live electrical panel, one thing that’s inconvenient, and even dangerous at times, is having to look away from your hands to read your multimeter. With hopes of “making an engineer’s life easier and safer,” Mauer solved this problem using an Arduino Pro Micro and a BLE module to show data from a Bluetooth-enabled multimeter. Now he can see data on a display that looks similar to a Google Glass device. Perhaps this method could be expanded to other devices in the future!

If you’d like to build your own glasses, a description and 3D printing files can be found on Hackaday.io.