Saturday, August 2, 2014

Ideal Diode Desired Features & Chip Selection

Ideal Diode Desired Features & Chip Selection

Now that I've covered how an ideal or perfect diode works and some of the protection you can add to it to make it work better, I'll look into the specifications & features I'd like to have for myself which hobbyists  and hackers could find useful.

  • Wide Voltage Range
  • External Power
  • Low Current Draw Option
  • High Load Current
  • Off/On Support
  • Low Cost
  • Easy to Assemble
Wide Voltage Range

Since hobbyists & hackers may need to use the circuit in a wide range of uses, the wider the voltage range while keeping the costs down, the better. Some IC chips are designed for mobile devices or very specific usage don't allow a wide operating voltage range. I'd prefer if it can handle at least 48VDC, and hopefully more. The low voltage drop of an ideal diode matches very well with many uses when combined with 24VDC or higher, such as solar or off-grid power for example. Cases like this is where low loss can be beneficial enough to spend the extra money.

External Power Option

Most IC chips with a wide voltage range have minimum operating voltages because of how they need to be designed. These voltages can easily be 5V or higher, that means either the ideal diode doesn't turn on until you reach that input voltage or you need to be able to supply external power for it to work. A circuit using an external power source can then begin to work at very low voltages improving the efficiency while reducing the turn on time.

Low Current Draw Option
Since many uses hobbyists would have are cases where high efficiency is important, the IC & final circuit should have very low current draw. Otherwise, you start loosing benefits of using such a circuit.

High Load Current

Since there are many low cost diodes with very low voltage drops at low current, hobbyists & hackers will be more interested in high current then low current. While there are many good uses for low current ideal diode circuits, those often are also in very space constrained designs which often means they need to be integrated with other circuits instead of a general purpose solution I'm interested in at this time.

Off/On Support

While a normal diode doesn't have Off/On support and a basic MOSFET does, if the ideal diode circuit can support on external Off/On input, that greatly enhances a lot of different places it can be used, such as power control circuits that are both a relay & a diode between a battery and a load or a solar panel and it's batteries.

Low Cost

If the price goes up too much, fewer people will be interested in experimenting or using the circuit. This means that the cost of the IC as well as the supporting circuitry needs to be kept down. While more expensive designs can be very useful, have a low cost circuit can be a good entry point to many people who then may go on to other designs .

Easy to Assemble

We're looking at mostly hobbyists and hackers, so the IC used needs to be easily soldered or that part would need to be already mounted (but that makes it hard to repair). That means the IC chip chosen can't have the pads on the bottom side of the chip or a lot of leads close together. This also means that the rest of the design should try to use through hole parts both for assembly & easy of modification by most hobbyists.

TI LM5050MK-1

Keeping all of those things in mind, I like the looks of the Texas Instruments  LM5050MK-1 . It operates from 5V-75V with an optional external power, on Off/On control which defaults on to, and can do load balancing when multiple units are in parallel. While the SOIC chip is rather smaller to solder, it only has 6 pins so magnifying glass, tweezers, and a steady hand with a soldering iron still works, The chip uses external Logic Level MOSFET's, so some very high current capabilities are possible. It's also very simple to use with very few external components in most cases, while also keeping the cost low.

Note on the power for the LM5050MK-1, it has a built in diode from Vin, so connecting the power pin can be optional, though common practice is to connect it either to Vin, Vout or an external power source. It only draws about 300 uA during normal operation with peaks up to 700uA during turn on/off, so it's always below 1mA, which is perfect for many uses.

Monday, July 21, 2014

Enhancing the Ideal Diode

Enhancing the Ideal Diode

In my last post, I introduced you to the concept of the ideal or perfect diode as well as the simplest form of how it could be implemented. Now I'll expand on that with several common additions to help protect the circuit.

Spike & Inductance Protection

The basic setup had no protection for bad voltage spikes or inductive kickback from the load. Generally this is accomplished by adding capacitors and diodes to both the input ant the outputs. Additionally, often the output diode (and sometimes the input diode) are TVS diodes that act like high current zener diodes that help kill positive spikes.
Normally, a large value capacitor with a low ESR rating is used on the output. Both the capacitors and diodes combine to help protect the MOSFET & IC from surges.

Reverse Input Voltage or AC Protection

Most ideal diode chips can't handle negative input voltages, so additional protection is needed if there is any chance that power may be hooked up backwards or is on AC input source is used.
By replacing the input diode with two back to back diodes, we can create a virtual ground for the IC chip, ensuring that it's GND can never be higher then Vin. Some people also add a resistor between the two diodes and the GND pin.

The above additions help make almost any ideal or perfect diode safer to use at very little cost or board space and should probably be considered mandatory except for special situations.

Keep in mind, when adding this to protect the circuit, the Voltage rating for the Q1 MOSFET must be increase because of the negative peak voltage on Vin compared to the positive voltage on Vout.

On/Off Control

Some IC chips allow for an On/Off input signal that can be used to disable the perfect diode. At a glance, this seems very useful, but there is another thing that you must take into account, the built in diode of the MOSFET's body! As mentioned earlier, the N-channel MOSFET has a built in diode that can't be ignored from Source to Drain, so when you turn it off, you still have a high current path through a real diode from Vin to Vout. If that isn't an issue, the following can be left out.

This can be solved by putting two MOSFET's back to back, so both MOSFET's get turned off & on, removing the diode from the circuit.
For IC chips without integrated support for double MOSFET's adding a couple resistors & a zener diode is the common solution.

R1 adds a slight delay to Q2 turning on (which is also why R2 is good to have) that makes the circuit run a little bit smoother, usually a very low value such as 10 ohm. ZD1 & R2 protect the Gate-Source voltage from getting too far out of range, protecting both MOSFET's from blowing. R2 is usually a high value resistor since there will still be some current bleeding through it and the body diode of Q1. ZD1 is usually 12V-15V range depending on the specifications of the MOSFET, and ZD1 & R2 can even be omitted  safely when working with voltages lower then the Gate-Source Vgs limit.

Some IC chips are designed with this in mind and include an additional pin to connect to the common Source line and don't require ZD1 & R2. Some designs also add a timing cap and resistor to the Q2 Gate to add a soft start feature.

Friday, July 11, 2014

Ideal or Perfect Diodes

The semiconductor diode is a common device that lets current flow in one direction but not the other up to a rated voltage. The problem with them is they also drop voltage across the diode and the higher current the diode can handle, the greater the voltage drop tends top be or the greater the cooling that is needed. In high current situations and in places where efficiency is critical, these loses can be very bothersome!

Think about off-grid or battery power as examples, every single watt of power is important. A loss of 0.7V - 1V may not seem like much to most people, but when you start talking about 20A or even worse 50A combined with a limited power source, it can make a lot of difference. In low voltage situations, the % of loss is also higher. Think about 12V losing 1V is an 8% loss right there with one part.

The Ideal Diode Concept

Enter the concept of the ideal or perfect diode! An ideal or perfect diode is one that has no voltage drop across the diode. Of course the laws of physics don't allow for perfection, but we can at least improve on basic diodes using other circuits, the most common way is to intelligently use a MOSFET with a low Rds ON value and to turn it on when the current is flowing in the proper direction, and turning the MOSFET off to prevent reverse current.

Engineers have known about this concept for a long time, but many hobbyists don't realize how easy it can be to do or the benefits of using such devices in specific application. Using an ideal diode circuit results in lower voltage drop, lower wattage/cooling, and higher efficiency. While they are often more expensive, there definitely situations where the added cost is worth it.

If you look around, you'll find multiple IC chips specifically designed to control a MOSFET as an ideal diode or they have the MOSFET built in. There are a wide range of voltage ratings available, and some are designed for load balancing or redundant power from multiple sources (either by themselves or when used in parallel with other chips). Many chips for use with an external MOSFET even include a voltage boost circuit needed in order to use an N channel MOSFET as a high side driver, simplifying design.

Since I play with a wide range voltages, and a very good use for things like this can also involve high currents, I'll be unfocussed on easy to build circuits that use external MOSFET's capable of high currents.

A Simplified Ideal Diode Design

Without yet choosing any parts, lets talk about the basics of an ideal diode using an external MOSFET for control.

In it's simplest form, the perfect diode driver compares Vin to Vout and then drives the Gate as needed. When Vin is > Vout, the gate is driver high (using with a built in voltage booster) enough to make the MOSFET have a very low voltage drop. What the voltage drop is depends on the exact IC used as well as the current involved and RDSon of the MOSFET. At lower current the IC's optimal voltage drop is the main factor (in the multiple mV range usually). At higher currents once the MOSFET is fully on, then current and the natural resistance of the MOSFET creates a higher voltage drop them the IC would prefer.

When Vout is > Vin, the Gate shuts down the MOSFET and diode is off blocking any reverse voltage from getting through. The automated switching of the Gate combined with the low RDSon when the MOSFET is on is what makes this circuit act as a diode with very low voltage drops.

Please keep in mind, this is also the absolute simplest form, without any protection circuits and power comes the Vin and/or Vout, some chips do need additional power. Others have a minimum operating voltage before the ideal diode kicks in. Until the IC has enough power to kick in, the built in diode in the body of the MOSFET is being used with it's full voltage drop. Once the power reaches high enough to run the chip, those without dedicated power will start controlling the MOSFET, reducing the resistance and removing the built in diode from the circuit but shorting around it.

Next time we'll start adding additional circuitry needed for various types of protection.



Sunday, May 25, 2014

Time to Reboot!

Ok, my last attempt to reboot didn't work out so well, and my experiments with switching power supplies are gathering dust ... and I've started playing with other things in electronics.

Lets try this again, and see if I can keep things going better this time!

Saturday, June 9, 2012

Back to playing ... switching power supplies?

Follow-up on the switch controller
Life is crazy, as most people know. After having many delays with my previous project I wrote about getting the boards installed on my father-in-laws train set, I'm proud to announce that he's been very happy with using them and glad he can't accidentally burn out any of his switch motors. While he's not using the tortoise style features I built in, he's been using my boards where he has his relay style switches. While I've been over there I've also helped him improve how he's been doing his wiring, including giving him a good supply of heat shrinkable tubing to use to help prevent accidental shorts. Never underestimate how much a simple change can improve things. I do admit, I went overboard when I bought my supply on eBay, but I figure having too much in stock will help me be less concerned about the cost of using it, and more concerned with safety, but 100m of heat shrink per size will last a hobbyist like me forever! Since I last wrote ... Since I did my previous design, I've done two other boards which I might cover them or related in the future. A current & opto sensor board for the train layout and a simple generic voltage/current isolation board with 8 outputs at up to 1A each with opto isolated inputs. In the near future I'll be helping my father-in-law test the opto sensor portion of my sensor board in a couple portions or his layout where he wants to prevent accidents once he starts using DCC & multiple trains.

Thinking about new designs...
After talking with my father-in-law about DCC and his questions about booster stations, I dug up the specifications for DCC from the NMRA DCC standard and looked at a simple 3A DCC booster design. I admit it, when I look at circuits I'm cheap when I'm worried about the cost of parts, and the LMD18200 seems a bit expensive to use, specially to get only 3A capability! So, I start digging into H-bridges and half-bridge parts and circuits as well as the parts I already have and use. Since I'd like to eventually be able to handle more the 3A is I need to (both for the trains and myself), I decided that a driver with external FET's would probably be the best way to go since then I gain high current capabilities and can tune a single design based on cost & current requirements easily. Yes, I know there are good commercial boosters available, but I'm also giving you my train of thought and I like playing with circuits anyways and maybe I'll inspire someone else.

... to switching power supplies?
As a side effect of my research I also got to thinking about some about switching power supplies, and how my test setup, having a couple power supplies with a wide range of voltages and 5 to 10 amps available would be good. High current unregulated supplies are simple, linear regulation over a wide range with 5+ amps usual means heat & heat sinks, cheap switching supplies either don't have the current or are more limited in range (5V-30V 5 amp is the minimum I'll consider for my test bench setup, and 3V to 40+V at 10 amps or more would be sweet). Combine that with the fact I discovered my cheap 2A up to 15V DC supply I bought has a nasty spike on it at 52khz, I think I'll play in this area and see what happens.

Start combining it together
Most switching supply chips can be sensitive to the board layout and/or are current limited, Being a hobbyist, I want a circuit that isn't very sensitive. Since I might have to play with an H-bridge driver in the future, or maybe not. Plus, if you aren't careful with your design, you can easily pickup noise at the frequency that basic switchers run at or a design that isn't very adjustable. Yes, a good engineer can prevent that, but I'm the first to admit I'm not an engineer! How about using a half-bridge driver with a couple MOSFET's as a simple DC to DC converter/switching power supply and I can use a simple unregulated power supply to run several of these to meet my needs? While not something that is commercially viable for me, it'll be something good to play with that will help my setup as well as other projects in the future.

Time to start play and see what happens :D

Tuesday, October 11, 2011

Turnout Switch Controller Schematics

Turnout Switch Controller Schematics

Now for the complete schematics. This schematic is Copyright by myself 2011, but I grant permission for anyone to use it for personal purposes. If you'd rather not build it yourself, I am selling the blank PCB to help offset my design costs and keep my own per boards cost down. I don't have a high markup, the intent is to keep the price down to help out hobbyists and experimenters.





The final PCB measures 3"x4.5" and has four plated through mounting holes spaced 2.5"x4" apart for #6 screws. In my mounting for the train set, I used some cheap plastic spacers and wood screws to mount them to the 2x4's of the train layout.

Previous Section: detailed descriptions

Assembly Options
 
Most of the assembly options ar compatible with each other with the exception of only one output MOSFET/Transistor per stage is permitted, and a high voltage output with voltage regulator can't be combined having a low voltage power supply input for the timing and logic stage, Even having the extra diodes on the output stage used for transistors is safe to combine with MOSFET's since they will simply add extra protection.

When you don't need the flexibility of using jumpers as options, I encourage you to replace the headers with a wire jumper. The designs allow for jumpers for when flexibility is required. This is also why some jumpers are in pairs so that either two 1x3 or one 2x3 header can be used as well.

For capacitors C1, C16, C17, and C18 only install as much as needed. Using all four at 1000uF each is only needed if you have a weak power supply and high current devices. having a single 100uF capacitor works for good quality power supplies. When using high output voltage, at least one capacitor in each section should be installed after cutting the runs on the top layer (marked by the X's) and installing either a 7805 or a 7812 in the holes near the top X in the picture if you want to power the low voltage from the high voltage. It's recommended to also add a diode between the low voltage and the high voltage to help drain the low voltage capacitors faster as a fail-safe.

Connector J1 is there for the convenience or using a ribbon cable. I expect most people won't be using that and and be omitted. Input connectors J2 & J3, output connectors J6 & J8, and power connectors J4, J5 & J7 have extra large pads and larger then needed holes to allow direct soldering or wires people people trying to save a little. Also, many people will only need one of the three power connectors, the additional connectors are to make it easier to choose where power comes in, daisy chaining boards, and the high voltage output stage option.

For two wire only assembly, input connectors J2 & J3 can be two position, leaving the third pin unused. When two wire with a single common voltage is used that the main control signal goes above or below, you could make J2 a 3 position connector, and then solder a wire from J2-3 to J3-1 and install the common jumper JP3. When the common voltage changes or is not the same, do NOT jumper JP3 since that shorts J2-2 & J3-2 together.

Normally jumpers JP1 & JP2 need to be in the same position as do JP4 & JP5 to select two wire or three wire operation. Jumper 1-2 for two wire operation and 2-3 for three wire inputs. Each half of the board though does not need to be the same, but be careful of the JP3 common jumper that shorts the two common inputs together, specially since some two wire modes change the voltage on this input.

In the Timing circuit, JP6, JP7, JP11, JP13 determine if the timers are edge or level triggered, using edge triggered allows for safe control of coil/relay style switches, Level triggered should be used only for devices that are safe to be on constantly, such as stall motors (Tortoise) and lights. If you will be using only level triggering, then the pulse capacitors C2, C4, C8, C10 can be omitted along with R7, R10, R13, R14

Paired output and timer resetting is controlled by JP8, JP9, JP10 & JP2. When in position 1-2, an input will clear out the timer on the other output for that pair to prevent turning on both sides of the output at the same time. This is highly recommended (almost required) for good three wire output to snap/coil style switches. But, when you want to use the output independently, you don't want that to happen and connect pins 2-3 together. People experimenting or needing other additional logic can even jumper other signal into pin 2 or wire things differently (such as JP8-2 to JP12-1 to watch a different input).

For Transistor output, D1, D3, D5, and D7 are required when driving relay, coils or anything they might deliver a back voltage. When driving lights or using MOSFET's, these diodes aren't needed.

The resistors R21-R24 are used only with low current two wire output mode they can be omitted in three wire mode. The values can easily be adjusted for two wire mode, but remember that the MOSFET/Transistor used with them will need to draw twice the current in two wire mode.

For High Current output, I recommend using MOSFET's rated for higher voltage and at least 5 times the current for driving typical snap/coil type switches. Having them them needing to draw 3A is common, which is why in my design & tests I show a 20A part. This allows for good snappy action and at the same time no heat sink is required unless the turnout is used a lot. In my tests win an older concor 12V dual coil switch, the switch was getting hotter faster then the MOSFET's were. In general with MOSFET's, the higher the current rating the cooler they will run and often be more expensive, but even many 40A parts are fairly cheap. Some room has been reserved for small heatsinks to be used, but be careful not to let them short out to other parts. Heatsinks may be required for high current constant use.

Timing Options

As stated above, the timing control can be edge or level triggered. When it is level triggered, the timers are used to debounce the input signals and fairly short timing is needed. When edge triggered, the timers determine how long the outputs stay on. I;ve found that 1/5th of a second works well for snap/coil switches and about 8-10 seconds for tortoise switches works well.

There are 4 pairs of parts that control the timing, R8+C3, R15+C12, R11+C6, R16+C15. Each pair controls the timing for one output. Adjusting their values down shortens how long they will be on.

Some approximate sample values are listed below:
RCTiming
1M ohm0.1uF 1/10th sec
2M ohm0.1uF 1/5th sec
1M ohm10uF 10 sec

Other combinations of values can easily be used to get the same timing. These are simply based on RC time constants and measured with parts I had on hand. Since most of the boards for me needed the 1/5th second timing, being able the same type of capacitor for timing and power filtering was handy.

Sunday, October 2, 2011

Power Subsystem

Power Subsystem

In my original design, the power subsystem had two pairs of connectors, envisioned as an input and an output, or use the one of your choice as the input. Intended for up to 16V DC and 7.6A total current and 3.8A constant on a single output.

I ran two power and ground buses off of the power connectors in loops and wired the two buses together to into multiple parallel paths allowing twice the current to reach any one point or just to help the power be cleaner.

Adding 4 medium sized capacitor positions (which I populated to 1000uF 35V caps), I was easily able to fire the 3A relays using my under powered 2A power supply. Since for a hobbyist or experimenter, this is a 'good thing' I also added multiple hole positions on the power and filters caps to make it easier for a variety of parts to work. This means anyone using this design can optionally add different capacitors depending on what they have on had or special requirements.

Then as part of bumping up to a rev 1.0 and trying to be more flexible for the hobbyist or developer, I added a third power connector in the output stage and made sure there was a power loop just for the output stage, connected to the inner power loop by just two runs marked for 'easy' cutting leaving three large capacitors in the output stage on and to help filter the timing stage. Then I added holes for 7805 or 7812 voltage regulator and a bleeder diode, to allow a higher voltage to be used in the output then 556 timers could handle. You either use two external power supplies, or a single power supply feeding the output stage and a regulator feeding the timing stage. Again, how this is setup depends on the exact needs, the board defaults to a single set of power with up to three connectors, but is designed to be modified to isolate the two voltages.

Next, I changed the track thickness of all runs from 1oz to 2oz, allowing any single output to handle up to 6.3A continous and a total current capacity of about 12.5A and even higher for surges. This helps if all four outputs needs to be run constantly at up to 3A each and reduces problems from surges. The cost increase for the thicker traces was barely noticeable and it made ALL the runs more durable, not just power/ground.

If more is ever needed, reinforce the runs with wire and watch the connector specs or solder the wires directly. The connectors I was using in my testing were rated for 15A, but I did allow for flexibility there, including slightly over sized holes & pads as well.

That leaves the final limiting factors to the selection of MOSFET, heatsink, and external power supply more so then then actual board design.

Next Steps ...

This improved design I've now had built in a small quantity beyond our modest needs in the hopes that the extras can be sold off on eBay during the next year or two to help keep my total costs down. If people do seem to find this useful and deplete my spare stock, I'm willing to order more and continue selling to help fund additional designs. But, being that this is a hobby of mine and I want other hobbyists to be able to benefit, the price stays low, around $5-$6 each PCB blank plus shipping here in the USA. No Chinese imports here!

I'll be posting a full set of schematics to what I've done so far and post the results of the final installation and testing as well as my next project. More docs as well, including infomration on all the optional jumpers, etc to make it easier for people to work with the design.