Status pin clarification

General support questions and discussions.

Re: Status pin clarification

Postby support » Sat Jan 11, 2014 12:22 pm

Your INO file as posted looks good. Have you looked at the RelayShield's jumper settings ?

I'd try uploading another program (other INO) file to your Arduino to have the boards tested out in a more straight forward
simplistic context. For example, use the simple INO program provided with the DFRobot RelayShield, found on their
documentation Wiki page.

Again, go baby steps. Remove all wires and start with simply the NC1/COM1 connections without anything else, and only
when that part works, move on to the next stage ...

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

Re: Status pin clarification

Postby FACE » Fri Jan 17, 2014 9:16 am

We were on a roll here.. what happened? PLEASE don't leave me hanging. It has to be my code. Please take a look at it
and let me know what I have wrong.
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: Status pin clarification

Postby support » Fri Jan 17, 2014 9:48 am

Hi,

You never were left hanging ... You’ve been provided guidelines to follow but it isn’t clear as to whether or not you
went thru the requested diagnostic steps … For example, in our last post, you’ve been asked to confirm jumper settings
on your board … Also, you've been asked to upload another (simpler) .INO program to confirm your “rig” is working …

What's the status with that ? Your code does look fine at first look ...

Please proceed with those sanity checks and report ... It’s too easy to have the wrong problems troubleshooted. We must
first confirm you have working hardware in your hands.

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

Re: Status pin clarification

Postby FACE » Fri Jan 17, 2014 10:49 am

I apologize if I did not do the steps that were recommended. I must have missed something in my reading.
I will go through each post again and see what I missed and report what I find based on each suggestion.
I think I confused myself. Which doesn't seem very difficult at this point. Here we go...
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: Status pin clarification

Postby FACE » Fri Jan 17, 2014 6:49 pm

Ok, I've been reading and trying to get this on the right path since this morning. Here's what I've done/found/learned:

I've started with just the wall button. Making the relay actuate when I push the button. I can not activate the relay with an external button
connected to COM1/NO1. I can push the test buttons on the relay and they activate the relays accordingly. I no longer have relay 4 activate when applying power
to the board(s). Since I'm only using COM1 with one device, I removed the jumper off the D10 set of pins to deactivate it. I also read where I could short the middle
pin to the third green pin to be able to use it in the future as it conflicts with "10" of the Arduino ethernet side.

I could find nowhere that tells me what the different jumper settings could potentially be for D2.D7,D8,D10. Since I'm only using D2, it wasn't hard to try each possible position to see
if I could get relay 1 to fire by pushing the wall button. No matter which position I have D2 jumper set to, the relay will not function by pushing the wall button.

I loaded some sample code and went through everything again. I have no difference in the results.

I also changed my code to match the new settings of the V2.1 relay board. Instead of the 2,3,4,5 it is now set to 2,7,8

So as far as this statement goes:
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.


I can't get the relay at COM1 to actuate by shorting COM1/NO1 WITH the code below uploaded to the Arduino.

So, as advised, I'll stop here before going to the next step until I can figure this out.
Attachments
Picture 1.jpg
Picture 1.jpg (156.01 KiB) Viewed 4187 times
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: Status pin clarification

Postby support » Fri Jan 17, 2014 8:16 pm

You're confusing things ...

First, when you press your existing garage door wall button, it WILL NOT trigger the relay. It's the other way
around ... You activate a relay to have the existing garage door wall button simulated a "push" action ...

Now, I repeat once again ... You might have faulty hardware in your hands so forget about MyDoorOpener.INO
for a minute and confirm your "rig" is working properly by uploading a simple INO program that will test your
relay(s) without anything else that could interfere. We suggest you use some of the sample code provided
by DFRobot at the following wiki page, which you can adapt to suite your troubleshooting needs:

http://www.dfrobot.com/wiki/index.php/Relay_Shield_for_Arduino_V2.1_(SKU:DFR0144)

Confirm you can actually trigger the relay. If you can't get it to work, we suggest you get support directly
from DFRobot as they manufacture/support that hardware and would know better about the specifics
of your problems. We can and do provide some support for the hardware side of things, but only to a certain
extent, unfortunately.

Once you get the hardware working, take note of the actual pin# used to trigger the relays, etc. You can then
paste those values in the MyDoorOpener.INO program and take it from there ... Come back to our forums and
we'll be more than happy to provide further assistance from that point on.

There's just too many variables in this equation. You need to be very structured in the approach you're using
to troubleshoot those types of issues or you can spend hours (or days) hunting down the wrong problems.

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

Re: Status pin clarification

Postby FACE » Sat Jan 18, 2014 10:52 am

You are correct. I have confused things. I know you are trying to explain this in the simplest way, however, your simplest way
didn't click until they way you just explained it in your last post. Now I get it. Remember, I know absolutely zero about this hardware.
I've never even heard of an INO file until I started this. I can see how it is frustrating on both sides of this. What I have been working off of
is when you said, in an earlier post, that if I touch the 2 wires together coming from COM1 and NO1, the relay should click. This is what I have
been trying to achieve before moving forward, which obviously I can't seem to get past.

The sample code from the DFRobot wiki, I see it all typed out. What I don't see is where I can download an INO file to test the relays with.
What I am assuming is that I need to copy all that code and paste it into a new file with the Arduino IDE. Is that correct? Which part of that code do I copy? All of it, some?

Lets say I do that. Then I upload it to the Arduino. How exactly do I go about testing the relays once I have this sample code loaded to my Arduino? Does it just run itself and start firing relays in a loop or something? I really want to follow instructions and figure this out. I'm sorry if I don't always get what you're saying. I'm trying the best I can.

If you just want me to contact the hardware manufacturer to see if my board is defective then I'll do that. But, I think you'll agree that it's mostly me that's defective.
Believe me,the last thing I want to do is bother you and the rest of the support people every time I run into a problem. Are there not other people on here that have successfully done exactly what I am trying to do? Out of the 700+ views on this thread, there has to be at least ONE person in the same boat as me. Please, chime in and share your thoughts. All of us noobs should be working together and learning from each others mistakes. Private message each other. Then again, maybe it is just me.
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: Status pin clarification

Postby support » Sat Jan 18, 2014 4:35 pm

Don't despair ...

You need to be patient and yes, there are hundreds (even thousands) of other people like you that have successfully
configured their Arduino to be used with the MyDoorOpener application. The MyDoorOpener forum community is not
as large though, as it's not all of our app users that have joined our forums (yet). The Arduino forum community
is much larger though. Your chances of getting the "basic/noob" help you're seeking would be much higher over
there ... Not that I want to draw traffic away from our own forums, but I'm just being realistic here ...

Indeed, what you want to do is copy/paste some code into the Arduino IDE, have it compiled and uploaded
to your Arduino. As soon as you do that, it will start running the functions called setup(), and then loop().

As their names imply, setup() is executed once to have things configured and loop() is executed in a loop
fashion. These are the program entry points. I'd suggest the following code to start with:

Code: Select all
void setup()
{
 // initializing the output pin (relay)
 pinMode(###, OUTPUT);
 digitalWrite(###, LOW);
}

void loop()
{
  static int count = 0;
  ++count;

  // every 1000 loops, trigger the output pin (relay)
  if(count == 1000)
  {
      count = 0;
      digitalWrite(###, HIGH);
      delay(1000);
      digitalWrite(###, LOW);
  }
}


What the above does is the following:

1) initializes the digital pin ### (you will need to replace '###' to an appropriate digital output pin value (number, ie: 2, 3, 4, 5, ...)
that you want to test/trigger the relay for)

2) every 1000 loops, the digital pin ### will get high for 1 second, therefore you should be hearing the relay click when this happens

Don't leave this program running forever as it will be stressing your relays uselessly, but at least you'll know whether
your hardware is working/connected properly or not.

Once working with this simplistic program (and only then), take note of the value you've assigned to ### and have that value pasted
inside MyDoorOpener.INO, in the relaysPin array definition (near line #72).

That's it ... Hope this helps you getting on track!
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: Status pin clarification

Postby FACE » Sat Jan 18, 2014 5:54 pm

Thank you. That was pretty much as easy as it gets to understand.

I did exactly that. I changed the "xxx" to "2" Compiled it with no errors and uploaded it.
The instant I apply power, relay 1 closes and the relay 1 LED illuminates to indicate the same.

The relay stays closed and the LED remains lit until I remove power. I let it sit in this state with power applied for a few minutes.
I think the relay should close for a second and then open itself again and repeat this cycle every few seconds, not knowing how long it take 1000 loops to complete
I do believe it should not remain closed as it is.

Just for the heck of it, I changed the "xxx" to 7 and then to 8. It did the same thing for rely 2 and relay 3.
Relay goes closed and remains there as soon as power is applied.
Attachments
Picture.jpg
Picture.jpg (30.29 KiB) Viewed 4175 times
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: Status pin clarification

Postby support » Mon Jan 20, 2014 8:19 am

Let's just add an extra 1 second delay in each loop cycle and have the relay
triggered every 30 cycles instead of 1000. This will typically make it trigger every
30 seconds (easier to measure). Try this:

Code: Select all
void loop()
{
  static int count = 0;
  ++count;

  delay(1000);

  // every 30 loops, trigger the output pin (relay)
  if(count == 30)
  {
      count = 0;
      digitalWrite(###, HIGH);
      delay(1000);
      digitalWrite(###, LOW);
  }
}


So with this change, your relay should click every 30 seconds or so. If not, as previously
discussed, you might want to take it to DFRobot as they could help you out better than
we could. There might be some jumper settings to be done or something. We don't have
the latest (2.1) version of the DFRobot Relay shield and we know there are jumpers
you can play with to configure it (NO-normally open or NC-normally closed for example).

Keep us posted so other can learn from this too. Thanks!
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

PreviousNext

Return to Support



cron