Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Can I use analogWrite to reduce power draw on an active LOW relay board? on: March 18, 2014, 06:54:38 pm
So I am using an active LOW relay board in my project meaning that when the arduino outputs LOW the relay is active. This project is going into a car and due to the nature of my project the relays will be off while the car is off meaning that the arduino will be outputting HIGH. SO actually my first question would probably be what kind of current draw should I expect while the arduino is putting those pins high? And then if there is some current draw my question is will I be able to reduce that by using analogWrite(130);? I found that the relays will not trigger until analogWrite is lower than 125 so if I set it to 130 I would not be outputting full voltage and the relays would still be off.

So two main questions: What kind of current draw should I expect when the arduino is holding the pins HIGH in order to keep the relays off?

Will using analogWrite(130); reduce that draw?

Thank you very much!!!
2  Using Arduino / Project Guidance / Re: Question about Arduino and compatibility on: March 16, 2014, 12:22:47 pm
I'm not sure if you've already gone forward with this or not, but I have a lot of experience with that sensor. I used it succesfully for awhile in a project using an arduino uno. Eventually I messed up that arduino and got a leonardo. So far I have been unable to get the adafruit supplied library/examples to work. There are some differences in how the leonardo uses serial that are causing issues. I'm sure this can be worked through, but for the easiest solution I'd recommend the uno.
3  Using Arduino / Motors, Mechanics, and Power / Re: Is forward and reverse on a 2 wire motor(actuator) possible with just 2 relays? on: January 20, 2014, 03:27:15 pm
hmm two power sources is not something I want to do. I guess the dpdt relay may be a viable option. Although after both relays and the wiring and time soldering I wonder if I should just buy this?: http://www.pololu.com/product/1451

Also it does run(logically) just like a dc motor.
4  Using Arduino / Motors, Mechanics, and Power / Is forward and reverse on a 2 wire motor(actuator) possible with just 2 relays? on: January 20, 2014, 02:26:57 pm
I'm wondering if I can control a 2 wire linear actuator(has automatic clutch, doesn't need speed controlled just need on and off with polarity reversed) with just some relays. I really like these little relay kits: http://www.amazon.com/gp/product/B00C59NOHK/ref=ox_sc_act_title_1?ie=UTF8&psc=1&smid=A3EC7BCY4V8OZM

and would like to use them if I can, but idk if its possible. If it is could someone help me figure out the wiring. If it isn't I would really appreciate some advice on the simplest/easiest way to control this actuator with an arduino.

also the actuator is 12v and has a max draw of 4.8 amps
5  Using Arduino / Programming Questions / Re: Arduino Leonardo Problem: I have to reset for sketch to work. on: July 17, 2013, 07:30:47 pm
Ah that makes sense, thank you!
6  Using Arduino / Project Guidance / Re: I could use help understanding this relay board on: July 17, 2013, 07:30:15 pm
So I got this board and set it up, but I have a problem. Or at least I think I do. When I run my program I can clearly hear and feel at least one of the relays switching, but when I test the connection with a multimeter it shows there is no connection. Could the board I got be faulty? It also appears that only one relay is working. I have it wired as so:
Board Gnd to Arduino GND
Board VCC to Arduino 5V
Board In1 to Arduino Pin 10
Board In2 to Arduino Pin 11

As far as the code it appears that the relays activate when I set the pins low(which doesn't seem right, but maybe it is) and i only hear a click when I set pin 10 low not pin 11.


Nevermind. I believe one relay on the board is faulty, other than that it all works as expected.
7  Using Arduino / Programming Questions / Re: Arduino Leonardo Problem: I have to reset for sketch to work. on: July 17, 2013, 05:51:17 pm
Is there any way to program this where it can function the same when there is no serial connection? The end device can't have a computer hooked up to it, but I'd like to be able to plug in a computer sometimes to see what it is doing(if it isn't working or something).

Edit: I just commented out this(and took out the "while (!Serial) { }" because I don't always have a serial connection) and it worked:
Code:
//  if (finger.verifyPassword()) {
//
//  }
//  else {
//    Serial.println("Did not find fingerprint sensor :(.");
//    digitalWrite(light, HIGH);
//    while (1);
//  }
//  Serial.println("Waiting for valid finger...");
//  
//
One thing about this though is I don't really like giving up the error message for the sensor not being hooked up. Does anyone see something I can change to make it work rather than just getting rid of it? It isn't vital and I can definitely go without it if I need to though.
Also it takes about 5-6 seconds from when I give it power until the fingerprint scanner is active. Is this a normal amount of time for it to setup? or can I change something to make it faster?
8  Using Arduino / Programming Questions / Arduino Leonardo Problem: I have to reset for sketch to work. on: July 17, 2013, 05:13:03 pm
I am trying to create a device that needs to run the sketch when it is powered on without doing anything else. Right now my program works, but it needs to be manually reset after being powered on. I can't figure out why this might be. I'll attach my code below. If anyone knows why this might be happening I would really appreciate it.

Thank you!

Code:
#include <Event.h>
#include <Timer.h>

#include <avr/io.h>
#include <avr/wdt.h>

#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>
// pin #8 is IN from sensor (GREEN wire)
// pin #9 is OUT from arduino  (WHITE wire)
SoftwareSerial mySerial(8, 9);
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
int getFingerprintIDez();
int access = 1;
const int light = 13;
const int RelayOn = 5;
const int RelayOn1 = 6;
const int OnPos = 11;
float start = 0;
float elapsed;
float timeoutS = 0;
float timeoutE;
long timer1;
long timer2;
long timer3;
int Enroll = 0;
void setup() 
{
  pinMode(RelayOn, OUTPUT);
  pinMode(RelayOn1, OUTPUT);
  pinMode(light, OUTPUT);
 
  Serial.begin(9600);
  Serial.println("fingertest");
  finger.begin(57600);

  if (finger.verifyPassword()) {

  }
  else {
    Serial.println("Did not find fingerprint sensor :(.");
    digitalWrite(light, HIGH);
    while (1);
  }
  Serial.println("Waiting for valid finger...");
 
 
}

void loop()                     
{
//  while(access == 0){
//    digitalWrite(RelayOn, LOW);
//    digitalWrite(RelayOn1, LOW);
//    if(LUButtonState == LOW){
//    Serial.println(millis());
//    LUButtonState = digitalRead(LUButton);
//    delay(20);     //reset
//     }
//   
//   
//   else if(LUButtonState == HIGH){
//      delay(200);
//      LUButtonState = digitalRead(LUButton);
//      if(LUButtonState == HIGH){
//        timeoutS = millis();
//      access = 1;
//      delay(10);
//    }
//    }
//  }
  while(access == 1){
    getFingerprintIDez();
  }

 
  while(access == 2){
    BikeOn();
  }
 
}
//-------------------------------------------------------------------------------------------------------------------


void BikeOn(){
//  LUButtonState = digitalRead(LUButton);
//    if(LUButtonState == HIGH){
//    delay(200);
//    LUButtonState = digitalRead(LUButton);
//    if(LUButtonState == HIGH){
//    digitalWrite(RelayOn, LOW);
//    digitalWrite(RelayOn1, LOW);
//    access = 0;
//    delay(100);
//   }
//  }
//  else{
 
      digitalWrite(RelayOn, HIGH);
      digitalWrite(RelayOn1, HIGH);
//    }
  }
 


 


void Reset(){
  Serial.println("Reset");
     wdt_enable(WDTO_30MS);
     while(1) {};
      }


int getFingerprintIDez() {
  Serial.println(timer3);
  timeoutE = millis();
  timer3 = timeoutE - timeoutS;
        if( timer3 >= 30000){
          access = 0;
          delay(20);
     }
 else{
         
  uint8_t p = finger.getImage();
  if (p != FINGERPRINT_OK)  return -1;

  p = finger.image2Tz();
  if (p != FINGERPRINT_OK)  return -1;

  p = finger.fingerFastSearch();
  if (p != FINGERPRINT_OK)  return -1;

  // found a match!
  Serial.print("Found ID #");
  Serial.print(finger.fingerID);
  Serial.print(" with confidence of ");
  Serial.println(finger.confidence);
  if (finger.fingerID >=0){
    if(finger.fingerID <= 162){
      Serial.println("on");
      delay(200);
      timeoutS = 0;
      access = 2;
   }
  }   
 }
}
       
     
   











9  Using Arduino / Project Guidance / Re: I could use help understanding this relay board on: July 12, 2013, 05:09:44 pm
Thank you both!!! Very helpful and informative! smiley-lol
10  Using Arduino / Project Guidance / Re: I could use help understanding this relay board on: July 12, 2013, 04:50:22 pm
thank you, that makes sense. And then do I put 12v across it where it says "jd-vcc", "vcc" and gnd? Also would it be better/easier to use that 12v relay with its power coming from a 12v battery or this 5v relay http://www.ebay.com/itm/2-Channel-5V-Relay-Module-With-Optocoupler-For-Arduino-DSP-AVR-PIC-ARM-/221248889308?pt=LH_DefaultDomain_0&hash=item33837621dc getting power from the arduino. (this is going on a motorcycle if that makes a difference)
11  Using Arduino / Project Guidance / I could use help understanding this relay board on: July 12, 2013, 03:25:00 pm
I am trying to understand how I would use this relay board: http://www.ebay.com/itm/2-Channel-12V-Relay-Module-With-Optocoupler-For-Arduino-DSP-AVR-PIC-ARM-/321151393125?pt=LH_DefaultDomain_0&hash=item4ac61d5d65

I would think i would just puyt the arduino's ground on gnd and then set one of those pins labeled in1 and/or in2 high to trigger the relays, but then the schematic confused me. If someone here understands how this relay board works and how I would wire it up(just the arduino side) that would be very helpful.

Thank you!
12  Using Arduino / General Electronics / Re: Transistor or optoisolator to simulate pressing button on key fob? on: February 25, 2013, 12:34:35 am
I think ill give the optos one more go, I can't quite get why they don't work since they seem so simple to use. Also the keyfob works with a 1.5kohm resistor in between so the resistance of that analog switch seems fine. Maybe I'll use that since it should fit on my board better and then I can use the trunk button too.


Also thank you for all the responses. I have plenty of options to try now.

Also: I just found this http://www.digikey.com/product-detail/en/MAX323CPA%2B/MAX323CPA%2B-ND/1089581
does anyone have any experience with this? I looked at the datasheet, but I can't quite tell how I would use it(what pins do what).
13  Using Arduino / General Electronics / Re: Transistor or optoisolator to simulate pressing button on key fob? on: February 23, 2013, 10:40:13 am
So I found a reed relay similar to the other one I posted but it is 5v instead of 12. I think I can use this,  but I would like to know if there is a more reliable(solid state maybe)  option available. Or maybe I'm underestimating the reliability of a reed relay. If so please tell me.

Also how would I attach this to my pcb board? It uses .1" spacing I think(same spacing as a breadboard), but the relay uses .2" spacing. Is there an adapter or should I bend the legs or what?

Thanks
14  Using Arduino / General Electronics / Re: Transistor or optoisolator to simulate pressing button on key fob? on: February 22, 2013, 06:09:25 pm
I was looking at that spec sheet for this: http://www.digikey.com/product-detail/en/9007-12-01/306-1280-ND/1914956 This one looks like it has the diode built in. Do you think this would be a reliable(long term) component. Also I can't tell, but it looks like the pins are wider apart than my board's holes(my board is the same as an arduino's holes). Is there something I should look for in the datasheet? Also how would i connect it? Like what type of resistor if any and would I just send a pin HIGH in the code? Thank you again.
15  Using Arduino / General Electronics / Re: Transistor or optoisolator to simulate pressing button on key fob? on: February 22, 2013, 05:36:25 pm
I do know the polarity and I would prefer to indirectly control the buttons(something in between). That reed relay sounds like it might be good except it might be a little too big(unless theres some that are smaller than the 4 pin across ones). Also I'm sorry, but I don't quite understand what you mean by the transistor needs enough volts. Where does it need enough volts from? The keyfob runs at 3.3v and the arduino pins are 5v so I'm guessing the keyfob is too low voltage for the transistor?

Does anyone know why the optoisolator method isn't working? I wired it like this http://fritzing.org/projects/optocoupler/, but instead of an led its attached to the buttons(with correct polarity I checked, double checked then checked again).

Also if I could fit this into my board would this work: http://www.digikey.com/product-detail/en/9007-05-00/306-1062-ND/301696?


One last thing: I need parts that will last a long time and be reliable. I would prefer non mechanical components if it would work.

Thank you again.
Pages: [1] 2