Author Topic: Capturing Video from Flir E4 to portable device  (Read 46848 times)

0 Members and 2 Guests are viewing this topic.

Offline Captain MorganTopic starter

  • Contributor
  • Posts: 28
Re: Capturing Video from Flir E4 to portable device
« Reply #25 on: January 14, 2014, 10:11:29 pm »
Thx Jolly, I'll get the zip file and readme when I get home.

Thx for the upload!


.
 

Offline Jolly

  • Contributor
  • Posts: 14
  • Country: de
Re: Capturing Video from Flir E4 to portable device
« Reply #26 on: January 15, 2014, 11:16:22 am »
Some field tests yesterday showed that my PI's SD card image does not work as expected. Here is the new version: http://www.eversberg.eu/download/flir_vcr_v0.1.zip The install process is much easier, also.
« Last Edit: January 15, 2014, 02:30:13 pm by Jolly »
Recording of E4 videos using a Raspberry PI: http://www.eversberg.eu/download/flir_vcr_v0.1.zip
 

Offline pomonabill221

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: us
Re: Capturing Video from Flir E4 to portable device
« Reply #27 on: January 15, 2014, 08:21:55 pm »
If you connect the portable device to the E4 it will probably try to charge from it, unless its battery is full.
I found the E4 runs from the connected device, through the usb connector, whether it is charged or not.
This means that your device's battery is powering the E4 which draws about 500-700 mA depending on whether it is calibrating (shutter operating) or not, but still draws the 500 mA.
The battery does NOT power the E4 when connected!  not so good for portable use!
Remember to turn the backlight down - this makes a big difference to power draw. As the sensor is heated, you may find that current draw reduces once the sensor has stabilised.
 
May be worth looking at how the backlight is controlled in hardware - if it was in a power manager on I2C, you could shut it off with a console command over USB.
I did try some rset commands for back light brightness and was able to send "0" and the back light went off, so yes it can be controlled through software.. not too "up" on how to add this to a menu for display brightness yet, but I wouldn't go below 1 to 5 as you wouldn't be able to see the menu settings when you wanted to restore things!   :palm:
 

Offline pomonabill221

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: us
Re: Capturing Video from Flir E4 to portable device
« Reply #28 on: January 15, 2014, 09:25:17 pm »
Some field tests yesterday showed that my PI's SD card image does not work as expected. Here is the new version: http://www.eversberg.eu/download/flir_vcr_v0.1.zip The install process is much easier, also.
I am trying to download your app and have tried several times and it is crawling!  The speed is around 20k/sec where other downloads average about 120k/sec.  The estimated time is 12 HOURS!!!
Are you hosting the file?  or are you using a slow host?
 

Offline Jolly

  • Contributor
  • Posts: 14
  • Country: de
Re: Capturing Video from Flir E4 to portable device
« Reply #29 on: January 15, 2014, 09:35:33 pm »
Some field tests yesterday showed that my PI's SD card image does not work as expected. Here is the new version: http://www.eversberg.eu/download/flir_vcr_v0.1.zip The install process is much easier, also.
I am trying to download your app and have tried several times and it is crawling!  The speed is around 20k/sec where other downloads average about 120k/sec.  The estimated time is 12 HOURS!!!
Are you hosting the file?  or are you using a slow host?
I'm hosting it on a friend's server. I tested the download, it takes about 1 hour at about 300k/sec. If you can provide web space, I could upload it there.
Recording of E4 videos using a Raspberry PI: http://www.eversberg.eu/download/flir_vcr_v0.1.zip
 

Offline pomonabill221

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: us
Re: Capturing Video from Flir E4 to portable device
« Reply #30 on: January 16, 2014, 02:01:41 am »
Some field tests yesterday showed that my PI's SD card image does not work as expected. Here is the new version: http://www.eversberg.eu/download/flir_vcr_v0.1.zip The install process is much easier, also.
I am trying to download your app and have tried several times and it is crawling!  The speed is around 20k/sec where other downloads average about 120k/sec.  The estimated time is 12 HOURS!!!
Are you hosting the file?  or are you using a slow host?
I'm hosting it on a friend's server. I tested the download, it takes about 1 hour at about 300k/sec. If you can provide web space, I could upload it there.
I don't have a webspace yet... I did try again and the speed is the same (about 20k/sec).
I will try and create a webspace just for this download and let you know.
thanks!
 

Offline Captain MorganTopic starter

  • Contributor
  • Posts: 28
Re: Capturing Video from Flir E4 to portable device
« Reply #31 on: January 16, 2014, 06:12:57 am »
The PI arrived today :D

Hopefully this weekend I can set it up and try your new build. I'm still unsure about the switches though and how they trigger the record process etc.

I'm really glad you chimed in here Jolly, I think this thread is going to be a big deal for E4 owners.



.
 

Offline pomonabill221

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: us
Re: Capturing Video from Flir E4 to portable device
« Reply #32 on: January 16, 2014, 06:55:40 am »
To solve this problem could you not modify a USB to Micro USB cable by disconnecting the +5V line. You would still have the 0v, D+ and D- for comms. I am not sure whether the +5v is used to trigger any 'external connectivity' mode in the E4 though.  The USB to Micro USB cables are very cheap to experiment with.
I did try opening the +5 in the usb cable, and the connection was lost so it does need the +5 from the host (computer) and draws current from the host.  I measured 100mA but that was with a full battery.
I even inserted a 220 ohm resistor between the computer and the E4, and that didn't work either.
I will do more testing as I just wanted to try it first.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13927
  • Country: gb
    • Mike's Electric Stuff
Re: Capturing Video from Flir E4 to portable device
« Reply #33 on: January 16, 2014, 08:55:34 am »
To solve this problem could you not modify a USB to Micro USB cable by disconnecting the +5V line. You would still have the 0v, D+ and D- for comms. I am not sure whether the +5v is used to trigger any 'external connectivity' mode in the E4 though.  The USB to Micro USB cables are very cheap to experiment with.
I did try opening the +5 in the usb cable, and the connection was lost so it does need the +5 from the host (computer) and draws current from the host.  I measured 100mA but that was with a full battery.
I even inserted a 220 ohm resistor between the computer and the E4, and that didn't work either.
I will do more testing as I just wanted to try it first.
For dropping teh voltage  to reduce charge current, you may be better off with a couple of 1N4001 diodes than a resistor, to the voltage drop isn't very dependent on current draw - with 220R, the voltage would collapse as soon as it tries to charge
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline Jolly

  • Contributor
  • Posts: 14
  • Country: de
Re: Capturing Video from Flir E4 to portable device
« Reply #34 on: January 16, 2014, 01:26:11 pm »
I'm still unsure about the switches though and how they trigger the record process etc.
See "README-Usage" in my zip file. The two GPIO pins are shown in this ASCII-art. If you pull GPIO14 to ground, you can view the image. If you pull GPIO15 to ground, you will record. The recording will be indicated by the blinking ACT LED.
Recording of E4 videos using a Raspberry PI: http://www.eversberg.eu/download/flir_vcr_v0.1.zip
 

Offline Captain MorganTopic starter

  • Contributor
  • Posts: 28
Re: Capturing Video from Flir E4 to portable device
« Reply #35 on: January 16, 2014, 04:49:29 pm »
Thx Jolly, I DL the upgrade last night and did view the readme and saw the instructions there.

Much appreciated!
 

Offline Captain MorganTopic starter

  • Contributor
  • Posts: 28
Re: Capturing Video from Flir E4 to portable device
« Reply #36 on: January 16, 2014, 09:33:37 pm »
Instead of splicing the cable to separate the DC draw through the PI, why not put a hub in the middle directly to the same regulated 5v supply that can pwr both the Flir and the PI?

Or if not a hub, maybe a USB splitter or Y dongle.

This way the signal passes and the current draw comes from the battery in the middle.


.
« Last Edit: January 17, 2014, 02:10:05 am by Captain Morgan »
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Capturing Video from Flir E4 to portable device
« Reply #37 on: January 18, 2014, 09:37:44 am »
Finally my E4 (E8) VCR is done. It is based on Raspberry PI with a patched Linux Kernel module. To get a video signal out, I lower the switch. To record, I raise the switch. If someone has an idea about how to use mplayer/mencoder to play and record at the same time, let me know.
I've been recording and streaming E4 video on a small linux box for some time now. See my old post here:

https://www.eevblog.com/forum/testgear/flir-e4-thermal-imaging-camera-teardown/msg347138/#msg347138

I also have some older mencoder etc related posts. Just search that thread.
 

Offline pomonabill221

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: us
Re: Capturing Video from Flir E4 to portable device
« Reply #38 on: January 19, 2014, 08:03:53 pm »
Instead of splicing the cable to separate the DC draw through the PI, why not put a hub in the middle directly to the same regulated 5v supply that can pwr both the Flir and the PI?

Or if not a hub, maybe a USB splitter or Y dongle.

This way the signal passes and the current draw comes from the battery in the middle.


.
That's basically what I am going to do with the usb battery that I bought from the egg.
I did try an external power supply and reduced the voltage until I got the "device disconnected" alert from my laptop, and it dropped connection at 3.5 volts, and reconnected at 3.7 volts.... sound familiar (nominal Li-Ion voltages).
The current draw was less than 1 mA at these voltages, but when I increased to 5 volts, the current was increasing and seemed to top out at about 600 mA, so it looks like the camera was using the external supply to power and charge the battery.
I am going to let the external supply sit at 3.7volts and run the camera for a long time to see if the external battery discharges and the camera runs of the external supply.

It may be the if the external voltage is low, it is just powering the usb interface and will not draw current from the host (laptop).
Then I could drop the voltage from the laptop to something below the charging voltage for portable use.

Thanks Mike for your suggestion and yes, I should have used a couple of diodes instead of a resistor for this test, but it was a quick test and not very good.
 

Offline Jolly

  • Contributor
  • Posts: 14
  • Country: de
Re: Capturing Video from Flir E4 to portable device
« Reply #39 on: January 19, 2014, 08:50:27 pm »
I've been recording and streaming E4 video on a small linux box for some time now.

what frame rate did you get? the E4 provides the 3 different frame rates in descending order. with standard uvc driver, the recording rate is 3.75 fps, since that is the "highest" one the camera provides. i hacked the driver for my PI image, so it uses the "lowest" one, which is 15 fps. there is no way to tell the driver which rate it should use. (even USB uses a frame rate of 15hz, the frame rate from the sensor is 9hz.)
Recording of E4 videos using a Raspberry PI: http://www.eversberg.eu/download/flir_vcr_v0.1.zip
 

Offline lmfse

  • Newbie
  • Posts: 1
Re: Capturing Video from Flir E4 to portable device
« Reply #40 on: January 19, 2014, 10:01:11 pm »
FLIR got a free cameraplayer for the folloing cameras

• ThermoVision A20 series
• ThermoVision A40 series
• FLIR A/SC3xx series
• FLIR A615/SC6X5
• ThermaCAM S series
• FLIR P/B/SC6xx
• InfraCAM
• FLIR Txxx series
• FLIR Bxxx series
• FLIR ixx series
• FLIR bxx series
• FLIR GF3xx series
• FLIR Exx series
• FLIR T6xx series

But it works with the E4 as well (as long as you don't try to use focus,adjust,freeze or save image on camera)

Download it here
http://support.flir.com/SwDownload/app/RssSWDownload.aspx?ID=89
 

Offline pomonabill221

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: us
Re: Capturing Video from Flir E4 to portable device
« Reply #41 on: January 20, 2014, 05:58:44 am »
I tried a few more tests with the usb +5 broken out of the cable and connected to my laptop.  I used an external power supply to the camera's +5 line and the laptop was not connected to the +5.
It seems that the camera is detecting the presence of power on the +5 on the usb cable, and does connect.
What I did was to see what the voltage and currents were.
At. 4.0 to 4.4 volts, the camera draws 0.8mA  yes.. 800 uAmps.
At 4.4, the current jumps up to 78mA.
Reducing the voltage FROM 4.4 down to 4.1, the current drops to 0.8uA again.
Reducing further, the laptop "device disconnected" at 3.3 volts and current dropped to 0mA
Increasing back up to 3.6 volts, the laptop re connected.

So it seems that the camera is sensing the voltage on the usb cable even though it doesn't use the usb power to operate and runs on it's own battery.
I did set my power supply to 4.0 volts and switched the output off and on, and the laptop disconnected and reconnected with no problem.
SO, like Mike suggested, just use a few diodes to drop the +5 from the laptop/tablet/etc. to around 4.0 but don't go higher than 4.4 or the camera will start drawing current.

All these tests were run after having the camera on the battery for over 1 hour and the backlight on high, so the battery voltage should have dropped.
« Last Edit: January 20, 2014, 06:08:18 am by pomonabill221 »
 

Offline Captain MorganTopic starter

  • Contributor
  • Posts: 28
Re: Capturing Video from Flir E4 to portable device
« Reply #42 on: January 20, 2014, 06:02:37 am »
Nice work pomonabill221 !!

Today I got the PI hooked up and operational with your second image, thanks for sharing.

I don't see what to use to kick off any recording or play the one Flir video included.

Can you guys be a little more specific for non Linux users?

Maybe share pics of the hookups, pins etc.

Those txt files have lots of nice arrows but the formatting is all over the place, work wrap, no word wrap, can't make out the connections.


.
 

Offline pomonabill221

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: us
Re: Capturing Video from Flir E4 to portable device
« Reply #43 on: January 20, 2014, 06:11:18 am »
Nice work pomonabill221 !!

Today I got the PI hooked up and operational with your second image, thanks for sharing.

I don't see what to use to kick off any recording or play the one Flir video included.

Can you guys be a little more specific for non Linux users?

Maybe share pics of the hookups, pins etc.

Those txt files have lots of nice arrows but the formatting is all over the place, work wrap, no word wrap, can't make out the connections.


.
You are welcome!  I would imagine that setting the camera's +5 to 4.0 and breaking the connection between the device (laptop/tablet/etc.) would make the use of the camera portable and not run off the device's battery.
Don't know if this would affect the logic levels on the D+ and D- lines though.  Will have to pull out the scope next and see what the levels are.
 

Offline Captain MorganTopic starter

  • Contributor
  • Posts: 28
Re: Capturing Video from Flir E4 to portable device
« Reply #44 on: January 20, 2014, 07:10:23 am »
Using a USB2 hub I have a USB mouse and kb working in the PI img that Jolly offered.

THAT'S IT.

Nothing else, no nyet nein nada.

I see a huge Raspberry and a menu with tons of stuff that start with the letter X that isnt pr0n.

So for the life of me I can't see anything in the programs that would record video, or play the one Flir avi that's in the image.

Jolly states he has a switche(s) connected to pins on the PI board, but the readme is non decipherable.

Can someone please put it in a jpg or pdf and post it?

THX in advance.


.


 

Offline pomonabill221

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: us
Re: Capturing Video from Flir E4 to portable device
« Reply #45 on: January 20, 2014, 07:49:33 am »
I tried a diode in the +5 line to the camera and the voltage was about4.2 volts and the current was 78mA.
At 4.0 volts the current would be MUCH less and two diodes in series did drop the voltage, but the camera wouldn't always connect so the voltage IS critical.
Getting a 1.0 volt stable drop would be difficult, so I am going to make an adaptor with one diode in it and settle for the 78mA draw from my laptop.
Every laptop/device may be different though, and the threshold in each camera may be different also as to whether it will connect or not...Just have to try it.
Could even make up a 4.0 volt regulator at the camera end of the usb cable... might give that a try.
 

Offline Jolly

  • Contributor
  • Posts: 14
  • Country: de
Re: Capturing Video from Flir E4 to portable device
« Reply #46 on: January 20, 2014, 07:56:02 am »
So for the life of me I can't see anything in the programs that would record video, or play the one Flir avi that's in the image.

Jolly states he has a switche(s) connected to pins on the PI board, but the readme is non decipherable.

A small program calles "flirtool" is running in the background, which is controlled via GIPO input. See the pictures for the switches. Power up the PI with camera connected. Connect the pins as show in the picture, to get the video output on the desktop.
Recording of E4 videos using a Raspberry PI: http://www.eversberg.eu/download/flir_vcr_v0.1.zip
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Capturing Video from Flir E4 to portable device
« Reply #47 on: January 20, 2014, 08:19:40 am »
I've been recording and streaming E4 video on a small linux box for some time now.

what frame rate did you get? the E4 provides the 3 different frame rates in descending order. with standard uvc driver, the recording rate is 3.75 fps, since that is the "highest" one the camera provides. i hacked the driver for my PI image, so it uses the "lowest" one, which is 15 fps. there is no way to tell the driver which rate it should use. (even USB uses a frame rate of 15hz, the frame rate from the sensor is 9hz.)

From my ffserver-flir.conf:
Code: [Select]
Launch ffmpeg -r 25 -f video4linux2 -i /dev/video0 -vcodec copy

So it's set to 25 fps, and together with the -vcodec copy, this boils down to: ffmpeg will grab frames as fast as it can get it from the UVC video interface, and forward the raw video stream to the next process (ffserver). Then ffserver will do the video encoding and make it available over http for multiple clients in the network.

Works pretty well. When I view the E4 lcd side by side with a laptop that accesses the stream over the network I estimate I get ~ 1 frame of delay. I was expecting more latency, so I'm quite pleased with it. :)
 

Offline Captain MorganTopic starter

  • Contributor
  • Posts: 28
Re: Capturing Video from Flir E4 to portable device
« Reply #48 on: January 20, 2014, 09:01:45 am »
Oh thx Jolly!

"Power up the PI with camera connected." roger that. I can add the double pole switch tomorrow as shown.

""flirtool" is running in the background, which is controlled via GIPO input" So this is something you already embedded that's not in the programs menu that will automagically start on boot.


.

 

Offline Jolly

  • Contributor
  • Posts: 14
  • Country: de
Re: Capturing Video from Flir E4 to portable device
« Reply #49 on: January 20, 2014, 09:20:38 am »
... ffmpeg will grab frames as fast as it can get it from the UVC video interface, and forward the raw video stream to the next process (ffserver).

at the original driver, i got only 3.75 fps. the stream was recorded in a higher rate, but the actual image changed about 4 times per second.

maybe there are fixes for the UVC driver that always uses highest rate. the driver of the current PI's "rasbian" distribution does not.
Recording of E4 videos using a Raspberry PI: http://www.eversberg.eu/download/flir_vcr_v0.1.zip
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf