Friday, 2 September 2016

simulation - Electronic circuit simulator for tracing current paths?


I've started learning electronics a few weeks ago and almost everything was pretty straightforward to me. I was able to understand with relative ease the fundamentals of a basic circuits and there working process. However, recently all the schematics in my textbook became a lot more complicated and all of a sudden a new symbol begun to appear more and more often ( the ground symbol ), I am no longer able to trace the paths of the current in those schematics, because to me they look incomplete ( like there is no wires closing the circuit ).


enter image description here


I can't determine current flow and it's direction anymore and where it started in the first place, also, it appears to me that with such more complicated schematics more than one current can flow in a wire at the same time, sometime in opposite directions, so, basically it's pretty messy. I Google searched for techniques regarding my issue and many people who were sharing their thoughts over it said that it is a good idea to buy a electronic circuit simulator. Well, I did, I bought this one TINA and I spent $239. It turns out that it doesn't actually trace the paths, all it does is, for a given values of different electronic elements connected in the circuit, to compute the output and that's useful but it it is not what I am looking for. I am looking for a software which, for instance, to do something like this but in a more accurate fashion:


enter image description here


If there isn't any application able to perform this task, can you favor a technique which can help me. Thanks in advance.



Answer



For very simple schematics it really doesn't matter that much. These two schematics are equivalent but because they are so simple it probably doesn't matter that much which way you choose to draw them.


schematic



simulate this circuit – Schematic created using CircuitLab


The both mean the exact same thing. The left side is more of a wiring diagram, which is probably needed by someone who doesn't understand electronic design much but who does understand wiring things together when given a picture to follow. The right side is more for a designer who is focused on the meaning of something and less on details (like where voltage supply wires are at) that have very little to do with understanding the circuit.




You managed to hit the nail on the head when you wrote,



"...recently all the schematic in my textbook became a lot more complicated and all of a sudden a new symbol begun to appear more and more often ( the ground symbol )..."



As circuits become more complex, including dozens to hundreds of different key sections, I think you can readily imagine that the construction wires would start to get in the way of understanding and interpreting what's there. It's only of secondary or tertiary importance that there actually is a wire going from the top of \$R_1\$ above to the \$+\$ terminal of \$V_1\$. In fact, it's not even important to show \$V_1\$, itself. It's enough to simply know that there is \$1.5\:\textrm{V}\$ across \$R_1\$.


As the circuits get very complex, drawing all those wires makes the schematic covered in black lines criss-crossing here and there and back again and none of them really matter to understanding the primary functions. And it is far, far more important that you follow the basic sections and understand what they are doing and how they are doing it, than to be distracted by wires that simply connect a couple dozen parts to a battery terminal. Sure, it's needed in order to work. But it's definitely not needed in order to understand it.


In fact, all those extra wires quite quickly become a problem.





The ground symbol is a matter of thinking convenience, too. Technically, all voltages are potential differences. There is a potential difference across \$R_1\$ above. (The difference between \$+1.5\:\textrm{V}\$ at the top and \$0\:\textrm{V}\$ at the bottom.) But it is a lot easier to just speak of "voltages" rather than potential differences, because it saves you from having to point out the two separate points you are discussing. If instead, you and the person you are communicating with decide to agree on a common point in the circuit to call the "common" or "ground" reference point, then whenever you mention a voltage they will know you mean "a voltage with respect to this common point we've agreed upon."


It just saves words and mental struggles to agree on a common reference point when discussing voltages. You don't have to do that. And if you look at the above left side schematic I drew, I didn't show one. The circuit will work without you and me agreeing upon a common reference point, just fine, because nature and physics does not care in the least what you and I agree about. But having an agreement does help us talk to each other about a circuit.


(That said, there are actually very good reasons for what's called an "Earth ground", where a house and appliances are kept tied close to the voltage of the surrounding dirt. Lightning and other effects of weather do create dangerous potentials that vary from place to nearby place and it's a lot safer if you tie everything together. But that's a totally different subject where the term sounds similar but the context is usually enough different that you should keep the ideas separated in your mind until you know enough about when to connect them and when not to do so.)




Let's take a look at a more complex circuit, drawn two ways. Let's start with the fully wired up version first:


schematic


simulate this circuit


Now, followed up by a version where I have eliminated the unnecessary busing around of power supply wiring (which above was more about blocking understanding than in aiding it):


schematic



simulate this circuit


I've also shown you some of the important sections within the LM380, now, surrounded by colored boxes. Note that this is exactly the same schematic but it is now drawn without some of those distracting wires, which really do not aid comprehension.


I don't expect you to understand the schematic, even now. But the green and red boxes enclose two current mirrors; the purple box encloses the high current output driver stage; and the blue box encloses the differential amplifier. There are a few added bits and pieces, but it is now easy to see that there are just a few, simple connections between the sections and that the sections themselves are nicely separated out. The power supply (and ground) wiring does not add to understanding here. It subtracts from it. Removing it from the schematic helps you focus on what matters, when struggling to figure out a circuit.


For example, now you can see that there is a single connection needed from the pairing of a differential amplifier section (blue rectangle section) and the added current mirror (green section) towards the high-current amplifier section (purple/magenta rectange section.) It's not important to know exactly how this current mirror and differential amplifier mysteriously operate together. It's enough to see that they have a single wire that connects the pair to the high-current section so that some magic takes place along that wire to allow one to drive the other.


All this allows a reader to divide and conquer a circuit.




Eventually, you find that there are a few very simple rules:



  1. Current flow should be arranged so that the top of a schematic is the most positive and the bottom of the schematic is the most negative. Signal, if applicable, should flow from left to right, with inputs on the left and outputs on the right.

  2. Don't bus voltage rails (or ground) around. You don't need to see all the connections as it doesn't matter (mostly) for understanding a circuit. And just label the nodes where you know the voltage.



These are not hard-and-fast rules. But they are good guidelines to be aware of and to apply well. But there may still be times when you have to do things just a little different. Just make sure your reason is be justified by improving the understanding of the circuit.


The goal is, after all, to communicate.




I think by now you might be able to glimpse into why you are beginning to see what you see, as the circuits become more complex. It's not difficult to deal with wires (or the lack of them) when the circuits are trivial. But when they are far more complex, not only does busing around voltage supplies with drawn-in wires eventually get in the way... if the circuit is truly very complex (like a modern oscilloscope/spectrum analyzer) then all that extra wiring makes the schematic nearly impossible to read. Try it sometime. It's actually impossible. You have to get rid of the wiring just to understand the darned thing.


Of course, if you are trying to communicate with someone holding a soldering iron in their hand, you might want to include all those wires. But that's a different thing. Right now, you are getting into more complex circuits and it is important that you acquire a respect and appreciation for removing those unnecessary extra wires and to start doing the same thing yourself when you are trying to communicate with others.


That said, wiring is still important. It carries inductance and capacitance and resistance that is otherwise hidden from view. But this is also true for all the parts you put down in a schematic. (A resistor will have inductance and perhaps capacitance; transistors have capacitance, resistance, and inductance; etc.) You cannot ever completely document all of the so-called "parasitics," no matter how much you try.


So instead you focus on the primary mission of the schematic. Then, where important (or you imagine so), you add in notes regarding secondary and tertiary details. But you try and do so in a way that doesn't prevent quick assimilation of the schematic's primary solution approach. You want to communicate the primary mission right away. Then work on communicating details that are also important, but of a secondary nature to understanding the main thrust of the schematic. (Unless, of course, you actually want to make the schematic confusing. But that's a different thing.)


Heat lost in ideal capacitor charging


If we use an ideal capacitor to charge another ideal capacitor, my intuition tells me no heat is generated since capacitors are just storage elements. It shouldn't consume energy.


Original question


But in order to solve this question, I used two equations (conservation of charge and equal voltage for both capacitors at equilibrium) to find that energy had indeed been lost.


My diagram


My solution


What's the mechanism by which heat is lost in this case? Is it the energy required to push the charges closer together on C1? Is it energy spent to accelerate charges, to make it move? Am I right in claiming that no "heat" is generated?


I noticed that the energy lost equals that stored in the "equivalent" series capacitance if it was charged to \$V_0\$. Is there any reasoning why it is so?


Parallel capacitance




Answer



The problem with these theoretical examples lies in the fact the current is assumed infinite for 0 seconds. Crudely substituting this in the conservation law:


$$ \frac {\partial \rho }{\partial t} +\nabla \cdot \mathbf {J} = 0 $$


$$ \frac { \rho }{ 0 }+ \infty \neq 0 $$


Since charge is conserved, the assumption of infinite current in zero time is wrong.


How much power is dissipated \$P_{diss}=VI\$ cannot be defined, since the definition of the current is false.


So, the answer is: cannot be defined


EDIT
Note that the dissipation neither is 0 W because R = 0 \$ \Omega\$. For the same reason as above: \$ P = I^2R = \infty^2 \cdot 0 \$, which is not defined.


Scaling an input in VHDL


I want to attenuate an incoming signal (16 bit signed number between -1 and 1) by a certain amount (let's say 0.8), i.e.,


incoming = incoming * 0.8


Where incoming is a signal:


signal incoming : std_logic_vector(15 downto 0);

But I'm having trouble getting this to work. Inside a process block:


variable temp : std_logic_vector(31 downto 0);
variable scale_factor : std_logic_vector(15 downto 0) := x"6666";

begin

incoming_raw <= data_in;

temp := incoming_raw * scale_factor;
incoming <= temp(31 downto 16);

end process;

ModelSim doesn't like this and gives me:


# ** Error: /home/blah/blah.vhd(254): No feasible entries for infix operator "*".
# ** Error: /home/blah/blah.vhd(254): Bad right hand side (infix expression) in variable assignment.

Why can't the * operator do this when both operands are 16 bit std_logic_vectors?





Thursday, 1 September 2016

LED current while off


I have a vague recollection that while off, a LED can actually receive light and generate a small current (in uA). Is that correct? How does that work? What is the best way to prevent this?



Answer



A LED can work as a (not very good) photodiode, and produce a small current when it receives light. You have to connect it like a photodiode, though, that is reversed polarised. In a normal circuit you won't have trouble with it.


amplifier - Need help design active crossover circuit


I need to build an active crossover circuit for my 2-way speaker design. I decided to use TDA2009 as my audio amplifier. TDA2009 is shown connected below in the picture. My question is: how can I modify the TDA2009 circuit to implement the circuit in the gray box?


I know that C10 and C11 are need for the DC battery to minimize noise as well as C1 and C2 (2.2uF). So these 4 capacitors need to stay in the circuit. What about C4 and C5 do I need them? or I just connect the high pass filter of the gray box directly to pin 8 and 4 of TDA2009 and the low pass filter directly to pin 10 and 2 of TDA2009? What do you think?


Finally I need it to be active filter that is my TDA2009 need to be placed after the filtering circuit (gray box).


Please I need your help concerning this. I came to this forum after weeks of research because I am really stuck.


Thank you for your help in advance :) enter image description here





What sort of electric "motor" would I need to launch a puck?


As the title suggests I am looking at making a hockey puck launcher so I can do some off ice technique training as a goal tender. I have no one to train with so I wanted to create a puck launcher similar to the tennis trainers they have that fire balls at you.


My idea was to run an electric motor that was attached to two spindles (via belt or chain drive) with spinning wheels. When the puck is inserted between them it will grab and take off. My problem is I'm unsure as to how to determine what size motor I would need as I don't know much about torque / force.


I want to be able to do the following:



  1. Fire a 100 gram (3.5 oz) inline puck.

  2. Speed should be able to be varied between 0 - 60 mph.

  3. Must be able to be plugged into 240v mains power (I live in Australia) via step down transformer or similar. (Note: I have qualified electricians who can do this for me).



I was looking at hobby RC motors as those cars likely weigh more than 100 grams and many of those can go extremely fast, they also have variable speed control to mimic a real car. My concern is though would they have enough power to grip the puck and throw it? Is there any math I can use to determine this at all?


If you need any more information or would like a design or something to help with the question to prevent it from being closed let me know.



Answer



You probably want a stored energy system to reduce required motor power.
Mean power can be low - if you lower the firing rate the mean power drops.


Easiest way to get consistent results is probably to have a rotating wheel with substantial mass that spins at the required circumferential velocity. If this is used to accelerate and "sling" the puck, and if Mwheel >> Mpuck then it will not slow much as the puck is accelerated to exit speed. Wheel is spun up by a motor of whatever power is desired. Larger motor = quicker recovery time. Note that if the wheel stores say 10 x the puck max energy you have a potentially lethal flywheel which would not be too hard to build safely, but care is required.


Wheel balancing machines spin the tires & wheels up with an electric motor. Some have quite a small Wattage motor and a slow run up time. Others use larger motors and faster runup. I've seen older ones with a 24 VDC motor and maybe a few 10's of Watts max power.


Spin up a wheel on such a machine to desired speed, place a sprung "floor" under the wheel, not touching but less than puck height separation, feed in a puck [from the BACK :-) ! ] and watch it vanish as it touches the tire. An old deadish wheel balancer may be available at minimal cost. Probably larger than what you had in mind :-).





Energy & Power:



  • Liberties: The following takes some liberties with power and energy profiles when accelerating a puck. If you accelerate at constant power then velocity change is not linear. If you accelerate at constant acceleration then power input is not linear. Time to accelerate depends on power input profile and is not the simplistic figure derived below. But, the following should give a good feel for power end energy levels involved.


Energy / Power / Acceleration / time in 'launcher' / ... :


Given puck with mass = 100g = 0.1 kg and
velocity_max = 60 mph = 27 m/s -> say 30 m/s then


Puck energy \$(E_K) = \frac{1}{2} \times m \times v^2 = 0.5 \times 0.1 \times 30^2 = 45 Joule = 45 Watt seconds. \$
(\$ E_K \$*=kinetic energy, m= mass of the object in kg, v= speed of object in m/s).*


Linear motor: If you accelerated it at constant power over a say 1 metre linear track them

Vmean = (30-0)/2 = 15 m/s so time to accelerate = 1/15s = 67 mS.
As puck energy = 45 W.s and you are delivering this in 1/15s the power during acceleration is ~= 45 Ws / (1/15s) = 675 Watts.
That's more Watts than you'd like to need in a linear launcher if you are driving it directly electrically.


"Crossbow": Instead you can wind up a "crossbow" type mechanism where a spring or torsion bar or whatever is wound up to store the desired amount of energy and then "tripped".
For a potential firing rate of 1/second you need 45 Watt of energy to storage transfer rate - say about double this to get electrical motor input or about 100W.
For a 5 second repeat rate you are down to 20W and 10W for 10 second cycle time.


"Putter:" A 10 Watt motor winding up a spring via a reduction box or screw thread or ...? is easy to build and play with. It would (probably) be easy to pull back a weight on a pivot (rigid shaft pendulum) and let it go so it swings and strikes the puck, golf putter style. Potential energy in a mass is mgh
or about 10 x kg x height.
You want 45 W.s max. 10 kg x 0.5 metre x 10 = 50 W.s
Height is the vertical height above rest level.

Velocities are now wrong and you are going to need to deal with impulse energy transfer, but it should be in the order of right.


Rocket: A potentially workable system would be to use compressed air and a pressure reservoir. A completely DIY system could use a "water rocket" type launcher as built by amateurs world wide. Liable to be somewhat noisy [tm] on release.


Treadmill motor / Direct drive rotary flinger: A potentially excellent excellent motor for a flinger is a treadmill motor. These are typically rate in the 0.5 to "several" HP range and 200 VDC permanent magnet units powered from 230 VAC rectified mains (and no doubt the 110 VAC based versions in the US) are common. Speed control by PWM or other voltage variation allowing wide range speed control. An arbitrarily large disk could be attached directly to suit the motors preferred RPM maximum. eg an 1800 RPM motor = 30 RPS will need a 1 metre circumference disk to deliver 30 m/S = a diameter of 318 mm or about 1 foot.


Component reliability


I'm trying to design my project, Super OSD, to be as reliable as possible. I want it to work good as new when 5 years old. I hate unreliable products, environmentally it's a waste, and economically it's expensive.


To that end, I'm avoiding electrolytic capacitors, and I've spec'd everything at least 1.5x, most 2x where size/cost permits. However, I am still having to use tantalum bead caps for the on-board regulators of the microcontrollers.


Are there any other things I should be aware of?



Answer



If you use appropriate derating guidelines for electrolytic capacitors (keeping the ripple current in check, ensuring they stay well below their maximum temperature rating) they can last a very long time and still provide adequate performance. I've seen capacitors come out of 15 year-old equipment and still 'work' to some degree.


Fans have a limited lifespan depending on how fast you operate them. They tend to gradually fail over time.


If you have a primarily surface-mount design, consider conformal coating to help limit exposure to the elements and mitigate oxidation, etc. Products in the field for years which have some air exposure can very easily get several millimeters of dust, which makes a very effective thermal blanket.


Make sure that, if you're using RoHS parts, that you're not using parts prone to tin whiskering. (This is another area where conformal coating can be helpful).



arduino - Can I use TI&#39;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...