Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

24V Flip Flop Help Required

Status
Not open for further replies.
KMoffett said:
A little too hasty throwing the schematic together. As I said I was uncomfortable with the LED on the outputs, so added some drivers...and the pull down resistors.

So, here is the MARK II. ;)

Ken
That looks good. I would be inclined to use a CD4011 instead of the diodes and the OR gate pulldowns, and switch GND instead of Vcc on the inputs. You would wind up trading 6 diodes and 3 resistors for a 14 pin package.
 
Ron,

Choices...choices...choices. I guess this gets down to costs and foot prints...and what LeeH68's intentions are.
Sooo...?

Ken
 
KMoffett said:
Ron,

Choices...choices...choices. I guess this gets down to costs and foot prints...and what LeeH68's intentions are.
Sooo...?

Ken
Yeah, half of one, six dozen of the other...:D
Like I said, just my preference.
 
Thanks to everyone for the help so far. Just to clarify what I actually have.

I have 14 stainless steel plates with 3Nr illuminated switches in each, one green, one amber and one red (see attached photo). I dont want the switches to do anything other than turn the integral led on. My problem is that the switches are momentary switches not latching ones and thus what should have been simple is now a bit more complex.

As I see it, without changing the switches or adding anything else to illuminate the led there are two options:

1. The prefered option would be to press any of the 3 buttons, the led on that button would illuminate and the other two would be inhibited, if another button is pressed then that led illuminates and the one that was on goes off. so at any one time only one of the leds can be illuminated at any one time.

2. The other option is to have each switch as an individual, i.e you press the button the led lights up, you press it again it goes off. This switch is not linked in any way to the other two so potentially you could have all 3 leds either on or off.

3. The other thing i considered was installing a 3 position key switch, the thought being that you switch to whatever colour of led you want (the switch section on the illuminated units I have would therefore be redundant). The problem I have here is that the bezel and bit where the key goes in must be stainless steel as the cleaning chemicals used in the facility will corrode plastic, chrome plate etc etc. I cant find one anywhere, does anyone out there know of any manufacturers?.

As I am a novice in electronics I need a very simple diagram to follow, the diagrams in my first post are very easy to follow and something like that would be fantastic.

Many thanks

Lee
 

Attachments

  • Room Card.pdf
    102.8 KB · Views: 244
LeeH68,

I had to take one more whack at it. This should work for Solution #1

I'm using a small, programmable, micro-controller chip (PICAXE 14M) to sense the pushbutton switches, and select the correct LED to light. An added feature could be a power-failure indication . If the 24V power went out and came back on, the microcontroller could flash all LEDs indicating you need to reset the selection. Or a selection recovery....the microcontroller could store each new selection, and recover the last selection when the power returns.

This could be assembled on a small printed circuit board, and mounted, somehow, inside each panel. There are companies that will layout, make, and stuff the boards to your spec's...for a price :)

Ken
 

Attachments

  • 1of3 Toggle 3.gif
    1of3 Toggle 3.gif
    26.4 KB · Views: 207
Ken

Your a star, I will try and get someone to make one up for me.

Many thanks for your time, and thankyou to everyone else who posted responses.

Lee
 
Could. Takes a PC, a serial cable, and two resistors for hardware. Free software. So once written, they can roll their own. :) But wouldn't do it without all the hardware in hand and a lot more details...you never know what you don' know. :(

Ken
 
Last edited:
Ron,

OK, I had to do it...for fun. :) The software works. :D

Ken
 
KMoffett said:
Ron,

OK, I had to do it...for fun. :) The software works. :D

Ken
Cool! I just started playing with PICs a few weeks ago, and I was able to successflly program one. I have an application in mind for one, but I have some sort of mental block about starting it. I always seem to find something more important or more interesting to do.:confused:
 
Ron,

I'm no programmer. I did a little assembly language and BASIC many, many years age. I'm now into these PICAXE interpreted BASIC µCs. I tried starting with the BASIC Stamp, but could not see spending what they want for even for their lowest level chip. PICs also seemed to have a high startup cost with programming hardware and software. The PICAXE editor was free, the serial cable was homebrew, and the 8-pin Picaxe 08M is about $3, so almost a jelly bean IC like the 555. They recently introduced the 14M with more I/O, so I guess I'll treat that like a 556. ;) Most of my applications have been slow, like LeeH68's, so have not needed the blinding speed of tight compiled code in the raw PIC's.

Ken
 
Ron,

Thought that since I said I did it, I should prove it. ;)

When the circuit is first powered there is no previous selection stored, so all three LEDs flash on and off as a warning. When any pushbutton is pressed, only the corresponding LED is lit, and that selection is stored in static ram. Subsequently, when any other button is pushed the current LED goes out, the new LED is lit and the new selection is stored. If power is lost and restored, the program recovers the last selection, and lights that LED.

Ken

P.S. The program has only been tested in the PICAXE simulator!
Sorry about the poor transfer of indents and tabs.

Code:
'1-of-3 Pushbutton/LED control...Simulation tested only
'PICAXE 14M
'Inputs 0,1,2   ...decimal 0=None, 1=Red, 2=Amber, 4=Green, 7=3 LSB
'Outputs 0,1,2  ...decimal 0=None, 1=Red, 2=Amber, 4=Green, 7=All
'For use with 1of3 Toggle 3.sch
'1of3toggle.bas
'Ken Moffett

Start:			'Power-up
	Let pins = 0		'Turn off all LEDs

Recovery:			'Check last LED selection before power-off
	Peek $50, b0		'Retrieve last LED selection from static memory
	b0 = b0 & 7			'Mask for lower 3 inputs
	'b0 = 0			'> simulated error <
	If b0 = 1 then LED	'Last PB was Red
	If b0 = 2 then LED	'Last PB was Amber
	If b0 = 4 then LED	'Last PB was Green
	Goto Flash			'Static memory $50 empty or invalid data	
	
LED:				'Store and turn on selected LED
	Poke $50, b0		'Store LED selection in static memory
	Let pins = b0		'Light selected LED
	Gosub PBup			'Check for PB up
	Goto PBdown			'Check if PB still down
	

PBdown:			'Check if PB still down
	b0 = pins & 7		'Retrieve and mask for lower 3 inputs
	If b0 = 1 then LED	'Red PB pushed
	If b0 = 2 then LED	'Amber PB pushed
	If b0 = 4 then LED	'Green PB pushed
	goto PBdown			'No buttons pushed
	
PBup:				'Check for PB up
	b0 = pins & 7		'Retrieve and mask for lower 3 inputs		
	If b0 <> 0 then PBup	'Check if any PB still down
	Return

Flash:			'Flash all LEDs until valid PB down
	Let pins = 7		'Turn on all LEDs
	Pause 250			'Pause 250 mS
	Let pins = 0		'Turn off all LEDs
	Pause 250			'Pause 250 mS
	Let b0 = pins & 7		'Retrieve and mask for lower 3 inputs
	If b0 = 1 then LED	'Red PB pushed
	If b0 = 2 then LED	'Amber PB pushed
	If b0 = 4 then LED	'Green PB pushed
	Goto Flash
	
End				'Halt program
 
Just to close this out. Due to my inexperience with electronics I eventually used a Repol programmable relay (model NEED-024DC-01-08-4R). The supplier programmed it for me for a small fee.

Though this was probably a more expensive option - cost £65.00 each + £100 to have all 14 programmed it was certainly the simplest way and least stressful for me.

Many, many thanks to everyone who helped me with this, I wouldnt have got this resolved without your help.

Lee
 
It just seems to me that things are getting unnecessarily complex here and that some basic things are being overlooked.

Like I think the switches are rated up to 24 V and everyone here has assumed the OP wants to use 24 V. Or am I missing something?
 
I think this would work and it only requires 4 resistors, 2 diodes and one common transistor per switch.

The idea is that when one transistor is conducting it prevents the other two from doing so. Pressing the button starts that transistor to conduct and stops the other two. I cannot find any flaws.

Others can review it and calculate component values.
 

Attachments

  • SRT.png
    SRT.png
    1.3 KB · Views: 204
Last edited:
HS3,

I think you may be right about the 24V's...and our assumptions. Maybe Lee could tell us what power supply was already in his system. ???

I had to try out your circuit, so ran it in a TINA simulator. 12v supply, 1k resistors for the LEDs and 10K for all others. All LEDs lit on initial power-up...then 1-of-3, as individual buttons are pushed. :)

Thanks.

Ken
 
He already told us what his supply voltage is.
LeeH68 said:
I have no idea what you both are talking about, but if its any help my PSU is 24V DC output and is 3Amp.
Lee
That doesn't necessarily mean it can't be regulated down, but LeeH68 would have to address that.
 
Ron,

I just couldn't remember, didn't want to go back through all the posts, and...he's already gone with a commercial solution. Still finding it interesting all the ways to do the same thing. ;)

Ken
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top