Momentary switch latch relay?

Started by TryingToDo613, March 20, 2006, 11:26:27 AM

Previous topic - Next topic

TryingToDo613

Hi guys. I've just gone over all the switch stuff in the TUT books and can't find anything that lets me hit a momentary switch and latch a relay/jfet/bjt/opamp (whatever) back and forth. Anyone (R.G.) have a schem on how I'd do this? I don't want to have to keep a relay coil charged and I'm totally clueless on this silicon switching option thing.  -ph


Peter Snowberg

If you combine the relay switching shown here: http://www.geocities.com/transmogrifox/switchrelay.pdf with the flip-flop shown in the 3rd picture down on this page: http://www.geofex.com/Article_Folders/cd4053/cd4053.htm you end up with what you want.  :icon_biggrin:
Eschew paradigm obfuscation

TryingToDo613

#3
Thanks Peter. I'll try it and post the result. -ph

(edit) My head hurts.

Transmogrifox

I just noticed I have shown two different LED conditions between the two drawings.  I think the electronic switching configuration is correct, as I did reference the relay datasheet when I was putting that together...so you'll likely be ok.

If the LED is off when the effect is on, and on when the effect is off, and you don't like that...then hook up the LED to the output of the CMOS inverter instead of the input.

Another little caveat with this circuit is the condition when you turn on the power.  You have to stomp the button once to sync the LED with the circuit's state sometimes right after power-up.  Typically not a big deal.

If you're into the uC thing and want to do this with fewer parts, you can go to

www.geocities.com/transmogrifox/relay

and follow the link to the microcontroller based (PIC12F683) relay driver.  I can post the code for any interested.  The code is written to set the relay on power-up so that there is no caveat.  It just works as expected every time.  I could add to the code to save its state in EEPROM so that it remembers the last state it was in when it was powered down...but for me I don't see the need.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

TryingToDo613

That is for sure a cleaner way to do it. Could you possibly suggest a place to learn how to use the code (when it's written) for this chip? Is there a chip station to plug it into a usb or something?  Even the google search words would help. -ph

Transmogrifox

A place to get information about the chip I'm using is at:

www.microchip.com

You can get a PICStart, or PIC Kit for about $40.  These will program all of microchips 8 and 14-pin chips, and it's cheap compared to some other types of development tools. Alternately, you can also find PIC programmer schematics on the web.  Then you just need a .hex file, and use HyperTerminal to send the .hex files to your computer's com port.  I recommend a PIC Kit II or similar starter kit if you have never done anything with HyperTerminal.   

You will also find there is much help to be had in the Digital & DSP section on this site for getting started with programming chips.  TheToneGod has put together some nice "getting started" type articles, though he's focused more on Atmel's line of microcontrollers.  RG also has a lot of knowledge in this area as well.  Once you get to where you can just turn on your computer, download some code from somebody's site, and burn it onto a chip, you'll have a lot of cool things opened up to you, and especially much guitar related stuff as the Digital and DSP section grows.

In conclusion,
1.  look for a PIC Kit.  Use Microchip's customer service or tech support if you have questions about which one, and to ensure that the devices you want to program are supported.
2.  Order it, and follow the instructions for configuring it on your computer.
3.  Order some PIC12F683 chips, and others if you find other projects you want to build that use different chips.
4.  Post your questions/problems in the Digital/DSP section and browse for new uC based projects that interest you.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

TryingToDo613

Thanks. I'm going to try it. I also emailed you on this board buy some of yours. Still got em? I need to prototype an  idea I have and need to use a momentary type jolt to switch that relay. I could use two momentary switches of course but I'd prefer to try this. -ph

Morocotopo

#8
Sorry, mis-posted... :icon_mrgreen:


Morocotopo

Morocotopo

#9
Idem above... :icon_mrgreen: :icon_mrgreen:
Morocotopo