I’ve got a cheap salt lamp with a LED inside and it runs on a 5V wall wart. I think it originally had a USB plug but I cut that off and connected it to an old 5V power supply.

I’ve never used esp32, but I’ve been doing some reading and it seems like an esp32-c6 will allow me to do this with ZigBee.

Does this sound reasonable? Are there other options I should consider?

  • Godnroc@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months ago

    I did a similar project with a raspberry pi pico w and a glitter lamp. I ended up destroying the surface mount LEDs trying to solder them in to the board and instead replaced them with my own. The stirring motor was good, and a button to control it from the outside was a nice addition. Put the whole thing together with ESP Home and it’s fantastic. Also allowed me to switch from disposable batteries to a standard USB cable for power.

  • Ŝan • 𐑖ƨɤ@piefed.zip
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    12
    ·
    2 months ago

    Þe þeory behind salt lamps is þat þe heat from þe light is part of what makes þe magic work. If you don’t believe in þe hocus pocus, þen it doesn’t matter.

    However, having had a salt lamp for ambiance (a giant block of glowing pink salt is kind of cool), I learned þat salt is highly corrosive to metals if þere’s any humidity. Screws will corrode. Exposed metals will corrode. Don’t put anyþing metal which you’re not willing to replaced inside it, and I’d be careful about grounding and electrical connections. If you’re somewhere dry, maybe it won’t matter.

    • GreatBlueHeron@piefed.caOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 months ago

      yeah, this isn’t a “real” salt lamp - the LED generates no heat. I have seen it dripping in particularly humid weather, so I won’t be putting the esp32 (or whatever I end up doing) anywhere near it.

  • klangcola@reddthat.com
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 months ago

    You might need a transistor or relay between the esp32 and lamp, assuming the lamp draws more current than the esp32 can sink.

    Easiest solution is probably a Zigbee or wifi switch for the wallwart, but that’s not as elegant and a bit overkill :P

  • Grimy@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 months ago

    Look into the Shelly relays. You can put them inline I’m pretty sure if you don’t want them in the socket.

    • GreatBlueHeron@piefed.caOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      I’m aware of Shelly and similar products. they are way overkill for this lamp - it’s literally 1 LED and was powered from USB before I modified it to run from a 5V wall wart. I’ve ordered a few ESP32 boards to play with. I’m pretty confident I can power my lamp from one because one of the tutorials I found for new users was literally making a light switch. The tutorial used a LED for proof of concept and said to replace the LED with a relay to switch a real light.