elechouse fm transmitter hanging on fmtx_init

I’m trying to get the fm transmitter board from elechouse to work. I downloaded the FMTX.rar from the elechouse site and opened it up. I made a new zip file from the contents. I installed arduino 1.5.5 then added the library to arduino ide. I then went to file-> examples-> FMTX->fmtx_demo (which is included in the original rar). The sketch will compile and upload but it only gets to the the line Serial.print(“FM-TX Demo\r\n”); I can see this output on the serial monitor
It never gets past the next line
fmtx_init(fm_freq, USA);
because I never see the next print
Serial.print(“Channel:”);

There are four wires that are labeled on the fm transmitter board and is wired as follows:
Fm Transmitter → Arduino
GND->GND
VCC->5v
SDA->A4
SCL->A5

I’m not sure what is missing here as it seems pretty straight forward. Its almost like the reference isn’t being found. I have two of the transmitters and both are acting the same. Any help is greatly appreciated.

see full code below

/**
  @file    fmrx_demo.ino
  @author  www.elechouse.com
  @brief   example of FMRX_MODULE
  
    For this demo, input command format like &xxxx to set select band,
 (eg:if you want to set FM 95.6MHz,then input &0956 and send).
  
  @section  HISTORY
  
  V1.0 initial version
  
    Copyright (c) 2012 www.elechouse.com  All right reserved.
*/

#include <FMTX.h>

float fm_freq = 90;  // Here set the default FM frequency
void setup(void)
{

  Serial.begin(9600);
  Serial.print("FM-TX Demo\r\n");
  /**
  Initial, set FM channel and select your area:
 USA
 EUROPE
 JAPAN
 AUSTRALIA
 CHINA
  */
  fmtx_init(fm_freq, USA); 
  Serial.print("Channel:");
  Serial.print(fm_freq, 1);
  Serial.println("MHz");
}

void loop(void)
{
  /** check for data setting new frequency.  Users could input data from Serial monitor. Data 
    must start with '&' and followed by 4 numbers, such as &8000. The first two is the integer part
    of new frequency (Unit: MHz), and the last one is the decimal part. And the channel must between 70MHz
    and 108Mhz. For example,  &756 is 75.6MHz, and &666 is out of range.
  */
   if(Serial.available()){
    switch(Serial.read()){
      case '&':
        u8 i,buf[4];
         float ch;
         i=0;
         delay(30);
         while(Serial.available()&&i<4){
           buf[i]=Serial.read();
           if (buf[i]<= '9' && buf[i]>= '0') { 
           i++;}
           else{
           i=0;
           break;
           }
         }
         if (i==4){
           ch = (buf[0]-'0')*100+(buf[1]-'0')*10+(buf[2]-'0')*1+0.1*(buf[3]-'0');
           if(ch>=70&&ch<=108){
             Serial.print("New Channel:");
             Serial.print(ch, 1);
             Serial.println("MHz");
             fmtx_set_freq(ch);
           }else{
             Serial.println("ERROR:Channel must be range from 70Mhz to 108Mhz.");
           }
         }else{
           Serial.println("ERROR:Input Format Error.");
         }
         
         while(Serial.available()){
           Serial.read();
         }
        break;
    }
  }
}

What is missing is a description of how you wired everything up. Please add code tags "#" to make your code more readable. If you don't know how to do that, read the sticky message on how to post.

I've made the updates as requested. Thanks

Is this the correct category to receive help? Does anybody have any experience with the elechouse fm transmitter? If so is there a way to test it?

I don't have any experience with that transmitter, so I looked through the manual and it isn't very helpful. However it seems obvious that the program hangs up when it first tries to communicate with the module via the I2C bus.

Once you are sure that the module is getting 5V power and ground is properly connected, then you have to debug the communications. This is not easy to do unless you have access to a logic analyzer and can look at the signals and timing transitions on the SDA and SCL lines. If that is not possible, and Google doesn't turn up anyone in a similar situation, probably your only recourse is to contact the people at elechouse.com

Edit: I just remembered that there is a test program for Arduino that looks for devices on the I2C bus. Try it, it may tell you if the basic I2C communication is working. If so there are other things to test, as in correct device addresses, etc. : http://playground.arduino.cc/Main/I2cScanner

Thanks for the I2C scanner link. I Uploaded the sketch and it says no I2C devices. I did this for both fm transmitters I have and the results were the same. Could the I2C interface on the arduino be bad? Is there a way to test that?

The only way to test the I2C interface with that program is to try a known working I2C device.

Do you have the appropriate pullup resistors on the SDA and SCL? It won't work without them. http://www.dsscircuits.com/articles/effects-of-varying-i2c-pull-up-resistors.html

jremington:
Do you have the appropriate pullup resistors on the SDA and SCL? It won’t work without them.
http://www.dsscircuits.com/articles/effects-of-varying-i2c-pull-up-resistors.html

I’m assuming that the Elechouse fm transmitter board has the correct resistors. Per their documentation I should be able to hook the SDA and SCL to the A4 and A5 port directly.

I don’t have any additional I2C devices at the moment to test with. I guess I’ll be getting something to test. Any recommendations?

The schematic for the FM transmitter shows that there are 10K pullup resistors to SCL and SDA on the board. That should work (4.7K is more usual), but something is clearly not working. Interestingly, the schematic calls for a 3.3V power supply and does NOT show an on board voltage regulator for 5V operation.

So, I downloaded the data sheet for the actual transmitter chip (KT0803M, available here http://www.sintech.com.tw/datasheet/cfp/KT0803M_V1.1.pd) , and it is pretty clear that operation is intended ONLY for 3.3 V, with an absolute maximum of 3.6V. In fact the chip has a built in regulator, but that is used for the transmitter itself, which operates at 1.8 V.

If you are using this with a 5V Arduino, the chip may have been destroyed. I know, elechouse.com claims 3-5 V operation, but I think they are hoping for the best and that you got a "bum steer".

I will cross elechouse.com off of my list, and advise others to do the same.

jremington: The schematic for the FM transmitter shows that there are 10K pullup resistors to SCL and SDA on the board. That should work (4.7K is more usual), but something is clearly not working. Interestingly, the schematic calls for a 3.3V power supply and does NOT show an on board voltage regulator for 5V operation.

So, I downloaded the data sheet for the actual transmitter chip (KT0803M, available here http://www.sintech.com.tw/datasheet/cfp/KT0803M_V1.1.pd) , and it is pretty clear that operation is intended ONLY for 3.3 V, with an absolute maximum of 3.6V. In fact the chip has a built in regulator, but that is used for the transmitter itself, which operates at 1.8 V.

If you are using this with a 5V Arduino, the chip may have been destroyed. I know, elechouse.com claims 3-5 V operation, but I think they are hoping for the best and that you got a "bum steer".

I will cross elechouse.com off of my list, and advise others to do the same.

Thank you for that very concise and informative reply. I had been going back and forth with them and he was very adamant that I was wrong and didn't know what I was doing. He also criticized my use of the I2C scanner sketch in my troubleshooting. I will be using your above link in my next correspondence with them. I will definitely be crossing them off of my list as well. I've already ordered another one so I can get my Christmas light organ going but I will be looking around for an alternative if that one goes bad as well. Thank you so much for your help!

I replied to elechouse with the info from above and they are aware of the issue and have built new transmitters that fix the over voltage situation. They said they will be shipping two of the new ones to me at no charge. Would you like one of the transmiters jremington? I don't need two and your answer was the reason for it. Thanks again for all the help

Thanks for the offer, but I already have a small FM transmitter! I'm glad to help, so give it to a buddy. Hopefully, we helped elechouse.com become a more responsible supplier as well, and that is a reward.

Cheers, Jim

First apologize for the trouble brought to all your guys by the FM modules from elechouse.com
This module was designed 2 years ago.
We knew that the on the chip datasheet it recommends 1.6~3.6V. The chip has an LDO inside. However, in the limit testing, we kept this module working under 5V for 1 month. There is no problem. And we tested all the modules one bye one with 5V from Arduino. All work ok.
Later we understand it was wrong to wrote 5V even it could work under 5V. We need to follow the rules.
We might ignore other factors, such as that 5V might be the max voltage it could work with. Unstable 5V power supply may cause problem.
In fact, there were customers reporting that the module had problem. For those we could not help fixing the problem, we shipped again, but just in a few cases. And the new module had solved the problem.
We are upgrading this module to new version now. 2 months before, we planned to discontinue this module. However, later we decided to upgrade it . We are prepared for replacing any defective FM V1 module for our customers in the future.
If you FM module got problem, just contact us.