Author Topic: Yet Another Garage Door Opener Project (work in progress)  (Read 9940 times)

dougal

  • Sr. Member
  • ****
  • Posts: 289
Yet Another Garage Door Opener Project (work in progress)
« on: August 29, 2016, 08:05:10 am »
I recently broke out one of my Oaks to start working on a garage door opener. It's still a work-in-progress, but I could theoretically hook it up as it is right now.

I already had several expansion boards for the original Digispark, including a relay board which I had never gotten around to assembling. So I soldered some female headers to one of my Oaks, and put the relay expansion together. I did have one annoying moment when I realized that a couple of header pins on the relay board had pulled partway out when I put them into a breadboard to steady things for soldering, but I was able to heat them back up and get them pushed back into place.

I also wanted to measure the temperature in my garage, so I've also hooked up a DHT22. Right now, our garage door is uninsulated, so I'd like to get a record of temperatures now, and then be able to measure again later after I have a chance to add insulation, to see how much (if any?) of a difference it makes.

I'd also like to add  some sort of sensor to determine whether the door is open or closed. I'll probably use an ultrasonic sensor like the SR04, mainly because I have a couple of those on-hand.

The software side is where I still have the most major decisions to make. Currently, I am using Particle.variable() to expose the humidity and temperature data, Particle.function() to provide controls to toggle the relay, and OakTerm and the particle-cli for the actual interface, for testing.

However, I have a Raspberry Pi running homebridge for my other home control pieces (some Wifi RGB light bulbs and Wemo switches). I'll probably set up  an MQTT server on the Pi, and a connector for that in homebridge. Then I'll have various options to use -- I'll be able to use HomeKit apps on my iPhone, or set up a web interface to talk to the mqtt bridge.

Right now, I'm still using a breadboard for some external components. I've considered wiring up a protoboard, but the breadboard is pretty darned convenient right now. Especially since I discovered that when you power the YuRobot power supply board via the barrel connector, it will provide power out via the USB port, which simplified things greatly.




emardee

  • Full Member
  • ***
  • Posts: 135
Re: Yet Another Garage Door Opener Project (work in progress)
« Reply #1 on: August 29, 2016, 10:33:16 pm »
Sounds great.

Do you have a log of "external temperature" too?

The internal temperature possibly isn't as useful a measure without the external temperature being logged too for comparison.

You probably already know this, but the insulation doesn't make it warmer per se... it just slows the rate at which heat is transferred through the wall... it will still tend towards matching the outside temp, will just take longer to match it.  (Note it also slows that transfer both ways too, so will make the garage slower to warm up from the sun in the mornings too, but will hopefully it'll be starting at a higher temp than it would have done!).

Therefore being able to track the outside and inside temps should let you see how fast the heat is being lost now, and be then able to see how much slower it is being lost with the insulation fitted. That would be harder without knowing the outside temp for comparison, as the weather is different every day.

Apologies if you already know all this!!! :)

Look forward to hearing more about your project as you develop it further!

dougal

  • Sr. Member
  • ****
  • Posts: 289
Re: Yet Another Garage Door Opener Project (work in progress)
« Reply #2 on: August 30, 2016, 06:04:48 pm »
I don't have external temperature logging yet, but it's in the plans, along with temperature logging for various locations *inside* my house.

In fact, for a future project, I plan to replace my central air programmable thermostat, and use distributed temperature sensors in the house (perhaps along with "presence" detection) for smarter cooling and heating (much like Nest).

exeng

  • Sr. Member
  • ****
  • Posts: 454
Re: Yet Another Garage Door Opener Project (work in progress)
« Reply #3 on: August 30, 2016, 09:29:28 pm »
dougal,

For logging I'm a fan of Thinkspeak. Also you may want consider a second Oak with an TFT LCD to grab any data / states you log for display. I have one that grabs my weather data, pool temp and garage door open/close status. Finally, (WITH THIS GREAST BIG WARNING) you may want to add a light sensor for day / night sensing. Why? To provide for an auto close feature. Longer timeout at daylight and shorter when dusk or dark. Here is the warning. Unless you have some sort of sense for obstructions, you can cause damage to anything that may be on or across the threshold when auto close is activated without you being around. Nice for those that forget to close the door at night.

ScottM

  • Newbie
  • *
  • Posts: 41
Re: Yet Another Garage Door Opener Project (work in progress)
« Reply #4 on: September 13, 2016, 04:30:24 pm »
I too am trying to use an OAK to monitor my two garage doors. I installed home alarm style magnetic switches so that I can tell if a door is open or closed. Ideally what I want to do next is use an app on my Android phone to monitor the doors. Better yet, I want to have a text message sent if the doors open.

So far, I haven't figured out how to use variables properly. Here is my Arduino code. I can see the "Monitoring" messages in the log screen, but I tried to add the variables to a dashboard and they don't show up. I need a guide to help me figure this out.


int i = 0;
int Door1Switch = 3;
int Door2Switch = 4;
int Door1Status = 5;
int Door2Status = 5;

void setup() {
  pinMode(1, OUTPUT);                   //LED on Oak
  pinMode(Door1Switch, INPUT_PULLUP);   //Switch on door 1
  pinMode(Door2Switch, INPUT_PULLUP);   //Switch on door 2

  Particle.variable("Door1", Door1Status);
  Particle.variable("Door2", Door2Status);
  Particle.connect();
}

void loop() {
  //flash LED three times
  for (int thisPin = 1; thisPin < 4; thisPin++) {
    digitalWrite(1, HIGH);
    delay(500);
    digitalWrite(1, LOW);
    delay(150);

    // get status of door switches
    Door1Status = digitalRead(Door1Switch);
    Door2Status = digitalRead(Door2Switch);

    // publish test information for Particle Cloud log screen
    Particle.publish("Door 1 Status", "Monitoring", PRIVATE);
    Particle.publish("Door 2 Status", "Monitoring", PRIVATE);

  }
  i++;
  delay(10000);

}