Rpi4 and PS/piHPSDR

159 views
Skip to first unread message

Tokio

unread,
Dec 10, 2020, 4:44:12 PM12/10/20
to Radioberry
Johan,

I'm now preparing Puresignal with a 100 W amplifier including a sampler.
I installed PS in piHPSDR by your ./pihpsdr_install.sh with uncommenting PURESIGNAL.

When I toggled "PS Enable" in receiving mode, the receiving sound is distorted, the spectrum on panadapter high and strange, in addition I have SEQ ERROR. Please look at the attached picture.

Here Puresignal/piHPSDR works fine with Rpi3.

FYI, PowerSDR with PS-A button ON, the receiving sound of Rpi4 is OK.

It would be a great help if you give me some advice for the correct setting or look into the codes to remedy this anomaly.

73,
Tokio
ja1cca

PS distortion1.PNG
pS distortion2.PNG

Radioberry

unread,
Dec 11, 2020, 3:21:49 AM12/11/20
to Radioberry
Hello Tokio,

I did not test.... just some thoughts and background to give a reaction and some direction hopefully.

Yes... the good old days with RPI-3! I was not aware it was used, nice!

In the RPI-3 radioberry implementation i did a special trick for pure signal. The radioberry gateware contained 2 receivers.
When in puresignal mode i did a copy of the IQ signals.

                                rx_reader(iqdata);
int j =0;
                               for (j; j< 6; j++){
hpsdrdata[index + j] = iqdata[j]; //rx1
if (nrx == 4) hpsdrdata[index + j + 12] =  iqdata[j]; //rx3 (PS-RX-FEEDBACK; actual tx signal)
}
if (nrx > 1) {
rx2_reader(iqdata);
int j =0;
for (j; j< 6; j++){
hpsdrdata[index + j + 6] =  iqdata[j]; //rx2
if (nrx == 4) hpsdrdata[index + j + 18] =  iqdata[j]; //rx4 (PS-TX-FEEDBACK; DAC values used for tx)
}  
}
(nrx==4 implied to run with puresignal)


For RPI-4 we are having 4 real receivers.... coming with double data rate compared what was done for rPI-3

I think you are over the limits with the current implemantation of 4 receivers. and running pihpsdr on one rpi.

2 questions:

- can you reduce the sample rate and give it a try?
- using top to get an idea about the CPU utilization?


Some further background:


This all can be further improved. How can this be done:

For TX the data rate is 48KHz; this can be handled by the SPI port; making an additonal 4 bits available; this will double the speed!


Please let me know how it works... do you also have a picture of your setup?


73 Johan

PA3GSB



Op donderdag 10 december 2020 om 22:44:12 UTC+1 schreef Tokio:

Tokio Endo

unread,
Dec 12, 2020, 7:20:20 AM12/12/20
to Radioberry
Johan,

Thank you very much for your explanation including the Radioberry-performance wiki which explains the data transfer mechanism between Rpi4 and Radioberry via J8 GPIO Expansion.

On reading your message, I changed the sample rate from 192Kbps to 96KHz or 48KHz, then the distortion disappears even PS enabled.

CPU utilization of Radioberry task increases when PS enabled at 96Kbps in receiving. This is the same for 192Kbps as shown in attached pictures.

I confirmed that Rpi3(Radioberry) with PS/piHPSDR works in the sample rate 48Kbps/96Kbps.

Therefore PS in piHPSDR with Radioberry works only at 48Kbps and 96Kbps.

As to the number of DDC, my understanding has been that regardless of the sample rate, the number of DDC would remain unchanged. But the maximum bandwidth between Radioberry and Rpi4 through GPIO by “bit-banging” method seems to be limited. So there is a limitation of sample rates. Is this correct?

Anyway I would like to proceed to a test for PS/piHPSDR with Radioberry + Rpi4 at the sample rate 46/96Kbps.

73,
Tokio
ja1cca



2020/12/11 17:21、Radioberry <radio...@googlegroups.com>のメール:

-- 
You received this message because you are subscribed to the Google Groups "Radioberry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to radioberry+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/radioberry/91babe70-c682-451d-b355-3a19e48232bfn%40googlegroups.com.

Radioberry

unread,
Dec 13, 2020, 9:12:13 AM12/13/20
to Radioberry
Tokio

Thanks for your measurements.

The radioberry gateware contains 4 DDC (channels/receivers)  The SDR program actual tells how much of the DDC are active and will actual stream data from FPGA via GPIO ports to the firmware.

This is also visible in the log of the firmware.

sudo systemctl stop radioberry

in terminal window : sudo radioberry

Start pihpsdr ; select 1 or 2 rx receivers .... and the radioberry log  (terminal window) is telling you the number.


Hope this answers your question.

73 Johan
PA3GSB

 

Op zaterdag 12 december 2020 om 13:20:20 UTC+1 schreef Tokio:

Tokio

unread,
Dec 13, 2020, 8:04:36 PM12/13/20
to Radioberry
Johan,

Thank you for your advice to get the logs of radioberry.

It is good to identify how many DDCs are used actually.

I tried the commands you let me know. After type "sudo radioberry", I can see Receivers= 00000004( 4).
However, changing Receivers 1/2 in piHPSDR doesn't reflect logs. Only "Start Port 59871" is shown.

Maybe I misunderstood your advice.
Please look at the attached pictures.

73,
Tokio
ja1cca

2020年12月13日日曜日 23:12:13 UTC+9 Radioberry:
radioberry_log.PNG
radioberry rx4.PNG
piHPSDR rx setup.PNG

Radioberry

unread,
Dec 14, 2020, 3:02:32 AM12/14/20
to Radioberry

Tokio

If you have PS enabled there are always 4 receivers.

Switch it of and than you will get the 1 and 2 receivers.

The firmware is reporting the actual number of receivers!

73 Johan
PA3GSB
Op maandag 14 december 2020 om 02:04:36 UTC+1 schreef Tokio:

Tokio

unread,
Dec 15, 2020, 1:23:01 AM12/15/20
to Radioberry
Johan,

Thank you very much for your message.
I attached Radioberry logs as to "Receivers= 00000001 (         1)" and so forth.

When PS Enabled, I get "Receivers= 00000004 (         4)" regardless of sample rate 48Kbps/96Kbps/192Kbps.
When PS Disabled, I have "Receivers=00000001 (         1)" or "Receivers=00000002 (         2)" according to Receivers 1 or 2. This is also independent of Sample Rate.
That means when PS enabled, RX4 is used for off-air feedback in Radioberry.

Therefore, the logs are identical regardless of the sample rate. However when PS and sample rate 192Kbps selected, I have a distorted receiving sound.
Could you elaborate on why the combination of PS and 192Kbps is not possible?

FYI, Puresignal works fine with Rpi4 and piHPSDR installed in this Rpi4. The sample rates are 48Kbps/96Kbps. Please look at the pictures. 20 dB improvement of IMD is identified.

73,
Tokio
ja1cca

2020年12月14日月曜日 17:02:32 UTC+9 Radioberry:
No_DPD.png
DPD.png
radioberry_log4.PNG

Radioberry

unread,
Dec 15, 2020, 4:06:18 AM12/15/20
to Radioberry

Tokio

Seems to work fine. Thanks for sharing!

DDC-FLOW.jpg


The sample rate is the same for all the DDC's. 

You can see that the data path between the FIFO running in the gateware (FPGA) and Raspberry pi (via the GPIO) is limited; when going to 192K the stream for 4 DDC's is too large!

Hope this picture will help to understand the process and it limitation.

73 Johan
PA3GSB


Op dinsdag 15 december 2020 om 07:23:01 UTC+1 schreef Tokio:

Tokio Endo

unread,
Dec 16, 2020, 12:33:26 AM12/16/20
to Radioberry
Johan,

Thank you very much for the FIFO data flow scheme. That is quite understandable.
Based on your explanation, I made a calculation of bit streams by the number of RX between Radioberry and firmware via GPIO.

When only one RX is used ( = PS disabled ), the receiving in 384Kbps sample rate is quite OK here. Then 2.304Mbps is acceptable. 
But, as you showed me the number of RX is four( = PS Enabled ), this 2.304Mbps is reached in 96Kbps sample rate.
Therefore When PS Enabled, 96Kbps is a maximum sample rate.

I don’t know 2.304Mbps is the maximum data flow using FIFO and DDR between FPGA and GPIO.

Even so, how about using two DDCs when PS Enabled? Sample rate 192Kbps is possible with two DDCs.
However I’m not sure that two DDC  would be enough to make use of PureSignal.

73,
Tokio
ja1cca


2020/12/15 18:06、Radioberry <radio...@googlegroups.com>のメール:


Tokio

Seems to work fine. Thanks for sharing!

You received this message because you are subscribed to a topic in the Google Groups "Radioberry" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/radioberry/oxOmofqrsbI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to radioberry+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/radioberry/9c1b6ec8-b0a0-46f5-93e0-7eedf2e85f03n%40googlegroups.com.
<DDC-FLOW.jpg>

Radioberry

unread,
Dec 16, 2020, 2:34:50 PM12/16/20
to Radioberry
Tokio

What is the reason you want 192K for pure signal?  

Your experiments using 48K and 96K where showing some big improvements in the signal integrity of the radioberry including an amp.


For PS you need 2 DDC; one for the RX feedback and one for the TX feedback.  

One possible solution :

change the type of radio in the firmware ; (using 2 DDC for PS)

Change in the radioberry.c firmware the value 0x06 into 0x0 :
#define HERMESLITE  0x06  =>  #define HERMESLITE  0x00


73 Johan
PA3GSB







Op woensdag 16 december 2020 om 06:33:26 UTC+1 schreef Tokio:

Tokio

unread,
Dec 17, 2020, 4:25:57 AM12/17/20
to Radioberry
Johan,

Thank you very much for your advice and a solution.
I've not looked at the codes so far. But this would be a good occasion to look into radioberry.c.

Up to 96Kbps, Radioberry and Rpi4 with piHPSDR works fine including Puresignal.
My intention to expand the bandscope is because that I enjoy SSB most of the time. Therefore I need 196Kbps wide bandscope to grasp the band condition, e.g., 40 m and 80 m bands.

73,
Tokio
ja1cca

2020年12月17日木曜日 4:34:50 UTC+9 Radioberry:

Radioberry

unread,
Dec 18, 2020, 3:57:21 AM12/18/20
to Radioberry
Tokio and group, 

The target for RB was a 'simple' radio... about learning and making a ham radio.

For using higher sample rates there are some improvements to make... but the CPU usage is going up... running other programs on the same RPI are becoming a problem...

The question is now should we go for a radioberry PRO for users like you?

Such a pro version could be adding an ethernet module like i have already done some time ago:


Or is it better to go to the HL-2 ?

Maybe also good to know the opinion of others in the group?

At the moment iam focussing on a preamp with the same form factor as the RB based on the HL-2 design to finish mine home station.


Please let me know your opinion?

73 Johan
PA3GSB


Op donderdag 17 december 2020 om 10:25:57 UTC+1 schreef Tokio:

martin...@gmail.com

unread,
Dec 18, 2020, 6:35:11 AM12/18/20
to Radioberry
Hello Johan and OM,

I vote for the ethernet option. Last few month I have been working on something like this. 

Standalone version based on 2 pcs of RPI conected throught LAN cabel. One RPI With radioberry, filters and PA and second RPI with Touch LCD and user interface and hw controls features. My idea is to develop mechanical and electrical assemblig as one box, but which shoud be simply separete to two blocks for remote operatinal. I'm still not done, thanks to radioberry I bought a 3D printer and a 3D cad :-) and I have a lot of fun.

So it is my way and I'm curious what the others.

However, thanks for the question!

Martin OK2MTW

Dne pátek 18. prosince 2020 v 9:57:21 UTC+1 uživatel Radioberry napsal:

Pierre Martel

unread,
Dec 18, 2020, 7:59:10 AM12/18/20
to Radioberry
I would vote for an ethernet cable, use the PI for collecting the max of the data the RB can provide and send the data on the ethernet plug of the rpi . 
This would make the processing to be done somewhere else, A RPI, a PC a MAC. Then for all the control of any external system to the RB I think we should use some arduino connected to the RB RPI. ( like for switching filters, T/R switch, PA enable, name it. That way a user can decide what option he wants and not use too  much of the limited power of the RPI. 

Pierre
VE2PF

Garanti sans virus. www.avast.com


Garanti sans virus. www.avast.com

Tokio

unread,
Dec 19, 2020, 12:45:13 AM12/19/20
to Radioberry
Hi Johan and group,

Thank you very much for the inquiry for the plan to add an ethernet port to Radioberry board.
I'm relatively new to Radioberry, and I didn't know the previous discussion about Ethernet Port.

First of all, I would like Johan to check an attached high-level Radioberry configuration with Rpi4 and other Client S/W.

This is my understanding:
1. Gateware for FPGA in Radioberry is loaded by Rpi4 via GPIO when Rpi4 powered on,
2. The Radioberry board with firmware/driver in Rpi4 behaves SDR board to communicate with piHPSDR in Rpi4 itself and other client S/W in other platforms connected through LAN.

In this configuration, what function does Radioberry board with an additional Ethernet?
I think that Radioberry board should always be attached to Rpi4 which has an Ethernet Port.
Can Radioberry board work without Rpi4 except power supply by using an additional Ethernet Port?

I hope some clarification about a function envisaged with a new Ethernet port would be given to a new-comer.

73,
Tokio
ja1cca

2020年12月18日金曜日 21:59:10 UTC+9 pete...@gmail.com:
RB and Rpi4.jpeg

softerh...@gmail.com

unread,
Dec 19, 2020, 1:55:44 AM12/19/20
to Radioberry
Hi Johan and Group,

If the Radioberry is now considering ethernet (based on this Hermes-Lite/Hermes derivative core), will now use the PA from the Hermes-Lite as discussed in another thread, and is already a gateware variant in the Hermes-Lite github code repository, what are the main remaining differentiators between the Hermes-Lite and the Radioberry which makes the Radioberry attractive to people? I am not asking this in a negative or critical way, but would like to understand the differences people see.

Another option to consider for more bandwidth is the FT232H. Inexpensive development boards are available from various sources. With USB2 transfer rates up to 40MBs, you should be able to fit more than 10 384kHz receivers. The ethernet core requires significant FPGA resources and a FT232H FIFO interface should require less FPGA resources allowing for smaller FPGAs or more receivers. This is a popular part and there should already be various drivers and examples for the Raspberry Pi found with Google.

73,

Steve
kf7o

pa3gsb

unread,
Dec 19, 2020, 3:05:21 AM12/19/20
to Radioberry
Hi Steve,

>> Or is it better to go to the HL-2 ? 

In the post I did question this myself and the group.....

The people answering did not vote for that option. What is the reason of not going to a HL2? Hope people are willing to answer that question as well; would be great to know!

I see the radioberry as a low cost entry device in SDR radio for people who are liking and willing to learn the making of a software radio ... not only use of the radio.

There have been discussion before to increase bandwith.....

 i looked into use of the camera interface of the RPI but did not find time to do more experiments. (for me the preferenced solution),

Steve also thanks for pointing to FT232H; nice experiment!

As said before i like the experiments and like to learn by doing... so also your hazelnut for ethernet came along... it was working  well during the experiments but i did not continue because it fitted not in the idea of simple setup.

Iam happy i asked and hope people willing to give some feedback.

73 Johan
PA3GSB


 

Op zaterdag 19 december 2020 om 07:55:44 UTC+1 schreef softerh...@gmail.com:

pa3gsb

unread,
Dec 19, 2020, 7:33:43 AM12/19/20
to Radioberry
Tokio and group

I like to set the requirement by Tokio using 192K and PS using radioberry in the right perspective (hoping iam able to do it right)


Starting  with the radioberry i was aiming to connect to pihpsdr... i did implement a special protocol which John Melton merged into the pihpsdr github repo ...... people like to use all the other fancy SDR programs available ... 
so i implemented the firmware supporting the P-1. 

Avoiding to much maintenance of source code this code is removed from pihpsdr.


Next step in this process is the requirement for 192K and PS ; i reacted with a possible solution to use an additional ethernetmodule.....Steve now mention another solution like  the FT232... 

Which make me ask the following question:

>>The question is now should we go for a radioberry PRO for users like you?  

There where others who do like the additonal bandwith and the reduction of the CPU utilization ... and voted for the ethernetmodule.



Furthermore about your question:

Adding the ethernet module... does not mean that the gateware is implementing the protocol 1 ; in the experminent i have done i connected the additional ethernet port and the rpi ethernet to a switch  (or direct coupling from ethernet module to rpi ethernet) and i did only transfer the IQ data.

(of course i also tried the P-1 implementation)

If the gateware is implementing the P-1 there is no need for a RPI but only a loader for the gateware.... than i would say buy a HL-2.

As already reacted to Steve... i decided not to use of the ethernet module resulting in additonal complexity.



I feel we  have to look and see wich solution does not add complexity  to the radioberry concept; 
resulting in a higher IQ  bandwith and  reduction of the CPU utilization  resulting in a better perfoming radioberry.



Hope this helps to set the requirement in the right perspective!


73 Johan
PA3GSB





Op zaterdag 19 december 2020 om 06:45:13 UTC+1 schreef Tokio:

Tokio

unread,
Dec 20, 2020, 12:52:34 AM12/20/20
to Radioberry
Johan and the Group,

I used to use HL2. This a nice SDR radio as almost people admit. And the guys can buy an assembled one.

On the contrary, Radioberry is an SDR radio which gives us a pleasure to build the radio. For the first time, I soldered FPGA, ADC, and TCXO. After a very time-consuming ( to me ! ) work, I was very happy to have confirmed it works at last with the help of the community.

I agreed with Johan's comments, "the radioberry as a low cost entry device in SDR radio for people who are liking and willing to learn the making of a software radio ... not only use of the radio."

And I hope Radioberry remains an SDR radio different from HL2. As Steve mentioned, If Ethernet Port is attached to Radioberry, it becomes a kind of a simple HL2.

The use of Puresignal in Radioberry at the higher sample rate is what almost people would like to get. Then the question is now how.

Considering the above comments, the use of FT232H would be a nice and reasonable solution to enhance the capability of Radioberry not only for keeping the signature of Radioberry but also for experiencing an experimental improvement.

Making the long story short, I fully agreed with Johan.

73,
Tokio
ja1cca
2020年12月19日土曜日 21:33:43 UTC+9 pa3gsb:
Reply all
Reply to author
Forward
0 new messages