Solve AC Circuit Analysis Issues with Intel Galileo Gen2

  • Thread starter cnh1995
  • Start date
  • Tags
    Galileo
In summary,1. The standard way to time zero crossings is to have a high speed counter whose value is captured by a zero crossing.2. Another common method to measure frequency is to create a 1 second gate and count the zero crossings in that 1 second interval.3. You can use your ADC method to read a high speed timer at each zero crossing and average your counter readings.4. The DSP method would be to run an FFT on the ac waveform as sampled by the ADC.
  • #1
cnh1995
Homework Helper
Gold Member
3,483
1,164
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
  • #2
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.
 
  • #3
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.
 
  • #4
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?
 
  • #5
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

1. What is the Intel Galileo Gen2?

The Intel Galileo Gen2 is a microcontroller board designed for rapid prototyping and small-scale projects. It is based on the Intel Quark SoC X1000, a low-power, 32-bit, single-core processor.

2. How does the Intel Galileo Gen2 help with AC circuit analysis?

The Intel Galileo Gen2 has built-in analog-to-digital converters (ADCs) and general-purpose input/output (GPIO) pins that allow it to take measurements and control external components, making it a useful tool for AC circuit analysis.

3. Can the Intel Galileo Gen2 be used for both AC and DC circuit analysis?

Yes, the Intel Galileo Gen2 can be used for both AC and DC circuit analysis. It has the capability to measure both analog and digital signals, making it suitable for a wide range of circuit analysis tasks.

4. What programming languages can be used with the Intel Galileo Gen2?

The Intel Galileo Gen2 can be programmed using a variety of languages, including C/C++, Python, and JavaScript. It also supports the Arduino Integrated Development Environment (IDE), making it accessible to those familiar with the Arduino platform.

5. Are there any resources available to help with using the Intel Galileo Gen2 for AC circuit analysis?

Yes, there are many resources available online, including tutorials, guides, and forums, that can help with using the Intel Galileo Gen2 for AC circuit analysis. Additionally, Intel provides documentation and support for their products, including the Galileo Gen2.

Similar threads

  • Electrical Engineering
2
Replies
48
Views
2K
Replies
18
Views
2K
Replies
4
Views
836
  • Electrical Engineering
Replies
13
Views
1K
Replies
7
Views
4K
  • Electrical Engineering
Replies
7
Views
3K
  • Electrical Engineering
2
Replies
39
Views
2K
  • Electrical Engineering
2
Replies
63
Views
5K
  • Electrical Engineering
Replies
5
Views
2K
  • Electrical Engineering
Replies
13
Views
2K
Back
Top