Light Observation Week 2

A street in New York on a raining night

There’s something really compelling about headlights gleaming on a wet road. Usually tarmac is so matte, but add a splash of rain and it becomes very reflective.

The shape of the reflection is interesting; from the angle of the viewer the original source of each reflection is stretched out vertically.

There is a lovely texture to the reflections; the tiny bumps scatter the light so that you can see general pools of brightness and colour, but no detail.

The photo above has blown out the highlights, but in reality the pools of light reflecting from the headlights have a beautiful gradient of brightness.

Aside from the reflections, which draw so much of my attention, I love the way the light rain catches the bright beams of the headlights. Here you can see it best in front of the yellow cab. Just like dust or fog, this light rain gives the beams of light definition, volume.

Here’s a photo of the other direction, with similar scattered, long reflections.

Candle in the Wind (Version 002)

I have updated the candle so that it looks a little bit more like a candle.

Although the assignment was to replicate the essence of a candle, not necessarily remake a candle in the literal sense, I decided to enclose my e-candle in a way that evokes the real deal. Since I’m going for the feeling of lighting and un-lighting a real flame, I figured a true-to-life look would help sell the experience.

When all you have is a hammer…

Last week I took my first DIP into ATTiny waters. Although using the ATTiny adds a tad more complexity into completing a project, it opens up many new possibilities for small enclosures.

Originally I didn’t intend to use the Tiny this week. I had procured a large candle to house the electricals, but like a muppet I drilled too fast into it and broke it in half.

A candle, broken in half.

I panic-raided the junk shelf to see if there was an appropriate container that I could melt the wax into or something, and found a single tealight candle. Not one to shy away from a challenge, I found myself asking: can I fit A into B?

Thus came about my second attempt with the ATTiny85

The Process

The process was simple enough, since I had everything breadboarded up. I first made sure the circuit worked on a Tiny, which it did without much trouble.

I had a blank PCB board that, with some adjustment, fit nicely into the candle’s cavity.

I got pretty tunnel-visioned during the soldering, so the only picture I have of the process is of these markings I made to help me identify the different sides and orientations of the chip…

Fortunately everything went well.

In the end the package just fits within the candle. The microphone sticks out a little but as the project currently stands that is unavoidable. Perhaps the next iteration of this project could involve a NeoPixel ring instead of the jewel, and house all the different sensors on the inside of the ring.

The Outcome

Candle in the Wind (Version 001)

Week 2’s assignment for Light and Interactivity is to replace the look and feel of a candle, without the use of a flame. In class we were given an Adafruit Jewel; seven NeoPixels in a circle.

What does it mean to be a candle?

For the first prototype, aside from the colours within a flame I focussed on 3 elements of my reference candle:

  • The interactivity: how it feels to turn a candle on and off.
  • The intensity of light at various parts of the flame’s life.
  • The texture: The general shape and texture of the flame, what is opaque, what is transparent.

In reverse order from above:


The first thing I noticed about the candle’s flame is that there’s a section of transparency above the wick, with the brightest part hovering a bit above that. I tried to recreate this effect using rods of refractive acrylic, which I sanded near the top and left clear at the base. Hot glue offered a good way to stick the rod to the pixel with a bit of flexibility; permanent enough to hold but not so permanent as to damage the pixel if I chose a different direction.

Unsanded Rod
Sanded Rod

Intensity & Colour

Different parts of the flame flicker differently. In general, unless there’s a strong disturbance, the core remains a bright, mostly consistent yellow, perhaps with a relatively low frequency flicker. The parts around the core flicker more quickly from yellow to orange, and by the tip even red.

I tried to recreate this effect by giving each pixel its own HSI array, and then flickering/fading each pixel according to its own values. It involved a silly amount of arrays. The pretty messy code (it’s a prototype!) can be found at this GitHub link.


The class is called Light and Interactivity after all, so I figured I would have a bash at replicating some of the emotional investment that you put into a candle. With candles, you don’t just flick a switch or wiggle a wire to turn them on or off. You have to go through the process of lighting a match and holding it close to the wick. Maybe the first go doesn’t do anything. Then to turn it off you must blow it out, but just in the right way. How many of us know the struggle and embarrassment of failing to successfully blow out all the birthday candles on our cakes??

To try recreate this feeling, I split my sketch up into 4 sections. 1) Off. 2) Turning On. 3) On. 4) Turning Off.

While in Off, the sketch listens for a high light threshold on an LDR (intended to give the experience of ‘holding a match’ to the wick). This activates Turning On, which runs over a set time. After completing, Turning On transitions to On. While in On, the sketch listens for input from a microphone pretending to be a wind sensor. Blowing on the wind sensor affects the Intensity values of each pixel, but they will return to full brightness unless a high threshold is met. Once the threshold is met, the Turning Off sequence activates and the sketch comes to an end.

The high threshold for the wind sensor trigger has the added bonus of making it a bit difficult to blow out the candle. I stumbled upon this effect accidentally, but it definitely feels to me as if I’m trying to blow out an obstinate candle irl.

A few notes about the video above:

  • The ‘Turning Off sequence fades the LEDs from the outside in. My goal is to recreate the appearance of a dying ember.
  • Right now the fade is a bit jagged; the values are jumping down in chunks over discreet intervals, which gives a staccato appearance to the fade. While I’d love to fix this asap, I’m considering it an ‘edge case’ for this version; something that would be nice but it not essential to the core of the experience I am trying to create.
  • I have a handy line of code void(* resetFunc) (void) = 0; which allows me to reset the sketch at the end of the cycle, easily setting up the candle for another go.

Powering an LED (round 3)

Last semester I got really into powering my fabrication projects with human power. This in turn built off a project I made a year or so ago, a hand cranked LED sign. All of these were kind of hacked together, so I look forward to approaching energy generation in a more formal context for this class.

The projects mentioned above all use DC motors to generate power, so for this week’s assignment I asked the group if we could experiment with stepper motors instead.

It wasn’t difficult at all to plug in an LED to a 5V stepper and get it to turn on. The really surprising thing was that is didn’t seem to matter not only which direction you wired the LED (which makes sense as the stepper current alternates), but even which wires you plug it into. That was very surprising to me, I look forward to discussing how that happens more in class.


The first week’s assignment for Light and Interactivity was to experiment with different types of LED fades. The technical output was “create an uninterruptible fade. With these constraints I found an adequate box in the junk shelf, glued on some googley-eyes, and created ‘LightBot, the anxious robot’.

Lightbot has a pleasant slow blue breathing when it’s asleep, a healthy green heartbeat when he’s awake, and a panicked ‘HELP ME’ fade when it’s upset. Lightbot gets upset when it’s turned upside down…

I spent a bit of time experimenting with different fades on an Arduino Uno. I settled on a fast sinewave for ‘happy’, a slow sinewave for ‘asleep’ and two quick pulses followed by a pause for ‘panicked’.

At the end of the code for the two pulses, ‘state’ is multiplied by ‘intensity’, creating the two on, two off pattern.

Once I’d found the right fades I used the Uno as a bootloader to load the sketch onto a ATTiny85 so I could fit all the electricals inside the body of LightBot. I followed this guide to set up the tiny.

ATTiny85 with an accelerometer on pin A2, and 3 distinct LEDs on pins 0 – 2

Light Observation Week 1

Bedford-Nostrand Subway Station

This scene happened the day after the first class. With the idea of ‘observations’ fresh in my mind, one of the strangest lighting situations in my recent memory presented itself on a dazzlingly silver platter.

The light at the end of this tunnel was overwhelmingly bright. This picture does no amount of justice to it: as I walked into the station I had to shield my eyes as if staring directly into the sun. The word ‘dazzling’ comes to mind. The rest of the room seemed dark in comparison. There was also a strange low rumbling that came with the light. The scene was eerie and otherworldly; such a bright light inside felt misplaced. I was very curious as to what it was, this was obviously no ordinary subway train headlamp.

The light was so bright I could not tell anything about the source: how many lamps there were, what shape they were, even how far away they were. The light was signalling to my brain a large white-hot spot of “UNKNOWN: KEEP AWAY”. I can even begin to empathise with those alien abductionists, if this is the sort of light that they encounter to trigger their ‘visions’.

Something that really fascinates me is as I approached, the light immediately got noticeably dimmer. I reckon this must mean the light source is very directional: even the marginal increase in angle of incidence offered by walking a few meters along the subway platform was enough to make the light bearable to look at.

When far away from the source (SRC), but at a shallower angle from it (1), the light seems brighter than when I am closer, but at steeper an angle (2)

As I approached – a long approach as the source was all the way at the end of the platform – I discovered it was a train, but not the usual one. Google helped me learn it’s the MTA’s track inspector, helping keep the trains running safe and behind schedule.

Source: MTA

I haven’t focussed much on the rest of the light in the image because, well, the overwhelmingly bright light took all of my attention at the time. As I said, the rest of the room seemed dark in comparison. Even the long trails of tube lights from above seemed dim.

100 Days of Spaceships (in progress)

View on Instagram