New to electronics, 1st experiment, just bought all this stuff to start, so apologies in advance for inaccuracies.
I'm trying to have Arduino detect resonance frequency of an LC circuit, unknown mH & uF. My intention is to hit the circuit with a short lived square pulse, and listen to the ringing right after it to infer its natural frequency.
I notice I could use the ringing frequency of the circuit after a square pulse, the scope shows a beautiful damped sinus when not grounded and the power source being a function generator on square mode.
- Bunch of inductors on the left (about 900mH).
- Capacitor on the right (10uF).
- Orange wire is the loop, with a diode to prevent back circulation.
- Blue wire is test point (left capacitor leg) to probe on channel 2 (blue line on screen.)
- Also diode to prevent back kick on power source.
- Natural frequency about 44KHz.
- When I use the Arduino pin as power source I see nothing.
- A DC power supply, switched on-off with an Arduino pin need to be grounded for it to work at all [**]. When grounded the ringing is gone, only one period shown on scope but 1/2 the frequency shown on the function generator pulses (not grounded.) The switch is a P2222 NPN transistor driven by an Arduino digital pin. It switches current from a DC power supply.
Questions:
- [**] Why is the scope not detecting any voltage with the DC supply if not grounded, yet the function generator doesn't seem to need that?
- Why doesn't switching the DC supply on/off produce a ringing like the function generator does?
**Edit: Adding diagram **
This should be close enough. Power source changes between scenarios, also the open/close circuit to negative/ground.
"Grounded": I don't actually have a ground connection, I meant, the anode pin from the power source, or Arduino's GND.