-
1PCB Assembly
- Using a solder paste dispensing needle, we first add solder paste to each component pad, one by one. We're using standard 37/63 solder paste here.
- Next, we pick and place all the SMD components in their places on the PCB using an ESD tweezer.
- With extreme caution, we lifted the complete circuit board and placed it on the SMT hotplate, which increases the PCB's temperature to the point at which the solder paste melts and all of the components are connected to their pads
-
2Adding XIAO on bottom side
The XIAO has to be installed on the bottom side using the surface mount method after the LEDs are added to the top side. One tiny problem: the led on the bottom of this prevents us from using a reflow hotplate.
An approach is to use solder paste on the pads of the component before picking and placing it in its proper location.
The PCB is then soldered in place after the connector pins on the component are heated using a soldering iron to melt the solder paste underneath the pads.
-
3Main Code
We first check to see if the LEDs were soldered correctly after the PCB assembly process. We employ a straightforward test code that sequentially turns on each LED in the sequence.
#include <Adafruit_NeoPixel.h> #ifdef __AVR__ #include <avr/power.h> // Required for 16 MHz Adafruit Trinket #endif // Which pin on the Arduino is connected to the NeoPixels? #define PIN D1 // On Trinket or Gemma, suggest changing this to 1 // How many NeoPixels are attached to the Arduino? #define NUMPIXELS 25 // Popular NeoPixel ring size // When setting up the NeoPixel library, we tell it how many pixels, // and which pin to use to send signals. Note that for older NeoPixel // strips you might need to change the third parameter -- see the // strandtest example for more information on possible values. Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); #define DELAYVAL 100 // Time (in milliseconds) to pause between pixels void setup() { // These lines are specifically to support the Adafruit Trinket 5V 16 MHz. // Any other board, you can remove this part (but no harm leaving it): #if defined(__AVR_ATtiny85__) && (F_CPU == 16000000) clock_prescale_set(clock_div_1); #endif // END of Trinket-specific code. pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED) } void loop() { pixels.clear(); // Set all pixel colors to 'off' // The first NeoPixel in a strand is #0, second is 1, all the way up // to the count of pixels minus one. for(int i=0; i<NUMPIXELS; i++) { // For each pixel... // pixels.Color() takes RGB values, from 0,0,0 up to 255,255,255 // Here we're using a moderately bright green color: pixels.setPixelColor(i, pixels.Color(0, 150, 0)); pixels.show(); // Send the updated pixel colors to the hardware. delay(DELAYVAL); // Pause before next pass through loop } }
After testing the LEDs, we uploaded the main code into the XIAO MCU.
#include <Adafruit_NeoPixel.h> #define GREEN_LED_PIN D0 #define PURPLE_LED_PIN D1 #define NUM_LEDS 15 // Number of LEDs in each strip Adafruit_NeoPixel greenLED = Adafruit_NeoPixel(NUM_LEDS, GREEN_LED_PIN, NEO_GRB + NEO_KHZ800); Adafruit_NeoPixel purpleLED = Adafruit_NeoPixel(NUM_LEDS, PURPLE_LED_PIN, NEO_GRB + NEO_KHZ800); void setup() { greenLED.begin(); purpleLED.begin(); } void loop() { // Set green LED to green color (RGB: 0, 255, 0) greenLED.setPixelColor(0, greenLED.Color(0, 255, 0)); greenLED.show(); // Set purple LED to purple color (RGB: 128, 0, 128) purpleLED.setPixelColor(0, purpleLED.Color(128, 0, 128)); purpleLED.show(); delay(1000); // Delay for 1 second }
#include <Adafruit_NeoPixel.h> #define GREEN_LED_PIN D0 #define PURPLE_LED_PIN D1 #define NUM_LEDS 15 // Number of LEDs in each strip Adafruit_NeoPixel greenLED = Adafruit_NeoPixel(NUM_LEDS, GREEN_LED_PIN, NEO_GRB + NEO_KHZ800); Adafruit_NeoPixel purpleLED = Adafruit_NeoPixel(NUM_LEDS, PURPLE_LED_PIN, NEO_GRB + NEO_KHZ800); void setup() { greenLED.begin(); purpleLED.begin(); } void loop() { // Set green LED to green color (RGB: 0, 255, 0) greenLED.setPixelColor(0, greenLED.Color(0, 255, 0)); greenLED.show(); // Set purple LED to purple color (RGB: 128, 0, 128) purpleLED.setPixelColor(0, purpleLED.Color(128, 0, 128)); purpleLED.show(); delay(1000); // Delay for 1 second }
-
4Final Assembly
The final assembly was quite simple; four M3 PCB standoffs are needed to put the two PCBs together. The gap between the two PCBs, which is essential for the diffusion of LED light, will be maintained by these standoffs.
In order to secure the M3 standoffs with M3 nuts, we first attach four of them to the bottom PCB and turn the board over. The front PCB is then permanently mounted with the standoffs by inserting four M3 bolts from the front PCB.
Assembly is now complete.
-
5Putting the Device inside PC
For the last step, we have to mount this LED board inside the PC.
Two 3mm-diameter mounting holes were added to the bottom PCB during the PCB design process. The PC's M3 standoffs, which are provided for installing ATX size motherboards, will be used to fasten the LED board with the PC.
We open the side pane of the PC first.
The USB cable is then connected to the XIAO and plugged into the motherboard's rear side USB port.
We then use an M3 bolt to secure the LED board on the ATX PCB standoff.
-
6RESULT
Here's the result of this small build, Master Chief Glowing gloriously inside the PC.
Although I dislike RGB lights inside computers, this one seems quite lovely. I am going to build a couple more Character LED Boards and install them inside a desktop.
I have been creating art-based PCBs for some time now; you may find some of the links below interesting.
https://www.hackster.io/Arnov_Sharma_makes/gomu-gomu-no-mi-with-xiao-rp2040-560601
https://www.hackster.io/Arnov_Sharma_makes/christmas-bell-that-sings-fe0468
https://www.hackster.io/Arnov_Sharma_makes/pcb-diya-because-diwali-is-coming-f2947b
https://www.hackster.io/Arnov_Sharma_makes/gengar-pcb-art-f391a1
Overall, this project was functioning pretty well and needed no further revision.
Leave a comment if you need any help regarding this project. This is it for today, folks.
Thanks to Seeed Studio for supporting this project.
You guys can check them out if you need great PCB and stencil service for less cost and great quality.
And I'll be back with a new project pretty soon!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.