Pages: [1]   Go Down
Author Topic: AC-voltage measurement  (Read 4124 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I want to measure a +/- 10V voltage with my Arduino Due. The problem is, that the input-range of the ADC is 0-3,3V.
The AC-voltage comes from a resolver. The resolver is a rotorposition-sensor of an e-motor. It gives me 2 sinusoidal signals with an +/- 10V voltage. With the phase shift of these 2 signals, I can calculate the rotorposition.

How can I realise that?

Thank you!
« Last Edit: October 25, 2013, 04:00:16 am by arduino13 » Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 41
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are the +-10 Volt from a different battery/power supply then the supply of the Arduino ?
(voltage divider to +-1,5V, adding 1.5V from other source -> 0-3V)
« Last Edit: October 25, 2013, 05:04:53 am by Enam » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, the voltage comes from the resolver. Thats a different power supply.

« Last Edit: October 25, 2013, 05:16:41 am by arduino13 » Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 41
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi arduino13,

maybe its possible to use use a Voltagedivider e.g. with 6KOhm and 1KOhm to GND.
So you would have  +-1,42V measured at the 1kOhm to GND.

If you have a second Voltage Divider at the other (2.)power supply which gives you around 1,5Volts you could connect the gnd of the first power supply with the 1,5V so you should be able to measure around 0,08-2,84 on the first Voltage divider refering to the GND of the second power supply.

Maybe try this first only with two batteries and the voltage dividers, to see if it works.

I hope my explanations are helpful.

Kind Regards
Enam  


Maybe there is also an easier solution for this problem.
Do you have a datasheet of the resolver, or better a picture of how the signal looks and what you exactly need to know of the signal.

I think I did not understand what of the signal you need exactly or if its enough to know when the 0V crossing happens.
« Last Edit: October 25, 2013, 04:35:51 pm by Enam » Logged

California
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The project lxascope on Sourceforge includes a schematic for a preamplifier which translates an input range of -4 to +6V to a 3V range of an Arduino, with 1Megohm input impedance. Included is a tutorial on how the resistors were calculated to achieve the range translation. It should be easy to adapt the range to +/-10V. If you need help, use the Sourceforge mail system for contacting the author.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33362
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

As you only want the phase shift and you do not want to measure the voltage I would but the signal into a transistor, with a seriese resistor and reverse bias diode for protection. Then collector to input emitter to ground and enable the internal pull ups.

Use a digital I put it is much faster then measure the phase angle.

Alternatively put the two signals into an exclusive OR gate then smooth the output, the voltage is then proportional to the phase.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I understand you need to measure the phase shift between 2 sinusoidal signals, maybe you can use or make a 0 cross detector which send a pulse when the ac voltage is 0.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You might be interested in this thread: http://forum.arduino.cc/index.php?topic=199839. He is using an Arduino to generate the AC signal to drive a resolver, and also to measure the outputs. I have pointed him towards some code I wrote for an induction balance metal detector, which measures the phase shift of the received signal vs. the transmitted signal.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

0
Online Online
Shannon Member
****
Karma: 200
Posts: 11673
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you know the output resistance of the resolver signal?  Useful to know
before designing a voltage divider circuit.

Assuming its fairly low I'd suggest the following divider:

resolver input to 22k to ADC pin,
+3.3V to 6k8 to ADC pin,
GND to 9k1 to ADC pin.

Then 10V input gives 3.11V, 0V gives 1.60V and -10V gives 0.10V
Logged

[ I won't respond to messages, use the forum please ]

0
Offline Offline
Newbie
*
Karma: 1
Posts: 41
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry if in some of the links above already mentioned:

For recognizing the zero crossing,
clipping diodes and a resistor for keeping the current low enough (Imax of diode @ Umax) should do the job.
http://en.wikipedia.org/wiki/Clipper_(electronics)


edit:
Well, of course it has to look like here in the first post with an additional resisor at Vin.
Also Schottky Diodes should be used...
http://www.mikrocontroller.net/topic/78414


Sorry for not finding the right picture in the first.
« Last Edit: January 06, 2014, 11:47:08 am by Enam » Logged

0
Online Online
Shannon Member
****
Karma: 200
Posts: 11673
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry if in some of the links above already mentioned:

For recognizing the zero crossing,
clipping diodes and a resistor for keeping the current low enough (Imax of diode @ Umax) should do the job.
http://en.wikipedia.org/wiki/Clipper_(electronics)


edit:
Well, of course it has to look like here in the first post with an additional resisor at Vin.
Also Schottky Diodes should be used...
http://www.mikrocontroller.net/topic/78414


Sorry for not finding the right picture in the first.

That's not necessarily going to work well into a digital pin, the Due requires
very fast logic edges on its inputs, a sloping waveform is going to cause all
sorts of havoc(*).

It could work for an analog pin, but its asymmetrical, the zero-point isn't nicely on
the sloping part so you'll see distorted crossing times from a pure sinewave in.

You really need a fast comparator like an LM339 with a little hysteresis feedback
and a pull-up on the output.  Use a resistor divider to scale and shift the input voltage
appropriately into the range of the comparator and use an identical network to map
your AC zero volt level to the other comparator input.  Result is symmetrical crossing
detection with fast edges.

(*) oscillations / multiple transitions (perhaps hundreds of them, depends on how noisy
the original signal is), high current flow through the input circuitry when the level is
mid-rail (the CMOS equivalent of shoot-through in H-bridges).

Logic signals need to be either LOW or HIGH or transitioning rapidly between those
states (for the Due which is a high speed chip, that probably means < 100ns).  Arduinos
like the Uno have some hysteresis built-in to the pins input circuitry to help prevent
these issues, the Due has this only on a subset of the pins (the datasheet says which).
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: