SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By jonathan.slenders
#120671
Hi all,

Currently I'm working on a hobby project where I'm trying to build an accellerometer, xbee, 8 RGB leds, and li-po cell into a juggling ball.
With a lot of creativity, I want to get some special light effects, by using the accellero data. We know when a juggling ball is in the air when there's no gravity measured.

I really have a lot of ideas, but one for which I've already written the code and works, is this one:
- Suppose you have a good juggler who's able to throw every ball the same height. Then, on every throw, the balls go invisible up. And they fade in blue when they are going down. At the catch they light up white, a computer speaker sounds "splatch", and the ball turns invisible again. Now image this effect with three or four balls, or even several jugglers, stereo effects, etc...
It's like simulating a "rain" effect.

The PCB design and schematics are almost ready, the only question I still have is which xbee fits the best.

- How would the movement of a balls impact the reception of the Xbee. I know there is a doppler-effect, but after all, the balls are not moving extremely fast, just the earths gravity on a maximum of 3 or 4 meter height.
- How does the rotation of the balls impact the reception. What if an Xbee is caught upside-down?
- Which series (1 or 2) should I choose? I think this is point-to-multipoint or broadcast. (one computer with usb-attached xbee, and maybe 14 juggling balls all having their own xbee.)
- Do you think the 1mW is sufficient? It's mainly for indoor juggling. Take an average podium/stage size (5x5 meters), and the computer which controls everything at the edge.
- Is the chip antenna okay?
- Does a 60mW xbee for the computer, in broadcast mode, cause better reception, even if the balls itself have only a 1mW xbee?


And a second question:
- Does anyone here have experience with trilateration, for determining the position using Xbee signal strength. It'd be great if we can have the balls light up blue for one juggler, red for the other, and when they are passing balls, they change to their own color. (I wanted to use an RFID reader for this first, but it turned out to be rather expensive...)


Thanks for any help. If I were to build only 1 ball, I'd take a pro-version, but for this much juggling balls, I hope the 1mW is sufficient, and saves the battery.


Jonathan
By mechG
#120691
Just curious - have you tested this yet? When in free-fall, how do you tell if the ball is going up, versus going down, if there is no gravity measured?
By jonathan.slenders
#120693
mechG wrote:When in free-fall, how do you tell if the ball is going up, versus going down, if there is no gravity measured?
You are right, we can't know for sure. And therefore, for those effects where the top position is needed, we supposed that the juggler is able to throw every ball at the same height. (not that difficult.) We can measure the duration of the last throw, devide it by two and start a timer every time the ball leaves the hand.

btw. I have a working prototype, yes. (but still without wireless.)
By StigOE
#120734
mechG wrote:Just curious - have you tested this yet? When in free-fall, how do you tell if the ball is going up, versus going down, if there is no gravity measured?
If the ball is going up, wouldn't it measure more than 1g? When going down, it should measure 0g, so it should be possible to know whether the ball goes up or down.

Stig
By skimask
#120735
StigOE wrote:If the ball is going up, wouldn't it measure more than 1g? When going down, it should measure 0g, so it should be possible to know whether the ball goes up or down.
Stig
No...
When the ball is in the process of actively being accelerated in an upward direction (throw), or being actively decelerated in a downward direction (caught), yes, an accelerometer mounted in the vertical would measure more than 1g in the same direction.
However, after the ball is released, it is accelerating in the other direction (decelerating upwards, but accelerating downwards), equal to but opposite the direction of gravity, which initially decreases the upward velocity, until the upward velocity is zero and downward velocity starts increasing, until it is caught again, when it would start to register a force on it.
So, in short, as soon as the ball is released, it's in "free fall", whether it's going up or down.
If you read more than 0g after the ball is released, it would still be accelerated meaning that something was pushing on it to go faster and faster, meaning it would never fall. Keep in mind, I'm only talking about the vertical plane at the moment.
By skimask
#120736
jonathan.slenders wrote:- How would the movement of a balls impact the reception of the Xbee. I know there is a doppler-effect, but after all, the balls are not moving extremely fast, just the earths gravity on a maximum of 3 or 4 meter height.
That might be a good way to figure out which direction it's going...i.e. left or right (probably wouldn't work so good for up and down though).
If there was an ultrasonic transducer on one side of the stage, and an ultrasonic receiver of some sort inside the ball along with some processing power or whatever. Higher received frequency = going away, lower received frequency = come towards...something like that.
By groggory
#120759
Acceleration pattern (without regard to direction) w/ timing

* Holding ball - 0g for ball_hold duration
* Throwing ball upward - increases up to an approximate number ball_throw_accel (note, this can be any positive acceleration value, you CAN throw harder than 1g acceleration!) for a duration ball_throw_duration
* The ball goes up up up (well an up'ish vector actually) acceleration at a rate of 9.8 m/s/s (ball_traj_accel). Once it reaches the peak after ball_rise_duration the velocity is zero and as such, the derivative of 0 is 0 and so the acceleration is 0 at that point. So the ball_trajectory_accel equals 0 for a split moment.
* Shortly after, it starts falling again at 9.8m/s/s for ball_fall_duration. Because of the constant of gravity ball_rise_duration should approximately equal ball_fall_duration.
* The ball hits your hand and the ball_traj_accel goes to 0. It is held for ball_hold_duration...go to step 1

So basically, if you look at all the current variables, you may or may not be able to tell where the ball is in all this at any given time...but if you know the pattern of what is happening and you look at the last step or two of the variables you can figure out where in the pattern you are. :-) Sounds like a really fun physics problem.

PS...the xbee doesn't care if the balls are moving. I'd personally go for a much smaller radio such as the linx wireless LR + an encoder over the xbee for this simple application...but the xbees are awesome too
By groggory
#120787
This is a really neat problem. In addition you can have the balls talk to each other and maybe 'pulse' everytime another ball comes into the juggler's hand. If the juggler is holding a ball have it turn red like it's getting hot. Stuff like that.

I would love to see the youtube video of this working as the project comes along.
By jonathan.slenders
#120838
groggory wrote:This is a really neat problem. In addition you can have the balls talk to each other and maybe 'pulse' everytime another ball comes into the juggler's hand. If the juggler is holding a ball have it turn red like it's getting hot. Stuff like that.
Indeed, we can network everything together and see what is possible. All ideas are welcome.
I got a note C playing through my computer speakers as long as my prototype was in the air. Now I need like 10 other balls to juggle some music and do percussion. :)
groggory wrote:I would love to see the youtube video of this working as the project comes along.
Sure, video's will come eventually, but give me a little time.
I ordered 14 xbee series 1 chips yesterday to do some experiments. Take a maximum of two months for the PCB's to be printed, and all the components to be received and soldered.

I cannot wait myself...
By marcovansteen
#120841
Sounds like a fun project!
Eh a minor point.. will you take care in the pcb layout to place the accelerometer chip exactly in the center of the ball?
If the ball turns (and it will), an off-center chip would record a serious acceleration as long as the ball is rotating, that requires much processing to distinguish it from a ball being caught and thrown.
Of course you could also deliberately place two accelerometers off center, and calculate rotation as well.. have it control the colours, some sounds or whatever?

Regarding triangulation stuff.. I'ld quit that idea and instead use X-Bee addresses and derived 'flight paths' (integrate accelerometer data twice) of the balls to control the colours. If you insist, maybe equip each juggler with an IR LED with a unique blinking pattern and have the balls recognize that pattern with an IR receiver.. that can be build for a few milliwatts and on some square millimeters... IF it's feasible to make a few 'keyholes' in the balls.
By jonathan.slenders
#120855
marcovansteen wrote:Sounds like a fun project!
Eh a minor point.. will you take care in the pcb layout to place the accelerometer chip exactly in the center of the ball?
Thanks for pointing this out. I knew it had to be in the center, but actually didn't check this.
This is especially true if I'm ever going to use this for juggling clubs because they have to spin a lot. (maybe a gyro would help in that case, but that's for later.)
marcovansteen wrote:Regarding triangulation stuff.. I'ld quit that idea and instead use X-Bee addresses and derived 'flight paths' (integrate accelerometer data twice) of the balls to control the colours. If you insist, maybe equip each juggler with an IR LED with a unique blinking pattern and have the balls recognize that pattern with an IR receiver.. that can be build for a few milliwatts and on some square millimeters... IF it's feasible to make a few 'keyholes' in the balls.
What do you mean by: "X-Bee addresses and derived 'flight paths'"
I can follow your IR idea, and maybe I'll do that for tracking.
By marcovansteen
#120860
Well rethinking my little idea about the idea of determining distance by integrating acceleration into speed and speed into position is really overly complicated.

It's probably much simpler to just detect a suddenly longer timespan between catches, corresponding to the longer throw between two juglers ;-)
By stevech
#120861
jonathan.slenders wrote:Hi all,

- Do you think the 1mW is sufficient? It's mainly for indoor juggling. Take an average podium/stage size (5x5 meters), and the computer which controls everything at the edge.
- Is the chip antenna okay?
- Does a 60mW xbee for the computer, in broadcast mode, cause better reception, even if the balls itself have only a 1mW xbee?

Jonathan
1mW with chip antenna on both ends should give you 100 ft. line of sight with no issues. If one end can be improved to a gain antenna the range will improve greatly, such as a 5dBi omni.
Not suggested to use more transmitter power on one radio than the other, as this creates a link imbalance where one end can out-talk the other.