texts:
My STM32F4 Discovery is crashing when I try to run the sin or sinf function with the FPU enabled and with the FPU disabled.

for (; i < 1023; ++i){
    ftemp = sin (c*t);        // Crashes here
    temp =  buffer[i] * ftemp;
    buffer[i] = temp;
    t += step;
}

When I use the sinf function, this loop crashes on its second iteration. When using plain sin, it crashes after between 768 and 1023 iterations (I've exhaustively tested). What is causing this?

Note: When using the FPU, I configured it like so: http://www.coocox.org/forum/topic.php?id=1292

EDIT:

I have since worked out that the HardFault_Handler() is being invoked. This is with the FPU completely disabled

EDIT:

I'm apparently accessing an invalid memory address. I read the PC from the stack and it is 0x00000000! How is that possible? (The program counter is the 7th 32 bit word on the stack)


texts: Am I exceeding current limits for the USB port?

texts:
This USB 2.0 hub gets the power from one this PC's one of USB port. The hub is connected to six of this USB DAQ devices. The hub both communicates and powers the six DAQ boards.The power for the DAQ is given as:

I have read here that max current cen be drawn from a USB 2.0 port is 500mA and for USB 3.0 port is 900mA.

In my case it seems the current needed for six DAQ is 230 * 6 = 1.5A. Does that mean I'm exceeding limits for the PC's USB port??


texts: Switching between power sources with microcontroller

texts:
I need a way to switch a load(a high power LED) between two different power sources(50v and 100v) using a logic signal, quickly(<500us) and repeatably. I was going to use an n-channel high side switch on each source, but apparently a high side switch that is boot strapped does not work when the load is just an LED.
Is there a way to make a n-channel high side switch work with an LED as the load
Are they any alternate was I can switch a load between sources?


texts: Suppress beeping sounds that indicate state changes in TDA7492P

texts:
I have a TDA7492P - breakout module(data sheet https://www.st.com/resource/en/datasheet/tda7492p.pdf )

When powering up, connecting and raising the volume, there are beeping sounds to indicate all those states, which I want to turn off, hear https://drive.google.com/file/d/1GLewYUBkL0Fmmy8AA_-RQEDhtdoy_RUo/view?usp=sharing
Is there a way to hack the firmware or otherwise suppress those beeping sounds?


texts: PCB Layout Decoupling Capacitor Distance from source to sink

texts:
I've been designing a 4 layer board (layer 1 & 4 is copper, layer 2 is all ground, and layer 3 is used as a power plane).

I've been using decoupling caps. to filter out the ac noise coming from the power source (3.3V) that uses the power plane from layer3 from an LDO.

The decoupling caps. I've been using are on the bottom layer and have the values of 100pf, 10nf, and 10uf that are close to the DUT pins. From the equation, x = 1/[2(pi)(f)(c)] the frequency is 2.4GHZ and all the values of the caps. shows that x < 1.

Due to space constraints, I've been told that since 10uf resonates at a lower frequency it's allowed to be further away from the DUT pins and closer to the source. Is that true?


texts: Measuring power draw of more complex loads such as switching PSU

texts:
I'm trying to create an extension cord capable of measuring the power draw of devices connected to it. My approach is using a microcontroller with a non-invasive HWTC current sensor. I am using an ADS1015 12-bit ADC which is capable of converting up to 3300 samples per second. The microcontroller is programmed so that it finds the highest voltage peak flowing through the sensor (as I am measuring AC) and then I am calculating the RMS current.

This is a simplified code running on my MCU:

/// Gets the peak voltage over the next 500 ms
/// \returns Peak voltage in mV
float getPeakVoltage(ADS1015& adc) {
    Int16 maximum = 0;
    const Ulong start = millis();
    // Measure for 500 ms
    while ((millis() - start) < 500) {
        const Int16 value = adc.readDifferential();
        if (value > maximum) {
            maximum = value;
        }
    }
    // 1 bit from ADC = 3mV
    return static_cast<float>(maximum) * 3.0f;
}

const float peakVoltage = getPeakVoltage(adc);
// Using Ohm's law
static constexpr float resistorValue = 220.0;
const float peakCurrent = peakVoltage / resistorValue; // Sensor current ratio is 1000:1
const float powerDrawRms = 230.0 * peakCurrent * 0.707f; // in Watts

This approach works flawlessly for simple loads such as a Wolfram light bulb, however, when I connect, for example, a phone charger, it yields garbage. And by garbage, I mean way too high current draw.

Now I, unfortunately, don't have an oscilloscope to see what the waveform looks like, nonetheless, why my approach fails with different loads attached to the sensor?


texts: What's the effect of this kind of layout?

texts: In this PCB layout, the designer connects the DC+ pins (high voltage around 300V after the bridge diode rectifier) with a large copper region but contains some folding parts on the way (the area which I highlighted). I've seen some professional designs with this kind of polygon connect. Could anyone point out what's the effect of this kind of layout compared to the direct polygon connect ?


texts: How does one read the parameter "Voltage supply" for opamps at Digikey?

texts:
At Digikey, one parameter is "Voltage - Supply, Single/Dual (±)". Picking a few random opamps, they show these values:

1.8 V ~ 5.25 V, ±0.9 V ~ 2.625 V
3 V ~ 18 V, ±1.5 V ~ 9 V
3 V ~ 30 V, ±1.5 V ~ 15 V

I'm unsure how I should read this values.

For the third example, does it mean that I can - for a single opamp - feed it anything between 3-30VDC (with respect to ground)?

For a dual opamp in the second example, I must feed anything between -1.5 - 9V (with respect to ground)?

What about quad opamps?

As you can see I am very confused here. Any suggestions accpreciated.

EDIT I'm comparing opamps. There's no way I can read the datasheets for 400+ devices. I'm trying to find one I can feed +12V to, so I have to narrow the list a bit, but I don't understand Digikey's number representation.


texts: Mixed blocking & non-blocking assignment

texts:
I would like to ask three questions about blocking & non-blocking assignment.

The first question is that How the blocking and non-blocking statement works when they are combined.

following the book "FPGA_Prototyping_By_Verilog_Examples" it says that

  When an always block is activated, the right-hand-side expressions of nonblocking assignments are evaluated at the beginning of the time step.

Based on the above statement about a non-blocking statement, I've expected that the below always block would require two clocks for assigning value of a&b to the q0, but the book says it can do it in one clock cycle.

always @(posedge clk)
begin
  abO  =  a & b ;
  qO  <=  abO;
end

At the first glance, I've thought that the value of ab0 (RHS of non-blocking assignment) will be stored in somewhere before the always block is executed and to be used in the q0 <= ab0;. Therefore, I assumed that the value of ab0 will be estimated at the first clock cycle and the estimated value of ab0 will be assigned to the q0 in the second rising edge of the clock.

So my question is, when the value of RHS of non-blocking statements are decided when they are used with the blocking statements. If it is determined regardless of the blocking statement please let me know.

The second questions is How the non-blocking and blocking statements affects the real hardware?

I've read many articles that say the nonblocking and blocking assignments do not have any effect on the synthesis, but only regards to the simulation. If it is just about the simulation, How the hardware really works to executed instructions inside always block? Does it sequentially execute the instructions one by one like the C code?

As far as I know the ground rule is

use the non-blocking assignment in the sequential circuit.
use the blocking assignment in the cobinational circuit.

However, it seems that using the non-blocking assignment in the combinational circuit and blocking assignment in the sequential circuit are all legitimate and allowed or even mixed!!!

So, my last question is What is the advantage of mixing two assignments or what kind of cases are there to use non-blocking assignment in the combinational circuit and blocking assignment in sequential circuit?


texts: How to realize constant acceleration control for BLDC motor?

texts:
I would like to realize a constant acceleration control of BLDC motor so that its speed can rise from zero to target speed in a predefined time period. I understand that the motor should be able to generate enough torque so that J*dw/dt can be satisfied. Let's assume this condition is fulfilled. To implement this control with a MCU, what I can think of is to use a timer to generate fixed time interval deltaT interrupt, say 10ms, and every time the timer interrupts, the next speed target is calculated using
next_speedref = current_speedref + acceleration * deltaT.

My questions are

I can give new speed reference value, but how can I make sure
the actual speed can settle to the target value within deltaT?
If I have to use a speed closed-loop control, when acceleration*deltaT is small, which means the speed error going into the PI controller  will be small, do I need to set Kp and/or Ki to be big enough to make sure the speed can be reach the target within deltaT?
For industrial motion control, normally how would they realize
constant acceleration?


texts: Air-core transformer measurement using LCR meter

texts:
Is it possible to measure the magnetizing and leakage inductances of an air-core transformer (coupled coils with no ferrite core) normally using LCR meter? I want to get the values of magnetizing inductance and leakage inductances of the air-core coupled coil that I would be making for different values of coil distance. So basically, I want to plot magnetizing inductance vs coil distance and leakage inductance vs coil distance.

I have measured inductances way back then but the coil (transformer) I measured back then has a ferrite core. I shorted the secondary and connected the LCR probe to primary to measure the Lleakage while I left the secondary open to measure Lmagnetizing. Will this work too on an coupled coil with air core?

I am expecting an increasing leakage inductance as coil distance increases, while magnetizing inductance decreases with coil distance increase.


texts:
Please refer to my project architecture in the image below:

Power supply is isolated flyback smps type. GND is not connected to Earth or Neutral of 220 VAC. All parts of circuit are powered up with the same power supply unit.

Some GPIO lines will go from one PCB to another PCB with a wired connector. GPIO wires will be running along with 220 VAC wires. GPIO wire length will be max 25 cm.

I want to have some protection against EFT, ESD, induced voltage spikes etc on the GPIO lines. On some research, I came to know that TVS diodes are best for the purpose. However I am having some difficulty selecting the best TVS diode for protecting my 3.3 V lines.

First parameter is whether to go for unidirectional or bidirectional. Since these GPIOs work between 0 to 3.3 VDC, unidirectional appears to make more sense. Am I correct in thinking so?

Second parameter is: Voltage - Reverse Standoff (Typ). Should I go with 3.3 V rated TVS or is it safe to increase this parameter to 5 V or 12 V?

Third parameter is: Voltage - Breakdown (Min). I think this parameter is tied up with second parameter. What value is recommended for this parameter?

Fourth parameter is: Voltage - Clamping (Max) @ Ipp. Even if I select 3.3 V on first parameter, this parameter is around 10 V which means my GPIO will be exposed to 10 V during a esd event. Is this OK for the MCU? What values should be selected for this parameter?

Fifth parameter: Peak power pulse. There are options between 30 watts to 300 watts in 0402 package (I have PCB space constraints so I am planning to go for 0402 package). What value for this parameter is good enough for my application?


texts: Leading Power Factor effects on electrical System

texts:
If power factor comes in leading & showing -0.95, is there any effect on electrical system? If yes, then please tell me what would be the effects and how long we keep power factor in leading??

Keeping power factor in leading shows more KW & less KVA? Is it correct or not.


texts:
I'm designing a circuit with a simple op-amp summer as part of it.
I've noticed a weird behavior of the output voltage, if I increase the resistor value at the output, the output voltage drops. This is undesirable behavior to me. I'm curious why it happens, and what design choices I can make to remedy the situation. The resistor change is something like changing R19 to 1M instead of 1k.
The output is on the circuit's output, so I'd like to protect against a user plugging into a large load or something.


texts: What is this connector (and the eventual pliers used for it) that serves for Wago 256 terminals.


texts: How does a hair dryer change its motor speed? Diagram included

texts:
I'm working on a side project where I need to figure out how a hair dryer works...so I took apart a hair dryer and made a circuit diagram (below). I am much more mechanically inclined than electrically, but would love to have a basic understanding of what is happening in this circuit.

Things I know...

The motor is AC (120V, 60Hz)
Switch #1, the 'ON / OFF' switch has three positions; OFF, LOW, and HIGH
Switch #2, the 'Heating Element' switch has three positions; COOL, WARM, and HOT
Switch #3, the 'Cool Shot' switch, some how short circuits / turns off the heating elements
When Switch #1 is in its third position, the 'input' is connected to both 'outputs'
When Switch #2 is in its third position, the 'input' is connected to both 'outputs'
Switch #3 is normally closed

Things I would like to know...

How does the motor change speeds? Are the diodes responsible? Are the heating elements responsible? What are they doing to cause this change?
Do the heating elements change the voltage seen at the motor?


texts: PAPR (Peak to average power ratio) of OFDM signals

texts: Will the PAPR of an OFDM signal using QPSK modulation on its subcarriers be different than the PAPR of an OFDM signal using QAM256 on its subcarriers? assuming the same number of subcarriers


texts: How is it possible to make Eagle parts containing multiple components?

texts:
Is there any way to achieve the following (or something equally helpful) in Eagle?

I would like to create a library Part that itself consists of multiple components pre-connected and pre-routed (by me).

For example (simplified):

I would create a library part called "PartX" made up of an LED and two resistors connected in series.
Thus, in a schematic, when I place this PartX, I get both LED and two resistors together along with the pre-drawn nets in between.
And likewise, in a board layout, I get the LED and two resistors placed according to the pre-set positions, along with the traces pre-routed between them.

This would really help speed up things for certain boards I am currently designing.


texts: I'm working on a project in magic VLSI design tool and Ive been able to create a working D flip flop and simulated it correctly in the IRSIM. The end goal was to create a counter with D flip flops. Once I put the D flip flops into feedback they seem to break the simulator and refuses to act as they should in a normal Qnot to D feedback path. Is there something in IRSIM that I'm missing? I included my feed back testing with Qnot into D and forced a logic 1 into D and removed it and it oscillates, but doesnt change Qcurrent ever.


texts: What happens when a BJT doesn't draw enough \$I_c\$ to be properly biased?

texts:
I have a basic circuit, that looks like it's an except from the Electronics 101 textbook if you smudged out some of the numbers on the diagram out:

simulate this circuit – Schematic created using CircuitLab

\$V_B\$ is a pulse generator; I am trying to measure the voltage \$V_o\$ to detect said pulses on \$V_B\$ with a micro-controller.  \$V_B\$, \$R_B\$, and \$Q_1\$ are all part of a black box that I have no way to determine their values.

I have a large number of these circuits installed in hard to reach places, and I'm having a problem where sometimes they miss pulses, at different rates for each of the installations (some of them work all the time, some work some of the time, some always miss pulses).

My broad-strokes understanding of the practical behaviors of BJTs--the ones I care about at least--is that they can be:

Biased: If both \$I_B\$ and \$I_C\$ are high enough, the \$CE\$ junction acts like a forward-biased diode
Unbiased: If either \$I_B\$ or \$I_C\$ are too low, the \$CE\$ junction acts like a reverse-biased diode
Transitioning: If \$I_B\$ or \$I_C\$ are in the gray zone between 0 and the biasing threshold, the \$CE\$ junction has a voltage drop somewhere in between the to extremes of "biased" and "unbiased"

Given this understanding of BJTs, my gut theory is telling me that \$R_C\$ is on the edge of being too high--thus limiting \$I_C\$--and the random variability in the properties of the BJTs explains why some of my installations work and some don't.

Since I have no idea what the amplitude is for \$V_B\$ or what the magnitude is for \$R_B\$ are, I went googling around for a graphical diagram that would show me the relationship between \$I_C\$ and \$V_{CE}\$ for a given \$I_B\$.  Wikipedia yielded this:

This graph confuses me, because it seems to suggest that, for a given \$I_B\$, reducing \$I_C\$ will reduce \$V_{CE}\$ (which is the same as \$V_o\$ in my circuit).  Furthermore, while I can find several other versions of this graph online, I have yet to see on that labels the \$I_C\$ axis with units--is a typical order of magnitude for \$I_{C(max)}\$ in the \${\mu}A\$ range or \$mA\$ range or some other fractional amperage?  Finally, my gut was telling me that I might be able to put in a resistor in parallel with \$R_C\$ to increase current to the collector in order to better bias the \$CB\$ junction, but the graph seems to suggest the opposite--I should put a resistor in series to decrease the current if I want a \$V_o\$ which is more consistently closer to \$0\$ when \$V_B\$ is high.

CLARIFICATION

None of the components in this circuit are components I actually supplied myself.  I have two devices--one a custom-programmable controller with digital inputs designed to detect dry contact closures (PCB-1), the other a monitoring device that uses a solid-state component to out a pulse whenever an event occurs (PCB-2).  The components I am showing are what I have been able to determine are internal to these two printed circuit boards from previous experience with devices of this type and measuring the terminals I can get to.  The connections between these two devices is all 18-ish gauge wires and screw terminals

The pulse widths from PCB-2 have been reduced to very slow (150ms) but pulses are still missed.   On/Off detection thresholds for PCB-1 have also been adjusted to no avail.  The only thing that has been found effective in avoiding missing pulses is to replace PCB-2 with a device from a different manufacturer that is the same in all relevant respects, except it uses a dry contact output instead of a solid-state output.  That is why I suspect the BJT, but my theory of "maybe \$R_C\$ is too big?" doesn't seem to line up with how BJTs actually work.


texts:
i am currently working on a small robot (Raspberry Pi 4, Arduino Mega, a few smaller sensors, 2 motors (each about 0.3A) and two smaller servos. My problem now is that the Raspberry Pi crashes as soon as I turn one of the two servos. As my step down modul is based on a lm2596 which is limited to 3A output current and all the above mentioned components are connected to it, I am now considering replacing it with something better (for example the XL4015 or XL4005). Since I supply the whole project with a 2S Lipo, min Vin should be at least 6V. Thanks for your answers
P.S: Or does the Raspberry Pi only shut down because the supply voltage drops to 4V for a short time as soon as the servo starts to turn? In this case maybe a simple capacitor would be enough to solve my problems.


texts:
The idea struck my mind while I was looking at this typical application for the PCF8563.

This RTC requires typically 250nA (interface inactive, like in circuit in power-down), but a general-purpose diode like the 1N4148 already leaks 10% of that. The gate reverse current of a JFET is only a fraction of that; max 1nA for the MMBF4391.
The whole circuit is very low voltage and dito power. Are there reasons not to use a JFET as a blocking diode here?


texts: Integrated WiFi antenna in metal box (ESP8266 in coffee machine)

texts: I'm currently planning a project involving a ESP8266 inside a coffee machine. However, I do not know if the internal antenna is sufficient to communicate with the outside. Alternativly, I could use a U.HF connector and stick an antenna onto the outside of the metal box. Would that be a better solution? Or will both methods fail?


texts: TN-S system neutral point earth resistance

texts:
According to many sources on the internet, a secondary neutral earth resistor is added at the distribution stations (transformers) to reduce the earth fault current.

My question is when using a TN-S type of configuration (with separate protective earth [PE] line from the load to the source), on a circuit diagram, where should the neutral earth resistance be placed?

Should it come between the neutral and the PE line at the source? Or should there be no resistor installed between the neutral and the PE lines and this secondary neutral resistor is connected to the PE line at the source?


texts: Altium, fixed location of designators and comments in schematics

texts: In Altium, the location of the designator and the comment of the component on the schematics are moved to a default position every time I update the component from the library. Is there a way to fix a default location for each component or disable change of the location when updating the component?


texts: Why are lumped elements suggested for modeling RF circuits

texts:
I'm currently trying to convert S-parameters to time domain. In my search I came across this quote here

  If your s2p file is the s parameters of a passive circuit, you have to
  convert it to y or z parameters and then implement this two port y
  parameters by lumped elements at the center frequency of your design.
  so around the center frequency your lumped model is valid and you can
  use this lumped model in time domain.

  for increasing the frequency range of validity, you have to use an
  optmizer to match the s parameters of lumped network to your s2p file
  over the desired frequency range.

I realize that I've seen in several other places (especially in modelling with ADS) that they suggest using lumped elements as a basis for understanding. Why do they suggest lumped elements?


texts: What stage is used to shift out TDO in JTAG?

texts:
I am designing a JTAG Controller using verilog. Now my question is :
As per the state diagram of JTAG IEEE standard, in the below diagram
The Instruction /Data is loaded from a parallel register in Capture IR/DR state. The it can either go to shift IR/DR state or directly go to exit 1 IR/DR state if it need not shift. Finally, the FSM has to reach update IR/DR state after which a new instruction/data will be sampled. Till this point I understand, for which I have thought of a design as shown

As per my understanding, when the path selected in FSM is Capture IR-->Exit 1 IR-->Update IR, then the Load IR register will load data onto IR register when Capture_sel (from TAP Controller) is high.And IR will update to Update IR register when Update_sel is high. Other option being, after Capture IR state, next is Shift IR state, such that data loaded into IR register from Load IR is shifted serially into the Shift IR register every cycle of TCK. Finally both the paths reach update IR state, hence the IR value will be loaded into the Update IR from either IR register or Shift IR register depending upon which path taken from Capture IR state. Finally, data will be shifted out of Update IR state into TDO.
I want to know if my understanding is correct.
I also read that the TDO is driven Z (high impedance) when the state in not Shift IR/Shift DR which should mean that data is shifted out at Shift IR state and not wait for Update IR state to shift out.
Which of these interpretations is correct?
If data is shifted out at Shift state, what is the need of Update state? Also, when the path taken is Capture IR-->Exit 1 IR-->Update IR, then it bypasses Shift IR state. Does that mean IR is not shifted out? What is the intention of doing so?


texts: Single-supply DC amplifier circuit with "gain" of 0.66?

texts:
I have a DC voltage source \$V_{in}\$ which slowly varies in the range 2.5…4.8V.
I need to linearly scale it down by ⅔, to feed into a 3.3V ADC pin.
For a voltage divider, the source has too high output impedance (it's HIH4030, an analog sensor).

I thought that an LM358 from my box would come out handy. However, I'm not ready for dual power supply in this application, and I can't figure out the needed feedback network for the less-than-unity gain of ~0.66.

What's worse, the non-inverting configuration has gain of \$1 + \frac {R_f} {R_g} > 1\$; the inverting configuration OTOH must be biased — and this is where my ground starts to feel shaky.

Perhaps something like this would kinda work?..

I'm not even remotely sure that the biasing and feedback will actually work that way. The idea is to chain two inverters biased around 2.5V, one with gain \$ - \frac {R2} {R1} \approx - 0.66\$, and another with gain unity.

Would be thankful for any kind of canonical advice or circuit for this kind of purpose.


texts:
I have to prepare a subtractor FSM for my laboratories (using Mealy graph, and build it with JK flip-flops). I'm in the point where I can do it using D flip-flops. So here's how it looks:

a,b - inputs

Now, using Karnaugh minimalization, I would get

$$Y=\overline{a}b+\overline{a}y+by$$

and

$$S=a \oplus b \oplus Q1$$

where Q1 is the output from first D flip-flop.

So I would plug Y to the first D flip-flop, and S to the second D flip-flop, and Q0 would be the output from the second flip-flop, and I would plug it to the bulb. And it works. Now my question is, how to convert it to JK flip-flops?


texts: What is the significance of this symbol?

texts:
What the significance of this symbol?

It's part of 17IPS61-3 26" to 40" LED Slim Integrated Power Supply, and the whole datasheet can be found here.


texts: Can I use a 12V switching power supply to power a G4 LED bulb?

texts:
I'm trying to convert a broken halogen lamp to LED using a commonly available G4 bulb.

I have a lot of orphaned universal power supplies from various electronic accessories. Can I use a 100-240V => 12VDC (switching?) power supply to power an LED bulb?

[update]
The specs on the bulb says driver: constant current.  Is constant current incompatible with switching power supplies?


texts:
I'm trying to incorporate 2 16-bit ADCs into my DAS design, which will interface with an MCU which only has 1 available QSPI. The ADCs have a 16-bit parallel output, but the MCU only has a single 8-bit parallel interface, so I'm forced to use the serial interface capability of the ADCs. To realise the full throughput of the ADC (1Msps), a dual data line SPI needs to be used, as a standard single data line SPI only supports reduced throughput.

As such, I'm wondering whether I can share the QSPI clock between both ADCs, then connect 2 of the QSPI data lines to ADC1 and the other 2 data lines to ADC2, then perform the data rearranging once received by the MCU. Writing to the ADC registers could be achieved in much the same way.

Does this sound feasible at all? Obviously layout and length/capacitance matching between the shared clock and data lines would be quite important, but I wanted to understand whether this idea has any legitimacy whatsoever before continuing down this path any further.

The ADCs I'm looking to use are the AD7616 and the MCU is the ATSAME70Q21.


texts:
I have a PIR sensor that when triggered, gives out a 3.3V signal. I'm trying to use that to switch on a 5V water pump, and I'm assuming I will use a transistor. The sensor only puts out 10mA, while the pump draws around 1A. How would I switch on the pump with the sensor?

Thanks!


texts:
I'm currently bulding and Android device and I've got a question which can't get answered.

The AXP209 is an IPS and power manager. It allow the usage and charge of a standard lipo.

It has two inputs : ACIN and USB VBUS. In a case of a tablet, will the IPS use VBUS to charge the battery and make the whole thing work, or is ACIN needed ?

Datasheet


texts: Why do motor drives have multiple bus capacitors of small value capacitance instead of a single bus capacitor of large value?

texts:
All professional DC, BLDC or PMSM motor controllers that I have seen (Sevcon, etc.) have large numbers of DC bus capacitors connected in parallel. Their capacitances range around 100 µF - 220 µF. Wouldn't a single capacitor of a large value, like 4700 µF or 10000 µF, be more convenient?

Is it because of the large surge current whenever these controllers are connected to batteries or other high current power sources?


texts:
I am trying to identify an IC in order to repair a circuit board. Here is a photo of the IC in question:

For reference, the markings on it are:

UU0715
SC14470
BNF128VV
GP9746.1

And here are the clues I have found so far:

This circuit board is on the main board inside a RedOctane X-Plorer Controller (model 95065).

Two important things to note about this controller are that it is a wired controller, and I believe that it supports connecting to Xbox 360 accessories, including headsets with analog audio, so I believe that the controller must have DACs somewhere for the audio in & out. This might be the purpose of the Xbox chip (see below).
Judging from its size, and the fact that the only other ICs in the entire controller are a flash chip, accelerometer, and some tiny Xbox chip, my theory is that this SiTel chip functions as the main processor for the board. This is strange considering that SiTel seems to be a company focused mostly on phones/communication, and this is a wired controller.

The manufacturer logo is from a company called SiTel. Here is another SiTel chip (a DECT baseband processor) with the same logo and similar markings.

I believe that it is a different company from the former US-based "Sitel".
I believe that SiTel was acquired in 2011 by Dialog Semiconductor.

I have found a few Chinese websites that claim to sell this chip, but I have not found a single datasheet for any chip even close to this model. (Maybe it's too old?)

One example is Jotrin. Don't bother trying to click the datasheet link, it just forces you to create an account and once you log in, the datasheet link no longer works.
Another example is Kynix (selling a similar but not identical model).

In the end, I am truly stumped about the function of this chip, nevertheless lots of important info about it. (I could really use just a pinout!) Can anybody find out anything else about this chip?

EDIT: I managed to figure out what was wrong with the board (one diode had a loose connection and the other was missing, both due to poor soldering). But I'm still curious about what this chip is!


texts:
What happens if SCL of I2C is connected to GND? Does it ruin our controllers clock as well?

I am using PIC24 with three I2Cs. If one I2C's GND and SCL gets short circuited. I stop getting the data of my debug logs.


texts: How to reduce resistor power consumption?

texts:
I've started learning about transistors and was working on this circuit, and have fiddled around with the circuit simulator for a couple hours, but can't seem to find an efficient design for what I want.

Because of the 20k resistor heavily limiting the current in the bottom transistor, I added a second transistor to "amplify" the current.

Now, I'm trying to create a circuit where the LED will consume around 1-3 watts of power, while leaving the 20k ohm resistor as it is. Lastly, the resistors should consume less than 3 watt of power.

To try to achieve this, I tried adding resistors at different places and editing their values, but I wasn't successful.
Does anybody know how to make this possible? You can add or delete resistors and transistors as needed, however, the 20k resistor should remain where it is. Thanks for any help guys!

Here's the link to the online circuit simulator:
https://www.falstad.com/circuit/

EDIT: The voltage source can be anything from 10-20V. Whatever voltage works is fine!


texts: Calculate battery consumption in IoT Device, Parameters and Considerations Regarding Bluetooth

texts:
I've designed a basic IoT architecture to measure biosignals. I am not an expert in the field so I have doubts in basic battery consumption calculation and considerations.

The proposed system consists of:

Box: Contains bluetooth (15mA) and 5000mAH Li-on battery. 3.8V.
ECG Sensor with 12.5mW power dissipation.
Three accelerometers. 2mA consumption.
Oximeter with 4.8mW power dissipation

The calculation that I've done so far is (the 3 is because the amount of time, 3 hours):

Battery consumption in 3 hours = 0.015 * 3 (bluetooth) + 0.0048/3.8 * 3 (ECG) + 3 (accelerometers) * 3 hours * 0.002A each + 0.0048/3.8 * 3 (oximeter) = 0.077A = 77 mA battery consumption each 3 hours.

I am pretty sure that I am missing something and that some considerations are not included.

EDIT

I need to get continuous information from the sensors because is for monitoring user activity and I can't build a prototype.


texts: Why are some terminal blocks blue and grey in color

texts: Looking at some terminal blocks like the one below, why are the top level positions color coded blue while the middle ones are in grey? I understand yellow-green are for ground connections. I am guessing Blue is for DC, but can't figure out what grey is usually meant for.


texts: what are the en pins (1,2EN and 3,4EN) used for on an SN7544 H-Bridge

texts:
I built the circuit from this page and it works just fine but what I don't understand is what the EN pins are for. It says right on his diagram of the pins that you need to connect it to power to run the motors but I forgot to connect it and it works just fine. from what I understand reading the datasheet and that link my motor shouldn't be working at all.

Thanks


texts: How to - LiPo Battery supporting many devices?

texts:
I have a number of devices that I need to support off of this 11.1v 6400mah LiPo battery:

Venom 20C 3S 6400mAh 11.1V LiPo Battery with Universal Plug (EC3/Deans/Traxxas/Tamiya)

I'm wanting to support a 5v integrated circuit (raspberry pi) and a 12v Kinect via a usb/AC adapter.

My current idea is to use a 5v step down straight to the lipo for the IC and run the Kinect AC adapter to the lipo through an ac/dc inverter. Will that work?

** EDIT **

I'm concerned about adding an AC inverter to the equation. I'd like to get everything compact but this throws me off a bit. I'm leaning toward an inverter like you'd get for a car cigarette lighter.


texts: What units is my multimeter using to measure batteries?

texts:
I have an old, cheap multimeter (Dick Smith Electronics, Q-1420) with a battery testing mode (presumably testing the battery under load).

When I put it into 1.5V battery testing mode, and connect it to a charged batteries, I get values appearing on the display around 33-37 (tried with some AA and C batteries, including a rechargeable AA that my recharger is rejecting as bad.)

I have no idea what those units are, and what is considered good.

The manual is long gone and Google hasn't helped.

So my question is two-fold:

From a practical point of view, what numbers should I be expecting for moderately and fully charged batteries?
From a theory perspective, what are the units being displayed?


texts: Comparing MAX3232 vs MAX232 for line length

texts: Which parameter in the datasheets of the line drivers MAX3232 and MAX232 can tell about the maximum length of the line for their correct operation if all else is same for the two circuits, that is baud rate = 115200, Vdd = 5 V, same UTP cable used.


texts: I have seen wide varieties at previous companies, from too few to too many with boilerplate, old revisions of standards, etc.  Can you suggest a middle of the road list?  This is for regular PCB fabrication for production.


texts:
I am designing PCB for a heating control system. I have planned to use PCB mountable SSR for the control the heater element. The SSR can handle maximum of 2A current and heating element not exceed that current.

Anyway, I decided to add a fuse between SSR and heater element. This fuse insert to a PCB mountable fuse holder.

Is their any special fuse for heating element? Can I use normal 2A glass fuse for my application?


texts: Best power supply for a BLDC motor; linear or SMPS?

texts:
I am coming into a design that uses a custom designed, 24V brush-less DC motor controller.  I am wondering, is it better to power this type of system with a linear power supply, a switch mode power supply (SMPS), or does it not matter?

For the SMPS, I am concerned that the high frequency pulsing nature of the current drain of the motor controller may interfere with its operation.

Thank you.


texts: Protective relay with Raspberry PI (doubts)

texts:
I have a project in mind: A protective relay based on raspberry pi.

I need to read 6 voltage signals in levels (3 from ABC voltages and 3 from ABC currents measured from a 60Hz electrical system that pass through 6 transductors to obtain 6 voltages in signal levels), with at least  960 samples per second. And I need 4 digital outputs as response with at least 240 states per second. The sample rate must be constant in order to compute a DFT filter.

What is the best approach for this project?

Can I acquire the data through Arduino? Receive the 6 analog inputs pass to adc and then pass to Raspeberry Pi using USB port and receive the 4 digital states from Raspeberry PI through USB and put them in digital outputs. The processing of 6 signals would be made by the Raspberry PI that determines the status of the digital outputs. this idea is based on this project.

This process warranted a correct DFT computing?

I saw another, but more expensive, data acquisition card that works with Raspberry PI and a brief tutorial.

Thanks for your comments.


texts: Benefits of square vs. triangular/hexagonal packing of cylindrical battery cells

texts:
A triangular or hexagonal packing (depending on your preference of terminology) of circles has a packing density of \$ \pi\sqrt3/6\$ \$ \approx\$ 91% (see here at Wolfram Mathworld, for example), whereas square packing gives a density of only \$ \pi /4 \approx\$ 79%.

With that is mind, what is the motivation for using square packing that is seen in some arrangements of cylindrical battery cells?


texts: I'm looking for solution how to mount Zigbit ATZB to prototype board without making individual PCB with pin outputs. Do you know any socket adapter with pins spacing like this? Or any other solution for this?


texts: UPS and Inverter power supply sync question

texts:
I'm new to this but want to ask this question

If i'm having a 3 phase inverter with a battery backup system. does it requires it to sync with the utility power? if yes how long that sync can take or it doesn't requires any sync as its converting dc to ac

kindly explain to me thanks

Frequency Stability ±0.1% (within 90 seconds/day if the sine wave is used for timing)
At this link what this term means


texts: Recommended design PWM-enabled driver for multiple 1W LEDs in series-and-parallel configuration?

texts:
A note on my background: I do have a degree in electrical engineering, but honestly I don't consider myself skilled enough to come up with designs from scratch, hence my post.

Design Issue

I wish to design a light panel consisting of 3 sub-panels (interleaved) with red, green and blue LEDs respectively. Each sub-panel shall consist of 12 pcs of 1W high-intensity LEDs. I plan to build a separate LED driver circuit for each sub-panel. Hence, I need to find a suitable design for a driver circuit to replicate and deploy in three copies.

Requirements / Features

1W LEDs (Typical specs: Vfwd = 3.0 to 3.4 V, I = 350mA)
12 VDC power supply - so the LEDs must be in a series-and-parallel configuration. I guess multiple 'strings' (N=4) with 3 leds in each should be fine.
Each string should be driven by a constant current circuit.  If possible, I would prefer to adjust the current in all strings from a single point (e.g. by adjusting/replacing a single resistor)
I wish to be able to dim the (sub-)panel from a microcontroller using PWM.
If possible, would like to keep the component count reasonably low.

Question

What's a good design for a driver circuit fulfilling the features above? I have tried to find an answer in this forum, and elsewhere, but without luck.

For the best that I know, the following circuit should be a good starting point:

The circuit above features constant current supply and enable PWM-control, BUT, I can't see how to extend to multiple strings of LEDs. I have been thinking of incorporating some kind of current mirror, like below, but I can't figure how.

My questions are:

Can I extend the circuit, as per the first figure, to support multiple strings of LEDs? How?
Are there any better/more appropriate designs that I should/could use instead?


texts: 100 Ohm diferential impedance microstrip PCB traces geometries in two layer board

texts:
INTRODUCTION: I'm aiming to design an Ethernet connected system as a hobby ( ie. plenty of time but not wishing to spend much ). My design constraints would be sticking to a 2 layer 100 mm x 100 mm PCB with 0.3 mm min holes and 0.15 mm min track/clearance/annular ring and 1.53 mm thick dielectric with 4.29 relative dielectric constant. I'm avoiding a 4-layer PCB stackup.

MY APPROACH: A microcontroller with built-in MAC with a KSZ8091RNA PHY and a RB1-125BAG1A RJ45 jack with built-in magnetics, designed using Altium Designer.

FIRST PROPOSED INCOMPLETE LAYOUT:

FIRST CALCULATIONS:

MY QUESTIONS: Should I care about matching the 100 Ohms differential impedance between the transmission lines connecting the PHY with the RJ45 jack and magnetics given the length of this traces? Would it be better to cross the traces maintaining the 0.956 mm width or to reduce traces width first and do the crossing afterwards? What would the optimal clearance in between the two pairs be? Would you suggest any other extra layout considerations? (apart from a 4-layer stackup).

EDIT 1: This is my schematic:

EDIT 2: I'm trying to find a differential coplanar waveguide with ground calculator to see what would the traces look like in that configuration.

EDIT 3: I'm trying to achieve 100 Mbps connections. The transmitter can be configured for 10 or 100 Mbps in both half and full duplex, and Trise and Tfall seem to be fixed to 3 - 5 ns for 100 Mbps mode and 25ns for 10Mbps. It seems I could largely do without any impedance matching considerations, given what the trace lengths are. Yet I got a ZDiff CPW with ground capable calculator:

Differential surface coplanar waveguide with ground calculations:

*0.29 mm width traces to obtain 100 Ohms ZDiff while using 0.15 mm spacing.

Differential surface microstrip with ground calculations: ( This calculator gave a different result, don't know why )

*0.46 mm width traces to obtain 100 Ohms ZDiff while using 0.15 mm spacing.

I'll update the post once the traces have been lay out using the CPW configuration. Can someone please check if the calculations are OK? I wish I knew how to solve this problems with pen and paper !

EDIT 4:

SECOND PROPOSED INCOMPLETE LAYOUT:

Signal traces are 0.29 mm wide and 23 mm +/- 0.5mm long. ZDiff seems to be 100 Ohms. Does this design look like 100 Mbps capable? Would you suggest any modifications?


texts: Regarding PLC and several input/ output modules

texts:
I have to use more than 40 servo motors and 20+ load cells using PLC. But the problem is that I have to use many I/o modules ( that is costly and hectic). Can I reduce the no of I/o modules by any means or can you suggest something like decentralized control system? Please help me.

In, this picture you can find a tube that I am making. This tube would give me the exact amount of material that I want. It includes 2 servo, 2 stoppers and 1 load cell for measuring the weight. For eg, I want 10 gm sugar. I program the plc in such a way that Stopper 1 that is attached to Servo 1 rotate 90 degrees to uncover the hole, then the sugar falls on the load cell which tells me the weight. When it measures 10 gm on the load cell. Servo 1 comes to its original position with stopper 1 thus stopping the flow of the sugar. Then stopper 2 opens with the help of servo 2 and sugar falls out of the tube.
The problem is that servo is using 2 outputs of PLC. Imagine I have to use 40 such tubes. To accomplish this I have to use many i/0 modules both for load cell and servos. This would increase complexity, cost and reduce the overall capacity of plc to do other tasks very greatly. Also, I want individual load cells and individual servos connected to each tube. Can you suggest me how to reduce the no of i/o modules or you can also suggest a simpler method to measure the weight of a material that is less complex and solves my problem.


texts: I need to add a UPS to my power supply circuit

texts:
I am working on an ongoing project and now have the need to add a UPS or battery backup that will allow our controller to begin a shutdown safely when the power is removed. Yes I know there are plenty of ready made products for this purpose however what we have designed is used in a vehicle and I have very limited space available inside the unit.
My Main power supply is designed around the AP1501A. It is fed from the 12v source of the vehicle and outputs a 5.1v 5a supply for the CPU and some pheripherials. some installations may have voltages up to 19v*
The issue is that during testing some of the end users have a tendency to remove the main power supply before the unit can shutdown [this is usually done by means of a battery cutoff switch on a race vehicle] In some instances this causes a corruption if done repetitively.
The circuits are designed so we can monitor 12v main power and "IGN" power [this is the key in the on position in a vehicle] when the key is removed we have a delay set in before shutdown so that the user does not have to deal with a boot sequence if they are in and out of the vehicle.
I am looking to add a safe and reliable [and small] battery supply or capacitive backup that can support 30s to one minute of load at 500mA in the event of primary power failure before shutdown. This is not a common issue but one we want to avoid for longevity. We also do not want the batteries to be charged while the vehicle is off as this would present a constant battery drain on the vehicle.
I
Here is a snip of the Primary circuit.


texts: Using the output voltage coming from the buck boost converter as an input supply for buck converter?

texts: Can you tell me if this gonna work with no problem?? here's an example of what I'm talking about the LTC3119 is a buck boost converter and the other one is a buck converter. The buck-boost converter output voltage is around 12V and the buck converter output voltage is 5V


texts: Why are 2.1A USB chargers 10W not 10.5W?

texts: This has baffled me ever since the iPad was released a few years back.  Why do power supplies designed for tablets output 2.1A but are marketed as 10W?  If anything, 10.5W rounds up to 11...  Or why don't they just use 2.0A supplies?


texts: Why does a source transformation not work in this case?

texts:
Circuits 2 and 3 give 3.8 mA as the current through  R1 [2k Ohm resistor]. However, why is it not possible to transform circuit 3 to circuit 1?
what I did:
I tried simulating circuits 2 and 3 below to find the current through R1 resistor. Both circuits 2 and 3 give the same answer, 3.8 mA. However, if I transform the source from the last circuit to the first circuit the answer is different. Why is that?
Thanks in advance


texts: Some questions about the RECOM RAC02-05SC AC/DC power supply converter

texts:
I'm designing a PCB and I want to use this AC/DC power supply converter. I have found this commercial PCB where they use it and I have these questions:

I have seen that the PCB has some slots  (see image) but I do not know if they are necessary due to the AC/DC converter or the relay (to isolate the signal switched by the relay from the rest of the PCB signals). In case they are necessary for the regulator, is it possible to do it with Proteus ARES?
In the datasheet (page 2 of the PDF, labelled "PA-3"), an external MOV varistor is required for 230VAC operation but, with what AC voltage rating? Would it be correct to use a TVS diode?
I have also seen that a TVS diode is added to the PCB at the 5 V output, is it really necessary?

EDIT: I added the schematics and the layout

Thanks in advance.


texts: Receive several fm-radio stations at the same time (~10-20 MHz wide summary at 90MHz radiofrequency)

texts:
What is a cheap way to receive and record on PC several (tens) of fm-radios (public, e.g. news, music, etc)? Such radios uses frequencies like 90.4 MHz or 102.7 MHz, sends a stereo (sometimes with digital text subchannel).

If I want to record tens of radios, I need to cover a spectrum of tens of MHz.

The first way is to buy two or three dozen usual radiorecievers and try to connect them all to PC (e.g. with half-dozen of multichannel external usb soundcards). I think, that this is not very cheap.

The second way is to build a single radio, which will downsample entire band 88-105 MHz into 3-20 MHz, then feed it into high-speed ADC, and do a software detection of each station.

Is the second way possible? cheap? How mush will it cost?

What hardware can be used, if I have no skills of making PCBs and using ADCs & FPGAs?


texts: What makes a input GPIO pin so sensitive?

texts:
I know that an input pin has a high impedance, but how a high impedance makes such pin be so sensitive?

According to https://forum.arduino.cc/index.php?topic=454553.0  -- #4 mentioned

  If the input impedance is too high, say 100MΩ, then you'd need only
  50nA to get 5V. This would make the input far too sensitive

Yes I know the calculation and this indeed follows the ohms law. However, my question is that in order to make the pin read a HIGH signal, what can the pin control is that "how much current should it draw" but not "how much voltage can the environment apply". From my understanding, as long as the environmental factor cannot provide 5V, the 100MΩ can never take 5V. (Logical reading should depends on the input voltage applied but not how much current drawn!)

Base on my assumption above, my questions are:

How can a high impedance input GPIO be so sensitive if the the environmental factor(volt) cannot be controlled by the GPIO pin? (just like you won't get a 5V circuit from a single 3.7V 18650 battery)
is it a truth that environmental factor can make a 5V voltage difference into the high impedance GPIO input pin? From my understanding, as long as the environmental factor cannot provide a 5V voltage difference (say 1V only), that GPIO shouldn't read a HIGH signal.


texts:
I have a Samsung Note 9 with a weird technical issue that has to do with usb standards. If I plug in the phone to a PC using a USB-C to USB-C cable, the phone will charge and transfer data to the PC. If I use a USB-C to USB-A with the PC, the phone will give me slow charging warnings (much slower than the 500mah) and the PC will not see the phone.
If I use the Samsung charger block with a USB-A that comes with the phone, I will get very slow charging again. I guess there is a handshake issue with the usb a standard.
So basically I can ONLY use USB-C to USB-C cables to charge and transfer data. I'm wondering what could possibly cause this since I have tried saftware reset and changing cables and the phone charger port. The only thing it could be is the motherboard but why would the USB-C to USB-C cable work!?
Did some digging and I have a lead that it could be the OTG circuits on the mobo. I got PCB diagrams and repair guids.
https://www.alisaler.com/samsung-schematics-diagram-download/
This website has a all the documentation on many Samsung phones


texts: Seeing how Instructions get Translated (Computer Architecture)

texts:
Little bit of a confusing question, also an x-post (Since it may be more suited here than SO). But anyways Im really looking for learning some low level programming. Thing is, Dev boards like Arduino/Etc. really hide alot of whats going on.

I have spent some time learning about Computer Architecture, Logic/Gates/Sequential Logic/etc.. (I went even as far as to learn the Physics of Semiconductors and Electronics related to it all, just to know what exactly is going on, as well as how Gates are made using CMOS Transistors and such).

But thats about where it ends....and I want to be able to understand how an Instruction (Like Hex/or Assembly/etc.. code) is moving through a Simple as Possible computer (alot of books i've used went straight from like Gates to a Computer....without really the in between). Even something simple like.....storing a value in a register or memory location (and maybe printing to a pixel? or something).

I think something that would be interesting would be perhaps even writing an emulator eventually. I have experience with High Level languages, but i've heard something like a 6502 might be a good start since you use alot of Assembly, and the instruction set isn't too large.

Does anyone know of any resources/thoughts/books that might help? I've gone through "Elements of Computing Systems", and while......it is a good book I don't really feel like it goes through whats really going on and seeing it happen. I think ideally i'd like to be able to build a Simple as Possible computer....maybe step by step and be able to see why sending XXXX code will store this in X register or Y memory location, etc...


texts:
I'm trying to use an H-bridge, which is connected to a wall power supply, to power a DC motor. The motor was originally powered by a 12V battery pack in a toy.

Now my motor is consuming too much current (2.5 A instead of 1A) (the theoretical maximum current of the power supply is 2A)

the motor even started smoking :(

Why is the motor consuming too much current? It should only take what it needs from the power supply right ?

thanks for your help, there was an overvoltage :(, I destroyed my motor.... The motor worked with 5v and I fed them with 12v


texts:
I have a SPDT switch that switches between a signal voltage of -5 to +5v and ground.

The signal is a mix of slow(ish) moving waves (sine, triangle, envelopes) and audio (both -5 to +5v)

When switching from the signal voltage to ground I don't want an abrupt change as this will cause an unsavoury pop for audio.

Can someone give me a pointer to solve this?

James


texts: Design Tips on making a battery powered inverter with 5A output

texts:
I'd like to make an inverter that can take an input DC voltage of 13~16V and give an output of 120VAC at 60Hz that is capable of providing up to 5A (perhaps more). For the battery, I would be using two 7.4V NiMH battery packs in series that are 4000mAh each.

I have done some research and found a couple of schematics to start with:
From here: http://www.i4at.org/lib2/inverter.htm

And this one from here: http://www.free-circuit.com/2010/06/03/dc-to-ac-inverter-circuit-with-ic555-and-tip42a/

Here are the questions I have:
1. Which one is the preferred design between the two above?
2. How can I modify the preferred design to fit my requirement?
3. Any comments/recommendations on the inductor and transformers in the schematics?

Thanks!


texts: Obtaining three different DC voltages from a three-phase AC supply

texts:
I have three identical sinusoidal voltages, R, S and T, whose phases are spaced by 120o difference. I want to obtain three different DC (unfiltered) voltages from these tree AC signals for some reason. What is the proper way of doing this?

I considered using one of the two rectifier formations below, but I'm not sure if they are correct or not.

Circuit #1:

Circuit #2:


texts: What is the minimum frequency of AC source to show IV curve on oscilloscope?

texts: I want to show i-v curve of a resistor on oscilloscope. I know the voltage source should be AC, but what is the minimum frequency the voltage source should have to work properly? What will happen if the frequency is lower than that value?


texts: hexadecimal seven segment display verilog


texts: Direct signal injection from function generator for EEG BCI calibration

texts:
I have seen several topics related to calibration of BCI and most of them use a "head phantom". But I want to know, is it possible to test the openBCI hardware directly using function generator? And I am curious about the connection, like where I should connect the VCC and GND of function generator to OpenBCI (like Cython)

If I want to build a signal generator for EEG calibration, what should I consider? such as impedance, etc

Thank you


texts:
I'm trying to solve the following circuit, obtaining all the currents and voltages.

I'm using mesh analysis method, but I'm ending with wrong results.
So I assumed by default a clock-wise loop for \$I_b\$ and the same for \$I_c\$.
The \$\beta=100\$
I setted the equations to obtain base current \$I_b\$:
$$5-50000(I_b-I_c)-0.7 = 0$$
and deriving from the \$beta\$ the collector current \$I_c=100 I_b\$ I obtained with substitutions:
$$4.3 - 50000I_b + 50000(100I_b) = 0
$$
that gives me:
$$I_b=0.87\mu A$$
this result is too small and different from the results obtained from the simulation with the software every circuit.
This problem should be very easy to solve. How can I set the equations correctly to solve this kind of problem?
Thank You.


texts: Understanding a circuit containing PMOS and NMOS

texts:
I have the following circuit, the top is a PMOSFET, bottom is NMOSFET

I'm having troubles understanding what exactly is happening here. I've dealt with PMOSFETs and NMOSFETs separately, and here combined, it seems as though I have no idea as to how to approach this.

Let's say I ground \$V_{\text{in}}\$ (=0), then is the difference in voltage from \$V_{\text{in}}\$ to the top of the PMOS 2.5V? and vice versa with the NMOS? How does that affect \$V_{\text{out}}\$ and the rest of the currents running through the circuit?

I'm not looking for answers, but rather, a way to understand what goes on here.


texts: How can I compute the power flow for a network with transformers (as in the WECC 9 network)?

texts:
I'm trying to solve the power flow for the WECC-9 bus reported below:

all generators (1,2 and 3) are behind a transformer, which has a Voltage converter ratio (e.g. 18/230) and a reactance(?), which I guess derives from the "Voltage-behind-Reactance" model.

How should I deal with the transformers for Power Flow computation, by means of Newton Rapson and the likes? should I divide the reactance by the transformer ratio or something else?

I found this other question but it is not clear to me, and the reference within seems to have been changed

Newton Raphson Load Flow of a Power System with Transformers


texts: Trouble with voltage BJT circuit in active mode

texts:
For this circuit i need to find the Vi voltage to get Q2 in active mode.

The result i got is not close to the values in the simulator, probably   theres something wrong with the circuit analisys.

Where´s the mistake ?.

Easy to see that:

Vce4 = 0.7v
   from 20 - 1kI - Vce4 = 0    and   vce4 - Vcb4 - 0.7 = 0  if  Vcb4 = 0

Then:

20 - 0.7 = 1kI  having 19.3v in R4 with 0.0193 A.

Also:

      The Vce3 = 19.3  from 20 - Vce3 - 0.7 = 0.

Thats the easy part, now i know the Q3/Q4 is a current mirror. So, the I current I i just calculated is aprox to Ic3.

If i suppose Q1 OFF:

     Ie2 = 0.0193A; that means Ib2 + Ic2 = 0.0193A.

If Q2 is in active mode:

     Ie2 = Ib2(B + 1) , Ib2 = Ie2/(B+1)  if  B=100

then  Ib2 = Ie2/101  and  Ic2 = Ie2/(1+ 1/B):

     Ic2 = 0.0191 A.

That sounds good but when Q2 is saturated. Vce2 = 0.2v and Vcb2 = -0.5v:

       20 + 10 - 19.3 - 1kIc2 - 0.2 = 0

       Ic2 = 0.0105 A.

Q2 is in saturation mode.

From Ie2 = Ib2 + Ic2, Ib2 = Ie2 - Ic2 = 0.0088 A.

Now:

If i suppose Q1 is in active mode having in mind that -0.7v + Vce1 = 0
     Vce1 = 0.7v

With

       Vi - 100kIb1 - 0.7 - 19.3 + 20 = 0
       Vi = 100kIb1. This sounds weird.

Is Q2 is in active mode then: Ic2 = Ib2; 10.7 = Vce2 + 1kIc2; Ie2 = Ic2(1+1/B)

From Ic2(sat) = 0.0105 A  that would mean: Ib2 = 0.000105A

Using:

  Ie2 + Ie1 = 0.0193A --> Ie2 = 0.0193 - Ie1  and Ie2 = Ic2 + Ib2
  Ie2 = 0.010605 then  Ie2 < 0.010605  for 0.010605 < 0.0193 - Ie1
  Ie1 > 0.008695 A.

Ib1 = Ie1/(B+1) and Ib1 (B+1) > 0.008695

  Ib1 = 8.6x10^-5 A

Then:

      Vi/100k  = Ib1
      Vi > 8.6 V  for Q2 in active mode.

I simulated the circuit and for Vi = 8v the Vce2 = 0.4V.
Also the current Ice3 is always 24.2mA, and The Vce3 is not 19.3V, its aprox to 18.4V for low Vi voltages. But that would mean the Vbe2 is not 0.7V.

Thanks for your help and time.


texts:
Usually when I design a PCB, I name the LEDs as LED1, LED2, ... , but now I'm working on a set of boards where I do not have much space for the component names on the silkscreen.

The boards are divided in four functional blocks.

In order to be able to better identify which parts belongs to which functional block, I'm naming R101, R102, ..., for functional block 1, R201, R202, ..., for functional block 2, and so on.

The problem is that it generates very large names for LEDs, LED101, LED102, ...

So in order to solve this problem I replaced LED101 with D101.

It was ok, since at the time, I didn't had diodes on the board, but now I need to use diodes and I want to easily distinguish which components are LEDs and which are diodes, but I don't have space to have LED101 on the silkscreen.

Is there any convention for one letter prefix to use for LEDs that is different for diodes?


texts: Ceramic or electrolytic capacitors for a switching buck regulator?

texts:
I'm using the LM2734Z (step-down DC/DC converter), which operates at 3 MHz. I'm using it to step down 4.8 V - 20 V down to 3.3 V +/-5%. Is it better to use ceramic capacitors or electrolytic capacitors in this circuit?

They seem to show ceramic capacitors in the datasheet, but would electrolytic capacitors be smaller and better at filtering ripple and handling load transients? Size is critical for this product, and cost is a minor issue. I would like the operational temperature range to be -40 °C to +85 °C, if not that then -20 °C to +70 °C.


texts: touch screen foil behind 5mm thick glass

texts:
I wish to make a small project that will enable me to control my tablet\ipad behind my shower glass door.
I want to be able to put the tablet behind the glass and control it from the other side of the glass door.

I though about connecting a capacitive touch foil to the tablet and placing it between the glass and the tablet so the capacitivity should work.
I also though about connecting a lcd screen with an overlay touch foil and using otg or mhl for connecting it to the tablet.

What do you think would be a good way of implementing it and how ?

Thanks a lot
C


texts:
I want to measure -30Vdc up to 0Vdc using a microcontroller. I'm basically measuring a voltage source with an output current of upto 2A.
I need to bring the voltage up onto a scale of 0V to 5V so that I can use the ADC of my microcontroller. I found two types of solutions to do this.

One with a simple resistive adder as shown below:

simulate this circuit – Schematic created using CircuitLab

and another with a non inverting summing amplifier:

simulate this circuit

What I need help with is that I don't understand the specifications for this offset voltage source? Can I use a resistive divider circuit on my 5V power rail to provide this voltage? How do I calculate the current to be provided from this offset voltage source so as to create the divider?

Please help.


texts:
I have an application where we are supplied 24VDC but need to drop that down to 5V for some of our control circuitry. For DFM reasons, we are limited to buck converters that can only safely supply 3A; we may need more than that at certain points in time. Each board has a Molex connector going back to our main controller. The Molex connector will deliver 24VDC, 5VDC, GND (2), and I2C(2). The controller board itself may take up to 3A at any moment in time, but we still need to deliver 5V to each of the slave boards.
We are in the design phase and so we don't have any schematics yet. Right now, we're thinking we'll use the TPS54331DR on each individual board (master and slaves).
Is it safe enough to diode-OR these with a Schottky and put a regulator on each board with 5V "shared" between all of them? Is there a better way to parallel these buck converters given that we're locked into a handful of sub-par converters for this project?
Is this even necessary to try to share the 5V amongst boards? Would we be better off omitting the 5V line from our Molex connector?
Any advice is appreciated. I will answer questions as quickly as I can. Thanks!


texts: Why is there 130V between my laptop charger ground, and Raspberry Pi 5V Supply Ground?

texts:
I noticed that I was getting mild shocks while touching my plugged in laptop and touching a metal shielded USB device plugged into the USB port of my Raspberry Pi 3 at the same time. I used a multi meter to measure the AC voltage between the USB grounds on my laptop and Rpi3, and found there to be 130V.

My country uses 240V mains.

The laptop charger is a DELL USB C charger with ground AC pin.

The Raspberry Pi 3 charger is the official 5V supply and this does not have a ground AC pin.

Both are rated correctly for 240V.

I checked the voltage between the USB C ground of the DELL USB C charger to mains ground, and it's zero. It's also zero with the Pi 3 5V supply microUSB ground to AC ground. But only between the USB C charger and Pi 3 supply grounds there is 130V.

I also tested with another Pi 3 supply of the same brand, and that one gave me 25V between the two.

Anyone have any idea what could be going on here?


texts: Removing DC wander in the offset of a DC-biased audio signal

texts:
I'm trying to read an audio signal from an Android phone as a serial input to an MSP430G2553, adapting this design to use the MSP430's onboard comparator module instead of an LM324. The Android code to make a square wave out of the audio jack is available here. The output is a rather noisy square wave which is converted to a logic-level digital signal by the comparator. I'm shooting for a 4800 baud signal to the UART. The audio sample rate in the Android code is set to 41 kHz.

In my case, the comparator's positive input is the internal precision voltage reference (0.5*VCC) instead of an external pot. I have applied a DC bias to the audio signal in order to center it around the 0.5*VCC mark before going to the comparator's negative input on P1.5 (CA5). The "AUDIO" net is CA5 on the MSP430. C1 is a tantalum capacitor for no reason other than it's what I had on hand.

I'm having some DC wander issues with the beginning of each signal which are causing the comparator to not trip properly at the beginning of the signal:

Zooming in on the beginnig of the comparator input signal (now on scope CH2), you can see the undesired rapid switching on the comparator output on CH1:

I tried increasing the value of C1 to 0.47uF, but it takes an unacceptably long time to discharge (I forgot to save a graph of this with C1=0.1uF but it was shorter) at the end of the signal:

I suspect that the comparator toggling would be partially remedied by setting up the comparator as a Schmitt trigger, but I'm not sure it would work for the first few bits of the signal with the DC wander still in place. What do I need to change to get rid of the DC wander without a long capacitor discharge at the end of the signal?

Edit: Here's what the raw input looks like (left side of C1, scope CH1) compared to the biased signal on CH2. The biased output climbs a little more over the course of the signal.


texts: Programming STM32F407 discovery by the ST-Link V2

texts:
I have a STM32F4 Discovery board and a ST-Link/V2 programmer. I want to use my own ST-Link (not the embedded one) for programming and debugging the board.

I faced to a problem that i still haven't been able to solve that. I use ST-LINK Utility software and every thing works correctly if i choose 5 kHz for the Connection settings frequency. Otherwise ST-LINK Utility pops up a

  Can not connect to target!

error and it offers me to choose lower frequency. Is the 5 kHz the only frequency that it can works for STM32F407 discovery board and ST-LINK V2 connection?

How can I use others and the error will not be happened again?


texts:
What is the difference between a capacitor and a diode rectifier ?

I've learn to use a capacitor in debouncing circuit to absorb the current so that most momentary fluctuation that doesn't come from a solid closed contact would be absorbed by the capacitor charging.

Now, I also learned to use a diode rectifier with relay as the coil inside a relay will generate a voltage peak when the coil discharge. This discharge shoot a peak of high voltage current back in the opposite way of the circuit ( towards the + ), so the diode rectifier can absorb the surge and protect the circuit.

But how is this a different process then what a capacitor does ?
Wouldn't a capacitor absorb the surge too ?


texts:
I've searched a lot and found differing opinions so I'll ask here.

Can I use 1.5 mm2, 1 core, 7/0.5 mm strand building wire rated for 0.6/1 kV AC in small < 24V DC applications.

I know AC and DC utilise the cable differently, but is there any difference in using this over the 'automotive' wire sold at electronics shops? This stuffs a hell of a lot cheaper so it'd be great if its the same.


texts: Does a dimmed LED lamp draw less power than one at full brightness?

texts: Does a dimmable 6W LED lamp, dimmed to 50%, draw c. 3W? Or does it still draw the full 6W?


texts: Dividing multi-bit port into inputs for 2 gates

texts:
I am designing a circuit where I am required to connect 32 1-bit outputs from 32 NAND gates to the input of 2 16-input OR gates. I am writing Verilog for this but unable to work out how to connect the initial 16([15:0]) bits to the input of the first OR16 and the remaining 16 ([31:16]) bits to the input of the second OR gate.

I tried this:

  or16_new o1(.orin1(xpow[15:0]), .or1out(or1w));
  or16_new o2(.orin1(xpow[31:16]), .or1out(or2w));

//where orin1 is 32 bit input to the OR16 and xpow is 32 bit wire connected to the output of 32 NAND gates. or1w and or2w are wires again, connected to the output of the 2 OR16 gates.

Compiling this returns no error in ModelSim but when using icarus, it returns the following warning -

*Port 1(orin1) of or16_new expects 32 bits, got 16. Padding 16 high bits of the port.*

And similarly for the second instance too.

So I tried

or16_new o1(.orin1[15:0](xpow[15:0]), .or1out(or1w));
or16_new o2(.orin1[31:16](xpow[31:16]), .or1out(or2w));

This returns an error, both, in ModelSim and in Icarus.

If it helps, this is how I have defined the or16_new module:

module or16_new (

input [31:0] orin1,
output or1out);

wire w9, w10, w11, w12;

nor nr_1(w9, orin1[0], orin1[1], orin1[2], orin1[3]);
nor nr_2(w10, orin1[4], orin1[5], orin1[6], orin1[7]);
nor nr_3(w11, orin1[8], orin1[9], orin1[10], orin1[11]);
nor nr_4(w12, orin1[12], orin1[13], orin1[14], orin1[15]);
nand (or1out,w9,w10,w11,w12);
endmodule


texts:
I need to generate ultrasound with a frequency of 1.5 MHz. The ultrasound should be pulsed as shown here

An ultrasound pulse should be 200 µs long, a pause (no ultrasound) is 800 µs long. The desired intensity should be 30 mW/cm^2 and upwards.

The problem is, I have no idea where I would even start. I have basic to advanced theoretical knowledge of electronics and physics, I have soldered once, but that's about it.

So I need you for guidance :).

What device do I need to generate the ultrasound? I guess a normal speaker won't do.

What do I have to do to generate such a pulse form and the desired frequency?

What other items do I need?

I prefer pre-built components (like an ultrasound generator which can give me the above pulse form and frequency) over having to build everything myself; but if I have to build something myself, I'll take on the challenge and hopefully learn something from it.

Any thoughts or pointers are greatly appreciated.

(If my question is too broad, I'll be happy to provide more details.)


texts: Attiny85 water plant with mini water pump

texts:
I`m new to electrical engineering, so it's probably a newbie problem.

I'm using a wall power supply(5V-2A) to power the DC Motor and the Attiny85.

A C1 470uF to make the power more stable. I don't know if it is necessary, but it helped.

A D1 green led to show if it's on.

A reset button connected to ground to reset(Duh).

One relay(833H-1C-C) connected to the digital pin 0 of the attiny to turn the motor on and off.

Two rotational potentiometer connected to two analog pins(2,3) to decide how much time the mini water pump will be on(0-1023 to 1s-30s) and the other to compare to the humidity sensor to decide how dry the soil will need to be to turn on the motor.

And one humidity sensor.

#include "kPot.h" // my library, just analogReads

#define HUMIDITY_PIN 1 //humidity sensor
#define LEVEL_PIN 3 //rotational potentiometer
#define TIMER_PIN 2 //rotational potentiometer
#define MOTOR_PIN 0 //connected to the relay switch

kPot humiditySensor = kPot(HUMIDITY_PIN, 10); //(pin, average of 10 reads)
kPot levelPot = kPot(LEVEL_PIN, 10);
kPot timerPot = kPot(TIMER_PIN, 10);

int humidity = 0;
int level = 0;
int timer = 0;

void setup() {
  pinMode(MOTOR_PIN, HIGH);

  humidity = humiditySensor.Read();
  level = levelPot.Read();
  timer = timerPot.Read();
}

void loop() {
  humidity = humiditySensor.Read();
  level = levelPot.Read();

  timer = timerPot.Read();
  timer = map(timer, 0, 1023, 1000, 30000); //1s to 30s

  if(humidity < level){
    digitalWrite(MOTOR_PIN, HIGH);
    delay(timer);
    digitalWrite(MOTOR_PIN, LOW);
  }

  delay(300000); // 5min Update
}

The problem: The mini water pump turns on and won't stop.
I removed the reset button to make sure that wasn't resetting, didn't help.
Maybe the motor is taking too much current and reseting the attiny?
I probably have to put a diode somewhere, but as I said, I'm a newbie, so...

thanks.


texts: Using PIR 3.3 V 0.33 mA to drive 12V 4A valve coil

texts:
I've been looking at ways to drive a 4 A, 12 V solenoid valve from a tiny, 3.3 V, 0.33 mA (max) current output from a PIR module.

Whatever I try (MOSFETs, transistors etc), there never seems to be enough current or voltage from the PIR unit to drive enough current through the load.

The PIR has 3 connections: 0 V, 12 V and output.

Can anyone suggest a suitable MOSFET I could use, or an alternative circuit?


texts: Why is an input side transformer necessary with a bridge rectifier?

texts:
I am not getting the statement "The load cannot be grounded without an input side transformer." Described as a disadvantage of bridge rectifiers in book on power  electronics by M. H Rashid.

Why can't the load be grounded without an input side transformer?


texts: What is ADC RMS noise? It would be helpful if someone could theoretically explain ADC RMS noise.Say a ADC has RMS noise of 11nV@4.7Hz.What does that mean?


texts: Why do some laptop charges have ferrite cores on them?

texts:
I know why usb cables and other data cables have ferrite cores on them.  My new laptop's charger also has a ferrite core on the side that connects to my laptop.  Why is this?

I have a hunch that it might be to prevent the power cable from interfering with data cables and such, but DC power shouldn't really effect other sort of data, right?


texts:
I have a bit of soldering experience but look for instructions on how to solder on an aluminum core PCB. The PCB is for high power LEDs that dissipate a lot of great, hence the metal core. The components are LED drivers, resistors, capacitors and alike for a simple LED board.

The board cools so efficiently that soldering is near impossible. I tried preheating the board on a Crepe maker (cheap hot plate). It either was too cold and I still couldn't solder or too hot so the LED lenses we melting. I'm looking for and tips or experiences to send me in the right direction.


texts: The original Li-ion battery in my camera has a voltage rating of 7v. Can an aftermarket battery with a 7.4v rating be safely used in my camera?


texts: Would a multi-stage linear solenoid work?

texts: A common issue with small linear solenoids is that the stroke length is rather short. I'm pretty sure that increasing the stroke length would require increasing the strength of the magnetic field because the core is farther from the center of the coil. Similarly to a coilgun, would a solenoid with multiple, staged coils get around that problem?


texts: Why is capacitor placed in parallel for power factor correction?

texts:
I understand that to correct the power factor you have to choose a capacitance such that the reactive power from the circuit is cancelled by the reactive power of the circuit using this method.

Circuit with power factor corrected:

Why does one place the capacitor in parallel (as opposed to series)?

Thanks in advance


texts:
How would low temperatures effect the following RTC module? I'm talking around -20 degrees Celsius.
It can be seen on the picture that it uses the DS1307N version, which is industrial (-40 to 80 degrees).
So my question is, what if I use the other version (non industrial, from 0 to 70 degrees) would that change the outcome date-time a lot in low temperatures?


texts:
I am measuring magnetic fields from 50kHz to 500kHz with this search coil (air coil.) It is a wound of bell wire from the hardware store connected to an oscilloscope probe tip and ground:

I have built a new one with a ferrite core Fair-Rite 2631814002 with 1500 relative magnetic permeability for enhanced sensivity (with approximatley the same length of wire):

The ferrite core search coil isn't sensitive. In a situation where the air coil picks up 35dbU above noise 50kHz to 500kHz, the ferrite core search coil doesn't pick up anything.
Why?


texts: generating 10-100 ns pulses with 20 Hz frequency

texts: For my internship, I was asked to design an LED driver circuit with <100 ns pulse width and <20 Hz frequency for driving an IR LED. It will be used for testing some photodiodes.  Therefore, I am trying to find a pulse generator circuit with very low duty cycle however I could not find any. There are many pulse generator circuits with ns pulse width but all of them has very high frequency. The closest thing I found is a retriggerable monostable multivibrator IC and it looks a little complex(http://www.ti.com/lit/ds/symlink/sn54ls123.pdf). How can I find examples of such circuits? What should I look for?


texts: What kind of glue should I use for PCB-mounted components to avoid vibrations?

texts:
I want to protect the PCB-mounted components from vibrations. What kind of glue/substance should I use?
What are the most prone to failure components due to vibrations?


texts: How to use temperature formula of SI7021 using MS LS recieved

texts:
SI7021 datasheet.
This is the data in ASCII I recieve to my serial communication in Matlab. The first letter is the ASCII for the MS byte, the second is ASCII for the LS byte, then we have the checksum and 'a' just to test the line.
In the marked red below for example, t=116 and h=104, so th = 116 x 16 + 104 = 1960
By the formula in the data sheet I get -40°C (and I am not living on the North Pole); I expect 25°C.


texts:
when trying to program the fuses I get this known error message:

$ sudo avrdude -c usbtiny -p m328p -U hfuse:w:0x05:m

  avrdude: initialization failed, rc=-1
           Double check connections and try again, or use -F to override
           this check.

  avrdude done.  Thank you.

Here's with -vvvv:
$ sudo avrdude -c usbtiny -p m328p -U hfuse:w:0x05:m -vvvv: pastebin.com/mcdyiHYq

Adding -B20 or -B250 doesn't help.

-> I know exactly how I caused this: $ sudo avrdude -c usbtiny -p m328p -U hfuse:w:0x11:m. The wired thing is the output and that it shows that E:11 is set instead of H:11. pastebin.com/wE7uwC31 Why did avrdude set the wrong fuse :\ and is this a bug in avrdude?

-> -B250 worked one time when I needed it: First I did $ sudo avrdude -c usbtiny -p m328p -U lfuse:w:E3:m, but when I tried to set it back to 0x62 I got initialization failed, rc=-1, added -B250 and $ sudo avrdude -c usbtiny -p m328p -U lfuse:w:E3:m worked. The thing is, it doesn't work now when I set the other fuse to 0x11 as described.

-> Everything is well connected because if I try a different same ATmega328P-PU chip, it works. So it has something to do with this 0x11 fuse setting I did. And also the code is running on this chip is still working and the attached LCD shows correct results.

This is what the 0x11 high fuse setting sets, but it's not like this setting means that it is set to "locked" or something?


texts:
I have a question about the rated power of a coffee machine.
The specs on the coffee machine are;
Rated Voltage 220-240V~50/60Hz
Rated Power
Coffee Machine Only - 915-1090W
Together with Milk Frother - 1372-1633W
For context this is being installed in a vehicle and being run off a 1000W 12V/240V inverter.  The inverter has dip switches that let me adjust the output voltage(200,220,230,240)/frequency(50/60).
Is the rated power 'range' 912 to 1090 related to the Voltage/Frequency you have it connected to?  If so does the Frequency affect it?
As I understand it Power doesn't change with Voltage (the Amps will change) therefore the 220/240 shouldn't affect it and is it then the Frequency.
Simply by setting the inverter a certain way (eg 220V/50hz) will it operate at 912W.
Apologies for the long winded question.


texts: How to calculate the equivalent conductance of a circuit

texts:
I have the following circuit and I'm asked to calculate the equivalent conductance at the ends of the circuit.

The textbook gives the following solution: \$G_{eq}=\frac{1-\beta}{R}\$.

My question is: why does the generator have its own resistance?


texts: What does it mean bipolar or unipolar junction in a transistor?

texts: I can't find the definition of unipolar and bipolar junction in a transistor, for example BJTs has a bipolar junction and MOS-FET has a unipolar junction, what does it mean unipolar and bipolar junction?


texts: If I have a G(s) plot. Can I draw 1+G(s) plot from it? If yes, then please give an example. If no then explain why?


texts: Baxandall tone circuit passes signal through but does not alter its tone

texts: I added an Baxandall active tone circuit to an existing overdrive circuit and I'm having an issue. The signal passes through the circuit/opamp and out to my volume control but the bass and treble controls don't affect the signal at all, it seems as if the signal is completely bypassing the pots. What do I have wrong that would be causing this? Thanks for any insight!


texts: LTspice, Sallen & Key low pass filter + Low pass filter order 1

texts:
First of all, sorry for my English, it isn't my native language.
I want to cascade a first order low pass filter and a low pass Sallen and Key structure in order to get my bandwidth at 30 Hz (Fc = 30 Hz).
So, I tried to calculate FC of my first filter (order 1) with C = 22n and R = 240K (E12 series for C and E24 series for R).
With that, I'm supposed to have -3dB at 30.14 Hz.
So, after that, I calculate my FC for my second filter (Sallen & Key structure, low frequency pass). I have used C2 = 1/2C1 (you can find a schematic below) and R1 = R2.
I made an Excel spreadsheet to calculate delta FC with E12 Capacitor and E24 or E12 resistor and that's what I get:

But when I try to simulate my filter on LTspice XVII, FC isn't at 30 Hz (approximately) but next to 20 Hz.
Is that normal? (It's the first time I try to do that, I'm a beginner.)
Here is my schematic on LTspice:

And here is my simulation result:

In Dark Blue, it's INPUT
In light Green, it's OUTPUT


texts:
This is sort of a "classic" problem, and I think I have a solution, but I want to vet it with this community. I am building a project using the ATtiny88 microcontroller, and I'm programming in avr-gcc. I need it to handle the following interrupts:

TWI (I2C)
Timer0 Overflow
Timer1 Capture

I want to use the Timer0 Overflow to maintain a 32-bit millisecond timestamp (similar to Arduino's millis() concept). For my application I can't have anything get in the way of the TWI interrupt because my ATtiny88 is acting as a TWI slave, and as such I can't ever clear interrupts. The Timer ISRs both have to be declared NO_BLOCK.

Since the ATtiny88 is an 8-bit processor, access to variables that are wider than 8-bits are certain to take multiple cycles to complete. The way the Arduino core handles this dilemma is by guarding access to its internal 32-bit timer0_millis variable with a cli() inside the millis() function. That approach is unpalatable to me because it means I might miss a TWI interrupt because I call millis(). I don't care about occasionally missing a "tick" of the timebase because of a TWI interrupt being handled.

So I wrote timebase.h / timebase.c in hopes of circumventing this problem at the expense of a little extra storage, by double buffering.

timebase.h

/*
 * timebase.h
 *
 *  Created on: Dec 3, 2012
 *      Author: vic
 */

#ifndef TIMEBASE_H_
#define TIMEBASE_H_

// timer 0 is set up as a 1ms time base
#define TIMER0_1MS_OVERFOW_PRESCALER 3     // 8MHz / 64 = 125 kHz
#define TIMER0_1MS_OVERFLOW_TCNT     131   // 255 - 131 + 1 = 125 ticks

void timebase_init();
uint32_t timebase_now();

#endif /* TIMEBASE_H_ */

timebase.c

/*
 * timebase.c
 *
 *  Created on: Dec 3, 2012
 *      Author: vic
 */
#include <inttypes.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include "timebase.h"

// double buffered timestamp
volatile uint32_t timestamp_ms_buf[2] = {0, 1};
volatile uint8_t  timestamp_ms_buf_volatile_idx = 0;

void timebase_init(){
    // set up the timer0 overflow interrupt for 1ms
    TCNT0  = TIMER0_1MS_OVERFLOW_TCNT;
    TIMSK0 = _BV(TOIE0);

    // start timer0
    TCCR0A = TIMER0_1MS_OVERFOW_PRESCALER;
}

// fires once per millisecond, don't block
// can't miss TWI interrupts for anything
ISR(TIMER0_OVF_vect, ISR_NOBLOCK){
    TCNT0 = TIMER0_1MS_OVERFLOW_TCNT;

    // modify the volatile index value
    timestamp_ms_buf[timestamp_ms_buf_volatile_idx] += 2;

    // change the volatile index
    timestamp_ms_buf_volatile_idx = 1 - timestamp_ms_buf_volatile_idx; // always 0 or 1
}

uint32_t timebase_now(){
    uint8_t idx = timestamp_ms_buf_volatile_idx; // copy the current volatile index
    return timestamp_ms_buf[1 - idx];            // return the value from the non-volatile index
}

My question is, does the code I've written here effectively solve the problem I've described? Have I successfully implemented atomic access to the timebase without clearing interrupts? If not, why not, and how can I achieve my goals.


texts:
I'm trying to debug code on an 8 bit AVR microcontroller (Atmega328P) via debugWIRE using AVaRICE, avr-gdb and the JTAGICEmkII debugger.

I'm doing the following steps:

Compile the code with g2 debugging info in stabs format with no optimizations:

avr-gcc -Wall -g2 -gstabs -O0 -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=atmega328p -DF_CPU=1000000UL

Create hex:

avr-objcopy -R .eeprom -O ihex lambda.elf lambda.hex

Upload hex:

avrdude -pm328p -cjtag2isp -B10 -Uflash:w:lambda.hex:a

Start AVaRICE:

avarice -2 -w -B10 -j usb :4242
AVaRICE version 2.11, Jan 17 2014 02:51:59

JTAG config starting.
Found a device: JTAGICEmkII
Serial number:  07:00:00:00:5c:3c
Reported debugWire device ID: 0x950F
Configured for device ID: 0x950F atmega328p
JTAG config complete.
Preparing the target device for On Chip Debugging.
Waiting for connection on port 4242.

Start avr-gdb:

avr-gdb lambda.elf

Reading symbols from lambda.elf...done.
(gdb) target remote localhost:4242
Remote debugging using localhost:4242
0x00000000 in __vectors ()

Set a breakpoint inside the main loop in main()

(gdb) break lambda.c:74
Haltepunkt 1 at 0x2ae2: file ../lambda.c, line 74.

And contiune, hoping for the program to stop at the breakpoint:

(gdb) continue
Continuing.

The program starts fine but never stops. I can stop it with CTRL+C:

^C
Program received signal SIGINT, Interrupt.
0x00002d2e in getTime () at ../interrupts.c:51
51                      time = ints >> 5;

What puzzles me then is that if I look at the debug info dumped with

avr-objdump -g lambda.elf > debug.txt

at the same line of code, there is another address:

/* file ../interrupts.c line 51 addr 0x2d10 */

and even if I set a breakpoint at exactly that address 0x00002d2e where the program was interrupted (function getTime() is called repeatedly):

(gdb) break *0x00002d2e
Haltepunkt 2 at 0x802d2e

the program will never stop - and why is the breakpoint set at 0x802d2e?

Is it normal that the addresses don't match or could this be the reason for the breakpoints not working? Do I need to set some address offset?

Originally I tried to debug from Eclipse with the avr-eclipse plugin, and it shows the exact same behaviour, which I guess is not surprising since it uses the same tools behind the scenes.


texts:
I'm using the MPLAB X IDE v3.50 to type the code and download it in the PIC24FJ64GB004. It is successfully compiling but the ADC is not giving an appropriate value according to the Voltage(Vin1) received on the RC0 pin. Whether the pin gets 3.3V or 0V, the converted value is a constant 0.

#define ADC_CHANNEL_CH_1            ADC_CHANNEL_6 // Pin RC0

Static FILEIO_OBJECT myFile;
uint16_t adc1Result;
uint16 Ch1_Value = 0;
uint16 Ch1_SUM = 0;

void ADC_Calculation()
{
    ADC_ChannelEnable(ADC_CHANNEL_CH_1);
    adc1Result = ADC_Read10bit(ADC_CHANNEL_CH1);

    // ****ADC Calculation****//
Ch1_Value = Ch1_Value + adc1Result;
Ch1_SUM  = Ch1_Value;
Ch1_Value = 0;

if (Ch1_SUM  < 20)
{
    Ch1_SUM   = 20; //Minimum value of 20
}
    Else
{
    Ch1_SUM  = Ch1_SUM;
}

I'm exporting the ADC converted value using the USB port to an Excel sheet in the Thumbdrive.

When I changed the ADC input pin(Vin1) from RC0 to RC1 (AN7), it gave a correct value till 341(Vin1 = 2.2V). But when I continue to use the RC1 pin with a new second input(Vin2) and then I give the original input(Vin1) to RC0, RC1 behaves the same(gives correct converted value till 341) but RC0 now gives a constant value of 341, '01 0101 0101' in binary, whether Vin1 = 0v/3.3V.

#define ADC_CHANNEL_CH_2            ADC_CHANNEL_7 // Pin RC1
#define ADC_CHANNEL_CH_1            ADC_CHANNEL_6 // Pin RC0

Static FILEIO_OBJECT myFile;
uint16_t adc1Result;
uint16_t adc2Result;

uint16 Ch1_Value = 0;
uint16 Ch2_Value = 0;
uint16 Ch1_SUM = 0;
uint16 Ch2_SUM = 0;

void ADC_Calculation()
{
    ADC_ChannelEnable(ADC_CHANNEL_CH_1);
    ADC_ChannelEnable(ADC_CHANNEL_CH_2);

    adc1Result = ADC_Read10bit(ADC_CHANNEL_CH1);
    adc2Result = ADC_Read10bit(ADC_CHANNEL_CH2);

// ****ADC 1 Calculation****//
Ch1_Value = Ch1_Value + adc1Result;
Ch1_SUM  = Ch1_Value;
Ch1_Value = 0;

if (Ch1_SUM  < 20)
{
    Ch1_SUM   = 20; //Minimum value of 20
}
    Else
{
    Ch1_SUM  = Ch1_SUM ;
}

// ****ADC 2 Calculation****//
Ch2_Value = Ch2_Value + adc2Result;
Ch2_SUM  = Ch2_Value;
Ch2_Value = 0;

if (Ch2_SUM  < 20)
{
    Ch2_SUM   = 20; //Minimum value of 20
}
    Else
{
    Ch2_SUM  = Ch2_SUM ;
}

Where am I going wrong? Why am I getting a digital value of 0 when I'm using only RC0 and I get a constant value of 341, when I use RC1 and RC0, at the output of RC0? The ADC in the PIC24FJ64GB004 is 10-bit so it should give a digital value from 0 to 1023. Why doesn't it go above 341?

I'm not collecting the converted values from RC0 and RC1 simultaneously. I'm using RC3 pin to toggle between the outputs. So when RC3=1, RC0's converted value is exported and when RC3=0, digital converted value of RC1 is exported to ecxel sheet.

So basically,

1] Vin1 -> RC0, output = 0 (constant) [RC1 is not used]

2] Vin1 -> RC1, output = 0,122,250 .. 341 (It gives a correct value till Vin1 = 2.2V. Above 2.2V, it gives a constant digital value 341. RC0 is not used)

3] Vin1 -> RC0 and Vin2 -> RC1, output at RC0 = constant 341; output at RC1 = 0.. 341. (constant 341 when Vin2 > 2.2V)

4] Vin2 -> RC0, output = 0 (constant) [RC1 is not used]


texts: Function of this voltage regulator circuit?

texts:
Working on a data over power bus system, I've seen the following circuit in the power decoupling circuitry. If I am right, it gives a regulated output voltage by means of the Zener diode.

simulate this circuit – Schematic created using CircuitLab

VBUS = 15 V
VZD1 = 8.2 V

And:

V+ - Vout = GND - V-

Vout ~ VZ - (VbeQ1 - VbeQ2) ~ 7 V; Respecting to GND, assuming that VbeQ1 = VbeQ2 = 0.6 V

I have seen other circuits than outputs a regulated voltage using a Zener diode and a mid power transistor (Transistor Series Regulator) having the same negative reference or GND.
My question is: why set a difference between GND and (over) V-? Does it have to deal with the data AMI encoding?
If I am wrong or need more information, please let me know.
Thank you.


texts: RMS phase jitter, not sure the right formula

texts:
In derivation of IPN power we normally approximate the area under the noise curve by dividing the area into trapezoids, where each trapezoid represents a specific region. The following plot is one example.

Here are some questions:

Why don't we include the area below 0-10kHz as well? And also why does integration stop at 2fo?
There's a formula that relates the bandwidth to the IPN power, given as \$ P_{noise}=S_1+10log(4BW_1) \$, where \$S_1\$, which has the unit dBc/Hz, and \$BW_1\$ are specified in the following figure,

The document given to me only cited this equation from a conference journal held at an ISSCC public meeting somewhere in 2009. Couldn't find its source unfortunately. Anyway I can relate the RMS phase jitter to the noise power given by the document as such:

$$ \sqrt{4S_1BW_1}$$

$$\sqrt{10^{\frac{S_1}{10}}.10^{log(4BW_1)}}$$

$$\sqrt{10^{\frac{S_1+10log(4BW_1)}{10}}}$$

$$\sqrt{10^{\frac{P_{noise}}{10}}}$$

How does this equation reconcile with the equation given in the first image, in which RMS phase error is reported on as \$\sqrt{2\times 10^{\frac{A}{10}}}\$. There seems to be a 2 missing in the document's calculated noise power. So does it really miss a 2?
Since \$S_1\$ is measured at f-3dB it looks to me that some area will be missed from integration. Because \$S_1\$ is slightly less than the dc gain of the noise profile. Does that add to the inaccuracy of the second formula for RMS phase jitter?

Thanks for your attention,


texts: Any wireless technology to find the distance between transmitter and receiver

texts:
I have a static transmitter and a mobile receiver. Is there any wireless technology to find the distance between the two in real time.
Apart from using gps!


texts: Why did I fry my lab power supply trying to charge a lifepo battery?

texts:
I hope the question is not off-topic: I want to know "why" it failed more than how I should use my equipment, even though the questions are probably linked.

The power supply is a 0-3A, 0-30V lab power supply (LABPS23023). I fried it trying to charge a 20AH 3.2V LiFePo single cell battery. I had set the supply to 3.8V for the initial charging as recommended, and the current limitation pot halfway (~1.5A, way below the max recommended 1C). Since the battery was only 3.3V stock, and that the power supply had both voltage and current limitation, I thought I would be safe.

Result = heavy instant smoke in the power supply. Not even a blown fuse.

Did the battery "feed" power into the PS instead of the opposite, and the latter would be seriously unable to withstand it?

I highly suspect my understanding is both naive and incomplete. Would a simple heavy duty diode have protected the power supply, but would it be charged in this case?

The schematics of the PS is here:


texts: Can't get AVR pin change interrupt to work

texts:
I'm trying to get a pin change interrupt on an Attiny2313 to work but i'm stuck,
the interrupt is not triggering.

I'm using the following code in main():

GIMSK |= (1 << PCIE2);
PCMSK2 |= (1 << PCINT13) | (1 << PCINT14) | (1 << PCINT15);
sei();

This should yield an interrupt on pins PD2, PD3, PD4 i assume?

I have a display attached that shows the bits in PIND (which are indeed changing levels)
And i have defined a uint8_t interruptTriggered = 0; at the top of the file which should get set to 1 in:

ISR(PCINT2_vect) { interruptTriggered = 1; }

I'm also showing the value of interruptTriggered on the display but it never changes to 1.

Note: as the iotn2313.h file included by AtmelStudio 6.1 somehow doesn't include all definitions i took some liberties by defining the following:

//fix some missing definitions for Attiny2313
#define PCMSK2 _SFR_IO8(0x05)
#define PCMSK1 _SFR_IO8(0x04)
#define PCMSK0 _SFR_IO8(0x20)
#define PCINT11 0
#define PCINT12 1
#define PCINT13 2
#define PCINT14 3
#define PCINT15 4
#define PCINT16 5
#define PCINT17 6
#define PCINT1_vect _VECTOR(13)
#define PCINT2_vect _VECTOR(14)
#define PCIE0 5
#define PCIE1 3
#define PCIE2 4