I have this project, where there is an Arduino Uno and this separate electronic circuit, that has an alarm beeper. Maybe i need to indicate here, that although a separate circuit, it gets its power from the same LiPo the Arduino gets its power.
I have connected one leg of the beeper component, from that separate circuit, to the A0 analog, on the Arduino and another leg of the beeper component, to the ground on Arduino and measured the voltage and it goes from 0 to a few volts, every time the beeper beeps and back to 0, between beeps. All nice and well, up to this point !! But this happens, only when all the other components of the project are not connected to the various Arduino inputs and outputs!! When I connect the rest of the project to the Arduino, on top of that voltage measurement, i get a constant 4.92V, no matter what i do! This is bugging me with no resolution, for over a month now! I want to complete this project so very much!! Can please someone help me??!!!
How have you configured A0? Digital in, digital out or analog in?
What do you want to do with this signal? Using analog in to measure a signal that has only two states (on or off) is a bit pointless.
I have connected the A0 analog in. It is not pointless in my case.
The alarm Beeper circuit doesn't get it's voltage from the Arduino 5V, but from a splitter that goes out of the LiPo through a 5V regulator.
I just want to understand at this point, what could be the general principle, that makes the Arduino change its measurement of a totally separate system, in both these setups, while the only connection between these two separate systems, besides the voltage measuring wires, is that they feed on the same power source.
OK -
Let me just say, that I am sure there are many more elegant, easy and professional ways to do, what I am trying to do, but I would appreciate it very much, if it could be possible to explain to me how to fix the problem, in the general way that I have already built the system.
I have connected a LiPo 2-3S battery alarm to the Arduino, by soldering the back side of the LiPo alarm PCB beeping module (-) leg , to the Arduino ground and the other (+) leg of the beeping module, to the Arduino A0 input. Well...I guess that's it. The rest you already know. The other Arduino pins are connected with servo signals and power, Bluetooth dongle, led chain, relays and all that kind of stuff. It is that same LiPo that powers the Arduino via its main power and being watched by and powers the LiPo alarm, via the balance cable. Ah, and the LiPo alarm balance cable ground wire, is connected via a relay, controlled by the Arduino, in order to shut down itself via the main LiPo ground cable and also, when the alarm beeps and the Arduino presumably detects that the LiPo alarm beeps and shuts down itself, it will also switch off the LiPo alarm (both are connected on the same relay), so the LiPo alarm will not be left to beep and damage the LiPo.
So why would the same voltage code act decently, when only the beeper legs to ground and A0 are connected and when all the rest of the stuff is hooked up as well, it will show a constant 4.92V?
But this happens, only when all the other components of the project are not connected to the various Arduino inputs and outputs!!
It is with all the other components. Sadly you are keeping this secret for some unspecified reason so we can only guess.
My guess is that you have the grounds mixed up. With just the two components, Arduino and thing that contains the bleeper, they are probbly floating with respect to each other. With the secret stuff connected there is some other grounds involved and the two units are no longer floating and so the voltages are, to use a technical term, screwed.
Please mate, you have said that you have built a circuit, to help you we would appreciate a scanned or photographed or CAD drawing of it.
Not just a photograph of your setup but a schematic diagram.
This way we can work out where the cause of your problem may be.
Tom.
We are here, willing and maybe able to help. But we need all the details, schematics, sketches.
But, if it works, with a few of the many modules attached, but then stops when additional ones are attached, you should look at the power supply, and connections.
Can you simulate the problem with fewer modules connected, and smaller sketch?
Maybe some of the many modules are trying to use the same I/O pins?
roineust:
I have connected the A0 analog in. It is not pointless in my case.
The alarm Beeper circuit doesn't get it's voltage from the Arduino 5V, but from a splitter that goes out of the LiPo through a 5V regulator.
But the Beeper has only two states, on or off, ~0V or ~5V.
You don't need to know the actual voltage to the Beeper, only if it's on or off.
That's a digital signal. Try setting A0 as a digital input and use a 10K pull down resistor to stop it floating.
The reason is of course not clear to me, at the electronic in-depth level of things, but what made it work, is that i had one leg of the beeping module attached to the Arduino A0 and the other leg, instead of Ground in the Arduino to the Arduino A5 (just so they will be physically well separated) - and then, when taking an analogRead of A5 - and when it was beeping, there was a reading of around 600-700, in contrast to 1023, when it was not beeping. And all the rest of the wires are hooked in the Arduino! It might also be, that it is only this specific type of LiPo alarm, that when connected from these points on the PCB, acts this way, i don't know. I have tried more than one type.
But, your responses encouraged me to go on and check things further - i am very thankful for your responsiveness and so relieved that this issue is behind me!!