Firstly hello to everyone, this is my first time in the forum .
I recently retired and decided now I have more spare time I can try to learn more about electronics . I have never worked in the electronics field , but for many years have dabbled for a hobby. My main interest is programming MCUs
I know I wont learn much by just asking ,how do I do this and sitting back waiting for an answer. I will learn more working through it myself if I can just be pointed in the right direction.
Ok here is where I am stuck.
My aim is to measure a DC voltage and display it on an LCD. My plan would be to input the voltage to the ADC input of a pic chip and then diplay the results on the LCD . Up to this point I have no problem.
Here is where the problem starts . The ADC input has to be no more than 5v or the chip lets out the magic smoke , the voltage I need to measure is up to 30v.
I know I can get around this with a voltage divider , 1 resitor of 7.5k and one of 1.5K means a 0v-30v will reduce to 0v-5v , great just what I need . So where is the problem?
Using the 10bit ADC I can get 1024 steps of measurement, but in practice my input voltage will never drop below 20v so realistically I will only ever use the top 341 of 1024 steps . If I can some how lose the first 20v off the input so I measure only the 20v to 30v swing ( 10v ) then voltage divide that to half its value I still have a 0v to 5v input but the ADC result will be 3 times more precise because I am now using all 1024 steps.
My problem is I dont know how to lose those first 20v. I wanted to try to solve it on my own so did some searching on google . Unless I have lost the plot along the way I think my answer lies in an op amp , a differential input op amp. The trouble is I have never ever used an op amp in my life and I dont know how to go about it . My thought is that if I conect my 20v-30v input to the + input and fed an accurate 20v to the - input that the output would swing between the difference of the 2 inputs , namely 0v-10v. So,,,
1) Is the differential input op amp the best way to go about it
2) if so what would be a good amp to use ( I have 741s but I thought they were only good to about 15v
3) can someone tell me what to do about feedback resistors to set the gain and do I need to null the offset ?
4) if the fixed 20v on the - Input came on before the 20v-30v variable input was established would the output try to go 20v negative and destroy something or would it just sit waiting at 0v
I hope someone can help , I have tried to sort out as much of this as I can by my own efforts , and if what I am trying to do is totally wrong and I missundertood about the op amps operation then please excuse me , I did try my best
Regards
Don
I recently retired and decided now I have more spare time I can try to learn more about electronics . I have never worked in the electronics field , but for many years have dabbled for a hobby. My main interest is programming MCUs
I know I wont learn much by just asking ,how do I do this and sitting back waiting for an answer. I will learn more working through it myself if I can just be pointed in the right direction.
Ok here is where I am stuck.
My aim is to measure a DC voltage and display it on an LCD. My plan would be to input the voltage to the ADC input of a pic chip and then diplay the results on the LCD . Up to this point I have no problem.
Here is where the problem starts . The ADC input has to be no more than 5v or the chip lets out the magic smoke , the voltage I need to measure is up to 30v.
I know I can get around this with a voltage divider , 1 resitor of 7.5k and one of 1.5K means a 0v-30v will reduce to 0v-5v , great just what I need . So where is the problem?
Using the 10bit ADC I can get 1024 steps of measurement, but in practice my input voltage will never drop below 20v so realistically I will only ever use the top 341 of 1024 steps . If I can some how lose the first 20v off the input so I measure only the 20v to 30v swing ( 10v ) then voltage divide that to half its value I still have a 0v to 5v input but the ADC result will be 3 times more precise because I am now using all 1024 steps.
My problem is I dont know how to lose those first 20v. I wanted to try to solve it on my own so did some searching on google . Unless I have lost the plot along the way I think my answer lies in an op amp , a differential input op amp. The trouble is I have never ever used an op amp in my life and I dont know how to go about it . My thought is that if I conect my 20v-30v input to the + input and fed an accurate 20v to the - input that the output would swing between the difference of the 2 inputs , namely 0v-10v. So,,,
1) Is the differential input op amp the best way to go about it
2) if so what would be a good amp to use ( I have 741s but I thought they were only good to about 15v
3) can someone tell me what to do about feedback resistors to set the gain and do I need to null the offset ?
4) if the fixed 20v on the - Input came on before the 20v-30v variable input was established would the output try to go 20v negative and destroy something or would it just sit waiting at 0v
I hope someone can help , I have tried to sort out as much of this as I can by my own efforts , and if what I am trying to do is totally wrong and I missundertood about the op amps operation then please excuse me , I did try my best
Regards
Don