Finally (thanks to the invaluable help of Jorge Almeida) I managed to port the arduino xbee library to C++. According to the library website (xbee-arduino) the code could depended only on the serial library and on the millis function. The millis were substituted by the "gettimeofday" function, and the serial lib was substituted by our lab serial lib, written by Ricardo Pascoal.
I managed to compose and send an API packet from a computer program as well as receive and parse a package.
Next step is to cleanup the code, and use the new xbee lib in the program that will be responsible for sending/receiving messages to the modems.
Wednesday, November 17, 2010
Monday, November 15, 2010
Developments update
Currently I am working creating a xbee api library, so I can create a program that easily send and receives messages through a network of xbee modems, being able to address an individual modem, and being able to know who sent a specific message.
There are already some resources regarding such libraries, even one for arduino, which was tested and worked just fine: xbee-arduino library.
Now I have to adapt that code to be able to run in a Linux machine.
There are already some resources regarding such libraries, even one for arduino, which was tested and worked just fine: xbee-arduino library.
Now I have to adapt that code to be able to run in a Linux machine.
Friday, November 12, 2010
remote command
The current test is the ability to command the robot via a Xbee link, with the lar toolkit at one end, sending messages from the Xbox gamepad.
So far it was found that the xbee devices, (at least while working in AT mode) can have significant delay when the COORDINATOR tries to send messages. According to this forum: XBee series 2 - receiving delay, a possible reason is that the COORDINATOR tries to broadcast messages, while a ROUTER or END NODE, by default, unicast messages to the coordinator, so now the COORDINATOR modem is at the robot and the ROUTER modem is at the command center. It is important to emphasize that the modems will be configured as API in the future, to deal with multiple robots, and it is unknown how good the xbee message rate will be.
So far it was found that the xbee devices, (at least while working in AT mode) can have significant delay when the COORDINATOR tries to send messages. According to this forum: XBee series 2 - receiving delay, a possible reason is that the COORDINATOR tries to broadcast messages, while a ROUTER or END NODE, by default, unicast messages to the coordinator, so now the COORDINATOR modem is at the robot and the ROUTER modem is at the command center. It is important to emphasize that the modems will be configured as API in the future, to deal with multiple robots, and it is unknown how good the xbee message rate will be.
steer control - dc motor with potentiometer II
I managed to get the steer control working. There is still some fine tunning to be performed, as for now there is a tolerance of 40 units among the approximate range of 300 units sweeped by the motor in an analogic read. Factors that affect the tunning are: motor voltage, noise in readings, serial outputs...
The car is being powered with a 9V NIMH battery, as the four 1.2 AAA batteries were not providing enough power for the board 5V regulator, which affected the voltage supplied to the steer potentiometer, therefore affecting the analogic read.
The car is being powered with a 9V NIMH battery, as the four 1.2 AAA batteries were not providing enough power for the board 5V regulator, which affected the voltage supplied to the steer potentiometer, therefore affecting the analogic read.
Wednesday, November 3, 2010
steer control - dc motor with potentiometer
The motor shield that was built is now being used to command the steer motor. The base comes with a very small dc motor and a potentiometer. How the original electronic worked with that "servo" was not deeply investigated (what is the rated voltage of the motor?).
The test setup is the motor shield + arduino 2009 + potentiometer + dc motor
The potentiometer is being fed with3v3 5v output from arduino, to have a stable reading. The input goes to an analogic port of arduino and is represented in a scale of 0 to 1023. There is some noise in this readings, around +/- 2 units in the 1024 scale.
note: maybe the maximum reference is still 5v ??
a 3.3v is provided to the outputs of the l293 on the motor shield, by an external power source (in the future this will come from and independent 3v3 regulator, powered by a 3v7 LiPo battery).
the program running at arduino implements a PID control with the aid of the Arduino - PIDLibrary.
The test setup is the motor shield + arduino 2009 + potentiometer + dc motor
The potentiometer is being fed with
note: maybe the maximum reference is still 5v ??
a 3.3v is provided to the outputs of the l293 on the motor shield, by an external power source (in the future this will come from and independent 3v3 regulator, powered by a 3v7 LiPo battery).
the program running at arduino implements a PID control with the aid of the Arduino - PIDLibrary.
Tuesday, November 2, 2010
Friday, October 29, 2010
Final(?) Hardware Specs and Costs
- base: Wholesale rc car Product-10pcs/lot Mclaren model car Remote control toy ~29€ (40 USD)
- mc:Arduino Fio Sparkfun [SF-DEV-09712] - 19,22 €
- batteries: Polymer Lithium Ion Batteries - 1100mAh Sparkfun [SF-PRT-00339] - 6,41 €
- xbee modem: XBee 1mW Wire Antenna Sparkfun [SF-WRL-08665] - 22,43 €
- build hbridge from lab components: ~10€ (l293e = 6.6€)
- steering servo (not sure if necessary): HobbyKing Online R/C Hobby Store : HXT900 9g / 1.6kg / .12sec Micro Servo ~2€
putting all together, individual robot cost: ~90€
real costs to lab per robot (excluding xbee modem and hbridge costs): ~57€
EXTRA EQUIPMENT
50% extra batteries:
3+ Polymer Lithium Ion Batteries - 1100mAh [SF-PRT-00339] - 6,41 €
Xbee device to use with the computer:
2x XBee Explorer Dongle [SF-WRL-09819] - 23,07 €
Device to program the arduino:
2x FTDI Basic Breakout - 3.3V [SF-DEV-09873] - 12,82 €
Devices to change the bootloader of arduino (required to wireless program arduino)
1x Pocket AVR Programmer [SF-PGM-09825] - 12,82 €
1x AVR - ICSP Adapter [SF-DEV-09046] - 5,77 €
2x 2x5 AVR ICSP Male Header [SF-PRT-00778] - 0,51 €
Acessories for connections
4x Break Away Female Headers [SF-PRT-00115] - 0,96 €
4x Break Away Headers - Right Angle [SF-PRT-00553] - 0,96 €
4x Break Away Headers - Straight [SF-PRT-00116] - 0,64 €
USB cables to power arduino, recharge batteries, use programmer, use xbee explorer, use avr
4x USB miniB Cable - 6 Foot [SF-CAB-00598] - 2,69 €
- mc:Arduino Fio Sparkfun [SF-DEV-09712] - 19,22 €
- batteries: Polymer Lithium Ion Batteries - 1100mAh Sparkfun [SF-PRT-00339] - 6,41 €
- xbee modem: XBee 1mW Wire Antenna Sparkfun [SF-WRL-08665] - 22,43 €
- build hbridge from lab components: ~10€ (l293e = 6.6€)
- steering servo (not sure if necessary): HobbyKing Online R/C Hobby Store : HXT900 9g / 1.6kg / .12sec Micro Servo ~2€
putting all together, individual robot cost: ~90€
real costs to lab per robot (excluding xbee modem and hbridge costs): ~57€
EXTRA EQUIPMENT
50% extra batteries:
3+ Polymer Lithium Ion Batteries - 1100mAh [SF-PRT-00339] - 6,41 €
Xbee device to use with the computer:
2x XBee Explorer Dongle [SF-WRL-09819] - 23,07 €
Device to program the arduino:
2x FTDI Basic Breakout - 3.3V [SF-DEV-09873] - 12,82 €
Devices to change the bootloader of arduino (required to wireless program arduino)
1x Pocket AVR Programmer [SF-PGM-09825] - 12,82 €
1x AVR - ICSP Adapter [SF-DEV-09046] - 5,77 €
2x 2x5 AVR ICSP Male Header [SF-PRT-00778] - 0,51 €
Acessories for connections
4x Break Away Female Headers [SF-PRT-00115] - 0,96 €
4x Break Away Headers - Right Angle [SF-PRT-00553] - 0,96 €
4x Break Away Headers - Straight [SF-PRT-00116] - 0,64 €
USB cables to power arduino, recharge batteries, use programmer, use xbee explorer, use avr
4x USB miniB Cable - 6 Foot [SF-CAB-00598] - 2,69 €
Thursday, October 28, 2010
Wednesday, October 27, 2010
IW02 Test Report
This is the report of the tests conducted with the RC car chassis, to validate the viability of using such solution. The setup was first assembled in a breadboard linking an Arduino Duemilanove, a Xbee Series 2 and an H-Bridge (L293E). Another Xbee modem was connected to a laptop and sent messages to the remote one (in the car).


This first test was successful, with signals sent via wireless to command the traction motor of the car.
The next step was to build an Arduino compatible shield containing the Xbee and the H-Bridge, to finally test the capability of the car to start the motor with a load applied (the car weight). This test also had good results. The car was fully mobile, and several situations were tested.


Unfortunately the batteries soon wore off and the Arduino board could not obtain enough power. Another minor problem found was a lag of wireless messages, although it was not constant.
The next step is to install new batteries and measure the minimum voltage to start moving the car, and also assess if the servo that came with the RC chassis is good enough for our research purposes.
This first test was successful, with signals sent via wireless to command the traction motor of the car.
The next step was to build an Arduino compatible shield containing the Xbee and the H-Bridge, to finally test the capability of the car to start the motor with a load applied (the car weight). This test also had good results. The car was fully mobile, and several situations were tested.
Unfortunately the batteries soon wore off and the Arduino board could not obtain enough power. Another minor problem found was a lag of wireless messages, although it was not constant.
The next step is to install new batteries and measure the minimum voltage to start moving the car, and also assess if the servo that came with the RC chassis is good enough for our research purposes.
Monday, October 25, 2010
Current Costs of Robot Base
Estimated current costs (excluding shipping costs):
-base: ~17€ (26 USD)
-mc: ~17€
-batteries: ~6.5€
-xbee modem: ~25€
total so far: 65.5€
what is missing?
deppending if I manage to use the h-bridge that comes with the base:
- build hbridge from lab components: ~10€ (l293e = 6.6€)
- buy motor driver shield:
--- Adafruit Motor/Stepper/Servo Shield for Arduino kit [v1.0] - the best and cheaper ~ 20.5
--- SparkFun Electronics - Ardumoto - Motor Driver Shield ~ 22€
--- Arduino - ArduinoMotorShield ~ 20.5
the xbee support:
- SparkFun Electronics - XBee Wireless Shield
- SparkFun Electronics - XBee Explorer Regulated ~9€ (may require some hardware modifications, don't change ttl signals level)
- SparkFun Electronics - Breakout Board for XBee Module (must build connections and level changer if to use a 5V board) ~ 4.5€
- XBee adapter - Simple wireless communication ~10€ (regulate power and ttl levels, pinout needs adapter)
- Arduino - ArduinoXbeeShield ~17.5€
steering servo:
- HobbyKing Online R/C Hobby Store : HXT900 9g / 1.6kg / .12sec Micro Servo ~ 2€
so, putting all together:
- expensive solution: 105€
- cheap sollution: 82€
-base: ~17€ (26 USD)
-mc: ~17€
-batteries: ~6.5€
-xbee modem: ~25€
total so far: 65.5€
what is missing?
deppending if I manage to use the h-bridge that comes with the base:
- build hbridge from lab components: ~10€ (l293e = 6.6€)
- buy motor driver shield:
--- Adafruit Motor/Stepper/Servo Shield for Arduino kit [v1.0] - the best and cheaper ~ 20.5
--- SparkFun Electronics - Ardumoto - Motor Driver Shield ~ 22€
--- Arduino - ArduinoMotorShield ~ 20.5
the xbee support:
- SparkFun Electronics - XBee Wireless Shield
- SparkFun Electronics - XBee Explorer Regulated ~9€ (may require some hardware modifications, don't change ttl signals level)
- SparkFun Electronics - Breakout Board for XBee Module (must build connections and level changer if to use a 5V board) ~ 4.5€
- XBee adapter - Simple wireless communication ~10€ (regulate power and ttl levels, pinout needs adapter)
- Arduino - ArduinoXbeeShield ~17.5€
steering servo:
- HobbyKing Online R/C Hobby Store : HXT900 9g / 1.6kg / .12sec Micro Servo ~ 2€
so, putting all together:
- expensive solution: 105€
- cheap sollution: 82€
Hardware Links II
New hardware specifications for the robot (must create a name)
Base:
1/28 firelap2.0 miniz rc car chassis products, from alibaba.com
Wholesale rc car Product-10pcs/lot Mclaren model car Remote control toy (new website)
Microcontroller:
Arduino Wiki English
Arduino - ArduinoBoardPro (cheaper and cleaner, must decide for whether 3.3V or 5V, this choice may have an implication in the use of arduino compatible shields?)
Wireless:
Arduino - ArduinoXbeeShield (too expensive)
SparkFun Electronics - XBee Explorer Regulated (cheaper and more simple, but may have some design problems: SparkFun Electronics • View topic - XBee Explorer Regulated Bug)
alternatives: XBee adapter - Simple wireless communication or SparkFun Electronics - Breakout Board for XBee Module
Batteries:
RS Cargadores y baterías recargables de NiMH, electrónica de consumo
note: for 5 cars = 20 batteries plus 50% to recharge backups, around 30 batteries, plus 2 chargers, or a big one?
Servos (not completely sure if the are necessary):
HobbyKing Online R/C Hobby Store : Turnigy TG9e 9g / 1.5kg / 0.10sec Eco Micro Servo
HobbyKing Online R/C Hobby Store : HXT500 5g / .8kg / .10sec Micro Servo
HobbyKing Online R/C Hobby Store : HXT900 9g / 1.6kg / .12sec Micro Servo
Base:
Wholesale rc car Product-10pcs/lot Mclaren model car Remote control toy (new website)
Microcontroller:
Arduino - ArduinoBoardPro (cheaper and cleaner, must decide for whether 3.3V or 5V, this choice may have an implication in the use of arduino compatible shields?)
Wireless:
SparkFun Electronics - XBee Explorer Regulated (cheaper and more simple, but may have some design problems: SparkFun Electronics • View topic - XBee Explorer Regulated Bug)
alternatives: XBee adapter - Simple wireless communication or SparkFun Electronics - Breakout Board for XBee Module
Batteries:
RS Cargadores y baterías recargables de NiMH, electrónica de consumo
note: for 5 cars = 20 batteries plus 50% to recharge backups, around 30 batteries, plus 2 chargers, or a big one?
Servos (not completely sure if the are necessary):
HobbyKing Online R/C Hobby Store : Turnigy TG9e 9g / 1.5kg / 0.10sec Eco Micro Servo
HobbyKing Online R/C Hobby Store : HXT500 5g / .8kg / .10sec Micro Servo
HobbyKing Online R/C Hobby Store : HXT900 9g / 1.6kg / .12sec Micro Servo
Robot Base
the new website to buy the chassis: Wholesale rc car Product-10pcs/lot Mclaren model car Remote control toy
Sunday, October 24, 2010
Week Review
Effort was mostly spent in validating the base proposal in order to proceed with the purchase process.
The short term goal is to evaluate the traction dc motor from the robot base, by wireless commands sent via xbee. I am afraid that the minimal speed that I could keep the robot moving would be too fast. The test setup:
iw02 base + 4 AAA batteries + arduino + h-bridge + xbee <---> xbee + laptop
I will send speed commands via arduino and evaluate the base movements.
Note: Can I measure the voltage at the motor terminals with arduino?
I will use the xbee modems at AT mode, so one modem will echo commands received from the other (Arduino - ArduinoXbeeShield, XBEE Basics - Community Tutorials).
The next step is to evaluate the steering servo performance, acoording to results, a new servo would have to be bought.
The short term goal is to evaluate the traction dc motor from the robot base, by wireless commands sent via xbee. I am afraid that the minimal speed that I could keep the robot moving would be too fast. The test setup:
iw02 base + 4 AAA batteries + arduino + h-bridge + xbee <---> xbee + laptop
I will send speed commands via arduino and evaluate the base movements.
Note: Can I measure the voltage at the motor terminals with arduino?
I will use the xbee modems at AT mode, so one modem will echo commands received from the other (Arduino - ArduinoXbeeShield, XBEE Basics - Community Tutorials).
The next step is to evaluate the steering servo performance, acoording to results, a new servo would have to be bought.
Saturday, October 23, 2010
Friday, October 22, 2010
Back to Xbee
X-CTU page: Diagnostics, Utilities and MIBs - XCTU - Technical Support - Digi International
How to make X-CTU work in linux: Buck Up Chinny: X-CTU with Linux
Help:
XBEE Basics - Community Tutorials
How to make X-CTU work in linux: Buck Up Chinny: X-CTU with Linux
Help:
XBEE Basics - Community Tutorials
More on motor control with arduino
Shields:
Arduino Motor Shield (L293) (SKU: DRI0001) - Robot Wiki
Lots of arduino related material:
nkc electronics
Arduino Motor Shield (L293) (SKU: DRI0001) - Robot Wiki
Lots of arduino related material:
nkc electronics
Thursday, October 21, 2010
Wednesday, October 20, 2010
Hardware Links
Base:
1/28 firelap2.0 miniz rc car chassis products, from alibaba.com
Servos:
HobbyKing Online R/C Hobby Store : Turnigy TG9e 9g / 1.5kg / 0.10sec Eco Micro Servo
HobbyKing Online R/C Hobby Store : HXT500 5g / .8kg / .10sec Micro Servo
HobbyKing Online R/C Hobby Store : HXT900 9g / 1.6kg / .12sec Micro Servo
Microcontroller:
Arduino Wiki English
Wireless:
Arduino - ArduinoXbeeShield
XBee® & XBee-PRO® ZB ZigBee® PRO RF Modules - Digi International
1/28 firelap2.0 miniz rc car chassis products, from alibaba.com
Servos:
HobbyKing Online R/C Hobby Store : Turnigy TG9e 9g / 1.5kg / 0.10sec Eco Micro Servo
HobbyKing Online R/C Hobby Store : HXT500 5g / .8kg / .10sec Micro Servo
HobbyKing Online R/C Hobby Store : HXT900 9g / 1.6kg / .12sec Micro Servo
Microcontroller:
Arduino Wiki English
Wireless:
Arduino - ArduinoXbeeShield
XBee® & XBee-PRO® ZB ZigBee® PRO RF Modules - Digi International
Blog start
Last meeting summary:
3 parallel working fronts:
* state of the art: cooperation and competition
* hardware: servo motors, car bases, xbee
* paper: software, simulator, techniques implementation
TODO:
* buy bases and stepper motors
* xbee libraries
* collision avoidance libraries
* arena modules
* adapt new motors to cars
* test traction motors
* test xbee intercom with developed libs
* ...
3 parallel working fronts:
* state of the art: cooperation and competition
* hardware: servo motors, car bases, xbee
* paper: software, simulator, techniques implementation
TODO:
* buy bases and stepper motors
* xbee libraries
* collision avoidance libraries
* arena modules
* adapt new motors to cars
* test traction motors
* test xbee intercom with developed libs
* ...
Subscribe to:
Posts (Atom)