Link

How to setup the board using only a raspberry pi 4

Putting the board together

Need a few feet, two 2x20 headers, and a SMA.

Board in a bag

What do we need ?

Assembled !

Software side

Updating the raspberry tools

You may need to install new packages, especially to communicate with the fpga.

sudo apt-get update
sudo apt-get install i2c-tools libasound2-dev

From a general perspective, it may be worth trying to keep your tools up to date with:

sudo apt-get upgrade

Updating the python tools

On the raspberry pi, use pip to install the following modules:

pip3 install smbus2 RPi.GPIO PyAudio matplotlib numpy scipy spidev

Installing iceprog to flash the fpga

iceprog is the software used to put the fpga on the flash storage on the board, which will be read by the fpga on boot. The easiest way is to :

sudo apt install fpga-icestorm

If this doesn’t work, then this may work:

sudo apt-get install libftdi-dev git gcc 
git clone https://github.com/cliffordwolf/icestorm.git
cd iceprog
make 
sudo make install

This will create and install the iceprog utility, used to flash the fpga program (bitstream).

Prepare the jumper here :

Then, plug an usb cable from the RPi to the board (not connected using the raspberry pi header).

Check that the FTDI device is well created by typing:

dmesg

and then flash the FPGA by doing:

wget https://github.com/kelu124/un0rick/raw/master/bins/v1.1.bin
iceprog v1.1.bin

This should flash the board:

If you do not have a success here, you may want to have a look at how to connect FTDI devices to your computer (see for example: https://stackoverflow.com/questions/36633819/iceprog-cant-find-ice-ftdi-usb-device-linux-permission-issue ). Usually, one has no issues with RPi fresh out of the box.

Physical setup for the lib acquisitions

I’ve been using a RPi4 with a ribbon cable to connect to the board, leaving the jumper on, putting one to select the high voltage level, connecting a piezo.. and that’s it.

Running an acquisition

Testing the connection to the board

Then, for example to discover the board using Python, you can use the library:

git clone https://github.com/kelu124/pyUn0-lib.git
cd pyUn0-lib
python pyUn0.py test

It will download the lib, then you should see with the ‘test’ option a LED blink

Testing the connection to the board

The “single” option will allow you to capture a single line, then the “process” one will create the corresponding images.

python pyUn0.py single
python pyUn0.py process

Results

I’ve used this exact setup to get the lib examples ( https://github.com/kelu124/pyUn0-lib ).

Example of an acq :

with a clean spectrum: