texts:
I just got my first Arduino and had a question about pull-up resistors.

I was trying to connect a push-button to the Arduino at pin 2, and if it's HIGH then I write HIGH to pin 13. Now, in the tutorial I watched, it said to have a resistor from the button to ground so if pin 2 asks what the voltage is, it gets ground, so it doesn't write HIGH to pin 13.

I tested this and it did, indeed, prevent the noise from pin 2. However, when I tried replacing the 10k resistor with a normal wire, it didn't work. So, my question is why do we have to use a resistor and why can't it just be any connection to ground?

In this diagram pin 2 reads whether it gets 5V (HIGH) or 0V (LOW) and returns a boolean value. Then, if the value is HIGH, pin 13 outputs HIGH. Also, it looks like the long wire on the Arduino is blocking out the labeling on a pin. The pin that the long wire connects to says "5V".

Thanks!


texts: In Buck Converter, when the ESR and EPR of Inductor increases then what is the its effect on output voltages and why?

texts: I have done LTSpice simulation. I have seen that by increasing ESR of inductor, the output voltages decreases and by increasing EPR of inductor the output voltages and ripple in output current and voltages increases. I am unaware of the reason of results.


texts:
I am new to stm8 (stm8s003f3p) I have done following code but could not able to find what is wrong with it.
UART transmit is working but couldn't able to receive anything.

#include <iostm8s003f3.h>
#include <intrinsics.h>
#include <stdio.h>

void InitialiseSystemClock()
{
    CLK_ICKR = 0;                       //  Reset the Internal Clock Register.
    CLK_ICKR_HSIEN = 1;                 //  Enable the HSI.
    CLK_ECKR = 0;                       //  Disable the external clock.
    while (CLK_ICKR_HSIRDY == 0);       //  Wait for the HSI to be ready for use.
    CLK_CKDIVR = 0;                     //  Ensure the clocks are running at full speed.
    CLK_PCKENR1 = 0xff;                 //  Enable all peripheral clocks.
    CLK_PCKENR2 = 0xff;                 //  Ditto.
    CLK_CCOR = 0;                       //  Turn off CCO.
    CLK_HSITRIMR = 0;                   //  Turn off any HSIU trimming.
    CLK_SWIMCCR = 0;                    //  Set SWIM to run at clock / 2.
    CLK_SWR = 0xe1;                     //  Use HSI as the clock source.
    CLK_SWCR = 0;                       //  Reset the clock switch control register.
    CLK_SWCR_SWEN = 1;                  //  Enable switching.
    while (CLK_SWCR_SWBSY != 0);        //  Pause while the clock switch isbusy.
}

void InitialiseUART()
{
    unsigned char tmp = UART1_SR;
    tmp = UART1_DR;
    UART1_CR1 = 0;
    UART1_CR2 = 0;
    UART1_CR4 = 0;
    UART1_CR3 = 0;
    UART1_CR5 = 0;
    UART1_GTR = 0;
    UART1_PSCR = 0;
    UART1_CR1_M = 0;        //  8 Data bits.
    UART1_CR1_PCEN = 0;     //  Disable parity.
    UART1_CR3_STOP = 0;     //  1 stop bit.
    UART1_BRR2 = 0x02;      //  Set the baud rate registers to 9600 baud
    UART1_BRR1 = 0x68;      //  based upon a 16 MHz system clock.
    UART1_CR2_TEN = 0;      //  Disable transmit.
    UART1_CR2_REN = 0;      //  Disable receive.
    UART1_CR3_CPOL = 1;
    UART1_CR3_CPHA = 1;
    UART1_CR3_LBCL = 1;
    UART1_CR2_TEN = 1;
    UART1_CR2_REN = 1;
    UART1_CR3_CKEN = 1;
}

void UARTPrintF(char *message)
{
    char *ch = message;
    while (*ch)
    {
        UART1_DR = (unsigned char) *ch;     //  Put the next character into the data transmission register.
        while (UART1_SR_TXE == 0);          //  Wait for transmission to complete.
        ch++;                               //  Grab the next character.
    }
}

unsigned char RecUART1(void)
{
    while (!(UART1_SR_RXNE));    // USART_SR[5]:RXNE   Read data register not empty
    PD_ODR |= (1<<2);                                      //   0: Data is not received, 1: Received data is ready to be read.
    return UART1_DR;
}

int main( void )
{
    unsigned char out;
    char dis[25];
    // PD_DDR = (1<<5)|(1<<2);
    //PD_CR1 |= (1<<2);
    //*out ='l';
    //in=out;
    __disable_interrupt();
    InitialiseSystemClock();
    InitialiseUART();
    __enable_interrupt();
    while (1)
    {
        out = RecUART1();

        //for (long counter = 0; counter < 250000; counter++);
        sprintf(dis,"this is %c\n",out);
        UARTPrintF(dis);
    }
}


texts: How to switch a 220V AC electric bulb using a relay through Arduino?

texts:
My aim is to switch an electric bulb operating at 220v AC. For this purpose I use a 12V DC relay that can operate for 220V appliance according to its data sheet.
My relay circuit is as under:

Using a regulated power supply (a desktop PC's SMPS unit with 12v, 5v, and 3.3v outputs), when 5V is applied to the pin of microcontroller, I get a click sound from the relay and the bulb is switched ON and when the pin is kept open, the bulb is OFF.

But when using an Arduino Uno board for the same purpose (I have 12V, 5V, 3.3V and GND pins on the board so I give all of the supply from the board itself now not from the separate supply), when I connect 12V GND and 5V at the pin that goes to MCU pin the relay is making noise. I am getting a continuous clicking sound from the relay. If I connect the bulb to it, it may damage my bulb (I'm assuming this since the relay seems to be switching fast and continuously)

Why am I getting the noise of clicking continuously when I use Arduino instead of the power supply?

How could I solve this problem?


texts: Center tap of transformer for Ethernet interface

texts:
When you see Ethernet PHY chips' application circuit, you can find out the difference about connecting center tap of transformer.
Some PHYs should be connect to the DC power but some don't connect to it.

The following circuit diagram is for LAN8720a interface circuit.

It should be connected to the AVDD directly (Case A in the image).
But some other PHY application circuits are different (Case B).

Now, I have some questions:

Why application circuits are different according to the PHY?
What is happenning if I connect the center tap to the power for the Case B PHY?

Thank you.


texts: What are "Levels of Delay" in the 74LS138 data sheet?

texts:
I'm looking at the following three data sheets for 74LS138 devices:

Texas Instruments SN74LS138, SN74LS138A
Motorola 74LS138
Fairchild DM74LS138

Each has a "switching characteristics" table giving propagation delay,
and each table has two figures for each delay, for 2 and 3 "levels of
delay." For example, here are the select-to-output delays (in
nanoseconds) for each of the above:

            Levels   Low→High    High→Low
   Vendor  of Delay  Typ  Max    Typ  Max

TI ('138)      2     11   20     18   41
               3     21   27     20   39

 Motorola      2     13   20     27   41
               3     18   27     26   39

Fairchild      2     18   27     27   40
               3     18   27     27   40

For my purposes (address decoding logic for 8-bit CPUs) the high→low
figure is the one of interest, and those are so close that it seems to
make little difference. But I'm curious as to what these "Levels of
Delay" are and why they make a difference to the Low to High timings
on some versions of this device. And why does the
TI SN74HCT138 not have these different levels of delay?


texts: What is the best low-power color indicator?

texts:
The project I am working on requires a color indicator which shows the current state (either red, green, or yellow).

Ideally the indicator would have a large surface area so you can quickly glance at the device and determine the state. 2" x 2" would be nice.

The device is battery powered and would ideally be able to operate for months at a time without recharging.

What would be the best solution to use for this kind of application?


texts: not sure how to draw the nandgate schematics for my segment display

texts:
I recently was suppose to do this question:

The above is what I have done and I am stuck, wondering if anyone knows how to draw out the nand gate schematic diagram based on my 5 karnaugh maps.


texts: In an inverting amplifier configuration why does do the gain resistors affect the circuit's frequency response if their ratio stays consistent?

texts:
I've been learning more about the characteristics of op amps and I found in a non-inverting amplifier simulation that the gain of an inverting op amp falls off as frequency increases. This behavior is expected and is due to the -3db bandwidth capability of the specific op amp. However, I also noticed that when you vary the gain-setting resistors (but not their ratio), the half-power point for the circuit varies as well. As the value of the gain-setting resistors increase, the frequency at which the half-power point occurs also increases. I was wondering what parameter/characteristic of the op amp causes this and whether some op amps are more immune than others. Here is my simulation:

In the simulation, I've set the gain to 2 for each step. I've set Rg to start at 10k and step to 100k in increments of 10k. So running the simulation results in 10 bode plots, each of which has a different half-power point due to the gain resistors. I realize the difference in gain for each half-power point is pretty negligible for most applications but I'd still like to know what is causing it. Can anyone tell me this?

Here is the datasheet of the op amp I'm using in the simulation.


texts:
I am always surprised when researching online for a topic for a few hours does not bring solid responses. This is one of such situations.
I am in the process to provide AC power to a remote small garage on a budget, off-grid. I have access to decent quality used/reconditioned car batteries which will provide 12V and I will connect a rather unexpensive 1.2kW continuous (3kW peak) inverter with "modified sine" wave (not pure sine wave).
Where I cannot find a solid solution is on (1) grounding and (2) protection breakers.
I live in Italy where we have 230V 50Hz nominal AC power, single phase, for residential application.

Grounding.
I have read articles that recommend to ground one of the two AC output wires to simulate the grounding that is supposed to be done by power operators on the line before entering to the house. That would be my Neutral line. I would be supposed to tie to a ground rod one of the two AC wires (a specific one or any of them?) along with the Inverter housing and the negative terminal of the battery to create a common reference level.
Another article however reports that on "modified sine" inverter, there MUST be a difference in voltage between Ground and Neutral wires, if not the Inverter will blow up. These note insist that there should not be any connection between Neutral and Ground and to use the inverter chassis as the Ground level only. This would leave Neutral floating.

Protecting.
I would like to have a reliable breaking box between the Inverter and the garage wiring. My understanding for what I read is to take the two wires out of the Inverter into a differential breaker type A 0.03A sensibility (not type AC nor type B) and then to Magnetotermic Breaker of 16A. Then the box will reach a ground rod on a separate third wire and from this box I will output the two 230V AC wires plus the Ground wire.

What's the right direction to proceed in principle and in practice? I would love some insight and pointer to proper solid literature on the topic.
Before you ask, the inverter documentation just refers to ground the housing to a metal ground of the vehicle (not my case) or the negative pole of the battery, but it says noting about the 230V AC, nor about Grounding to an Earth pole nor to how properly protect connected utilities with circuit breakers, maybe because intended application is to connect a single device, not a small garage...


texts: How to driving small motors using packaged NPN darlington drivers from MCU?

texts:
I have this basic circuit of how to drive a motor using a 2N2222 transistor and it all makes sense to me.

I found a bunch of cheap ULN2803APG darlington drivers. I am a bit confused on how to wire 4 motors to this. I think the common part is confusing me. If I try to follow the logic  as on the circuit above it seems I might fry my MCU I/O by doing this?

The DC Motors need to run of 6Volts and draw a MAX of 200mA each at full load. I don't need speed control or anything like that really.I want to use this because its cheaper than getting L239 H-Bridge driver.(My counting is that I can get 25 of these vs 1~2 L239 for same price)

In my head I have it that I wire:

MCU I/O pins to the I1-I4 Ranges (The "Base")
Common "Emmiter" to Ground
O1-O4 "Collector" to Motor -
Motor + to my Motor supply voltage
Motor supply voltage - to common ground?

Is this correct? I tried to follow it analogically as possible but I have a bad feeling about this?

Left - My original thoughts

Right - As per comments m.Alin


texts: Unexpected behaviour from synchronous counters in proteus

texts:
Figure: 1.

Figure: 2.

Content in ROM(U56)

   T0:  00
   T1:  00
   T2:  00
   T3:  04
   T4:  00
   T5:  00
   T6:  04
   T7:  00
   T8:  00
   T9:  04

(I have not written T0-T9 or the colon in the ROM file, I have included them to explain the T states)

Explanation of the figures:

Here, The user input is, UP signal for U55 counter, which is being used to read values from a ROM(U56).  The CP2 signal is being used to increment the counter (U13).

If I keep increment UP for U55, for the two increments CP2 is zero, according to the ROM content.

As CP2(it goes to U13 and U13 only) is zero for the first three states (Start state, first increment , second increment for U55 counter), the counter output of U13 should not increment (intuitively).

But, as we can see from the figure-2, the output of U13 changes in third state, although CP2 remains zero until this point.

Please someone kindly bring some light into this matter. Perhaps I am confused with some concepts.

I am new to proteus designing. Thank you.


texts: Current flow in series circuit with different (unknown) resistances

texts:
I have a question about the current flow in a series circuit.

In a series circuit the current flow is the same. It is also true that the current flow is inversely proportional to the amount of resistance in the circuit. I'm also aware that I can calculate the full amount of current flowing by applying the formula Itotal (A) = E total (V) / Rt (Ohms).

But if I consider the following case what will happen in reality?

I have a 9V battery capable of delivering 5A total. However I have three components in series: two of them pull 0.5A (according to the manufacturer) but one pulls me 2A. In this case because I don't know the components manufacturer internal resistances, I'm a little bit lost to apply the formula Itotal (A) = Vtotal (V) / R total (ohms).
However it seems the total current flow is still inversely proportional to the amount of resistance I have on the circuit. Two components apparently have a high internal resistance whereas one has a low resistance.

My question is what final current will circulate on the circuit. 2A is just perfect for my third component but indeed too much for components 1 and 2 (0.5A). If the current is the same flowing on a series circuit what will be the final result to accommodate my three components (without damaging anything)?

Thanks for your attention,
Antonio


texts:
I am designing a camera that is powered by a 5 V DC power line. I need to evaluate the peak power consumption of the device during image capture. At a pixel clock period of 40 microseconds I expect that I can do this with a power monitoring rate of 10 kHz. The camera has an average power consumbtion between 1 and 2 W.

I found the ADM1293 power monitoring IC. The sampling rate is not explicitly stated, but with the clock rate of 400 kHz i expect it should be sufficient.

Am I correct or would I need something faster?

Is this circuit maybe too much for my purpose?


texts: PNP / NPN Reverse current and voltage (Vce/Vec and Ice/Iec)

texts:
I discovered that these two circuits behave in an identical way from a loose perspective (only the following schematics tested):

simulate this circuit – Schematic created using CircuitLab

R1 and R3 both had 4.3v across them, and R2 and R4 both had 5v across them.

Similarly, when R1 and R3 were connected to +5v: R2 and R4 had zero volts across them.

Is this expected behaviour? From generic diagrams of the junctions of a PNP transistor, the junctions appear symmetrical, so from that perspective it makes sense.

What's frustrating: the BD438 datasheet gives absolutely no information on characteristics for reverse operation; Somewhere I read that reverse voltage for BJTs should generally be limited to 5v. Googling for me rarely uncovers anything about reverse operation of BJTs.

It would be great if someone could demystify reverse Vce behaviours and limitations, including interpolating from datasheets absolute ratings and typical characteristics for reverse operation given the forward operation information, (if it's possible).


texts:
In the solution they have given like this

Here I did't get how they directly wrote DC gain 1?

I solved like this

\$GM=\frac{1}{\left |G(s)\right||H(s)|}\$
Here H(s)=1

From the plot GM=0.5

So G(s) will be 2 also System is type 2 so DC gain will be \$K_v=2\$


texts: Does an active low pin need a pull up resistor?

texts: I am interfacing a PIC24 microcontroller with this nRF24L01 2.4GHz transceiver. The transceiver has an active low interrupt pin that is toggled on transmit and a few other instances. Does this pin need to be pulled up or not? I imagine that it works similar to a normally high switch like the diagram below, in which case I think it should be pulled up.


texts:
I have a circuit that is set up to run motors using an Arduino and an H-Bridge chip. It works fine with the L293D chip but when I replace it with the SN754110NE chip it stops working.

As far as I can tell, the pinouts for both chips are identical so I'm not sure what the problem is.

Does anyone know what are the differences that would make one chip work but not the other?


texts: Control hacked servo motor speed using L293D and PWM

texts:
I've got a L293D and a PIC16F877A outputting PWM. Not real PWM, just using Timer0 to turn ON a pin for 2 ms and OFF for 18 ms (total of 20 ms period).

W.R.T. to the above schematic I got VSS, VC, CHIP 1 and CHIP 2 up to 5V.

My current method of controlling the motor is to turn input 1 and 2 on-off from the PWM, to control the outputs 1 and 2. My motor is a hacked servo motor that runs 360 degrees.

EDIT: My motor is a pre-hacked RC servo motor, specifically the Cytron C36S, hacked to run continuously (i.e. behave as a normal motor, no longer as a typical servo motor)

My approach

When input 1 is ON and input 2 is OFF, it prompts the motor to run one way, input 1 is not always ON. Since input 1 is the PWM output from the PIC, it'll turn ON (HIGH) for 2 ms and OFF (LOW) for 18 ms in continuous cycle of 20 ms.

But using this setup, my motor isn't properly working; sometimes it runs slower than usual (this is actually what I want) but most of the time it just hums in its place, no movement whatsoever.

How do I improve this configuration, is there a better way to control motor speed using L293D? If possible I want to use l293D as buying new components/ICs are too much of a hassle...


texts:
I have a question about the N-JFET.Assume it operates at the linear region and it acts like a voltage controlled resistor. Can we say that if Vdg(drain-gate voltage) is increased then the resistance of the JFET is increased?I have just started reading about JFET and I find them very confusing.
Also I found this video , I don't understand why most have Vds and Vgs which is very confusing...


texts: Relationship between charge and electric potential

texts:
I'm reading about electricity on the Sparkfun website (https://learn.sparkfun.com/tutorials/what-is-electricity/electric-potential-energy), and I read the following:

"At any point in an electric field the electric potential is the amount of electric potential energy divided by the amount of charge at that point. It takes the charge quantity out of the equation and leaves us with an idea of how much potential energy specific areas of the electric field may provide."

My question is, why do we need to take the charge quantity out of the equation?  It seems like dividing one by the other would give us some sort of rate (i.e. just like dividing distance by time gives us a rate of speed).  Is that what we're trying to achieve by performing division here?  Or is it closer to dividing in order to reduce a fraction, i.e. 5/15 is equal to 1/3?


texts: Error in op-amp integrator due to delay in attaining second summing point constraint

texts: An op-amp in negative feedback forces both inverting and non-inverting inputs to the same value. But this takes some time which as per my knowledge is few nanoseconds. So won't this time delay cause an error in the output of the op-amp integrator, as the formula for an integrator assumes that the inverting input is at 0V (as is the non-inverting one)? Are there any noticeable consequences of this delay when dealing with signals that change so fast, that the inputs aren't even at 0V?


texts: Potentiometer for PWM motor controller: how to deal with a limited input range?

texts:
I've got a 3V DC toy motor that I'd like to convert to variable speed using a PWM circuit. I found an $5 PWM controller that would work. This expects a 100 K\$\Omega\$  potentiometer as its speed input.

I want to set the speed using a mechanical trigger (like on a variable-speed drill), but that means I have an input that travels only 5-10 mm.
The potentiometers I've found are rotary (270° travel) or linear/slider (20 mm travel). If I were to use these, I'd only be able to use part of the 0-100 k\$\Omega\$ range.

How should I approach this?

create a mechanical system to convert the trigger travel into the full range of the pot,
is there a way to get the full rpm range out of the PWM circuit using only part of the potmeter range?
or should I build a custom PWM circuit instead?


texts:
Here is the official site which says the frequency which weather radio broadcasts at (around 162 Mhz). The site doesn't say anything about modulation though. What modulation is used in this radio transmission?
Also, how could I build a circuit to pick up this transmission?


texts: What would be the output of a 555 multivibrator ic in bistable mode when both the trigger and the reset are set low simultaneously?

texts: Is such a state defined or should I expect random behavior ?


texts: Transparent Wi-Fi module with RMII input

texts:
I need to convert a Ethernet-connected embedded project with wireless connection.

I'm looking for a low-cost (main constraint, less than USD $15) and most open-source/-hardware possible Wi-Fi bridge module, like Vonets.

It need to behave transparent, redirecting all network frames (transport layer) to existent-and-already-stable IP stack implemented at current ETH hardware with minimal firmware modification; if possible, using existent RMII pins.

My first attempt was with ESP8266, but there's some very painful challenges:

I couldn't just change transceiver and RJ-45 with it, because it's communication is UART-based (some module variants support SPI). To workaround that, I tried enabling PPPoS to communicate uC<->ESP8266, then sending data through ESP's built-in IP stack and forwarding it to Wi-Fi adapter and then to Internet.

However, although it's LwIP port had PPP_SUPORT #define's at source code (which seems to be added in a recent release v1.4.0 from March-2016), there's no documentation about enabling it and it's usage. Furthermore, IP forwarding also seems not be supported between virtual interface (e.g. ppp0) and "real" interface (e.g. wlan0).

Do you suggest some other hardware to do the "Wi-Fi bridge" job? Should ESP32 (not launched yet at the moment) the solution to convert RMII signals?
In the case of keep using ESP8266, there's another protocol or way to made it transparent?


texts: How is 255 Tbit/s processed in optical fiber communication?

texts:
I have never understood how the new record breaking data transfer speeds are achieved in terms of converting from/to electrical and optical signals.

Suppose we have 255 Tbits of data and we want to transfer it in one second. (This is a real world achievement.) You got 255 Tbits stored in, let's say, 255 trillion capacitors (that's RAM). Now we are expected to be able to read each one successively, inquiring each bit so that one second later we have read all 255 trillion of them. This is obviously not orchestrated by a 3 GHz processor.

What about the receiving end? Pulses are coming at 255 THz, yet the refresh rate of electronics trying to read an incoming signal is by far not 255 THz. The only thing I can imagine is thousands of processors with their clock signals time division multiplexed (delayed) by less than 0.000000000001 secs. Although how to achieve such multiplexing also kind of brings me back to my problem with this thousandfold difference in frequencies.


texts:
hobbyist here, hope someone can guide me.

I'm using I2C (only have 4 wires{PWR, GND, SDA, SCL}) to communicate with two exterior Circuit (Circuit A, and Circuit B, both have MCUs), which can be swapped between two locations (lets call them, left and right).

I need to identify which Circuit is in what location. I initially thought of using a voltage divider to lower left 5V to 4.9V and using an ADC on MCU to identify.

However, i now see this will melt my voltage divider as Circuit B draws 1.5 Amps, while the Circuit A draws 150mA.

Im now thinking if i can purposely add a fluctuation to my 5V DC PWR line, about 4.9V (between 5V to 4.8V) which my ADC could identify.

Can this be done with an OP-Amp? and if so, can you suggest the circuit.

If not, any other suggestions?

Thanks


texts: Arduino + LS7407N to shift logic levels in serial communication

texts:
I'm trying to drive a device that uses 12-0V levels for serial communication. I decided to use LS7407N, a buffer with open-collector, so that I can use Arduino's TTL levels to send commands to the device. The problem is that the device doesn't seem to get any messages. I am almost certain that the circuit is connected properly. As for the software, I'm only using Tx line to transfer the command and print out the result from the device. I do not have an oscilloscope, so I can't really see how the LS7407 chip works, but I tried several I bought yesterday and still get nothing.

Here is the circuit:

Maybe there's something wrong with the design? Any help would be much appreciated.


texts: Do you consider this design as an application layer on top of the CAN protocol?

texts:
This is a follow up question from my previous question about
How do I program 2 CAN nodes to transmit continuously in succession?

I'm planning to add another layer on top of the CAN protocol and I want to know this can be considered as a user-defined application layer. This is just for academic purposes. So here it is:

Considering a subset of the CAN network (Sensors serves only as examples):
Node A: Collector-Node and displays data to the LCD
Node B: Get the coordinates of the GPS and transmit to node B.
Node C: Performs ADC to get the temperature of a test subject and transmits to node A.

Some definitions:

struct formalized_can{
   float latitude;
   float longtitude;
   float temperature;
 };

The top level functions are:

Node A:

getRecentUpdates(struct formalized_can);

Node B:

updateTemp(float temperature);

Node C:

updateGPS(float longitude, float latitude);

This are the functions that will be visible to the user of the library. The implementation is hidden from the user. Since application layer deals with messages, can this be considered as an application layer?


texts: MX1508 motor driver flyback diode controversy

texts:
Hi I am trying to use the MX1508 motor driver with my 6V dc motor, but I've read criticism that it doesn't have flyback diodes.
I'm seeing conflicting opinions online about this.
For example, in this article:http://docplayer.net/171091206-Using-the-mx1508-brushed-dc-motor-driver-with-an-arduino.html the author explains "There is some discussion on some forums where people describe a few problems with reverse EMF voltage spikes coming back through the system and confusing their micro-controllers.  The MX1508 breakout board sold by Banggood appears to have all the necessary capacitors and flyback diode to combat this.".
Here is an example that I'm sure the author is referring to: How can i stop DC motors from dropping out my arduino?
I've also seen the following counter: "I was wondering about the statement: 'the MX1508 has no fly back/free-wheeling diodes present, though they are advised by the chip manufacturer'. Wouldn’t the MOSFET structure itself act as a fly back diode, similar to other H-bridges like the L9110 and TB6612?"
What is really going on with this MX1508 motor driver? Is it safe to use on its own without any additional diodes?
Thanks all for your time and help with this.


texts: Thermocouple signal conditioning - how to deal with low output swing margin of amplifier?

texts:
I have this thermocouple conditioning circuit. Let's say my gain is 100. Minimum low  level for AD8237 is 20mV. As K type thermocouple outputs 40uV per 1C, I will have 4mV per 1 degree C.

This means I will not see change on the output while temperature goes from ambient to ambient + 5C.

Suppose, I don't want to loose these 5 degrees at the bottom of my range. What do I do? I think, I have to inject some offset into the +IN input? If so, how do I do it? What are the other possibilities?

I would like to avoid using split supply.


texts: How can ground bounce be simulated by lumped elements?

texts:
I'm trying to demonstrate myself and to some friends how ground bouncing occurs. Is there a way to use lumped circuit with some compients to demsotare it? Something similar to simulating inductive spikes caused by a large inductive load.

Can someone provide a simplistic representative circuit which demonstrates the phenomenon?


texts: (edit) Brushless Motor - Why does the stator burn up if the rotor doesn't rotate?

texts:
If I was to apply power to a 3 phase stator, which in turn creates a magnetic field that's projected onto the rotor (with magnets), and (in a friction-less world) would cause the rotor to rotate (bearings on the forward and aft of the rotor).

If the rotor was to become jammed/stuck/no longer able to spin, why does the stator burn up? Wouldn't the magnetic field continue to be applied to the rotor?

I apologize if the specific terms are incorrect. I'm mainly trying to understand why the stator becomes damaged if the rotor is unable to spin. Obviously there's no physical damage between the stator/rotor (rubbing,ect).


texts:
Anyone who's seen the j in electrical formulas knows that electricity has a phase component as well as a magnitude. But where does the phase come from? Does it only happen in A/C?

Edit: In other words, why is electrical power transmitted as a (sum of phase-shifted sine) wave(s)?

Edit 2: If I were pushing a cart, there would be something like a phase as my legs don't deliver equal power from every position. (But let's assume I push completely the same from a given position.) So there the difference in power delivered from various stances causes phase. But what's the mechanism that causes this in electrical power?


texts:
I'm searching a (transistor-based) schematic that can flash a LED regularly but where the off-on and on-off phases look slow like with an ordinary flashing circuit with a good old light-bulb.

With a micro-controller I'd use pulse-width modulation, but how to achieve the effect with as few as possible discrete components?


texts: Can I use a tactile switch as computer power switch?

texts: I was thinking of replacing my broken power button in my CPU with a tactile switch connected to the power cord on the motherboard, but I was wondering if that would work without any harmful consequences for the computer or me?


texts: Controlling stepper motor speed & direction with single L298N H-Bridge

texts:
I'm in planing phase of my project. I have this motor: US-17HS4401 Stepper Motor (bipolar i think, has 4 wires). Can I use a single L298N H-Bridge motor to drive it. As in control both speed, direction and position of it ? I found many examples but all use a potentiometer to control speed by controlling voltage. Which is not good for me since I want to control the speed/position/direction using a Particle Photon module.

I will have a Particle Photon module drive this setup. I have two baskets sitting on top of each other, max total weight of the top one will be ~1KG this motor would be used to rotate the top basket left/right 45 degrees from it's starting position. But I also need to control how fast it rotates left/right.


texts:
Where can I find a female AC power socket plate/panel and a male computer cable plate/panel which can be installed in an electronics enclosure? I am building a sousvide PID controller which will allow a slow cooker to be plunged into the PID controller. The PID controller will then plug into the wall via a computer power cord. I have no idea what these parts are called or where to find them.

Edit:

I am looking for a UK version of this panel mounted socket
It must exist somewhere right? Or is there an adapter for it?

thanks,


texts: Common emitter: maximize effective voltage gain

texts:
My homework is to design npn common emitter amplifier, with minimum output aplitude=5V, powered by +26V and -20V with generator resistance=40kOhm and output resistance=10kOhm.
I have calculated effectice voltage gain formula and its derivative. Know that collector current Ic doesnt mean as much as collector resistor Rc value, but still I have no idea how to design(calculate) collector and than emitter resistor values.
I even have no idea where should I start. Please guide me

some general drawing, no values:

gain is expressed as:

RL is parallel Ro and Rc. Rc as big as possible, but when transistor is cut-off, there makes a divider (does it?), so RL max is 42kOhm, RL=39kOhm (for e24 series).
Than I got stuck.


texts: How strong a ground loop would necessitate the use of isolation transformer in Ethernet?

texts:
RJ45 ports by spec are magnetically coupled (Why Are Ethernet/RJ45 Sockets Magnetically Coupled?). However, one reason against the use of shielded twisted pairs is the possibility to create a group loop between equipments, as discussed in Shielded Twisted Pair (STP) termination and grounding.
The built-in isolation transformer should at least provide some degree of isolation for ground loop. Assuming there is a continuous connection from the shield to ground (patch bay, keystone, etc) Are the built-in isolation sufficient for this ground loop? Until what point will they no longer be able handle the group loop and an external one would be required?


texts: ST-Link connection suddenly stops responding

texts:
While I wanted to upload/debug a new HAL Eclipse System Workbench for STM32 project on my STM32F103 it showed the following message:

OpenOCD child process termination

Reason:
Wrong device detected

Details:

Wrong device detected
  Open On-Chip Debugger 0.10.0-dev-00302-gc211ca5-dirty (2017-07-03-10:41)
  Licensed under GNU GPL v2
  For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
  none separate
  Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
  adapter speed: 950 kHz
  adapter_nsrst_delay: 100
  Info : clock speed 950 kHz
  Info : STLINK v2 JTAG v27 API v2 SWIM v6 VID 0x0483 PID 0x3748
  Info : vid/pid are not identical: 0x0483/0x374B 0x0483/0x3748
  Info : using stlink api v2
  Info : Target voltage: 3.236436
  Error: init mode failed (unable to connect to the target)
  in procedure 'init'
  in procedure 'ocd_bouncer'

This happens regularly, what I normally do is startup up STLink utility, and select Target/connect. This shows sometimes an error:

Can not connect to target!
If you're trying to connect to an STMW1xx device, please select
Normal or HotPlug mode from Target->Settings menu.
If you're trying to connect a low frequency application, please select
a lower SWD Frequency mode from Target->Settings menu.

Since both do not apply, I remove the USB STLink stick (V2, cheap one) and USB for power to the STM and try again, mostly it works. I close the ST Link utility and continue with Eclipse. This takes normally a few minutes and is annoying, but at least I can continue.

However, now I keep getting the ST Link message and cannot get rid of it (also restarted my computer).

If I try ST-LINK/Firmware Update from the ST-Link utility (to check if I can get connection to the ST Link itself), and press Device Connect, I get:

ST-Link is not in the DFU mode.
Please restart it

I don't know how to 'restart' it, but removing the ST Link from the USB and reinserting does not help.

I also tried another ST-Link, but it has the same behavior.

Than I tried another STM32, that worked. However, as soon as I tried to upload the program via Eclipse, it works once, when retrying, I get the same problems as above and now I have both of my STM's not working anymore. The program is not special, and worked before.

How to restore the connection with Eclipse so I can upload programs for debugging again?

Update:

I tried to put BOOT0 to 1 (3V), I could get once connection with ST link, I erased it. I could even debug after uploading, but just once. Than the problems started as before.
Also, suddenly, the ST Link utility crashes when trying to connect.
When I put BOOT0 to 0 again, and keep pressing the reset button, select erase memory from the ST Link utility and release the reset button, I could erase it. This makes it possible again to upload a program via Eclipse. However, after the first initial breakpoint stepping further, I get continuous the following error:

Error: JTAG failure: -4


texts: Convert capacitive touch sensing back to mechanical switches?

texts:
Capacitive sensing seems to replace often mechanical switches. Is there a way to convert them back to mechanical switches?

Problem at hand is a cooking device with interfaces with the user via the dreaded capacitive touch buttons. If I had mechanical buttons or even better switches I could simply interface this cooking device with my arduino and let my program emulate the button pressed.A set of relays would do this nicely. Now I have those "capacitive touch" button points and have no idea how to use arduino GPIO to fake button pressed.Any ideas on how to interface?

To trigger a button pressed at those dreaded capacitive touch buttons, what I would need to do is to increase capacity (as that is what happens when a finger approaches, right?)


texts: What types of batteries are typically used in UPS (uninterruptible power supply) and why?

texts:
They definitely need to be safe for indoor use so they can't vent, they should probably support deep cycling due to the nature of backup power supplies, and I imagine they should have relatively long life under near maximum charge to be ready.

Do most manufacturers use some flavor of AGM batteries? Any NiFe due to the robust, long life? Are they customized in any way that makes them different from a typical deep cycle AGM you'd buy at the hardware store?

I'm interesting in building my own (non-solar, just grid-tied) indoor backup power supply and I imagine whatever batteries are used by UPS manufactures would best since our requirements match almost exactly.


texts:
Can anybody help me find the electrical conductivity of SAC 305  (96.5Sn3Ag0.5Cu) solder? It is the most common solder in semiconductor IGBT/MOSFET power switches.

Many thanks and best regards,


texts: Stereo line-level converter: Odd grounding?

texts:
I'm coming from a stock Dodge headunit, which has regular analog output that goes up to 10 volts. Nothing fancy, when I had it going straight to the amp it worked fine. It's going into a regular JL amplifier, with a max input of 4v. I was sold a Raptor LOC15 converter to bring the voltage down.

Here's a diagram of what I'm working with. On the left, we have the inputs. They're coming from the source unit. To the right are the outputs, that are heading to the amplifier. This board is supposed to bring the 10v from the source unit down to something more acceptable:

Ground... I can't figure out where I should ground it to. Chassis ground? Input ground? No ground?


texts: Altium Repeated Blocks with Shared Ports

texts:
I'm designing a PCB in Altium that contains three of the same motor driver IC's (L6470H) which all communicate via SPI bus. As you can see below, I have repeated blocks to avoid redoing the same schematic.

The problem I'm having is related to merging the ports of every block so that they connect to the a single MOSI and MISO pin on my microcontroller. What I am currently doing is taking the SPI bus from every block and creating a bus which will be terminated elsewhere in my hierarchical design.

In my higher level schematic below, I attempted combined buses by simply terminating a MOSI bus into a single MOSI wire thats connected to my STM microcontroller. Although the schematics do compile, my PCB layout is missing a rats nest between all the SPI pins for the motor drivers and microcontoller. As a result, I dont think my method is correct and could really use some advice!

How do you short pins between repeated blocks?

Thank you.


texts: Attiny10 not triggering timer overflow interrupt while simulation (Atmel Studio 6)

texts:
I have problems simulating the timer overflow in Atmel Studio 6. The code is for an Attiny10 and looks like below. As far as I know I set all the neccessary bits to enable the counter (which works in simulation) and the interrupt (which doesnt work in simulation).

I guess it's just a stupid mistake and I need a small hint so I would really appreciate if someone could tell me what I'm doing wrong.

;======================
;   device  attiny10
;======================
;.include   tn10def.inc
;            _____________
;           /1 °         6|
;       O--|PB0        PB3|--O RESET
;          |      t10     |
;       O--|GND        VCC|--O
;          |              |
;       O--|PB1        PB2|--O
;          |______________|

;======================
; defines
;======================
.def    temp    = r16

;======================
; reset / int. vecs
;======================
.org 0x0000
    rjmp    reset           ; Reset Handler
.org 0x0004
    rjmp    TIM0_OVF        ; Timer0 Overflow Handler
.org 0x000A

;======================
; reset / setup
;======================
reset:
    in      temp,   TCCR0B          ; turn timer on
    ori     temp,   (1<<CS00)
    out     TCCR0B, temp

    in      temp,   TIMSK0          ; turn overflow interrupt on
    ori     temp,   (1<<TOIE0)
    out     TIMSK0, temp

    ldi     0xff
    out     DDRB,   temp
    ldi     0x00
    out     PORTB,  temp

    ldi     temp,   0xff
    out     TCNT0H, temp
    ldi     temp,   250
    out     TCNT0L, temp

    ldi     temp,   0xff

    sei

;======================
; main loop
;======================
main:
    rjmp    main            ; while(1);

; overflow interrupt
;======================
TIM0_OVF:
    com     temp
    out     PORTB,  temp
    reti

EDIT: Solved: You cant step into/over an ISR. (Thx to Golaž)


texts: Can I directly connect microphone to speaker of two SIM800Ls

texts:
There are two SimCom SIM800L quad-band GSM/GPRS modules. I would like to make some kind of call relay, such that SIM #1 accepts incoming call, then SIM #2 executes outgoing call, and once both connections are established, the person who called SIM #1 should be able to hear and talk to the person to whom SIM #2 called.

Can I directly connect SIM #1 and SIM #2 sound outputs and inputs?

Assuming it is possible, should the pins be connected like this?

SIM1 MICP <-> SIM2 SPCP
SIM1 MICN <-> SIM2 SPCN
SIM1 SPCP <-> SIM2 MICP
SIM1 SPCN <-> SIM2 MICN


texts: Question of current with multiple current sources

texts:
Suppose we have this circuit:

simulate this circuit – Schematic created using CircuitLab
My question is this:How much is the current from I1 through R1? I guess it is 500mA because I2 is an open circuit from the point of view of I1 and R1=R2 so the current from I2 is shared equally between the 2 resistance. But i have found some videos on youtube which say it is 250mA because I2 is 500mA so the rest current which flow through R1 and R2 must be equal to 500mA and again since R1=R2 the currents are shared equally from the resistors.I am asking this because I got confused.Any help appreciated!


texts: Will a string of 5W globe bulbs in patio survive the rain?

texts:
I have a string of 5W globe bulbs (G12) in patio. The bulbs are facing upwards. A few questions
What will happen if:

If I turn them on after it has rained and things are wet
I turn them on during rains
I turn them on when everything is dry. - I've already tried this and some of the bulbs glow, while others are burnt out. A few of them have their top exploded.

Followup: Is it possible to use globe string lights in wet weather at all?


texts: Does stranded wire reduce resistance from skin effect when strands are not insulated?

texts:
I've seen many discussions where people mention multi-strand wire improving conductivity when skin effect is a concern, but I often see Litz wire mentioned in these discussions.  Litz wire contains individually insulated strands of wire.  I haven't found anyone clearly explain whether or not the individual strands have to be insulated to reduce resistance from the skin effect.  Can someone clarify this for me?

For specific application, I have a lot of 10 AWG multi-stranded wire.  The conductors are bare strands all held in a THHN jacket.  This is common stuff used in regular electrical wiring, but I want to use it for audio frequency application.  Will the individual bare strands improve conductivity versus a solid wire in this case?


texts: Is there any way to brake a small stepper motor without passing any current through it?

texts:
For a project, I have two steppers connected to each other by a wire and I require the stepper to rotate in opposite directions, wrapping the wire around them, decreasing its length, or releasing previously wrapped parts of the wire, increasing its length. The steppers required are very small and I have therefore decided to use the stepper motors inside the CD Drives of old laptops. However, steppers only hold their position when there is a current passing through. This drains the battery they are powered from and generates a lot of heat. Is there any small brake I can use with the stepper motors I am using to get them to hold their position when there is no current being supplied?

Link to the type of motor I am using


texts: about nominal switching capacity of the NO and NC sides of the Relays

texts:
There is two kinds of contacts for relays - NO(Normal Open) and NC(Normal Close).

And I found that the nominal switching capacity of the NO side is always larger than the NC side.
For example, the ALQ relay of the Panasonic Inc. the specifications are as followed:

NO side: 10A 125V AC, 5A 250V AC, 5A 30V DC
NC side: 3A 125V AC, 2A 250V AC, 1A 30V DC

Question:

Why does there are differences for the nominal capacities between the NC and NO specification?
There is big difference in the specification values for the DC capacity in the above(NO: 5A 30V DC, NC: 1A 30V DC).
The 5A capacity is sufficient for your project but the 1A is not.
Will the current capacity be larger if the DC voltage is lower than 30V (eg. DC 5V)?


texts:
I need to use a HPF for my headphone amp and I want some suggestions about at what frequency I should place the cutoff frequency.

Currently I want to use a HPF with a fc=15~20Hz but this gives me -3dB at 20Hz.

Is this acceptable or do I need to go lower to get not dump the "bass" so much?
The one I have is made with a 1uF polyester cap and a 10k ohm resistor (I also have a 50k potentiometer that drops that resistance to about 8.3k.)

Also I might fiddle with the negative feedback path of the opamp to boost the "bass" by adding a cap and resistor in parallel with the feedback resistor.


texts:
I have a circuit board with a surface mounted inductor which I believe is a film inductor. The board is not working properly and there is a loud squealing sound coming from said inductor so I am trying to replace it. I have located it in the data sheet for the board but I am inexperienced at identifying and specifying inductors so I am having trouble identifying a suitable replacement or testing the inductor to confirm that it is indeed the malfunctioning component. Could anyone here advise on how to determine the specs of the inductor, how to make sure I find a replacement that is suitable, or how to test the current inductor to make sure it is actually the malfunctioning component? Advice on any of these topics would be much appreciated, pictures are below for reference.

The inductor says 2R2 135S as far as I can tell and the schematic has two annotations to the component: FDA1055-2R2M=P3 and IND-2D2UH-100-GP.

The only thing I have been able to find on my own is that the inductor must be 2.2 uH (That's what the 2R2 is, I think) but I'm not sure of any other specs.


texts: USB Impedance / PCB impedance calculation

texts:
I'm in the process of trying to make my first PCB with USB 2.0 on it.
Right now I'm trying to work out what the trace width and clearance for the differential pair should be to get the correct impedance.
According to this: http://www.usb.org/developers/docs/hs_usb_pdg_r1_0.pdf
they normally use 7.5 mil(0.19mm) traces with 7.5mil clearance on a 63 mil board (1.6mm)
That should give the traces around 90 Ohms differential impedance according to the PDF, but when I try to input it to my impedance calculator (Saturn PCB toolkit V7.03)
it gives me
almost 160 Ohm - and even if use 53mil conductor height or anything I cannot get the 90 Ohm differential impedance.
What am I doing wrong here?


texts: Help identifying a connector for a socket

texts: I need help identifying the right connector for this port it is for a stepper motor, any help would be awesome


texts:
if I am using one hot encoding for the states and want to go from S0 -> S1 -> S2 -> S3 -> S0

Apparently the following code does this. However I am not sure how the state assignment part works in the snippet (comments mention rotation of 1 bit...?)... can someone please explain HOW this rotation works ie. why the "&state(2)" etc. It would also be extremely helpful if you could provide a simple hardware representation of the code snippet.

process (clk) begin
  if rising_edge(clk) then
    if reset = '1' then
      state <= S0;
    else
    --rotate state 1 bit to left
    state <=
      state(1 downto 0)
      & state(2);
    end if;
  end if;
end process;

In the architecture we are told that S0 = 0001, S1 = 0010, S2 = 0100, S3 = 1000


texts: I am working with a zinc air battery. When I short circuit my battery with a wire and record the voltage at the battery, my voltage is decreasing until 0 mV. Can I say that my battery is dead ? In other words, is a short circuit current equal to zero equivalent to a dead battery ?


texts: Understanding circuit diagram on datasheet and resistor value

texts:
I am interested in starting an intro electronics project using a IR sensor and am having a little trouble understand the application circuit given on the datasheet of the circuit. The value of resistor they recommend using is far less then the one I calculate I should need.

datasheet

The supply current given on the datasheet is 0.27mA - 0.45mA and the supply voltage is 2.5V - 5.5V. I intend to run this sensor at 0.35mA with 3.3V and this yields a needed resistance of around 10K ohms; far greater than the 33 - 1K ohms suggested.

As this is my first venture into electronics, could someone help me to understand how using such a low resistor as specified would work when the math says otherwise?

On a slightly related note, from what I understand, the capacitor in the circuit is called a decoupling capacitor and is used to provide the extra current during short periods of high current draw so the voltage supply does not. Because this is such a low current circuit (or is 0.35mA low?), is it fine if I leave the capacitor out or should I include it because the datasheet lists the absolute maximum current as 3mA and the circuit may try to draw that much?

Also, I am not familiar with the component on the far right of the diagram (marked "micro" C). Is that a generic representation of a microchip?


texts: If I pass electricity through heating coils will it make heat?

texts: This may sound like a silly question. But if I strip some wires  added the connectors and connect them to a heating coil will it heat the coil up? What else would I need to produce heat?


texts: What is the "ammo" packaging method when ordering through hole parts?

texts:
I'm familiar with bulk, tape and reel, cut tape, and tube, but what is "AMMO?"

Source: Fairchild 2N3904 datasheet, page 2


texts:
I've got a shielded tent in our office and I see one ambient element I don't have a good explanation for.

We see some ambient noise at 700MHz - 800MHz which I guess is cell-band noise.

But there is one persistent source of noise at 160MHz, that is also ambient and consistently present.  Across 30MHz to 700MHz all other ambient noise is attenuated by the tent.

What could that be source of noise be, is it RF?

I'm actually thinking maybe it is noise from the Rigol spectrum analyzer?  (Is 160MHz an FPGA?).


texts: Sending a radio wave from one micro-controller to another

texts:
I have two ATMEGA328P's. I would like to be able to send a radio wave (no data/sound/modulation, nothing, just the carrier wave) from one micro-controller and get the other micro-controller to pick it up using ADC.

So far I've been able to pick up random EMP emission with my receiver ATMEGA328P (by connecting a long wire into the ADC input). I can clearly see a unique ~6sec pattern being generated by one of the devices at my home, then it goes silent for ~5seconds and then the pattern repeats again. Seems like it's coming from the fridge or maybe neighbors, because pattern disappears as I move further away from the kitchen. So my 'antenna' is picking 'something' up.

Now I want to be able to simply generate some kind of EMP emission, that could be picked up with my receiver, but this is where I'm stuck.

I don't seem to understand how can I 'send' the wave out from the transmitter. If I simply connect the crystal (16mhz) to the ground and VCC and connect another wire (antenna) to the crystals GND pin, but nothing happens as my setup is wrong. I see that other crystals used in radio tutorials have 4 pins, one of them is antenna, so I believe I need to wire 2 pinned crystal differently?

As far as I understood, this is how the transmitter should work:

Crystal is used to generate sine wave, which in return causes the polarity on the wire/antenna to toggle, which in return produces EMP emission in the frequency of 16Mhz (in my case), this signal then get amplified. Is this correct?

My questions are:

-Crystal value/pin count - Can I use a two pinned 16Mhz crystal to generate a 16Mhz SIN wave and will I be able to pick it up with the other ATMEGA's ADC? ( I don't want to read/process the signal, I just want to be able to read it with ADC and detect it's presence )

-Antenna - I have a WIFI antenna, as far as I understood, I won't be able to use it to pick up 16Mhz frequency since it works in Ghz range, correct? How would I find out the requirements to make an antenna that would pick up this frequency (16Mhz)?

-Signal - If I'm sending a 16Mhz sin wave and my micro-controller is running at 8Mhz, it means that I won't be able to see the 'detailed sine wave', but it would appear as solid 'high' in the listener, correct?

PS: Is there a different term for 'radio wave transmission'? because all the tutorials I come across are AM/FM radio related, while I simply want to generate a 'carrier wave' that can be picked up by another controller.

Thank you for your time!


texts: Is LTSPICE not taking into account power supply limitation while doing AC analysis

texts:
I have a problem witht the AC analysis of a circuit.
The circuit is a voltage driven constant current driver:

It is intended to drive a constant current into L1 (R1 being the series resistance of the inductor).
R2 is the resistor to sense the current passing through the coil.
U2, U3 and associated resistors are just there to rescale the voltage so that a variation of 1V on V3 will lead to a variation of 1A in L1.

The AC analysis give the following response:

We can see that at 1kHz, the gain is still more or less the same as at 10 or 100Hz: -20dB represent 100mV across R2 wich is then 1A.
When I do the transient response with V3 at 1V/10Hz I see the 1A passing through R2, but when I do it at 1kHz I only see 500mA through R2.

That is actually normal because at 1kHz, the coil reactance is R=wL=31 Ohms.
The power supply being +/-15V the current passing through the coil and through R2 cannot be higher than 500mA (15V/~30 Ohms) meaning at 1kHz the amplitude is actually divided by 2 so the gain should not be the same at 10Hz and 1kHz.

This information is not visible on the AC analysis so my question is:
Is LTSPICE ignoring any power supply limitation of an OPAMP when it does AC analysis?


texts:
Inspired by the Arduino Pro and a circular LED clock that I have made last year, I am designing a new small circular board similar to both in some ways. The Arduino Pro is a great board, but it lacks an ICSP header which makes it hard to upload code to it in my opinion.

I am making this board so I can use it for my future projects easily, so some attributes for this board are versatile and low power consumption. So far, I only have 3 tiny buttons, a tiny MOSFET and a 74h595. Are there any tiny parts that I can add to this tiny board that could be useful? And last but not least, are there any faults in this circuit diagram?


texts:
I have a solenoid that I need to energize via a 12V car battery.  The solenoid will only draw a few amps (2-3?) at the most.  Do I require a high current rated power switching contactor (part# EV200AAANA) for this application due to the car battery?  I would prefer to use something much smaller (common 15A ice cube control relay) in a machine for cost and space savings.

Thank you.


texts:
On diagrams the transistor have usually a direction - it is assumed that (for bipolar NPN) current goes from base to emitter and it is reflected in symbol:

simulate this circuit – Schematic created using CircuitLab

However when if I look how transistors are actually being built it seems that there is no difference between collector and emitter - both are N regions (for NPN transistors). Is there a difference between them I can't see or is it just a convention to allow reader get the intended direction or current?

(I described bipolar but I'm also interested in FETs)


texts: Where does the name "flip-flop" come from?

texts:
After I learn about the DFF (Data Flip-Flop). I understand Flip-Flop as a device that can memorize input data at the rising or falling edge of the clock sequence.

But why call it flip-flop? Why not something like edge-triggered memory circuit. It's kind of a nick name which is hard to get for a non-English speaker. And in my country, the translated version is kind of twisted.

Could anyone explain the reason of the naming in plain English? Thanks.


texts: Is there software for automating logic design?

texts: As in, you choose what you want the nodes to function as then the software fills in an optimized logic design for you? seems like it would be simple enough. perhaps only fill in 70% or so and you do the rest?


texts:
I need to redesign an old PCB and for that I want to put down a open copper plane that won't get covered by solder mask.

I tried it by creating a rectangle in the 'Pads'-Layer. The PCBs just arrived and.. well they are covered by soldermask.

I also tried the answer to this question but now my placed rectangle is gone and I can't see it anymore.

So the question is:
How do I create a copper plane without soldermask?


texts:
I implemented the circuit below using these components:

LOUDITY LD-BZEN-1212 - its description is "Sound transducer: electromagnetic; without built-in generator" and I am guessing it works like an active buzzer; datasheet here
PN2222A transistor
1K resistor to drive the transistor
1K resistor in parallel with the transducer
1N4148 diode in parallel with the transducer
100uF electrolytic capacitor in parallel with the transducer
100nF and 100uF bypass capacitors on the input
12V / 1A supply for the transducer (also powers the Arduino board through a L7805ACT regulator and another component through a LF533CV regulator; they both share the bypass input caps with the transducer)

I drive it with an Arduino Pro Mini through PWM port 6 using the tone() function, like this:

tone(9, 2489);
delay(1000);
noTone(9);

The problem is that the buzzer makes a very low noise. I want it to be as loud as the common buzzers on PC motherboards that signal BIOS POST / errors (I know those are passive as they have only one tone).

The transducer datasheet says "Rated Current (MAX): 40mA".
The PN2222A datasheet says "collector current (DC): 600mA".
The 1N4148 diode datasheet says "I(F) continuous forward current: 200mA".
The power source is rated 1A.

So where's the problem?

Here's the schematic (only the transducer part):

simulate this circuit – Schematic created using CircuitLab


texts: On Computing Power Consumption for a GSM system

texts:
I'm a software student trying to learn about embedded systems. I would like to
build a low-power system that can send his coordinates by SMS and also receive SMS. Unfortunately I'm at level zero in electronics and the first step is to estimate power consumption and I am not sure at all of my computations.

Could someone verify my computations and tell me if I forgot anything important ?

I choosed:

Microcontroller: MSP430G2553 datasheet.
From the datasheet I read

Low Supply-Voltage Range: 1.8 V to 3.6 V
Active Mode: 230 µA at 1 MHz, 2.2 V
Off Mode (RAM Retention): 0.1 µA

So I made the following computations:

Power consumption on run mode:
230uA * 16MHz * 2.2V ~= 8mW
Power consumption on sleep mode:
0.1 uA * 2.2V = 0.22 uW

For the GSM Module I choose ublox SARA-G3 informations
There I see:

Power supply 3.00 to 4.50 V (extended)
Power consumption Power Off: < 40 μA
Connected: < 250 mA

So I compute the power consumption in the following way:

Power off: 40uA * 3.75V(Average) = 0.15 mW
Connected (full power): 250mA * 3.75V ~= 1W

And finally for the GPS: ublox MAX7

Continuous Mode: 17.5 mA @ 3 V => 52.5 mW
I Suppose it can be powered off when unused

TOTAL POWER CONSUMPTION

Sleep: 0.22 mW + 0.15 mW + 0 = 0.37mW
Max: 8mW + 1W + 52.5mW ~= 1W

So if I take for the sake of the example two AAAA alkaline batteries (1.5V, 500mAh capacity) and put them in series

3V, 500mAh capacity => 3V * 500mAh = 5400 J energy

The device would last:

5400J / 0.37mW = 168 days on sleep mode
5400J / 1W = 1.5 hours in max mode


texts: Generation Rate and Recombination Coefficient for Intrinsic Semiconductors

texts:
Generation Rate

In an intrinsic semiconductor, the generation rate due to thermal energy is often given as
$$G_{th} \propto \exp \left( - \frac{E_G}{k \cdot T} \right), \tag{1}\label{1}$$
with the band gap \$E_G\$, the temperature \$T\$ and the Boltzmann Constant \$k\$.

Question 1: Why is this formula shown with an proportional-to-sign "\$\propto\$" instead of the equal-sign "\$=\$"? Is there a more exact formula for \$G_{th}\$?

Recombination Coefficient

The recombination rate in a semiconductor is
$$R = r(T) \cdot n \cdot p, \tag{2}$$
with the concentration of electrons \$n\$, the concentration of holes \$p\$ and the recombination coefficient \$r(T)\$.
For thermodynamic equilibrium, one can write
$$G_{th} = R = r(T) \cdot n_0 \cdot p_0, \tag{3}$$
where \$G_{th}\$ is the generation rate from above, see equation \ref{1}.
With the Maxwell-Boltzmann-Approximation, it is now possible to use the approximate intrinsic carrier concentration
$$n_0 \cdot p_0 = n_i^2 \approx \left( \frac{4 \sqrt{2}}{h^3} \cdot \left(\pi \cdot k \cdot\sqrt{m_n \cdot m_p} \right)^{3/2} \cdot T^{3/2} \cdot \exp \left( - \frac{E_G}{2 \cdot k \cdot T} \right) \right)^2 \tag{4}$$
$$\hookrightarrow \quad n_0 \cdot p_0 = n_i^2 \approx n_{i,0}^2 \cdot T^3 \cdot \exp \left( - \frac{E_G}{k \cdot T} \right) \tag{5}$$
\$h\$ is Planck's Constant, and \$m_n\$ and \$m_p\$ are the effective masses of the electrons and holes, respectively.

Solving for the recombination coefficient, one obtains
$$r(T) = \frac{G_{th}}{n_0 \cdot p_0} \tag{6}$$
$$\hookrightarrow \quad r(T) \propto \frac{\exp \left( - \frac{E_G}{k \cdot T} \right)}{n_{i,0}^2 \cdot T^3 \cdot \exp \left( - \frac{E_G}{k \cdot T} \right)} \tag{7}$$
$$\hookrightarrow \quad r(T) \propto \frac{1}{T^3} \tag{8}$$

Question 2: Does the recombination coefficient (theoretically and in the simplest physical model possible) drop with increasing temperature as suggested by the above formula?


texts: Can I use a 12VDC switch rated at 16A on a 120VAC circuit that only use 0.5A-1A? I have a similar switch, that is 120V rated at 10A, but it's a little too small.


texts: Why are relays used in circuits when we have transistors?

texts: Why do I find relays being used right next to transistors? What is the benefit or use of using a relay over a transistor switch?


texts: Addition of HF Capacitor to Constant Current Source

texts:
The part of a circuit shown below was used in one of commercially sold audio amplifiers (constant current source shown here was added to differential amplifier, whereas voltage amplification stage followed and output power stage).

simulate this circuit – Schematic created using CircuitLab

What did they tried to achieve there with that capacitor of 100 pF? From its value I assume that it is some high frequency bypass or decoupling capacitor for Q1 or/and Q2. Are my assumptions right?


texts: Need help figuring out simple multiplication hardware

texts:
As a part of my Computer Organization course, I need write to write a simple program (in C) that mics the work of "refined multiplication hardware" just like one shown in "Computer Organization and Design", by D. A. Patterson and J. L. Hennessy. Picture is attached.

I have a hard time understanding how this multiplier works (book has very little explanation) and and if it works with signed numbers(2's complement)


texts:
I've just started to read about layout (beginner) and I came across this in Baker's book,

As you can see in the above, the substrate connection is made with a p+ active region. This makes sense for a single NMOS. But what if I had another NMOS right beside this that I wanted to connect a different substrate voltage to (body biasing)? Is there no seperation between the two?

In other words, the substrate connection in the above doesn't seem to be restricted to just this device. What if I wanted to add another device with a different substrate voltage, how would that work since they both now share the p-substrate and hence the first device's substrate voltage? How do you isolate them?


texts: Arduino leonardo keyboard emulation fail at boot

texts:
I'm using this code to use leonardo as keyboard:

void setup() {
  Keyboard.begin();
}

void loop() {
  delay(1000);
  Keyboard.press(KEY_F2);
  delay(100);
  Keyboard.releaseAll();
  delay(1000);
}

But it fails to send keys when the computer is booting.
On windows it works.

Is there a way to set arduino leonardo as a real keyboard?

Edit 1:

I try with other machine and it works. I Guess this problem is pointed on this question Arduino PS/2 Keyboard Emulator Issues

Edit 2:

It fails on a PowerEdge R720 dell server.


texts: Detection of condensation on automotive glass

texts:
Wondering if anyone has done this or can add to my theory, my idea is to use a microcontroller to measure the resistance of a heated car windscreen using the pre-existing copper conductors to detect the moisture level on the windscreen i.e mist/condensation.

In theory it may work as soil moisture sensors do exactly the same thing however the accuracy and reliability may be questionable anyone any thoughts?


texts: Must we use the Thevenin to simplify the circuit first before we calculate the stability factor of this circuit?

texts:
There is a voltage divider bias schematic:

Lots of books will use the Thevenin (\$R_{th}=R_{B1}||R_{B2}\$) to simplify the circuit and calculate the stability factor, just like in this video. and the stability fsctor is \$S=\frac{1+\beta}{1+\frac{\beta (R_E)}{R_{th}+R_E}}\$
I calculated the stability factor  without using Thevenin, but the result wrong, so I wonder if we must use the Thevenin to simplify the circuit first before we calculate the stability factor of this circuit.  If yes,why? If no, where am I wrong in my calculation?
Here is my calculation:
\$V_{CC}=i_c R_C+V_{CE}+i_E R_E+(i_B+i_{B2})R_{B1}+i_{B2}R_{B2}+V_{BE}\$
and \$i_E=i_c+i_B\$ so
\$V_{CC}=i_c R_C+V_{CE}+(i_c+i_B) R_E+(i_B+i_{B2})R_{B1}+i_{B2}R_{B2}+V_{BE}\$ then
\$i_B=\frac{V_{CC}-(i_c (R_C+R_E))-V_{CE}-i_{B2}R_{B1}-i_{B2}R_{B2}-V_{BE}}{R_{B1}+R_E}\$
And as we know,the definition of stability factor is \$S=\frac{\partial i_c}{\partial i_{co}}\$, \$i_{co}\$ is the reverse saturation current
and  \$i_c=\beta i_B+(1+\beta )i_{co}\$, now we can get
\$i_c=\beta \frac{V_{CC}-(i_c (R_C+R_E))-V_{CE}-i_{B2}R_{B1}-i_{B2}R_{B2}-V_{BE}}{R_{B1}+R_E}+(1+\beta )i_{co}\$
Now
\$\frac{\partial i_c}{\partial i_c}=1=\beta \frac{- (R_C+R_E)}{R_{B1}+R_E}+(1+\beta )\frac{1}{S}\$ so the stability factor \$S=\frac{1+\beta}{1+\frac{\beta (R_C+R_E)}{R_{B1}+R_E}}\$.
Now I have a different stability factor.  Where did I wrong when I calculated the stability factor without simplifying the circuit first?


texts: Solving voltage dividers with unknown resistance

texts:
This topic could have been in math as it is mainly about an algebra trick I don't know how to perform, but since it is about voltage dividers, I am sure a lot of people are qualified here.
I need to solve this equation, but I don't know how to isolate R.
24V * (R / (R + 1200ohm))  = 24V * (R / R + 6000ohm) + 5V
Here is a schematic to help, just in case. LVDT 1 has 20mA and LVDT 2 has 4mA. Vm is a differential of 5V.


texts:
I'm making a dummy load which can draw 5V/3A maximum, but can also draw small loads (e.g. to drive an LED array of 20mA).

simulate this circuit – Schematic created using CircuitLab

I have selected a 0.5 Ohm shunt resistor after looking through a bunch of datasheets of mosfets.

The positive input is controlled by a coarse and fine adjustment pot, so it can be varied accordingly until 20mA is seen through a multimeter.

To get 20mA, I would need 10mV at the op amp inputs. From the datasheets I've looked at on precision vs. non-precision, the big difference I see is input offset voltage. In this application, is this parameter critical? I believe it isn't, because I can just adjust the pot, but I want to make sure.

Regular op amps such as an LM324 says it has a minimum common mode input voltage of 0V. Are there any benefits for using a precision op amp here? Will it increase the fine grain adjustment of the output voltage (if my input's resolution is very large)?


texts:
I want to design a riddle:
1. 12 metal plates on the wall
2. 8 plates at room temperature.
3. 4 plates at 40-45 Celcius(104-113 Fahrenheit), it is important the plate doesn't exceed the temperature limit for safety purpose.
4. players have to identify the 4 warmed plate by touching.
5. the riddle should be run 8-10 hours continuously a day.

The problem I am trying to solve is how to warm up the 4 plates safely for such duration.

Possible options:
1. Simply have a heater blowing hot air behind the 4 plates.
2. Let the plate act like a resistor and apply power to it.

Any recommendation is appreciated.


texts: I am studying on CE amplifiers and I am getting a bit confused when the resistors range enters the game. I cannot figure out which resistors should I increase and which should I decrease to find the Vout max, the Vout min, the Qhigh and the Qlow (on resting place graph). Lets say that our resistors have a +-5% range.


texts: Can't get my led bulb to turn on using triac and optocoupler

texts:
I have made the below circuit but my LED bulb won't turn on, although circuit works fine if replace the led bulb with a small led and ac supply with 5v dc supply.
Can someone guide me in a right direction?
Sorry I forgot to add the resistor in the diagram but I am using a resistor between 5v and led input, also the ic is MOC3020 Optocoupler and triac is BT136

Thanks in advance.


texts: 12VAC-5VDC regulator, but L7805CV doesn't work properly

texts:
Hi everyone. I am trying to make 12VAC - 5VDC power supply. However when plugged in, voltage between L7805CV in - ground was 4V while output was 1V.
I have test 7805 separately and it works correctly though. The rectifier and filter without 7805 also work correctly.
What was possibly wrong here?


texts: Why sample at a certain frequency just to immediately downsample it?

texts:
I apologize if this question is not well-posed. I'm reading a paper that claims the following:

  The magnetometer vectors are sampled at 100 Hz. The detector filters and down samples the vectors down to 10 Hz to remove signal noise and reduce the computation required for live processing on the smartwatch.

My questions is: if they wanted the sampling frequency to be 10Hz, why did they not just sample at 10Hz initially?


texts: Can I use aluminium containers to transport ESD sensitive PCBs?

texts:
I want to transport PCBs mounted with LEDs which are ESD sensitive, in knocked down condition. Standard storage bins are not available in my specific size, hence was thinking to fabricate aluminium bins as per my specification.

I dont have the option of grounding the bins, cause I have to transfer the PCBs regularly form one section to another.

Please help!!


texts: using multiple buck step-down voltage regulator modules to convert 50-400V DC to 12V DC

texts:
I would like to generate ca. 12.5V, 8-10A, DC power from an incoming voltage between 50 and 400 DC that has been rectified from 3-phase AC coming from a brushless motor acting as a dynamo. I will smoothen out the rectified DC with some capacitors. I'm not worrying about filtering the various stages yet.

I have 10 of these very cheap voltage regulator modules:
http://www.aliexpress.com/item/Free-Shipping-10pcs-LM2596-LM2596S-DC-DC-4-5-40V-adjustable-step-down-power-Supply-module/1475560768.html

Datasheet here:
http://www.ti.com/lit/ds/symlink/lm2596.pdf

I have already tried setting them up with serially connected inputs (to split the high input voltage). When serially connecting ONLY the inputs of 10 LM2596S modules, applying e.g. 140V to the whole chain of modules and then measuring individual outputs, it seem to work in that each module gives the desired output voltage.

But both from further experimentation (I now have 8 functioning modules left ;) and subsequent perusing of other Q&A here (doh!), I learned that parallel wired outputs of an non-isolated buck regulator, such as the LM2596S, is a no-go for several good reasons.

My (first) question then becomes: What about serially connecting the outputs in stead? E.g. 10x 1.25V (it is the LM2596S adjustable version which go down to 1.2V on the output) to get 12.5V? I have read somewhere that serial connecting the outputs of buck regulators when adding schottky diodes between them might be possible(?).

But even if this works, It seems that I might also hit an possible input/output voltage differential limit of the LM2596. E.g. assuming the range is 4:1 (the TI data sheet does not specify, IFAIK), the modules will only produce my desired output voltages if the input voltage is between 1.25V+1.5V= approx 2.75V (or a bit more) and 4x1.25V=5V, meaning the incoming rectified DC must stay over 27.5V and below 50V in the case of 10 serially connected modules. Otherwise the output voltage will start to rise above 1.25V from each module, if each get more than 5V individually, and as a consequence also the total serially added-up output voltage will rise above 12.5V (which I don't want). Right?
Anyone knows if the LM2596S has this voltage differential limit?

Is there another way to re-use the LM2596S modules I have by e.g. putting them in some cascading or interleaving configuration with or without additional components? Or am I better off discarding the LM2596S modules and finding a completely different solution to the problem of adjusting down the variable 50-400V DC input to constant 12.5V DC output?


texts: OpAmp Spice Model: Offset vs Common Mode Voltage

texts:
The spice Model of the OPA350 specifies that the DC Offset Voltage vs Input Common Mode voltage is implemented in the model. If I do the simulation however, all I can see is a linear trace, when x axis is the common voltage and y axis the DC offset. See image in ltspice.

As it is a Rail-to-Rail Input, I was more expecting to see two different voltages, depending which input stage is currently used. See second image (exampl of another rail-to-rail amplifier)

So what am I doing wrong, or is it just the spice model missing that, even though it is written in the lib file ?


texts: Total Capacitance In A Circuit Along With Other Electronic Component

texts:
I know it may sound stupid but having thinking across my mind with the basic knowledge I've already have with capacitance(series and parallel), I've been wondering on how to get the total capacitance in a circuit with other electronic components as shown below.

where C1 - 2500uF,
      C2 - 50uF,
      C3 - 20uF,
      C4 - 240uf,
      C5 - 50nF


texts: I'm trying to use this thyristor to pull current away from another part of the circuit. I expected that triggering the thyristor would cause current to flow away from the base of transistor T1. Instead, after triggering all I get is a voltage drop from the thyristor collector to the gate. Is this because the thyristor resistance is greater than the resistance to the T1 base (i.e. 0) and so all the current continues to go to T1 base? Would putting another resistor before T1 base solve this?


texts: Coplanar Waveguide Calculations PCBS, AppCAD v.s. Online calculators

texts:
So lately I noticed that the Coplanar Waveguid calculations of AppCAD (http://www.hp.woodshot.com/) did not give the same result as the online calculators do.

https://chemandy.com/calculators/coplanar-waveguide-with-ground-calculator.htm

http://wcalc.sourceforge.net/cgi-bin/coplanar.cgi

AppCAD:

Can anyone explain this?

P.S. this is the same for the microstrip calculations.

Does anyone has any experience which calculator works more accurate?


texts: Are there special protocols one should take when handling vintage/old electronics?

texts:
UPDATE:  I am mainly interested in learning about vintage chips, ics, cpus etc, mainly non-soldered chips. It would also be interesting to know about any other component (i.e., capacitor) that could have been near a soldered chip that could cause an issue (might still be broad, since computers run everything/the chips could have been used elsewhere besides in computers).

Taking from my previous question here Are there dangers to humans from PCB/Circuit Corrosion?

I am curious if there are special precautions one should take when dealing with old/vintage electronics?

From my understanding current electronics are all made with lead-free solder, while older equipment (and even current hobbyist equip) will contain lead solder, which I'm not sure if that is a worry, but some comments were suggestion that there could be "lead-dust...." in some situations, and not sure if handling will cause issues (maybe the solder is breaking down over time, not sure if it does that?).

There is also the worry of corrosion and other nasties that could be on the circuits.

So my question is, when dealing with vintage/old electronics that might or might not be contaminated with nasties, are there specific handling instructions we should take note of?  obviously when dealing with corrosion and other build up of nasties we should be wearing protection, but what about dealing with boards/circuits that are in pristine new-line condition?

EDIT:  Thanks for the answers so far, and even though there isn't a lot of handling instructions, I appreciate being told what nasty chemicals I should look out for, and what.

I have edited the question a bit to try to be "less broad."


texts: Why is a power amplifier most efficient when operating close to saturation?

texts:
I have been seeking an answer for this question for some time, and i am clearly missing some intuition. I have numerous sources stating that the efficiency is higher when the amplifier is driven close to saturation, which obviously gives troubles in RF applications, when waveforms with a high PAPR is used.
However, there are no arguments stating why - can someone help me answer this?


texts: Are magnetically tunable surface acoustic wave devices commercially produced?

texts:
I have been reading up on studies of magnetically tunable surface acoustic wave devices, in general they note the relative velocity change or in some cases a frequency shift if it is part of an oscillator or a resonator design.

These relative velocity changes are small, the upper values I have seen are 0.6% for a delay line structure and I believe I saw 1.2% frequency shift for a monolith resonator structure.

My understanding is that these changes are typically too small for useful practical applications within mobile communication systems, where a number of different frequency bands and communication protocols need to be supported.

However these could be used in other systems where a modest degree of adjustment is required or for magnetic or current sensing applications.
I am curious as to whether these types of devices are used and produced commercially or whether this is primarily in the scope of academic research at this time.

And what are the minimal tuning ranges that would be required for practical and useful tunable filters and oscillators for mobile communication devices?


texts:
Out of curiosity, I recently opened a damaged measurement device (it´s some kind of lab spectrometer, but I am not sure) that contains a LED with a package like I have not seen before (see picture).

I tried to find out what type it is since it somehow looks "special". Unfortunately, I did not find LEDs looking similar when searching through various distributor websites and I am not sure how I could narrow the search parameters.
I only know that it emitts yellow light. Does anyone have an idea which type it could be?


texts: Hall Effect Current Sensor IC Data Sheet

texts:
I'm feeling like an idiot here.  I've found this great little IC that will do the job I want but I can't seem to figure out what the max voltage is that can be supplied for sensing.

The IC runs on 5Vdc and the version I want to use is the 30A size.

I'm trying to sense when a 100W RF amplifier is working.  The amplifier runs on 13.8Vdc and has a standby current of about 0.5A but when it's working it jumps to 21-23A.

Being fairly new to the whole thing I was hoping someone could point out where on the data sheet it says I'm good-to-go or DON'T DO IT MAN you're going to be making magic blue smoke.

Looking at the datasheet makes me think there is no friggin way a tiny IC can handle this much juice running through it without it melting.  Am I missing something?  It looks like they say it needs to be wired in series with the amplifier.
ACS714-DataSheet


texts: Reusing something unrelated as a hardware adder for code optimization

texts:
I am running into some speed issues in the ISR. Due to the nature of my code, I need to add 20 values (16bit) in an ISR. The code looks like this

 #define Element_size 4
 #define Chunk_size 5
 void add(void)
 {
   int i;
   int j;

   for (i=0;i<Element_Size;i++)
   {
     sum[i]=0;
     for (j=0;i<Chunk_Size;j++)
     {
       sum[i]+=data[j*4+i];
     }
    }
  }

This is not the exact code but the algo is identical. (data is laid out as chunks with size of 4, in this case I have 5 chunks of data. I add the first element of every chunk, later the second element etc. etc.) Assume sum and data are globals. This takes longer time than I have. I am looking for a solution to speed things up. So far, I can think of:

Improve the algo: I can make this one turn (or without a loop) instead of two but if the chunk sizes change (now a compile time option), it will break. I will do this as last resort once the code is final and no other changes expected.
Move to assembly: I will do this but it will take time, a viable option
Make the function inline: This will save some time but not a whole lot as the majority of the time is spent during summation, I will do this anyway.
Use some hardware block for summation: I am using STM32F2 family (Arm Cortex M3), it has several good stuff in there but no ALU. I looked at the crc, hash and cyrpto libs but couldn't find anything that jumps out that can be used as a hardware adder.

Especially, if one of the masters among you suggest a hardware assisted way to do this calculation, I would be in debt. I am looking an out of the box way of doing this, not just code optimization. This is really the key question I have.


texts: Analog Devices Filter Wizard Schematic Question

texts:
I am using filter wizard to help me design an active multiple feedback bandpass filter. I understand the parts of the schematic that show the stages of the filter, like this:

However, I am struggling to figure out what other parts of the schematic mean. Specifically, this part:

Anyone know what is meant by the second set of diagrams?


texts: Cadence: use voltage as a parameter to change resistance

texts:
I designed a circuit that takes two user inputs ("vl" and "vh") and set a resistor value ((vh-vl)*100kOhm) that sets the gain of a inverting opamp amplifier. I am using Cadence and both vl and vh are configured as pPar() in the CDF editor.

I want to turn both vh and vl into pins in the symbol view, so instead of having the user input vl and vh in the symbol properties, the user can simply hook the two ports to two dc voltage sources. How can I do that?

This is a behavioral model, hence the resistance being set as a function of vh and vl.


texts: Relationship between switching frequency and controller's crossover frequency in DC-DC converters

texts:
I am reading some answers related to my questions based on control loop stability of SMPS.

I came across this question.

The accepted answer states:

  A switch mode power supply is essentially a sampled-data system, therefore the theoretical maximum bandwidth is one half the switching frequency. Practically the phase and transport lag there make it impossible to close the loop there, so 1/5 to 1/10th the switching frequency is a good rule of thumb.

I want to understand this answer in a little more simpler way with clearer terms electrically.

Can someone please break this answer down into simpler terms for my understanding? Would be really helpful.


texts:
I am trying to repair sewing machine by replacing a safety capacitor that burned up. I am not at all sure how to find an equivalent capacitor. Advice or links to an appropriate product would be appreciated.

info from capacitor body:

RIFA 40/085/56 GPC
PME 271 M 610
250V~MP fo=4,9 Mhz  X2


texts: High voltage pulse discharge ring dampening (how to save a pulse capacitor)

texts:
So I have a high voltage pulse circuit. I have planned it to be around 90kv with the capacitor being 1.3uF. It is to be discharged through a spark gap. Before I test it, I of course want to save the capacitors life on maximum reverse voltage. The specs list the maximum reverse voltage (to keep the working life of the capacitor) to be 30% (of a listed rating of 100kv).

I am concerned about ringing after discharge and am not exactly sure how much reverse voltage there may be, but I would like to keep this value as low as possible. I have considered using diodes and resistors to dampen the ringing, but I am trying to keep the cost as low as possible.

Given this, my question is about a possible second spark gap as a scheme to keep the cost down.

simulate this circuit – Schematic created using CircuitLab

The idea is that the secondary capacitor will discharge through the secondary spark gap when the main pulse capacitor reaches about 10kv or so, thus limiting the reverse voltage on the main capacitor and therefore limiting the bounce back ringing on it so that it doesn't ever reach the 30% reverse voltage rating.

Now bear with me because I'm not super familiar with high voltage pulses and how they relate to the exact timing and dynamics of the current through the plasma channel of a spark gap, but I'm thinking that maybe one of two things might happen. Either the plasma channel will continue to conduct as the voltage on the main pulse capacitor reaches the point where the plasma channel on the secondary spark gap opens up, just draining the secondary capacitor as if it were parallel with the main pulse capacitor resulting in not much of an effect (if any), OR a miracle in timing might happen so that somehow the plasma channel of the primary spark gap ceases and the secondary capacitor and spark gap puts just enough charge on the primary pulse capacitor that it never really drops that far below 0V thus dampening the ringing and reverse voltage. (Or perhaps something else might also happen that I hadn't considered.)

So what do you think? Might this be a cheap way of not using HV resistors in series with HV diodes (I would have no idea how to estimate what current rating I would need for those diodes, or how much dampening effect I could financially afford in the diodes with a minimized resistance)? Or am I just wasting my time and am going to have to drop some dough on these HV components in order to save on the life of my pulse capacitor?

(Also, any other ideas on how to cheaply dampen this oscillation are appreciated.)

Thanks in advance and let me know if I need to be clearer on anything.


texts: Power Supply Discharge to De-energize a set of relays

texts:
I am seeing relays reach their end of life much sooner than expected (and in a catastrophic manner). Specs on the relays are 24VDC 30A SPST NO. I am putting 10A to 20A of resistive load on said relays. They are lasting roughly 35000 cycles under these conditions before failing (speced out at over 250K).

In looking at the design, it has been noticed that instead of breaking "+" or "-" to said relay coils, we're simply letting the power supply "die out" as needed.

In speaking with the applications engineer for said relay MFG, they have no comment on this, no data to present and really nothing to say about it. As far as their concerned, this is untested. I've attached two diagrams to illustrate

Does anyone have experience with this?
Anyone have thoughts on this?

Note: Assume Q1 and Q2 are supplied with base current once +5VDC is available to power the micro


texts: How can we use a touch sensor to detect a specific object like a biometric fingerprint sensor?

texts:
I have an Arduino connected to a touch sensor which is placed below a piece of 4mm thick glass.
I can use touch to turn and send signal to the Arduino.  I'd like the sensor to only detect a specific object like a glass or cup. How can I achieve this?


texts:
ACT 1

Okay I know there is code protection system on PIC. But it is preventing someone read the code, not copy. It looks still easy to clone and run on another circuit. Can you suggest another methods for providing security?  Like how can I insert an encrypt/decrypt system or serial number system to my project?

ACT 2

How about we will think about all MCU's even microprocessors... Is program security reliable on other systems? Or can we encrypt our memory somehow?


texts: I am using a SN74LS32N as an OR gate in a project, and I have hooked it up to an Arduino, but even when none of the inputs are powered, the LED that I hooked up to the output turns on. Why is this chip not working correctly?


texts: Mixing ground between high and low power circuit

texts:
This post is a follow up question of this question. I apologize if this seems to be double posting, but I cant comment (not enough reputation), inappropriate to ask question as answer and cant find the email of Trevor.

So here is the question. What does it mean in the post? (shown in Figure 2 below)

  The issue with mixing grounds occcurs when you pass the returning high current through the control sides low current circuits as shown below.

From what I understand, Figure 2 is the same as Figure 1 in terms of circuit connection which will be shown in the following steps.

Figure 3 splits out the parallel ground connection for easier understanding and manipulation of circuit which is done on Figure 4. In Figure 4, I shifted the 5V to the right side and the lamp + mosfet to the left side. And that Figure 4 is the same as Figure 1.

I did observed that the current flow is a little different. But how can one be sure that current from 60V will not flow through the Arduino if all the common is connected together and furthermore is in parallel? From my understanding, same circuit with different positioning = same current flow. Which means if Figure 2 returns high current through the control sides, the same applies to Figure 1.

All these are based on my understanding. Please do critique my understanding if it is wrong (with image and current flow if possible ><).

Once again I apologize if this seems to be a double post.

EDIT: I read this post regarding schematic and decided to draw it again. They are basically the same as the previous image.


texts: I have a question , why decibels are useful for electrical engineers ?? I still can't figure out why it is useful to use decibels in expressing power ratios , gain and other things ?


texts:
I have a unique need for a custom, foldable scale and I'm having a tough time narrowing down the components needed. My search on how to get this done has brought me here to this community.
Essentially I need to wire 3, 4 load sensor scales together so that the sum of the readings are shown on a single display. What I have so far are 12, 4 wire load sensors and a junction box. However the junction box is only set up for 5 sensors and is too big and bulky for this application. Is it possible to achieve what I need using a HX711? I need to make sure things are as small as possible. Wondering if someone smarter than me can point me in the right direction before I waste too much money.
Thanks everyone
Kevin


texts: How I can enable and disanable a verilog module

texts:
I have two modules. I want to run these modules in order.
This is first module:
module SinusLut(clk, aci ,reset,sonuc);

input reset;
input [7:0]aci;
output reg [15:0]sonuc;
input clk;

always@(posedge clk) begin

    if (reset)
    sonuc<= 'd0;

    else begin

    case(aci)

        'd1 : sonuc  <= 16'b0000000000010001;
        'd2 : sonuc  <= 16'b0000000000100011;
        'd3 : sonuc  <= 16'b0000000000110101;
        'd4 : sonuc  <= 16'b0000000001000111;
        'd5 : sonuc  <= 16'b0000000001011001;
   endcase
  end
  end
endmodule

This is second module:
 module CosLut(clk, aci ,reset,sonuc);

    input reset;
    input [7:0]aci;
    output reg [15:0]sonuc;
    input clk;

    always@(posedge clk)begin

    if(reset)
        sonuc <= 'd0;

    else begin

            case(aci)

                'd1 : sonuc <= 16'b0000001111111111;
                'd2 : sonuc <= 16'b0000001111111111;
                'd3 : sonuc <= 16'b0000001111111110;
                'd4 : sonuc <= 16'b0000001111111101;
                'd5 : sonuc <= 16'b0000001111111100;
     endcase
      end
      end
    endmodule

And I create two different top module and tried both. Both of them didn't work.
First one:
module TopModule(clk, aci ,reset,sonuc,en,en2);

input en,en2;
input reset;
input [7:0]aci;
output reg [15:0]sonuc;
input clk;

CosLut CosinusLookUp(

.reset(reset),
.aci(aci),
.sonuc(sonuc),
.clk(clk)
);

SinusLut SinusLookUp(

.reset(reset),
.aci(aci),
.sonuc(sonuc),
.clk(clk)
);

always@(posedge clk ) begin

if (en2==1) begin

SinusLut;

end

else begin

CosLut;

end
end

endmodule

Second one:
 module TopModule(clk, aci ,reset,sonuc,en,en2);

    input en,en2;
    input reset;
    input [7:0]aci;
    output reg [15:0]sonuc;
    input clk;

    always@(posedge clk) begin

    if(en2) begin

    CosLut CosinusLookUp(

    .reset(reset),
    .aci(aci),
    .sonuc(sonuc),
    .clk(clk)
    );

    end

    else begin

    SinusLut SinusLookUp(

    .reset(reset),
    .aci(aci),
    .sonuc(sonuc),
    .clk(clk)
    );

    end

end
endmodule

Basically I want to enable first module after sometime i want to disenable it and enable other one.
Thank you in advance.


texts:
I need to do digital signal processing on 8 analog lines at 10 kHz.  This is quite a demanding task, and I was thinking that an FPGA might be the right approach. I am currently looking at dev kits from Xilinx, and since I have no experience with FPGA, I find it really hard to know how to choose the right chip.  I imagined using a dev kit and expanding it using the I/O pins to connect to an 8-channels A/D chip and 8-channel D/A chip.

What are the differences between using Spartan, Virtex, Altera, etc.?  I don't even know how to estimate how many gates I will need.  Are there any rules of thumb for that?  How do I make sure the clock speed will be enough (as a function of the number of adds and multiplies).  Is it difficult to do floating-point processing on an FPGA, should I stick to fixed point math?  What's the best way to get started?

I require a solution that's programmable using Linux.  Xilinx provides this, but I'm not sure what the limitations are.


texts: I have a cheap, 40W 120V soldering iron with no temperature adjustment. Given the internal circuitry seems pretty simple would it generally be safe to run it on 240V?


texts: Can a coin cell with rating >= 500 mAh be used to drive a set of 3 IR LEDs if each takes 100 mA forward current? I'll be drawing 300 mA (3 LEDs) current continuously from the cell, I heard that coil cell can deliver only low discharge current because if high current is drawn voltage drops very fast to thresh hold voltage of 2V.