The Si4713 FM Radio Transmitter uses the same FM radio band as regular domestic radio. So a lot of frequencies will already be occupied by local radio stations - like all the ones you hear driving around in your car.
To find an available frequency, we can use the Si4713 itself, which has the built in ability to measure the noise for a given FM frequency. By scanning across the frequencies in the FM broadcast band, locations where frequencies are occupied can be determined.
Use the code below to run a frequency scan. This is really just the same basic demo from the Si4713 guide, with added output to a file.
# SPDX-FileCopyrightText: 2023 Carter N. for Adafruit Industries # SPDX-License-Identifier: MIT import board import digitalio import adafruit_si4713 radio = adafruit_si4713.SI4713( board.I2C(), reset=digitalio.DigitalInOut(board.D26), timeout_s=0.5 ) with open("freq_scan.dat", "w") as fp: for f_khz in range(87500, 108000, 50): noise = radio.received_noise_level(f_khz) fp.write("{},{}\n".format(f_khz/1000.0, noise)) print('{0:0.3f} mhz = {1} dBuV'.format(f_khz/1000.0, noise))
The output is simple. For each frequency, a relative noise level is given. The higher the value, the stronger the radio station signal. So look for frequencies with the lowest values.
The data can also be plotted to help find the occupied areas. Pick a frequency somewhere between the peaks.
Text editor powered by tinymce.