Blow out LED

Hello everybody,

Today I would like to introduce you to a project that is as ingenious as it is simple. We found this on Blow out this Arduino LED

This project proposal is aimed at everyone who likes to tinker and try. For most of our projects, it is only necessary to copy the code to the controller and then wire everything up. Due to the lack of hardware, it took us some time to find the right components and to coordinate them.

The principle of operation:

When an LED is operated, the current flowing through it generates heat at the emitter crystal. The warmer an LED gets during operation, the higher the internal resistance. If we cool an LED, for example by blowing on it or a cold spray, this is reduced and we register a voltage drop.

[as you can see here we wired our LED with the wrong colors]

The hardware:

In the example, a 220 ohm resistor and a wired 0402 SMD LED are used. If you have this hardware available, you can use the following sketch without major changes, it is only necessary to make a small adjustment here and there. This is because the changes in voltage are marginal and the environmental conditions sometimes vary greatly.

The code:

// Blow Out LED Ave creates an LED that you can blow out. It automatically relights after 2 seconds
// Copyright 2018, Paul H. Dietz

// LED Connections
#define PLUS A1               // High side of the resistor
#define MEASURE A0            // Low side of resistor and anode of LED
// Cathode of LED goes to ground

#define NUMSAMPLES 10         // Number of samples to keep
#define MINJUMP 150           // Minimum jump for blow out

long int sensedata[NUMSAMPLES];
int dataptr = 0;
int buffull = 0;

void set up() {   Serial.begin(250000);                     // Initialize serial communication   pinMode(MEASURE, INPUT);   pinMode(PLUS, OUTPUT);   digitalWrite(PLUS, HIGH);                 // Turn on the LED

void loop() {   int cnt;   long int sum = 0;   // Sum 256 adc readings (to reduce adc noise)   for (cnt = 0; cnt < 256; cnt++) {     sum = sum + analogRead(MEASURE);   }      Serial.println(sum);                      // Output sum so we can watch with Serial Plotter   // Compare current measurement to oldest if buffer full   if (buffull && (sum > (sensedata[dataptr] + MINJUMP))) {       // Temperature drop exceeded minimum - turn off     digitalWrite(PLUS, LOW);     dataptr = 0;                            // Reinitialize the buffer     buffull = 0;     delay(2000);                            // off time for LED     digitalWrite(PLUS, HIGH);   }   else {     sensedata[dataptr] = sum;               // Store the latest data in the buffer     dataptr++;                              // Update buffer pointer     if (dataptr == NUMSAMPLES) {            // Check if dataptr went past end       dataptr = 0;                          // Reset the dataptr to beginning       buffull = 1;                          // Mark that buffer is full     }   }

Have fun tinkering and trying :)


For arduinoProjects for beginners

Leave a comment

All comments are moderated before being published

Recommended blog posts

  1. Install ESP32 now from the board manager
  2. Lüftersteuerung Raspberry Pi
  3. Arduino IDE - Programmieren für Einsteiger - Teil 1
  4. ESP32 - das Multitalent
  5. OTA - Over the Air - ESP programming via WLAN