Difference between revisions of "The Muntjac SDR"

From BATC Wiki
Jump to navigation Jump to search
 
(18 intermediate revisions by the same user not shown)
Line 15: Line 15:
 
Please put any comments, questions or problems on the BATC Muntjac forum: '''https://forum.batc.org.uk/viewforum.php?f=148'''
 
Please put any comments, questions or problems on the BATC Muntjac forum: '''https://forum.batc.org.uk/viewforum.php?f=148'''
  
 +
'''The latest version of the Muntjac firmware is 1v0p. Please check your version on the Portsdown INFO screen.'''
  
 
[[File:cqtvmj25-1a.jpg|400px]] [[File:cqtvmj25-2a.jpg|400px]]
 
[[File:cqtvmj25-1a.jpg|400px]] [[File:cqtvmj25-2a.jpg|400px]]
Line 220: Line 221:
  
  
===Programming the Microcontroller on the Muntjac===
+
===Programming the Muntjac Microcontroller===
  
 
Muntjacs are provided pre-programmed by the BATC Shop, but this is the procedure to load a firmware update if required.   
 
Muntjacs are provided pre-programmed by the BATC Shop, but this is the procedure to load a firmware update if required.   
  
1. Download the latest compiled firmware in this zip file onto the PC desktop and unzip it, to obtain the muntjac4_pico-1v0p.uf2 firmware file.
+
1. Download the latest compiled firmware in this zip file onto the PC desktop and unzip it: '''[[Media:muntjac4_pico-1v0p-uf2.zip|muntjac4_pico-1v0p-uf2.zip]]'''
 +
 
 +
The unzipping program may put the wanted file '''muntjac4_pico-1v0p.uf2''' into a folder called '''muntjac4_pico-1v0p-uf2''' on the desktop.
  
 
2. Hold down the BT button (the one nearer to the SMA sockets) on the Muntjac while connecting it to your PC using its USB port.  
 
2. Hold down the BT button (the one nearer to the SMA sockets) on the Muntjac while connecting it to your PC using its USB port.  
 +
<br>
 +
or
 +
<br>
 +
Plug the Muntjac into the PC and on the Muntjac hold down the BT button while pressing and releasing the RS button.
 +
 +
The main LED on the Muntjac will stay unlit when in firmware update mode.
  
 
3. The Muntjac should now appear as a new drive connected to the PC. Your drive letter may be different. The drive name will be RPI-RP2 and there will be 2 files in it: INDEX.HTM and INFO_UF2.TXT
 
3. The Muntjac should now appear as a new drive connected to the PC. Your drive letter may be different. The drive name will be RPI-RP2 and there will be 2 files in it: INDEX.HTM and INFO_UF2.TXT
Line 232: Line 241:
 
[[File:Muntjac-virtual-drive2.png|800px]]
 
[[File:Muntjac-virtual-drive2.png|800px]]
  
Drag the muntjac4_pico-1v**.uf2 file that you saved onto the desktop in step 1 above, to the RPI-RP2 drive. The transfer should take about 5 seconds.
+
Drag the '''muntjac4_pico-1v0p.uf2''' file that you unzipped in step 1 above (not the zip file itself, or the folder it was unzipped into), to the RPI-RP2 drive. The transfer should take about 5 seconds.
  
 
The RPI-RP2 drive will then disappear and the Muntjac will restart itself.
 
The RPI-RP2 drive will then disappear and the Muntjac will restart itself.
Line 263: Line 272:
  
 
[[File:MJputty1.png|400px]]
 
[[File:MJputty1.png|400px]]
 +
  
 
===Updating the Muntjac Firmware Using a Portsdown===
 
===Updating the Muntjac Firmware Using a Portsdown===

Latest revision as of 14:09, 6 May 2026

The Muntjac SDR was designed by Brian G4EWJ based on the same dual-band AT86RF215 RF chip as the commercially available CaribouLite SDR.

It is a transmit-only SDR for DVB-S2 DATV on 13cm (QO-100) and 70cm, which uses an RP2040 micro-controller, as used on the Raspberry Pi Pico, to provide a USB interface to the Portsdown 4.

When operating from the command line, the same transmission may be made on both bands simultaneously.

The 75 x 30mm board comes without SMA connectors, so that it can optionally be wired into a system, for maximum flexibility. Long thread SMA types are recommended.

The optional user-fitted ADE-30+ mixer is shown, which can be used for experiments on other bands. DATV is generated on the high band and mixed with the harmonic of a carrier on the low band. In theory, output on all bands from 1.8MHz to 3.4GHz is possible, but this is subject to further investigation.

The flash chip has a capacity of 16M bytes, the maximum value for the RP2040 microcontroller. This gives plenty of room for software expansion and perhaps storing of transport streams to use as a beacon.

Muntjac-4 was meant to be intermediate development version, but it is working well enough to make it available as part of an extended beta trial. Some configuration in Linux may be necessary, so if you don't consider yourself to be an 'early-adopter' it may be worth waiting until it has matured.

Please put any comments, questions or problems on the BATC Muntjac forum: https://forum.batc.org.uk/viewforum.php?f=148

The latest version of the Muntjac firmware is 1v0p. Please check your version on the Portsdown INFO screen.

Cqtvmj25-1a.jpg Cqtvmj25-2a.jpg

   

Specifications

The Muntjac SDR only operates with output frequencies in the following ranges: 390 - 510 MHz, 779- 1020 MHz and 2400 - 2483 MHz. Individual examples may operate slightly outside these frequency ranges, but not significantly. For our use, this means that the Muntjac can only be used directly on 70 cm and the QO-100 uplink. Clearly, with external transverters it could be used on any band.

When used with the Portsdown 4, the Muntjac will transmit DVB-S2 QPSK with symbol rates of 125, 250, 333.333, 500 and 1000 kS. It will also transmit DVB-S2 8PSK with symbol rates of 125, 250, 333.333 and 500 kS. DVB-S is not supported.

Transmit data is sent to the AT chip at 128M bits/s on an LVDS bus. This is 4M x 13bit IQ samples/s, with 4 times oversampling, which limits the symbol rate to 1000k symbols/s.

The output power setting parameter (gain) range of the AT86RF215 is 0-31, with each step being nominally 1dB and power zero being -15dBm.

When selecting power on the Portsdown screen, this parameter is restricted to a maximum of 20, as the shoulders on the output increase rapidly above this.

At power setting 20, shoulders on the output are at least 30dB down and are further down at lower output powers. Approximate output power is shown in the table below.

Muntjac Performance
Gain Setting 437 MHz O/P 437 MHz Shoulders 2409 MHz O/P 2409 MHz Shoulders
20 +5.6 dBm -34 dB +4.1 dBm -30 dB
19 +4.8 dBm +3.7 dBm
18 +4.0 dBm +2.8 dBm
17 +3.0 dBm +2.1 dBm
16 +2.1 dBm +1.2 dBm
15 +0.8 dBm -40 dB +0.5 dBm -40 dB
14 +0.1 dBm -0.5 dBm
13 -0.9 dBm -1.4 dBm
12 -1.9 dBm -2.5 dBm
11 -2.6 dBm -3.3 dBm
10 -3.6 dBm -50 dB -4.4 dBm -43 dB
9 -4.7 dBm -5.3 dBm
8 -5.7 dBm -6.3 dBm
7 -6.4 dBm -7.3 dBm
6 -7.4 dBm -8.3 dBm
5 -8.4 dBm < -50 dB -9.3 dBm < -45 dB
4 -9.4 dBm -10.3 dBm
3 -10.2 dBm -11.1 dBm
2 -11.2 dBm -12.1 dBm
1 -12.2 dBm -13.1 dBm
0 -13.2 dBm < -50 dB -14.1 dBm < -45 dB

The output power at 900 MHz is typically 3 dB less than that at 437 MHz.

Preparing for Use

The Muntjac is supplied as a kit with the final assembly step of soldering the output connectors to the PCB required for completion. The SMA connectors are not supplied. If the SDR is to be mounted in a box (it does fit a small die-cast box) right-angle SMAs with long shafts should be used to allow sufficient clearance between the SMA plug and the box. An suitable example connector is this: https://www.mouser.co.uk/ProductDetail/TE-Connectivity-Linx-Technologies/CONSMA002-L-G?qs=vLWxofP3U2xfxfFnu8BdmA%3D%3D

SMA Connector.png

Cheaper suitable connectors are available on eBay.

An example of the Muntjac mounted in a box (with short SMA Conectors) is shown here.

Muntjac boxed.jpg


Another Boxing Idea

As Muntjac-4 was meant to be an intermediate development version, not much thought was given to fitting it into a box.

The Hammond 1550P can be used by cutting slots into the top edges of the box and dropping in the Muntjac-4 board vertically.

The 1550P is about £6 in bare metal and about double that as the 1550PBK with a black finish.

Mj1550p.png


Using Muntjac with the Portsdown 4

The Muntjac connects to the Portsdown by USB. No other power supply is required. The Muntjac drivers are included in the latest Portsdown 4 software, so make sure that your Portsdown is up to date using Menu 3 and 'Check for Update'. If the Muntjac is connected to the Portsdown, disconnect it before updating.

The first time you use each Muntjac device, it needs to be registered so that the Raspberry Pi recognises it at the next reboot. After connecting a "new" Muntjac to your Portsdown 4, select "Output to" and then "Muntjac". If "Output to" is already set to "Muntjac", select "Output to" and then "Muntjac" again. A message will pop up saying "System will reboot now to register new Muntjac. Touch screen to continue". Touch the screen, and after the reboot, your Muntjac is ready for use. This procedure also copies any published calibration file (see below) to the correct folder for use

You will not need to repeat this process unless you connect a different Muntjac, or you use a different Portsdown.

Next, set the Muntjac gain with reference to the table above. Then connect the correct output to your transmit amplifier; the low band output is used for 437 MHz (and 900 MHz) and the high band output is used for 2400 MHz. The high band output is to the north of the "Muntjac-4" legend.

Within the limitations above, the Muntjac behaves similarly to a LimeSDR Mini.

LEDs

There is a main LED near the buttons and an LED near each SMA socket.

The main LED blinks 'HI' in morse (.... ..) at power up. This is for firmware version 1v0b. Later versions will blink 'MJ' and the last letter of the firmware version. After a few seconds for initialisation, the main LED will light steady.

The LED near each SMA socket is normally off and lights when that band (low or high) is in use.

The main LED is normally on and blinks off 1 / 2 / 3 times depending on whether low / high / both bands are active.

If the main LED blinks quickly and continuously, this indicates a Muntjac error and it is waiting for the USB data feed from the Portsdown to be stopped.

The main LED output is also available on the 12 pin J4 socket position, for mounting on a box. Pin 11 is ground and pin 12 is for the +ve end of an LED, through a suitable resistor.

Pin 1 of J4 is the square pad and odd numbered pins are along the edge of the board.

First Transmission

If you're not familiar with the Portsdown, set the lines starting 'Modulation', 'Freq' and 'EasyCap' as shown and enter your callsign via 'Menu 3' and 'Set Call, Loc & PIDs'.

Pdmainscreen1.png

Press 'TX' and after a second or two, the Muntjac main LED near the buttons will start double blinking off and the LED near the high band SMA will light steady.

Monitoring Muntjac Driver Operation

The Muntjac driver (muntjacsdr_dvb) on the Portsdown outputs a log to a UDP network port. To see this, log into the Portsdown with ssh and type:

nc -kluv 9979

The status is updated every second and should look something like this:

======================================
muntjacsdr_dvb-1v0m                      Portsdown driver version.
muntjac4_pico-1v0p                       Muntjac firmware version.
In:  videots                             The driver transport stream input device.
Out: /dev/ttyMJ0                         The Muntjac device name.
-------------------
FR:2486.500 PWR:3  S:333 FEC:2/3 C:4     Main frequency and parameters.
FR:780.000  PWR:26 Carrier               This line appears when mixing.
FT:146.500                               The target frequency.
--------------------------------------   
Packets  Frames   Panic  Nulls      MJ   Panic frames are inserted to prevent
     In     Out  Frames  SR333  Errors   the Muntjac from running out of data.
--------------------------------------   Nulls SR333 are inserted to maintain 
   4753     176      11      4       0   an output of 333333kS from an input of 
======================================   333000.

MJ0: [Muntjac4-1v0p:E46164855B404B30 (BUFFER_LOW:2046)]

You may occasionally see a BUFFER_LOW message from the Muntjac. Some of the input modes are not completely constant bit rate in the short term, especially the testcard and contest numbers. A panic frame containing a few null packets is sent to the Muntjac to stop the receiver from losing lock.

Lack of Calibration Spikes

The AT86RF215 chip does a self calibration before transmitting, but it does this with its final amplifier turned off, so it is not necessary to isolate the output for a number of seconds as with the Pluto and Lime. This is the observation so far, but it's early days for the project, so verify this for yourself.

IQ Calibration

Poor IQ balance in an SDR can cause a carrier (the local oscillator) to be transmitted at the centre frequency of a DATV transmission. This causes a reduction in received MER. The reduction is most noticeable at high MER, but it will not affect reception, because the MER is already high. It seems to have less effect when the MER is comparatively low, as on QO-100. It just looks wrong to see a spike in the middle of your signal.

The AT86RF215 chip does an IQ balance as part of its self calibration before transmitting, but it doesn't always do the best job. Fortunately there are registers in the chip which can be adjusted to improve the local oscillator suppression. The required register values vary with the power setting, although not very much within each group of four power settings, so calibration values are only required for power settings 0, 4, 8, 12, 16, 20, 24, 28.

Some Muntjacs may have been calibrated before sale. The calibration files for these are included in the latest Portsdown software, and the correct file is loaded when the Muntjac is registered using the procedure above. However, some may not have been factory calibrated (although they will have been tested). They will function perfectly well for DATV without this file. A tool is under development to enable the Muntjac calibration file to be generated by the user.

The Muntjac calibration file has a file name of the format E46214B063533828.mjo where the E number is the serial number of the flash memory chip on the Muntjac. A file of the correct format with the correct name in the /home/pi/rpidatv/bin/ folder is automatically read by the Muntjac driver and the settings applied. The library of files is in the folder /home/pi/rpidatv/src/muntjac. If you would like your calibration file added to this library, please e-mail it to G8GKQ. An example file can be found at https://github.com/davecrump/portsdown4/blob/master/src/muntjac/E46214B063533828.mjo.

Output Filtering

The low band output must be bandpass filtered.

The high band output uses a combined bandpass and notch filter balun, specially designed for the AT86RF215, so additional filtering should not be necessary.

If the low band output is also active, additional filtering on the high band output may be required, to address any feedthrough from the low band output and its harmonics.

https://www.johansontechnology.com/docs/796/2450FB15A050_VdAqien.pdf

Frequency Accuracy

The AT86RF215 uses an externally connected 26MHz TXCO on the pcb, with a temperature stability of 0.5ppm and initial accuracy of +/- 2ppm. The 2.4GHz output should be within a few kHz of nominal.

https://aker-usa.com/spec/TX21.pdf

Shoulders at Various Power Settings

The plots below show the effect of the power setting on the level of the shoulders at SR333. Shoulders are generally lower on 437MHz for the same power setting.

Snap80a.jpg Snap76b.jpg

Snap75c.jpg Snap77d.jpg

The rising levels at the edges of the plots are an artefact of the Pluto band viewer, as shown by the PWR8 plot in a 10MHz bandwidth.

Snap78e.jpg


Programming the Muntjac Microcontroller

Muntjacs are provided pre-programmed by the BATC Shop, but this is the procedure to load a firmware update if required.

1. Download the latest compiled firmware in this zip file onto the PC desktop and unzip it: muntjac4_pico-1v0p-uf2.zip

The unzipping program may put the wanted file muntjac4_pico-1v0p.uf2 into a folder called muntjac4_pico-1v0p-uf2 on the desktop.

2. Hold down the BT button (the one nearer to the SMA sockets) on the Muntjac while connecting it to your PC using its USB port.
or
Plug the Muntjac into the PC and on the Muntjac hold down the BT button while pressing and releasing the RS button.

The main LED on the Muntjac will stay unlit when in firmware update mode.

3. The Muntjac should now appear as a new drive connected to the PC. Your drive letter may be different. The drive name will be RPI-RP2 and there will be 2 files in it: INDEX.HTM and INFO_UF2.TXT

Muntjac-virtual-drive2.png

Drag the muntjac4_pico-1v0p.uf2 file that you unzipped in step 1 above (not the zip file itself, or the folder it was unzipped into), to the RPI-RP2 drive. The transfer should take about 5 seconds.

The RPI-RP2 drive will then disappear and the Muntjac will restart itself.

The PC may bing-bong, as the Muntjac has now turned back into a COM port, but this can be ignored.

On the Muntjac, the main LED near the buttons will blink 'MJ' plus the last letter of the new firmware version. The LED will go out for a few seconds while the Muntjac is initialising and then light steady.

4. Disconnect the Muntjac from the PC and connect it to the Portsdown. Wait until the main LED on the Muntjac is lit and steady.

Make sure that "Output to" on the Portsdown main menu is set to "Muntjac". If this is the first time that this Muntjac has been connected to this Portsdown, while the Muntjac is connected to the Portsdown, change "Output to" to something other than "Muntjac" and then back to "Muntjac". The Portsdown will recognise a new Muntjac and the Portsdown will reboot itself as part of the Muntjac registration process.

When the Portsdown has rebooted and the main LED on the Muntjac is lit and steady, on the Portsdown select "M2" and "Info" and the Muntjac firmware version and serial number will be displayed as shown below.

Portsdown-info-screen2.png

Alternative Method of Putting the Microcontroller into Firmware Update Mode

This may be useful if you've built the Muntjac into a box and cannot easily get to its buttons.

1. Plug the Muntjac into a PC and it will appear as a COM port. Note that this may not work through a USB3 hub.

2. Find the COM port number in device manager and open a serial terminal session to that COM port at 1200 baud, with a terminal program such as putty.

3. The COM port will instantly disappear and the Muntjac will then appear as a USB drive.

4. Proceed with step 3 in the section above.

Note that this depends on the firmware already in the Muntjac being configured to do this by the SDK (software development kit). This approach would not work on a blank Raspberry Pi Pico board, which uses the same RP2040 microcontroller as the Muntjac.

MJputty1.png


Updating the Muntjac Firmware Using a Portsdown

If the Muntjac is built into a Portsdown system, it may not be possible to access its USB socket. A procedure is being developed to help with this.

Mixing Options

As both high and low band outputs may be active at the same time, this gives some options for using a mixer to transvert to other bands.

The same DATV transmission can be made simultaneously on both bands (but NOT from a Portsdown menu), but either band can output a carrier instead and the third harmonic of the low band output can be used to mix the high band output to various frequencies.

These notes are to guide experimentation. Some of the high band frequencies are outside the published specification of the AT86RF215 chip (2400-2483.5MHz). The output must be monitored for quality, stability and frequency accuracy.

Any mixer output MUST be bandpass filtered for the required output frequency. This is particularly important for 23cm, where on 1270MHz for example, the required third harmonic of the low band carrier may be only 58MHz away from the target frequency.

The low band carrier power is set at 26, which is nominally +11dBm. If a passive mixer is used, a Level7 (7dBm local oscillator) mixer is recommended. A suitable mixer is a MiniCircuits ADE-30+ (NOT the ADE-30W+, although that may be more suitable depending on your requirements). Mixers in the ADE series can look the same, but have different footprints, so do check carefully that any other mixer is compartible with the pcb. https://www.minicircuits.com/pdfs/ADE-30+.pdf

The high and low band outputs are connected to the RF and LO ports of the mixer, which are specced at 200-3000MHz and the output is taken from the IF port, which is specced at 0-1000MHz. The output is likely to be in the range of the tens of microwatts. The 23cm band is outside the IF range, but still produces a usable output.

The following frequency ranges are built into the Muntjac driver in the Portsdown. Putting the target frequency into Portsdown will automatically select the correct high and low band frequencies for mixing.

Mixing Options
Target Low Harmonic High
3400-3410 1010 - 2390-2400
1300-1305 395 1185 2395-2400
1270-1280 404 1212 2482-2492
1244-1250 390 1170 2414-2420
144-147 780 2340 2484-2487
70.5-71.5 805 2415 2485.5-2486.5
50-54 812 2436 2486-2490
28-30 819 2457 2483-2485

Fitting and Using the Onboard Mixer

Details will appear here.

Using the Third Harmonic of the Low Band for DATV on 23cm

The third harmonic of 418.333 MHz can be used to transmit on 1255 MHz. The third harmonic is about 20 dB down on the fundamental, so good filtering is required. More details will appear here.

Third Harmonic.jpg

The fundamental at 418.3 MHz on the left with the 3rd harmonic on 1255 MHz on the right

Command Line Operation

This gives full control over frequency and power on both high and low band simultaneously and enables Portsdown band viewer to be run at the same time.

Details will appear here.

Muntjac Schematic

Downloadable PDF files will be available shortly.

Image 2026-04-28 12-58-03.png


Muntjac Input/Output Connectors

The 40 pin J101 position will enable the Muntjac to connect directly to a Raspberry Pi. This will provide power and also an SPI connection instead of USB, allowing higher data rates for future development. It is recommended that no connector is fitted here until the required orientation and gender is known.

The 8 pin J3 position can be used for general I/O or to allow future developments to connect a WIZnet Ethernet module for applications that do not require a Raspberry Pi.

The 12 pin J4 position is for general I/O.

3.3v power is available on J3 and J4. The available current is yet to be determined, but likely to be around 100mA.

All Muntjac I/O pins on J3 and J4 are connected directly to the RP2040 microcontroller, so caution should be exercised regarding static and voltage levels. 3.3v is the nominal voltage level.

There are no pins on J3 or J4 that connect to J101.

Problems

The Muntjac may not be seen as a USB COM port when connected to a USB3 hub. The USB3 sockets on the RPi4 are not a problem. However, it will appear as a virtual USB drive for firmware update when connected to a USB3 hub, which is odd.