Thursday, 28 October 2021
Stacking the deck: Layers of crystalline nanosheets enable tunable electronic properties
Wednesday, 27 October 2021
Carbon nanotubes could help electronics withstand outer space’s harsh conditions
A new 3D printing frontier: Self-powered wearable devices
Monday, 25 October 2021
Electrical control over designer quantum materials
Saturday, 23 October 2021
Stretchy, bendy, flexible LEDs
Thursday, 21 October 2021
New material could pave the way for better, safer batteries
Monday, 18 October 2021
Halloween Electronics Project: Jack-O-Lantern
In this Halloween electronics project, I’ll show you how to make a cool Jack-O-Lantern. I used a 3D-printed carved pumpkin, but a real one works just as well (or even better!).
The project is based around three normal LEDs that we control so that they look like a flickering flame. Since my “pumpkin” was very small, I used 3mm LEDs. For bigger pumpkins, I recommend using bigger and brighter LEDs. For example these ultra-bright orange LEDs.
The LEDs are connected in series with a resistor to the PWM pins on the Arduino so that I can control the brightness. And in the code, I change the brightness of each LED to a random value for every 50 milliseconds.
The result? Check out the video below:
Jack-O-Lantern Connection Diagram
Components Needed
- 3 x LED (Orange)
- 3 x Resistor (220 Ω)
- Arduino Uno
- Carved pumpkin (or something else to place the LEDs in)
I 3D-printed this pumpkin model from Thingiverse, but you can place your LEDs in whatever you have at hand. A carved pumpkin? A mummy jar (by wrapping some bandage around a jar and adding eyes)? Or and old /spooky) lantern.
Preparing the LEDs
Start by bending the positive leg (the longest one) of each LED:
Join the three negative legs and solder them:
Solder a resistor to each of the positive legs:
Solder wires for connecting to the Arduino, then cover with shrink tube:
Connect the negative wire to GND on your Arduino and the positive legs to pins 9, 10, and 11 on the Arduino:
Code for Flickering LEDs
The code is pretty straightforward. In the setup() function, I set up the LED pins as outputs. And in the loop() function, I use the analogWrite() function to set a random brightness value to each LED, with a 50-millisecond delay between each change of value.
// Halloween Project: Jack-O-Lantern wit flickering LEDs
// Code by Oyvind Dahl
// www.build-electronic-circuits.com
int ledPin1 = 9;
int ledPin2 = 10;
int ledPin3 = 11;
void setup() {
// Set LED pins as outputs
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
}
void loop() {
analogWrite(ledPin1, random(10, 255));
delay(50);
analogWrite(ledPin2, random(10, 255));
delay(50);
analogWrite(ledPin3, random(10, 255));
delay(50);
}
Questions about this Jack-O-Lantern project?
Let me know your questions about this Jack-O-Lantern project in the comment section below!
Copyright Build Electronic Circuits
Thursday, 14 October 2021
Bridging optics and electronics
Molecular mixing creates super stable glass
Tuesday, 12 October 2021
Researchers breathe new life into paper books with the Magic Bookmark
Toward more energy efficient power converters
New nanostructure could be the key to quantum electronics
Friday, 8 October 2021
Elastic polymer that is both stiff and tough, resolves long-standing quandary
Wednesday, 6 October 2021
New type of magnetism unveiled in an iconic material
Tuesday, 5 October 2021
Smuggling light through opaque materials
Ultra-short flashes of light illuminate a possible path to future beyond-CMOS electronics
Monday, 4 October 2021
Induced flaws in quantum materials could enhance superconducting properties
Sandwich-style construction: Toward ultra-low-energy exciton electronics
Tiny, wireless antennas use light to monitor cellular communication
Researchers developed a biosensing technique that eliminates the need for wires. Instead, tiny, wireless antennas use light to detect minute...
-
In this project, we will learn about the MCP2515 CAN Controller Module, how to interface the MCP2515 CAN Bus Controller with Arduino and fin...
-
Interfacing DC motor to the microcontroller is a very important concept in many industrial and robotic applications. By interfacing DC motor...
-
Do you need a MOSFET gate resistor? What value should it be? And should it go before or after the pulldown resistor? If you’re a bit impati...