pavel-demin / red-pitaya-notes

Notes on the Red Pitaya Open Source Instrument
http://pavel-demin.github.io/red-pitaya-notes/
MIT License
337 stars 209 forks source link

End of WSPR transmission detection #778

Closed davidhay45 closed 5 years ago

davidhay45 commented 5 years ago

This is a question.

Using transmit-wspr-message from the SD card 3.8.

The transmission of a wspr message is initiated by memory mapped i/o:

fifo = (uint32_t)floor((1.0 + 1.0e-6 corr) dphi (1<<30) + 0.5);

and the process then runs independently for slightly under two minutes within the Redpitaya processor.

Is there a way to detect that the transmission has finished? This is to allow control of an rf amplifier and low pass filter settings.

Thanks

pavel-demin commented 5 years ago

Is there a way to detect that the transmission has finished?

Since we know when the transmission starts and we know its duration, I think that the time when the transmission ends can be easily calculated.

This is to allow control of an rf amplifier and low pass filter settings.

The commands controlling an RF amplifier can be found on line 31 in decode-wspr.sh and on line 22 in transmit-wspr.sh.

The idea is to change the state of an RF amplifier before the transmission starts and before the reception starts.

By default, these commands control the pin DIO0_P of the extension connector E1. They can be easily modified to control other pins (DIO1_P - DIO7_P).

It's also possible to add commands that would control filters via other onboard interfaces (I2C, SPI, USB, Ethernet, etc).

davidhay45 commented 5 years ago

I have a band pass filter, a low pass filter and a switchable pre-amp and all are controlled by D100-P - D107_P along with the PTT of my linear amp. What I was asking for was a positive detection of end-of-transmission rather than a timing loop so that I could move on to the next band at the next even minute without having to miss a 2 minute period.

That appears not to be possible but thanks for looking at it.

pavel-demin commented 5 years ago

I'm still not sure if I understand the problem that you're trying to solve.

If you want to execute a command just after the transmission, then you can add it at the end of the transmit-wspr.sh script:

$TRANSMITTER $CONFIG

# wait 111 seconds
sleep 111

# the following command runs after the transmission
<command>

The duration of the transmission is 110.6 seconds. So, the command after sleep 111 will be executed 400 ms after the end of the transmission.

davidhay45 commented 5 years ago

I don’t like the idea of sleep 111 because I can’t monitor other things at the same time. I suppose I am a purist but I am used o positive signals of events rather than timing. It comes form years of designing software to control telephone exchanges and other process control systems.

Thanks for your help, as always.