Author Topic: Autoliv NV2 on Raspberry Pi  (Read 7266 times)

0 Members and 1 Guest are viewing this topic.

Offline dnhkng

  • Contributor
  • Posts: 11
  • Country: de
Re: Autoliv NV2 on Raspberry Pi
« Reply #50 on: July 02, 2020, 08:12:04 pm »
I'd like to try working on the image clean up. That more my thing. Conmega, the S7-mini board looks great, I'll order one from Trenz. It seems like a fair price to avoid having to lay out and solder a chip like that.

I think I might have the same parallel LCD from your first video in my parts-box too. Can you access image data easily over USB with your S7-mini setup? I'll need lots of data to play with for image correction. Maybe a linear fit in enough, but from the temperature sensors I have used in the past, it's been a more complex model.

To get a good cleanup, it might be good to really defocus the lens to build a pixel-correction array.  Defocused imaging a piece of melting ice and boiling water gets you 2 fixed points to work with.

EDIT:
I've written micropython code for the unlock (HMAC-MD5/MPC2515 driver), which should be great on FPGA using FuPy https://fupy.github.io/. With a serial interface into the REPL, you can mess around on the CAN bus directly (no messy compile/upload steps).  I'm using as MCP2515 board with SPI, because they are cheap and easy. Maybe a CAN bus IP on the FPGA connected to a transceiver IC (MCP2551), and hooked up to FuPy on a RiscV core is a nicer way to go.

Before and after 'clickclick' traces  :popcorn:
« Last Edit: July 07, 2020, 04:59:52 pm by dnhkng »
 

Offline dnhkng

  • Contributor
  • Posts: 11
  • Country: de
Re: Autoliv NV2 on Raspberry Pi
« Reply #51 on: July 19, 2020, 09:52:41 pm »
Kinda got some pictures out of the camera!

well not really...

I hacked together a hand-soldered monstrosity, wired up to a fake Saleae Logic thingy, to capture the upper 5 bits of thermal data, and the h/v-sync and clock lines, then chucked it all into a numpy array to poke around. I haven't figured out the logic of the video signal yet, so I just grab every line I can that has 326 pixels between syncs, and I get something that looks like my hand holding a lighter over and over (I captured 300 mS of data, so 10ish or so frames I hope).

It looks like either blocks of rows are scrambled or just missing entirely, kinda weird...

@Treehouseman - Is this the same issue you had?



« Last Edit: July 19, 2020, 09:55:10 pm by dnhkng »
 

Offline Treehouseman

  • Supporter
  • ****
  • Posts: 56
Re: Autoliv NV2 on Raspberry Pi
« Reply #52 on: July 19, 2020, 10:10:39 pm »
I'd say same symptom and same general fault but likely different cause. I was suffering capture rate issues, with things being pushed to the limit and resulting in temp fluxuations in the camera causing me to lose sync. For your issue your'e not consistently capturing data it seems, looks like you're getting bursts of valid data. I know we were looking at the FX2 (aka your clone) for possible data dumping, but it would have required custom firmware for all the bits,
 
The following users thanked this post: dnhkng

Offline tmbinc

  • Regular Contributor
  • *
  • Posts: 215
Re: Autoliv NV2 on Raspberry Pi
« Reply #53 on: July 20, 2020, 08:38:44 am »
There are empty lines between the valid lines, which you need to filter out. I think this is done to keep the output data rate constant, so it doesn't need to be locked with the sensor scan rate.
 
The following users thanked this post: dnhkng

Offline dnhkng

  • Contributor
  • Posts: 11
  • Country: de
Re: Autoliv NV2 on Raspberry Pi
« Reply #54 on: July 20, 2020, 09:33:49 am »
Got it!  It seems the ground wires are in fact useful... 
@ Treehousea and tmbinc - Thanks for the tip! I thought the data was sent bursty, but it seems if you hook up the ground wires its a continuous stream!  :-+

Still a bit confused about the frame sync bit, I seem to get more than I would expect (bit 15 goes high 4 times per frame, but its a regular pattern), but I'll work it out, it's a fun puzzle.

Pretty happy so far, all done in Python, for less than $20 in bits and pieces. Haven't had to dust off my Arty A7 yet!
« Last Edit: July 20, 2020, 11:19:51 am by dnhkng »
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1036
  • Country: us
  • Save the possum. Save the world.
Re: Autoliv NV2 on Raspberry Pi
« Reply #55 on: July 20, 2020, 11:56:12 am »
Bit 15 is high for the first line and line number 20 (not the 20th line). So twice per frame.
 

Offline dmendesf

  • Regular Contributor
  • *
  • Posts: 132
  • Country: br
Re: Autoliv NV2 on Raspberry Pi
« Reply #56 on: July 20, 2020, 07:41:53 pm »
Am I crazy or the homebrew NV3 thread just vanished?
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1036
  • Country: us
  • Save the possum. Save the world.
 

Offline dmendesf

  • Regular Contributor
  • *
  • Posts: 132
  • Country: br
Re: Autoliv NV2 on Raspberry Pi
« Reply #58 on: July 20, 2020, 08:33:26 pm »
Thank you and sorry for the panic attack :)
 

Offline kmike

  • Contributor
  • Posts: 29
  • Country: de
Re: Autoliv NV2 on Raspberry Pi
« Reply #59 on: August 06, 2020, 07:37:38 am »
Hello,

if I understand correctly, the bits 16 to 23 are not used after deserialisation? I plan to use the DS90C124 for the task and would like to save some FPGA pins  :)

Br,
mike
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1036
  • Country: us
  • Save the possum. Save the world.
Re: Autoliv NV2 on Raspberry Pi
« Reply #60 on: August 06, 2020, 07:45:53 am »
Bit 14 and 17 to 23 can be ignored.

0 to 13 contain video or line/frame number
15 and 16 are sync
 
The following users thanked this post: kmike

Offline kmike

  • Contributor
  • Posts: 29
  • Country: de
Re: Autoliv NV2 on Raspberry Pi
« Reply #61 on: August 06, 2020, 08:01:19 am »
thanks!

just for my planning: how much current does the camera need on the 12V rail, when it is operating and unlocked?

Br,
miike
« Last Edit: August 06, 2020, 08:37:44 am by kmike »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf