Public Lab Research note


This is an upgrade for thermal-flashlight. Try building it and report back how it goes.

Visualight board for Thermal Flashlights

by warren | November 15, 2013 17:35 | 167 views | 6 comments | #9784 | 167 views | 6 comments | #9784 15 Nov 17:35

Read more: publiclab.org/n/9784


What I want to do

Leif Percifield's Visualight is an affordable Arduino-compatible USB-stick with a powerful RGB LED on it -- perfect for a thermal flashlight! So I jumped into just getting the colors to change. I'll try something with the Melexis infrared sensor later, but Leif left i2c pins open specifically so that we at Public Lab could connect such sensors! It's also open source. Leif is the best.

My attempt and results

I made this Arduino sketch: https://gist.github.com/jywarren/7488213

It just blinks each LED in succession; real simple.

Questions and next steps

Next up: connecting a power source (just a 2 AA battery USB power source) and the IR sensor. This thing is so compact, it'll fit nicely into a tube or other enclosure.


I made this Help out by offering feedback!


People who made this (0)

None yet. Be the first to post one!


I did this Help out by offering feedback!


People who did this (0)

None yet. Be the first to post one!


6 Comments

Leif's awesome, but I didn't get my visualight yet. I NEED. Where did you get this one?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


this wasn't the complete thing, just the stuffed boards, which Leif handed to me at the Barnraising.

Reply to this comment...


They've shipped!

Anyhow, I need to ask Leif where to connect the Melexis; on an Arduino Uno you can use the Analog 4 and 5 (as shown here: http://publiclab.org/notes/warren/12-12-2011/circuit-diagram-simple-thermal-flashlight)

From this page: http://arduino.cc/en/Main/ArduinoBoardLeonardo it looks like the 4th and 5th pin clockwise from the dot are A4 and A5 (as in the below image, marked with two magenta arrows); on the Visualight, these aren't used and might be quite hard to get to. But maybe Leif knows something we don't -- maybe on the Leonardo's chip, i2c (the protocol to connect to the Melexis temperature sensor) is assigned to different pins.

visualight.png

Reply to this comment...


Leif sez:

On the leonardo the I2C pins have separate pinouts on the board above the D13 connector. The visualight board exposes the I2C pins next to the LED and the should have silk screen markings...

Reply to this comment...


So i think those are the SDA/SCL pins marked here:

Screen_Shot_2013-12-13_at_4.18.20_PM.png

I'm reading on a pinout diagram of the Arduino Uno that A4 = SDA and A5 = SCL, so here's a crude Photoshopped diagram replacing the Arduino with the Visualight:

Screen_Shot_2013-12-13_at_4.45.37_PM.png

Be aware -- the Visualight supplies 5V so we have to use the 5V version of the Melexis sensor. Also, the resistors are 4.7k Ohm.

Who's gonna try it? Or better yet, make a little shield so we can make a bunch of these? We'd have to attach them to a USB battery pack, but it'll be really cool -- super bright and very compact.

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


While I don't have a VisuaLight board to test on yet (I did just order what appears to be one of the last ones on Square?) I tried connecting the IR Eval board to a Leonardo as part of the work in this research note- http://publiclab.org/notes/code4maine/01-22-2014/thermal-flashlight-using-mlx90614-ir-evaluation-board-from-sparkfun.

While the original intent was to enable the outputs on the Eval board so as to eliminate the need for another Arduino, I have yet to get this to work. It does work as a standalone sensor with SCL-A5/SDA-A4 on the Uno. I wanted to try the same sketch (the standard bildr.org sketch) on an Arduino Micro as it is much smaller and would yield clues as to how the sensor would work with a 32u4. As both the Micro and Leonardo have dedicated SCL-SDA pins, I figured I would use these instead of A5-A4 on the Uno. Oddly enough, I couldn't even get that far as it wouldn't even let me compile the sketch while a Leonardo was selected in the dropdown. As soon as I change back to an Uno, it compiles and loads fine. I thought maybe the error output might be of some help-

ThermalReadingsRGBMapping_LED.ino: In function ‘void setup()’: 
ThermalReadingsRGBMapping_LED:29: error: ‘PORTC4’ was not declared in this scope 
ThermalReadingsRGBMapping_LED:29: error: ‘PORTC5’ was not declared in this scope
ThermalReadingsRGBMapping_LED.ino: In function ‘void loop()’: 
ThermalReadingsRGBMapping_LED.ino:57: warning: unused variable ‘frac’[/code]

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Login to comment.

Public Lab is open for anyone and will always be free. By signing up you'll join a diverse group of community researchers and tap into a lot of grassroots expertise.

Sign up