Solve AC Circuit Analysis Issues with Intel Galileo Gen2

  • Thread starter Thread starter cnh1995
  • Start date Start date
  • Tags Tags
    Galileo
AI Thread Summary
The discussion focuses on using Intel Galileo Gen2 for AC circuit analysis, specifically addressing issues with measuring frequency and waveform readings. Users are exploring methods to improve frequency measurement accuracy, suggesting that increasing the number of zero crossings counted can enhance results. Alternatives such as using a high-speed counter and zero-crossing hardware are recommended for better precision. Additionally, utilizing a comparator to toggle at zero crossings and employing FFT for waveform analysis are proposed as effective techniques. Overall, the conversation emphasizes the need for more reliable methods in AC signal processing.
cnh1995
Homework Helper
Gold Member
Messages
3,486
Reaction score
1,165
I am doing a little project with Galileo gen2 about ac circuit analysis in terms of voltage, current, frequency, power and pf. I am using arduino for programming,which is in embedded C. I am facing some problems. Please help me out..
1. While writing program for frequency, I counted the time lag between two successive zero crossings of the voltage waveform in terms of a counter (an integer variable) and made a lookup table. For 50Hz (standard Indian frequency), the counter value was 33. I'm getting fairly accurate measured frequency for sine,square and ramp waves(like when I give 65 Hz signal, I get 64.79 Hz through program). But is there any better logic to increase the counter value for more accurate result? How can I use on-board timers for this? I'm curious about the millis() function but don't know how to use it in this case.
2. The ac waveform is fed to A0 pin and GND, but only one cycle is read when A0 is +ve w.r.t GND. So, I shifted the dc level using a dc source in the signal's way to A0 and it totally worked. But is there any electronic way to do it? Any ICs?

Eagerly waiting for replies...Thanks in advance..
 
Engineering news on Phys.org
You could wait for multiple zero crossings, say 60 crossings, then divide by elapsed time. Improvement in accuracy should be proportional to the number of cycles.
 
To get better resolution you need a higher frequency to drive your counter. I don't know what you are using to drive your counter.
 
meBigGuy said:
To get better resolution you need a higher frequency to drive your counter. I don't know what you are using to drive your counter.
I have simply used a do-while loop after zero crossing is detected. In that loop, I read the voltage at A0 pin and increment the counter, until voltage again becomes 0. For 50Hz, this counter value is 33. How should I get a high frequency counter?
 
Timing zero crossings is a terrible way to determine frequency. (noise prone, etc)

But, saving that for later,

1. The standard way to actually time zero crossings is to have a high speed counter whose value is captured by a zero crossing. The processor is interrupted and the value saved or processed. That requires zero crossing hardware.

2. Another common method to measure frequency is to create a 1 second gate and count the zero crossings in that 1 second interval.

The arduino has a comparator. You can apply a reference to each side of the comparator (through separate resistors), and capacitively couple the AC to one side. The comparator output will toggle at each zero crossing. That can be used to trigger an interrupt, or possibly capture or increment an internal timer. Much faster than reading the ADC.

3. You can use your ADC method to read a high speed timer at each zero crossing and average your counter readings. That will allow for values that are less than a loop length.

4. The DSP method would be to run an FFT on the ac waveform as sampled by the ADC.
 
  • Like
Likes cnh1995
Thread 'Weird near-field phenomenon I get in my EM simulation'
I recently made a basic simulation of wire antennas and I am not sure if the near field in my simulation is modeled correctly. One of the things that worry me is the fact that sometimes I see in my simulation "movements" in the near field that seems to be faster than the speed of wave propagation I defined (the speed of light in the simulation). Specifically I see "nodes" of low amplitude in the E field that are quickly "emitted" from the antenna and then slow down as they approach the far...
Hello dear reader, a brief introduction: Some 4 years ago someone started developing health related issues, apparently due to exposure to RF & ELF related frequencies and/or fields (Magnetic). This is currently becoming known as EHS. (Electromagnetic hypersensitivity is a claimed sensitivity to electromagnetic fields, to which adverse symptoms are attributed.) She experiences a deep burning sensation throughout her entire body, leaving her in pain and exhausted after a pulse has occurred...
Back
Top