Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How is the capacitor connected? #1

Open
larry-athey opened this issue Oct 17, 2024 · 4 comments
Open

How is the capacitor connected? #1

larry-athey opened this issue Oct 17, 2024 · 4 comments

Comments

@larry-athey
Copy link

I see that you have a chargePin and a sensePin. How is the capacitor connected? Across these two pins? Or are you using diodes to isolate these pins from each other while they're both connected to the same lead of the capacitor while the other lead is grounded?

@jpsullivan234
Copy link
Owner

Sorry for the lack of documentation, I threw this code up here in a hurry and completely forgot to explain the connections. The two pins, sensePin and chargePin, must be connected via a 2Mohm resistor to each other (I don't remember why, this was a while ago). The capacitor is connected between the sense pin and gnd.

@larry-athey
Copy link
Author

Thanks!

I think found an Arduino example using a similar method and they're using resistors kinda like you mentioned.

https://www.circuitbasics.com/how-to-make-an-arduino-capacitance-meter/

I'm kinda grabbing at straws here for one of my projects here. I want to see if I can measure capacitance between two probes to see if it changes with different fluid levels in a vessel. It's for a flow sensor in my smart still controller. Ethanol and distilled water aren't conductive, so I'm curious to see how varying levels in an overflow cup can be measured by reading capacitance.

Yeah, I have weird projects and hobbies. 😆

@jpsullivan234
Copy link
Owner

That's wild that you're making a level sensor! That's exactly what I made this code for. I was trying to measure the water level inside a small tank using 2 metal plates. Actually got it to work decently well, but it was a scrappy project haha. Not sure how much charge ethanol can hold, but be warned that you might need to find code that can measure suuuper small capacitance! I found a clever arduino code for this a while back, I'll see if I can dig it up for you. Another thing worth looking into is using the built-in touch sensor on the ESP32 because that's basically a small capacitance meter in itself.

Love the project, good luck!

@larry-athey
Copy link
Author

That actually is funny!

My idea is to use a small section of 1/2" copper tubing with one end closed off and ten small 1mm holes up one side for the distillate to overflow out of and the top one being larger so it can't overflow over the top. This is the only way I can think of to determine how full the little tube is. The distillate output of a still is really low, so those hall effect water flow sensors aren't reliable. Ethanol also has like next to nil refractive index, so you can't exactly count drops per minute with an opto coupler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants