Author Topic: PROJECT - Gate & garage controlled by Car Lights [PHOTOS]  (Read 18867 times)

luisr320

  • Full Member
  • ***
  • Posts: 227
  • Country: pt
Re: PROJECT - Gate controled by Car Lights [PHOTOS][FINISHED]
« Reply #15 on: March 08, 2015, 10:58:59 PM »
Here you go. :)

« Last Edit: April 10, 2015, 09:11:10 AM by Felix »

TomWS

  • Hero Member
  • *****
  • Posts: 1888
Re: PROJECT - Gate controled by Car Lights [PHOTOS][FINISHED]
« Reply #16 on: March 09, 2015, 12:43:52 AM »
Great! Thanks for the info!

Tom

luisr320

  • Full Member
  • ***
  • Posts: 227
  • Country: pt
Re: PROJECT - Gate controled by Car Lights [PHOTOS][FINISHED]
« Reply #17 on: March 12, 2015, 08:44:37 PM »
I got the 3V relays from finder today so I managed to finish the assembly.
With the 7805 attached to the copper by a bolt, there is almost no heat generated by the 12v / 5v conversion.

I decided to remove the temperature sensor. It seems to be a solution to a non existing problem. "If it ain't broken, don't fix it".

I had to downsize the 10k resistors of the 2N2222 to 1k to have a more reliable actuation on the relays.

All Eagle Files are updated for version 3.0 of the schematics.
Tomorrow I will install it in place of the perfoboard.


luisr320

  • Full Member
  • ***
  • Posts: 227
  • Country: pt
Re: PROJECT - Gate controled by Car Lights [PHOTOS][UPDATED]
« Reply #18 on: March 13, 2015, 10:04:16 AM »
And here it is installed, replacing the perfoboard one:



Next, I'm going to assemble a Moteino Garage Mote to replace the breadboard I have to control the garage door.

Stay tuned...

luisr320

  • Full Member
  • ***
  • Posts: 227
  • Country: pt
Re: PROJECT - Gate controled by Car Lights [PHOTOS][UPDATED]
« Reply #19 on: March 18, 2015, 09:23:04 AM »
On with this project.

To control the garage door I have a moteino installed on a breadboard and that had to be replaced by something more suitable.
So I decided to get a Garagemote from Lowpowerlab, since it had everything I needed. I'm sure Felix doesn't mind me hacking his board.
I didn't needed the hall sensors and instead used a 10 turn 100k potentiometer to get an accurate feedback of the whereabouts of the door.
Some photos:

My Garagemote assembled. As I said before, I removed the two resistors that still show up on this photo:


I wanted to mount everything inside a nice box along with the power regulator, so I cranked up my Mastercam soft to produce the required G codes to cut a perfoboard to the required size:


Cutting:


Ready to use:


All parts installed and power regulator adjusted:




Now the potentiometer. I used a Bourns 10 turn 100k potentiometer attached to a rubber cork. The rubber cork was inserted into the rolling shaft of the door and would rotate along with the door. Since the shaft turns exactly 10 turns, it was a perfect match:








And now everything is connected, ready to be installed:




I have a short video that I will present in the next post with the whole thing explained.

TomWS

  • Hero Member
  • *****
  • Posts: 1888
Re: PROJECT - Gate controled by Car Lights [PHOTOS][UPDATED]
« Reply #20 on: March 18, 2015, 09:50:14 AM »
Luis, I like your 'rotary encoder'!  Very innovative!   :)

Tom


luisr320

  • Full Member
  • ***
  • Posts: 227
  • Country: pt
Re: PROJECT - Gate controled by Car Lights [PHOTOS][UPDATED]
« Reply #21 on: March 18, 2015, 10:02:11 AM »
Those potentiometers are a bit pricey but totally worth it. 

luisr320

  • Full Member
  • ***
  • Posts: 227
  • Country: pt
Re: PROJECT - Gate controled by Car Lights [PHOTOS][UPDATED]
« Reply #22 on: March 18, 2015, 12:06:41 PM »
Here's the video.  :)
« Last Edit: April 09, 2015, 10:19:20 PM by luisr320 »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5938
  • Country: us
    • LowPowerLab
Re: PROJECT - Gate controled by Car Lights [PHOTOS][UPDATED]
« Reply #23 on: March 18, 2015, 05:47:42 PM »
This is sweet, really like your solution. Hats off to the potentiometer hack, very clever.
You make nice videos too, and nice TT!
I wonder how you trigger it when you come home at night (in the dark with your headlights ON). Or is it your long beam that is the trigger?

luisr320

  • Full Member
  • ***
  • Posts: 227
  • Country: pt
Re: PROJECT - Gate & garage controlled by Car Lights [PHOTOS][UPDATED]
« Reply #24 on: March 18, 2015, 06:15:19 PM »
Thank you. I really like my TT.
Yes, it is connected to the long beams. Even if I have the regular lights on, they will only open the gates if I use the long beams momentarily. To avoid passing weird currents into the Moteino from the car electrical circuit, I use an optocoupler and that worked out very well.
It is a project that I always wanted to do after I saw a Fibaro Promotional video. Fibaro is an European company that makes very nice Zwave devices for home automation. They have a video where a guy approaches his house with his car and after flashing the lights his gate open. Unfortunately they don't sell the car Zwave module any more. So I had to create my own. Thanks to the Moteino.

Just out of curiosity, here's the Fibaro promotional video I'm refering to:https://www.youtube.com/watch?v=ThL1RoAxCP4
Go to minute 1:17 to see what I mean :)
« Last Edit: April 09, 2015, 08:25:30 AM by Felix »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5938
  • Country: us
    • LowPowerLab
Re: PROJECT - Gate & garage controlled by Car Lights [PHOTOS][UPDATED]
« Reply #25 on: April 09, 2015, 08:24:58 AM »
Congrats, you are on HACKADAY: http://hackaday.com/2015/04/08/blink-thrice-to-let-me-in/

And BTW, as you might have noticed, I managed to add a plugin that will show the youtube videos, just paste the links. That was a must with such cool videos that you and others started posting with their projects. All older links are also now shown as embedded videos :D
« Last Edit: April 09, 2015, 08:28:24 AM by Felix »

luisr320

  • Full Member
  • ***
  • Posts: 227
  • Country: pt
Re: PROJECT - Gate & garage controlled by Car Lights [PHOTOS][UPDATED]
« Reply #26 on: April 09, 2015, 10:17:14 PM »
Hurray!!! Another Moteino project in Hackaday.
Regarding the videos, I can't seem to make them run. It's all black. Even if I edit the message and insert the [youtube] thingy.
« Last Edit: April 09, 2015, 10:20:27 PM by luisr320 »

spark

  • Newbie
  • *
  • Posts: 13
Re: PROJECT - Gate & garage controlled by Car Lights [PHOTOS]
« Reply #27 on: November 14, 2015, 04:05:34 PM »
Nice project.  I just built a breadboard version of this....works like a charm!  Here is a modified version of the code for the carMote that works directly with the "out-of-the-box" GarageMote code.

Code: [Select]

#include <RFM69.h>
#include <SPI.h>
#include <SPIFlash.h>
#include <avr/wdt.h>
#include <WirelessHEX69.h>
#include <ClickButton.h>

#define NODEID 6 //unique for each node on same network
//#define GATEDOORID 11
#define GARADOORID 11
#define NETWORKID 100 //the same on all nodes that talk to each other
#define FREQUENCY RF69_433MHZ
#define ENCRYPTKEY "insertYourKeyHere." //exactly the same 16 characters/bytes on all nodes!
#define ACK_TIME 100 // max # of ms to wait for an ack
#define LED 9 // Moteinos have LEDs on D9
#define SERIAL_BAUD 115200
#define LIGHTPIN 7 //Defines the pin to which the car light wire is connected

//Initialize some variables
int doorId = 0;// This variable will hold the Destination Node number
long int code = 0;// This variable will hold the code that will be sent to a node
char buff[3];
String cmd;

// Hardware Init
SPIFlash flash(8, 0xEF30); //Initiate the FLASH chip - EF40 for 16mbit windbond chip
RFM69 radio; // Initiate the radio
ClickButton lightFlashes(LIGHTPIN, LOW, CLICKBTN_PULLUP);//Initiate the button class

void setup()
{
  //Setup the pins
  pinMode(LED, OUTPUT);

  // Setup button timers (all in milliseconds / ms)
  // (These are default if not set, but changeable for convenience)
  lightFlashes.debounceTime   = 20;   // Debounce timer in ms. Default 20
  lightFlashes.multiclickTime = 500;  // Time limit for multi clicks. Default 200
  lightFlashes.longClickTime  = 1000; // time until "held-down clicks" register. Default 1000

  //Start the Serial port
  Serial.begin(SERIAL_BAUD);

  //Initialize the radio
  radio.initialize(FREQUENCY,NODEID,NETWORKID);
  //radio.setHighPower();
  radio.encrypt(ENCRYPTKEY);//Turn encryption ON
  radio.promiscuous(false);//Turn off promiscuous mode to allow Wireless Programming

//    // indication that end of setup is running, blink for 5 seconds
//  for (int i=1; i<=10; i++)
//  {
//    Blink(LED,250);
//    delay(250);
//  }
}
 

void loop()
{
  //Check if some data came trough the radio
  if (radio.receiveDone())//If some packet was received by the radio, wait for all its contents to come trough
  {
    //Check if data is wireless programming
    CheckForWirelessHEX(radio, flash, true);// If the WP header is detected, start WP routine and restart the MCU at the end 
  }
   
  //Check if the light was flashed
  lightFlashes.Update();//lightFlashes.Update will fill lightFlashes.clicks variable with the number of light flashes
 
  if (lightFlashes.clicks != 0)
  {
    if (lightFlashes.clicks == 1)//One light flash - open the garage door
    {
      doorId = GARADOORID;
//      cmd = "OPN";
//      cmd.toCharArray(buff,3);
      buff[0] = 'O';
      buff[1] = 'P';
      buff[2] = 'N';
      byte len = strlen(buff);

      //Send code to doorId node via radio
      if (radio.sendWithRetry(doorId, buff, len, 5, ACK_TIME))
      {
           Blink(LED,50);
      }
    }
    else if (lightFlashes.clicks == -1)//Hold flash lights for more then 1 second
    {
        doorId = GARADOORID;
        buff[0] = 'C';
        buff[1] = 'L';
        buff[2] = 'S';
        byte len = strlen(buff);

        //Send code to doorId node via radio
        if (radio.sendWithRetry(doorId, buff, len, 5, ACK_TIME))
        {
          Blink(LED,50);
        }
    }

    //reset variables
    lightFlashes.clicks = 0;
    doorId = 0;
    code = 0;
  }
}


void Blink(byte PIN, int DELAY_MS)//Local led blinking function
{
  pinMode(PIN, OUTPUT);
  digitalWrite(PIN,HIGH);
  delay(DELAY_MS);
  digitalWrite(PIN,LOW);
}

WhiteHare

  • Hero Member
  • *****
  • Posts: 1297
  • Country: us
Re: PROJECT - Gate & garage controlled by Car Lights [PHOTOS]
« Reply #28 on: February 19, 2016, 02:04:46 PM »
Are you able to mill PCB's with the required accuracy to do some of the surface mount parts being discussed on other threads that may have a mere 0.25mm gap between the pads?  I'd like to have a go at this, but the required accuracy seems daunting.  I'm guessing ballscrews would be needed,but I'm not sure whether or not  even they would have too much backlash.  Plus, runout on the spindle is going to be a factor as well.

I purchased some 0.1mm 20 degree etching points and also some 0.2mm 30 degree etching points.   I think my drillpress probably has too much runout, but maybe if mounted in a dremel (using a dremel press), it might work without too much runout(?).  I don't presently have a mill, but I do have the Proxxon XY table (KT70) that I could maybe use for running some quick tests to see whether or not there's a snowball's chance of it working.

[Update: I went ahead and purchased the Dremel "workstation" today (really a Dremel press), so at least I'll get a sense from that what the runout on a dremel is like.  Perhaps I can manually cut a solder mask out of soda can aluminum using the dremel press to provide an on/off z-axis and the Proxon xy table to orientate the metal sheet for cutting. 

It looks as though 0.1mm is the smallest etching point available.  I've read that 10 degree 0.1mm are mostly good at producing nasty shrapnel, which is why I went with 20 degree 0.1mm.

It occurs to me that the screws on most CNC machines may be too coarse for supporting this type of work.  I get the impression that 5mm of travel per turn is what's common, but that seems like maybe too coarse for the  level of accuracy required to etch the traces for fine pitched SMD parts.  So, I'm just wondering aloud here as to whether finer threads on a regular screw might actually outperform a 1605 ballscrew in terms of accurate positioning?

Proxxon has come out with their own CNC machine that, unfortunately, is super expensive.  What's interesting is that Proxxon claims that for really high accuracy CNC milling you also need brakes on the stepper motors to lock them down while doing cuts.  I guess that's yet another way to address the backlash issue.  There are inexpensive ($50) adapter kits, though, which allow the low-end ($400) Proxxon mill to be outfitted with stepper motors, and if it turns out to be accurate enough I may go that route.   Perhaps adding some stepper brakes and also some precise linear encoders for positional feedback would do the job.  That said, I'd really prefer to just buy something off the shelf, if it were affordable that is.]
« Last Edit: February 19, 2016, 05:59:43 PM by WhiteHare »

luisr320

  • Full Member
  • ***
  • Posts: 227
  • Country: pt
Re: PROJECT - Gate & garage controlled by Car Lights [PHOTOS]
« Reply #29 on: February 19, 2016, 05:56:19 PM »
The biggest challenge is the way to deal with an uneven surface. 0.25 mm is very narrow margin. You must use a script called autoleveller from here: http://www.autoleveller.co.uk, in order to prescan the warp on your board and then run the PCBGCODE created by EAGLE CAD. For a 0.25 precision, I don't think you can't use a Dremel tool. But if you already have all the parts, make a test a see what happens.
« Last Edit: February 19, 2016, 07:21:18 PM by luisr320 »