Author Topic: off the shelf PID control IC ?  (Read 18111 times)

0 Members and 1 Guest are viewing this topic.

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2007
  • Country: au
Re: off the shelf PID control IC ?
« Reply #25 on: March 15, 2013, 11:45:56 pm »
How much torque is required to move the flap? Maybe you can go old school and use a couple of selsyn's, nothing but a couple of synchro motors and some AC. These are also known as resolvers.

 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1283
  • Country: fi
Re: off the shelf PID control IC ?
« Reply #26 on: March 16, 2013, 07:29:37 am »
this needs to be cheap and not require any "programming" unless I just go for an MCU and to be fair i did once and nearly nailed it.
So do i understand correctly, that your application is controlling a flap (ventilation, maybe?). In that case you hardly need a true servo system, because the point of a servo is that it has dynamics, i.e. it can follow a (rapidly) moving setpoint. Think of industrial robots, the ultimate servomechanisms.
If i had to implement this kind of system, i would keep it simple: limit switches at both ends of travel, plus a system to get a position between. Control by a 3 position switch: open-set-closed. The "set" would then be adjusted with a setpoint pot. To actuate the setpoint you need a window comparator or 2. A wider window to indicate close proximity of the flap to the setpoint. This slows the motor down. Secondly a tighter window to indicate arrival in position and end of cycle. Additionally you need the motor drive circuit. Why not make life simple and do it using a direction relay and simple one fet pwm speed control? Absolutely jellybean components only, and everything is replaceable by whatever you can find. If it was me, i would grab my favorite puny MCU, the ATMega328 and spend an hour or 2 implementing the window comparators and pwm driver. Or you can do it with Arduino if you are not keen on making a board of your own. I wouldn't though, beacuse Arduino is anything but industrial in its implementation.
Really, this is how i would do it and i know for a fact that it would work just nicely.
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 13832
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: off the shelf PID control IC ?
« Reply #27 on: March 16, 2013, 08:19:26 am »
No I don't need fast reaction times. I have two scenarios, one where it is the ventilation flap and just needs a mid point, this is simple enough with a window comparator, we don't need to be too acurate so a big window is fine giving the motor time to stop before overshooting.

The other scenario is a water valve that controls hot water (engine coolant) into the system to control the temperature, this will need a few "points" so pretty much fluid control to any position, in reality the hysteresis will limit the infinity of positions to roughly "total scale"/"hysteresis gap"
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1283
  • Country: fi
Re: off the shelf PID control IC ?
« Reply #28 on: March 16, 2013, 09:59:55 am »
No I don't need fast reaction times. I have two scenarios, one where it is the ventilation flap and just needs a mid point, this is simple enough with a window comparator, we don't need to be too acurate so a big window is fine giving the motor time to stop before overshooting.
So the simple system either with a single or dual window would be OK for the flap thing.
Quote

The other scenario is a water valve that controls hot water (engine coolant) into the system to control the temperature, this will need a few "points" so pretty much fluid control to any position, in reality the hysteresis will limit the infinity of positions to roughly "total scale"/"hysteresis gap"
Here you will want a simple PI controller. Issues i would look into (and you will have to, as well):

- firstly, in your plans, keep the motor driver separate from the controller (unless you end up doing everything with one ready-made chip).

Controller:
- a simple one op amp circuit will manage the PI controller. The traditional way is to provide (say) +/- 15V supply and to things bipolar. That way you avoid the hassle of messing with offsets here and offsets there. Doing it this way, the traditional scaling is for the setpoint to be a +/- 10 V signal, positive being the nominal "forward" direction, whatever "forward" means in a particular app. The feedback from the plant is then the opposite, i.e. -/+ 10V with negative voltage in the "forward" direction. That way the voltages cancel each other when everything is in balance.

- the error signal that the controller acts upon is created simpy by summing the setpoint and feedback signals in an inverting amp's inputs; that amp is the actual controller as well. Lets call the signal input resistors Ri. Both should have the same value if you want the controller to behave symmetrically in respect to setpoint and actual values. The difference of the input currents through the input resistors is the error signal to the controller

- The control laws are created by the amp feedback (in this case). In a PI controller you have a cap and resistor in series. Lets call the feedback resistor Rf and the cap Cf. Now the proportional gain is simply Rf/Ri as we know from op amp theory. The integrator time constant is Ri*Cf and the corresponding corner frequency is f = 1/(2 * pi * Ri * Cf). You can easily visualize the time constant when you know that the controller output will slew the amount of the input voltage differential per each time constant. To clarify: say you have a pure integrator to keep it simple. Lets make it a slow one and specify 1 k input resistors and a 100 uF feedback cap. So Ri = 1kohm and Cf = 100 uF. Now the time constant will be 1k * 100u = 100ms. Next lets assume we are in the middle of running the thing and everything is perfectly balanced with the setpoint at +5V and the actual value at -5V, summed at the amp input over the Ri resistors, 1k each. Now both signals will cause an input curent of 500 uA to the virtual ground point at the amp inverting input. But since they are of opposing signs, they cancel out and everyone is happy. Now let's assume the operator turns the setpoint pot to increase the signal to 6V. Immediately the input currents are no longer balanced when the setpoint voltage causes 600 uA current and thus +100uA net current into the virtual ground point. The amp output starts slewing down to compensate, pulling the current into a charge in the feedback cap Cf. We had 1V imbalance in the inputs and with 100ms time constant, the output starts slewing 1V per 100ms, ie 10 volts per second until the actual value increases to again balance the amp, or the signal hits a rail.

- Adding the proportional feedback resistor Rf to the above just creates a step response to signal changes.


In practice you need a number of enhancements, the most important of which are:

- Usually you want the "forward" command signal from the controller to be positive voltage, and decoupled of any load to keep the controller accurate. In that case just add another inverting amp stage with gain of 1.

- It is a good idea to be able to "disable" the controller when you are not actually running the system. That is easiest done with a relay or maybe jfet across the feedback components. That way you short circuit the feedback which keeps the amp happy producing 0 voltage to any input. In any case you need to be careful to avoid windup in the feedback cap so take measures to be able to reset it when appropriate.


Once you have your controller, you can start designing the actual motor driver. Again, for a modestly dynamic system such as a valve control motor, i would use the KISS principle. A comparator to detect direction (for direction relay control) and a simple signal magnitude based pwm control for a fet would appear simplest. Of course if you need to constantly fiddle with the valve position, then a H bridge may be appropriate. Whatever you do, create a clear interface between the controller and the motor driver, with well defined signaling between.
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 13832
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: off the shelf PID control IC ?
« Reply #29 on: March 16, 2013, 10:24:09 am »
thats helpful but I'm not an opamp wizkid so lets see if I am getting this right.

Your suggesting i use a summing amplifier and make setpoint and feedback voltage "directions" opposite so that the system naturally tends to nullify itself and so stop the motor where it is needed. so far so good, what exactly is the capacitor in the feedback loop for?, my understanding of integrators is that they "add over time" the input voltage, or will this do the opposite ? subtract from the top down so that the drive reduces to stop overstoot ?

I will have only a fixed 12V supply so a +/- supply will just mean adding extra circuitry, would i be safe with a virtual ground and +/-6V ?

maybe time to get the breadboard out
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 13832
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: off the shelf PID control IC ?
« Reply #30 on: March 16, 2013, 10:50:02 am »
Attached is what I think you mean, I do have though a thought.

What is i used the summing amp system, that would supply an output voltage that is positive or negative (to the virtual earth) in proportion to the difference in desired position and actual position. so what if that gets fed into a window comparator ? each comparator will represent the direction to motor must move in to correct the "error" and can command the correct side of a "H" bridge. the "window" would be the hysteresis / accepted position error that would allow the motor to stop in before going into buzzer mode.

A variation on this could be that the voltage from the controller is fed to a PWM generator that will drive the bridge "proportionally" to the error to correct and the window comparator would select the correct direction.
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 

Offline ignator

  • Regular Contributor
  • *
  • Posts: 203
  • Country: us
Re: off the shelf PID control IC ?
« Reply #31 on: March 16, 2013, 11:34:10 am »
Attached is what I think you mean, I do have though a thought.

What is i used the summing amp system, that would supply an output voltage that is positive or negative (to the virtual earth) in proportion to the difference in desired position and actual position. so what if that gets fed into a window comparator ? each comparator will represent the direction to motor must move in to correct the "error" and can command the correct side of a "H" bridge. the "window" would be the hysteresis / accepted position error that would allow the motor to stop in before going into buzzer mode.

A variation on this could be that the voltage from the controller is fed to a PWM generator that will drive the bridge "proportionally" to the error to correct and the window comparator would select the correct direction.
I'm late in seeing this post.  Your way over thinking this.  This is what's known as a bang-bang control system, basically it's off or on (closed or on).  You added a middle position requirement.  I've not read in detail all the helpful posts you've received, but what I see missing is a feed back sensor that tells your controller where the flap location is.  This is needed if you want the half open selection.  As this is NOT a PID system, with human input that's not being tracked real time.  Just a "P". How cheep do you need this to be?  The expensive part will be the motor drive and feedback sensor, which can be as simple as a microswitch.  The motor could be a spring return to the closed position.  How big is the flap, i.e. how much torque do you need.  If small enough a very small gear motor, with spring return to closed, a micro switch on the link to the flap, for half open, and the motor stalling at full open, so current limiting (maybe intrinsic to the motor windings).  The controller is a 3 position switch, off, half, (the micro switch will interrupt this, then oscillate on off holding this position, and full, driving the motor to the end of the flap travel and stalling.
How many of these is planned to be produced?  Is this high end, or as cheep as possible?  But from what I see this does not need a closed loop control system.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 13832
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: off the shelf PID control IC ?
« Reply #32 on: March 16, 2013, 11:42:05 am »
As i said somewhere we have the motor drive with built in position pot, and we use water valves using a similar system. I just need to control it. I have no idea how many are required.
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1283
  • Country: fi
Re: off the shelf PID control IC ?
« Reply #33 on: March 16, 2013, 01:46:33 pm »
thats helpful but I'm not an opamp wizkid so lets see if I am getting this right.

Your suggesting i use a summing amplifier and make setpoint and feedback voltage "directions" opposite so that the system naturally tends to nullify itself and so stop the motor where it is needed. so far so good, what exactly is the capacitor in the feedback loop for?, my understanding of integrators is that they "add over time" the input voltage, or will this do the opposite ? subtract from the top down so that the drive reduces to stop overstoot ?

I will have only a fixed 12V supply so a +/- supply will just mean adding extra circuitry, would i be safe with a virtual ground and +/-6V ?

maybe time to get the breadboard out

The feedback cap _is_ the integrator. You know from basic circuit theory, that if you drive a current into a cap, the voltage of the cap rises. That is the definition of capacitance: C = As/V of ampere-seconds per volt. So a whopping 1 farad cap would show a 1V increase in voltage for every second you drive a 1 amp current into it.
Google for inverting amplifier and you will get explanation for the way this works. But the idea is simple: assuming a symmetrical bipolar case where the non-inverting input is grounded , an inverting amp will create a virtual ground on the inverting input. The output will act so as to drive the inverting input to match the non-inverting one. Think of it this way: the inverting input will stay at the same voltage as the non-inverting one. If you present a voltage via a resistor to the inverting input, a current will flow since the other end of the resistor is at "ground" potential (the virtual ground). That current has to go somewhere and it isn't going to go into the amp input, as these are real high impedance. But there is the feedback path from virtual ground to amp output. The current can go there. The amplifier drives the output to sink or source this current as needed, and the resulting output voltage is then subject to the impedance of the feedback path. A simple example: +/- supply, amp positive input is grounded. input resistor is 1 kohm and feedback resistor is 10 kohm. You feed in + 1V via the input resistor. Now a 1 mA current starts flowing into the virtual ground and the amp inputs are no longer in balance. This imbalance drives the output to the negative direction (your positive signal went into the negative input). Now the input current continues from virtual ground to amp output through the 10kohm feedback resistor. To achieve balance again, and recalling Ohm's law U=RI, the output must swing all the way to -1mA*10kohm = -10 volts.

If you replace the resistor with a cap, the difference is that instead of U=RI, you get U=It/C. Now you have the quantity of time as part of the output voltage equation and that is a sign of either integrating or differentiating action. Using the same numbers as before, a 1mA current into the virtual ground, and a 100uF cap from virtual ground to output, the amp output would slew 10 V/s. This is exactly what an integrator does.

I can draw you a simple schematic in a minute, to illustrate better.
Edit: schematic attached.
This is the general idea. Can be implemented by any reasonable quad op amp, such as the ubiquitous LM324 - dirt cheap. No component values indicated, that will be your homework. If you do this, then make sure e.g. trimpot R6 is good quality cermet or similar, that _won't_ break its slide connection after a few years. Or else.


As this is NOT a PID system, with human input that's not being tracked real time.
It is not clear which of the 2 systems you are talking about. The flap control can be just a simple positioning loop with target window control. The valve controller on the other hand is (a PID loop), although there is hardly need for the D term. The fact that there is human input has nothing to do with the nature of the controller, that is entirely a different choice and issue.
Quote

Just a "P".
Again, sorry no. With P term only, you always get a static error. Whether that matters or not, is another thing but a valve, especially a sticky one, presents a relatively big static friction load rendering pure P law control inefficient. If you tune the P term high enough to break the friction in a bad case, you will get an oscillator. Sometimes an integrator is a bit difficult to tune to avoid oscillation, and in that case a measured dose of setpoint feedforward usually does the trick.
But the point is that the process determines what control terms are desirable, not the nature of the entity that controls the setpoint.

As i said somewhere we have the motor drive with built in position pot, and we use water valves using a similar system. I just need to control it. I have no idea how many are required.
My reply was targeted to this alternative.
« Last Edit: March 16, 2013, 02:50:22 pm by Kremmen »
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline ignator

  • Regular Contributor
  • *
  • Posts: 203
  • Country: us
Re: off the shelf PID control IC ?
« Reply #34 on: March 16, 2013, 03:21:14 pm »
As i said somewhere we have the motor drive with built in position pot, and we use water valves using a similar system. I just need to control it. I have no idea how many are required.
Sorry, I did not read through the whole post.  As I was trying to filter the unneeded PID information.  PID is used when you have dynamic feedback situations, like the autopilot for the aircraft.  In this case there's the servo amplifier loop, to make it stable, these come in several varieties, but the position type is what I spent the most time with, but you also can have torque command, as well velocity.  For flight control they have the innerloop, this is to fly the aircraft in a stable way, so it just keeps the aircraft airframe from going unstable.  Then there's the outer loop, which is your external navigation command, which can be many things, both lateral and vertical.  Note autopilots are typically 3 axis.  The yaw axis is mainly for yaw damping (YD), as to reduce drag, you end up with the tail wagging, which makes the passengers "sea sick" without a YD.  The AP has the elevator and aileron axis control. These are typically underdamped, unless your in a fighter jet mode of wanting real "crisp" operation.

OK I recalled a circuit from magazine I used to subscribe too.  Model engineers workshop 100th issue August/September 2004.  A guy wanted a pedal controller for his TIG welder and came up with the following:
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1283
  • Country: fi
Re: off the shelf PID control IC ?
« Reply #35 on: March 16, 2013, 03:38:25 pm »
Yep, that is a bang-bang controller. It could work allright for the valve as well, provided the dead zone window can be tuned to work. Too narrow and overshooting will create an oscillator - too wide and it will not settle close to the setpoint. As long as those constraints don't clash, it can be made to work.
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 13832
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: off the shelf PID control IC ?
« Reply #36 on: March 16, 2013, 03:42:20 pm »
Yes I'm not looking for full blown pid just a feedback loop system to control the position.

I'm still a bit confused about the integration bit. Is it to do with the mecahnical inertia of the motor that needs dealing with or is it some sort of signal conditioning that is characteristic of PID's ?
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 

Offline ignator

  • Regular Contributor
  • *
  • Posts: 203
  • Country: us
Re: off the shelf PID control IC ?
« Reply #37 on: March 16, 2013, 03:43:20 pm »
It looks like D2 is intended for the crossover hysteresis.
 

Offline ignator

  • Regular Contributor
  • *
  • Posts: 203
  • Country: us
Re: off the shelf PID control IC ?
« Reply #38 on: March 16, 2013, 03:44:07 pm »
Yes I'm not looking for full blown pid just a feedback loop system to control the position.

I'm still a bit confused about the integration bit. Is it to do with the mecahnical inertia of the motor that needs dealing with or is it some sort of signal conditioning that is characteristic of PID's ?
Integration is used to get the long term error to zero.  It integrates any error at the summing junction, which then becomes a correction command.
The derivative part is used to overcome (correct for) inertia, depending on if it's motor loop, or the inner loop of the thing your trying to control.
« Last Edit: March 16, 2013, 03:47:32 pm by ignator »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 13832
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: off the shelf PID control IC ?
« Reply #39 on: March 16, 2013, 03:46:53 pm »
Yep, that is a bang-bang controller. It could work allright for the valve as well, provided the dead zone window can be tuned to work. Too narrow and overshooting will create an oscillator - too wide and it will not settle close to the setpoint. As long as those constraints don't clash, it can be made to work.

that is what I've been trying to do, it seems I don't know what a pid is. My software solution when i made an attempt with a pic was to check the difference and when it became under a certain point I started using pulses to drive and was rechecking after each pulse. I thunk the valve i had was a bit crap and you could see (and here) the mechanism going up and down hunting for the right point (but not buzzing). The other problem is mechanical hysteresis, there is play in the mechanism that can foul the software if your not careful
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 

Offline ignator

  • Regular Contributor
  • *
  • Posts: 203
  • Country: us
Re: off the shelf PID control IC ?
« Reply #40 on: March 16, 2013, 03:49:17 pm »
Getting hysteresis in the bang-bang controller will be key.  You just need to have a dead band window where you do nothing to move the motor.
With your software you have an iteration rate, how short of a time pulse can you put on the motor?  You  need to address this so the motor does not move beyond the dead band window with the shortest pulse you  can make.
« Last Edit: March 16, 2013, 03:52:16 pm by ignator »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 13832
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: off the shelf PID control IC ?
« Reply #41 on: March 16, 2013, 03:51:35 pm »
Yes I'm not looking for full blown pid just a feedback loop system to control the position.

I'm still a bit confused about the integration bit. Is it to do with the mecahnical inertia of the motor that needs dealing with or is it some sort of signal conditioning that is characteristic of PID's ?
Integration is used to get the long term error to zero.

Well I don't mind some error, it does not need to be 0 so am I swapping integration for hysteresis window ? I'm happy with having 10-20 positions, at the end of the day the water valve control will be used in a lager pid/tracker system that wants to track temperature so as other system factors change the valve regulating hot wter into the heater so not nailing the position is not an issue if say the position is changed every minute or so so effectively swapping between pos1 and pos2 out of 10 will be giving an average of pos1.5, this is fine because the "frequency" of the system will be very very slow as the temperature will be allowed to vary over a few degrees in a period of minutes.
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 13832
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: off the shelf PID control IC ?
« Reply #42 on: March 16, 2013, 03:54:16 pm »
Getting hysteresis in the bang-bang controller will be key.  You just need to have a dead band window where you do nothing to move the motor.

yup, trick is going to be keeping it small, that is why if i end up needing a larger window I'd have to reprocess the voltage from the controller and use it to drive a PWM drive so that the motor slows down as it enters the dead zone and does not overshoot. I did this before with software and one pulse duty under a certain error
https://www.simonselectronics.co.uk/shop
Varied stock of test instruments and components including EEVblog gear and Wurth Elektronik Books.
Also, if you want to get ripped off: https://www.ebay.co.uk/usr/simons_electronics?_trksid=p2047675.l2559
 

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2094
Re: off the shelf PID control IC ?
« Reply #43 on: March 16, 2013, 05:53:50 pm »

Go play with it, you will learn the most.

You will find out that a P controller will never reach the setpoint because then the difference is 0 and your motor will stop.
To reach te set point you will need an Intergator.

In this application velocity is controlled and position is fed back so the system is inherently an integrator.
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1283
  • Country: fi
Re: off the shelf PID control IC ?
« Reply #44 on: March 16, 2013, 06:01:04 pm »

Go play with it, you will learn the most.

You will find out that a P controller will never reach the setpoint because then the difference is 0 and your motor will stop.
To reach te set point you will need an Intergator.

In this application velocity is controlled and position is fed back so the system is inherently an integrator.
Nope. The setpoint and actual values are positions, so that is what is controlled. The command signal is for velocity, but that is _not_ controlled. One just hopes the plant responds as requested. And there is no guarantee that it actually does.
The controller output commands a velocity and below some limit it most likely happens that the command signal is too low to actually move the motor. The I term takes care of that, and you need it in the position loop.

To fully implement a positioning control, you need 3 nested, actually controlled loops; position, velocity, torque. You can do with less but then you won't achieve the best possible dynamics. Of course that is not always needed or wanted, as in this case.

Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline mintsanesta

  • Newbie
  • Posts: 1
Re: off the shelf PID control IC ?
« Reply #45 on: May 30, 2013, 08:27:20 am »
Hi kremmen and others .
I have a concern a pic that I could use to build my PID,  16f877 ,16f84A, 18f2520 or 18LF4550. Where could I get some diagram? Can I use flowcode because I don't know C programming. Thanks to all
 

Online Rerouter

  • Super Contributor
  • ***
  • Posts: 4362
  • Country: au
  • Question Everything... Except This Statement
Re: off the shelf PID control IC ?
« Reply #46 on: May 30, 2013, 08:36:31 am »
that would rely on anyone here who knows C understanding how to use flowcode, which i'm going to guess as rare,
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1283
  • Country: fi
Re: off the shelf PID control IC ?
« Reply #47 on: May 30, 2013, 06:41:58 pm »
Hi kremmen and others .
I have a concern a pic that I could use to build my PID,  16f877 ,16f84A, 18f2520 or 18LF4550. Where could I get some diagram? Can I use flowcode because I don't know C programming. Thanks to all
Unfortunately i am unfamiliar with both flowcode and PICs.
By diagram i assume you mean for the PID controller? If so, then Wikipedia to the rescue: http://en.wikipedia.org/wiki/PID_controller

I don't want to discourage, but in my opinion your best and only bet is to learn C if you want to experiment with digital signal processing implementations of any kind. It is all done in C these days or if not, it is the rare exception. With C you will have all the help in the Internet-world and with anything else you will find yourself pretty much alone.

Implementing the basic PID algorithm is "easy" (in C!) but properly applying it may not necessarily be so. I have no idea of your skill level in this topic but from the question i assume it is novice. In that case i recommend at least some study of elementary control systems in general because otherwise you will not get anywhere, or only with blind luck. Even simple feedback systems can exhibit dynamics that will confuse the uninitiated, as we have seen from certain recent discussions on this site too. Mastering those has nothing to do with programming and everything to do with understanding systems consisting of plants and controllers; the dynamics of their transfer functions and stability of the feedback loops.
So, the proper order of things would be for you to first model the system to obtain the overall control strategy and its initial parameters, and only then start worrying about the actual implementation.
Nothing sings like a kilovolt.
Dr W. Bishop
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf