Martint BuildYourOwnDrone.co.uk's Posts (16)

Sort by
Distributor

3689484877?profile=original

I have been talking with Lorenz Meier about the PX4 and wanted to add a very quick blog post for the UK & EU PX4 Autopilot users, I have added the PX4 FMU to the store in the past few days, the range of connectors and cables will be growing long with any other parts that are needed in the future.

I have also managed to source the AR Drones 1.0 shells which means that you can add the PX4 direct into the AR Drone and be up and flying without the need to strip out the parts they normally come with! I hope this will help with quicker shipping inside the EU for all parts PX4.

If you have any other "needs" or "wants" please do let me know as I will be looking to stock all the PX4 parts in the near future.

Regards

Martin.

Read more…
Distributor

Yesterday a few  of the UK Ardupilot group (Malcolm, Dean & I) arrived at a flight field ready to take a look at and test the DJI Innovations WKH on a traditional Heli, this was installed on a Spectra petrol Heli, it was sent out to hold its position in GPS ATTI mode, we filmed the Spectra to show how it got on! Dean had his OctoCopter there so we tried the "point of interest" function on the DJI Wookong M to add a new angle to the video & show the WKH in position hold.

 
Both the WKH & WKM both performed without fault, the WKH held the traditional Heli in position from the start of the video until the end without pilot intervention!


One the more interesting points about the WKH and the Heli was the level of vibration coming from the engine which was very high frequency, if you have ever flown Nitro / petrol engine planes before you will know how much vibration is produced from these single piston engines. The WKH IMU did not seem to mind any of these vibrations passing through the frame. At the start of the video you will see the IMU is placed within a few cm of the engine.


We also tried the Atti mode and it worked just as well as GPS ATTI, the Heli was very stable and easy to fly in all modes including "manual".

 

Regards

 

Martin.

Read more…
Distributor

wookong-m_fullset.jpg?width=500

 

Today I had notification that there will be some new features coming in a firmware update for the DJI Wookong WKM, the latest V5.10 will be out in the next few weeks and sees some interesting additions, email from DJI:

Details of WKM new firmware 5.10

What’s changed?

  • Enhance wind-resistance when hovering.
  • Increase gimbal servo output response time and angle.
  • Gimbal pitch stability while X3 is for stick monitor or switch go-home.

 

What’s new?

  • PPM Receiver Supported.
  • Multi Gimbal Servo Output Frequency Supported.
  • Add Point Of Interest (POI) Function in IOC.
  • Add Intelligent Go-Home and Altitude Go-Home Functions in Fail-Safe mode.
  • Go home switch and user define go to home altitude.

It looks like the DJI team have addressed the slow gimbal reponse which was ok for stills photography but left the video users a little behind the pace, I hope that this will see the gibals now "snap" into action!

I'm not sure how they have improved the "wind-resistance" it was spot on every flight I have made, so we will have to wait and see what the WKM users think!

The biggest news here is the RTL at the flick of a switch with definded altitude, no more concerns about trees etc on the RTL, no more switching off that transmitter to "spoof" it to come home..... now who would do that :)

The new DJI OSD will be released in the near future which will allow the use of the Wookong M in First Person Flight mode!

Regards

Martin.

Read more…
Distributor

article-2166796-13DBEA7E000005DC-526_468x398.jpg

 

A report on how a team of students HIJACKED a drone in midair - all for a "$1,000 bet with
U.S. government"

Not sure if this has been posted here yet, but I was reading the full report here which reminded me of the other blog posts about the drones which had been tricked "spoofed" into landing / crashing in the wrong part of the world posted a while back here on DIYD, I guess if these guys could do it on $1000, then there is a real chance that the others were taken down in the same way, the budget might just have been a little bigger than a $1000 ........

 

 

Regards

 

Martin.

 

Read more…
Distributor

 

3689461227?profile=original

 

We thought it was about time too take a look at the GCS & Way Point features of the DJI Wookong WKM, the videos posted before have shown just how well the WKM works when used on custom built frames, DJI's own Flame Wheel Frames and now in this video we have stepped it up a little, the WKM has been added to a Droidworx HexaCopter fitted with the AV200 camera mount. This HexaCopter was built for a customer to carry out  aerial survey work, it has been fitted with Axi motors with Hercules Power Boards and the full waypoint option on the DJI WKM flight controller.

As always when it comes to testing we make sure that the conditions are always a challenge, this flight was no different, as you can see from the windsock (which if you watched the last video, the windsock is not destroyed in this video) there is a good "breeze" at the flight field!

The flight was only a very short test to show what the GCS & Way Points could do and what the live telemetry information looks like while the copter was going about its flight plan, once again the WKM delivered without fault and in a very positive and confidence inspiring way. When setting the way points for the flight, care was taken to make sure that the HexaCopter would have to fly across the wind in both directions to see if this caused any issues, and unsurprisingly there were no issues the HexaCopter just carried on as if there were no wind at all!

Once again another outstanding flight from the Wookong WKM and the additional confidence added with GCS & Way Point makes this system a real winner if you are looking to use the system as a serious tool, or just for fun if your budget allows.

Regards

 

Martin

Read more…
Distributor

DJI Wookong WKM Unfair Test

 

 

 

Yesterday was "let's be unfair to the DJI Wookong WKM day!" here at Build Your Own Drone, I've had a growing number of people asking just how good the WKM Flight Controller from DJI Wookong is, & how much setting up is needed to get the "outstanding flights" seen in the other videos I've posted here, I hope that this video might help show / answer just how easy it's to start with the stock settings straight from the box with the Wookong WKM, and then build on this with some PID tuning and taking a little care while building!


The test was done using a F450 Flame wheel with a DJI Wookong WKM running on the 5.02 firmware. The motors were 880Kv with 10" props between rain and hail storms rolling through!


So how did we make this an "unfair" to the WKM day, very easily, pay next to no attention on the details during the build, don't check for the CoG, use a few cable ties to hold "items" in place, take no time to build / don't adjust any PID settings from the box, don't balance a single prop, don't replace the prop adaptor which is running off centre and causing a ton of vibrations (this bonus was only seen after the first test flight), use the cheapest props you can get! Then go fly it on a bad weather day, you will see at the end of the video another rain storm starting, so I have to bring the Flame Wheel and WKM down real quick!


In summary, the WKM & F450 Flame wheel was put together with very little care or attention to detail, and I would say that this falls into what I could call a very, very "amateur" build, I was very keen to show just what the WKM can do even when you don't try!


I had to film and "fly" ("watch" would be a better term to use here than "fly") the F450 Flame Wheel & WKM combo yesterday, so the video is not that stable like the others, so sorry for the shakes and the odd cut where I have panned the camera, which did not look great!


I hope you enjoy watching the DJI Wookong WKM & F450 Flame wheel video!


Regards

 

Martin

www.buildyourowndrone.co.uk

Read more…
Distributor

6267765.bin

 

Just a quick heads up, GPS might not be working so well over the next day!

"Keep your eyes on the northern sky Thursday night and be prepared for the  unexpected as a strong geomagnetic storm races from the sun toward Earth, says a  B.C.-based solar physicist.

The expected arrival Thursday of the strongest solar storm in six years could  affect power grids, airplane routes and space-based satellite navigation  systems, space weather experts said."

More information here

 

Regards

 

Martin.

 

Read more…
Distributor

DJI Wookong Test In The Wind

 

 

 

 

We set out to see how well the DJI Wookong WK-M would hold up in the windy conditions today, the wind at ground level was gusting anywhere from 5 to 20 MPH, we had no way of knowing what the wind was doing at altitude but you can hear the copter fighting hard to hold position and see the way the copter pitch changes as it fights into the wind, this video is long due to the last flights being complete to the battery was spent! All the flights were done in the GPS Atti mode and apart from the odd adjustment in position all flights were hands off.....

Regards

Martin

www.buildyourowndrone.co.uk

Read more…
Distributor

Care Free With The DJI WK-M

 

 

The DJI WK-M Multi-Rotor controller has had a firmware update over the weekend, the guys at Wookong headquarters added the “Care Free” mode in this latest update “5.0”.

 

We took the Hexa out to the field and had a look at what “Care Free” would do! The Hexacopter has to be told where home is at start up, from the home point there is a 10 meter radius before the care free takes over, when you are past this point the copter will fly in any orientation or constant yawing (see the video towards the end to see just how smooth this is!) and keep forward, backwards, left and right in the same place throughout the whole flight until you return home.

 

We could not trick it, fault it or have it skip a beat after sending a few batteries through it, the wind was not playing to the DJI's advantage on this test, there were gusts, then no wind and a steady breeze of about 5-7 mph from time to time, all of which the DJI soaked up and just got on with the job in hand!

 

Over all the performance of the DJI was solid and flawless.

 

Regards

 

Martin

www.buildyourowndrone.co.uk

 

 

 

Read more…
Distributor

 

The DJI Wookong multi rotor M was put through a set of tests this afternoon, the first was normal flight, we then moved to position hold and changed the altitude, the DJI proved to be extremely stable in flight and held a very solid position in the sky, when the altitude change was done in GPS position hold it didn't drift, it maintained its position, the Return To Launch was the final test we did, it saw the copter back to home with only a few meters from where it took off! The DJI will rise to 20 meters if below 20 meters or stay at the same height if above for the RTL, when above the take off position it lowers to the ground and kills the engines!

This to date has to be the best multi rotor controller I have seen in action!! I know ACM will catch up soon :)

 

Regards

 

Martin

 

www.buildyourowndrone.co.uk

 

Read more…
Distributor

3689427264?profile=original

 



SOUTH OF ENGLAND 'DRONE ZONE' MEET

We would like to invite anyone interested in amateur unmanned systems to a get together in Guildford, Surrey on the 30th Oct 2011.

This will be an informal event, which give people the opportunity to meet fellow enthusiasts, see the systems and fly. In particular, we are hoping to get interest from the 'Ardu' community (i.e. ArduPilot, ArduCopter, etc.) although anyone with an interest in unmanned vehicles will be welcome.

Please make a post below to show your interest and notify Martin from www.buildyourowndrone.co.uk at events@buildyourowndrone.co.uk using DZ2 in the subject line, if you intend to come so that we can get an idea of numbers. There are a very limited number of places for this event! Please note that this
event will be held in a different location from the last DZ held in June this year. More information on the last DZ meeting can be found here.


There will be a small charge for attending the DZII (£10), this is to cover the cost of the venue, which is outstanding with a lots of room for flights, a room to set-up your equipment and cafe for light refreshments.

Details of the event, timings and location will be mailed to you upon registration.

If you have any questions please do let me know.

 

Regards

 

Martin

www.buildyourowndrone.co.uk

Read more…
Distributor

3689426249?profile=original

3689426313?profile=original

 

I'm sure a few of you will recall the warm British summer day & BBQ promised in this Blog post a few months back, and just like any Great British summer, it did not arrive! Still we all had a great deal of fun between the rain showers. The event has now been featured in Rotor World magazine and with their permission I have added it here, there is a PDF for downloading and viewing "full screen". There are more photos from the day here. I hope to have another Drone Zone meeting later this year, I will keep you updated.

 

Regards

 

Martin

 

www.buildyourowndrone.co.uk

 

Read more…
Distributor

 

 

 

3689418154?profile=original

 

 

 

The ArduCopter & ArduPilot Mega telemetry kit utilizes the Xbee Pro 2.4 GHz 63mw modules; this is the kit for use in the UK, EU and other parts of the world where the 900 MHz Xbee’s can’t be used due to mobile phones using the same frequency. 

 

This telemetry kit supports two way communication with the mission waypoint read and write functions in both Michael Oborne's Mission planner and HappyKillmore’s GCS on both the latest APM and ACM codes. This means no more USB cables & landings to connect the ArduPilot to a laptop in the field, you are able to view live telemetry data as your airframe progress through the mission, you can load a new mission on the fly while your UAV circles above you and execute that new mission without having to land! The range of operation has been tested out to half a mile with no loss in connection, connection has been found to drop off at 3/4 of a mile.

 

Included in the kit are all the items you need to have a fully functioning telemetry system:

 

  • 2 x Xbee Pro’s series 1 (1 x whip antenna 1 x RPSMA).
  • Ground and airframe adaptor boards (2 x XteamBee's).
  • Antenna (RPSMA High gain 4.9 dBi).
  • Connecting cables for both the GCS and airframe.  

3689417999?profile=original

 

 

The kits is available two forms:

 

Either as a pre soldered, fully programmed and tested kit, so they are completely plug and play or in a self built kit, for those of you who like to build your own. The kits are now in stock at www.buildyourowndrone.co.uk

 

The 2.4Ghz Pro series 2 Xbees (firmware XBP24-ZB, XBP24-B) do not work with the DIY Drones Xtreme Bee boards. Please use Sparkfun Xbee explorer boards.

 

Instructions:

 

Build the Xtream Bee’s:

 

The XtreamBee boards need to be built, this involves some soldering and is not complicated if you are experienced with soldering, however a word of warning here, when soldering the female headers, don’t use too much solder! The male pins of the Xbee modules will not fit into the female headers if any excess solder runs down inside the holes on the PCB, it will fill the female headers with solder, this is not good!

 

When the soldering of the female header connections is complete you will have to solder the connection pins for the FTDI / telemetry cable to the APM and the computer. To enable the to way communication in the GCS’s you will need to hold the CTS line high, this is done with a solder bridge from the VIN line to CTS line. This modification is required on both XtreamBee boards with FTDI connectors, it is not needed with the USB GCS XtreamBee board now supplied in the kit.
 
 

3689418173?profile=original 

 
 
When you have completed the construction of the XtreamBee boards set both slide switches to master mode, you can now add the first Xbee module to the XtreamBee, you will see that there is an white outline of the Xbee on the board for orientation, please ensure you select the correct orientation to save the XBee unit from being damaged!

 

Before adding any power to the board make sure that the Antenna on the RPSMA Xbee is attached and screwed all the way on, powering the unit without the antenna being fitted or incorrectly fitted will cause the unit to fail!
 
  
Install the Xbee’s and Program:

 

When the Xbee is fitted to the XtreamBee and the antenna has been connected power the first board using the supplied FTDI cable, note the orientation of the lead colours (see image above), the black wire needs to go to the pin marked “BLK” on the top side of the board or “GND” on the underside. If this is placed correctly you cannot get the other connections incorrect! 
 
3689418109?profile=original
 
The Xbee’s come set at a data rate of 9600, this needs to be changed to the higher rate of 57600. To do this you will need to use a free program called X-CTU

 

Down Load Here:

 

 
3689418183?profile=original
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
In "PC Settings" select the comport that the XBee is connected to, then go to the tab marked "Modem Configuration". Always select the update firmware option, click "Read", change the rate in the box shown above and then click "Write".

 

When you have changed the rate on the first board, remove the first Xtream Bee and switch over with the other, program the second one in the same way and to the same rate as the first.

 

The set up of the Xbee’s are now completed!
 
 
Adding the Telemetry to APM:

 

On the APM you will see that there is a total of four connection ports marked "Teleport", (if you don't have the male pins to solder to the teleport for fitting the telemetry cable they can be found here) which will need to be connected to the airframe part of the telemetry kit. There are two pins for the power and two for the communication. Once again if you look at the XtreamBee you will see there is a “5v+”, “GND”, “In” and “OUT”. With the supplied APM telemetry cable you will find one end has 4 connections and the other has 5, the 4 goes onto the APM and 5 onto the XtreamBee, match the two ends to the corresponding pins and the APM is ready to send telemetry data to the GCS.

 

 

How to get the data:

 

To start using the telemetry, power the APM first which will power the airframe Xbee, power the GCS Xbee second, then load the Mission Planner or HK’s GCS select the correct comport and speed (57600) and click connect. You will now have your telemetry up and running!

 

Always select disconnect in the GCS before removing power from either of the units, I have found that on odd occasions if you just unplug one unit / switch the power off without disconnecting in the GCS you can lock a unit, this is easy to solve by reprogramming the XBee again, but to avoid it reverse the connection process.

 

 

Tests:

 

Use of 2.4 GHz Radio and Telemetry together:

 

This kit has been tested both in the field and in a lab environment to check for any clashes or interference between the RX/TX of the radio equipment operating on the same frequency as the Xbee’s, no conflicts have been found to exist.

The Xbee units on power up look at the frequencies available in the channel they have assigned, they will then select the one which has the least amount of noise, this is called DSSS in the world of Xbee’s, the DSSS operates in a very similar way to that of the 2.4 GHz radios with frequency hopping, which means we can fly more than one aircraft at a time and still use the same 2.4 GHz band as the pilot standing right next to us.

 

The field tests conducted were first with the radio on “range Check” which is a very low power setting, the Xbee was set to full power and placed on top of the RX and APM, the TX was taken to the minimum recommended distance and some way beyond, at which point there was still a solid lock and smooth operation of all the connected servos.

The second field test was conducted in a wide open space, where once again the Xbee was set to full power and was left on top of the APM and RX, the TX was in normal “flight Power” mode and was taken to approx 1.3 miles away with line of sight, there was no loss of connection to the servos, they still operated as if there was not a telemetry kit working right next to the RX.
 

The radio I used throughout all of the field testing was a Futaba T7C, I have also released three full test kits to customers to try with additional radio equipment, all non Futaba, some of the radios tested were $60 specials while others were top end systems, all tests conducted have proven to be successful with no loss in control at any time and easy to use telemetry from the box.

 

While no concerns or issues have been identified with the telemetry kit and the radio systems when tested in the field or lab, it's highly recommend that a “range check” be carried out before committing to flight, if you can maintain a solid RX / TX lock at lowered powers on the ground beyond the minimum distance recommended then flight should not be an issue.

 

Regards

 

Martin

 

www.buildyourowndrone.co.uk

Read more…
Distributor
3689406123?profile=original
SOUTH OF ENGLAND 'DRONE ZONE' MEET


We would like to invite anyone interested in amateur unmanned systems to
a get together in Ashtead, Surrey on the 12th June 2011.  This will be
an entirely informal event which will give people the opportunity to
meet fellow enthusiasts, see the systems they are using and, if the
weather is suitable, to have a bit of a fly.  In particular, we are
hoping to get interest from the 'Ardu' community (i.e. ArduPilot,
ArduCopter, etc.) although anyone with an interest in unmanned vehicles
will be welcome.

Details are as follows:

- Location: Ashtead, Surrey, near junction 9 on the M25.  Exact details
will be sent to you when you register.  (We are only asking people to
register because we may need to manage numbers.)  The venue is within
walking distance of Ashtead Station.

- Parking:  Private and street parking is available.

- Date: 12th June 2011, 11am to 4pm

- Cost: Free

- Registration: Please make a post below to show your interest and notify Martin from
www.buildyourowndrone.co.uk at martin@buildyourowndrone.co.uk if you intend to come so that we can get an idea of numbers.

- Equipment: We are hoping you will bring as much of your unmanned
equipment as you can.  It will be much more interesting if everyone who
has an unmanned system can bring it along to show people and talk about
it, etc.

- Vendors: Depending on expected numbers we are hoping to have one or
two vendors at the event selling unmanned parts/kits/etc.  We will let
you know more about this later.

- Catering:  Soft drinks and sandwiches will be available. There will be
a nominal charge for these but only to cover costs (there is no
intention to make money from this event).  Please feel free to bring
your own food and drinks if you like (no alcohol please).

- Facilities: We will provide tables for you to display your gear and
there is mains electricity for charging, computers, etc.

- Flying:  People with a BMFA license will be allowed to fly although
because we don't know how many people to expect we will be holding the
event at a location which is suitable for small rotary craft only (i.e.
Quads & 450-sized helis).  However, if the event is a success we will
consider subsequent events with a larger venue and enough room to cater
for fixed wing aircraft too.
 
We look forward to meeting you :)
 
Nigel & Martin
UK Local Flyers Group:
Read more…
Distributor

3689391194?profile=original

 

Just seen this added to the BBC here in the UK, looks like we may be waking up to the uses of a UAV. I think Maja sales might be about to go up, think I look to see if I can start to stock a few :)

 

Video here:

http://www.bbc.co.uk/news/technology-12564717

 

In a nondescript building on the Southampton University campus, is a wind tunnel once used to develop the pioneering aircraft which defended Britain during the Second World War.

Clambering up a staircase to the control room I pass a large painting of a Spitfire, and a plaque commemorating Southampton's links with its designer R J Mitchell.

Today, the aircraft trembling in the wind-flow from the giant fans represents cutting edge research of a very different kind. It does not need a crew, for a start.

Southampton University is already a leading player in the field of robot vehicles; later this year it will become the first campus in the UK to run a course specialising in the design and build of a new generation of robotic craft.

Drone wars

Watching the experiments, Professor Jim Scanlon explained that although this work has direct links to unmanned military aircraft, such as the Predator drones currently deployed in Afghanistan, the key for his team is to make the technology available at low cost.

"The machines used by the military cost millions [of pounds] to develop; we believe we can provide unmanned platforms for a few thousand," he said, "We're looking at better ways of using consumer technology to reduce cost whilst retaining a wide capability."

The new unmanned aerial vehicle (UAV) Masters design course will see students creating and building a UAV from scratch to take off, for a specific mission requirement. Future courses will include the development of land and space vehicles.

In a nearby development lab, Matt Bennett showed me another of the prototypes which have already flown successfully.

Remote control

Predator drone on a mission in AfghanistanMilitary UAVs such as the US RQ-1 Predator cost millions of pounds to build

Having graduated from Southampton, he has returned to help develop the new course.

On the bench in front of him is a miniature aircraft, similar to those flown by enthusiasts every weekend around the UK.

The tiny circuitry, constructed for around £3000, enables the aircraft to take off, fly its mission, and land, with one click of a mouse.

He says there are many potential uses for the technology.

"We can see these platforms being used for a range of research projects which involve aerial photography, mapping, or the monitoring of our weather systems," says Mr Bennett.

"They're even robust enough to play a role in search and rescue along our coastline," he adds.

The University's decision may be timely. According to its own estimates, the worldwide market for unmanned aircraft and vehicles is predicted to grow from $6.6 billion (£4.1bn) today to $55 billion (£34bn) over the next decade.

In the UK, which leads the European sector, there are already 14 companies producing 28 different designs.

Down the road at the National Oceanographic Centre, there are more potential customers for cheap, crewless technology.

Beneath the skies

The design team here created the Autosub, a long-range, autonomous underwater vehcile.

It has already made more than 300 successful survey trips to the ocean floor, and beneath the ice of Antarctica.

But there are limits to the number of sorties that Autosub can make, and it is too precious to lose

Pete Stephenson from the NOC believes low-cost robots could extend the range of missions it contemplates.

"What if the new generation of subs are much smaller; small enough to be dropped from aircraft over oil spills to monitor the effects of a clean up operation?" he muses.

"Or [are] able to go beneath the ice, and then to hibernate as the ices closes in, until we need them to carry out their research in areas which we cannot reach."

Back at the University, the research team are looking ahead to their next test flight; 75 years ago, Mr Mitchell's Spitfire prototype was being readied for its first flight at what is now Southampton International Airport.

He might not have foreseen planes which flew themselves, but he surely would have approved?

 

Regards

 

Martin

 

www.buildyourowndrone.co.uk

Read more…
Distributor

Xbee 868 revived?

 

xbee868.bmp

 

******************************************************

Update Aug 2011:

 

After a great deal of tests, this option for telemetry did not work for our us, I now have a working telemerty kit option which can be seen here, and you can buy the Telemetry kit from www.buildyourowndrone.co.uk

 

*********************************************************

 

The Xbee 868 how ever an older module it still has a great deal to offer and as some of you might remember this post as the original fix there has been a lot of other fixes that came to light hardware (Quick_and_Dirty) and software thanks to James and Noth666 but in A recent post of mine, we discussed the options for the UK and I came upon a new fix that seems simple yet effective enough to get the advantage of the offered 40km range as stated Here.

 

What you must do is reset your Xbee through the UART, modify the telemetry output to stop for a (guard time) amount of time, send the "escape sequence (+++), wait for another "guard time" and then send the reset command (ATFR). In this case the escape sequence is changed from the default (+++) to @@@ because the telemetry for Ardustation for example contains the +++ sequence and because of this there is great risk of putting the XBee in command mode when you don't want to.

 

I made contact with Marcus Fahlen and he was kind enough to supply a great deal of information on his work, and work around, the following information & code is the work of Marcus Fahlen, and with his permission I have added it below, I'm at this point where I need help on where and how to implement the code and from which pins, just to make sure

 

// XBee control functions by Marcus Fahlén

// sends a reset command (ATFR) through the

// UDB telemetry UART.

void xbee_reset( void) ; // This routine runs from the "servoPrepare.c" module in MatrixPilot

// main code directory. There is a flag i "options.h" for enabling or

// disabling the use of this code.

//

// This setup is for the 868 XBee PRO module which has a duty cycle

// of 10% (6minutes continuous transmission). Because of this I have written

// this piece of code that is meant to reset the XBee module at a choosen

// interval. I have done a lot of experimenting with different settings but

// I still have to find one that works 100% (count up to the guard time,

// send the escape characters, count up another guard time and then send

// the reset command. I don't bother to listen for any "OK" to check if

// the procedure was successful. That would demand bi-directional

// control code which I'm not capable of producing at the moment.

//

//

#define XBEE_PRE_GUARDTIME 25000

// XBEE_GUARDTIME : use approx 50000 for the "guard time counter"

// if your XBee is set up fo 50ms guard time.

// I have had greatest success with 50ms guardtime. I'm not sure why,

// but the shorter guardtime the more critical the timing becomes.

// Then again, longer guard times often results in a state where the

// XBee is in command mode but never recieved the reset command?

// This highly unwanted state ends when the XBee command mode "times-out"

 

// before it returns to "normal" operation. This time-out period is settable in

// the XBee and should of course be as short as possible.


//*****************************************************************************
// XBee control functions by Marcus Fahlén
// As for noe it only sends a reset command (ATFR) through the UDB telemetry UART.
// Hopefully it will be able to perform more sophisticated control functions later
// like output power management based on distance to base station and other circumstances
// that calls for a variation in output power.

void xbee_reset (void) ;

unsigned int xbee_skip = 0 ;
long guard_time = XBEE_PRE_GUARDTIME ; // XBEE_GUARDTIME : approx nnn for 10ms guard time 

void xbee_reset( void)
{
 ////// Skip every other run through this function.
 if (++xbee_skip < XBEE_RESETPERIOD) return ;
     unsigned int delay;
     for(delay=0;delay<guard_time;delay++);     // pre escape sequence guard_time 
         serial_output( "@@@" ) ;     // send escape sequence
       for(delay=0;delay<guard_time;delay++);     // post escape sequence guard_time
     serial_output("ATFR\r\n") ;
     xbee_skip = 0 ;
     return ;
}

 

// Maybe the reason for the reset routine missing is that it becomes

// "disturbed" by the interrupts running on the UDB? If an interrupt occurs between the

// the time where the "ATTENTION" command is being sent, but before the "reset" command is

// sent, I think causes the "hang state" that I have a lot of trouble with.

// The only thing to do is to calculate the timing need carefully, and maybe disable the

// interrupts all together while the "reset" command is being sent. That would assure that the

// reset is carried out as fast as possible. (50ms guard time times two + the time it takes to

// send the command characters)

//

// Use a command mode timeout of 200ms (ATCT2) which is the shortest possible.

// As described above, there is a chance that the routine "misses" and leaves

// the XBee in a non-transmitting state (comand mode), but it will only last for 0.2sec

// if setup as described. Then the XBee exits the command mode and resume normal operation.

//

// Also change the default escape character to "@" since the the telemtry

// output uses lots of "+++" in its data.

#define XBEE_POSTCOMMAND 10000

 

www.buildyourowndrone.co.uk

Read more…