Status pin clarification

General support questions and discussions.

Status pin clarification

Postby rpuas » Sat Sep 28, 2013 6:36 pm

Can you clarify the connection for the Status pin...

The instructions in step 2 of the MyDoorOpener-instructions-2.pdf say that 2 wires should be connected
to the GND and Corresponding Analog pin (#2 for device 1).

But the picture in the PDF shows the wires connected to 5v & pin #2?

Also, line 87 in MyDoorOpener.ino shows +5v in the comment...
#define STATUS_STRATEGY_NORMALLY_CLOSED // classic door sensor - uses digitalRead to interpret door/device status
(opened == high-impedance, closed == +5v)


Should the status pin be connected to GND or +5v?

Thanks,

Raul
rpuas
 
Posts: 4
Joined: Sat Sep 28, 2013 6:17 pm

Re: Status pin clarification

Postby support » Sun Sep 29, 2013 10:12 am

Hi Raul,

The picture in the documentation is an old picture which uses the older +3v/+5v strategies. We highly recommend
using the newer approach which is much more accurate. To do so, you'd connect one wire to GND and the other to
your analog pin XX.

Your status sensing device should let current flow between the 2 wires (GND <-> analog pin XX) when the door
is closed and break that link when the door is opened.

In the INO file, you'd uncomment (default) the following code, and use the following strategy:
#define STATUS_STRATEGY_NORMALLY_CLOSED

The other STATUS_STRATEGY_XX line entries should be commented out.

Best regards,
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: Status pin clarification

Postby FACE » Tue Jan 07, 2014 9:23 am

I seem to be running into similar issues like Raul. I follow the PDF instructions to the best of my understanding but am still a little confused.
From what I understand, the PDF references older hardware. I have the DFRobot 2.1 and the Arduino Ethernet. Is it possible for ANYONE to post a top
view picture of the DFRobot with all the connections made for a single garage door, nothing else?
I have the 2 wires coming from the wall switch going to the COM1 lug and the NO1 lug. I have the wires of the magnetic sensor switch on the door going to
Analog pin2(5v) and to the GND right next to it. Thats it. I feel like I'm missing something. I read about a wire going to digital pin 2 but can't make sense out of that.

In the PDF it says Device#- 1 (operated via relay@ COM1/NO1) Pin for relay- Digital Pin #2
Device#- 1(operated via relay @ COM1/NO1) Pins for sensor- Analog pin#2, GND

It says to use the distinct terminal block for each device. I believe this is the area where I'm confused or mis-reading the instructions. If I have the wall switch wires going to the terminal block and the switch wires going to analog2 and ground, Where /how does digital pin 2 come into play?

Sorry for the confusion here, but it's rough when you're new to all this stuff.
Thanks!
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: Status pin clarification

Postby support » Tue Jan 07, 2014 1:44 pm

For the device/door open/close portion, you should have your wires from the wall mount button to COM1/NO1.
For the status sensing portion, you should have your wires from the sensor to Analog#2 and GND.
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: Status pin clarification

Postby FACE » Wed Jan 08, 2014 11:07 am

I'm pretty sure that's the way I have it. As simple as this seems to be, it sure is cramping my brain.
Please take a look at what I have and maybe you can spot the problem right off. I have the code set
up like it says in the PDF. Unless I'm interpreting it wrong.. Thanks
Attachments
Picture.jpg
Picture.jpg (119.91 KiB) Viewed 5705 times
dfrobot.jpg
dfrobot.jpg (310.81 KiB) Viewed 5705 times
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: Status pin clarification

Postby support » Wed Jan 08, 2014 9:22 pm

You haven't mentioned what isn't working ... The door/device is not opening/closing or you're
not seeing the status being reported for the door/device ?

If the door is not opening/closing, does the relay click ?

Please describe in more details what's not working.

Thanks,
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: Status pin clarification

Postby FACE » Thu Jan 09, 2014 12:08 am

I haven't got as far as using the software on my iPhone yet. What I am doing is just testing on the bench. I made a quick video to
show what exactly is going on. When I power up the board(s) with the door sensor OPEN, everything seems to be fine. When I put the
other half of the sensor in front of the first half, CLOSING the circuit, the lights on the Arduino flash and also on the power supply.
I posted something earlier in a different section about this. I thought I had it solved but I was wrong. As a matter of fact, you can delete
that whole thread ---- viewtopic.php?f=5&t=234

If I power up the boards with the sensor in the closed position, it flashes from the get go. I can't see this being normal.

Take a look..- http://www.youtube.com/watch?v=naO0lAMQ ... e=youtu.be
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: Status pin clarification

Postby support » Thu Jan 09, 2014 10:27 pm

Nice video. Thanks ... When you activate the status sensor, there should be no relay clicking. Relay clicking
is only when you actually open/close a door. The sensor is only there to report whether a door gets opened
or closed.

I suggest you tackle the problem in two steps. First, wire things to make the open/close portion of the
circuitry work. Once that works, don't remove anything and add the additional circuitry to make the sensing
portion work too.

So for the first portion, assuming you have the INO code properly configured and uploaded to your Arduino,
you should have 2 wires, one connected to COM1 and the other connected to NO1. When you touch those 2
wires together, you should be getting a relay clicking on your RelayShield. Typically, these 2 wires would
be attached to your wall mount switch.

Now, for the second portion (only tackle this if the above worked). Again, assuming you have the INO code
properly configured and uploaded to your Arduino, you should have 2 wires, one connected to GND and the
other connected to Analog pin #2. When you touch those 2 wires together, you shouldn't see nothing apparent
at the hardware level at this point. You could be receiving notifications if you've configured those properly
in the INO code. In all cases, touching the 2 wires should not trigger any relays, should not reboot your
Arduino or do any other funky things as your video shows.

Note that the DFRobot RelayShield v2.1 has jumpers that can be tweaked with. I believe one of the other
forum threads on our forums (DFRobot RelayShield 2.1 forum) talks about this. Make sure all jumpers are
where they should be, based on the DFRobot RelayShield 2.1 documentation:
http://www.dfrobot.com/wiki/index.php/Relay_Shield_for_Arduino_V2.1_(SKU:DFR0144)

Hope this helps.
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: Status pin clarification

Postby FACE » Sat Jan 11, 2014 11:16 am

Thanks for the detailed approach. I'm going to have to say there is something wrong with the INO file that I uploaded to the Arduino.
Below is a picture of what my code looks like.

When I apply power to these two boards connected together, instantly I get a click in relay 4 and it remains closed. The LED on the board that indicates relay 4 is closed is also lit up. If I push the manual button on the board to toggle relay 4 nothing happens.

When I touch COM1 and NO1 together, absolutely nothing happens. When I short Analog pin 2 to ground, the board goes into the error mode like in my video. When I un-short these two, the board status goes back to the above. Relay 4 closed and LED4 on.

What I tried to do is to clear the Arduino of any programming to start from scratch to see if maybe I have a bad relay board. I have searched high and low but can't find anything that tells me how to set the Arduino back to factory defaults. The reset button does not clear the INO file out of the memory. If I could do this, I could verify if I have a bad board or not. I did look in the DFRobot 2.1 thread and saw this viewtopic.php?f=5&t=5
Toward the bottom, gokart lists an identical situation. That relay four energizes when power is applied. So again, I'd say it's in my code. I tried to pull the jumper off of
IO3 but this does not disable relay 4. Same exact problems as listed above with this jumper removed.

So I guess what I need help with at this point is for you to review the few lines of my INO file below and also, is there a way to power up the relay board by itself? Not connected to the Arduino? This would also tell me if the board is bad or not. However, everything is pointing to mistakes in my INO file. It's the only thing that makes sense at this point. The chances that I have a bad relay board is slim, I know, but it seems I've created a monster out of something simple only because I don't know anything about it. I do greatly appreciate the help though. I must say I'm learning a lot along the way.
Attachments
Picture.jpg
Picture.jpg (119.91 KiB) Viewed 5674 times
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: Status pin clarification

Postby FACE » Sat Jan 11, 2014 11:35 am

Another thing I wanted to add that I don't think I've mentioned throughout this, I am using only COM1 for a single garage door.
I do not have any notifications enabled. This is plain jane one device only. The only code mods I made to the INO file other than what
is listed in the picture is the password and the IP address. Pretty much exactly what it says in the instruction PDF nothing more.
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Next

Return to Support



cron