texts: Why is my simple boost converter giving me such a high peak output voltage?

texts:
I am trying to understand switch-mode power supply fundamentals through a simulation in LTSpice.

I wanted to build an excruciatingly simple boost converter circuit following a teaching model often given in textbooks, but I can't get this thing to behave at all as I expect it to, probably because things are very different in practice :)

Here is the schematic diagram exported from LTSpice (note that it uses ISO symbols; the component on the right is a resistor):

The supply voltage is 5V and I am seeking to increase it to 12V with a load current of 1A, or an output power of 12W. I selected a switching frequency of 20kHz. By my math, I need a duty cycle of 0.583 to do this, so the on time should be 29.15 µs. Assuming an efficiency of 0.90, the input power will be 13.34W and the input current 2.67A.

Assumptions that may be getting me into trouble:

Perhaps the efficiency is totally unrealistic for a design this
simple and my input current is much higher than I expect.
Initially I didn't care much about ripple so I just picked the inductor and capacitor randomly.
Maybe the switching frequency was too small.

I ran the simulation with a time of 10ms (should be visible in the graphic).

What I expected to see is a voltage of 5V, perhaps with a slight ripple, at point 2 (between the inductor and the NMOS) and a voltage of 12V with a ripple at point 3 (between the diode and the capacitor).

Instead, what comes out is what looks like total chaos -- I get a peak voltage of 23V that oscillates around 11.5V at point 2 and a slightly lower peak voltage of just over 22.5V that oscillates around 17V at point 3:

On the hunch that my switching frequency might be too low, I tried increasing it to 200kHz (T=5µs, Ton=2.915µs) and now I get something more like what I was looking for, which is a peak voltage of 12.8V at point 2 (oscillating between that and 0V) and a peak of 12V at point 3 (oscillating about 11.8V):

There was significant ripple in the voltage. I tried increasing the size of the inductor to 100µH but all it seemed to affect was the startup oscillation. So I increased the capacitance to 10µF, and that seemed to work, the voltage oscillation at point 3 is much smaller. The image above is the result with a 10µF capacitor.

My questions, then, are:

what is wrong with my original model?
is 20kHz a completely unrealistic switching frequency (seems strange that it would be)?
if I wanted a 20kHz switching frequency, what do I have to change to make the circuit work as expected? A much bigger inductor?
is it normal for the voltage on the input side to be similar to the voltage on the output side when the circuit has reached steady-state?
what equation should I use to size the capacitor?


texts: Is Driving a Motor With PWM Inherently Less Efficient than Using a Lower Voltage?

texts:
This is a hypothetical question but it's been bugging me for a while.

Lets say I hook up a DC motor with a propeller on it to a 10v battery and let it run.

Then lets say I hoop up a second identical DC motor and prop to a 100v battery, but with a PWM controller. And lets say I tuned the PWM duty cycle so that the RPMS of the motors are identical.

The power output of the props should be identical now as well, since it's related only to the RPMs.

Lets also say that hypothetically the mosfets in the PWM controller have 0 on resistance, and switch instantly.

Will both systems be identical in efficiency? Or are there some inherent losses due to the PWM throttling?


texts: 4 layer PCB, mixed signal, multiple different voltages

texts:
For a mixed signal PCB with DACs, ADCs, MCUs and multiple analog opamp circuits. With +/-15V to power the opamps, 3.3V for all the digital stuff and a couple reference voltage rails (1.5V and 3V).
Can someone suggest a layer breakdown for a 4 Layer PCB? Obviously ground for one of the inner layers and I was also thinking in the digital part of the board I could make the second inner layer a 3.3v fill and then in the analog part I could leave it unfilled and run power traces (+/-15v and 1.5/3v ref) there. Is this a bad idea?
Edit: Forgot to mention components are on both sides of the PCB


texts: Building 7 Transistor Logic Gates using And, Or, Exor and Inverter

texts:
Hello I just want to know something..

For example, I have this:

Let's say I  build an AND Gate and an Inverter.. I check the and gate if it satisfies the truth table and upon checking it, it works. Same with inverter...

This time I'll be combining the And and the inverter to produce a Nand Gate.. upon doing it, it works again. therefore we have the nand gate out of the two combination of AND,OR gate..

Here's the question..

Since I already have the NAND gate, I want to check again for the AND gate without removing the combination of the AND and Inverter (NAND) .. Just for the AND Gate.. How I'll be doing it??


texts: How to fix this constant current drive circuit?

texts:
I have selected a constant current source to drive LCD in my design but doesn't work well, so I'd like someone to help me pinout where the problem is.

The LCD backlight requirement is as below.The constant current source chip I use is CAT4139.

My constant current circuit is like this, LEDA/LEDK are connected with LCD.

However, the LCD cannot turn bright on PCB. The measured voltage on LEDA is only 8.4v and the voltage on LEDK is 0v.

My question is why this circuit doesn't work? How can I do the calculation in designing stage to avoid this failure based on the information provided by the datasheet? Is there anything I can do now to make up on the PCB?

Edit:

PCB layout

L4 is PA4332

Solved:
Thanks to Pintergabor and Jack Creasey's help, this problem is solved after following steps.

Changed the L4 into 22uH, the issue was still there.
Changed the D5 into another Schottky diode which has reverse voltage 30v and the problem is solved, the LCD can turn bright.


texts: Current Amplitude Distribution Lossless Transmission Line

texts: I need to proof that the formula for Current Amplitude Distribution in a Lossless Transmission Line it's the following and I don't know where to start from... A little help would be appreciated. Thanks!


texts: Measuring speed with 3axis accelerometer

texts:
We are creating a ball that changes colour depending on its speed when it rolls.

I have a 3 axis accelerometer sensor.

This is the code we are using at the moment:

int xAxis = A3;
int yAxis = A1;
int zAxis = A2;
int axisValue = 0;

int led = 13;
int led2 = 12;
int led3 = 11;

void setup() {
  Serial.begin(38400);
  Serial.println("Starting up");

  pinMode(led, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
}

void loop() {
  axisValue = analogRead(xAxis);
  Serial.print("X="); Serial.print(axisValue);

  axisValue = analogRead(yAxis);
  Serial.print(",Y="); Serial.print(axisValue);

  axisValue = analogRead(zAxis);
  Serial.print(",Z="); Serial.println(axisValue);

  if (axisValue > 300 ) {
    digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(led2, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(led3, LOW);   // turn the LED on (HIGH is the voltage level)
    Serial.println("more than 300");
  }
  else if  (axisValue < 300 ) {
    digitalWrite(led, LOW);     // turn the LED on (HIGH is the voltage level)
    digitalWrite(led2, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(led3, HIGH);   // turn the LED on (HIGH is the voltage level)
    Serial.println("less than 300");
  }
 // delay(200);
}

So I have some LEDs that turn on and off. But I want to change the light according to speed not only to position. How can I do that?


texts: time domain reflectometry interpretation of a simple circuit

texts:
I have constructed the following circuit in HSPICE,and it gives me the following waveform
I know that we have the first wave hit node 3 then it goes back and again to node 3.
But how we construct the impedance to time domain plot from this voltage to time plot?
Thanks.


texts: How strong a transformer do I need to convert from 220V to 11V at 1.6A?

texts:
I have a (cordless drill) battery charger that has these specs on its back:

INPUT: 120VAC ~ 60Hz 26W
OUTPUT: 3.6V - 10.8V DC, 1.5A

Where I live the wall electricity is ~220VAC so I thought a small step down transformer (converter?) from 220V AC to 110V AC that outputs (?) 30W should work with my charger.

I went to an electronics store and the owner did some math around the 1.5A figure and told me I'd need a much bigger transformer capable of putting out at least 150W or so.

Is the store guy right? What's the math that he did in his head? And why does my charger show 26W on the back?


texts: How to program STM32 via alternative UART pins?

texts:
I'm able to program a Black Pill (STM32F401) with Arduino IDE and an FTDI programmer, by connecting FTDI UART pins to Black Pill's A9 and A10 pins and using STM32 Add-on to Arduino IDE
Is it possible to program it using an alternative available UART, for example, PA2 and PA3?
Black Pill pinout.


texts: mV variations even with a simple voltage divider

texts:
edit: After using a prototype pcb instead of breadboard, placing all possible electromagnetic sources away and unplugging all the equipment from the same line, my noise dropped 2 orders of magnitude. The main thing that changed the game was pcb and soldering. Now i'm even unable to see any noise on the input side (it's less then 100uV). But of course, probably due to amplifying the input signal 100 times, i have a noise peaking at 300uV at the output of first stage because of the reasons stated below posts.

TL;DR: I have up to 1mV variations even at a basic voltage divider. It's probably not because of multimeter since when I amplify it 100 times, noise is becoming up to 100mV. Is it normal? How can I make it more precise?

I'm just trying to make a basic scale at home for fun.

To study some analog circuits, I decided to make my own instrumentation amplifier with 3 op amps (LM358's, 2 stage, 100x100) to amplify my load sensor values (250nV per gr) x10.000 times to make it readible by a 10 bit ADC.

It seems like it is working but I quickly realized that even at input phase, I had some uV, even mV random noise. After shortening cables, placing decoupling capacitors, changing breadboard etc, it didn't get any better. I tried to read the value of a simple voltage divider and even that thing had the same amount of noise! I don't think it's because of multimeter limitations since when I check the output of first amplifying stage, I've random noise up to 100 millivolts.

What can be the reason of that? Any suggestions?

p.s: the potentiometer thing is just to equalize the initial values of weight sensors. i just put them off to fix my current problem. potentiometers are not existing at the moment.


texts: How to modify a buck converter for higher current output?

texts:
I have a 17V DC power supply which can provide around 50A. I want to build a battery charger using it which outputs 14.6V constant voltage. Therefore, I'm planning to manipulate low cost, widely available LM2596 buck converter module like this.

Everything inside red dashed line after A-B points in typical LM2596 application (which is basically the filtering part) will be replaced by this - a power MOSFET (gate coupled to LM2596 Output), a schottky diode (that can handle 50A) and an appropriate inductor. Feedback will be connected to the output of this part.
Would this work as expected or have I got it wrong? Has anybody tried this before? Your ideas are highly appreciated.
Thanks.


texts: Is it possible to measure distance with signal strength?

texts:
Is it possible to measure the distance between two devices by using RF signal strength if the devices have no obstructions between them?  If so then can 2 or 3 be used to get distance and direction?
How accurate could it be?


texts:
Ok so this is the question along with its four option given in my text book

I can't figure out what the answer should be as it is not stated that is the semiconductor forward biased or reverse biased. I assumed it to be forward biased so according to that i assume the answer should be $C$. Please tell am i correct or wrong and if i am wrong what is the correct solution to it.

Thanks Akash


texts: How can I solve a circuit of resistances with both a voltage and a current-source in between them?

texts:
If I have a circuit that consists out of multiple non-parallel/serial resistances with current/voltage sources in between them like the one below

How can I solve a system like that (in this case for \$I_{10V}\$ and \$V_0\$)?. Would I have to do on a Thévenin equivalent or is there a simpler way?


texts: MOSFET Triggers with Electrostatic Energy

texts: In the attached circuit with a 5V relay and a 30V load across it, I've noticed the FQP30N06L MOSFET triggers with even electrostatic energy (touching the gate). The difference between the circuit under test and this one is rather than a 10K pulldown I'm using a 2K pulldown. Is there a way to prevent electrostatic energy from triggering the MOSFET? Is it just a matter of the pulldown resistor value? The voltage coming into the gate is 3.3V -- the coil voltage is 5V. Any help would be greatly appreciated. GND and GNDA are attached to the 3.3 V circuit and the 5V circuit, respectively.


texts: How do you calculate negative and postive voltages in a grounded circuit?

texts:
This may be a vintage question, I'm not sure. I am self-studying electronics using some old books and came upon the problem below from "Basic Electronics" by RCA Institutes, 1965. The book is fantastic, but some of the terminology and tech is ancient. The answer to the problem in the book is as follows:
The difference in potential between points C and D is 3 Volts. The potential at point B with respect to ground is +1 Volts; at point C 0 Volts; and at point D -3 Volts.
My read of the circuit is that there are 6 volts in the circuit, but I'm confused by the ground at point C. If C is ground and ground is 0 Volts, then it would seem that 6 volts would drop between the positive terminal and point C, meaning that 4 Volts would drop between A and B and 2 Volts between B and C. Similarly, there would be a 6V drop between the source and point C going from the negative pole to ground.
Obviously, I am mistaken, but I'm at a loss as to how to analyze the circuit and pull out the different potentials. I am hoping y'all can shed some light on how they came up with their values.


texts: L7809CV increasing voltage from 3V to 9V

texts: I just got a voltage regulator and I was playing with it in a simple DC circuit. My Source is 3.25V, the OUT pin on the voltage regulator (L7809CV) shows 2.25. My confusion starts with the 1V drop in the energy. I'm not sure I understand how this works very well. If my voltage regulator is a 9V isn't it suppose to take in a lower voltage and increase it up to 9V ? I know the L7809CV is a linear regulator. Do all linear regulators drop voltage? Would I need a booster to increase the voltage instead, or this very one can be set up to work as a booster? Another question, what happens when the voltage in my source drops to (say) 200mV, would the voltage regulator be able to maintain the same 2.5V output until the battery is almost dead? I am not sure how to make sense of the information presented in the data sheet. Thanks much


texts: Help! Verilog loop! The following signal(s) form a combinatorial loop

texts:
I'm trying to complete an assignment using Verilog, the details aren't too important, except that it must be a combinatorial design. Unfortunately I'm running into what I assume is the hardware getting stuck in an infinite loop: the following signal(s) form a combinatorial loop:

the following signal(s) form a combinatorial loop: _n0112, GND_2_o_GND_2_o_mux_66_OUT<1>, mode[2]_GND_2_o_equal_75_o, mode<1>, ran0, mode[2]_GND_2_o_equal_75_o_mmx_out.

Here's my code(I know its messy and can be done better, I'm working on it):

module seven_seg(
input [3:0] a,
input [3:0] b,
input [3:0] c,
input [3:0] d,
input [1:0] mux,
output [6:0] out,
output an0,
output an1,
output an2,
output an3
);

 wire [6:0] x;
 wire [6:0] y;
 wire [6:0] i;
 wire [6:0] j;
 reg [2:0] mode = 3'b000;
 reg ran0;
 reg ran1;
 reg ran2;
 reg ran3;

parameter zero  = 7'b1000000;
parameter one       = 7'b1001111;
parameter two       = 7'b0010010;
parameter three = 7'b0000110;
parameter four      = 7'b1001100;
parameter five      = 7'b0100100;
parameter six       = 7'b0100000;
parameter seven = 7'b0011111;
parameter eight = 7'b0000000;
parameter nine      = 7'b0000100;
parameter ten       = 7'b0001000;
parameter eleven    = 7'b0000000;
parameter twelve    = 7'b0110001;
parameter thirteen= 7'b0000001;
parameter fourteen= 7'b0110000;
parameter fifteen   = 7'b0111000;

assign c = 4'b0001;
assign d = 4'b0000;

assign x = (a == 4'b0000) ? zero :
(a == 4'b0001) ? one :
(a == 4'b0010) ? two :
(a == 4'b0011) ? three :
(a == 4'b0100) ? four :
(a == 4'b0101) ? five :
(a == 4'b0110) ? six :
(a == 4'b0111) ? seven :
(a == 4'b1000) ? eight :
(a == 4'b1001) ? nine :
(a == 4'b1010) ? ten :
(a == 4'b1011) ? eleven :
(a == 4'b1100) ? twelve :
(a == 4'b1101) ? thirteen :
(a == 4'b1111) ? fourteen : fifteen;

assign y = (b == 4'b0000) ? zero :
(b == 4'b0001) ? one :
(b == 4'b0010) ? two :
(b == 4'b0011) ? three :
(b == 4'b0100) ? four :
(b == 4'b0101) ? five :
(b == 4'b0110) ? six :
(b == 4'b0111) ? seven :
(b == 4'b1000) ? eight :
(b == 4'b1001) ? nine :
(b == 4'b1010) ? ten :
(b == 4'b1011) ? eleven :
(b == 4'b1100) ? twelve :
(b == 4'b1101) ? thirteen :
(b == 4'b1111) ? fourteen : fifteen;

always @(*)
begin
    if(mux == 2'b00)
        if(mode == 3'b000)
            mode = 3'b001;
        else if(mode == 3'b010)
            mode = 3'b011;
        else mode = 3'b000;
    else if(mux == 2'b01)
        mode = 3'b000;
    else if(mux == 2'b10)
        mode = 3'b010;
    else //if(mux == 2'b11)
        mode = 3'b100;
end

always @(*)
begin

    if(mode == 3'b000)
        begin
            ran0 = 0;
            ran1 = 1;
            ran2 = 1;
            ran3 = 1;
        end
    else if(mode == 3'b001)
        begin
            ran0 = 1;
            ran1 = 0;
            ran2 = 1;
            ran3 = 1;
        end
    else if(mode == 3'b010)
        begin
            ran0 = 1;
            ran1 = 1;
            ran2 = 0;
            ran3 = 1;
        end
    else if(mode == 3'b011)//011
        begin
            ran0 = 1;
            ran1 = 1;
            ran2 = 1;
            ran3 = 0;
        end
    else
        begin
            ran0 = 0;
            ran1 = 0;
            ran2 = 0;
            ran3 = 1;
        end
end

assign an0 = ran0;
assign an1 = ran1;
assign an2 = ran2;
assign an3 = ran3;

assign out = x;

endmodule

So I think I understand the problem, it has to do with this block:

always @(mux)
begin
    if(mux == 2'b00)
        if(mode == 3'b000)
            mode = 3'b001;
        else if(mode == 3'b010)
            mode = 3'b011;
        else mode = 3'b000;
    else if(mux == 2'b01)
        mode = 3'b000;
    else if(mux == 2'b10)
        mode = 3'b010;
    else //if(mux == 2'b11)
        mode = 3'b100;
end

The synthesizer ends up putting 'mode' into the sensitivity list for some reason, and I believe that's why it ends up in a loop. I would appreciate some more insight as to what's going on here.

Thanks!


texts: Why do small dc motors have round shafts?

texts:
Small dc motors like the one below are commonly used for various tasks in toys and small appliances.

These motors almost exclusively have perfectly cylindrical round shafts without any notches that have an almost polished appearance. The products making use of these motors usually have small plastic gears or corkscrews attached to these shafts which are held by friction alone.
These friction fit parts are usually the first thing to fail in these products which can usually be heard by the motor running on maximum rpm seemingly without making contact with the gear any more.
Why don't these motors have a notch in their shaft to ensure a safe connection?


texts: How to determine if stepper motor will turn clockwise or counter clockwise initially

texts:
Suppose we do not know the state of the rotor initially, then in this picture:

How would we apply voltages to coils 1 and 2 in order to ensure that the motor shaft will spin clockwise or counter clock wise from the beginning? For example, in the picture above with the rotor positioned as shown, if we reversed the voltage so that +V is on 1b and 1a is tied to ground, then couldn't the rotor rotate clockwise OR counter-clockwise?

Thanks!


texts:
I am in no means a electrical engineer or student but i dabble.

I have a project to make a BIG smartphone charger using multiple 1800mAH batteries.

you can choose which cell to use and charge via a three way rotary switch.

My question is do i need a ground somewhere? is there something i am doing wrong?


texts: Transformer different resulting current and voltage than expected

texts:
I am uncertain why the current on the secondary side does not follow the equation:
$$i_2 = \frac{N_1}{N_2} i_1$$
which gives
$$i_2 = \frac{20}{3} i_1$$
To measure the current I use two 1 ohm resistors (one on the primary side, and one on the secondary side) that I measure the voltage drop across using an oscilloscope (Keysight InfiniiVision MSO-X 3012T).
By adjusting the signal generator (inside the oscilloscope) to output a sine wave with an amplitude of 2.5 V, that is, 5 V peak-to-peak, and a frequency anywhere between 10 kHz and 20 MHz, I get that the secondary current is lower than the primary current. From 2 MHz to 10 MHz the amplitude of the secondary current is about 1/3 that of the primary current.
Measuring over the resistance at channel 1 gives a sine with amplitude of 50 mV for most frequencies, that would mean that a sine current of 50 mA is flowing through the resistor and the primary coil. From the equation I would then expect a current of 333 mA at the secondary side, and thus a voltage drop of 333 mV across the resistor on the secondary side. But instead I get currents below 30 mA on the secondary side for all frequencies.
I have the following toroidal core from FERROXCUBE: TN23/14/7-4C65 (link leads to product page at Farnell.com, datasheet is available here).
The image shows how the circuit is wired. Left side is the primary side, and the right side is the secondary side. The reference of the signal generator and all channels are connected directly to ground inside the oscilloscope, that is, the oscilloscope is of the type with common reference.


texts: Cannot find "reverse saturation current" of base-emitter junction in the data-sheet

texts:
Regarding the reverse saturation current \$I_{ES}\$ aka \$ I_{EO}\$  of an NPN transistor, according to Ebers–Moll Model:

\$I_E = I_{ES} (e^{V_{BE}/V_T} -1) -\alpha_RI_{CS}(e^{V_{BC}/V_T}-1)\$

Approximated form becomes:

\$I_E \approx I_{ES} (e^{V_{BE}/V_T} -1)\$  or even more simply:

\$I_E \approx I_{ES} (e^{V_{BE}/V_T})\$

Let's say in a design somehow I want to quantify \$V_{BE}\$ drop more accurately for a desired 1mA emitter current, rather than just taking \$V_{BE}\$  as 700mV.

And in that case knowing the above formula and \$I_{E}\$ = 1mA, \$V_{T}\$ = 26mV I want to quantify \$V_{BE}\$ as:

\$V_{BE} \approx 26×10^{-3}×ln(10^{-3}/I_{ES})\$

So above to quantify \$V_{BE}\$, I'm missing the value for the parameter \$I_{ES}\$.

Here is the datasheet for 2N2222 transistor.

Isn't this parameter called reverse saturation current between the base-emitter junction? Either I cannot find this parameter in the data-sheet, or it is just not there. Is there another name for \$I_{ES}\$ or it is not presented?


texts: collecting Sample points on the oscilloscope

texts:
I am using a 1.5GHz bandwidth and 20GSamples/sec oscilloscope to measure a signal. The measurement is TDR(Time Domain Refelctometry)

I would like to collect the raw data from the oscilloscope. How can I do it?

Thanks & Regards


texts: Using Bench Power supply to charge NiCd pack

texts:
I have an 18vdc battery powered drill hat works fine but the charger has died and a replacement is $54. Almost double what I paid for the drill plus battery plus charger two years back. Battery was still holding a good charge.

The label says, 18vdc 1.2Ah Battery pack

I did some searching and am using a bench power supply charging it in Constant Current mode at 0.750A but the voltage to get that current rate is 24vdc and rising slowly. I have it right alongside me and cannot feel any appreciable heat build up after 30-minutes.

The rising voltage bothers me, is it OK to let it charge like this or should I clamp it at a set voltage. I can't do both this power supply as one setting limits the other.


texts: Using an interface and virtual ground with a non-isolated power supply

texts:
If I use the above rail-splitter with a 24V non-isolated power supply, what can be the problem when used with any load like an opamp ect.?

How would the current loop if the power supply is not isolated through the earth and cause problem? (Please illustrate the current loop if possible.)


texts: Bandwidth and stability of nonlinear circuit

texts:
I'm designing an antilog amplifier which produces an exponential output (0.4 mV to 4 V) for a 50 Hz sawtooth input waveform (4 mV to 4 V ramp). If this were a linear circuit, I could determine the circuit bandwidth by drawing the small-signal model by hand or by performing an ac analysis in SPICE. However, because the circuit performs a nonlinear operation, I'm unsure whether the concept of bandwidth even applies let alone how to calculate it by hand or by simulation.

I'm currently running a transient analysis with a 50 Hz sawtooth input and verifying that there's no noticeable time delay in the output. For stability, I'm applying a large-signal step input and verifying that the output is overdamped. Are these reasonable methods for determining 'bandwidth' and stability of a nonlinear circuit? If I had to do this by hand, what method could be employed for determining the nonlinear equivalent of bandwidth for a particular circuit?


texts: buck or booster converter, difference between R RL load

texts:
I understand the concept of buck or booster converter but I can't find source about what changes if the load is rl instead of just R. Could you help me to see what changes in the characteristics?

At buck converter if my understanding is right it's just the RL load is just L in series with the converter's L.


texts:
I'm modeling a Darlington pair in QUCS to understand better how to use it in practice. The model is below:

The DC analysis predicts a current in the base of T1 of about 1uA and a collector current on T2 of 10.7 mA which is about what I was going for with the biasing.

Now when I look at the AC analysis I find an amplification of only 100 (10 mV pp in, about 800 mV pp out) instead of the 10.000 I would expect from multiplying the betas of the two transistors. Am I thinking this wrong or there is something wrong in the model?


texts: How to create an output for LED brightness control using PWM in PIC

texts:
A PIC is multiplexing multiple common anode 7-segment displays.

An LED driver is being used so PIC does not have to source/sink a lot of current.

To help with multiplexing, each 7-segment display has a PNP transistor connected to its anode. The PIC can control the 7-segment display brightness by controlling duration for which the PNP is on. So basically with 6 7-segment displays, one of them will be on a time, however, on top of that I want to further implement a mechanism like modulated pulse output to the PNP to control the brightness.

I am sure there are multiple ways to do this. What is the most appropriate way to achieve this?


texts: How can I electronically generate a signal similar to the one produced by striking a piezo?

texts:
I feel like this is a bit of an unusual request so I'm having a hard time figuring out how to research it. My question is: is there some way that I can use an Arduino to programmatically generate a signal that very closely resembles the voltage generated when you hit a piezo? Here's some background as to why I want to be able to do that:

As a fun project while I have some time off I decided to try to connect my Alesis electronic drum kit to the video game Rock Band. There is an official solution for connecting a MIDI drum kit to the game, but unfortunately I'm playing on XBox One, where you need an adapter that was produced in extremely small quantities and is now ridiculously expensive. So then I started looking into how I might modify the stock drum controller to get an unofficial solution to the problem.

The drum triggers on the controller are extremely simple. It's just a piezo where the two wires coming off of it are connected directly to the main circuit board with a JST connector. Because there's already a connector there, that's the easiest point for me to connect my homebrew adapter. What I'd like to do is connect an Arduino to each of the JST connectors on the main controller board to allow me to trigger each drum pad programmatically. This would ultimately allow me to convert the MIDI signal from the e-kit into drum hits in-game.

The problem is, the spiky analog signal that's generated when you hit the piezo is very different from the clean digital output of an Arduino pin. The stock drum triggers have two wires: white and colored. As an initial test I tried just connecting the white wire from the JST connector on the controller board to ground on the Arduino and the colored wire to one of the digital outputs. I wrote a quick program that pulls that pin high for a few milliseconds and then pulls it low again, and to my amazement that actually worked to trigger a drum hit in the game!

I tried increasing the frequency of the hits though and quickly ran into a problem. The game is applying some kind of filtering to the signal that causes it to treat a very quick double pulse as a single hit. I can get up to about 10 hits/second with just a dumb 5v square wave, but trying to go faster than that causes it to drop hits like crazy. This makes sense because the piezo will generate a series of diminishing pulses when you hit it a single time so it has to filter that out somehow, but many songs in the game require faster hits than the ~10hz speed limit of my current solution. The stock drum pad has no problem registering hits faster than that so I know there's nothing wrong with the controller board itself. Because I don't have any way to identify the method of filtering they're using my best idea for how to proceed is just to try to reproduce the input signal generated by the piezo as closely as possible. I'm happy to acquire other electrical components but I don't have any ideas for what would let me generate the same kind of high-impedance alternating voltage that you get out of a piezo.

EDIT:

I took a picture of the piezo from the Rock Band stock kit. There are no identifying marks on it that I can see so I can't say exactly what type it is, other than it's one suitable for use as a vibration sensor.


texts: Mystery while driving a NeoPixel Ring (WS2812) with a GEMMA (ATtiny85)

texts:
I am working with an Adafruit GEMMA and NeoPixel Ring 16 LEDs (ATtiny85 and 16 WS2812 leds) and trying to get a program to light the LEDs according to my "pattern" structure below, representing R, G, B, R, G, B, R, G, B.

The code below works but you can see it's not "proper code" what I am aiming for is that the while(1) loop looks like this:

 while(1)
    {
      k++;
      for (i = 0; i < NUM_LEDS; i++) {
        uint8_t l = (i+k) % (PATTERN_LEN);
        uint8_t idx = l * 3;
        set_color(buf, i, pattern[idx], pattern[idx+1], pattern[idx+2]);
      }
      if (k == NUM_LEDS * 10) k = 0;
      output_grb(buf, sizeof(buf));
      _delay_ms(90);
    }

However when I flash this code I get what looks more like a random: I get red red magenta blue green and it changes...

Code that Actually does what I expect which is a set of red LEDs decreasing on intensity and circling around is the one below, which I think should be doing the exact same as the one above.

I am at a loss on how to debug/diagnose the issue, I suspect is related to the compiler but not sure what to change or how to test.

The only difference between the two approaches is in the while(1) loop

Any pointers are welcome.

#define F_CPU   8000000

#include <avr/io.h>
#include <util/delay.h>
#include <stdint.h>
#include <string.h>

#define NUM_LEDS      16
#define BUF_SIZE      (NUM_LEDS * 3)
#define PATTERN_LEN   8

const uint8_t pattern[PATTERN_LEN * 3] = {
  70, 0, 0 ,
  60, 0, 0 ,
  50, 0, 0,
  40, 0, 0 ,
  30, 0, 0 ,
  20, 0, 0 ,
  10, 0, 0 ,
  0,  0, 0
};

// declaration of our ASM function
extern void output_grb(uint8_t * ptr, uint16_t count);

void set_color(uint8_t * p_buf, uint8_t led, uint8_t r, uint8_t g, uint8_t b)
{
  uint16_t index = 3*led;
  p_buf[index++] = g/2;
  p_buf[index++] = r/2;
  p_buf[index] = b/2;
}

int main(void)
{
    uint8_t buf[BUF_SIZE];

    // set PORTB0 as output.-
    DDRB = 0b00000001;   // bit 0 is our output

    // Init to 0, all leds off
    memset(buf, 0, sizeof(buf));
    output_grb(buf, sizeof(buf));
    uint8_t i,k = 0;

    while(1)
    {
      k++;
      for (i = 0; i < NUM_LEDS; i++) {
        uint8_t l = (i+k) % (PATTERN_LEN);
        uint8_t idx = l * 3;
        switch (idx)
        {
          case 0:
            set_color(buf, i, pattern[idx], pattern[idx+1], pattern[idx+2]);
            break;
          case 3:
            set_color(buf, i, pattern[idx], pattern[idx+1], pattern[idx+2]);
            break;
          case 6:
            set_color(buf, i, pattern[idx], pattern[idx+1], pattern[idx+2]);
            break;
          case 9:
            set_color(buf, i, pattern[idx], pattern[idx+1], pattern[idx+2]);
            break;
          case 12:
            set_color(buf, i, pattern[idx], pattern[idx+1], pattern[idx+2]);
            break;
          case 15:
            set_color(buf, i, pattern[idx], pattern[idx+1], pattern[idx+2]);
            break;
          case 18:
            set_color(buf, i, pattern[idx], pattern[idx+1], pattern[idx+2]);
            break;
          case 21:
            set_color(buf, i, pattern[idx], pattern[idx+1], pattern[idx+2]);
            break;
          default:
            set_color(buf, i, 0, 0, 0);
            break;
        }
      }
      if (k == NUM_LEDS * 10) k = 0;
      output_grb(buf, sizeof(buf));
      _delay_ms(90);
    }
}


texts: Another ground question...plastic case with metal front panel, ethernet, connectors

texts:
I'm currently designing a board that will have:

a primary power supply of 24VDC from an external converter
a shielded Ethernet connector
two BNC connectors (for two +/-10V signal, 14 bits, <100Hz)

The housing is in full plastic (screw headers also) but the front panel (and back panel) is metal.

The Ethernet shield is connected to the front panel (metal contacts on the connector).

The BNC are isolated from the front panel.

Power supply connector is isolated from the front panel.

Nothing is connected to the the back panel.

On the 24V power supply rail, I have one isolated DC/DC converter for the logic supply, and another isolated DC/DC converter for the analog supply. Output grounds of digital and analog are connected together in the regulators zone.

The power supply and the acquisition system that is connected to the BNC outputs, will be in the same room. The acquisition system inputs are also isolated.
The board will be connected to a single remote Ethernet peripheral (direct connection), but with about 40m of length.

I'm questioning about the isolation or connections between the following references:

the "chassis ground", i.e. the front panel plate and the Ethernet shield reference
the "power ground", i.e. the input power supply negative reference
the "electronic ground", i.e. the isolated converters output ground

My objectives :

be sure that remote noise / perturbation incoming from Ethernet shield will not damage or perturbate the board.
be sure that ESD discharges on the front panel or the BNC metal part won't damage the board

This is what I was expecting to do: (but after reading and reading documentation, I feel never happy with what I do)

on the input power rail, I already have a TVS (SMCJ48CA-TR) and a common mode filter (744272251).
on each BNC, there is also another TVS (SMA6J13CA-TR) between central pin and ground pin.
connect "power ground after common mode filter" to "electronic ground" on each DC/DC converter with a 100pF/3kV capacitor
connect "power ground before common mode filter" to "chassis ground" through a 100pF/3kV capacitor (power and Ethernet connectors are close)
connect "electronic ground" to "chassis ground" or "power ground" (don't know) through a 100pF/3KV capacitor close to the BNC connectors pins.

I agree, these choices are result of "let's try and see" thinking. This may be shocking, morally or electrically, I don't know :)

I'm afraid of ESD discharges, I guess that's not with 100pF that I will get rid of them. And if a discharge happen on the BNC connectors, where should it go safely?

What should I add or modify or suppress?

Also, not sure where to make the connections before or after the common mode filter (that presents a certain inductance!)

Thank you.


texts: What factors determine the shortest audio signal a common DAC IC can play back?

texts:
I am using a PCM5122 clocked with a 24.576MHz oscillator in an application that must produce fairly short bursts (<5ms) of broadband, ultrasound (15-90kHz) audio at 192kHz sample rate. The design I'm working on is modeled on the HifiBerry DAC Pro. I've noticed a correlation between the frequency of the external oscillator I use and both the spectral resolution of the output and the length of the smallest output of any kind I can produce. In fact, below about 3ms, the DAC will not produce any meaningful levels of sound at all when driven at 24.576MHz. This is true whether or not I pad the output signal with relatively long stretches of silence.

My testing setup uses a Raspberry Pi with several layers of software abstraction from the DAC hardware, so a solution to my entire problem is probably out of scope for this forum. My question for this forum is whether there is a factor besides oscillator frequency at the hardware level of the DAC that fundamentally determines the minimum length sound it can produce. This might take the form of internal click protection, a ramp-up/ramp-down setting, etc. This might apply to this specific IC or to DACs as a class of device.

Thanks for any help you can provide — I am RTFM but hoping to get some guidance if possible as I am a student and fairly new to this topic.


texts:
Say we have 16 bit processor and such CISC instruction:

0001 0010 0100 1000

As far as I understood from the answer on related question

In the process of decoding, this CISC instruction will be split into single hardware instructions.

Does this mean that the size of each small instruction is always the same. Like the 16 bit CISC instruction will be split onto 4 small instructions of 4 bits?

From the link above:

"...more convenient to implement them as a series of elementary instructions that are contained in a very fast internal memory."

Does that mean that small instruction inside CISC instruction (0001 for example) is an address of an internal memory of a CPU that contain like 16 bit (or something) single instruction which then goes to decoder which creates a signal for ALU?


texts: Simple state machine with latching inputs is confusing me

texts:
Okay so this is a question for school, I am not expecting someone to give me the full thought out answer, I just need someone to point me in the right direction as I am confused and my tutor is off on holiday.

Here is the question:

  In this experiment you will be deriving a controller for a simple machine.  The machine is very simple; it is a vending machine that can only accept £1 coins. It can dispense two different items, one costing 67 pence the other costing 52 pence. It has three outputs; one for 10 pence coins, one for 5 pence coins and one for 1 pence coins. Your machine must give change in the minimum number of coins depending on the item selected.  The outputs are each a single signal such that if for example three 10 pence coins were needed in the change then the signal must be pulsed three times.

The problem I am having is that whenever I have made a state machine it has always relied on the inputs. So for example if we were going to do a vending machine then an item might cost 50p. So I make all my states go off what a user is putting into the machine, when a 10p goes in then I will go to state "10p" etc.

This example seems to just have 2 inputs (1 each for each item which both accept £1 coin) and then once the pound coin gets put in the machine just does it's thing without relying on the input again. This is seriously confusing me.

Never mind the getting the output the pulse for each coin output. I am seriously confused :(


texts:
I am working on a project where we have decided to use radar to measure the distance of an object from the device.

I have been using Infineon's BGT24MTR11 (24GHz) evaluation board, (Sense2go), which comes with an integrated patch antenna already onboard.

It will detect movement approximately 5m from the board.

However, we need to accurately measure the distance of objects approximately 100m from the transmitter and have a required detection radius of 10°.

There are issues around 24GHz, (temporary band, astronomy stations, etc.), so we may actually move to 77GHz or 79GHz but for the moment I am sticking with 24GHz.

edit As kindly pointed out by Brian Drummond the sense2go module will not measure 100m, so the 24GHz is not an option and sense2go is off the list .

The regulatory body ETSI, lists only three automotive radar frequencies, 24, 77 & 79GHz, http://www.etsi.org/technologies-clusters/technologies/intelligent-transport/automotive-radar. 77GHz seems to be the most popular.

The next evaluation board on our list comes from Altera  This has a centre frequency around 77GHz.  I tried contacting the supplier of the demo antenna but they did not get back and the feedback I have been getting is that unless you are tier 1 or a major OEM they won't talk to you.

I have been looking in vain for commercially available antennas that will work at these frequencies.

Something like Delphi's system would be ideal.

I am considering designing the antenna using cst, however I have limited experience in antenna design and there are no antenna design experts on the team.

Can anyone make a recommendation for a best course of action (77GHz)?


texts: FTDI d2xx driver not reading bytes on Android to communicate with MDB board to Vending Machine

texts:
When trying the D2xx driver from FTDI, there was no bytes being read by Android Device.

Below are the codes:

when opening a port to use (since only 1 port in android it is default to the first port in list of devices function from the UARTmanager). followed from one of the answer in this website to use restartintask

private void openFunction() throws Exception
{
    this.ftDev = UARTManager.openByIndex(SerialContext, portToUse);

    if (!ftDev.isOpen())
    {
        throw new Exception("openFunction -- SerialCommunicator: Unable To open FTDI device for communication.");
    }

    this.ftDev.restartInTask();
}

once it connected, tried sending a message:

int status = ftDev.write(byteToSend, byteToSend.length);
this.trace("send Status: " + Integer.toString(status));

the Problem here is the status return from the write is always 5, there is no documentation in the FTDI website that tells what meaning of each status return is after write operation. the length of bytetosend was 2

when reading from the hardware containing the FTDI chipset:

public byte serialReadByte()
{
    this.readCompleted = false;

    new ReadAsyncTask().execute();

    while(!this.readCompleted) {}

    if(this.fromSerial != null && this.fromSerial.length > 0)
    {
        return this.fromSerial[0];
    }

    return null;
}

private class ReadAsyncTask extends AsyncTask<Void, Void, Void>{

        @Override
        protected Void doInBackground(Void... arg0) {

            int totalRead = ftDev.getQueueStatus();

            fromSerial = new byte[1];

            if(totalRead > 0)
            {
                ftDev.read(fromSerial, 1);
            }

            readCompleted = true;

            return null;
        }

    }

the problem here is nothing is being return from the read. Followed from one of the answers here to put it in a thread as seen in current code

out of option here, maybe you guys have any idea about this? the FTDI model is FT230XS-R and using the FTDI Driver's UARTManager.

Searched for other driver available in the internet, only to find it only supports FT232, maybe you guys could suggest a driver that works for the FT230XS-R FTDI chipset?


texts: Why are so many RF remote boards relay-based?

texts:
I'm working on a device that illuminates a signal LED when a button on a remote is pressed. I have a working prototype based on a pre-fabricated board I bought on Amazon (see here), and it's nice! But now I'm toying with the idea of producing these on a larger scale, and looking for a less expensive solution.

The thing I keep running into is that every system like this one is relay-based, and for the life of me I can't figure out why. Couldn't the same thing be achieved with a transistor? Is there a generally less-expensive solution out there I should be looking for?

Spoiler alert: I'm very new to electronics design, please explain like I'm five.


texts: Diode break-down voltage in Half-wave rectifier

texts:
In the book this form of half-wave rectifier voltmeter is introduced first and then the author says that there is a problem in this circuit: that when the AC source is in the reverse direction there is a chance that the diode may break-down causing damage to meter. I understand this part. Then he gives a modified version of this voltmeter:

Now he says that during reverse operation this D2 will be forward biased and there will be no problem.

But now there is a problem when the AC is positive, I mean this diode D2 can break-down in the positive operation. Nothing has been mentioned about this. I simply wanted to confirm: am I right in thinking so? And If I am not, what may be the reasons?


texts:
For this given circuit bellow, how do I calculate the phase angle? For my example I have values, but I would like the general approach formula, this is what I have done so far

Calculated
X_L = 2*pifL
X_C = -1/(2*pifL)

X_CL = (X_L - X_C)

Z = R*jX_CL/(R+jX_CL)

However at this point (with values) I am getting the wrong answer. Where am I doing wrong?

PS. I inserted the values in Wolframalpha and got the wrong angle hence why I am here.

Thanks!

EDIT: I'll include values if it helps explaination
f = 24 Hz
L = 6 H
c = 43 microF
R = 176
U = 8V


texts: Is this wiring between two USB-C connectors (receptacle) valid?

texts:
I am working on a small (hobby) device that does passthrough of USB-C connection (signals are untouched, only power/gnd are used in the device).

To simplify assembly I put both receptacles on the top side of PCB. But since there are too many differential pairs in this setup they are all crossed. However if I "simulate" upside-down connection (which is supported by USB-C connector), then all signal lines are simple straight lines! This means connecting RX1N to RX2N, TX2N to TX1N etc. (see schematic below)

So I wonder if this wiring is valid? Is there any possible issues with this (non-compliant cables aside)?


texts: Can we extract CTR parameter of an optocoupler from its SPICE model this way?

texts:
Regarding 4N26 optocoupler, I tried to obtain the following results from the datasheet by LTspice:

So as in the test condition I set the forward current 10mA and I set the Rload such that Vce = 10V.

If my setup is correct, the LTspice simulation outputs 7mA current for 10mA forward current at test condition where Vce = 10V.

So in my case CTR becomes 70%. Is what I am doing correct? Does that mean for the SPICE model of 4N26 the CTR is set 70%? By the way why would they do this test in active region where Vce = 10V? Isnt it better to use this device in saturation region?


texts: Can the button still work if being far away from Pull-Up Resistor?

texts: Here is the illustration for pull-up resistor, I am wondering if the button still can drain the input voltage to GND when the wire between button to MCU is very long which increases the impedence of wire to certain extent(Need determined, i.e. Wire impedence vs R1 and R2).


texts: Whats is this switch? (6 Pins with FD written on it)

texts:
Hi this is a beginners questions.

We are trying to repair a sub-woofer and have diagnosed that its the power switch is causing the problem,  The only problem is we can't find a replacement.

Although i don't expect anyone to find a replacement but if you could tell us a bit more information about the switches type/name would be really helpful.


texts: How does a battery ( primary cell ) work?

texts:
I'm having an hard time understanding primary cells.
There are plenty of videos and explanations about the reactions that happen inside the battery, but you must have a strong background in chemistry to really understand them.
Instead, I would love to have a description that abstracts from the chemicals details, and still manages to explain its basic working princeples!
I would like it to address the following questions/doubts:

Electrons flow form higher potential to lower potential so, when you buy a
battery, is an electric field already there, before connecting it to a wire?
(I presume yes)
So,How is this field created? Are the electrons at the top and the protons at
the bottom, or just electrons at the top and the bottom is neutral? How are
electrons kept together in the same place before connecting the battery
to the wire? What does prevent them to flow inside the battery?
How does the battery pump up the electrons? and at which rate?
What makes it burn out? and after many cycles does it burn out?

I know there are a lot of questions but my mind is exploding. I don't expect everything to be abstracted from the chemicals but as long as you can through analogies, or intuitive principles, i'd love that. Anyway the main intent of the answer must be addressing the doubts listed.


texts:
I've built a temperature sensor module that runs off of 4xAA batteries and sends data back to a computer via XBee.  Works great, until the weather gets cold.  At that point, the rechargeable AA batteries (I've tried duracell and eneloop) die very quickly.  At 40 or so it seems like they can hardly muster the 3.3V needed to power the wireless.

This needs to be battery powered - running a wire to it isn't an option.

I'm trying plain old alkalines right now, but I was wondering if anyone had any tips on getting enough power out of batteries during the winter.  Do I just need to double up and use 8 batteries?  Do NiCad or LiPo cells work better than NiMH?  Would switching to a different wireless module that can handle lower voltage solve the problem?


texts:
I have some questions about gas sensors:

If I want to detect several gases at once, do I just need one sensor or will I need one sensor for each gas?
How will I know which gas I am measuring?

These questions are based from the datasheet of (for example) MQ-5 Sensor:

MQ-5 can detect many gases, I suppose these are laboratory measures. If there are two gases like CO and CH4, the output value will be different and if the ambience changes, I will get wrong results.

If for example I wanted to measure CO and CH4 at time, I would need one sensor very sensitive to CO and not very sensitive to CH4 and then the other sensor to be very sensitive to CH4 and not to CO.

Am I right?

Thank you very much


texts:
The title of this datasheet is "Sub-Miniature Slide Switches". What meaning does "Sub-Miniature" add?

I notice that "SMA connector" also contains the term "Sub-Miniature". What does "Sub-Miniature" mean?


texts:
I'm building a rectifier to rectify a 3-phase signal for part of a school project, so I'm not working at these power levels without help and supervision.

This seems to be an appropriate circuit as far as the rectifying goes, but I have some questions. I've found that choosing diodes based on their datasheets isn't as straightforward as I anticipated. The system I'm dealing with handles a lot of power; specifically, it has to handle max values of 40V and 40A, or 1.6kW of power.

I'm interested in achieving maximum power transfer, so I want to minimize the diode forward voltage drop. For that reason I've been looking mainly at Schottky diodes.

Here is a link to the datasheet to a diode that may be suitable. And here is a summary of the important specs:

Max forward voltage drop (@ junction temp = 25°C): .48V

Peak repetitive reverse voltage: 45V

Average rectified output current: 12A

Non-Repetitive Peak Forward Surge Current 8.3ms
Single Half Sine-Wave Superimposed on Rated Load: 200A

The peak repetitive reverse voltage makes sense regarding how much voltage the diode can handle, but the maximum current rating is a little ambiguous to me. What does the last parameter mean exactly? It seems like the diode can handle up to 200A as long as it's not held at the limit for too long. But how can this value be so large while the average rectified output current is only 12A? Either way, it seems like this diode won't do since it can only handle 12A on average.

I couldn't find a direct link for the next diode's datasheet, but it's the first hit on Google via this link. From what I've seen, I think you would call this a "dual" Schottky diode. Here is a summary of the relevant specs:

Max forward voltage drop (@ junction temp = 25°C, forward current = 60A): .90V

Peak repetitive reverse voltage: 200V

Average rectified output current: 75A

Non-Repetitive Peak Forward Surge Current 8.3ms (@ junction temp = 45°C): 600A

First off, is it common to use these "dual" diodes for this kind of thing? The forward voltage drop seems very high for a Schottky. Is that for both diodes in a forward-biased state? The datasheet does say that all ratings are "per leg", so my guess is no. Besides that, I this diode more than able to work with what I'm trying to do.

I'm still searching, but those are the only good candidates I've found so far. It's easy to find diodes rated for either high current or high voltage, but not for both. Why is that?


texts: I've been given a question like Draw the spectrum of FM signal with modulation index beta = 0, 1 ,2,2.5. I know that it is something related to finding bessels values of the given beta but I don't know what to do after finding the values.My teacher simply posted a solution without any explanation.I've kept the image of solution please tell me how to get those answers.


texts: How do I determine the resonance frequency of this circuit

texts:
I have a circuit that consists of a voltage source in series with a resistor and a parallel of an inductor with a capacitor.
I have to determine the resonance frequency of this circuit.
I am very confused about this.
First of all the impedance of the circuit is given by

$$Z=R+j(\frac{\omega L}{1-\omega^2 L C})$$

Now my thought was immediately to proceed as I did in the RLC series circuit i.e. to make the imaginary part of Z zero.

I obtain \$\omega=0\$. However the correct answer should be: $$\omega=\frac{1}{\sqrt{LC}}$$

But that would make the imaginary part of the impedance infinity and therefore the whole impedance infinity and the current zero. But isn't impedance when the current reaches its peak?

I'm so confused about all of this. I read that there is series impedance and parallel resonance but what should I peak and why are there 2 types of resonance. Shouldn't they be equivalent? Isn't resonance just the circuit behaving as a resistor?

Can someone explain me what is going on?
Thanks!


texts: How to select gate and gate-source resistors and N-MOSFET for controlling a 5V load from 3.3V input?

texts:
I want to control a 5V valve from my BeagleBone Black.

As a single GPIO port only has 3.3V with 8mA I cannot use common relays.

I found this thread:
how to use a 3v output to control a 5v relay
which covers the same issue. However I do not understand the result.

Does a single N-Mosfet enough to let this work or do I need all components shown in the circuit?

How do I calculate the values and type of the resistors, diode and N-MOSFET in that type of circuit?


texts: Kill A Watt reports 2.5 amps but with a power factor of 0.4

texts:
My computer isn't using anywhere near 2.5 amps (It's using less than half that) however my kill a watt reports 2.5 amps with a power factor of 0.4. This computer needs to run on a 2 amp circuit, would there be any issues with this?

Or does this mean that because my powersupply is missing a capacitor to bring my power factor closer to one. It will only work on a circuit that can support 2.5 amps. Also in that case is there any kind of plug I could plug into a wall socket that my plug would go into to raise the power factor?


texts: Question about bjt audio amplifier circuit

texts:
Thats a simple audio amplifier transistor/bjt circuit. I wonder why the capacitor C1 is used in the circuit when ac variations from the mic can be superimposed on dc directly in many ways. Secondly why voltage divider bias is used usually to make the audio amplifiers. In almost all books voltage divider bias configuration is used so what is the significance of using it ?

simulate this circuit – Schematic created using CircuitLab


texts: how to choose/design a capacitor value for surge current(for protection) for DC brush motor?

texts:
I am driving a DC BRUSH Motor at 30.V.D.C and the current is 300 Millie ampere, it is powered by L.M.317 I.C .My sir is suggesting to provide a capacitor as a protection form surge/peak current resulting from the motor when it gets on initially. capacitor should be placed in between motor and regulator(l.m.317) I.C.
Can any one help me how to calculate this capacitor value with formula and what all parameters i need to consider?


texts: What is the purpose of this copper plate inside the SMPS transformer?

texts:
I took apart a laptop PSU, and inside the transformer there is a small copper plate electrically connected to a pin of one of the secondary windings which is grounded on the PCB:

The plate is about 1x1 cm and is entirely visible on the picture. It was originally behind a layer of insulation tape. What could be its purpose? I would expect to see a copper shield between the primary and the secondary windings, not on a side. If this plate is used for EMI suppression, then how does it work?


texts: P-channel MOSFET stays on when the gate driver is unpowered

texts:
I can't change bulb wiring so I used P-channel MOSFET to PWM bulbs. To save the space I used gate driver and in order to save battery life all ICs are powered from ignition (interruptible 12V). MOSFETs' source is powered from separated fused 12V line.

Driver's output stage is tied to the ground so I added pull-up resistor to the gate to keep it off when the driver is off.

The problem is MOSFET is fully on when the driver is powered off.
Vgs is -2.41V. Should I unsolder the driver - MOSFET is off.
When the driver is powered - everything works as expected
Can't get what am I doing wrong here.


texts: State Space model for a MIMO, coupled system

texts:
I came across a non-linear MIMO system with coupled inputs which is to be modelled in state space form. The kinematics are as follows:

$$
\ddot{x} = F_Ecos(\psi)sin(\theta) + F_Esin(\psi)cos(\theta) +F_scos(\theta) \\
\ddot{y} = F_Ecos(\psi)cos(\theta) - F_Esin(\psi)sin(\theta) - F_ssin(\theta)\\
\ddot{\theta} = F_Esin(\psi)(l_1+l_n) - l_2F_s\\
$$

The standard state space form below assumes a linear time invariant system and the state vector q decoupled from the input vector u.
$$
\dot{q} = Aq + Bu\\
y = Cq + Du
$$

Assume that \$cos(\theta)=1, sin(\theta) = \theta\$, \$cos(\psi)=1, sin(\psi) = \psi\$ for small angles. In the kinematics above, inputs \$u = [F_E, \psi, F_s]\$. This gives rise to the following:

$$
\ddot{x} = F_E\theta + F_E\psi +F_s \\
\ddot{y} = F_E - F_E\psi\theta - F_s\theta\\
\ddot{\theta} = F_E\psi(l_1+l_n) - l_2F_s\\
$$

If the state \$q = [x, \dot{x}, y, \dot{y}, \theta, \dot{\theta} ]\$, this means that \$\dot{q}\$ is evaluated in terms of multiple inputs and states multiplied together (coupled). Example with \$\ddot{x}\$:

$$
\dot{q_2} = u_1q_5 +u_1u_2 + u_3
$$

However, state space standard form cannot represent this since the inputs are multiplied by constants in \$\dot{q}\$. My questions are;

Can we still use state space for this system?
If we still want matrices A, B, C, D, is there a decoupling method/transformation which is used to modify the kinematic equations?
If we had to design 3 PIDs to control the 3 inputs, should we assume independence between the inputs and thus "decouple" the system by this assumption? I looked into Relative Gain Arrays for this part.

I searched books, tutorials and notes tirelessly, but they all seem to consider a simple example having inputs decoupled from the states and with a constant. An LQR is to be designed on a system similar to the above, but the state space form is needed for this. Any hints are appreciated.


texts: How do I know which is the correct AI to connect to a system's "Synch Out" pin?

texts:
I am trying to measure a square signal that I should be obtaining from the "Trigger In" (Trigger Input)  and the "Ground" pins being connected to the oscilloscope.
The signal we ought to be getting is not the one shown, so I was advised to connect the "Synch Out" pin (Frame Synchronisation Output) to the DAQ* AI (Analog Input).
How do I know which is the correct AI "socket" to connect the "Synch Out" to?
Is it as simple as just connecting a cable to this "socket"?
I leave this link which might help better understand the system.

*Data Acquisition System that, once the correct signal is obtained, must be connected to the 3 pins above mentioned.
I have only ever studied theoretical physics before so this is a completely new field for me, if my explanation was not good enough, I can try to further explain it.


texts:
Back then, 90V dc motors were controlled by SCRs. Nowadays, some of them are PWM-controlled as happen in treadmills. Basically my question is:
120VAC rectified and filtered are about 170VDC (It's what I normally see in these boards). For a 90VDC motor, this is too much. The idea on this is controlling the duty cycle under 50%?


texts: AC/DC converter followed by DC/DC converters

texts:
I really like experimenting with DC power converter designs and want to build some lab bench power supplies for fun. I do not have interest in dealing with AC power.
I’d like to buy an off the shelf AC/DC converter and then follow it with my own DC/DC converter design. How standard practice is this?
It’s not really clear to me if AC/DC converters generally already include a DC/DC regulator on the output. Cascading two DC/DC converters seems like such a waste, from an efficiency perspective.


texts: How to make a circuit to pulse an output when a momentary switch is released

texts:
I need to make a circuit that has a momentary switch and a light (30mW). When the switch is pressed, nothing should happen, but when the switch is released, I want it to pulse the light for a short duration (around 20 - 30ms)

I think I might be able to accomplish this with a capacitor and some 555 timers, but I'm honestly at a loss as to how to assemble it, or if it can be accomplished with just these components.

I feel bad asking for help with something that sounds so simple. But honestly, I'm pretty ignorant in developing even simple circuits. The affordability of Arduinos has really made me lazy and it's a problem. In the past, if I needed to make a light blink, I used $2 nano clone from China. Now I need to make a real circuit and I'm at a loss.

Any help would be much appreciated!

Thanks.


texts: How to calculate the base-current of this transistor?

texts:
Newbie in eelctronics here.
How would you calculate the current trought the base of the first transistor?

simulate this circuit – Schematic created using CircuitLab

follow-up question: What is the goal of R3?


texts: Powering high power LEDs without resistors

texts:
I have a bunch of 3W UV LEDs which take 3.6V@0.7A each approximately.

I need to power 50 of them since I need about 150W total power.

My power supply is 12V, so I need to lower that down to 3.3-3.6V to power the LEDs without breaking them.

If I use the standard resistor-diode circuit, it would be something like this:

simulate this circuit – Schematic created using CircuitLab

Calculations:

Vp = 12V  - PSU voltage
Vd = 3.3V - diode voltage
Id = 0.7A - diode current

Vr = Vp - Vd = 12V - 3.3V = 8.7V
R = 8.7V / 0.7A ~= 13Ω

Pr = R * Id^2 = 13Ω * (0.7A)^2 ~= 7W - resistor power

If my calculations are correct, I would need a 13Ωx7W resistor for each led, and the circuit would draw approximately (7W + 3W) * 50 leds = 500W.

Now, I don't have a PSU which can provide that much power, high power resitors are quite big and I think there is a more modern approach to this problem I don't know about.

Is there a way to avoid using resistors to regulate voltage on high power LEDs?


texts: Will an SPI EEPROM chip have the same issues with non-atomic write operations as a dsPIC's internal EEPROM?

texts:
A while back I had some intermittent trouble with the internal EEPROM of a dsPIC. Every so often, some value in the EEPROM would be found zeroed out on power-on. I tracked the problem down to when the chip lost power after the erase step of the write cycle, but before the write had completed. It was all about the timing of the power-down relative to the firmware execution, which was (in normal operation) random. I solved this by adding a buffer section to my EEPROM, to ensure that an incomplete write-cycle could be completed on restoration of power. I had to turn EEPROM writes into an atomic operation.

(For further detail, my buffering technique defines an area of persistent memory that consists of three fields: address to write to, data to be written, and a READY flag. A "write" consists of four steps: write to buffer, set READY flag, write from buffer, clear READY flag. On power-up, you check the READY flag. If it's set, execute whatever's in the buffer. This worked well in internal EEPROM.)

Now I'm using a different dsPIC without internal EEPROM, and I'm trying to use an external EEPROM chip to store persistent data. I'm wondering if I should have similar concerns. Should I be worried that my external EEPROM chip will power down mid-write and lose data, and write a fix for this in my firmware like I did for internal EEPROM? Or does the chip itself guarantee atomic write operations?


texts: How can I output to one of 4 different outputs without using a demultiplexer?

texts: I do not have a demultiplexer available, so I need a substitute. I have a TTL signal and I need to output the signal to output 1, then output 2, then output 3, then output 4 in sequence, meaning that when one of the outputs is high, the other 3 must be low. How do I accomplish this without using a DEMUX?


texts:
Recently I have taken an old MP4 apart so I could maybe reuse some of it's parts. One of them is the touchscreen panel, but the big problem is, I don't know the pin layout of it. Is there a way I could figure it out?

Foxlink 8287-0269-5080 REV1.0 (4108)

After taking some time I have tried some things and could identify 9 pins:

01-(nothing?)
02-
03-
04-
05-
06-
07-
08-
09-
10-
11-
12-
13-
14-
15-
16-
17-
18-
19-
20-
21-
22-
23-
24-
25-
26-Touchpanel Y-
27-Touchpanel X-
28-Touchpanel Y+
29-Touchpanel X+
30-LED A Backlight
31-LED K1 Backlight
32-LED K2 Backlight
33-LED K3 Backlight
34-LED K4 Backlight
35-Connected with the C1
36-Linked with 35
37-(nothing?)

I still have the MP4 board which I can hook up on a 3.7V source (battery output) and maybe measure the output of the pins. But even with the measurement I don't know what pin does what. I would appreciate if someone could explain how to analyze the panel and maybe identify some other pins from these pictures:

I have been able to find a similar panel here, but sadly I can't read the language. A user has posted his work there which looks like this:

One more question what I would have is: how can I find out where ground (GND) is? For the most simple analysis I need to be able to connect my sources to the GND pin. Is there a way to figure it out on the panel?

Thank you in advance!

P.S. Sorry if I made some kind mistake, I am new to this part of StackExchange.


texts: Calibration of magnetometer for precise yaw

texts:
I'm using Sparkfun Razor IMU 9DOF sensor which incorporates accelerometer, gyroscope, and magnetometer, for giving the Euler's angles (yaw, pitch, and roll). I'm using the firmware at this link. It has Processing sketch for calibration of magnetometer, but it doesn't give the precise measurements. Especially, the yaw is imprecise. I'm using this sensor for measuring azimuth and altitude of stellar objects. The altitude is mostly correct, but azimuth (yaw) isn't.

I have several questions:

Is there a better way to calibrate magnetometer? Is the calibration sufficient, without using the Madgwick or Kalman filter?
Is there some nonlinearity present in the sensor? Since the yaw offset isn't constant, it changes (around -12 degrees up north to almost correct value at southwest). And if it is, how could I measure that nonlinearity and apply to the yaw measurements?
If I have to use Madgwick or Kalman, do I have to apply them on quaternions? I believe that applying them at the final yaw measurements wouldn't do the job.


texts:
I have a linear system with transfer function \$G(s)\$ that is connected in negative feedback with a real value gain \$K\$.

Therefore the open loop transfer function is \$K \cdot G(s)\$

and the closed loop transfer function is \$G(s) / (1 + K \cdot G(s))\$

My question is : "is there a way I can obtain the closed loop response of a change on the gain from \$K\$ to \$K + a\$ where \$a\$ is another real value ?"

Edit:
I would like to obtain the response in the time domain where I can see the reaction of the system to the change of the gain from \$K\$ to \$K+a\$.


texts: Need help finding my mistake using Thenevin's Theorem for this circuit (not homework!)

texts:
So I have the following circuit (an example from my textbook).  The answer for V_o is 3.88V.  I got the wrong answer and I'm not sure where I went wrong.

I know I could solve for V_o using other techniques (perhaps mesh or nodal analysis), however, I specifically need to work this problem to practice Thenevin's theorem ("any linear electrical network with voltage and current sources and only resistances can be replaced at terminals A-B by an equivalent voltage source Vth in series connection with an equivalent resistance Rth.")

Will someone please follow my procedure and tell me what I did wrong?  Thank you in advance.

My steps:

1) Remove the 1k ohm resistor, resulting in the following:

2) Now I have to find E_Th which is the voltage across the two terminals
   that I just opened.
3) I will choose to use mesh analysis for the three remaining loops
   since I have a couple independent current sources.

    4) The mesh equation (KVL) for I_2 is:
       3k*(I2 - 8/1k) + 6K(I2-2/1k) + 6K*I2 + 12 = 0

   Simplified:

   3k*I2 - 24 + 6k*I2 - 12 + 6K*I2 + 12 = 0

   15k*I2 = 24

   I2 = 24/15K = 8/3K A = 2.667 mA

5) Now that I know I_2 is 2.667 mA, I can calculate the voltage across
   6K ohm resistor, which is 2.667mA * 6k = 16V

6) Calculating the voltage across the 2K ohm resistor:
   2k*2mA = 4V

7) Now this is where I think I'm making a mistake.  I'm just
   summing the voltages: 4V + 16V + 12V = 32V.  I don't think that's right.
   If it is right, then E_Th = 32V.

8)  Removing all the independent sources by replacing the current sources
    with opens and the voltage source with a short, I get the following:

9) From this, I need to find the equivalent resistance:
   [(6k in series with 3k) || 6k ] + 2k

    6k + 3k = 9k
    9k || 6k = 6*9/6+9 = 54/15
    54/15 k + 2k = 5.6k ohms = R_Th

10) Now, building the Thenevin circuit with E_Th, R_Th and adding the removed
    1k ohm resistor from step 1:

11)  Now, voltage division:

     V_1k = 1k/(1k + 5.6k) * 32
          = 4.84 V = V_o

So, that's obviously wrong... where did I mess up, and how do I fix this?


texts: What good resources are there for a high school student to start learning electronics?

texts:
I have a couple years of experience with computers - I can program, and I know computers really well. But I don't understand them.

This leads to a broader scope - I don't understand electronics in general. I have read some internet articles, like howstuffworks.com, that kind of thing. I understand the basics, but about 90%  of it is beyond me.

Where do I learn? What books can I read? What websites can I go to? I'm especially interested in knowing what books I can read to understand more about electronics.


texts: Is it normal/common to use this way of connecting point to point wire?

texts:
I want to make a circuit and am uncertain if the following is feasible/common and if there are better solution.

From the pin headers (the light blue circles), e.g. GndIn (upper yellow circle), I want to use 24AWG stranded wire to three other places on my protoboard (and one other), see the lower yellow circle.

Should I:

Solder it like in the picture (one pin header with three wires soldered directly to the pin header); I can imagine it's a bit hard to solder three wires at the same time', maybe I should connect them first and solder them as one wire
Make a vertical solder line until three pins below the GndIn pin header and solder each wire to a separate protoboard hole? However, this takes more space.
Use another solution?

And I have actually the same questions for IC pins (not clearly shown in my example picture).

The protoboard I use is this type:


texts: Designing a voltage follower that can provide up to 5A of current to a load

texts:
I'm trying to dabble in analog circuit design, but I honestly am a complete newcomer in this area as my strengths are in CS. Sorry if this question sounds stupid, but can anyone help me with designing a voltage follower that can deliver large amounts of current to an external circuit (a purely resistive circuit). I've come up with a simple solution that doesn't quite work as the feedback load regulation is really bad (the voltage doesn't transfer over well).

Since I require a large amount of current, I can't just design an op amp voltage follower since I don't want to opt for the more expensive op amps that can provide upto 5A (if they even exist).

My attempt: . The voltage over the resistor is close to 3V instead of the 8V that I want. The voltage over the load should stay the same regardless of the load value.

Any help in this matter would be greatly appreciated! Thank you so much!


texts: Capacitors in a voltage regulation circuit

texts:
I'm building just a basic 12v regulator circuit with a LM7812 (it will be knocking a 15v wall wart down to 12v) and pretty much every example I see online uses 100uF caps in the circuit.  How critical is that 100uF value?

I have some a little lower and some a little higher on hand but I'm not clear on why its 100uF or if that can change. (Generally, I'm not clear on when to use what value cap yet in circuits...)


texts: In what direction is the photodiode placed in a CMOS image sensor?

texts:
I am currently trying to understand how a CMOS Active Pixel Sensor (APS) works. I came across two different diagrams (one in a presentation, the other one from wikipedia). Which is the correct way to put the diode?
I would imagine the holes produced in the second circuit to immediately flow off to GND.

Also wouldn't the RST need to be kept always on to reverse bias the diode? But then you cannot build up a voltage from incident light, can you? Or does it also work without bias?


texts: Is there any way to program dsPIC33EP in C++?

texts: Is there any way to program dsPIC33EP in C++ ??


texts: How should I interpret numbers 3 and 4 on the footprint schematic?

texts: I am creating a foot print for this PoE magjack and was wondering how to correctly interpret the symbols for 3 and 4 on page 5. From the schematic, these pins get wired but I am confused as to why they are not holes. Thanks


texts: Noise reduction in switching power supplies

texts:
What's the best solution for noise reduction in switching power supplies?

I'm going to use a switching dc to dc buck converter to supply an STM32 Cortex-M4 microcontroller.
But I'm a little concerned about reliability of the supply.

What considerations must be made when an mcu connected directly to a switching regulator that works at very high frequency?


texts: How to Calculate Theoretical Capacity and Energy Density of Li Ion Battery

texts: Specifically if the cathode and anode are known materials how do you calculate the theoretical capacity and energy density of the full cell?  For example if you have a Lithium Iron Phosphate cathode and graphite anode.


texts:
In general...
1206 resistors have their value marked on them.
Why don't 1206 capacitors have their values marked?
The only reason I can guess is that marking them would somehow change their capacitance. Is this realistic?


texts:
Sometimes I get a notice from a manufacturer that a part has gone obsolete.  I now have to find a new part from a different manufacturer to put on the BOM.

For a resistor or capacitor, it is pretty easy to look up the value, tolerance, temperature range, etc. of the original part and find a replacement.

Some ICs are easier than others.  There are lots of OpAmps and RS232 drivers.  But there is still the battle of finding the IC in the correct footprint.

I'm trying to design in several drop-in-replacement parts for a new design.  I'm stuck on finding some compatible Analog to Digital Converters.

Does anyone know of a site or method for finding this?


texts: How input and output multiplexers work in ADV7800?

texts:
I was going through IC ADV7800 datasheet, getting confused with the functionality of two multiplexers given in its block diagram. Attaching picture of the same.

For first MUX there is 12 inputs and 4 outputs, and for second one there is 4 input and four output. How it is possible ?

Edit:
Detailed block diagram


texts: What do the K and N in the triangles mean?

texts: This is a block diagram for a detection algorithm later implemented into a circuit.


texts:
I have a project to build an intercom using op amp 741, because it is easy to find and is the only one that currently has access because of my location.
Below the schematic diagram which I designed.
The problem is that I can not solve a noise in the output like a noise of 60Hz, example of the noise: "tummmmmm" (audio link below on the website of vocaroo), this noise is so direct, even adjusting the gain with a potentiometer in step 1, the 330k ohm R13 resistor or in volume step 2 in the 10k RV1 resistor.
Note: I tried to increase the power resistor of the electret is still continues.
This amplifier will be outside and the microphone will be wired at a distance of + - 80/100 meters.
The diagram is attached below.
Has anyone ever experienced this? Or do you know how you know how to solve this problem with this noise?
Thanks in advance!.
https://vocaroo.com/i/s0jIWlJ8e3Yy


texts: LMR16030 voltage regulator pin configuration

texts:
I just bought a HSOIC-8 LMR16030 and have tried to plugged it in my circuit but didn't manage to make it work. I'm thinking this might be due to me misunderstanding the pin configuration. What are the pin numbers in this picture?

Updated: Zoomed image (2x original dimensions on each side)


texts:
We're currently in the process of choosing an FPGA for our new gizmo.  Our project will have a non-negligible cost and should last us for a long time.

Now, with each new FPGA of a particular line (say, Xilinx Virtex) being more powerful than its predecessors (the Virtex 7 vs. the Virtx 6 vs. the Virtex 5 etc), and since we'd like to choose an FPGA which is as powerful as possible to allow for future enhancements, we're tempted to choose the latest-and-greatest chip that we can get.

On the other hand, new chips and their toolchains tend to have their teething problems, and we certainly don't want to have any hassle from that side.

What's your rule of thunb - how old must an FPGA be so that it can be considered mature enough for a project?  Or, how else would you gauge the fitness of an FPGA? By numbers of chips sold, or by the number of high-wire projects that use it?


texts: How can I determine how much memory a function occupies?

texts:
How can I view how much program memory a function is occupying ?

I am currently at 95% program memory usage and do not have a licence to enable optimization. I am looking to find out which functions are largest, so I can see if I can perform any manual optimizations there.

I believe I found a way to view how big variables are, by looking at the *.lst file and spotted some things that can be done there.

Compiler is gcc based (Microchip XC8).


texts:
When I hold my oscilloscope probe and ground clip out in the air, I get a noisy ripple with a predictable pattern. Nothing unusual here.

When I touch the tip of the probe to the ground clip, I get a beautiful flat line. Also predictable.

When I take a piece of free wire and clip the ground clip to one end and the probe tip to the other, I also get a beautiful flat line.

When I clip both the ground clip AND THE PROBE TIP next to each other on a ground wire from my circuit board, I get a very similar ripple pattern as in the air.

When moving my probe around in the air, the noise gets louder as I approach my switching power supply. This likely has something to do with the noise in my circuit (if it is even there?
Can my circuit cause this behavior, or is it a measurement cravat? Is it behaving like an antenna? How can I improve the reliability of my measurements (spikes are on the order of 100mv btw)?


texts: STM32 Matrix LED 8x8 Display using SPI Interface with MAX7219 in Proteus Simulation

texts:
I was trying to do a project in Proteus Desing Suite which needs to use a Matrix LED Display with size of 8x8 using MAX7219 SPI Interface. The problem occurs when I try to simulate it.
I'm trying to do a smiley face but the software always show me all the dots are ON, doesn't care what values I send to the MAX7219. I show here an screenshot:

I tried to do something similar with a two 7-segment Display LCD and the result is better, I get the correct values, but then both start flickering.

Code I'm using:
/* Main.c file generated by New Project wizard
 *
 * Created:   do. dic. 20 2020
 * Processor: STM32F103C6
 * Compiler:  Keil for ARM
 */

#include <stm32f103x6.h>

/*int main (void)
 {
   // Write your code here
   while (1)
      ;
   return 0;
 }
*/

void delay_ms(uint16_t t){
    uint16_t i;
    volatile unsigned long j;
    for (i = 0; i < t; i++)
        for (j = 0; j < 6000; j++);
}

void spi1_init(void);
uint8_t spi1_transfer(uint8_t d);
void max7219_send(uint8_t cmd, uint8_t data);

uint8_t i, j;

//uint8_t smile[8] = {0x3C,0x42,0xA5,0x81,0xA5,0x99,0x42,0x3C};
uint8_t smile[] =          // fill array for the smiley
{
0x3e,//0b00111110,
0x41,//0b01000001,
0x95,//0b10010101,
0xA1,//0b10100001,
0xA1,//0b10100001,
0x95,//0b10010101,
0x41,//0b01000001,
0x3e,//0b00111110
};

int main( ) {
    RCC->APB2ENR |= 0xFC;   /* enable clocks for GPIO */

    spi1_init(); /* initialize the SPI module */

    //DISPLAY 7 SEGMENT
    /*
    //max7219_send(0x09, 0xFF); // enable decoding for all digits
    max7219_send(0x09, 0x02);   // enable decoding for digit2 and disable for digit1
    max7219_send(0x0B, 1);      // 2 (1+1) digits
    max7219_send(0x0C, 0x01);   // turn on

    //max7219_send(0x01, 9);    // show 9 on digit 1
    //max7219_send(0x02, 4);    // show 4 on digit 2
    max7219_send(0x01, 0x3E);   // show U on digit 1
    max7219_send(0x02, 2);      // show 2 on digit 2
    */

    //DISPLAY MATRIX 8x8

    max7219_send(0x09, 0x00);   // disable decoding for all digits
    max7219_send(0x0B, 7);      // scan digits 0 to 7
    max7219_send(0x0C, 0x01);   // turn on

    for (i = 0; i < 8; i++){
        max7219_send(i+1, smile[i]);
    }

    while(1) { }
}

/* The function initializes the SPI module */
void spi1_init()
{
    RCC->APB2ENR |= 0xFC|(1<<12);   /* enable clocks for GPIO and SPI1 */
    GPIOA->CRL = 0xB4B34444;    /* MOSI (PA7) and SCK(PA5): alt. func. out, PA4: output for CS */
    SPI1->CR1 = 0x35C;  /* SPE = 1, BR = 3, FFD = 0, SSI and SSM = 1 */
}

/* The function sends a byte of data through SPI */
uint8_t spi1_transfer(uint8_t d)
{
    SPI1->DR = d;   /* send the contents of d */
    while((SPI1->SR&(1<<0)) == 0);  /* wait until RXNE is set */
    return SPI1->DR;    /* return the received data */
}

void max7219_send(uint8_t cmd, uint8_t data)
{
    GPIOA->BRR = (1<<4);    /* Enable Chip Select */
    spi1_transfer(cmd);
    spi1_transfer(data);
    GPIOA->BSRR = (1<<4);   /* Disable Chip Select */
}

I would like to know if I can solve at least one of the problems, but the first is my priority (show the correct dots on in the 8x8 Matrix LED), maybe is because of too slow/fast refresh? Anyways, I can't figure out how to solve it, so any helps would be nice, thanks in advance!
The base code is extracted from this site: https://nicerland.com/stm32f103/
And the project I am doing can be downloaded here: https://www.mediafire.com/file/k0rw8x72s05wehb/TP4_PRUEBA_00_21122020.zip/file


texts: Rating for this circuit breaker at 120 voltsAC

texts:
Here is a circuit breaker rated 2 amps at 32 volts DC and 2 amps at 250 volts AC

What is the amperage it will break at when I apply 120 volts AC


texts: Varying PMDC motor shaft rpm, how does it affect efficiency?

texts:
I am working on a project to harvest electrical power from a rowing machine by connecting a permanent magnet DC motor to the flywheel of the rower. However, my knowledge of electrical motors, and especially using them as generators to convert mechanical energy to electrical energy, is limited at best, non-existent at worst.

I'm trying to figure out how I will be able to vary the level of resistance felt by the user. My current plan is to attach a couple of different sized sprockets to the flywheel of the rowing machine and the shaft of the motor and make use ratios between their diameters, similar to what you'd find on a bicycle with gears. I am aware that by doing this, the shaft of the motor will be spun at different speeds for a given force applied to the rowing machine.

My question is this: By spinning the motor at different speeds as planned, what will the affect be on the efficiency of the motor? For example, by operating below the rated wattage, or very close to it, would I expect a lower/higher efficiency, i.e., less electrical energy out per unit mechanical energy that goes in? If there are any resources i could be pointed to that could explain this to me id be MASSIVELY grateful.

Also, any advice on suitable rating for the motor in question would be a huge help. I'm looking at an average sustained mechanical power input to the rowing machine of approximately 80 watts, with maximum as high as 700 watts (only for very short instants during the beginning of each rowing cycle)

Apologies this is very long and painfully under/mis-informed, very new to this.


texts:
I have been working on a program for class which acts as a stopwatch, but I've been having troubles where it doesn't work. (Only one digit, the first that would be shown on the four digit display is ever used, and it is always at 0.)
After putting the whole program through a simulation, and seeing it work correctly there, I can only come to the conclusion that the clock is never changing.

As I see it, these are the relevant parts of my code, but feel free to ask for more.

From the top module:

module stopwatch(
    [...]
    input clk,
    [...]
    );

From the User Constraint File:

 ## Clock signal
 NET "clk"   LOC = "E3" | IOSTANDARD = "LVCMOS33";                  #Bank = 35, Pin name = IO_L12P_T1_MRCC_35,                  Sch name = CLK100MHZ
 #NET "clk" TNM_NET = sys_clk_pin;
 #TIMESPEC TS_sys_clk_pin = PERIOD sys_clk_pin 100 MHz HIGH 50%;

I have four synthesis warnings.

 WARNING:HDLCompiler:413 - "C:\<REDACTED>\counter2bit.v" Line 31: Result of 3-bit expression is truncated to fit in 2-bit target.
 WARNING:HDLCompiler:462 - "C:\<REDACTED>\clock_divider_true.v" Line 42: if-condition does not match any sensitivity list edge
 WARNING:HDLCompiler:413 - "C:\<REDACTED>\count_10.v" Line 37: Result of 5-bit expression is truncated to fit in 4-bit target.
 WARNING:Xst:2677 - Node <decimal_counter/count3/En_next> of sequential type is unconnected in block <stopwatch>.

In counter2bit.v, the truncation is intentional, so long as it's shaving off the MSB; I don't want the third bit anyway. The if condition doesn't match any sensitivity list edge by design; I don't want it updating when that variable does. The truncated 5-bit expression should never happen because it resets when it updates and the value is 4'd9. count3 is the last block in the counter, and I am not planning on using the En_next to enable another counter.


texts: Low cost 30A 24Vto12V stepdown converter

texts:
I'm trying to design a 24V to 12V step down converter. Power efficiency is not that important to me, but I want to come up with the cheapest solution possible. I don't need isolation neither. So I though I would just come up with the simplest buck converter. Something like this

Sw2 would of course be an appropriate power MOSFET. Also the schottky diode is arbitrary, just used the first thing available in Circuit Lab.

Would such a simple buck converter be the cheapest solution for my application, and would it work, assuming that ripple is not a concern for my application?

EDIT: Second part of the question was if it works with such a simple feedback loop. There is a similar question which is already answered so I removed that part.

Thanks!


texts:
i know that the base station controls the power output of the mobile, keeping the GSM power level sufficient to maintain a good signal to noise ratio, while not too high to reduce interference, overloading, and also to preserve the battery life.
now i want to know what is a power class number? For example GSM power class?


texts: How would a transistor's hFE affect a phase shift oscillator?

texts:
I have a phase shift oscillator circuit from a drum machine that I would like to reproduce as faithfully to the original as possible. My problem is that the 40 year old design uses a transistor (2N3394) that is no longer available. But... the others from the same data sheet (2N3391, 92 & 93) still are. The only difference between them is that the hFE is higher than the original.

Here is the circuit (as it is presented in the original schematic):

simulate this circuit – Schematic created using CircuitLab

Note: I added S1 and the pulldown resistor (R11) to replace the original trigger. The output was originally fed to a summing bus, and then amplified.

The Intention (edit 1): At this point, the plan is to faithfully reproduce the circuit on a breadboard (or PCB) and experiment with modification options and values without damaging the original device. I am considering a) only modifying the original drum machine; b) re-creating the drum machine with the modifications; or c) re-creating a few of the individual sounds as single units, and providing amplification for each one, rather than summing to a mono output.

So the main question is: Would replacing Q1 with a higher hFE transistor have any bearing on either the decay time, amplitude or frequency of the output?

Secondary to that is: When seeking out a replacement, what specifications, if any, have a bearing on those same parameters?

Additional Note: While composing this question, I reproduced this circuit using the Falstad Simulator, and found that even changing the hFE within the range of the original part (hFE=55-110) presented major differences in the output. But… from what I understand, the hFE can vary greatly within the given range, and is unreliable. This causes me to question the results I am seeing. If this were not the case, I would have taken the simulation result for my answer.

Here is a snapshot of the output at the C6/R9 junction:

Left: output at hFE=55. Right: output at hFE=110

The waveform result at hFE=55 seems to best represent what I hear in so far as the "sharp impact" which fades out, and also looks like the waveform image presented in the original schematic - down to the phase and number of peaks.

Schematic Source (edit 2): Here is a link to  the service manual that I referenced this design from. It's difficult to read due to the low quality of the scan, but the values in my own schematic were taken from a hard copy.

Thanks for any insight you may have on this.


texts:
As said in the headline, how is quasi-peak calculated?

I was not lucky on google this time, so I will ask here.

I'm just looking for the formulas behind the calculation, since I want to make some simulation in Matlab.


texts: Oscilloscope malfunction: Can someone help with a diagnosis?

texts:
This is the screen on my Tektronix 2465 oscilloscope when I power it up. It used to have the lines going all the way across and and when I would connect the probe to the stereo output (as a calibration test) I'd get a waveform.

But now there is no waveform at all, just faint vertical lines when I supply input to channel 1 using the probe. Has anyone else seen this problem before? If you have please tell me what causes it and how I might fix it!


texts: Identifying this type of pin header soldered to the board


texts:
It is my first project with a PIC microcontroller, so I am sorry if my question seems too basic.

I have programmed the PIC as a frequency counter with two inputs: one input for a PLL, and another input for a clock (I am not using an external oscillator... This clock is used as a windows of 1 second so that the PIC can count on that 1 second how much pulses does the PLL make).
However, the big problem is the following: Each part works well alone with 5 volts of output, but when I connect the clock to the microcontroller's input, the output voltage of the clock drops from 5 volts to less than 1 volt. With less than 1 volt, the PIC is not able to recognize my 1 second windows. Why does this happend? How can I avoid or correct this problem?

Schematics of PIC and PLL:

Schematics of clock: The output is Q1 of 4018. That output goes directly to the input of the PIC (the input of the pic is where that square signal of the first image goes) Evcerything is fed with 5 volts


texts: Running single-phase through two or three windings of a three-phase inductor; why does the direction of the middle winding matter?

texts:
I have a three-phase inductor, MTE RL-00403, nominal 9 mH.

I have some experimental results that don't make sense to me, which appear to be related to the fact that all three chokes share a single core. For this question I'm going to label the terminals as A1, A2, B1, B2, C1, C2.

simulate this circuit – Schematic created using CircuitLab

First test, I'm running single-phase current through the outer two windings; middle winding is left out entirely. Inputs are A1 and C1, load is a short across A2 and C2.

simulate this circuit

Measure the voltage and current across the input, and the inductance computes to be about 18 mH. No surprise there.

Now, suppose I want more inductance between source and load. I've got that third winding sitting there unused, so let's take advantage of it. Second test, inputs are still A1 and C1, but this time we short A2 to B2. Load is a short across B1 and C2.

simulate this circuit

Inductance is about 22 mH, so we got about a 25% increase in total inductance. Not much surprise there. One might have expected a 50% increase (going from two windings to three), but I think you lose some of that expected gain due to the overlapping and canceling fields allowed by all three windings sharing one core.

Third test, inputs are A1 and C1, and this time we short A2 to B1. Load is a short across B2 and C2.

simulate this circuit

Inductance is now 27 mH, giving us a 50% increase in total inductance from our first test!

It looks to me that the middle winding is symmetrical with respect to the fields of the outer windings. I've been able to reproduce this with other chokes from MTE. Why does the direction through the middle core matter? Where's the asymmetry?


texts: Reverse Engineering Camtastic file to PCB in Altium

texts:
I've followed the directions found here but after the step where I extract the netlists, when I export to PCB it gives the following error.

Error reading the nets from CAMtastic ! (C:\Build\platform_edp\CAMTASTIC\Source Code\Dlls\CAMUtils\ExportCAMToPCB.pas, line 296) at 29C46048.
CAMTASTIC.DLL, Base Address: 29830000.

Exception Occurred In
ExportToPCB

This is a single layer import.

Here is what I have setup:


texts: Can I use a coaxial cable as a DC power cable (without using it as a signal cable)?

texts:
On my balcony I have a satellite dish and two coaxial cables attached to it. I don't use that dish, and I want to remove it and reuse those coaxial cables to power some other device on the balcony (a kind of IoT stuff).

Can I send DC power over that coaxial cable? If yes, then can I use a single cable and its centre wire as positive and outer wire mesh and foil as ground?

EDIT: my dish has LNB sign on it if it matters:


texts:
The standard method of removing moisture from MSL-sensitive SMD components prior to reflow is to bake in an oven for 12 hours or more. Without baking, there is a possibility of popcorning, as the absorbed moisture expands rapidly (as steam) leading to high pressure and mechanical failure. Ranier Dudek explains popcorning here and ISU.edu hosts a failure-mode paper showing actual cases here.

But ovens require a lot of power and time to remove this moisture. Could an alternative be vacuum dessication?

A vacuum pump would still boil the moisture away, but without the large pressures of steam, correct? And once evacuated, the vessel could sit unpowered for days if needed, saving energy.

Is this viable for SMD components? I see where vacuum storage and packaging is utilized for SMD, but not vacuum dessication itself.


texts:
Is there a more efficient way of registering an initial value for a variable than

reg [3:0] COUNT = 4'b0000;

where in this case if I were to define say a 32-bit COUNT I would need to write 32'b(32 zeroes here)?