Computing stuff tied to the physical world

Archive for April 2015

Micro Power Snitch, part 6

In Book on Apr 29, 2015 at 00:01

And you thought the MPS was finished, or perhaps abandoned, eh?

This week resumes the development of a little LPC810-/RFM69-powered setup which runs on parasitic power, harvested from either phase of a current-carrying AC mains wire.

To summarise, the last step in the project I went through a few weeks ago, was to create a PCB for it. Here were some builds, with all the hacks and hooks added to try things out:

DSC 5041

As it turns out, I had made so many mistakes, one after the other, that it really set me back, irritated me to no end, and kept me busy with complete silliness… but all is well again now.

The articles in this week’s “back in business” MPS episode are:

And with a bit of luck, by next week I’ll have figured out how to send out brief RF packets on an ridiculously minimal energy budget. Because that’s what “The Snitch” is all about!

(For comments, visit the forum area)

We interrupt this program

In Book on Apr 22, 2015 at 00:01

… for an important announcement from our sponsor:

Spam

Just kidding, of course!

But it got your attention, right? Good. That’s what this week’s episode is about: taking care of something unexpected, i.e. processing tasks without planning them ahead all the time.

On the menu for the coming days:

Interrupts – when handled properly – are extremely powerful and can deal with “stuff” in the background. But there are a lot of tricky cases and hard-to-debug failure modes. It’s worth getting to grips with them really well if you want to avoid – unexpected – failures.

(For comments, visit the forum area)

Dataflash via SPI

In Book on Apr 15, 2015 at 00:01

One of the things I’m going to need at some point is additional flash memory. Since the simplest way these days to add more memory is probably via SPI, that’s what I’ll use.

This week’s episode is about connecting an SPI chip, implementing a simple driver, code re-use, the hidden dangers of solderless breadboards, and point-to-point soldering:

DSC 5020

The end result is several megabytes of extra storage, using only 4 I/O pins. Data logger? Serial port audit? Storage for audio, video, images? Your next novel? It’s all up to you!

(For comments, visit the forum area)

Analog on the cheap

In Book on Apr 8, 2015 at 00:01

Digital chips can’t do analog directly – you need an A/D converter for that, right?

Not so fast. Just as pulse-width modulation (PWM) can be used to turn a purely digital signal into a varying analog voltage, there are tricks to measure analog values as well.

All you need is the proper software, a simple analog comparator, and these components:

DSC 5014  Version 2

This week’s episode examines delta-sigma modulation and shows you how it’s done:

There’s in fact a little gem hidden inside those LPC8xx chips which allows implementing this without bogging down the ┬ÁC. Just one interrupt whenever a measurement is ready. But the basic idea is applicable to any microcontroller with a built-in analog comparator.

(For comments, visit the forum area)

Emulating EEPROM

In Book on Apr 1, 2015 at 00:01

The LPC8xx series has no EEPROM memory. This type of Electrically Erasable memory is very useful to store configuration settings which need to be retained across power cycles:

DSC 5005

But we can emulate it with flash memory, despite the somewhat different properties.

Here’s the why’s, what’s, and how’s of this software trick – in this week’s article series:

There’s quite a bit of detail involved to get this right, as you will see.

(For comments, visit the forum area)