Using an Arduino to control Dave's dummy load - bad idea? - Page 1
Forum section: electronics / beginners

author: mianchen
author_rank: Regular Contributor
timestamp: August 14, 2012, 07:54:04 am
content: I have built a dummy load (on breadboard) similar to that in Dave's video. I replace the FET with a 2N3055 BJT and use a LM358 dual op amp instead of LM324. Modifications are due to the lack of suitable parts instead of functionality hacks. It seems to be working fine. My plan is to build it up and fit everything into a nice die cast aluminium box which also serves as a heat sink (I may add an extra TO-3 heatsink on top.Now I don't have a nice 10 turn pot, and if I did have one, it might be too big for the box. I'm thinking of using a barebone arduino (or just a ATTINY chip) to generate PWM signals to replace the pot, is it a bad idea? I've finished the code and linked the two together - everything seemed fine, but just want some different opinions.Thanks

author: Rerouter
author_rank: Super Contributor
timestamp: August 14, 2012, 09:11:34 am
content: it should work fine, a similar control method was what he originally intended for it, just make sure you properly filter your PWM, you wouldn't exactly want low KHz glitches in your current sink,

author: Spikee
author_rank: Frequent Contributor
timestamp: August 14, 2012, 10:30:22 am
content: You can use a dac like the MCP4728 . It's I2C and it has programmable gain (2.048 V max or 4.9 something) and is 12bit.There are ready made library for the arduino so it's easy to setup and use.It's in a msop package so you need a breakout board of some sort.And microchip will sample you like 6 of em =)

author: prenato
author_rank: Regular Contributor
timestamp: August 17, 2012, 05:16:26 am
content: I'm also building one variant of this load at the moment. Like you, I've considered using a micro controller to PWM the voltage reference . However, what would then control the PWM? If you use an up and down button, I,m afraid it will not be as user friendly as using simple knobs. You could use a rotary encoder through the micro if you have one... That is probably a better choice.For my project I simply used two "regular" pots in series. One large one for "coarse" adjustment and another one for "fine" adjustment. Simple and it works fine:) Decided the micro was overkill...

author: mianchen
author_rank: Regular Contributor
timestamp: August 17, 2012, 10:47:15 am
content: I've tried using 2 single turn pots, but using a micro makes it possible for control it from a pc. up and down switches are there for when it's not connected to a pc.

author: prenato
author_rank: Regular Contributor
timestamp: August 17, 2012, 02:14:40 pm
content: I'm sure it will work technically. In my view though, PC based test equipment is a real pain to use in the long run. This is why I'm selling my Hantek PC based oscilloscope. Much better user experience to use knobs. Ditto for up/down buttons.

author: T4P
author_rank: Super Contributor
timestamp: August 17, 2012, 02:30:38 pm
content: Quote from: prenato on August 17, 2012, 02:14:40 pmIndeed.The only two things i do USB is Logic analyzers and AWG's

author: mackletus
author_rank: Newbie
timestamp: October 09, 2012, 03:06:46 pm
content: Why use a PC for readout?You should be able to use the arduino to control the load, monitor the source and to log the results on and SD card if out in the field. Data from the SD card can be analyzed on a PC afterwards.Sounds doable to me, not that I know how exactly.

author: Thor-Arne
author_rank: Unknown
timestamp: October 10, 2012, 12:39:39 am
content: Quote from: mianchen on August 14, 2012, 07:54:04 amSo where has Dave hid the thread about the CC load ?

author: m12lrpv
author_rank: Regular Contributor
timestamp: October 10, 2012, 01:58:25 am
content: Building a dummy load variation using an atmega328 or similar is very do-able as it's something I have just done.I did it that way after I realised that for the price of the LED display and 10 turn pot it was far cheaper to go the atmega328 and an LCD display and as an end result I have much more control.

author: ejeffrey
author_rank: Super Contributor
timestamp: October 10, 2012, 08:02:14 am
content: There are two problems using the power transistor.n First, there will be a small error due to the base current. The base current flows through the sense resistor but not the load. So if you program in 1 amp, you will get something like 0.95 to 0.99 amps with the difference made up by base current. The other problem is that your opamp may not have enough juice to drive the base. This depends on how much current you actually want. The worst-worst case is with the 12 milliamp minimum spec output current of the LM358 and a current gain of 20, which would give you a maximum current sink of 250 milliamp. Your typical case will be a bit better of course, but if you want a multi-amp current load you need to redesign.You can mitigate both of these problems by using a darlington at the expense of higher dropout voltage. Probably it isn't worth the effort. If the BJT is not suitable you should just get a MOSFET.

author: Rerouter
author_rank: Super Contributor
timestamp: October 10, 2012, 10:45:33 am
content: or you flip your circuit around, use a dual op amp and have 1 measuring the differential across the resistor above the transistor and the other regulating the transistor, its useful if you need a very fast response to transients, but for just a generic one a mosfet with a buffer resistor and a slew limiting capacitor should more than do,