#### arbabar

##### Member level 2

i want solution of my problem kindly suggest me i m looking for it

my sensor output voltage ranged 0-30v

but controller works on 0-5v

so i use potential divider circuit and limited the voltage to 0-2.5v

as r2=430k and r1=4.7M formula = Vout={r2/(r1+r2)}*Vtotal

Vout={430k/(430k+4.7M)}*30=2.5V as vref=5v so vin(adc)=0-2.50v which mean adc value is from 0-512 ....

now i want to aad check point as

if

vmax of(0-30)v vmin(0-30V) uart Transmit

2.2 1.1 ABC

3.2 2.5 CDE

.. ... ...

hence 16 values.....

i simply find a factor of 12. as 30/2.5=12

so for calculating equavalent value of (0-30)v in range of (0-2.5)v i just simple divide (0-30)v by twelve...

now how can i add check point on my values obeviously i must add them into adc values form 0-512 kindly help me regarding to this i m new b..

i m working in mikro c

how could i design it in editable mode so that one should easly edit it i.e vmax and vmin and transmit alphabatical value

i m using adc, uart , lcd for edition and diplay voltage range, num pad to edit values .....