Hey there.
TomGeorge:
You are having problems with your accelerometer readings, where is the link to those sensors.
I had problems with current and voltage too but the biggest one was with acceleration. It seems ok for current and voltage now. So there is no link to those sensors anymore.
TomGeorge:
I know you have 2 different accelerometers, which one do you use?
I mainly prefer use the ADXL335 but the MMA suffers from the same problems.
TomGeorge:
In your circuit where is it connected to the controller?
By controller did you mean the controller for the car or the accelerometer ? The controller for the car is wireless. For the accelerometer, it is connected to Arduino only, not to the circuit.
TomGeorge:
Why have you not included it in your diagram?
I didn't include it in the diagram because I never use the sensors of [current+voltage] and acceleration at the same time. So there is 2 circuits. The one I drawed just before to measure current and voltage only and this one when I need to measure acceleration :
TomGeorge:
Keep the accelerometer and its wiring AWAY from the motor and its wiring.
WHY?
Because even though the motor and sensor is on different power supplies, the motor EMITTS electromagnetic interference, EMI.The accelerometers work on very small voltages and currents, which means the EMI can cause niose problems with your sensor.
So I need to put the arduino and the accelerometer ADXL335 with the wires included that link both away? How should I do that ? Put those on the back of the car? It would be near the motor. On the front, you say later that the accelerometer is not at his best there. Should I create a box with aluminium on it and put that all on the back with Arduino, ADXL and the wires at the back ?
TomGeorge:
If you lift the car of the floor so its wheels spin, what sort of readings do you get from the accelerometer when you spin the wheels?
That is with the car not in motion.
I get those values with time on the left and acceleration on the right. The few first seconds are when the car is not accelerating.
TomGeorge:
Wrapping all the wires together, motor and sensor, is inviting EMI from the motor the add noise to the accelerometer signal.
Our teacher talked to us about the EMI but not how that was working. Then, I will put the other sensors, of current and voltage, away when I make the measures of acceleration.
TomGeorge:
What school level is this project?
It's a 12th grade school project.
TomGeorge:
Are you using one of these batteries to power the UNO?
Yeah, we are using one of these. Here is a picture :
TomGeorge:
If the sensor is the little red PCB sticky taped to the front of the car, that is not going to give you consistent readings.
The PCB MUST be properly fixed to the car so it cannot move around.
The PCB MUST be oriented so that the x,y and y axis are defined with respect to the car.
This is properly oriented in the axis x and only this one as we only need 1 acceleration, that of the car while it is mooving.
How should I fix the ADXL335 so that it doesn't move around ?
