Hacking a sunset lamp

i have a usb anko sunset lamp. i quite like it. it has wifi and can connect to a phone. however i find it a bit fiddly to use. I'm using it to give a sunset effect in a stopmotion movie. what i'd like to do is hack it so that it can be faded from an arduino. i dont think i need the need colour changing, more interested in it to fading up and down with the red led. Not sure if its possible or how to do it exactly.

there's some sort of colourized film over the top, i'm loathe to remove it just yet. From my inspection there is three wires r,g,b and a fourth that goes to the 3 volt solder pad. So i'm thinking while it is 5v usb i think internals are three volt there is a 5 volt on the right but i dont thinks its used. Any thoughts or suggestions on how to proceed would be most welcome

Step 1 would be a hand drawn wiring diagram.

Entirely possible, but very difficult to do if you want the regular control over wifi etc to keep functioning.

An easier, more sensible and actually fun project is to build your own version from the ground up. It's not super difficult to do and would be a nice starter project.

3 Likes

I would suspect that the portion of the lamp in your photo is just an RGB LED assembly, and the actual control circuitry and usb/wifi interfaces are housed in a portion of the lamp that you have not shown. Disassembling what is shown in the picture would likely not provide any useful information.

You need to be careful with photographing LEDs, the fading is usually accomplished by rapidly blinking the LED between the ON and OFF state using PWM, which can cause undesirable optical effects when filmed.

2 Likes

The eighteen 0204 LEDs on the boarder might be RGB and maybe 3v3, with the center maybe WHT LED 5v. Is the other end of the cable exiting the enclosure a USB? ... but USB only has four wires (+, -, dat+, dat-).

There is a QRC on the circuit board... maybe a close-up, non-flash, still image would help.

1 Like

Yes, this is a very valid concern. It can be solved, for instance, by increasing the PWM frequency beyond a limit that would be problematic for video. Or linear dimming of course.

However, in this case, it's a non-issue:

So it's really still photography.

im hoping that the wifi circuitry stuff is pretty small as there aren't many places to hide it in the lamp. base has the cable passing through it. there appears to be a round shaped weight in the base to aid stability. it may be in the wired switch thats on one end of the cable.

rsmls

8hpost #6

Yes, this is a very valid concern. It can be solved, for instance, by increasing the PWM frequency beyond a limit that would be problematic for video. Or linear dimming of course.

However, in this case, it's a non-issue:

So it's really still photography.

rsmls is right. Most times photo duration is half a second or longer. long enough that flicker isn't a problem.

no need for the wifi control the most i would like to achieve would maybe keep the colour changing with an anduino, if thats too hard i'll be happy with just fading the red led from an arduino.

If by starter project you mean cannibalizing the lamp i have already, and swapping in a new red led and driven by an arduino, i'm fine with that.
I like the size of the lamp i have, it is small has a rod that makes it easy to mount to things also the coloured film between the lens and led probably helps sell the effect. I'll post some better pics later have to go water the garden now

Hello onebyteshort

Did you post the data sheet and schematic already, didn´t you?

The thing is pretty cheap, so if you really want to hack it, the first step is to take it apart and post clear, focused, close up photos of the PCBs, both sides.

If you are careful with the disassembly, it will remain functional (or, if you have to break connections, could easily be put back into a functional state).

i didnt post any schematics before however a google search for anko sunset lamp schematic came up with this

and this

not quite what i was expecting and probably not very helpful either...

yes only $25 so not a huge expenditure. i think your right, i will do that, i'll just be careful with the film as i think that helps sell the effect. More photos shortly.

A forum:
https://www.elektroda.com/rtvforum/topic3998715.html

A user manual:

ok here is the mostly disassembled lamp. xfpd mentioned 4 wires and yes there is four wires from the usb cable.

the wifi controller i presume

a close up of the led. Its stuck down pretty firmly, i'll have to get a screwdriver under it to pry it off i guess. If we need to see the back but it may not live to tell the tale.

well thats a pretty impressive find by xfpd. clearly more knowledgeable than me. thanks for that.

I do not think you will find any circuitry hidden underneath the circuit board in the lamp itself, all the control is done in the part you identify as the wifi controller. If you can get a good close-up view of the chips on that board it would help a lot.

You can see a further 18 LEDs under the yellow, probably white LEDs. I would guess as many white LEDs under the orange mass. The "fried egg" coloring is probably just for the sunset coloring.

Is the square next to the "+5V" a QRC scan code?

i don't think so, to my untrained eye and the best photo i can take... it looks like a solder pad its just the solder illuminating oddly i think.

here you go.


OK, that's pretty straightforward.

By the looks of it you've got, from left to right (looking at the component side):

  • a 3.3V logic power supply based on the generic AMS1117 linear regulator; this powers the controller.
  • An approx. 3V DC-DC buck regulator that brings 5V input down to approx. 3V for the LEDs.
  • A controller with integrated WiFi (not PCB antenna); it looks like a 7231N, for which there's a datasheet here: https://www.iottech-corp.com/datasheet/iot/ITM-7231N-BK%20Datasheet_V0.3_20211105.pdf It has WiFi and most/all of the regular peripherals you find on a modern microcontroller.
  • Three low-side switching MOSFETs that make the LEDs dim using the PWM output from the controller. (On the backside there's the user input microswitch in this area).

You could easily substitute your own circuit for this one. It might even be possible to re-program the controller with your own software, but this would involve some serious digging into datasheets/reference manuals (which may be only available in Chinese), getting the necessary programming tool (hardware) and toolchain (software) and then working your way to get usable code; I don't think there's an Arduino core for this mode, so you'd have to rely on bare-metal programming. Nice if you're part of the Hackaday crowd, but if you just want to get the job done, just ignore this PCB and substitute your own Arduino-based board.

An intermediate way of hacking this device would be to cut a few traces around the microcontroller and solder your own device to it; you could then keep using the 3.3V and 3V power supplies as well as the switching MOSFETs and the input button. It's doable with a utility knife, a loupe/microscope and a fine-tip soldering iron. Something like an Arduino Pro Micro or an even smaller board may even be made to fit inside the original housing.

Of course you could also simply set the entire controller part (including housing) aside and substitute your own project box.

The LED arrangement looks simple enough; apparently you've only got R, G and B LEDs and my guess is that you'll find red in the center, then green in the middle and blue along the outer rim. Note the current limiting resistors of 1Ohm for R+G and 0.5Ohm for B; blue has a higher forward voltage so they used a lower value resistor there. It's all very straightforward. Maximum continuous currents will likely be around 1.2A for all three channels, so 3.6A in total. You need a 3V power supply capable of sourcing at least ca. 5A for this light source (always apply a little safety margin).

The 5V pad on the light source PCB is a little puzzling; you could test with a continuity meter whether it connects to anything. Anyway, you could just ignore it for your application.

Definitely not; that's an aluminum-core PCB so it's a single layer, single-sided PCB. The back is bare aluminum for heat dissipation. The housing probably acts as a heat sink. I bet this thing gets HOT when/if run at full power, which it's likely not supposed to.

No, I actually meant that you could build something like this starting from scratch. But I can see how and why the form factor / physical shape of the light source and its housing might be useful to you, in which case you can indeed substitute your own controller. Note that the lens included looks like a generic COB LED lens that you can buy for around $1 a piece (or less) on AliExpress. It's either a 60 degree or a 120 degree angle type.

When adding your own controller, keep in mind that the heat dissipation of the housing probably is insufficient to run this thing at full power for more than 3 seconds or so. It's likely intended to only be used with all three channels dimmed to some extent. I expect that the light source as shown is capable of dissipating around 3-4W for any extended period of time, so roughly 30% of the power the LED arrangement could do.

Esphome has quite good support for that chip.

Otherwise, like @rsmls suggested, you could cut the 3 traces between tuya chip and mosfets and solder wires directly to mosfet gates(for easier soldering). Add gate resistors and power arduino from same supply.

1 Like

i have never actually paired it to my phone, after about a minute it stops blinking and goes to an unblinking red, its brightness has been sufficient for my needs so far. I am not sure what level of power its set at but i have had it on for hours and i dont remember it getting hot. I have put it back together and am running a scientific test as i type this :wink:
Well its been on for an hour and the housing is not even warm to the touch neither is the pcb warm. I am guessing that the normal brightness level isn't overly high.

i'm looking at the 1w bright red led as that is the only red in stock. looks like its coming from china. i haven't been able to find one locally. i presume it would be better to order it with the pcb to help with cooling ?