Show Posts
Pages: 1 [2] 3 4 ... 162
16  Using Arduino / Sensors / Re: ov7670 with both arduino uno and now mega on: September 10, 2014, 07:56:31 pm
From pin header to microcontroller is ok, maybe problem is into ov7670 sensor pin.. but.. I changed to RGB555 so I don't need D7

Here is Color Bar



And a Mario image



Much better smiley
17  Using Arduino / Sensors / Re: ov7670 with both arduino uno and now mega on: September 10, 2014, 07:18:50 pm
I was analyzing in frequency images generated.. bit 7 is always zero. Electrical connection between pcb and camera module is ok, also between pin header and FIFO.
18  Using Arduino / Sensors / Re: ov7670 with both arduino uno and now mega on: September 10, 2014, 05:49:34 pm
Yes, data lines are ok.

It seems like white saturate to green



This is 320x240 image stretched to 640x480 . I'm using a software that I wrote in C#.

I confirm my results with ffmpeg, converting raw rgb565 bytes received from camera (attached) into png image with

ffmpeg -f rawvideo -s 320x240 -pix_fmt rgb565be -i 0.raw -f image2 -vcodec png img.png

Give same image
19  Using Arduino / Sensors / Re: ov7670 with both arduino uno and now mega on: September 10, 2014, 02:51:01 pm
I've tried both RGB565 and YUV422 with right decoding on pc side but green stay smiley-sad I've tried changing order and skipping bytes, hours and hours of trying. RGB565 seem better but far from your images.

Could be sensor broken? ov7725 is better? If I have to buy the sensor I want better.
20  Using Arduino / Sensors / Re: ov7670 with both arduino uno and now mega on: September 10, 2014, 06:50:48 am
Using registers from https://github.com/ComputerNerd/ov7670-simple where I have changed only REG_COM10 (I use module v2 with patch to connect RE pin).

Code:
//set up camera
wrReg(REG_COM10, 0x02);//pclk does not toggle on HBLANK COM10 //32
//wrReg(0x11,32);//Register 0x11 is for pixel clock divider
wrReg(REG_RGB444, 0x00);// Disable RGB444
wrReg(REG_COM11,226);//enable night mode 1/8 frame rate COM11*/
//wrReg(0x2E,63);//Longer delay
wrReg(REG_TSLB,0x04); // 0D = UYVY  04 = YUYV
wrReg(REG_COM13,0x88);   // connect to REG_TSLB
//wrReg(REG_COM13,0x8);   // connect to REG_TSLB disable gamma
wrReg(REG_COM7, 0x00);   // YUV
//wrReg(REG_COM17, 0x00);  // color bar disable
wrReg(REG_COM15, 0xC0);  //Full range
//wrReg(REG_COM3, 0x04);
wrReg(REG_COM3,4); // REG_COM3
//wrReg(0x3e,0x00); //  REG_COM14
//wrReg(0x72,0x11); //
//wrReg(0x73,0xf0); //
//wrReg(REG_COM8,0x8F); // AGC AWB AEC Unlimited step size
/*wrReg(REG_COM8,0x88);//disable AGC disable AEC
wrReg(REG_COM1, 3);//manual exposure
wrReg(0x07, 0xFF);//manual exposure
wrReg(0x10, 0xFF);//manual exposure*/
wrReg(REG_COM14, 0x19);
wrReg(0x72, 0x11);
wrReg(0x73, 0xf1);
wrReg(REG_HSTART,0x16);
wrReg(REG_HSTOP,0x04);
wrReg(REG_HREF,0x24);
wrReg(REG_VSTART,0x02);
wrReg(REG_VSTOP,0x7a);
wrReg(REG_VREF,0x0a);
//wrReg(0x70, 0x3a);   // Scaling Xsc
//wrReg(0x71, 0x35);   // Scaling Ysc
//wrReg(0xA2, 0x02);   // pixel clock delay
//Color Settings
//wrReg(0,0xFF);//set gain to maximum possible
//wrReg(0xAA,0x14); // Average-based AEC algorithm
wrReg(REG_BRIGHT,0x00);  // 0x00(Brightness 0) - 0x18(Brightness +1) - 0x98(Brightness -1)
wrReg(REG_CONTRAS,0x40); // 0x40(Contrast 0) - 0x50(Contrast +1) - 0x38(Contrast -1)
//wrReg(0xB1,0xB1); // Automatic Black level Calibration
wrReg(0xb1,4);//really enable ABLC
wrReg(MTX1,0x80);
wrReg(MTX2,0x80);
wrReg(MTX3,0x00);
wrReg(MTX4,0x22);
wrReg(MTX5,0x5e);
wrReg(MTX6,0x80);
wrReg(MTXS,0x9e);
wrReg(AWBC7,0x88);
wrReg(AWBC8,0x88);
wrReg(AWBC9,0x44);
wrReg(AWBC10,0x67);
wrReg(AWBC11,0x49);
wrReg(AWBC12,0x0e);
wrReg(REG_GFIX,0x00);
//wrReg(GGAIN,0);
wrReg(AWBCTR3,0x0a);
wrReg(AWBCTR2,0x55);
wrReg(AWBCTR1,0x11);
wrReg(AWBCTR0,0x9f);
//wrReg(0xb0,0x84);//not sure what this does
wrReg(REG_COM16,COM16_AWBGAIN);//disable auto denoise and edge enhancement
//wrReg(REG_COM16,0);
wrReg(0x4C,0);//disable denoise
wrReg(0x76,0);//disable denoise
wrReg(0x77,0);//disable denoise
wrReg(0x7B,4);//brighten up shadows a bit end point 4
wrReg(0x7C,8);//brighten up shadows a bit end point 8
//wrReg(0x88,238);//darken highlights end point 176
//wrReg(0x89,211);//try to get more highlight detail
//wrReg(0x7A,60);//slope
//wrReg(0x26,0xB4);//lower maximum stable operating range for AEC
//hueSatMatrix(0,100);
//ov7670_store_cmatrix();
//wrReg(0x20,12);//set ADC range to 1.5x
wrReg(REG_COM9,0x6A);//max gain to 128x
wrReg(0x74,16);//disable digital gain
//wrReg(0x93,15);//dummy line MSB
wrReg(0x11,4);
//wrReg(0x2a,5);//href delay

I get thi YUV image



With 4mm lens is also worse.. maybe can be low-quality lens?

UPDATE: I also tried

Code:
wrReg(REG_COM10, 0x02);//pclk does not toggle on HBLANK COM10 0x15
ov7670_default_regs();
qvga_ov7670();
rgb565_ov7670();

where functions simply set register like defined in  https://github.com/ComputerNerd/arduino-camera-tft/blob/master/ov7670_regs.h but nothing... green stay.
21  Using Arduino / Sensors / Re: ov7670 with both arduino uno and now mega on: September 09, 2014, 08:39:15 pm
Yes, I read all thread. I set camera for 320x240 RGB565.

White look like green..



These are registers:

Code:
{0x0,0xF},
{0x1,0x60},
{0x2,0x5A},
{0x3,0x5},
{0x4,0x1},
{0x5,0x0},
{0x6,0x24},
{0x7,0x40},
{0x8,0x37},
{0x9,0x1},
{0xA,0x76},
{0xB,0x73},
{0xC,0x0},
{0xD,0x0},
{0xE,0x61},
{0xF,0x4B},
{0x10,0x7F},
{0x11,0x0},
{0x12,0x14},
{0x13,0xE7},
{0x14,0x0},
{0x15,0x2},
{0x16,0x2},
{0x17,0x16},
{0x18,0x4},
{0x19,0x2},
{0x1A,0x7A},
{0x1B,0x0},
{0x1C,0x7F},
{0x1D,0xA2},
{0x1E,0x27},
{0x1F,0x0},
{0x20,0x4},
{0x21,0x2},
{0x22,0x91},
{0x23,0x0},
{0x24,0x8A},
{0x25,0x73},
{0x26,0xA5},
{0x27,0x80},
{0x28,0x80},
{0x29,0x7},
{0x2A,0x0},
{0x2B,0x0},
{0x2C,0x80},
{0x2D,0x0},
{0x2E,0x0},
{0x2F,0x24},
{0x30,0x8},
{0x31,0x30},
{0x32,0x80},
{0x33,0xB},
{0x34,0x11},
{0x35,0xB},
{0x36,0x0},
{0x37,0x1D},
{0x38,0x71},
{0x39,0x2A},
{0x3A,0x4},
{0x3B,0x0},
{0x3C,0x78},
{0x3D,0x88},
{0x3E,0x0},
{0x3F,0x0},
{0x40,0xD0},
{0x41,0x8},
{0x42,0x0},
{0x43,0x14},
{0x44,0xF0},
{0x45,0x34},
{0x46,0x58},
{0x47,0x28},
{0x48,0x3A},
{0x49,0x0},
{0x4A,0x0},
{0x4B,0x0},
{0x4C,0x0},
{0x4D,0x40},
{0x4E,0x20},
{0x4F,0x80},
{0x50,0x80},
{0x51,0x0},
{0x52,0x22},
{0x53,0x5E},
{0x54,0x80},
{0x55,0x0},
{0x56,0x50},
{0x57,0x80},
{0x58,0x9E},
{0x59,0x88},
{0x5A,0x88},
{0x5B,0x44},
{0x5C,0x67},
{0x5D,0x49},
{0x5E,0xE},
{0x5F,0xF0},
{0x60,0xF0},
{0x61,0xF0},
{0x62,0x0},
{0x63,0x0},
{0x64,0x4},
{0x65,0x20},
{0x66,0x5},
{0x67,0xC0},
{0x68,0x80},
{0x69,0x0},
{0x6A,0x40},
{0x6B,0xA},
{0x6C,0xA},
{0x6D,0x55},
{0x6E,0x11},
{0x6F,0x9F},
{0x70,0x0},
{0x71,0x1},
{0x72,0x11},
{0x73,0x0},
{0x74,0x19},
{0x75,0xF},
{0x76,0xE1},
{0x77,0x10},
{0x78,0x0},
{0x79,0x0},
{0x7A,0x2C},
{0x7B,0x11},
{0x7C,0x1A},
{0x7D,0x2A},
{0x7E,0x42},
{0x7F,0x4C},
{0x80,0x56},
{0x81,0x5F},
{0x82,0x67},
{0x83,0x70},
{0x84,0x78},
{0x85,0x87},
{0x86,0x95},
{0x87,0xAF},
{0x88,0xC8},
{0x89,0xDF},
{0x8A,0x0},
{0x8B,0x0},
{0x8C,0x0},
{0x8D,0x4F},
{0x8E,0x0},
{0x8F,0x0},
{0x90,0x0},
{0x91,0x0},
{0x92,0x0},
{0x93,0x0},
{0x94,0x4},
{0x95,0x8},
{0x96,0x0},
{0x97,0x1},
{0x98,0x10},
{0x99,0x40},
{0x9A,0x80},
{0x9B,0x20},
{0x9C,0x0},
{0x9D,0x99},
{0x9E,0x7F},
{0x9F,0x78},
{0xA0,0x68},
{0xA1,0x3},
{0xA2,0x2},
{0xA3,0x1},
{0xA4,0x0},
{0xA5,0x5},
{0xA6,0xDF},
{0xA7,0xDF},
{0xA8,0xF0},
{0xA9,0x90},
{0xAA,0x94},
{0xAB,0x7},
{0xAC,0x0},
{0xAD,0x80},
{0xAE,0x80},
{0xAF,0x80},
{0xB0,0x84},
{0xB1,0xC},
{0xB2,0xE},
{0xB3,0x82},
{0xB4,0x0},
{0xB5,0x4},
{0xB6,0x0},
{0xB7,0x66},
{0xB8,0xA},
{0xB9,0x6},
{0xBA,0x0},
{0xBB,0x0},
{0xBC,0x0},
{0xBD,0x0},
{0xBE,0x41},
{0xBF,0x41},
{0xC0,0x41},
{0xC1,0x41},
{0xC2,0x0},
{0xC3,0x0},
{0xC4,0x0},
{0xC5,0x0},
{0xC6,0x0},
{0xC7,0x0},
{0xC8,0x6}

I have also tried YUV but result look bad too...



Code:
{0x0,0x1},
{0x1,0x62},
{0x2,0x5E},
{0x3,0x5},
{0x4,0x1},
{0x5,0x50},
{0x6,0x26},
{0x7,0x40},
{0x8,0x81},
{0x9,0x1},
{0xA,0x76},
{0xB,0x73},
{0xC,0x0},
{0xD,0x0},
{0xE,0x61},
{0xF,0x4B},
{0x10,0x7F},
{0x11,0x0},
{0x12,0x10},
{0x13,0xE7},
{0x14,0x0},
{0x15,0x2},
{0x16,0x2},
{0x17,0x16},
{0x18,0x4},
{0x19,0x2},
{0x1A,0x7A},
{0x1B,0x0},
{0x1C,0x7F},
{0x1D,0xA2},
{0x1E,0x27},
{0x1F,0x0},
{0x20,0x4},
{0x21,0x2},
{0x22,0x91},
{0x23,0x0},
{0x24,0x8A},
{0x25,0x73},
{0x26,0xA5},
{0x27,0x80},
{0x28,0x80},
{0x29,0x7},
{0x2A,0x0},
{0x2B,0x0},
{0x2C,0x80},
{0x2D,0x0},
{0x2E,0x0},
{0x2F,0x26},
{0x30,0x8},
{0x31,0x30},
{0x32,0x80},
{0x33,0xB},
{0x34,0x11},
{0x35,0xB},
{0x36,0x0},
{0x37,0x1D},
{0x38,0x71},
{0x39,0x2A},
{0x3A,0xC},
{0x3B,0x0},
{0x3C,0x78},
{0x3D,0x98},
{0x3E,0x0},
{0x3F,0x0},
{0x40,0xC0},
{0x41,0x8},
{0x42,0x0},
{0x43,0x14},
{0x44,0xF0},
{0x45,0x34},
{0x46,0x58},
{0x47,0x28},
{0x48,0x3A},
{0x49,0x0},
{0x4A,0x0},
{0x4B,0x0},
{0x4C,0x0},
{0x4D,0x40},
{0x4E,0x20},
{0x4F,0x80},
{0x50,0x80},
{0x51,0x0},
{0x52,0x22},
{0x53,0x5E},
{0x54,0x80},
{0x55,0x0},
{0x56,0x50},
{0x57,0x80},
{0x58,0x9E},
{0x59,0x88},
{0x5A,0x88},
{0x5B,0x44},
{0x5C,0x67},
{0x5D,0x49},
{0x5E,0xE},
{0x5F,0xF0},
{0x60,0xF0},
{0x61,0xF0},
{0x62,0x0},
{0x63,0x0},
{0x64,0x4},
{0x65,0x20},
{0x66,0x5},
{0x67,0xC0},
{0x68,0x80},
{0x69,0x0},
{0x6A,0x40},
{0x6B,0xA},
{0x6C,0xA},
{0x6D,0x55},
{0x6E,0x11},
{0x6F,0x9F},
{0x70,0x0},
{0x71,0x81},
{0x72,0x11},
{0x73,0x0},
{0x74,0x19},
{0x75,0xF},
{0x76,0xE1},
{0x77,0x10},
{0x78,0x0},
{0x79,0x0},
{0x7A,0x2C},
{0x7B,0x11},
{0x7C,0x1A},
{0x7D,0x2A},
{0x7E,0x42},
{0x7F,0x4C},
{0x80,0x56},
{0x81,0x5F},
{0x82,0x67},
{0x83,0x70},
{0x84,0x78},
{0x85,0x87},
{0x86,0x95},
{0x87,0xAF},
{0x88,0xC8},
{0x89,0xDF},
{0x8A,0x0},
{0x8B,0x0},
{0x8C,0x0},
{0x8D,0x4F},
{0x8E,0x0},
{0x8F,0x0},
{0x90,0x0},
{0x91,0x0},
{0x92,0x0},
{0x93,0x0},
{0x94,0x4},
{0x95,0x8},
{0x96,0x0},
{0x97,0x1},
{0x98,0x10},
{0x99,0x40},
{0x9A,0x80},
{0x9B,0x20},
{0x9C,0x0},
{0x9D,0x99},
{0x9E,0x7F},
{0x9F,0x78},
{0xA0,0x68},
{0xA1,0x3},
{0xA2,0x2},
{0xA3,0x2},
{0xA4,0x0},
{0xA5,0x5},
{0xA6,0xDF},
{0xA7,0xDF},
{0xA8,0xF0},
{0xA9,0x90},
{0xAA,0x94},
{0xAB,0x7},
{0xAC,0x0},
{0xAD,0x80},
{0xAE,0x80},
{0xAF,0x80},
{0xB0,0x84},
{0xB1,0xC},
{0xB2,0xE},
{0xB3,0x82},
{0xB4,0x0},
{0xB5,0x4},
{0xB6,0x0},
{0xB7,0x66},
{0xB8,0xA},
{0xB9,0x6},
{0xBA,0x0},
{0xBB,0x0},
{0xBC,0x0},
{0xBD,0x0},
{0xBE,0x41},
{0xBF,0x42},
{0xC0,0x41},
{0xC1,0x42},
{0xC2,0x0},
{0xC3,0x0},
{0xC4,0x0},
{0xC5,0x0},
{0xC6,0x0},
{0xC7,0x0},
{0xC8,0x6}

I have tried a lot of combinations for registers (also from your github) but colors remains bad..  smiley-cry

Thank you
22  Using Arduino / Sensors / Re: ov7670 with both arduino uno and now mega on: September 09, 2014, 06:07:54 pm
Hello,

I get this color bar:


Also images are very greenish

What can be wrong?
23  International / Generale / Re: Modulo Wi-Fi a 5€ on: September 08, 2014, 02:23:45 pm
Il 3000 ha già il modello successivo 3100 che integra un micro ARM, mi sembra meglio come emissioni di questo modulino cinese e quindi maggiormente certificabile (es. case metallico), etc..

Mi sembra che ci siano inoltre pochissimi condensatori di disaccoppiamento e visto l'assorbimento elevato 802.11b, CCK 1Mbps, POUT=+19.5dBm 215mA di media, chissà quanto raggiungono i picchi.. non penso che la board sia fatta proprio a regola d'arte..

Sai mica la velocità massima che si può raggiungere tramite l'UART?
24  International / Generale / Re: Modulo Wi-Fi a 5€ on: September 08, 2014, 12:53:47 pm
We have a set of documents in Chinese.
Please buy this module only when you understand the existing documents.


 smiley-twist

Più che modulino è un tutto completo, con micro a 32 bit e compagnia bella. Io preferisco i CC3000 di TI però al momento anche se costano di più sono meglio documentati e ci sono librerie già disponibili.
25  International / Hardware / Re: ricevitore 433 per apricancello on: September 03, 2014, 06:14:32 pm
Va da se che ti serve ASK se è così il telecomando.. devi trovare un modulino  decente che usa quella codifica
26  International / Hardware / Re: ricevitore 433 per apricancello on: September 03, 2014, 02:15:04 pm
nell'altro topic mi dicevi che è possibile ricevere i telecomandi con nrf905, ma io non sono riuscito a trovare informazioni a riguardo.

mai detto che è possibile ricevere i telecomandi, ho detto che per utilizzare i 433 MHz ci sono gli nrf905 ma non ho parlato di telecomandi ne di breakout. Solo del chip di Nordic.

Quote
e le librerie non "le prendo a caso"

Spesso si trovano su internet librerie non funzionanti o non proprio perfette..
27  International / Hardware / Re: ricevitore 433 per apricancello on: September 03, 2014, 01:17:39 pm
Devi capire quale modulazione utilizza il tuo telecomando, sicuro che non è un rfPIC che usa ASK o FSK?

nrf905 va bene se vuoi comunicare tra due modulini uguali, poi ovvio che se prendi breakout dai cinesi da 2€ e usi librerie a caso da internet potresti avere problemi che richiedono competenze specifiche per essere risolti.

La domanda è però: perché vuoi captare il segnale dell'apri-cancello?
28  International / Hardware / Re: come stabilizzare stato delle uscite durante il caricamento? on: September 03, 2014, 08:17:10 am
Se usa il bootloader quei pin non hanno nulla a che vedere con la programmazione, eventualmente spostare solo il pin 13, se usato, perché è quello del led che lampeggia dopo un reset.

Si vero, visto che però non ha specificato se carica sketch da USB o no, meglio avvertirlo.
29  International / Hardware / Re: come stabilizzare stato delle uscite durante il caricamento? on: September 03, 2014, 07:17:43 am
La programmazione avviene sui pin SPI che hai collegato allo shift register. E' normale che switchano durante la programmazione.
Usa altri pin e non 10,11,12,13.

Ciao
30  International / Generale / Re: Modulo radio a 869 MHz, andiamo sul sicuro? on: September 03, 2014, 04:34:20 am
In un bosco la vedo dura.. 4km sono tanti e naturalmente i vari nrf24l01 non aiutano in questo caso.
Pages: 1 [2] 3 4 ... 162