GirlsGoIT - 3D & Arduino - BT21 Smart Lamp
by Anghelina_Otilia in Teachers > 3D Design
352 Views, 3 Favorites, 0 Comments
GirlsGoIT - 3D & Arduino - BT21 Smart Lamp
Acest prototip a fost realizat in cadrul taberei de vara GGIT 2021, proiect implementat de TEKEDU cu suportul financiar Lichtenstein Development Service.
This lamp was made during the GirlsGoIT Summer Camp 2021 at the 3D prototyping & Arduino track. GirlsGoIT is a community program empowering girls in the IT field in Moldova implemented by TEKEDU with the financial support of Lichtenstein Development Service
In this project, we will show you how we created this lamp with the help of Autodesk Fusion 360 and Arduino.
The concept of this lamp is that you will be able to control the illumination on your smartphone by using the Blynk application.
Let's begin!
The Electronics You'll Need and Where You Can Order Them
WeMos D1 R2 - Order on Aliexpress
Resistors 220 Ohm (5) - Order on Aliexpress
Red Leds (9) - Order on Aliexpress
RGB Leds (4) - Order on Aliexpress
Wires - Order on Aliexpress
Breadboard - Order on Aliexpress
USB Cable - Order on Aliexpress
PLA plastic
The Applications You Will Need
The Making of the Sketch
To develop our ideas, we did some brainstorming, to see how our lamp approximately will look. In the end, we decided that the lamp will have the form of a box, where inside it, the electronic components will be located.
Designing the Lamp in Fusion 360
Before you start designing the lamp, you need to save your project, so all the changes that you will make are going to be auto-saved. Also, you need to create a new component. Next what do you need to do is to follow these instructions:
1) Insert the photo reference (last photo)
2) Calibrate the canvas to 210 mm (vertical)
3) Create a new sketch on the front plane.
4) Use the spline tool to make the outline of the lamp (photo 1)
5) Finish the sketch and extrude it at 91 mm
6) Create a new component, then make a new sketch on the plane of the base that you've created
7) Use the project tool, and project the outline of the base. Then do an offset of these lines with -2 mm (photo2)
8) Create a new sketch and trace the face, arms and feet. Then do an offset of the lines that belong to arms and feet (1mm) (photo 3)
9) Extrude the sketch (2mm) (with the New Body option)
10) Create an offset plane over the front face (-0,5 mm). Choose the split body tool and then select the base as the body to split and the created offset plane as the splitting tool. This is the box lid.
11) Make invisible the lid, then choose the shell tool and do a shell on the base with 2 mm(photo4)
Breadboard
Arduino Uno
12) Download the models, and position them like in photo 5. You can create some help points at the base of the box throughout the sketch option. (photo 6)
13) Use the Split Body tool to create the holes for USB and charging. (Body to split - the box, Tools to split - the USB and charging output from Arduino)
14) Create a new sketch on the base of the box. Then project the lines that you've created in the previous step. Do an offset (-0,2mm) of these lines. (photo 7)
15) Extrude the sketch (with the cut option). The holes need to look like in photo 8 (back view)
16) Go back to your sketch and project the outline of some Arduino components (photo 9). Then draw these bars for the support (photo 10). Throughout the sketch dimensions, set the dimension of 0,1 mm between the sketch and project lines. (photo 11). Extrude them with 30 mm (Join option).
17) Create a new sketch and choose the plane where the breadboard is sitting. Draw the rectangles like in photo 12 (width - 4 mm, length - doesn't matter). Then extrude them with 5 mm.
18) Choose the bottom lines of the all rectangles that you've created and do a fillet with 2 mm.
19) Make the lid visible again. Create a new sketch on the back of it. Project the lines from photo 12. Then do an offset (-0,2 mm) of the projected lines. Delete the first projected lines, then do an offset of the remained lines with 2 mm. The sketch needs to look like in photo 13.
20) Move the lid a little bit and make the extrude of the previous sketch. (2 mm). The back needs to look like in photo 14.
21) Color the face parts and the outline with the Appearance tool. (photo 15)
Now the design is done!
Wiring Diagram
Here you can see the wiring diagram of the lamp. On the breadboard we placed 9 red leds and 4 rgb leds, so that for the red leds - at each pin to be connected 3 leds, and to the rgb leds - at each pin to be connected 2 colors.
For technical reasons in the diagram we used Arduino Uno, but in reality we will use WeMos D1 R2 WIFI.
How to Setup Blynk on Your Smartphone
To set Blynk on your Smartphone follow the next steps:
1) Click on the "new project" button (First photo)
2) Set the project to match the following (second photo) :
Choose Device - "WeMos D1"
Connection type - "WI-FI"
3) Once you have created the project, click the plus button in the upper right to add the necessary buttons to the LEDs control (third photo)
4) If you did everything correctly, you will be able to select the desired buttons. We used the following buttons (fourth photo):
"Button" - for simple LEDs
"zeRGBa" - for RGB LEDs
5) Now that you have selected everything you need, press each button to be able to set it (fifth photo).
6) In the settings for zeRGBa slider, must correspond to the following (sixth photo):
Split / "MERGE"
OUTPUT - "VIRTUAL PIN 0"
7) In the settings for the Simple LEDs button, must correspond to the following (seventh photo):
OUTPUT - "VIRTUAL PIN 1"
How to Setup Blynk in Arduino
To Setup Blynk in Arduino follow these steps:
1) Enter Arduino and then using the scheme - (select " " - select " " - ...) you will follow the next steps (Second photo):
"Sketch" - "Include library" - "Manage libraries"
2) In the Library Manager you will see a window, in it you will have to look for the search bar and you will enter Blynk (third photo).
3) Select version 0.6.0 and install (fourth photo)
4) Now according to the previous scheme you will follow the next steps (fiveth photo):
"Files" - "Examples" - "Blynk" - "Board_WIFI" - "ESP8266_Standalone"
5) in Gmail you will receive a message from blynk, copy the link from Auth Token and enter the code in:
char auth [] = "link received"
Enter the network name at:
char ssid [] = "YourNetworkName"
Enter your WiFi password at:
char pass [] = "YourPassword"
6) the last step will be to enter to the tools, and according to the previous scheme you will select (seventh photo):
" "WeMos D1 R1" board " - "ESP8266 Boards" - " WeMos D1 R1 ".
If you want to watch a video on YouTube with more detailed explanations, this is the link - Here
Arduino Programing
1)Under the line #define BLYNK_PRINT Serial -
#define , give a name to pin - reapeat thi for every pin
2)In void setup() Write -
pinMode(Name of Pin, OUTPUT); to every Pin
3) Now, create a function for button of simple LEDs -
void buttonLed(bool param){
Serial.println(param);
digitalWrite(Name of pin for Simple Leds, param); - reapeat this for every (pin for Simple Leds) }
4)Create a function for zeRGBa slider -
void sliderLedRGB(int r, int g, int b){
digitalWrite(name of pin for RGB leds, first letter of leds color); - reapeat this for every (pin for RGB Leds)}
5)After, Write This :
BLYNK_WRITE(V0) {
int r = param[0].asInt();
int g = param[1].asInt();
int b = param[2].asInt();
sliderLedRGB(r,g,b); }
And this
BLYNK_WRITE(V1) {
butonLed(param.asInt()); }
Overview
You can watch the original fusion 360 model here
RESULTS!
We worked very hard on this project, and we hope that the lamp will look amazing in reality. Unfortunately, now, we can't show you how it looks all printed and assembled, but soon, all objects will be delivered and we will make an update about this. Now all that we can provide, is the photos that we've used as references :)
We hope you enjoyed our journey on making this BT21 lamp and managed to make easy all the steps. See you soon!