Variable Load: Schematic

I’ve finished the schematic for the variable load, so let’s talk about it! I made many changes to the system, which unfortunately renders my last post obsolete, but I’ll fill you in on the changes here. I’ll highlight the major components.

Power connections

There are 3 power connections. First is a barrel connector which provides 12 volts to the system, powering the fan and the various chips on the board. Second is the input to which the variable load is attached. Last is an internal connection, which connects to the power MOSFET. Because the load is expected to draw many amps of current, I’ll have to do without thermal relief to the high current connections. For this reason, the electrical connections from the PCB to the input power and MOSFET will not be established through soldered on connectors, but rather ring terminals attached to the board through washers, bolts and nuts. This will allow for a high amperage connection that’s easy to assemble and disassemble.

Current sensor

I changed the current sensor from ACS711 to ACS71240. The change was made to increase the resolution for measuring current. The ACS711 has 41 mV/A, but ACS71240 has nearly double at 80 mV/A. ACS71240 is also unidirectional, which is fine for this application, and can go up to 50 A instead of ±31 A. It should be noted that the two chips have very different output levels due to the difference in directionality; ACS711 outputs mid-rail at 0 A, or 2.5 V, while ACS71240 outputs 10% of the rail, which is 0.5 V in this case.

Main DAC

The DAC that sets the load current has changed from MCP48FVB21-E/UN to MAX5216. The change was to increase the system’s current resolution. Previously, at 12 bits and a reference voltage of 5 V, the DAC had a voltage resolution of 5 V / (2^12) = 1.22 mV / LSB. Then, since the old current sensor had a resolution of 41 mV / A, the system has a current resolution of (1.22 mV / LSB) * (1 A / 41 mV) = 29.8 mA / lsb. This means that the circuit can only change the current in steps of nearly 30 mA! That’s a pretty large step size, and I wanted to change the design (this by the way is why I changed so many components from my last post).

Let’s calculate the new current resolution with the new DAC and current sensor. The new DAC has a reference voltage of 5 V, and has a resolution of 16 bits, so you have a voltage resolution of 5 V / (2^16) = 76.3 µV / LSB; 16 times better (which is expected since we went from 12 bits to 16 bits of resolution without changing the reference voltage). The new current sensor has a resolution of 80 mV / A, which is about two times better, so all together we have increased the resolution by a factor of 32. The new resolution is (76.3 µV / LSB)*(1 A / 80 mV) = 0.95 mA / LSB. Now, instead of controlling the current at a scale of tens of milliamps, we should be able to control the system on the scale of milliamps.

Main ADC

Previously, I was going to go with the ADC124S051, a 4-channel 12 bit ADC. Since the DAC has been upgraded to 16 bits, it made sense to upgrade the ADC as well. However, finding a high sample rate, multi-channel, high resolution ADC became prohibitively expensive. From my search, I found that I could have two of those three qualities.

I ultimately decided to give up the multi-channel aspect of my ADC and go with the ADS8685. This was for two reasons:

  1. I was going to use the ADC to measure the temperature of the load, the current through the load, the output of the DAC, and the voltage across the load. But I only need accurate, frequent sampling of one of those signals: the voltage across the load. I don’t need to feed the temperature to the ADC since temperature changes slowly, and I only need a ball-park temperature. I realized that I don’t need to measure the current through the load, since that’s something the microcontroller will control, and therefore will be known to the system. I don’t need to measure the output of the DAC, since again that will be controlled by the microcontroller and will therefore be known. The voltage across the load, however, is not something that can be calculated nor can it be directly controlled. Therefore, the ADC will only need to measure one signal.
  2. The microcontroller has a 10 bit ADC built into it, which I’ll use to measure temperature, current and DAC output. It’s very low resolution (10 bits, 5 V reference voltage), but that’s fine since the signals I’m measuring don’t need high resolution. Temperature is the most important one, but that can be measured infrequently and with low resolution, as said above. And since current and DAC output should already be known to the system, they don’t really need to be measured. However, it will be good to let the microcontroller measure these signals anyway for debugging and self-test purposes.
Opamps

The opamps have not changed much since the last post. The MOSFET controller has simple RC filters on its inputs to reduce sensitivity to noise, and a fairly large output resistor since the MOSFET has a fairly high gate capacitance. The temperature circuit has not changed since the last post, and is expected to output 0.67 V to 4.4 V over 10 °C to 85 °C.

I am a bit worried about the opamp’s input offset voltage; it’s 1 mV, which is fairly large. Since the current sensor has a sensitivity of 80 mV / A, a 1 mV error could mean an error as large as (1 A / 80 mV) * (1 mV) = 12.5 mA. However, I’m sure finding a drop-in replacement further down the line is easy, so I’ll worry about that if it proves to be a problem during testing.

Power regulator

I’m using the same linear regulator as for my Stampduino project. It can output 300 mA, which I think should be enough. None of the chips are expected to consume much current. The only thing that may consume a fair amount of current is the LCD display, but I can adjust the brightness on that, so for now this should be fine.

Microcontroller

The microcontroller is setup exactly the same way as for the Stampduino, configured to 5 volt operation. Almost all of the pins are used up, unfortunately, so future expansion will be difficult if it is needed. The only thing to comment on the microcontroller is that I’ve increased the number of bypass capacitors for VCC since the application involves analog voltages, which wasn’t necessarily the case with the Stampduino.

JTAG Connector

Instead of programming the microcontroller through USB using the bootloader, I’m going to program the microcontroller using my Atmel ICE since I may need its debugging capabilities. I got the pinout for the AVR JTAG connector from table 3-1.

Encoder Debouncing

Since the encoder is just a bunch of switches, it’ll need debouncing. This is the simplest, cheapest scheme I could come up with. When the switches aren’t on, BTN, A and B will be at VCC, or 5 volts. When they are pressed, BTN, A and B will be at 5 * (1150)/(1150+22000) = 248 mV. According to the microcontroller datasheet table 29-1, at VCC of 5 volts, a logic low is anything below 900 mV, so we should be good.

Misc. connectors

Lastly are a bunch of connectors. In no particular order:

  • H5 connects to the fan. I put a high value capacitor near it in case the fan’s high current consumption becomes a problem, though I’ll also address this concern in the layout.
  • H6 connects to the thermistor, which is off the board since it’ll be near the MOSFET and heat-sink. R20 lets you forgo the thermistor, if you’re okay with the system always thinking the load is super hot, in which case the fan will be blasting all the time.
  • H3 and H4 are for the encoder. I decided to have two connectors for the encoder since the encoder itself has two different groups of pins; each connector corresponds to one group.
  • H2 will connect to the LCD display, and provides it power as well as I2C.
  • H7 is for debugging purposes. I suspect the USB port won’t be used in this project, since USB consumes a very large amount of resources which may not be available. Therefore, I need a simple way to communicate with the microcontroller, hence the serial port.

There are some minor parts of the schematic I have not touched upon here, like test points and some filters, but I hope this gave you a good idea of how the schematic works as is. Note that the schematic does not show components that are off the PCB, such as the LCD, encoder, power adaptor, MOSFET, fan and thermistor.

Leave a comment

Design a site like this with WordPress.com
Get started