Electronic control of Semi flooded state

Distillation methods and improvements.

Moderator: Site Moderator

zukram
Novice
Posts: 28
Joined: Tue Mar 19, 2024 5:51 am

Re: Electronic control of Semi flooded state

Post by zukram »

image.jpg
Yummyrum wrote: Tue Jul 16, 2024 1:25 pm Great project and thanks for sharing zukram.
It is always nice to see projects get off breadboard's and end up in boxes.
Yes please share code .
Also a quick schematic would be nice too .

I’ve been working on a Burstfire controller rather than the time proportional you have used , so I am curious about your zero crossing detector circuit . Looks like you have used an optocoupler ? Which type ?

viewtopic.php?p=7787168#p7787168

I do find your project interesting as I suffer from quite severe power fluctuations through the day and regulating power is my aim . You are doing it by measuring Column pressure whereas I was looking at measuring the mains voltage and adjusting power to compensate .
Your method achieves the same effective out come .
Actually pot pressure. My method achieves a couple of more things. It would definately solve your problem, but also I had some issues that if the system was not in 100% balance, the valve shutting off and increasing reflux to 100% did'nt really make the temperature in the column drop. With just a little too much power the temp actually increased a little. When regulating to a constant pot pressure, the gas flow in the column is also constant, which makes it much more stable and the system responds better to reflux control.

It's a 2501 optocoupler.
Actually the zero crossing is'nt really necessary, since I use SSR's with ZC included. But I did'nt know that at the time. I could just have timed it and it would work fine.

Actually I don't have the complete schematic, if or when I make a proper PCB I'll post it. But it's not complicated. I2C for the keyboard and the display. Dedicated pins for the pressure sensor, and of course the two thermistors (will change to pt1000 one day). Outputs for the SSR and a 2 relay-module for the motor controlled valve. That's pretty much it.
Oh. and I've added transistor drivers for the VCC to the I2C bus and the pressure sensor to be able to do a "hard reset" if they loose sync - and they do. But I got the code for the pressure sensor more robust, and it has'nt happened since. The I2C-bus on the other hand loose sync when the valve shuts and opens now and then. Not every time, but I'll fix that soon, just waiting for capacitors. It's a limit breaker that sends some nasty interference when opening.

There are probably better valves, but this one was dirt cheap and I have a spare. (somewhere)
User avatar
Yummyrum
Global moderator
Posts: 8602
Joined: Sat Jul 06, 2013 2:23 am
Location: Fraser Coast QLD Aussie

Re: Electronic control of Semi flooded state

Post by Yummyrum »

tjsc5f wrote: Tue Jul 16, 2024 6:08 pm
Yummyrum wrote: Tue Jul 16, 2024 1:25 pm I suffer from quite severe power fluctuations through the day and regulating power is my aim . You are doing it by measuring Column pressure whereas
I think something like this would suit you well https://www.finglai.com/products/relays ... 0YB-F.html

I've been using the open loop one successfully for several years now with no issues (my mains voltages are pretty stable), but would certainly give the closed loop one a shot.
Thanks tjsc5f
I have seen those before …. may have even been you that mentioned them a few years ago here .
I just forgot :oops:

I guess they would have a place in this topic as a power controller also .
User avatar
Yummyrum
Global moderator
Posts: 8602
Joined: Sat Jul 06, 2013 2:23 am
Location: Fraser Coast QLD Aussie

Re: Electronic control of Semi flooded state

Post by Yummyrum »

Thanks for the schematic zukram .

I’ve not had the pleasure ( pain) of using 12C on Arduino yet but your bus kill will sit at the back of my mind .

Always keen to see others code .
You can post it here using this button .
Thanks Kennstimet for showing me that :thumbup:
IMG_0711.jpeg
zukram
Novice
Posts: 28
Joined: Tue Mar 19, 2024 5:51 am

Re: Electronic control of Semi flooded state

Post by zukram »

I need to make a separate GIT-project on gitlab for this one and make it public readable, that would probably ease things :-)
i2c is pretty straight forward. But if it locks up, it's a pain. Arduino has recently included a timeout, so at least now you know when it's locked.
The mistake I made was selecting "hardware reset on timeout" to true. It should be false. It seems the arduino i2c does not need resetting, and when you do, sometimes it does'nt work. I sacrificed a digital pin and a transistor driver to be able to shut off VCC to the entire bus, so when I get a timeout i just do a norwegian reboot and reset everything. It works, but the display blinks.
bluc
Swill Maker
Posts: 444
Joined: Thu Nov 12, 2015 12:32 am

Re: Electronic control of Semi flooded state

Post by bluc »

Thinking this would be very useful in a continuous stripper yummy, as semi flooded state is where they seem to like sitting...
User avatar
Yummyrum
Global moderator
Posts: 8602
Joined: Sat Jul 06, 2013 2:23 am
Location: Fraser Coast QLD Aussie

Re: Electronic control of Semi flooded state

Post by Yummyrum »

bluc wrote: Thu Jul 18, 2024 4:43 am Thinking this would be very useful in a continuous stripper yummy, as semi flooded state is where they seem to like sitting...
Agree with you bluc .Fluctuations in mains voltage and consequently boiler output was one of the main reasons I abandoned mine . At my new house , it’s even worse .
Nit wanting to take this topic too far off , but thinking about the Continuous , you have a constant boiler power and adjust feed rate , but with this , I guess you could have a fixed feed rate and govern boiler power .
zukram
Novice
Posts: 28
Joined: Tue Mar 19, 2024 5:51 am

Re: Electronic control of Semi flooded state

Post by zukram »

With this I think you won't need even need a constant feed rate, the system will stabilize itself regardless.
zukram
Novice
Posts: 28
Joined: Tue Mar 19, 2024 5:51 am

Re: Electronic control of Semi flooded state

Post by zukram »

Code: Select all

void reset_i2c() {
  Wire.end();
  digitalWrite(I2C_POWER_PIN, HIGH);
  delay(500);
  digitalWrite(I2C_POWER_PIN, LOW);
  delay(300);
  TWCR = 0;
  Wire.begin();  //YYY
  lcd.init();
  lcd.backlight();
  lcd.clear();
  PCF.begin(); // for the raster keypad
}
void check_i2c() {
  static long lasttime = millis();

  if (Wire.getWireTimeoutFlag()) {
    if ((millis() - lasttime) < 10000) {
      return;
    }
    lasttime = millis();

    Serial.println(F("i2c timeout"));
    Wire.clearWireTimeoutFlag();
    reset_i2c();
  }
}
The delays are probably unnecessarily long, but I don't mind the blink, and better safe than sorry.
This reset fixes 95% of the i2c lockups, but i've had to reset the entire system on the switch one or 2 times, it stabilizes pretty quickly, so it's not a big problem. I've ordered components to fix the interference problem in the valve, I hope it will work so there won't be any resets at all.

A design recommendation is to not put any critical hardware on the i2c-bus though. At least not in a system like mine that's grossly overpowered to cut boil-up time. I would'nt want the ssr's on i2c.
zukram
Novice
Posts: 28
Joined: Tue Mar 19, 2024 5:51 am

Re: Electronic control of Semi flooded state

Post by zukram »

The valve interference problem is solved. So, now I'll run another batch to test.
Also I ordered those aquarium rings. It'll be interesting to see how it runs. From what I read partial flooding/semi aquatic is best for them too.
User avatar
shadylane
Master of Distillation
Posts: 11246
Joined: Sat Oct 27, 2007 11:54 pm
Location: Hiding In the Boiler room of the Insane asylum

Re: Electronic control of Semi flooded state

Post by shadylane »

Semi flooded state.
That's when there's a layer of reflux sizzling on top the packing.
Shine a LED on the reflux bed and use sensor to see a change in the reflection.
Back up the measurement with boiler pressure and temp probes.

Computers love more inputs :lol:
User avatar
LWTCS
Site Mod
Posts: 12965
Joined: Mon Jan 26, 2009 6:04 pm
Location: Treasure Coast

Re: Electronic control of Semi flooded state

Post by LWTCS »

zukram wrote: Mon Aug 05, 2024 3:04 am With this I think you won't need even need a constant feed rate, the system will stabilize itself regardless.
All running through a PLC ?
Trample the injured and hurdle the dead.
tjsc5f
Swill Maker
Posts: 275
Joined: Sun Nov 28, 2021 9:18 pm
Location: MO, USA

Re: Electronic control of Semi flooded state

Post by tjsc5f »

LWTCS wrote: Thu Sep 12, 2024 3:04 am All running through a PLC ?
From his pics, it looks like an Arduino/micro controller.
zukram
Novice
Posts: 28
Joined: Tue Mar 19, 2024 5:51 am

Re: Electronic control of Semi flooded state

Post by zukram »

Yes. Arduino.
Post Reply