Trying to read the voltage in a rc circuit

Im working in a project for my school, I have to be able to see the charge and discharge of a capacitor in a graph, but my arduino appears to have some kind of noise, is it broken? or im doing something wrong?
I'm new to the forum btw

This is my setup

And im on labview, on the left you can se the noise, in the middle is when I push the button and charges, everything looks good, but when I release the button the noise appears again as you can see on the right

Capture

This is my program

Pleas help :c I really think that my arduino is broken, because is a chinese copy

Please show a symbolic circuit diagram.

What is the big black thing on the right?
Does your circuit look like this

Can you show us a schematic of the circuit you have on the breadboard, please?

When the button is not pressed, does that relay disconnect the blue wire from the rest of the circuit? If so that blue wire will act as an antenna, and will pick up noise and particularly mains hum.

I'm not sure how much help you will get here, I can't imagine there will be many LabVIEW users on this forum.

If the issue is software related, then you might get a better response on the LabVIEW forum.

Do you even need the pushbutton and relay?

You can use a digital output slowly switching backwards and forwards between LOW and HIGH to charge/discharge a capacitor through a resistor.

See this topic for details of a similar project (using serial plotter, rather than LabVIEW).

@OP,
First, LINX is deprecated (obsolete). It was replaced with the Labview Hobbyist Toolkit.
Labview Hobbyist Toolkit Download.
Second, for a multitude of reasons (the list is too long), the SOP on the forum (Standard Operating Procedure) is for the poster to start with a description of their objective, followed by a description of the problem , followed by a schematic attached as an electronic copy of either a CAD schematic, or a hand drawn schematic on a blank sheet of paper. Last but not least, the poster is expected to
describe their electronics experience/knowledge when posting about an electronics issue , which
clearly this is. The most obvious thing about the waveform you posted is the voltage is way out
of whack for a push button. Standard convention is the circuit posted jim-p. The button output
(in this case the switch common) should either pulled up or down, depending on the application and the cap is there to eliminate switch bounce. A TTL schmitt trigger would give a snap output,
with a short rise and fall time (if you know what that is).
Through-hole non-inverting schmitt trigger IC
The throughhole ICs are mostly obsolete but always available on EBAY. Most of the engineers answering these posts have tons of them squirreled away because we electronic nerds are hoarders by nature. (yes , I have some too). But that's probably overkill for your purpose but since you did not post a schematic, and the circuit is clearly not correct, it is hard for us to address your
issue. Please post a schematic and state your electronics experience so we can move forward.
(Welcome to the Forum)

1 Like

What makes you think your Arduino is bad it appears it is just being used as your power supply? Did you measure the voltage on the cap when charged, if so what was it? Your circuit is flawed as you are also discharging you cap through the analog input. You can use a unity gain opamp buffer from the cap to your A0 of the arduino. What type of scope are you using? Increase your scope sensitivity to get a better reading. Also check your ground connection. Is it grounded at the cap?

If the OP is pulling down the regulator with his circuit that would explain the low voltage.
Which begs the question (again), "How much electronics experience does the OP have ?".

1 Like

This is good experience even though the OP may not think so. The fact that test equipment adds load and changes the circuit is not comprehended for many years. When we get the experience we automatically factor it in.

Ohm's Law
Ohm's Law

(the penalty for forgetting Ohm's Law is a PIE in the EIR)

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.