Building PCB? Why? You can also do it a prototype PCB board. Its very simply schematic.
For the amp meter you can use the ACS712 5a current sensor module, build the opamp circuit, and add the 2 resistors as a voltage divider. The LM350 and the TIP41 its better to be on a bigger heat sink. The ones I use are doing the work for the demonstration, in a real application you got a lot of heat to sink.
Any way, I didn't build the circuit on a prototype board. I made my own PCB! Values of the components are written on the PCB. Remember larger heat sink if you are going to drop a lot of voltage or if you are going to use high current.
I bought a ACS712 module and I remove the IC from the module.
Connecting the PCB to the board.
To connect the PCB to the InvIoT, you first need to connect the power pins.
from the PCB to InvIoT
Remember that you get the 24v from an external power supply you drop it to 12v by using the 7812 on the PCB.
On the InvIoT there is a 5v regulator that goes back to the PCB so the ACS712 can run.
Then you got the input pins, Volt and Amp:
volt reader pin goes to A2
and the amp pin goes to A3
Finaly is the PWM pin that drives the opamp. It has to be an arduino PWM pin. I use D9.
You must power the PCB with a power supply over 14V and less than 24v.
Uploading sketch, calibrating and setting up
After you install the InvIoT library, the sketch will be found on your arduino IDE at file/examples/InvIoT_U1/applications/powerSupply.
You upload the sketch, like you do with any arduino sketch.
Fist time you run the sketch, it will go to the calibration wizard.
Connect a volt meter at the output of the PCB.
Press rotary for next, and the PWM pin (D9) goes all the way up (5v). Adjust the trimmer to the maximum voltage that you would like to be your output. (about 2v less than the input voltage).
Press rotary to go to calibrate the volt meter of the voltage divider. Every resistors are different, so you calibrate the voltage divider with the volt meter.
Press rotary and remove volt meter, so there is no load at the end of the output.
The amp meter is getting a measure at 'zero point'.
Press rotary to save calibration to EEPROM.