Work in progress: Life from light

I try to only post after I’ve completed a project, but this one has so many pieces (and is not done yet) that I wanted to already post some interesting things that have happened.

Inspiration
In Becky Chambers’ “A Psalm for the Wild-Built“, the main characters reach a mountain retreat. The imagery of the description of the building’s roof, striped with solar panels and grass, was described as:

glossy blue contrasting with buzzing green, an attractive striped mosaic made of things that drew life from light

Inspired, I set off to make something that mixed solar panels and plants – things that draw life from light.

Grand hack
I started ruminating on mosaics, solar panels, lights. I searched for examples in architecture, arts, flower pots, and even asked DALL-E to help out (see some images, right).

I considered what the project ‘said’. For example, I wanted to do construct it in PLA filament, because PLA filament broke down in the sun. I even dabbled, unsuccessfully, with wood PLA, to make it seem more natural.

Thinking of the hardware, my previous solar panel project had these small panels and supercapacitors to power a power-sipping chip and a single LED. I could use those and wire those up, like before.

I then started to think of larger panels and batteries, to drive more power-hungry NeoPixels, that would be animated with a fully-powered chip. That would require a proper battery, tho not LiPo, as that doesn’t do well in the cold, some charging circuit, maybe a beefier solar panel.

Then I realized I had some solar-powered outdoor lights on my deck and porch. They had come in a pack of six and we had only used five. So, yep, I busted the remaining one open.

Just for parts
These solar-powered outdoor light have a large solar panel, a panel of LEDs, a motion sensor, a button switch, a large 1800mAh LiIon battery (that I know works thru the winter), and, inside, a board to control, charge, and respond to everything.

All the parts I needed for $5.

I analyzed all the chips and paths on the board, to reverse engineer how it works. The brains of the board is an 8-pin chip. I was able to figure out all the traces, how the chip read the solar panel’s state, turned on LEDs, and responded to the motion sensor and button switch. And I could measure and follow the power paths.

As is usual in this day and age, there was a video that did a tear down of a similar product. That product had more LEDs and a more complicated structure, but the board characteristics and function were very similar to the one I had. And the video was helpful in confirming what I was seeing and understanding the parts.

Layer upon layer of surprises
I was really pleased that I could use the board to power things – all the parts I needed in one place, all ready for me to use.

But the real surprise was when I noticed the VCC and GND pins of the chip (pin 1 and pin 8, respectively) reminded me of one of my favorites: the ATtiny402. Not only were those two principle pins the same, but the footprint was the same. That meant I could remove the existing chip for one my own that I could program and use to take control of the board.

To be fair, the ATtiny402 isn’t a perfect fit for this board. Pin 6 on the board turns on the LED panel. In the ATtiny402, that is the programming pin, best left like that, tho it can be programmed for a signal pin (but not so good). In any case, there might be some bodging needed.

Sidebar surprise
Interestingly, identifying an unknown chip, based on pin mapping, is hard. I just happened to be browsing Hackaday and they were talking about cheap MCUs. One thing led to another and I was checking out the cheap chips on LCSC when I got the idea to 1) filter for SOIC-8 (the chip package on the board); 2) look at the data sheets for the cheapest. Yes, I was looking for a possible chip from the solar light.

Wouldn’t you know, the three four five six cheapest (three different vendors) that came up ALL had VCC on pin 1 and GND on pin 8. And these are ALL 8-pin SOIC150/SOP150 – the same size as on the board..

Cool!

Interestingly, four of the six were OTP – “one-time-programming.” I will guess that the ones used in the solar lights were of the same category of these cheap OTP chips.

Sidebar of the sidebar
The UPDI programmer I had for the 402 was no longer working, and I had a bunch of bricked 402s I wanted to revive, so I decided to make a HV UPDI programmer. And rather than cobble something together, I thought I’d make a proper programmer board.

I ordered the PCB for this board and got the components, only to find that the components were frakkin’ small and impossible for me to hand-solder with the equipment I had.

In the spirit of “When you give a mouse a cookie“, I realized I had to finally make use of my toaster-oven reflow oven. Tho, to make a long story short, my first test suggested I had to do some heavy insulation of the oven. I plunked down money to get the materials, insulated the oven, and nothing changed. Then I just tweaked the reflow profile and all was good.

Gah.

Alas, I am about to use the reflow oven – I haven’t had much time to do it properly. But I hope after spending money on a bunch of boards, components, oven insulation, and the reflow controller (which I’ve had for a while), I’ll get one decent (and damn expensive, haha) Serial HV UPDI programmer.

Back to the main story
In any case, not satisfied with my pace of making the oven, I just decided to build something.

After a few iterations, I came up with a patterned translucent case to hold the switch and motion sensor, the solar panel, battery, and the control board. I then soldered it all back together and used it to power an ATtiny45 animating a fire-like flicker with NeoPixels (everything shoved in the case, image, right).

The battery and solar panel are plugged into the board as usual. And the motion sensor and switch work as usual, telling the board’s chip how to behave, time out the lights, detect the state of the solar panels. The chip thinks it’s turning on the LEDs, but instead it powers the ATtiny45, which then animates the NeoPixels (see image of it lit up at top).

The light was well received. Tho, of course, I am fighting the temptation to keep iterating on it.

In progress
You might be wondering why I called this “in progress” if I built something cool. With the sidebar of the sidebar and mice and cookies, you’d be forgiven for forgetting the impetus of this project.

The inspiration was for a mosaic, and I have only hacked the solar lights so far. I want to make a few more of these lights and integrate them, as originally planned, with some plants or grass.

Not to mention, I hope to get around to assembling that HV UPDI programmer so I can hack the board with my own chip.

So, we’re not done yet.