Im using an Arduino Mega and the GSM Playground togeather, they work fine but when I try to use the analog inputs, they give me values between 4 or 5 V when the maximum voltage should be 3.3V (from an ADXL330 accelerometer).
So the values read and displayed via the serial connection are completely wrong. When I use the ADXL330 and the Arduino without the GSM playground, it works fine. From what I understand, the GSM playground does not use the Analog pins. I dont understand why this is happening, I cant see anything that would set the analog pins as digital inputs. I dont have the code at hand to post.
they give me values between 4 or 5 V when the maximum voltage should be 3.3V
And how do you know that. Are you perhaps going of the calculation made with a 5V reference voltage. Here you have a 3V3 reference voltage so you get 3.3 / 1024 = 3.22mV per Analogue reading step.
I have checked the voltage when just the arduino and accelerometer are connected and working properly.
When I mount the GSM playground and the accelerometer to the analog pins and do the same, I notice that the voltage at the analog pins suddenly rises to about 4.7V when the GSM module is searching for a network and once it finds the network the analog pins are still at around 4.7V.
I have checked the schematic and code and I still cant see anything to suggest that the analog pins are being set high.
HI!
I don“t know how you supply ADXL but the problem might be because of the noisy power supply (5V is noisy especially during active GSM transmission). The supply voltage shall be 3,6V.
The datasheet says that in case the power supply is not well decoupled it may influence the measurement. You can try to supply it through RC filter because the power consumption of ADXL is minor. Try 100Ohm and ceramic 1uF close as possible to the ADXL board and you will see whether it is different. You can also try to supply ADXL from pin 5 of IC1 - look at the GSM Playground Schematichttp://files.hwkitchen.com/200000145-d61e8d718b/GSM%20Playground%20V1_6%20Schematic.pdf - this is the circuit preparing a "nice" voltage for microphone...
Good luck
Oldrich
Hi Oldrich, I shall try that. Thanks for the advice. Thinking about it, maybe I should also use shielded multicore cable from the ADXL330 to the arduino as RF poer fromthe antenna may be coupling directly into the wires!
I have checked the schematic and code and I still cant see anything to suggest that the analog pins are being set high
Can you post links to them as it does sound like the code is defining the analogue pins as outputs. Remember analogue pin 0 is digital pin 14 and so on so you could be missing something.
The problem was not noise at the accelerometer as I check its out puts while it was powered by the 3.3V supply from the arduino, they worked as expected. I checked the analog inputs to the Arduino as they were unconnected and they had various voltages on them!
I swaped the Arduino Mega with another one and it worked!!! It must have been a faulty microcontroller on the Arduino. Its been a while since I bought it so Im not sure I'll be able to get it replaced. Anyway, the main thing is that Im not pulling my hair out any longer ;D