Page 5 of 5 FirstFirst 12345
Results 41 to 48 of 48
Like Tree1Likes

Thread: Arduino Mega As Body Controller(BCM)

  1. #41
    Constant Bitrate AutoWiz's Avatar
    Join Date
    Jun 2013
    Location
    Pompano Beach, FL
    Posts
    173
    mauri, that is what the green led is for. to add an external diode would be redundant. I am quite certain the green led is of comparable spec to the 1n4007. and the resistor is I think 100 ohms by the color bands. what I NEED to know is what is the ideal transistor to use to have arduino drive a 12v relay. it doesn't need to switch fast, no pwm. but it does need to hold the relay closed for long periods of time.

  2. #42
    FLAC mauri's Avatar
    Join Date
    Jan 2004
    Posts
    1,046
    No.
    Led + R is absolutely not the same as using 1N4007.
    That led is only as a "spy" and not protect against voltage spikes during the switch contacts.
    100 ohms are too little to power a led with 12v,need at least 1k R on the Led.

    I have warned you.

    For transistor use a NPN darlington, but i suppose one simple BC337 is ok (500mA max by Collector)

    http://electronics.stackexchange.com...tomotive-relay
    Last edited by mauri; 07-05-2014 at 05:02 PM.

  3. #43
    Constant Bitrate AutoWiz's Avatar
    Join Date
    Jun 2013
    Location
    Pompano Beach, FL
    Posts
    173
    that diagram does not apply to what I am doing. the arduino board I am using for a controller can not directly control a 12v relay. I must use a transistor, and it will handle the load of the relay coil ground circuit. and the transistor gets a 1k ohm resistor to the base to limit current out of arduino board. this is the circuit I am creating 5x over: http://i.stack.imgur.com/gLLHX.gif and I don't understand 100ohms is too little power and I need 1k? sounds backwards, don't it? less ohms = more current, more power, no?
    Last edited by AutoWiz; 07-05-2014 at 05:59 PM.

  4. #44
    FLAC mauri's Avatar
    Join Date
    Jan 2004
    Posts
    1,046
    Obviously you have to use Arduino pin Out /resistance / Base of an NPN transistor!
    And Emitter to GND, Collector coil relay.

    For example, I use so with Pic uP:
    Pic Pin Output high level with firmware, 10K resistor to the Base of BC337, Emitter to GND, Collector coil relay, another pin coil relay to +12 V.
    1N4007 opposite state with respect to the voltage applied to the coil.

    Edit:
    for power one standard led with 12v, you have to use 1K resistor for limit the current, not 100ohms.
    Last edited by mauri; 07-05-2014 at 07:18 PM.

  5. #45
    Maximum Bitrate
    Join Date
    May 2012
    Location
    Grandville, MI
    Posts
    663
    Just so you know Autowiz, I am following because I think your project is cool. Not to find fault.

    The spikes in a vehicle over 12 volts have little to do with the charging system. More to do with different components turning on and off and such. Most are so fast you won't see them with a standard VOM. But they are damaging enough to cause issues with electronics not protected against them. Be aware that they are there.. I do not know enough about the electronics to be able to suggest a solution but I always try to use automotive grade components when I can.

    Same sort of thing happens in a standard house hold due to refrigerators turning on and off. You get surges and spikes there too that will eventually take out your TV and other electronic components if you do not run a surge suppressor. (I try to always run a UPS on my computers because of the spikes and voltage drops... In a vehicle a battery is designed to absorb most of the same things but doesn't happen instantaneously.)

    What you want to do is pretty simple to do with the transistors. I am sure you would do best to find an Arduino forum where people are building hardware. While you have car PC experts on these forums very few of us can say the same thing about Arduino's where there are thousands or more of people that are building things with Arduinos on a daily basis.

  6. #46
    Variable Bitrate
    Join Date
    May 2010
    Location
    Herákleion, Iraklion, Greece, Greece
    Posts
    347
    the car produces spikes all over the place.. its not the charging systems fault, it is just how the internals of it are build. i have used many relays on my car (like MANY), and none of them was ever for automotive use....
    some of them have been burned
    so yes, redhead is right. its better to add some kind of protection to them , no matter what. i usually, add a ressistor (of the same value as the coil , or a bit less), in series with the coil. that way, even with sparks, the current across coil is not that much

    as for how to drive the relay, i usyally use a generic NPN : 2N222 or AST222. you ABSOLUTLY have to add a diode , parallel to the coil. the cathode of the diode should be on the +12v of the relay, else the first time the relays de-energizes, its gonna fry the **** out of the transistors (becouse coils , produce voltage spikes of the opposite direction, when the current across them changes). the led wont do... better to be a schotky diode. i useually just add an 1N111

  7. #47
    Constant Bitrate AutoWiz's Avatar
    Join Date
    Jun 2013
    Location
    Pompano Beach, FL
    Posts
    173
    its all good guys. i post these threads because i am looking for input. and i am grateful for all of your feedback and thoughts. i totally understand about collapsing fields. after all it is what brings fire to the spark plugs. i just noticed that most automotive relays have diode built in. and these are automotive relays with led. so i thought that the led was doing the job of the diode as an led is a diode. i have a tool to measure these voltage spikes we speak of. i use this tool for ignition system diagnostics and regularly look at a waveform of a collapsing field. my tool is a snap-on vantage pro 2 channel lab scope. it goes up to 8 megasamples and shortest sweep is 50 microseconds. i use this tool to determine fuel pump, electric fan, or power window motor rpm. just by knowing how many segments are on the rotor. this tool is well worth every penny snap-on tools charges for it. http://www1.snapon.com/Files/Diagnos...ROBrochure.pdf

    Without input from this forum i would have trusted the led to fill in as the diode. i will now add a 1n4007 to all my relays. late last night i assembled my screen and mounted it into my bezel and stuffed it in my car. the ips panel looks awesome. but it is only temporarily sitting there as i still have to relocate a/c vents and re-route duct that is now blowing on the backside of the new monitor. i have also decided to dump the 5.1channel surround and install a regular head unit. the tradeoff is for functionality. i will gain a radio and a volume knob. oh, and the head unit i got is a cdless or mechless single din with 3.4" 720x480 touchscreen. it will go nice with my setup http://www.sonicelectronix.com/item_...Fc8F7AoduR4ATg i got mine off ebay but here is the first link to one i could find on google guys. this head unit is incredible! because it is mechless, it has very shallow mounting depth and is very cheap. has usb and sd input, and again, it is hd touchscreen. and will display 720p image. just at 3.4" is all. but it is a nice companion to a 7" touchscreen and even makes the 7" screen look big. kinda
    Attached Images Attached Images     

  8. #48
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,870
    Nice job

Page 5 of 5 FirstFirst 12345

Similar Threads

  1. Arduino as a touchscreen controller. Is it possible?
    By HiJackZX1 in forum General Hardware Discussion
    Replies: 2
    Last Post: 11-23-2012, 02:20 AM
  2. Arduino BT CarPC power controller
    By d_mc_a in forum Hardware Development
    Replies: 4
    Last Post: 03-18-2009, 10:20 PM
  3. Mega Squirt ECU monitoring
    By kraft in forum Linux
    Replies: 0
    Last Post: 07-28-2007, 08:29 AM
  4. MSI Mega 180
    By tczbu in forum Power Supplies
    Replies: 6
    Last Post: 09-26-2006, 12:46 AM
  5. MSI Mega anyone?
    By kd6icz in forum General Hardware Discussion
    Replies: 0
    Last Post: 06-16-2004, 01:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •