I think I understand now. So:

   1. If you're really intending to measure a signal as high as 30A, the
   output voltage will be around 4.5V, which exceeds the range the ADC is
   willing to accept (0-3.3V).
   2. Unless the sensor has a built-in amplifier, it is likely that it has
   a fairly high output impedance.
   3. To address both of the above problems, I recommend conditioning the
   signal using one of more opamp stages, so that it has about 1.5V bias and
   about 1.5V amplitude @ 30A (or 50mV/A).
   4. The IOIO samples at 1kHz. There should be no problem sampling of a
   60Hz signal. Moreover, since you know it is a sine wave, all you really
   need is measure the peak-to-peak voltage which you can then trivially
   convert to RMS. I suggest that you look at the buffered version of
   AnalogInput, so that you don't miss or depend on your application thread
   loop frequency.


On Wed, Jul 15, 2015 at 7:15 AM, Julio Castellanos <[email protected]>
wrote:

> Hi Ytai, thank you for your help. The signal is the output of an A.C.
> current sensor, the frequency is the same as the network, 60 hz, and the
> sensor can measure up to 30 A with a sensitivity of 66 mV/A. The signal has
> always a D.C. value of 2.5 V so if i measure 1 A the signal will have a max
> of 2.566 V and a min of  2.434 V. The absolute maximum with 30 A is 4.48 V
> and absolute minimum of 0.52 V, so the signal is always in the range of the
> analog input of the ioio. I want to know the value rms of the current in my
> smartphone, and i tried obtaining the rms of the voltage by calculating the
> max value of a buffer of 1000 values and the multiplying it by 0.707. I get
> the value rms of the current with an accuracy of +-0.1 A, but i need it to
> be less than that, that's why i though it would be better to compute the
> rms value of the signal in hardware so i dont have to send the whole buffer
> of the signals.
>
> El martes, 14 de julio de 2015, 18:44:30 (UTC-5), Ytai escribió:
>>
>> Before we begin, can you please specify the signal you're trying to
>> measure better?
>> Specifically, its min and max (instantaneous) voltage, and its bandwidth
>> would be important.
>> Based on that I can recommend a way of measuring it.
>>
>> On Tue, Jul 14, 2015 at 3:06 PM, Julio Castellanos <[email protected]>
>> wrote:
>>
>>> Hello, i'm currently working with the IOIO analog input with a sensor
>>> signal that comes out as an A.C. signal in the range of 2,5 V as mean
>>> value. I've tried to get the voltage through the analog input and get the
>>> rms value in software, but the value changes to much because of the
>>> bandwith limit of the IOIO:Android communication. I'm now looking to get
>>> the RMS directly in hardware and just send that value to the software but i
>>> gave a look at the hardware code for adc.c and i don't understand almost
>>> nothing, can someone point out to me a source where i can learn how does
>>> this code works?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to