Close

Problems & solutions

A project log for No point IR camera

There are point and click cameras, but there is no point in existence of this one

szajaSzaja 04/13/2019 at 05:260 Comments

It's really confusing when your project just stops working overnight by laying on a table. In my case it turned out that there was a short somewhere inside a breadboard resulting in LEDs flickering. It took me over a week to debug this.

There is an issue with the library which I use for IR sensor. Datasheet defines that measured temperatures range is from 0 deg. C to 80 deg. C. It's not really true, as you can also get negative values, which result in variable overflow. As I have only 8 LEDs for temperature scale I decided to stick with default range from 0 to 80 deg. C. and cut any values above or below. But I will try to investigate if it will be possible to improve how library works.

Lastly, I changed button used to change temperature scale for a rotary encoder. There is a ready to use Adafruit library for this component as well, so it was really easy to do. Now the temperature scale is changed by rotating encoder left or right, which is much better than using a button for iterating over 8 values. Moreover, as encoder also has a button, I implemented a feature to send map of temperatures over serial port. So it will be possible to capture images when device will be connected to a PC. Cool! It may be a little bit less useless after all!

I planned to make a comparison between ItsyBitsy M0 and M4. Right now I'm using only M4 version, because there is a problem with not enough memory in M0. The fact is that the code is really sketchy, as I'm rather a poor programmer and focus on making thing work more than being effective or elegant. But I will try to make some optimizations, i.e. do not use floating point values for calculations everywhere.

As for right know all planned features are implemented, so I can move to power supply system and case designing. Here is the setup ready for test:

I moved the camera from the breadboard to set the stage easier. For a test I took a slightly warm tea and a piece of frozen meat.

Images are a bit dark to show colours of the LEDs. Here is the output:

You set the temperature map by rotating the encoder. Basically it moves the temperature which is shown as a full red (RGB 255, 0, 0). In this case it's 50 deg C, as 5th LED (counting from the left) at the line at the top is full red. Full blue (RGB 0, 0, 255) is always 0 deg. C and it's not shown, 1st LED is for 10 deg. C. So you can estimate, that the meat is really frozen (0 deg. C or below, as they are flattened), and the tea is somewhere between 40 and 50 deg. C. It works!

Discussions