Road To Building a Space-Ready Camera From Scratch-I

The sexier V2.1 mounted on SNUSAT-I Cam Development Board
V1.0 looks dejected in the background
[Refresh page if the whole post doesn't show up. The website was down for a couple of hours because of the domain provider's server has some bug. The blogspot template is a bit of a headache too. If you are receiving this through your email, you are good to go]

For those of you here for the regular nonsense fodder, I am sorry. This is going to bore you to death, but for those who are interested in imagery and camera and what not, this might just be at level where Jose Mourinho gets punched on the face by Monsieur Wenger, then gets eaten by a hybrid half dragon half vampire and then gets tossed to space Interstellar style. And no, the rangers won't find him floating in front of Saturn. No.

I don't know how that happened in the movie either. Such bullocks. 

Buoyed by recent communication success through I2C (Two-Wire Interface) on two image sensor modules, MT9D111 and OV2640 and even gone on to get image out of the latter, I moved back to a sensor whom I had absolutely no success with. To my big surprise, the Korean PixelPlus' POA030R VGA sensor did respond after setting a clock speed that was higher than the recommended value. 

You have no idea how badly I needed this. You can almost say my degree depends on it. 

The issue I was having in regard to Korean image sensors were that 1)companies were incredulously adamant about not selling to educational institutions where only a few sensors at a time can be sold 2) Datasheet is somewhat shit, never mentions the input clock is a MUST 3)companies don't have a module to work with, if they do, they have a USB interface, which, to be quite frustratingly brutally honest, is another world of its own. 

So why work with a Korean sensor in the first place? Well, that's a very valid question. You see, the satellite project that I am currently involved is funded by the Korean government (if i am not wrong) and placing an image sensor that was manufactured in Korea was THE requirement. My undergraduate thesis was based on a GoPro camera being integrated for space applications and the camera was, in a way, ready to be liftoff. The issue came when GoPro wasn't qualified because it had a SONY image sensor in it which we all know, isn't quite kimchi material.

[GoPro Hack Guide [HERE]]

This is how the camera will be mounted on the PCB...
And then shot up to 300km low earth orbit
The difference between using a GoPro and building a camera yourself was for all to see; the former worked as a big, functional module and all I had to do was to "hack" the trigger button and image would just pop up like magic. The hardware and software was there, ready and working. 

However, with the Korean sensor, I was only left with the sensor. That means that basically I had to think about everything from processors to rams to non-volatile storage to the software.

And oh boy, is the software a real pain in the arse. 

Usually when one goes about building both hardware and software, it is essential to have confidence in either one of them; either have a reliable software that's working or a hardware that somewhat bandaged and stitched but responsive. From then on, one can fine tune either the hardware or the software; one at a time. 

As you will notice, the issue with me was that both my hardware and software was pretty much in the toilet. That changed last week when I took the ultimate baby step of using an Arduino to fire up the I2C giving clock through the MCO1 (Master Clock Output) of STM32F429 (ARM Cortex M-4 Processor). I don't know why I hadn't thought of this before.

Now that I have a basic software for I2C that works, I could perhaps proceed to building the hardware?

The Hardware:
All Korean!
In order to build a camera- when I mention camera its the whole system with processor, ram, sd card, temperature sensors and all those tiny tit bits that makes it functional- the first step is to build a breakout board for the image sensor so that I could play around with the sensor. Which I had done nearly a year ago without being properly fluent on the language of schematics. 

However, after being quite literally thrown into the ocean of PCB designing in the hell months of March, April and May, I have somewhat acclimatized to the rigors and tediousness of designing a printed circuit board and learned how to properly read a schematic. Looking at manufacturers reference electrical design given for sensor, I can now see, very clearly, all the horrific mistakes I had made in the initial V1.0 breakout board for POA030R.

To rectify and make it more compact, portable and a little sexy looking, I proceeded in designing the whole thing from scratch this past Monday. The diagram of the schematics and layout have been shown below:
The schematics for V2.0/V2.1.
Had to correct to V2.1 because I misplaced the 0.1uF caps 
Rat's Nest PCB view from top. The red are for the bottom layer.
The PCB itself is a two layer design with GND copper pour on both layers.
I have also included the BOM (Bill of Materials), which will largely not make much sense. 

The PCB arrived just in time today and I quickly proceeded to hand solder the components. You will notice that some of them haven't been soldered that's because the components are taking ages to arrive. I wonder what it's going to be like when I return back to Nepal and I have to wait months just to get hold of a couple of SMD capacitors? Fun days ahead. 

I will have a test later and document it here. I have a feeling I might have screwed up the sensor big time while soldering but if it does survive, the sensor might just as well survive space. 


Popular Posts