0
\$\begingroup\$

I'm actually asking 2 questions - one about sine wave generation and another about high rate / precision voltage measurement.

I'm working on a project where we have to generate a sine wave on top of a DC bias - say, 3.2V with a +/- .1V amplitude sine wave - for the purposes of EIS. Because we will be measuring low impedance devices, a small voltage difference can result in a large current, so just generating the signal is not enough, it has to be able to deliver fairly high current (~4 amps max) . Right now, we are doing low-side N-type FET control with a PWM sine wave generated by an arduino or a C2000 TI board, with a low-pass filter on the high side of the circuit. The results are alright, but the low-side FET control causes a fair amount of noise. Would this be improved by physically hiding the FET behind the filter and doing high-side control?

So far, we are generating a sine wave that reduces in resolution as the frequency increases, but it should be able to generate between 1 Hz and 50 kHz. The sampling rate has quickly become the bottleneck, as measurements taken with the 10-bit adc on the arduino are next to useless, so we are using an external ADC, which is limited to about 400hz sampling rate. Are there any recommendations for a faster, less noisy ADC than the ADS1115?

Is this a decent approach to the sine wave generation, or would using another form of generation and then maybe using an op-amp give better results? Our THD right now is around 10% with a .1 ohm load at low frequency, and we would like to get that as close to 0 as possible. Any advice would be greatly appreciated.

\$\endgroup\$
1
\$\begingroup\$

I am not sure what your output stage looks like, but if its a half bridge then you just need the filter on the single output. If its a full-bridge then you need a filter going between each of the two half bridges.

I would recommend delta-sigma modulation rather than PWM. PWM tends to require that the timer frequency is much higher than the output waveform frequency.

For example if you want to make a 50kHz sine wave with 8-bit pulse width resolution and you want to have at least 16 pulses per sine-wave at 50KHz then your timer frequency would need to be 50kHz * 2^8 * 16 = 204.8Mhz.

To achieve the same amount or better of output ripple using delta-sigma you would only need a timer resolution of 50kHz * 2 * 16 = 1.6MHz.

Additionally, you can perform both PWM and delta-sigma open-loop so that your ADC does not become a bottleneck.


delta-sigma is pretty easy to implement open-loop.
keep an internal state variable V.
calculate the desired state V_ref = sin(t) + offset at each point t.


if V < V_ref then
set ouput transistors to high for that time slice
V = V + dV
else
V = V - dV
set output transistor to low for that time slice
end if
The time slices are fixed, say 1us or so.

I have implemented the delta-sigma logic described above on a 600W sine-wave generator and it worked very well.

\$\endgroup\$
  • \$\begingroup\$ Awesome, thank you for the response! I'll definitely look into using this for generating the sine wave. \$\endgroup\$ – user3617697 Mar 16 '16 at 23:35
0
\$\begingroup\$

1) Sine wave. Assuming you want a clean sine wave, single-ended PWM is not good. You really ought to have a PWM frequency 10 times faster than the output, and a very sophisticated output filter. For a 50 kHz output, this suggests a PWM frequency of 500 kHz or better. Furthermore, since you want 4 amps, your switches will need to be pretty good, as will your gate drivers. Then there's the question of harmonic control, which is why I suggested a very good output filter.

2) ADC - You don't say what your ADC requirements are, but you seem to link it to your sine wave output. And why do you think an ADS1115 is noisy? Input noise should be less than 10 uV, which is less than 1 lsb for a 1 volt input. If you are getting objectionable noise levels, that is entirely your own fault. As for other ADCs, I suggest you go to Digikey.com and check out their product selector for A/D converters. Restricting the search to in-stock items, I see 843 items (some of them the same IC in different packages, of course), ranging from 8 bits to 32 bits, and 20 Hz to 65 MHz.

Using your described PWM I'm a bit surprised that you're getting THD as low as 10%. If you want low THD (~0.1%) I'd suggest a high-end audio amplifier. Linear will do what you want, but at the cost of some power. You can go the Class D route, with what is essentially PWM but done by experts. Both are available on the internet as amplifier kits (try eBay), and especially for the Class D I recommend buying a premade pcb which has already, in theory, been done by somebody who knows what he's doing. Although caveat emptor, as always applies.

\$\endgroup\$
  • \$\begingroup\$ Awesome, thanks for the quick answer! I'm not sure what the cause of the noise was for the ADS1115, maybe the pwm was just slower than 10x the frequency of the sine wave. \$\endgroup\$ – user3617697 Mar 16 '16 at 23:25
  • \$\begingroup\$ @user3617697 - Keep in mind that 10x only works with a good output filter. Are you sure yours is up to snuff? \$\endgroup\$ – WhatRoughBeast Mar 16 '16 at 23:31
  • \$\begingroup\$ Mine is just a really simple low-pass filter tuned for ~8000Hz, so it's entirely possible that it's not. I had a question about the audio amplifier though - will it map the input voltage onto a different voltage range, or only supply a larger current over the same voltage range? I need both more current and a larger voltage range than the arduino or C2000 are capable of delivering. I'd like for the voltage to go up to at least 20V. I seem to be making a decent sine wave from the C2000 board now though, so amplifying it may be a viable solution. \$\endgroup\$ – user3617697 Mar 16 '16 at 23:33
  • \$\begingroup\$ @user3617697 - When you get the amp, you'll also have to get a power supply. A 50-watt amplifier designed to drive 8 ohms will provide +/- 28 volts. \$\endgroup\$ – WhatRoughBeast Mar 17 '16 at 0:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.