Is there a cheaper alternative to xbee? (need packet mode)

Hi,

Im just about to start playing with talking between multiple arduinos over a wireless link. I think, from the things I have read that the xbee units in API/packet mode will do everything I want but they're a little on the expensive side for a newbie and certainly for a proof of concept project.

In short I need something that is:

a) cheap :) b) simple to use c) provides a good reliable connection d) allows mutliple arduinos to talk to each other e) supports ACK for data recieved

Point B is critical as I am very new to this :)

Point C is not so important right now but would be for a finished product.

For point D, the arduinos dont really have to all be able to communicate with each other as long as multiple slaves can communicate with a master and the slaves can recieve an ack from the master but it would be nice to have two way comms across all of the connected arduinos.

Any help greatly appreciated.

Why not the SeeedStudio XBee footprint compatible radios?

Or the XRF modules from ciseco.co.uk that use the same XBee footprint.

Mind you, I haven't used any of them, but the price on the XRF modules is quite appealing. They sell them through eBay too. :)

bubulindo: Why not the SeeedStudio XBee footprint compatible radios?

These look like they are dedicated TX/RX units which I will try to avoid if possible but...

bubulindo: Or the XRF modules from ciseco.co.uk that use the same XBee footprint.

Mind you, I haven't used any of them, but the price on the XRF modules is quite appealing. They sell them through eBay too. :)

I do like the look (read price) of these and are available with SMA connectors too which is appealing to me. I've used ciseco before for some 328s for a couple of standalone arduinos, they seem like good guys so I might just give these a try. At that price I don't think there is much to lose.

Thanks for the input :)

It is true that the comments on the SeeedStudio radios point to one problem with buffer capacity.

If you use the ciseco solution, please post your findings here. ;)

bubulindo: If you use the ciseco solution, please post your findings here. ;)

They are ordered so will be here in the next few days or so. I'll probably need a bit of assistance getting them running to sure to post back here :)

Sweet, I might delay that buy and go for the ciseco modules then.

Apparently, the modules are pretty much like the XBees, without the X-CTU interface software.

The XRFs arrived this morning, although I wont be able to play with them until I get home.

They are not 5v tolerant so I need to drop the voltage on the data lines. According to the datasheet I need to use a 10k and a 15k resistor on the TX from the arduino but it doesn’t mention anything about resistors on the RX. Do I need to do both?

I don’t know if I have any resistors at those values but the XRF should operate on voltages between 2.0 and 3.6 so is there some other value resistors I can use? Can I chain several of the same value resistors together to achieve the same result?

outofsight: They are not 5v tolerant so I need to drop the voltage on the data lines. According to the datasheet I need to use a 10k and a 15k resistor on the TX from the arduino but it doesn't mention anything about resistors on the RX. Do I need to do both?

The XBees are the same. So this isn't really a difference, I guess.

outofsight: I don't know if I have any resistors at those values but the XRF should operate on voltages between 2.0 and 3.6 so is there some other value resistors I can use? Can I chain several of the same value resistors together to achieve the same result?

You can chain resistors in series to obtain the voltage you want and create an equivalent voltage divider. As long as you use resistors in the tens of Megs (so you don't take up too much current) to create the ~3.3V it is ok.

bubulindo:
You can chain resistors in series to obtain the voltage you want and create an equivalent voltage divider. As long as you use resistors in the tens of Megs (so you don’t take up too much current) to create the ~3.3V it is ok.

Thanks, can I just use 2x 4.7k in series as a substitute for a 10k resistor, 9.4k is close enough surely? I don’t know how much current that would draw though.

I = U/R = 5/25000 (two resistors...) = 0.0002 A

Good enough?

bubulindo: I = U/R = 5/25000 (two resistors...) = 0.0002 A

Good enough?

Perhaps... if I knew what any of that meant :blush:

Not that much. Don't worry.

KE7GKP: It is only the RATIO of the resistors that determines the voltage reduction. Ignoring other factors, a 3 ohm resistor (lower) and 2 ohm resistor (upper) will divide 5V down to 3V. And so will a 15K resistor and a 10K resistor. Or a 30 mega-ohm (30M) and a 20M resistor.

But the actual RESISTANCE has other implications. You wouldn't want to use 3 ohms and 2 ohms because that string of (total 5 ohms) would draw 1 amp @ 5V! Clearly, not a "low power" solution. OTOH, the 15K/10K combination totals 25K and that 25K draws only 0.0002 A (200 micro-amps). And at the other end of the spectrum the 30M/20M is typically too sensitive to external resistances and the voltage can be "overloaded" by the input impedance of whatever it is trying to drive.

So resistors somewhere in the 10K ~ 50K range would seem optimal to knock 5V down to 3V at low power.

Here is a page that shows the circuits and gives an online calculator: http://hyperphysics.phy-astr.gsu.edu/hbase/electric/voldiv.html

Ok, thanks for this. I'm very new to electronics so all this is giving me a bit of a headache (especially that link you provided) but your reply at least allows me work out the current draw of the resistor values. I know this has gone O/T now but I am keen to find out more....

  • How do you know that 3ohm and 2ohm divides 5v to 3v, given an input voltage and a required output voltage is there some simple formula used to calulate the resistance required?
  • What does (lower) and (upper) signify (assuming that one of them is the resistor connected to gnd?)
  • If 25k was achieved by chaining 5 x 5k resistor in series, the current draw would still be 0.0002 A right?

KE7GKP: Think about it this way. If you have a string of five 1-ohm resistors, and you connect 5V from end-to-end, there is 1 volt across each resistor. So there is 2 volts across 2 ohms, and 3 volts across 3 ohms. If the "lower" resistor (the one connected to ground at the bottom) is 3 ohms, and the "upper" resistor (the one connected to 5V) is 2 ohms, then there is 3 volts across the 3 ohm resistor, and 2 volts across the 2 ohm resistor. Except in rare cases, all voltages are measured with respect to circuit ground/common.

Ok, so in the case of the XRF module, the datasheet shows a 10k upper on the TX line and a 15k lower to ground. So that's taking my data line voltage to 2v if I understand correctly.

Given that the only suitable resistors I have here are 4.7k if I chained two together for the "upper", that brings my data line voltage to 1.88v (9.4k/5v) which is not enough, I need at least 2v. So adding a third 4.7k resistor gets me to 2.82v (14.1k/5v) which is fine but now Im stuck with how deal with the remaining 2.18v. If I just use two 4.7k reistors on the lower, does the remaining 0.3v go across the upper, taking it to 3.12v which would still be fine.

I must be misunderstanding this, how can adding more resistors increase the voltage, surely this would decrease the voltage instead? Sorry to be a pain but I'd rather be sure than pop these new XRFs

Ahhh, I think I understand now...

Vout = Vin x R2 / (R1 + R2)

So, if I have two 4.7k in series as the upper making R1 = 9.4k, then three 4.7k in series as the lower making R2 = 14.1k I have

5 x 14.1 / 23.5

Makes Vout = 3

Andthe difference between 4.7ohm resistors as opposed to 4.7k ohm would only relate to current draw and not affect the voltage division at all?

Yes/No/Maybe?

:)

outofsight: Andthe difference between 4.7ohm resistors as opposed to 4.7k ohm would only relate to current draw and not affect the voltage division at all?

Yes/No/Maybe?

:)

Yes.

Hoorah!

Ironically, after all of that I don't have enough resistors to get two voltage dividers going anyway but I did at least learn something along the way.

Sorry for not making things clearer before. :$

outofsight: Ahhh, I think I understand now...

Vout = Vin x R2 / (R1 + R2)

So, if I have two 4.7k in series as the upper making R1 = 9.4k, then three 4.7k in series as the lower making R2 = 14.1k I have

5 x 14.1 / 23.5

Makes Vout = 3

Andthe difference between 4.7ohm resistors as opposed to 4.7k ohm would only relate to current draw and not affect the voltage division at all?

Yes/No/Maybe?

:)

Forgive me if I'm wrong but it's not clear to me that you have seen/learned "Ohm's Law". It's fundamental to almost all conversations here! Current = Voltage / Resistance and related Power = Voltage * Current

If you havent, google "Ohms Law", there are some good tutorials out there.

Cheers, John

KE7GKP: And if you're just looking for a quick 'n' simple Ohm's Law calculator, I have this on my website (along with a few others):

http://www.rcrowley.com/eirp.htm

Hmm Ok I will need to look into ohms law then. Just when I thought I had it sussed :)

More resistors should arrive tomorrow so I should be able to get some time to play with the XRFs soon. Will post back my findings but it all looks quite simple really. Presumably I'll need to use NewSoftSerial.

The only thing Im not sure of is that the XRFs will all be on the same panid, the XRFs dont seem to support packet mode but they do handle retransmit. Not that I dont trust the retransmit capability but I want to be 100% sure that the receiving arduino got the correct data so I need to do a few things.

1) Checksum on the receiver 2) Transmit ACK back to sender

For point 1, I can use XOR right? I did read something about that briefly but I may have been lightly intoxicated at the time :)

Point 2 im not sure about, all XRFs are on the same panid, so any ack sent back will be seen by all arduinos. They dont seem to have an individual network address to match against.

My initial thoughts are to generate a UUID to send to the receiver and include this in athe ACK reply. Is there an easy way to generate a UUID so any arduino that did not send the data can simply check the uuid and ignore it if not relevant?