Author Topic: Modular DC Load -- design critique  (Read 3344 times)

0 Members and 1 Guest are viewing this topic.

Offline AeternamTopic starter

  • Supporter
  • ****
  • Posts: 97
  • Country: lu
    • Schartz Engineering
Modular DC Load -- design critique
« on: April 14, 2016, 10:08:55 am »
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.
« Last Edit: April 14, 2016, 10:27:48 am by Aeternam »
 

Offline krish2487

  • Frequent Contributor
  • **
  • Posts: 500
  • Country: dk
Re: Modular DC Load -- design critique
« Reply #1 on: April 14, 2016, 11:03:54 am »
Just a cursory glance, nothing in detail.


I think you mixed up the AREF and VCC voltage regulators.


Secondly, the AREF pin cannot be higher than the 5V give or take. I don't think you can use a 7812 to power the AREF pin as an external reference
If god made us in his image,
and we are this stupid
then....
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3024
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Modular DC Load -- design critique
« Reply #2 on: April 14, 2016, 11:33:37 am »
Not looked in detail, but these jump out at me..

ATmega Vcc can't be 12v
You do not appear to be using any of the ADC of the Atmega, so connecting AREF is not of any use
AVcc and AGnd is not connected but will need to be because (from memory) it provides for PC0 through 5 (even for digital output)
You don't have any reset circuitry or programming headers
You should add also header or at least testpoints for serial output to help your initial development
No decoupling on Vcc/Avcc
Those pullups on SDA/SCL seem awfully strong
You are driving two fets from a single op-amp+sense resistor network and expecting them to equally share current, you almost certainly will be disappointed.  Each load fet should have it's own sense resistor and op-amp driving it's gate. ).
You are using a 16bit ADC but you are using a bunch of resistors paralleled as the sense resistor, if you are going for super precision (16bit!) then you need to be using a super precision sense resistor.

~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline mij59

  • Frequent Contributor
  • **
  • Posts: 693
  • Country: nl
Re: Modular DC Load -- design critique
« Reply #3 on: April 14, 2016, 11:59:09 am »
Do not parallel mosfets (Q1, Q2 etc.), use separate controls for each one.
C3, C9 too big, to be connected between the output of the opamp and the inverting input.
Current sensing  resistor 10 m Ohm ?,  gives about 15mV as input  voltage to the adc .
Why 3.3V for the I2C bus ?, using a voltage divider as a bad idea.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14192
  • Country: de
Re: Modular DC Load -- design critique
« Reply #4 on: April 14, 2016, 02:16:00 pm »
Ar least the read back of the current would need a more precise amplifier. Usually a rather small shunt for the measurement is good to keep self heating small. But the regulation tends to be more stable with larger resistors.

The capacitor in the feedback at the output stages is at the wrong place.

The output usually needs an RC combination to ensure stability with complicated (e.g. inductive) loads.
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: sk
    • My site
Re: Modular DC Load -- design critique
« Reply #5 on: April 14, 2016, 09:15:07 pm »
C3 and C9 is directly connected between ground with a very low impedance. This might affect the stability of the op amp.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14192
  • Country: de
Re: Modular DC Load -- design critique
« Reply #6 on: April 15, 2016, 08:50:48 am »
C6 and C9 are at the wrong place - the lower and should go directly to the inverting input. They are way to large too - this makes regulation rather slow.

The IRF640 are also not a really good choice for linear operation. It's hard to cool a TO220 and with more than 10-20 V there is the danger of thermal instability. I would suggest something like IRFP240 / IRFP250.

The sense resistors are way to small for LM324 with a high offset voltage. So likely larger resistors and better OPs are a good idea.

One of the ADC inputs should be used for a precise read-back of the actual current - the OPs and the DAC are not that good to really get the value you set. This channel needs precise amplification.

One can get away without the switched mode regulator for the negative side, by using a shunt regulator. The drawback is having the output ground different from input ground, but this should not be a problem here.

Interfacing the µC running at 5 V and an ADC running from 3.3 V can be tricky. There is little room for the high level from the 3.3 V device.
 

Offline AeternamTopic starter

  • Supporter
  • ****
  • Posts: 97
  • Country: lu
    • Schartz Engineering
Re: Modular DC Load -- design critique
« Reply #7 on: June 27, 2016, 09:47:51 am »
Belated thank you for all the tips and ideas. I considered all of them and implemented most of them  :-+

Below you will find an image of the first prototype board. Considering it is my first ever self-designed PCB I'm pretty happy with the result.

And I will be even happier once I debugged it because it looks like something's not right with the DAC (it's not reacting to I2C commands.) But that's for another day (or even another post) :)
 

Offline prasimix

  • Supporter
  • ****
  • Posts: 2023
  • Country: hr
    • EEZ
Re: Modular DC Load -- design critique
« Reply #8 on: June 27, 2016, 10:09:51 am »
Belated thank you for all the tips and ideas. I considered all of them and implemented most of them  :-+

Below you will find an image of the first prototype board. Considering it is my first ever self-designed PCB I'm pretty happy with the result.

And I will be even happier once I debugged it because it looks like something's not right with the DAC (it's not reacting to I2C commands.) But that's for another day (or even another post) :)

Maybe you should also add four mounting pads for M2.5-M3 screws/spacers on the next PCB revision if you don't want that everything "levitate" on power mosfet.

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: Modular DC Load -- design critique
« Reply #9 on: June 27, 2016, 10:23:26 am »
Below you will find an image of the first prototype board. Considering it is my first ever self-designed PCB I'm pretty happy with the result.
Can you show us the bottom layer of the board?
The traces between the current sense resistors look much too small to carry any significant current. Unless there is something hidden on the other side of the board, I expect the total resistance of the current shunt being much higher because of the small traces. If you want a precision current feedback, 4 wire connection should be used. But this does not work with many resistors connected in parallel, therefore the connection between the resistors must have the lowest possible resistance.
 

Offline yngndrw

  • Regular Contributor
  • *
  • Posts: 101
  • Country: gb
Re: Modular DC Load -- design critique
« Reply #10 on: July 06, 2016, 12:11:56 pm »
I have a couple of resources which may be of use to you.

The first is a set of PCB design guidelines by Mariss Freimanis from Geckodrive, he designs high powered stepper motor drivers and the information is very-much applicable here:
http://yngndrw.hostilezone.net/uploads/PCB%20layout%20technique.pdf

The second is the HP 60504B service manual which contains the schematics and parts list for their now obsolete 600W / 60V / 120A electronic load module which may be helpful to take the load section from, see pages 38 onwards:
http://ridl.cfd.rit.edu/products/manuals/Agilent/power%20supplies/CD1/service/60504ser.pdf
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf