Author Topic: Circuit design to hold one relay and pulse another and the reverse  (Read 1814 times)

0 Members and 1 Guest are viewing this topic.

Offline money2billsTopic starter

  • Newbie
  • Posts: 5
  • Country: us
Hello,

I am looking for some advice. I would like to build a circuit with two buttons, after pressing the first button relay one would turn on for two seconds and pulse relay two one second after relay one was switched on. Then for the second button, relay two will turn on for two seconds and relay one will pulse a second after relay two is switched on.

I have been looking into using a 555 time for delays and creating this circuit. I would like to know if this is a good starting point for what I would like to accomplish?

If there is a simpler way to accomplish my goal here can you please let me know what I should look into. Relay one and relay two in this example will change the resistance of another circuit to the desired resistance momentarily.


Thank you for any advice and help getting me on the right path.
 

Offline Steffalompen

  • Contributor
  • Posts: 31
  • Country: no
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #1 on: December 07, 2021, 01:45:30 am »
Probably doable with several 555s, but oof. For once I'm going to suggest an Arduino.
 

Offline SmallCog

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: au
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #2 on: December 07, 2021, 01:54:35 am »
I'd be using an arduino (or similar) for this

UNLESS it's something related to safety. I don't trust cheap micros and my own code with the safety of people.

Might not be a safety thing but it just sounds like some sort of industrial process or something

If it is use a proper industrial PLC
 

Offline money2billsTopic starter

  • Newbie
  • Posts: 5
  • Country: us
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #3 on: December 07, 2021, 02:04:26 am »
Thank you Steffalompen and SmallCog for the advice. I will continue to try to make this work with 555 chips.
 

Online themadhippy

  • Super Contributor
  • ***
  • Posts: 2565
  • Country: gb
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #4 on: December 07, 2021, 02:06:53 am »
How about coming at it from a different direction,1 timer for your 2 second on time and a second timer to give the one second delay. 1 switch selects which timer goes to which relay and the other button starts the timer
 

Offline AndersJ

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: se
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #5 on: December 07, 2021, 03:09:03 am »
This sounds like a XY problem.
https://en.wikipedia.org/wiki/XY_problem
Perhaps it is better to describe what you are trying to design.
"It should work"
R.N.Naidoo
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 3035
  • Country: us
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #6 on: December 07, 2021, 03:28:33 am »
I agree an Arduino is the easiest way to do this.

You might find using CMOS logic easier to design with than 555 timers. At the end of this page

http://www.talkingelectronics.com/ChipDataEbook-1d/html/74C14.html

there is a circuit which seems to do exactly what you want with a single hex inverter chip:



Conceptually it works like this: the first two inverters produce a pulse when the button is pressed and released. The pulse output (pin 4) is sent to a rising edge detector and a falling edge detector. Each of these detectors controls a relay. You can control how long each relay is kept on for through the 1 Meg pots.

 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #7 on: December 07, 2021, 03:29:09 am »
This is one of those cases I'd definitely just throw a small microcontroller at. Something cheap like a ATTINY12 or whatever is the cheapest most readily available 8 pin part you can get. It's about 10 lines of code that even an absolute beginner could write fairly easily. It's only one notch above a blinking LED "Hello World" program.
 

Offline money2billsTopic starter

  • Newbie
  • Posts: 5
  • Country: us
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #8 on: December 08, 2021, 12:09:31 am »
As requested a better description of what I am trying to do. There are two wires (signal wires) that detect the current change when the resistance of the wires are changed. I was able to determine the proper resistance for each wire and the resistor in parallel.

Relay one and two will close when energized by the trigger wire to change the resistance for that signal wire. The added complication is one relay will need to be held energized and while that relay is held on the second relay needs to pulse quickly on and off. Then both relays can return to the normally open position. Both relay one and two will be normally open when not triggered.

Picture of the circuit is added below to illustrate what I am doing. I like the idea several of you have mentioned of using a small microcontroller.

Will the ATTINY85 work well for this purpose? Looks like I can buy one and attempt to create a circuit/code relatively cheaply on Amazon and other websites. 

Do these ATTINY85 chips pull much power when idle and not in use?

Thank you again to everyone for the advice so far.





« Last Edit: December 08, 2021, 12:13:28 am by money2bills »
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 3035
  • Country: us
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #9 on: December 08, 2021, 02:12:32 am »
Will the ATTINY85 work well for this purpose? Looks like I can buy one and attempt to create a circuit/code relatively cheaply on Amazon and other websites. 

Yes, but get an Arduino Uno or an Arduino Nano - it will be a lot easier to program them.

Quote
Do these ATTINY85 chips pull much power when idle and not in use?

Generally no, but everything is relative. What do you consider "much"? What's your power source - batteries or an AC adapter?
 

Offline Steffalompen

  • Contributor
  • Posts: 31
  • Country: no
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #10 on: December 08, 2021, 02:15:17 am »
The Attiny85 should do fine.
It uses 1mA at 1MHz and 200uA in sleep mode.
-ish.

But I found it quite the learning curve compared to the Arduino infrastructure.
« Last Edit: December 08, 2021, 02:21:39 am by Steffalompen »
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #11 on: December 08, 2021, 02:23:49 am »
A Tiny85 is massive overkill but it will work if that's what you can get. I typically use a Tiny13a for simple stuff like this, they were the cheapest AVR I could find at the time I bought a handful of them.

It's possible to get the standby power down to microamps, I have some battery powered projects that get well over a year from a CR123A cell. You have to run directly from the battery though to do that, the quiescent draw of a typical linear regulator will dwarf what the micro draws when idle. The key is to have it spend most of its time sleeping and then use a timer interrupt to wake it up periodically.

The Arduino ecosystem supports the Tiny85 directly, and there is a way to use the smaller AVRs too if you prefer to use that instead of C.
 

Offline Steffalompen

  • Contributor
  • Posts: 31
  • Country: no
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #12 on: December 08, 2021, 12:12:53 pm »
Whenever I hear mention of the 85 I always assume eBay chips and/or the Arduino adaptation you mention.
I like to go with the smallest possible for sport and to get into a mindset of mass production.
But I don't see why to save a dollar on a one-off beginner home project, especially with an Arduino as an alternative.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #13 on: December 08, 2021, 01:29:42 pm »
I'd be using an arduino (or similar) for this

UNLESS it's something related to safety. I don't trust cheap micros and my own code with the safety of people.

Might not be a safety thing but it just sounds like some sort of industrial process or something

If it is use a proper industrial PLC
I would trust an Arduino over a 555, which is very prone to spurious triggering.

If it's for safety, use a safety PLC, with the appropriate performance level.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3341
  • Country: nl
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #14 on: December 08, 2021, 01:52:42 pm »
I do not recommend using such a small microcontroller.
It does not have any advantage compared to somewhat bigger microcontrollers.

Even though I despise arduino, the "arduino nano" is a quite usable microcontroller board, and easy to work with on a breadboard or on matrix board.

Price is low enough so you can easily buy a handful of them, and use them for various projects. If you standardize on a single controller for your first bunch of projects then you have one less factor to worry about. Once you've gained more experience you can up or downscale to another microcontroller if that is needed for your project.
 

Offline Steffalompen

  • Contributor
  • Posts: 31
  • Country: no
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #15 on: December 08, 2021, 03:21:38 pm »
One thing not mentioned is unlike the 555 a uC would require output transistors and such to drive a relay.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #16 on: December 08, 2021, 08:15:33 pm »
I do not recommend using such a small microcontroller.
It does not have any advantage compared to somewhat bigger microcontrollers.

Sure it does, it's cheaper, and it's less wasteful when you have a trivial application like this. On the contrary, the larger microcontrollers have no advantage compared to the smaller ones for a very simple project. Literally any microcontroller on the market will handle this project.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #17 on: December 08, 2021, 08:16:37 pm »
One thing not mentioned is unlike the 555 a uC would require output transistors and such to drive a relay.

I think I would use an output transistor with a 555 too even if not strictly necessary. A 2N3904 or similar and a single resistor cost pennies and will do the job.
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 3035
  • Country: us
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #18 on: December 09, 2021, 05:13:09 am »
I do not recommend using such a small microcontroller.
It does not have any advantage compared to somewhat bigger microcontrollers.

Sure it does, it's cheaper, and it's less wasteful when you have a trivial application like this. On the contrary, the larger microcontrollers have no advantage compared to the smaller ones for a very simple project. Literally any microcontroller on the market will handle this project.

Big or small mcu, consider things from the OP's perspective...

Given that the OP is seemingly unaware of microcontrollers the most expensive aspect of this project will be the code development time. That includes setting up the dev environment, learning how to compile code, upload code and just how to get things done on the mcu. In that regard I'd almost recommend starting with a Raspberry Pi, especially if the OP is already familiar with Python programming.

Also, this seems to be a one-off project so you won't be able to amortize the development cost over multiple copies of the device.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19491
  • Country: gb
  • 0999
Re: Circuit design to hold one relay and pulse another and the reverse
« Reply #19 on: December 09, 2021, 08:56:34 am »
I do not recommend using such a small microcontroller.
It does not have any advantage compared to somewhat bigger microcontrollers.

Sure it does, it's cheaper, and it's less wasteful when you have a trivial application like this. On the contrary, the larger microcontrollers have no advantage compared to the smaller ones for a very simple project. Literally any microcontroller on the market will handle this project.

Big or small mcu, consider things from the OP's perspective...

Given that the OP is seemingly unaware of microcontrollers the most expensive aspect of this project will be the code development time. That includes setting up the dev environment, learning how to compile code, upload code and just how to get things done on the mcu. In that regard I'd almost recommend starting with a Raspberry Pi, especially if the OP is already familiar with Python programming.

Also, this seems to be a one-off project so you won't be able to amortize the development cost over multiple copies of the device.
Yes, that's definitely true. In an industrial control setting, the answer would normally be a simple PLC. Indeed, it might be something the original poster could try.

As requested a better description of what I am trying to do. There are two wires (signal wires) that detect the current change when the resistance of the wires are changed. I was able to determine the proper resistance for each wire and the resistor in parallel.

Relay one and two will close when energized by the trigger wire to change the resistance for that signal wire. The added complication is one relay will need to be held energized and while that relay is held on the second relay needs to pulse quickly on and off. Then both relays can return to the normally open position. Both relay one and two will be normally open when not triggered.

Picture of the circuit is added below to illustrate what I am doing. I like the idea several of you have mentioned of using a small microcontroller.

Will the ATTINY85 work well for this purpose? Looks like I can buy one and attempt to create a circuit/code relatively cheaply on Amazon and other websites. 

Do these ATTINY85 chips pull much power when idle and not in use?

Thank you again to everyone for the advice so far.
How about a cheap PLC (Programmable Logic Controller)?
https://aceautomation.eu/
http://plccompare.com/cheap-plcs/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf