New Project involving Xbee modules

manie

Senior Member
With the success of the Mosfet running well, I must now move on to the TX/RX thingy. I've downloaded all datasheets from Rev-Ed and Digi-Xbee. I think I've gotten the gist of it, Picaxe at 5V, Xbee at 3V etc. with dividers and so on... I've bought 3 modules (1mW) from Rev-Ed, one as "master", one as possible "repeater" half way, one at PC/Picaxe side. I need to cover about 100 to 150m distance. I have the wire antenna modules. I will connect to a 40x1 "master" and a 28x1 "slave"/PC side.

Do I need to connect the Xbee reference voltage ?
What MUST I ABSOLUTELY look out for to prevent damage ?
How do I determine what and "how to" use as Ground Plane ? The Xbee will sit on the raised 2mm pitch Rev-Ed SIP header pins.
Do I need to "install/insert" something to assist the antenna with "ground plane" for max distance ? Any push in a direction to search or get to a site where this is explained will help.

Thanks in advance
Manie
 

Dippy

Moderator
Minimum connection is Power, ground DIN and DOUT.
You've obv sussed the level shifitng to DIN if PIC@5V.
Reset is optional but may be worth connecting. Note it already has a pullup. So connect it via a diode or tranny to be really safe.

Obviously double-check your 3V of 3V3 supply before conenction.
Have a good ground.
And double check your PICAXE Pin i/o direction before connection so you dont shove 5V direct into XBee.

Ref Pin is only if you are using the XBee ADCs.
(Section 1.5 of the 2006 Data Sheet)

Antennas: I reckon this would be a good start.
"Antenna Options: The ranges specified are typical when using the integrated Whip (1.5 dBi) and Dipole (2.1 dBi) antennas.
The Chip antenna option provides advantages in its form factor; however, it typically yields shorter range than the
Whip and Dipole antenna options when transmitting outdoors. For more information, refer to the “XBee Antenna” application
note located on MaxStream’s web site (http://www.maxstream.net/support/knowledgebase/article.php?kb=153)."



But first get hold of the BIG 70 page XBee Data Sheet and read through it just in case you need/want to use any of the other pins.
And check for any App Notes - these are sometimes really handy crib-sheets.

I don't know if the latest versions have different defaults, but the recently purchased XBees I got worked straight away without any AT fiddling.

Was it Stan who used various kitchen items to improve the range? Was it a saucepan or something equally technical?
(How did NASA get on with Moon-Earth comms before Tefal?)
 

manie

Senior Member
Thanks Dippy, downloaded both. Manual is 1.4Mb ! Will wade through it slowly. I don't see mention by Xbee of the "ground plane" whereas HopeRF does to the extreme... seems one may get up to 500m with 1mW visual line of sight/whip(wire) antenna... looks promissing. The last pin function table I downloaded showed A/D and DIO pins as "not used at present". Now it seems these pins are operational, is that right ?
Manie
 

Dippy

Moderator
Sorry, I don't know.
I would have assumed that if the Data Sheet says so then...

If you have a pair then give it a go.
I only used them to send reliable data.
All the hard work was done by a PIC connected in (probably) the exact way you propose to.
 

manie

Senior Member
Output from the 40x1 pin7 (leg 33) via a divider made up of 10K to 40x1 pin7/10k to 22k junction to Xbee input pin (leg2)/ 22k to 0V will give 3V (+-) to Xbee yes ??

Output from Xbee (leg3) to 40x1 input portc pin5 (leg24). This pin pulled down via 10k OK ?

Heck, I waited 14 days for shipment and customs, paid VAT and import duty etc. I don't need to blow anything do I. All your help really appreciated.
Manie
 

BeanieBots

Moderator
Paralleled 7812's and 7805's??
What's that all about then?
Not a good idea, their voltages are not exact so only one will ever supply current.
If you are concerned about current, then look at the "S" versions.
If you are concerned about heat, then fit a heatsink and/or a dropping resistor.
If you are concerned about reliability, what you have is LESS reliable.

Got a schematic to go with that?
Don't see any bypass caps on them either!
 
Last edited:

manuka

Senior Member
Manie: Just jog our memory- what are you trying to do & at what data speeds? Do you really need the horsepower/costs & setup issues associated with ZigBee? Rev. Ed's 1mW XBee ZigBee are extremely influenced by almost anything in the transmission path- their claimed 200m range is very LOS, & needs to be totally clear of such obstructions as birds & vegetation. Here in NZ early 2007 we indeed managed several km (over still sea water) using ~12dB gain "wokfi" scoops either end however - easy! Such a 24dB system gain was equiv. to 2x2x2x2 =16 times the omnidirectional range, justifying our .2x16 = 3.2km. Stan
 

ciseco

Senior Member
Manie, an easy solution (if you can) is to run the 40x1 at 3.3V then you'll need no level shifting.

Going lower will help save power too. I've gone down to 2.4 without problems on the 16F886 (the foundation PIC of the 28X1)

Miles
________
vaporizer help
 
Last edited:

cvrwy

Member
Manie, my project demands that I send data, in both directions, between two 28x1 microcontrollers. I'm using two Xbees for the wireless link. I've found that using a resistor voltage divider in my hardware, I can send data to an Xbee. Try as I might, I could not do the opposite; move data from the Xbee's 3.3v port to the 28X1.

So, the only way I could move data to the 28X1 was through a level shifter. I finally chose the dual channel ADuM1201 chip, it, so far, works flawlessly.

Make sure your system works on a breadboard before you glue things to a PCB, it will save you a lot of grief.
 

Dippy

Moderator
I'll 'second' cvrwy's final sentence.

Does that FET on the XBee-Dout to PICAXE-in line work?
Just strikes me as an odd way to level shift. But if it works 100% over your intended temp range then abs fine. Obviously you will have breadboarded this method and given it thorough testing at the target voltage, so I needn't ask about that.

That was the only thing that caught my eye on your artwork - sorry I really haven't got a spare hour or two to check properly. (Note: personally, I find those choices of track colours hard to view easily.)

As you now know, if you had used a TTL input on the PICAXE then it would be direct Dout to PICAXE-in.
It's a combo of 'know thy subject' and 'forward planning'.

If it works reliably then fine.
CISECO's suggestion of running everything at XBee voltage is the safest way and cuts down on component count too - if the design can hack it.

A couple of the resistor pads (almost in the middle of the artwork) look uncomfortabley close - but I don't know whether the poor resolution/shape of thr pad is just in the posted image or your final artwork.
 

ciseco

Senior Member
cvrwy's issue was I suspect an ST input as mentioned earlier in the thread.

My understanding is that an ST input requires a voltage greater than 80% of the voltage the actual microcontroller runs at, the minimum therefore to not need any shifting means running the 28x1 at 4.125v or below instead.

cvrwy I fell into the same trap when I started, drove me up the flippin' wall as the PICAXE I had, strangly sort of worked, took me weeks before I think hippy pointed out the ST input being the likely culprit :)

Dippy is a little harsh there "It's a combo of 'know thy subject' and 'forward planning'." (I'm sure I'll get shot here)

Bu66er it throw caution to the wind, learn by failing it's quicker and much more exciting, planning to suceed, mmmmm often stays in planning I find :)

It's like going out to wash the car

you start, it rains, you finish wet but job done OR
you look out the window, it looks grey, you wait, still looks grey, you wait....to infinity :)


PCB wise, wouldn't personally bother with reset you'll never need it unless you mis-firmware the Xbee, your circuit wont support firmware updates. It's very hard to read lie dippy says, a schematic would get more response I'm sure



Miles
________
cloudy trichomes
 
Last edited:

manie

Senior Member
Sheez, have to retype everything !

BB, I've used parrallel regulators before, "just in case I need more current" sort of... What about a pass tranny then ? Problem is you loose temp and short circuit protection. As for the by-pass caps, well spotted ! I laboriously hand routed the 3V to two sets... fixed now, all regulators are de-coupled...

Manuka, I want to control a chicken-house environment, I can do this with one board without the Xbee I know. However, the present system used sounds an alarm for temp. out of range REGULARLY ! The chicken-house is +- 150m away behind security fences, this is a problem for the owner... (manually operated air flow curtains). So, in comes Xbee... this is to mimmick chicken house conditions in the owners study. I hope to be able to transmit corrective settings back to the chick house or at least acknowledge the alarm received.

Dippy, "getting to know you..." (there goes my age again !) to plan better will take so looooong... but that is what this thread is about, I've already learnt about the TTL/ST mistake now and can thus do something about it before having to rebuild. Whether the level shifting mosfet will actually work I don't know.... It was what I thought about doing but there is hope in another chip.

JohnM, downloaded the datasheet for that ADuM1201, all 28 pages of it ! Seems very involved though, is it ? Making sure is what this thread is about, its a lot easier to do a new layout and fix on paper than it is to rebuild because it won't work !

Miles, there are loads of other sensors I require that seems to favour 5V, so I do need 5V for that. Worth a possible llok to see if it eases design though.

As for "more response", the response is fantastic ! Thanks.

As for a schematic, then I have to do it twice don't I ? I just dive into the deep-end and do the schematic as a layout straight away.It's the way I "see" it on the PCB and thats how I understand it. The routing I also do manually. Is that stupid ?
Manie
 
Last edited:

manuka

Senior Member
Manuka, I want to control a chicken-house environment, I can do this with one board without the Xbee I know. However, the present system used sounds an alarm for temp. out of range REGULARLY ! The chicken-house is +- 150m away behind security fences, this is a problem for the owner... (manually operated air flow curtains). So, in comes Xbee... this is to mimmick chicken house conditions in the owners study. I hope to be able to transmit corrective settings back to the chick house or at least acknowledge the alarm received.
Are these baby chicks? Dippy is no doubt already rustling up suitable jokes, but I reflect "~150m behind security fences" will NOT be 1mW Xbee friendly,even with a (solar?) repeater. Have you done initial proof of concept reception trials? At 2.4GHz a 1mW signal is hugely attenuated by almost anything in the transmission path. Perhaps consider "wokfi" reflectors- we managed 3km over water this way, but in more cluttered trials (wooden buildings & light vegetation) were often struggling 20-50m with bare Xbee antenna.

How often is the temp. being monitored & settings tweaked? ZigBee B/W initially seems an overkill...
 
Last edited:

manie

Senior Member
Manuka, probably not but that is why I got THREE modules, in case I need one as a repeater half way...

Dippy, at least I really looked at the Xbee specs and their quoted distances sounded optimistic. Does that qualify for forward planning ?
Manie
 

manuka

Senior Member
As Dr_A in rural Australia will readily verify, repeaters have their own overheads + solar panels & batteries etc. I strongly recommend conducting site survey reception trials before you go any further. Over the years (ham-professional-military) I've run across numerous projects where backroom designers just assume wireless signals will get thru'. FIRST DO A DECENT PROPAGATION PROOF OF CONCEPT!!!

Footnote-just one of those past sagas. While on a army exercise some 30 years back I recall our unit being totally bushwhacked in mountainous NZ rain forest, with the $$$$$ Vietnam war era AN/PRC-xx ~70 MHz whip antenna radio gear totally useless. We eventually managed link up comms (via a surprised distant civilian & phone patch) using a $$ handheld CB set & convenient 26MHz ionospheric "skip" that came to the party.
 
Last edited:

Dippy

Moderator
Blimey, I'm surprised Manuka didn't comment about laying up a PCB without testing 'unusual' bits on breadboard.

No testing and straight to artwork is very ...... brave, yes, that's the word ;)

Anyway, whatever you are comfortable with - we all have our little foibles.

Xbee range: ah, more info. Yup, like Stan says.
Good luck - you never know...

Rule No.1.
NEVER take claimed radio ranges as accurate. And 'line of site' usually means that it was tested on the far side of the moon, downhill.
 
Last edited:

Dippy

Moderator
What I want to know is:
1) Is that a 'repeat' pun by Stan?
2) Has he gone daft?
3) Or is he keen on you relising that repeaters have their own overheads and that he strongly recommends you carry out a site survey?
 

manie

Senior Member
What I want to know is:
1) Is that a 'repeat' pun by Stan?
2) Has he gone daft?
3) Or is he keen on you relising that repeaters have their own overheads and that he strongly recommends you carry out a site survey?
I took note of the REPEATER.....:rolleyes: Problem with on-site test is this:
1. I have to IMPORT two or more serial transcievers...
2. That means I have them....
3. Which means I might as well forego the loose breadboard wiring and build something a bit more reliable.....
4. Now I can do site testing...
5. It works... fine....
6. It does not work.... I have three Xbees for other stuff
7. So what do I look at then ? A 10W walkie-talkie ? Catch 22 here. You have to build something to test it. If the Xbee is not enough then at least I have the controller to do the menial tasks and still sound the alarm for inspection when required.

Wat is one to do ?
 

manie

Senior Member
The spectrum should at least be fairly uncluttered, save for some family cell phone use possibly early evening and then nil. It is on a farm, should be quiet ??
Manie
 

manuka

Senior Member
Manie: Just where in this wide world are you? Most 2 way 'walkie talkies" sets are just ½ Watt & on ~470 MHz. Although on UHF these will be a guide, but perhaps do 2.4GHz site trials using a WiFi AP & laptop on walkabout?
 
Last edited:

cvrwy

Member
Manie, use of the ADuM1201 is very simple, no other components are necessary. Here's how I connected it in my Project.......John M.

 

manie

Senior Member
John. got this...

Invalid Attachment specified. If you followed a valid link, please notify the administrator
 

cvrwy

Member
Manie, do a right mouse click to get a menu, try to open from a menu item. If that does not work, use "Save link as" and you can save the sketch on your computer.
 

manuka

Senior Member
Nogo for me in NZ too. Manie: I assume S.A is Sth Africa - in our part of the world it's Sth Australia. Do that wireless test or you'll run the risk of having egg (at least!) on your face...
 

manie

Senior Member
Manuka, its hard to get egg on your face if you're willing to try some. I already must have some splashes because I went and bought three modules before asking. Thing is the only way to see if it works is to try the actual unit in the actual job, or thats how I see it. As for trying with WiFi etc. there is NIL there to try on... maybe just B/tooth phone to earpiece is what I have, but I already know with that I get range as good as it gets on that farm.

John M, thanks for the pic, its really quite simple, why the involved data sheet then ?

I have a feeling this project will go well, it might not achieve the final goal due to Tx/Rx range problems, but it will do something at least.

If the range is a real issue, what is the next module tx/rx system one can look at ? What about the Xbee Pro ? 60mW power there.... are they available from Rev-Ed ? Will that have better range or must one look at the VERY expensive modems from Hope ??

Nothing happens easy does it ? Nothing like a good challenge though...
Manie
 

Dippy

Moderator
If size/compactness isn't an issue why not consider 434 , 458 or 869MHz stuff?
(Even if you have to use seprate Rx/Tx modules it' no big deal).
(Maybe Stan will send you a couple of HOPEful modules; he must have dozens of freebies for all the plugging and free advertisng he's been giving them. Personally, I'd use modules which haven't had such long threads about strange operation.)

You may need a couple more lines in your code, but it's easy.

I take budget isn't an issue if you are considering XBee pro? ;)
Have you checked the XBee-PRO 868?
If you used those you could move your chicken shed futher away.

Manie: Stan was desparately trying to get in a chicken-related gag, so he didn't mean egg on your face rudely.
Though with gags like that he really is walking on eggshells.
 

manuka

Senior Member
Manie: Cheap 433 MHz data modules were just made for PICAXE wireless work, & it's long been recommended that you start wireless data work with them.

Dippy: The "yolk's" on you, as although it may seem I've been plugging HopeRF, Forum postings are a mere fraction of the work a bunch of us colonials have put in considering superior offerings in this field. We indeed now have quite a stash of very diverse UHF data hardware-much of it purchased. Dr_A is probably best suited to comment,as it's largely his baby- in this project I've just "made the tea & answered the phone".
 
Last edited:

moxhamj

New Member
Just catching up on posts over the last 24h- the realities of life dictate that one must have a paid job too and my paid job pays well on weekends but doesn't provide internet access at work. I guess they want me to actually work!

Ok, you want to send data from a to b, and you want to send 10 bytes, and a and b are less than 50 metres apart. Well, I'm going to second Manuka's comments and suggest cheapie 433 modules. Ie the ones that cost only $2 to $3 each. Go to Stan's site here http://www.picaxe.orconhosting.net.nz/ and scroll down looking for references to "wireless". Especially his little article (which was in the mainstream press) about wireless picaxe repeaters. It is the one that got me into picaxes and wireless in the first place. Brilliant in its simplicity.

I believe it helps a lot to get that sort of project working first. You can follow the recipe, it only costs <$20 to do the experiment and you will learn a lot along the way.

Then, it is a matter of defining the problem. What is the range? What sort of obstacles are in the way? Is this always going to be just two modules talking, or is there any chance it might grow to more? Are you only sending one or two bytes or might it grow to sending bigger files, eg .jpgs or massive datalogger files?

Xbee ought to easily be able to provide this function. As can other solutions.

@Dippy, Hope is soooo 20008. Yishi is the new 2009 exciting shiny model (well, at least till we fickle colonials move onto something shinier next week.) Yishi are the first drop in replacement for a wired 1200 baud connection apart from xbee. Tested with picaxe. Tested with sending entire CP/M source files such as wordstar. The secret is having a 256 byte buffer instead of the much smaller Hope's 32 byte buffer. Yishi also make a range of modules from 10mW to 500mW that are all intercompatible. I'm sure there are other modules out there too. Those Farnell ones looked great - just got to wait for the UK pound to go down a teensy weensy bit further. There was a brief time in the late 70s when the UK pound, US$ and Aust $ were all about the same. Those were the good old days.

Anyway, Yishi are reliable enough to justify getting 100 little adaptor boards made. See attached. One board can be configured in at least 4 different ways, eg with male or female D9 plugs and onboard or off board regulation. Looking at getting local distributers now.
 

Attachments

Last edited:

manie

Senior Member
WOW, talk about info overload ! OK, here is what I think, please comment...

1 The PCB ("artwork" it was called ?) will be scrapped/deleted/not used etc because:
1.1 I see that I need the Xbee OFF the main board
1.2 I have purchased some 290mm diam. fine mesh s/steel food covers = "STRAIN-fi"
2 I will play some here at home (also a farm) with just Xbee and 28x1 project boards to:
2.1 Familiarise myself more with Xbee and serial interface 5V/3V etc
2.2 Determine maximum RELIABLE TX/RX distance starting with "strain-fi" between 2 points
3 Get to grips with connector to (ouput back to input = ???) make one repeater to:
3.1 Get "strain-fi's" (2) onto repeater, one on master/repeater side and one on the
other slave/repeater side
3.2 Establish the max distance via repeater between "master" and remote "slave"

Each of these will be powered by 5V and 3.3V regulated as required.
The U-processor board of each will feed its Xbee via copper, shielding required ?
I will get the Xbee part as high as possible to improve visual LOS contact as well as with light and heavy tree cover etc.
Will I need Max chip or serial "booster" if copper is long ? In other words, how far can the Picaxe reliably send/receive serial data to/from Xbee (metric or imperial measure)

Stan, I have been swayed ! No eggs ? Yes ! No "yolk"......

As I've said, this project WILL work as best it can, I've read 1/2 the Xbee manual already !!!!:rolleyes:
 

moxhamj

New Member
Sounds a great plan. Nothing beats experiments. Then write it up and put it in the "completed projects" section.

I don't think you will need any booster chips if the copper is long. I've got 100 metres of twisted pair copper wire running happily round the place at 1200 baud. So going 2-3 metres up a pole should be fine.
 

manie

Senior Member
I have just installed my first "Strain-fi" USB modem antenna assist ! I tell you, signal strength seems to be the same, however, the pageing/update speed has improved two, maybe three fold. Another convert ! "Wok-fi" or "Strain-fi" does seem to work, data rates are OBVIOUSLY BETTER ! Thanks Stan...
Manie
 

manuka

Senior Member
Manie: Shoot us some pix, or at least a Google Earth. You've not mentioned just how much data & how frequently it's sent.

Aside from the restricted LOS range of the 1mW XBee, I repeat that 2.4GHz ZigBee technology (which of course has up to 250kbps capabilities) may be an overkill for simple wireless work involving just occasional temperature values. It's akin to using a nifty hybrid car ( with all it's hi tech features) to nip down to the shops for some milk, when just a sturdy push bike would do.

Dr_A: You're too kind. For general 433 MHz work I advise the Jaycar ~US$5 tx/rx pair- check a simple setup below. If you don't have a UHF scanner, this non data tone tx & band monitoring receiver is handy for initial 433 insights/range testing/interference chasing etc.
 

Attachments

Top