I want to use microcontroller for reactor operation.
In this project, I am connecting one reactor with a 10 ohm resistor and MEGA 2560 as shown in the attached figure. My intention is to use PWM pin to apply voltage for reactor operation and use ANALOG IN pin to read the voltage crossing the resistor. Afterwards, program MEGA 2560 to use the read voltage as a reference and monitor the applied voltage at PWM pin to achieve optimum reactor performance.
Is there anything wrong with circuit since it never worked? I wish to get some advice and comments.
I knew a guy who was working on this stuff, light from dirt, for like undersea applications. It didn't work very well, though, which is why you haven't heard of him!
PWM does not produce an analog voltage - it sounds like you want that though. If you want an analog voltage, you need to put it through an RC filter.
This will still only give you a reference voltage, you can't draw any current from it. If you need to draw current from it, you need to buffer it somehow - a rail to rail opamp would work, assuming the current is low enough that a suitable device can be found.