#help-with-radio
1 messages · Page 4 of 1
I'm not familiar enough with numpy to know exactly what's going on, but it looks like you're reading the data in from a text file, but never actually converting it to a complex number. It's still a string?
I just added a line to convert it to a complex number
f = np.array([complex(x) for x in f])
just now
this shrinks the error down @half plover @granite spear to just:
Traceback (most recent call last):
File "C:\Users\aryan\PycharmProjects\Fast Fourier Transform\main.py", line 21, in <module>
f = np.array([complex(x) for x in f])
File "C:\Users\aryan\PycharmProjects\Fast Fourier Transform\main.py", line 21, in <listcomp>
f = np.array([complex(x) for x in f])
ValueError: complex() arg is a malformed string
complex() I believe requires two inputs, first the real part, then the imaginary
I see
but I have the data in the form -0.0117647058823529-0.019607843137254943j
complex() should parse complex number strings in that form
throwing errors
try print(numpy.real(num))
Seems fine here ```
complex('-0.0117647058823529-0.019607843137254943j')
(-0.0117647058823529-0.019607843137254943j)
then why is it giving me errors
wait
its because its not in string form originally
but it is
surely
It looks like you're making arrays of strings, then handing them to complex() two at a time?
am I?
how so
import pyfftw
import multiprocessing
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = [30, 21]
plt.rcParams.update({'font.size' : 10})
#Create a signal with two/multiple frequencies and some noise
dt = 4.16666667e-7 #Time div
with open('time.txt', 'r') as a:
t = [line.strip() for line in a]
with open('voltages.txt', 'r') as a:
f = [line.strip() for line in a]
f = np.array([complex(x) for x in f])
#FFT computation
n = len(t)
print('works')
fhat = pyfftw.interfaces.numpy_fft.fft(f, n)
print('works')
PSD = fhat * np.conj(fhat) / n
print('works')
freq = (1/(dt*n)) * np.arange(n)
print('works')
L = np.arange(1, np.floor(n/2), dtype = 'int')
indices = PSD > 40
PSDclean = PSD * indices
fhat = indices * fhat
ffilt = pyfftw.interfaces.numpy_fft.ifft(fhat) #Filtered signal
#Plot
fig, axs = plt.subplots(3, 1)
plt.sca(axs[0])
plt.plot(freq[L], PSD[L], color = 'c', linewidth = 2, label = 'Noisy')
plt.plot(freq[L], PSDclean[L], color = 'k', linewidth = 1.5, label = 'Filtered')
plt.xlim(freq[L[0]], freq[L[-1]])
plt.xlabel('Frequency(Hz)', fontsize=12)
plt.ylabel('Power(PSD)', fontsize=12)
plt.legend()
plt.show()
if you look at the complex line
f = np.array([complex(x) for x in f])
@primal warren it is just converting them to complex numbers
So it can’t be a string I’m finding
im getting the string malformed error though
pyrtlsdr output .npy files natively, which you can read back in as complex arrays, so can you avoid the conversion to text?
I have the .npy files
but I would like to fix this error
what exactly does one of the problem input strings look like?
Probably there's something in your file that's throwing it. Either print each value before converting it, or catch the exception and print the resulting string to see which one it gags on (I'm guessing a blank line)
If I have quotes around the number it returns the whole string
its a txt file
here it is
if you look at my code, I unpack it earlier line by line
you could use numpy.loadtxt() to read it directly, setting dtype=complex,
instead of reading it line by line
hmm
works perfectly for me:
>>> import numpy as np
>>> a = np.loadtxt("Downloads/message.txt", dtype=complex)
the values print match perfectly
array([-0.02745098-0.01176471j, 0.00392157+0.01176471j,
0.00392157-0.03529412j, -0.01176471+0.00392157j,
0.01176471+0.00392157j, -0.00392157-0.01960784j,
-0.00392157+0.01960784j, 0.00392157-0.01960784j,
...
it worked perfectly
numpy has all kinds of tools for data I/O, we should use them
numpy is fantastic, and is designed to be easy to use
I remember the bad old days when building numpy would take a couple of days, but these days I just install it with pip and life is good.
you have two blank lines at the end of your file, and complex() doesn't like empty strings as input
is pyfftw a separate package? There are FFT's in scipy (which builds on numpy)
yes it is but pyfftw is basically just a faster version, it still builds on numpy
the syntax is just pyfftw.interfaces.(numpy or scipy)
got it
this is weird though @young cove its running fine and all, I think I've calibrated the axis wrong
a 1MHz signal on a 92.2MHz received frequency?
Must be some dodgy axis calibration
the fft is going to make some assumptions about the center frequency, doest it have that as an optional arg?
probably?
I will have a look
from what I'm trying, it seems as though if I change the time divisions(dt) it changes the axis center frequency, I'm not sure how to tell the fft to set a center frequency
maybe fftshift()
i looked at the doc, and I see no way. The FFT is assuming a band starting a 0, I guess, and it's up to you to scale it
I think maybe fftshift
not sure thoug
do you need the speed of pyfftw right now? You could use the standard numpy/scipy routines, and have more examples avaialble. Later you can optimize with a faster FFT
not really
i would say stick with the integrated toolset for now
ok
an FFT itself is kinda unitless
this is true
Its about axis calibration though
the signal the pyrtlsdr records is downcoverted to a baseband. The data has no knowledge it was at 92-94MHz (or whatever the bandwidth you are using is). So the result is going to be 0-2MHz, etc. You can just add an offset.
if I understand correclty
That's what chat gpt told me but I didn't listen to it.
Do I just add an offset of the centered frequency, so 92.2e6?
chatgpt didn't say that; some smart person wrote something that chatgpt paraphrased. it's better to dfind that smart person
is it center or left edge?
and you gave that center to gqrx?
So you want to make an adjustment so that it looks the same in your numpy code as it does in the gqrx plot
Yes
and does the graph make sense, based on the signal the rtl-sdr was recording?
the gqrx graph and your fft output graph
The gqrx one does
I haven't matched gqrx vs fft actually but looking at local radio stations, fft does seem right
they both have a known peak somewhere, yeah, so you can just say, ok that's the offset I need
center or left, whichever works
and your signal was from a beacon at a known frequency, so that's the test
Oh so just brute force it fine
Yeah I see
Just Try different offsets
That seems perfectly reasonable
Thanks.
Thanks for fixing the complex error too btw
yeah, it's not really brute force, it's just that the system is at a frequency, but the signal is shifted when received, and then you offset it it back up so it matches the scanned frequency band
You have really helped with everything in the last few days
Yes
I will try tomorrow, as I have class I should probably sleep considering that it is 23:20
Thanks a lot for your assistance.
i am not an expert by any means, but I use SDR's for recreation. Also I helped a group shift from Matlab to numpy a few jobs ago.
you're doing great, you have to apply the rather theoretical stuff you learned in class to this practical problem. (I am glad you folks didn't build a receiver from scratch)
but I have never actually used FFT for my own devious calculation purposes
Oh we are still doing that but we have an unlimited time frame now
Unless we decide to return the components
what happened to the competition deadline?
Oh we are using this rtl sdr for it
Hardware submission by 12th March
Including raspberry pi and code.
got it
The building receiver from scratch is like a side hobby now just for fun, won't contribute towards competition although we might talk about our pains and struggles during the end presentation
We will likely mention adafruit/external assistance
is this all theoretical or is it going to fly?
Oh it's flying
It's going in a balloon
30km into thr atmosphere
Definitely, I'll make an announcement about it in this channel here at least
good night and good luck!
Thats why I also need to automate the pi to run the code when it boots up automatically
Thanks a lot
@primal warren Do you have some arduino code for the AD9850 function generator, we are getting dodgy results with our code and oscilliscope.
we have a module
we are getting a flat line
rather than a sine wave
it is extremely dogy
Have you tried the example code? How did you wire it?
Well the red LED turned on
It was done on a breadboard
I used a breadboard too, worked fine (however this was an AD9833, I'm unsure what an AD9850 is)
just different specs
we need to hookup the yagi to the function generator
So, what do you mean by "extremely dodgy"? That seems different from "we are getting a flat line". Did you connect the FSYNC wire?
When you say "we are getting a flat line", what is your oscilloscope deflection factor? The signal from these boards isn't a high voltage one. I get about 600mV peak to peak from mine.
If you're on something like 5 volts per division, it would look like a flat line.
Hmmm Ill check with my team as I was coding the fourier at the time.
You could try with @tropic fractal who is part of my team but he's not particularly active
ill check it out though
This was the code we were using today, it's just example code provided on the GitHub page for the library we're using (https://github.com/F4GOJ/AD9850):
const int W_CLK_PIN = 13;
const int FQ_UD_PIN = 8;
const int DATA_PIN = 10;
const int RESET_PIN = 9;
double freq = 1500000;
double trimFreq = 124999500;
int phase = 0;
void setup(){
DDS.begin(W_CLK_PIN, FQ_UD_PIN, DATA_PIN, RESET_PIN);
DDS.calibrate(trimFreq);
DDS.setfreq(freq, phase);
}
void loop(){
}```
We made sure to connect the Arduino's pins as described on the library's page and other tutorials, and the connection to the arduino seems to be working. As for the "dodgy" results, the sine wave output was a constant voltage, usually around 30mV, though this could change after restarting the program without any obvious explanation (it tended to vary between 20 and 40mV, so nothing like the 600mV peak to peak that you've been getting @primal warren ). Our oscilloscope has been known to act up, so it could just been an issue with that. Thanks for any help 🙂
@young cove @granite spear Sorry to bother you guys once again, it appears that my fourier is returning bogus results, here is the code:
import pyfftw
import multiprocessing
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = [30, 21]
plt.rcParams.update({'font.size' : 10})
#Create a signal with two/multiple frequencies and some noise
dt = 4.16666667e-7 #Time div
center_freq = 92.2e6
n_samples = 24000
with open('time.txt', 'w') as f:
for i in range(n_samples):
f.write(f'{dt:.20f}\n')
dt += 0.000000416666667
with open('time.txt', 'r') as a:
t = [line.strip() for line in a]
''''with open('voltages.txt', 'r') as a:
f = [line.strip() for line in a]'''
f = np.loadtxt('voltages.txt', dtype="complex")
#FFT computation
n = len(t)
fhat = pyfftw.interfaces.numpy_fft.fft(f, n)
PSD = fhat * np.conj(fhat) / n
freq = (1/(dt*n)) * np.arange(n)
freq = freq + center_freq
L = np.arange(1, np.floor(n/2), dtype = 'int')
indices = PSD > 40
PSDclean = PSD * indices
fhat = indices * fhat
#Plot
plt.plot(freq[L], PSD[L], color = 'c', linewidth = 2, label = 'Noisy')
plt.plot(freq[L], PSDclean[L], color = 'k', linewidth = 1.5, label = 'Filtered')
plt.xlim(freq[L[0]], freq[L[-1]])
plt.xlabel('Frequency(Hz)', fontsize=12)
plt.ylabel('Power(PSD)', fontsize=12)
plt.legend()
plt.show()
Now I will show you my graph vs GQRX graph for the same values
GQRX graph
my graph, it is clear in gqrx there is no spike at 92.2MHz and it appears that my fourier is only scanning a bad of 100Hz?!?!?! which is really weird
thanks guys @young cove @granite spear
why n = len(t) ? Is n number of samples? In that case why not len(f)?
I mean that also works
Unfortunately that isnt the error
are they the same?
so, in the sample data, are you expecting a spike at 92.2MHz? I don't know what generated the sample data/
I mean the gqrx one is correct
I am not expecting a spike ther
ok, so it's not sample reception data
I want my fourier to show the same data as gqrx but mine is dodgy
no
its something with the fourier or something
how did you calculate dt? I'm surprised it's a numerical constant. I thought you could calculate it
its not
its just 1/sample rate
surely
I think you could print out the freq values, etc. as you compute them to see if they look reasonable
hmmm ok
if it's just 1/sample_rate, then do that calculation in the code, then you are assured it is not off by a decimal place, or one too many zeros, etc.
ok sure
I'm not saying it's wrong, but the fewer mysterious constants there are, the better
Wait I just wrote a new fourier program with scipy, it is giving me promising results
hmmmmmmmm
its different to gqrx but I think it is still right
@young cove this seems promising but still different to gqrx
import numpy as np
import scipy.fft
from scipy.fft import fft
import matplotlib.pyplot as plt
dt = 0.000000416666667
n_samples = 24000
with open('time.txt', 'w') as f:
for i in range(n_samples):
f.write(f'{dt:.20f}\n')
dt += 0.000000416666667
# Load the voltages and times from file
voltages = np.loadtxt('voltages.txt', dtype=np.complex128)
times = np.loadtxt('time.txt')
# Define the sampling rate and center frequency
sampling_rate = 1 / (times[1] - times[0])
center_freq = 92.2e6
bandwidth = 2e6
# Define the frequency range to compute the FFT over
freqs = np.linspace(center_freq - bandwidth / 2, center_freq + bandwidth / 2, len(voltages))
# Compute the FFT of the voltages
fft_voltages = scipy.fft.fft(voltages)
# Save the results to a file
with open('fft_results.txt', 'w') as f:
for i in range(len(freqs)):
f.write('{} {}\n'.format(freqs[i], abs(fft_voltages[i])))
# Plot the results
plt.plot(freqs, abs(fft_voltages))
plt.xlabel('Frequency (Hz)')
plt.ylabel('Magnitude')
plt.show()
why write time.txt and then read it back in? Why not just use a linspace to generate times?
times isn't even used except you compute the sampling rate from the first two values
but the sampling rate is a given (what was it, 2 MHz? I forget)
2.4MHz
I mean thats just triviality, good practice I guess
@young cove I do believe this fourier is completely correct, I honestly dont understand why GQRX thinks I am wrong
maybe my fourier/gqrx fourier picked up on something that the other didnt?
you could bd supplying data to gqrx in some wrong way
because rn in the UK, bbc radio 3 is playing and it operates at 92MHz
I think I have done it correctly with all the right parameters
I think you should start with some sample data that has known stuff in it
oh so like model a frequency
of like 92MHz
using 2pi*Omega
I see
thats a good shout
yes, or real data that you get from gqrx by connecting it to the rtl-sdr, with known carriers. e.g. ok in this 2MHz part of the FM band, I can hear these stations, so I'd expect to see these carriers in gqrx (spread over the modulation width). Then save that data from gqrx and put it through your FFT
or sample the AM broadcast band. There you'll have fix carriers with sidebands, maybe easier to spot
how do you save data from gqrx as a file?
i don't know, maybe not possible, but maybe not necessary. You can see those stations in real-time on gqrx. Then you record with pyrtlsdr the same band, and expect to see similar data ("there's Radio 4, there's ...", etc.)
oh fine ok
the point is just to get some data that you know what it should look like, and then you can vet the processing steps. Or use a signal generator to generate a single carrier in some band, record it with pyrtlsdr (if it's just nearby, it will certainly pick it up), and look for a spike at that freq. Or generate artificial data, as you suggested
yes good ideas
As you predicted @young cove I took a live reading with the rtl sdr dongle and got 91MHz strong signal, 91.3MHz strong signal and 90.8MHz some signal whereas the GQRX when I imported a file, was completely messed up
ok, so our import attempts are no good, have you run the data through your fft programs yet ?
i thought the gqrx display looked kinda junky
well yes, only one of the spikes is 'correct'
It correctly identifies a spike at 90.3MHz but misses the spikes at 91Mhz and 91.3MHz
so maybe your starting frequency is wrong? Like, is it center frequency or lowest frequency? Maybe the spike is from some other place in the FM band
Im running live gqrx right now
that is 90.3 is not really the signal at 90.3
The spikes are clearly at 90.3, 91 and 91.3MHz
I am not understanding
on the live gqrx?
ok, so when you record the same band with pyrtlsdr, are you saying that you only see one carrier? YOu should record for several seconds
several seconds!!!
right now I am doing millisecond
several milliseconds
but since it's FM, you should see _something" all the time, the carrier is always there, but it's modulated and moves around
well how about 0.5 seconds
For reference, spec analyzer of FM frequencies around me
thats what I get on gqrx
and my fourier
but gqrx and fourier dont match
don't use the text file. save the binary data with .save(), an then read it in with .load(), instead of .loadtxt()
it will be a lot smaller
no reason to use text
correctly identifies this FM signal
my fourier
well I have to get the data over from pi ---> laptop
so even using .raw files is large
I'll go up by 1 order of magnitude
can't you do an scp or something?
scipy?
no, scp network copy program
no idea
copying text file into discord
then copying discord to notepad
then notepad to pycharm
very pedantic
extremely
you can just upload the binary data file to google drive or something
in theory yes
scp mylocalfile.npy username@remotehost:somename.npy
what is the desktop computer you are using?
is it windows or Linux?
windows
scp requires ssh server to be enabled on the receiving side
are you running a desktop on the Pi or just command line?
desktop
so use Google drive or similar instead, then you'll have an archive of all this, no?
instead of random discord files
and you can upload binary files, they will be much smaller
and faster to upload and download
one sample is 16 bytes in binary and about 55 bytes in ascii
mhmm
i mean, you can do what you want, I'm just saying how I would do it.
yeah I'll try that
the peak in the FFT plot above is centered on 9.025 MHz, not 90.3 MHz ??
yeah but off by a factor of 10 in frequency also
not sure you are recording the same thing
the x axis label seems wrong
just plotted the data with 240000 samples rather than 24000 so one order of magnitude higher
it produced the same results
it likes the 90.25MHz
this is very annoying
@young cove I have no idea what the error could be
as my program is insisting on the 90.25MHz
maybe try other band slices to see if you see other FM stations at expected places. I'm still a bit suspicious. Or, expand the y asxi scale so you can see lower peaks more easily. madbodger suggested log scale
it is extremely suspicious
or just let the 90.3 go off scale and widen 0-100
how do I use a log scale
i dunno, it's in matplotlib for sure
your spectrume analyzer photo clearly shows one station as much stronger
yes it does
ill plot a log scale
woah woah woah
@young cove the log scale did something devious to it
the x axis is different, how come?
I just increased bandwith
still the same
89.5MHz to 92.5Mhz
3MHz bandwith
is there a station at 89.x?
89.6Mhz
my plot shows 89.8x
very wrong
I am not sure why
it is so wrong
maybe the offset is wrong @young cove ?
I don't know, you could recheck your code.
I dont think anything is wrong though
does the spectrum analyzer show 90.3 smack dab on 90.3? My impression is that the reported frequencies might be rounded?
in the US, the frequencies are correct, but you might have different spacings. (like the AM band is 9 kHz in UK, and 10 kHZ in the US)
don't know about the FM band
hmm I cant seem to figure out what the issue is
... but gqrx shows it smack dab on 90.3, right?
well now its gone
the radio station must have stopped broadcasting
at the time ye
yes
i would say check and simplify your code
now the 2 main stations broadcasting are 89.6Mhz and 91MHz
you could generate an artificial signal as we discussed. Generate a 90 MHz sinewave or something, or even square wave
if you generate a 1MHz square wave, you can check the harmonics
if I generated a sin wave I know my fourier works
I've tried it many times
try AM band, carriers don't move
good cal
yeah broadcast FM if you're sampling for only a few milliseconds, you're probably picking up the instantaneous audio-frequency deviation of the carrier, not the carrier itself
I tried like 0.1s too
Ill try this AM band
101-103Mhz band
i mean MW, 500-1600 kHz. AM in MHz is something else, like aircraft, not likely to hear much
i have to stop for the evening soon
ok same here
check that gqrx can hear stuff there
there might be a WWV signal at 25MHz? haven't checked recently
just seems like a bunch of noise to be honest
100MHz is still broadcast FM in the US
oh, they're in the UK? hm, there might be a Finnish time service broadcast at 25MHz too
This fourier is so mind boggling
@primal warren @granite spear do you guys have any examples of code to plot the PSD of a file or wave as mine is just not working.
I do have some jank fft code if that helps. It's for an EEG plotter thing
I'll send it later
Maybe you can play the data back slower as audio and feed it into an fft you know works correctly
Then you just need to multiply each frequency by the reciprocal of the slowing down factor I think
And you would have audible verification of the things the fft shows
Takes a FIFO buffer and runs FFT on it
The data is an array of complex values in the form a+xj
I'll try it though
oh my god
@young cove it worked
After 5 hours of trying with the same file and changing the code, I get 2 noticeable peaks at 91 and 91.3MHz which is what I recorded with the gqrx live data
Great! … I am wondering if there is a Nyquist issue here as well. For a bandwidth b, Nyquist says you need to sample at at least 2b to recover the signal and avoid aliasing. But I think you said you were sampling 2 MHz (and wider) at 2.4 MHz Should be at least 4 MHz sampling frequency for 2 MHz bandwidth.
You don't need phase value. So you don't need complex numbers
You can just use rfft
Probably, a bandwidth of 1MHz is acceptable though.
seems like you have a lot more experience with this than me
I want to use my keyboard to type messages as a kind of point to messenger. is this possible or am i just stuck with using the buttons to send pre-baked messages?
Yeah, that should be fairly straightforward.
hey guys, what the range of this radio? https://www.adafruit.com/product/3178
Page said the tested with quarter wave wires at a range of 2km
Direct line of site though
oh ok thanks!
The range is highly dependent on the antenna and environment. Trees, hills, buildings, windows have a huge impact. If you need more than 1km you may have to pay attention to these things.
Range has been discussed multiple times in the forums, with some people doing systematic tests:
https://forums.adafruit.com/search.php?keywords=lora+range&terms=all&author=&sc=1&sf=titleonly&sr=topics&sk=t&sd=d&st=0&ch=300&t=0&submit=Search
Thanks!
sky is the limit. as long as mg is less than 256 characters, it can be anything you want.
i asked the wrong question, sry.
do you know of example code that i could look at that takes input from the user's terminal, displays it on the OLED, and then sends it after pressing enter?
i imagine writing the interpreter that will break up a message into 256 character chunks if it goes over the limit wouldn't be too hard would it?
I have an ESP32-S3 running CircPy 8.x and I want to connect to wifi on boot.py but then use HttpServer in code.py. Is this possible? HttpServer docs show connecting to wifi in code.py and during soft reloads my ESP32 has to reconnect to wifi all over again.
Right now I connect to wifi on boot, the little TFT screen on the ESP32 confirms it connected.
Then my code.py runs and the top of the TFT says "No IP" and wifi.radio.ipv4_address == None
I'd recommend ask this in #help-with-circuitpython . There have been recent changes in how the esp32s2 wifi is initialized that may well help you.
Thank you @normal drift
hey guys can this radio acept 5v? https://www.adafruit.com/product/3072
Yes, it has an onboard regulator to convert down to the 3.3V the chip uses.
perfect, thanks!
@granite spear @primal warren So the project is somewhat functional but we have one problem. They won't allow us to put rechargeable lithium ion batteries on thr balloon so is there anyway to power the pi without a UPS hat like for example using some lithium energizer batteries and stripping a micro USB or even some AA batteries. Many Thanks.
Yep, that's totally possible. You'll probably need some sort of voltage regulator to produce a stable 5V. We used the Energizer lithiums on balloons before, as they're reasonably tolerant of low temperatures.
Do you know how much current the whole system draws? That will set the specs of your needed regulator and battery pack.
are you allowed to use a power bank?
that is the easiest solution
but also low temps
could do some stuff to it
EdKeyes's advice is good
well its only the receiver(the pi 3b) so I would estimate a max of 1.8-2A
1.8A is the standard lipo battery hat for the pi 3b
but then again we cant have rechargeable batteres
The AA ultimate lithiums are rated to 2.5A continuous current, so that should work fairly well. A 4-pack of those would get you around 6V which you could regulate down to 5. That would last probably a few hours depending on what the peak versus average current of the Pi is.
Here's an example buck converter you could use with it: https://www.adafruit.com/product/1385
doesnt this hookup to the PI's GPIO pins?
but wait
@granite spear could we strip the ends off and shove it into a microusb that has also been stripped?
I'm not familiar with the Pi pinout off the top of my head... Does it have an unregulated voltage input or only takes USB?
well microusb definitely preferred but you can hook it up to the GPIO pins
though without regulation that is very risky
So you'd likely want a regulator like the one linked above. And then you could wire it either directly or through a USB connector.
exactly
but how do you wire it through a USB connector is my questin
question
just strip the wires
Yeah, the easiest thing would be to just cut a USB cable apart. Typically the power and ground will be red and black wires inside it.
exactly
and then just solder together
im guessing
Yup.
yeah doesnt seem hard at all
so just connect red and red and then black and black Im guessing
and how do we know which one is ground in this thing and supply
Yes, that should be correct. Not 100% guaranteed since the colors inside a cable are not actually standardized, but pretty common. Black should be ground.
yeah usually
do you hookup likes together
like ground --> ground and supply --> supply
Yes, that's correct.
(And a good general rule. It's pretty rare to have to connect power directly to ground.)
and there are tutorials for that
thats true
Do you think 4 of those lithium energizers will be fine or should we go for 6 instead
This seems good
ok that problem is fixed now
@granite spear @primal warren @young cove Sorry to bother you guys, for some reason, I am trying to run the python script on startup but it simply isnt working. I have tried using both crontab and rc.local but neither of them appear to work at the moment.
I am trying systemd right now
ok I see the error it is throwing
Traceback (most recent call last):
File 'home/pi/Radio.py', line 13 in <module>
np.save('samples.npy', samples, allow_picle = True, fix_imports = True)
File '<_array_function__internals>', line 5, in save
File '/usr/lib/python3/dist-packages/numpy/lib/npyio.py', line 524, in save
file_ctx = open(file, 'wb')
PermissionError : [Errno 13] Permission denied: 'samples.npy'
Mar 14 12:41:49 raspberrypi python3[1339]: Found Rafael Micro R820T tuner
Mar 14 12:41:50 raspberrypi python3[1339]: [R82XX] PLL not locked!
Mar 14 12:41:50 raspberrypi python3[1339]: Traceback (most recent call last):
Mar 14 12:41:50 raspberrypi python3[1339]: File "/home/pi/Radio.py", line 13, in <module>
Mar 14 12:41:50 raspberrypi python3[1339]: np.save('samples.npy', samples, allow_pickle = True, fix_imports = True)
Mar 14 12:41:50 raspberrypi python3[1339]: File "<array_function internals>", line 5, in save
Mar 14 12:41:50 raspberrypi python3[1339]: File "/usr/lib/python3/dist-packages/numpy/lib/npyio.py", line 524, in save
Mar 14 12:41:50 raspberrypi python3[1339]: file_ctx = open(file, "wb")
Mar 14 12:41:50 raspberrypi python3[1339]: PermissionError: [Errno 13] Permission denied: 'samples.npy'
Mar 14 12:41:50 raspberrypi python3[1339]: Reattached kernel driver
Mar 14 12:41:51 raspberrypi systemd[1]: Radio.service: Main process exited, code=exited, status=1/FAILURE
Mar 14 12:41:51 raspberrypi systemd[1]: Radio.service: Failed with result 'exit-code'.
Mar 14 12:41:51 raspberrypi systemd[1]: Radio.service: Consumed 3.449s CPU time.
Mar 14 12:41:51 raspberrypi systemd[1]: Radio.service: Scheduled restart job, restart counter is at 7.
Mar 14 12:41:51 raspberrypi systemd[1]: Stopped Radio Service.
Mar 14 12:41:51 raspberrypi systemd[1]: Radio.service: Consumed 3.449s CPU time.
Mar 14 12:41:51 raspberrypi systemd[1]: Started Radio Service.
rc.local or systemd run as root. You can run as the the pi user instead. (Though as root it should just run.)
exactly, it should run
I'm getting the above error though
Its something to do with it not being able to access the samples.npy file
@young cove it should be working and the above error message shows that it was trying to work but its something to do with the samples.npy file needing access or something
the home directory for root is not /home/pi
so it may be looking in the wrong place
more direct pointer to the guide above: https://github.com/thagrol/Guides/blob/main/boot.pdf
well it wasnt actually /home/pi
it was /home/aryan
could you upload the script, using the + sign?
you can run as a user other than root. See section 4.2.4.3 in the guide
@young cove well the issue is with saving it to the file
the program is running
but it cant save to samples.npy file
in rc.local or whatever put in sudo -u aryan -i name/of/the/script. I think you want to & it or it will hold up the boot process.
some permissions error or something
sudo -u aryan -i Radio.py &
then it will run as aryan and you don't have to worry about what happens when it runs as root. If you run it too early perhaps the filesystem hasn't been mounted r/w yet
but whats the error with the samples.npy
is that what you are doing now?
reference it with a full path: /home/aryan/Radio.py
I made the rc.local file executable
ok
I made it executable though
sudo chmod +x /etc/rc.local
so I cant write to it now
@young cove what should I do in systemd
to stop the samples.npy issue
thats what a guide told me
I would rather do it in systemd as crontab and rc.local failed
if you arent using /etc/rc.local remote it
sure, so remove /etc/rc.local and delete the crontab extra lines I added
what should I do in systemd then
I would say don't use systemd -- use plain crontab instead. Remove what you added to systemd. See the guide above, section 4.3: Using cron
crontab -e
# add this line when editing crontab
@reboot sudo -u aryan -i python3 Radio.py &
not sure if the & is needed here or not. I'll try to find out
oh ok fine
oh wait, that's not necessary, holdon , don't do anything yet
thing is @young cove I cant see the errors crontab is throwing but with systemd I know what is going wrong(in this instance it cant save to the samples.npy file) but in crontab I dont know what is going wron
ok
do you want to know what I currently have in my crontab file @young cove
remove what is in your crontab file, remove /etc/rc.local
undo what you did with systemd. Get it back to nothing
I haven't done this in about 20 years, gotta study it a bit
ok
how does one remove /etc/rc.local, ok I disabled the systemd thing
This video shows how to run a script on your Raspberry Pi when it is powered on. Let me know if you have any questions!
If you prefer reading, here's a blog post with the instructions: https://www.samwestby.com/tutorials/rpi-startupscript.html
Consider subscribing if this is helpful: https://www.youtube.com/samwestbytech?sub_confirmation=1
M...
I used this guy
for crontab
ok, don't remove it. I can't watch videos for this. I read.
I ran my file in the terminal and it worked perfectly
don't trust the videos
Ok fair enough
takes too long to watch a video
Thats true
what is in rc.local now?
dont know as its executable now
but when I execute the /etc/rc.local file it works
sudo cat /etc/rc.local
but it doesnt work on bootup
sudo chmod -x /etc/rc.local will undo the executable
wow there is a lot of bad advcie out there
do this:
yes there is so much bad advice everywhere
sudo cat /etc/rc.local what does it say?
it says exactly what I added into the file
its the standard file
but then before the exit0 line
I don't have an RPi to boot up right now
sending now
discord loading on rpi
#!/bin/sh -e
rc.local
This script is executed at the end of each multiuser runlevel.
Make sure that the script will "exit 0" on success or any other
value on error.
In order to enable or disable this script just change the execution
bits.
By default this script does nothing.
Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
python3 /home/aryan/Radio.py &
exit 0
@tight sail
@young cove
change that to sudo -u aryan -i python3 /home/aryan/Radio.py &
that will run Radio.py as you instead of as root
ok
did you add the "My IP address" stuff, or was it in there?
ok, reboot
what is your deadline on this? >March 12 now
oh they gave us an extension until the actual launch date
so until monday I guess
we had to fill in a waiver for an extension
it was very annoying
but we are still tight on time
can you get another team member who is a sysadmin type person?
I will be in belgium by next tuesday
none of them are sysadmin type people
in the whole university?
@young cove ok so I just checked the last time the samples.npy file was written to and it says 12:04 and currently it is 13:25 for me
this means that it didnt work
does it print "My IP address is ..." to the syslog?
how do I check the syslog
look in /var/log/syslog
ok
i have to get set up here to try this myself. I'll be back in a bit
oh wait it was running systemd
should I disable the systemd program
don't disable all of systemd. Just disable what you added.
how did you add Radio.py to systemd?
yep did that
Ill try rebooting again
I also removed the stuff I added to crontab
ok Ill try again
@young cove ok nothing in syslog
not even IP address
earlier systemd was showing something
but now i disabled my systemd service
nothing is happening
i am trying a simple test, will be a few more minutes
did it work
not yet, but I'm getting closer
the problem is getting the output monitored
still working, i'll be back
what are you trying?
running an arbitrary program on pi startup?
rc.local, it's working, the issue is making sure it keeps running
the closest I have gotten is with systemd
its working?
halfway
oh ok sure
@young cove my systemd was working but the issue was that it didnt have permission or something to save to the samples.npy file
systemd is large and confusing and a mess
fair enough
my rc.local and crontab have shown nothing in the syslog either though
and have no evidence of working
right, that's what I'm trying to fix. using shell redirection into a file properly. It's partly working, but there's no output in the file, as if the script has stopped running. debugging that
ok
I see, my rc.local and crontab just fail and I have no idea why
@young cove maybe add an echo to see if its working or not
ok, problem was that python was buffering the output, so it appeared there wasn't any. Here's what I think will work for you in rc.local:
sudo -u aryan -i /bin/bash -c 'python3 -u Radio.py >run.log 2>&1 &'
I'm using /bin/bash so I can redirect the output. The -u causes python3 not to buffer the output, so you can see it line by line in run.log. You can change the name of run.log, of course.
this is tested on an RPi
ok sure
@young cove have a look at this forum too
it says rc.local is deprecated
i don't care if it's deprecated, it works
you can try it with systemd later, but if you get this working, you know you have something that works
in the long run, yes, you should use something else, but you have a short time here
get it working, and then comment it out with # (so you can put it back), and try similar from systemd. But you have to work out how to run as aryan from systemd as well. crontab might be better to run as yourself.
I am rebooting now I hope this works
systemd is "after my time", I haven't had to use it for anything
You'd put User=aryan in the [Service] section of the systemd .service file and it'll do it
should I make it executable or not?
rc.local does not need to be executable
yeah the systemd was working but I was getting some sort of permission error
ok I'm rebooting now
thanks - if you have further suggestions later, that would be great
Mar 14 12:41:49 raspberrypi python3[1339]: Found Rafael Micro R820T tuner
Mar 14 12:41:50 raspberrypi python3[1339]: [R82XX] PLL not locked!
Mar 14 12:41:50 raspberrypi python3[1339]: Traceback (most recent call last):
Mar 14 12:41:50 raspberrypi python3[1339]: File "/home/aryan/Radio.py", line 13, in <module>
Mar 14 12:41:50 raspberrypi python3[1339]: np.save('samples.npy', samples, allow_pickle = True, fix_imports = True)
Mar 14 12:41:50 raspberrypi python3[1339]: File "<array_function internals>", line 5, in save
Mar 14 12:41:50 raspberrypi python3[1339]: File "/usr/lib/python3/dist-packages/numpy/lib/npyio.py", line 524, in save
Mar 14 12:41:50 raspberrypi python3[1339]: file_ctx = open(file, "wb")
Mar 14 12:41:50 raspberrypi python3[1339]: PermissionError: [Errno 13] Permission denied: 'samples.npy'
Mar 14 12:41:50 raspberrypi python3[1339]: Reattached kernel driver
Mar 14 12:41:51 raspberrypi systemd[1]: Radio.service: Main process exited, code=exited, status=1/FAILURE
Mar 14 12:41:51 raspberrypi systemd[1]: Radio.service: Failed with result 'exit-code'.
Mar 14 12:41:51 raspberrypi systemd[1]: Radio.service: Consumed 3.449s CPU time.
Mar 14 12:41:51 raspberrypi systemd[1]: Radio.service: Scheduled restart job, restart counter is at 7.
Mar 14 12:41:51 raspberrypi systemd[1]: Stopped Radio Service.
Mar 14 12:41:51 raspberrypi systemd[1]: Radio.service: Consumed 3.449s CPU time.
Mar 14 12:41:51 raspberrypi systemd[1]: Started Radio Service.
i have been using unix for 45 years, things change, and I don't have the same needs at the moment
this was my systemd error
ok I rebooted
lets see the last time the file was written to
@young cove nope
failed again
there should be a log in run.log
last time samples.npy was written to was 13:43 and it is 14:31 for me
the syslog?
more?
oh fine
ok
i did sudo cat run.log
@young cove cat: run.log: No such file or directory
show me the line you added to /etc/rc.local
ok
cat /etc/rc.local
yep
@brave willow if you are available to continue, I have to do other things
that looks ok
That's going to try to write run.log in whatever directory you might be in when that script starts
right, but -i -u should get it into aryayn's homedir
-i is an interactive shell, is it not?
it forces running .bash_profile, etc. that's what I want here, so the $PATH will be right
Might be worth just putting an absolute path for the run.log to see if that works. I'm not sure you want an interactive shell from rc.local
we could also do sudo -D
it worked in a local test for me
here is how I am testing:
in /etc/rc.local:
sudo -u pi -i /bin/bash -c 'python3 -u test.py >test.output 2>&1 &'
test.py is:
import time
while True:
print(time.time())
time.sleep(5)
I reboot, and ps shows python3 running, and I see output in /home/pi/test.output
ok
there is an output file?
I feel like with systemd I was very close
it was just some sort of permissions error
>test.output is writing the outputfile.
@brave willow if you can suggest how to do this with systemd, that woudl be great
@untold needle post your .service file, and double-check the output path for the output file
must run as aryan, in aryan's homedir, and be spawned, because it runs forever
thank you
sure
@untold needle so comment it out in /etc/rc.local before you reboot
yep
[Unit]
Description=Radio Service
After=multi-user.target
[Service]
Type=idle
User=aryan
ExecStart=/usr/bin/python3 /home/aryan/Radio.py
Restart=always
[Install]
WantedBy=multi-user.target
@brave willow
do you want the log/error message as well
Should user be aryan instead?
I think you need to specify WorkingDirectory= and put your home dir in there as well
my bad
You can use WorkingDirectory=~to make it auto go to your home dir
In the [Service] section
ok
wait so specify my homedir
so /home/aryan
So if you are using User=aryan, putting WorkingDirectory=~ will make it run out of aryan's home directory automatically
now I just need to find the curly thing after the equals sign on my keyboard
Oh, it's a tilde, on US/ANSI keyboards it's next to the 1 key
That should work for testing
testing?
what testing
Oh, I meant you could go back and change it to ~ later 🙂
oh ok
thanks, is there anyway I can give my service root access or something
as I think that is the problem potentially
You can run it as root if you want
how do I do that?
I can't remember if you use User=root or not- might have to google on that one
Or if omitting it makes it run as root automatically
I think omitting makes it run as root automatically
So then you would need WorkingDirectory=/home/aryan instead of the ~ in that case
yep
yes I see
wait a second
@brave willow I think it might have worked
it says the last time samples.npy was written to was 14:58 which is the time right now for me
It might have actually worked
this is a shocking revelation
Woohoo!
I am skeptical as with all things that include command line tools
@brave willow I am 80% sure it is working now
but radio.service isnt stopping running
it is writing to samples.npy literally every minute
the last time samples.npy was written to literally just now
It is writing to it every 10-20 seconds @brave willow thats weird
I think someone mentioned the writes are being buffered?
maybe
its spam writing to it
this perhaps proves that systemd is superior to crontab and everything else
oh it works
@brave willow it works perfectly
it actually writes to the file
but it writes to it like every 5-10 seconds
which probably isnt ideal
is there anyway to add a delay @brave willow
probably
Maybe, I'm not sure where that buffering is happening
Usually it defaults to that so you don't murder your I/O
aha there is
@brave willow RestartSec=3600
you add this line
in seconds
so if I make that 60
it writes every 60 seconds
you add that under service I think
may be easier to make Radio.py be an infinite loop and put in a time.sleep() rather than restart it
this is a very good point actually
Sorry, I assumed that was the case already
nope
Yeah I'd do that for sure
I dont know what happened actually
it just randomly started working
thats really weird
maybe it was the working directory thing
this definitely confirms systemd supremacy
It's a beast but is generally pretty good at what it does
at least now I'm back in my comfort zone with just having to change the python code
I'm not so familiar with sysadmin and command line tools
plus I've been ill for the last few days including today so I've missed some class and doing work with a raging headache isnt particularly easy
ty @brave willow I was much more fmailiar with sysv init
Certainly nothing wrong with sysv init- at least not until different distros started doing it differently/using different directories to make it more complicated
yes, it got out of hand. Not sure systemd was the best solution, amazing about the tension it created
tension?
people declared they would never use systemd. They started new distributions rather than using it (devuan, etc.)
I was getting very stressed about it, I knew I was close with systemd to be fair, I was only missing one line it seems
there is so much bad advice out there
systemd is pretty heavy-handed but I feel like it's in a good place now with what it provides- all the auto restart and logging features are really nice
logging features are very good
it is very non-unix-y, which bothered people
systemd>crontab>rc.local
in my opinion
from what I have tried
crontab and rc.local just flat out failed for me
I mean, each has its use- crontab is good for periodic jobs for sure. I've used rc.local even fairly recently, but having to reboot every time to test changes is a real drag. Plus yeah, it is being deprecated, though I imagine it'll continue to work for the foreseeable future
Anybody know what sort of rf transmitter chips would be in kinetic switches? (would they be special, or just normal ones?)
https://youtu.be/9Pw7U0XFgUM?t=312
I think they'd generally be fairly normal sub-GHz transmitters, though likely to be on the simple side instead of having a complicated protocol like Bluetooth... just power up, spit out a few ID bits on a carrier, then power down again. The receiver would be continually listening since it has power all the time.
Today we built a voltage regulator of 5V to power the pi. It only provides like 1-1.5A though
hopefully thats enough for pi+dongle
it should be
we need to add a heat sink though
It probably won't matter for the short flight, but note that convection-based heat sinks become less effective at high altitudes because the air isn't as dense.
Thats true
Its not that short
It's like 3 hours
You almost definitely want a buck converter
teacher said voltage regulator is fine, and tbf it is working(even though I would prefer a buck converter), only issue is heat
Heat means inefficiency, which means less runtime. Also, that reg would be throwing out probably 4.5W with a 1.5A load. 4.5W can get that reg really hot
Dissipation in watts is calculated by (voltage drop across regulator*amps drawn from reg)
yeah of course I calculated that
P=IV
however
"
@grizzled vapor with some calculations I thinks its likely to be more like 800mA-1A so like 3.2-4W which is still a lot
I'm sure we have heat sinks that can account for that much at least
pretty high; 30km upwards
You would need a beefy heatsink to keep that from overheating
At that point it may more of become a slug of metal with enough thermal capacity to prevent overheating during the flight
There are cheap buck converter modules on amazon
Or reliable ones from Pololu
what do you think of a heat sink?
Also it's cold up at 30km
How beefy a heat sink are we talking @grizzled vapor
so surely thats good isnt it?
Maybe
A lot of components are rated for -40 to 125 degrees Celsius
But vreg will still get really hot
Maybe you can stick an old laptop cooler on it
But that's overkill when you could just use a buck
I asked him to get a buck but my professor/teacher has some aversion to it
also if we get a buck it has to arrive literally in 2 days
Your power supply problems just got SOLVED! This little circuit board may look tiny but inside is a high-efficiency DC/DC step-down converter that can output up to 3 Amp at 5V without the need of any heat-sink or forced cooling (It does get a bit toasty at 3A though). UBEC stands for "universal battery eliminator circu
This?
we can feed it 6V@2A or 1.5A using 4 lithium energizers in a battery pack
That will work
I think me or my friend will probably buy it ourselves to save time rather than emailing the professor/teacher to buy it for us, plus he doesnt like it for some reason
Buck regulators can interfere with radio receivers, which may be why your professor wants to avoid them. However, a little separation, copper tape shielding, and ferrites can keep the interference from your receiver
copper tape shielding? And where/how do we add ferrites. And if it is possible could we use this current LM7805 Voltage regulator with a heatsink
You'd have to deal with the heat dissipation and reduced battery life with a linear regulator like that, as people have explained
Well the buck converter certainly seemed better until you said it interferes with radio. How do you keep the interferece away like you mentioned. Where do we add the ferrites/copper tape shielding and what is separation
Heh heh, maybe you'll pick up the buck frequency in your FFT, so you know that part works. 😉
Ferrite beads should go in between the buck and the Pi on the power line. Maybe add some decoupling caps after ferrites for more filtering
For copper tape/aluminum foil, just connect it to ground and wrap it around the buck
I think that's right
thanks, @primal warren can you explain how to connect the ferrite beads and if I should add the tape to the converter or the outside of the dongle
What is gain of a receiver antenna?
depends on which one
hwo bad is the interference? Also do we need copper tape shielding in the buck or on the dongle, the dongle we have is pretty high quality so is already in a metal casing. Also I am interested in how we add these ferrites, and since we might not have those, is there anything else we can do as well.
I mean in general, just trying to understand
It's usually a measurement of how much better or worse it is than a simple dipole receiver. An antenna with high gain would generally be directional, like a dish, so the gain tells you how much more power you can get when you point it correctly towards the source.
Ahh thanks!
I wish old school Radio Shack stores were still around
I actually saw one recently. Not very big, but it did still exist and have a small section of random components, too. 😁
Depends on frequency, but if the buck switching frequency is not near your target receiving frequency, it's fine. Maybe add a filter inductor/bead and some caps just in case
Aluminum foil shielding won't hurt. I think it should just be wrapped around the buck to reduce radiated interference
And grounded
I mean receiver is 27.5MHz with a 1MH, bandwidth
Well
How do you ground foil
That's a lot of difference
Shouldn't be much
Interference
Actually rtlsdr won't even pick up 1mhz
Yeah I didnt think so either
Testing is the best way
rtlsdr can receive 1MHz
I can test on Monday when the buck arrives I guess
Connect to negative
Of the buck?
Kind of a tinfoil hat for your components lolol
Yes
27MHz is pretty rare
By the way @primal warren @young cove @granite spear we are launching it tomorrow, the only problem would potentially be if the transmitter would reach the ionosphere or not and then reflect, so range is the only issue. All the testing is done and we've given the pi in to be integrated into the balloon. Just wanted to update you guys.
Good luck! 🤞
the transmitter is only 15mW, is that strong enough?
to reach the ionosphere and back
we dont know the gain
its a yagi antenna though
homemade with some long booms
That depends on your antenna gains, bounce loss, path loss, and (especially) receiver sensitivity. https://resources.system-analysis.cadence.com/blog/rf-link-budget-calculation-guide
Since you're not pushing information over the link, I suspect you can use averaging and filtering techniques to improve your link budget.
how much power do we need to hit the ionosphere and back
what part of the ionosphere? generally, you would do a link budget calculation, and you can look up various rough guidelines. is the balloon going to reach the ionosphere, or are you counting on somehow distinguishing an ionospheric reflection from the direct path from the transmitter?
using modulation for the last part yes
@tropic fractal came up with that idea
I'd ordinarily expect "watts" rather than milliwatts for that kind of distance at the least, though. Like ham radio sorts of gear.
Although things like WSPR beacons only have miliwatts of transmit power, but the signal can be picked up relatively far away if the ionosphere is good
Also because it uses FSK and a very low bitrate
i use WSPR with 1W and get heard 8000km away with a non-fancy antenna, and that is with ionosphere skip. Since this is line of sight, at least to begin with, it may work out
Like I said, it depends on antenna gain, receiver sensitivity, bandwidth, modulation, sample time, etc.
I read somewhere that the ideal antenna length is 1/4th the wavelength. If I wanted to have a really tiny antenna (like a pinhead) for a 450MHz signal, would I need a lot of power to make it transmit?
You would probably want a "chip antenna" or a coil in that case... the same effective length but wrapped up into a smaller space. Though honestly a literal pinhead size becomes pretty infeasible.
Like, the wire trace to connect to the pinhead becomes a better antenna than the pinhead itself.
Oh the antenna doesn’t need to be straight, I didn’t realize 😬
Maybe I want a spiral antenna
Not pinhead size, but this is the general idea https://www.adafruit.com/product/4394
Ok we launched today
From Belgium we are recovering the balloon from somewhere in the Netherlands or Germany
It's all intact
Anyways I will give you guys results after we analyse
I may have forgotten to let the antenna dangle loose, it might be taped to the side, I may have forgotten before launch. @granite spear @primal warren @young cove what will this do to it
Is it coiled up?
It will tend to reduce the gain and distort the pattern, depending on the shape it's in and what it's near
Sort of
How bad are we talking
Standard engineering answer: it depends.
It's coiled with a piece of tape sticking it to the exterior
Coiled how tightly? What radius? What spacing between turns? Flat coil or conical? Is it near anything? Is that anything conductive? Is that anything radio circuitry?
Well all circuitry is on inside and dipole on outside
It's coiled like just normally
It's a flat coil
Not very big radius
I'm going to guess a 24-31dB loss
Are you joking
Yes. Yes I am.
I simply don't know enough about the situation to make even an educated guess, other than "it will tend to reduce the gain"
My team is furious with me
How much do you actually estimate
It's a flat coil, 1.75m of wire, 7cm radius but together at the centre, its a flat coil and taped at the centre
@primal warren @granite spear please help
My team will kill me
Tightly coiled
I'm not sure how we can help at this point. As Julius Caesar put it "Alea iacta est." It will be what it will be. Collect the data and hope for the best.
How bad do you think it is
Is it very bad
Or medium bad
Or minor issue
There are a few possible viewpoints here, and they're all guesswork. One is that you're already flying a bunch of untried technology, and it may have been marginal to start with. If so, it's still going to be marginal, so in that depressing scenario, it isn't much worse. The other is the "more signal, better results" mindset, and in this case, you're going to miss out on "more signal", so any results you do get will tend to be impacted.
Well we don't actually know if the transmitter was ever going to work
But my team don't think if it like that
They essentially think it's all my fault now
Unless we get data
If there's an easy way to boost the transmit power, that might be something to consider.
did you test the transmitter and receiver on the ground at all?
Yep
Unfortunately, that's true, and it's a long-standing problem. Like the person who misses one basket gets blamed for losing the whole game.
Too late
Payload been recovered
We tested it in the same room
And it all worked obviously
But transmitting in the same room ≠ doing a skip off the ionosphere
Even my professor is angry
RIP
That's good! The first time I tried getting sky-brightness photos from a balloon, it landed in a swamp. Recovery isn't easy sometimes, heh heh.
i think it's a bit crazy you only get one chance at a launch. If this were other than a student project there would be tons of testing, and multiple runs.
so did the recovery get the balloon too?
The balloon probably just popped.
No everything was recovered
so was the tape still on the balloon
The people who launch it have been doing it for years, they are very advanced
Yes
i wouldn't take this as a personal failure, it is a system failure; the launch procedure needs a checklist and cross-checks
Recovery went well, from Belgium it went to the Netherlands/Germany and they recovered it.
But now our results.m...
My team don't see it that way
How bad is the damage though
Your team is who should have been doing the cross-checks...
when commercial pilots prepare for a flight, they have checklists. It's not just seat of the pants
In summer maybe
Well it's too late now and it was my fault
We should have had a checklist
this is a learning experience. my impression is that you did about 80% of the work. There was a lot of success: the transmitter was built, the receiver was built, the software was developed.
And the thing is, it's more than likely the transmitter didn't work but we will never know because of my mistake
and you still don't know about the data, don't beat yourself up.
I thought you said you tested it in the same room?
That's true, that will come later
We don't know if it works for long range
Just 2 pieces of wire can transmit short range
We never tested a skip off the ionosphere
so there's a missing thing, which is that you should have done a rrange check outside across a considerable distance. so whose fault is that.
how do you know it skips? it could be line of sight. I'm confused why you thought it had to be ionosphere bounce
The essence of learning is making mistakes.
To be fair the dipole was actually not properly in the terminal block today, one of the wires came out and I saw that right before launch and quickly fixed that. Well it could be line of sight but we would like it to be a skip which is why we modulated.
Professor supposedly said we wasted time and money as well as resources
I left as I have something to do back in the UK
i think you need to expect more from your team as well. Part of this learning experience is about the management structures and team cooperation that make for success
So I won't be there for data collection
I gave them all the code though
Literally all they have to do is give my code a directory from the pi and it will create the graphs for them and display them one by one
If we don't get data I'm going to be blamed, if we get some data but its bad then I'm going to be blamed. If we get good data then everything is all right
there are many things that can go wrong here. For the professor to blame you alone is short-sighted. The professor should not expect success. The professor should also be guiding you toward success. It sounds like the professor does not necessarily have as much systems engineering experience as needed.
I think the transmitter people should have proposed that
“Sink or swim” is not a good way to teach, except in special situations
@untold needle What organization is the high altitude balloon project for?
Not sure
@young cove @granite spear @primal warren only a few of the files have data, but a lot of them are showing concurrent data at 27.1-27.15MHz but its extremely strong. We must have caught a radio station for sure as it looks like it has proper shape and everything.
that frequency band is part of "CB radio", which is used extensively in many countries
so you could easily have been picking up CB'ers
while everything else is just like noise, it is so strong
look at that
its unreal strength
its like -70dB, so strong
cycling through 27.2-27.8MHz
I dont think we got much from our transmitter
likely we got a CBer
Congrats! A whole lot had to go right in the system design for you to get real data like that! Pat yourself on the back... 😁