Arduino DUE + FLiR Lepton Working

1,767 views
Skip to first unread message

Josep Bordes

unread,
May 7, 2016, 1:00:36 PM5/7/16
to Flir Lepton
Hi to everyone,
During my last semester I was working with the FLiR Lepton and the Arduino DUE, and I created a code with the Arduino to control the image captures. I attach a link to my GitHub for everyone who wants to test and download. I am sharing this because at the beginning I had lot of issues to make it work. Also I attach an image about the connections between the Arduino and the camera. Hope somebody could find this useful.


Josep
Captura de pantalla 2016-05-07 a les 18.58.15.png
Message has been deleted
Message has been deleted
Message has been deleted

Josep Bordes

unread,
May 9, 2016, 2:26:41 PM5/9/16
to Flir Lepton
There are some typo mistakes in the connections image, please go to the gitHub and read the README file for the instructions and check the connections inside the connections folder.

Lucas

unread,
May 12, 2016, 3:03:28 PM5/12/16
to Flir Lepton
Hi Josep,

I tried your code with Due and development board and it does work quite well although it has some weird issues with the serial interface commands. It doesn't answer the command or answers that an existing command doesn't exist.

Nevertheless, I am more interested about the reading from the Flir, because I haven't found any codes with consistant readings for Due on this forum yet. I am trying to figure it out for a while, but as discussed in other threads as well, your code seems to have issues with the Sync (see links to threads below). It is returning a lot of 0's and strange values, that doesn't seem to represent the real image.


Please tell me if I missed something.

Thanks for sharing!

Lucas

Josep Bordes

unread,
May 12, 2016, 6:58:35 PM5/12/16
to Flir Lepton
Hi there,
I've just tested the code right now, although it's not the most efficient code, it works. This weekend I'll try to write a detailed step-by-step guide, but meanwhilr what I'd recommend is to check the connections, download my last github version. Load the code into the Arduino, once it is loaded write "captureImage" (without ") if the image has been captured properly, two <OK> will appear. After that write "transferImage" to print the formated imge into the serialMonitor.

The code has been writen in this way because I was controlling the Arduino with a Matlab app and I needed to know where the execution was and do the things with the commands.

Please note that you can modify the commnds in the variable declaration at the begining of the code.

Please if something is not cler enough, ask me again.

Lucas

unread,
May 13, 2016, 10:22:59 AM5/13/16
to Flir Lepton
Hi Josep,

After a while I did get some pictures out of it. The main thing I do not understand is the Leptons irragular behaviour. As I said above, it could be the lost of Sync, or as mentioned in this link: http://phoenixgamedevelopment.com/blog/?p=1695 (https://github.com/PhoenixGameDevelopment/P136-Thermal-Imager), it could be the temperature of the camera itself maybe?

I want to tell the Lepton it has to take a picture every minute, even when I leave it for a while. That is why I want to understand this behaviour.
What do you think about that?

Very nice that you're planning to work out the details. If you have time you might have a look at: The pictures printed via Serial are 59x79  values in my case, and are rotated 90 degrees left.

Lucas

Josep Bordes

unread,
May 13, 2016, 11:19:14 AM5/13/16
to Flir Lepton
I'm quite sure the problem is about the sync, the 59x79 problem is due to the sync function before capturing, I didn't need that line so I didn't take much care about it. I also had a quite irregular behavior, but as I said I was controlling this with Matlab and when I did not have any response from the Arduino I solved this closing the connection and reopening it again. I am not working in this project anymore, maybe in the next weeks I'll start again, but until then I won't do any research on that. 

PD. Also I was solving the 90 degrees problem with my matlab app. If you have Matlab installed I can share it with you, it is far from being perfect, but it works. Let me know.

Josep Bordes

unread,
May 13, 2016, 11:27:02 AM5/13/16
to Flir Lepton
I attach a screenshot of my Matlab app.
Captura de pantalla 2016-01-06 a les 18.49.20.png

Jonathan Hodges

unread,
May 28, 2016, 11:19:45 AM5/28/16
to Flir Lepton
I'm currently interfacing the Lepton/due with Matlab using another method but am having some issues with sync. Would you mind sending me the script you are using?

Josep Bordes

unread,
Jun 2, 2016, 3:10:07 PM6/2/16
to Flir Lepton
Here you have the code, I can't assure everything is working, I haven't tested it since January. If you can't make it run I'll try to help you.

Josep,
FlirLepton_v4.1.2.zip
Matlab.zip

Jonathan Hodges

unread,
Jun 2, 2016, 10:50:46 PM6/2/16
to Flir Lepton
Thanks for posting that Josep, I'll take a look at it. I fixed the desync issue in my setup by sending a start/stop signal but it has a really poor frame rate. Hopefully your way will work better!
Message has been deleted
Message has been deleted
Message has been deleted

Nati Barchilon

unread,
Jun 4, 2019, 7:04:08 AM6/4/19
to Flir Lepton
Great Job well done !
Did you try to run it 24/7 ? if so for how long ?

בתאריך יום שבת, 7 במאי 2016 בשעה 20:00:36 UTC+3, מאת Josep Bordes:
Reply all
Reply to author
Forward
0 new messages