RetroBSD

2.11BSD operating system for microcontrollers
It is currently Tue Jul 16, 2019 6:50 pm

All times are UTC




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: SDR radio with pic32MZ
PostPosted: Tue Dec 22, 2015 7:02 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Quote:
I wonder who will be first to get the high speed ADC stuff in the MZ...EF to 'receive' radio signals under LiteBSD?

Wiz, the SDR radio works with stm32f4, so it may work with pic32mz too (hopefully the FPU works fine). Simply g...le "stm32f4 sdr" and you will find several projects.
I doubt however it can work under LiteBSD. Retrobsd/LiteBSD could act as an interface for controlling the radio, not for processing of data directly. A dual mcu system may work fine.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Tue Dec 22, 2015 3:02 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Pito,

I seem to recall that MZ can sample at 28mhz, Plenty fast enough.

If the real time radio stuff gives its unused time to LiteBSD, LiteBSD will run
slower, but still be running. So all its applications can be used to help with
the project.

This is what I have Retro doing.

Happy Holidays to all

Wiz


Top
 Profile  
 
PostPosted: Tue Dec 22, 2015 6:50 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Wiz,
28Msamples/sec of 12bit data cannot be SDR-processed by MZ directly, I doubt so.
There are SDR radios, sampling an antenna ie. with 66MHz ADC (thus getting 0-33MHz of continuous spectra), but they use FPGAs.

Usually you do down conversion from ie. 21MHz to say 200kHz IF (an ordinary I/Q mixer), and the IF is then processed with an MCU (ie pic32MZ).

The DVB-T dongles based on ie. Realtek RTL2832U do the same - a front-end mixer from ie 435MHz down to 2-3MHz 8bit I/Q "IF", and the stream is then passed via usb to pc. PC processes the I/Q then.

The important prerequisite here is the ADC is a dual channel, simultaneously sampling one (I/Q). Stm32f4 got it, hopefully MZ can do as well.

P.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Wed Dec 23, 2015 9:33 am 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Pito,

One small point. I&Q is not needed if the RF can be digitized directly. This was what I had in mind.

Also, missing samples as in LiteBSD steals some CPU is also not a real problem most of the time if done correctly.

MZ...EF has some pretty neat DSP instructions so I am not convinced it cannot do both RF and LiteBSD processing with useful results.

The only thing I don't see it doing real-time is making clean RF carrier. But add a Clock Syn chip and maybe an RF amp and you have a pretty neat wide band digital 2-way real-time radio.

Lots of fun :).

Wiz


Top
 Profile  
 
PostPosted: Wed Dec 23, 2015 10:08 am 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
If you don't mind filtering a square wave there is always true REFCLKO outputs that can synthesize quite accurate frequencies. You could tweak the output frequency a tiny amount to create a crude kind of FM. Alternatively mix it with some filtered PWM for AM...

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
PostPosted: Wed Dec 23, 2015 3:11 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Matt,

Yes, you can do it that way :).

Unfortunately most government regulations [ if that matters? ] are focused around spectral purity. and the phase jitter makes the signal very broad. While it can be filtered, that is a complex job to get say 60 db purity.

On the other hand, a programable clock syn chip gives a pretty 'clean' signal as is. The next area of interest is the turn on and turn off transients. Depending on regs. control of these may or may not be needed. CW for example just turns the carrier on and off. 'Key clicks' are expected and tolerated at least at lower speeds.

One signal of much interest since it passes signals OK when VERY weak, is Olivia which is basically shifting between multiple close together frequencies.

Receiving it well is also pretty easy.

Once someone has gotten high speed samples going into a RAM [circular buffer] the rest should be SMOP [small matter of programming] :). It is a pretty good background job for a kernel loadable module :).

Happy holidays to all!

Lots of fun.

Wiz


Top
 Profile  
 
PostPosted: Wed Dec 23, 2015 6:25 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Wiz, to make the story short, I would recommend you, for your very start into this area, to acquire ie. Softrock radio kit, and to connect it to MZ. When it will work with your SW under LiteBSD, then you may start think on full SDR implementation. But do start small ;)
http://www.wb5rvz.com/sdr/
and the new one
http://www.wb5rvz.org/
73

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Wed Dec 23, 2015 9:26 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Pito,

Checkout Linrad - AKA SM5BSZ. Leif is a brilliant engineer now more or less retired. I have linrad running on two computers and have been a small part of linrad's development.

Right now I have one Linrad sampling I&Q from an RF front end and PIC driven frequency locked VCO [all my own design] into an audio card and putting samples on a local ethernet.

A 2nd laptop running Linrad receives and displays the received samples from an RF band (14mhz) and selects a 1.2khz band which is converted to audio and fed as audio to the same laptop running fldigi. I usually set it to decode Olivia 32-1000 signals.

When I am at the factory, I usually listen to 14106 +/- which is a channel used by many hams to talk back and forth to Europe from the US using Olivia. Olivia is usually error free even when signals are VERY weak!

Lots of fun :).

LiteBSD certainly has enough computing bandwidth to do this job! [ well perhaps not drive the Linrad display? ].

You will be MOST impressed with linrad if you download it and get it running. VOA (Voice of America) also sometimes transmits digital stuff that can be decoded by FLDIGI.

Anyways, yes I am familiar with SoftRock. I don't have one only because they refused my order a few years ago, so I built my own.

I am also a ham radio operator, maybe you are too?

Lots of RF fun :).

Wiz


Top
 Profile  
 
PostPosted: Thu Dec 24, 2015 9:58 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Wiz, ok, so you are an experienced sdr guy! :)
I messed with that years ago, built 4 softrocks and other stuff too (no problems with ordering and delivery of kits and parts). Used all sdr software available :) Always impressed the $10 softrocks copied the same as my ICOM rigs did.. The best of the softrocks is the one with Si570. See http://www.wb5rvz.org/ - now it is called Ensemble RX II and III (new) (it has got opto-couplers for the band switchers - thus eliminating usb noise). Order it and you will have a lot of fun !
There is a new "vfo" chip available people like much - Si5351.

For years not active on the bands, but occasionally listen to http://websdr.org/
best listening at
http://websdr.ewi.utwente.nl:8901/
PS: I've switched over to baroque music listening :)

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Thu Dec 24, 2015 10:53 am 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Pito,

Hmmm.... I see you are also an RF hacker :). Nice :).

Si570 best? Why? I have yet to get any of that type of chip to play with and have been wondered whether there are any measureable differences between them? What did you observe? Gotta check out Si5351 as you suggest.

I think MZ for receive with Si570 plus amp for xmit would be pretty nice.

VERY nice to see all the LiteBSD action now :).

Maybe I should build something with one. Radio, 'computer', ???

Websdr.org is what got me back interested. I think a message box ALE style would be pretty neat. I could 'start' a message to you and then when aether is OK it passes to you and reverse. No internet required. No content filtering. No monthly fees.

Lots of fun :).

Wiz


Top
 Profile  
 
PostPosted: Thu Dec 24, 2015 2:05 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Quote:
Si570 best? Why?

"The softrocks with the Si570 are the best" as you get continuous tuning. Something like a DDS.
Si570 does exist in many configurations (I got many of the models :) ), it is very expensive, power hungry, but _very_ stable, extremely low jitter. There is an configurator, so you can order what you want. Internally the xtal based pll ref oscillator runs at ~5GHz, and it divides by quite complex chain to your frequency of choice. The small issue with it is when you want to switch coarse a larger freq step it needs say 10ms to lock, but not noticeable in practice (as you see usually 200kHz freq window where you tune fine with mouse :) ).
I did in past with DDS (AD98/99xx, also got all models), you can switch millions of frequencies per second from zero to max, but the max output range of those DDSes is max few hundred MHz with the AD9912.
Mind you need 4xLO freq for softrock (because of the I/Q mixer which needs that nasty 90degree diff between I and Q). So in order to go from 10kHz submarine freqs to 6m band you need an LO from zero to 210MHz (Si570 goes from ~6MHz up to 1.4GHz based on model, btw, so for VeryLowFreq you need a prescaler :) ).
Ok, enough, Handle waits.. :P

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Thu Dec 24, 2015 2:20 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Pito,

Si570 - 0.61ps jitter
Si5351 - 3.5ps jitter

At least so one person claims.

If you would like to loan/give me one of your Si570 SoftRocks, I would like to measure it against my kludge?

The transmitter I am thinking of is quite a bit simpler than the SoftRock approach. No mixer. Just Si570, some sort of amplitude modulator for soft on and soft off and a 'real' amplifier.

An overload limiting preamp to drive the MZ for the receive path.

Lots of fun :).

Wiz


Top
 Profile  
 
PostPosted: Thu Dec 24, 2015 2:49 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
For your experiments with CW take this
https://learn.adafruit.com/adafruit-si5 ... t/overview
you get three independent VCO outputs, first one for you transmitter, the second one for your direct conversion receiver. Tuning via arduino or Litebsd.
The best high level input mixer you can get easily is the one softrock uses. Better than most commercial rigs got.. The chip costs 50cents. Simply use it as a DC receiver, no I/Q (use I or Q output, it does not matter). You do not need the 7474. So you need above adafruit breakout and the mixer chip, and a single low noise op-amplifier. And you get a decent DC radio (but do expect mirror freqs on your display, only I/Q is able to eliminate them in this kind of DC radio scheme)..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Thu Dec 24, 2015 7:42 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Pito,

I should probably get one with the 5351. Cheap enough.

That said, it looks like the 570 is the chip of real interest. MUCH lower jitter!

Linrad does a GREAT job of seeing what is really going on so it would be interesting to see what 570 looks like verses quiet xtal and my PIC frequency locked VCO close in.

Leif has done some VERY interesting experiments along these lines. And as you perhaps know, all crystal oscillators are not AT ALL alike regards noise.

Thus I was wondering whether you wanted to loan a SoftRock 570 unit to use as a starting point.

I noticed that the Ensemble III has a 570 with lvds output and some conversion chip. Perhaps this change was to lower phase noise? I didn't notice any such comments if they are there? Have you heard anything along those lines? It seems likely to me that this was perhaps done to lower jitter?

There is nothing like REAL measurements to verify what is going on! The more I measure, the more I can base my design decisions on real data :).

Just like using my debugger with Retro. I can see what is in RAM in real time, patch and test code, etc. Great tool!

Lots of fun.

Wiz


Top
 Profile  
 
PostPosted: Fri Dec 25, 2015 10:33 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Quote:
I noticed that the Ensemble III has a 570 with lvds output and some conversion chip. Perhaps this change was to lower phase noise? I didn't notice any such comments if they are there? Have you heard anything along those lines? It seems likely to me that this was perhaps done to lower jitter?

There is none conversion chip. The 570's output is matched to the I/Q clock generator (7474) via a transformer. That is all. My 570 there is an cmos one thus no transformer needed, but the lvds is a better choice - a lower jitter and probably higher max frequency.

I must admit the EnsIII is a good improvement over the previous models (ie. 570 got its own voltage regulator, there is an preamplifier for higher bands, opto-couplers for bandpass switchers). And it is cheap provided the Si570 is included. ~10y back as Tony kb9yig made the first kits I had to purchase the 570 separately (somebody had organized a volume purchase in order to get the price somewhere around $25 single q. for the cheapest cmos type offered). And the lvds one is more expensive.

I would not be concerned with the jitter as with both si53xx and si570 the jitter values are excellent.

Btw, there is an quite active yahoo Softrock group (named after the first Softrock model for 40m band) https://groups.yahoo.com/neo/groups/SoftRock40/info founded in Sep2005 :)
p.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Fri Dec 25, 2015 4:14 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Pito,

Happy Holidays to all :).

I mis spoke. RXTX v6.3 has the lvds part in it.

The only way I know to really compare is with actual hardware. I have 2 receive chains passing through different hardware using different antennas of identical design (vertical). One the I&Q rig of my own design.

The other an early kit using multi-crystal filters. I am using a fancy signal generator for the local oscillator [phase jitter unknown].

Decoding of Olivia 32-1000 signals is more or less the same. The antennas are on different sides of my factory in the field so sometimes signals are slightly different for that reason.

The Yahoo site is very interesting. That said, the whole noise business is fraught with theory verses practice. It is easy to raise the apparent noise floor due to jitter in a receiver oscillator. And digital signals are particularly troublesome in this respect.

So I have been comparing A & B. Kinda like using two different compilers.

From what I can see the better the oscillator, the longer you can integrate and the better ultimate snr is possible. As you point out maybe not relevant unless very long times are envolved [ low bit rate ] and the path is very stable?

As far as an MZ message box goes, telling that the far end is trying to connect needs to be much more sensitive. Then the near end can listen more intently and try to decode a message. And I think signal spreading by some means is needed to avoid single signal blocking the path.

I notice that the power meters in use here switch among 10 or so frequencies.

Glad to hear your comments!

Lots of fun :).

Wiz


Top
 Profile  
 
PostPosted: Fri Dec 25, 2015 5:07 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
The most important part with sdr is of course the ADC. The whole "signal to noise ratio" stuff depends 99% on the soundcard quality (or ADC). The jitter of a few ps in the LO is something not worth discussing therefore.
I did experiments with from 8bit/10khz till 24bit/192khz and the difference is proportional. You can copy signals even with 8bit, bur snr is almost zero. With high quality sound card is the snr comparable with big rigs. It is a rocket science - be warned!
BTW for messing with Olivia and other 50 digital modi you definitely need an ssb capable rig. It will not work with CW-like dc constructions (morse is not a digital mode..)
As the crystal filters are concerned - dsp is much better, even some dx purists may dispute. I spent $180 for an 2.3kHz SSB crystal filter from an US leader in that area (for my analog icom), and, frankly, I should have rather spent the money for a bottle of a good wine :)
My dsp icom outperforms any crystals in the IF by far, you need a Blackfin @400MHz for that sure :) Or pic32MZ :P
Only usage of a crystal filter today I see as a roofing filter after the first mixer (big $3-5k rigs have usually 3-4 IF stages, where the dsp comes after the last one stage with the lowest IF freq).

The latest HDR technology live:

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Fri Dec 25, 2015 8:04 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Pito,

Websdr.org does 77mhz 16 bit samples. Fills up a 1ghz ethernet link. Computer is dual 2ghz something. Along with a graphics whatever to do the heavy lifting. A hundred or so 'users'. Pretty impressive.

Linrad allows you to dump bits one at a time [in real time] so you can see the effect of fewer bits. More bits are only really needed when one or more signals get 'hot' due to good skip or a local signal. Makes you wonder if 'bits' of an ADC is a fiction you need to eliminate. [ Go up one level in the digitizing process so 'bits' are not relevant. ]

Not sure about your jitter comment? Again, I need measurements [bit error rate verses amplitude] to convince me.

I am an analog designer. Radio certainly has come a LONG way. In many cases very little if any analog design in the old sense is needed or helpful. Are crystal filters even relevant?

The receive game seems to be digitize as soon as possible.

Transmit is different. Select signals that are one tone at a time so the transmitter becomes Osc., soft turn on and off, amplifier. I am thinking that soft turn on and off could just be voltage modulating the amplifier chain? Si570 driving a voltage modulated RF amp. AM all over again albeit a little higher tech. :).

I wonder if this is the 'secret' to CDMA. Wiggle the transmit freq. in a band with a pseudo random code at selected power level and correlate to recover the signal in the receiver. All wide bandwidth stuff. Pretty DSP friendly.

Have you looked at rosmodem. I bet this is what they are doing?

Lots of fun.

Wiz


Top
 Profile  
 
PostPosted: Wed Dec 30, 2015 8:37 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Wiz, something for you - an SS SDR radio, works from 2m up - add a 1kW PA and you can cover the entire East Coast :)
Attachment:
LoRa.JPG
LoRa.JPG [ 86.96 KiB | Viewed 22792 times ]

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Fri Feb 19, 2016 3:22 pm 

Joined: Fri Feb 19, 2016 3:11 pm
Posts: 1
As per my knowledge filtering a square wave there is always true REFCLKO outputs that can synthesize quite accurate frequencies.
You could tweak the output frequency a tiny amount to create a crude kind of FM.
Alternatively mix it with some filtered PWM for AM.

_________________
turn-key assembly


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission