Fastest way to run a software feedback loop?

Hard to argue what is small, A 64 pins ARM32 or PIC32 is the same size as a 44 pins AVR. Complexities (in PCB layout) and costs are around the same.

AVR32 runs at 60MHz PIC32 runs at 80Mhz ARM32 runs at 100MHz

All of them beats a 20MHz AVR by factor of 3 to 5.

Depends on the number of instructions per loop.

Reply to
linnix
Loading thread data ...

On a sunny day (Sat, 15 Oct 2011 12:03:33 -0400) it happened Phil Hobbs wrote in :

Some PICs have build in hardware comparators. And programmable references. What more could you want?

Reply to
Jan Panteltje

test

t

o be

he

T.

gma?

a
o

ll

.g.

e

That's exactly the problem we are facing. Our initial design based on PIC24F (16MIPs) is not fast enough. So, we are looking into PIC24H (40MIPs) or PIC32 (80MIPs). They are almost pin compatible, except for one single issue. PIC24F is so flexible that it can repurpose I/ Os to different pins. However, this features is not available in PIC24H or PIC32. Now, we have to redo the layout to match all three familes. I wish i read more about them before starting, or someone to have told me.

Reply to
linnix

PIC sucks.

Reply to
Vladimir Vassilevsky

You want fast? Hardware state machine. :)

--Winston

Reply to
Winston

It's supposed to be a general purpose device, so I'm hoping for something in the range of an ATtiny13, three resistors, an LM385, and a

2N7002. The tiny has a comparator output, so maybe I can run the 2N7002 off that, and diddle with the setpoint and hysteresis in code. I'll have to do some modelling.

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
845-480-2058

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

Have you seen any PIC24 or PIC32? Nothng wrong with the archs.

Yes, PIC12 to PIC18 sucks

Reply to
linnix

n Yes, keeping the lag down is the key.

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
845-480-2058

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

Hysteretic loops are inherently much more stable, maybe that can work. Keep in mind that comparators in uC have rather horrid noise and offset specs. If you can find much in terms of specs, that is ...

Also, keep in mind to provide 5V supplies because the 2N7002 ain't too happy with much less than that. At least it wouldn't be kosher for a mission-critical design to drive it with less.

--
Regards, Joerg

http://www.analogconsultants.com/
Reply to
Joerg
[...]

Well, easy: Use this thread for the "told me" part. Since the discovery that Neutrinos can be faster than the speed of light there should be the first slightly used time machines popping up on Ebay :-)

--
Regards, Joerg

http://www.analogconsultants.com/
Reply to
Joerg

Where have you been :-) Something like that is a piece of cake for almost any ARM based uC.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico@nctdevpuntnl (punt=.)
--------------------------------------------------------------
Reply to
Nico Coesel

I agree. I recently used an LPC1111 (Cortex M3) in a QFN32 package for a project. Its about 90 cents in larger quantities IIRC. I think it would fit the bill for Phil's project as well.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico@nctdevpuntnl (punt=.)
--------------------------------------------------------------
Reply to
Nico Coesel

Ti's C28xxx Delfino uc's can run 300mhz. I had a 2810 running 2 loops with 100kbw at 150mhz a while ago. I can imagine if the periphial clock is derived in the same way the Delfino should easily do 200kbw.

Cheers

Reply to
Martin Riddle

Have you seen the hacks for these:

formatting link
to use them for projects instead of as programmers?

--
You can't have a sense of humor, if you have no sense.
Reply to
Michael A. Terrell

Those are slow, however, because the radiative coupling is weak.

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
845-480-2058

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

I have a hand held laser IR probe that is suppose to be a pulsed modulated system and good for ~ 100 feet of measurement.

I only paid 130 bucks for this but I can say that when I point to a hot steam pile in our factor roof, which is up about 50 feet, I can get a very accurate reading, a reading that I know is from the pipe and not the surroundings.

The companies 10k$ IR camera, of course, does better.

Jamie

Reply to
Jamie

100kHz bandwidth and 300kHz update rate d You _might_ be able to make this work with a DSP chip or one of the Arm Cortex parts if that's all it's doing, and polling on the ADC to boot. How you'd give it the chance to do anything else is an open question.

How much current do you need?

You're not going to get a lot of accuracy with such a low sample rate to bandwidth ratio _plus_ such a coarse PWM -- your delta-sigma is only going to be as good as the plant's ability to naturally filter out the noise, and from what you say the plant responds pretty fast.

Which all leads to -- why software? Have you just been led astray because any time someone proposes a control loop I (or someone like me) jump in and say "do it in software"? Software control gives you flexibility, it gives you easy field upgradability, and it gives you room to have some really bizarre nonlinearities in your control loop. But it only gives you those things if you have the time to make it happen. At your 300kHz update rate, I fear that your processor would have to be so very focused on the control algorithm that there may not even be enough juice left over to respond to communications, unless that was (a) very slow, and (b) written very awkwardly.

If you need the complexity _at that rate_ to do the job, then John Larkin's suggestion of an FPGA or CPLD is a sound one, particularly if it is accompanied by (or incorporates) a microprocessor to talk to the outside world.

If you just need a stinkin' PID loop, and all you'll ever do is change the tuning, then consider analog hardware and some DACs. Or, if you'll _never_ change the tuning, just go all analog.

If you need the complexity of control that software offers, but you don't need it at 100kHz, then consider using an inner loop done in analog, with an outer loop done in software, at a lower rate.

Personally I think you want to either stick with analog, or go the FPGA route and hire me to do the logic design :-).

--
www.wescottdesign.com
Reply to
Tim Wescott

One thing I like about pwm or delta-sigma is that a resistive heater power is linear on drive, as opposed to square-law if you drive it analog.

John

Reply to
John Larkin

Not required, fortunately.

Between 10 and 100 mA.

It does, but all the fast stuff goes away within a few mils of the controlled element, so I don't need to worry about it too much. Thermal is a lot easier than EMI in that way.

The main issue is keeping a huge loop gain down at the frequencies of thermal forcing, without having to tweak the transfer function to the exact environment, use lead-lag compensation, and so on. That's the unique function of the device--it makes external thermal forcing go away essentially completely, without needing all sorts of insulation and thermal shielding.

It's mainly cost and size. Something that can be built for a buck or two in 100k-ish quantities is the ticket. No communications are required--you just apply power and this little piece of the universe acquires a well-defined temperature regardless of what you do to it (within limits, obviously). I'd also like to put in some smarts to keep it from catching fire in pathological situations.

That's a possibility, but it needs quite a few more parts than the ATtiny tweaked thermostat (assuming that will work, which is still an open question). One plus is that since the heater and sensor are so fast, I wouldn't need grotesquely long RC time constants in the controller.

Thanks, that's sort of where I'm going.

Tell you what--if you bring in a licensee, you can do the logic _and_ have a finder's fee. ;)

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
845-480-2058

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

How could anything with a laser and fibers be cheaper than a simple thermionic electron gun? Isn't the "toob" an extremely simple and inexpensive technology?

Just curious.

--
_____________________
Mr.CRC
crobcBOGUS@REMOVETHISsbcglobal.net
SuSE 10.3 Linux 2.6.22.17
Reply to
Mr.CRC

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.