Tired of playing with safe, low voltage, dev boards? Want complete control over your AC powered device. How about WiFi programmability, remote logging, integrated temperature sensing, an LCD and more!? The PowerCore is what you need!
This blog post covers the features of the PowerCore and walks through the story of why and how it was developed.
It all started with my personal need for a soldering reflow oven. I was working on the design of a machine vision camera and needed to solder some BGA components. I knew it's possible to solder these with hot air (and have done so in a pinch), but I always ended up melting connectors. Better to have a proper temperature controlled soldering reflow oven. This lead to the creation of the FluxLamp, which was the starting point for the PowerCore, but more about that in a minute.
First, if you're interested in ordering a PowerCore, to build your own FluxLamp or develop a different project, you can sign up to be notified when the Indiegogo campaign launches using this form: https://goo.gl/forms/NL6RoZNbVZ8R6ZUR2
If you are interested in receiving a prototype for testing and review, please contact me.
Anyway, back to the FluxLamp, in my search for the optimal soldering reflow oven, I was trying to choose between building it myself and buying something off the shelf. A quick search revealed that the least expensive and most popular hobbyist-grade soldering reflow, the T962, had some issues. Many people reported having to make fixes and modifications to get these to run correctly, like removing toxic-smelling insulation tape installed by the factory. Even then, it was expensive and not hacker friendly. I then looked into building my own reflow oven and I found several designs that use Phase-Fired control to precisely temperature control an oven or lamp. The problem with building one of designs using my normal perfboard strategy was that connecting a hand solder (probably incorrectly wired) prototype board to AC just did not seem like a safe idea. Moreover, they all required an AC connection as well as an external DC power supply. Out of the desire for a safer, hacker-friendly embedded development platform that can be connected directly to AC power without an external DC supply, the FluxLamp and eventually, the PowerCore were born.
Let's take a moment to look at the design. Two microcontrollers (MCUs) are used:
An ATmega328p running at 16mhz
This the primary application processor, 5v tolerant and compatible with the vast array of Arduino libraries.
Sketches for the Arduino Uno, Arduino Nano and Arduino Pro Mini will all work on this processor, with the appropriate pin changes of course.
An ESP8266 wireless-enabled microcontroller.
This MCU is used for wireless control, logging and updating firmware on the main MCU.
There is a web and command line interface that allow easy remote control of the PowerCore.
The ATmega328p is an older 8-bit device (relative to the plethora of 32-bit devices available today) however, it is extremely robust. From power considerations to the GPIO tolerance, this device is rugged. Even more importantly it's compatible with the entirety of the familiar suite of Arduino libraries and tools.
It was an intentional design choice to use 2 microcontrollers are instead of one WiFi-enabled MCU. The idea is to to increase the overall robustness of the system. The ESP8266 is used primarily as a UART-based programmer and a WiFi to UART communication device using a slightly modified version of the surprisingly powerful esp-link firmware. The idea here is that by separating the firmware update process into two devices (WiFi vs. application MCU), we can easily update the application on the Arduino ATmega328p without risking breaking our WiFi connection and vice versa.
In practice this works quite well. The ATmega328p can be easily re-programmed via WiFi, without being close to the device. Remote logging works the same way, via the ESP8266. In earlier versions of the PowerCore hardware design, there was no WiFi link, and re-programming the Arduino application on the device required a physical UART connection between the computer and the PowerCore. This works fine if everything is on the same desk, but when the PowerCore was deployed somewhere less accessible, it can be very difficult to update the application firmware.
Finally, firmware updates and remote logging are not the only possibility for WiFi. Arduino applications can communicate via the ESP8266 network stack using a modified version of the ELClient library and host firmware, which I've gone ahead and integrated into the PowerCore fork of esp-link. The wifiinfo
sample app shows how to use these tools.
The features on the PowerCore were driven by the needs of the FluxLamp, but there are many more interesting applications that I hope to work on in the future. I also hope the community will find some inspiration from this work to develop new projects! To better understand the capabilities of the board, let's dig into what's included. It's also important to note that while some sensors or peripherals are not included, all the ESP8266 and ATmega328p pins are broken out onto 2.54mm headers for easy access.
The PowerCore board features a 600 volt, 8 amp triac paired with an AC input optocoupler, allowing for phase-fired control of AC powered devices. The phase-fired-control
sample shows how to use these components, as well as the encoder, to control an AC lamp.
To minimize the risk of shock while working with the board, a multi-part 3D printable case is available for free on Thingiverse. Since this is a development board, the case is designed to cover the high-voltage regions of the board while leaving low-voltage pins easily accessible.
There is an onboard 12v, 3W power supply, along with screw terminals for a power cable, so the board can be directly attached to mains voltage.
Along with WiFi enabled, web-based control and logging, an onboard 1.77" TFT LCD display and high-quality rotary encoder are provided for building user interfaces.
An integrated K-Type thermocouple-to-digital converter allows reading of a K-Type thermocouple temperature sensor. There are screw terminals for the thermocouple, which makes connecting it a breeze. Paired with the 12v power supply is a ~0.1A mosfet, which is enough for driving a small fan. The PCB footprint for this mosfet is suitable for mounting a much higher amperage device, in case you need to control something that draws more current. Prototype boards have a mosfet that can drive much larger currents, however these devices were quite expensive relative to the total cost of the board, so lower current devices will be used in product.
The software for the PowerCore is all open source (3-clause BSD) and includes a variety of sample applications. One, fairly complete application, is the FluxLamp firmware. Hardware designs will be made available to the community for personal use and companies wishing to license the hardware designs should contact me for details.
While the product is in beta, access to the source code is limited to developers and reviewers, but I would be happy to share it with you. Just shoot me an email. The source will be made public when the Indiegogo campaign launches.
Hardware development is hard. I'm a software engineer by training and in software, if there's a bug, it's easy to change the code and re-run. If a certain sub-system is broken, it can be commented out and re-run it. Doing the same thing in hardware is much more difficult, to remove part of the system it must be de-soldered. If you've lucky and have designed jumpers into your development board, maybe you can just remove the jumper.
You'll notice throughout the photos I have various different colors and graphics on the different PCBs. I went through 4 revisions before the final design. Not bad for the number of changes made at each iteration.
If you want to build a FluxLamp, checkout this post and if you would like to order a board, please let me know you're interested by filling out the form here: https://goo.gl/forms/NL6RoZNbVZ8R6ZUR2
I'm excited to learn how people like you will use the PowerCore to develop innovative projects!