Hi,
I just purchased an Arduino BT chip and am having some problems getting consistent readings from the analog pins. I am using the Arduino2Max pde to read the analog pins via MaxMSP. The readings of the pins fluctuates from 1023 to 922 (and a few values in between) every second or so. I need these readings to be consistent so I can accurately detect sensor data. I have an Arduino Uno and the same set up works flawlessly, with the analog readings at a constant 1023-1022.
The baud rate is set at 115200 and I am powering the BT device with a 5V power adapter. Does anyone know why this is happening? Is this a function of the bluetooth connection? Any help with this would be much appreciated. Thanks.
Attached is an image of how the board is set up. Im using the yellow wire as a capactive touch button. If you have any ideas about why I'm getting weird readings with this setup please let me know. On the actual prototype I have this setup multiplied by 6 (using all the analog pins). I should also note that the same setup works perfectly with my arduino uno board.
Thanks.
One possibility is that you've made a radio receiver.... The bluetooth signal is being picked up and rectified. Another possibility is that there is noise on the supply voltage that's causing the same effect with the reference voltage for the analog pins. The noise/interference could be at RF frequencies or could be associated with the on-board switch-mode PSU surging as the load changes during bluetooth transmissions (although this shouldn't be much of a load - perhaps some other load you have attached that is switching every second.
Cures include decoupling and shielding (a capacitive pick-up is by nature hard to shield). Keep signal wires well away from the inductor that's part of the PSU (near the +5V/gnd header) as that is spraying flux around. You could add capacitance to the analog inputs to reduce high frequency pick up (try 100pf, then 1n, then 10n etc)
MarkT,
Could you explain to me a little bit more about what you posted in your last two comments. Im fairly new to Arduino, and dont really understand much of what you told me. How would I decouple and shield?, or add capacitance to the inputs? And also what do you mean by "using ground rather than +5V as your capacitive pickup reference as the board has a ground plane." If you could explain this in a simpler manner, it would be much appreciated! Thanks so much for your help!