Paul_KD7HB:
I can't find any specifications on your car. How much time, do you estimate, does it take for the car to reach it's maximum speed?
I estimate that the car takes 2 seconds to get its maximum speed but I don't know if it's justified. The manufacturer says less than 8 seconds. The matlab version says 10-20 seconds.
Paul_KD7HB:
I am suspicious my the time your "loop" gets around to reading a second acceleration value, it's already zero and beginning to slow down.Paul
The whole serie is inconsistent. Why does it accelerate then decelerate continuously ? As the car is accelerating first to then get its usual speed, we should see a big acceleration then acceleration = 0 as the car is not accelerating anymore (constant speed). It's not the case... But as I told before, the problem comes from the vibrations, even tiny vibrations, that make the sensor laggy. I tried to smooth this lag by making a program that print an average acceleration on 5 values of acceleration, eliminating extreme values ( constrain between -7 and 7 in acceleration ), not taking in count values if they are too close to each other. At least, it's what I tried to do. But everything is useless finally as this accelerometer is always making shit. Sorry for the word but it pisses me off a little.
About current and voltage, here is few values taken on Arduino when i was getting the car on my hand but accelerating :
In this picture, i used the code i linked before (with few changes but nothing so worthy) but with this formula :
I= 0.0403*nI - 13.668
This is the one the teacher helped us to find.
I changed a bit the formule because adding a -7.20 thinking that it would be better because i could see that from t=12s to t=14s while I was mooving the car, the current changed ( up to 10.). But when it had to be at 0, it was around 7.20 so i substracted 7.20.
I=0.0403*nI -13.668 -7.20;
Here are the values i got from it :
(1st serie of values)
-------------------------(2nd serie of values)--------------------------------
It's going from 0.8 to 2.0+ approximately, with an average of 1.5.
It seems ok I guess ? The battery delivers 0.5 Ah and has can be used until 12m approximately from what the manufacturer is saying.
What do you think?
P.S : I forgot to say I changed the circuit a little. It now looks like that :