Hi all,
I just got my third EZB board installed in the brain of my B9 and hooked up to everything. On it's own it works great and I thought everything was going nice when I noticed a problem with the scripts I wrote in EZ Script. They were not running perfectly like before. The scripts effected when I connect to ANY board as the 3rd board are mainly the ones that get ADC values from Potentiometers that send back position feedback. I use this info to tell the script to stop the motor when a set variable is reached. (I use an H-bridge and DC motor to turn the waist and radar section that's mounted on a Lazy Susan and gear sets).
Before I was able to have the waist or radar section rotate and stop pretty much spot on my set variable and read from the pot. Now when I connect to any board as the 3rd board the rotation will shoot way past my set value or even seem to ignore it. The result is that the rotation till either go past and hit my limit switches or if it's trying to find center it will just rock back and forth till I stop it.
I don't know if my computer is to slow to handle 3 board connections, there is a problem with the Bluetooth connection or there is a bug in the software. Oddly, everything works great till I connect to a third EZB board. Then EZ Builder seems to have trouble seeing the ACD value till it's too last and the reading is past my set variable.
I hope this makes sense. I'll attach a copy of my project and a video. Any input or help is welcomed.
B9 Robot Project:
B9RobotControl.EZB
Here's the vid. It's over 8 min. Hope it's not too long:
Asked
— Edited
I got a email from a fellow robot geek and he suggested installing a second bluetooth reciver (Dongle) in the laptop USB port and connecting the third EZB board to it. He said that Bluetooth is slow and I may be asking too much of it.
Has anyone got any insight on this? I wasnt awear I could run two bluetooth devices on one computer runnung Win 7. Even if I could, can I connect to different EZB boards within ARC and two different bluetooth devices and have ARC controll the boards?
You could, in theory, use two different bt stacks (MS and Widcomm).
There would be no problem with ARC. A com port is a com port at the end of the day, if ARC can connect to it and it goes to the right place (i.e. goes to the correct bt device) it will be fine.
Have you considered changing the BT to WiFi or USB?
I need to do something because I cant control any stop points on the radius. It's a little annoying when I only want my waist to move a few inches and it flies past that point and slams into my stop block and it's limit switch. Thank goodness for those. I understand WiFi but not sure I want to rely on my home router and I've been reading about the problems others are having with WiFi. I dont understand USB. How would that work? Wouldn't I need to have the EZB plugged directly into the laptop?
My fall back potion is to just remove the 3rd EZB from the brain and run wires down into the torso to that EZB. I really dont want to go from 2 wires running down his neck pipe to 7. I'd like to avoid that with all the rotating and bobing the bubble area will be doing.
The EZB boards are all working properly. It just seems I have a lag somewhere and ARC isnt getting the feedback info fast enough from the pots. Unless there is a bug in ARC it's self. I just dont know why everything works great with two boards but starts to lag when I connect to the third board.
You could try 2 BT dongles and attempt to use a different stack, I did a quick google on it and there are reports of MS and Widcomm stacks both working together and allowing 2 dongles. Not sure if it would solve the problem but if it is a communications issue then chances are it would, but you would be using a stack that's not supported.
I just did a benchmark on my EZB and it can read ADC 25 times per second. So basically it can read the feedback of 25 ADC ports once per second, if you only have 5 then it's 5 times a second, or each one once every 200ms. The first thing I would do is work out if you are going over your maximum reads/second (run your own benchmark, it may be different to mine). If you aren't then it's not going to be the communication between the two. If you are then you will need to look in to a different route in to the PC (WiFi/USB/another BT dongle and some messing around getting it working).
Benchmark is under General in controls.
So, what could be causing the problems? Both duel core CPU laptops are close to the same in most ways and were bought around 2007. The one causeing the problems is a Dell with built in Bluetooth and a clean install of Win 7 and the one that runs ARC and my robot smoothly is a Gateway running Win 7 that I've been using for years loaded with all my stuff. I have to use a Bluetooth Dongle on the good running Gateway. When I installed each of the EZB Boards as a device in the Add Bluetooth Device section I noticed the 3 com ports were assigned a lot higher then on the Dell. On the sluggish Dell they were Com4,6 & 8. On the nicely working Gateway they are Com7, 9 & 11. I cant see any other differences. Any ideas?
Something else that may be of interest; Rich had mentioned above that he got 25 reads on his ADC benchmark. I also got that reading when I had only 1 or 2 boards connected. When I connected the 3rd board thatreading dropped down to 6! Ouch.
Perhaps disable your Bluetooth on the slow performing computer and add the USB dongle in replacement
Class 1:
100mW (20dBm) / 100 meters
Class 2:
2.5mW (4dBm) / 10 meters
Class 3:
1mW (0dBm) / 1 meter
Still it seems there's a bottleneck somewhere in the laptop with the built-in Bluetooth. I'll do some more testing today. Thanks guys.
As far as the laptop class of this Dell Inspiron 6400, I couldn't find a good answer. The online manual says only this:
internal PCI-e Mini-Card WLAN or
WWAN support and Bluetooth® wireless
technology support
One odd thing is the way the com ports were assigned for each of the 3 EZB boards. Not what I had expected. I had no choice to pick a lower port at the time it was installed. It just was assigned What I ended up installed are Com Ports 10 - 15 with EZB boards:
0 connected to com10
1 connected to com13
2 connected to com12
Odd but all seems to be running fine. Does anyone see any reason to feel uneasy about this?
The port number doesn't affect priority of performance. It's simply an identifier.