Hey gang.
Not a week goes by without someone showing off his or her DC load project, and I'm afraid this is one of those posts. For that I am sorry. Nevertheless I'd be happy if you could spare a couple of minutes and have a look at my design. Like Dave would put it, I'm a young player. Apart from tinkering with an Arduino starter package this is my first real project. This is not meant as an excuse for sucky design but more as a favour I'd like to ask of the old hands: please check for obvious traps that I might have fallen into.
I'm especially interested in your thoughts about the modularity of this thing. Decoupling seems to be a thing with all of my circuits, so that's another point I'd like you to look at. Finally, I'm well aware that my drawing skills stink. If you see "horrible" things, be sure to point them out. I'm eager to learn, so don't hold back. "Rip the thing apaaarrt."
Design goal
An electronically controlled DC load that can draw up to 3A with milliamp resolution.
Modular design: the number of load control subcircuits is variable. This gives the option to add more oomph to the appliance by adding more load control subcircuits.
Circuit explanation
The microcontroller sets the DAC (MCP4725) to a set voltage which is then fed into the regulating subcircuitry which, using a couple of N-channel MOSFETs (IRF640), draws the amount of current needed for the feedback loop to stabilize at the input voltage.
Current drawn = set voltage / 0.1 * number of load control subcircuits
As configured, the input voltage is attenuated by 99.8% (divider R4/R5) to give it a range of 0-0.15V (4095 steps). With two regulation subcircuits having a 0R1 sense resistor bank each, the load can pull 0.15 * 10 * 2 = 3A with a theoretical resolution of 0.75 mA.
Each regulation subcircuit has a sense line which feeds into an ADC (ADS1115) that is then read out by the microcontroller and processed (compared to desired current, sent to the appliance's display, logged, <insert fancy stuff here>.) The ADC input lines are protected by operational amplifiers with a +5V supply in order to stay below the VDD+0.3V limit on the input lines.
Communication between the microcontroller, DAC and ADC is handled via I2C. The bus is operating at +3.3V, pullup resistors are 470R each.
Reverse polarity protection of the load input is handled by a P-channel MOSFET and a Z-diode. An ADC sense line on the load input enables the MC to calculate the dissipated power at any given time.
Power supply
The appliance should be run off a +15V wall wart.
+12V and +5V are regulated by a 7812 and a 7805 respectively.
The negative supply for the operational amplifiers comes from a MC34063 configured as voltage inverter (not sure about the values of the controlling components here, will have to breadboard it first).
A divider on the +5V rail supplies the +3.3V needed for the I2C bus.
What's missing
A temperature control subcircuit. I will probably go with a variable fan with simple diodes as temperature sensors. Placement will be below IRF640 heatsinks.
A decent user interface. 132x4 OLED display, connected to the I2C bus. Keybad for mode selection and data input, rotary controller with pushbutton for further control functionality. Soft Load ON/OFF switch, hard mains switch.
USB and/or RS232 port, programming capability. I'd like to be able to upload a "load curve" into the MC. Will have to spec this out first though.
Architectural thoughts
I'm thinking about putting the load control subcircuits on riser boards. This way they would be easily replacable and -- given enough free slots on the main circuit board -- the appliance would be really extendable.
So there you have it. My next steps will be the integration of the stuff that is still missing, and once that is done I plan on designing a PCB for this thing.