USB Power Controller

Tell us about your projects. Update us regularly.
Post Reply
parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

USB Power Controller

Post by parkview » Fri Mar 06, 2020 10:18 am

A string of LED fairy lights draw around 750mA. I haven't counted the number of LED's, but there is quite a few of them running in parallel. The ones we have don't do anything, they can be either off, or on, but they do look pretty. While you can buy controllers for them, I thought it might be fun to try and build my own controller for them. Ideally, they could be controlled via your mobile phone via the Blynk App.

Since I have been working on power monitoring, I thought I might as well throw some of that in as well. This is what KiCAD says the board will look like:
LED-String-USB-Controller-V1.0_PCB.jpg
LED-String-USB-Controller-V1.0_PCB.jpg (195.47 KiB) Viewed 7213 times
Since I have a level conversion chip in stock, I threw in a RGB Neopixel output port as well. This board will allow me to control up to 3 strings of 5V powered LED's. It does include a i2s powered MEMS microphone, so hopefully I might be able to have the strings of LEDs interact with the surrounding sound. There is also a 6DOF IC (accelerometer/gyro) included on the board to sense changes in rotation etc. This version of the board will need to be programmed via the serial port.

parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Re: USB Power Controller

Post by parkview » Mon May 18, 2020 5:42 pm

The PCB arrived back from manufacturing. The INA193 current sensors still have arrived, but I have received a free sample from TI. The ESP32 controllers have arrived either, so I hot-plated one from another spare dev board I had lying around. There where only a few blobs of solder over a few of the finely spaced pins on some of the components. These didn't take long to clear up with a bit of solder wick.
LED USB Controller_sml.jpg
LED USB Controller_sml.jpg (59.2 KiB) Viewed 6493 times

The board worked straight up so it didn't take long to write up a simple Arduino program to cycling the different Ports and LEDs. You can see a video of it here: https://youtu.be/LcAgjnQS9Js

I already have a lot of ideas and features for the next version of this PCB :D

parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Re: USB Power Controller

Post by parkview » Fri Oct 23, 2020 10:29 pm

There prototype board ended up with a few fixup wires, but I eventually was able to get the IMU MPU6050 6DoF IC and the SPH0645 MEMS Microphone recognised via Arduino software. From there it was then time to plan out a new revision of the PCB.

This time, I shrunk the PCB real estate to as small as I could using a 2 layer PCB. I added a few extra features:
  • an extra RGB outlet
  • RGB LEDs can run from external or via USB port power
  • added a i2C LUX sensor IC
  • removed the INA193 current sensors on the outputs, and added the i2C INA219 current sensor on the USB input connection
  • added lots of handy text into to the back of the PCB
  • added a USB based serial programming port
  • added an OLED screen pin header. This is handy for Dev and debugging work.
  • added a vibration motor plug port. Haptic feedback could help with syncing body movements to LED display paterns.
I managed to shrink the PCB down small enough so that I could panellize two of them into a 66mm x 98mm panel:
USB LED Board 3D Front.jpg
USB LED Board 3D Front.jpg (145.13 KiB) Viewed 5074 times
USB LED Board 3D Back.jpg
USB LED Board 3D Back.jpg (119.34 KiB) Viewed 5074 times

parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Re: USB Power Controller

Post by parkview » Sat Feb 27, 2021 1:53 pm

I titled this forum post: USB Power Controller, but a better title might be: USB LED Controller, as this ESP32 based board will control up to 3 strings of USB 5V fairy lights and 2 strings of WS2812 RGB LEDs.

In this next version 1.2 of the PCB, I have fixed a footprint error and a double cross over of the Tx/Rx lines. Luckily I had placed two 0402 0 ohm resistors as jumpers, so I could use those pads to uncross the lines. The Lux sensor works well, but it sits under the OLED screen, so I have brought it out into the middle of the board near the Microphone. I changed all the resistors down from 0805 to 0603 and a few of the 100nF capacitors have been downsized as well. This has helped me make some more space to run ground isolation/separation lines between some long signal runs. I added more data information to the back of the PCB to help the programmer out. The OLED screen is a handy debug tool and maybe might be handy in production, so I added a 2.7mm mounting hole for it. It would have been nice to shrink the PCB down a bit more, but it's very hard to do on a 2 layer PCB.

A few days have been spent coding up some extra test functions for each of the sensors. This is going to be a fun board to play with, so I have ordered 20 PCB's (10 x 2 panels). I have picked up some cheap KMart 3V-5V LED strings to use in various projects I have in mind.

Front side:
USB LED Controller V1.2 with no OLED Screen.jpg
USB LED Controller V1.2 with no OLED Screen.jpg (108.11 KiB) Viewed 4812 times

Backside:
USB LED Controller V1.2 with no OLED Screen - back.jpg
USB LED Controller V1.2 with no OLED Screen - back.jpg (103.04 KiB) Viewed 4812 times

parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Re: USB Power Controller

Post by parkview » Fri Jan 14, 2022 5:20 pm

Looks like I forgot to blog about V1.2 version of the board. I made it up in the first half of last year:
USB-Power-Controller_Front_V1.2_sml.jpg
USB-Power-Controller_Front_V1.2_sml.jpg (77.03 KiB) Viewed 4000 times

Everything seems to work on the board and it's been fun to play with, but to show off it's capabilities, I need to bring along a plethora of strips of LEDs and cables etc. So to get around all of that late last year I designed up a simple LED shield for it. I had it made with black soldermask, so as to distinguish it from the white controller board. It just has a bunch of plain LEDs and some WS2812 Neopixel RGB LEDs:
BlankDemo-PCB.jpg
BlankDemo-PCB.jpg (69.77 KiB) Viewed 4000 times
It connects to the above controller board via some 180 deg. USB plugs that I found online at Aliexpress:
180-deg_USB_sml.jpg
180-deg_USB_sml.jpg (35.85 KiB) Viewed 4000 times

Post Reply