Build a Teensy-based thermal imaging camera

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2017
  • Look for hot or cold spots or find heat signatures of ghosts with this DIY thermal imaging camera. Uses an AMG8833 sensor, a Teensy 3.2 (like an Arduino but on steroids) micro-controller and a 2.8" tft screen
    Want to build a higher resolution version? • DIY high-er res Therma...
    Link to the source code:
    github.com/KrisKasprzak/Sampl...
  • НаукаНаука

Комментарии • 257

  • @yorganyog
    @yorganyog 5 лет назад +6

    Very clever. Amazing. To have even better resolution or detect human presence much far, we need to get a better sensor, but this approach ROCKS!!!!!!

  • @xiaotiandai
    @xiaotiandai 4 года назад +2

    Really helpful. I am about to build one and found your video. Nice idea to expand the resolution this much.

  • @TheCarlTuckerson
    @TheCarlTuckerson 4 года назад +6

    Wow, if this example is "par", my skills are not up to par. Thank you for sharing all your hard work (and inspiration).

    • @KrisKasprzak
      @KrisKasprzak  4 года назад +1

      Glad I could help, post some projects, I'm sure my subs would like to see what others are up to.

  • @CarlosFilmagem2008
    @CarlosFilmagem2008 6 лет назад +5

    Muito legal!!!!! Parabéns!!!! Sempre acompanhando o canal!!!!!!

  • @luckynumbersevuuun
    @luckynumbersevuuun 5 лет назад

    i learned so much, thanks a lot, man.

  • @GRBtutorials
    @GRBtutorials 5 лет назад

    You could make it move to increase the resolution at the cost of sampling time. You could use some mirrors to do this in both directions, like a projector but in reverse.

  • @achuthskumar1131
    @achuthskumar1131 4 года назад

    Thanks for this awesome project .. It's really helpful .
    There is an error that's popping up .. initbutton() datatypes is not a function available in the header file. Is it due to mismatch of the header ? Or do I need to make changes in code ?

  • @UHFStation1
    @UHFStation1 6 лет назад

    That seemed fairly complex. I was wondering how one might take multiple arrays to create a wall of them to produce a high res camera system. I bought a Flir that is like 320 x 480. Still expensive but fairly low res. I want to know what the military type stuff looks like.

  • @manchesterparanormalsociet545
    @manchesterparanormalsociet545 5 лет назад +2

    Can a record function be added to this ??
    Also I cant Get the code to open ???

  • @suneilnevgi8386
    @suneilnevgi8386 4 года назад +1

    You are an amazing person . Pl keep making such videos 😀🙏👍👍

  • @ProGamerGov
    @ProGamerGov 6 лет назад +2

    How come your code is not posted to Github, and instead is on Googledrive?

  • @nickyoung1436
    @nickyoung1436 6 лет назад +1

    Great video and a hot project!
    I've followed the same path as you with the interpolation: linear for speed.
    I'm using the RPi Zero, Pimoroni 'HD' (16x16) Unicorn Hat and Python; getting about 7 fps.

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад

      Nick Young thanks for replying with the frames per second I made a few code modifications and on my Teensy I'm getting about four and a half frames second that's running 120 megahertz.

    • @deepeshkumar9107
      @deepeshkumar9107 4 года назад

      I have tried in python but not getting good results. Please help me in the python code

    • @nickyoung1436
      @nickyoung1436 4 года назад

      @@deepeshkumar9107 Python code on github github.com/YoungAtHome/Thermal/blob/master/thermal.py

  • @joeehims9128
    @joeehims9128 6 лет назад +1

    Hi Kris great video I have some camera lenses I would like your opinion and help on how I could make my own thermal camera

    • @joeehims9128
      @joeehims9128 6 лет назад

      You can reach me at joeehims@gmail.com
      I would really appreciate your help

  • @joesmoe71
    @joesmoe71 5 лет назад +1

    I wonder if there's a way to combine several of the sensors maybe with a lens to get a higher res pics?

    • @KrisKasprzak
      @KrisKasprzak  5 лет назад

      I seriously doubt it. Field of view is too wide.

  • @redxeth
    @redxeth 4 года назад +1

    Wow! I'm thinking to make this-- already have the Teensy and the TFT screen.
    What is the farthest range the sensor can work at detecting heat?

    • @KrisKasprzak
      @KrisKasprzak  4 года назад +1

      around 5 feet. The resolution from and 8x8 is really not that great.

  • @denisbujoreanu5993
    @denisbujoreanu5993 5 лет назад +3

    Hi Kris,
    Awesome stuff. The interpolation approach you took gave me a hint on how to get unstuck from the muck I was in, namely the squared pixels that the Adafruit's sample sketch renders. Unfortunately I am bound to using Arduino Nano boards as I got too many of them already glued on to my FPV gear to change now so I have to use them as best as I can. Which means I have to interpolate for a maximum of 16x16 pixels which surprisingly on a 128x128 display looks a lot nicer and it's a lot more intuitive than the boxy image from before. I did however expand on the interpolation method using my own approach so basically now I can do linear interpolation starting from the 8x8 and using a scaling factor I can go up to 80x80 or even more, however I'm getting some really strange results when using the 256 RGB565 color palette that Adafruit supplied. I mean it works fine as it is but I have to constantly adjust for the min and max temperatures on each frame to get a usable result.
    When I tried using your approach, funny enough I stumbled on the same website as you did, to compute the colors I ended up with a blueish ghost-like image, barely seeing any shape when I moved my hand around.
    At first I though I did something wrong with the computations, but even after moving into Processing to avoid the computing power limitations of the Nano board the image I got from applying the palette was still blue with a very small contrast, no reds, no greens no nothing. So any ideas what might be wrong or I'm just better off following the general steps you took, not just copy-paste your stuff?
    Cheers,
    Denis

    • @KrisKasprzak
      @KrisKasprzak  5 лет назад

      are you sure the colors are not accurate? Meaning monitor say a glass of ice next to something warm? Are you sure the temp array is working? Maybe do a test display by manually setting the temp gradient (the 8 x 8 array and seeing what's displayed--meaning temp(0,0) = 0, temp(8,8) = 100. Also, i have a function to set the cutoffs Getabcd() can be adjusted to change how quickly the colors change due to temp. Have you put Serial.println() to see values at each stage? Just some thoughts.

    • @denisbujoreanu5993
      @denisbujoreanu5993 5 лет назад

      Um, the colors mismatch might be also related to the data type I'm using, I had to port them on the Java environment Processing is using which doesn't quite fit with the C type from Arduino.
      Anyways, those are good points to look at, thanks Kris. ;)

    • @lakshithachathuranga3424
      @lakshithachathuranga3424 2 года назад

      Can help this camera made??

    • @user-ob3nu1tw5f
      @user-ob3nu1tw5f Год назад

      Hi Danis.
      I have to use the Arduino Nano board to complete my design project. But I only need to achieve this function. I want to ask some question about how to change the coding to achieve that.
      Cheers,
      William

  • @RobSummers993
    @RobSummers993 5 лет назад

    Thanks for sharing! I've been trying to get this to work, but I keep running into a problem with the code. Specifically, I think there is an issue with the ILI9341_t3.h library. After some debugging, I've found that it gets hung up at line:
    Display.fillScreen(C_BLACK);
    The TFT display doesn't display anything either. There's only a white screen from the backlight.
    However, I've been able to test the display and thermal sensor by running "thermal_cam" from the Adafruit AMG88xx examples and "graphicstest" from the Adafruit ILI9341. From those tests, I believe the hardware and wiring are both good. Any idea what would be causing this issue?

  • @seanocansey1287
    @seanocansey1287 4 года назад

    Could this code be used on an Atmega328P?

  • @benjamindeiss9840
    @benjamindeiss9840 6 лет назад +2

    Nice job, I was trying to run the code on a Wemos D1 Mini with ESP8266 as the clock is running at 160MHz which should be enough. I had to remove the touch (too less IOs) and exchange the ILI9341 lib (t3 seems not to be supporting the ESP), but then it was possible to run it with only a little less performance. Thank you for publishing.

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад +1

      Glad you got it working.

    • @benjamindeiss9840
      @benjamindeiss9840 6 лет назад

      I'd like to create a 3D printed housing. I would share it on Thingiverse, would it be ok to upload the modified code with reference to you? That would make it easy for others who want to rebuild it

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад

      Sure, I'm sure my subs (and the world) would like to see the work of others.

    • @benjamindeiss9840
      @benjamindeiss9840 6 лет назад +3

      Thank you, I have published it at www.thingiverse.com/thing:2799023

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад

      That is frickin' cool, we'll done.

  • @adrianx26
    @adrianx26 4 года назад

    it is possible to use 4 camera for better image ?

  • @ivanmathias7419
    @ivanmathias7419 3 года назад +1

    Hello, I already buy AMG 8833 sensor, and try it,why this sensor can not measure human body temperature accurately ? Meanwhile seems , it see environment temperature. Is there any idea ? Thanks

  • @mickthemechanic5718
    @mickthemechanic5718 3 года назад

    Hi, great work! I am currently using your code in one of my projects, and I was wondering if there was any chance you could give me some pointers to make an 8x8 interpolation (56x56 rows/columns)?
    Keep up the good work!

    • @KrisKasprzak
      @KrisKasprzak  3 года назад

      Assuming you mean scale up the 8x8 to 56x56 meaning at 7x expansion, should be possible, just need to rework the arrays to expand to 56 and not 70. stuff like:
      // change array
      float HDTemp[80][80];// change both 80's to 56
      for (col = 0; col < 70; col ++) { // change 70 to 56
      incr = col % 10; // change 10 to 7
      probably more but at a glance this stands out.

    • @mickthemechanic5718
      @mickthemechanic5718 3 года назад

      @@KrisKasprzak Thanks for the reply, Ive been playing around wit it but I cant seem to get it working properly, no matter what I do the picture is a mess.
      Here is what I have:
      ThermalSensor.readPixels(pixels);
      for (row = 0; row < 8; row ++) {
      for (col = 0; col < 56; col ++) {
      aLow = col / 7 + (row * 8);
      aHigh = (col / 7) + 1 + (row * 8);
      intPoint = (( pixels[aHigh] - pixels[aLow] ) / 12.5);
      incr = col % 7;
      val = (intPoint * incr ) + pixels[aLow];
      HDTemp[(7 - row) * 7][col] = val;
      }
      }
      for (col = 0; col < 56; col ++) {
      for (row = 0; row < 56; row ++) {
      aLow = (row / 7 ) * 8;
      aHigh = aLow + 7;
      intPoint = (( HDTemp[aHigh][col] - HDTemp[aLow][col] ) / 12.5);
      incr = row % 7;
      val = (intPoint * incr ) + HDTemp[aLow][col];
      HDTemp[ row ][col] = val;
      }
      }
      Any ideas?

  • @dnd6032
    @dnd6032 6 лет назад

    New to this and would like to use with raspberry pi3. Will code work?

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад

      This code is written in C, RPI is Python. A rewrite is needed. RPI, you sure you want to get in to the MCU?

  • @ahmedalowmari3070
    @ahmedalowmari3070 2 года назад

    Thank you for your great project and explanation can i ask you please if possible to tell me if i can use normal AMG8833 sensors or it needed to be Adafruit AMG8833 i hope if you answer ????

    • @KrisKasprzak
      @KrisKasprzak  2 года назад +1

      You should be able to use the chip directly provide your MCU is 3v3.

    • @ahmedalowmari3070
      @ahmedalowmari3070 2 года назад

      @@KrisKasprzak thank you so so much for replay and being humble I mean I have seen that you attach the adafruit liberies so In mine( I mean the AMG8833) do I need to deleted the adafruit liveries and modify the code or no need it will work directly.

    • @ahmedalowmari3070
      @ahmedalowmari3070 2 года назад

      @@KrisKasprzak one last small question sorry if is it ridiculous cause I am beginner and enthusiastic the array you expand to 70 by 70 you did it in Excel after that what should I do with them integrate them or they are already integrated in the code thank you so much

  • @joshmontgomery7408
    @joshmontgomery7408 5 лет назад +1

    Great Work Kris! I followed your instructions and my Thermal Camera is working great. It does however flashes as it refreshes the image. I notice yours does not do that, do you have any suggestions?

    • @KrisKasprzak
      @KrisKasprzak  5 лет назад

      What CPU speed did you compile at? I crank mine all the way to 120 mhz, and are you using the ili9341_t3 lib? I found another way to speed the code a bit. I have functions for interpolating rows and columns and display--as with any function call there is a performance hit. Move the code from the functions into the loop-for all functions. this makes a very large (lines of code) in loop(), but my display updates went from around 2 fps to around 5

    • @joshmontgomery7408
      @joshmontgomery7408 5 лет назад

      Thanks Kris, I got the processor up to 120 mhz and I am using your code so the #include so I should be using the correct library. With no real noticeable difference in frames per second. Can you send me your current code?

    • @KrisKasprzak
      @KrisKasprzak  5 лет назад

      @@joshmontgomery7408 I will, it will ba a few days though

    • @joshmontgomery7408
      @joshmontgomery7408 5 лет назад

      Great, thanks Kris. I appreciate the assistance.

    • @KrisKasprzak
      @KrisKasprzak  5 лет назад +1

      I just uploaded the latest code, basically functions that get called on every sensor read are now part of loop(). Stuff like InterpolateRows(), InterpolateCols(); DisplayGradient() are now in loop. As with any function call, there is a price to pay for putting data on the stack etc. Now that the code is is in loop, it can run a bit faster. Hope this helps.

  • @DougHanchard
    @DougHanchard 6 лет назад

    Can the IR data (readings) detected, be recorded (with a time stamp and location on grid table) and sent to a data bus (i.e. USB) to a computer for interpolation and input onto a spreadsheet?

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад +1

      i think you could easily get the location and time stamp of each pixel (either the 8x8, or even the 70x70 array and send to to a PC via serial. I've written programs in VB.Net that will get data from an Arduino (or Teensy) via the serial port. That same program could populate a spreadsheet. The question then becomes at what rate? Do you want to get "live data" to the PC for interpolation and writing to say Excel?

    • @DougHanchard
      @DougHanchard 6 лет назад

      The data rate interval rate I would desire would be in increments of 0:00:0001 seconds. The data does not have to be "seen" live and could be dumped (record, write, store) as long as the data stream (IR) is logging every pixel / grid is precisely in sync with each time stamp.

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад

      At that data rate, you will need to look for a different sensor. This one only measures data around every 1/10 of a second.

    • @DougHanchard
      @DougHanchard 6 лет назад

      That's what I needed to know. Thank you very much. I suspect that such a sensor would be very expensive and probably require more than 3V's

  • @qqw320
    @qqw320 3 года назад

    Can i use FILR Lepron 3.5 insted of AMG8833 sensor using the same code that you provided?

    • @KrisKasprzak
      @KrisKasprzak  3 года назад +1

      I just don't know. Without reading the datasheet I don't know how the data is read from the camera. The camera resolution is 160 by 120 my code interpolates to scale up by a factor of 10.

  • @warlockd
    @warlockd 4 года назад +1

    Wow Thanks, never knew about how you could ilturplate such a low resolution sensor. Fun fact, when I was looking for a 16x16 version, I found out what tha part number means. AMG88 means its an 8 by 8 pixel. The first 3 = 3v and it can be 5=5v. They even have a low gain version. 3=High, and 4= Low. So a AMG8854 is an 8x8, 5v low gain display. The AMG8833 is about $22 by itself btw.
    Thinking of getting the low gain as its range is -20C to 100C, however you lose a bit in accuracy as the high gang is about +/- 2.5C vs the Low gain 3.0C, but its really not that much. These are GREAT for finding out problems on PCB's. Just find the chip that is slightly hotter than the others.
    Now how to overlay this with a CMOS camera..humm..

  • @ThatOliveMrT
    @ThatOliveMrT 2 года назад

    Wow 4 years later and now you can get them for $50. I wonder what would happen to the resolution if you did a 4x4 gid 2.5x the price? I suppose at that point the Arduino becomes the limiting power factor?

    • @KrisKasprzak
      @KrisKasprzak  2 года назад +1

      I don't think you can set these up in an array. I have another video based on a 24x32 pixel sensor, resolution is better but still lacks. Forget using an Arduino. They are way too slow. The processing power to interpolated needs a much faster MCU.

  • @Spirit532
    @Spirit532 6 лет назад +4

    This is fairly nice!
    There's a much better option though - a sensor made by Heimann Sensor in Germany, called the HTPA32x32d.
    It(obviously) has a 32x32 pixel array and also speaks I2C, though temperature value calculation is much, much more involved and RAM-intensive(you need at least 1024(pixels)*2(16bit)*5(arrays) bytes).
    It can also do up to 60Hz(and 120Hz @ 16x16), but it gets really noisy at that speed.
    I've got some, and a design for a tiny camera(arduino-compatible, 0.9" 96x64 OLED RGB display, keychain-sized), but no time to write the firmware.

    • @eqia
      @eqia 6 лет назад +2

      Where did you get the sensor from? I don't think it's easily individually purchasable online.

    • @Spirit532
      @Spirit532 6 лет назад

      Correct, it is not.
      I purchased it through a... source, but there are distributors that work with individuals.

    • @GRBtutorials
      @GRBtutorials 5 лет назад +2

      And what about the new Melexis MLX9064? It's 32x24 and it only costs around $50 on Digi-Key.

  • @jinxlord6488
    @jinxlord6488 6 лет назад

    Hi, i want to try this project with arduino uno without those touch feathers can u help me with the code. All i want is it display the image on screen. sir, please do help its for my high school project.

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад

      Can you just comment out the touch code?

  • @whourdadie
    @whourdadie 5 лет назад

    How are you powering it? Is it portable? Could this be used to find studs in a wall similar to what the Walabot?

    • @KrisKasprzak
      @KrisKasprzak  5 лет назад +1

      9 volt battery and 3.3 linear regulator--should have used a buck converted to save power. My unit is mounted on a PCB www.pjrc.com/thermal-imaging-camera/

    • @KrisKasprzak
      @KrisKasprzak  5 лет назад +1

      I just did a test trying to find wall studs, 50 deg outside 75 inside, could NOT even remotely find the studs

  • @lucy522285
    @lucy522285 6 лет назад

    HI Can you do this with arduino due
    that is arduino due+ AMG8833 sensor+ AMG8833 sensor
    thanks

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад

      I don't see why not, it seems have enough memory and speed.

    • @mohammadsadat6235
      @mohammadsadat6235 5 лет назад

      @@KrisKasprzak How will the pins be connected to DUE then?

  • @SethReviews
    @SethReviews 5 лет назад

    would a microcontroller with more processing power increase the definition or is that a limit from the sensor? If so is there a higher quality sensor on the market that might provide better definition?

    • @KrisKasprzak
      @KrisKasprzak  5 лет назад

      Resolution is more of a function of the sensor itself is sensor it is only an 8 by 8 array and you can only go so far with interpolation to make more pixels. A faster processor would only give you better frame rates

    • @SethReviews
      @SethReviews 5 лет назад

      Is there another sensor out there you would recommend for better resolution?

    • @KrisKasprzak
      @KrisKasprzak  5 лет назад

      I don't know of any, but i've never really looked.

    • @SethReviews
      @SethReviews 5 лет назад

      Cool thanks for responding, you're the best :)

  • @dansarduinoandespprojects3795
    @dansarduinoandespprojects3795 5 лет назад

    i want to know about sensor it looks like adafruit sensor, my question is will it work with sparkfun libraries as both sensor have same name and looks.

    • @KrisKasprzak
      @KrisKasprzak  5 лет назад

      what chip is in the sparkfun sensor? If it's an AMG8833, adafruit libs may work

    • @dansarduinoandespprojects3795
      @dansarduinoandespprojects3795 5 лет назад

      @@KrisKasprzak yes the name is same here i have adafruit available, i just want to know if sparkfun examples will work on it and can you run some examples from sparkfun library just to check i will give the link

    • @dansarduinoandespprojects3795
      @dansarduinoandespprojects3795 5 лет назад

      github.com/sparkfun/SparkFun_GridEYE_Arduino_Library/

  • @pyrothefirst
    @pyrothefirst 3 года назад

    How would this go, on a 384x288 thermal sensor?

    • @KrisKasprzak
      @KrisKasprzak  3 года назад

      Well you surely won't need the interpolation routines

  • @alonsocifuentes4486
    @alonsocifuentes4486 4 года назад

    Hello Kris, I really liked the results and decided to implement it on a project im working on. However, when I put all the parts together and compiled the code, when send to the teensy, the screen stays white. I already downloaded the necessary libraries and the code is working fine. I dont know what is causing the white screen. Could you help me please? Thanks

    • @alonsocifuentes4486
      @alonsocifuentes4486 4 года назад

      I ran a graphic test to check it and I finally made a base test run. However, when I upload your code it tells me this message:
      In file included from C:\Users\USUARIO\Documents\Arduino\libraries\UTouch-master/UTouch.h:38:0,
      from C:\Users\USUARIO\Desktop\ThermalCamera\ThermalCamera.ino:49:
      C:\Users\USUARIO\Documents\Arduino\libraries\UTouch-master/hardware/arm/HW_ARM_defines.h:9:0: warning: "swap" redefined
      #define swap(type, i, j) {type t = i; i = j; j = t;}
      ^
      In file included from C:\Users\USUARIO\Documents\Arduino\libraries\ILI9341_t3-master/font_Arial.h:4:0,
      from C:\Users\USUARIO\Desktop\ThermalCamera\ThermalCamera.ino:1:
      C:\Users\USUARIO\Documents\Arduino\libraries\ILI9341_t3-master/ILI9341_t3.h:544:0: note: this is the location of the previous definition
      #define swap(a, b) { typeof(a) t = a; a = b; b = t; }
      ^
      ThermalCamera:68: warning: large integer implicitly truncated to unsigned type
      ILI9341_t3 Display = ILI9341_t3(PIN_CS, PIN_DC, 240, 320);
      ^
      El Sketch usa 83200 bytes (31%) del espacio de almacenamiento de programa. El máximo es 262144 bytes.
      Las variables Globales usan 32212 bytes (49%) de la memoria dinámica, dejando 33324 bytes para las variables locales. El máximo es 65536 bytes.
      What is the problem here? are there functions that are overlaping?

    • @KrisKasprzak
      @KrisKasprzak  4 года назад

      Hard to say what do do without giving me any details. Maybe google white screen Arduino TFT

  • @folkishappalachian6827
    @folkishappalachian6827 4 года назад

    So considering this is adruino, could the arduino handle a better sensor for higher rates. So that, lets say, it could be close to 32 frames per second. Or would that require a PI and different coding instead? For ranged use and definition of target, what would be the best thing to look for in a sensor. I've been browsing looking around at sensors trying to see if i can understand how this project might be used in home made longer ranged thermal optics. Here's a link to a sensor i was looking at out of curiosity www.digikey.com/product-detail/en/flir-lepton/500-0771-01/500-0771-01-ND/7606616

    • @KrisKasprzak
      @KrisKasprzak  4 года назад

      An arduino can't come near this performance--recall UNO and MEGA are 16mhz clocks--6 times slower that a Teensy. The sensor you cite is 8.7 frames / sec so not sure how you expect to get 32.

  • @lakshithachathuranga3424
    @lakshithachathuranga3424 2 года назад

    Can measure temperature for electronic devices and electrical device?

    • @KrisKasprzak
      @KrisKasprzak  2 года назад

      maybe... the resolution is still not very good but accuracy is +/- a few degrees or so.

  • @kamisa-ma64
    @kamisa-ma64 2 года назад

    I bought this connect with my Arduino, it can detect human 50 cm. I want it could detect more distances. What should I do? Are there any further instructions for it to detect?

    • @KrisKasprzak
      @KrisKasprzak  2 года назад

      This sensor is 8 x 8 pixels and there is nothing you can do to get better resolution. Your only option is to move to a higher res sensor and a faster processor. If you can move to a Teensy 4.0, there is a 32 x 24 sensor that is a bit better--still not great a detecting details. Have a look. ruclips.net/video/1EBoug27hrA/видео.html

  • @augustinereyna7978
    @augustinereyna7978 5 лет назад

    I am having an issue with the code. I keep getting this error 'regtype' does not name a type. It also doesnt recognize 'regsize'. Would you have an idea of why this keeps coming up.

  • @josepatarroyo6068
    @josepatarroyo6068 5 лет назад

    Do you think it will work to check abnormal behaviors on house appliances?

    • @KrisKasprzak
      @KrisKasprzak  5 лет назад +1

      depends on the temp differential. The accuracy of these is really not that great. What temps are you trying to measure?

    • @josepatarroyo6068
      @josepatarroyo6068 5 лет назад

      I was just wandering, actually don't have anything on mind, just wanted to know if it could be used for that purpose

  • @huseinmahendra115
    @huseinmahendra115 4 года назад +1

    Hi Kris, I am from indonesia
    I tried your code with Arduino Uno, but there were some problems with the library. even though I have included all the libraries that you have suggested.
    how is the solution?
    Thanks

    • @KrisKasprzak
      @KrisKasprzak  4 года назад

      the display library i'm using, the ILI9341_t3 is specifically written for a Teensy. Try replacing the library with the Adafruit_9341. Performance will be pretty bad with arduino

    • @huseinmahendra115
      @huseinmahendra115 4 года назад

      @@KrisKasprzak Do you have a reference to the adafruit_9431 library?

    • @KrisKasprzak
      @KrisKasprzak  4 года назад

      @@huseinmahendra115 github.com/adafruit/Adafruit_ILI9341

    • @huseinmahendra115
      @huseinmahendra115 4 года назад

      Hello kris I've tried usinh teensy 3.2.
      I have uploaded the program, the camera and TFT are installed according to your instructions. But when starting tft display only white blank.
      How is the solution?

  • @lucy522285
    @lucy522285 6 лет назад

    I want to ask how I can use these font library into your Google Drive code. Because when I run the program, it can't compile

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад

      Nee hao!?!
      did you get all the libraries i have listed in the source code?

    • @lucy522285
      @lucy522285 6 лет назад

      Kris Kasprzak yes

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад

      maybe just comment out any SetFont line? Not sure... if you have the font library github.com/PaulStoffregen/ILI9341_fonts it should compile. Maybe copy the fonts to your ili9341_t3 folder?

    • @lucy522285
      @lucy522285 6 лет назад

      ohh Does the font library need to add in your code

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад

      nope my code calls the font library--make sure you restart arduino ide if you installed the font lib.

  • @leyuanma4886
    @leyuanma4886 3 года назад

    Thank you very much! But I have a question here, Is it necessary to use Teensy? Can I use Arduino as microcontroller?

    • @KrisKasprzak
      @KrisKasprzak  3 года назад

      Arduinos will not be fast enough.

    • @leyuanma4886
      @leyuanma4886 3 года назад

      @@KrisKasprzak ok,thank you very much! but I see your code is still written in Arduino ide, is it compatible with teensy?

    • @KrisKasprzak
      @KrisKasprzak  3 года назад

      @@leyuanma4886 yes it is. There are some videos on RUclips that will show you how to set up a Teensy.once you start using these MCUs... You will never go back to Arduino

    • @leyuanma4886
      @leyuanma4886 3 года назад

      @@KrisKasprzak Thank you very much! I saw several different types fo Teensy board, here in thermal camera project, I want to wirelessly send the image to the computer, which Teensy board would you recommend? I would be appreciated if you could give me some suggestions for the wireless communication module.

    • @KrisKasprzak
      @KrisKasprzak  3 года назад

      @@leyuanma4886 a Teensy 3.2 should do just fine. I think a Bluetooth module would work just fine and getting data from your Teensy to your PC.

  • @huseinmahendra115
    @huseinmahendra115 4 года назад +1

    Hello kris I've tried usinh teensy 3.2.
    I have uploaded the program, the camera and TFT are installed according to your instructions. But when starting tft display only white blank.
    How is the solution?

    • @KrisKasprzak
      @KrisKasprzak  4 года назад

      What display are you using? does the example that come with your library--graphicstest for example work?

    • @huseinmahendra115
      @huseinmahendra115 4 года назад

      I use display TFT Display ILI9341 SPI Series

    • @KrisKasprzak
      @KrisKasprzak  4 года назад

      @@huseinmahendra115 does the examples work?

    • @huseinmahendra115
      @huseinmahendra115 4 года назад

      Does the test graph also use teensy?

    • @KrisKasprzak
      @KrisKasprzak  4 года назад

      @@huseinmahendra115 yes

  • @BullsEye050
    @BullsEye050 3 года назад

    Hi, Kris. I am trying to replicate this project with an ESP32, what parts of the code will i need to change? i understand that i have to change the teensy ILI9341 library to the regular one. And also, how do i re-define the pin outputs for the display? thank you in advance for your answer.

    • @KrisKasprzak
      @KrisKasprzak  3 года назад +1

      you should only need to change the display library and display initialization. I'm not sure what pins are used for SPI and I2C communication. I would focus on getting display to work before messing with touch stuff.

    • @BullsEye050
      @BullsEye050 3 года назад +1

      @@KrisKasprzak thank you so much for a quick answer. I didn’t want to respond until I got it right, and now I did! Thanks for sharing this awesome project

    • @yawdery3359
      @yawdery3359 2 года назад

      @@BullsEye050 hey i think would want to replicate this with my ESP32, could you help me with code and wiring diagram?

    • @BullsEye050
      @BullsEye050 2 года назад +1

      @@yawdery3359 Of course. Give me your email adress so I can sent you the code

    • @yawdery3359
      @yawdery3359 2 года назад

      @@BullsEye050 my mail is my user name (typed together) with the gmail dot come at the end. If you have the wiring diagram please add it would be very helpful. Thank you!

  • @yorganyog
    @yorganyog 5 лет назад +2

    maybe I will make a predator mask thanks to this :D

    • @BurtMeister
      @BurtMeister 5 лет назад +1

      Funny you say that, I just made one for Halloween. No thermal imaging though :(

    • @yorganyog
      @yorganyog 5 лет назад +1

      @@BurtMeister Be strong, you can make it now. I have so many projects and no time, a small child and no workshop. My idea is to put this operating like google glass to blend with real image. Also search "python goggles".

    • @BurtMeister
      @BurtMeister 5 лет назад +1

      @@yorganyog
      You sound like me. I actually made the predator mask for my son. I was intending to rig it up with some LED's for the laser, but Halloween came around too quickly and didn't have the time.

    • @yorganyog
      @yorganyog 5 лет назад +1

      @@BurtMeister :) I was thinking doing the same with mine but he has only 7 months. Now prepare it for the next year. 3 redleds. And green leds from the eyes to outside. Stay safe because of brightness.

    • @ChiefMason
      @ChiefMason 4 года назад

      I want to put the thermal imaging on glasses

  • @lamiaeharbouch1387
    @lamiaeharbouch1387 4 года назад

    I can't get the code to open

  • @fernandourrutia6034
    @fernandourrutia6034 3 года назад

    Hi Kris, I saw this video and was excited to purchase the exact same parts you got to build it. You were 100% right, it only costs $80 to build it. I put it together exactly like shown in your diagram but all I get is a blank white screen. I have all the correct libraries so I decided to try some examples from other libraries to make sure the screen was wired correctly. The screen displays other examples fine "although I wasn't able to get the touch part to work". Can you help me troubleshoot this, please?

    • @KrisKasprzak
      @KrisKasprzak  3 года назад

      Most likely white screens are due to the RST pin. On some displays it needs a slight delay before going high. Try connect RST to say pin 7 (any digital pin) and use the call ILI9341_t3 Display = ILI9341_t3(TFT_CS, TFT_DC, TFT_PIN_RST);

    • @fernandourrutia6034
      @fernandourrutia6034 3 года назад

      @@KrisKasprzak Wow, thanks so much for the quick reply, I'm not much of a coder but I'm going to try your suggestions and get back to you, thank you.

    • @fernandourrutia6034
      @fernandourrutia6034 3 года назад

      @@KrisKasprzak So I replaced part of the original code with the one you gave me and I now receive 'TFT_CS' was not declared. Does this mean I just add #define TFT_CS 7 ? Not sure if that's what you meant. Or do I need to physically connect something?

    • @KrisKasprzak
      @KrisKasprzak  3 года назад

      @@fernandourrutia6034 yeah you will have to add that Define and you will also have to connect the pin number 7 on your MCU to the rst line so the rst line will only be connected to pin 7

    • @fernandourrutia6034
      @fernandourrutia6034 3 года назад

      @@KrisKasprzak I was able to do what you suggested. It booted the boot screen and it said readings were ok. The screen is upside down (I'm sure that's probably an easy fix) but it seems to only be displaying one pixel on the viewer square. And when I click the gradient the keypad pops up sideways and the touch screen doesn't work properly. I can see the touch part maybe being a result of a bad screen, but why is it only displaying one pixel of thermal data?

  • @qqw320
    @qqw320 3 года назад

    Can i use Teensy 3.6 instead of Teensy 3.2 ?

    • @KrisKasprzak
      @KrisKasprzak  3 года назад

      Most likely I used a Teensy 4.1 and it worked just fine.

  • @lucy522285
    @lucy522285 6 лет назад

    hi I do this but my arduino program have some problem .
    C:\Users\moems\Desktop\ThermalCamera\ThermalCamera.ino:40:68: fatal error: font_ArialBoldItalic.h: No such file or directory
    compilation terminated.
    can you help me thanks

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад

      darn, my bad. I was using some custom fonts to make a cute splash screen and legend. I'll see if i can add the font files to my download but in the meantime you can comment out the font calls xxx.SetFont() rings a bell.

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад

      ahhhh yes... I remember now. I use custom fonts that are delivered in a library that was written by the creator of the Teensy MCU, Paul Stroffregen. I have the link commented in the top section of the source code. Make sure you get the font library
      github.com/PaulStoffregen/ILI9341_fonts

  • @peterm.4026
    @peterm.4026 3 года назад

    Hi, one thing I don't understand is that this sensor is supposed to be an 8 x 8 array and even the datasheet (cdn.sparkfun.com/assets/4/1/c/0/1/Grid-EYE_Datasheet.pdf) says that it is a 64 pixel sensor. But even just looking at 0:25 there are clearly different colors per pixel...I thought a pixel should look just like one dot from the distance we're looking at is....what am I misunderstanding about pixels?

    • @KrisKasprzak
      @KrisKasprzak  3 года назад +1

      The sensor is 8 pixels by 8 pixels so 8 * 8 equals 64 total pixels. I use interpolation to expand 8 by 8 to 70 by 70. What you're seeing at the .25 mark are the results of 70 pixels by 70 pixels however I draw black lines every 10 pixels show a grid. Each cell in that grid is not a pixel each cell in that grid is like 10 pixels by 10 pixels

    • @peterm.4026
      @peterm.4026 3 года назад

      @@KrisKasprzak what you've done here is like genius stuff to me lol. That makes sense. and at 1:12, that's where you see 8 x 8. One color per square, 8 across and 8 down.

    • @KrisKasprzak
      @KrisKasprzak  3 года назад

      @@peterm.4026 correct... on the pixel thing that is

  • @Aimy037
    @Aimy037 5 лет назад

    Would this work on a raspberry pi 3?

    • @KrisKasprzak
      @KrisKasprzak  5 лет назад +1

      This is C code raspberry Pi's need python.

    • @Aimy037
      @Aimy037 5 лет назад

      @@KrisKasprzak thank you. I was wondering if you could help me. I have been trying to download OpenCV and have tried Pygame to take pictures, but nothing seems to work. Can you give me any advice? This is all being done on my Raspberry Pi 3 Model B.

  • @hikkikamoriiii
    @hikkikamoriiii 3 года назад

    Please tell me, will this work with teensy 3.1?

    • @KrisKasprzak
      @KrisKasprzak  3 года назад +1

      It should. you only really need the ILI9341_t3 library and I think that works with the 3.1

    • @hikkikamoriiii
      @hikkikamoriiii 3 года назад

      @@KrisKasprzak thanks 👍

  • @nelsonpj
    @nelsonpj 6 лет назад +1

    Very cool project! I've got the same sensor from Adafruit and was also disappointed with the sample Arduino sketch. I followed your wiring diagram and built it with a Teensy 3.2 and a very similar display from Amazon and got it functional - but I ran into a few issues.
    I'm pretty sure you didn't post the latest sketch from the video you show to your Google Drive link - the sketch I downloaded does not match the video. It only uses the touchscreen to toggle the grid on/off and toggle autoscaling - there's no code for a number pad.
    Also - in case this helps anybody - I had to edit one line of the sample code to get it working - the IL19341_t3 line apparently had too many arguments - I had to remove the 240, 320 (which is resolution?). You also didn't use the Display_CS and Display_RST variables you declared earlier in the sketch. Here's the original line commented out, and my line below.
    //ILI9341_t3 Display = ILI9341_t3(10, 9, 240, 320); //this was original line - had to remove last two numbers due to compile error
    ILI9341_t3 Display = ILI9341_t3(Display_CS, Display_RST);
    But anyway - very nice job with the project and video - it got me inspired to try it!

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад +1

      OOPS....I did make some updates between upload and video shooting, but i've just updated the link with a new download. It has the number pad thingy and an auto scale if you press in the temp scale. Also good catch on my display initialization. I modified the lib so I can use it with different display sizes. That is updated and commented in the sketch as well.
      Glad you got it to work. I've since make a custom PCB board (which i make in my garage) and i'm designing a case for 3D printing.

    • @nelsonpj
      @nelsonpj 6 лет назад

      Thanks for uploading the new sketch - it works!
      My issue now is that I've got to calibrate my touchscreen - touch targets are way off. I see that the UTouch library has a calibration sketch that outputs numbers you can put in a header file - but it's designed to be used with UTFT (not IL19341). I'll investigate calibration...

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад +1

      Oddly my TFT was right on. You know how to calibrate them in code? If not try this
      void ProcessScreenMap() {
      // this assumes your x and y are global variables, call this function after both Touch.getX(); and Touch.getY(); functions like...
      //
      // Touch.read();
      // x = Touch.getX();
      // y = Touch.getY();;
      // ProcessScreenMap();
      //
      // if you decide to pass in x and y you need to pass as reference so the actual values are changed upon a return from this function
      //
      Serial.print("real coordinates: ");
      Serial.print(x);
      Serial.print(",");
      Serial.print (y);
      // assuming display in in landscape and 480 wide and y is up and down and 320, adjust if different display
      // use first w/o any mapping and see what serial says fo real coordinates, then write down and enter into the map function
      // note depending on orientation you may have to reverse x and y
      // then after using your measured values and recompiling the mapped serial output should match the real screen coordinates
      // here's the arguement list
      //
      // x = map(x, real left, real right, 0, 480);
      // y = map(y, real bottom, real top, 320, 0);
      x = map(x, 940, 70, 0, 480);
      y = map(y, 890, 137, 320, 0);
      Serial.print(", Mapped coordinates: ");
      Serial.print(x);
      Serial.print(",");
      Serial.println(y);
      }

    • @nelsonpj
      @nelsonpj 6 лет назад

      Thanks for the code!

    • @maurizio6465
      @maurizio6465 6 лет назад

      Kris Kasprzak
      I put the ProcessScreenMap Code in your free code and i have more problems with the Touch
      If i Touch the screen anywhere it Open the keypad for the maxtemp
      If i touched done it Not working
      I think the screen is freezed

  • @yelectric1893
    @yelectric1893 5 лет назад

    If I attach a lens, can I detect a person for example 40 ft away?

    • @KrisKasprzak
      @KrisKasprzak  5 лет назад

      I seriously doubt it

    • @yelectric1893
      @yelectric1893 5 лет назад

      @@KrisKasprzak Interesting. Thanks for sharing this amazing thing you made by the way, as so many people are trying to make something that isnt the standard 4000 dollar drone camera. This is amazing.

    • @SimonCoates
      @SimonCoates 5 лет назад

      Normal glass lenses act like mirrors with far infrared. You need to use lenses designed for thermal cameras typically made from germanium.

  • @kensalazar9202
    @kensalazar9202 6 лет назад

    How will be use this in raspberry pi 3

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад

      I will require a total rewrite. RPI I think only supports python code and this is in C.

    • @kensalazar9202
      @kensalazar9202 6 лет назад

      any suggestions for any alternatives of amg8833?

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад

      I've not seen any, but I've not looked very hard.

  • @xxxxx765
    @xxxxx765 2 года назад

    Thanks for this great project but i have a problem
    1234.ino:42:60: fatal error: font_Arial.h: No such file or directory
    compilation terminated.
    i downloaded all of the libraries and carried the all contents inside fonts library in the ILI9341 library but still i have this problem can you help me please ?

    • @KrisKasprzak
      @KrisKasprzak  2 года назад

      Just comment out that include line for now. I don’t think I use Ariel font anywhere in the code

    • @xxxxx765
      @xxxxx765 2 года назад

      @@KrisKasprzak #include "font_Arial.h" // fonts for the legend i searched the font library it has "font_ArialBlack.h" but doesnt have "font_Arial.h" i tried the other one but that doesnt work either.

    • @KrisKasprzak
      @KrisKasprzak  2 года назад

      @@xxxxx765 Comment out the stuff that raises an error or replace the setFont with something in your library.

    • @xxxxx765
      @xxxxx765 2 года назад

      @@KrisKasprzak
      I replaced the fonts with TimesNewRoman but now i have multiple errors like this;
      1-> C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ILI9341_t3/font_TimesNewRomanBoldItalic.h:10:14: error: 'ILI9341_t3_font_t' does not name a type
      extern const ILI9341_t3_font_t TimesNewRoman_8_Bold_Italic;
      2-> C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ILI9341_t3/font_TimesNewRoman.h:10:14: error: 'ILI9341_t3_font_t' does not name a type
      extern const ILI9341_t3_font_t TimesNewRoman_8;
      3->C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ILI9341_t3/font_DroidSans.h:10:14: error: 'ILI9341_t3_font_t' does not name a type
      extern const ILI9341_t3_font_t DroidSans_8;
      and it goes on like this i checked the "TimesNewRomanBoldItalic.h" and it has "extern const ILI9341_t3_font_t TimesNewRoman_12_Bold_Italic;"
      'Adafruit_GFX_Button' does not name a type
      Adafruit_GFX_Button KeyPadBtn[12];
      'Adafruit_GFX_Button' was not declared in this scope
      bool PressIt(Adafruit_GFX_Button TheButton, int x, int y) {
      expected primary-expression before 'int'
      bool PressIt(Adafruit_GFX_Button TheButton, int x, int y) {
      In function 'void setup()':
      1234:160: error: 'KeyPadBtn' was not declared in this scope
      KeyPadBtn[col + row * 3].initButton(&Display, BUTTON_H + BUTTON_SPACING_X + KEYPAD_LEFT + col * (BUTTON_W + BUTTON_SPACING_X ),
      ^
      1234:172: error: 'class ILI9341_t3' has no member named 'setFont'
      Display.setFont(DroidSans_40);
      ^
      1234:172: error: 'DroidSans_40' was not declared in this scope
      Display.setFont(DroidSans_40);
      ^
      1234:177: error: 'class ILI9341_t3' has no member named 'setFont'
      Display.setFont(DroidSans_40);
      ^
      1234:182: error: 'class ILI9341_t3' has no member named 'setFont'
      Display.setFont(TimesNewRoman_48_Bold_Italic);
      ^
      1234:182: error: 'TimesNewRoman_48_Bold_Italic' was not declared in this scope
      Display.setFont(TimesNewRoman_48_Bold_Italic);
      ^
      1234:187: error: 'class ILI9341_t3' has no member named 'setFont'
      Display.setFont(TimesNewRoman_48_Bold_Italic);
      ^
      1234:200: error: 'class ILI9341_t3' has no member named 'setFont'
      Display.setFont(DroidSans_20);
      ^
      1234:200: error: 'DroidSans_20' was not declared in this scope
      Display.setFont(DroidSans_20);
      ^
      1234:205: error: 'class ILI9341_t3' has no member named 'setFont'
      Display.setFont(DroidSans_20);
      ^
      1234:213: error: 'class ILI9341_t3' has no member named 'setFont'
      Display.setFont(DroidSans_20);
      ^
      1234:213: error: 'DroidSans_20' was not declared in this scope
      Display.setFont(DroidSans_20);
      ^
      1234:225: error: 'class ILI9341_t3' has no member named 'setFont'
      Display.setFont(DroidSans_20);
      ^
      1234:225: error: 'DroidSans_20' was not declared in this scope
      Display.setFont(DroidSans_20);
      ^
      1234:230: error: 'class ILI9341_t3' has no member named 'setFont'
      Display.setFont(DroidSans_20);
      ^
      1234:238: error: 'class ILI9341_t3' has no member named 'setFont'
      Display.setFont(DroidSans_20);
      ^
      1234:238: error: 'DroidSans_20' was not declared in this scope
      Display.setFont(DroidSans_20);
      ^
      1234:247: error: 'class ILI9341_t3' has no member named 'setFontAdafruit'
      Display.setFontAdafruit();
      ^
      1234: In function 'void DrawLegend()':
      1234:528: error: 'class ILI9341_t3' has no member named 'setFont'
      Display.setFont(TimesNewRoman_14);
      ^
      1234:528: error: 'TimesNewRoman_14' was not declared in this scope
      Display.setFont(TimesNewRoman_14);
      ^
      1234:537: error: 'class ILI9341_t3' has no member named 'setFont'
      Display.setFont(TimesNewRoman_14);
      ^
      1234: In function 'void KeyPad(uint16_t&)':
      1234:566: error: 'KeyPadBtn' was not declared in this scope
      KeyPadBtn[col + row * 3].drawButton();
      ^
      1234:584: error: 'KeyPadBtn' was not declared in this scope
      if (PressIt(KeyPadBtn[b], x, y) == true) {
      ^
      1234:584: error: 'PressIt' cannot be used as a function
      if (PressIt(KeyPadBtn[b], x, y) == true) {
      ^
      C:\Users\M_K_A\Desktop\1234\1234.ino: At global scope:
      1234:639: error: redefinition of 'bool PressIt'
      bool PressIt(Adafruit_GFX_Button TheButton, int x, int y) {
      ^
      C:\Users\M_K_A\Desktop\1234\1234.ino:639:6: note: 'bool PressIt' previously defined here
      bool PressIt(Adafruit_GFX_Button TheButton, int x, int y) {
      ^
      1234:639: error: 'Adafruit_GFX_Button' was not declared in this scope
      bool PressIt(Adafruit_GFX_Button TheButton, int x, int y) {
      ^
      1234:639: error: expected primary-expression before 'int'
      bool PressIt(Adafruit_GFX_Button TheButton, int x, int y) {
      ^
      1234:639: error: expected primary-expression before 'int'
      bool PressIt(Adafruit_GFX_Button TheButton, int x, int y) {
      ^
      'Adafruit_GFX_Button' does not name a type
      I loaded multiple libraries like Adafruit_GFX but i probably need a couple more can you please tell me the needed library list for this project ? (i downloaded the ones at the source code . )

    • @KrisKasprzak
      @KrisKasprzak  2 года назад

      @@xxxxx765 that many errors I’m just changing a font, it looks like you commented out a ; or } or other

  • @mochfadhlihidayat2095
    @mochfadhlihidayat2095 5 лет назад

    can i use this code for arduino mega ?

    • @KrisKasprzak
      @KrisKasprzak  5 лет назад

      code should work, but may need a few tweaks, but performance will be very slow.

    • @mochfadhlihidayat2095
      @mochfadhlihidayat2095 5 лет назад

      @@KrisKasprzak oh okay thanks, by the way, could i ask the libraries for this code , please ?

  • @mickhernandez2665
    @mickhernandez2665 3 года назад

    excellent project, sir...
    but i cant compile it.. it says "no matching function for call to 'Adafruit_GFX_Button::initButton(ILI9341_t3*, int, int, int, int, uint16_t, uint16_t&, uint16_t, char [5], int)'

    • @KrisKasprzak
      @KrisKasprzak  3 года назад

      i don't think the GFX lib has changed, but I would not be surprised. Just comment out the button.init and see if you can make progress

    • @mickhernandez2665
      @mickhernandez2665 3 года назад

      ​@@KrisKasprzakthank you, sir. its working. its my fault. i messed up the library actually

  • @mbeg3647
    @mbeg3647 4 года назад

    Very nice project. I am trying to build one now but running into issues with the screen. Hoping for a little help. I have verified the screen works with the included examples and that the sensor is working. I get the error below when compiling and the screen is just white. But if I use this ILI9341_t3 Display = ILI9341_t3(PIN_CS, PIN_DC,);. It loads fine with no errors and the screen works but the touch screen is off and the display only shows solid colors for temp changes.
    ThermalCamera:73: warning: large integer implicitly truncated to unsigned type
    ThermalCamera:73: warning: large integer implicitly truncated to unsigned type
    ILI9341_t3 Display = ILI9341_t3(PIN_CS, PIN_DC, 240, 320);
    ^
    C:\Users\Documents\Arduino\libraries\Adafruit_AMG88xx_Library\Adafruit_AMG88xx.cpp: In member function 'void Adafruit_AMG88xx::read(uint8_t, uint8_t*, uint8_t)':
    C:\Users\Documents\Arduino\libraries\Adafruit_AMG88xx_Library\Adafruit_AMG88xx.cpp:235:10: warning: unused variable 'value' [-Wunused-variable]
    uint8_t value;

    • @KrisKasprzak
      @KrisKasprzak  4 года назад

      change the line to
      ILI9341_t3 Display = ILI9341_t3(PIN_CS, PIN_DC);

    • @mbeg3647
      @mbeg3647 4 года назад

      @@KrisKasprzak
      That fixed the errors but now I only get sold colors for temperature changes.

    • @KrisKasprzak
      @KrisKasprzak  4 года назад

      ​@@mbeg3647 Ive yet to find a tft that has a consistent calibration. Try this... add add the line Display.drawPixel(x,y, Display.color565(255,0,0)); in the ProcessTouch function, just after the Touch.get calls, then you can see how far off you calibration is, then comment out line 366 or so Display.fillRect(....) that way you can see the little red dot. After you determine how far off calibratiion is, in function ProcessTouch add a map function to get the calibration of pressed x-y to match screen coordinates--this is a real pain to do. Now on to the color issue.... first let's see if your sensor is working after .readPixels(pixels); dump each pixel to Serial to see what values are (for int k=0;k

    • @simon-pierrelussier2775
      @simon-pierrelussier2775 4 года назад

      Have you been able to fix the error related to Adafruit_AMG88xx_Library ? I'm in the exact same situation as you!

    • @simon-pierrelussier2775
      @simon-pierrelussier2775 4 года назад

      @@KrisKasprzak I've tried what you suggested (I commented out line 370, the one with Display.fillRect + added Display.drawPixel(x,y, Display.color565(255,0,0)); on line 563) and now the screen is a solid white.
      I think the main problem is that I still get this error when compiling:
      ...\Adafruit_AMG88xx_Library\Adafruit_AMG88xx.cpp: In member function 'void Adafruit_AMG88xx::read(uint8_t, uint8_t*, uint8_t)':
      ...\Adafruit_AMG88xx_Library\Adafruit_AMG88xx.cpp:235:10: warning: unused variable 'value' [-Wunused-variable]
      uint8_t value;
      Any idea how to fix this?

  • @ahmedkassamber
    @ahmedkassamber 4 года назад

    I can use this display with same code ???
    2.8 Inch TFT LCD Shield Touch Display Module For Arduino UNO
    Feature:
    2.8 inch LCD TFT display
    Bright, 4 white-LED backlight
    Colorful, 18-bit 262,000 different shades
    4-wire resistive touchscreen 240 x 320 pixels with individual pixel control
    No wiring, no soldering.
    Simply plug it in and load library
    On-board 3.3V 300mA LDO regulator
    5V compatible, use with 3.3V or 5V logic
    Support 2GB micro SD TF card
    Size: 7.8 x 5.3cm

    • @KrisKasprzak
      @KrisKasprzak  4 года назад +1

      not without some work, you will need to change the display lib, and touch libs. Code is pretty basic and should run on anything. There may be some function calls your new graphics lib doesn't support. I seriously doubt you will be happy with the results. Those UNO's just don't have the processing power to interpolate a 70x70 array. My 120 mhz Teensy can get about 5 frames per second update. a processor 1/10 as fast, you will not see screen updates very fast. Switch to a Teensy 3.2 or even a 4.0, they are like a million times better that Arduino anything.

  • @mahdidahmani
    @mahdidahmani 4 года назад

    hi, i tried that on a Teensy 4.0 i m getting this error : Error compiling for board Teensy 4.0.

    • @KrisKasprzak
      @KrisKasprzak  4 года назад

      not sure why. can you get anything to compile? maybe the display lib is not for teensy 4.0?

    • @mahdidahmani
      @mahdidahmani 4 года назад

      @@KrisKasprzak i m using only the library that are linked on your sketch but this is the first time i use a teensy, i had to uninstall the windows store version and install the zip one.

    • @mahdidahmani
      @mahdidahmani 4 года назад +1

      @@KrisKasprzak i did the example test, they work fine, but using your sketch i m getting :error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
      P_IRQ = portInputRegister(digitalPinToPort(T_IRQ));:

    • @KrisKasprzak
      @KrisKasprzak  4 года назад +1

      @@mahdidahmani It looks like that pin is for the touch, just to get something working try commenting out the touch object and any calls to it. If the touch lib in my code is incompatible with the teensy 4.0, the XPT2046 lib should work (but i've not tested it). Let's at least get the display stuff working first

    • @mahdidahmani
      @mahdidahmani 4 года назад

      @@KrisKasprzak yes it's working by disabling commenting related to UTouch. i'm using the same screen as you

  • @simon-pierrelussier2775
    @simon-pierrelussier2775 4 года назад

    I've had 3 errors when compiling the code provided.
    1- two different #define swap, I removed the one in HW_ARM_defines.h
    2- undefined value for void Adafruit_AMG88xx::read(uint8_t reg, uint8_t *buf, uint8_t num) (I tried removing it, compiling and reverted the change when I saw it didn't work...and now I don't get that error anymore, even after restarting arduino)
    3- large integer implicitly truncated to unsigned type
    ILI9341_t3 Display = ILI9341_t3(PIN_CS, PIN_DC, 240, 320);
    And I believe that line is the one for Kris's personal library, but he writes:
    // you will need to use this line
    ILI9341_t3 Display = ILI9341_t3(PIN_CS, PIN_DC, 240, 320);
    Which is the same as the one commented out at line 61. @Kris Kasprzak Can you let me know what's the actual line we should be using?

    • @KrisKasprzak
      @KrisKasprzak  4 года назад

      change ILI9341_t3 Display = ILI9341_t3(PIN_CS, PIN_DC, 240, 320); to ILI9341_t3 Display = ILI9341_t3(PIN_CS, PIN_DC);

  • @seekdan7109
    @seekdan7109 6 лет назад

    nice work.
    i tried it out. and am having errors ,

    • @seekdan7109
      @seekdan7109 6 лет назад

      Arduino: 1.8.5 (Windows 7), TD: 1.41, Board: "Teensy 3.2 / 3.1, Serial, 96 MHz (overclock), Faster, US English"
      In file included from C:\Users\IROYE TOLULOPE\Documents\Arduino\libraries\UTouch-master/UTouch.h:38:0,
      from C:\thermal\ThermalCamera\ThermalCamera.ino:44:
      C:\Users\IROYE TOLULOPE\Documents\Arduino\libraries\UTouch-master/hardware/arm/HW_ARM_defines.h:9:0: warning: "swap" redefined
      #define swap(type, i, j) {type t = i; i = j; j = t;}
      ^
      In file included from C:\thermal\ThermalCamera\ThermalCamera.ino:39:0:
      C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ILI9341_t3/ILI9341_t3.h:397:0: note: this is the location of the previous definition
      #define swap(a, b) { typeof(a) t = a; a = b; b = t; }
      ^
      Archiving built core (caching) in: C:\Users\IRT~1\AppData\Local\Temp\arduino_cache_538465\core\core_teensy_avr_teensy31_usb_serial,speed_96,opt_o2std,keys_en-us_4939f5412a75a8560acb0f9e98268f02.a
      C:\Users\IRT~1\AppData\Local\Temp\arduino_build_714684\sketch\ThermalCamera.ino.cpp.o: In function `loop':
      C:\thermal\ThermalCamera/ThermalCamera.ino:246: undefined reference to `Adafruit_AMG88xx::readPixels(float*, unsigned char)'
      C:\Users\IRT~1\AppData\Local\Temp\arduino_build_714684\sketch\ThermalCamera.ino.cpp.o: In function `setup':
      C:\thermal\ThermalCamera/ThermalCamera.ino:169: undefined reference to `Adafruit_AMG88xx::begin(unsigned char)'
      C:\thermal\ThermalCamera/ThermalCamera.ino:195: undefined reference to `Adafruit_AMG88xx::readPixels(float*, unsigned char)'
      C:\thermal\ThermalCamera/ThermalCamera.ino:236: undefined reference to `Arial_48_Bold_Italic'
      C:\thermal\ThermalCamera/ThermalCamera.ino:236: undefined reference to `DroidSans_20'
      C:\thermal\ThermalCamera/ThermalCamera.ino:236: undefined reference to `DroidSans_40'
      collect2.exe: error: ld returned 1 exit status
      Error compiling for board Teensy 3.2 / 3.1.
      This report would have more information with
      "Show verbose output during compilation"
      option enabled in File -> Preferences.

    • @seekdan7109
      @seekdan7109 6 лет назад

      problem resolved . i didnt install the libraries properly.

    • @alexandratorok7418
      @alexandratorok7418 6 лет назад

      I get the same errors, how did you fix it? I reinstalled the libraries and it still doesn't work?

    • @seekdan7109
      @seekdan7109 6 лет назад

      can you specify the error you got?. i copied the complete library including the .CPP file then installed
      check on google how to install libraries

    • @alexandratorok7418
      @alexandratorok7418 6 лет назад

      I reinstalled Arduino & Teensyduio and it works now :D Thank you for the reply!

  • @justinnewman5533
    @justinnewman5533 4 года назад

    i think 2d interpolation would be more appropriate, it may even remove the "polygon" looks and feel that your use of 1d interpolation seems to have. would be interesting to see. i used once for a work project and although the formula looks nasty, its not too rough. just scan throughout all the pixels, fetch all the relevant parameters, do whatever pre-calculations that you can when you can, then stick it all together to calculate each pixel. www.engineerexcel.com/bilinear-interpolation-excel/ but maybe it would look the same, i just dont know :)

  • @SWORKS1969
    @SWORKS1969 4 года назад

    HI, i have follow all step but i have two problem.
    First on Touch with the follow error on compiling:
    In file included from C:\Program Files (x86)\Arduino\libraries\UTouch/UTouch.h:38:0,
    from C:\Temp\ARDUINO\TERMOCAMERA\ThermalCamera1\ThermalCamera1.ino:45:
    C:\Program Files (x86)\Arduino\libraries\UTouch/hardware/arm/HW_ARM_defines.h:9:0: warning: "swap" redefined
    #define swap(type, i, j) {type t = i; i = j; j = t;}
    ^
    In file included C:\Temp\ARDUINO\TERMOCAMERA\ThermalCamera1\ThermalCamera1.ino:39:0:
    C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:544:0: note: this is the location of the previous definition
    #define swap(a, b) { typeof(a) t = a; a = b; b = t; }
    Second problem is definition of ILI9341_t3 Display objetct its seems that is not correct passed value:
    ThermalCamera1:64: warning: large integer implicitly truncated to unsigned type
    ILI9341_t3 Display = ILI9341_t3(PIN_CS, PIN_DC, 240, 320);
    A value to dimension of display cannot used in this context
    If i comment all section of Utouch and use a Display definition without 240 and 320 the project work but the image on sensor its equal 1 pixel
    Thanks

    • @SWORKS1969
      @SWORKS1969 4 года назад

      hi, i have found an other code from here: forum.pjrc.com/threads/48113 during compiling i have only the first problem on warning on Utouch but now image of sensor its displayed but on lick keypad is not correct disposed.
      A drawing on display is correct but when click on button 1 its showed 7, all key are not correct

    • @KrisKasprzak
      @KrisKasprzak  4 года назад

      change ILI9341_t3 Display = ILI9341_t3(PIN_CS, PIN_DC, 240, 320);
      to
      ILI9341_t3 Display = ILI9341_t3(PIN_CS, PIN_DC);
      I customized my ili lib to take screen size as input. Let's see if that addresses the swap issue as well.

    • @KrisKasprzak
      @KrisKasprzak  4 года назад

      These displays are very different. Some the coordinates are reversed. You will probably have to remap screen coordinates.
      something like this.....
      Touch.read();
      BtnX = Touch.getX();
      BtnY = Touch.getY();
      #ifdef debug
      Serial.print("real coordinates: ");
      Serial.print(BtnX);
      Serial.print(",");
      Serial.print (BtnY);
      Display.drawPixel(BtnX, BtnY, C_GREEN);
      #endif
      // x = map(x, real left, real right, 0, 480);
      // y = map(y, real bottom, real top, 320, 0);
      // x = map(y, 320, 0, 0, 320);
      // y = map(x, 240, 0, 0, 240);
      //yellow headers on the display board
      //BtnX = map(BtnX, 240, 0, 320, 0);
      //BtnY = map(BtnY, 379, 0, 240, 0);
      //black headers on the display board
      BtnX = map(BtnX, 0, 240, 320, 0);
      BtnY = map(BtnY, 0, 380, 240, 0);
      #ifdef debug
      Serial.print(", Mapped coordinates: ");
      Serial.print(BtnX);
      Serial.print(",");
      Serial.println(BtnY);
      Display.drawPixel(BtnX, BtnY, C_RED);
      #endif

  • @petemahndahar9690
    @petemahndahar9690 3 года назад

    Ahhh I can't find your screen. Seems to be out of stock. Will this work? www.lcdwiki.com/2.8inch_SPI_Module_ILI9341_SKU:MSP2807 ...or adafruit has this one but it's a little unclear to me whether it is ILI9341 www.adafruit.com/product/1651#description

    • @KrisKasprzak
      @KrisKasprzak  3 года назад +1

      The first display should work it's an ILI9341 chip with standard SPI interface. You will need to use a Teensy to take advantage of the ILI8341_t3 library that has been optimized to make that display fast. Arduinos will probably not have enough memory and standard Adafruit_9341 lib is probably too slow. If using a Teensy forget using the second display you list, its specific to an uno and can't be used in SPI mode--at least i've never got one to work.

    • @petemahndahar9690
      @petemahndahar9690 3 года назад

      @@KrisKasprzak thanks! well you have introduced me to teensy, I'm excited to give it a shot!

  • @mickthemechanic5718
    @mickthemechanic5718 3 года назад

    A gift for you and your viewers, the "Ironbow" palette for your thermal camera code:
    red = constrain(255.0 / (c - MINTEMP) * val - ((MINTEMP * 255.0) / (c - MINTEMP)), 0, 255);
    green = constrain(255.0 / (MAXTEMP - b) * val - ((b * 255.0) / (MAXTEMP - b)), 0, 255);

    if ( val = a) & (val = b) & (val = c) & (val = d) {
    blue = constrain(225.0 / (MAXTEMP - d) * val - (d * 225.0) / (MAXTEMP - d), 0, 225);
    }
    Merry Christmas!

  • @AzulIsTheName
    @AzulIsTheName 6 лет назад

    Good day! The objectives of your video matches with what I plan to make but I found a problem, I purchased all the parts from Adafruit and found out that their breakout board is different from yours. Here's a link from what I'm using: learn.adafruit.com/2-8-tft-touchscreen?view=all. Can you help me with the connection with Teensy 3.2? This would be a big help to me. Thank you in advance for your response!

    • @AzulIsTheName
      @AzulIsTheName 6 лет назад

      I solved the problem already with the screen. My problem now is that it keeps on warning me that it failed getting readings from the sensor. How to resolve this one? Thanks!

  • @bonbonpony
    @bonbonpony 4 года назад +3

    How to build a thermal camera.
    Step 1: Buy a thermal camera :q

  • @tylerfyrstDia
    @tylerfyrstDia 6 лет назад

    no one likes the ads, stop showing them everywere

    • @KrisKasprzak
      @KrisKasprzak  6 лет назад +3

      My time and efforts need to be comped some how....don't you think?