texts: Choosing inrush current limiting resistor for a mains rectifier

texts:
I am having a trouble with a mains rectifier. Simplified schematic:

simulate this circuit – Schematic created using CircuitLab

Only problem I have is that R1 sometime explodes during circuit power-up.
It happens when C1 is discharged, and there is a 310v peak in input.

Due to resistive nature of capacitor charge, same amount of energy as stored in capacitor (~50mJ) should be dissipated somwhere else

The simple solution is to whack a giant 2W resistor, capable of withstanding high energy pulses, but I am having a limited space. Also, if I remove a resistor, then fuse will blow up

I would like to use a few 0805 in a row, but they explode sometimes.

I assume that this is due to the fact that metal film is extremely thin and not capable of holding a significant amount of energy. Carbon film should be better.

How this problem is solved in modern PSU? Is there some special resistors available?


texts:
I'm trying to make a circuit that will light the led with progressive intensity one second after the circuit is powered. For that I created an RC net with tau equal to 1 sec. At 1 second I expect the Vb to reach 63% of the dc voltage(1.2v) which is ~0.7v, that will forward bias the transistor and the led will start lighting.
The problem I got is that the voltage at the test point gets stuck at 555 mv when I add the transistor. I'd expect it to eventually reach the 1.2v. Moreover, this doesn't happen if I reduce the RC values to, i.e 1K and 1mf, for maintaining the tau constant.

Why the voltage at the base of the transistor doesn't reach the 1.2v?


texts: How to calculate the amplitude of a Wien Bridge Oscillator?

texts:
How do I calculate the amplitude of the waveform that is created with this Wien Bridge Oscillator?  My scope measurement shows 1V.  My LTSpice shows ~.8V.

Thank you.


texts:
I designed different speed controllers for PMSM and BLDC motors yet, but I never tried to control the velocity of a brushed DC motor. So I gave it a try and didnt expect any difficulties, but it is harder than I tought.

So what I have done is pretty similar to a PMSM motor, I have a speed controller (1000kHz) and an underlying current controller (30kHz), which is actually a PI controller, that transforms the current into a duty cycle for the PWM signals.

Now I feel the motor cogging at very low speed pretty hard and I tought if I can compensate it with a feed forward term like for PMSM, but I could not achieve that, or at least only a bit. Is it possible, that the cogging at low speed of a brushed DC motor cannot be compensated, since I cannot commutate the stator myself like for a PMSM and so this bumps are switching of the poles?


texts: Replacing a motor under load-torque with 2 motors to give similar performance

texts:
I have the following setup: A servo DC motor which is connected to a drum and the drum drives a conveyor belt. There is a pulley at the other end of the belt which is the same radius as the drum. There is a load placed securely on the belt so that there is no slipping. The load is accelerated or decelerated from rest. But i want to replace the single motor with 2 smaller ones and place each one at the end of the belt with identical servo DC motors, so that the combined performance of the 2 smaller motors are equivalent to the single big motor. So, what differences between the characteristics of the big motor and the two smaller motors should i be looking for?

Here are the characteristics of the big motor:
Tm = time constant
Km = steady-state gain

I'm not sure if i'm missing anything else?

So, my approach to find two smaller motors would be such that each motor would give me half of Tm and half of Km. Am i correct?


texts: Why should each row of cells in battery grid have equal number of cells for maximum power transfer?

texts:
How a battery grid can be made using \$Z\$ cells of \$r \space \Omega\$
  internal resistance which can deliver a maximum power to a load of \$R
 \space \Omega\$ resistance?

  In a battery grid with \$N\$ cells in series and \$M\$ rows in parallel
  \$E_{eq}=nE\$ and \$r_{eq}=\frac{Nr}{M}\$.

  Total cells \$NM=Z\$ and according to maximum power transfer
  theorem \$\frac{N(r)}{M}=R\$

My teacher said that for maximum power transfer, each row of cells should have equal number i.e. \$N\$ number of cells. Why is it so? Why can't each row have different number of cells?


texts: How to find the cutoff frequency of an underdamped second order lowpass filter

texts:
I've learned that for a first order LPF the 3dB frequency is one where the amp's gain is (surprise) -3dB below the DC gain. However, on a second order LPF that is underdamped we get a "peak" at around the cutoff frequency which seems to throw that simple definition off...

For example take the following filter:

Which has the frequency response of:

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

Running a pspice simulation to calculate the cutoff frequency nets you the following result:

The gain at that frequency is a curious 6.6dB.
In contrast, for a resistor value of 500 ohms the system becomes critically damped and the cutoff frequency found by the simulation aligns with the simple definition I mentioned above.

How is the cutoff frequency defined in cases such as this? How does one go about justifying this simulation result, analytically calculating the above cutoff frequency?


texts:
I'm trying to make a welder-like transformer, but I'm having the problem that apparently I'm drawing too much current from the primary side of the transformer as the variac I'm using to supply about 10V is getting too hot. The variac is a chinese model rated for 20A, and unfortunately I have a 30A circuit and 30A fuse installed so the variac is smoking and trying to catch fire instead of fuse-blowing.

How can I limit the current on the primary side to 20A?

I did some calculations on the reactance of that coil and determined its current limiting capability is a very high current limit (293A, 0.001 H). The formula I'm using is 2 x PI x 60Hz x L = Ohms impedance. Whats puzzling to me is that this formula doesn't account for the magnetic permeability of the core or anything. Or is that already accounted for in the L reading? I measured the L via an LCR gauge across the coil wound around the transformer.

Another thing I'm wondering about is will an increase in current on the secondary side of a transformer (due to low resistance) cause an increase in current in the primary side?

I know the ratio of turns is inversely related to current (high voltage, low current : low voltage, high current), but isn't current determined by resistance of the load? Does a high current on secondary from low resistance cause a proportionately higher current on the primary?

Is a transformer like a set of 3 gears, with gear size being turns/voltage, the middle gear being flux, and the speed of the first and last gear being current? I like to visualize electronic components like water or physical machines.

Sorry for all the questions but this will sure help me out a bit.

My current course of action is to get an AC welding transformer and rewind the secondary with thick wire (2 ga) for high current output. I'm hoping that the primary's inductance is high enough to limit primary current to 20A (same as the welder's spec).

Thanks


texts: Relation between built in potential and doping

texts: What is the relationship between the built in potential and the doping concentration of a pn junction diode ? I could only find the relationship between the depletion region width and the doping concentration.


texts: How both current and voltage values obtained at secondary of CT are in range of milli-volt/ ampere?

texts:
I have a power distribution unit (PDU) used in servers . It has current rating of 32 A.  I want to measure this current and convert it into proportional voltage using CT (current transformer). The current of 32 A passing through live cable of PDU . This wire is passed through 1 CT . Its turns ratio is 1:2500. I will connect a burden resistor of 7.5 ohm accros CT and measure voltage across burden resistor .

As per theory of transformers, V1/V2=N1/N2 =I2/I1 . Suppose V1=Vin =230 , I1=Iin=32A , N1=1, N2=2500 . Here , So V2 should be 230*2500= 575000V and I2=Iout should be I1/2500=0.0128A .When I performed simulation of the above schematic, I am getting same I2 value but  V2 is 96mV?  I think they done following calculation V2=Vout=I2*Rburdon= 0.0128*7.5=96mV .

But I don't understand how it is possible ?  Why simulation results are showing V2=96mV  instead of 575000V?How both current and voltage values obtained at secondary of CT are in range of milli-volt/ ampere ?What about transformer turns ratio relationship?


texts:
I'm a new Eagle user and I created an SOIC part with a small heat pad in the middle. The pad is on the bottom and at the top copper layers. The bottom pad is purely for soldering convenience sake. Its easy to solder the pad by heating the bottom pad with your soldering iron.

The board has 2 layers and the bottom one is all GND. I've attached an image here.

The manufacturer says that I should extend the heat pad beyond the IC and put some vias so that heat is transferred to a larger plane. I've put these vias and named them GND but I keep getting an "Overlap" error. Why is this?

Also all the copper pours are created with zero widths because it gave me better control over the fill and now I get "Width errors". How do I resolve these?


texts: VGA monitor as the display for VHS player

texts: How do I connect an LCD monitor to be the display for a VHS VCR?


texts: I know that assembly costs for a BGA package can run into about 200-300USD for prototypes. But how important is this cost when planning a production run? Is every BGA package soldered onto the PCB actually put into an XRAY and tested? Is there any pictures showing BGA vs TQFP assembly costs for a run of about 10,000 pieces?


texts: Can anyone help with an Ultrasonic Transducer Transformer design. Air gap or no?

texts:
I am looking at using a centre tap transformer with a 12mH secondary to drive a 50W 40kHz ultrasonic transducer (4100pF 10-20Ohm resonance impedance) for cleaning applications.
The input voltage is 12V at the centre and 0V either side of the primary alternated to switch up the output for ~270VAC out of the secondary.
My question is what would be the best core/bobbin design for this? To air gap or not to air gap?
If using no airgap and using a RC or LC what would be ideal starting values? I am assuming Inductor in series and Capacitor in parallel to the Transducer?
Thanks in advance.


texts: Timer not having output after initial powering

texts:
DGM TIMER RELAY BOARD 12V 1S-1HR
Time Delay ON or OFF 12V Relay Board with jumper settings and 8 Time Ranges selectable from 0.1s up to 1 hour accessing loads 250VAC 10A or 30VDC 10A
I believed this timer was supposed to operate for whatever duration is set by s1,s2 and s4 then stop for an hour then reenergizes again. Hence cycle of on/off continue but it is just running when powered on for the first time, then stops for good. Please assist is where I am going wrong in the settings??


texts: Capacitive projectile triggering touch screen

texts:
I've read through a number of questions (How can a capacitive touch screen be triggered without human contact?), (How to use a capacitive touch screen without a human hand), (What is the minimal capacitor (capitor type/size/capacity) needed to fool a capacitive touch screen?) around capacitive touch screens and triggering touches without contact to the human body (none of which actually have accepted answers as it turns out).

I have been able to reproduce a few devices that can occasionally trigger a touch on an iPad screen while insulated from the hand that's holding it.

However in my experiment, I want to be able to launch a projectile (like a nerf bullet) at an iPad screen and have it register as a touch. So far nothing I have tried has worked. I think there are 2 issues at play:

No "ground" - the projectile can't be tethered so it can't be connected to ground in any reliable way
Response time - the projectile hits and bounces off very quickly. I believe this is also part of the problem.

How can increase the self-capacitance of my projectile so it can effectively register a very rapid but consistent touch?

Can I add a capacitor or something else to increase the effectiveness of such a projectile? A battery?


texts:
For fun I have taken it upon myself to try to reverse engineer a consumer blood pressure device. The device uses a C8051F007 32 pin MCU. I am trying to figure out how I can eavesdrop on the communication between the MCU and the various sensors so I can obtain blood pressure readings. From the documents I have read the chip supports in system JTAG debugging. I don't know enough yet to utilize this knowledge.

What am I trying to do is identify the UART pins or any kind of serial communication pins. I have an oscilloscope and am hoping I will be able to identify some values in the communication.I need some tips on figuring out how to get data off this chip

Here is the pinout (notice no TX or RX)

Any information or tips will be welcomed.


texts:
I am researching about the deployment of sensors within smart cities;

If I was to place an sensor unit on a row of street lamps, then have a main street 'router' that allows these sensors to upload data via 3G/LTE/Cabled/WiFi connection - why would I implement a IEEE 802.15.4 (ZigBee) network, over placing WiFi connections on each sensor?

Would I use ZigBee simply because its low powered?


texts: looking for prototyping and simulation software

texts:
I'm looking for open source software for modelling electronic circuits.

I have tried Arduino, Electric, Oregano, Fritzing, and QUCS so far. None of these seem to do what I want. I am looking for something like the Crocodile Clips software I was using some fifteen years ago.

I want to be able to simulate interactively in real time, with LEDs flashing on and off while I can push buttons and slide potentiometers around.

The aforementioned software seems to either not do simulation of this kind, or I haven't been able to find all the components I need (only basic stuff like NPNs, inductors, 555s).

Oh, an it ideally should run on Linux. I'm trying to run Crocodile Clips under Wine -- it's basically exactly what I want -- but it's highly unstable.

Can you recommend an alternative?


texts: The electricity grid: what keeps small power generators from being 'driven' by large ones?

texts:
This is a two part question and pertains to power generation:

What prevents a larger plant (say nuclear) from turning an itsy-bitsy gas generator into an electric motor and drive current through it?  (obnoxiously large diodes?)
How does the entire portfolio of power generators stay in sync/phase with the grid to produce one AC wave?

Edit: the second part seems to be already answered here.  I'd appreciate a clear and convincing answer for the first part still.


texts: How to flag Kinetis bootloader to load new fw?

texts:
I have a board that features a Freescale Kinetis K60 MCU and I want to write a bootloader for it but I don't have hardware in place to signal it after a reset to go into "load new firmware" mode vs. "normal operation" mode.
What are my alternative possibilities?
Can I set a flag in flash to signal the bootloader to enter one or the other mode? How would I do this? Any ideas?


texts: How to deal with controling force by positioning oscillating magnet?

texts:
I am trying to code up a closed loop control system on force generated by the paring of strong rare earth magnets. I do not have much experience with PID logic but i have a weak grasp of the basics (ie controlling temp or something).
I am confused by the situation I find myself in below because I need to control through the positioning of the magnet. My positioning system is worm gear motor which will have a oscillating force wave-shape, which is by design since I want cyclical loading. The problem is I think this makes control way more difficult. I already have an issue in that the relationship between force and position is not linear. I think that can be managed, What I am concerned about is programing the controller to deal with the fact that if the motor goes far enough the force will not go up but down.
Ideally I would like to moderate the speed so that I could produce any sort of force(time) profile I want, without the motor going forward and reverse at all. Just accelerate/de-accelerate in one direction as necessary to fit the input curve during each revolution.
I have this set up on the beaglebone black with a PRU running the loop control. I chose this because the PRU has 5ns instruction processing times so it should be very quick the react to changes. I have a load cell digitizer capable 460800 baud rate which will be my limiting factor in processing the signals.
My first order of business is dealing with the the motor turning in one direction will both raise and lower the force depending on position. How do I cope with that? and then how do I deal with the non-linear relationship between force and magnet position.
Any advice would be much appreciated.


texts: Understanding an IC, MP1584, error amplifier

texts: Here is the IC's circuit diagram. After reading through the datasheet, I still don't get what this COMP pin does and how to use it. Can someone explain to me the function and purpose of this pin in pure English?


texts: Dependent voltage source simulated in my schematic LTSpice not work?

texts: The result is not as I've expected. From my (manual) calculation, v(a) have to be 12V, but in this schematic it says zero. What wrong with it?


texts: How are microscopic transistors on microchips made?

texts: How is something like a microchip which is already small as it is able to house even smaller transistors in the millions at such a micro-scale? It seems like such a feat for machine to be able to make something so small and also functional. Maybe I am over-thinking this or lack the understanding, but how is this possible to create a transistor so small which can't be seen by the naked eye but function. What machine could do this? Especially in the 60s.


texts: MKP DC-Link capacitor: Why Upp<0.2*Undc?

texts:
In the data-sheet of polypropylene DC-Link capacitor (Vishay MKP1848 or Epcos B32778), I can read: "The peak-to-peak ripple voltage (Upp) shall not be greater than 0.2xUndc". Undc is max DC voltage.

Up to now I have assume that AC voltage could be 350Vrms for a 500V MKP capacitor if we assume a very clear and very safe sine voltage. In the reality, it is not the case, and a margin is necessary, like 900VDC for  household line use (other email list: with 240VAC in switzerland we have Upp=71%*Undc).

However the data-sheet of DC-Link MKP capacitor, they are more restrictive: the capacitor is design for DC voltage, and Upp (peak-2-peak) should be < 20%*Undc (VDC-max). So for 500V, we should not apply more than 35Vrms and always with the same voltage sign?

Polypropylene is non-polarized capacitor, so why such restriction for DC-Link?
Is there a risk to not strictly follow the data-sheet?
Where is the problem?


texts:
Suppose that Vin= -∞, that forces D1 to open(OFF)  and D2 to close (ON).

Given E is 2 , then Vout=-2.  Then I applied KVL to find the equation for Vd1 ( Off).
Now I know that I have to find the current through Vd2 since it is ON.
I applied KCL on the top right node.
$$ I_{D1}=I_{R3}+I_{R2} $$
Now I know that I need to find the current going through R2 and R3 but I am not sure if Vin is involved in in R3 and R2 or not , if so, why?
Please give me a hint.


texts: Routing trace characterstic impedance determination based on interface

texts:
I have seen specifying routing impedance of interfaces from manufacturers like
for

USB Differential impedance of 90 ohms
DDR2 Single ended impedance 50-60 Ohms, Differential impedance - 100-120 Ohms.

If not specified, generally we will try to take it as 50 Ohms.

Based on this interface impedance levels, we will design corresponding stripline/microstrip lines parameters like Height above reference plane and width to give required characterstic impedance.

What drives these characteristic impedance values? Whether the drivers output impedance has any affect on this?

If route a 50Ohms interface with 20 Ohms impedance what are the impacts?

In few papers, I have read that intentionally designers will route with higher/lower (not sure ) impedance for crosstalk reduction. Is this impedance has any relationship with the impedance?


texts:
I got miller effect on a full bridge and I'm trying to get rid of it. Is there any way to reduce the miller effect on a mosfet bridge?
I'm using opto drivers with bootstrap circuitry to drive.


texts: Are waves reflected off a transmission line when they reach the generator dissipate there?

texts:
There is a generator with ZG = 50 ohms connected to a transmission line of Z0 = 50 ohms, the length of the line can be any, the load is ZL = 200, this gives a reflection coefficient GammaL = 200-50 / 200 + 50 = 0.6, therefore there is a mismatch and a wave is reflected off the load and travels to the generator.
When this wave reaches the generator, does it dissipate in ZG?
I have read this post (and many others here) and its references that helped me a lot:
Can we measure reflected power in a transmission line?
but I am not sure what happens when the reflected wave reaches the generator. I proposed the case ZG = Z0 specifically to make it simpler.
Thank you so much.


texts: Bidirectional Logic Translator translates to 2.8V instead of ~5

texts:
Considering the below PCB with the following scheme, with components inserted,
with DC+ connected to a relay's DC+, DC- to DC-.

When CH1 is connected to the relay, the voltage between HV1 and HGND is ~2.8V.

When CH1 is not connected to the relay, the voltage is, as it should be, ~4.8V.

The relay is a solid state high level trigger.

The bidirectional logic level translator is of this kind.

I tried this with different logic converters, and different relays, but the behavior is the same, what could be the problem?
I'm struggling with this for some hours and I can't figure it out.


texts: RS-485 to USB converters (cable conversion)

texts:
I am working on a project that involves a Solar Charge Controller. The device ships with an Ethernet RS-485 communication interface as well as a RS-485 to USB cable, which is said to be able to communicate with a PC using proprietary Windows based software (and driver, I think).

What I want to be able to do is to communicate (or at least read from) the charge controller from a Raspberry Pi.

This person has proved that it can be done (see link). But I notice that he describes using a (different) RS-485 to USB converter and splicing from the Ethernet cable to the converter, rather than using the converter cable that ships with the charge controller.

Simply using the provided USB converter cable is not working for me right now with the Pi.

So my question(s):

Is it necessary to do the ethernet cable splicing as indicated in the above link, or should I simply be able to use the provided USB cable?

Is it likely that the shipped cable is configured differently or do I simply have no way of knowing that (short of dissecting the cable)?

Note that this Hackster project does something similar with splicing an ethernet cable to a UART breakout module.


texts:
I'm trying to build some system that would detect light and turn a 12v led strip ON.
The only power that I have available is a 9v battery.
I found some Arduino compatible boards but it seems overkill to use an Arduino for something that simple.
So I searched for a simple photo-resistor and found this one. However I am not sure it that will work.
My goal would be to wire the battery to the photo-resistor and the lamp in series and the photo-resistor would act as kind of a potentiometer effectively dimming the led strip as the light goes down.
However, I am not too sure about the values announced by the photo-resistor with a maximum of 150v dc (my 9v battery is way below so it should be no problem but is it actually enough then?) and a maximum of 100mW for which I am not sure if it shall be enough to power the le strip.
Small note:

I do know that 9v is too low and thus the led strip is already not at its max brightness. I tested the leds and battery and it is working with sufficient brightness for my usecase.
I have some size constraints and that is why I am looking for a solution that will be as small as possible


texts:
i want to build a bluetooth speaker with an additional audio-input jack.

When the 3.5mm audio-plug is inserted, i want to switch off the bluetooth-module, so that i can switch between these two audio input signals. The bluetooth-module is powered by 5V via USB-Connector.

The audio-jack has a detection-pin which is connected to GND when the plug is inserted. I am searching for a circuit which turns off the bluetooth-module when the detection pin goes to GND.

I am very new to electronics, but nevertheless i tried to create a little schematic and i dont know if it'll work. Here pin 1 of the switch is the detection-pin and pin 3 is the GND-pin of the audio jack. So when the plug is inserted the "switch is pressed" (i did not found a usable audio jack for me in eagle)

I dont know if i have to use a transistor or if some pullup/pulldown resistors only should do the job.

Thanks in advance !

*EDIT*

Just for clarification: The BT Module isn't transmitting anything. It is a receiver for the second audio-input-signal. Anything i want to do is to switch to the jack as audio-input when a plug is inserted. The audio-signal then goes to a LM386 Amplifier driving an 8-Ohm Speaker.

PS.: Since the circiut will be soldered to a perfboard, i cannot use any SMD-Packages.


texts: When and how is a protective diode applied to the collector of a transistor switch?

texts:
I'm confused about a passage in "The Art Of Electronics", by Horowitz & Hill, regarding protective diodes in transistor switches:

2. If the load swings below ground for some reason (e.g. it is driven
   from ac, or it is inductive), use a diode in series with the collector
   (or a diode in the reverse direction to ground) to prevent
   collector-base conduction on negative swings.

3. For inductive loads, protect the transistor with a diode across the
   load....

My problems with the above two points are:

Why would/how could the load be "driven by ac"? Wouldn't an ac load pull the collector below ground and thus turn off the transistor on the negative part of the ac cycle? Moreover, how could the load be driven by ac when by construction we're sending a DC current through it?!
I'm having trouble parsing the phrase "use a diode in series with the collector (or a diode in reverse direction to ground)". The language is somewhat ambiguous: does the "or" mean "in other words", or does it mean "alternatively". If the latter, why would you want a diode in the direction of Vcc to ground? If the former, then if I change the phrase to: "use a diode in series with the collector, directed from ground to Vcc", am I changing the meaning? Because that's actually how I understand the phrase!
Bullet points 2 and 3 are very similar. In fact, their conceptual "triggers" overlap, i.e. for "inductive loads", but they suggest different things. For 2 the suggestion is a diode in series with the load (pointing to Vcc) and in 3 the diode is in parallel (again pointing to Vcc). How should I choose between the two? Can someone give an example of an inductive load in which the diode is to be applied in series rather than in parallel? (There is an example for point 3 in the book, but alas not point 2.)

Following is a diagram of what I believe to be the schematic implied by Horowitz point 2. It has been confirmed to be correct by experts.


texts: your common calculations as professionals

texts:
Going a step further from my previous question regarding how EE's skirt around doing a lot of basic calculations, I wanted to know beyond ohm's law and calculating voltage dividers (just using those as examples because they seem so common) what are the weekly or daily calculations that engineers are using when you can't do it in your head or draw from intuition/experience?

Planning on starting an EE in the fall and i want to prep as much as possible. Took Calc 12 years ago so I'm rusty but still have a decent grasp of integration, derivation, limits, min/max etc. But I'm not hearing folks talk a ton about using calc routinely in their designs/analysis.


texts:
I ran across a open-drain design and am baffled by the resistor between the nFET source and ground. There are only two purposes that I see it could serve.

1) It's series source termination, matching the impedance of a transmission line attached to the drain. However if this is the case, R would be better placed on the drain terminal.

2) Protection against a ground short in the event of an oxide breakdown shorting gate to source. Again, even in this case R would be better placed at the gate of the nFET.

Am I missing anything? The drain is indeed connected to a transmission line, and is pulled up by a 16V rail at the end of the cable run.

EDIT: I'll add that on the other end it's a high-Z digital input along with that 30k pullup to 16V. Also the buffer's supply is only 3v3, driving a low Vgs nFET.

simulate this circuit – Schematic created using CircuitLab


texts: Signal is connected to following multiple drivers

texts:
This is the top module combining the Circular Shift Register, Multiplexer and Adder.

`timescale 1ns / 1ps
module top(
input CLK,
input [9:0] imgPixel,
output [15:0] WORD_OUT
);

integer j;
reg imgPixBit;
wire [15:0] word;

reg [3:0] counter;
wire select;
wire [15:0] reg_mx0 = 16'd0,reg_mx1= 16'd0,reg_mx2= 16'd0,reg_add0= 16'd0;

// Instantiate the Unit Under Test (UUT)
cir_shift_reg_v csr (
    .CLK(CLK),
    .WORD_OUT(word)
);

initial
begin
    j=4'd0;
    counter = 4'd0;
end

always @(posedge CLK)
begin
    if (j<10)
    begin
        imgPixBit = imgPixel[j];
        j = j + 1;
        counter = counter + 1;
    end
    else
    begin
        j = 4'd0;
        counter = 4'd0;
    end
end

mux mx0 (
    .CLK(CLK),
    .WORD_IN1(word),
    .WORD_IN2(16'd0),
    .SELECT_BIT_IN(imgPixBit),
    .WORD_OUT(reg_mx0)
);

control crtl0 (
    .CLK(CLK),
    .counter(counter),
    .condition(4'd0),
    .SELECT_BIT_OUT(select_mx1)
);

mux mx1 (
    .CLK(CLK),
    .WORD_IN1(reg_add0),
    .WORD_IN2(16'd0),
    .SELECT_BIT_IN(select_mx1),
    .WORD_OUT(reg_mx1)
);

adder add0 (
    .CLK(CLK),
    .WORD_IN1(reg_mx0),
    .WORD_IN2(reg_mx1),
    .WORD_OUT(reg_add0)
);

    control crtl1 (
    .CLK(CLK),
    .counter(counter),
    .condition(4'd9),
    .SELECT_BIT_OUT(select_mx2)
);

mux mx2 (
    .CLK(CLK),
    .WORD_IN1(reg_add0),
    .WORD_IN2(reg_mx2),
    .SELECT_BIT_IN(select_mx2),
    .WORD_OUT(reg_mx2)
);

assign WORD_OUT = reg_mx2;
endmodule

Circular Shift Register Module

module cir_shift_reg_v(
input CLK,
output reg [15:0] WORD_OUT
);

parameter initialValue = {16'h0,16'h1,16'h2,16'h3,16'h4,16'h5,16'h6,16'h7,16'h8,16'h9};
//This works because concatenation makes it a 160bit wide value.

reg [15:0] wordShiftReg[9:0];
integer i;

initial begin
for (i=0;i<10;i=i+1)
 begin
    wordShiftReg[i] = initialValue[((9-i)*16)+:16];
end
end

always @(posedge CLK)
begin
WORD_OUT <= wordShiftReg[0];
for (i=0;i<9;i=i+1) begin
    wordShiftReg[i] <= wordShiftReg[i+1];
end
wordShiftReg[9] <= WORD_OUT;
end
endmodule

Mux module

`timescale 1ns / 1ps
module mux(
input CLK,
input [15:0] WORD_IN1,
input [15:0] WORD_IN2,
input SELECT_BIT_IN,
output reg [15:0] WORD_OUT
);

always @(posedge CLK)
    WORD_OUT = (SELECT_BIT_IN) ? WORD_IN1 : WORD_IN2;
endmodule

Control Module

`timescale 1ns / 1ps
module control(
input CLK,
input [3:0] counter,
input [3:0] condition,
output reg SELECT_BIT_OUT
);

always @(posedge CLK)
    SELECT_BIT_OUT = (counter==condition) ? 1 : 0;

endmodule

Adder Module

`timescale 1ns / 1ps
module adder(
input CLK,
input [15:0] WORD_IN1,
input [15:0] WORD_IN2,
output reg [15:0] WORD_OUT
);

always @(posedge CLK)
    WORD_OUT = WORD_IN1 + WORD_IN2;

endmodule

The Circular shift register works perfectly but I am not sure about the other modules.

The error is shown with reg_mx0, reg_mx1 during Adder module instantiation.

Can someone please help me out? Any optimization in the code is most welcome.


texts: 12 volt DC to 12 volt AC sine wave inverters for 10 watt and 22 watt pumps

texts:
I have two 12 volt AC small water pumps that I want to run on 12 volt DC (solar). One pump is rated 6 watts (max ~10 watts) and the other pump is rated 16 watts (max ~22 watts). Since I need to convert DC to AC... and if remembering correctly it is best to be a sine wave output (not square wave) since the target is a motor.

Can someone please design two simple 12 volt DC to 12 volt AC sine wave inverters for the 10 watt and 22 watt pumps?

Would these devices output a lot of heat so as to require some method to extract the heat? (I want to pot the inverter in epoxy to make it waterproof.)


texts: Recommended programmer for parallel flash memory?

texts:
Can you recommend a programmer for low voltage parallel flash memories like 29LV320?
(around 100 USD max, if possible:)


texts: Reverse biased photodiode gain resistor selection

texts:
I have a reverse biased photodiode as shown below.

where  R1 = 100kΩ. The output is quite low around 50mV. I would like to replace R1 with 1MΩ to get 10x the output. My concern is, if it will have any disadvantage? Does it have any effect on the rise time?


texts: Calculating effective mass of electron from energy band diagram

texts: How can I calculate the effective mass of electron in the conduction band of silicon with the approximation that they are free, from its energy band diagram by my hand - not software or something else?


texts: Is there any simple way to make a bidirectional switch using MOSFET chip?

texts: I want to make a bidirectional switch using a MOSFET discrete chip. However the intrinsic diode make it impossible. Is there any simple solution for this?


texts: Circuit LTspice implementation not working

texts:
I stumbled upon on Chua circuit and tried to implement it LTspice.

This was allegedly supposed to be a double scroll, however upon simulating it in LTspice I achieve a different result.

Here you can see the current across C2 against the voltage through C2 to produce a weird graph and not anywhere near a double scroll.
Maybe my implementation of the double scroll circuit was too simple for LTspice and the fact that I do not know enough about LTspice.
Could someone clarify?
EDIT
I added a pulse generator and managed to obtain a single scroll.
Source: https://books.google.co.uk/books?id=Tve6CgAAQBAJ&pg=PA17&lpg=PA17&dq=mosfet+in+chua+circuit&source=bl&ots=aOxjnewukF&sig=ACfU3U01aTtquge_KsePIF1yGUP0IbRDBw&hl=en&sa=X&ved=2ahUKEwjD2_CrvvvsAhWFs3EKHdxWCBg4HhDoATADegQIAxAC#v=onepage&q=mosfet%20in%20chua%20circuit&f=false
Page 17 bottom of page


texts: Using an LSM6DS3 IMU with a LiPo battery power supply and LDO with Enable

texts:
I am trying to build a circuit containing the LSM6DS3 IMU (Datasheet) to be powered by the Sparkfun 110mAh Lithium battery PRT-13853 (Datasheet).
According to the datasheet of the IMU, it is able to operate in a voltage range from 1.71 to 3.6V (page 23):

The battery provides a voltage between 4.2 and 2.8V (page 4):

Edit: according to another question, LiPo batteries should not really be discharged below 3.7V. That should not change anything for my question though.
This means the batteries voltage stays high enough IMU during the entire discharge cycle, but must be regulated down.
Given the low current consumption of the IMU, I thought about using an LDO linear regulator. Would the TLV755P be a suitable regulator? If not, what alternatives would be better and why?


texts:
I'm trying to understand this circuit taken off of this application note.

To get it out of the way, I'm familiar with the basic integrator circuit and its workings. What I'm having trouble with are the extra components R2 and C2.

I've done a Laplace nodal analysis and got the equations and transfer function, but that didn't help me much. I feel that R2 and C2 have a much more "practical" role in this circuit.

So my questions are:

What is the purpose of R2 and C2?
Does the C1 capacitor have any influence in the circuit besides compensation?


texts: Why should I put a Schottky diode and a resistor between a USB connector and a TP4056 charger IC?

texts:
I've found this useful explanation for a load sharing circuit based on the established TP4056 charger IC:
LINK:
https://www.youtube.com/watch?v=T70mBHeIOZA&ab_channel=WellDoneTips
SCREENSHOT:

Now I would like to know why there is a SS14 Schottky diode and a 0.4 ohm resistor between the USB connector and the TP4056 charger IC.
And would it work without it too?


texts: How to use Battery Charge controller (BQ2002N)

texts:
I am working with an Arduino which I have a 12v power supply for, but also needs to be able to run off a NiMH/NiCAD battery pack when not connected, and recharge the battery pack when it is connected.

I have a BQ2002N IC connected as shown(actually 6 C cells, Fritzing only has AA):

When I connect the 12v power source and measure the voltage from the battery-pack to the BQ2002N, I get only ~200mv, so its not charging the battery.

When I disconnect the battery-pack and measure the voltage, I get only 2.4v (currently its 6 NiCAD cells, so it should be 7.2v if fully charged).

I haven't connected the Temperature Sensor (TS) pin yet, to keep it simple.

Does anyone at least have a good tutorial on this, I haven't found any so I'm just guessing from the datasheet.

The formula the datasheet gives for the resistors to use:
RB1/RB2 = (N-1)
here N=6

And I used:
RB1 = 47 ohms (can't get 50 ohms, I assume this is close enough)
RB2 = 10 ohms


texts: Op-amp input stage for Arduino Due ADC - guitar signal

texts:
I am trying to design an op-amp input stage to capture a guitar through an ADC, specifically the ADC on an Arduino Due (3.3V, 12 bit). I am aware there are numerous ways to configure and bias the op-amps. I have designed a simple circuit based on a inverting amp followed by an active LP filter. The system will be running off a 9V battery and the power will be provided to the op-amps and uC (regulated) from this.

The aim being:

Bias the signal around Vdd/2 (mid of ADC input range)
Amplify the signal to use best of the ADC's range
Lowpass filter the input signal at Nyquist rate (fs/2) to avoid aliasing

However, I have been  unable to find much information on what the benefits or drawbacks of different configurations and methods of biasing are, specifically for this kind of signal. I have not yet measured the voltage output of my guitar so the specifics of the required gain properties are not known yet! Aslo, will I require a high input impedance for a guitar?

Any advice or comments would be greatly appreciated.

simulate this circuit – Schematic created using CircuitLab


texts: Why does current flow from the most positive to the most negative in three phase system?

texts:
I put the following circuit in a simulator to see how it works. I understood it but I have a question:

At the time of the vertical green line, The simulator shows me that the current flows from the supply of phase 1 because it is the most positive. And then all the current goes to the supply of Phase 3 because it is the most negative. But Phase 2 is also negative and I expect that some of the current should return back to it. I know that Phase 2 is not the most negative but I think a small amount of current should return back to it.

I watched a video on youtube, I learned also that the current flows form the most positive to the most negative and they did not mention phase 2 although it is not zero voltage !! it has some negative voltage that the time of the green vertical line.


texts:
I have some S8050 transistors and was looking for the stats of them in the datasheet. I found some strange values for the Ib/Ic relation:

Shouldn't the unit on the y-axis be A instead of mA? The datasheet of all S8050 subtypes have A on this axis. Ib 1.5 mA = Ic 0.25 mA would be a DC current gain of 0.167, as far as I understood.


texts:
Hi does anybody know of any other lighting communication protocol other than DMX512 and RDM?

I'm currently evaluating protocols and would not want to miss potential candidates.

Thank you.


texts: What is the significance of UPS output Power Factor?

texts: A UPS's output rating is shown as (2000VA/1800W). I understand that the p.f. here is 0.9. But the device or load I will connect to the UPS might have pf<0.9 or pf=1 (for light bulb). From my understanding, the real and reactive power will vary based on my load's pf. Then why UPS specifies a fixed pf? Isn't it enough just to mention the VA rating?


texts: Testing an RCD switch by short circuiting neutral and ground

texts:
This question has some implications on home related work with mains. Never take what you read on the internet as the truth when lives might be in the line. That is how I'll be treating potential answers also.

I've seen references which claim it's a valid test to connect the Ground and Neutral to test if the RCD switch will break.

I've made a simple schematic of the problem and marked the point where the current has to leak to make this test successful.

There seems to be a lot of parameters which could result in this test giving a false negative. i.e.:

current going through Neutral too small
big resistance to Ground
RCD breaking current high

simulate this circuit – Schematic created using CircuitLab

For some reason someone thought this was a good test. I've done it at home and it always works for a 30mA RCD. So it's possible that even thought I can't seem to theoretically justify it might of have empirically proven itself like a good enough test in the field.

Would like to hear if it's possible to defend or disprove this approach on both a theoretical and practical level?

Could this test be enhanced by connecting, say, a 9V battery (+ on Neutral, - on Ground)?

Are there other simple ways to test if RCD works for a particular socket? I've sadly seen wiring of the house retrofitted so only some sockets actually have the Ground wire and others just look like that externally but only N and L are on the socket.


texts: Bluetooth general question about antenna

texts:
I want to ask you about Bluetooth antennas. I saw that some modules like HC-07 have a zig zag antenna on them:

And others like BTM-331 do not have such an antenna:

Is this antenna mandatory? How does this antenna influence the good working of a Bluetooth module?
Here is the back photo of the BTM-331, the antena is top right corner between the 2 grounds(that half circle). Please exclude the fact that the reset pin is not connected to the GND , I will solder that ti GND because I saw in datasheet that reset is active HIGH.


texts: Randomization of events in old hand-held games

texts:
I have very little background on electronic design.

After studying a bit on how pseudo-random number generators work on general purpose computers, I became curious on how old hand-held games (like the Mattel Electronics series) randomized the events occurring in the game. As far as I know, many of them didn't utilize microprocessors at all.

Did they occupy a pseudo-random number algorithm implemented with basic electronic components, or are there ways of producing random-like numbers with basic electronic components?  If such ways exist, why are they not available on our general purpose computers?

The main reason for my question stems from the need to seed the random number generator. Those primitive handheld games didn't seem to have a clock or something that could act as a seed (or perhaps they had a seeding counter running even if the game was turned off but connected to the battery?)


texts: Power adapter for handheld sewing machine

texts: I have a handheld sewing machine which requires 4 AA batteries or a 6v, 800ma power adapter. I intend to use this sewing machine on power adapter but I only have a 6v, 300ma power adapter. Can I use this power adapter to run the sewing machine without the danger of overheating or exploding the adapter? If I can, should I expect any decrease in performance on the sewing machine?


texts: first Mini dsp Project using matlab and books

texts:
i have basic knowledge of matlab and took signal and system course. i want to do project like below.
but dont know filter on matlab.
are there any books i can learn fft commands etc.(dft, filter,signal system projects).

i skimmed lot of dsp books but they have just theoretical information and not practical.


texts: selection of power supply ( Linear power supply vs SMPS)

texts:
we know that, depending on the specification of our system, we design our power supply, which may be either a Linear Power Supply, or an SMPS.

But, if there are no constraints of size, efficiency, for an application, how do we decide the trade off between the SMPS and the Linear power supply.
How do we decide or calculate, that for a particular application, SMPS or a Linear Power Supply would be better.
How do we decide or calculate the losses in both the system, for a particular application, i.e., if the core losses would be more in a Linear Power Supply, or the switching losses and the core loss of an SMPS would be more.

How do we decide between the two, which one to use and where.

The SMPS being an isolated topology in the above question.


texts: Getting started with electronics - virtual breadboards with IC's?

texts:
I was looking to start getting into electronics beyond just some basic soldering and closed circuits. I've never worked with IC's before.

So, a project that I wanted to try out was a LED chaser circuit with a 4017 and 555 timer IC's.

But--before actually gathering all the hardware components, I was hoping that there would be virtual breadboard simulator software available that I could use to put together this circuit virtually before (potentially) frying any actual electronics by connecting something up the wrong way.

I looked at a couple pieces of software, but it looked like they were focused on breadboarding with arduinos and didn't have the capability to actually add IC's.

Do you have any suggestions?


texts: What is the difference between dual gauge and single gauge in voltage regulator IC?

texts: I was looking at the datasheet of the L78S voltage regulator IC from STMicroelectronics. I saw a mention of dual gauge and single gauge. The dual gauge price is slightly more than single gauge. What is the difference between these two?


texts: Attempting an audio pre-amplifier circuit with falstad.com

texts:
I'm new to electronics and discovered the falstad.com simulator.  I wanted to model this audio pre-amplifier circuit:

So I went into falstad and drew this:

My pre-amplifier circuit on falstad

The output voltage is showing a flat line at about 6V.   I was hoping for an amplified signal.  So I can't tell if there's something wrong with the circuit I was attempting to model of if I'm just not using falstad correctly?


texts: When do we have to use an analog oscilloscope?

texts:
Are there any testing/measurement processes in electric and electronic engineering that can be done only with an  analog oscilloscope?

In digital scopes there is a short delay to process the signal (analog to digital conversion) then display it on the LCD, so maybe some very fast pulses could be missed due to dead time.

While the analog scope displays the signal instantly.


texts: Options to protect Mobile Phone from over charging which is causing battery failure

texts:
We have a number of  Android mobile phones permanently on charge. After approximately 3 months some of the device batteries expand considerable, splitting the phone & failing. The phones are in a regulated 23 °C environment, so I believe temperature is not the main problem. I believe overcharging is the problem, possibly due to the phones being low cost entry models and the internal regulator circuit not being great. Note that the screens are on permanently at full brightness. My guess is that they are using about 300 mW. The charger which comes with the phone is rated to 500 mA.

I've considered powering the phones directly without a battery however Android has gotten smarter and appears to require signals from the battery circuit board. My current thinking is to balance the charge capacity of the charger itself to the power the phone is using, e.g. a 300 mW charger.

My questions:

Would this strategy of  trying to balance the charging current of the USB charger with the power use of the phone be effective at preventing over charging?

If so, could I simply limit the charge current by sticking a resistor on the positive. Would a single resistor do the job? and if so what value range? An online calculator gives me:

Resistance   16.667 Ω
Voltage  5V
Current  300 mA
Actual Power Rating  1.5 W
Recommended Resistor Wattage 2 Watt Resistor


texts: Power Supply rail shorts to ground when loaded

texts:
Just to preface: this is probably a really dumb question.

I recently purchased a desktop power supply to work on circuit projects at home (I'm an hobbyist).  I recently had issues with an op amp circuit. While troubleshooting, I figured out that the positive rail of my power supply was shorting to ground when I tried to build a voltage divider.  For example: If my rails were -10 to 10 and I wanted to reduce the positive voltage to 5 volts, put 2 1K resistors in series to ground and use the voltage from between the two resistors.  But instead of my 5 volts I just got earth.  Please reference the schematic below.

So I started doing some research and I understand that the 'ground' terminal on power supplies sets the zero voltage reference for the two rails.  My understanding is that if you connect the ground terminal and one of the other terminals you can change the voltage reference.  For example, if my setting is constant voltage for 20 V and I connect the negative terminal and ground, the positive terminal will read 20V relative to ground.

That all makes sense to me.  What I don't understand is when I connect a resistance across the ground and another terminal the voltage reference still changes.  I know that the ground terminal is connected to earth through the bottom prong and  splits the rails symmetrically when I don't connect a resistance across to ground.

I'm pretty sure this is how the power supply is supposed to work and I'm just missing something fundamental.  Is it possible to build a voltage divider the way I described above?  If not, how would I approach this problem?


texts: Atmel UC3A0512 microcontroller documentation

texts: I started using this microcontroller but I am dealing with the lack of documentation. First of all this is the datasheet. It describes registers and their usage but not a workflow. Which one to set first, which second etc. The ASF Get Started quick guides are very limited to high level staff, like USB protocol etc. At last, there are existing examples which demonstrate but it is a mess with out a documentation.


texts: Is it possible to build something that can measure water and oil in a tank with out being in the tank?

texts: Say you have water and oil in tank....Is there any thing out there that can tell me how much water is in the tank and how much oil is in the tank???


texts: How to create a frequency doubler circuit using only flipflops/ Digital elements?

texts:
First things first, is it even possible to scale up the frequency using only digital elements, atleast approximately?
Though a frequency divider circuit can be designed very easily with flipflops. In the circuit I'm designing, there is no option left for me rather than doubling the input frequency.
Any suggestions on how to proceed/design this circuit?


texts: Does earth fault current return to transformer's neutral via earth?

texts:
Is there any real connection between the place where the earth fault takes place and the neutral of transformer?
How can earth fault current take the earth as a path to the neutral of transformer?
Is it due to ground grid?


texts: Build simple wireless door (open/close) sensor with Arduino or Attiny84/87

texts:
I have a spare Arduino uno, a few Attiny84 and a few Attiny87.
In my Raspberry PI I have installed a RFM12Pi and have a spare RFM12b to use with Arduino.
Last piece I have in the drawer is a sonic sensor (HC-SR04).

I would like to build the cheapest possible door sensor but I am far from being an expert.

What would be the best idea to assemble those pieces and realize a system that sends a signal to my raspberry pi each time the door is opened / closed?

If interfacing those components is hard for a newbie I also thought about buying something similar that could simplify the project:

http://www.adafruit.com/products/1097

What is the cheapest, easiest and low power solution?

Thanks for your time and patience and sorry if the question is not the best you've ever read: I am trying to learn :)


texts:
I'm currently working on a dummy load designed for testing small power supplies less than about 10V. I'd like to provide reverse input protection to prevent the op-amps from being damaged. Because the load has to measure the input voltage (constant power and resistance operation), the voltage drop across the input protection needs to be as small as possible.

I've thought about using a P-channel MOSFET, but that requires that the input voltage be above the MOSFET's Vgs threshold, which would be above the minimum voltage I want this load to be able to test (under ~1V ideally). Also, this would cause large voltage drops and power dissipation when the input voltage is near the MOSFET's Vgs threshold.

Another solution I've seen is a zener with a fuse/PTC. PTCs are too slow to trigger and fuses have to be replaced, so that doesn't seem to be a great solution.

The simplest solution that I can think of is a single diode, but this is also not ideal because of the rather large voltage drop (min. of about .3v with a schottky).

Here is my current circuit:

simulate this circuit – Schematic created using CircuitLab

I appreciate any ideas you all have to offer!

EDIT: I forgot to mention that this IS NOT powered from the power supply under test. It's going to be battery powered so I'm thinking 2 3v coin cells in series regulated to 5v.

Also, I don't think I was clear about what I meant by using a P-Channel MOSFET:
https://www.circuitlab.com/circuit/bka32t/p-channel-protection/


texts:
Electronic Circuit breaker

On page 9 of the breaker above, they take a sample of the full cycle and calculate the true rms. That would mean for a 50 Hz wave, a time of at least 20 ms before it trips. If a short circuit occurs, the breaker should trip instantly with little time delay. What sort of time delay is acceptable for instantaneous tripping ?


texts: What are the disadvantages of using a Zener diode over a linear voltage regulator?

texts:
I wonder why a Zener diode is worse than linear voltage regulator.

Some of the posts online mentioned that because of the power dissipating problem. Zener diodes keep consuming a large amount of current while the load may just need a very little amount of current.

If I understand correctly, this phenomenon will happen only when the Zener diode is connected with the load in parallel. What if I connected my Zener diode with my load in series?
Also, someone said that linear voltage regulators (e.g. LM7805) are not good voltage regulators as the power dissipated in them is much higher than that in switching voltage regulators. In my understanding, the power dissipated in a linear voltage regulator can be calculated by dropout voltage x current = power converted to heat.

Regarding these 2 points, other than a linear voltage regulator can handler a wider current range, what is the benefit of choosing a linear voltage regulator over a Zener diode?


texts:
Whenever I'm making a cheap, 2-sided PCB, I run into this problem:

Where I have signal lines (on the top layer here) running over top of a big fat power trace (on the bottom layer).

Now, this is obviously terrible because there is no good return path on the bottom side.  For issues like this, Hott consultants has a good recommendation:

However, I wonder if a solution like the one below is also acceptable.

My intuition tells me yes, this solution is ok.  Over the break in the ground plane, the current will hop over the vias and then back down to the lower plane.  Some back of the envelope math tells me that this adds a trivial amount to the loop area, and therefore a trivial amount to the return impedance.

Can someone tell me...

How right / wrong my intuition is here about using vias?
If my intuition is wrong, why?
Also, if my intuition is wrong, what is the correct solution in this sort of situation (2 layer, with power traces under signal)?

For the record, these particular signal lines aren't terribly fast (500 kHz), but I would like to know how to deal with this situation when I have signals in the 5 - 10 MHz range.

Edit

Below is a screenshot of about 60% of the board.  Maybe it will help with the critique


texts: 3 simultaneous led chaser using only 555 and 4017

texts:
I've to design a circuit which consists of 30 LEDs in a row (RED, BLUE and GREEN) followed by a led matrix which spells out IN.

Conditions which I've to follow:

When the circuit is powered, initially the 1st RED , BLUE and GREEN LEDs will be ON.
2nd RED LED should be ON when 1st RED LED goes OFF, 3rd RED LED should be ON when 2nd RED LED goes OFF, and so on. When 10th RED LED goes OFF, 2nd BLUE LED should be ON i.e for every 10 cycles of RED LEDs, a BLUE LED should be ON.
This is analogous to a LED chasing circuit.
Similarly for every 10 cycles of BLUE LEDs, a GREEN LED should be ON. Finally when 10th GREEN LED goes OFF,
LEDs arranged in "IN" fashion should be ON.

Progress so far:

I used 3 555 timers and to get 3 varied square pulses of 1kHz, 100Hz,10Hz for Red, blue and green respectively, and 4017 ic's to do the led chasing.
I'm stuck at how do I initially light up all the first led's.


texts:
As a background to this project, I have taken an off the shelf bldc stator and incorporated it into a small pump, and then built my own rotor using discrete neodymium magnets.  At first, everything went fine, and experimentation showed that higher magnet levels increased efficiency proportionately.  I then purchased custom n52 magnets that maximized space.  However, I noted that the motor then ran funny.  Throwing the setup on the scope like this

and spinning the rotor with a drill showed this odd waveform.
  After adding a small steel core, note how this changed.

femm plots:

Showing current with steel core

Showing current No steel core

No current with steel core

No current, no steel

Addition:  I am comparing bemf voltages produced by original rotor and replacement rotor.  OE is around 5.2V@1250rpm, the handbuilt replacement rotor is around 4.05V@1250rpm

Femm plot if you want to try it yourself

Question #1.  Am I dealing with eddy currents, or how could these odd scope waveforms be explained?

Question #2.  I suspect that efficiency and field strength go up with steel placement, but why don't the plot field strengths seem to reflect this?

Question #3.  Whats the best way to understand these plots in a way that translates to real world physical force on the shaft?

Edit:  I am leaving the links to the referenced items in the answer about the coupler, but these have caused misunderstanding about the issue, so I am removing the pictures from the direct view.

http://i.stack.imgur.com/1Fr6v.jpg

http://i.stack.imgur.com/P8Ken.jpg


texts: STM32f2xx external clock source for timer

texts:
I trying to use a timer with an external clock source on a stm32f207ZE microcontroller.
But it isn't working. Here is my code:

  /* TIM1 clock enable */
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1, ENABLE);

  /* GPIOE clock enable */
  RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOE, ENABLE);

  /* GPIOE Configuration: PE.11(TIM1 CH2)  */
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
  GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
  GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
  GPIO_Init(GPIOE, &GPIO_InitStructure);

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource11, GPIO_AF_TIM1);
  GPIO_PinAFConfig(GPIOE, GPIO_PinSource7, GPIO_AF_TIM1);

  /* TIM1 Input trigger configuration: External Trigger connected to TI2 */
  TIM_ICInitStructure.TIM_Channel = TIM_Channel_2;
  TIM_ICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Rising;
  TIM_ICInitStructure.TIM_ICSelection = TIM_ICSelection_DirectTI;
  TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV2;
  TIM_ICInitStructure.TIM_ICFilter = 0x0;
  TIM_ICInit(TIM1, &TIM_ICInitStructure);

  TIM_TIxExternalClockConfig (TIM1, TIM_TS_TI2FP2, TIM_ICPolarity_Rising, 0) ;
  TIM_SelectSlaveMode(TIM1, TIM_SlaveMode_External1);

  TIM_Cmd (TIM1, ENABLE);

Where can be my mistake? I have some misunderstanding on what source pin must be used for Timer1 TI2. Is it the same that Timer1_CH2?

I also tried ETR mode by inizializing ETR pin

  /* TIM1 clock enable */
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1, ENABLE);

  /* GPIOE clock enable */
  RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOE, ENABLE);

    /* GPIOE Configuration: PE.7(TIM1 ETR)  */
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
  GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
  GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
  GPIO_Init(GPIOE, &GPIO_InitStructure);

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource7, GPIO_AF_TIM1);

    TIM_TimeBaseStructure.TIM_Period = 0xFFFF;      // 5000*20 uS - 100 ms
    TIM_TimeBaseStructure.TIM_Prescaler = 0;    // frequency - 20 MHz
    TIM_TimeBaseStructure.TIM_ClockDivision = 0;
    TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
    TIM_TimeBaseInit(TIM1, &TIM_TimeBaseStructure);

    //for ETR IN RM0033 p. 372
    TIM1->SMCR = 0;
    TIM1->SMCR |= TIM_ExtTRGPSC_DIV4; //2. set prescaller
    TIM1->SMCR |= TIM_ICPolarity_Rising; //3. rising edge
    TIM1->SMCR |= 0x4000; // 4. Enable external clock mode 2 by writing ECE=1

  TIM_Cmd (TIM1, ENABLE);

But it also doesn't work. Maybe frequency is to high? And i saw some strnge behaviour. When i inizialize once more counter:

void inizializeSimpleCounter(){
  NVIC_InitTypeDef                  NVIC_InitStructure;
    TIM_TimeBaseInitTypeDef     TIM_TimeBaseStructure;

/****************Timer4 Inizialization**************************/
    RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM4, ENABLE);

    TIM_TimeBaseStructure.TIM_Period = 5000;        // 5000*20 uS - 100 ms
    TIM_TimeBaseStructure.TIM_Prescaler = 3-1;  // frequency - 20 MHz
    TIM_TimeBaseStructure.TIM_ClockDivision = 0;
    TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
    TIM_TimeBaseInit(TIM4, &TIM_TimeBaseStructure);

    TIM4->DIER = TIM_DIER_UIE;

    TIM_Cmd(TIM4, ENABLE);

    NVIC_InitStructure.NVIC_IRQChannel =  TIM4_IRQn;
    NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x01;
    NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x03;
    NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
    NVIC_Init(&NVIC_InitStructure);
/*************************************************************/

}

The timer, which was initialize to count from extrenal counter counts some values, and then stops


texts: Why are these LED current limiting resistors so big?

texts:
I'm looking at the charging circuit for a lithium ion battery that was made by Adafruit.  Here's an excerpt:

If there's a 5V rail from the USB port and a 470 Ohms resistor, is that limiting the current through the LED to 6 mA just to keep the brightness low?  The datasheet for the charger has 470 Ohms resistors in the reference design too.  I'm just not sure why.


texts: What is the source of distortion in this simple common-em. Colpitts oscillator waveform?

texts:
I took the standard common emitter NPN (3904) amplifier with an LC tank on the base:

(Credit to "Radio Physics and Electronics" on youtube.)
I experimented with R1/R2 thinking it was a gain issue, but it is still there with lower gain to the point where my scope can't trigger in all the noise. I also swept the frequency from 70kHz to 500Khz by changing C1/C2 and L1. Still there.
Here's an image.
Both channels are in DC coupling and I'm probing the output (yellow) and the input prior to the coupling/bypass cap (green) at the base.
It is also there with a 2N2222.
EDIT: See Andy and Enrico's replies below. Reason? Non-linearity of slamming a 2n3904 rail-to-rail. I replaced the the transistor with a 1458 op amp (using a 2426C rail splitter to generate +/-2.5V) and Rf/Ri of 10k/1k .... and presto, a nice clean sinusoid that is more stable over a larger range of CL values.


texts: How do I facilitate keeping multiple grounds, (i.e. AGND, DGND, etc...) separated in the layout when using Eagle?

texts:
I've designed several PCBs where I needed to keep the ground returns of different parts of the circuit separated, i.e. analog, digital and high power. I use Cadsoft Eagle for schematic capture and layout. It is easy enough to define different ground symbols in the schematic editor. They each have their own net name. However, the grounds must all eventual be connected at one point on the PCB to define the overall ground reference. When connecting one ground (or supply) to another, Eagle generally overrides one of the net-names with the other, i.e. removing their distinctiveness. This is sensible from a idealistic electrical viewpoint that assumes that the wires have no impedance. However, in the real world there is no such as zero impedance, or ground for that matter! This net-name overriding behaviour is getting in the way of PCB design. How do I work around this behaviour? This isn't a big problem in the schematic drawing because the supply symbols are retained and the net names are hidden. However, in the layout editor, after connecting grounds, only one unique ground net-name remains.

It is possible in the layout to manually keep the distinct grounds separate even though they have the same net name, and to connect them at one point. Thus it is still possible to achieve the design goal with only one uniquely deified ground. However, it is a logistical nightmare keeping the distinct ground traces separated when they have the same net-names.

Is there a better way to do this?

I have tried making my own Eagle part where the multiple and distinct grounds connect electrically, but, do not have the same net-names. The part was just a series of physically overlapping SMD pads. Each pad could be connected to a unique net-name thereby preserving the distinct grounds, but, it provided an electrical connection between the grounds. This seemed to work well with the drawback that the Design Rules Check (DRC) thought that the overlapping pads were a problem. In fact, Sparkfun has an eagle part that does this, however, they opted to keep the pads separated, i.e. not overlapping. This solves the DRC problem, but, then the board is then not connected properly electrically. This caused bugs in one of my boards before.

Is there a good solution to this problem? Is Eagle weird in its handling of this? Do other EDA tools do better than Eagle in handling this? I am doing something wrong? This has been a source of irritation for me for some time now.


texts: How can I fix an AVRdude not-in-sync error when programming Arduino via USB-to-serial cable?

texts:
I'm trying to build this Ambient lighting for PC. This worked flawlessly on my Arduino Uno. My next step was to make it using "Arduino on a breadboard". So I bought a blank ATmega328 chip and burned the Arduino bootloader (for the board "Arduino Duemilanove w/ ATmega328") onto it using the Arduino IDE and USBasp; and I know this has been loaded properly as this ATmega chip works fine on the Uno.

Then I made the USB-to-serial converter using FT232RL ; but its drivers didn't install on my PC (Windows 7 x64). I suspect I overheated the surface-mount FTDI chip and killed it while hand-soldering it.

So, I've kept it aside, and got this USB-to-serial converter bridge:
(Sorry for the crappy pics)
I used an additional ST232CN on my breadboard, to convert the voltage levels from RS232 to TTL, as shown in this page. And this works fine, as I verified from a loopback test. And I've connected pin 9 of ST232 to pin 2 of ATmega, and pin 10 to pin 3.

When I tried to upload a blink example from Arduino IDE, I get this error:

Binary sketch size: 1026 bytes (of a 30720 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00

When I do the verbose upload (Shift+Upload), I get this error/message:

avrdude: usbdev_open(): did not find any USB device "usb"

Also, I tried adding 1k pull-up resistors at pins 2 and 3 of ATmega, but didn't help.
So I guess the problem now is in the serial communication from the ST232 to ATmega?
And is there any special connection to the Reset pin of ATmega? I've pulled it up to 5V with a 10k resistor.


texts:
I'm trying to go through a mathematical gain analysis of a closed-loop transimpedance amplifier circuit, but I'm having issues trying to relate the block diagram to the actual circuit.

simulate this circuit – Schematic created using CircuitLab

Regarding the gain, the ideal op-amp gain function doesn't match up with the function I expected. The block diagram shown on the left can model the closed loop gain using the following equations.

$$ V_o = A_{OL} (V_i - V_f) $$
$$ V_f = \beta V_o $$
$$ A_v = \frac{V_o}{V_i} = \frac{A_{OL}}{1+A_{OL}\beta}= \Bigl(\frac{1}{\beta}\Bigl)\frac{A_{OL}\beta}{1+A_{OL}\beta}= A_{v}^{ideal}\frac{T}{1+T}$$

Based on these equations, \$A_{v}^{ideal}\$, the closed-loop gain when the op-amp is ideal, is equal to \$\frac{1}{\beta}\$. The issue I'm facing is that when I apply that equation to my transimpedance model, it doesn't match up.

Assuming an ideal op-amp, the gain can be modeled as impedance's:

$$ Z_f = R_f \vert\vert Z_{C_f} $$
$$ Z_{C_i} = \frac{1}{j\omega C_i} $$
$$ A_v^{ideal} = \frac{V_o}{V_i} = -\frac{Z_{f}}{Z_{C_i}}$$

However, when modeling the value for \$\beta\$ based on the feedback equation in the block diagram, the results are different. (Turning off the input voltage by shorting it and using voltage division):

$$ \beta = \frac{V_f}{V_o} = \frac{Z_{C_i}}{Z_{f}+Z_{C_i}} $$

Clearly, from this, \$\frac{1}{\beta}\$ does not match up with the ideal model. Am I disregarding something from my analysis that I should have, or is there something wrong with my equations?


texts: Why can't different current sources connect in series?

texts:
I've posted different question similar to this, yet still struggling to understand the theory. So here is another attempt to understand as to way two power sources(with different currents) connected in series cannot power a load without any harm? Or if it can, why can't the currents add up and the voltages?

simulate this circuit – Schematic created using CircuitLab

Although I've learned that current can flow to the load but at 5A(the lowest), why not 15A?


texts:
This is nearly not exactly how the circuit looks like, but I have a feeling that this circuit could cause problems while working. My feeling is that initially as Q1 would be in ON position, the collector voltage at the optocoupler would be 0.6V and hence to turn ON the transistor of the optocoupler, the base voltage would have to be more than 1.0V. The CTR is 470% as "If" is 5mA.

I feel the circuit is wrong. Can anyone explain it?


texts: My LED driver keeps blowing up when connected to a Lipo battery

texts:
I bought this LED driver for my Cree XHP70.2 LED
The driver specs are:

Input voltage: DC7V~15V
Output voltage:DC6V
Current: 4-4.5A
Single mode full power

I connected the driver to a power generator that has a current lock, set the max voltage to 15V, and the maximum current to 4.5A. The driver works fine, and it outputs 6V, while the generator supplies a voltage of 7V at 4.5A.
When I connect it to a lipo 4S battery with a voltage of 15V (I checked the voltage with a multimeter), the MOSFET on the driver starts smoking. I replaced the MOSFET, drained the battery to 14V, still the same issue.
Can someone please explain to me what is causing the issue, and how to address it?
Also, if I need a circuit to limit the current for the driver, what's the point of the driver again?
Is this driver not rated for such power, or is the product faulty?

EDIT: Talked to the seller and he admitted that the voltage on his store page was incorrect, and came up with a lame excuse why it should be incorrect. Anyway don't buy this product it's junk


texts:
I have a USB 3 to sata connector which I know worked on my Raspberry Pi 3 (USB 2). I have now cut the USB 3 cable and wanted to solder the wires directly to the Raspberry Pi. This is so that I can power the HDD and the Pi from the same power source (without using a powered USB hub).

I am getting no response when I power the Pi with the soldered HDD. I connected the 4 USB wires to a normal USB cable and plugged it in my laptop. It is not even detected.

lsusb and dmesg show no signs of the device being detected.

So my question is, are there any other requirements to get a USB 3 to be backwards compatible? I thought it would just be a case of not connecting the SuperSpeed data pairs and only using the normal USB 2 data pair.

I also have left the shielding unconnected. Since there should not be any disturbances around and the wire is short, I would assume this is fine.


texts:
Where can you buy preprogrammed atmel microcontrollers such as the attiny13a microcontroller in a surface mount package?

I know you can buy preprogrammed PIC microcontrollers, but not atmel microcontrollers...


texts:
I'm looking to use the following switch to switch an SPI bus ( CLK <= 2Mhz) between two different devices.

I'm reading the datasheet to see if the the frequency of the signals are going to be ok, and I'm not sure I quite understand the High Frequency Performance section (Pg 9 of the datasheet)

  In 50Ω systems, signal response is reasonably flat up
  to 50MHz (see Typical Operating Characteristics).
  Above 20MHz, the on-response has several minor
  peaks that are highly layout dependent. The problem is
  not turning the switch on, but turning it off. The off-state
  switch acts like a capacitor and passes higher frequencies
  with less attenuation. At 10MHz, off-isolation is
  about -50dB in 50Ω systems, becoming worse (approximately
  20dB per decade) as frequency increases.
  Higher circuit impedances also degrade off-isolation.
  Adjacent channel attenuation is about 3dB above that
  of a bare IC socket and is entirely due to capacitive
  coupling.

What would be considered to be a 50ohm system ? Is this referencing to the trace impedance ? Would SPI communication lines be considered 50ohm ?


texts: Troubles communicating with Pathfinder DVL without TRDI Toolz

texts:
Recently my team and I have acquired a Teledyne Pathfinder Doppler Velocity Log (DVL) that we are using for an AUV project. In the guide (found here: https://www.manualslib.com/manual/1447288/Teledyne-Pathfinder.html), it says to use a software called TRDI Toolz to connect and communicate with the DVL. However, we didn't get the CD containing the software, and we need to communicate with the DVL without that software anyways. Thus, I decided to connect via a PuTTY TCP terminal. However, I have had much trouble establishing communications in order to test it; simply put, I can connect to it, but I am not able to get any response from it.

To establish a connection, I kept the dvl on land and connected the power on the electronics box to a 12V, 1A power supply (1A was the limit for the supply even though the guide says it should be able to draw 2A, but that shouldn't limit its communication ability when it's not in the water, especially when it only is drawing 0.14 A, right?) The guide says that the it should be powered with 10.7-36V, so 12 volts should work for this purpose. I then connected the ethernet connector directly into my (windows 10) laptop. I launched a puTTY terminal using the ip 192.168.1.100 and Port 1033, as described in the guide. I also chose telnet as the connection type.

Once the terminal launched, I get a message on the terminal: "Connected to Pathfinder command interface". However, when I send a break (or anything really), no response occurs; I do not get a message or a '>' prompt. The LEDs inside the electronics box flashed every time I sent something, but I got no response on the terminal. I also entered the IP into my web browser to access the network configuration page as described in the guide, and when I look at the "Link Status" indicator, it says "Not Active" instead of "Active" like it does in the guide.

What am I doing wrong or missing? I don't have the TRDI toolz software, so I can't use that to connect. I could try using the serial connector, but my laptop doesn't have a matching connector for it. Does anyone who has worked with this DVL have any advice for what I can try next?


texts: Mosfet not passing enough current using a microcontroller and 2 power supply

texts:
I have made this circuit:

Ignore "high voltage circuit" is not used.

It's a prototype built in a breadboard with jumpers, and i have a problem with the mosfet "IRL540N", is not passing the optimal current and spark gap must be very close with almost no gap. When using power directly without a mosfet spark is very powerfull (see "SPARK-SW"), noisy and big gap, but the mosfet cut all the potential. I'm using a full charged lithium battery at 4.0V on MCU side, also i tried with 5V power supply and i get the same result (very weak spark). Transformer pull 3A max of current when connected properly. I also tried with other TTL mosfet (same result).

Looking at datasheet the IRL540N should work good even with 2.5V for that current (3A), but in fact is not.

Additionaly i have used a 16A relay to troubleshoot the circuit, i activate the relay with the 7.4V power supply and the mosfet and it works well, pulling 2A (maybe because of weak jumper cables). Still i don't want to use the relay, it consumes 30mA and as the voltage drop on batteries relay may not work good.

More images:
https://dl.dropboxusercontent.com/u/18602178/IMG_20160612_224111.jpg
https://dl.dropboxusercontent.com/u/18602178/IMG_20160612_224120.jpg
https://dl.dropboxusercontent.com/u/18602178/IMG_20160612_230414.jpg

What can cause that problem?


texts: How do i draw the bode plot for H(s) = 100000 ∙ (s + 10) ^3 /( s ∙ (s + 100) ∙ (s + 1000j) ∙ (s − 1000j))

texts:
How do i draw the bode plot for

$$ H(s) =  \frac{100000(s + 10) ^3 }{s(s + 100)(s + 1000j)(s − 1000j)} $$

I searched tutorials for the Bode plot, theory and tutorials but i can't find
a solved or raw example where \$(s-j)(s+j)\$ appears. do i just consider the imaginary \$j^2\$ as \$-1\$ and go on?
No one would explain  us how to do it but we always get it wrong when \$j\$ appears separate not as \$s=jw\$.


texts: ESP 12E resets on connecting to a client in WiFi mode

texts:
The image above is my schematic for ESP12E. I soldered the circuit as shown. When ESP is in WiFi mode (like an AP), and I try to connect to that from any device (laptop, mobile) there is a very high occurrence of ESP reset. As long as no device is connected to this WiFi, it keeps broadcasting SSID fine. But as soon as I try to connect, problem of reset happens (over75% times I'd reckon)

Has any one experienced similar behavior? I'm using good power sources (1 Amp). In fact I've tried with multiple power sources, all giving same problem. Any help would be greatly appreciated.

1: https://i.stack.imgur.com/nlYb8.jpg


texts: Make a transistor act as a potentiometer

texts: So, how would one get a transistor (probably BJT) to act somewhat like a potentiometer? What I trying to do is have xl6009 buck boost regulator be electronically controlled to charge a li-ion battery pack i.e. using a micro controller to implement CV and CC. Ideally I would insert some kind of transistor into the feedback loop (instead of the normal 10k potentiometer) and thus vary the output voltage. The problem is most BJT's I've seen don't seem to have a large active (linear) region AND the resistances in those regions are too small to allow a broad range of output.


texts: How can I measure the actual magnetic strength of my electromagnet to compare against my calculations?

texts: I am interested in building small scale electromagnets and I wanted to measure their actual magnetic strengths to compare against my calculations. What are possible ways to measure the difference?


texts: Design options for a simple AVR (Arduino) based RF communication system

texts:
I am trying to build an AVR based, RF service calling system. It works like this: someone at the transmitter presses a button and the guy at the receiver get notified with the ID of the transmitter (imagine using this in a cafe to call the waitress, so there will be multiple transmitters with separate ID’s and 1 to 2 separate but identical receivers). Transmitter will have 2 buttons: one to call waitress, and another to get the bill. So essentially this will be one-way communication, and I guess it will be via serial to transmit different information – i.e. ID, call type (?). A range of 100m is more than practical.

I have been searching around on the subject for a while, and I am still not too sure which direction to take, as far as which RF band to use, and whether or not there requires  a microcontroller on the transmitter side, which I want to avoid if possible for simplicity and battery saving (on the receiver side I will be using an AVR - with Arduino code-, because I need to drive some 7-segment LED’s to show the ID). My main concerns are reliability and cost.

I hope to be able to run the transmitter out of batteries (e.g. 3V coin batteries or AAA batteries) for about a year. Receivers will be connected to wall though.

I would be obliged if someone could offer some advice on the followings:

As far as the RF band, my search for components at some local shops shows me that I can buy (build) the following transmitter/receiver modules: 2.4GHz (NRF24L01), 433MHz and 315MHz. I wanted to use the NRF24L01 with an AVR (can program for the AVR to sleep when not active to save battery, and communicate with the AVR at the receiver side via serial) for the simplicity and the wealth of info on the net, but the issue is that the cost is 4 fold compared to the other two. The other 2 modules are Chinese with limited documentation, and I am not too sure yet how to build the transmitter around them (with or without uC), but they are very cheap.
In terms of reliability and noise/interference, which band is advisable?
In the best scenario in my imagination, if it is easy to use a 433MHz or 315MHz module (for the price), preferably without a microcontroller, that will be great. Is this easy to achieve?
I have seen some cheap garage door remotes based on these bands, with a few buttons on them and a coin battery that run for a year. They are very similar to my transmitter.  I just don’t have some working schematic so I don’t know how they work, how they are supposed to be “programmed” to have different ID’s and to communicate with the AVR at the receiver side.

I hope to receive advice on which direction to take. Thanks in advance.
Dave


texts:
I have some trouble with choosing an NTC to limit the inrush current, where I want to bypass the NTC with a relay after a certain time.

The choosen NTC should be one of these here:
https://www.mouser.ch/ds/2/18/AAS-920-325D-Thermometrics-NTC-Inrush-031814-web-850596.pdf

There is a total input capacitance of 5mF after the NTC and the Power Supply delivers 24V with a maximum of 30A.

The following schematic depicts the circuit, except that there is no transformer as load, but an input capacitance of 5mF.

The differntial equation system seems pretty complicated, since there are non-linearities from the ntc, which should be taken into account. Somehow I need to know the resistance over time, such that I can calculate the voltage at the input capacitance over time and so the current through the NTC. Has anyone an idea how to get a differential equation relation of the current and the NTC resistance?


texts: The below photo belongs to a PSU. I wonder what was the reason of placing air gaps on the 8 mm isolation. Is it to improve the isolation or provide a thermal relief (although there is no component below the red circled air gap)?


texts:
I have wired the following diagram.

simulate this circuit – Schematic created using CircuitLab

My understanding of transistors is relatively poor, and thus I am assuming it has to do with the voltage threshold of the transistor not being met.

I have set both pins in the Diagram to high yet the LED does not turn on; however, when I remove the transistor and simply bridge the gap between the LED and GND the LED does turn on.  I have check the voltage going to the Base of the Pin and it is 4.98V while the collector pin of the transistor is recieving 3.3V (roughly).  Why is the transistor not working?


texts:
Voltage doublers, like those close to be one stage of Cockroft-walton multipliers, are well known. They allow to double the voltage of an AC input and can be useful at the output of a transformer for instance. Of course, the price is that the output current is half the input current. My question is: is there a circuit (hopefully analogical and passive), not a transformer, that performs the dual task: to input an AC current, and output an AC (or even DC) current with half the input voltage, and twice the input current.

INSIGHT: it would suffice to find a way to charge 2 capacitors in series and to discharge them in parallel.


texts: This ADC code works, but I don't understand why

texts:
I have the following code for reading a battery voltage on the ADC on a microcontroller (Atmel SAM D21 to be precise.) The reference voltage is 3.3V and the ADC is reading at 12 bit resolution:
/**
 * Union for Readings
 *
 */
typedef union u_reading {
    int16_t i;
    uint8_t c[2];
} reading;

/**
 * Read the main battery voltage.
 *
 */
static void read_battery_level()
{
    // Switch on the Control Pin
    gpio_set_pin_level(ADC_CONTROL, 1);

    // Battery Voltage
    float batt_voltage = 0.0f;

    // Array of Samples
    reading batt_readings[BATTERY_READINGS_COUNT];
    int x;

    // Loop through ad Average the Readings
    for (x = 0; x < BATTERY_READINGS_COUNT; x++)
    {
        // Read the ADC Channel
        adc_sync_read_channel(&ADC_BATTERY, 0, batt_readings[x].c, 2);
        delay_us(20);
    }

    // Counter for the Sum
    uint32_t sum = 0;

    // Loop through and Average the Readings
    for (x = 0; x < BATTERY_READINGS_COUNT; x++)
    {
        // Add the Sum
        sum += batt_readings[x].i;
    }

    // Calculate the Mean Reading
    batt_voltage = (sum / (float)BATTERY_READINGS_COUNT) * 0.8;

    // Set the Battery Level
    battery_level.i = (uint16_t)batt_voltage;

    // Switch off the Control Pin
    gpio_set_pin_level(ADC_CONTROL, 0);
}

The code works and gives me a very accurate reading for battery voltage - I've tried it with a pretty accurate power source and multiple voltages and the reading is good every time. When I switch the reference voltage to 5V, it's no longer accurate, unless I remove the * 0.8 multiplier.
I'm still wrapping my head around how ADCs work, and I was wondering if someone could explain what's going on here.
Why does a multipler of 0.8 work for a 3.3V input and a multiplier of 1 work for 5V?


texts: How to design LC filter for smoothing out sine wave from sine PWM?

texts:
I am making an inverter to convert 12 DC to AC(~8.5Vrms) @50Hz. Later i will do the same for 400V DC to 250Vrms.
I am using IRF540N and IRF9540 mosfets as switch. And IR2110 mosfer driver for gate control. I get SinePWM from arduino with carrier frequency of 15kHz. And the whole project work successfully till this stage.

But now i am confuse about how to filter this PWM to pure sine wave. I know i can use low pass filter but how to choose value of L and C?
And is there more than one topologies to make filter?(i read on internet but i am not sure)
Also does this L and C's value depends on how much load i have connected?


texts: Effect of Small and Large Signal Transconductance on the Colpitts Oscillator

texts:
I've been following Ron Quan's book: Build Your Own Transistor Radios and I've come to the section where Ron is analyzing the oscillator circuits used in his designs.  In particular, he discusses the effect of large-signal transconductance (big Gm) on the Colpitts oscillator and sums up nicely why you get distortion with large signals (because the resistance to the fundamental frequency of the sine wave is greater than its harmonics - big Gm is lower for the fundamental frequency - and you end up with a wave that is narrow and peaky).

He applies the notions of transconductance to a Colpitts example (see circuit).

He describes the small-signal gain at startup to be [(little gm x R1) / (1/n)] where n is the step-down ratio of capacitors C1 and C2 = 31 for a total Av of 3.2.  All this at 1Mhz and Icq of 1ma (obviously).  No issues here, it's just R1/RE multiplied by the voltage dividers formed by C1 and C2.

However, the next section is where it comes off the rails for me.  He predicts the steady state input and output amplitude by stating that Av is approximately equal to gm/Gm, then taking the gain of 3.2 calculated above and looking this up for gm/Gm in the table shown below, he deduces a steady state input voltage of 156mV.  From there he calculates the steady state output by 156mV x Gm(i.e. 1/86 Ohms) x 2700 = 5V.

So, I have the following questions about all this:

1) Where did the capacitive divider disappear to when he calculates the steady state output voltage?

2) How does he calculate the Gm shown in the table?

3) Possibly related to #2, how does he derive the relation Av = gm/Gm?

From the research I've carried out so far, it seems that Gm could be calculated using Bessel functions and isn't trivial.  If this is true, then can someone direct me to a good reference?

Also, this thread describes exactly the same issue.  However, the explanations are unclear to me.


texts: Colour correcting RGB LEDs - possibly with science

texts:
I have some RGB LEDs (eBay - no datasheet, 4 pin, common cathode, 5mm). I am colourblind.

I'd like to create a palette of colours which appear distinctly for most people's eyes, perhaps 16 colours or more. How could I generate this palette?

I guess that the colour produced will be far from a perfect match to the duty cycle applied.

The human eye is apparently more sensitive to green, could I use this (and other factors) to improve the colour output?


texts: How does the computer's BIOS change the clock speed?

texts: A computer's BIOS can change either the multiplier value or the (FSB) clock frequency to overclock or underclock a CPU. While overclocking by changing the multiplier value is easier and in more often cases safer, it can only be done on CPUs with unlocked editable multiplier. To overclock/underclock a multiplier-locked  CPU, you have to change it's frequency. Now I want to ask: what is this frequency(often called FSB frequency)? Is it the system frequency that is supplied by the system's oscillator crystal(i guess so, since it changes also the RAM frequency)? How does the BIOS change it? Is the frequency of the crystal somehow dependent on supplied voltage?


texts: How should I distinguish intentional from parasitic series resistors in a schematic?

texts:
I need to show a few parasitic series resistors in my schematic. Is there a good way to distinguish these from intentional resistors, so it is easy to tell which is which?

Parasitic capacitors are a bit easier to do this since they are parallel parasitics and can have their leads shown in dotted lines, e.g. here as shown from Wikipedia:


texts: Euler's relation and the energy of a complex exponential signal

texts:
I'm having a little hard time understanding the equation:

Why Euler's relation's square is equal to 1?
I know how to write Euler's equation in terms of sin and cos:

But when I do the math, the square of this equality is nothing but 1. I can't get rid of from the sin and cos in the equation:
$$(e^{jwt})^2 = cos^2(jwt)+2jcos(jwt)sin(jwt)+j^2sin^2(jwt)$$
$$= cos^2(jwt)-sin^2(jwt)+2jcos(jwt)sin(jwt)$$
I'm probably missing something with the Euler's relation here so I would like to hear what am I missing.


texts: What's the difference between an inverter with a bubble at the input and one with a bubble at the output?

texts:
See this datasheet, page 2: the internal logic diagram for the MM74HC138.

The diagram shows logic inverters with bubbles at the input or at the output. Is there an actual difference between them?


texts: Stabilize frequency possible inverter backfeed

texts:
I have severe frequency fluctuations when using a inverter controlled airconditioner.
The frequency is stable with any other load or lack of load.
The power supply is a 12 5kw diesel generator which is more than adequate.
Any resistive load smooths out the frequency perfectly.
Unstable frequency is only seen when airconditioner is on.
The RPM is,stable
The fluctuations are HUGE 3-112 Hz!
Can a capacitor remedy this?


texts:
I am planning to use PIC18F26K83 and communicate with a smart battery that uses SMBus ver 1.1. So from the datasheet of PIC it says I need to choose appropriate input threshhold for SMBus from RxyI2C register. Bit 0 and 1 are being used for choosing that threshold but there is no information for SMBus ver 1.1 (See below.).

TH<1:0>: I2C Input Threshold Selection bits
11 = SMBus 3.0 (1.35 V) input threshold
10 = SMBus 2.0 (2.1 V) input threshold
01 = I2C specific input thresholds
00 = Standard GPIO Input pull-up, enabled via INLVLxy registers

And over the internet I couldn't find input threshold for SMBus v1.1. So my question is:
What is the input threshold voltage for SMBus v1.1? Or how should I set related bits in order to use SMBus v1.1 from RxyI2C register?


texts: How to create a high power buck converter power supply?

texts:
I am building a device that requires a lot of energy at its peak, about 30W.
The kind of supply I want to build looks like this:

I understand that this is made of a controller which switches a transistor at a certain frequency. The inductor and capacitor charge up during the ON state of the transistor and they discharge during the OFF state when the load is present.
The only issue here is that I can't figure out how to increase the power.
My requirements are: 5V at > 6A (I'm looking for more than 30W)
My input is >35W USB-C wall adapter at 12V.
What are the most important values in Inductance/Capacitance/Frequency to build the desired supply?
Last, magnetic fields are important in this design, thus components such as the above inductor which has a shield would be desired.
Could you recommend some reading on this topic and also what controller IC would you recommend?


texts: A current controller by regulating the voltage

texts:
I need some idea of what type of controller I should use. But, I am thinking of a PID controller.

Here is my problem:

I have a simple circuit like this one:

simulate this circuit – Schematic created using CircuitLab

In this circuit, the resistor R is time variance. My goal is to have a desired current amplitude to be generated through this circuit. My idea is to control the voltage source via a PID controller do you think it is possible? Do you have any other suggestion?

Update:

The load characteristic over a wide range of voltage looks like this:


texts: How can the charge time/startup time for a boost generator be calculated?

texts:
I've been reading about boost converters and how to do calculations with them, but I haven't found equations/an equation for determining the startup (?) time for them (where the load has a high resistance value so it can be approximated as being capacitive).  This being the time it takes for the average voltage curve to reach the high value.

One way I was thinking of for finding this was if  the energy of the inductor is transferred to the capacitor during each cycle and by determining the di/dt of the inductor, the peak current of the inductor can be determined and thus the energy that the capacitor.

So for a boost generator with an inductor with inductance L=10^-6 Henries and a output load capacitor with a capacitance of 10^-6 Farads, the equation Vl=L*(di/dt), with Vl=10 volts would yield (di/dt)=10/L=10^-7 Amps/second (assuming just a linear current rise).  Assuming a duty cycle of 95%, the current from the inductor flows through to charge the capacitor during the off time, which is for 10^-6 seconds if the frequency is 50 khz, which would mean that (dt)=10^-6 seconds, and thus (di)=10 amps.  If the peak current through the inductor is 10 amps, then the energy stored is (1/2)(LI^2)=0.5(100)(10^-6)=5(10^-5) Joules, and the energy that flows into the capacitor would be found by setting that equal to 1/2(C)(V^2), and solving for V, the inductor would charge the capacitor by 10 volts each cycle.  Then to get the time for the final voltage you could calculate how many increments there would have to be to reach the final output voltage.  The simulation I ran seems to approximate this, at least during part of the time period:

The problem is that as time goes on, the voltage the capacitor is charged by during a given cycle is reduced over time.  That's where I get stuck:

Sorry if my understandings is off with this subject but I'm trying to understand this with the math that I know as of this point.