Author Topic: Controller for Workshop Dust Collector  (Read 5820 times)

TomWS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1682
    • View Profile
Controller for Workshop Dust Collector
« on: February 13, 2015, 06:44:27 PM »
Now that I have my Gateway (almost) done, I can start deploying some of the Motes I've been working on.

The first one up is a controller for my Workshop Dust Collection System.  The Dust Collector is a 2HP Cyclone and is plumbed to all my major dust producers via ducting that is routed under the floor (in the crawlspace).   There are 6 individual branches that are isolated from each other by blast gates.  These blast gates are only opened when a piece of equipment on the branch is being used.

The blast gates are controlled by double acting air cylinders, powered by pneumatic valves, which, in turn, are controlled by the DC Controller.

The controller is told to turn on a particular branch and needs to cycle the air to the pneumatic manifold, turn on the respective valve to open the gate, wait until the gate is opened, and then turn on the DC.  Uh, you don't want to turn on the DC BEFORE the gate it opened! DAMHIKT!

I plan to deploy DC Remotes which will monitor the current drawn at each piece of equipment and send an ON or OFF command to the Controller.  There are at least 10 of these devices needed in the shop.

However, until the DC Remotes are deployed, since the Controller is NOW linked into my home server via the gateway, it was trivial to set up a web page to provide a 'key pad' type of app for my phone.

Here are a couple of pics of the controller, the app will be shown in the next post because Felix's forum will get mad at me if I try to include it here...

Tom
« Last Edit: February 18, 2015, 08:03:20 AM by TomWS »

TomWS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1682
    • View Profile
Re: Controller for Workshop Dust Collector
« Reply #1 on: February 13, 2015, 06:45:31 PM »
And, as promised, here is the phone 'app'...

Tom
« Last Edit: February 18, 2015, 08:04:13 AM by TomWS »

TomWS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1682
    • View Profile
Re: Controller for Workshop Dust Collector
« Reply #2 on: February 15, 2015, 11:51:02 AM »
I've attached the Eagle files for the controller, but not the code, primarily as the code is built on the wrapper library I've built around the RFM69 and SPIFlash libraries and is intimately tied into the gateway/Home Server implementation, neither of which are ready for prime time.   I'll post the code when the whole infrastructure is in place, however, the Controller is simple enough that practically anyone can use it with their own code.

I've also attached a couple more photos with the full DC and close up of a blast gate shown...

Enjoy...

Uh, I should mention, in the Eagle files, you'll find that the terminal blocks are encroaching on other components.  I had the wrong dimensions on the component package...  :-[  In any case, it does squeeze together and the eagle files have been updated with the correct component dimensions (although I have not adjusted the component positions).

Tom
UPDATE: Increased photo resolution and added PDF of schematic.
« Last Edit: February 18, 2015, 08:06:23 AM by TomWS »

TomWS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1682
    • View Profile
Re: Controller for Workshop Dust Collector
« Reply #3 on: February 15, 2015, 07:40:31 PM »
Here's some code:
(javascript snippet from the 'key pad' webpage)

Code: [Select]
function dccClick(content, timeId)
{
  var timeFactor=0;
  if (timeId != '0')
  {
    timeFactor = document.getElementById(timeId).value;
    timeFactor = timeFactor * 60;  // convert minutes to seconds
  }

  var gwurl="192.168.2.70:2000"
  var parm="pkt=0B24080C072440"+content+numToHex(timeFactor%256)+numToHex(Math.floor(timeFactor/256));

  sendToGW(gwurl,parm);  // using ajax HTTP POST request
}

The data being sent to the Controller (via the Gateway @ 192.168.2.70:2000 ) is encapsulated in the packet, contained in 'parm'. 
Packet looks like:
'0B24080C07244002010A00'
Annotated, it looks like this:

'0B24' = packetlen=11, packet type is 'TM_COMMAND',
'080C' = Cmd = 'TM_SEND_TO', DeviceID=12

so the following packet gets sent to 12 (DC_Controller) by the Gateway:
'0724' = packetlen=7, packet type is 'TM_COMMAND'
'4002010A00' = Cmd=DC_Controller_Command, zone=2, state=1 (ON), runTime=10 minutes...

'TM_SEND_TO' is a wonderful thing...

By the way, the hardcoded url is a temporary thing, eventually the code will look up the url from the server's MySQL database...

Tom
« Last Edit: February 15, 2015, 10:25:07 PM by Felix »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5130
  • Country: us
    • View Profile
    • LowPowerLab
Re: Controller for Workshop Dust Collector
« Reply #4 on: February 15, 2015, 10:24:10 PM »
Thanks Tom, I'll sticky this and let people ask for details.

eugeniuszluzar

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Controller for Workshop Dust Collector
« Reply #5 on: July 13, 2015, 08:58:50 AM »
Now that I have my Gateway (almost) done, I can start deploying some of the Motes I've been working on.

The first one up is a controller for my Workshop Dust Collection System.  The Dust Collector is a 2HP Cyclone and is plumbed to all my major dust producers via ducting that is routed under the floor (in the crawlspace).   There are 6 individual branches that are isolated from each other by blast gates.  These blast gates are only opened when a piece of equipment on the branch is being used.

The blast gates are controlled by double acting air cylinders, powered by pneumatic valves, which, in turn, are controlled by the DC Controller.

The controller is told to turn on a particular branch and needs to cycle the air to the pneumatic manifold, turn on the respective valve to open the gate, wait until the gate is opened, and then turn on the DC.  Uh, you don't want to turn on the DC BEFORE the gate it opened! DAMHIKT!

I plan to deploy DC Remotes which will monitor the current drawn at each piece of equipment and send an ON or OFF command to the Controller.  There are at least 10 of these devices needed in the shop.

However, until the DC Remotes are deployed, since the Controller is NOW linked into my home server via the gateway, it was trivial to set up a web page to provide a 'key pad' type of app for my phone.

Here are a couple of pics of the controller, the app will be shown in the next post because Felix's forum will get mad at me if I try to include it here...

Tom

thanks to Tom for sharing this information with us