Offline
Newbie
Karma: 0
Posts: 26
|
 |
« on: November 15, 2012, 03:07:14 pm » |
Hi guys... new to the forum and new to Arduino... ok I could have sworn I posted this around 3am but then I must be dreaming because for the life of me I can't find my post. I am trying to connect a motorcycle air horn (12 volts) to my Arduino so that when a carbon monoxide sensor variable exceeds a predefined level it sends an output signal to complete a 12v connection to the horn and sounds an alarm loud enough for the whole house to hear. I know I can't supply 12v from the board but can I use an H-Bridge I have to control a stepper motor (don't know the number off hand since I'm not at home at the moment). I also have a relay that came with the horn. Can I just use a relay without and voltage coming back into the Arduino and frying it or a combination of both? I'm sure I may need some resistors in there somewhere just not sure of the basic layout. Right now I haven't received the CO detector yet since it is coming from China and may get here some time next year lol ... however in the meantime I do have some photo resistors, pots etc to use as input devices to write the basic program. I will be glad to provide more specific information later when I have it available to me but if anyone can nudge me in the right direction working with the few items I have I would greatly appreciate it. Thank you!
|
|
|
|
|
Logged
|
|
|
|
|
Topsham, Vermont USA
Offline
Edison Member
Karma: 11
Posts: 1350
... in The Woods In Vermont
|
 |
« Reply #1 on: November 15, 2012, 03:13:09 pm » |
Hi, I'd seriously think about using optical isolation between the Arduino and the high-power stuff. Could be relays like these: http://goo.gl/3mXu0 (Also see the schematics on their pages) Or do you own with opto-isolator chips. See http://arduino-info.wikispaces.com/Popular-ICs and scroll down to the Opto stuff... DISCLAIMER: Mentioned stuff from my own shop...
|
|
|
|
|
Logged
|
|
|
|
|
Queens, New York
Online
Edison Member
Karma: 27
Posts: 1549
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #2 on: November 15, 2012, 03:20:18 pm » |
I know I can't supply 12v from the board but can I use an H-Bridge I have to control a stepper motor (don't know the number off hand since I'm not at home at the moment). Why would you do that? Just use a relay. Use the arduino to trigger the relay to pick, and have the 12V wired to the common and the other connetion to the horn. Test with a simple button or something else, if you get a signal the horn should activate.
|
|
|
|
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 26
|
 |
« Reply #3 on: November 15, 2012, 03:28:08 pm » |
Thanks Hazard ... that's why I said "I also have a relay that came with the horn. Can I just use a relay without and voltage coming back into the Arduino and frying it" in my first post... it's been ages since I've messed with electrical components but I do remember the purpose of a relay is to use a smaller current (and wiring) to send a signal to switch on a higher current. Just couldn't remember if the relay might have any kind of back flow to the board. So it's as simple as a pinout signal to the relay?
|
|
|
|
|
Logged
|
|
|
|
|
Queens, New York
Online
Edison Member
Karma: 27
Posts: 1549
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #4 on: November 15, 2012, 03:53:42 pm » |
|
|
|
|
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 26
|
 |
« Reply #5 on: November 15, 2012, 04:05:23 pm » |
I believe I have some Schottky diodes around here ... would they be sufficient? I also have some http://www.datasheetcatalog.org/datasheet/diodes/ds28009.pdf
|
|
|
|
« Last Edit: November 15, 2012, 04:31:36 pm by brhyaa729 »
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 9
Posts: 767
|
 |
« Reply #6 on: November 15, 2012, 04:49:35 pm » |
That diode will be fine. It needs to have a Peak Reverse Voltage rating above the relay's coil voltage, and a Forward Current rating greater than the coil current. In order to drive the relay directly from the Arduino, the relay coil voltage should be 5V (a 12V coil won't work) and the activation current (coil current) needs to be 40mA or less. FYI - You don't need a microcontroller or programming if all you want to do is turn on/off an alarm based on the CO level.  Assuming the CO sensor has an analog output, you can use an op-amp as a comparator and the same sort of driver/relay for the alarm.
|
|
|
|
|
Logged
|
|
|
|
|
the land of sun+snow
Offline
Edison Member
Karma: 79
Posts: 2105
|
 |
« Reply #7 on: November 15, 2012, 05:01:52 pm » |
If you google "gas sensors", you'll find many places to buy in the USA. Figaro makes many, and has data online.You'll probably also have a 10X better idea of what you actually have bought. If you're really lucky, China might include a datasheet.
|
|
|
|
|
Logged
|
Murphy's Corollary: the "real" problem is usually what they don't tell you about, which leads to endless second-guessing. m
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 26
|
 |
« Reply #8 on: November 15, 2012, 05:02:35 pm » |
Thanks guys for the help ... I know the really simple solution would be just buy a CO Detector on Amazon but that would take all the "fun" out of it lol .... thanks again.
|
|
|
|
|
Logged
|
|
|
|
|
the land of sun+snow
Offline
Edison Member
Karma: 79
Posts: 2105
|
 |
« Reply #9 on: November 15, 2012, 06:10:00 pm » |
If this is for your robot, then experimenting is fun. haven't received the CO detector yet since it is coming from China Gives me the willies. If this is for your house, and you want to keep your family safe, you're better off going to Walmart or Home Depot or the local hardware store, and buying an approved CO detector. I certainly wouldn't buy something like this cut-rate from China for use in the baby's bedroom.
|
|
|
|
« Last Edit: November 15, 2012, 06:12:03 pm by oric_dan(333) »
|
Logged
|
Murphy's Corollary: the "real" problem is usually what they don't tell you about, which leads to endless second-guessing. m
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 26
|
 |
« Reply #10 on: November 15, 2012, 06:39:41 pm » |
No, not for any "real" protection ... I have a propane heater I use in the garage once in a while and I am the only one out there tinkering. I never let it burn more than 10 mins and always leave the door up a few inches just to be sure. Just more of a "tinker" thing.
|
|
|
|
|
Logged
|
|
|
|
|
the land of sun+snow
Offline
Edison Member
Karma: 79
Posts: 2105
|
 |
« Reply #11 on: November 15, 2012, 08:41:41 pm » |
Since it's you, it's ok, but we don't want no babies with blue lips and finger nails around here.
|
|
|
|
|
Logged
|
Murphy's Corollary: the "real" problem is usually what they don't tell you about, which leads to endless second-guessing. m
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 26
|
 |
« Reply #12 on: November 16, 2012, 05:27:30 am » |
Well between 1978 and now I've had 5 babies and have managed to not fry or gas any of them so I'm 0 in 5 in that category haha. I think it's great that you guys share your knowledge and we all enjoy "playing" with our Arduinos. Since I am new to this where do you guys prefer to order your parts? I'd like somewhere in the U.S.A. that is priced reasonably with fast shipping and good customer service. Of course I'd pay slightly more providing the last two criteria were exceptional.
|
|
|
|
|
Logged
|
|
|
|
|
Topsham, Vermont USA
Offline
Edison Member
Karma: 11
Posts: 1350
... in The Woods In Vermont
|
 |
« Reply #13 on: November 16, 2012, 09:02:32 am » |
where do you guys prefer to order your parts? As you mentioned you don't get good, fast and cheap at once... Paying for DHL/FEDEX (about $17 for a physically small order) will get you fast (2 to 5 days) from China. Some Ebay sellers will do it. DISCLAIMER: Mentioning stuff from my own shop...!! Leave now if you want :-) I am trying to provide Good, Cheap (on-the-Shenzhen-Street prices) and Fast-If-You-Want with http://YourDuino.com PLUS lots of How-To on the http://ArduinoInfo.Info WIKI. Plus a live (if aged) Engineer who answers Customers's questions. I'm having fun, being very busy, and making a little money added to Social Security so I can buy my wife an Iphone for Christmas. Don't tell her! Seriously, please critique the WIKI, suggest new topics, and pass the link along. It's at about 2000 hits a day, which motivates me to keep on adding to it.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 0
Posts: 427
"In this house, we obey the Laws of Thermodynamics" Homer J. Simpson
|
 |
« Reply #14 on: November 16, 2012, 10:56:10 am » |
I am a little off topic but, out of interest, how does a CO detector work?
I can figure out roughly how a smoke detector might work but telling the difference between CO and N2, O2, Ar, and CO2 seems like a neat trick.
Is is a chemical reaction, can the detector be used multiple times?
|
|
|
|
|
Logged
|
|
|
|
|
|