Notifications
Clear all

RGB Christams tree wiring  

Page 2 / 2
  RSS

robotBuilder
(@robotbuilder)
Honorable Member
Joined: 1 year ago
Posts: 502
2020-10-02 10:32 pm  

@squish

You shouldn't need heat sinks on the MOSFETS.
It is not a complex project so maybe I can buy 8 RGB LEDS today and get your project working.

Do you understand the Arduino c++ programming language?

 

This post was modified 3 weeks ago 2 times by robotBuilder

Squish liked
ReplyQuote
DroneBot Workshop
(@dronebot-workshop)
Workshop Guru Admin
Joined: 1 year ago
Posts: 627
2020-10-02 11:29 pm  
Posted by: @squish

but a burnt house, no thank you.

It's not likely you would burn the house down, but you could have a very hot Arduino.

Posted by: @squish

Are there specific kits on amazon uk, that would have the needed items in it? I had a look and there are so many different types

I saw this one on the UK Amazon- these modules will simplify your wiring (I used similar ones in the video I did on BJTs and MOSFETS).

Posted by: @squish

Where/who are the best UK electronics suppliers that deliver, or the best sources that deliver to the UK?

For most Arduino and Raspberry Pi purchases I really love Pimoroni. Good selection (including lots of Adafruit stuff) and really great people to deal with. Sadly due to the pandemic, I can't order from them, as sometimes their items come to Canada requiring duty and I'd have to go to the Post Office which is not possible (I haven't left the house since Feb 28th and have no intention of going out until this nasty affair is over).

Of course, Malpin is one of the more well-known stores in the UK, although they seem to be gravitating more towards consumer stuff, however, they still have a good selection of Arduino and Raspberry Pi stuff.

Honestly I probably but more stuff from Amazon than anyone else, I used to buy a lot of things on eBay as well but the delivery time from China to Canada is very long.

DigiKey and Mouser are probably the two biggest distributors in North America, not sure how they handle international shipments.

😎

Bill

 

"Never trust a computer you can’t throw out a window." — Steve Wozniak


Squish liked
ReplyQuote
byron
(@byron)
Reputable Member
Joined: 1 year ago
Posts: 353
2020-10-02 11:57 pm  
Posted by: @squish

Where/who are the best UK electronics suppliers that deliver

Here is a list of those I've used in the UK for electronic components.

www.rapidonline.com

www.mouser.co.uk

www.digikey.co.uk

www.hobbytronics.co.uk

coolcomponents.co.uk


Squish liked
ReplyQuote
robotBuilder
(@robotbuilder)
Honorable Member
Joined: 1 year ago
Posts: 502
2020-10-03 12:14 am  

@squish

I got to thinking maybe use the 74HC595 shift register no MOSFET required.
After a google search I found this example controlling 16 RGB LEDS.
Now that would make for a cool Christmas tree 🙂

 

This post was modified 3 weeks ago 3 times by robotBuilder

Squish liked
ReplyQuote
Squish
(@squish)
Eminent Member
Joined: 3 months ago
Posts: 21
2020-10-04 3:00 am  

Thanks everyone, loads of help 😎 .

 

Posted by: @robotbuilder

Do you understand the Arduino c++ programming language?

 

No, I can't code, I copy and paste other peoples, and delete the parts, I don't think I need, very, very hit and miss.

Once the xmas tree is done, I'll be straight back to the lessons, oh, and building my Tumble Self Writing Thingy.

Posted by: @dronebot-workshop

It's not likely you would burn the house down, but you could have a very hot Arduino.

 

Thank you for this Bill, I was a little concerned. Plus that's the same boards I had put on my wishlist yesterday, now I feel clever.

Posted by: @byron

Here is a list of those I've used in the UK for electronic components.

 

Those supplier links are great thanks to you both.

 

Posted by: @robotbuilder

After a google search I found this example controlling 16 RGB LEDS.

That looks great, todays homework.... Of to see if I have a shift register, I think I may, I'm just keeping fingers crossed it's the right one. Then watching the video.

 

@dronebot-workshop

I know what you mean re the virus. I'm glad o hear from someone taking it seriously.

I've been shielding for nearly a decade. My immune system takes serious issue with many modern chemicals, deo, fabric conditioners, perfumes, detergents, and fumes from numerous manufacturing processes' too, the list is endless. I've been wearing a mask,  just to open the door to the postman for ten years. I frequently have to leave items outside to gas off, sometimes for weeks.

 

I'd be lost with-out the www/internet.

 

 

No such thing as too much energy, it's just un-utilised potential.


ReplyQuote
Squish
(@squish)
Eminent Member
Joined: 3 months ago
Posts: 21
2020-10-08 1:47 am  

 

I have some small blue potentiometers with 10k stamped on them, and some metal with B10k.

Are they OK to use with the 3xMosfet boards? and a 1 metere RGB strip, 60 led 5V WS2812B, with an external 5V supply?

 

Using a FastLED library, setting up for only 15 leds in the code, can I run the first 15 lights without cutting the strip after the 15th light?

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No such thing as too much energy, it's just un-utilised potential.


ReplyQuote
Squish
(@squish)
Eminent Member
Joined: 3 months ago
Posts: 21
2020-10-11 10:12 am  

Using this code,

 

 


/* *********************************************************** * RGB_LED sketch - v1.0 *   Uses common cathode RGB LED *   Arduino UNO R3 *    * Inspired by Elegoo Lesoon 4 - RGB LED *   Included with The Most Complete Starter Kit by Elegoo *   Original by - HowToMechatronics.com and Elegoo.com *   Modified by - Ricardo Moreno *   * Description: *   This sketch illustrates a few ways to control the RGB LED *    * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * *  History:    *    1/5/2018 - v1.0 initial release *  12/30/2019 - Minor comment and indent revisions to *               improve readability. Moved Function setColor *               to the top of the sketch. Renamed delayTime *               to longDelay. *        * ********************************************************* */ /* *********************************************************** *                      Global Constants                     * *                    Hardware Definitions                   * * ********************************************************* */    /* The Arduino Web site recommends that one uses const     * rather than #define since using #define could have       * unwanted side effects     */    const int    redPin = 6;   // Red LED pin    const int  greenPin = 5;   // Green LED pin    const int   bluePin = 3;   // Blue LED pin    const int maxBright = 70; // Maximum=255 LED brightness /* *********************************************************** *                         Functions                         * * ********************************************************* */ void setColor(int redValue, int greenValue, int blueValue){    analogWrite(redPin, redValue);    analogWrite(greenPin, greenValue);    analogWrite(bluePin, blueValue);    Serial.print("Red: ");    Serial.print(redValue);    Serial.print(" Green: ");    Serial.print(greenValue);    Serial.print(" Blue: ");    Serial.println(blueValue); } /* *********************************************************** *                         Void Setup                        * * ********************************************************* */ void setup(){    Serial.begin(9600);       //Turn On the Serial Port    pinMode(redPin, OUTPUT);    pinMode(greenPin, OUTPUT);    pinMode(bluePin, OUTPUT); } /* *********************************************************** *                         Void Loop                         * * ********************************************************* */ void loop(){    //Local Variables    int longDelay = 1000;   // fading time between colors    int shortDelay = 10;    // short time delay between colors    int redValue;    int greenValue;    int blueValue;    int ledGear;            // For switching LED fading        //I combined various ways to turn on the RGB LED    //Here we manually set the color    Serial.println("Manual Colors");    setColor(maxBright, 0, 0);                  //Red Color    delay(longDelay);    setColor(0, maxBright, 0);                  //Green Color    delay(longDelay);    setColor(maxBright, maxBright, maxBright);  //White Color    delay(longDelay);    setColor(70, 0, maxBright);                //i set to 70 original was 170Purple Color    delay(longDelay);        Serial.println("Fade from Red to Green");    //Fade from Red to Green    delay(longDelay);    redValue = maxBright;    greenValue = 0;    blueValue = 0;    for(int i = 0; i < maxBright+1; i++){        setColor(redValue, greenValue, blueValue);        redValue -= 1;        greenValue += 1;        delay(shortDelay);    }        Serial.println("Fade from Green to Blue");    //Fade from Green to Blue    delay(longDelay);    redValue = 0;    greenValue = maxBright;    blueValue = 0;    for(int i = 0; i < maxBright+1; i++){        setColor(redValue, greenValue, blueValue);        greenValue -= 1;        blueValue += 1;        delay(shortDelay);    }        Serial.println("Fade from Blue to Red");    //Fade from Blue to Red    delay(longDelay);    redValue = 0;    greenValue = 0;    blueValue = maxBright;    for(int i = 0; i < maxBright+1; i++){        setColor(redValue, greenValue, blueValue);        blueValue -= 1;        redValue += 1;        delay(shortDelay);    }        Serial.println("Fade All three colors Red to Green, Green to Blue, Blue to Red");    //Fade All three colors Red to Green, Green to Blue, Blue to Red    delay(longDelay);    redValue = maxBright;    greenValue = 0;    blueValue = 0;    ledGear = 1;    do {        setColor(redValue, greenValue, blueValue);        //First Gear - Fade from Red to Green        if (ledGear == 1) {            redValue -= 1;            greenValue += 1;        }        //Second Gear - Fade from Green to Blue        if (ledGear == 2){            greenValue -= 1;            blueValue += 1;        }        //Third Gear - Fade from Blue to Red        if (ledGear == 3){            blueValue -= 1;            redValue +=1;        }        //Gear Switching        if (greenValue == maxBright) ledGear = 2;        if (blueValue == maxBright) ledGear = 3;        if (redValue == maxBright+1) ledGear = 4;        delay(shortDelay);    } while (ledGear < 4);    delay(longDelay); }

 

23 0201011 073301

 

 

With this setup.

120201011 090132
2 20201011 090213

  

23 0201011 073301
b20201011 071952

I've got it working, no resistors, Maximum Brightness is set in the CODE.

It's running on a Nano using a phone charging battery. The Maximum Volts it's using is 15mV (I think). I haven't worked out how to measure current though.

I'm not completely happy with the pattern atm so will tinker with it. 

If after testing for 48 hours, there are no problems, I'll probably go with it.

I'm working out how to translate the breadboard set-up to actual wiring, to see what impact the  distance will have on brightness.

 

No such thing as too much energy, it's just un-utilised potential.


ReplyQuote
Squish
(@squish)
Eminent Member
Joined: 3 months ago
Posts: 21
2020-10-15 3:09 am  

I went with this version for the harness.

IMG 20201002 003806

All bulbs are working. I just need to put the tree back together, with the bulbs in the right sockets.

 

Going to try a didgistump ATtiny85 board, on the breadboard version.

 

 

No such thing as too much energy, it's just un-utilised potential.


zezo999 liked
ReplyQuote
Page 2 / 2