Show Posts
Pages: 1 ... 15 16 [17] 18 19 ... 21
241  Using Arduino / LEDs and Multiplexing / Can you use txd and rxd as digital input/outputs on: April 29, 2012, 11:01:11 am
just wondering if you can use pins, 2,3 (txd, and rxd) as input/outputs or are they simply used for transmitting/recieving data? im sure thay are just want to be sure, they are marked up as IO1 and Io2 on the circuit diagram.

thank you
242  Using Arduino / General Electronics / cant communitcate with the arduino on: April 29, 2012, 03:13:59 am
hi
im learning to design a pcb for my first project and put a arduino chip in instead of using the board, but im havint trouble communicating to the chip, i have my USB to TTL Converter installed with the correct driver but i cant seem to communicate or download anything to the chip. i am connedted on a serial port but just the usb to ttl converter.

im using the ATMEGA328 ARDUINO chip i have it all set up as it should be ive read a couple of guides,  but on the com port all i can see id the usb to ttl converter, not the arduino chip, i have the +5, gnd, txd, rxd, from the port connected to the chip but no urduino?  

i have a complete uno board also, but when i place the ic into the board it also doesnt recognise the chip as well?

any help greatly appreciated

ok found out i need to burn the bootloader on the ic, ive found the guide here and tryed several times using an uno board connected to breadboard followed the instructions, but cant seem to burn the bootloader, keep on getting an error does this guide actualy work, are there another guides out there that may work?

thank you

does
243  Using Arduino / General Electronics / Re: mosfet question on: April 28, 2012, 08:32:36 am
i thought as much, thanks very much for your help
244  Using Arduino / General Electronics / Re: is this crystal suitable? on: April 28, 2012, 07:56:38 am
ok thanks very much
245  Using Arduino / General Electronics / Re: mosfet question on: April 28, 2012, 07:29:23 am
thanks very much for the the help, do i need to use 10k rs for outputs that light led's?
(i already have a diode across the coil)
246  Using Arduino / General Electronics / mosfet question on: April 28, 2012, 06:00:52 am
hi
for my first project im switching a relay, ive been researching about mosfets, am i right in thinking i can use the output (high) straight onto the gate of the mosfet without a resistor? below is the one i want to use.

thank you


http://www.rapidonline.com/Electronic-Components/Fdn359an-Mosfet-N-30v-2-7a-Sot-23-47-0208/?sid=9e663417-1e1c-4c70-b322-60a27b647168
247  Using Arduino / General Electronics / Re: is this crystal suitable? on: April 27, 2012, 05:48:37 pm
hi mark
thanks for the help i thought they were 22pf? hasnt got a value on the circuit diagram
cheers
248  Using Arduino / General Electronics / is this crystal suitable? on: April 27, 2012, 05:20:11 pm
hi
for my first project, im learning to pcb design, and im laying my own board out, using surface mount components not knowing anything about crytals just wondering if this crystal is suitable to use with a ATMEGA328-20PU chip.

http://www.rapidonline.com/Electronic-Components/Act753smx-4-Smd-16-00mhz-90-2014

thank you
249  Using Arduino / Programming Questions / Re: help with boolean on: April 24, 2012, 05:59:10 am
hi paul, how do you set the value of the flag in appropriate places?
250  Using Arduino / Programming Questions / Re: help with boolean on: April 24, 2012, 05:34:56 am
hi paul

the mute needs to mute (Buz, HIGH); alarm,  and finish when, if ((Fan1val == LOW) && (Fan2val == LOW) && (Esval == LOW)) 
251  Using Arduino / Programming Questions / Re: help with boolean on: April 24, 2012, 05:22:39 am
hi

my alarm is here, is a high output that switches on a buzzer circuit.

digitalWrite(Buz, HIGH);                  // Alarm on


my mute switch is here, a low in to mute the alarm.

int Mute = A2;               // mute switch input

to be honest i really dont know how to act upon the input (mute)    


(pinMode(Mute, OUTPUT);                // Set the switch pin as 1p.) sorry corrected should be INPUT
252  Using Arduino / Programming Questions / help adding a mute button and delay on: April 24, 2012, 05:08:57 am
Code:
*
 *  2 switches monitoring two fans, healthly if both fan1 and fan2 switches are low output switches a relay, if any input high an alarm sounds no output to relay.
 */
                              //int muteoutput = 2;          // mute buzzer (removes the low in the buz circuit to mute) XXXXX


int Buz = 10;                // buzzer sounds if fault
int Mute = A2;               // mut switch input   

int Service = 9;             // service switch                           
int Supfanled = 4;           // supply fan led
int Extfanled = 5;           // ext fan led.
int Esled = 8;               // emergency stop switch led                                       
int Relay = 3;               // green led lights if fan1 and fan2 are low connected to pin 9. healthey fan1 and fan2
int Gasled = 12;             // led to indicate gas is on.
int Fanfault = 6;            // red led lights if fan 1 or fan2 are high connected to pin 8.  (sounds an alarm)
int Es = A3;                 // emergency stop switch input.                               
int Fan2 = A5;               // fan switch is connected to pin 3 
int Fan1 = A4;               // fan switch is connected to pin 2 
int Fan1val;                 // var for reading the pin status
int Fan2val;                 // var for reading the pin status
int Esval;                   // val for reading emergency stop status
int Srviceval;               // val for service status.

boolean running = false;     // *****


void setup(){                                                 
  Serial.begin(9600);
  pinMode(Service, INPUT);              // service switch on just gas operates nothing else
  digitalWrite(Service, HIGH);          //turn on pulup r
  pinMode(Supfanled, OUTPUT);           // supply fan led o/p
  pinMode(Extfanled, OUTPUT);           // extfan led o/p
  pinMode(Gasled, OUTPUT);               // Greenlled as op.
  pinMode(Fanfault, OUTPUT);            // redled as op.
  pinMode(Fan1, INPUT);                // Set the switch pin as ip.
  digitalWrite(Fan1, HIGH);             // turn on internal r
  pinMode(Fan2, INPUT);                 // Set the switch pin as ip.
  digitalWrite(Fan2, HIGH);             // turn on internal r
  pinMode(Relay, OUTPUT);               // Set the switch pin as op.
  pinMode(Buz, OUTPUT);                 // Set the switch pin as op.
  pinMode(Mute, OUTPUT);                // Set the switch pin as 1p.
  pinMode(Es, INPUT);                   // Set the switch pin as 1p. *****
  digitalWrite(Es, HIGH);               // turn on pullup r
  pinMode(Esled, OUTPUT);               // Set the switch pin as 1p 
  pinMode(Mute, INPUT);                 // set the switch pin as ip
  digitalWrite(Mute, HIGH);             // turn on pullup resistor
}
 void loop(){
  Fan1val = digitalRead(Fan1);            // read input value and store it in fan1
  Fan2val = digitalRead(Fan2);            // read input value and store it in fan2
  Esval = digitalRead(Es);                // read estop value and store value
 
  if ((Fan1val == LOW) && (Fan2val == LOW) && (Esval == LOW))
 
  {         
    delay (1000);                             // check if both inputs show fan OK (Switch is pressed)
    digitalWrite(Gasled, HIGH);               // turn green led on.
    digitalWrite(Relay, HIGH);                // turn on gas relay.
    digitalWrite(Buz,LOW);                    // buzzer off, no error
    digitalWrite(Fanfault,LOW);               // red led off no fault
                                           
  } else{   
    delay (1000);                               
    digitalWrite(Gasled, LOW);                // turn green OFF     
    digitalWrite(Relay, LOW);                 // turn off relay     **** Turn off Relay if fault has been greater than 30 seconds*****
    digitalWrite(Fanfault, HIGH);             // red led on
    digitalWrite(Buz, HIGH);                  // Alarm on            ****want to toggle this on/off only when fault, with the mute button *******               
   
    digitalWrite(Supfanled, Fan1val);          //fan1 status led
    digitalWrite(Extfanled, Fan2val);          //fan2 status led
    digitalWrite(Esled, Esval);                //estop status
   }}
 


hi,
im really struggling with my program and im stuck, all i need to finish my project is to add a mute to my alarm,  and a 30 sec delay to my relay.

finding it really difficuly to understand mills() to add a delay and boolean to make a mute button, hope someone could help me maby if i see the code it will help understand how these work and help me go faward
thank you
253  Using Arduino / Programming Questions / Re: help with boolean on: April 22, 2012, 10:06:55 am
Code:


             //    input and alatm circuit, if any inputs are on for more > 30 seconds alarm sounds, mute button to turn off alarm.
            
int InputA = 2;                    // input a
int InputB = 3;                    // input b
int Mute = 4;                      // mute button, low input
int Led = 5;                       // LED on pin 3
int Alarm = 6;                     // alarm sounds
int ABgood = 7;                    // healthy a and b inputs made.
int ABfail = 8;                    // FAIL a or b failed.
int InputAval;                     // val for reading input a
int InputBval;                     // val for reading input b

boolean running = false;


void setup(){
 
  pinMode(InputA, INPUT);         //input a input
  digitalWrite(InputA, HIGH);     //turn on pullup r
  pinMode(InputB, INPUT);         //input b input
  digitalWrite(InputB, HIGH);     //turn on pullup r
  pinMode(Mute, INPUT);           //mute push switch input
  digitalWrite(Mute, HIGH);       //turn on pull up r
  pinMode(Led, OUTPUT);           //led to show
  pinMode(Alarm, OUTPUT);         //alarm circuit.
  pinMode(ABgood, OUTPUT);        //lights up green led for healthy status.
  pinMode(ABfail, OUTPUT); }      //lights up red led for a fail.
  
void loop(){
  
  InputAval = digitalRead(InputA);            // read input value and store it in fan1
  InputBval = digitalRead(InputB);            // read input value and store it in fan2
  
  if ((InputAval == LOW) && (InputBval == LOW))
  
   {delay(1000);
    digitalWrite(ABgood, HIGH);               // a and b inputs are healthy.
    digitalWrite(Alarm, LOW);                 // no alarm
    digitalWrite(ABfail, LOW);                // no fail led lit                          
  }else{  
  
    delay (1000);                              
    digitalWrite(Alarm, HIGH);                 // Alarm sounds   ****want to MUTE/toggle this output****        
    digitalWrite(ABfail, HIGH);}               // fail led lit.
  
  
 
  if (digitalRead(Mute) == LOW)                 // switch is pressed - pullup keeps pin high normally
  
    delay(100);                                 // delay to debounce switch
    running = !running;                         // toggle running variable
    digitalWrite(Alarm, running); }             // indicate via LED
 





yes paul i see what you mean, looks more logical will take on board your advice thank you
254  Using Arduino / Programming Questions / Re: help with boolean on: April 22, 2012, 09:56:07 am
hi bill,
sorry i wasnt very clear im trying to make it mute until the error goes away, and to allow subsequent alarms to be sounded if the conditions occur
thank you
255  Using Arduino / Programming Questions / Re: help with boolean on: April 22, 2012, 09:06:50 am
ok points taken paul
will re post using your advice thanks
Pages: 1 ... 15 16 [17] 18 19 ... 21