Automated Dust Collection

I have to hit the scroll box to stop scrolling, then hit 'crtl a' to select then 'ctrl c' to copy


Miter Saw: 0.07 Amps RMS
Table Saw: 4.02 Amps RMS
Miter Saw: 0.07 Amps RMS
Band Saw: 4.24 Amps RMS
Miter Saw: 0.07 Amps RMS
openGate 0
openGate 1
closeGate 2
openGate 3
closeGate 4
closeGate 5
turnOnDustCollection

Miter Saw: 0.07 Amps RMS
Table Saw: 3.83 Amps RMS
Miter Saw: 0.07 Amps RMS
Band Saw: 4.05 Amps RMS
Miter Saw: 0.07 Amps RMS

Miter Saw: 5.43 Amps RMS
Table Saw: 4.19 Amps RMS
Miter Saw: 5.40 Amps RMS
Band Saw: 4.62 Amps RMS
Miter Saw: 5.36 Amps RMS

Miter Saw: 5.36 Amps RMS
Table Saw: 4.37 Amps RMS
Miter Saw: 5.36 Amps RMS
Band Saw: 4.11 Amps RMS
Miter Saw: 5.36 Amps RMS

Miter Saw: 5.36 Amps RMS
Table Saw: 4.38 Amps RMS
Miter Saw: 5.36 Amps RMS
Band Saw: 4.15 Amps RMS

it isnt sending a signal to the relay to turn the dust collector on.

Is this still the issue?

I wired up a test circuit on my Uno and ran the code from post #6. I used a LED on pin 11 to watch the dust collector relay output. When one of the analog inputs goes high the LED does turn on and then LED turns off, after a delay, when the input is brought low. So, the code seems to be working. If the relay is not turning on it is looking like a hardware problem.

Ok. Stupid question. Does the led go on pin 11 and ground

I connected a led to pin 11 and ground. The led came on as soon as I connected it

Are all of the analog inputs that you are using at near 0V? If any are floating (or high) that could turn on the LED.

@gladewater2016, any chance of posting pictures of your setup?

I added a picture of my setup.

Why no power for the Arduino? They don't tend to work well without.

woops. Power now

sorry. uploaded wrong pic

The analog inputs A2 and A3 are floating so may be reading high enough to be mistaken for a tool on condition, Ground the unused analog inputs and try your code.

I grounded A2 and A3. Now I am getting a signal to 11 before I turn the tool on. When I turn the tool on, the relay stays on

a2 and a3 grounded

gladewater2016:
I grounded A2 and A3. Now I am getting a signal to 11 before I turn the tool on. When I turn the tool on, the relay stays on

That's as it should be, isn't it?

Can you show a sample of the serial monitor output as you power a tool on and off?

It is switching the relay now. It is just working backwards from what I expected. But that is fine.. Now the next problem is the servo. When the tool is turned on, I am not getting a signal to open the servo. I added a 5vt power supply to the adafruit servo board

gladewater2016:
It is switching the relay now. It is just working backwards from what I expected. But that is fine..

That may be simply your relay working in reverse. Some are active high, others active low, and then there's the NO side and the NC side.
Anyway it's a matter of changing those states in your code and you should be good to go.

For the servo part, do you have the servo working with basic servo example scripts, like sweep? Always good to use those to test your components. If that doesn't work it's wiring; if it does work it's in your code.

After making those changes please do post the latest version of your code (properly formatted, in a new message).

I have a small simple servo and a more expensive digital servo.The small servo is working with the sweep code when connected to pin 9, but the digital servo isnt working. Also neither one will work when connected to the servo pins on the adafruit board.

You might want to run an I2C scanner to confirm the device address (SB 0x40) and that the device is communicating on the I2C bus.

// I2C scanner by Nick Gammon.  Thanks Nick.

#include <Wire.h>

void setup() {
  Serial.begin (115200); //*****  make sure serial monitor baud matches *****

  // Leonardo: wait for serial port to connect
  while (!Serial) 
    {
    }

  Serial.println ();
  Serial.println ("I2C scanner. Scanning ...");
  byte count = 0;
  
  Wire.begin();
  for (byte i = 1; i < 120; i++)
  {
    Wire.beginTransmission (i);
    if (Wire.endTransmission () == 0)
      {
      Serial.print ("Found address: ");
      Serial.print (i, DEC);
      Serial.print (" (0x");
      Serial.print (i, HEX);
      Serial.println (")");
      count++;
      delay (1);  // maybe unneeded?
      } // end of good response
  } // end of for loop
  Serial.println ("Done.");
  Serial.print ("Found ");
  Serial.print (count, DEC);
  Serial.println (" device(s).");
}  // end of setup

void loop() {}