Analog PAL camera and PIC 18F14K22 anti*X missile guidance IR tracking software test.
Holding my finger over a LED flashlight to simulate the IR from missile:
Test setup:
This is all about video processing. And about defending against anti-anti-anti-anti-anti-(lost count) Miss Isles
There is only one chip active, a PIC 18F14K22
All video processing is done from the signal obtained from the analog PAL camera.
Those of you who use huge processors and many lines of code and tons of libraries, you should know that video is simple when processing FBAS signals from these cameras.
I hardly used any code space. This is just an in-between project waiting for some GHz parts to arrive for my transmitter.
The camera is mounted on 2 RC servos for X and Y, Y is disconnected here in the movie. Camera may or may not have IR filter removed. Anyways it does not get confused by environmental light as you can see, the red glow from the LED flashlight caused by my finger in front is enough for it to track my finger.
How it works:
There are no external components to the PIC other then a RC low pass and 2 diodes as video clamp.
Comparator 2 is used as sync detector, and then in software the V (vertical) impulse is detected by a timing loop. So only ONE interrupt is used, and the main routine is empty.
Once V is detected, picture lines are counted, and in each line about 100 points are sampled from comparator 1 output, comparator 1 has on the other input the internal PIC DAC that sets the slice level for deciding if there is a signal or not. After 255 lines some math is done and simple timing loops generate the 1 to 2 ms pulses for the servos. So 50 servo updates per second (one per frame). There is a MAX233, as about anything can be set and read from the serial port, and saved in EEPROM. When my laser diodes arrive .. should be mounted where the 3 screws stick out.
I have several version of this software, some with integral part, this one has pure mathematical method, looks how much of-center target is and then subtracts that from the current position, works in degrees of view in this demo video it is slightly under-compensated. The integral version is best tested in a real missile where the servos move the fins, you know big tin can with well you know what in it.
This is all just to keep a peaceful Christmas you know.