Digistump Forums

The Digispark => Digispark (Original) Support => Topic started by: Faust-cls on August 21, 2017, 09:33:46 am

Title: Beginner: Help with LED Strip Project
Post by: Faust-cls on August 21, 2017, 09:33:46 am
Okay, this may sound rather odd.

Although I have *some* coding experience (a time long long ago, and even so very rudimentary), I am effectively absolutely clueless about this project I am undertaking. So I come here to seek advice and support, in terms of what I (will) need to pull it off.

I am trying to create a special gift, and basically it will include a whole host of DIY skills. I will be creating a selenite obelisk (gypsum crystal) on top of a wooden box, which in turn will reflect the light from 2 (two) RBG LEDs (SMD 5050).

Although I contemplated doing something fancy (e.g. add a button to allow to swap between light presets, etc.) I have decided to keep the project fairly easy to avoid disappointment. So the only thing I intend to do is program a control board (Arduino-based) to independently control each SMD 5050 LED. To keep things even more simple, I do not intend to have these RGB LEDs switch between all colours, or do otherwise anything too complex. I simply intend to identify 3 nice hues (e.g. pink, purple, red) and fade the colours from one of these three hues to the other. I understand that keeping the RGB LEDs connected to each other will simplify things, but I want to be able to independently send different hues to each of them. So, for example, when LED A is pink, LED B could be red. I do not mind if both LEDs have effectively the same code, only with a minor alteration to permit them to cycle through these hues at different times. The optimal use would be to simply plug the USB cable to a power source, and then the LEDs would start cycling between the colours indefinitely. Nothing fancy, no actual variation, etc.

To keep my running costs low, I have identified the Digispark development board which seems to provide enough, as well as enough simplicity, for my needs.

I am also buying the following LED strip: http://www.ebay.co.uk/itm/like/322579544788?chn=ps&dispItem=1 (http://www.ebay.co.uk/itm/like/322579544788?chn=ps&dispItem=1).

Effectively, while I understand the basics of my task, I am not quite sure how to get there. I can navigate myself around basic code, as I said above, but I have never actually done anything like this. For example, I am not even sure how to approach soldering wires to which connectors, etc.

So here are my questions:

1. What else will I need? I have seen others use transistors (eg MOSFET). (Why) do I need one? Does that mean I will have to also purchase a mini breadboard?
2. In relation to (1) -- I will require a power source. I thought originally of recycling the USB power source that comes with the LED strip, but then I realized that it (probably) is 12V, and will fry the Digispark (5V). So I will need to figure out a way to power both the Digispark and the two LED strips from a singular power source. Can you also help me in regards to this obstacle?
3. As far as I understand (and I really don't!), I will require to connect the power from the two LEDs directly to my power source (I will not be powering them from the Digispark, as I am not certain whether it can actually do that), and only connect each RGB channel to available IOs on the Digispark. Since I want to independently control each LED strip, I will have to solder these RGB channels on to 6 IOs. Luckily that's exactly how many the Digispark has. I understand there is a limitation in terms of USB, but I do not intend to program it to use the USB in any way, so it will have enough IOs for my needs. Then, after figuring out the connections, it is a matter of programming it to achieve the desired effect. Of course, that's easier said than done.
4. Could someone provide me with a simple schematic of how to solder every wire appropriately?
5. The Big Question: Ultimately, I am not quite sure how to proceed, other than trial and error. Could someone who understands my basic project intentions, give me some heads up in terms of what I will need? Originally I thought it was as simple as soldering Digispark's IOs to the respective RGB solder contact points on the LED strip, figure out how to power it, and code the colours. But I suspect I will require other components, such as the transistors I highlighted above.

If it matters, the finished item will be used in EU/UK.

All in all, I am happy to make this a learning project. To you it might sound very simple, but to someone with no working experience of this, it does sound a bit daunting. Any help or advice?