Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /homepages/16/d92685614/htdocs/app557857706/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340
prototyping Archives - Mike Seiler, MSEE
Adventures in Engineering Trade-Offs

prototyping

Pi Platter at the Denver Maker Faire

SSD booth at the Denver Maker Faire

SSD booth at the Denver Maker Faire

On Saturday, June 11, 2016 I had a chance to show off 5 of the Raspberry Pi designs I’ve been working on.

In preparation for a Kickstarter, I’ve been assembling designs that showcase the versatility and usefulness of the “Pi Platter” board I’ve been working on.  Dan Julio, the other engineer on the project, and I are both members of the Boulder Hackerspace aka Solid State Depot. The Boulder Hackerspace was invited to the Denver Mini Maker Faire at the Denver Musieum of Denver Museum of Nature and Science.

Introducing the Pi Platter Solar battery charger, USB and RTC board

Introducing the Pi Platter Solar battery charger, USB and RTC board

The Pi Platter board is designed to give the Raspberry Pi Zero, as well at the other models of the Raspberry Pi additional features such as

    1. Additional USB ports
    2. Solar Li battery charging circuit
    3. Real Time Clock as well as additional I/O such as PWM outputs and analog inputs
5 Raspberry Pi devices that could use battery backup and RTC

5 Raspberry Pi devices that could use battery backup and RTC

Because the Pi Platter is so versatile, it’s important to showcase some of the ways you can use it.  Currently, I have 5 demo designs.

      1. Raspberry Pi Zero with eInk display and solar cell showing time, battery voltage, and voltage graph
      2. Raspberry Pi B+ with mini touchscreen running python games
      3. Raspberry Pi Zero ver. 1.3 showing binary clock on a 8×8 LED matrix display
      4. Raspberry Pi B+ Security System with motion detector, 4×4 membrane keypad, camera and 2×16 LCD display
      5. Raspberry Pi 3 with 1TB hard disk

However, because I only have one demo Pi Platter board, I was only able to make one of the designs battery (and solar) powered for the faire.  Two key features of all the designs is that they are battery powered and that the GPIO connector is available for HATs – that is daughter boards that fit on top of the Raspberry Pi.  The Pi Platter connects through 4 pogo pins to the bottom of the Raspberry Pi Zero and through USB to other Raspberry Pi models.

Close up of 4 of the designs

Close up of 4 of the designs

The Saturday at the faire was a good way to make connections and talk to hob nob with fellow makers.

R2D2 was one of the hits with the kids at the Faire

R2D2 was one of the hits with the kids at the Faire

3 Amazon IoT Button Hacks

The Amazon IoT button is an amazing little device.  It can run for about 1000 button presses from the built in lithium AAA battery.  It’s easy to connect it to the local WiFi network.  But you don’t have to limit yourself to just pressing the button.  I present to you 3 additional uses that require only a modest amount of hacking.

Three Amazon IoT Button Uses

I’ve ordered the project from simplest and fastest all the way up to simple and fast. But if you don’t know which end of the soldering iron gets hot, then stick with the first project.

AWS IOT console

AWS IOT console setup. (The blurred text protects my button)

Door Bell

Stick the Button by your front door (maybe with a label that says “Door Bell”)  I have it set up through IFTTT to send me a text, “Somebody is at the front door.”  Follow the instructions on the Amazon Button page.

Your Amazon Iot Console should look something like the picture on the right.

Let’s Get Hacking

Prelude – How to safely crack open the “no customer serviceable parts inside” case.

  1. Remove cover label.  You can catch a corner by the tiny microphone hole with the sharp tip of a knife.  The label peels off.
  2. Remove three Torx #5 screws.
  3. Crack case. Again using a sharp knife tip, carefully wiggle the blade in at the rounded end next to the big button.  Don’t do this at the other end because there are electronics close to the edge.
Schematic for both the flood alarm and motion sensor.

Schematic for both the flood alarm and motion sensor.

The next two hacks bypass the button.  A simple additional circuit is added.  To prepare solder an access wire to

  1. the battery plus terminal,
  2. the battery minus terminal and
  3. to test point TMF27, which is next to the microswitch that is under the big button.  There is a via over part of the ‘7’ which makes it a bit hard to read the number.

Flood Alarm

Flood Alarm using Amazon IoT Button

Flood Alarm using Amazon IoT Button

Here the Button is in my basement, in the utility room.  A drop of water simulates a button press, which triggers a rule and texts me, “Flood alarm!” The V+ battery voltage causes a small amount of current to flow into the base of the transistor when water is present at the water probe.  R1 is a current limiting resistor which protects the T1 if the probes are shorted together. T1 can be either a 2N2222 or 2N3904 or pretty much any NPN silicon transistor with a gain of around 100.   C1 gives a spike or pulse so that the button is only single pressed.  SV1 is the connector to the Amazon IoT Button.  Pin 1 is the battery +, Pin 2 is the battery -, and Pin 3 goes to test point TMF27,  R2 provides a discharge path for C1.  (R3, SV2 and G1 are are part of the motion detector and not used for the flood alarm.)

 

Motion Sensor

A inexpensive HC-SR501 PIR motion sensor is powered by a lithium battery.  The PIR motion sensor uses very little current and the 18650 battery should last for years before it needs to be recharged. Again, just about any 3.6 volt lithium battery should work.  The 18650 is what I had handly.   The  PIR motion detectors cost only about a dollar on eBay. R3 provides current limiting to the base of T1, which inverts the signal so that it looks like a button press.  The 18650 battery + goes to the pin marked Vcc on the PIR. Likewise, battery – goes to the pin marked GND.  Finally the PIR out pin goes to the base of the transistor through R3.

Oh! and I just noticed an error on the schematic.  The 18650 battery – goes to pin 2 of SV1.  In other words, the ground of the two batteries in the system needs to be connected. The PIR sensor has two setting pots.  Set the X1 to minimum (all the way counterclockwise) and the SX pot to the desired sensitivity.  The output is sent to the Button.  IFTTT texts me, “Movement detected!”  The water probe, R2, C1 and R1 are not used for the motion sensor circuit.

Keep in mind that the Amazon IoT button is only good for about 1000 motion detects.  This is fine if you are only expecting a few motion triggers a day, but the circuit will only last months or weeks if there are frequent triggers.  In case of frequent triggers, you may want to build a power supply. As it says in the text books, “That exercise is left to the reader.”

So, dear reader, does this post give you ideas about what else you can do with an Amazon IoT Button?  Let me know!

Update June 20, 2016

Here are two more uses for the IoT button

  1. A better mouse trap.  Modify a regular spring loaded bar mouse trap with a contact closure. The contact closure, of course is picked up by the IoT button by capacitive coupling.   This signals that a mouse is ready for “disposal” and that the trap needs to be reset.
  2. A tapping sensor switch similar to the Knocki.  I’m speculating that a piezoelectric energy harvester can trigger the IoT button the knock pattern for a single tap. double tap and maybe even long press.  If the piezoelectric sensor does not provide enough energy to trigger the IoT button then we can use a ultra low power op amp to boost the signal.

 

Raspberry Pi Security Camera

Raspberry Pi Security Camera

Raspberry Pi Security Camera

I was contacted through the Boulder Hackerspace by someone who wanted help building a Raspberry Pi security camera.   We finally settled on the design being a cross between a PiLarm and system that sends pictures to your phone.

The hybrid system has:

  • 4×4 membrane keypad for issuing commands
  • Magnetic door sensor
  • PIR motion detector
  • 2×16 backlit LCD status display
  • WiFi module
  • And of course the the Raspberry Pi and Camera Module

I had a nice aluminum case that fit the display left over from a previous commercial design.

There where some “gotchas” in getting the Python code to work.  It was not possible to just mix and match code from the two reference designs.

  1. Sending the MMS picture does not work with Wheezy, but only with Jessie because Wheezy’s Python 2.7.3  is incompatible with the Twilio import. Jessie provides Python 2.7.9, which works.
  2. The magnetic door sensor and PIR motion detector code triggered interrupts.  This can interfere with the display code if not carefully structured.
  3. While a code block may work fine by itself, when you combine them you can put quite a demand on the processor.  Scanning the matrix keyboard left little time to do anything else.

However, when all was done and said, the final design did a great job of detecting motion or an opening of a door, then taking a picture and texting it to a phone.

A possible next step is to rework this system using a Banana Pi D1, once we can figure out how to reprogram it.

 

Internet Christmas Tree is a Hit

I’ve modified the fireplace blower controller to control the Christmas tree lights.

At first, I wanted to get the Christmas tree lights to flicker like a candle flame.  However, at about the time I programmed in the random function my Particle Photon stopped responding. None of the googled “flashing red light” solutions worked on my Photon.  Hmmm, I’ll have to investigate this after Christmas, because trying to get the Photon unbricked was turning into a real time suck.

So, in order to keep moving ahead, I down rev’ed to my Spark Core, which is the previous generation of the Particle Photon.   I got it working just in the nick of time. I wanted to show off my IoT Christmas Tree to my nephews and the rest of the family during the Christmas Skype call.   Indeed, everyone at the far end of my Skype connection has fun turning the Christmas tree on and off, and changing the flickering characteristics after I gave them my secret web page.

The circuit consists of a Spark Core or Particle Photon, a homebrew optocoupler and a less than $2 AC motor controller from eBay. The optocoupler consists of a green LED which shines on a Light Dependant Resistor (LDR).  The LDR is soldered in parallel with the motor speed controller control.  The LDR has a lot of capacitance, so it smooth out the pulse width modulation (PWM) output from the Photon.  I got the GL5537 Photoresistor from eBay and I had a 10 mA green LED in my junk box. I butted the green LED up against the LDR and held them together with a couple of layers of heat shrink tubing.   A resistor of 680 to 1.5K in series with the LED limits current. Comercial versions are made by Vactrol or Silonex.  The transfer function is very linear when graphed on a log/log scale.

Hardware costs should be less than $25, most of which is for the Photon.

The software consists of a short program for the Photon that receives commands from the control web page.  Follow the links for the code.  Make sure to put your own deviceID and accesscode in the beginning of the javascript.

Beyond NEST – Wood Fireplace Insert and Pellet Stove Controller

Previously,  I had experimented with an Arudino Uno based fireplace insert blower controller. That experiment evolved in having two displays – one for the time and temperature, another for a graph showing temperature over time.

But, it makes sense to combine the two displays in the previous design into one display.  A common, inexpensive display available are  240×320 TFT LCD displays based on the ILI9341 chips. The one I got from Banggood (I couldn’t make up a name like that if I tried!) plugs directly on an Arduino Uno.  However, this makes it difficult to find pins for the thermocouple interface.  So, I upgraded to an Arudino Mega, which gives me more memory, and oodles of spare I/O ports.

Wood Fireplace Insert Blower controller with graphic display

Wood Fireplace Insert Blower controller with graphic display – double click to enlarge.

Note in the picture that the display the time is shown on the first line, temperature on the second line, and then time vs temperature graph below that.

Temperature is graphed once a minute, which makes it easy and entertaining to see the temperature hump created by throwing in a log. A grid with blue dots every 10 minutes and white dots every hour further helps give structure to the graph.  Horizontal dots are 50 degrees Fahrenheit intervals.   I personally find this graph quite useful for figuring out when, and how big a log to throw on the fire.   However, I’m sure I’m going to be dinking with the user interface for quite a while to come.

The DS3231 real time clock (RTC ) from the previous design continues to be on the I2C bus, which is also more accessible with the Mega because the I2C pins are brought out in a second location that is not blocked by the LCD shield.

A few months ago, I did a survey of digitally controlled fan controllers. All the designs seemed more complex and expensive than I though necessary.  When I found a AC motor speed controller on eBay for about 2 bucks, I ordered one.  In the mean time, I saw a post about using a LDR (Light Dependent Resistor) to complement the variable resistor (Pot) and thought I’d give that a go.  By the way, I left the pot in the circuit, so I can bypass the Arduino if I want.

I came up with an Arudino interface consists of a green LED shining onto the LDR , both of which cost about a nickle on eBay.  What I don’t understand is why a commercial version (Vactec or Vactrol) of this type of opto-coupler cost $6, when I can build one myself for 2 parts costing a dime, plus a bit of heat shrink tubing.  It did not hurt that I already had these parts in my “junk” box.  The transfer function my home brew unit is also quite linear if graphed on a log/log scale. The opto-coupler is the nearly  vertical black cylinder on the upper left of the picture. However, it’s taking a bit of experimenting to get a good dynamic range and resolution when coupled with the $2 motor speed controller.  Selecting the right series resistance for the LED is the key.  The LDR has a lot of useful smoothing capacitance and can handle a higher voltage than your typical opto-coupler.   The lDR capacitance is useful because the so called Arduino “analog” output is actually pulse width modulation at 750 Hz.

My other reason for creating a second prototype is that I have a pellet stove with a blown controller board in the basement.  What it takes to fix it is a blower speed controller – and I now have two working prototypes.

I did a bit of market research and it appears that the market for pellet stoves and fireplace inserts are on the order of hundreds of thousands of units sold in the USA per year.  Perhaps there is a path to commercializing my design?  I’m going to have to give the design of a demo worthy case some thought.

Wood Stove Fireplace Insert Controller – Beyond NEST

 

Wood Stove Fireplace Insert Fan Speed Controller with Graphic Display

Wood Stove Fireplace Insert Fan Speed Controller with Graphic Display

There are some home temperature control situation that don’t work with a NEST.

In my example, I am controlling the fan speed for the blower of my wood fireplace insert.

I want to be able to control the fan speed depending on stove temperature as well as time of day.  In addition, it’s helpful to have a display that graphs the stove temperature for the last couple of hours.

In the prototype, I am showing the time, and blower exhaust temperature in Celsius and Fahrenheit. This forced air is used to heat over 1000 square feet from my fireplace insert.

Modules visible are the arduino UNO, AC fan speed controller, DS3231 real time clock module, 2×16 LCD display, thermocouple interface and 128×64 OLED graphic display. Usually, the graphic display shows a gradual curve as a piece of wood burns.

My next step is to combine the two displays into one 320×240 display (code already written) and put the historical temperature data in the cloud.

Case Study: Off-The-Shelf Parts Make for Rapid Prototyping

 

Optimal Plant environment controller

Off the shelf components make for a quick prototype

My client wanted to be able to monitor a number of environmental parameters and then respond by turning pumps, fans and heaters on or off.  The end result was a optimal plant growth environment in a mini-greenhouse.

I had previously experimented with a odroid Show2.  This Arduino  Uno type device features a 2.2 inch, 240 x 320 pixel display, 3 switches, 3 LEDs, LiPo battery charging circuit, and a I2C breakout header.  There was also a daughter board that turned the Show2 into a weather station.

I realized that this could be the basis for a simplified version of the controller that my client was looking for.  By adding additional I2C sensors, and a I2C to 8 bit output, I could take the required readings and turn up to 8 relays on and off.

The client had been working on getting a Beaglebone Black programmed as the brains, but progress was slow.  By implementing this “quick and dirty” off-the-shelf prototype, we got a test bed that allowed for faster design considerations.   This then gave the project the momentum needed to then make rapid progress.

Arduino IDE and open source rocks!

Refer to the above picture for described function:

Not numbered is the “octopus” I2C patch board in the middle. It distributes the I2C bus which is controlled by the display board to the various sensors and outputs.

1. The odroid Display2 is running the (slightly modified) weather program. In this example it is powered by a battery that is glued to the back of the display.

The display is showing the current values from the 3 weather board sensors. Those readings are the “indoor” temperature & humidity, ultraviolet & visible & infrared light levels, temperature (again in both Celsius and Fahrenheit) & pressure & equivalent altitude in feet.

2. Real time clock (RTC) module with button battery. I add this so that the Arduino specs are consistent with Beaglebone specs. Note that the RTC battery typically has a life of 2 to 5 years – at which point it needs to be replaced.

3. The weather board has been relocated from it’s designed position as a daughter board to the display board to a leg of the I2C patch panel. It has the sensors that are currently showing on the display board. The fact that the sensors read correctly indicates that the I2C bus is working properly with the approximately 11 feet of wiring shown in the picture. Although the I2C buss was originally intended for communication between different corners of a PCB, it appears it can be used for longer distances too.  At some point I may go back and see how far I2C can practically reach.

4. “Water” temperature sensor. Note that it needs to ruggedized. My intent was to mount it to the outside of the water storage bladder that is in the base of the greenhouse and cover it with a spot of insulation.

5. “External” visible and IR light sensor. As an alternative, this could be the internal sensor because it does not measure UV. The weather board light sensor DOES measure UV. This is significant because the UV will not penetrate through plastic, but it may be helpful to know the UV level “outside.” Personally, I use the UV sensor as guidance for how long to stay out in the mid-day sun.

6. Relay board. The I2C port extender board connects to the relay board with 10 (8 signal + 2  power) wires (not shown.)

7. Ruggedized soil humidity and temperature with 3 foot cable. Adafruit cautions that this $50 sensor should not be immersed in water for more than an hour.

8. Ruggedized “External” air temperature and humidity with 18 inch cable. This is a $30 sensor.

 

A Quick and Dirty PCB Production Technique

Back in my teens, I experimented with etching my own PCBs.  I would draw the circuit with a permanent marker.  The thick ink traces acted as a etch resist.

The 21st century  upgrade to this technology is the toner transfer method.  You print your PCB on a piece of paper.  Then you use a clothing iron to transfer the toner from the paper to a copper board.  The toner acts as a etch resist and you etch away the rest of the copper using the same chemical process I used decades earlier.

So, how well does this work?

I joined a class given at the Solid State Depot to find out. The instructor was John English and he has the project on github at
https://github.com/johnisenglish/ssd_blinky

We built up the board, but could not get it programmed within the time limits of the class.  So, it sat, collecting dust for months until I had the time to have another go at it because I wanted a Christmas mood light project.

It turned out that  in order to get the ISP (In System Programmer) to work, I need to fix a trace routing mistake.  Specifically, I cut the trace show below the “e” of “Cut Trace” in the picture.  In place of the cut trace, I ran a fine green wire from point 1 to point 2.  By the way, the wire is made with special insulation that melts cleanly when heated with solder.  I’ve not been able to locate more of this handy wire in over a decade.

SSDBlinkySm

Once I got board debugged, I decided that the RGB light would make a great mood light.  Sure, you can get mood lights cheaply from eBay, but I wanted to program a mood light with my own artistic flair. Specifically, I wanted to explore the balance between randomness and predictability for the perfect hypnotic effect.

Fortunately, the Arduino IDE has been extended to work with the blank chip used in this project. Programming was done over the ISP interface once the board was debugged

Because the Atmel 2586 AVR chip only had two timers and a RGB LED suggests the need three timers, I decided to do the pulse width modulation entirely in software.

I wish that I could show the arduino wiring code with all the pretty color enhanced highlights from the arduino IDE.  I was aiming to create a hypnotic, flickering mood light.

/*
RGB Mood light using SSD Blinky board – Mike Seiler
*/

#define GREEN_LED PB0 // Green LED
#define BLUE_LED PB1 // Blue LED
#define RED_LED PB4 // Red LED
#define UP 1 // Increase pulse width
#define HOLD 0 // keep pulse width the same
#define DOWN -1 // decrease pulse width
// randomly choose to increase, hold or decrease pulse width.
// this creates flickering fades of one color into another.
unsigned short color_direction( unsigned short direction){
long val;
val = random()%8;
if (val==0) direction = UP;
if (val==1) direction = HOLD;
if (val==2) direction = DOWN;
// Serial.println(direction);
return (direction);
}

// standard arduino function
void setup() {
// initialize serial and wait for port to open:
Serial.begin(9600); // for testing code

DDRB |= (1 << GREEN_LED); // LED green Pin set to output
DDRB |= (1 << RED_LED); // LED red Pin set to output
DDRB |= (1 << BLUE_LED); // LED blue Pin set to output

// send an intro:
Serial.println(“\n\nMood light test:”);
Serial.println();
}

void loop() {
unsigned short red_direction=1, green_direction=1, blue_direction=1;
unsigned short red_level=40, green_level=1, blue_level=20;  // initial values
char teststring[20];

while(1) // do forever
{
red_direction = color_direction(red_direction); // randomly change red pulse width
red_level += red_direction;
if (red_level > 252 ) red_direction = DOWN; // “bounce” off limits
if (red_level < 3) red_direction = UP;

green_direction = color_direction(green_direction); // randomly change green pulse width
green_level += green_direction;
if (green_level > 252 ) green_direction = DOWN; // “bounce” off limits
if (green_level < 3) green_direction = UP;

blue_direction = color_direction(blue_direction);// randomly change blue pulse width
blue_level += blue_direction;
if (blue_level > 252 ) blue_direction = DOWN; // “bounce” off limits
if (blue_level < 3) blue_direction = UP;

sprintf(teststring, “%d %d %d”,red_level,green_level,blue_level); // for testing
Serial.println(teststring);
delay(100);
}
}

 

 

 

This is the Golden Age of Electronic Tinkering

Moore’s Law is an observation that the number of transistors on a chip will double every two years. Or put another way, it will cost half as much for a given number of transistors every two years.

In the 3+ decades that I’ve observed the electronics industry in, I continue to be amazed at how Moore’s Law has profound implications for… just about everything. Now, this statement deserves it’s own blog post, but let me stay on point and give an example of how it has made electronic tinkering so much fun.

Case in point

Ordered upconverter from ebay last April because it was so cheap, I wanted to have one handy because I might need one some day.

Also, got LiPo battery, holder and charger from Sparkfun because it might be useful some day.

At the Solid State Depot, I saw Santa hat with RGB LED lights.

I had just happened to have just programmed a hypnotic RGB mood light on a PCB.  Now could I make this all portable?

Bada bing, bada boom – I hooked up the charger and upconverter to the LiPo battery so I could power the RGB LED mood light PCB.  Almost instantly, I had a very useful rechargeable project I could slide into the brim of a Santa hat.

As a final thought, I should mention that Moore’s law is gradually taking over areas beyond computers.  Audio, photography and telephony have already succumbed.  Transportation, and various areas of expertise appear to be next.