I recently purchased this FM transmitter and wired it up to an Arduino Uno according to the wonderful tutorial provided on the product page. I tried testing with the example code from the library, using an RTL-SDR tuned to 102.3. It didn't transmit anything, then worked once after some obscure rebooting/unplugging sequence, now nothing transmits again, through the serial port monitor provides the output shown below:
Code: Select all
Adafruit Radio - Si4713 Test
Tuning into 102.30
Set TX power Curr freq: 10230
Curr freqdBuV:115
Curr ANTcap:125
RDS on!
Curr ASQ: 0x1
Curr InLevel:-9
Curr ASQ: 0x5
Curr InLevel:-9
Curr ASQ: 0x5
Curr InLevel:-9
Curr ASQ: 0x5
Curr InLevel:-10
Curr ASQ: 0x5
Curr InLevel:-9
I decided to uncomment the power scan code to see if it the numbers provided made sense for stations in my area. After uploading the code with the power scan enabled, the transmitter works started working. I commented the code out again and the transmitter stopped working again. Rather than wait for the whole spectrum scan to complete, I added a single call after the commented out block:
Code: Select all
// Uncomment to scan power of entire range from 87.5 to 108.0 MHz
/* for (uint16_t f = 8750; f<8750; f+=10) {
radio.readTuneMeasure(f);
Serial.print("Measuring "); Serial.print(f); Serial.print("...");
radio.readTuneStatus();
Serial.println(radio.currNoiseLevel);
}
*/
radio.readTuneMeasure(8750);
Sure enough, it started transmitting again. I figure there is some sort of timing issue, so i replaced the radio.readTuneMeasure(8750); call with a delay(500) call and, the transmitter still worked. Experimenting with the delay times led me to a value of around 250ms to get the transmitter working every time.
This fix seems to work fine for me, I mainly wanted to post for other who might have the same problem. However, I am curious as to why this works. If anybody has any insights, your knowledge would be greatly appreciated.