My project with Arduino

Hello,

I like to create an installation project with an arduino card and modules, the aim being to make a perfect jump an RC car with 4x4. For this I need the position of the car in the air I visualiserai on my computer after each jump, the data will be transferred via WIFI or Xbee module. So I need you for you to tell me what I should buy at the card I think buying a arduino UNO or ATmega, but my problem appears to purchase transmission modules and data acquisition for transmitting what do you think of Xbee modules and module WIFI RedFly? the acquisition and for I do not know if you’ll need a gyroscope or an accelerometer or 2.

Thank you.

Suggestion: Accomplish some simpler projects first.

How do you think instrumenting your car will result in a perfect jump ? More specifically, how will such instrumentation be better than watching the jump with your eyeballs (or a video recorder/digicam/webcam) and judging the results that way ?

Mee_n_Mac:
How do you think instrumenting your car will result in a perfect jump ? More specifically, how will such instrumentation be better than watching the jump with your eyeballs (or a video recorder/digicam/webcam) and judging the results that way ?

stevech:
Suggestion: Réaliser des projets plus simples d’abord.

Maybe I misspoke, but the goal of the project is focused on the acquisition, sends, and data processing (plotting a graph for example). Moreover, we do not want to use the video processing because it is not very interresting the technological point of view, knowing that this is a school project where we must make, create. That is why we had the idea of Arduino because you can mix it all in the scope of the student network, facility reliability, accuracy.

PS: The project is divided into two parts: one which must be acquired, send and process data. other one where the goal is to make a perfect jump with the data, this part is made ​​by another group.

Thank you, very much for your help.

OK then, collecting data is one end goal of what you’re doing, learning what to collect and how being another. The question is then what data should you be collecting ? What is it you need to know to make a perfect jump or to diagnose the jump you just had the car do ? I’ll start (as a given) you’ll want the position of the car at various moments in time and the orientation (where the car is “pointing” in pitch, yaw and roll) of the car at those times as well. If you were going to make an animation of what the car did, you certainly need those data items. Other related data items (ie - speed and acceleration of the car) might be collected as well, or deduced from the aforementioned.

Since you’ve ruled out video capture as a method to know the car’s position and I’ll rule out GPS as an alternative (too inaccurate, too expensive), what are you left with ? I suppose other, external to the car, methods could be proposed but I think you’re stuck on in-car measurements so let me suggest a wheel sensor to start with. You sense the rotation of the wheel, perhaps the easiest way is to count each rotation of the wheel. If the wheel doesn’t spin, you’ve got a direct measurement of how far the car has travelled from the start line. If you assume the car travels in a straight line you’ve also go it’s position vs time and thus it’s speed and acceleration vs time. You don’t have it’s orientation but while it’s still on the ground I suspect that doesn’t matter.

So all is good (at first glance) until you get into the air. At that point the wheel sensor doesn’t tell you much in the way of useful info. Given the speed of the car and geometry of the jump ramp and a good model of the car, I could tell you where the car went and it’s orientation because at that point the car is in freefall, following a ballistic trajectory (at the expected speeds I think we can safely ignore air drag). But if you don’t have that good a model for the car, say all you have is it’s weight, then you might want to supplement that prediction with some measurements. I’ll negate the possibility of some in-car radar ( :mrgreen: ) to measure distance to the ground and assume you’ll want some inertial measurements that you can use to estimate the cars position and orientation while “in flight”. Given the car is in freefall a 3 axis accelerometer, used as a tilt sensor (Google it), won’t give you a direct measurement of the orientation. You’ll need use gyros to measure the rate at which any orientation change occurs but I’ll opine this will be hard to make accurate in your usage. That said you can get both 3 axis accels and gyros and see what both say. I’ll assume that the car is electric and so adding a compass or magnetometer is probably useless.

So you need to decide what the expected range of these data items are; how fast can the car go, how much acceleration can it have, how quickly can it rotate, so you can decide on what sensors are best suited to your application. I think an accelerometer than peaks at +/- 2Gs is about right and I don’t know what to say re: a gyro except that I’d expect low rotation rates, so a gyro that can handle 2000 deg/sec will probably have too little resolution.

Then you need to figure out how often the data must be collected. How many samples/second of each data item is needed to reconstruct the path/jump and meet some TBD accuracy requirement. This, along with the resolution of the sensors, will figure into the data rate (bits/second) that you must either transmit or record. This will also play into what flavor Arduino is best to use. Or perhaps you can find an IMU that has, in a single package, the gyros and accels and a microcontroller that you can program to do all you need to do.

With the sensors all chosen, you can determine how to pack the data into a single serial stream, to be sent to either an RF link or perhaps to an onboard data logger. In fact if you do the latter, you might be able to forgoe any data manipulation. You need to decide whether onboard collection (and post jump reduction) is sufficient for your needs (and budget). I suspect it’s both easier to do and less $$s than to do an RF link of some sort.

BTW when you’re all done and it’s making “perfect” jumps … here’s an extra credit jump for you to do. This was done in real life in 1 take with a somewhat modified car. The guys at Cornell Aeronautical Laboratory did all the pre-jump simulations to get the ramps and car speed just right … and were proven correct with the actual jump. Can “you” do as well with your RC car ?

http://www.youtube.com/watch?v=I6iksKTURlA

http://www.youtube.com/watch?v=trJocyjCBzo

Thank you very much for your reply, I have studied it. The information that we are the values ​​at the pitch, roll and yaw. For the speed of the car our teachers tell us that we can get through the acceleration values​​. For your remote metering system wheel is not bad and if I understood we analyze the acceleration values ​​to know when that car does not touch the board, is that it? For the characteristics of the car (weight etc) I gives you all tomorrow but I know it will be electric. I will study the number of values ​​that I need per second but which patterns of individual modules that I purchased, and the arduino board.

This project is great and your help is very beneficial for me and my group.

On the computer we would have this type of animation http://www.youtube.com/watch?v=WuHRCnpcsDQ

mourad-2a:
On the computer we would have this type of animation http://www.youtube.com/watch?v=WuHRCnpcsDQ

A word re: usage of that 9DOF (degree of freedom) sensor for your project. What that animation shows is that using the 9DOF sensor you can determine the orientation of the sensor (where it was "pointed" in pitch, yaw and roll). That works in that usage by virtue of the accelerometer (used as a tilt sensor) and the magnetometer (to give you an absolute reference point) and by integrating the gyro outputs. All 3 types of data are combined in a "filter" to give the orientation. You could do much the same with a 6DOF sensor (no magnetometer) except that the offsets/biases in the gyros and accelerometers can build up over time and lead to errors in where you think the sensor is "pointing". Even using just a 3 axis gyro sensor can give you the data needed to make such an animation. The difference would be that over time the errors would build up and that there's no way to know where the (gyro only) sensor is pointed. You ASSUME a starting orientation and measure the *changes* from the assumption.

The problem you have is different in nature than that shown in the animation. While the car is on the ground and sitting still, a 3 axis accelerometer can be used as a tilt sensor but what would you learn from it ? If properly calibrated, you’d learn the tilt of the ground. Is that useful to you ? If the car was in constant motion** (neither gaining nor losing speed) and going straight ahead, the tilt sensing can work. Again you’d learn the tilt of the ground but perhaps that’s of some use to you. Perhaps the ground isn’t flat and level over the car’s intended course. You could determine and plot the path and speed of the vehicle just by integrating the accel outputs but again you will eventually buildup errors doing it this way. Errors that using a wheel sensor eliminates (or at least reduces). So a 3 axis accelerometer adds little when the car is on the ground.

Your problem becomes different, from the video, in that when the car jumps, it’s in freefall and the only force acting on it is gravity (neglecting an aerodynamic drag since your car won’t be going fast enough). When the 6DOF or 9DOF sensor is handheld and merely twisted about, it measures the force of gravity with each of the accelerometers 3 axes. The 9DOF can mix that data along with a similar set of magnetic measurements and thus determine the “pointing” (in 3 axes) of the sensor. If a 6DOF sensor were to be dropped, allowed to fall, it will no longer sense gravity and there will be no way to sense to tilt or “pointing” of the sensor. This is the problem you face when your car is inflight during a jump. All you can do is use gyros to sense the rotation rate of the car (again about 3 axes) and integrate those rates into a change in the “pointing” since the car left the jump ramp. Again I doubt a magnetometer (which is the difference btw a 9DOF and 6DOF) will work in an electric RC car. otherwise it would be useful to have. Sadly I think it will be sensing the magnetic fields of the motors more than the Earth’s magnetic field.

So the coding to make a similar (to the above) animation of a car during the jump will be different from that in your video. It will depend on gyros alone. If you want to make a more “full” animation, one that shows the car in motion along it’s path (before and after any jump) and how it was “pointed” along the way, then you’ll need the gyros and wheel sensor (or 2) and perhaps some other stuff (but I’d need to know more about the car’s intended course). Perhaps you need to measure the steering as well.

Having said that a 3 axis accelerometer doesn’t give you much useful data and that a magnetometer probably won’t work, I will recommend this part (below) as a good thing to consider. It’s a 6DOF sensor but it’s cost is only slightly higher than a 3 axis gyro would be. Given part of this project it to learn about “stuff”, I think looking at the accel data would be educational for you (though not useful to make an animation). I think this part has enough dynamic range (it can measure the highest forces and rotation rates that I’d expect your car to experience) and enough resolution (because it uses a 16 bit ADC) and can sample those data items quickly enough (100 Hz should be more than sufficient). It’s relatively low $$s and easy to interface to an Arduino. Heck, I think I just myself into buying one just to fool around with !

https://www.sparkfun.com/products/11028

**Note I said in constant motion, that is no other accelerations. Well under certain circumstances, even when there are other accelerations, you might be able to measure the tilt of the car but that’s another post (if you care to discuss it).

mourad-2a:
For the speed of the car our teachers tell us that we can get through the acceleration values​​. For your remote metering system wheel is not bad and if I understood we analyze the acceleration values ​​to know when that car does not touch the board, is that it?

Let me discuss the 1’st sentence first. If you measured all the accelerations of the car accurately and accounted for gravity, you could estimate both the (change in) speed and path taken by your car via these measured accelerations. The problem with using a hobby accelerometer is that they have certain inherent error sources, only some of which can be calibrated away. As a general rule, if your car is being measured for only some few 10’s of seconds, the error in the estimates of speed and position will probably be small enough for casual usage. The one “gotcha” is if your car goes up or down a hill. Then gravity will add into (or subtract from) your estimates. If you don’t have a separate way to account for this, you’ll have error. A wheel sensor doesn’t know if your car is going up hill or down, all it knows it distance vs time (and from that you can get speed and acceleration). Of course for a wheel sensor to be accurate you must calibrate how far the car goes for a turn of the wheel … and then not spin or skid the wheel when the car is in motion. A single wheel sensor can’t know if your car has gone around a turn though. If you expect to measure the path around a turn then you’ll need more. A gyro can help here, as could some sort of steering angle sensor.

Now when the car is in the air, the wheel sensor will probably turn very fast (or not, if you throttle down). In any case once the car is airborne the wheel sensor data is no longer true, you have to ignore it. It should be easy to know when that occurs, just by looking at the wheel sensor data. Once the car is in the air all you have to go on is any gyro and accel and magnetic data. And as I’ve said above, I think only the gyro data can be of use.

BTW is this for a grade school, high school or university level project ? It’ll help if we have some idea of the expected background knowledge.

Once the car is ‘in the air’ its vertical motion is entirely governed by gravity (going slow enough that air drag is not a consideration). When in this state the total vector sum of the accelerometer = zero since the car is in what is called ‘free fall’. This may be useful to determine when the car leaves the ramp.

waltr:
This may be useful to determine when the car leaves the ramp.

Aaaah, that’s what the OP meant in that post. I couldn’t quite grasp the intent due to the language barrier. I can only add (for the OP) that some accelerometers also have a digital output line that can indicate “in free-fall”/“not in free-fall”. Such devices and indicators are often used in notebook PCs. If you should drop your PC, the sensor will “know” it’s in free-fall and command the hard drive to put the read head into a safe place so the drive doesn’t damaged when the PC comes out of free-fall (hit’s the ground).

Hello, excuse me for not having answered you I had a busy week with lots of test in different subjects, I am currently in the “school” which is in high school. Have to talk with my teachers and my group we think the prense 9DOF but I should like to know if an Arduino with it or not because we ask the question even if I think so. For the altitude we will first study the different methods (ultrasound, gps, …) but it is not as urgent as it is first order parts and schedule. As soon as I have information I send you, thank you.

mourad-2a:
… we think the prense 9DOF but I should like to know if an Arduino with it or not because we ask the question even if I think so.

Could you rephrase the above ? I don’t understand what you’re asking or saying. If you want to use the 9DOF, go ahead. I think you’ll find the magnetometer to be of little use given the electric motors in your car but it’s only a few $$s more. I believe people have used it with an Arduino, if that’s what you’re were asking. Perhaps you could provide a link to the particular parts ? Remember that all the pieces must have the needed resolution and sensitivity to measure the smallest movements and enough dynamic range to measure the largest.