Friday, 4 September 2015

batteries - How to create automatic dual battery changeover/switching circuit for uninterruptible power?


I've search for a solution to my problem both on this site and on Google but I did not find a complete and adequate response.


I need a circuit that switches two 12v sources (one that comes from a lead-acid battery powered by a solar panel and the other source comes from the output of a 220-12v switching power supply) without the final power output being interrupted during switching (this is very important!).


Notes:
- The final power output will be used to power 12v devices (30 Ampere maximum).
- The sources voltage range is 11-14.7v


How can I switch between two 12V sources?




Answer



As Olin suggested diodes is the best way to join two supplies. However, if the voltage drop is more than you can tolerate perhaps a more active design would be more to your liking.


enter image description here


The LM5050 and MOSFET combination generate "ideal"ish diodes.


If you need to actually turn off the individual supplies, I'd use appropriately sized relays before that and sequence them so they both turn on before one turns off.


operational amplifier - Where do I find models for various common op amps for use in LTSpice


I have just started using LTSpice. I need to simulate a circuit with op amps, where the parasitic elements of the op amp may effect performance. So I need to try different 'real' op amps to see which on is best.


Is there a source of commonly available op amp models like TL074 or LM324



Answer



From the manufacturers. For example TL074 spice model


Be aware there are sometimes problems with manufacture's spice files. I have found that they sometimes use node zero in parts of the internal circuit. This result of this is that the model works fine unless you supply it from power rails at a potential far removed from your circuit ground. Also you sometimes need to do a little bit of translating of p-spice specific syntax.


ground - Grounded Common AC-DC Power Supply Simple Circuit


I need an AC to DC converter circuit where it is safe to connect common to ground.


My situation: I have a remote 120v->24v transformer. The 24v neutral is grounded. The DC circuitry is the only load on the transformer. The common node must be grounded for a communications bus.


What AC to DC converting circuits will allow you to connect common to ground?



Answer



You talk about a "24V neutral", does that mean the center tap, like in JustJeff's interpretation (JustJeff deleted his answer)?


If you do have the center tap this rectifier is the solution, like JustJeff also suggested:


enter image description here


You get a full-wave rectifier (less ripple) and the rectified voltage won't be extremely high: \$V_{OUT} = \frac{24V}{2} \times \sqrt{2} - 1V = 16V\$. (That's still high enough!)
note: center tapped rectifiers don't make efficient use of the transformer, because only half of the transformer is used at any time. A half-wave rectifier has a similar problem: it uses the whole transformer, but only half of the time.



If you don't have the center tap there's a bridge rectifier of a half-wave rectifier. The bridge won't work: there's no point on your transformer which you can connect to the DC's ground without shorting a diode. So you go for the half-wave:


enter image description here


The output peak voltage will be \$V_{OUT} = 24V \times \sqrt{2} - 1V = 33V\$ (that's high!), and it will have some ripple on it. How much depends on the capacitor value and your load. If that's limited to, say, 50mA, a 1000\$\mu\$F cap should take care of that. If your load current is much higher, you not only will have a much larger ripple and need a much larger capacitor (which won't be happy with this ripple), but if you use a linear regulator you'll also lose a lot of power in that. Even at 50mA it will consume 1.4W. A switching regulator is the solution if you want to stick to your current transformer.


If you can switch to another transformer I would pick a 2x8V dingus and use the center tap solution. (Even 2x7V will do, but may be more difficult to find.)




edit
From your comments I understand that you want to limit the current (maybe to limit cable losses?), and therefore rather would use a higher transformer secondary voltage. That's OK, but in that case you definitely need a switching regulator; a linear will cause too much loss. This one may be a possibility:


enter image description here


Other options are two separate switchers, or a switcher for the 5V, followed by an LDO for the 3.3V. All depends on the currents you need at those voltages.
The higher input voltage may also mean that your circuit/network is no longer SELV, if that's important. (I don't quite remember what the maximum DC voltage is for SELV.)



Thursday, 3 September 2015

atmega - Are I/O pin internal resistances equal to the Thevenin resistance?


I'm trying to find the Thevenin resistance of an I/O pin for the ATmega644. I see on the datasheet that there is a 20-50 kohm range of internal pull-up resistance. So with that, I can create a circuit modeled thus (ignore all values):


Enter image description here


The voltage source is from the GND and I/O pin and the resistor in the diagram is the pull-up resistor. I only care about this pin when it is HIGH so I am assuming that the Veq=Vcc. Thus Req is the pullup resistance when high.



Am I missing something here? I'm looking for the output Thevenin resistance.



Answer



The information you gave specifies the Thevenin equivalent when the pin is configured as an input. Veq will be the same as Vcc and Req will be the pull-up resistance from the datasheet. The input capacitance might also be important, depending how you use the input.


When you configure the pin as an output, the equivalent circuit will change. Req will be much lower. Veq will depend on whether the output value is high or low (and Req probably depends also).


When calculating the Thevenin equivalent circuit, its good to remember that Veq is the open-circuit output voltage; and Req is given by Veq/Iss, where Iss is the short-circuit output current.



Microcontroller data sheets don't always give you everything you need to know to answer your question. Here's the closest thing to relevant lines from your datasheet (p. 316):


enter image description here


This says that with a 5 V supply, if the load is 20 mA or less (the negative sign indicates current going out of the pin) the high level voltage will be at least 4.2 V. You can guess that the open-circuit output voltage will be very close to 5 V (or you can measure it on a demo board to be sure). That implies the Req is no higher than (5.0 - 4.2) / 0.020 = 40 Ohms.


In any case, these estimates are all very rough. They all depend on the assumption that the output driver has linear characteristics. In reality, the behavior is likely to have substantial nonlinearities, so its better to design using the specs that are guaranteed in the datasheet, rather than make guesses about Thevenin equivalent circuits.



For example, if you design your LED load to draw less than 20 mA, you know that you'll get at least 4.2 V out of the output pin. That should be enough to choose your LED current limiting resistor, or tell you that you need an external transistor buffer to drive your LED.


Also, be sure to check Note 3 after the quoted table in the datasheet where it gives some limits for total I/O current in case you are driving multiple LEDs from different pins.


transistors - I am trying to build a 0-42v Voltage measuring circuit that outputs to a 5v Micro! Failing badly


I am on to my next project which doesn't seem to be working as planned. At first I thought that I would find a boatload of pages on how to do this, but to my absolute surprise I couldn't find anything without having to resistor swap! I am trying to read from 9v-42v. Think its easy? Think again!


There are Chinese circuits you can buy online cheaply that do it, but wheres the fun in that, i want to build it!


Can anybody help me?


enter image description here



This is what I am trying to build (and simplify - I don't need all the features), I could buy it but I wont learn! Its a motor controller circuit. It runs 12-60v DC - why didn't he use a single resistor divider too? is he a fool like me? he obviously knew what he was doing, instead R1 has to be swapped depending on what voltage is running, 12v, 24v, 36v, 48v but this isn't the only circuit I've seen, some have op-amps or A to D converters, but why? dont they know what they are doing? A resistor divider would be just fine? this is why Im asking the question. I didn't want to hear just resistor divider, i was hoping to see something better and then understand why!


part2




relay - Circuit to switch off circuit "B" for 2-3 seconds when circuit "A" is switched off


Am really a noob in this regards, therefore, need help to build an easy 12V circuit which when circuit "A" is powered off enables "B" circuit to switch off for 2-3 seconds and then turns on. Hopw I have clarified myself, I have searched it but not found the answer. Would really appreciate the help.


Thanks so much everyone for the prompt suggestions, will get the material and build both the circuits tomorrow and will let you know the results. It is a required for cluster of my vehicle and circuit 'B' is basically always open circuit as it supplies power to retain clock/date memory in the cluster. Here I will add that if this circuit 'B' is disconnected for longer duration the memory of clock/date is reset. As far as circuit 'A' is concerned it is basically the ignition switch and when it is ON nothng is required to be done to circuit 'B', however, when 'A' is switched OFF then 'B' has to be disconnected for 2-3 seconds and then connected again to overcome a problem of the dials illumination (i.e the power remains ON in the cluster when the vehicle is switched OFF if not cutoff). Hope I have clarified myself :)




transformer - Toroids low magnetic field is only for the core?


1 2


Here is a thing. When I connect it as 120v (parallel), the magnetic field outside the core is much lesser than when connected as 240v (series). The load of both is same 100v-256v autovolt LG OLED TV (just for testing).


Does it mean when connecting as 240v series, the windings don't have uniform current? Why? How?


It's for this model http://catalog.triadmagnetics.com/Asset/VPM240-2080.pdf, a 500va medical isolation transformer I bought to protect my bench project troubleshooting.




arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...