Timeline for Frequency measuring using Arduino (AC analog input)
Current License: CC BY-SA 4.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 5, 2019 at 6:00 | history | tweeted | twitter.com/StackArduino/status/1136150862814941184 | ||
May 16, 2019 at 23:49 | answer | added | esoterik | timeline score: 0 | |
May 16, 2019 at 3:05 | review | First posts | |||
May 16, 2019 at 8:35 | |||||
May 9, 2019 at 9:01 | comment | added | Edgar Bonet |
1. Why the transistor? The optocoupler already includes a (photo-)transistor, so why add another one? 2. pulseIn() measures the length of a pulse, i.e. the time between a rising edge and the following falling edge (or vice-versa). For measuring a frequency, you need the time between two consecutive rising (or falling) edges. 3. What is the range of frequencies you want to measure? What kind of accuracy do you need? There are many methods to measure a frequency, and the "right" one for you depends on your requirements.
|
|
S May 8, 2019 at 23:05 | history | suggested | chicks | CC BY-SA 4.0 |
copy editing and formatting
|
May 8, 2019 at 18:05 | review | Suggested edits | |||
S May 8, 2019 at 23:05 | |||||
May 7, 2019 at 12:10 | answer | added | Edgar | timeline score: 2 | |
May 7, 2019 at 9:22 | comment | added | Tejas Bhagoliwal | The output, as shown, goes to the Arduino digital pin. I looked at the input signal to ensure it is indeed sinusoidal. However I have not looked at the output. I will do so. Thank you for your input! | |
May 7, 2019 at 7:25 | review | Close votes | |||
May 16, 2019 at 23:38 | |||||
May 7, 2019 at 7:04 | comment | added | chrisl | Try adding a resistor between base and emitter of the transistor to pull the base to ground, when the phototransistor of the optocoupler is not conducting. That should keep the transistor base from floating. Though it is only a guess, that this is a problem. Can you observe the signal and the output of the circuit with an oscilloscope? | |
May 7, 2019 at 6:57 | comment | added | Tejas Bhagoliwal | I have added the circuit diagram. I'm not using a Schmitt trigger since my professor has explained to me that the circuit I am using will convert the AC signal to pulses, which can be read by the digital input pins of the Arduino. However, I do admit I am not an electronics engineer, so my knowledge about this is quite limited. | |
May 7, 2019 at 6:56 | history | edited | Tejas Bhagoliwal | CC BY-SA 4.0 |
added 86 characters in body
|
May 7, 2019 at 6:50 | comment | added | chrisl | Please provide a schematics or wiring, how you have the signal connected to the Arduino. What form does the signal have? Are you doing some preprocessing, or do you simply rely on the Schmitt Trigger inside the digital input of the Arduino? | |
May 7, 2019 at 6:26 | history | asked | Tejas Bhagoliwal | CC BY-SA 4.0 |