please choosego to mobile | Continue to access the PC version
12
Return to list Post new posts
Author: RaveenBouy

PiFm For Orange Pi.

[Copy link]

11

threads

59

posts

326

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
326
Published in 2015-3-26 02:53:02 | Show all floors
Ok, let me try to explain:
I'll try to explain in lay mans terms

What is done is toggling a GPIO port.
This gives a square wave (google what that is if you do not know).
Such a square wave is composed of a number of sine waves called harmonics. at frequencies that are a multiple of the frequency of the square wave.

The time with which the GPIO port is toggled is changed a bit causing the frequency to be a bit different (and so the frequency of the harmonics). That change in frequency is done in a controlled way leading to what is called frequency modulation or FM (check wikipedia on that).

Now the FM signal is at 100 Mhz, so the square wave will probably be triggered at 33 Mhz. That can be done in software but is quite time critical. DMA is much better for that. (it makes it a lot more reliable/robust)

On rpi they drive the dma controller quite low level to achieve that.
It can probably being done on the opi as well assuming GPIO's are memory mapped and can be toggled fast enough (the hardware must also support this). DMA again would help (and the DMA controller of the opi is quite likely different from the one in rpi).

My expectation si that it is technically feasible on the opi. It is not rocket science but it is not trivial either.
I would not embark on something like this without an oscilloscope to see what you are generating and good documentation of the hardware (especially the GPIO and DMA part) and some understanding of the underlying physics.

Whether this is legal or not depends on your country, but in most european countries and north america it probably is not (but I guess you wont run into problems if you do not add a wire to the gpio pin or only a short one. This is all low power, it depends also where you live, if you are in Montana it might be different than when you are near a major airport).

BTW some people use an additional filter to filter out undesired frequencies (to avoid disturbing other devices).

(and if this is still total gibberish for you and want to understand you need to find a good physics book)

Enjoy! Frans

You can also reach me on freenode irc, channel #orangepi username eFfeM

5

threads

95

posts

516

credits

Senior member

Rank: 4

credits
516
 Author| Published in 2015-3-27 22:31:16 | Show all floors
Thnx for the kind explanation Frans! i hope we'd be able to achieve it :V
Quack A Doodle Doo

1

threads

15

posts

174

credits

Registered member

Rank: 2

credits
174
Published in 2015-11-6 23:09:22 | Show all floors
hi,

working great on RPi, i test : https://github.com/ChristopheJacquet/PiFmRds
PiFM with RDS support , very fun at home
not yet testing on OPi

12
Return to list Post new posts
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list