Better than an Xbee and cheaper Hobby King 433Mhz Radio Telemetry Kit 100mW
Ran this wee puppy at 57,600 full duplex no issues at 1/4 mile with the RX inside my neighbors brick post box. Seems to penetrate the masonry better than a 2.4Ghz Xbee and its half to a quarter of the price the price especially if you buy from Sparkfun.
Like the Xbee it resumes comms very quickly after a power cycle which is pretty essential for RC usage.
Arduino Xbee Receiver Arduino Nano V3.0 Microcontroller Board from hobby king
http://kiwitricopter.blogspot.co.nz/2013/10/rx-tx-csharp-to-arduino.html
Features:
• Very small size
• Light weight (under 4 grams without antenna)
• Receiver sensitivity to -121 dBm
• Transmit power up to 20dBm (100mW)
• Transparent serial link
• Air data rates up to 250kbps
• Range of approx 1 mile
• MAVLink protocol framing and status reporting
• Frequency hopping spread spectrum (FHSS)
• Adaptive time division multiplexing (TDM)
• Support for LBT and AFA
• Configurable duty cycle
• Built in error correcting code (can correct up to 25% data bit errors)
• Demonstrated range of several kilometers with a small omni antenna
• Can be used with a bi-directional amplifier for even more range
• Open source firmware
• AT commands for radio configuration
• RT commands for remote radio configuration
• Adaptive flow control when used with APM
• Based on the HopeRF HM-TRP radio module, featuring an SiLabs Si1000 RF microcontroller
A quick test at 57,600 Baud seems like a great product and well priced at US$29.99
XBee Pro 60mW Wire Antenna - Series 1 (802.15.4)
US$37.95 AND YOU NEED 2
An interesting price point comparison between Sparkfun and HobbyKing on another useful and in this case identical product. HK are almost 80% cheaper
Arduino 9DOF ArduIMU Controller ATmega328 (ACCEL/MAG/GYRO)
US$29.99
Same product from Sparkfun 9 Degrees of Freedom - Razor IMU
US$124.95
So HK sell this identical device for almost 80% less
Comments
I already have a Sparkfun FTDI to serial converter the ones I have has a TTL level module and one with an USB/FTDI chip not sure if you bought 2 if you can configure the 2 TTL serial modules to talk to each other or not
Just ordered one of these,
Aren't you getting the usb-ftdi interference mentioned above?
I was thinking of un soldering the usb converter and simply attaching a ftdi cable, would this work?
Depends on what you need I suppose I just like tinkering. I will give the 3DR radios a go in a boat see what happens in anger
The Xbee based definitely worked at my skill level probably at a range of 300 meters
Good work Nick,
Thanks for sharing. So do you think it is not worth doing this for full fledged RC control with xbee/similar radio module?
After further experimentation I confess the latency is awful unless you use it as a simplex connection
Cheap though could use a 433Mhz and a 900Mhz together one for control and one for Telemetry
In the end the Xbee works well with a 5:1 COMMAND/TELEMETERY ratio
Here is it working in simplex mode also loos good from around 500 meters from the laptop
<iframe width="640" height="480" src="//www.youtube.com/embed/tgKriVLnBw8" frameborder="0" allowfullscreen></iframe>
Arduino Sketch
#include String inputString = ""; // a string to hold incoming data
boolean stringComplete = false; // whether the string is complete
int com_state = 0;
int PackCount = 0;
char Packet[11] = {0, };
int TXvals[12] = {0, };
char buf[255] = {0, };
String str = "";
char *p;
int TxTemp[MAX_CHAN + 1] = {0, };
int TxVal[MAX_CHAN + 1] = {0, };
int NavVal[MAX_NAV_VALS] = {0, };
int SettingVal[MAX_SETTINGS] = {0, };
int rssiDur = 0;
int DigBits = 0;
int ComState = 0;
long PacketCount = 0;
long NoPacketCount = 0;
long Cooling = 0;
long PumpSpeed = 0;
Servo servo[7]; // create servo object to control a servo
#define MAX_CHAN 8
int AnIn[MAX_CHAN] = {0, };
unsigned long PPMtout = 20000;
long mS = 0;
void setup() {
pinMode(13, OUTPUT);
Serial.begin(57600);
// reserve 200 bytes for the inputString:
inputString.reserve(MAX_IN_STR);
servo[0].attach(8); // attaches the servo on pin 3 to the servo object
servo[1].attach(9); // attaches the servo on pin 5 to the servo object
servo[2].attach(10); // attaches the servo on pin 6 to the servo object
servo[3].attach(11); // attaches the servo on pin 9 to the servo object
servo[4].attach(12); // attaches the servo on pin 10 to the servo object
servo[5].attach(13); // attaches the servo on pin 11 to the servo object
}
void loop() {
AnIn[0] = analogRead(A0);
AnIn[1] = analogRead(A1);
AnIn[2] = analogRead(A2);
AnIn[3] = analogRead(A3);
AnIn[4] = analogRead(A4);
AnIn[5] = analogRead(A5);
AnIn[6] = analogRead(A6);
AnIn[7] = analogRead(A7);
/* RAZU-2 Six turn
This device has a gain of 55mV per amp giving a 36 Amp working range,
and a resolution of 11.3777 mA per bit with the maximum output at 5 volts
which is 1024 bits in the Arduino. By the way I should point out that
these devices on a 5 volt rail will sit around 2.5 volts with no current
flowing, so at a 2 Volt delta the out put should be around 4.5 V
*/
mS = micros();
//Calc amps
long Amps = (long)map((AnIn[1] - 512), 0, 512, 0, 36);
//Calculate cooling temp RTC on AnIn[0]
int cerr = ((int)600 - (int)AnIn[0]);
//Integrate temparature
Cooling += cerr;
if(Cooling < 1000) Cooling = 1000;
else if(Cooling > 2000) Cooling = 2000;
//Use the temperature integrator plus the motor current
//36 Amps gives us 360 bits
PumpSpeed = (long)Cooling + (Amps * 10);
//Update the outputs
servo[5].writeMicroseconds((int)PumpSpeed);
//GetSerial();
UpdateServos();
long Cyc_mS = (micros() - mS);
//ALLOW SERVOS TO UPDATE
delayMicroseconds(10000 - Cyc_mS);
//Serial.println("#,101,54,27,50,50,0,0,0,0,282,~");
}
int GetSerial()
{
//Capture the Xbee comms
int CharCount = 0;
int NumChan = -1;
while ((Serial.available()) && ((++CharCount) < MAX_IN_STR) ) {
// get the new byte:
char inChar = (char)Serial.read();
//Determine packet type
if( (inChar == 'C') && (ComState == 0) )
ComState = 1;
else if ( (inChar == 'N') && (ComState == 0) )
ComState = 2;
else if ( (inChar == 'S') && (ComState == 0) )
ComState = 3;
// add it to the inputString:
if(ComState > 0)
{
//Serial.print(inChar);
inputString += inChar;
}
if(inputString.length() >= MAX_IN_STR)
break;
//Detect end of packet
if ( (inChar == '~') && (ComState > 0) )
{
//Count packets
PacketCount++;
//Serial.print(inputString);
NumChan = ExtractPacket();
if(NumChan > 2)
{
//Tramsmitter
if( ComState == 1)
{
for(int i = 0 ;i < (NumChan-2);i++)
TxVal[i] = TxTemp[i];
//DoTelemetery();
//UpdateServos();
}//Navigator
else if( ComState == 2)
{
for(int i = 0 ;i < (NumChan-2);i++)
NavVal[i] = TxTemp[i];
}//Settings
else if( ComState == 3)
{
for(int i = 0 ;i < (NumChan-2);i++)
SettingVal[i] = TxTemp[i];
}//End of if( ComState == 0)
}//End of if(NumChan > 2)
ComState = 0;
NoPacketCount = 0;
break;
} //End of if ( (inChar == '\n') && (ComState > 0) )
}//End of while ((Serial.available()) && ((++CharCount) < MAX_IN_STR) )
return NumChan;
}
void UpdateServos()
{
for(int i = 0;i < 5;i++)
{
int microseconds = map(TxVal[i], 0, 300, 1000, 2000);
servo[i].writeMicroseconds(microseconds);
}
}
string ascii = String.Format("C,{0},{1},{2},{3},{4},{5},{6},{7},", ch1 ,ch2, ch3, ch4 , 0, 0, 0, 0);
string[] chans = ascii.Split(',');
int sum = 0;
for (int i = 1; i < 9; i++)
{
int val = 0;
if(int.TryParse(chans[i], out val))
sum += val;
}
ascii += sum.ToString() + ",~";
byte[] TXbuffer = Encoding.ASCII.GetBytes(ascii);
if (checkBoxSerialMode.Checked == true)
{
if (serialPort1.IsOpen)
serialPort1.Write(ascii);
}
else if (sock.Client.Connected)
{
sock.Client.Send(TXbuffer);
}
}
Thanks for the tip
I have not tried them long range will need to hack/wire into the PC end with the FTDI and eliminate it so I can use another ARduino for the TX anyway.
My first model with these modules is a boat in any case so not so catastrophic in the event of signal loss, the Xbee version was fine on planes but I never used more than 300 meters range I suspect
Thanks again
Those HK radios are basically 3DR radios with an annoying mini-plug and a 433MHz ground module with integrated USB - which 3DR has abandoned for a reason - the FTDI chip creates RFI around the 433MHz band, leading to range problems.
The plane above is using 2.4Ghz Xbee
These HK devices are not Xbee the 433Mhz and 900Mhz modules both seem interchangeable the air rate is variable depending on the conditions.
The fact of the matter is it does work in practice I have used the original Xbee based system a lot and it seems fine to me.
My packets are very small despite being ASCII e.g. #,127,40,127,127,0,0,0,0,421,~ so even at a low baud rate the transmission time is quite small. I have seen latency variance on an earlier WiFi remote I cobbled together but the 2.4Ghz Xbee was great in practice given the constraints I mentioned earlier regarding timing.
That said your comments are interesting
Probably in LOS, if you are talking about 38k, after 1km the speed drop significantly and the dreaded buffering start at 4800bps, read more here:
http://www.rcgroups.com/forums/showpost.php?p=15224398&postcoun...
I warned him in first page of thread, post #11, but Batman always choose the hard way... :)
Here is the code running using the 900Mhz transceiver's