Arduino boards are fantastic and versatile for constructing a wide range of electronics projects. One of the greatest strengths are the abundance of electronic modules that are available to add project specific functionality. I picked up a Si4713 board awhile back and decided to spend some time setting it up with an Arduino to see if I could get a functional low-powered FM transmitter running. The Si4713 boards are easy to come by and relatively cheap (I think I paid well under $20 including shipping for mine from a seller on ebay), and have minimal work required to get them hooked up. They come with headers that will need to be soldered onto the board and a very thin wire that is meant to serve as an antenna (which will also need to be soldered to the board).
The wiring between the Si4713 and the Arduino (I used an Elegoo Mega 2560 R3 I had lying around for this project) is as follows. Adjust the wiring and code as necessary depending on the model of the Arduino you use and your preferences for the reset pin.
| Wiring: |
|---|
| VIN | - | 5V |
| GND | - | GND |
| SDA | - | SDA (Pin 20) |
| SCL | - | SCL (Pin 21) |
| RST | - | Pin 2 |
| GPIO1 | Optional (RDS interrupt) | leave unconnected unless needed |
You will need to install the following Adafruit libraries for the board to work:
Adafruit_Si4713 Library
Adafruit_BusIO
Adafruit_GFX (if you want to later display station info)
I tried a couple variations on getting a functional sketch. I finally figured out that a persistent problem I was having involved the reset pin not properly resetting after the Mega has been disconnected from the power source and then rebooted. Modifying the sketch to allow for a delay to allow the pin to reset properly seemed to correct this. The updated sketch is below:
#include <Wire.h>
#include <Adafruit_Si4713.h>
#define RESET_PIN 2 // match whatever wiring you selected
Adafruit_Si4713 radio(RESET_PIN);
void setup() {
Serial.begin(115200);
delay(500); // time for power to stabilise
pinMode(RESET_PIN, OUTPUT);
// Toggle reset: LOW -> HIGH with pauses
digitalWrite(RESET_PIN, LOW);
delay(50);
digitalWrite(RESET_PIN, HIGH);
delay(200);
Wire.begin();
Serial.println("Attempting to find Si4713...");
if (!radio.begin()) {
Serial.println("Couldn't find Si4713");
while (1) {
delay(500);
Serial.println("Retrying...");
if (radio.begin()) {
Serial.println("Found Si4713 on retry!");
break;
}
}
}
Serial.println("Si4713 found!");
radio.tuneFM(10110);
radio.setTXpower(88);
}
void loop(){}
After I verified that the transmitter was operational, I decided I needed something cool to transmit. One of my first exposures to short wave radio was listening to "numbers stations", which are famously mysterious stations that broadcast cryptic messages. I fired up Garageband and recorded some esoteric sounding number station inspired audio ala' "Stranger Things" that I could endlessly loop on my station. I grabbed a receiver capable of tuning in FM and dialed up my frequency. I don't have to tell you how cool it was to hear my message looping over the radio! I did some proximity testing, moving the radio around the room and it seems like the effective transmission distance using the basic thin wire antenna provided with the Si4713 is about 15 feet. I believe I could improve the distance by building a better antenna, such as an optimized quarter-wave antenna - which might possibly extend the reach a bit more (maybe 25-30 feet).
Some future enhancements to this little radio station I can envision include: building a better antenna, fitting everything into a suitable enclosure, and adding an old ipad shuffle for audio to make this a truly mobile radio station.

No comments:
Post a Comment