Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Analog Line Level Preamplifiers , Passive Pre-amps, Crossovers, etc.

Help with one button relay input switching
Help with one button relay input switching
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 18th January 2018, 11:47 AM   #21
satx is offline satx  United States
diyAudio Member
 
Join Date: May 2012
Location: San Antonio, Texas
Quote:
Originally Posted by Gusser View Post
You can use PNP but then everything is backwards so to speak.

The emitter goes to VCC.

The collector goes to the relay coil (+ side if any)

The other side of the relay coil is grounded.

The base needs a low value resistor in the hundreds of ohms range and turns on the relay by taking that resistor to ground or below 0.6v, opposite of the NPN version where the relay turn on by taking the resistor to V+.

You should pull the base up to VCC with about 47K to make sure it stays off when expected to.

You still need the diode with the anode to ground and the cathode to the PNP collector.

If still using the 4017, now you need and inverter for each relay driver. Far better IMO to just buy some 2N3904's. They cost pennies.
Thanks for the explanation. I'll just pick up some 2N3904's! The relay input board I'm using already has a diode for each relay (see the link in my first post) do I need another diode?
  Reply With Quote
Old 18th January 2018, 11:58 AM   #22
satx is offline satx  United States
diyAudio Member
 
Join Date: May 2012
Location: San Antonio, Texas
Quote:
Originally Posted by Mooly View Post
Missed your reply yesterday.

As the others have said, the transistor has to be NPN for simplicity.

You could use two PNP's plus another resistor per relay but then you more than double the component count.
No problem, I'll get the NPN's.

Just to clarify- I connect one lead of the a 5,6K resistor to pin Q1 on the 4017 and the other side of that resistor to the center lead of the transistor. One of the remaining transistor leads goes to ground and the other to one relay V+ in. Repeat for Q2 and Q3 and connect the reset on the chip to Q3. Right?


Thanks
  Reply With Quote
Old 18th January 2018, 05:55 PM   #23
Mooly is offline Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Help with one button relay input switching
Middle legs, left legs, right legs... no no no I can't work like that

Look at the data sheet for the transistors you are going to use. The base of the transistor connects via a resistor to the desired output pin of the 4017.

2N3904 Data Sheet

The collector of the transistor goes to the positive voltage supply.

The emitter drives the load, your relay. It is important to get the relay the correct way around if it has an integral diode. Get it wrong and the diode will short the supply out as the relay operates.

You should try rigging up one relay to the supply and make sure it works OK. Just one relay, one transistor and one resistor.

Then wire it to a transistor and make sure that the relay clicks on and off as you connect a 5k6 resistor from the base to the positive supply.
  Reply With Quote
Old 18th January 2018, 06:16 PM   #24
russc is offline russc  England
diyAudio Member
 
Join Date: Mar 2011
Location: W Yorkshire
ULN2003 chip to drive the relays is very cheap and simple - no base resistors, no diodes, all is included in the chip.
  Reply With Quote
Old 18th January 2018, 08:01 PM   #25
Gusser is offline Gusser  United States
diyAudio Member
 
Join Date: Feb 2014
Quote:
Originally Posted by russc View Post
ULN2003 chip to drive the relays is very cheap and simple - no base resistors, no diodes, all is included in the chip.
Yes, that is an excellent solution for this guy!
  Reply With Quote
Old 18th January 2018, 09:39 PM   #26
satx is offline satx  United States
diyAudio Member
 
Join Date: May 2012
Location: San Antonio, Texas
Quote:
Originally Posted by Gusser View Post
Yes, that is an excellent solution for this guy!
Ok, so which is the better solution? As I understand it the ULN2003 still needs arduino.
  Reply With Quote
Old 19th January 2018, 07:27 AM   #27
Mooly is offline Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Help with one button relay input switching
The 2003 is simply an array of transistors connected in a Darlington configuration. Its an ideal solution if you want to go that route.

The common diode pin of the chip would connect to the ground pin.
  Reply With Quote
Old 19th January 2018, 12:41 PM   #28
satx is offline satx  United States
diyAudio Member
 
Join Date: May 2012
Location: San Antonio, Texas
Quote:
Originally Posted by Mooly View Post
The 2003 is simply an array of transistors connected in a Darlington configuration. Its an ideal solution if you want to go that route.

The common diode pin of the chip would connect to the ground pin.
Ok, just so I'm clear.

The 2003 does need a logic input, correct? But no additional parts?

The 4017 doesn't need the Arduino, but will require a number of discrete parts.

It does sound like the 2003 might be the simpler, cleaner solution.
  Reply With Quote
Old 19th January 2018, 01:43 PM   #29
Mooly is offline Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Help with one button relay input switching
No Arduino needed for any for this.

Yes, the 2003 needs a logic input in the 5 to 15 volt range. No other parts needed for the 4017 beyond the switch and a resistor.
  Reply With Quote
Old 19th January 2018, 01:45 PM   #30
nigelwright7557 is offline nigelwright7557  United Kingdom
diyAudio Member
 
nigelwright7557's Avatar
 
Join Date: Apr 2008
Location: Carlisle, England
Switch into set/reset circuit (debounce's switch) then into D-type flip flop driving transistor into a relay.
__________________
PCBCAD51 pcb design software. 2018 version out now with lower prices >> http://www.murtonpikesystems.co.uk
  Reply With Quote

Reply


Help with one button relay input switchingHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Controlling a latching relay with a single button? curupa Parts 3 27th October 2012 06:18 AM
Question regarding Max. Switching rate push button for Class-D amp + accessories eladmi Class D 3 24th October 2012 12:08 AM
Switching loudspeaker with relay quietdragon Solid State 8 3rd November 2011 04:46 AM
need dpdt switching relay help subaruzero Parts 1 27th September 2006 07:27 PM
Relay switching circuit please jnewbold Solid State 10 3rd March 2005 06:39 AM


New To Site? Need Help?

All times are GMT. The time now is 01:16 PM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.00%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Copyright ©1999-2018 diyAudio
Wiki