Everything for Electronics

Tech Forum Questions





On/Off Circuit May 2015

Is there a simple circuit that would allow a normally open pushbutton to turn on a relay when pressed, and then turn it off when pressed again?

#5153
Isaac Wright
Maumee, OH



Answers

When the circuit is first energized, C charges to 1/2 Vcc through voltage divider R1/R2. When the button S1 is pushed, C discharges through the relay coil. It pulls in, and the relay is held closed by the current through R1 and the relay coil. When the button is pushed again, C, now fully discharged by R2, goes across the relay coil making it drop out and returning the circuit to where it started.

Mike Callaghan
via email

In essence, this is a flip-flop. Push the button and the state of the flip-flop will change. Adjust the values to your needs.

Al Jaszek
Needham, MA

It’s funny you should post this request. I just happen to have an article submitted to Nuts and Volts utilizing this exact same situation that will hopefully be appearing in an upcoming issue!


In the meantime, here is the (modified) relevant portion of the schematic as you requested. The 74LS109 is a J-K Positive-Edge Triggered Flip-Flop. The input is tied to normally tied to ground, but when you press the switch that input is momentarily brought high, triggering the flip-flop, toggling the relay between it’s on and off states. R2 and C1 are to debounce the switch and prevent multiple false inputs.

Derek Tombrello
Columbiana, AL

Use the push button switch to toggle a JK flip-flop.

Lance Corey
via email

It can't get any simpler than two resistors, one capacitor, and the relay.

Mike Callaghan
La Crescenta, CA

Here is a simple circuit that can be used to toggle a relay using one switch. A relay with a 12 VDC is used however the relay contacts can control a larger voltage if needed.

Craig Kielhofer
Wheeling, IL

Look into a switch debouncer such as the MAX6816 and JK, or T flip-flops to drive the gate of a low side switch on your relay. The output of the switch debouncer could drive the clock of a T, or properly configured JK, flip-flop. Don’t forget the protective diode across the relay in order to clamp the voltage when turning the relay on/off. I hope this helps.

Justin J
King City, CA

Here are two circuits that should do want you want: Grove-2 @10 from: www.seeedstudio.com (YES, there are 3 e’s) Cebek I-9 @ $4 from www.mcmelectronics.com


Also, there are a variety of electro-mechanical relays available at many sources. These do not need a circuit to latch but when the relay is activated, it toggles a switch from off to on.

Michael Herman
LaQuinta, CA


Voltage Reduction May 2015

What would be the most efficient way to reduce the voltage from a nine volt battery to 5V? I could use a 7805 but it seems to bleed off a lot of power as heat. Is there a more efficient circuit or part?

#5152
Alan Vallo
Piedmont, SC



Answers

Take a look into DC-DC buck converters. Many of the IC manufactures offer low part count devices, and depending on your load requirements, may offer a completely integrated solution.


Things to consider when selecting your buck converter:
  1. Internal switch/es to the IC — ease of implementation
  2. Synchronous design — higher efficency
  3. Load capabilities — This is one of the most important things to consider, especially with an integrated design. You want to select an IC that meets your load requirements, ie output current, but not something that blows them out of the water.


In other words, If your output requirements are 5V @ 100mA (0.5W), don’t choose a device capable of 10W, or 2A at 5V. The reason being is, these devices are more efficient when operated at the loads they were designed for.


One last thing, review the EVKIT the manufacturer has available for the device. These are really good starting points for layout and design with the device. I hope this helps.

Justin J
King City, CA

A very economical solution are the LM25XX switching regulators on a board, which sell cheap from MPJA or the internet. I also use the MC34063 which is often found in the “12 volt to 5 volt” cell phone adapters at your local thrift store, but easier to work with purchased new.


For low current applications, my favorites are the encapsulated 1W or 3W switching DC-DC regulators from CUI, Murata, etc. via Digi-Key.

Jim Lacenski
Bellevue, WA

The UA78s40 is an old switching regulator that is obsolete, but parts are available on Ebay. The datasheet has a schematic for 26 volts to 10 volts but you only need to change two resistors for 5 volts output: R1 = 30K, R2 = 10K.


A more modern solution is the LM2576 buck regulator. It only uses two capacitors, a diode and an inductor for external components. The datasheet has a schematic that you can use directly.


The package is TO-220-5, Mouser part number is: 926-LM2576T-5.0/nopb, cost: $2.82. The IC is good for 3 amps but if your load is less than 20 mA, it would not be a good choice.

Russell L. Kincaid
Milford, NH

Yes, the 7800 and 7900 series seem to just dissipate heat to drop the voltage. Try the LM2940-5 - I found them at Jameco for $1.39 each......

Schneids
via email

You might try using an LDO regulator like the LM2596S chip. I bought a 1.5V-37V DC/DC buck convertor from MPJA for $1.95 to reduce 12V to 9V and it runs very cool.

Gene Sellier
Fairhope, AL


Replacement Plastic Transistors May 2015

Can one of your experienced electronic engineers recommend replacement plastic transistors (maybe a la PN2907) which are easily available, in order to substitute Q1, Q2, Q3, and Q4? I want to totally eliminate 2SB54 transistors  WITHOUT any draconic and/or extreme changes to the original diagram (below) for this (push-pull) phone amplifier I'm using, by attaching a suction cup to my (landline) phone's receiver.


I'm well aware of the existence of other phone amplifiers (built around the LM386) which are easier to build with fewer parts, but I'm only interested in this diagram, as I’ve already built it in the past — not only as a phone amp with ample volume (which also works very well as a P.A. system), but as a wired intercom.

#5151
Nate Franklin
Schererville, IN



Answers

Mr. Franklin desires to reproduce a known circuit design that uses four 2SB54 transistors. The 2SB54 is an obsolete part. Furthermore, it is a germanium device. Mr. Franklin asks if a 2N2907 or similar silicon PNP device could be used instead.

Substituting silicon devices for germanium devices is a non-trivial exercise:

• The no-signal emitter-base junction voltage of germanium devices is about 0.3v, while that of silicon devices is about 0.7v. In a linear circuit such as that presented here, bias voltage appropriate to the transistor material type must be applied to overcome the junction voltage offset.

• Germanium transistors exhibit current leakage. This is often sufficient to provide self-biasing. Silicon devices have negligible leakage in the circuit under consideration, so external biasing must be considered.

The simplest thing to do is to replace the 2SB54 with another germanium part. The NTE100 device, manufactured by NTE Electronics, has characteristics that are similar to those of the 2SB54. It is available from multiple distributors including Newark Electronics, Fry’s Electronics, and Online Components, or you might try eBay. Pricing runs from about four to seven dollars per device. A data sheet, which includes a basing diagram, is available from NTE Electronics.

Good luck.

Peter A. Goodwin
Rockport, MA

Those transistors date back in time quite a ways, as does the circuit! The 2SB54 is a Germanium, PNP unit. RadioShack has a drop-in generic on their website as part #55051964.

You could also toss out everything between the microphone and the speaker and connect a LM380 integrated circuit. I have an old transistor substitution guide in storage so contact me if you need a further referral. Good luck.

Michael Herman
LaQuinta, CA

Q1 and Q2: the circuit is a self-biasing design. MPSA56 should work fine, even though these are silicon transistors instead of germanium.

The output stage (Q3/Q4): 2N4918 or BD136 would be my preference. You will need to increase the value of R6 (try 330 ohms) to reduce crossover distortion due to the larger Vbe drop of the silicon transistors. Note that this output stage has no temperature compensation and is subject to thermal runaway.

Better transistor designs of this era used a thermistor for temperature compensation. See Wikipedia’s thermal runaway entry, bipolar junction transistors, for more insight. I would still LM386, which eliminates the (likely) hard to get transformers too. More power? Look at the numerous class-D single chip power amps.

Jim Lacenski
Bellevue, WA

The circuit is well designed with feedback in the first stage to stabilize its current and an emitter resistor to limit the current in Q2. The output transistors, Q3 and Q4 are class B so draw no current until driven by audio. I simulated the Q1, Q2 circuit and it works perfectly with no changes using 2N2907 transistors. Q2 collector current is 4.8 mA which is sufficient to drive the output transistors to watts of power.

Russell Kincaid
Milford, NH

The main problem is the transistors are germanium and not silicon. So, I doubt you could plug in silicon transistors and have it work properly [although if you’re desperate, you might give it a try anyway].

The transistors have pretty much been discontinued from what I could tell. NTE makes a sub that should work for you — NTE102. You should be able to find them at several places.  I checked Allied and they had some in stock — but on the pricey side.

You should be able to find a newer circuit at some electronics site that uses newer transistors or op amps.

Schneids
via email

I would consider the 2N3906. The Hfe (100 min, 300 max) puts this device near the 2SB54 specified Hfe of 140.

Mark Strauch
Livermore, CA

The 2SB54 is a fairly ordinary Germanium PNP transistor. It could be replaced with any general purpose Silicon PNP like the PN2907, 2N3906 or BC327. You will need some changes as silicon transistors are harsher than germanium types:

  (a) you will have to increase the value of R6 to 1K to bias the output stage (maybe 1K5 to get more power out) keep an eye on the quiescent current, it should be < 10mA.
  (b) (optional) to improve crossover distortion , remove R5, and use 33K resistors between base and collector of each of Q3 and Q4 (just like R1)
  (c) (optional) to make it less tinny, put a 22ohm in series with C3 (other values will work like a tone control)
  (d) (optional) to flatten out the response , try a 47K for R1 , (values in the range 10K to 100K could be tried) this also affects the gain and interacts with the source impedance. The above values were determined by simulation to give a better result than the original values, however the simulation uses perfect transformers. If you get RF oscillations, try a 1nF from base to collector of Q2 or 470pF from base to collector of Q3, Q4, or ferrite beads on the emitters of Q1 or Q2.

Bob Turner
Salamander Bay, Australia

The swap you suggest will require some adjustment of transistor bias. The 2SB54 are Ge. material with 0.15 to 0.2V base emitter bias. The PN2907 and similar are Si. with a 0.65 to 0.7V base emitter bias requirement. R2 and R6 will likely need to be increased in value. Quick estimate for R6 at 0.7V is around 1.2K The collector feedback biasing makes the calculation of R2 value more difficult and might not have to be changed due to the feedback.

Search for similar circuits using silicon transistors to get some better resistor values. Note that Q3 and Q4 require a little forward bias to prevent crossover distortion. I would expect considerable distortion if the biasing resistors are not modified to account for differences in GE. vs. Si material GWS

George Shaiffer
Colorado Springs, CO

A 2N3906 should work OK. It has the same general characteristics as the 2SB54 transistors, except for being silicon instead of germanium, greater power dissipation and slightly higher hfe (100 as opposed to 80).

Gene Sellier
Fairhope, AL

I would try a PN2222 which is an old standby PNP transistor. I don’t think there is anything special about the 2SB54, it is just older. Jameco sells them for ten cents a piece. Part no. 28628. Download the data sheet and watch the pin locations.

Ron Newton
Carson City, NV


Over Current for PWM Circuit April 2015

I have a Marlin P. Jones DC motor speed controller (Part 31566MD, 6-24 volts, 20 amps max). I need to add an over current circuit to it. I inserted two 0.1 ohm/five watt resistors in series with the motor –lead and the M-connection on the controller. My scope displays a steady 0.6 volts DC level across it. The PWM waveform changes from 2 µsec to 40 µsec in length as the output of the speed controller is increased from 0 to 3 amps, while my DVM displays 0.02 VDC to 1.3 VDC for the same range of output.

So, the question is “What kind of circuit can I add across the resistors to get a VDC reading?” I have tried an NPN transistor, base lead to the motor –lead, and the emitter lead to the M- connection. (With a 10K collector resistor to +12 VDC.) The collector voltage went from +12 volts to +3 volts as the controller output went from 0 to 3 amps.

Next, I connected the collector voltage to an LM324N quad op-amp set up as a voltage comparator. The +lead of an LM324 went to a 200K pot, connected between +12 VDC and Gnd. The transistor’s output went to the –input of the same op-amp. A 1M ohm resistor is connected from output to +input for hysteresis. (This output should go high to set a CD4013N flip-flop at an over current condition.)

The problem is that the output of the op-amp’s output does NOT change at the point when the voltage at the +input is greater than the –input. The op-amp’s output changes as the voltage from the transistor decreases. I used the LM324N auad op-amp because it has four op-amps in one chip, and it works with a single +12 VDC supply. It would be helpful if the new circuit could use it also, but not necessary. I could use a PIC16F628 or an Arduino Nano, if you design with them.

#4153
Patrick Fleming
Hoffman Estates, IL



Answers

I’ve found the 31566 schematic. The simplest solution, that I’ve used in similar circuits, is to use a ZXCT1009, this is a 3 terminal current sensor. So put your 100mR shunt in the positive line, attach the ZXCT1009 across it, and a current proportional to the motor current (about 1/1000 actually) flows out of the third pin to ground. Simply attach a resistor, say 1K ohm to ground and you can read the motor current off this.

The most important advantage of this chip is the sense resistor can be grounded at the Arduino, so you won’t be measuring any errors due to voltage drop in the ground wiring. The datasheet shows how to use it, and provides calculations on how to use PCB traces as current shunts.

Bob Turner
Salamander Bay, AUstralia


Test Lead Wire April 2015

Anyone know where I can purchase small quantities (25 ft rolls) of the different color jackets of good Beldon or (?) 65/30 test lead wire? I see it in 100 ft rolls $$, 10 colors, but that would be over a $1,000 for all ten.

#4152
Terry Arnall
Hayward, CA



Answers

Try Elenco WK-106 Hook Up Wire kits which has 6 colors (red, yellow, black, white, green, blue) of 22 gauge wire in 25 foot rolls for around $15. See the web site Elenco WK106 Hook-Up Wire Kit 6 Colors.

Tim Brown
Honea Path, SC


LED vs. Incandescent Lamps April 2015

I have been tasked with the chore of replacing 300 watt incandescents (5900 lumen). How many of what kind of LEDs and current-limiting diodes in series/parallel do I need to fool the human eye into thinking it is seeing a brighter, more pleasant level of lumens?

#4151
James McFadden
St. Maries, ID



Answers

I am going to try to answer your question from the standpoint of a person solving your problem on a contractual basis, and who, therefore, must deliver the best design at the lowest cost. I think that this is the most objective, efficient way to approach the problem and to give you a reasonable answer.

With all due respect, you have left out important — or included ambiguous — information needed in order to arrive at a design which meets your exact needs.

For example, you have not specified any type of physical form factor. Do you want to replace a single 300-watt incandescent bulb, or an array of bulbs emitting 5900 lumens? What do you mean by “fool the human eye into thinking it is seeing a brighter, more pleasant level of lumens.”

Regarding the latter:

White LEDs come in a minimum of two different colors — warm white (color temp. approx 2800K; simulates incandescent output), and cool, or bright, white (color temp. approx. 6000K; just about simulates daylight and fluorescent lighting). These LEDs are very commonplace, being available from, among other sources, www.superbrightleds.com, Amazon, and others. Just make certain you buy from a reputable source which will stand behind its product.

One could certainly design and build for you a light (lights?) meeting your specific requirements, using readily-available 100-watt LEDs (warm white or cool white), along with the appropriate power supply AND — most importantly — cooling. VERY SERIOUS cooling.

As the situation stands currently, my suggestion to you is the following: LED technology, and the LED lighting industry is very mature; so much so that there is no need for an individual, or firm, to waste his or its valuable time designing a high-power LED lamp or lighting fixture which has

  (a) most likely already been designed, or

  (b) which can be easily adapted to the user’s specifications from an existing design of a reputable LED lighting manufacturer (you may be surprised to know that, as of this moment, LED “drop-in” replacement lamps are available to replace standard fluorescent tubes, while providing the very much longer life and very low power requirement of LEDs).

If I were you, I’d start by putting out feelers to companies such as www.superbrightleds.com, who have already designed, and offer for sale all types of lighting solutions.

I realize, as a tinkerer, hacker, and design engineer myself, who loves nothing more than to make something useful out of a pile of components, that this solution is somewhat distasteful.

You CAN design a solution yourself, if the situation warrants. You CAN do it. BUT... if you’re attempting this for reasons other than self-satisfaction, then save yourself time and money, and go with the solution which the experts most probably already have.

By the way, just in case the fact escapes you — Due to the semiconductor physics involved, LEDs at the output level you need do not provide any significant power savings over incandescent technology, or other lighting technologies, for that matter. Three LEDs capable of a total output in the range of 5500 to 6000 lumens will require power of approximately 100 watts each. Total = 300 watts (not including active cooling), the same as the incandescent you want to replace. If you’re thinking that the much longer life of SMALL semiconductor LEDs justifies the transition, you should know that the jury is still out on just how seriously the lifetime of high-powered LEDs is affected by the heat that is generated by the current required for all this super-brightness. Some of the jury think it’s end-game, for now, until there’s a major breakthrough in LED technology.

John Colt
via email

I recently replaced twelve 300-watt incandescent lamps with LED floods. In my case, it was made easier because the 300-watt lamps illuminated hanging lamp enclosures in a church. The overall purpose was to provide reading illumination for the congregants.

If this application suits your purpose, look at Lighting Science DFN38WWV2NFL120, being a 120V 24-watt PAR38 lamp, 3000K. These lamps, while only rated at 1300 lumens, put all of their light output in one direction —downwards — while the incandescent lamps spread their 5900 lumens all over the room. And they’re dimmable. It was a no-brainer for us because they worked in the application and the electrical demand for the lighting went from 3600 watts to 288 watts.

One on-line source is https://www.1000bulbs.com/product/63140/LED-PAR38242530.html, but your local electrical supply jobber might get you a better price — especially if your state is currently giving rebates for so-called “green” appliances.

Peter A. Goodwin
Rockport, MA


Arduino Remote March 2015

My Sony BluRay/DVD player came with a very complicated remote control. I don't need half the buttons! Is it possible to make a simplified replacement remote using an Arduino and simple buttons with an IR-LED?

#3151
Terence Rodriquez
Raleigh, NC


PCB Chem Disposal March 2015

I’m interested in photo etching copper-clad PCBs. Most guides don't say what to do with the chemicals when I'm done. Do I just pour them down the drain or will it hurt the environment (or my pipes?).

#3153
Gerardo Rios
Phoenix, AZ



Answers

If you etch copper off a copper-clad PCB, you sure don't want to port etchant into copper pipes! And you don't want the copper ions from the etched board going into the waste-water system. After all, we all live downstream of someone else. MG Chemicals offers two disposal ideas, which you can read here. www.mgchemicals.com/tech-support/ferric_faq/.

Jon Titus
Herriman, UT


Lightning Protector March 2015

In a recent thunderstorm, a nearby lightning strike took out some of the electronics at my neighbor’s house. Is there anything a DIY'er like me can build to protect my delicate electronics — other than unplugging everything? Something with MOVs maybe?

#3152
Matthew Hodges
Wichita, KS



Answers

Their is also a whole house surge-protector from Square D and other electrical panel suppliers for less than $150. They hook up to both sides of the 220 volt buss bars. Check you panels maker site. I purchased one a number of years ago and it stopped electrical line spikes. With a cable and phone line surge-bar I have been lucky and keeping my replacement money in the bank.

George Jones
Hopewell,VA

The simplest solution to lightning-induced surge protection is to use a commercially available surge-protected outlet strip. There are numerous sources for these items, and you may even find a suitable device at your local hardware store.


The important thing to understand is that a lightning strike conducts huge oscillatory currents. A varying electrical current will generate a changing magnetic field, which in turn will induce superimposed voltages in nearby conductors -- including service drops from the utility pole to your house (e.g., electrical power, TV/internet cable, and telephone). Such surges can be induced both line-to-line and line-to-ground in the electrical power service drop (and for balanced-line applications such as telephone). Properly-designed surge suppressors provide both line-to-ground and line-to-line protection for such circuits.


Surge voltages induced line-to-ground arise because such devices often are connected to more than one source of surge voltage: For example, your television set is connected to utility power and also connected to the TV signal cable. Likewise, your computer may be connected to utility power, to a cable from your internet service provider, and to a telephone cable (for fax service).  Unless these cables/wires are all run together throughout the house (and this practice is discouraged due to the possibility of capacitive cross-coupling), one or more loops exist, and within each loop, the surge voltage induced by the lightning strike is a direct function of the areas enclosed by the loop.


It follows that effective surge suppression can only be accomplished by feeding all of the incoming electrical services through what is called a "surge-protective window". In such a structure, surge suppression elements such as metal oxide varistors (MOVs), avalanche diodes, or gas tubes can clamp impulse voltages to a common reference point plane which in turn is connected to earth ground. This can be effected by using a surge-protected outlet strip that also incorporates protection for telephone and cable lines. Typical examples of this all-inclusive surge protection are devices available from Belkin (e.g., www.belkin.com/us/BV112234-08-Belkin/p/P-BV112234-08/) and Tripp-Lite (e.g., www.tripplite.com/av-home-theater-surge-protector-isobar-10-outlets-8-ft-cord-3240-joule-3-line-coax-ethernet-tel-network~AVBAR10/).


All cables exiting the surge suppressor block should be run together wherever possible, secured periodically by twist-ties or other means.  This method ensures that negligible induction areas exist into which surge voltages can be introduced. Capacitive-coupled interactions are no longer a problem because any prior surge voltages have already been stripped from the cables by the surge suppressor block.


Please note that the protectors identified above are "Cadillacs" because they provide surge suppression for all common power and media transport wiring. Sometimes just a simple one-outlet surge suppressor will do the job — or, for example, a single-outlet suppressor with built-in telephone line surge suppression, both at significantly lower cost. I even use single-outlet surge suppressors to protect my coffee maker and washing machine because each of these devices contains electronic modules that are expensive to repair.


The important consideration is to maintain the "surge protective window" approach to the problem as outlined above.

Peter A. Goodwin
Rockport, MA

Lightning protection is a complex issue, including home entrance cable protection, bonding of large metallic structures, and even grounding of rain gutters and downspouts. A good place to start is a free PDF from www.lightningsafety.com/nlsi_lhm/IEEE_Guide.pdf. Because a lightning bolt can pack a 500 MJ wallop, far beyond any MOV rating, surge protectors are not protection against a direct strike, but they do help limit inductive surges (e.g. lightning hitting a tree nearby, inducing a current in house wiring). In brief, running a hefty ground wire from gutters, external antennas etc. to an effective ground in conductive soil is the first line of defense.


MOV surge suppressors have saved my PC and appliances from one damaging surge, though, as shown by blown internal fuses and smoking MOV's!

B. Bresnik
via email


X10 Cable Build March 2015

I have an early X10 Home Control Timer (Model CP-290) to which I have lost the programming cable. Does anyone know where I can get the pinout so I could fashion my own replacement cable?

#3151
Leigh Guzman
Oxnard, CA



Answers

The CP-290 is very old and was sold in the early 1980s. The communication protocol is RS232 serial


Baud Rate:  600
Data Bits: 8
Parity: None
Stop Bits: 1


The connector on the back is a standard 5-Pin DIN socket. Looking at the back of the unit the pins are 5-4-3-2-1 starting at the left and going counter-clockwise to the right with pin 5 on the left, 3 on the bottom and 1 on the right.


Pin 1 - No Connection
Pin 2 - Receive Data (In)
Pin 3 - Ground
Pin 4 - Transmit Data (Out)
Pin 5 - No Connection


To plug into a computer like an IBM compatible these connections would go to a 9-Pin female serial connector:


CP290 —> DE9
2 RxD —> 3 Txd
3 Gnd —> 5 Gnd
4 TxD —> 2 RxD

Rick Swenton
via email

Attached is a scanned image from the manual.

Pete Cermak
Mokena, Il.

The 5-pin DIN (pins 1-5) — The middle pin (3) is GND, the pins on either side (2 & 4) are Rx & Tx. I don't recall which. You might have to swap them to work. The outer pins are not connected.

Ted Hess
Hudson, MA

From the CP290 programming guide:


Pin 1 - No Connection
Pin 2 - Receive (input)
Pin 3 - Ground
Pin 4 - Transmit (output)
Pin 5 - No connection


Looking at the face of the connector with Pin 1 at the 3 o'clock position and Pin 5 at the 9 o'clock position.

Al Jaszek
Needham, MA

Page 19 of 39 pages ‹ First  < 17 18 19 20 21 >  Last ›