Teensy CC Dummy Load +300W

Status
Not open for further replies.

Donziboy2

Well-known member
Hello All.
I have been tinkering with this idea for a while, it’s proven to be a good distraction from my E-Gocart project when I needed to step away.
I figured it was about time I posted the project to get some feedback.

Specs/features i'm shooting for. (Dec 29 2017, Several new changes including Isolation and external DAC's)
300W continuous. ( I have tested with 5FETs and a smaller heatsink so it will be easy to do)
Reverse Polarity Protection.
Fully isolated input. This is to mitigate noise issues caused by the Teensy writing to the Screen. It also adds more flexibility to the end user.
20A continuous. (Max 25.5A for my schematic)
External 16/18 bit ADC for Voltage and current measurements.
14/16bit external DAC's. Allowing for sub mA adjustments.
81.96V in max. Resolution = 1.25mV@16Bit and 312.5uV@18Bit
CC/CV/CP and discharge modes for batteries and standard power supplies.
Using an ILI9341 touch screen, 320 x 240 resolution. May use the newer screen Paul mentions here, if it gains traction before I create my first board.
Standard 92mm PWM PC Fan
(2) Rotory Encoders with push bottons(set V and A, select size of range increase/decrease)
(2) Push buttons (Menu, Start/Stop)
3.5 - 28V input power, with monitoring.


New schematic pending
Schematic Oct 8 2017
Schematic Oct 1 2017 and PCB Render
Schematic June 24 2017
Schematic Newest
Schematic New
Schematic Old
Schematic Older
Schematic Oldest
Schematic Older then Dirt

WIP BOM Old

Heatsink/Shroud/Fan mockup (somewhat old)

Cad rending of PCB+Fets+Heatsink+WIP Housing




Updated 5-21-17
Below removed from schematic in favor of using just a standard 4 wire PC fan, circuit should conform to the Specifications of PWM PC Fans.
See below schematic for old fan control scheme's
I am looking at a different setup to drive the fan that would be more efficient at slow speed(300mW savings when at low speed) but it would potentially introduce a lot of noise to the +5V rail.
The below setup will allow the fan to be powered with ~5V when powered up, then once things start getting hot the fan can be PWMed up to 12V, this would ensure there is always enough voltage going to the fan to power the internal hall effect sensor. The 1R resistor and 1u Cap should keep the noise on the +5V rail to a tolerable level. The drawback is that not all fans can actually work at 5V, so some may not function without a kickstart. It will also add noise to both the +12 and +5V rails.
CC Dummy Fan.JPG

A few answers to questions im sure will pop up.

Updated 11-4
Q. Why are you using a -5V supply?
A. In order to fully turn the FET’s off you really need to push them below 0V. Some OpAmps can push the output close to rail input but most are off enough that the FET’s will never turn fully off.

Q. Why such large sense resistors you could go with much lower values for SMD and maybe just stick them on the bottom?
A. I actually looked at using really low values and sticking them on the bottom of the board, even planned to cool them with a custom made 3D printed heat shroud vent if needed… But the really low resistance would mean really low voltage feedback values. Add to that noise and readings could end up as crap.

Updated 6-22 Q. You have 5 NTC thermistors! Just stick one or 2 on the heatsink and call it a day.
A. It may be more expensive to have 5 instead of 2, but if one of the FET’s gets angry it would be much better to stop before the magic smoke comes out. Preventing a failure is a good thing; it also allows me to dynamically set power limiting based on hottest FET temp. If they are cool you can overdrive it, once they heat up power limiting kicks in. I did an earlier test with 5 FET’s running 300W on a 100x69x36mm Heatsink and the hottest one got to 80C case temp. When I ran out of room on my 100x100mm PCB and went to 150mmx100mm I also increased the Heatsink size to 150x69x36mm, which will give more overdrive room if needed.

Q. Why use LM324’s, they are not super accurate?
A. Correct they aren’t super accurate, but with software control we can calibrate some of the inaccuracy out. I mean we have to deal with 1% resistors… A lot of the chips I looked at claim much better Input Bias values but have max values just as bad as the 324’s
If need be, a better chip can be installed, most manufacturers where smart enough to use the same packages/pinouts.


Update...

Things I need to do at this time.
1. [Fixed in October]The 0805 Footprints that come stock in Kicad for hand soldering are pretty big compared to the Footprints I use in eagle, so I will trim those.
2. I need to go over all the diodes and make sure they are correctly sized, the one leading to the Teensy seems a little big lol.
3. [Fixed in October, now using T3.6] Keep an eye on the Teensy 3++ beta and see if I should incorporate extra features from it. Im using mostly 3.3V anyway and the few place im not could easily get a zener.
 
Last edited:
I suppose you saw this thread: K66-Beta-Test

You may be right on schedule for this:: 8. Wondering when the new Teensy 3.1++ will appear with more IO’s lol. My bet is about 13 minutes after I purchase PCB’s.

If you have an extra inch after the standard Teensy 3.2 beyond the button end you might be able to swap them out.

3.B. Running out of IO’s. Very few pins are left and its getting tight.

Are you using the under pads? FrankB published a simple board to get them brought to button end pins.
 
I suppose you saw this thread: K66-Beta-Test

You may be right on schedule for this:: 8. Wondering when the new Teensy 3.1++ will appear with more IO’s lol. My bet is about 13 minutes after I purchase PCB’s.

If you have an extra inch after the standard Teensy 3.2 beyond the button end you might be able to swap them out.

3.B. Running out of IO’s. Very few pins are left and its getting tight.

Are you using the under pads? FrankB published a simple board to get them brought to button end pins.

No I did not see the beta post lol. :O Between the Gocart, the CC supply, an LED project and work; I don't even have time to play games :(
PS, lots of progress on the gocart, I just painted the below mounting plate, I need to mount it then start wiring :)
20160610_162155.jpg
20160610_162012.jpg

Of the 50 pins on the Teensy 3.2 im using all but 12. The full schematic/pcb are linked in the first post, I tried posting the BMP's I made but in order to be ledge-able they are huge, so I left them on Imgur and linked them.

Im pretty much at the point of needing to start either sticking things on the back side or go with a large PCB lol. Not sure I could force a Teensy3++ if its 1" longer on there, unless I rip it all up and try turning it:p Maybe ill stick that damn huge battery on the bottom.

Edit.. Just to be clear the design as I have it posted is pretty much done, the PCB is layed out. But if more features are requested/needed then it may get interesting.
 
Last edited:
Surprise - you made the Beta! When you say '50 pins' - not sure if that includes the 12 pads on the bottom - or if those are the 12 you are not using? They are easy to get with ConnectorBoard: oshpark.com 0T6ZdhhG - that extends the Teensy 2/10'ths of an inch and brings those all out with direct soldering to the bottom.
 
Surprise - you made the Beta! When you say '50 pins' - not sure if that includes the 12 pads on the bottom - or if those are the 12 you are not using? They are easy to get with ConnectorBoard: oshpark.com 0T6ZdhhG - that extends the Teensy 2/10'ths of an inch and brings those all out with direct soldering to the bottom.

Yep only pins left are.
D0, D1, D13, D27, D28, PGM, A10-A13 and VUSB

CC Dummy pins.JPG
 
Yikes - so what does the "CC" stand for? I see this as a dynamic load on a power supply for testing it?
 
After doing more reading I think im going to have to make changes to the sense resistors or suffer issues(magic smoke). I need to place 1 sense resistor per Fet and I should drive each Fet individually. I cannot fit 6 TO247 Mosfets and 6 TO220 Sense Resistors in the space I have(150mm wide Heatsink). If I go down to 5 Fets and 5 Sense Resistors I can fit them.

Im also wondering how accurate the Teensy's DAC and ADC's using 3.3V are at the low and high ranges. And how close to 3V3 the supply is. I think below 50mA loads it could be tough which considering im shooting for +20A isnt to much of an issue.
 
If each FET is current-sensed and driven individually, you could have one FET with a larger value current sense resistor to get a larger signal at low currents. At the cost of less maximum current as the sensing will top out earlier and the other FETs would take more current at higher loads.
Or maybe a relais to switch between two current shunts? That's how multimeters do it.
 
If each FET is current-sensed and driven individually, you could have one FET with a larger value current sense resistor to get a larger signal at low currents. At the cost of less maximum current as the sensing will top out earlier and the other FETs would take more current at higher loads.
Or maybe a relais to switch between two current shunts? That's how multimeters do it.

Im actually wondering if Paul brought out both DACs for the upcoming Teensy 3++.
 
My only concern is feature creep and a lack of much left over space, its a 10cm X 15cm board atm(some of my spacings are getting close). The additions I need to make are going to chew up more board space.

I'll get the schematic changes made for the FET's and sense resistors and then rearrange the PCB. On the plus side im getting really good at using Kicad lol.
 
Latest changes.
Removed K1 contactor and driving circuit. Contactors with >30A and >24VDC ratings are hard to find and expensive. Replaced it with a PMOS polarity circuit. The Pmos will need an isolated TIM and shoulder washer so that it does not cause a connection between the Vinput and the Nmos Drains. (also if non isolated Nmos are used the HS will be at nearly the same voltage as your Vinput, so some shroud will most likely be needed to keep from getting shocked.)

Down to 5 Fets, with 5 sense resistors. Q5 has a jumper selection point for DAC2 (future addition). All 5 Sense resistors feed to individual op amps and individual channels on the Teensy. Im still shuffling the opamp connections around to reduce spaghetti.

Still more work to do, running out of space on an 11x17 sheet lol.
EDIT. Just noticed I need to fix the input/output resolution values since each fet has its own drive and sense lines.
CC Dummy Load_sch_svg date 2016-06-14 071321.jpg
 
Last edited:
ADC_IOUT(1-5) resolution is now 1.0579mA @ 12Bit per channel.
Resolution for DAC2-ISET will be 1.0579mA @ 12Bit.
The 3 LM324's are +/-12V now. Im keeping the LM358, tried finding a single opamp replacement but in low quantity's they are more expensive then the LM358.

I am working to ensure all I/O's going to the Teensy are 3.3V or protected.
Im replacing all zeners with dual diode arrangements as shown below.
ADC voltage limiting.JPG
This arrangement gives a few advantages over a Zener+Diode.
Voltages over 3.4-3.5V will be completely blocked. Voltages below -100-200mV will also be blocked. ADC readings above 2V will not be influenced by the Diode like they would with the Zener, the Zener would start to conduct above 2V and would cause the ADC output voltage to degrade, skewing readings.
The drawback is having to run the 3v3 rail over to the diodes. I may put the diodes near the teensy instead, maybe on the bottom side of the pcb.
 
If the upper Diode starts conducting it backfeeds into your 3.3V rail. If it feeds more current into the rail than is consumed that will raise your rail voltage. (Unless the voltage regulator is designed to cope with back-feeding).
 
That is correct. I will have to find out what the T3.2 and T++ do for 3v3 power supply. I would think they could handle some input current since we are able to power the Teensy's externally with a 3v3 supply.

The amount would be limited by the resistor(1K currently) between the Opamp and the Teensy. No more then about 10mA per Analog input backfeed into the 3V3 or about 12mA per channel into the GND if the Opamp swings full negative. I have 6 Analog inputs atm. So a max of about 60mA back-feed into 3V3 or 72mA into GND.

ADC output.JPG

The diode I chose is a low leakage so we could increase the resistor(even at 10K it would not cause ADC voltage to sag any amount we could read but the Teensy's ADC's may become noisy at that point). Would probably want to adjust the capacitor value.

In either case its definitely something I should test.
 
Ok need some opinions on the different fan setup, part of what I added to the first post. This would replace the linearly driven mosfet arrangement I was favoring.

CC Dummy Load Fan.JPG

The above circuit would allow you to.
A. Not deal with any speed control and just bypass it all with R63, the entire circuit could then be ignored. <possibly use the optional section to turn the fan off when not needed>
B. PWM control a normal 4pin fan.
C. PWM control a 3pin fan with a minimum speed based on 5V input.
D. PWM control a 3pin fan without the 5V input by leaving out D17, C43 and R64.
E. PWM control a 3pin fan with optional disable pin to turn it off completely. <this one is optional circuit im not sure on>

Depending on what parts are used different things would be doable. I think this gives the most choices to the end user. The only downside is having a few fan speed control branches in the code for the different setups.

The 3 pin PWM is also more efficient then the previous PWM to analog/linear approach I used. The entire circuit would easily fit inside the large heatsink area I had set aside to cool the other fan linear drive mosfet.

Extra food for thought.
+12VA only powers the Fan directly so technically you could bump the voltage if more speed was needed from the fan. The only limit is the 5V 1A input minimum (im weird I wanna be able to use those cheap lipo usb device chargers for portability) , if more voltage is used on the input more power would be available for driving bigger fans (24V fans? :D) etc. The second limit would be the +5V supply, if a linear supply is used then a large heatsink+losses would be needed. If the Murata OKI-78SR-5-1.5-W36-C (switching supply that fits into the TO-220 7805 pin/footprint) is used then the only limit would be the max output voltage of the LT1961(id say stay under 30V to be safe lol).
 
I support for 3-pin-fans critical? I don't know about industrial applications, but in Computers 4-pin fans have become common even for case fans in the last years, most mainboards have at least two 4-pin connectors. I really appreciate your circuit, it looks well engineered and rugged, I'm just not sure whether it's necessary to implement.
If you decide to keep it, one tiny proposal: Pulling FAN-TACH up to 5V or 3.3V instead of 12V should suffice.
If you decide to implement the optional disable function, remember to delete the GND symbol near P2 ;) Maybe 0R to jumper Q11 drain-source is better.
 
Ya, im trying to give the end user the most options. They can install what they need and ignore the rest.
The cost difference between most 3pin and 4pin fans is only a few dollars unless you splurge on some of the fancy fans.
For myself I have several TT-9025 laying around so I figured I would put them to use. I used a 4pin fan on another project and liked how it worked out so I figured why limit the options and make it more power efficient at the same time.

A 12V pullup to Fan-Tach is the industry standard for 3-4 pin fans. Ill give it some thought, the R76 10K should protect 5V from any back feeding.
I noticed the GND after I posted the image lol. Your correct, a 0R jumper at Q11 like I did for Q10 R63 would probably make more sense.
 
I think one of the last things I need to figure out is the display. At the minimum I want to use a 20x4 Character LCD. And if possible a graphic LCD or TFT.
I want to use a loop that runs every 250uS(4Khz) [Faster if possible]. To sample all ADC's, digital inputs and set DAC if needed. I don't think putting it all in an interrupt is a good idea so it will be timer based, meaning that I have 250uS to do everything before I have to start over.
So I need to figure out what displays wont cause my loop to stall while being updated.

I have never dug into any of the display library's and would probably get lost pretty fast if I tried to figure out how they function. So im asking those of you still reading this thread for some advise or a direction of interest.

Edit...
Hopefully someone has some ideas for a non blocking display library :/
 
Last edited:
Well its feature creep Saturday :)


Was watching EEVblog and Dave pointed out that when doing load testing of circuits that there will be a voltage drop across the input wires. The load bank he was using happened to have a second set of inputs that can be directly connected to the load and allow for accurate measurements of the loads voltage.
Considering the currents I am designing for the voltage drop could be fairly significant so I made a small addition.


True Vin.JPG

Link to the episode.
EEVblog #895 - BEC Pro Model Airplane Regulator Testing
 
Status
Not open for further replies.
Back
Top