That bits no issue for me. Its the front end analog bit I am haviing the issue with.
Hoped some analog hero would pop in with the solution !
bill
That bits no issue for me. Its the front end analog bit I am haviing the issue with.
Hoped some analog hero would pop in with the solution !
bill
Maybe I am misunderstanding.
Analog front end.
The pot is connected between the ground and 5+ with the wiper going to the ADC input.
The PWM output goes to the mosfet gate.
The pot is not connected to the 10 volt. Use the same power supply as the PIC. The 10 V will only connect to the drain or source of the mosfet. NPN or PNP, what ever you use.
Dave
Always wear safety glasses while programming.
you can still use your opamp directly.. the problem here is that your gain will never be 0.5 but 1.5.
This bring at least few solutions. Forget the opamp, and use a simple voltage divider with 2 resistors + small capacitor (let's say 0.1uF) to smooth the signal noise...
OR a more fancy op-amp circuit + low pass filter. the whole thing must have a gain of 0.5.
Advantage to use an opamp in between... at least a higher input impedance... so you don't alter the signal.
Which voltage sources you have on hand? Is there any negative rails?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks