Offset and/or gain

hello all,

i want to compress an incoming full scale CV (-5 → +5V) to only positive values (0->+5V)
-but retaining the full original wave

i noticed (on the DATA module) you really really need to be very precise when setting the offset and gain values to archieve this
these values also doen’t really are logical to me
for now i’m using a 41 offset and a 62 gain

does anybody have better idea or values to archieve this?

thanks,

jo

its simply scale * 0.5 , offset + 0.5.

you can see this will work perfectly with an internally generated signal (e.g. sine wave) as its mathematically correct, to 32bits…

any variance on this is therefore to do with source… not the scale/offset
so, if your doing this with an external signal, then I refer you back to my calibration article in the wiki.
all codecs/op-amps will ‘colour’ signals, may have DC offsets, have slightly non-linear responses near rails , and also wont get to full rail voltages…and will differ per input (due to component tolerances).
Id need to test, but Id have thought something like +/- 4.7/4.8v might be close.

anyway, overall, Id need to see alot more info on what your doing to see where the real issue is…

1 Like