I'm going to venture into the world of home PCB etching. I have a kit, and I'll work out the specifics of that later, but for now, I'd like you experienced people to review my board design and comment if needed. I'm new to Eagle, and I'd like some feedback.
It's a simple 3d printed desklamp, using a 8x8 Neopixel board (Currenty having issues with the board with 64 LED's, but it runs fine on a breadboard with different strips of 16, It's a solder/wiring/bad board issue, I'll work it out). It will have a switch (Switch/SVCC) that will turn on all the LED's Bright white or a chosen color. A pot to control brightness (BRIGHT/BRIVCC/BRGND), and a pot to control which color (COLOR/CVCC/CGND). I'm using an ATTINY45 (Schematic says 85, but there wasn't a 45 listed, same chip though aside from memory), which will be mounted in a socket, not soldered directly to the board, so I can edit the code if necessary. Power will be from a 5v 3a wall wart with a power switch in the lamp.
I'd like comments on the board design. There's a ground pour on both sides to reduce the etching used. I'll be using 22g stranded. Mounted using 3mm Nylon screws into the lamp base.
I've read and watched a bunch of tutorials on the process, but if any of you guru's know of a good one, please share.
.sch and .brd are in the attached zip file.
(Thank You Duane for the insert image trick)
#include <Adafruit_NeoPixel.h>
#define PIXELS 64 //Number of Pixels in Lamp
#define PIN 1 // NEOPIXEL Pin (AT 6)
#define SWPIN 3 // Switch Pin (AT 2)
#define POTPIN A2 // Brightness Pot Pin (AT 3)
#define COLPIN A1 // Color Pot Pin (AT 7)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXELS, PIN, NEO_GRB + NEO_KHZ800);
int newcol[3];
int col;
void setup()
{
strip.begin();
Show();
}
void loop()
{
if (digitalRead(SWPIN)) // Bright white if switch is ON
{
for (int i = 0; i < PIXELS; i++)
{
strip.setPixelColor(i, 255, 255, 255);
}
while (digitalRead(SWPIN))
{
Show();
}
}
col = map(analogRead(COLPIN), 0, 1023, 0, 764); //Set color with Pot
ColorWheel(newcol, col);
for (int i = 0; i < PIXELS; i++)
{
strip.setPixelColor(i, newcol[0], newcol[1], newcol[2]);
}
Show();
}
void ColorWheel(int* ptr, int wpos)
{
if (wpos > 764 || wpos < 0) // Bright white if out of bounds
{
ptr[0] = 255;
ptr[1] = 255;
ptr[2] = 255;
}
else if (wpos <= 255)
{
ptr[0] = 255 - wpos;
ptr[1] = wpos;
ptr[2] = 0;
}
else if (wpos > 255 && wpos < 511)
{
ptr[0] = 0;
ptr[1] = 510 - wpos;
ptr[2] = wpos - 255;
}
else
{
ptr[0] = wpos - 510;
ptr[1] = 0;
ptr[2] = 765 - wpos;
}
}
void Show()
{
strip.setBrightness(map(analogRead(POTPIN), 0, 1023, 0, 255));
strip.show();
}
NeoPixelLamp.zip (14.3 KB)