Logic board update

Lots of movement on the logic board today.

Instead of printing and assembling 16+ LED boards plus a logic board, why not just put it together (like PB&J) onto one board? Then I only need to attach one PCB to the enclosure, and the less things I need to do myself, the better.

Below you can see a Fritzing printout taped to a 1/2″ piece of foamcore inside a prototype enclosure. I expect that the base will be thicker in order to house more stuff, and by stuff I mean at least a battery and charging mechanism, and so that I can hold the Lamp without touching the glass.

IMG_7413

As I was showing this around the office, a gauntlet was thrown down: why use an Arduino Uno r3 when I could use a smaller version without any penalty in processing or functionality, with the added gift of miniaturizing the stack? I didn’t have an answer to this, except, “Umm.”

So challenge accepted!

BigRound+LED+MINI-2_pcbI have now integrated an Arduino Pro Mini 5v into the PCB stack. I also added some power flexibility by adding a power mounting block and an external 5v voltage regulator, even though the Pro Mini can accept up to 12VDC and has a built-in voltage regulator. I wanted to split out that function so that the Arduino doesn’t have to do any additional work. Also, I don’t know exactly how much power the main light will take, and I want some headroom to attach the largest battery I can safely source.

You might remember, dear reader, that I originally started this experiment using an Arduino Pro Mini 3v3 board (oh how we go round the bend again). I decided against reusing the 3v3 board because the GPS module which I found to be most stable needs 5v and I don’t want to go around shifting voltage where I don’t need to. I’m all about reducing complexity now.

With that in mind, I am certainly thinking about removing IC3 & IC4; IC1 & 2 run the 16 compass LEDs, while IC3 & 4 are two additional shift registers  which are legacies from my original idea to build my own LED lighting array. I am now considering using an LED string such as this one sold by Adafruit or a single point source I can vary in intensity (yet to be sourced). Moving my main power supply from a 3v3/5v LiPoly source to a high voltage battery would open up more lighting sources I could use efficiently.

Adafruit and Sparkfun orders placed, let’s play with it when they arrive.

 

 

 

Compass Prototype 1

Building on yesterday’s Compass LED PCB prototype, I wanted to get the compass actually working so I could drive some LED’s.

Using Adafruit triple-axis accelerometer & magnetometer LSM303 and NeoPixel Ring – 24 x WS2812 RGB LED, I was able to get a functioning digital compass fairly quickly utilizing the Adafruit_LSM303 library.

I don’t know if I will use off-the-shelf LED’s for the compass as shown in the Compass PCB prototype 01 or use a Neopixel version via SparkFun, the WS2812 RGB LED Breakout. I save about 1.3 mA per LED versus my chosen through-hole LED if I use the WS2812 with a single channel of the RGB on, but to get white it costs me 60 mA! If I use this breakout board I won’t have to assemble or test out the components and boards or test out a self-designed board, which is a huge time saver and reduces the change of me messing up, but I don’t think I can afford the power for the compass.

If I use the Neopixel for the compass, I’m stuck using the Neopixel library for the compass and my home-brew shift registers to drive the lamp subsystem. Which might not be a problem since they both do different things. In the end it might come down to aesthetics: which system do I want more control over the color of light, the lamp or the compass? I think I would want more control over the lamp colors via the Neopixel than control the color of the compass.

Compass Prototype 01

Until I get a handle on my power consumption, I won’t be able to choose one system over the other.

 

 

Prototype 4 – Compass

Another day, another module. This time a compass, well, a magnetometer. In this case a triple-axis Accelerometer+Magnetometer (Compass) Board – LSM303 from Adafruit. This module will allow the lamp to know which direction (nominally) it is pointed.

Besides the lamp becoming brighter the closer it gets to a center of population, there is a compass ring which can point you in the correct direction. Prototype 3 with the shift registers is an early concept of the 16 LED’s, albeit in a straight line.

Conceptually it should work this way: the GPS module will calculate the distance between the Lamp and the closest Population Center, and get the numerical direction in degrees. The LSM303 will calculate the local orientation of the Lamp. Then we can compare the two, do some math, and light one of the 16 LED’s. Here is a great example (code) using Adafuit’s NeoPixel’s (warning, loud music):

Right now, the compass module is orienting what appears to be fairly close to precise measurements (using my trusty compass) and the trust sharpie + post-it combination. I just need to build the LED array, but that shouldn’t be too bad, but that is dependent on evolving the case design an additional step.

I am a bit concerned about magnetic interference from the other components, so I will have to find a place for it far away from the battery and the GPS module just in case.

IMG_7297.JPG