Todays tronix: funny divider ratios

Todays tronix: funny divider ratios

Did some circuit painting, first zorry my canon a740 broke down just after 5000 pictures taken, so this is with a cheap ebay video player that also happens to have a camera.

formatting link

For a reference voltage or 2.048 V, the highest I can run in a PIC running at 3.3V, to get closest to max value (least error) in the ADC, to calculate the divider values for each cell in the multi cell charge balancing, the resistor values are cool, but the ratios somehow amaze me.

BTW the shunt is now in the plus...

Reply to
Jan Panteltje
Loading thread data ...

Illegible, as usual.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

I totally agree; would it be worthwhile to hire a draftsman for him?

Reply to
Robert Baer

Jan needs a scanner. LTSpice for drawing, then a screencap would be even better.

Cheers, James Arthur

Reply to
dagmargoodboat

I draw with a roller-ball pen, or a sharpie if it's handy, on grid paper, and photograph it with a cheap but decent camera. Irfanview crops and sharpens as needed. Pencil tends to be fuzzy. Drawing a schematic in ink is like trapeze without a net.

formatting link

Such stuff should always have a title/author/date.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

Since arguably the quad packs have better matching than absolute values, it'd be more useful to explore what divider ratios can be created with a quad pack.

--
 Thanks, 
    - Win
Reply to
Winfield Hill

Arguably negates the whole notion. Manufacturers won't support that assumption without paying through the nose for it, so it's useless to me. One can assume some temperature coupling if the power dissipation is similar but that's about all.

I'm trying to find some 0402-equivalent .1% quad packs (0804, or some such) but no luck yet. A few manufacturers have discussed the possibility but nothing yet. I could use, perhaps, ten million a year.

Reply to
krw

A kickstarter campaign for a Panteltje schematic translator is needed!

Jan, you have has great projects of interest, just those darn schematic drawings. Hope you're feeling the love.

Mikek

Reply to
amdx

You can assume that all the resistors in a pak were made of the same stuff and laser trimmed at the same time.

There are lots of thinfilm networks around, like 0.1% with PPM TC tracking.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

This might be all of them...

formatting link

formatting link

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

You can't because the manufacturer won't stand behind any tracking.

Not in 4x0402. I think I can find 4x0603 (0612) but I don't think I can spare the space. I need a lot of 'em.

Reply to
krw

Just connecting up the lines and making the text legible would help. I gave up on Jan's schematics long ago. It's a pity, because he often has interesting ideas.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

2 more: ____|___ R R R R | | = .4

-------- |

__|___ R R R R = 1

------ |

Reply to
Bob Engelhardt

What would be useful is to figure out all the 3t regulator (LM317, LM1117) voltages that can be made from one r-pack. Then do multiple voltages by stacking regulators or sharing dividers.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

OK, added 0.4. The quad 1.0 is sort of obvious, but might be useful for power dissipation or wideband termination or something.

formatting link

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

This will probably not help you, but mm maybe even Con Fuse you more than you already are, but

To measure voltages with a PIC ADC (or any other ADC) first some things, and requirements. And some things we can chose.

I have chosen to use PIC asm and 32 bit signed integer math. In case you dunno what signed means, it means bit 31 is the sign bit (well there is more to it, but read up on it). Second let us assume we have a 36 V battery pack, and want to measure it.

AND we have a 10 bit ADC, that is one that counts from 0 to 1023 FYI. Also we use a 2.048 reference, that is the PIC internal 1024 mV reference x 2, the maximum we can use at 3.3V PIC supply voltage. We need 3.3 V supply for the PIC because it interfaces to a 3,3 V ethernet module, that would probably work too with a 5 V PIC and a resistor divider, then we could use a 4096 reference. But just for the suspense we use 3.3 V and a 2.048 V reference. So 1023 steps on the ADC is in fact 2.048 V on the ADC input pin.

Simple City says that the battery pack will have 9 cells, and the max voltage per cell is 4.2 V (set by a parallel regulator per cell), so 9 * 4.2 , and I use wcalc in a terminal in Linux, easy to do mazz with:

Interesting, we like binary, so let us say Max Voltage (you know him right?) is lower than 40960 mV.

Now to avoid doing too much mazz maybe you can see that if we make 1023 steps on the ADC correspond to 40960 mV on the battery.

There are a number of issues

1) the PIC 1024 mV reference has a tolerance (unknown). 2) the resistors in the voltage divider have tolerance, say even if we use 1 % resistor then that is still a lot, as 1% of 40960 mV is 400 mV, almost half a volt, and since we need to know battery voltage of each cell within say 40 mV, all these things need software correction, with a given hardware.

Now, if we leave out the sign bit, than we have 30 bits to play with. The ADC is ten bits, that leaves 20 bits to multiply the ADC value with:

2^20 = 1048576

So here is the mazz for a 40960 mV on the input, a 20 x resistor divider (say 190 k versus 10 k), 1023 steps on ADC, and 40960 mV battery voltage:

-> ((1023 * (1049602 + 0 ) ) / 1048576) * 2 * 20 = 40960.038986 -> 40960 steps fudge cor 2^20 2xVref divider display in mV only integer part

if we add 25 counts correction then -> ((1023 * (1049602 + 25) ) / 1048576) * 2 * 20 = 40961.014595 -> 40961 mV displayed.

So we can calibrate display value to 1 mV easily.

Of course the ADC has only 1024 steps, so 40960 / 1024 = 40 mV resolution, say +/- 40 mV that would be between cells too, so 4.2 4.16 4.24 per cell.

Setting the fudge factor a bit lower than 1049602 and adding a 16 bit correction value (0-65535) in EEPROM, set via RS232 once, will make in possible to calibrate out most errors due to reference voltage and resistor divider.

The math in integer stays simple. Will It Wurk?

BTW I received via interstellar link the message it is not spelled mazz, but mazzel (if this works).

Reply to
Jan Panteltje

Of course we can, but this is not true here, as the integer result of ((1023 * (1049602 + 25) ) / 1048576) will always be multiplied by 2 * 20 , so that same 40 mV rules.

If we go back to 24 V, then the calculation becomes:

2^20 = 1048576.000000

For 7 cells and 7 *3.8 V nominal:

7 * 3.8 = 26.600000

Maximun with 7 cells:

7 * 4.2 = 29.400000

29.400000 / 2.046 = 14.369501

15 x divider, 140 k versus 10 k, max voltage: 15 * 2048 = 30720 (1023 * (1049602 + 0 ) / 1048576) * 2 * 15 = 30720.029240 1 * (1049602 + 0 ) / 1048576) * 2 * 15 = 30.029354
Reply to
Jan Panteltje

Sounds like sign-magnitude. We generally use 2's complement. Or lately, mostly work in floating point.

The ARMs that we use have an external ADC reference input. They are very good about ADC full-scale being very close to the reference, but the ADCs are noisy and a tad nonlinear.

We used to do a lot of fixed-point fractional math, shifting, and assembly-language tricks to do stuff like that. Nowadays, everything is coded in C and we generally use floats, since our ARMs mostly have hardware FPP. We have a cal table in flash, and sometimes even a polynomial cal table.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

The MSB is the sign bit in twos-complement, too, hence the "well there is more to it", as I read it.

Full-scale makes sense, as does the rest. They are made with a digital process. What about monotonicity?

It's amazing how easy this stuff becomes when transistors are free. ;-)

Reply to
krw

Would not that quantity allow a custom run?

Reply to
Robert Baer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.