Raspberry Pi, DigiThin and Si570 Configuration Procedure

The place for discussion about the RPi add-on RB-TV modulator card developed by G4EWJ and supported by the BATC Shop
G8GKQ
Site Admin
Posts: 2794
Joined: Sun Mar 22, 2009 1:21 pm

Raspberry Pi, DigiThin and Si570 Configuration Procedure

Post by G8GKQ » Wed Nov 04, 2015 3:09 pm

Here is the latest (4 Nov 15) install procedure for DigiThin with an Si570 LO on a Raspberry Pi:

1. Download RpiDATV1.2.1.img.zip from http://f5oeo.fr/RpiDATV1.2.1.img.zip and unzip it on a PC. You should get a single file RpiDATV1.2.1.img.

2. Use win32diskimager from http://sourceforge.net/projects/win32diskimager/ to put the image on your SD Card. Be careful not to wipe your hard drive instead!

3. Download "DigiThin Si570 Instructions v1-01 Software v1-00 Schematic A1-v2.zip from http://www.batc.org.uk/forum/viewtopic.php?f=97&t=4375 and unzip the files into a folder (si570) on a USB stick.

4. Insert the SD Card in your RPi, which will need to be connected to an HDMI monitor and a keyboard. Do not connect a mouse, but put the USB stick in the spare USB port. Connect a wired internet connection (with dhcp enabled) to the network port.

5. Power on the RPi. After boot-up F5OEO's software should load. Highlight "English" and press enter. The RPi will reboot (and come up with a French Menu!).

6. To configure F5OEO's encoding software, press enter at the first screen to get the main menu, and then go through each menu item (using the space bar to make the selections) setting the source as the RPi Camera (H264), the symbol rate as 333, the FEC as 7/8, the output as DigiThin and your own callsign. After entering the last selection, you should see the led on the DigiThin board flashing with a 1:1 on-off ratio, indicating that it is functioning correctly.

7. If you want to start up an Si570 LO at boot time, do the following:

- Press escape and then enter to get to the command line.

- Change directory to the directory on your USB stick where the Si570 files are:
"cd /media/usb/si570" Use "ls -l" to look and check that you are in the right place.

- Copy the files into your home directory:
"cp * /home/pi/"

- Check that they are there:
"cd /home/pi"
"ls -l"

- Rename the si570v100 file to si570:
"mv si570v100 si570"

- Make the si570 file executable:
"chmod +x si570"

- Load the i2c functionality to the pi:
"sudo apt-get install python-smbus"
"sudo apt-get install i2c-tools"
"sudo raspi-config", then go to advanced options, i2c, and enable i2c, then get it to load at boot. Accept the option to reboot.

- Modify some config files as superuser using the nano text editor:

"sudo nano /etc/modules"
Use the arrow keys to go down and add the lines:
i2c-bcm2708
i2c-dev
Save and Exit by pressing Ctrl-X, Y, Enter (Note: code corrected on 30 Nov 2016)

"sudo nano /etc/modprobe.d/raspi-blacklist.conf"
add the line:
blacklist spi-bcm2708
Save and Exit by pressing Ctrl-X, Y, Enter

"sudo nano /boot/config.txt"
add the lines:
dtparam=i2c1=on
dtparam=i2c_arm=on
Save and Exit by pressing Ctrl-X, Y, Enter

- Reboot to let the changes take effect:
"sudo reboot"

- After the reboot, exit from F5OEO's software by pressing escape 3 times to get to the command line. If you have an si570 connected, you can check that it is seen by the RPi:
"sudo i2cdetect -y 1"
This should show a device connected to address 55.

- You can read the comprehensive help on the si570 utility by typing:
"sudo ./si570 -h", and run the utility by typing "sudo ./si570 -f 146.5"

- You can set the frequency automatically on boot by:
"sudo nano /etc/rc.local"
and adding the following line just before the exit 0 statement:
sudo /home/pi/si570 -f 146.5
Save and Exit by pressing Ctrl-X, Y, Enter

- After reboot, DigiThin should start with the VCO set to your desired frequency.

8. You can change the Video PID to the standard value of 256 by editing the rpidatvconfig.txt file:
Press escape 3 times to get to the command line
"cd RpiDATV"
"sudo nano rpidatvconfig.txt"
and edit the pidvideo line to read:
pidvideo=256
Save and Exit by pressing Ctrl-X, Y, Enter
sudo reboot

9. Notes:

- You can also get to the Command line while RpiDATV is running by pressing ctrl-alt-F2. Use ctrl-alt-F1 to get back to the RpiDATV menu.

- Boot up without the HDMI display connected for normal operation of the RpiDATV software. Having the display connected can cause timing problems. The network connection is not required for normal operation either.

- Some users have reported SD Card corruptions when simply disconnecting the power to turn off the RPi/Digithin combination. Even without a display connected, you can neatly shutdown your RPi with RpiDATV running from the keyboard by pressing escape 3 times, sudo halt, enter.

- The older Maplin 5V 2.1A plug-in power supplies will not run the RPi, Camera DigiThin and Si570 - they droop to about 4V. Use a better power supply.

- Neither ftp nor Remote Desktop are running on this version of Raspbian. SSH is running, so that you can log-in over the network (if connected) from a Windows PC (use the application Putty http://www.chiark.greenend.org.uk/~sgta ... nload.html). Type ifconfig at the command line to display your RPi's IP address. Login with the username "pi" and the password "tv".

Thanks to Evariste F5OEO and Brian G4EWJ for their software and hardware designs, and to especially to Brian for his help with these instructions.

Please pass any suggested amendments to me and I will edit this post.

Dave
G8GKQ

Additional notes added at 2245 on 4 Nov.

g0mjw
Posts: 2311
Joined: Sat Sep 20, 2014 9:15 am

Re: Raspberry Pi, DigiThin and Si570 Configuration Procedure

Post by g0mjw » Sun Dec 06, 2015 3:29 pm

Good job, however It does not quite work on my early PI and even earlier 280MHz LVDS si570.

The commend sudo ./si570 -h returns an error.

sudo ./si570 (within the -h) enters interactive mode. Subsequent calls work as expected but it seems it has to run interactively before it can run from command line. I am not able to set the frequency either. e.g. sudo ./si570 -f 146.5 returns an error, unless I have first made it run interactively or stored an si570.txt file using the -p paramter.

sudo ./si570 -p 56.32

I.e. this is not stored by default. Also the txt file is not found at startup using the rc.d, presumably because its not visible to the deamon or the permissions are incorrect.

Finally, my si570 was an LVDS version, very old. Output is intended to be 100 ohms differential and via a transformer pins 4 and 5. The PCB is not designed for this so I used a 47 ohm in series and no load resistor to get sufficient drive.

Mike

G4EWJ
Posts: 1340
Joined: Wed Feb 17, 2010 10:11 am

Re: Raspberry Pi, DigiThin and Si570 Configuration Procedure

Post by G4EWJ » Sun Dec 06, 2015 5:44 pm

What error did you get with sudo ./si570 -h ?

Did you actually get the help printout when there was an error?

Brian

g0mjw
Posts: 2311
Joined: Sat Sep 20, 2014 9:15 am

Re: Raspberry Pi, DigiThin and Si570 Configuration Procedure

Post by g0mjw » Sun Dec 06, 2015 6:07 pm

Hi Brian,

No help message, just the error asking me to sudo ./si570 - h for help.

Mike

G4EWJ
Posts: 1340
Joined: Wed Feb 17, 2010 10:11 am

Re: Raspberry Pi, DigiThin and Si570 Configuration Procedure

Post by G4EWJ » Sun Dec 06, 2015 8:11 pm

Strange. It doesn't look for the si570.txt file until it has parsed the command line and displayed the help if required.

Is it any different if you do:

sudo ./si570 --help

or

sudo su
./si570 -h

Brian

G8GKQ
Site Admin
Posts: 2794
Joined: Sun Mar 22, 2009 1:21 pm

Re: Raspberry Pi, DigiThin and Si570 Configuration Procedure

Post by G8GKQ » Mon Dec 07, 2015 11:24 pm

Mike

What's the full part number of your Si570? If it's the 7 ppm version it could use different registers from the CMOS version that Brian's code was written for.

Dave
G8GKQ

MN-tech
Posts: 59
Joined: Thu Aug 30, 2012 6:01 pm

Re: Raspberry Pi, DigiThin and Si570 Configuration Procedure

Post by MN-tech » Tue Dec 08, 2015 7:15 pm


g0mjw
Posts: 2311
Joined: Sat Sep 20, 2014 9:15 am

Re: Raspberry Pi, DigiThin and Si570 Configuration Procedure

Post by g0mjw » Tue Dec 08, 2015 11:08 pm

Its a very old one, probably around 2007. The code is BBC000141G, which does not apparently exist though it does decode to 3.3V LVDS 100ppm, 10-280MHz. Closest I can find is Si570BBC000141DG but mine doesn't have the DG, just a G. It was taken from an SDR-Kits USB SI570 board from around 2007 that is no longer supported in windows.

As long as that si570.txt file is there it works. Still not managed to start up automatically though.

Mike

g0mjw
Posts: 2311
Joined: Sat Sep 20, 2014 9:15 am

Re: Raspberry Pi, DigiThin and Si570 Configuration Procedure

Post by g0mjw » Fri Dec 11, 2015 5:05 pm

Here is what I ended up with - IQ and DC imbalance is obvious and there is some spreading, the levels might not be quite right but its not that bad really. The analyzer is connected through attenuators and the actual output about -10dBm. While nowhere near as clean as a DATV-Express, I still can't really believe a £20 Raspberry Pi can generate a digital television signals. I'm looking forward to improved implementations.

Mike
Attachments
Digithin 146.5MHz Spectrum.jpg
Digithin 146.5MHz Spectrum.jpg (481.08 KiB) Viewed 19746 times

G4EWJ
Posts: 1340
Joined: Wed Feb 17, 2010 10:11 am

Re: Raspberry Pi, DigiThin and Si570 Configuration Procedure

Post by G4EWJ » Sun Dec 13, 2015 8:33 pm

It seems to start spreading very early. These look better, although it's on 437MHz and I can't be sure that the old analyser is calibrated correctly.

The spikes at +/- 333kHz are related to the IQ inputs,which change at that rate. Do you have a ground strap connected to the RJ45 housing?

Brian
437MHz,200kHz-10dB-div,0dBm.jpg
437MHz,200kHz-10dB-div,0dBm.jpg (473.37 KiB) Viewed 19516 times
437MHz,200kHz-10dB-div,0dBm-2.jpg
437MHz,200kHz-10dB-div,0dBm-2.jpg (387.41 KiB) Viewed 19514 times

Post Reply

Return to “DigiThin”