Scaling to a 12-bit ADC value

Guest #4248179
Hello,

I want to scale a current value(Icurr) (in Amperes) to a corresponding 
12 bit value. The to-be scaled  current value(Icurr) and a 12-bit ADC 
value(Iact) are given as inputs to a PID controller as actual(Iact) and 
expected(Icurr) values.

I am not sure how to approach the scaling.

My idea of approach is to : For example take a 1V=4A value as an input 
to ADC and find the corresponding 12bit value. Take it as reference to 
scale Icurr accordingly. But I am also not familiar reading from a ADC 
data sheet to find the approximate 12bit value for an input 
voltage/current.

Any suggestions?
Moderator (Company: Titel) #4248232
First question:
Is your question related to FPGA, Verilog or VHDL?
If so: how?

Wil wrote:
> Any suggestions?
What hardware?

> But I am also not familiar reading from a ADC data sheet to find the
> approximate 12bit value for an input voltage/current.
What ADC?

> For example take a 1V=4A value
So you have a "device" that forms 1V out of 4A, meaning 2A result in 
0.5V?
Guest #4248262
Lothar M. wrote:
> First question:
> Is your question related to FPGA, Verilog or VHDL?
> If so: how?
>
Yes, I want to implement the scaling in VHDL
> Wil wrote:
>> Any suggestions?
> What hardware?
>
Altera Cyclone IV
>> But I am also not familiar reading from a ADC data sheet to find the
>> approximate 12bit value for an input voltage/current.
> What ADC?
>
LTC1407 12bit ADC

>> For example take a 1V=4A value
> So you have a "device" that forms 1V out of 4A, meaning 2A result in
> 0.5V?
Yes, A Dual Op_Amp gives out 1V=6A (seeing from the layout)
Guest #4248312
Schlumpf wrote:
> typical:
>
> Vin = Vref : Out = xFFF
> Vin = 0    : Out = x000
>
> Vin = Rshunt * I
>
> Out = Vin * (xFFF / Vref)

So here to get a 12 bit value, Should I just consider Vin=1V 
(irrespective out of the 4A i.e. 1v=4A ?).

Or do I need to calculat the correspoding voltage for 4A? (V= 4*Rshunt) 
How do I find Rshunt from the datasheet?

The datasheet for LTC1407 says Vref=2.5V.

So for Vin=1 Out should be 1638.
Moderator (Company: Titel) #4248317
Wil wrote:
> The datasheet for LTC1407 says Vref=2.5V.
> How do I find Rshunt from the datasheet?
Because at Imax you want full scale inputof 2.5V  for the ADC you have 
to calculate Rshunt = Imax/2.5V

Buuuuuut(!):
This will only work if you can accept 2.5V voltage voltage drop over 
your shunt...

Reply

A question of your own? This thread is over 11 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.