BlackFyre
Context
This project is meant to be an extension of my earlier project - sentinel vision platform. The name BlackFyre doesn't really have any meaning, but its what I chose by chance. I also wanted to treat this page as more of a blog. I will have the normal structured writeup, but also some updates as I get things working.
Background
BlackFyre is a vision-guided laser turret developed and deployed completely on an FPGA. It builds upon the sentinel vision platform by upgrading the logic and hardware.
Platform
- Control - Arty A7-100T: Artix-7 FPGA Development Board
- For this project, I chose a relatively mid level board with overall less IO than the original board. While this does reduce the number of external parts, it also shrinks the footprint to less than half the size. One of my issues with the original design was that it had to have a relatively large base to fit the massive FPGA board. I will also be using behavioral verilog now that I don't have anyone to tell me otherwise.
- Movement - ST3215-HS Servo Motor
- I upgraded the servos considerably to faster -360 degree 106 RPM max - servos with metal cores and precise magnetic encoders. This should help with tracking faster moving objects, as well as precisely moving to the intended locations.
- Visual - MT9V0XX – 0.36 MP Global Shutter Camera Module
- Admittedly I don't know the most about cameras, but I went with this one because it had decent resolution, went up to 60 fps, and has a global shutter that should help with clearer capture during movement. It would be interesting to have a view of what the turret sees on an external screen, rather than just letting it target.
- Laser - TBD - I still have the lasers from last project, but maybe I will try something different like some cool blue beams.
First Steps
Since I am really trying to do this from scratch, the first steps I took were setting up some basic communication with the servos. Using the docs on the communication protocool for these servos, I was able to identify the instruction packet formats for sending commands and decifering sent data. I was also able to find the instructions for utilities such as pinging the servo to find the current working status and resetting it.

There were even helpful examples to get me started, so from there, I created a packet module that would assemble the bytes into a frame, which was sent byte by byte to a UART module that would send the bits from each frame byte down the line and to the servo. I couldn't just send everything through raw at once because the clock for the fpga is 100 MHZ whereas the baud rate for the servo is 1 million baud.

If you are unfamiliar with UART (Universal Asynchronous Receiver-Transmitter), the asynchronous part means that there isn't a shared clock between the sender and receiver, so they have to agree on a rate that they will both stick to in order to communicate. If I sent the packet bits or even bytes at the native fpga speed, they would fly through and not be received properly. At 1 million baud, a bit has to be loaded for 1 microsecond to be properly sampled, if it is going at the 100x faster speed of our native clock, around 100 bits would fly past without being sampled and we would lose data.
At this point, I wanted to test out a sample packet and bound my switches to a few positional values. The servo supports 0 - 4095 positions 2^12 - 1 is the max that fits in 12 bits, so I set a zero, a half, and a full. I also noticed in the demo that it wouldn't rotate fully because the servo arm was interfering with the housing, but you get the point.