(P)Imp my Garage

Good to hear it’s all working. Mine is ranging constantly. Couple of reasons; because my display could draw 8 amps, I’ve got it to timeout (30s) when the door is shut. Timing out just means that the display goes blank. It gets woken up when someone walks between the sensor and the car. The other reason is that to switch the sensor on and off would mean dedicating another pin which I’d rather conserve (am a bit short on pins).

Just read this about adding a noise filter on the power line. http://www.maxbotix.com/articles/035.htm

My garage Imp is a card module at the moment, but I might pull it and use one of my Amber boards. I’d say I’ll end up using it for a number of additional things and need more pins. There is an attic over the garage that would be a perfect place to run wires out to ambient temp/humidity sensors.

Just wiring up Pin 1 as DIGITAL_OUT which I’ll use to drive the control of the garage door. I’ll hook up pin 1 to the base of a transistor to drive a relay that I’ll toggle to open/close the garage door. However, I’m just having some thoughts along the lines of “what if”… the Imp cycles down for whatever reason, I want to avoid having a “1” (+ve) on Pin 1 that would inadvertently trigger the relay (and the door).

So, the question is, what configuration would guarantee that Pin 1 always comes up in a known state ?

Thx

In my experience, they always boot low, but you could write it low immediately if you like as well. I’ve never seen a pin state flip on boot and inadvertantly trigger something.

BTW… I pulled the distance sensor off of the door and attached it to an Attacknid Stryder that I am Imping. I set up a really function to walk around and avoid hitting things. It actually works very nicely as long as you are ranging solid objects. Anything that can absorb the sonar, like humans, pillows, ect don’t range well or at all.

I understand the imp boots with the pins in a high-impedance state, so perhaps using a soft pull-down on the output (maybe 100k or so?) would assure the signal remains low until configured low via your program.

@LarryJ exactly. The pins are all high impedance until configured, so a pull-down resistor would ensure the line didn’t go high until you drive it high.

Is it recommended to tie a soft pulldown to all GPIO pins where you want a specific initial state?

Yes … or soft pullup (if you want a logic high initial state).

Typed this in a day after your responses… and never hit “Post Comment”

@LarryJ/@Hugo - Fantastic, no more worries about the door opening :slight_smile:

Making slow progress (daytime job getting in the way!). But now have an iPhone ‘app’ (ok, it’s some HTML in Safari…)

Nice. I was working on some HTML for mine as well. My wife and I normally use Pitchfork to open/close, but I’d also like a web interface in case we don’t have a phone for some reason. Ultimately, I’d like to redirect to google for authentication before you get to the door interface, but for now I’m just going to prompt for a password in an HTML text input field.

I figured that I’ll just hardcode an API Key into the query string. Given that the HTTP request is SSL, it’s not going to get hacked on the way to the Imp.

Yep, that will work. I was thinking I could set up guest codes for family and friends that I might want to allow access to the door.

That’ll certainly be a bit more flexible than my method. Let me know when you have it solved.

I might also explore the persistent storage (server.save()) and implement username/passwords/roles, although, that’ll be another set of HTML pages to maintain that, or, cookies, or, sessions…

I’ve been experimenting with relay delays today, when opening my (Hormann) garage door. It seems that 100ms is unpredictable, but 150ms has been solid so far.

I set this up as guest access for the time being. I’ve always had my delay at 1s.

In case it’s useful to anyone, here’s a Visio diagram of my setup. The original intention was to have two Imps, one for the door, and one for the ‘value add’. I ended up with one Imp because I like the close integration rather than two agents chit chatting. However, I have max’d out on all pins so no more connectivity for me.

That’s some nice work Dave. After pulling my rangefinder off of the door for a bit to test it as a robot sensor, I have it back and permanently mounted in a case. You just got me thinking… I might replace the Neopixel with an RGB LCD and serial backpack. Then change the backlight for indicator colors and display the actual distance on the LCD. If the backlight color was bright enough to to be seen in daylight, I would be good to go. The Neopixel works pretty nicely though.

Time to get some Amber boards made! I can’t believe that none of the hardware retailers aren’t making a module board. Smartmaker is making a breakout, but IMHO, without a proper power supply and blinkup circuit, it just isn’t good for much besides testing on a breadboard. I have 5 Ambers built, one more waiting for a project.

sign me up for one!

I mounted an Adafruit RGB LED with serial backpack in a small black enclosure and replaced the NeoPixel with it. I’m using Red for too close, Green for in place, and Blue for too far out. You can see it nicely from the car even in daylight, and now the distance is displayed on the LED. Certainly not necessary, but it bumps up the cool factor a bit, and actually gives me a reason to use the RGB function of the LED. I’ll post a pic after I’m happy with it and get it permanently mounted.