Wednesday, 7 September 2016

software - Free circuit simulator for educational purposes



I am looking for a free circuit simulator for educational purposes. My requirements are:



  1. Visual ("draw a circuit diagram, click simulate")



  2. It should contain light bulbs as circuit components such that


    2.1. They become (visually) brighter if you apply more power


    2.2. You can change the manufacturer specs for example "3.5V,0,2A"




  3. It should contain swiches, npn-transistors, diodes and LEDs as well (the LEDs should react to interactive changes in the simulation)




Any recommodations for this? It would be nice if the simulator runs under Linux, but that's not a strict requirement.




Answer



I often use the falstad simulator: http://www.falstad.com/circuit


It's a Java applet, so will work on pretty much any operating system. The interface does take a bit of getting used to, and there are problems saving in Linux (it gives you a link to copy and paste, and copy and paste in Java doesn't work too well in Linux).


Other than that it ticks all your boxes. It also has some good sample circuits. A Windows version (circuitmod) is based on this.


How to dimension a power supply transformer?


I always hesitate when dimensioning a transformer for a DC power supply, and I guess I sometimes overdimension them. My confusion stems from the difference in transformer and DC voltage.
If I need 10V DC @ 1A, will a 10VA transformer do? My gut feeling says I need more, so I use a bigger transformer, but how much bigger does it have to be?




arm - Embedded System for a image processing task


I initially posted this on SuperUser, but I suspect, this might be a better place to post this (sorry for the double post!): I'm quite a beginner to embedded systems, but am eager to learn more. I've used an Arduino previously and quite recently purchased a Raspberry Pi (but not used it as much). I have numerous questions that I haven't found answers to when using Google, thus the post! I'd appreciate any insight (apologies in advance if my questions seem too naive!).


Recently, I've been working on some image processing code using a few image processing libraries. My code is written using C++ in Visual Studio on Windows XP. My program uses multi-threading capabilities at various stages primarily because some of the processing tasks are quite time consuming. My intention is to transfer this working code and install the back-end libraries (OpenCV, Boost etc.) onto an embedded system that is merely connected to a camera.



  1. From my search, it seems that the top of the line, embedded system are at a maximum of 500 Mhz (http://microcontrollershop.com/product_info.php?products_id=3790). This really surprises me, we have i7 Quadcore PCs running at 2.5 Ghz available quite commonly for Laptops/Desktops. Why haven't embedded systems caught up to this increase then? Also they maximum memory I've seen is 500 MB. Again, desktop PCs average at-least 4 to 8 GB commonly. Do we get dual/quad-core embedded systems? What is the top of the line system currently available?

  2. To allow for an initial easy transition, I've heard that XP Embedded or Windows Embedded 7 Standard (embedded variant of Win 7) are alternatives. Here is a difference chart. However, I've read at a few places that Windows Embedded 7 has more RAM support and thus I am inclined to it for that reason alone. Can someone add to this please? I know I could use Linux Embedded or VxWorks as well, but at this point I believe I would run into numerous OS related issues with my code if I continued and perhaps the libraries might not be supported ...

  3. I've come across PC-104 systems a few times in my searches. Reading about this, it seems to be standard. Are there better alternatives? I'm a little confused with the top-of-the-line ARM processors I've found since I don't think they satisfy the minimum hardware requirements to run the OS (1 GHz x86 or amd64 processor).

  4. My main reason to transition to this is to learn something cool in the process and have a dedicated solution that is headless and designed to perform just one specific task (hopefully in a real-time manner).




Answer



You basically have two possibilities:



  • Go for ARM

  • Go for Intel (x86/amd64)


It depends how you define your embedded system. There are ARM modules available with four cores, each one running at 1GHz+ (e.g. the Toradex Apalis family is a Multicore ARM Cortex-A9 module but others are available as well).


If you have high requirements regarding RAM and processor speed, probably the better option is to select a Core-i7 or something similar (check out the COMExpress families from e.g. Congatec) and build that into a smaller system.


Now, how do you decide on the right operating system:




  • Windows Embedded will only run on x86/amd64 architecture; There is no support for ARM processors. This can be considered as a stripped down version of Windows for PCs.

  • Windows Embedded Compact is available for ARM as well, consider it being the typical Mobile Device platform which is often optimized for reduced power consumption. Also, you are able to add your own drivers easily. So if you want to dive really deep down, this might be your preferred choice.


how to use an npn as a switch between battery and motor?


I am a noob playing around with nodemcu and esp8266. I am trying to control a motor in an automated air freshener. I had been trying to power the motor with board supply but I gave that idea up when I was unable to manipulate the voltage and current. so now I am trying to just use an npn transistor to close the circuit already in place. There's only the battery and the motor in the circuit. How do I use the npn, considering I am using a nodemcu breakout board?


Also if someone has any idea how to power the motor directly, I am all ears;



Link to motor specs: http://szlh-motor.manufacturer.globalsources.com/si/6008851876220/pdtl/Micro-motor/1146386525/500TB-metal-brush-micro-motor.htm


Battery seems to be 2 AA 1.5v in series.


Apologies and regards in advance for the stupid question.


EDIT: Picture of the motor and battery assembly: https://ibb.co/fnMpic


I would rather not change the soldering of the assembly as I might want to put it back




ac - What does 'random phase' means in a triac driver?


I'm using this triac driver to control a triac. In its datasheet it says 'provide random phase control of high current triacs [...]'. What does that mean? It doesn't have zero-crossing detection?



Answer



Yes, it means it doesn't have zero-crossing detection. The latter is useful for purely resistive loads, where the current is in phase with the voltage. For reactive loads, inductive or capacitive, this doesn't offer an advantage.

"Random" just means the triac switches on at the time you signal it to switch on, whatever the voltage phase at that moment. So its actual meaning is that it can switch on at any time.



A note I made earlier on zero-crossing switching:
You may have noticed that incandescent bulbs always fail when they're switched on. That's because the mains phase can be near its maximum when switching on. Combined with the low resistance of a cold bulb this results in a high current peak, which may burn the filament. When you switch on a zero crossing you avoid these peaks.



Random switching is needed if you want to build a triac-controlled dimmer, where you want control of the phase angle where you ignite the triac over the full 180° of a half cycle.


power - Is it possible to calculate effective value of a signal from its average value?


I have a signal which I want to calculate its effective value. The signal is a voltage value read on a 33.3m\$ \Omega \$ resistor connected series to a 220V AC power line. My aim is to calculate the reactive power transferred on the power line.


Oscillator Screen Shot
(Frequency is 50Hz. Vertical scaling is 10 mV/square for both signals.)


I obtained the "Filtered Signal" by the circuit below: Rectifier & Filter


The filtered signal can be assumed to be a DC voltage level. Its value read from the oscillator screen represents 150mA current level through the current sensing resistor. This is the average value of the current flowing on the power line, isn't it so? However, I need the effective value of the current in order to calculate the power. Since the current on the line is not sinusoidal, I cannot calculate the effective value from those simple AC voltage wave formulas.


So, what can I do? I'm stuck at this point. Is there any way of calculating the effective value of this current from these available data, or any way of calculating the power directly?



Answer





This is the average value of the current flowing on the power line, isn't it so? However, I need the effective value of the current in order to calculate the power.



Be careful. If the shapes of the currents or voltages are not sinusoidal, knowing the RMS values for them, and the phase difference between them, is not enough. For arbitrary waveforms (as in your figure) for either one of the two (voltage or current), the only way to have an accurate calculation of the power is by integrating the product of the instantaneous voltage and the instantaneous current.


\$P=\dfrac{1}{T}\int v(t)i(t)dt \$


Nowadays, that is usually done in the digital domain. You have two ADCs (or a single ADC with two S/H front-ends). One converts v(t) and the other one converts i(t). In the digital domain, you multiply those two signals, and do the integral.


You can also do it in an analog way, using an analog multiplier and a low pass filter, but analog multipliers are tricky to use.


In summary: the circuit that you posted, that filters the shape of the current, is not valid for computing power, if the current may have the shape that you show in the figure.


capacitor - How would I go about converting a change in capacitance into a voltage?


Just starting out with electronics here as a physics student- I appreciate the help!


In a simple LCR circuit with a variable capacitor, how would I go about detecting the change in capacitance and converting that change into a measurable voltage signal? What kind of circuit/ components will I need?



Answer



The easiest way that I can think of is using that capacitor in an oscillator circuit. Unless your capacitor is very small in value (less than 100 pF) you usually do not need to use an inductor to use that capacitor in an oscillator. An oscillator can also be made with an RC circuit, this is used in the 555 timer chip.


The frequency of oscillation would change as the capacitor changes value. Then you only need to measure the frequency of oscillation which is is often as easy as counting pulses for a certain time (like 1 second) and then displaying how many cycles were counted.


Please state between what values your capacitor will vary so we can give you more practical advise in the direction of a usable solution.


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...