Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:45 24 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite Thermal Camera

     Page 3 of 4    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 02:36pm 10 Jun 2024
Copy link to clipboard 
Print this post

Please check the attached - can't see the problem but have re-coded


PicoMite.zip
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 06:05pm 10 Jun 2024
Copy link to clipboard 
Print this post

@Peter,

I have no idea what you did, but that fixed it. It is stable now. I tried both VGA and non-VGA, and both are stable.

Others:

This is the working code (not finished, but status today). Just make sure you set the I2C bus to the right pins...


MLX90641_dev_19.zip


For both VGA and non-VGA there is a 50% speed increase. But the speed-up comes at cost of loosing FRAMEBUFFER in the VGA version. There may be is ome flashing visible in screen (the markers). And I have not been able to solve that.


Volhout
Edited 2024-06-11 06:08 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 03:08pm 11 Jun 2024
Copy link to clipboard 
Print this post

This is the latest version. You need the above PicoMite version (June 10) to run it.
I expect these changes to be incorporated in V50900RC6, but for now the above version should be used.

MLX90641_dev_20.zip

Next is tuning for Game*Mite...

Volhout
Edited 2024-06-12 01:10 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 396
Posted: 09:14pm 11 Jun 2024
Copy link to clipboard 
Print this post

Hi all,

program works great, no problems so far! See some comparision with a hot mug of tea and without just waving into the thermal camera.

Images from the latest software "MLX90641_dev_20".

I think there are MANY applications for this, monitoring events etc.

P.S.: I have the 110 degree view version of the camera module.




Greetings
Daniel
Edited 2024-06-12 07:15 by Amnesie
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 09:00am 12 Jun 2024
Copy link to clipboard 
Print this post

Hi Amnesie,

It will require a re-write of some of the code since WebMite does not provideo as much RAM as PicoMIte, and to provide graphics you need minimal a framebuffer VIRTUAL_C. But I see as second project a Web based thermal camera.

Just place it in the childrens bedroom, and make it alarm you when they get a fever, and send thermal pictures in an HTML page.

But that is the next project... let's first finish this one.....

Volhout
Edited 2024-06-12 20:15 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 02:15pm 14 Jun 2024
Copy link to clipboard 
Print this post

Amnesie,

Added a bit of functionality to the VGA/LCD version in awaiting 14 pin connector for Game*Mite.

This version introduces screenshots (compressed BMP) and file logging (.csv files).

Only keyboard shortcuts in this version:
- "s" take a screenshot.
- "l" start/stop logging with 500ms interval, logging maximum temperature, the pixel that measured the max temperature (location), the focus temperature(centre) and the minimum temperature.

The filename is shown on screen.

The software checks for an SD card. When it is inserted, it checks the drive for a folder called "TCdata". When it does not exist, it creates the folder.
Then it opens the folder, searches for the last file in it, and creates a new successive file to write the data to.

When no SD card, the same procedure is followed on the A: drive.

The file names are "screen-xxx.bmp" for screendumps, and "log-yyy.csv" for logs.

Since Game*Mite does not have an RTC, there is just an incremental xxx or yyy number.

Happy logging..

Volhout

P.S. The (debug) number in the bottom left screen is changed to the "idle" time in the 500ms loop. We have roughly 120ms-150ms left. I tried to code the new functionality to use minimal RAM. So minimal use of strings, since these all occupy 255 bytes, and we only have 2kbyte left....

MLX90641_dev_22.zip
Edited 2024-06-15 00:27 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 08:42pm 20 Jun 2024
Copy link to clipboard 
Print this post

This is the first beta for Game*Mite.

The MLX90641 camera connects to the Game*Mite expansion connector X1, similar as a 1970's photo flash on top of a camera. I2C on GP26/GP27.

The program auto configures for the Game*Mite.

User interface:
- START exits the program (same as Windows....hihi) and return to Game*Mite menu.
- B starts and stops logging
- A save a screenshot

The data is stored preferably on SD card in B:/TCdata, but in absence on A:/TCdata

The program has a configuration for "selfie mode" (camera facing operator) or "camera mode".

MLX90641_gm_23.zip


Log data from the CSV file in Libre Office Calc (similar MS Excel)



Screenshot from the camera in selfie mode (with a hot tea).



You need the PicoMite software from this thread (not the main RC5 at time of writing)
V5.09.00RC5_with_color_map_fix3
The post of Posted: 02:36pm 10 Jun 2024

Volhout
Edited 2024-06-21 06:49 by Volhout
PicomiteVGA PETSCII ROBOTS
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3800
Posted: 09:24pm 20 Jun 2024
Copy link to clipboard 
Print this post

Did you mean this PicoMite with the fix

John
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 06:57am 21 Jun 2024
Copy link to clipboard 
Print this post

Yes John,

That must be the one.

Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4036
Posted: 09:53am 21 Jun 2024
Copy link to clipboard 
Print this post

Hi Volhout,

I would love to see a photo of the Game*Mite + camera assembly.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
davematt
Regular Member

Joined: 27/09/2011
Location: Australia
Posts: 51
Posted: 01:52am 22 Jun 2024
Copy link to clipboard 
Print this post

Hi Volhout, I have strange behaviour from the LCD version. By chance I am viewing an image where I can tell if it’s upside down or not (don’t laugh) No matter which way I orient the camera I get either upside down, or image moving in the wrong direction as I tilt the camera. Also it will for all orientations move the image correctly in sideways tilt but wrongly with a vertical tilt, or vise versa.
I realise this must sound massively confused. (like me at this moment)
Wondering if you or anyone can replicate? Like everyone I believe this has huge potential!
Kind regards, David
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 06:08pm 22 Jun 2024
Copy link to clipboard 
Print this post

The camera module itself ir round, but at its base it has as mall metal tab.
That tab should face down when aiming horizontally..

Then it is a matter of choosing selfie mode, or camera mode in the mmbasic program. You have to edit the line that says

selfie=0


In the OPTION LCDPANEL there is also an orientation that could impact the behaviour ( la ndscape or reverse landscape).but when you can read the text(the numerical temperature readings) that setting is correct.

Volhout

P.S. use the last version, MLX90641_gm_23.bas.
Edited 2024-06-23 06:34 by Volhout
PicomiteVGA PETSCII ROBOTS
 
davematt
Regular Member

Joined: 27/09/2011
Location: Australia
Posts: 51
Posted: 03:22am 23 Jun 2024
Copy link to clipboard 
Print this post

Bingo…Was staring me in the face but totally missed that I had it in selfie mode. With orientation RL image and text correct and both directions as expected. Many thanks for all your work! D
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 09:12am 23 Jun 2024
Copy link to clipboard 
Print this post

Hi Tom,

Some pictures of the camera and Game*Mite.



Camera on a piece of experiment PCB





Wiring of the PCB





Camera plugged into the expansion socket of the Game*Mite




Camera in action, measuring the temperature of a soldering iron. Around 310 degrees (leaded solder, for unleaded solder you need 360 degrees).





If you want the camera module to show it at your local computer club, I can send it to you. Or build you a copy.

Volhout

P.S. I see in the action shot, that there are vertical lines in the LCD. These where NOT in the picture I uploaded. It must be some artefact of the scaler on the forum.
P.P.S. I see by the shape of the soldering iron that the camera is in selfie mode. Changed it in the code, but forgot to save the camera mode.
Edited 2024-06-23 19:21 by Volhout
PicomiteVGA PETSCII ROBOTS
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4036
Posted: 03:57pm 23 Jun 2024
Copy link to clipboard 
Print this post

Looks very tidy @Volhout.

  Volhout said  If you want the camera module to show it at your local computer club, I can send it to you. Or build you a copy.


That's a very generous offer, but those camera modules are not cheap and Brexit means that shipping to and from Europe is a crap-shoot, I don't think it is worth it for 10 minutes of entertainment .

Thank you for sharing the photos so I can at least participate vicariously.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 11:48am 24 Jun 2024
Copy link to clipboard 
Print this post

No new software,

Just an application. I use the camera at work to know when my Tea has cooled enough to make it drinkable. When it is 90 degrees when made... too hot. Just a threshold check for a pre-set temperature of 55 or 60 degrees, and a dual color LED on the Mite...
As long as the tea is somewhere within the viewing angle, it works.
You can even see how full the cup still is...

Funny, I never had, and rarely used a thermal camera. But now I do, I see plenty of applications....

Volhout
Edited 2024-06-24 21:49 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 11:54am 24 Jun 2024
Copy link to clipboard 
Print this post

Tom,

  thwill said  I don't think it is worth it for 10 minutes of entertainment


How long the shipping will take is out of my control. The offer still stands. Don't worry about the cost. I am glad I can return the favour for the 2 NES controllers...

Volhout
PicomiteVGA PETSCII ROBOTS
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 03:44pm 24 Jun 2024
Copy link to clipboard 
Print this post

Volhout- very nice job.It must have been a task getting the camera to work with mmbasic. data sheets are no fun. well done. Thank you for sharing.
The price of the built camera I bought with lcd and battery was only £25. ok, weeks to arrive but same price as just the sensor, depending where you look so cheaper to unsolder the camera sensor than just buy it!?!...and the ready built is 32x24, usb rechargeable,32 bit cpu, saved bmp to win. the prices don't make sense.
as said, they are useful . interesting perhaps but even 32x24 at 8 fps does not show enough detail to replace a £5 handheld contactless thermometer with laser pointer for most things you want to test. imho.
too old to believe the advert hype, stan
edit... getting the camera/sensor and working with mmbasic from this thread would have been more entertainment.
Edited 2024-06-25 03:01 by stanleyella
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 06:19pm 24 Jun 2024
Copy link to clipboard 
Print this post

Stan,

Your camera uses a better camera module. And it makes use of the 65k colors of the LCD. All in all a better camera I think. For that cheap price, a miracle.

But it was fun making this work with MMBasic and the (only) 16 colors we can use in the VGA and in the LCD framebuffer.

So I think it is the best we can do on PicoMite. The only way we can improve is by getting more colors(*). The higher resolution can be achieved by changing much of the math to 16 bit (MMBasic uses 64bit math, but that is overdone for this particular application). And 16bit is not supported in MMBasic.

Anyway, we achieved something !! And it was fun to do, but cost way way more time than Flappy Bird. (Flappy bird was running in 3 days). But only 10% of what Petscii Robots took to develop (for myself), not even accounting for all the hours that Martin (and also Kevin for speeding things up) spend on it.

For me it was and educating project, and it was successor for something I had to do for my day-time job.

Volhout

(*) technically it is possible to use more colors in the math in this program (super simple, it is a define), and you can use more of the LCD colors, but then you cannot use the framebuffer, and slow display down to 1 or 2 second LCD update (not 500ms we have now). For me it was not worth it.
Edited 2024-06-25 04:22 by Volhout
PicomiteVGA PETSCII ROBOTS
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2120
Posted: 08:36pm 24 Jun 2024
Copy link to clipboard 
Print this post


me on a good day :)

 
     Page 3 of 4    
Print this page
© JAQ Software 2024