Author Topic: PID Arduino Control by ElectroMech  (Read 9997 times)

0 Members and 1 Guest are viewing this topic.

Offline ElectroMech

  • Posts: 7
Re: PID Arduino Control by ElectroMech
« Reply #20 on: December 18, 2018, 01:30:27 AM »
Okay i will wait for the response thanks

Offline ShiFu

  • eParrot.org
  • Admin
  • Posts: 1984
Re: PID Arduino Control by ElectroMech
« Reply #21 on: December 18, 2018, 06:28:51 AM »
I'm sorry EM, that is not PID. It is an ON/OFF valve that is restricted to a step angle.
This potentiometer idea is not something that I am interested in at all.

Look at it this way, using the potentiometer.
You set the potentiometer for, say, 20. That becomes the ONLY step the valve can make. Zero (water off) or 20 (water on).
What if the needed value is 4 or 84?  No, you get either 20 or 0. Or you fiddle with the potentiometer.

What if the valve needs to open to 32 and slowly close as the temperature stabilizes. Then settle at 16, with the occasional kick to 17, when completely stabilized.
Sorry, can't do that. My valve can ONLY open to one of two positions - the potentiometer setting or zero.
A true PID controller will have access to and control of All of the steps, not limited to just one or two or twelve.
On a valve that has 180 possible degrees of "openess" we restrict ourselves to one possible On/Off setting?

Of course not, you may say, we have a potentiometer knob that we get to constantly adjust, Manually.

The whole idea is wrong and is not acceptable. Please forget the potentiometer idea.

I truly am asking for PID that functions over the entire range that is available, not limited to one On/Off setting.
There will NOT be a potentiometer in my PID control hardware.

When you first brought up the pot idea, I thought you meant an imaginary potentiometer.
Mapping the 180 servo to Analog 4 or something. Maybe some PWM trick. But now this? A real potentiometer?
One On/Off setting? 

And you don't see the problem with that?
Stay calm and follow the screaming people.

Offline Hooch

  • Posts: 97
Re: PID Arduino Control by ElectroMech
« Reply #22 on: December 18, 2018, 08:27:02 PM »
Shifu

Have you manually (via computer) used and adjusted the valve during an actual run? 

PID algorithms are easy to implement but are touchy beasts, tuning them takes effort and time and a knowledge of the process.

All of us who run stills which achieve total reflux will agree that the valve position to achieve it really doesn't change much between runs.

If your case, if the position is 79 and the native DS value is 1255 is your setpoint when you consider it stable then if the value goes up you increment the servo position, the value goes down decrement the servo position.  You do need to have a settling time 7 - 10 seconds after you make a change before you decide to make another valve adjustment, which is easily counted by the number of DS reads that have been done.

This implements the steady state algorithm portion of a PID.

For the LM guys, they can use the temp difference between  the very top of the column above the reflux coil, and the column below the takeoff point as the value for monitoring and controlling reflux flow. 

Just about finished coding the 3 stepper AT command set code.   Hopefully I can get it done before the Mrs turns me into a Xmas elf slaving over the Cricut.

Offline ShiFu

  • eParrot.org
  • Admin
  • Posts: 1984
Re: PID Arduino Control by ElectroMech
« Reply #23 on: December 19, 2018, 05:54:02 AM »
...  Shifu

Have you manually (via computer) used and adjusted the valve during an actual run? 
...

Not exactly sure what you mean.
You may be a bit new here, I'll put a link to the middle of this thread in case you missed it.

Stay calm and follow the screaming people.

Offline ShiFu

  • eParrot.org
  • Admin
  • Posts: 1984
Re: PID Arduino Control by ElectroMech
« Reply #24 on: December 20, 2018, 10:07:10 AM »
ElectroMech has really stepped up his game today. 
While it is still not perfect, it is nearing the point of becoming very useful. 

And almost to the point where testing it on the still will happen.

Stay calm and follow the screaming people.

Offline Hooch

  • Posts: 97
Re: PID Arduino Control by ElectroMech
« Reply #25 on: December 20, 2018, 06:55:29 PM »
*Facepalm*

Shifu, you are absolutely right. I forgot this forum isn't StackExchange, full of budding programmers, but a forum of home distillers wanting to implement computing into their stills for a variety of reasons.

That code chunk I posted will work for you to twiddle with your servos.  You do need to change it from a stepper to a servo, which only impacts four lines of code per motor. the definition, the movement, and motor on/off which is not needed for servos. 

Being the time of year it is, my free time is about zero but soon I will have some real time to work on my project hopefully to the benefit of all here.

I look forward to seeing how it runs!

H