Random Developments And Random Toys

(Not so) interesting I2C PWM RGB led driver NCP5623

I was looking to something that could offload doing PWM from microcontroller + save precious I/O pins and found NCP5623:

Triple Output I2C Controlled RGB LED Driver

The NCP5623 mixed analog circuit is a triple output LED driver dedicated to the RGB illumination or backlight LCD display.

Sounds great, by my TL/DR of the datasheet would be: 5 bit PWM resolution is not enough if you plan doing artsy slow dimming.

Learned the hard way by actually getting parts + TSSOP−14 breakout to build test circuit. Slow fading is visibly choppy, 32 levels of brightness is just not enough.

But still, it’s an interesting chip.

First board from Oshpark

Expectation (the amazing KiCad 3D preview):

First board visual

Reality:

First board result

ESP8266 OSC to MIDI WiFi bridge for TouchOSC: laying out the PCB

Finally found some time and inspiration to continue working on this small project and prepared the schematic + PCB layout using KiCad EDA.

And before I get my first PCBs (from Oshpark) to actually build and test it, I wanted to share some thoughts about KiCad as a newbie who barely did any EDA work before.

For starters - schematic capture is easy and straightforward. Most generic components come with the standard library. Interface can look a little awkward, but works great once you start using keyboard shortcuts. Those are always accessible via <shift> + ?.

To get an idea of my project’s complexity (or rather lack of it) here’s the schematic:

ESP8266 OSC to MIDI wifi bridge

Footprint assignment is tad painful unless you really know what component packages you will be using. Most of the time I go through various footprints and need to see the preview to understand if it’s what I want. That can be slow - there’s no immediate preview box and clicking icon for preview is not terribly convenient. This is likely thing to change in KiCad v5 which is not too far from first stable release.

Laying out the PCB is fun and trouble free most of the time. The two biggest issues I bumped into were:

  1. From time to time I manage to move grid reference without even realising it. By accident, and I don’t even understand how.
  2. This wasn’t an issue in this project but assigning network class (e.g. signal vs power) is quite clumsy. But maybe I’m just missing some workflow trick?

To someone not used to eyeballing CAD drawings (or engineering drawings in general) KiCad’s circuit board 3D preview is indispensable:

ESP8266 OSC to MIDI wifi pcb

Overall I’m really happy with KiCad. With continuous support from CERN and (recently) Digikey KiCad’s future is looks promising.

ESP8266 Strava running stats display (again)

Since ESP8266 is cheap as chips (quite literally - less than £2 a pop) I got a handful and started re-building previous breadboard mockups.

Excuse my savage ways of building stuff, but here’s my second iteration of the Strava running stats display:

ESP8266 Strava running stats display ESP8266 Strava running stats display

Mildly interesting: most of hobbyist friendly through-hole regulated power supply ICs cost more than ESP8266 ESP-12E.

ESP8266 OSC to MIDI WiFi bridge for TouchOSC

One more quick & dirty ESP8266 mockup: Open Sound Control to MIDI bridge. And this time ESP8266 runs as a WiFi access point to your mobile device (phone or tablet) sending the OSC messages (with TouchOSC for example):

ESP8266 OSC to MIDI WiFi bridge for TouchOSC

Source code available on GitHub: https://github.com/tadas-s/OSC2Midi

Combined with TouchOSC this can provide an additional very configurable control surface for one or more synthesizers (or pretty much anything with MIDI I/O).

Similar devices already exist but with ESP8266 it could be as cheap as £15 DIY kit compared to £50 - £150 range (I also cannot really find anything that can act as WiFI AP instead of attaching some kind of bridge adapter to the mobile device).

And here’s a quick demo video:

Currently (as mentioned) it’s only a mockup, but could be easily fit into a box about twice the size of 9V battery (including the battery).

ESP8266 OSC to MIDI WiFi bridge for TouchOSC

Another thumbs up to Espressif for such a cool system-on-a-chip!