Getting distance over ble modules

Go To Last Post
26 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

Is it possible to find the distance of a robot to a human possible using bluetooth low energy (ble) device? This is required for a new robot which is being planned which should follow the user and also stop when it reaches the user without bumping him. Though I do not need to know the exact distance (inch level), atleast it should be capable of giving distance in 5-10 inch difference.

 

Read about iBeacons and the google's eddystone, but they seem to use mobile devices. I need to implement this using an avr microcontroller. Suggestions are welcome.

 

The distance can be monitored using a sharp IR sensor or ultrasonic sensor, but I need the robot to detect if I am within the radius rather than in-front approach with these sensors. Kindly help...

Robot building is all about sharing & learning
-----------------------------------
www.robotplatform.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quick answer: No.

 

Even using relative signal strength from 3 sources (trllateration), accuracy better than 10 metres would be tricky.

 

 

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the quick answer. There is one of this golf cart known as "X9 Follow - Stewart Golf" which follows a person using Bluetooth technology. It has two Bluetooth modules on each wheel and some kind of a triangulation to find the distance and direction of Bluetooth remote. The safe distance (where the cart does not move) is 2 meters and action (move) distance within 5-8 meters.

 

The remote may have another Bluetooth module or a RF transmitter which controls the direction and speed of the cart. To find distance, they seem to get bluetooth RSSI (not documented anywhere) and based on the amount of signal received, find the distance from the remote as well as a comparison between two bluetooth gives the direction of the robot.

 

With this information, I am sure I will go nowhere near to make one myself. Any further help with getting this information to an avr and controlling should be helpful.

Robot building is all about sharing & learning
-----------------------------------
www.robotplatform.com

Last Edited: Thu. Jan 14, 2016 - 08:53 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I agree with John, I don't think this is very practical.

 

But, you will likely have to experiment with the technique yourself and come to your own conclusions.

 

So go buy several BT modules and a couple of Arduino AVR boards.

 

First learn how to pair two of the BT modules, and perhaps send some data between them, or use one to turn on and off an LED at the other one.

 

When you know how to connect them to each other, then read the Received Signal Strength Indicator value.

 

You will likely want an LCD on at least one, if not both, of your Arduinos for your testing.

 

Display the RSSI on the LCD and see how it plots out on  a graph as a function of distance.

 

Then test it again, and again, to see how reproducible the readings are.

 

Then test in indoors and outdoors, in a large room, and in a hallway with narrow walls, and do the tests with several other BT devices active n the area.

 

Determining 2 m from 8 m might be possible, but having a smart robot follow you around 2 feet behind you, using this method, is doubtful.

 

You will have to decide what language you are going to use, and how you will program the Arduino boards, (they have a Bootloader).

 

You will have to have a power supply for your boards.

 

You will want and LCD, some LEDs, a couple of push button switches, and the BT modules interfaced to the boards.

 

All doable, you just need to take it one step at a time.

 

The overall project, however, is unlikely to be successful to the functionality you desire.

 

JC

Last Edited: Thu. Jan 14, 2016 - 03:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The overall project, however, is unlikely to be successful to the functionality you desire..

This seems to be a good inspiration :) Also, if this is not possible, how is that the golf cart example I have given above is able to achieve this?

 

I have worked with AVR's for few years and I can make them communicate with bluetooth modules easily. Arduino is ok, but I generally prefer using raw avr's and gcc.

The other pointers are still valid and I agree with going one step at a time. Though I can communicate, I have no idea on reading the signal strength (will google more).

 

Since the idea is running in the mind, trying other options too. If all fails, Sonar is always there, but with its drawbacks. Thanks for the response till now.

Robot building is all about sharing & learning
-----------------------------------
www.robotplatform.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Possibly on a golf course in the open, with very few reflective surfaces or other RF signals in the 2.4 gigs band you might be able to steer a cart using relative RSSI. 

Google trilateration and BLE and you will find stuff written by people more learned than me!

 

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you can have each module to make a "click" sound (ultrasound so no one can hear it), on command (BT), and then have 3 mic. round the fence, then it's relative easy to make a triangulation, sound are relative slow so a normal AVR can do the job.

 

Perhaps have 3 speakers round the fence (that in a sync way make click's), and then a mic. on the "target", that then report back (BT), the time between the clicks.  

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

While I rarely disagree with John, or Doc, much less make my disagreements with them public I am going to take exception and say that this maybe/is possible.  With me saying first that it is possible with acceptance that the results will require a high tolerance on the results.

 

As has already been mentioned the RSSI signal and triangulation.  I watched a couple of the videos and the buggy  seems to be able to track the player and stay a reasonable, and consistent distance from said player with the only 'beacon' being the little handheld clipped to the players belt.

 

From this page:

http://www.stewartgolf.com/x9fol...

 

It would appear that the RSSI signal is what they are using, and from the other videos also confirms this. 

 

In this video:

http://www.stewartgolf.com/x9fol...

 

It is rather evident that they are using some form of triangulation as the motors are controlled by the signal to move the buggy left or right to track the beacon.

 

All in all does this mean that the caddies days are numbered? surprise

 

 

Now the doubters in this may say that the antennas are too close to get a decent difference in strength.  Agreed, but I attended a seminar a few months back where we all walked away from it with a BLE development kit, and one of the labs was beacon location.  I was surprised at how sensitive the receiver is, and stable too, so with some slick math algorithms I could see this working.

 

Now where I have some doubt is what happens if you have a multi player round, and all the players are using one of these?  Here I am not so sure what would happen as I admit my BLE/BT background is not near what others is.

 

But from basic functionality, I would say that a follower most certainly can be done.

 

 

The overall project, however, is unlikely to be successful to the functionality you desire..

This seems to be a good inspiration :)

It should be.  Look at history and you will see that much of what was once considered not possible is now mainstream.  Prove them wrong.  No one will be offended.

 

Read the fortune cookie.  Wise words.

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

Last Edited: Fri. Jan 15, 2016 - 01:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have to add:

This will one work outside, but not well inside

BT don't mind using reflections so no metal etc. nearby else you can't trust it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

While I hate to be pedantic(no you don't), the proper term. I believe is trilateration, as the devices can't measure any angles. If the angles COULD be measured, then a lot more accuracy would be possible.

 

 

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Jim,

 

I followed the links you posted, and I notice that they say

"In addition to the bluetooth electronics system, there are two further antennas that power the X9 Follow.
Mounted on each of the rear motors, the two antennas work together to create two zones; a neutral zone and an active zone. "

 

I think there could be some sort of directional antennae thing going on here.

 

John

 

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hack-a-day just featured something like that, though this one uses proximity sensors to know if it's close. http://hackaday.com/2016/01/15/r...

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One way to follow would be if the person you wanted to follow had a GPS enabled smart phone and you used the BLE to relay its position to the cart and it too had a gps rcvr, you could compute a vector to the person you wanted to follow.   Then the BLE would only need to be in range to get the target direction and distance, then use ultrasound to refine the distance.  

 

Jim

 

 

FF = PI > S.E.T

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

John_A_Brown wrote:

@Jim,

 

I followed the links you posted, and I notice that they say

"In addition to the bluetooth electronics system, there are two further antennas that power the X9 Follow.
Mounted on each of the rear motors, the two antennas work together to create two zones; a neutral zone and an active zone. "

 

I think there could be some sort of directional antennae thing going on here.

 

John

 

Yes, thats what I was referring to in my post.

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't really understand the point of all this anyway. Aren't you supposed to drive a golf cart? All that walking could tire you out.

 

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign wrote:

John_A_Brown wrote:

@Jim,

 

I followed the links you posted, and I notice that they say

"In addition to the bluetooth electronics system, there are two further antennas that power the X9 Follow.
Mounted on each of the rear motors, the two antennas work together to create two zones; a neutral zone and an active zone. "

 

I think there could be some sort of directional antennae thing going on here.

 

John

 

Yes, thats what I was referring to in my post.

 

Jim

Yes, but not simple RSSI trilateration. That was my point. And possibly not using the BLE signal either.

 

John

 

Four legs good, two legs bad, three legs stable.

Last Edited: Sat. Jan 16, 2016 - 01:39 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Completely off the wall idea: put a GPS receiver in both. While GPS is only accurate to 5..10m the fact is that two in close proximity (experiencing the same errors) will probably be able to work out a much more accurate relative position between them selves. It's effectively differential GPS.

 

And, no, I don't have the first idea about hardware/electronics. I'm a bit mangler. So treat this with the insult and derision it deserves.

 

(PS almost everyone on earth these days has a smartphone doing BT (perhaps even BLE) and GPS in their pocket anyway - so that saves you the cost of the electronics at one end - you just have to learn to program iOS and Android!).

 

((PPS anyone middle class/rich enough to be playing golf DEFINITELY has a GPS smartphone in their pocket!))

 

EDIT: And then I finally noticed post #13 - must learn to pay attention! blush

Last Edited: Fri. Jan 15, 2016 - 03:31 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you seen the camera tracking devices? You set up a camera on a tripod, and it will track you as you surf/skateboard/BMX/act the giddy goat etc. These, I believe, use two GPS receivers.

 

It occurs to me that one could use real elastic, rather than virtual. Would be a lot cheaper. Long piece of elastic clipped to rear of golfer's belt, other end to a couple of micro-switches(or strain gauges). Bish-bosh, sorted!

 

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It occurs to me that one could use real elastic, rather than virtual. Would be a lot cheaper. Long piece of elastic clipped to rear of golfer's belt, other end to a couple of micro-switches(or strain gauges). Bish-bosh, sorted!

 

That's no fun.  And besides, the golfer would look like he/she had a length of loo-paper hang out of their pants.

 

Aren't you supposed to drive a golf cart? All that walking could tire you out.

Not to deviate/derail, but here in the states the PGA rules state that no golfer may use a golf cart.  Must walk the entire course.  IIRC this was an issue when a player sued because they were physically handicapped.  Anyway enough of that.

 

 

Hmmmm.  Have not heard from the OP in a while(posts that is).  MAybe he'she can provide some light on the project.  From what I read in the OP, the golf bag buggy was just an example.

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The OP wants a robot to follow a human.

 

I assumed this would include inside operations, hence limiting GPS usage.

If this was out side, and one could have a fixed location GPS sending "error data" to the robot and the human's device, then GPS would work.

I think using two moving GPS units, albeit in close proximity, might make the job harder.

 

Using two additional antennas to steer for a null signal, (classic radio direction finder approach), for the steering, instead of differential BT RSSI makes a lot more sense, then the RSSI is just used to keep the golf cart / robot from running into the human.

 

Still very non-trivial at BT frequencies.

 

Sparrow mentioned microphone's above.  One system uses an array of microphones to obtain a direction indicator for gunshots / snipers in urban warfare.

It is very difficult to spot a sniper, so one may know there are incoming rounds, but not even know from which direction they are coming, especially with echo's from buildings.

The mic array and micro can usually sort it out and point in the direction of the origin of the gun fire.

 

JC

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

Thanks for all the responses. I did not respond as I am getting the hardware together. For now, getting the base ready where there are two motors, a driver and a base ready. Ordered couple of Bluetooth modules and once they are in, will put them together on the experiment.

Golf cart was an example and as mentioned, I am looking for a robot (a slightly bigger one than normal) which follows human.

While I agree smartphone is a solution, and that is what I will be using for initial experiment, I would still try to get it just like the x9 cart which uses a remote.

Camera is something which I would not use, but would rather prefer a combination of sonar and Bluetooth, or just a sonar solution like most follow me luggage, or like budgee.

Will write more about this as it progresses. Feedback is still welcome.

Edit: looking at the description and details, I am planning to order few beacons from estimote. Have any of you used this before? They confirm that the SDK is capable of throwing micro location differences. 10$ for a couple of them is still worth a check. Reading more about it though....
Edit: 99$ for three, well, really steep and need to rethink...there are other beacons compatible with ibeacon in the market. Though not extensive documentation available...

Robot building is all about sharing & learning
-----------------------------------
www.robotplatform.com

Last Edited: Sat. Jan 16, 2016 - 04:29 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Which BLE modules have you ordered? I have used the Nordic nRF51822 in the past, as have others on these forums. The Nordic forums have a lot of good info.

 

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Jim.

The elastic band thing was supposed to be a joke.

 

John

 

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

John_A_Brown wrote:

@Jim.

The elastic band thing was supposed to be a joke.

 

John

 

I kinda figured, but with this crew.....devil

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ordered HM-10 as it was inexpensive and available on ebay. Also ordered a pair of Johnson 12v metal gear motor with 60rpm. Have some l298 modules handy, but need to check if they can satisfy the power hungry motors.

Robot building is all about sharing & learning
-----------------------------------
www.robotplatform.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Generally one would use the micro to control a motor driver chip which would power the motors. Lots of chips to do this, or build your own with transistors, but it is much easier to use a chip that was carefully designed for the purpose.