Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Building a Switch

  1. Oct 19, 2011 #1
    I have looked everywhere for help with this, and I can't find any. I am trying to construct a mechanism that will rapidly switch a DC circuit on and off, anywhere from 10 to 100+ times a second. Ideally this switch should consume as little power as possible, and should be powered by a 6 volt battery. I have searched for buzzer circuits, but I have had no such luck with that. If anyone can tell me how to construct such a switch, or point me in the right direction, that would be great.

    I have also tried modified BEAM solarengine switches, except using the battery in place of the solar panel. No such luck there, either.
  2. jcsd
  3. Oct 19, 2011 #2


    User Avatar
    Science Advisor
    Gold Member

  4. Oct 19, 2011 #3
    But once again this would require some mechanism to activate the base/switch pins to turn it off and on, which would require a switching mechanism. Because I cannot take a switch and turn it on and off many times a second, I need some mechanism to do that. I am not sure how to go about constructing this mechanism.
  5. Oct 19, 2011 #4
    555 Timer?
  6. Oct 19, 2011 #5

    jim hardy

    User Avatar
    Science Advisor
    Gold Member
    2018 Award

    what level of power are you looking to switch?
  7. Oct 19, 2011 #6
    Once again, a 555 timer would require some mechanism to cause it to switch, which is what I'm trying to build here. The level of power is 6 volts from a lantern battery.
  8. Oct 20, 2011 #7


    User Avatar
    Science Advisor

    The 555 can be configured as an astable multivibrator--supply power and the right component values, and it'll start switching continuously:
    http://www.doctronics.co.uk/555.htm [Broken]

    In addition to the above informational page, there are probably dozens of online 555 astable calculators that can generate component values for you based on your desired switching frequency and duty cycle (proportion of on time compared to the sum of on and off time).

    If you mean that you want some mechanism to turn on/off the switching, wire a switch into the power line to turn on/off power to the 555. If you need to control the switching frequency, you can wire in a potentiometer in place of one of the adjustment resistors (but you'll need some way to determine what the operating frequency is).

    The 555 was king for this sort of thing for probably 25 years. However, using an 8-pin microcontroller (say, a Microchip PIC10 series or an ATMEL ATtiny), you can do the same thing with fewer (or even no) external components and a half-dozen to a dozen lines of C or assembly code (if you have familiarity with microcontrollers and microcontroller programming).
    Last edited by a moderator: May 5, 2017
  9. Oct 20, 2011 #8

    jim hardy

    User Avatar
    Science Advisor
    Gold Member
    2018 Award

    the 555 can switch 1/10 amp, the 555C less than that i think 1/100 amp.

    6 volts you say - 555 will handle that if current is low. Do not try to illuminate an automobile headlamp though...

    ""what level of power are you looking to switch? ""

    6 volts is half the answer. How much current?

    A 555 can drive the gate of a power mosfet to switch more current.

    google '555 hobby circuits'. There are sites dedicated to that remarkable little device.

    old jim
  10. Oct 20, 2011 #9
    Your wording is very ambiguous. Can you be more specific about exactly what you are trying to do?

    If it's for switching power to the circuit on and off at 100 Hz, then a 555 or small microcontroller like MATLABdude suggested can be hooked up to a power MOSFET.

    That sort of thing seems odd though. Do you need it to actually power up and down 100 times a second, or just signal it to do something with a certain frequency?

    Or...what? There's only so much we can do with such limited info.
  11. Oct 21, 2011 #10
    I am trying my own here at building a high-voltage converter. The specific type being a flyback converter. I need a mechanism that will switch the primary on and off, as so it can create the changing magnetic field. Because I don't care much about voltage or current control, all I'm looking for here is a simple switching circuit. I realize that MOSFETs are commonly used for this, but I am unsure how to go about building a switching MOSFET circuit. All I want to know is how I can make a circuit that will switch the MOSFET on and off many times a second.

    The power for the converter is a 6 volt lantern batter of unspecified amperage.
  12. Oct 21, 2011 #11
    In a flyback ckt (or any ckt that sends power through an inductor or transformer) you need to understand when to turn it on and when to turn it off. Consider the following:

    1. The inductor (or transformer) stores energy. The MOSFET (for example) pumps some energy into it and then the output ckt takes the energy back out after the MOSFET turns off.

    2. The more energy the inductor will store in a single cycle, the bigger the core must be. So you'll want to increase the frequency so that each cycle moves less energy, so that a smaller inductor can be used for the same power throughput.

    3. But core material for higher frequencies doesn't perform as well. Generally the finer the iron or ferrite particles (to reduce eddy currents), the lower the permeability. And you certainly don't want to use iron tape--that's only for real low frequencies.

    4. Be sure you use a push-pull gate driver tough enough to quickly shove the gate charge in and out fast enough.

    5. Also, MOSFET slew rate (even if your gate driver can shove the gate charge in and out fast enough) will bite you at higher frequencies.

    6. If you leave the MOSFET on too long, you'll saturate the inductor's core (it won't be able to store all the energy you're trying to pump into it).

    7. If you don't leave the MOSFET off long enough, there'll still be some energy left in the inductor when the MOSFET turns back on and you'll then saturate it even faster for no reason AND need a higher-current MOSFET.

    8. Make sure the flyback voltage on the MOSFET drain doesn't exceed the MOSFET max drain voltage, or you'll be wasting energy heating up that MOSFET--it becomes a shunt regulator (probably not something you wanted!)

    There are lots of really cheap flyback controller chips out there, although I haven't found one that both turns the MOSFET off when its current hits maximum and turns it back on when the inductor voltage begins to drop (indicating its emptied all its energy into the output ckt and is ready for more). So I usually use a RS flip flop driven by a couple comparators--one clears the FF when MOSFET current exceeds some value (I just use the drop across the MOSFET rather than an energy-wasting current sensing resistor), one sets the FF when inductor voltage starts to drop when its emptied its energy (dV/dT). Then I put an integrator (resistor and cap) from the flip flop output to its clock or preset, inverted accordingly if necessary, to make it naturally oscillate slowly if for any reason it stops oscillating via the main feedback paths. Then, of course, you may want one more comparator to stop the oscillator when the output voltage hits its target value. That works way better than any chip I've seen.
    Last edited: Oct 21, 2011
  13. Oct 21, 2011 #12
    Is there any way to go about finding the frequency of a transformer, or should I just play it safe by making it switch on and off at about 40 Hz? Or is that even too fast?
  14. Oct 21, 2011 #13
    A lot of what I said in the previous post has to do with efficiency (and in ckts moving a lot of energy, protection of components). If efficiency is too low then not only will you be wasting power, but may not even be able to get nearly enough power out even if you don't care that you are wasting a lot. Even so you can certainly grab a transformer and see how it works, trying different frequencies and duty cycles. By the way, a flyback ckt means that you don't give it a square wave, per se. You pull current through the inductor or transformer and then go open collector (or open drain) to let the voltage on the coil "fly back" in the other direction trying to keep that current flowing (because that's an inductor's lot in life--to try its darndest to minimize changes in current). Giving a square wave to a transformer with a low-impedance source is more of a push-pull design.

    Also in a flyback ckt, phase of the transformer windings must be understood so that the load ckt takes energy from the inductor when the driver ckt is resting, and not taking energy from it when the driver ckt is adding energy to it.

    As for the 40Hz, that seems a bit slow for any application! Cores with laminated plates or iron tape won't work so well over several thousand hertz, typically. Anything else (ferrite, powdered iron) ought to do something interesting at least up to 50kHz. The finer the particles, the less eddy currents, and thus higher the upper frequency (before excessive losses kick in) but the lower the permeability and saturation point (which means you need more turns in the winding to get the same inductance).
    Last edited: Oct 21, 2011
  15. Nov 3, 2011 #14


    User Avatar
    Gold Member

    For that kind of application I think you will find it hard to beat Linear Technology's switching regulators, both in terms of total cost and design simplicity. They are essentially big power MOSFETs with the FET driver, the oscillator, and the feedback and control circuitry all on board. The application notes are the best I've ever seen in the industry.
    The high voltage requirement will complicate things a bit, as most of these regulators had (last I looked) maximum gate voltage of under 100 volts, but you'll find high voltage designs with the necessary adaptations in the in the app notes nonetheless.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook