|
OrCad Cadance |
PCB DIYA because Diwali is coming
Hey Guys what's up!
So here's something HOT, a PCB DIYA that is powered by an Attiny13 MCU, it has two different LED Driving Mosfets that turn ON and OFF LEDs in a sequence and that emulate a flame.
A "DIYA" is an OIL LAMP that is usually made out of clay or metal, they are symbolically lit during prayers, rituals, and ceremonies.
Diyas represents the triumph of light over dark, good over evil with the most notable example of this being on the day of Diwali.
Diwali is Essentially a Hindu Halloween.
Materials Required
Here are the components used in this built-
- Custom PCB
- Attiny13A
- 8205 Mosfet IC
- AO3401 Mosfet
- 0603 LEDs White /Orange/RED
- 10K 0603 Resistors
- Type C Port
- CR2032 Coin Cell THT Holder
- CR2032 Coin cell
- USB Type C Cable
- 5V Power Source
- Arduino Nano- for programming the Attiny13A
ATTINY13A
As for the brain and the control unit of this project, ATTINY13A is being used here.
Here's why it's a small AVR RISC-based microcontroller with 1Kb of flash which is plenty for a Blink sketch instead of using a full fleshed MCU like an Atmega MCU or any other DEV Board.
Also, Attiny13A costs a lot less, less than 1$ which is crazy low, the cost is not an issue with this project but for some projects, the cost is a big factor to keep in mind.
Attiny13 is an 8 Pin AVR RISC-based microcontroller with five usable IO Ports with two PWM Pins that are enough for a small badge-like project or in this case a Bi-Flashing Light.
Checkout its datasheet from here- https://www.microchip.com/en-us/product/ATtiny13A#Features
PCB DESIGN
I started the design process by first finding a nice black-and-white image of a DIYA which can be used as the base model for the whole board.
The Black and white image that was selected got converted into BMP Image as my cad software only imports BMP format for creating a new silkscreen layer.
Next, I prepared a simple Schematic with other Attiny13A MCU that had two Mosfet as Switch setup, One Mosfetr that only had 4 LEDs connected in series was the AO3401 N channel mosfet which can handle 4A of current at 30V max.
5V will be used here if powered by the USB port and 3V if powered by the Coin cell.
For 10 LEDs, the same mosfet as switch setup was utilized but with the 8205A Mosfet IC that has two mosfet on it, I connected both in parallel so it can handle a total of 12A, and 6A each at 20V which is too much for this system but keep this in mind, always choose components with at least double the current usage of your project requirement.
As for the design, I added LEDs in the Flame region, 10 LEDs were placed at the outline of the flame and four at the inside region, Flame also has a cutout between two LED regions.
As for the current limiting Resistor and Diode of the USB Type C Port, both are placed on the bottom side of the board because of space issues.
ISP Connector is an SMD Con6 Port that is made especially for using a POGO Pin setup for flashing this board.
PCBWAY
After finalizing the board, I exported the Gerber Data and sent it to PCBWAY for samples.
A yellow solder mask and white silkscreen was used for this project.
I received PCBs in a week and the PCBs were nice as expected.
I really like the quality of the white solder mask, it was a tough sample to manufacture as the silkscreen that I have laid out on this board was not completely symmetrical and I also added a few cuts in the flame region which was definitely not like normal PCB layout but PCBWAY did an excellent job of manufacturing this PCB with no error whatsoever.
check out PCBWay service for getting great PCB service at less cost.
Solder Paste Dispensing Process
We apply solder paste with a solder paste dispenser syringe or the proper method is to use stencil here which I don't have. but anyway, after this, we can now move on to the next process, which is to add components to each pad.
Pick and Process
Next, we carefully pick all the components with an ESD tweezer and place them in their assigned place one by one.
We start first by placing Microcontroller, Mosfet IC, Mosfet, and resistors.
Next, we add LEDs in their place which was the flame region.
Hotplate Reflow Process
Then after doing the pick and place process, we carefully lifted the whole PCB and place it on the hotplate. I’m using my good old DIY hotplate which I made a few months ago.
Basically, in this hotplate reflow process, the surface heats up to the solder paste melting temp and it slowly melts. after a few mins when the solder paste completely melts, we remove the PCB and let it cool down for a moment.
Bottom Side Components Placement
This PCB contains components on both sides, we could put all the components on the top side but there is a custom design on the top layer that involves a top etch layer which makes putting stuff on the top layer nearly impossible so it was better to add current limiting Resistors and diode of charging input section to the bottom side.
As for soldering the components, Hotplate reflow can not be used on the bottom side so instead, both components will get soldered by a good old soldering iron.
Main Code and Attiny13 Programming
I have used an Arduino as an ISP programmer which I made last year. it's basically an Arduino nano that has its SPI Pins breakout for connecting Attiny13A with it in order to flash the Attiny MCU.
As for connecting Attiny13A, it connected through six Pogo Pins that are connected with ISP Pins of ISP Programmer.
If you want to know how this setup works then definitely check out this post of mine. https://www.hackster.io/Arnov_Sharma_makes/multiple-attiny85-13a-programmer-84adf8
Here's the main code-
int pinsCount=2; // declaring the integer variable pinsCount
int pins[] = {0,1}; // declaring the array pins[]
void setup() {
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
}
void loop() {
for (int i=0; i<pinsCount; i=i+1){ // chasing right
digitalWrite(pins[i], HIGH); // switching the LED at index i on
delay(70); // stopping the program for 100 milliseconds
digitalWrite(pins[i], LOW); // switching the LED at index i off
}
for (int i=pinsCount-1; i>0; i=i-1){ // chasing left (except the outer leds)
digitalWrite(pins[i], HIGH); // switching the LED at index i on
delay(70); // stopping the program for 100 milliseconds
digitalWrite(pins[i], LOW); // switching the LED at index i off
}
}
To Flash Code to the Attiny13, we first need to wire the Arduino as ISP setup with the Custom PCB Badge in the above configuration.
- We first select the right MCU which is attiny13 in our case and do not forget to choose the right com port.
- then we select the right programmer which is in our case "Arduino as ISP"
- then we hit on the Burn Bootloader option which will take a few seconds
- Now we go to the sketch menu and select the "Upload using Programmer" Option and BANG.
Power Source #1- 5V Supply Via Type C Port
After Programming, we connect a 5V Source to the USB Type C Port of the Circuit for powering the setup.
For this Test, I'm using one of my previously made PowerBank that can provide up to 3Amps at 5V but the device consumes a bit less, roughly 1 Watt.
Power Source #2- CR2032 Cell
After testing the USB Section of the DIYA PCB, we move on to a much better and more portable solution which is to add a Coin cell Holder to this board and run it via a CR2032 Cell.
We add a CR2032 Coin Cell holder in its place from the bottom side and solder its pad with a soldering iron, the polarity of the Coin cell holder should be right so we should always double-check while putting the THT Coin cell holder in its place.
Conclusion
This PCB DIYA works and is a perfect Desk Decorative prop, it even looks better than an actual clay DIYA.
As for LEDs, RED or Orange LEDs could be used instead of White or we can use two color tones of leds so it will look a lot more like a flame.
Leave a comment if you need any help regarding this project, this is it for today folks.
checkout a similar project I did, PCB Candle.
Special thanks to PCBWAY for supporting this project, do check them out for getting great PCB Service for less cost.
Peace out
int pinsCount=2; // declaring the integer variable pinsCount
int pins[] = {0,1}; // declaring the array pins[]
void setup() {
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
}
void loop() {
for (int i=0; i<pinsCount; i=i+1){ // chasing right
digitalWrite(pins[i], HIGH); // switching the LED at index i on
delay(70); // stopping the program for 100 milliseconds
digitalWrite(pins[i], LOW); // switching the LED at index i off
}
for (int i=pinsCount-1; i>0; i=i-1){ // chasing left (except the outer leds)
digitalWrite(pins[i], HIGH); // switching the LED at index i on
delay(70); // stopping the program for 100 milliseconds
digitalWrite(pins[i], LOW); // switching the LED at index i off
}
}
PCB DIYA because Diwali is coming
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Arnov Arnov sharma
- WALKPi PCB Version Greetings everyone and welcome back, This is the WalkPi, a homebrew audio player that plays music fr...
- Delete Button XL Greetings everyone and welcome back, and here's something fun and useful.In essence, the Delete Butt...
- Arduino Retro Game Controller Greetings everyone and welcome back. Here's something fun.The Arduino Retro Game Controller was buil...
- Super Power Buck Converter Greetings everyone and welcome back!Here's something powerful, The SUPER POWER BUCK CONVERTER BOARD ...
- Pocket Temp Meter Greetings and welcome back.So here's something portable and useful: the Pocket TEMP Meter project.As...
- Pico Powered DC Fan Driver Hello everyone and welcome back.So here's something cool: a 5V to 12V DC motor driver based around a...
- Mini Solar Light Project with a Twist Greetings.This is the Cube Light, a Small and compact cube-shaped emergency solar light that boasts ...
- PALPi V5 Handheld Retro Game Console Hey, Guys what's up?So this is PALPi which is a Raspberry Pi Zero W Based Handheld Retro Game Consol...
- DIY Thermometer with TTGO T Display and DS18B20 Greetings.So this is the DIY Thermometer made entirely from scratch using a TTGO T display board and...
- Motion Trigger Circuit with and without Microcontroller GreetingsHere's a tutorial on how to use an HC-SR505 PIR Module with and without a microcontroller t...
- Motor Driver Board Atmega328PU and HC01 Hey, what's up folks here's something super cool and useful if you're making a basic Robot Setup, A ...
- Power Block Hey Everyone what's up!So this is Power block, a DIY UPS that can be used to power a bunch of 5V Ope...
- Goku PCB Badge V2 Hey everyone what's up!So here's something SUPER cool, A PCB Board themed after Goku from Dragon Bal...
- RGB Mixinator V2 Hey Everyone how you doin!So here's a fun little project that utilizes an Arduino Nano, THE MIXINATO...
- Gengar PCB Art Hey guys and how you doing!So this is the GENGAR PCB Badge or a Blinky Board which is based around 5...
- R2D2 Mini Edition So here's something special, A Mini R2D2 PCB that speaks ASTROMECH.Astromech is a fictional language...
- C-3PO Blinky Board Hey guys and how you doing!So this is the C3P0 PCB Badge or a Blinky Board which is based around 555...
- WALKPi Breadboard Version Greetings everyone and welcome back, Here's something loud and musical.Similar to a traditional walk...
-
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
125 0 0 -
DIY Laser Power Meter with Arduino
174 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
164 0 2 -