0

This is basically an off-shoot from https://arduino.stackexchange.com/questions/20569/unexpected-output-pin-behavior-was-relay-on-off-doesnt-loop. It's the same schematics and so on, however, I'm now wondering what the output voltage and current is.

I've a 9V battery and the MOSFET transistor from the arduino starterpack (doesn't say the specs) connected to the 5V pin on the board. I need the following output current/voltage for it to activate a solenoid:

  • 6V: 160 mA
  • 7V: 190 mA
  • 8V: 220 mA
  • 9V 240 mA
  • 10V :270 mA
  • 11V :300 mA
  • 12V :320 mA

and I'm just not sure how to calculate it since I'm not sure about the output from the transistor and all the way to the solenoid.

The solenoid: http://www.electrokit.com/en/plastic-water-solenoid-valve-1-2-12v.51108

It should be solenoid instead of relay in the schematics

  • Your transistor is backwards: you should ground the emitter and connect the collector to the solenoid. Also, put a few hundred ohms between it's base and the Arduino output. – Edgar Bonet Apr 13 '16 at 9:28
  • In fact he says it's a mosfet, so even the schematic symbol is wrong. Now.. Can you rephrase the question so that we can understand what is the question? I mean, what are those numbers? You said you have a 9V battery, so what is 6V? and 12V? And if your question is "will the transistor be able to let 240mA pass?" the answrer is "it depends". Usually it can, because that current is quite low, but you will have to read its specifications (aka datasheet) to be sure.. – frarugi87 Apr 13 '16 at 9:33
  • the transistor is connected as: (left) gate to pin 9, (middle) drain to the solenoid, (right) source to gnd. I thought the schematics would help even with errors in it but maybe it caused more confusion instead! The numbers are the current and voltage needed for the valve-solenoid to open/close., "relay" in the image.. ugh, another error – Lennart Apr 13 '16 at 9:42
2

You don't need to "calculate" anything with a MOSFET. You will be using it in the saturation zone. That means it is fully turned on and will allow through the current you need.

However, the gate of a MOSFET looks, to all intents and purposes, like a small capacitor. That means there will be a certain amount of inrush current to the gate when you turn it on. To limit that inrush current you need a small resistor (say 100-220Ω) on the gate.

When using a BJT, though, you need to ensure that you allow enough current through the base to allow enough current through the collector. Divide the current you need through the collector by the Hfe (typically 100 for a small signal transistor) and that is the minimum current you need to allow through the base. Subtract a silicon junction voltage (0.6V) from the voltage of the IO pin (5V). Divide it by your base current calculated above, and that is the maximum resistor you can use on the base.

And also your transistor symbol in your schematic is backwards.

  • I think it works better now than before when I added a 220Ohm resistor. Not sure if it's the solenoid that doesnt open enough when I connect it to a valve so perhaps it's the solenoid that is broken or bad quality – Lennart Apr 13 '16 at 11:19
  • Ok, so the retailer told me that a 9V battery is too weak because of the inner resistance. I need something like electrokit.com/en/timer-1s60h-startstop.50293 – Lennart Apr 13 '16 at 11:31
  • 1
    9V PP3 batteries are not suitable for anything. I rue the day someone first posted a tutorial online using one with an Arduino. If you must use batteries, use AAA or AA batteries (6), or a 7.4V LiPo. – Majenko Apr 13 '16 at 11:34
  • Oh, I actually used the arduino starterpack guide tutorial 09 - motorizzed pinwheel, although I removed some stuff and switched the DC motor out for a the solenoid, and they are using a 9V batteri. In any case, I'll try it out with another battery say amazon.co.uk/Duracell-MN21-A23-12V-Batteries/dp/B001PAZU0Y – Lennart Apr 13 '16 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.