Jump to content

Decrease charging time! 5A High Current Charger Mod


Cranium

Recommended Posts

55 minutes ago, Cranium said:

@esaj,  Great!  

I already have the Arduinos, Blue and green 2 line LCDs, Nokia 5110 LCDs (all with I2C interfaces), SD Card reader boards, ACS712 (5A Version), misc. buttons, switches, resistors, caps, etc.  I don't have anything for the step down converter yet.  Many of them require some electrical design that I have some challenges with (determining caps, resistors, inductors).

LTSpice (or some other spice, it was the only one with decent GUI I found) helps a lot with "testing" (simulating) the circuits, I don't trust my own calculations enough to go just by those, and my electronics in general is very, very rusty... Not that I was any good to begin with, but not having touched this stuff in over a decade feels like starting from scratch at lot of times ;)

 

Quote

The ACS712 is questionable.  I did a test of it using my bench power supply and came up with this linear regression formula:  I = 0.1857V + 2.5065.  5A would only be 3.435V.  With the Arduino, this limits the resolution to just below 30mA which is OK but not great.  It would be nice to have the accuracy down to about 10mA.  

Hmm, I haven't tested the ACS's that much yet (I was trying to add current measurement to the motor driving circuit, but then blew the measurement head & connector of the 16S2P-battery and haven't yet replaced it). If the output is indeed linear, you should get something like:

-5V range divided into 210 "steps" (values) = 5V / 1024 = 0.0048828125V per step.

-2.5V range (512 steps) divided into 5A range = 5A / 512 = 0,009765625A per step/0.0048...V (about 10mA per step).

The "zero" (0A) point should sit pretty precisely at 2.5V (512 from A/D conversion), but don't know how much tolerance there is in the ACS's. Depending on the direction of the current, the value should change towards 0V or 5V as the current increases. I need to check the data sheets more closely, the first page does state:

Total output error 1.5% at TA = 25°C

66 to 185 mV/A output sensitivity

The output sensitivity could suggest that it's not precise enough to give you "single steps" (4.88mV per step)? Maybe using multiple ACS's could help with making the precision better (like calculating average from 2 or more sensors/discarding outliers)? EDIT: Doh, actually that probably means that the 5A version outputs 185mV per ampere, so for 5A it would be 185mV/A * 5A = 925mV? That does bring down the accuracy a lot (due to the A/D-conversion happening over 0...5V range in Arduino)... Maybe an op-amp could be used to "scale" the input range from 2.5V +- 1V to 2.5...5V?

Like I said, the little I did test it, it seemed the value wandered around, but not sure if it's because the current goes up and down as the mosfets are opened / closed (my driver has a pretty long dead time insertion, 100µs, while the mosfets themselves should probably shut down in <1µs) and the sampling probably occurs at different points of the "cycle". Another thing might be interference from the LCD display I2C -lines running right next to it or from somewhere else. Maybe a pull-down (/up?) -resistor would help stabilize it. And also maybe timing the sampling better than "whenever" (I just did it every time the LCD-values were being rewritten) and/or taking average of multiple previous samples instead of just showing the current value, although that's probably not needed with the charger, as the current doesn't go up and down.

Quote

Depending on the final design I may etch a custom circuit board or if it REALLY works well, I'll have some PCBs made and send you a couple. :)

That would be nice. I do have a pretty good collection of strip/vero/matrix-boards (not sure which is which in english) and some copper-clad boards, but nothing to mill them with (well, maybe by hand with a dremel :D).

Another thing you could add would be temperature monitoring for the charger, but the sensor would likely need to be inside the charger casing for any meaningful readings...

Edited by esaj
Link to comment
Share on other sites

Here's a fairly simple op-amp voltage scaler I picked up from here:   http://electronics.stackexchange.com/a/30744

TZLSkho.png

VCC = 5V voltage source, V1 = output from the ACS712, To_Arduino is the output from the op-amp that's fed to the Arduino input.

What this does is set the "zero" (crossing) point by the voltage divider formed by R1 and R2 (the capacitors are there just to reduce noise, to my best knowledge), and since they're the same value, it sits in the middle of the VCC (5V/2 = 2.5V), same as the 0A-output voltage from the ACS712 and goes to the inverting input of the op-amp. R4 and R3 set the gain for the op-amp (negative feedback), so it basically scales the voltage incoming from the ACS to the non-inverting input of the op amp.

The graph below the schematic shows a voltage sweep-simulation, in the x-axis (1.5V...3.5V) is the voltage coming from the V1 (ACS712)-source, shown also by the V(n005) -line. V(n004) is the output voltage from the op-amp (the voltage in the "To_Arduino" -line). So it "scales" the voltage of 1.5 to 3.5V to 0...5V -range for the Arduino-input.

Edited by esaj
  • Upvote 1
Link to comment
Share on other sites

11 minutes ago, esaj said:

-5V range divided into 210 "steps" (values) = 5V / 1024 = 0.0048828125V per step.

-2.5V range (512 steps) divided into 5A range = 5A / 512 = 0,009765625A per step/0.0048...V (about 10mA per step).

You are 100% correct in your calculations but forgot to take into account that the actual voltage range from 0-5A is 2.5065V - 3.435V.  This reduces the number of steps in the full range to 190.  Converted using: 512 Steps / 2.5 Volts * (3.435V-2.5064V) = 190.Steps actual

So 5A / 190 steps = 26mA per step.

Great idea on the op-amp Scaler!  That could really help. 

I didn't notice drift on the output voltage when testing using my bench power supply; however, the input voltage will affect the output.  But as long as the input voltage is stable, we can account for the variances in software since they remain linear.  I also noticed that from device to device, the 0A output level is different too.  Here is the output for different input voltage levels and the resulting data graphed out and showing the linear regression formula.  

Current 5 V 5.1 V 5.2 V
0 2.485 2.535 2.585
0.5 2.576 2.629 2.68
1 2.667 2.722 2.776
1.5 2.759 2.816 2.871
2 2.85 2.91 2.967
2.5 2.942 3.003 3.063
3 3.034 3.097 3.159

ACS712.PNG.bfa05845c3a305608895a717520e5

 

  • Upvote 1
Link to comment
Share on other sites

6 minutes ago, Cranium said:

I didn't notice drift on the output voltage when testing using my bench power supply; however, the input voltage will affect the output.  But as long as the input voltage is stable, we can account for the variances in software since they remain linear.  I also noticed that from device to device, the 0A output level is different too.  

It says in the ACS712 datasheet that the 0 Amp-output voltage is half of the VCC fed into the sensor (at 25C degree temperature):

Zero Current Output Voltage VIOUT(Q) Bidirectional; IP = 0 A, TA = 25°C     VCC × 0.5 V

Also the temperature affects the "slopes" (ie how much the voltage raises / drops with specific change in current), can't say out of the bat how those could be accounted for... some error is probably unavoidable.

Edited by esaj
  • Upvote 1
Link to comment
Share on other sites

I mocked up the op-amp scaler using this free online tool.  This tool is great to learn some basics and there are some cool built in circuit examples.  And it visually shows current flow and has a built in scope for monitoring output!  I've used it for a few years now.

There is a voltage slider on the right to adjust the simulated ACS712 voltage.

Edited by Cranium
  • Upvote 1
Link to comment
Share on other sites

10 minutes ago, Cranium said:

I mocked up the op-amp scaler using this free online tool.  This tool is great to learn some basics and there are some cool built in circuit examples.  And it visually shows current flow and has a built in scope for monitoring output!  I've used it for a few years now.

There is a voltage slider on the right to adjust the simulated ACS712 voltage.

That's handy, the visualization really helps with understanding... Another thought that occurred to me was that maybe the precision could be taken up a little further by using only "half" of the ACS712-output, ie. scaling from 2.5...3.5V to 0...5V (or from 2.5...0V, depending which way around the sensor inputs are set). Not sure how useful that would be, as it would also amplify the error, probably not that useful of having precision down to 5mA level, if the error is more than that ;) 

  • Upvote 1
Link to comment
Share on other sites

1 minute ago, Chiefdams said:

Tks for this interesting post.

How you proceed to use the current ajust? I need to pass 5a -> 4a

Yes, the current adjust can easily be lowered to 4a by adjusting the trim pot identified in a picture I posted previously.

You would need a multimeter capable of measuring current or a load tester to do this yourself.

Link to comment
Share on other sites

I just ordered a LM5007 Eval board.  I also ordered enough parts to create two more of these (minus the circuit boards).  This voltage dropper will be used to provide 5V from the charger voltage.  This voltage will power the charging monitor circuit.  The charger will plug into the power supply and this will plug into the EU.  

Features for the charging monitor:

  • Display charging voltage (rated from 40V-80V)
  • Display charging current (rated up to 5A)
  • Display mAHr/WHr charged
  • Display charging time
  • Log charging data every second to an SD card (can be imported, graphed and analyzed in Excel)

This charging monitor will be similar to what the Charge Doctor provides.  The major differences being it will have a 5A rating instead of 3A and it will have the data logger instead of having to buy a  TTL serial-USB converter dongle and use a computer.  But it will also cost me a lot more to build.  

  • Upvote 1
Link to comment
Share on other sites

On 27.12.2015 at 7:49 AM, SlowMo said:

Isn't that lithium battery life would be prolonged by using only low current charging? 

It is perhaps worth noting that charging with a current that is TOO low can also shorten the life of a lithium battery. When the cell is charged too slowly it can promote the growth of lithium metal dendrites on the anodes/cathodes. Those dendrites are crystal or tree-like metal structures that look like tiny, sharp needles and which can puncture the separator membranes in you cells over time. If you are lucky this results in reduced performance, if you are unlucky the cell will short out compelety and catch fire or explode. A great many fires and accidents of lithium batteries are attributable to that phenomenon. That might turn out to be quite a problem, as EUC batteries are becoming bigger very quickly with more and more parallel packs and the manufacturers pinch pennies at the same time by selling chargers with minimum performance. This will reduce the charging current for individual cells very quickly. Personally I'd be leery of charging at currents much below 0,5C.

Edited by mhpr262
  • Upvote 2
Link to comment
Share on other sites

Here is an update on the high current power supply,

I built the current monitoring circuit with LCD display for the output.  It works OK but as suspected, the resolution of just using the current sensor with a rang of about 2.5-3V was not giving me enough resolution on the current.  It would fluctuate by up to 60mA.  So I put in the op-amp and it works much better and fluctuations are within about 10mA. 

I am waiting on parts to get my SD card reader working.  The readers I purchased work on 3.3V logic.  They have a voltage regulator to go down from 5V but the return signal isn't increased to 5V again so the Arduino can't communicate with it.  I ordered some Hex non-inverting buffers (CD4050BE) to get the voltage back to 5v that I need: http://www.ebay.com/itm/231794373073?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Here is an example of the accuracy:

The voltage on the left is powering the Arduino and other components.  I have it set to just over 5V to account for the voltage drop it gets by the time the breadboard gets it.  The middle portion shows 3.000A going through to the current sensor (at 0.175v)

IMG_20160103_192607.jpg.eac22b12bf4ec8f7

Here is the breadboard with the op-amp in the middle, arduino on the left, LCD above, current sensor to the right of the LCD and a couple of multimeters.  The LCD shows exactly 3A and fluctuates only by about 0.01Amps.  The LCD shows exactly 3.00A.  The multimeter on the left shows the voltage coming out of the op-amp and the multimeter on the right shows the voltage coming out of the current sensor.

IMG_20160103_192559.thumb.jpg.6c51feec14

This picture shows current at zero going through the current sensor.  Again, the multimeter on the left shows the voltage coming out of the op-amp and the multimeter on the right shows the voltage coming out of the current sensor.

IMG_20160103_192659.thumb.jpg.4868e4e9e2

 

I had to give up some current resolution because of the op-amp I have.  With 5V powering it, the max voltage it can output is about 3.6V.  I also found that the op-amp is not scaling up enough.  More on that below...

Here is the circuit I am using for the op-amp.Click here to see it simulated in action.

Circuit.PNG.ce0695fa06f799c10c3e590f41f6

Once the circuit is build, I use my power supply to put precise current through the current sensor and measure the voltage coming out of the op-amp and current sensor.  Here is the resultant table:

Table1.PNG.af7d8fcf032543e816704c334e943

Once I have this table, I can plot it in a graph and use trend analysis to have Excel come up with an equation of the plotted line:

Graph1.PNG.9acfb28f589cb10972f97de91bcf7

Now that I have the linear equation, I can use it to determine current at any voltage level.  Remember the linear equation: y = mx + b from algebra in school?  This is deriving that equation and using it here except it is solving for Voltage = m * Current + b.    Or Current = (Voltage - b)/m.    

Table2.PNG.e0a848edba1623276669cf942f489

Now I can use these equations to determine what the voltage will be for any current level.

Table3.PNG.90fec3505277a72b799a462c6b2bc

And this table above shows the other problem I need to resolve.  Remember earlier when I stated that the op-amp can only output up to 3.6V with a 5V power supply?  The table above shows the op-amp would need to output 5.4776V at 5A and this isn't possible.  So back to the drawing board with the op-amp design to get the range correct.

Edited by Cranium
  • Thanks 1
  • Upvote 1
Link to comment
Share on other sites

1 hour ago, Cranium said:

I had to give up some current resolution because of the op-amp I have.  With 5V powering it, the max voltage it can output is about 3.6V.  I also found that the op-amp is not scaling up enough.  More on that below...

Is that a "feature" of the op-amp you're using? Or maybe the supply voltage is too low? I just tested some 5532P I have (pretty "normal" op-amp, AFAIK), and it gives out maximum of 4.47V @ 5.03V supply and 8.27V @ 8.85V supply.

Edit: Just tested some LM358N's, and they output a lower voltage (around 3.75V @ 5.04V supply, and something like 7.75V @ 8.82V supply), the datasheets state that the maximum output is Vsupply - 1.5V, so it actually goes a bit above it... maybe you just need to find another type of op-amp that gives out higher output voltage at maximum.

 

Edited by esaj
  • Upvote 1
Link to comment
Share on other sites

22 minutes ago, esaj said:

Is that a "feature" of the op-amp you're using? Or maybe the supply voltage is too low? I just tested some 5532P I have (pretty "normal" op-amp, AFAIK), and it gives out maximum of 4.47V @ 5.03V supply and 8.27V @ 8.85V supply.

 

 

It's a limitation of the op-amp (LM358M).  To test, I set it up as a very simple voltage follower (shown below) and the most voltage I could get out of it was 3.706V with 5V powering the opamp.  I need to get some with a better range.

5689d3d2a3932_volf21.gif.f1606e71ef3173f

Edited by Cranium
  • Upvote 1
Link to comment
Share on other sites

@esaj, I ordered some of the 5532P's you have.  I also started going through my drawer of IC's and found some TL082 Dual OpAmps.  I'm able to get 4.5V @ 5V supply.  So now I'm back to doing some calculations for resistor values.

Updated.....

The TL082 OpAmp isn't able to go below about 1.425V!  Grrr!  I'm learning a lot about OpAmps now.  Have to pay attention to the specs of them.  There is a Common Mode Input-Voltage Range and this limits the voltage going into the inverting pin. And there is the Output Voltage Swing that limits the range of output you can have.  Outside of these ranges and you have non-linearity or clipping of the output.  It looks like the 5532's may also have an issue with this.  

So now I've ordered some LMC662CN CMOS transistors.  They cost a little more but they have some of the best ratings for input range and output swing.

  • Upvote 1
Link to comment
Share on other sites

2 minutes ago, Cranium said:

@esaj, I ordered some of the 5532P's you have.  I also started going through my drawer of IC's and found some TL082 Dual OpAmps.  I'm able to get 4.5V @ 5V supply.  So now I'm back to doing some calculations for resistor values.

Updated.....

The TL082 OpAmp isn't able to go below about 1.425V!  Grrr!  I'm learning a lot about OpAmps now.  Have to pay attention to the specs of them.  There is a Common Mode Input-Voltage Range and this limits the voltage going into the inverting pin. And there is the Output Voltage Swing that limits the range of output you can have.  Outside of these ranges and you have non-linearity or clipping of the output.  It looks like the 5532's may also have an issue with this.  

So now I've ordered some LMC662CN CMOS transistors.  They cost a little more but they have some of the best ratings for input range and output swing.

I must admit that I have very vague ideas about the difference between the op-amps.... I was just going through this list, to look what I might "need" ;):  http://forum.allaboutcircuits.com/threads/components-selection-guide.65137/#post-448192   

Audio Amp, Buffer Amp - Unity Gain Op Amps, General purpose Op Amp, Op Amp - J-FET, Op Amp - Single Supply, Rail-to-Rail    Opamps, Power Op Amp, Instrumentation Amplifier... Although I knew there are different "types", I've never really looked up how they differ, to me they've always been just "op-amps" in general :P

  • Upvote 2
Link to comment
Share on other sites

@esaj, got the NE5532P op-amps in.  They won't work well.

  • Lowest voltage output ~1.4V
  • Highest voltage output ~3.5V

Outside of this range, it starts to become non-linear.

Next I tried a TLC2272CP rail to rail op-amp.

  • Lowest voltage output ~0.01V
  • Highest voltage output ~4.7V

This is the one to use! :)

I also received the Hex Buffer/Converters so can see if I can get the SD card reader to work now.

  • Upvote 1
Link to comment
Share on other sites

I was also looking for some rail-to-rail -op amps, but they're pretty expensive, cheapest around 1€ per piece (for orders of 50 or more), 20 or more 1.40€ per piece from Aliexpress, from Finland, 7.29€ per piece for orders of less than 10 (there might be cheaper alternatives domestically though, but it's not unusual for components to cost 5-20x more here than from Aliexpress)... :o  Not that I actually have need for such at least right now. Guess quality costs...

 

Edited by esaj
Link to comment
Share on other sites

Update on progress...

Current Sensing

568fe0ca3db6f_300px-Op-Amp_Inverting_Amp

Yesterday I received some cheaper LMC662 CMOS Dual Op-Amps.  I got 4 of these from a US seller for $6.19.  I'm sure they could be found much cheaper from overseas.  This works perfectly as a drop in replacement for the  TLC2272CP Op-Amp.

My linear regression derived formula is: Current = (Voltage - 0.4655)/0.769

With the new Op-Amp, over a 5A range, I am able to achieve an accuracy of 6.3mA which is much better than the 25.8mA accuracy without the Op-Amp ('i sensor' in the table below is the voltage directly from the current sensor output).

. Ideal i sensor OpAmp
Volt range 5.000 0.945 3.845
tick range* 1024 193 787
mA per tick 4.883 25.849 6.350

*How many unique values can the Arduino sense in the Volt range

Data Logging

568fe00c1fab1_F6VF1OJH5ENQ08B.LARGE1.jpg

After much struggle, I got the SD card reader working with the Hex Buffer being used for High-To-Low Level Logic Conversion (5V signals from the Arduino to 3.3V for the SD card).  The SD card reader has a spring release mechanism for the card and it wasn't allowing the card to sit deep enough to make good electrical contact so I had to remove the springs inside (this issue kicked my ass for a while).  I now need to write the code to start recording the charging data in a file.

 

Voltage regulation

568fe0440a95e_med_lm5007eval_lm5007eval1

Finally, I also received my LM5007 - 80V Wide Vin Step Down Switching Regulator Evaluation Board.  This will be used to power the Arduino, SD Card, Current Sensor and LCD display.   I tested it last night and from 12V to 64V, it had a rock solid 10.01V output.  Since this board outputs 10V, I'll need to change out a SMD resistor (either R3 or R4 from the picture) to get the output to 5V.

I will also need to create a voltage divider and an Op-Amp circuit for accurately monitoring the voltage of the charger. 

 

  • Upvote 1
Link to comment
Share on other sites

5 hours ago, Cranium said:

I tested it last night and from 12V to 64V, it had a rock solid 10.01V output.  Since this board outputs 10V, I'll need to change out a SMD resistor (either R3 or R4 from the picture) to get the output to 5V.

This might be a stupid and completely useless idea, but why not use the +10V -voltage from the evaluation board to power the op-amp, and then scale the range from 0 to 5V (or x...5+x, and then voltage divide it further for the Arduino input). That way it wouldn't matter as much if the op-amp cannot reach the rail voltages completely, and get even more precision on the current measurement (although, 6.3mA should be enough accuracy for this project anyway ;)). You could then further use a 5V regulator for the input to other parts from the +10V -line.

Unless you use the analog inputs from other parts (well, you probably use it to measure the voltage), you could also change also the ADC -reference voltage via the IORef-pin AREF-pin to get a little bit more accuracy, although it's again probably unnecessary with the accuracy you've already achieved:

http://arduino.stackexchange.com/questions/132/what-are-the-aref-ioref-and-the-unlabeled-pin-next-to-ioref-on-the-uno-r3).

Do note that you can't use reference voltage above 5V, and you need to tell the Arduino to use external reference, should you ever choose this route in this or other projects:  https://www.arduino.cc/en/Reference/AnalogReference

Edited by esaj
  • Upvote 2
Link to comment
Share on other sites

Interesting thought and I hadn't considered that.  It would certainly work.  

But after running through it, I'm not sure if it would be worth it unless I went into mass production. :) The LMC662CN is about $1.24 for each and a 5V voltage regualtor (L7805CV) would be about $0.50.  The cheaper NE5532 opAmp is about $0.30 each but would not work because of the common mode input voltage limitation but I'm sure another could be found that would work.   So there would be a little bit of savings and some added parts/complexity for the design.  

To change the resolution for the full 10 bits, I would need to change out at least a couple of the resistors for trimpots (fixed value resistors only get you so close to the full range) to fine tune to utilize the whole range from 0-5V so this would also add in a little cost.

I will have to look more into the IORef pin.  From the AtMega datasheet: "Internal reference voltages of nominally 1.1V or AVCC are provided On-chip. The voltage reference may be externally decoupled at the AREF pin by a capacitor for better noise performance."  I'm not sure what the max reference voltage would be or what the capacitor would be or the effect on the rest of the operations from this.  It is confusing to me right now.  lol

 

  • Upvote 1
Link to comment
Share on other sites

1 hour ago, Cranium said:

Interesting thought and I hadn't considered that.  It would certainly work.  

But after running through it, I'm not sure if it would be worth it unless I went into mass production. :) The LMC662CN is about $1.24 for each and a 5V voltage regualtor (L7805CV) would be about $0.50.  The cheaper NE5532 opAmp is about $0.30 each but would not work because of the common mode input voltage limitation but I'm sure another could be found that would work.   So there would be a little bit of savings and some added parts/complexity for the design.  

To change the resolution for the full 10 bits, I would need to change out at least a couple of the resistors for trimpots (fixed value resistors only get you so close to the full range) to fine tune to utilize the whole range from 0-5V so this would also add in a little cost.

From a cost standpoint, it probably doesn't matter that much, and since you've already reached 6.3mA precision, shaving off something like 0.5-1mA wouldn't likely make much of a difference (at least in this project).

Quote

I will have to look more into the IORef pin.  From the AtMega datasheet: "Internal reference voltages of nominally 1.1V or AVCC are provided On-chip. The voltage reference may be externally decoupled at the AREF pin by a capacitor for better noise performance."  I'm not sure what the max reference voltage would be or what the capacitor would be or the effect on the rest of the operations from this.  It is confusing to me right now.  lol

I incorrectly said IORef-pin in the above post (which I've since edited), it's the ARef-pin. The ATMega-datasheet is probably talking about the internal reference of the ATMega-chips themselves (known as INTERNAL/INTERNAL1V1/INTERNAL2V56 on Arduino, which is not the default), the Arduino -reference was fairly clear, IMHO, about it's usage and limitations:

https://www.arduino.cc/en/Reference/AnalogReference

analogReference()

Description

Configures the reference voltage used for analog input (i.e. the value used as the top of the input range). The options are:

  • DEFAULT: the default analog reference of 5 volts (on 5V Arduino boards) or 3.3 volts (on 3.3V Arduino boards)
  • INTERNAL: an built-in reference, equal to 1.1 volts on the ATmega168 or ATmega328 and 2.56 volts on the ATmega8(not available on the Arduino Mega)
  • INTERNAL1V1: a built-in 1.1V reference (Arduino Mega only)
  • INTERNAL2V56: a built-in 2.56V reference (Arduino Mega only)
  • EXTERNAL: the voltage applied to the AREF pin (0 to 5V only) is used as the reference.   <-----

 

       And

Don't use anything less than 0V or more than 5V for external reference voltage on the AREF pin! If you're using an external reference on the AREF pin, you must set the analog reference to EXTERNAL before calling analogRead().Otherwise, you will short together the active reference voltage (internally generated) and the AREF pin, possibly damaging the microcontroller on your Arduino board.

Alternatively, you can connect the external reference voltage to the AREF pin through a 5K resistor, allowing you to switch between external and internal reference voltages. Note that the resistor will alter the voltage that gets used as the reference because there is an internal 32K resistor on the AREF pin. The two act as a voltage divider, so, for example, 2.5V applied through the resistor will yield 2.5 * 32 / (32 + 5) = ~2.2V at the AREF pin.

Edited by esaj
Link to comment
Share on other sites

Voltage Regulation

I'm in a bit of a quandary now.  I changed out the R4 resistor and lowered the voltage to 5V.  

568fe0440a95e_med_lm5007eval_lm5007eval1

I wanted to test output performance on my oscilloscope.  I set up a 63V input and set up my load tester for a constant 200mA load on the output.  

Output ripple is a noisy 200mV but voltage is good at 5.06V.  Voltage also does not fluctuate with changes in load.  I'm not sure how the Arduino or Op-Amp will like this.

NewFile2.png.bbbfbdc0c7e06cae4cfee1698af

The output on the board can be changed to a low ripple mode by shifting the output connectors down a hole (dotted line and empty hole on the right side of the board image).  Measuring the output of this is a much less noisy waveform but the voltage has dropped down to 4.91V.  Changes in load cause the voltage to fluctuate.  At 100mA, it is 5.02V.  At 300mA, it 4.78V.   I don't think the load will really change overall so everything can likely be calibrated from the voltage it ends up at.

NewFile1.png.da466a4a0f0837cfd22be072714

I guess I'm going to try the noisy version first to see how it performs.  Now I can see why there may be two steps in voltage regulation to get a rock solid 5V output. :)

I have the high voltage portion in a little 3" x 2" box now.  In this box I have the step down voltage regulator, voltage divider and current sensor.  Coming out of the box on the right I have bare wires that will eventually have another Ninebot connector attached and a 4 wire connector.  These 4 wires will supply the 5V to the rest of the electronics as well as the output from the current sensor and voltage divider.  

IMG_20160109_132723.thumb.jpg.21fe754bb3

 

Edited by Cranium
  • Upvote 1
Link to comment
Share on other sites

57 minutes ago, Cranium said:

Output ripple is a noisy 200mV but voltage is good at 5.06V.  Voltage also does not fluctuate with changes in load.  I'm not sure how the Arduino or Op-Amp will like this.

NewFile2.png.bbbfbdc0c7e06cae4cfee1698af

You could probably add one or more capacitors in parallel with the output, just make sure to pick "correct" capacities, so it charges to full voltage fast and can stay near the peak voltage while discharging when the ripple drops towards the minimum... Not sure on how to calculate the correct values, but since you now the lengths (timewise) of the ripple pulses, you could probably use the times based on RC-values given here to get started and work your way towards suitable values (by trial and error ;)):   http://lcamtuf.coredump.cx/electronics/#11

As a bit off-topic, I see you have a Rigol -oscilloscope. I've been eyeing this myself:  http://www.batronix.com/shop/oscilloscopes/Rigol-DS1054Z.html   But since I don't know that much about oscilloscopes, I've wondered whether it's really worth the money or not (there's a software mod to get the full 100MHz bandwidth + other goodies of the "better" models, it seems the DS1xxx -series are all the same device (except the ones which have in-built waveform generators and what not) with the lower-end versions just using firmware without all the capabilities).

Edited by esaj
  • Upvote 1
Link to comment
Share on other sites

 

3 hours ago, esaj said:

You could probably add one or more capacitors in parallel with the output, just make sure to pick "correct" capacities, so it charges to full voltage fast and can stay near the peak voltage while discharging when the ripple drops towards the minimum... Not sure on how to calculate the correct values, but since you now the lengths (timewise) of the ripple pulses, you could probably use the times based on RC-values given here to get started and work your way towards suitable values (by trial and error ;)):   http://lcamtuf.coredump.cx/electronics/#11

As a bit off-topic, I see you have a Rigol -oscilloscope. I've been eyeing this myself:  http://www.batronix.com/shop/oscilloscopes/Rigol-DS1054Z.html   But since I don't know that much about oscilloscopes, I've wondered whether it's really worth the money or not (there's a software mod to get the full 100MHz bandwidth + other goodies of the "better" models, it seems the DS1xxx -series are all the same device (except the ones which have in-built waveform generators and what not) with the lower-end versions just using firmware without all the capabilities).

Yeah, I'll be seeing if caps will do the trick.  I already played with some and went too large because voltage dropped.  I have A Capacitance Substitution box (Elenco CS-440) that I'll hook up later to try inline.  

The 1054Z is a great little scope.  I have the 1052E which is a 50MHz scope that I applied a firmware hack to get 100MHz.  I had actually considered selling my scope to get a Mixed Signal Oscilloscope like the Rigol MSO1104Z-S (on the high end).  And then add on the Real Time Waveform Record and Replay Option and the Serial Bus Analysis Option.  This would allow me to also replace my signal generator and my Saleae logic analyzer.  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...