DimmableLED light circuit and sketch (used for Kitchen Cabinet Lighting)

@hek

So when do we start a custom PCB design thread?!?

I just snooped around the internet a bit and I didn’t realize how ridiculously affordable custom PCB’s are. Also found a site with free design software.

Thanks for planting the seed @rosskinard! I have no idea what I’m doing with this kind of stuff, but I can tell I’m going to be spending lots of time on it now.

[quote=“rosskinard, post:38, topic:179597”]Here’s a 4-channel LED control board layout for existing setups…this one doesn’t house the Arduino + WiFi nor does it have the power regulators…

6 pins for input: 4 channels (RGBW) and 2 power (12V and GND)

Compact board taking 4 MOSFETS, 4 of the 2-screw terminals, 8 resistors and 6 header pins (group of 4 and 2)

I haven’t ordered any prototypes of these yet…will cost $8 to get 3 boards made, then the cost of the parts.

Approx 1.35" x 1.35" (34mm x 34mm)[/quote]

I’m just curious if you’d be willing to have the boards made and sell them or if you could release the layout so others could have the board made. I am very interested in doing a RGBW for behind my bathroom mirrors as accent light (and for some other “information by color” features, like weather forecasting and outside temp).

I’m not sure how good my soldering skills are, but I’m sure if I could get a few boards I could figure it out.

Thanks all

These designs are pretty much done around my own wants/needs of this project, but I’m trying to make them usable for others should they be interested.

If they work properly, I’ll set them as shared designs on the prototyping site and give you guys links so you can select and order them. The site I’m using charges $5 per square inch of PCB space and that gives you 3 copies of the design also…I got the link from one of the Lady Ada reference pages.

It’s a shared/panelized fab setup…so you submit your request and once they have enough orders to fill a panel, they send it off to build.

I use Eagle Pro for the PCB creation and this site allows me to upload the full BRD file for processing…I don’t have to fool with using the CAM processor to generate all the outline/pad/mask/drill files needed.

http://oshpark.com

Selling them is a tempting thing since I’d use it to fuel even more tinkering, but if it wasn’t for everyone here giving their time and effort freely then these PCB ideas never would exist in the first place…so it’s only right to give back to the community.

Here’s a list of some of the other PCB designs I’ve been tinkering with:
Powered Mini Pro sensor board - DC input jack for 7V-20V input, regulated down to 5V and 3.3V for the Arduino and RF card. 6 digital pins and 8 analog pins, each with a GND and 5V pin to power a sensor
Compact Nano-based sensor board - 2-pin right angle header for +5V and GND. RF card slot. Header pin row with all 8 analog and 6 digital, but only a single 5V/GND combo for sensors. (Done since the power comes from the Nano and needs to keep the draw low.)
Compact Power Regulator board - no-DC jack…just 2 wire points in. Output wire points for GND, 5V and 3.3V.
Nano Gateway board - Setup for a Nano, RF card, Inclusion button and 3 LEDs. Hopefully I got the spacing close enough so people with the full antenna version of the RF card can use it too. I don’t have that card so I couldn’t design the board dimensions around it. If it doesn’t work, maybe a Rev 2 could be made. If I ever pick up the Ethernet component I might design one to support that instead of the Nano/USB config so options exist.

@rosskinard

Would be great if you could share the PCB designs at forum.mysensors.org also (when you’ve had time to verify them).

Thanks
Henrik

@ rosskinard

I think there would be a lot of interest in the gateway card you have planned as well. I would definitely be interested in one of those too!

[quote=“Vodden, post:45, topic:179597”]@ rosskinard

I think there would be a lot of interest in the gateway card you have planned as well. I would definitely be interested in one of those too![/quote]

I will actually have 2 additional gateway boards since I’m getting 3 and only need one. If mine works, I could solder the LEDs, resistors, caps and socket for the Nano in and maybe sell them for the parts cost plus a little time.

Just drumming my fingers and waiting for all this stuff to arrive.

[quote=“rosskinard, post:46, topic:179597”]I will actually have 2 additional gateway boards since I’m getting 3 and only need one. If mine works, I could solder the LEDs, resistors, caps and socket for the Nano in and maybe sell them for the parts cost plus a little time.

Just drumming my fingers and waiting for all this stuff to arrive.[/quote]

Putting it all together is the best part
If you are willing to part with a naked one, I call dibs ;D

[quote=“rosskinard”][quote=“Vodden, post:45, topic:179597”]@ rosskinard

I think there would be a lot of interest in the gateway card you have planned as well. I would definitely be interested in one of those too![/quote]

I will actually have 2 additional gateway boards since I’m getting 3 and only need one. If mine works, I could solder the LEDs, resistors, caps and socket for the Nano in and maybe sell them for the parts cost plus a little time.

Just drumming my fingers and waiting for all this stuff to arrive.[/quote]

If you do that I’ll pay you for parts and your time. I’d prefer both but would be OK with only one if someone else needed it. Work is killing me right now and with the baby its just left me with little time for this stuff no matter how much I like doing it. I already have a project for both too.

Sent from my Nexus 7 using Tapatalk

It cost me $14.65 to have them fab 3 of the boards…so roughly $4.88 each.

If Vodden wants a bare one that’s fine…nothing magical about them, just make sure the resistors for the LEDs are adequate for the color/size used.
10K resistor on the Include button, which is a normal momentary contact switch

The Nano will need 2x 16-pin inline sockets with one shaved off…I haven’t found any 15-pin inline sockets that would allow a perfect match for the Nano’s config.
Need a 2x4-pin socket (or 2 1x4 sockets) to solder in for the WiFi card.

Attaching a preview of the board top.

Just got an email from the vendor saying the boards were back from their fab plant and are shipping out to me today via USPS.

They had estimated the 20th, so this is 4 days sooner than expected. I’ll update once I get them in and post some pics.

Sweet!

I will def take one off your hands when you’ve got 'em all tested. PM me your address, let me know what I owe you with shipping and I can Paypal you the $. I’m in no big rush for it since I have most of my parts coming over on the slow boat from China, so regular USPS to Canada (where I reside) is perfectly fine.

I will PM you my address when you give me the green light that they are all good!

So as you mentioned earlier, the website that you will share the design on once the boards are verified is the OSH Park link you provided below? I am interested in the RGBW PCB you posted earlier, and would take a bunch of 'em. It sounds like I’m not the only one interested in these either.

Thanks again!

According to the tracking numbers, USPS expects to deliver all the different boards tomorrow. Hopefully they will arrive so I can put a few together and see how they all work.

Ross is kicking some serious PCB butt these days :slight_smile: but I thought I would share the dual and quad board designs for the DimmableLED that I have been designing as a background task while helping Henrik with MySensors mainline tasks. The circuit is similar to Ross’ RGBW daughter card but uses SMD components and provides a power sensor for computing true energy usage to report back to the gateway as Watts/KWh (how much energy are my strips using?). Because SMD soldering can be a bit more difficult and require more specialized soldering tools than through-hole, I think it will be good to have multiple community designs available for varying skill levels. And or course, I will be happy to share everything I have developed, once I complete the test/debug phase.

This is the 4-channel board that I had designed that doesn’t include the Arduino…it’s similar to Bruce’s in the fact it takes a 12VDC power source and 4x PWM inputs from whatever Arduino you want to use…just be sure you have a common ground between the 4-channel board and the Arduino.

I haven’t done a 2-channel version, but it would be easy.

This design uses standard components, not SMD so it’s easier to assemble. The MOSFETs I use are rated for 30 amps each, which are way beyond what the power supply could provide. Should be ideal for driving 2 of the 5m LED strips…any more than that and voltage drop would make them look bad…you could use a repeater without issue.

This board is about 1.3 inches by 1.3 inches…cost is $8 for 3 of them.

I haven’t ordered prototypes of this board yet…

Thoughts?

(I’ve ordered prototypes of the Arduino RGBW boards with some design changes based on the 1st attempt. Also changed from a Mini Pro to a Nano as the processor. Will update when those arrive.)

[quote=“rosskinard, post:54, topic:179597”]I haven’t ordered prototypes of this board yet…

Thoughts?[/quote]

Once again, nice work. Tidy and functional. Personally, I think that I would prefer the version with the Arduino and RF module mounted together, but as an expansion board, this is pretty nice!

Curious why you decided to switch from the Mini Pro to a Nano? (mainly because I have 10 on order lol)

2 reasons…

  1. The Nano seems to have a consistent pinout…no matter who made it it has the same config. The Mini Pro can vary on the pin configs…I have 2 different ones. Granted, it seems that the 12 pins on the main rows all seem to be the same (only some of the analog pins and and grounds move around internally) so just designing for those would be likely to work fine.

  2. The Nano has a voltage reg on it, so I cut the power regulation circuit in half by removing the 3.3v part. The Nano has a 3.3v output pin so it can supply the radio power. I just left the 12V to 5V circuit on there.

Also…out of 6 Mini Pros I have…2 are malfunctioning…of the 4 Nanos I have they all work…so it felt like the more expensive Nano was more reliable.

I’m sure I’ll make a Mini Pro board too…

Now that I’m back in the working world…once I have some savings back in the bank I’ll be far more likely to design and order a prototype for $10 or $15 without a second thought.

So would you be able to solve the pro mini pin config issue with a couple of jumpers? 2 sets of 3 pins in a row with the two board outputs to the centre pins, and the outside pins set up so a jumper from the centre can choose one config or another? I have zero experience with PCB’s but it seems to be a viable solution.

Sent from my iPhone using Tapatalk

Here is the final board rev that I plan to order for testing at a cost of $7.70 for three boards. I am going to build a dual first and if it passes testing, I will build a quad. I will use them to develop an enhanced DimmableLED sketch that will also support Ross’ boards/circuit design (Ross, it would be great if you would be willing to collaborate on and test the sketch on your boards when I am ready).

The new board has the following changes:

[ul][li]Added 24 V DC support[/li]
[li]Adds a 5V DC out via an LM7805[/li][/ul]

Here are the pertinent specs:

[ul][li]12V and 24V DC input/support[/li]
[li]Power sensor (both voltage and current)[/li]
[li]Dual LED Strip support[/li]
[li]5V DC out to power companion Arduino/NRF24L01+ board from same 12/24 VDC input[/li]
[li]Approximately 1.2" square[/li][/ul]

Hey Bruce…how goes the work on the sketch? I ordered and got in a my Rev 2 RGBW board and after much fighting I realized I was off on the radio pins…side effect of converting to the Nano and not paying enough attention when resetting the paths. So I have 3 bookmarks now once I desolder the components from the one I put together.

I think one of my next purchases a few months from now will be a 40w CO2 laser. For engraving switch plates and enclosures with labels and instructions, engraving metals like my iPad/iPhone/MacBook Pro, and cutting materials like acrylic and wood.

I mention this because I think it’d be great for cutting out a stencil mask for SMD soldering. Just cut all the SMD pads out of a piece of thin polycarbonate and align it on the PCB, then squeegee the solder paste on. Carefully place the SMD components on then pop it into a modified toaster oven to reflow everything and bond it.

I’ve ordered some new Mini Pro sensor boards I revised and a 4-channel LED board…basically the output half of my original design. Cheaper to build and test it in halves then combine the two into a single, more expensive board than to end up with $20 in scrap like I did with the V2 boards.

Bruce,

I was finally able to build a sensor using your sketch. It’s awesome, thanks!

One question though, do you (or anyone else out there) have any idea why I can’t add a motion sensor to the sketch? When I tried to add combine your code with the motion sensor sketch it stops dimming the leds. The motion sensor works fine though. Maybe the motion sensor is prohibiting communication with the Vera? I tried to figure it out but I couldn’t. Here is the code that is causing the leds to stop dimming:

// Read digital motion value if(digitalRead(MOTION_SENSOR) == HIGH){ boolean tripped = true; Serial.println(tripped); gw.sendVariable(MOTION_CHILD_ID, V_TRIPPED, tripped?"1":"0"); // Send tripped value to gw } }

I have attached the full code as a txt file. (It still needs to be cleaned up after combining).

Thanks,

Pete