Lamp Lamp

Who doesn't need a lamp with wifi? Probably everyone. It is cool however

Similar projects worth following

The idea is to make a smart lamp that can dim and switch five sets of leds, and one 230v dimmable bulb. 

The microcontroller detects the phase of the ac after the transformer. This will be used for both the dimming of the ac bulb. It will also keep the clock on time since the mcu will use the internal 8mhz rc-oscillator, which is not accurate enough. 

The pic16f886 could run on 20MHz but not in this project, because it has to run on 3.3 volts. 

For the connectivity part, a CC3000 wifi module will be used. This can take care of everything up to tcp or udp. It will feature a small web-server, which will store it's information on a small sd-card. There will be a few POST requests possible which will set the color and the intensity etc of the light.

  • 1 × 12v regulator
  • 1 × cc3000 wifi module
  • 1 × 3.3v regulator
  • 1 × pic16886 (if it proves sufficient) low end-ish mcu
  • 1 × a bunch of transistors and stuff to switch leds

View all 9 components

  • Voltage regulating

    david02/26/2014 at 13:28 1 comment

    Ok, turns out, an op-amp with a transistor don't really make a good voltage regulator. It worked fine for a while, but the transistor got really hot. So i figured, it is temporary anyways (I am waiting for a decent 3.3v regulator), so the worst thing that can happen is that it doesn't have any power anymore. I figured wrong. It broke, and gave my cc3000  nine volts. So it is fried now and i have to order another one.

    I'm still not sure why the transistor got so hot, because it was rated for 1.5 A. I suspect though, that in my setup it was just dissipating all the excess voltage.

  • Patching

    david02/25/2014 at 12:00 0 comments

    ​I am now at the point where I can connect to the network, and send udp or tcp data. Up to now I have not been able to listen on sockets. I suspect that this is due to the firmware version. It is now version 1.10. I will now have to upgrade the firmware.

    The hardest thing about updating the firmware, is that i don't have an mcu available with enough flash to store the firmware update. So I will just fix the sd-card first, and store the firmware there.

View all 2 project logs

Enjoy this project?



david wrote 09/12/2014 at 10:40 point
I have just uploaded the schematic. I have also eagle files, but i don't think i can upload them. Sorry for the late update. The project has been on hold for quite a while

  Are you sure? yes | no

david wrote 04/10/2014 at 12:00 point
I will also implement NTP sometime soon, but i needed the zero-crossing anyways to dimm the incandescent bulb. ( I have tried it once on the cpu-timer, and it gives really pretty aliasing effects ;)

  Are you sure? yes | no

david wrote 04/10/2014 at 11:58 point
I have not yet made a scematic, I should make one soon to keep overview (and to actually make a pcb one day). I will post it as soon as i make it. As for the zero-crossing, i use an op-amp, and a 3-resistor voltage divider. Then compare the two outputs from the transformer. The output is then clamped to 3.3v by a diode, and put into PORTB (with interrupt on change).

  Are you sure? yes | no

Mike Szczys wrote 04/09/2014 at 14:18 point
Do you have a schematic you can post? I'd love to see how you're detecting the zero crossing for your clock signal.

Now I'm a fan of using mains frequency as an accurate (speaking long-term) clock source. But with WiFi in the project have you considered using NTP to set time automatically and keep it up-to date? You could phone home ever hour to make corrections.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates