Marco Zonca
Published © GPL3+

Artistic never-ending Candle LED: the warm glow of a fire

A lamp with LED to simulate a candle inside, inspired from Cubosfera by italian artist A. Mendini, switching on/off by touch, USB powered.

IntermediateFull instructions provided279
Artistic never-ending Candle LED: the warm glow of a fire

Things used in this project

Hardware components

Microchip ATtiny1614 microcontroller
×1

Software apps and online services

Arduino IDE
Arduino IDE
PCBWay online Services for PCB and 3D Printing (optional)

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

Chubosphera 3D printing file (you need 2 of this)

Sketchfab still processing.

Top touch support 3D printing file

Sketchfab still processing.

Bottom cable support 3D printing file

Sketchfab still processing.

Schematics

Schematic diagram

PCB Gerber file

PCB top layer

PCB bottom layer

PCB top silk

PCB bottom silk

Code

Chubosphera Arduino IDE Sketch

Arduino
/*
 * ard-chubosphera by Marco Zonca 02/2025
 * 
 * A lamp with LED to simulate a candle inside, inspired from Cubosfera by italian artist A.Mendini
 * 
 * Attiny 1614 microcontroller, touch sensing to switch on/off, red and yellow LEDs, 3v3 regulator,
 * four NPN transistors, some SMD components, USB powered
 * 
 * Touch sensing is made with two 2N2222 transistors in darlington; the analog value on port 3 (pa7)
 * should be normally around 1023; when touching should go down to a value between 200 and 800 
 * but it depends of human body and local factors (i.e. grounding); prudentially the circuit switch 
 * already at 1000 or lower;
 * 
 */

boolean isDebug=true;

const char pinButton=3;
const char pinLedRed=6;
const char pinLedYellow=10;
boolean isLightOn=false;
boolean isChanged=false;
int val=0;

void setup() {
  if (isDebug==true) {Serial.begin (115200);}
  pinMode(pinButton, INPUT);
  pinMode(pinLedRed, OUTPUT);
  pinMode(pinLedYellow, OUTPUT);
}//setup()

void loop() {
  val=analogRead(pinButton);
  if (isDebug==true) {Serial.println(val);}
  if (val <= 1000) {  //                        switch on/off
    isLightOn = !isLightOn;
    isChanged=true;
  }
  if (isLightOn==true) {  //                    ON, random brightness and delay
    analogWrite(pinLedRed, random(0, 255));
    delay(random(50, 200));
    analogWrite(pinLedYellow, random(0, 255));
    delay(random(50, 200));
  }else{  //                                    OFF
    digitalWrite(pinLedRed, LOW);
    digitalWrite(pinLedYellow, LOW);
  }
  if (isChanged==true) {
    delay(2000);
    isChanged=false;
  }
}//loop()

Credits

Marco Zonca
17 projects • 50 followers
"From an early age I learned to not use pointers"
Contact

Comments

Please log in or sign up to comment.