From: Jim Thompson on
On Tue, 30 Mar 2010 08:29:36 -0700, John Larkin
<jjlarkin(a)highNOTlandTHIStechnologyPART.com> wrote:

>On Tue, 30 Mar 2010 15:20:12 GMT, Jan Panteltje
><pNaonStpealmtje(a)yahoo.com> wrote:
>
>>On a sunny day (Tue, 30 Mar 2010 07:02:15 -0700) it happened John Larkin
>><jjlarkin(a)highNOTlandTHIStechnologyPART.com> wrote in
>><pd04r5dj17cfb89gf4m25png9elos4vf12(a)4ax.com>:
>>
>>>I woke up in the middle of the night and decided to count parts.
>>
>>
>>I once dream t I was an electron, moving through the ciruits.
>>Poor electrons, the things we do to them.
>>
>>I woke up at 3:30 last night because computers started beeping... alarms...
>>power glitch, rare here, but the server stuff did not re-start.
>>Have to add a big relay and a watchdog some day.
>>Finised the millivolt measurement part of my scope-PIC.
>>You can move a cursor over the waveform and it displays the voltage at that point.
>>
>>
>>> I've
>>>been working on this circuit so much in the last three days that I can
>>>literally see it in my head and stroll around and count the parts. I
>>>got 68 parts in each channel. Times 12 channels, plus VME interface,
>>>13th control processor, power supplies, LEDs, and BIST, that will be
>>>about 1000 parts. That's a lot; I should pare it down some if I can.
>>
>>>I need a current-dumper for when I'm operating in voltage-regulator
>>>mode, to give some minimum load to the source follower. I can use an
>>>LND150 depletion fet: ground the gate, connect the source to a uP port
>>>pin, then the drain becomes the dump. Saves me two parts.
>>
>>BJTs are cool.
>>
>>
>
>I could also do it with a BCX70J NPN transistor, with a 1M resistor
>from a port pin to the base, ground the emitter, and beta limit. That
>would be a more predictable sink than the dmos fet. Certain geezers
>wouldn't approve.
>
>John

You just love tweaking "Certain geezers" don't you.

But you're an old geezer yourself.

AND you're as dumb as a stump.

Any 2nd year college student can tell you a more reliable, and
cheaper, way to accomplish your minimum load using a port pin.

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

The only thing bipartisan in this country is hypocrisy
From: Jim Thompson on
On Tue, 30 Mar 2010 08:15:29 -0700, Tim Wescott <tim(a)seemywebsite.now>
wrote:

>pnachtwey wrote:
>> On Mar 29, 9:11 am, John Larkin
>> <jjlar...(a)highNOTlandTHIStechnologyPART.com> wrote:
>>> I'm designing a gadget that uses an ARM uP, with 12-bit mux'd ADC and
>>> a 10-bit DAC, to essentially make a current and voltage regulated
>>> power supply. The ADC will measure voltage and current and the DAC
>>> will control a fairly soft source-follower series-pass mosfet. The
>>> customer load could be most anything.
>>>
>>> I think it would be time-effective to simulate the control loop while
>>> the PC board is being fabbed, so we don't have to play with dynamics
>>> as much in the critical delivery path.
>>>
>>> I can simulate it as an analog loop using LT Spice, as I'm familiar
>>> with that and could get it done quickly. It would be handy if I could
>>> also use the same model in digital mode, which would add sampling
>>> delays and maybe even quantization.
>>>
>>> Any thoughts on how to do this?
>> Why not use Matlab, Scilab, Mathcad etc?
>> I do simulations for motion control all the time. I use a Trunc()
>> function in Mathcad to simulate quantizing. I also have functions for
>> generating noise.
>
>In my experience the general-purpose math package route works very well
>with motion control -- things are generally far more linear and (with
>the exception of friction) if they're nonlinear they generally have just
>a few salient nonlinearities so you know what you have to model.
>
>Circuits -- and switching amplifiers specifically -- tend to have lots
>of nonlinearities that may or may not matter, many more parts whose
>dynamics may or may not matter (or matter under different operating
>conditions, because of those nonlinearities), and they're just plain
>more opaque in operation. Add to that the fact that the world is
>flooded with excellent circuit simulation packages, and the attraction
>of simulating one's digital controller inside the circuit simulator
>becomes very strong.

PSpice has CEIL, FLOOR and INTQ (as well as many others), so "plants"
can be behaviorally modeled within an electronic controller.

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

The only thing bipartisan in this country is hypocrisy
From: Tim Wescott on
Jim Thompson wrote:
> On Tue, 30 Mar 2010 08:15:29 -0700, Tim Wescott <tim(a)seemywebsite.now>
> wrote:
>
>> pnachtwey wrote:
>>> On Mar 29, 9:11 am, John Larkin
>>> <jjlar...(a)highNOTlandTHIStechnologyPART.com> wrote:
>>>> I'm designing a gadget that uses an ARM uP, with 12-bit mux'd ADC and
>>>> a 10-bit DAC, to essentially make a current and voltage regulated
>>>> power supply. The ADC will measure voltage and current and the DAC
>>>> will control a fairly soft source-follower series-pass mosfet. The
>>>> customer load could be most anything.
>>>>
>>>> I think it would be time-effective to simulate the control loop while
>>>> the PC board is being fabbed, so we don't have to play with dynamics
>>>> as much in the critical delivery path.
>>>>
>>>> I can simulate it as an analog loop using LT Spice, as I'm familiar
>>>> with that and could get it done quickly. It would be handy if I could
>>>> also use the same model in digital mode, which would add sampling
>>>> delays and maybe even quantization.
>>>>
>>>> Any thoughts on how to do this?
>>> Why not use Matlab, Scilab, Mathcad etc?
>>> I do simulations for motion control all the time. I use a Trunc()
>>> function in Mathcad to simulate quantizing. I also have functions for
>>> generating noise.
>> In my experience the general-purpose math package route works very well
>> with motion control -- things are generally far more linear and (with
>> the exception of friction) if they're nonlinear they generally have just
>> a few salient nonlinearities so you know what you have to model.
>>
>> Circuits -- and switching amplifiers specifically -- tend to have lots
>> of nonlinearities that may or may not matter, many more parts whose
>> dynamics may or may not matter (or matter under different operating
>> conditions, because of those nonlinearities), and they're just plain
>> more opaque in operation. Add to that the fact that the world is
>> flooded with excellent circuit simulation packages, and the attraction
>> of simulating one's digital controller inside the circuit simulator
>> becomes very strong.
>
> PSpice has CEIL, FLOOR and INTQ (as well as many others), so "plants"
> can be behaviorally modeled within an electronic controller.

In this case John is treating the circuit as a plant and simulate the
(digital) controller -- but it's the same difference.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
From: Jan Panteltje on
On a sunny day (Tue, 30 Mar 2010 08:29:36 -0700) it happened John Larkin
<jjlarkin(a)highNOTlandTHIStechnologyPART.com> wrote in
<ev54r59vseoa0rmogu5edugn57meuhaopt(a)4ax.com>:

>On Tue, 30 Mar 2010 15:20:12 GMT, Jan Panteltje
><pNaonStpealmtje(a)yahoo.com> wrote:
>
>>On a sunny day (Tue, 30 Mar 2010 07:02:15 -0700) it happened John Larkin
>><jjlarkin(a)highNOTlandTHIStechnologyPART.com> wrote in
>><pd04r5dj17cfb89gf4m25png9elos4vf12(a)4ax.com>:
>>
>>>I woke up in the middle of the night and decided to count parts.
>>
>>
>>I once dream t I was an electron, moving through the ciruits.
>>Poor electrons, the things we do to them.
>>
>>I woke up at 3:30 last night because computers started beeping... alarms...
>>power glitch, rare here, but the server stuff did not re-start.
>>Have to add a big relay and a watchdog some day.
>>Finised the millivolt measurement part of my scope-PIC.
>>You can move a cursor over the waveform and it displays the voltage at that point.
>>
>>
>>> I've
>>>been working on this circuit so much in the last three days that I can
>>>literally see it in my head and stroll around and count the parts. I
>>>got 68 parts in each channel. Times 12 channels, plus VME interface,
>>>13th control processor, power supplies, LEDs, and BIST, that will be
>>>about 1000 parts. That's a lot; I should pare it down some if I can.
>>
>>>I need a current-dumper for when I'm operating in voltage-regulator
>>>mode, to give some minimum load to the source follower. I can use an
>>>LND150 depletion fet: ground the gate, connect the source to a uP port
>>>pin, then the drain becomes the dump. Saves me two parts.
>>
>>BJTs are cool.
>>
>>
>
>I could also do it with a BCX70J NPN transistor, with a 1M resistor
>from a port pin to the base, ground the emitter, and beta limit. That
>would be a more predictable sink than the dmos fet. Certain geezers
>wouldn't approve.
LOL

But you could ground the base, and drive the emittor negative via a resistor.
Very predictable current if you have negative supply available.


>John
>
From: John Larkin on
On Tue, 30 Mar 2010 19:48:39 GMT, Jan Panteltje
<pNaonStpealmtje(a)yahoo.com> wrote:

>On a sunny day (Tue, 30 Mar 2010 08:29:36 -0700) it happened John Larkin
><jjlarkin(a)highNOTlandTHIStechnologyPART.com> wrote in
><ev54r59vseoa0rmogu5edugn57meuhaopt(a)4ax.com>:
>
>>On Tue, 30 Mar 2010 15:20:12 GMT, Jan Panteltje
>><pNaonStpealmtje(a)yahoo.com> wrote:
>>
>>>On a sunny day (Tue, 30 Mar 2010 07:02:15 -0700) it happened John Larkin
>>><jjlarkin(a)highNOTlandTHIStechnologyPART.com> wrote in
>>><pd04r5dj17cfb89gf4m25png9elos4vf12(a)4ax.com>:
>>>
>>>>I woke up in the middle of the night and decided to count parts.
>>>
>>>
>>>I once dream t I was an electron, moving through the ciruits.
>>>Poor electrons, the things we do to them.
>>>
>>>I woke up at 3:30 last night because computers started beeping... alarms...
>>>power glitch, rare here, but the server stuff did not re-start.
>>>Have to add a big relay and a watchdog some day.
>>>Finised the millivolt measurement part of my scope-PIC.
>>>You can move a cursor over the waveform and it displays the voltage at that point.
>>>
>>>
>>>> I've
>>>>been working on this circuit so much in the last three days that I can
>>>>literally see it in my head and stroll around and count the parts. I
>>>>got 68 parts in each channel. Times 12 channels, plus VME interface,
>>>>13th control processor, power supplies, LEDs, and BIST, that will be
>>>>about 1000 parts. That's a lot; I should pare it down some if I can.
>>>
>>>>I need a current-dumper for when I'm operating in voltage-regulator
>>>>mode, to give some minimum load to the source follower. I can use an
>>>>LND150 depletion fet: ground the gate, connect the source to a uP port
>>>>pin, then the drain becomes the dump. Saves me two parts.
>>>
>>>BJTs are cool.
>>>
>>>
>>
>>I could also do it with a BCX70J NPN transistor, with a 1M resistor
>>from a port pin to the base, ground the emitter, and beta limit. That
>>would be a more predictable sink than the dmos fet. Certain geezers
>>wouldn't approve.
>LOL
>
>But you could ground the base, and drive the emittor negative via a resistor.
>Very predictable current if you have negative supply available.
>
>

Sorry, no negative supply. So the depletion mode fet, with port pin
driving the source, works with zero additional parts. The BCX70 would
actually have a more repeatable sink current (the fet has a 3:1 Idss
spec, whereas the BCX70J beta spread is under 2:1) but needs the base
resistor.

We are very tight for space, so every part matters.

John