Final Project
Here we are ... final project. It is opportunity for all of us to show what we have learned. At the beginning I was ambitious, optimistic and full of energy, and in the end of this project..uh..lets say this project did some emotional damage. And because of my intenal suffering I feel the need to describe here everything.
My previous idea was to make knitting machine, but now it seems too practical? (yes also time consuming). So now I present my new idea -flower lamp-.
Brainstorming
During the week when we learned how to solder, I came across this video from Jiri Praus and fell in love with the idea of possessing this flower.
I bought everything and started to do the work - here the biggest problem occured, I don't know if soldering is some kind of god-level skill but I am not physically nor mentally able to do it. I tried it free-form, then with mold that was made out of clay, silicone mold but it did not work for me. The other way that would be maybe less painfull for me would be to make it 3D printed as is shown in the other video. And I went this route.
How hard can it be?
I decided to go with more kinetical mechanisms where gears would be used. Main body is 3D printed on Bambu 3D printer, using green PLA. There is outershell, 6 gears and middle gear plunger. The main idea of blooming is basically transformation of rotation motion of servo, to linear motion of plunger, to rotation motion of gears. To each gear is connected flower petal and is crocheted. In the inside of shell are 2 brass wires (connected to 5V or GND on ESP32). They are there for powering 6 LED "fibers" - they play role of pips in flower and are cute. Easy peasy right? No, basically each step had a ton of problems and obsticles.
Blooming mechanism
So I had this mentioned video and some idea how to replicate it in Fusion. This mechanism consists of 6 gears (90 deg each), middle gear plunger and outer shell. First question was how could be gears connected to shell - different types were printed. Logical solution were to replicate what they had in video, but what worked for me was to make holes through the gears, and insert a piece of wire, which was then inserted into the outer shell. Now the plunger had to be prinnted in two pieces because of its nature and then glued together. I guess this course is also about some self reflection and I confess, I cannot be trusted with glue. You can imagine that I glued everything everywhere and had to reprint plunger more like 3 times. At this point I ran out of green filament so colours are more randomised. In the end I glued (yes Glue is an answer to everything) brass rod to plunger.
There is some historical reason why entire flower and flower top are reversed.LED filament
Flower is not really a flower without its pips. Before my smalltalk with Mr. Zemánek I didn´t even heard of led filaments, but within two hours after that I already ordered them from Laskakit. I chose one-sided variant. These filaments are themselves very flexible and do not hold their shape. Therefore, I wrapped them with brass wire - the wire was first wrapped around the rod and then the filament was gradually inserted inside.
PCB
Already during the modeling of blooming mechanism, Krištof helped me make it more logical and efficient. Without him I would not dare to think about making my own PCB. Each LED filament has to be connected to ground and 3V and it made sence to have PCB that consists of 2 conductive circles and small holes for rods that are on filaments. Soldering everything together was interesting, but somehow I was able to do it without big corrections. two male connectors are soldered to the pcb from the bottom. PCB has to be on something flat, therefore a new printed part had to be made - and guess what, I also glued it together.
Wiring
The idea was that the brass tube into which the outershell is inserted is ground. At the end of this tube a wire is soldered. This wire has a connector (female) on the other end which connects to the connector (male) on the pcb. The same is for brass rod at the end of which is plunger. It was first time for me to do connector on wire but it is easy .
Flower pot
Firstly I thought about bying real flower pot but decided to make it more interesting. The walls are made out of plexiglass (5 mm,cut on laser) and upper part and butttom are 3D printed. There is also sci-fi looking piece in the middle - ramp. It was added to restrict movement of third part of servo arm. Buttom piece also have slot for board with ESP32 and other connectors.
Servo
The main star of this show. Servo can produce a rotation movement and I needed to transform it to linear movement of stem. In a nutshell there is additive arm (3D printed) that consists of 3 parts. Some mind-blowing calculations were made to estimate the dimensions of each part. What was quite new for me was the idea, that we do not want this arm to be totally streight in any step (maybe labile position).
The obvious question (not so obvious for me at that time) is if Servo is even able to move entire stem with gears.ESP32
The brain of this flower. I chose ESP32 because I wanted to control my flower via Wifi. To ESP32 is connected Servo and PCB with led filaments AND both of them are powered from it. On wiring diagramm could be seen how I chose to do it. One LED represents entire pcb with led filaments. I used N type transistor (2N3904) to boost briteness of LED filaments. Transistors of this type has 3 legs - emitter, base and collecter. Emitter is connected to GND, Base to pin 23 (we want to PW modulation) and Collector to (-) conductive circle of leds PCB.
Software
Here is everything a bit easier. I already know how to work with Servo, how to connect it to ESP32 and how to communicate with it via some website (see here).
#include #include Servo myservo; // GPIO the servo is attached to static const int servoPin = 13; const char* ssid = ""; const char* password = ""; // Set web server port number to 80 WiFiServer server(80); String header; unsigned long currentTime = millis(); unsigned long previousTime = 0; const long timeoutTime = 2000; void setup() { Serial.begin(115200); myservo.attach(servoPin); myservo.write(0); // Start at 0 degrees WiFi.begin(ssid, password); Serial.print("Connecting to WiFi"); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println("\nWiFi connected."); Serial.print("IP address: "); Serial.println(WiFi.localIP()); server.begin(); } void moveServoSmooth(int fromAngle, int toAngle, int delayPerStep = 15) { if (fromAngle < toAngle) { for (int pos = fromAngle; pos <= toAngle; pos++) { myservo.write(pos); delay(delayPerStep); // controls speed } } else { for (int pos = fromAngle; pos >= toAngle; pos--) { myservo.write(pos); delay(delayPerStep); } } } void loop() { WiFiClient client = server.available(); if (client) { currentTime = millis(); previousTime = currentTime; Serial.println("New Client."); String currentLine = ""; while (client.connected() && currentTime - previousTime <= timeoutTime) { currentTime = millis(); if (client.available()) { char c = client.read(); Serial.write(c); header += c; if (c == '\n') { if (currentLine.length() == 0) { // Send response headers client.println("HTTP/1.1 200 OK"); client.println("Content-type:text/html"); client.println("Connection: close"); client.println(); // Control logic based on URL if (header.indexOf("GET /on") >= 0) { moveServoSmooth(0, 60); Serial.println("Servo ON (60 deg)"); } else if (header.indexOf("GET /off") >= 0) { moveServoSmooth(60, 0); Serial.println("Servo OFF (0 deg)"); } // HTML page client.println(""); client.println(""); client.println(""); client.println(" ESP32 Servo Control
"); client.println(""); client.println(""); client.println(""); client.println(); break; } else { currentLine = ""; } } else if (c != '\r') { currentLine += c; } } } header = ""; client.stop(); Serial.println("Client disconnected.\n"); } }
From the script above is appearent that I wanted to control blooming of my flower via website. Later I modified it a bit, so it could be here
Robotic Flower Control 🌸 Robotic Flower Control 🌸
Open Flower Close Flower
I also wanted to somehow make a lighting show with my LED filaments, so I found and a bit modified this code:
const int ledPin = 23; void setup() { pinMode(ledPin, OUTPUT); } void loop() { // Efekt dýchání (pomalé rozsvěcení a stmívání s proměnlivou rychlostí) for (int i = 0; i < 3; i++) { for (int brightness = 0; brightness <= 255; brightness++) { analogWrite(ledPin, brightness); delay(map(brightness, 0, 255, 10, 2)); // zrychlování při rozsvěcení } for (int brightness = 255; brightness >= 0; brightness--) { analogWrite(ledPin, brightness); delay(map(brightness, 255, 0, 2, 10)); // zpomalování při stmívání } } // Zábleskový efekt (rychlé bliknutí) for (int j = 0; j < 5; j++) { analogWrite(ledPin, 255); delay(100); analogWrite(ledPin, 0); delay(100); } // Pauza mezi sekvencemi delay(500); }
Crochet flower petals
The cherry on top of this nearly blooming flowers are flower petals that I chose to crochet. I had some previous experience with crocheting flowers and decided to go for it. I used 2.5 mm hook, 50g cotton yarn and brass wires to make stable but flexible base. I am quite sure that nobody would replicate it but here is the written pattern that I came up with.
For pattern crochet abbreviations: st (stitch), sc (single stitch), dc (double stitch), hdc (half double stitch), tr (triple stitch), htr (half triple stitch), fc (quadruple stitch), hfc (hald quadruple stitch), slps (slip stitch).
1: 42 chain
2: Add wire, 2 sc, 2 hdc, 2 dc, 2 dtr, 23 tr, 2 htr, 4 dc, 2 hdc, 2 sc, 2 sc in last st, work on the other side, 2 sc, 2 hdc, 4 dc, 2 dtr, 23 tr, 2 htr, 2 dc, 2 hdc, 2 sc, slps into first st
3: 4 hdc, 4 dc, 3 htr, 2 tr, 2 hfc, 11 fc, 2 hfc, 5 tr, 2 htr, 2 dc, 4 hdc, 3 sc, 2 sc into last st, work on the other side, 3sc, 4 hdc, 2 dc, 2 htr, 5 tr, 2 hfc, 11 fc, 2 dfc, 2 tr, 2 htr, 4 dc, 4 hdc, slps into first st
4: Add wire, 4 sc, 2 hdc, 2 dc, 2 htr, 17 tr, 2 htr, 4 dc, 4 hdc, 7 sc, 2 sc into last st 7 sc, 4 hdc, 4 dc, 2 htr, 17 tr, 2 htr, 2 dc, 2 hdc, 4 sc, slps, into first st. Cut yarn.
I made 6 of there petals.
In the end it somehow worked, but rather spontaneously. I guess the journey is more important than the final destination