View Single Post
Old 03-14-21, 10:10 PM   #26
NiHaoMike
Supreme EcoRenovator
 
NiHaoMike's Avatar
 
Join Date: Oct 2008
Location: Austin, TX
Posts: 1,154
Thanks: 14
Thanked 257 Times in 241 Posts
Default

Pretty big Pi Day update. I connected a pair of AK5558 ADCs to the FPGA and managed to program the FPGA to work with them. I then used a Raspberry Pi to send the data stream over Ethernet to my PC so I can use baudline to analyze it.

There was a lot of work leading up to it. The AK5558 ADCs are very high performance ADCs, able to digitize 8 channels at 768kHz and 32 bit. As such, there's very high requirements on the analog design to allow the ADCs to meet their specifications. Two things that took a lot of research were a low noise power supply and a very low jitter crystal oscillator.

768kHz is not fast enough to directly digitize the PLC signal which is on the order of 1.2MHz. For that, I would use a Quadrature Sampling (Tayloe) mixer to downconvert the signal. There will be two of those implemented in order to allow implementation of coherent diversity MIMO, the PLC version of wireless beamforming. Basically, there are two analog front ends picking the signals from the two hot lines. Noise tends to affect each line differently, so with some DSP trickery, the noise can be largely nulled out making the system more robust. The high dynamic range of the ADCs and mixer also greatly improves robustness against impulse noise.

The FPGA programming turned out to be the most difficult part by far. I started with implementing an internal data bus to allow the Pi to change and read back registers implemented in the FPGA. The Pi side of the interface is clocked by the Pi while the internal side of the interface is on its own clock domain that's tied to the ADC clock. I got to deal with the issues of clock domain crossing right at the start since it would be a lot easier to solve it in one place rather than have to deal with it throughout my design. The MASIE (Mixed Architecture System Integration Extended) bus specifies that the CPU (Pi in this case) acts as the master for the I2C, SPI, JTAG, and eUSB/HSIC interfaces, but the PCM interface can be clocked by whichever side that makes more sense for the design. Thus, the PCM interface in my design is tied to the ADC clock so no clock domain crossing needed in this case. (Which is good because retiming PCM data is really complex...)

While doing all that, I now understand just how smart my friend Tiffany Yep really is. I knew that she was smart but only now do I truly understand how complex the stuff she does is. So far, I'm only aware of one other model - Xyla Foxlin - to have participated in a beauty pageant and have such advanced technical skills. (I know quite a few other models who are engineers, but it's one thing to look good enough for stuff like appearing on TV or at live events, quite another to compete with other models.)

And for the Pi Day bit, I used a 3.14kHz sine wave test signal, one phase shifted so that it's about 90 degrees out of phase with the first. (A sine wave is in fact a 2D projection of Euler's Formula.) The sample rate reported by the Pi is not correct due to a quirk of how it handles the MASIE PCM data.
Attached Images
 
__________________
To my surprise, shortly after Naomi Wu gave me a bit of fame for making good use of solar power, Allie Moore got really jealous of her...
NiHaoMike is offline   Reply With Quote