ten pin connections

Easy hack to allow an AVR Dragon to power the target device over the ISP cable

TL;DR: You can power a target device from an AVR Dragon over an ISP header by adding a jumper wire from the VCC pin to pin #2 on the header that you are *not* using.

I’ve been a big fan of the SparkFun Pocket AVR programmer, partly because it has a handy little switch that lets you send power to the target device…

Pocket AVR Switch

Unfortunately, I started getting “Error: Could not find USBtiny device” while programming boards using a jig

Continue reading

Battery Fuel Gauge with Zero Parts and Zero Pins on AVR

Blink LED Cropped

It can be nice to know how much battery power you have. It becomes critically important with LiPo batteries since you can permanently damage them by running the voltage down too low. Typically battery voltage detection requires adding a circuit with extra parts and their associated power requirements. Wouldn’t it be great to be able to do this using nothing but software? Read on for a no parts, no pins, no power solution…

Continue reading

Inside Neouart – Tricking a serial port into being a signal generator

Last time, we connected a NeoPixel directly to a RaspberryPi. This is certainly fun and useful, but the real motivation behind this project was to explore clever ways to make use of limited hardware resources. NeoPixels need a precisely timed string of bits to be happy. Luckily, every RaspPi comes with built-in hardware for generating strings of precisely timed bits – a serial port!

If all you care about is making pretty colors the easy way, don’t bother reading this article. If you are wondering how it is possible to reliably generate a pulse train with +/-150ns precision on a Raspberry Pi pin without kernel mods or DMA, then read on!

Continue reading

Give Your Raspberry Pi a NeoPixel

Everyone loves Raspberry Pi and everyone loves NeoPixels, so let’s get a NeoPixel directly under your Raspberry Pi’s control!

20140902_144939

The Pi can set the NeoPixel to any RGB color and you can create scripts to update it up to 100 times per second.

For a few cents worth of parts (actually just one part!) and a single IO pin, you can give your Pi…

  • an animated multicolor status light
  • an i-style breathing power indicator
  • an adorable single pixel Ambilight back-light behind your tiny screen
  • a sunrise-synchronized night light

The possibilities are endless! Click on for a demo video and full instructions…

Continue reading

Save the Earth One Resistor at a Time – External pull-up resistor no longer needed for DS18B20 temp sensor

EXECUTIVE SUMMARY:

Using the updated Arduino 1-Wire library code presented here, you can eliminate the need for an external pull-up resistor for typical small networks of DS18B20 temperature sensors.  This should also work with any AVR processor and other types of 1-Wire devices as well. You can download the updated 1-Wire library here…

https://github.com/bigjosh/OneWireNoResistor/archive/master.zip

The mythical “required” external pull-up

From the DS18B20 Data Sheet

From the DS18B20 Data Sheet

If you’ve ever used the ubiquitous (and amazingly useful!)  DS18B20 family of 1-Wire temperature sensors, you’ve almost certainly used a 4.7K ohm pull-up resistor as well. Every one of the seemingly endless Arduino DS18B20  tutorials on the web starts with some version of the line “You will not be able to do anything with this senor until you go out and procure yourself a 4.7K ohm resistor”. AdaFruit is even generous enough to include one of these resistors with every DS18B20-based temperature sensor they sell (be it bare, waterproof, and hi-temp) because they know you are going to need it.

I am here to tell you that everything is about to change. If you were banking on your stockpiles of 4.7K ohm resistors to be the one reliable store of value in these uncertain times, you need to rethink your long-term asset preservation strategy because the decade-long run of stable demand for this part is about to plummet. Yes – it is now possible to connect DS18B20 sensors without any external pull-up resistor at all!

Outrageous claims demand outrageous proof, so let’s start with a brief demo that proves beyond a shadow of a doubt that this is not just a cockamamie theory, but cold hard fact…

Continue reading