Shop OBEX P1 Docs P2 Docs Learn Events
XBee 900HP Module range and questions. — Parallax Forums

XBee 900HP Module range and questions.

markustermarkuster Posts: 184
edited 2014-02-03 14:26 in Accessories
Hi,

Just to know if is it true that the range of this XBee 900HP Module is
9 miles using a dipole antenna.



The second question:

I need to turn on and off a motor with a pump ( about 4 miles distance ) but I would like to add a current sensor
near to the motor to know if the motor is really working sending back the current consuption
using the second XBee 900HP Module.


The motor is big 110 volts 25 amp.

But my question is you have some idea about the materials I need:

2 x XBee 900HP Module.( parallax item)
2 x dipole antenna ( parallax item)
2 x basic stamp ( parallax item)
1 x current sensor ( sparkfun item)
1 x serial display to read the current consuption.( parallax item)



I think that a current sensor like this could work:
https://www.sparkfun.com/products/11005

Do you think those items are enough adn do you know if the XBee 900HP Module
is compatible with the Basic Stamps , Do I need and adapter for the XBee 900HP Module?


Thanks,
.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2013-11-07 15:22
    You will need an adapter http://parallax.com/product/32402 if you are connecting to a 5v device. For connecting to a PC try this one http://parallax.com/product/32400 .The 9 miles is a Digi statement
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-11-07 16:24
    What you're proposing to do is one of the reasons we are carrying the 900HP modules. I have had customers ask before how they can control VFD pumps in the fields of farms and in similar situations. The answer is yes, you can. As long as the current sensing device can communicate with the BASIC Stamp Module it can handle the task. But I would consider using a couple of Propeller microcontrollers instead because systems like this really require a level of safety and that means good communication which will be limited on the BASIC Stamp Module while it is doing other things.

    As for range that is the specification from Digi and I have not yet had the opportunity to put it to the test, though where I live (farmland) I could probably at least test it for several miles. Nonetheless as I have explained to others you must remember that while the internal protocol of the XBee Module ensures that the data gets through uncorrupted, it cannot verify that the data has been received. You must add your own higher level protocol that ensures commands sent are received and allow a timeout for lack of communication which can safely handle shutting down equipment if need be. It is easy to cause damage to a system if you lose control and have not accounted for that in your safety routines.
  • markustermarkuster Posts: 184
    edited 2013-11-08 13:33
    Hi ,

    Chris :

    I don't understand why a Propeller is better than a Basic Stamp for this application.
    Could you explain please?

    Thanks
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-11-08 13:43
    The BASIC Stamp Microcontroller (like most others) is a single-tasking controller. When it is executing an instruction it cannot do anything else. Because of the interpreted nature of PBASIC you can't multi-task very well either. What this means is that when the BASIC Stamp is executing an instruction such as PAUSE or even SEROUT or doing any number of things it cannot receive serial data. Since there is no FIFO buffer anything that comes in while the BASIC Stamp is busy is lost. In your situation you may have your pump receive a command to shut off while it is busy measuring the current in which case it will never see the command and will continue running, possibly causing damage.

    The Propeller microcontroller, unlike most others, has multiple cores and can execute multiple programs at the same time. It can send and receive serial data at full duplex (the BASIC Stamp is limited to half duplex) and can receive this data even if it is doing other things at the same time. This makes the Propeller extremely useful in situations where it is critical to be able to do multiple tasks without interrupts or multitasking. Interrupts do just that, they interrupt the main code to execute a routine, picking back up once that routine is complete. Multitasking is time sharing as is similar in that something may get missed.

    Whenever there's the potential for safety or damage to equipment or property it is important to re-evaluate the control system and to implement sufficient safety protocol into the hardware and software.

    Don't get me wrong the BASIC Stamp is quite a capable microcontroller and I personally have made it do things others said couldn't be done. But in this case I would say the Propeller is the better solution.
  • markustermarkuster Posts: 184
    edited 2013-11-08 14:32
    Hi Chris:

    Of course if the job need speed I think the propeller will be the solution.
    But I thought that Basic Stamp could work better near a big motor since it works at 5 volts.

    Propeller doesn't have something like a noise supresor or noise filter , just more speed and multitasking.
    And I think that a faster and mutitasking micro. has the same noise problem than a Basic Stamp .

    Your opinion about the noise will be usefull , thanks
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-11-08 14:44
    Noise is going to be a problem for either system if you don't account for it. The BASIC Stamp doesn't really have any advantage in that sense. Even at 5V you can cause the BASIC Stamp Microcontroller to glitch with EMI/RFI noise. Long leads, inadequate filtering and proximity to the microcontroller can all cause issues. Bigger issues can sometimes be solved with a Faraday cage or a shielded enclosure. Isolation is also an option.
  • trookstrooks Posts: 228
    edited 2014-01-31 22:07
    >
    What you're proposing to do is one of the reasons we are carrying the 900HP modules. I have had customers ask before how they can control VFD pumps in the fields of farms and in similar situations. The answer is yes, you can. As long as the current sensing device can communicate with the BASIC Stamp Module it can handle the task.<

    You quickly put your finger on the gist of his problem.

    >> But I would consider using a couple of Propeller microcontrollers instead because systems like this really require a level of safety and that means good communication which will be limited on the BASIC Stamp Module while it is doing other things.<<

    You are a good company man.


    >>>As for range that is the specification from Digi and I have not yet had the opportunity to put it to the test, though where I live (farmland) I could probably at least test it for several miles. Nonetheless as I have explained to others you must remember that while the internal protocol of the XBee Module ensures that the data gets through uncorrupted, it cannot verify that the data has been received.<<<


    You give very good advise.


    >>> You must add your own higher level protocol that ensures commands sent are received and allow a timeout for lack of communication which can safely handle shutting down equipment if need be. It is easy to cause damage to a system if you lose control and have not accounted for that in your safety routines.<<<


    You save the best for last.

    I plan to do something similar using XBees or maybe similar devices. AIUI I would have less memory to work with using a propeller.

    Since there will be Basic Stamps at both ends of this link I would program them both to cover a loss of communications.

    First you have the base send a wakeup at timed intervals and wait for a response from the remote. The base sends X number of wakeups and failing to get a response then sets a local warning. I would have the warning repeat at intervals until communications are reestablished or the owner turns it off.

    The remote has a long enough timer interval from the last communications so that if the timer runs out and it tries to contact the base in the same manner. Then it turns off the motor and waits for communication from the base.

    At this point I would have suggested that the customer consider adding an over temperature sensor to his motor. Does the company have anything to offer in the way of sensors of that nature?

    At this point if I may I would like to pose an additional question or two. Is there any form of hand shake between the XBee and the Basic Stamp and is there no storage capacity in the XBee for at least one packet. Having that capacity in the XBee would save me having to introduce buffers that will wait for the Basic Stamp to call for the data. Am I wrong in my understanding that the XBee is going to insist on some form of packet format for data transmission?

    Thanks in advance to any and all with information, advise or thoughts on this,

    Tim
    - "If tyranny ever comes to this Republic it will be in the guise of fighting a foreign foe." - George Washington
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-02-03 09:07
    Handshaking between the BASIC Stamp and XBee Module itself is accomplished with flow-control. There are RTS/CTS pins on the XBee and the BASIC Stamp can use those to control the flow of data. XBee Modules do have an internal buffer. From the XBee product manual (802.15.4):
    Hardware Flow Control (CTS). When the DI buffer is 17 bytes away from being full; by default,the module de-asserts CTS (high) to signal to the host device to stop sending data [refer to D7
    (DIO7 Configuration) parameter]. CTS is re-asserted after the DI Buffer has 34 bytes of memory
    available.

    I hope this helps.
  • trookstrooks Posts: 228
    edited 2014-02-03 11:23
    Handshaking between the BASIC Stamp and XBee Module itself is accomplished with flow-control. There are RTS/CTS pins on the XBee and the BASIC Stamp can use those to control the flow of data. XBee Modules do have an internal buffer. From the XBee product manual (802.15.4):



    I hope this helps.


    Thanks Chris,

    This is really helpful.

    Is it possible to get my hands on a hard copy of this manual?

    By the time I can remember where I put that download I could have pulled the manual off the shelf and be reading what I need to know. Some old dogs do eventually begin having problems 'remembering' all the new tricks they have learned.<sad grin>

    Tim
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-02-03 14:26
    Tim,

    The manual for each XBee Module we carry is linked on the product page to the actual file on the Digi website, that way you're always getting the most up to date manual. I just went to the first XBee product on our website and went to additional resources and selected Product Documentation. I knew the XBee had an internal buffer so I did a quick search of the PDF document for 'buffer' and found that. I hope this helps.
Sign In or Register to comment.