Computing stuff tied to the physical world

Archive for 2014

LPC810 meets RFM69

In Book on Dec 31, 2014 at 00:01

This week, as we jump from 2014 into 2015, I’d like to start on an exploration which is dear and near to me: ultra low-power wireless sensor nodes for use in and around the house.

The LPC810 µC has 4 free I/O pins, when connected via a serial port or I2C. And as it so happens, it’s also quite feasible to drive an RFM69 wireless module with just 4 pins, i.e. using just an SPI bus connection, without any interrupt pins hooked up.

So why not try to combine the two, eh?

The following articles introduce a brand new “RF69” driver, using native packet mode:

This concludes this year’s refreshed weblog series, but I’m really looking forward to the year ahead. The new weekly format is working out nicely for me – I hope you also like it.

Jeebook cover

To close off the year and fulfil another goal I had set for myself, the recent material on this weblog has now been added to the The Jee Book. It’s just a start to let you download the entire set of articles published so far – in a range of e-book formats, including PDF.

I hope you had a great 2014 and wish you a very Guten Rutsch into 2015. May it bring you and yours much happiness, creativity, and inspiration – with respect and tolerance for all.

Happy hacking,
Jean-Claude Wippler

(For comments, visit the forum area)

Eye Squared See

In Book on Dec 24, 2014 at 00:01

Physical computing is about hooking things up. Sure, there’s also low-power and wireless in the mix, but in the end you need to tie into the real world, and that means connecting sensors, indicators, actuators, and what-have-you-not. It’s a big varied world out there!

The computing side is all about information. From a µC’s perspective, we need to direct information from sensors to us, and from us back out to indicators and actuators.

The more data you need to shuttle across (or the more frequently), the harder it becomes in terms of engineering. But sometimes all you need is to send or receive a few bytes of data, perhaps just a few times per second. That’s where I2C comes in, created over 30 years ago.

Or, more accurately: the I²C bus, which stands for the “Inter-Integrated Circuit” bus.

So the upcoming article series is about this wickedly clever “eye squared see” invention:

As before, one article per day. And while we’re at it, I’ll also use the Raspberry Pi single-board computer as an example of how to use I2C under Linux. As you’ll see, it’s really easy!

DSC 4904

(For comments, visit the forum area)

Schematics and layouts

In Book on Dec 17, 2014 at 00:01

The past several weeks were about hacking stuff together: electrically connecting chips and some other components together, and making the resulting circuit + software do fun stuff.

This week is about turning an experiment into a more formal design.

In some cases, such as the mains distribution panel at JeeLabs, clear wiring is not a luxury:

DSC 4192

Those colour codes are not for making a pretty picture – the are required by law. And even though most mains distribution panels end up being unique one-offs, the formal “notation” is essential to make each design well-documented and understandable for decades to come.

With low-power experiments, we have a lot more freedom to just hack around, fortunately!

But although breadboards are great for trying out ideas by letting you “edit” the electronic circuit, at some point you will probably want to make it more permanent, or smaller, or more robust – or even all those at once. Or perhaps you simply want to make it repeatable, so more “instances” of your experiment can be produced – whether for fun or for profit, and perhaps even not for yourself but for others to replicate with minimal effort.

Tinkering is fun. Repeatedly solving the same puzzle or falling into the same trap is not.

Here are this week’s articles, as planned for the coming days at 0:00 CET:

Please note that these articles are not a how-to guide for the entire process, just a first introduction to all the steps involved in going from an idea to a reproducible design.

Dip into the LPC810

In Book on Dec 10, 2014 at 00:01

Getting to know the ARM architecture and the LPC810 is a wonderful adventure. It’s also almost impossible to figure out where to start. So let’s just dip our toes in the water, eh?

This week’s articles all highlight a different aspect of the LPC810 (of the entire LPC8xx series, in fact), by exploring a variety of uses and figuring out how to implement them.

Each of the following examples includes a minimal circuit to demonstrate their use:

All of them can also be built on a breadboard, but soldering up a little circuit with an 8-DIP chip (or socket) in them is a lot more fun. It really shows the versatility of such little µC’s:

DSC 4830  Version 2

Who knows, you might even have an immediate use for some of these examples. With a bit of extra work, any of them could be turned into a self-contained I2C slave to add to your own project. Instead of complicating your own project code with the hard timing requirements of pulsed LEDs or servos, why not simply “off-load” to a dedicated LPC810?

The sky is the limit. Eh, wait, strike that, it isn’t anymore…

(For comments, visit the forum area)

Garage Parking Aid

In Book on Dec 3, 2014 at 00:01

This next article series is about setting up a practical project for use around the house. It’s small enough to be covered in a few articles, and simple enough to be constructed entirely on a breadboard with no soldering involved. It’s time to start making things!

I’ll take you through the problem definition, the way to pick a solution, and the many trade-offs involved in getting everything working as intended. As you will see, getting this thing to run off batteries poses some challenges, but is nevertheless feasible.

Here are this week’s articles, as planned for the coming days at 0:00 CET:

The GPA has all the properties you’d expect in a physical computing project: a sensor, a readout, a microcontroller, and a power source. You may not have a garage (or a car), or you may have a car with this functionality built-in, but there’s probably something to glean from this design process for your own use – and maybe some parts will be useful in other ways. It’s all “loosely coupled” after all, with a breadboard to build any variations you like:

DSC 4781  Version 2

Speaking of parts – Martyn & Co have produced a kit for the JeeLabs shop if you’d like to get going fast, with everything needed to create this little parking aid gimmick.

(For comments, visit the forum area)

Getting started, final episode

In Book on Nov 26, 2014 at 00:01

As you may have noticed, the publication date of these posts has been shifting a bit. Well, no longer: from now on, all posts will be scheduled to go out on … Weekly Wednesday!

As before, each post will mention one or more new articles, released on successive days.

DSC 4812

This “Getting Started” series has been about exploring ARM µC’s, in particular the 8-pin LPC810 shown above, and there’s one important topic left to cover so you can compile your own code and explore what’s possible in this virtually infinite playground.

Here goes, the concluding articles of the Getting Started series:

If you’re eager to start tinkering with the LPC810 chip: have a look at the JeeLabs shop, where Martyn Judd & Co from Digital Smarties have created two very practical packages to get you started: the Bare ARM Blinker kit which has everything needed to replicate and extend the recent explorations on this weblog, and the ARM duo- and 6-pack, i.e. a supply of bare LPC810 chips to experiment with. Note that there’s no soldering involved.

Be warned, though: it’s pretty addictive stuff! – and we’re only just getting started…

(For comments, visit the forum area)

Getting started, episode 3

In Book on Nov 19, 2014 at 00:01

The idea of starting out with the 8-DIP LPC810 ARM µC occurred to me not very long ago, when I discovered a simple upload mechanism based on the modified FTDI interface. It’s quite an intriguing idea that you can put some pretty advanced decision and timing logic into such a small chip and do so entirely through free open source tools, with all the details fully exposed.

Making an LPC810 do stuff feels like creating our own custom chips: we can upload any software of our own design into the chip, then place it in a project as “control centre” to do fun stuff. Protocol decoders / encoders / converters, LED drivers (e.g. the WS2812 “neopixel”), even a small interpreter or a wireless radio driver, these are all feasible – despite having just 4 KB of flash memory.

Small programmable chips such as the LPC810 demand a relentless drive for simplicity, which is an excellent skill to develop IMO – for whatever physical computing projects you may have in mind.

Anyway. The hardware side is now completely done, with something like this ready to go:

DSC 4810

Unfortunately, that’s only half of the story. We still need to address uploads + compilation.

Check out the next set of articles, to be published from Wednesday through Saturday:

With this out of the way, we can make an LED blink or fade. Trivial stuff, but note that we’re setting up the infrastructure for embedded software development on ARM chips.

Oh, and if this is too basic for you, see if you can figure out this JeePuzzle … any takers?

(For comments, check the forum area)

Getting started, episode 2

In Book on Nov 13, 2014 at 00:01

The articles this week continue on the path just started, hooking up a bare ARM chip, and making it do something silly. No soldering and (almost) no software installation involved.

As before, keep in mind that only the first of the following articles is available right away – the others will be published one at a time, a day apart:

A thought occurred to me recently, and it got stuck in my head:

We can send an autonomous vehicle to Mars using a mighty/majestic Saturn V rocket, or we can launch a fragile/fickle weather balloon and enjoy the view on earth from above.

I’m a guy who prefers the latter. Simple, clean, quiet, and with a journey which is at least as interesting as the result. Which is why you’ll find many posts on this weblog which do things differently, and even repeatedly. Not to be different, but because life is as much about going someplace as it is about getting there.

And yes, I’d love to figure out how to launch a weather balloon some day. There’s probably also a point to be made about the difference in energy consumption…

(for comments, please use the weblog section of the jeelabs.net discussion forum)

Getting started

In Book on Nov 7, 2014 at 00:01

Ok, here’s the deal: once a week there will be a post like this one, with links to one or more “articles”. These articles will cover some common topic, in small doses. There will be weeks with just one article, and there will be weeks with more than one – depending on the topic, energy levels, complexity, moon phases, and of course the generosity of the muses.

On the day when a post is published, only the first article listed will be available. Each day after that, the next one will be ready. This keeps each daily post nicely limited to a short, and hopefully enjoyable and informative experience.

This first episode contains entries for today, Saturday, and Sunday, just to get started:

If everything works out, all the articles will add up to form chapters, and the chapters will join forces to produce a book. But that’s for the future to tell, for now the articles will only exist on this weblog (and stay there forever, BTW).

These weekly posts will rarely change once published. Articles on the other hand, can and will most likely get updated, extended, and even rearranged from time to time – to fix errors and omissions, or to include any relevant new information.

For comments, please use the new weblog section of the forum at http://jeelabs.net/.

Enjoy,
-jcw

Thank you

In Musings on Oct 31, 2014 at 00:01

Thank you for many dozens of kind, encouraging, honest, and very helpful responses and suggestions over the past few weeks. I started replying to each one individually, but had to give up at some point. Still, thank you for every single word you wrote – it’s not something to ask for all the time, but it sure helps to occasionally hear where you’re coming from, what interests you, what topics you’d like to read more about, and of course also that the fun and delight came across loud and clear.

I’m proud to see that the JeeLabs weblog has touched and inspired such a large and diverse group of people. There really is a huge and happy family out there, spread out across the entire planet, interested in physical computing and willing to learn, share insights, and create new stuff. Good vibes make the world go round!

Somewhere next week, I’ll restart the weblog. It won’t be exactly the same as it was, but it will be on a regular weekly schedule (and sometimes more). It’ll take some time to “find my voice” and get back into a regular and consistent mode again, but I’m really looking forward to it. There is definitely no lack of directions to go into, both deep and broad!

Sooo… let’s see where this renewed adventure will take us, eh?

PS. Comments on this weblog will not be re-enabled, but there’s a new area on the forum.

It’s been a year

In News on Oct 6, 2014 at 13:10

It’s been a year since the last post on this weblog. A year is a long time. The world has changed in many ways, and technology has advanced in just as many, but completely different ways. I have also progressed, in the sense that I’ve been exploring and learning about lots of new things in the world of electronics, software, and physical computing.

Some things have solidified, such as my main laptop, which is still the same as three years ago (an 11″ MBA), because the shiny big fast one went to my daughter Myra, who has a far bigger need for that sort of hardware – for her photography and video work. Another solidifying trend has been my touch typing, which is now at the point where I do so 95% of the time (editing code still makes me go for the hunt-and-peck mode, occasionally).

Other things have stagnated, such as most notably the work on writing The Jee Book. There are pages and pages with words and images on my laptop, but I don’t like them one bit, and will not publish these as it is today. There is not enough direction, passion, focus, and fun in those draft pages. It would diminish the excitement and joy this deserves.

I’ve given a few presentations and workshops in the past year, but nothing of substance has come out of it all with respect to the JeeLabs site(s). My goal for this month is to get back into higher gear in public. Writing has always been very fulfilling and its own reward for me – I’m looking forward to finding my voice on the web again, in some form or other.

Now the hard part… I could use your help.

A year in solitary confinement (just kidding!) has made it harder for me to understand what you’d like most from JeeLabs. Just to get this clear: I don’t think I can restart the daily schedule of the weblog, as it was up to a year ago. This isn’t only about the effort and energy involved, or the lack of material, but the fact that the resulting stream-of-conscience website that it leads to is a bit hard to navigate through. Also, the resulting collection of articles is really not very practical as a resource – there are too many bits and pieces of information in there which are outdated and at times even misleading by now.

What sort of topics would you wish to see covered? My own interests still tend to gravitate towards long-lasting autonomous wireless sensor nodes. What frequency and size of posts / articles do you like? Should the topics be spread out broadly, or rather focus on some very specific problems? How simple or deep-diving should the information be? Do you want more science and maths, or rather some detailed construction plans? Do you prefer a personal and conversational style (such as this), or more a factual information source?

As always, I will make my own independent choices, but I promise to listen carefully and respectfully to each and every comment you send my way (email to jc@wippler.nl).