Author Topic: Electronic Load Build Log  (Read 18927 times)

0 Members and 1 Guest are viewing this topic.

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Electronic Load Build Log
« on: August 03, 2013, 02:59:06 pm »
Hi Everyone,

Thought I would share a project I've been working on lately. I have been needed a load tester for some time, but I've been getting away with things like this  ;D



Yeah, that's just a lot of power resistors mounted on a fan :)

Anyway, I want to build this new load based on what parts I already have, the goal is not a precision instrument. But something better and easier to use than a lot of power resistors.

Basic schematic, very simple:



The use of LM358 will probably not let me go all the way down to 0mA, but that is fine for my use. And the IRL2203 is because I had a few of them from another project, should work fine for this project.

I will use a 20x4 (HD44780 based) LCD display and a PIC24 micro, here a quick test setup for the control part:



I'm aiming for 40-50W continuous and slightly higher short term. Low voltages only, maybe up to 20V, and features like constant current, constant resistance and constant power. I could do constant voltage as well, but I don't really like that feature. Also I'll try add some pseudo random noise feature.

I have decided on 1 encoder to set the modes and values, and 2 buttons, one for selection and one to start and stop the load. Plus a single LED to indicate if the load is on or not.

A low voltage cut out and a mAh counter would be handy for battery testing.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #1 on: August 03, 2013, 03:19:42 pm »
I made the PCB as single sided, it's routed using my DIY cnc router, it's not so fast so it takes some time, but the results are good:



It will be all old school through hole. I also added a USB connection using the standard FTDI uart to USB converter. (they only come in SMD packages, so I'll have to use a small converter board)

I have some tinning solution, but I'm not going to bother. Instead I just cover all the copper using a flux pen right after cleaning the board.

« Last Edit: August 03, 2013, 03:22:22 pm by jaxbird »
Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #2 on: August 03, 2013, 03:56:33 pm »
Populated board with some components for a quick test run, just to see how many mistakes I made :D



I use an LM35 to measure the temperature of the MOSFET, I would have just used a 10K thermistor, but I could only find some LM35 in my collection.

Initial testing went well, only had to adjust a few resistor values.

One thing to note is that I'm not protecting the micro's ADC inputs, ideally they should be protected, I don't think they will survive if the input voltage goes much above 3.3V. Anyway I hope I can get away with just adjusting the gains to safe levels.

For cooling I will use one of these CPU fans that comes with all Intel CPUs, I never use them in my PCs, but they are nice little units, so I thought perfect for this project :)



This is the reason I added 4 extra holes in the board. It will be nice and compact.

I have added a 4 pin header with PWM to control the fan RPM proportional to the MOSFET temperature. Very simple, just a small transistor controlled by one of the IO pins. Fan got internal pull up.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #3 on: August 03, 2013, 05:39:16 pm »
Fully assembled main board:




I have been a bit lucky on heatsink clearance in a couple of places, but it's all good with at least a couple of mm space to USB socket. I did add a small piece of kapton over the mosfet for isolation, but I might remove that again for better heat sinking. No danger the heat sink will touch anything.









 
Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #4 on: August 03, 2013, 07:03:13 pm »
Testing and writing code:



I decided on ~26kHz PWM as it works for both fan and control. Gives me about 10.5 bits resolution.


Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #5 on: August 03, 2013, 08:17:37 pm »
Display layout (Load not enabled)



The actual mA should be 0, but as expected it will not go that low, 20mA minimum is fine for my use.

Quick view of the various modes I have implemented so far:

Current:



Resistance:



Power:




At 40W it settles around ambient + 25C. While the MOSFET says max 175C (junction) in the datasheet, I don't think it's safe to run it much hotter than 70-80C (case) in the TO220 package. So I've added a safety cut off that will trigger at 60C.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #6 on: August 04, 2013, 02:06:27 am »
Time to get everything into a nice case:



Just enough space for the display:




Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline george graves

  • Super Contributor
  • ***
  • Posts: 1257
  • Country: us
Re: Electronic Load Build Log
« Reply #7 on: August 04, 2013, 03:09:01 am »
Very nice Well done!

Is it open source?  Details? Schematics?  Source code?

I'm debating building something like this or buying one.

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #8 on: August 04, 2013, 03:51:05 am »
Very nice Well done!

Is it open source?  Details? Schematics?  Source code?

I'm debating building something like this or buying one.

Thanks George :)

It's not quite finished yet. I'm working on the case right now, I hope to complete it this weekend.

There isn't really much involved in building a basic one like the one I've made here. For a full design to be shared/published I would probably want to change a few components. This one is build purely based on parts I already had lying around :)

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline quantumvolt

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Electronic Load Build Log
« Reply #9 on: August 04, 2013, 04:06:03 am »
Very useful build. Something I think a lot of people  here (including me) could use, but do not prioritize to buy.

Please explain how to set the different modes and a little bit about the program loop, PWM control and measurements/calculations to the display.
« Last Edit: August 04, 2013, 11:13:43 am by quantumvolt »
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #10 on: August 04, 2013, 12:53:16 pm »
Very useful build. Something I think a lot of people  here (including me) could use, but do not prioritize to buy.

Please explain how to set the different modes and a little bit about the program loop, PWM control and measurements/calculations to the display.


Yeah it is one of those devices that is nice to have, but if you have to buy one they seem to start around $500+  :o . Of course much better specs than what I'm doing here, but still a lot of money if it's only for occasional hobby use.

I'm building this one primarily because I need one I can control from my PC to do automated measurements of a few buck converters I'm playing with. I got tired of doing it manually  :-/O :-DMM :)

I remember Dave did an episode on a very basic constant current load some time ago, if you haven't watched it, you should check it out.

The code really depends on what micro you choose. I'm using a PIC24H (3.3V) because I had some already. I run it using it's internal oscillator at ~80MHz (~40MHz instruction clock) it's a bit overkill, but it does allow for a higher frequency PWM (26KHz) with more than 10 bits resolution, which also fits nicely with the PC fan PWM spec of ~25kHz for the 2nd PWM.

I use 2 interrupts for the rotary encoder and just polling on a timer loop for the buttons. The same timer is used for sampling the ADCs and doing some rolling averages to smooth things out a bit. Plus things like fine adjustment of the PWM, checking temperature, low voltage, overload etc.

All the main loop does is updating the display at regular intervals.

For different PWM frequency you would probably need to adjust the passive low pass filter. And set the attenuation based on the load resistor value and desired max A. Once you know the max load/voltage over the load resistor, you can set gain on the sense opamp (not shown in basic schematic) to match your ADC reference.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #11 on: August 04, 2013, 01:05:25 pm »
Time for the front panel, these are the posts, knobs and buttons I have:



I think the layout will end up something like this:



Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline robrenz

  • Super Contributor
  • ***
  • Posts: 3035
  • Country: us
  • Real Machinist, Wannabe EE
Re: Electronic Load Build Log
« Reply #12 on: August 04, 2013, 01:45:52 pm »
Very nicely done and great pictures.  :-+
I would be interested in your code if you have any plans to share it. I have a bipolar power supply and I want to make a module to control it as an Eload in CC, CV, CR, and CW modes.  looks like your code would save me a lot of work and learning curve.

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #13 on: August 04, 2013, 07:11:51 pm »
Very nicely done and great pictures.  :-+
I would be interested in your code if you have any plans to share it. I have a bipolar power supply and I want to make a module to control it as an Eload in CC, CV, CR, and CW modes.  looks like your code would save me a lot of work and learning curve.

Thanks :)

Those are some very cool power supplies  :-+ what kind of voltages does it take to control the sinking current?

Almost finished my electronic load, but unfortunately I had a minor setback. I was being a bit lazy and wanted to temporarily use one of these little regulator boards for the 3.3V and 5V supplies and then just feed the unit from a 12V supply.



But I should have measured :-DMM the voltages before connecting it, what should have been 5V turned out to output 12V instead  :o, probably a short on the board, never used it before. Now it's in the trash.

So yeah, the 5V was for the display logic, it didn't like 12V  :-BROKE. Now I need to get another display, hopefully I'll get a chance to pick one up next week so I can complete this thing and start using it.

In the meantime I'll put together a working regulator board :)
Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline robrenz

  • Super Contributor
  • ***
  • Posts: 3035
  • Country: us
  • Real Machinist, Wannabe EE
Re: Electronic Load Build Log
« Reply #14 on: August 04, 2013, 07:40:38 pm »
Those are some very cool power supplies  :-+ what kind of voltages does it take to control the sinking current?

Default is 1V per amp and 0.5V per V but both are adjustable with an external resistor. 

Offline bug13

  • Regular Contributor
  • *
  • Posts: 56
  • Country: nz
Re: Electronic Load Build Log
« Reply #15 on: August 04, 2013, 08:58:10 pm »
Very nice project.

I am interested to know the ripple current in constant current mode, how does your device perform?

Thanks for sharing.
Zhuhua Wu
A guy who creates stories to tell machines to do stuff.
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #16 on: August 06, 2013, 12:05:58 am »
Very nice project.

I am interested to know the ripple current in constant current mode, how does your device perform?

Thanks for sharing.

Thanks :)

I'll try do some measurements on it at various loads when I have it completed. So far I've only checked that it doesn't oscillate :)

I don't expect the PWM to create much ripple, it runs at 26kHz and the low pass filter is fairly aggressive, but also somewhat slow, I think the rise time is as high as 10ms+ for full scale.

Cheers

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #17 on: August 06, 2013, 02:32:08 pm »
Default is 1V per amp and 0.5V per V but both are adjustable with an external resistor.

I had a quick look at the datasheet you posted, it sounds like there is an RS232 port available for remote control. If that's the case then it should be very easy to add some nice features to those supplies.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline robrenz

  • Super Contributor
  • ***
  • Posts: 3035
  • Country: us
  • Real Machinist, Wannabe EE
Re: Electronic Load Build Log
« Reply #18 on: August 06, 2013, 02:38:20 pm »
Mine do not have that option.  I have the schematics for the control boards but would still require re-creating their code and that would be way more work than just building your control/display system and driving them with a control voltage and .  I think just using your control loops and interface to drive the BOSS would be easier.

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #19 on: August 11, 2013, 09:09:42 am »
Mine do not have that option.  I have the schematics for the control boards but would still require re-creating their code and that would be way more work than just building your control/display system and driving them with a control voltage and .  I think just using your control loops and interface to drive the BOSS would be easier.

Always good checking :) .. would be a bit of a Doh moment finding out that it could all be done over RS232 after building a complete analog circuit :D

I guess it comes down to what ambitions you have on speed and precision, it wouldn't be hard doing something simple with an ADC capable micro reading the input voltage and then generate a control voltage based on settings to control the "PSU" load.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #20 on: August 20, 2013, 01:18:42 pm »
Finally had a chance to pick up a new display after my mishap with the cheap regulator board giving out 12V on the 5V connection.

Also built a new regulator board for 12V, 5V and 3.3V, just plain LM317 based, with a bit of extra filtering as my plan is to power it from a small 12V switchmode supply.



Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #21 on: August 20, 2013, 01:35:33 pm »
After a lot of drilling and filing I got everything in place on the front and back panel:




Takes a bit of time to make all the holes, luckily the front is just aluminium:





And the back:





The front looks a bit rough, so I'll try see if I can make a nicer looking front plate for it.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #22 on: August 20, 2013, 02:16:53 pm »
I'll attempt to 3D print a front panel, it's a bit too wide for my printer, so I have to make it in 2 pieces.

It should end up looking like this (well, except I'll print it in some white PLA)




Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #23 on: August 20, 2013, 02:43:24 pm »
Printing in progress (around 50% complete)



Takes almost 30 minutes to print a couple of small pieces like these.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline jaxbirdTopic starter

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Re: Electronic Load Build Log
« Reply #24 on: August 20, 2013, 03:13:41 pm »
And it's complete:







IMO it looks much cleaner with the new front.

Still a bit of work left to implement the USB/UART interface protocol, but it should be fairly simple, just need something to set the mode, values, enable/disable load and read all the measurements back.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf