Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Embedded Loop on: November 24, 2012, 04:18:16 am
Hi guys, I have my CO sensor hooked up and managed to write a PWM duty cycle for 1.4 and 5 volts. Right now I am getting an analog readout of the CO level every 2 1/2 minutes. Is there a way to embed a loop in the my code to give analog pin 0 a readout every 1 seconds during both duty cycles?
Here is my code...

int coPin = 9;    // CO Sensor connected to digital pin 9
void setup() {
  Serial.begin(9600);
}

void loop()  {
  // Define 5 Volt Value
  int HighValue = 255 ; 
    // Sets the 5 Volt Value
    analogWrite(coPin, HighValue);         
    int sensorValue = analogRead(A0);
    Serial.println(sensorValue);
    delay(60000UL);                           
   

  // Define 1.4 Volt Value
  int LowValue = 73 ;
    // Sets the 1.4 Volt Value
   analogWrite(coPin, LowValue);       
    delay(90000UL);   
   
  }



Thank you !!!




2  Using Arduino / Project Guidance / Re: LED Gurus? on: November 21, 2012, 06:02:54 am
So would this battery give me 28 hrs of run time?
http://www.amazon.com/Venom-Group-International-4000mAh-Universal/dp/B000W7WWFW/ref=sr_1_4?ie=UTF8&qid=1353495538&sr=8-4&keywords=li-po+battery+11.1v+and+charge
3  Using Arduino / Project Guidance / Re: LED Gurus? on: November 20, 2012, 10:06:20 pm
I also have a ton of AA Eneloops - plus chargers for those, was thinking a caddy with 8 of those would give me 9.6 volts. This would probably be better than the 9 volts correct?
4  Using Arduino / Project Guidance / Re: LED Gurus? on: November 20, 2012, 09:33:52 pm
An IR Illuminator to connect to a Sony Handycam with nightvision. Probably won't ever be turned on for more than a few mins at a time.
5  Using Arduino / Project Guidance / Re: LED Gurus? on: November 20, 2012, 07:52:50 pm
I have several 9 volt rechargeables and a charger.
6  Using Arduino / Project Guidance / Re: LED Gurus? on: November 20, 2012, 06:52:54 pm
I think I have the answer to my own question, I could use two 9 volt batteries in parallel to double the life and remain at 9 volts without adding much bulk to the project.
7  Using Arduino / Project Guidance / Re: LED Gurus? on: November 20, 2012, 06:01:21 pm
If I would only get 30 mins or so out of the 9 volt battery are there any longer life battery alternatives that would still be feasible to carry around attached to a small 3 inch x 2 inch project box?
8  Using Arduino / Project Guidance / LED Gurus? on: November 20, 2012, 05:40:15 pm
Hey guys - how is everyone doing? Was hoping I could get some direction in setting up an array of 940nm 8mm LEDs. I watched a few YouTube Videos and found a guy that used 850nms and gave the specs to wire them in series but I want to be sure I understand the specs on the LEDs I am purchasing. Here is are the specs of the units.


    Wavelength : 940nm
    Vf: 1.4~1.5V
    Vr: 5V
    If: 140mA
    Ipusle: 700mA
    Power Dissipation:200mW
    Tjun: 125'C
    Tsol: 5second @ 260'C
    MCD=50@ 350mA, MCD=70@400mA
    Angle: 30'

 
I also found an LED Calculator online here: http://led.linear1.org/led.wiz

Am I correct in assuming that diode forward voltage is 1.4 (or 1.5 which should I use?)V and diode forward current is 140ma? I would like to use 5 of these in series with a 9 volt battery and I am trying to determine which size resistor I would use to prevent destroying the LEDs. If anyone could tell me what the abbreviations on the specs mean I would appreciate it. Thanks guys!
9  Using Arduino / Project Guidance / Re: CO Alarm on: November 18, 2012, 08:32:46 pm
The voltage reading I get from my ATX PS wires indicates 12.7 volts on the DMM. I just found in my POP (pile of parts) a 2N4401. I "think" this may be enough to trigger the relay if I can figure out how to wire it. Looking at the specs for the 4401 it should handle up to 600ma from the ARD (which I've read it only takes about 200ma to trigger a relay) and the 4401 can handle up to 40v out which should definitely be enough power. Time to start probing with the DMM again ....
10  Using Arduino / Project Guidance / Re: CO Alarm on: November 18, 2012, 07:24:24 pm
Well guys I put some juice into it.... and.... I don't think 5 volts is going to drive the relay... I need a different relay or transistor. I put a 2N3904 in the equation and nothing. I did test the relay by putting the 12v PS to the coil terminals and it's clicking so it's a good relay. Now with my completely non-existent electrical background I need to figure out exactly which parts I need. The voltage on the relay says both the NO and the NC are 14 volts. Do they make relays that one is like 5 volts and the other is 12?
11  Using Arduino / Project Guidance / Re: CO Alarm on: November 18, 2012, 03:21:06 am
Thanks Hazard, I found this YouTube video -


It actually matches my relay exactly and makes me see your previous explanation... it totally clicks now (pun intended) :-) Do I connect a ground wire from ARD AND the Horn to neg on the coil?
12  Using Arduino / Project Guidance / Re: CO Alarm on: November 18, 2012, 03:05:13 am
           87 |

| 86     87a|      85 |

           30 |

87a (Center Prong) Reads 2 1/2 ohms with DMM.


       
13  Using Arduino / Project Guidance / Re: CO Alarm on: November 18, 2012, 01:21:19 am
Sorry about the picture quality... my daughters took my AA batteries out of the good camera (without telling me of course lol) so I had to use my cell phone.
14  Using Arduino / Project Guidance / Re: CO Alarm on: November 18, 2012, 01:20:17 am
To  me it appears it is a dual outlet... in my mind the diagram indicates that if the horn is connected to either 85 or 86 and the Arduino to 87a (center prong) then when the relay receives the 5 volts from the Arduino it will pull the contact closed to complete the circuit for the coil on either 85 or 86. Just when I think I see what is going on I start looking at it from a different viewpoint ... I think I will splurge a few bucks on a couple of optoisolators that way I will know for a fact that I am keeping the 5v side completely away from the 12v side so I can afford a few screw ups and maybe learn something in the process. I've been doing ok with the Arduino sketches that lead me through step-by-step like a recipe but venturing into something like this is all new to me. Thank you guys for being so patient.
15  Using Arduino / Project Guidance / Re: CO Alarm on: November 17, 2012, 11:38:50 pm
Thanks Dan, I have a DMM and checked the posts... I have 78 ohms between 85 and 86, and 2.5 ohms between 87a(center pin) and 30. 87 pin gives no reading with any combination of the others. So as I suspected 85 and 86 is the coil and I'm guessing 30 would be the 12v pos in and 87 would be the Arduino connection in the NC configuration.. when my code sends a HIGH signal to 87 it will complete the connection? Does this sound right? I take the ground from the ATX PS and connect it to my Arduino ground. I'm starting to understand but just afraid to connect it all and throw some juice into it lol.
Pages: [1] 2