Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.raspberry-pi > #12701

Re: control a relay from the pi via GPIO

From The Natural Philosopher <tnp@invalid.invalid>
Newsgroups comp.sys.raspberry-pi
Subject Re: control a relay from the pi via GPIO
Date 2016-07-12 09:20 +0100
Organization albasani.net
Message-ID <nm298t$8mp$1@news.albasani.net> (permalink)
References <nljpg6$me8$1@dont-email.me> <nllbra$3ga$1@dont-email.me> <nltq7o$8kj$1@dont-email.me> <nlttuo$m3v$1@dont-email.me> <nm28f3$62f$1@dont-email.me>

Show all headers | View raw


On 12/07/16 09:06, Björn Lundin wrote:
> On 2016-07-10 18:43, rickman wrote:
>>
>> Info on this module is scant.  Is there a reason why you don't trace out
>> the circuit so you know for sure what the circuit is?  It shouldn't be
>> that hard to do.
>>
>> If you only have one transistor, the circuit you have is most likely the
>> one Gordon is thinking of.  But it is always possible not.  Trace it out
>> and we'll know for sure.
>
> Yes, there is a reason. I'm a software guy,
> and although I do understand Ohms law,
> when it comes to transistors, I'm lost.
>
> So I would not know where to start.
>
>
>>
>> It can be used with the rPi if you use something to limit the voltage on
>> the I/O pin.  A blue, white or UV LED would be perfect for this.  As
>> long as the circuit on the relay board has a resistor in the path from 5
>> volts to the input pin, the LED can safely clamp the voltage at that pin
>> to about 3.3 volts protecting the rPi I/O.  Use an IR LED in series
>> between the rPi and the relay board and it will drop the excess voltage
>> so the visible LED won't cause the relay circuit to activate.
>>
>>            |                     |    Relay          _____
>>            |                     |    Module        /     |
>>            |          IR LED     |                |_     ---
>>   rPi      |           | /|      |               |/      Gnd
>> Header  -->>----+-----|< |------<<----\/\/\-----|  PNP
>> Output    |     |     | \|      |               |\
>>            |    _|_              |                 \
>>            |    \ /              |                 |
>>            |     V   Blue, White |                 |
>>            |   ----- or UV LED   |                 C||
>>            |     |               |                 C|| Relay
>>                  |                                 C|| Coil
>>                  |                                 |
>>                 ---                               ---
>>                 Gnd                             5 volts
>>
>> If the circuit on the relay board doesn't have the resistor on the base
>> you need to add it to your circuit, but I find that unlikely.
>>
>> The base-emitter junction of the transistor will drop 0.7 volts when
>> forward biased.  The IR LED will drop about 1.2 volts and the blue LED
>> will drop around 3.4 volts.  This adds up to more than 5 volts which
>> means only a very small current will flow (your goal) when the rPi
>> output is not pulling low.  This should not be enough to pull in the
>> relay.  If the relay still activates without being pulled low by the rPi
>> output, use a red LED in place of the IR (or add some series
>> resistance), but I'm pretty sure this won't be needed.  The relay needs
>> significant current to activate and the transistor only has so much gain.
>>
>> Just an idea to let you use this module with your rPi.  This circuit
>> works for a lot of 5 volt circuits as long as a small trickle current
>> won't trigger it.
>
> And this drawing is beautiful. However it is over my head.

It is also wrong.


> But I really appreciate the effort
>
> --
> Björn
>


-- 
“it should be clear by now to everyone that activist environmentalism 
(or environmental activism) is becoming a general ideology about humans, 
about their freedom, about the relationship between the individual and 
the state, and about the manipulation of people under the guise of a 
'noble' idea. It is not an honest pursuit of 'sustainable development,' 
a matter of elementary environmental protection, or a search for 
rational mechanisms designed to achieve a healthy environment. Yet 
things do occur that make you shake your head and remind yourself that 
you live neither in Joseph Stalin’s Communist era, nor in the Orwellian 
utopia of 1984.”

Vaclav Klaus

Back to comp.sys.raspberry-pi | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

control a relay from the pi via GPIO Björn Lundin <b.f.lundin@gmail.com> - 2016-07-06 22:24 +0200
  Re: control a relay from the pi via GPIO rickman <gnuarm@gmail.com> - 2016-07-06 16:45 -0400
    Re: control a relay from the pi via GPIO rickman <gnuarm@gmail.com> - 2016-07-06 17:03 -0400
      Re: control a relay from the pi via GPIO Dennis <dennis@none.none> - 2016-07-06 18:00 -0500
        Re: control a relay from the pi via GPIO Dennis <dennis@none.none> - 2016-07-06 21:10 -0500
          Re: control a relay from the pi via GPIO rickman <gnuarm@gmail.com> - 2016-07-06 23:55 -0400
            Re: control a relay from the pi via GPIO Dennis <dennis@none.none> - 2016-07-07 12:30 -0500
      Re: control a relay from the pi via GPIO Björn Lundin <b.f.lundin@gmail.com> - 2016-07-07 19:21 +0200
        Re: control a relay from the pi via GPIO rickman <gnuarm@gmail.com> - 2016-07-07 14:34 -0400
          Re: control a relay from the pi via GPIO Dennis <dennis@none.none> - 2016-07-07 17:10 -0500
            Re: control a relay from the pi via GPIO rickman <gnuarm@gmail.com> - 2016-07-08 00:29 -0400
        Re: control a relay from the pi via GPIO Björn Lundin <b.f.lundin@gmail.com> - 2016-07-12 10:18 +0200
          Re: control a relay from the pi via GPIO Rob Morley <nospam@ntlworld.com> - 2016-07-12 12:49 +0100
  Re: control a relay from the pi via GPIO Gordon Henderson <gordon+usenet@drogon.net> - 2016-07-07 10:44 +0000
    Re: control a relay from the pi via GPIO Björn Lundin <b.f.lundin@gmail.com> - 2016-07-10 17:40 +0200
      Re: control a relay from the pi via GPIO rickman <gnuarm@gmail.com> - 2016-07-10 12:43 -0400
        Re: control a relay from the pi via GPIO Björn Lundin <b.f.lundin@gmail.com> - 2016-07-12 10:06 +0200
          Re: control a relay from the pi via GPIO The Natural Philosopher <tnp@invalid.invalid> - 2016-07-12 09:20 +0100
          Re: control a relay from the pi via GPIO rickman <gnuarm@gmail.com> - 2016-07-12 04:23 -0400
            Re: control a relay from the pi via GPIO The Natural Philosopher <tnp@invalid.invalid> - 2016-07-12 09:58 +0100
    Re: control a relay from the pi via GPIO Graham. <graham-usenet@mail.com> - 2016-07-11 23:10 +0100
  Re: control a relay from the pi via GPIO Graham. <graham-usenet@mail.com> - 2016-07-08 21:45 +0100
    Re: control a relay from the pi via GPIO Björn Lundin <b.f.lundin@gmail.com> - 2016-07-10 17:26 +0200
      Re: control a relay from the pi via GPIO Graham. <graham-usenet@mail.com> - 2016-07-11 22:13 +0100
        Re: control a relay from the pi via GPIO Björn Lundin <b.f.lundin@gmail.com> - 2016-07-12 10:00 +0200
  Re: control a relay from the pi via GPIO Big Bad Bob <BigBadBob-at-mrp3-dot-com@testing.local> - 2016-08-18 10:08 -0700
    Re: control a relay from the pi via GPIO rickman <gnuarm@gmail.com> - 2016-08-18 16:40 -0400

csiph-web