Go Down

Topic: GPS-connected Warm/Cool Table Lamp (Read 177 times) previous topic - next topic


I built a prototype of a GPS-connected lamp. It seems to work fine, but I have a couple of questions.

The idea for the lamp is to adjust the color temperature based on the location of the sun (cool during the day and warm at night). It works as follows:

  • Grab lat/lon, date and time from GPS (NEO-6M) - on first use
  • Store the lat/lon in Arduino EEPROM (Arduino Uno)
  • Store date and time in the realtime clock (DS3231)
  • Calculate the sunrise/sunset times and from there the desired color temp
  • Adjust the LED strip temp using PWM and some MOSFETs

Currently I'm powering it with a bench supply at 24V, since that's what the LED strip requires. I'm attaching a PNG of how I've connected everything together. My background is in software, so that part was relatively straightforward, but I'm less confident in the hardware. And mostly just don't want to start a fire or burn out any components.

My questions are:

1) I've read several places that I need to connect all the grounds together. But there are 3 different voltages (24V, 9V and 5V) .. am I doing this correctly?

2) Is there anything I need to do to make sure power doesn't flow from the 24V supply, through the USB to my computer? I'd like to be able to debug it using the USB serial port, while it's powered on.

3) Do I need to connect resistors between the MOSFET gates and ground? I followed the Adafruit tutorial, which don't have any, but I think I saw some in another example. But I don't understand why I might need them.

4) Anything else look off, or suggestions for improvement?

Thank you!! I am planning to make a custom enclosure for this but want to be sure the circuit is good before I try to put that together.


May 28, 2019, 04:33 am Last Edit: May 28, 2019, 04:34 am by jremington
It is extremely difficult to decipher Fitzing diagrams and I'm not going to try. We strongly recommend to use standard schematic diagrams instead.  Here is a recommended way to connect a standard logic level MOSFET as a low side switch (in this case a motor, but you can substitute an LED string).

For high side switches, use the Pololu Power Switch.

Breadboard tracks cannot carry more than a couple hundred mA, or they burn.


Thank you .. this gives me some good topics to go research.


May 28, 2019, 05:17 am Last Edit: May 28, 2019, 05:21 am by jremington
I forgot to mention that your Fritzing diagram shows the power and ground of the RTC connected together. That obviously won't work and is probably not what you intended. The rest of the power wiring is totally unclear.

Such errors are hard to spot, but are quite typical of what we see with this sort of misguided effort. Add to that the unlabeled or mislabeled components (as also found in your case) with no pin designations, and you are simply wasting your own and everyone else's time.


Thanks for catching the mistake with the RTC - I made a mistake on the diagram.

Point taken on the Fritzing layout. No intention of wasting anyone's time - just trying to learn. I will focus on creating a proper schematic and researching options for powering the circuit.

Go Up