Notifications
Clear all

RGB Christams tree wiring

37 Posts
5 Users
19 Likes
3,690 Views
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2037
 

@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?

Β 


   
Squish reacted
ReplyQuote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 5 years ago
Posts: 1053
 
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 reacted
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1112
 
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 reacted
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2037
 

@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 πŸ™‚

Β 


   
Squish reacted
ReplyQuote
Squish
(@squish)
Member
Joined: 4 years ago
Posts: 33
Topic starter  

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)
Member
Joined: 4 years ago
Posts: 33
Topic starter  

Β 

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)
Member
Joined: 4 years ago
Posts: 33
Topic starter  

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


   
ReplyQuote
Squish
(@squish)
Member
Joined: 4 years ago
Posts: 33
Topic starter  

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 reacted
ReplyQuote
Squish
(@squish)
Member
Joined: 4 years ago
Posts: 33
Topic starter  

ATtiny85 board isnt recognised by the PC, but it's intermittent. It seems to be a known problem, and the I don't think the board is being supported anymore, shame, I have 3.

The lights are gorgeous, very slow and peaceful, and not too bright. However I can't get the tree back together.

I haven't quite given up yet, and we may end-up with a few vases off fibre optic fake tree branches.

Β 

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


   
ReplyQuote
ZoolanderMicro
(@zoolandermicro)
Member
Joined: 4 years ago
Posts: 144
 

You may need to install the ATtinyCore library (Spence konde (Aka Dr. Azzy)) from the board loader in the Arduino IDE, or from the GitHub repository ( https://github.com/SpenceKonde). If avrdude complains about the device signature, change the device signature entry in the avrdude.conf file. I use a double ## to comment out the current signature. This keeps the original signature for future reference, and it marks the file where you made changes. You may also create a backup of the original file, just in case.Β 

ZoolanderMicro, where small ideas are a big deal


   
Squish reacted
ReplyQuote
ZoolanderMicro
(@zoolandermicro)
Member
Joined: 4 years ago
Posts: 144
 

I have two installations of avrdude on my computer. One in the Arduino IDE, and one in WinAVR. When I use avrdude from the command line, it is using the WinAVR installation. The Arduino IDE also uses avrdude, but it is a separate installation with its own avrdude.conf file. So, I end up working between the two applications and conf files. If you don't have one already, get a copy of the book, Make:AVR Programming (Elliot Williams, Make Community, LLC; 1st Edition (February 25, 2014),Β  ISBN-13:Β 978-1449355784).Β 

ZoolanderMicro, where small ideas are a big deal


   
Squish reacted
ReplyQuote
Squish
(@squish)
Member
Joined: 4 years ago
Posts: 33
Topic starter  

@zoolandermicro

will this sort out the intermittent ATtiny85 USB 'not recognised' by windows?

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


   
ReplyQuote
ZoolanderMicro
(@zoolandermicro)
Member
Joined: 4 years ago
Posts: 144
 

Perhaps I misunderstood the issue. I am not sure what is meant by 'Windows not recognizing' the microcontroller. I was assuming that the target chip signature was not as expected. This is an error that may occur when programming an AVR chip through the Arduino IDE. Is the ATtiny85USB a programmer? I use a USBtinyISP programmer. I believe my programmer does have the ATtiny85 chip. Intermittent errors are hard to discern. Could this be a connection issue?Β 

ZoolanderMicro, where small ideas are a big deal


   
Squish reacted
ReplyQuote
ZoolanderMicro
(@zoolandermicro)
Member
Joined: 4 years ago
Posts: 144
 

You might try my code for common cathode tri-colored LEDs. The colors blend nicely.

#include <avr/io.h>
#include <util/delay.h>
/**
   Scetch ColorBlend_CommonCathode is a color fade/blend routine for a tri-color
   common cathode led connected to Arduino Uno digital pins 9, 10, and 11 as PWM
   outputs. Colors transition from blue through teal, green, yellow, orange, red,
   violet, purple, and back to blue. With common cathode tri-colored leds,
   analogWrite() value of 0 results in a full 'off' state, and analogWrite()   
   value of 255 results in a full 'on' state. This scetch works with common
   anode tri-colored leds, only the color blend runs in the opposite order.
   Written in Arduino C language.
   @author Mike Tonge
   @date 12/03/2019
*/
// Constants
const uint8_t DELAY_TIME = 100; // Delay time (miliseconds)
const uint8_t redLED = 9; // Red on digital pin 9
const uint8_t grnLED = 10; // Green on digital pin 10
const uint8_t bluLED = 11; // Blue on digital pin 11
const uint8_t OFF = 0; // Value used to turn led off
// Variables
uint8_t redVal = 0; // Red value
uint8_t grnVal = 0; // Green value
uint8_t bluVal = 0; // Blue value

void setup() {
  pinMode(redLED, OUTPUT); // Set pin 9 as output
  pinMode(grnLED, OUTPUT); // Set pin 10 as output
  pinMode(bluLED, OUTPUT); // Set pin 11 as output
}

void loop() {
  for (int count = 0; count <= 765; count++) {
    switch (count) {
      // Red is off, Green gets brighter, Blue gets dimmer
      case 0 ... 255:
        redVal = OFF;
        grnVal = count;
        bluVal = 255 - count;
        break;
      // Red gets brighter, Green gets dimmer, Blue is off
      case 256 ... 510:
        redVal = count - 255;
        grnVal = 510 - count;
        bluVal = OFF;
        break;
      // Red gets dimmer, Green is off, Blue gets brighter
      case 511 ... 765:
        redVal = 765 - count;
        grnVal = OFF;
        bluVal = count - 510;
        break;
      default:
        break;
    } // End switch
    analogWrite(redLED, redVal);
    analogWrite(grnLED, grnVal);
    analogWrite(bluLED, bluVal);
    delay(DELAY_TIME);
  }
}
Β 

ZoolanderMicro, where small ideas are a big deal


   
Squish reacted
ReplyQuote
Squish
(@squish)
Member
Joined: 4 years ago
Posts: 33
Topic starter  

Thanks, @zoolandermicro

Β 

I'll definitely be trying out your code.

I'm using a Digispark 'fake Rev3' ATtiny85 board, with the, 4 fingered gold strips on a stumpy part of the tiny board as the USB connector.

1st time I installed 1, it worked no problems. I'm not sure if an arduino IDE update caused the probs, but according to google Windows 10 regularly comes back with "Device not recognised". Exact same problem in Windows7 on my laptop too.

Β 

Wondering if you can help me with this question;

Often in other people Neo-Pixel Code, if find this comment;

// - Add 1000 uF CAPACITOR between NeoPixel strip's + and - connections.

1. It dosent mention which voltage the Cap should have?

2. As I only use an Arduino to power things atm, do I really need one?

3. Am I more likely to need them when I start using 12 and 24 volt power sources?

Β 

Thanks for your help, especially thanks for the code, really looking forward to playing with it.

Β 

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


   
ReplyQuote
Page 2 / 3