ARDUINO first steps....

I bougth my first usb board few days ago and now I’m trying learning about the code and with simple projects.
I need to know if is possible to run point 1 and 2 at the same time and with kind of software…

1 connect sensors to arduino like 3 gyros and 1 3-axis accellerometer, send imput to pc via usb, than from pc get back processed data
2 same thing of point 1 but with Gps connected via usb to pc, than from pc get back processed data to arduino

Both the functions 1 e 2 have to run together to make arduino control 6 brushless rotors based on sensors imputs proccessed before by pc.
The target is to use pc for complex operations so arduino is quite free to control the hardware.

Simple explanations please… ::slight_smile:

Well it is kind of hard to give simple explanations to a ill-explained question isn’t it? Tell us what you want to achieve and why, how and whatfor. That way we might begin to understand what you actually mean…

I’m guessing English isn’t your native language. Let me check if I understand what you want to do.

  1. Arduino reads sensor data from 3 gyros and 3 axis accelerometer
  2. Arduino sends sensor data to PC
  3. PC reads data from Arduino and a GPS that PC connects to using USB.
  4. PC crunches data generating new data
  5. PC sends new data to Arduino.
  6. Arduino reads data from PC.
  7. Arduino controls 6 brushless motors

Is this what you want to do? If so, you can probably do it, though you will probably need more than just an arduino to do it. You’ll either need some extra chips, or several arduinos. Arduinos have 14 digital I/O pins, and 6-8 analog input pins. The analog pins can also be use as digital I/O pins.

Advising how to do this depends on the details of your equipment.

  • What gyros and accelerometer are you using. More importantly, how do the communicate their values. Voltage level? serial? I2C? SPI? Something else?
  • How do you control the brushless motors? Is there an external controller that you communicate with, and which will control all six motors? Or does the arduino need to control all six motors directly? If so, how many wires does it take to control each motor?

Ok…all right!
There is a board called arduipilot pro with 2 chip, 1 for stabilisation and 1 for navigation of rc planes.
The 2 chips are necessary because arduino standard is not able to control all the parameters from gyro, gps at the same moment…so I think…and if i use pc for process the data from sensors and gps…arduino has all the power to control only the brushless rotors via speed controllers use for rc models.
I can build rc hely like x-ufo startind from motherboard of asus eeepc, only 350 grams, connect to arduino and gps via usb, while sensors are connected to arduino.
On sparkfun website there are sensors I need…
I Know it’s hard job, most of all for a beginner like me, but if John Travolta drive his boing 747…I can build my toy.
:wink:

Another architecture to consider is to have several logical “modules”.

  • Sensor data acquisition. Read data from IMU, GPS, and other sensors. Probably do initial sensor data scrubbing.
  • Motor control. Control motor board. Read encoder data back from motor board. Might not need encoder data for brushless motors. Perhaps a PID loop.
  • State management. Process data from sensor module and motor encoder. For example, a Kalman filter.
  • External interface. I/O to/from a PC. Logging. Etc.

Partition the modules among Arduinos. One Arduino can probably handle several modules. Two arduinos would probably be enough. And one of your Arduinos can be a bare atmega168 connected to the “master” arduino. Just mount the atmega 168 onto a proto board shield.

BTW: No need to read the gps data from a pc. SparkFun carries gps boards. Just connect them to your sensor module.

Ok thanks!

Now I need time to get informations about what you told me…to put togheter all this stuff… :sunglasses: