Show Posts
Pages: 1 [2] 3 4 ... 20
16  Using Arduino / General Electronics / smd optocoupler on: February 23, 2014, 01:14:34 pm
hi there
I have been using one of these Optocouplers and seem to work fine, but looking for a SMD Optocoupler now I no they do a smd of that opto but would like something smaller, does any one no of anything I could use?

http://uk.rs-online.com/web/p/products/6935952/
17  Using Arduino / General Electronics / Re: 3phase mains faliure circuit on: January 14, 2014, 04:20:56 pm
hehe I'm think im ok with 3 phase was I work with it 5 day a week.
just that I don't understand using a capacitor with a opto, and other people schematics I have seen have the phase going on to the opto and have the other leg of the opto go to the capacitor then the GND 

would you see any issues with using this opto as the PS2505-4 is not as available for me
http://uk.rs-online.com/web/p/optocouplers/6912218/
18  Using Arduino / Project Guidance / Re: multiple input monitoring on: January 14, 2014, 03:38:55 pm
I see now, ok thanks all for your help
19  Using Arduino / General Electronics / Re: 3phase mains faliure circuit on: January 14, 2014, 03:36:05 pm
ok thanks for that.
I am putting the x capacitor on the phase line not the ground?
20  Using Arduino / Project Guidance / Re: multiple input monitoring on: January 13, 2014, 01:23:30 pm
o I see, could I do this?

Code:
if (digitalRead(input1) && digitalRead(input2) && digitalRead(input3) && digitalRead(input4) && digitalRead(input5) && digitalRead(input6)) {   //check if any are high

21  Using Arduino / Project Guidance / Re: multiple input monitoring on: January 13, 2014, 01:08:12 pm
yes all that work's fine
22  Using Arduino / Project Guidance / Re: multiple input monitoring on: January 13, 2014, 12:48:56 pm
there is some other bits going on in here

Quote


//         ***  INPUT'S ***
const int input1   =  3;   
const int input2   =  2;   
const int input3   =  4;
const int input4   =  5;
const int input5   =  6;
const int input6   =  7;

//        *** LED OUTPUT'S ***
const int LED1     =  15;   
const int LED2     =  14;   
const int LED3     =  13;   
const int LED4     =  12;   
const int LED5     =  11; 
const int LED6     =  10;

//  *** LED/RESET/RELAY OUTPUT'S ***
const int Relay    =  8;
const int Reset    =  9;
const int LED      =  16;



int ledState = LOW;             // ledState used to set the LED
long previousMillis = 0;        // will store last time LED was updated
long interval = 1000;           // interval at which to blink (milliseconds)

void setup()
{
  //        ***  INPUT'S  ***
  pinMode(input1   ,    INPUT);
  pinMode(input2   ,    INPUT);
  pinMode(input3   ,    INPUT);
  pinMode(input4   ,    INPUT);
  pinMode(input5   ,    INPUT);
  pinMode(input6   ,    INPUT);

  //        ***  OUTPUT'S  ***
  pinMode(LED1    ,    OUTPUT);
  pinMode(LED2    ,    OUTPUT);
  pinMode(LED3    ,    OUTPUT);
  pinMode(LED4    ,    OUTPUT);
  pinMode(LED5    ,    OUTPUT);
  pinMode(LED6    ,    OUTPUT);

//  *** LED/RESET/RELAY OUTPUT'S *** 
  pinMode(Relay   ,    OUTPUT);
  pinMode(Reset   ,    INPUT);
  pinMode(LED     ,    OUTPUT);
 

}

void loop()  {
    unsigned long currentMillis = millis();        // LED  BLINKER
 
  if(currentMillis - previousMillis > interval) {
    // save the last time you blinked the LED
    previousMillis = currentMillis;   

    // if the LED is off turn it on and vice-versa:
    if (ledState == LOW)
      ledState = HIGH;
    else
      ledState = LOW;

    // set the LED with the ledState of the variable:
    digitalWrite(LED, ledState);
  }
 
 
  if (digitalRead(input1)==    LOW) {  // INPUT  1
    digitalWrite(LED1,        HIGH);
  }
 
  if (digitalRead(input2)==    LOW) {  // INTPUT  2
    digitalWrite(LED2,        HIGH);
  }
 
 
  if (digitalRead(input3)==    LOW) {  // INTPUT  3
    digitalWrite(LED3,        HIGH);
  }


  if (digitalRead(input4)==    LOW) {  // INTPUT  4
    digitalWrite(LED4,        HIGH);
  }


  if (digitalRead(input5)==    LOW) {  // INTPUT  5
    digitalWrite(LED5,        HIGH);
  }


  if (digitalRead(input6)==    LOW) {  // INTPUT  6
    digitalWrite(LED6,        HIGH);
  }

 
  if (input1 && input2 && input3 && input4 && input5 && input6) {    //check if any are high
   digitalWrite(Relay,        HIGH);
  }
  else {
   digitalWrite(Relay,        LOW);
  }

  if (digitalRead(Reset)==  HIGH) {  // Reset button
    digitalWrite(LED1,       LOW);
    digitalWrite(LED2,       LOW);
    digitalWrite(LED3,       LOW);
    digitalWrite(LED4,       LOW);
    digitalWrite(LED5,       LOW);
    digitalWrite(LED6,       LOW);
    }
 }
23  Using Arduino / Project Guidance / Re: multiple input monitoring on: January 13, 2014, 12:32:10 pm
ok thanks for that, I got this:
Code:
  if (input1 && input2 && input3 && input4 && input5 && input6) {        //check if any are high
   digitalWrite(Relay,        HIGH);
  }
  else {
   digitalWrite(Relay,        LOW);


it seam's to write the Relay High regardless of the input's any idea's
24  Using Arduino / General Electronics / Re: 3phase mains faliure circuit on: January 13, 2014, 12:06:59 pm
so what size capacitor would we be looking at?
25  Using Arduino / Project Guidance / multiple input monitoring on: January 12, 2014, 04:47:15 pm
Hi there
I have 6 inputs labelled as:
input1
input2
input3
input4
input5
input6
How can I get the arduino to look at all its six inputs and if any of them go low to write an output low?
 
26  Using Arduino / General Electronics / Re: 3phase mains faliure circuit on: January 12, 2014, 04:41:06 pm
CT does not suit my application.
So are you saying picking up a phase putting it through a resistor into an opt out through a capacitor?
Could I not have two 100k .25w resistors in series?
 
27  Using Arduino / General Electronics / Re: 3phase mains faliure circuit on: January 11, 2014, 02:51:16 pm
ok thanks for that, I have had a bit of a look about
so correct me if I'm wrong, I can get away with just using a resister on the diode side?
calculating the resister size do I do the same theory as I would be calculating the resister for an LED?
28  Using Arduino / Microcontrollers / Re: ATTiny2313 bootloader on: January 09, 2014, 04:46:08 pm
yea! We are all up and working now. Thank you for your help.
29  Using Arduino / Microcontrollers / Re: ATTiny2313 bootloader on: January 08, 2014, 05:10:23 pm
Here is a screen shot of mine I would say it is the same as yours?


30  Using Arduino / General Electronics / Re: attiny84 freezing on: January 07, 2014, 05:43:38 pm
Quote
While you seem to be considering all the sources of hardware-based errors, what about a software error?
Can you post your code?

I know it cant be code issues as it was heavily tested before putting into service and I have 60 of these out there now working for approx 6-12 months all seem to be fine apart from these odd few

Quote
Hi, have you got the attiny and it circuitry shielded, or in a metal case?
Do you have a 0.1uF cap across the power supply pins of the attiny itself? (soldered right at the IC pins)
It sounds like you have not got enough bypassing, the optos are certainly a good idea.
A pic of your project and a circuit diagram would be great, even a pic of a hand drawn circuit.

Yes I do have a 0.1  UF very close to the attiny
I will get some pics up very soon
All cables into the board are screened and earthed

Quote
You don't mention the reset pin.
Put a 10kohm resistor from the reset pin to +5V. What you see is maybe autoresetting

no I don't have anything attached to reset pin this may be my problem I will give it a try

thanks for all your help
Pages: 1 [2] 3 4 ... 20