Next Revision of the STM32 Nucleo-L152RE Board Sent!

When performing the board bringup for the expansion board, I quickly discovered that I made a mistake on the RFM69HW footprint.  Typically when you are numbering a component you continue the numbering on the same side you stopped on (1…8, 9..16).  In this case, the schematic footprint I created counted from 1..8, then I started 9 across from pin 1 instead of being across from pin 8.  Doh!

RFM69HW Incorrect Pin Wiring

RFM69HW Incorrect Pin Wiring!

Here’s a quick picture of the Rev AA board design tested out, with I2C, OneWire, and UART cable connections leaving it.  The board itself has the GPS mounted, Ethernet SPI connection, and 128Mb flash chip, mounted and working. Next to the board is a 2 AA cell battery boost chip hot-glued to a AA case.

STM32 Expansion Board AA Front

STM32 Expansion Board AA - Front


I also discovered that 5 pins that I believed were there, were not present on the L152RE version of the nucleo board.  Based on these two details, I decided I would quickly get another board out that would have those details fixed, and any other changes/improvements that I wanted to make.

STM32 Nucleo – Revision AB

As my Github Readme indicates, the quick update turned into a slight overhaul of the design, where many of the fundamentals remained. My changes to the design have made the board more inline with my end goal of having a multi-purpose board that can interface with a wide variety of sensors and sending that data wirelessly to listening nodes.

The schematics show that MotionSense1 and 2 now have the capability to control servo’s, the on board relay can switch up to 30V at 1A, and a built in piezo can be used to get the users attention if needed.   I added the ATSHA204A for some potential crypto functionality to handle things such as signed firmware updates delivered wirelessly.  It also has a random number generator which can be useful on devices with low entropy.

I added a 3.3V regulator for handling the power to all of the connected bus’s so that the power to external devices can be controlled from the processor (which will help us reach an ultra low power state).


I opted to send out the first revision of the board knowing that it wouldn’t be perfect, and it turns out I was right.  By sending it out and making progress on other projects, I saved a significant amount of time for a $20 set of boards.  Having the boards in hand, I quickly checked out the design and found areas that could be fixed and improved.  So with this revision of the board I’m much more confident that things are connected the way they need to be, and that I have nice features that I would have wished to have on the AA board, but didn’t (such as an on board relay). Having spent another $20 for a new set of boards is great since I can now focus on writing firmware and software to interface with and take advantage of this board to its fullest!

STM32 Nucleo Expansion Board Recieved!

This is just a quick post showing the newly arrived PCB’s.  I have only found a few errors in the board where the STM32 Nucleo Expansion port didn’t have some signals that I assumed.  Luckily I added enough 0 ohm resistors and work arounds so that it won’t be a problem.  (Latest schematics on Github show the changes in the Develop Branch).  I discovered the problem when adding OneWire support for the DS18B20 temperature sensor.  Once I get all of the other sensor ports working I’ll flush out any other unexpected behavior and keep the schematics updated as I progress.




Bottom Side

I got 10 of these boards for about $20 so it was a really good deal. These boards were made in Kicad and the designs and all source code is available on github as explained in this post.

After attending Embedded Systems Conference this past week, I’ve got quite a few new ideas to making these sensor nodes firmware more robust, with licensing terms that will allow me to use the software I create in open source projects as well as closed source.


Outlet 60 Minute Timer

Outlet 60 Minute Timer

As I was browsing reddit today, I found this nice simple project, an Outlet Timer. I remember leaving the hot glue gun on one day, and finding it the next day, still running as hot as could be. The glue that came out of it was orange, and I know that things would have been bad if I didn’t catch it when I did. Typically I try to be as cheap as possible, but for the importance of this project, I didn’t mind investing the $27.

Here are the parts that I used for this Outlet Timer

In true DIY fashion, I’ll go through the steps that i used to make it.  I first wanted to find out which wire was Hot (the conductor that is switched when you switch on/off the power strip.  I first pealed back the insulation, being careful not to nick any of the wires.  I picked this location so that it was pretty close to the strip.

Under the insulation, we find, 3 wires (white, black, green).

In my case, the switch was connected to the black conductor (I could tell by measuring the conductance between the black wire, and that socket, when I switched on/off the power strip).  I cut the wires, with a pair of wire cutters, and stripped the recommended length of conductor for the countdown switch.  After feeding both wires through the 1 Gang electrical box, I inserted the trimmed black conductor into the countdown switch.

Inserting Black wire into countdown switch, note that both ends of the power cord have already been fed through the 1 Gang electrical box.

After that, I secured both green wires together using a WireTwist wire connector, and I did the same for the white wires.

Securing green and white conductors with wire connectors

At this point, I wanted some strain relief, so that things don’t come undone if someone accidentally pulls the power strip.  So I took 2 black zipties, and fed it through the 1 Gang electrical box so that the power cable will be secure against the box.

Stress relieving the power cable using zipties

By far the hardest part of this project was screwing the Countdown switch to the 1 Gang electrical box.  Those flat-head screws weren’t fun.  I wrapped it up by putting the faceplate on.  I did a quick sanity check, by using my multimeter and checking conductance before it has been plugged in.  Ground and Neutral were always connected, Hot was only connected to the wall if both the timer was on, and the switch for the power strip was on.  I tested it using my plug tester, and it tested out 🙂

Price list

As always, proceed at your own risk.  If you make this project, and it messes up, you take full responsibility.

Outlet 60 Minute Timer