arha / flipper-dcf77

DCF77 emulator off the 125khz LFRFID antenna on Flipper Zero
GNU General Public License v3.0
65 stars 5 forks source link

How can I change frequences? #2

Closed hryamzik closed 1 year ago

hryamzik commented 1 year ago

You can send it at the original 77.5kHz, but I've had better range using 155kHz. The baseband signal is output on C3.

So is there a way to change frequency in an interface or do I have to recompile the code? Can't make it working with oregon weather station. I did attach a wire to C3 and kept flipper close to the weather station for ≈2h.

arha commented 1 year ago

It's recompile only for now. There's a nicer UI on the way, as time permits.

The C3 GPIO signal is baseband - a 1 Hz signal at 80% or 90% duty cycle - it is not the RF 77500 Hz signal. Sticking a wire in there won't do much. , Also, at VLF/LF, you will need some kind of tuned circuit - a loopstick or a tuned coil. Hence, why I'm using the onboard LF antenna, even at a wrong frequency it should still have some bandwidth left. This is intended to drive an external amp+antenna that you will tune manually.

Also, is the model you're using explicitly supporting DCF77 and configured to do so? I'd expect US products to support WWVB preferentially or if not - having some localization settings (Europe/Japan/US/China) set by you, to know what signal to expect and on what frequency, using a switch, bluetooth, dip switches, etc.

hryamzik commented 1 year ago

Oh you're right about the antenna loop, there's a project for arduino I've seen years ago and I've forgotten it uses looped wire as an antenna.

My weather station is Oregon BAR806 and it does support DCF-77. It even shows signal strength and it's at zero level.

arha commented 1 year ago

The arduino in that project is outputting a RF signal. I'm not, I'm outputting a baseband signal. You will not see any RF signal from pin C3, so your receiver will not see any sort of RF signal.

I'm not talking about a loop, i'm talking about a loop stick, known as a ferrite rod antenna.

Are you seeing any signal without a wire on C3, just using Flipper's LF coil? The coil, unlike C3, is outputting a RF signal. Also there's a setting on BAR806, make sure it's flipped to EU.

hryamzik commented 1 year ago

Are you seeing any signal without a wire on C3, just using Flipper's LF coil?

Nah, no signal this way too. However I've no idea how accurate is that signal strength visualisation.

Also there's a setting on BAR806, make sure it's flipped to EU.

This one is correct. It can actually get signal from Berlin sometimes.

arha commented 1 year ago

Try changing this line to 77500 instead.

I'm not sure how the S meter behaves on BAR806 - did you notice it jump up and down every few seconds when it's receiving a signal? Or does it only very occasionally change? My hunch is that it will display something after it correctly receives and decodes a few packets - since it's sort of "correct" and it's cheaper to implement it in software than getting a digital S meter in there. Going through the manual, it seems it only has two states: strong and weak/absent, so I think it won't show you the signal strength in real time, only after a few successful decodes.

So, here's my take: change that value to 77500, recompile, then stick the back of your flipper to the top of the weather station where the BAR806's antenna is. Leave it for 10-15 minutes, and check if the signal meter does anything. If that still doesn't work - change that value to 125000 and repeat. Flipper's antenna has very high Q near 125kHz, so you'll likely overload the receiver and it will detect something.

As a side note, I'll probably add a GPIO with RF signal output on the next build. I'm not sure what's the usecase over using Flipper's antenna itself, bar wrapping the wire around the receiver, like the project you mentioned earlier.