0

I found many disussions on the internet regarding this issue, but as an engineering noob I cannot get a proper circuit working :(

What I want to achieve: I want to control the ignition line of a car by small chip. The ignition therefore has to be connected to the 12V car battery. The chip's output pins only provide 3.3V @ ~10mA.

I thought of a 3V relay (e.g. G5V1-3), but this requires more than 10mA of power. What's the best/easiest/cheapest solution to this? Power consumption should be <0.1mA when the circuit is off. I would like to keep the car's and chip's circuits as independent as possible (that's why I thought of a relay). Toggling frequency is <10Hz.

Thank you!!

  • There are optoisolated relay modules that need only a logic signal and a drive voltage. – ratchet freak Jun 14 '18 at 11:39
  • Do you want the best solution or the easiest solution or the cheapest solution? The best solution is probably not the cheapest, depending on your definition of "best". – Elliot Alderson Jun 14 '18 at 11:44
  • "10mA of power" and "Power consumption should be <0.1mA" are not promising. –  Jun 14 '18 at 11:44
  • @ratchetfreak Do you have an example? Most modules require 5v I think and are quite big. I would prefer a small one. – Tobias Mai Jun 14 '18 at 11:44
  • @ElliotAlderson the easiest, so I don't have to buy 100 different things. And it should be small (space is limited). – Tobias Mai Jun 14 '18 at 11:47
  • @replete Power consumption when the module (eg relay?) is not powered. I found some modules consuming a lot of power while my chip is powered off. Obvisously I don't want the car battery to get empty when I don't use the car for some months. – Tobias Mai Jun 14 '18 at 11:47
  • Power is not measured in amps. Regarding your previous comments, "big" and "small" are useless, give an approximate maximum allowable size. –  Jun 14 '18 at 11:49

1 Answers1

2

I thought of a 3V relay (e.g. G5V1-3), but this requires more than 10mA of power.

enter image description here

Most folk would use a 12 volt relay coil controlled via a BJT like the above. Power is measured in watts or mW; Current is measured in amps or mA etc..

The diode is to protect the transistor when it deactivates the relay and magnetic stored energy is pushed back into the circuit.

Andy aka
  • 434,556
  • 28
  • 351
  • 777
  • 1
    T1 could be a power MOSFET for lower dissipation. However, you have to make sure the threshold is under about 2V. – Cristobol Polychronopolis Jun 14 '18 at 12:24
  • @CristobolPolychronopolis it certainly could but I'm guessing the op is comfortable with relays and it would work with relays by the sounds of it. Going straight to a MOSFET would be my personal choice but may be a step too far for the OP. – Andy aka Jun 14 '18 at 12:27
  • Thanks! And how do I know which transistor (or MOSFET?) and diode fits? Never worked with anything like that before. – Tobias Mai Jun 14 '18 at 12:49
  • 1
    Virtually any regular transistor will do and ditto for the diode. What do you have available? What distributors do you have dealings with? – Andy aka Jun 14 '18 at 14:21
  • @Andyaka Currently I don't have any transistors at home, so I'll have to be some. I saw many circuits using the 2n2222, so what about them? And i only have 1N4007 diodes, are they ok? Could the second circuit in the first answer of [this question](https://electronics.stackexchange.com/questions/233205/npn-transistor-to-run-12v-0-5a-from-3-3v-4ma) solve my problem? Thank you so much for your help! – Tobias Mai Jun 14 '18 at 19:07
  • The 2N2222 is fine and so is the 1N4007. For the resistor in series with the base go for a 1 kohm as shown. – Andy aka Jun 14 '18 at 21:17
  • Ok, thanks. And it doesn't matter which relay I use, right? – Tobias Mai Jun 14 '18 at 22:21
  • I'd stick with the G5V1 range if it suits your contact current specifications and durability requirements. You might want to add a snubber across the contacts too so that arcing is reduced thus prolonging life. – Andy aka Jun 15 '18 at 08:35
  • Ok. But as the G5V1-3 is a 3V relay, I would use the 3.3V power source instead of course. How did you calculate the resistors value (1 kOhm)? This might change when I use 3V instead of 12V, right? – Tobias Mai Jun 15 '18 at 11:43
  • With a 3 volt logic level and a 1 kohm resistor, the base will be driven without about 2.3 volts / 1000 ohms = 2.3 mA. The current gain of the transistor can be reasonably be expected to be 20 when switching so it could deliver 46 mA to the relay AND providing the relay coil resistance and higher voltage power source don't demand a current in excess of 46 mA you are good to go. – Andy aka Jun 15 '18 at 13:20
  • Sounds reasonable. But doesn't that mean: The higher the value of the resistor, the better? – Tobias Mai Jun 16 '18 at 14:22
  • Base resistor or coil resistance? – Andy aka Jun 16 '18 at 15:04
  • The base resistor? Here is what I got based on your image and explanations for a 3V relay. Would this work? [Circuit diagram "3.3V to 12V via Relay"](http://fs1.directupload.net/images/180617/34mgbuob.png) – Tobias Mai Jun 17 '18 at 08:19
  • What is the coil resistance and pull-in voltage of the relay? It might work but it's less certain than with a 12 volt relay. Maybe link the relay data sheet? – Andy aka Jun 17 '18 at 18:24
  • I think lowering the 1 kohm to 470 ohm would be advisable. – Andy aka Jun 17 '18 at 18:27
  • Ok, so I used a 12V relay based on your circuit. [This](https://i.imgur.com/s9uk03Y.png) should work, right? Input (left) is 3.3V ~6mA, power supply is 12V (black/red wires) and the output (right) should be 12V, up to 7A. – Tobias Mai Jun 19 '18 at 14:48
  • Black is 0 volts and red is 12 volts and the AZ9375-1A-12DF should do the job. Double check that the relay coil polarity isn't important just in case. Some use internally a magnet to help things along and polarity IS important when driving the coil. I don't think it has a polarity but double checking isn't going to hurt. – Andy aka Jun 19 '18 at 15:04
  • @Andyaka Thanks again! It took some time to build four of these relay modules. Two of the modules (exactly built from wiring diagram) work whereas two of these relay circuits don't. I think this has to do with current consumption (current peaks?). When I drive the input high (3.3V), the relay switches on but goes off immediately. I have to reset the chip (MCP23017) afterwards, so I think the relay/transistor requires too much current (MCP datasheet says 25mA per relay max.)... Is there a workaround for this? Thank you so much and sorry for bothering you... – Tobias Mai Jun 26 '18 at 21:01
  • This sounds like it might be a PCB/layout problem or an EMC issue. I would consider raising a new question (with a link back to this one) that shows how your layout looks and contains a bigger picture of your schematic. – Andy aka Jun 27 '18 at 08:46
  • You were right. I put a capacitor between Vcc and Vdd and used a smaller/stronger pullup resistor on the RESET pin. Thanks :) – Tobias Mai Jun 27 '18 at 20:59
  • Good result and good work. – Andy aka Jun 28 '18 at 08:46