First look at distance measurement using the AT86RF233 chip
Thanks to my long-term CNC Mower project, I am always on the lookout for new ways to do local positioning sensing. I’ve played with spinning lasers, fancy DGPS’s, sonar, and boundary wires but none of them are just right. I want centimeter scale repeatability with a range on the order of 100’s of meters updated at least once per second. Cheap, small, and power efficient are also important factors since my goal is to have maybe a half dozen of these little solar powered mowers roaming the fields.
I recently saw a mention of a new Atmel chip that seems to be able to do radio range measurements. It looked exciting.
The AT86RF233 is an Atmel chip that is cheap (<$3 in quantity and <$5 for 1), very low power (milliwatts), and easy to interface to a microcontroller (SPI interface), so it would seem perfect for my project. Unfortunately, I could not find even the most basic information on its ranging capabilities like how far it can go and how accurate it is.
I got a few of the eval boards to play with to find out for myself. Here are some very early findings.
The boards are way too expensive at $379 per pair. They don’t have a serial boot loader pre-programmed so you need to own (and know how to use) an Atmel compatible programmer just to play with the ranging function. The chip is only available in an impossible to solder QFN package. Huge barriers to entry. If anyone at Atmel is listening, you should sell these boards at cost (probably <$25) and preprogram them with a serial boot loader so people can plug them into their USB ports and start playing with them. Why not also offer a friendly 20 pin DIP package? We also need a few app notes with functionality overview, details on the ranging theory, best practices on how to use the actual on-chip registers, and maybe some reference designs for antennas.
I tested in my RF noisy NYC apartment using a Leica laser rangefinder as reference. Out-of-the-box default settings with the default quality-weighted range estimation.
I tested in a huge, flat 20 acre field far away from any RF noise. I cranked transmit power to maximum. I logged all 4 antenna combinations (two stations each with 2 antennas). I sampled every 2000cm up to 8000cm. I forgot to turn off the radio when I walked from 6000cm to 8000cm. I used a fiber reel measuring tape for reference.
Here each dot is a sample and the color indicates the sampled antenna pair.
If I filter out on the best overall pair (the grey dots), it looks like this…
This looks promising.
I think there is room for improvement by…
- Only using a single antenna pair optimized for the location
- Dynamically adjust output power based on estimated distance
- Filter nonsense samples and samples with low signal quality
This weekend I am going to try to test with some of these improvements, and I am going to use 3 base stations to do oversampled 2D location finding. Check back next week for results!
If all goes well, next steps are to…
- Design and build a stand-alone base station with an AT86RF233 and an ATTINY to do very basic . This will be battery powered with optional solar charging. Weatherproof case. Hopefully this unit can be built for less than $25 per unit so it will be possible to put lots of them around a sensing areas.
- Design and build a shield with just enough (chip, xtal, antenna) to make it possible for an Ardunio to be a rover. Also hopefully less than $25.
- Put it on a few robots and start mowing hi-res Google Earth messages!
Just found this – nice review! This seems to be a perfect chip for building small sensors that can finally tell me where they really are after I dropped them somewhere outdoors :-). Whats the overall accuracy in cm now? Its not really visible from the charts but it looks like less than 50cm average … which appears to be pretty amazing for an out of the box test?
No bootloader is actually not cool and for the boards I hope they soon release something cheap & smart that has the programmer on-board like they do for their newer micros and SoC’s now (http://store.atmel.com/PartDetail.aspx?q=p:10500338;c:100118#tc:description). I just checked – they seem to have a few app notes out for something they call Ranging Toolbox – RTB: ( http://www.atmel.com/devices/AT86RF233.aspx?tab=documents ) … is this maybe the software you have been using for your test?
But, do you really expect that guys like Atmel and others still make 20pin DIP packages for such a modern RF chip…? I really doubt this as these things are no longer made for hobbyists like it was 10 years ago. They are supposed to go inside small mobile devices … and I assume no one wants a last-decade ~25x5mm chip for this…
I have more tests to do, and will hopefully post results in a week or two.
I was using the Atmel RTB package, which now finally appears to be available on the website.
I do think there is good reason to still make DIP chips – especially for a company like Atmel. Even if you don’t make any money on the DIP packaged chips, you get more people playing with them and thus develop an ecosystem with software are know-how that can lead to the chip being used in more high quantity projects. I think this is especially true for the AVR line.
Thanks for your review! I don’t understand the apparent discrepancy at 6000 cm, since 2, 4, and 8 look so good.
I don’t understand either. I need to do more tests and do them more carefully. Hopefully soon…
This is very useful information. Did you have a chance to conduct more tests on the device?
As cool as the AT86rf233 was, I this new chip from Decawave probably makes it obsolete for my use cases….
A little more expensive, but super accurate time of flight measurements and RTK. There are lots of other new time of flight chips showing up now too, so the humble AT86rf233 has some tough competition.
Hi Josh and All,
Hopefully this isn’t considered spamming, but this was the first site I visited before developing a system that uses the AT86RF233 chipset for ranging.
The hardware is now released as a Kickstarter for those looking to experiment with such a system for a reasonable price (~208USD for 5 Boards and a client expansion board with accelerometer) – https://www.kickstarter.com/projects/subpos/subpos-ranger-indoor-positioning-system/
I saw your project pop up on hackaday.io and am always glad to see the AT86RF233 get some much-deserved love!
Personally, I think the AT86RF233’s edge today is low price, so I’d love to see a slimmed down board with just the RF circuity hopefully at <$10 COGS. I think you can get there if you off-load all the computation to whatever you were going to connect the board to- which could be as cheap as a $2 AVR-based Arduino knock-off board.
Also, I don't think the ranging data given in your FAQ is really relevant. The roll-over ambiguity can almost always be resolved for rovers moving at less than the speed of sound based on continuity, RSSI, and other constraints. The real limitations on range are usually power and antenna config, so I'd love to See some real-world range test data for you new board in a bunch of environments!
I will tweak the faq a bit, because your’re right it doesn’t matter so much. I guess I was being too honest with the system as it’s working now, but the software can definitely be improved down the line.
In terms of cost, the main issue with getting it running on something smaller is the atmel libraries are statically compiled against the xmega chip. I have reduced the cost a fair bit by using the 128a4u, but that was a challenge in its own right as the arch is different to the a3 series. I am slowly chipping away at removing the dependency for the library, but I figured I’d test the market first too see if the price was right as is. I agree though, releasing a variant without all the bells and whistles would be killer. That will definitely be my next step.
This sounds awesome! Do you have any updated results regarding at86rf233 ranging (follow up article, github examples)? I have an open source Wireless IMU (dime sized) which uses the Atmel SAM R21E (built in at86rf233) and I plan on adding LPS capabilities (ranging).
Ah yes, I have been eyeing that little chip! Really remarkable how much power you can get in a single tiny IC- a full cortex and nice RF. And cheap too! And low power too! And almost no external parts! And runs directly off a battery! Anyway, it is a very nice chip.
The first application I thought of was basically your Femto beacon. I am always just looking for a modern replacement for the TI CC25x0 for the very simple BLE stuff, but you have done so much more and really put all that power to good use.
Sadly I have not done any more work on this. I love the AT86RF233 and the idea of local GPS for single digit dollars, but once I saw the decawave chip and it’s capabilities I sort of lost steam on this. For my application it is a better fit, but still plenty of places where the Atmel part shines.
I’ll be watching the Femto to see how things come along (nice domain grab, BTW)!
Been working on a project using the Atmel Atmega 256RFR2-Xpro eval board and have had trouble with the RTB toolbox and finding information on it. Wondering if you would be able to share a little bit more information about working with that if possible. Any help is appreciated. New to working with these chips/atmel
I have not looked at this AT-RF stuff in years. Have you looked at the newer Decawave stuff? It is better in every dimension except price.