PCB received yesterday

Follow up on my previous post about the new OAK version:

I received the new PCB yesterday with 2 good surprises. First, it only took 13 business day (19 days in total) for the board to be processed and delivered by dirtypcbs.com. Second good surprise, I received 15 board instead of the 10 ordered 🙂 (The proto pack at 15$ is normally for 10 PCB, but you might receive more or less board, typically 9 to 11 board).

I was a little bit worried when I first look at the board as it seems pretty tight but everything fit on the board as I planned, I’ll solder the first board this weekend and proceed to the first test.

The new OAK version on it’s way

I’ve backed the Digistump OAK project on Kickstarter last year and received the board. For those of you who didn’t ear about the OAK, it’s basically an ESP8266 but with an embedded voltage regulator (powered via microUSB), and a new bootloader designed by Digistump that allow to program the board over the air (thus avoiding the painful ESP flashing procedure…).

This tiny board also come with support of the Spark/Particle IOT API. Allowing the OTA flash and super simple control of your board from a website, Android/iPhone app, … More info:

One of my colleague want to use the RGB driver to pilot some light in his house, he doesn’t know a lot about electronic but he’s talented for programming.

That’s where the OAK fits right in, no complicated electronic stuff with some breadboard to flash it, simply use the Particle online IDE to write Arduino style code and reflash the board.

I’ve ordered the board recently from DirtyPCBs and hope to receive it soon 🙂

Here are the different GitHub for this project

Compare to the first version, except for the board change (ESP-12 to OAK), few change where made.

My colleague might use this as the principal source of light, that’s why one of the change is the addition of a fourth channel. It’ll be use to control a white channel, either for RGBW led strip, or for one RGB led strip + one separated white led strip. RGB strip are cool, but the white light they produce when set on white (all 3 channel ON) is pretty cold. Usually on the blue side, not really fit as a main source of light. The 4 channel, if you choose warm white, solve this. If you never heard of RGBW led strip, have a search for “RGBW” on AliExpress.com.

Next is an input used to turn the led on and off, my colleague ask me for this functionality as the “wife acceptance factor”. I’ve embedded an SMD push button and added some input pin to use a typical house wall switch, allowing to turn on and off the light in a more convenient way. It’s not defined yet if this switch will control the RGB LED or the white strip. I guess I’ll add a possibility to configure that from the app (either set the last used RGB value, the last used white value, or a full white).

Another change is the use of a dedicated Android app, the first version used Souliss, Souliss is great and full of functionality, but not really user friendly when it comes to setup. The new app will just need an email and password to retrieve the device list 🙂

OAK driver PCB front OAK driver PCB back

The first working output

Just a short post to show you the first iteration of this project, the driver on a perfboard. It’s ugly, especially the wire at the back, and I won’t trust it plugged h24 in my house but it does work. You can also use a perfboard to create the driver if you want to save the cost of the PCB but I would discourage to do so (except to play with it).

On the last photos you can see the prototype and the final PCB side by side as well as the schematic used to realise this prototype (the 2 capacitor are not represented, and not really needed…)

Not reaching it’s potential

It seems that I still have a problem with my hardware,  the led receive at maximum 8V…

I found that out after watching some videos online, my led strip was really very dim so I’ve searched the reason to that.

I’ve made some test, and if I provide 12V directly to the strip , it’s much brighter as you can (maybe) see on this picture:

Brightness comparaison

Something is definitively up here. I’ll continue my debug and keep you informed.

Edit: It might be the IRFZ44N MosFet that are not opening completely, their Gate Threshold Voltage is rated as being between 2 to 4V. The ESP8266 maximal output of 3,3V is maybe not enough for the one I got… I’ve ordered some IRLZ44N (Gate Threshold Voltage between 1 and 2V) and will install them in place of the IRFZ44N to see if it solve the problem.

Edit 2: After installing the IRLZ44N the problem is still there so I did some further investigation. Found out that I was the problem! The ESP8266 PWM value goes from 0 to 1023 and not 0 to 255… so my max value of 255 was the problem.

After modifying the max output for the LED control in the ESP software, they are now much brighter 🙂

Conclusion if you do something with the PWM output of the ESP pay attention to the fact that ESP use 10bit output whereas Arduino usually use 8bit output.

Get some inspiration

Before starting to create an RGB controller from scratch, I’ve searched on Hackadays to see if anything similar had been done till then. I had found a $5 Wifi LED Dimmer w/ ESP8266 from Tom Clement and fork his GitHub project to get started with. It’s a one channel LED dimmer but is very close to the design I needed.

So many thanks to him as I hadn’t to search for the ESP and DC-DC converter footprint in eagle and I reuse part of his design.

The MOSFET and LED strip driving part was greatly inspire by Adafruit RGB LED Strip guide, so thanks Adafruit for their good guide!

Get you started

To get you started with the ESP8266 you can consult the excellent website Arduinesp that have compiled excellent tutorial on how to start programming an EPS8266.

The ESP8266 come into different form that are name ESP1, ESP2, … to the latest ESP12e. In this project I’ll use the ESP8266 ESP12e simply because it’s the most complete of all (have the more number of GPIO) and more or less the same price as the older version.

If you don’t have one ESP8266 yet you can buy it in your local hobby shop, ebay, amazon or order it directly from china. I personally bought them on AliExpress, 10 pieces for 21,15€ (23,90$) and I also bought 10 IO extension board for 1,60€ (1,80$). The extension are not required if you order the PCB presented in the Hardware part of this website but they are convenient to start playing with the ESP. Each board was individually packed and was delivered in Germany in about 3 weeks… yes, if you’re in a hurry, order from a local dealer! I ordered one board from Germany to start with this project without having to wait so long.

Next you’ll need a way for your computer to communicate with your ESP, for that I use an FTDI adapter, again found on AliExpress for 1,85€ (2,12$).

To power the board and make some test on a breadboard I use a small breadboard power converter that convert 5-12V to 3,3V that cost only 0,75€ (0,86$). It’s pretty convenient as it deliver 3,3V and 5V and integrated a power switch. Don’t use the 3,3V power source from the FTDI adapter, it simply cannot provide enough power for the ESP8266 to run smoothly.