texts: Differential gain of amplifier with current mirror and NO LOAD

texts:
Please consider the differential amplifier (Q1&Q2) with current mirror active load (Q3&Q4) as shown below:

simulate this circuit – Schematic created using CircuitLab

I know many questions have been asked already regarding this circuit on EE SE, but I didn't find an answer to my question.

My question is: what will the output voltage be when subjected to differential input WITHOUT ANY LOAD AT THE OUTPUT? Framed differently, what is the differential gain with no load?

In my understanding, the currents in the collectors of the 2 right transistors will not agree and thus the output impedances at the collectors will come into play. However, I do not know how to calculate this output impedances and how they will affect the output voltage.

Side note: If you think that asking about the output voltage with no load is meaningless than consider a load whose input impedance is comparable or larger to the output impedance looking into the collectors.


texts:
So, I've been wanting to break away from the arduino abstraction for a while now.  I made a board that has an ATtiny10 on it with a crystal and an output.  I cannot for the life of me understand what I am doing wrong.

Here's the problem:  When I select the clock source, the AVR stops working.

I had a custom PCB (small one) made to mount everything on.
Thinking I didn't do something right (even though schematic looked right)

I changed design and made another one (for the second one, I had traces with clock surrounded by a ground plane (Did not work still) [Also, the first design was using everything but the AVR sourced from ebay.  Thinking maybe it was a quality issue the second board is sourced entirely from Mouser]

Lastly, to make sure I wasn't an absolute idiot, I bought a breakout board and just breadboarded the circuit.  This still performed just like all the others

It works just fine with the internal oscillator, but as soon as I program to change clock source it stops.

Note that I added R2 to keep the MOSFET pulled down but I do not populate it for programming it, as TPI (Tiny Programming Interface) uses pullups on that line and I cannot populate that if I am going to program the chip

Page 21 of the datasheet regarding changing clock

Page 22 of the datasheet regarding the prescaler (Clock prescaler not timer prescaler)

I am using a MkII programmer from Atmel and these are the fuse bits:

Output External Clock

0xFB

This was set through Atmel studio and I have used a couple different ATtiny's and the chips kept these settings once set, so I am pretty sure the fuses are writing correctly

Now the code: (This is the whole program, the timer portion works (obviously not though once the clock switches))

#define F_CPU   8000000

#include <avr/io.h>
#include <avr/interrupt.h>

void initClock()
{
    // Setting CLKPSR does not affect the problem (It doesn't work regardless of what this is set to)
    // I have tried this before and after setting CLKMSR

    CCP = 0xD8;
    CLKPSR = 0;

    CCP = 0xD8;
    CLKMSR = 0b10;

}

void initPorts()
{

    DDRB |= (1 << PORTB0); // PB0 = OCR0A
}

void initTimer()
{
    // I posted this code just in case, this works as expected (but only on the internal oscillator)

    // We want Compare Output Mode, Clear OC0A on Compare Match
    TCCR0A =    (1 << COM0A0);

    // Overflow setting
    TIMSK0 |= (1 << OCIE0A);

    // We will not use a prescaler
    // This also starts the timer
    TCCR0B =    (1 << CS00) | (1 << WGM02);

    // This is the value at which the timer will restart
    OCR0A = 8299;

    // Set external interrupts
    sei();

}

int main(void)
{
    initClock();
    initPorts();
    initTimer();

    while(1)
    {

    }
}

Surely there has to be something I am missing.  I've tried to read and reread the especially the clock sections of the datasheet in order to figure it out myself.  I am stumped though.  Maybe someone could help me understand my mistake.

Thank you!  Please let me know if there is any more info I can add to make it easier to understand

Attiny10 Datasheet


texts:
I want to light up an LED with 220 VAC using least components. These two circuits come to mind:

R1, R2 will be around 200K - 300K depending upon the brightness that I will need. Not much brightness is required so I can even go higher if I am able to get some amount of light out of the LED.

Which one (if any) will work?

(I am not much concerned with efficiency as these will be used as indicators when a high power device is turned on. For ex - a geyser. This circuit will be wired in parallel with the geyser to accomplish that. If I use 200K resistor, I'll be using up around 0.25 watts which will be negligible as compared to 1000 watts being consumed by the main device.)


texts: Could anyone help me with the start, I don't how to begin?


texts: How is speed torque curve of an induction motor plotted experimentally?

texts:
I'm wondering how is obtained a 3-phase induction motor's speed-torque curve obtained. I couldnt find any procedure.

Are they first applying fixed voltages with fixed freq. to stators. and then gradually increasing the torque or they speed up the motor with a variable torque such as wind fan?

Any info about the procedure?


texts: Atmel Studio assembler: how do I define a port pin?

texts:
Let's say I need to test a port pin like this:

sbic  PIND,2

This should work, but in C I would definitely made a #define INPUT ((PORTD&(1<<2))!=0). Is something similar possible in assembler? Something like

.def  INPUT = PIND,2   ; this is not work!

Sorry for the stupid question. Just started to assembler after years of C-coding...


texts: how to connect usb power only to variable power supply

texts:
I have a analog amplifier like device that uses USB for power via a standard USB-A male cable. I also have a variable 0-16v power supply.

My goal is to adjust the volume of the output, by adjusting power to the driver by the variable power supply and wondering if there are any suggestions as to the best way to go about it.

I have looked for a female USB A to power cables but so far haven't found any by a couple search terms. e.g. "usb to pigtails bare wire" UPDATE: I made one using this approach male to female extension, with male cut off, only red and black wires are needed for power which I later tinned and hooked to the powersupply via alligator clips, the data wires I just cut off, i used a sharpie marker to indicate which side is negative on the connector

My current best thought is to take a USB extension cable and cut off one of the ends, strip the wires and then either use alligator clips to the power supply OR insert a variable resistor between the power output and the amplifier/transducer.


texts: Why does an ideal capacitor give rise to a rectangular cyclic voltammogram (CV)?

texts:
Many scientists are interested in developing supercapacitors, which have electrolyte rather than solid dielectric between the charged plates.  In the field of electrochemistry, cyclic voltammetry (CV) is often used to determine the capacitance of electrodes (e.g., carbon-based electrodes) in supercapacitors.

I have often heard that an ideal capacitor gives rise to a rectangular cyclic voltammogram (CV).  Can you please help me understand why this is the case?  In other words, why does an ideal capacitor reach a constant current I as soon as a voltage V is applied?

I indeed see nearly ideal CVs in many literature articles (CVs which are rather rectangular with rounded corners).  In other figures, though, I see relative deviation from "rectangles with rounded corners," in that I see abrupt peaks, spikes, or valleys.

For example, below I have plotted two figures from Khomenko, Electrochimica Acta 2005, 50, 2499-2506.  Just very roughly and "hand wavy," what might be the qualitative reason for the "rectangle with rounded corners" behavior of Figure 8 (left) and the "abrupt peaks" behavior of Figure 4 (right)?  Could it be that the sample in Figure 8 (left) is relatively unreactive toward apllied potential, whereas the sample in Figure 4 (right) undergoes redox (Faradaic) reactions -- indicating the presence of so-called pseudocapacitance -- when an external potential is applied?

Please know that I am not looking for an answer specific to the article to which I linked.  I am only asking this question in the context of basic, qualitative aspects of cyclic voltammetry. Thanks!


texts: I have a H07RN-F 3G cable which is rated at 400V/16A, can it be used for a normal 220V schuko connection without consequences?

texts: Basically making it a 2.5mm gauge cable, will it have any negative effects on appliances that run on 220V - I am not sure if a 400V/16A rating is the max or the supposed to be used at/for rating?


texts: Simple FPGA serial communication not working

texts:
FPGA board (manual)

USB-to-RS232 cable (controller)

synthesis reports

I created a simple schematic which shorts the TXD and RXD pins according to the manual. However, when I use RealTerm to send some data it seems that the result is not displayed at all (nothing is received on the PC). TXD is PIN_G9 and RXD is PIN_G12 but I have tried switching them to no avail.

I have made sure the protocol settings are the same through the Device Manager and RealTerm. What else can I be missing? I'm starting to think there is something wrong with the cable...


texts: Find Thevenin equivalent for a circuit with a current source with both parallel and series resistors

texts:
I'm not quite sure if the Thevenin equivalent I found for the circuit is correct:

To find \$V_{Th}\$, I analyzed the open circuit: as the current between A and B is provided by the current source regardless of \$R_{TA}\$ and \$R_{TB}\$, then:

\$V_{Th}=I_A*R_{AB}\$

And to find the resistance from the pov of \$V_{Th}\$ (which should be  \$R_{Th}\$), I turned off the current source and ignored \$R_{TA}\$ and \$R_{TB}\$ which gave that:

\$R_{Th}=R_{AB}\$

I would like to know if there's any error in my solution and if so, how to properly analyze it.

Thanks!


texts: Mosfet as a Power Selector Switch - Value of a Resistor & Other Clarifications

texts:
I'd like to breadboard a simple circuit which implements a mosfet pair to emulate a mechanical SPDT switch.

The circuit schematics can be found here.

The circuit looks identical to one that can also be found in page 8 of Vishay's Si4700DY Datasheet.

Assuming that both the Main Supply & the Secondary Supply are 12Vdc, and that the load doesn't exceed 0.3A, my first two questions are:

(1) What would be a suitable value & rating for the resistor in this circuit?

(2) Would it be ok to use a 12Vdc signal for the Control Signal of this circuit?

Moreover, the last answer to another, related question posted on this forum here, suggests an even simpler circuit to achieve the same goal as the present one (or so it seems to me).

My questions in this context are:

(3) Is the simpler circuit correct?

(4) Would it work in my case given the above specs?

Many thanks!


texts: Two-terminal Connection High-Side MOSFET driver

texts:
So I'm trying to make a discrete device that functions the same as the highlighted portion of the diagram, which is taken from a Battery Management System chip.

I understand that n-type FETs are used in this diagram, and that the gate voltage must be higher than the source voltage, such that a charge pump is located in the green FET Control box.  I also understand that this is a high-side driver, and that a low-side driver might be able to perform the same job with simpler electronics.  I've researched both, though I'm having difficulty finding something complete enough to actually implement them.  The only functionality I want is to have a separate load and charger lines, which I believe allows for polarity reversal protection when charging.  It has to be able to handle up to 40V and up to 10A charging current.  The rest of the battery management system is handled by another IC, which unfortunately doesn't have this functionality.  Any off-the-shelf parts would be preferred, but I can try to muddle through diagrams with part numbers or search phrases, but I'm a Chemical Engineer by trade and am out of my depth with hardware.

Any help or input would be greatly appreciated.


texts: Why is D2 switched off and T4 not in saturation mode in 7408 TTL Gate as shown below?

texts:
In the circuit, when both the inputs are high at 5V, than why is D2 switched off? Will it not draw voltage from Vcc?

Also, when one of the input is low, why is T4 not running in saturation mode? Will it not get high base current from Vcc?


texts:
Bear in mind, I have zero electrical background, this is just a hobby so correct me if I make mistakes. This question is part of my journey trying to create my own pcb.

I want to create a power supply for an ATmega328P SMD microcontroller and a Legacy Digi XBee S1. According to the datasheets the XBee operates between 2,8-3,4V and the ATmega328P operates between 1,8-5,5V. Together I expect them to draw less then 150mA in power.

I decided to use 2 Li-ion cells to supply the power (they supply 3,7V in parallel). Now to make sure the voltage stays within range for both devices I decided to put a voltage regulator in my circuit.

I chose the TPS78001DDCR SOT because this voltage regulator uses very little power by itself and from what I've read should be one of the most efficient ones.. (long battery life is important to my application).

The datasheet mentions (as seen in the images) that it's a good idea to add capacitors to the IN and OUT pins. I have selected KEMET C0603C105K9RACTU as the to be used capacitors with a value of 1µF.

I have schematics and a custom parts library in Eagle for all of this.
This is an edited diagram after remarks from Bimpelrekkie:

My question is:

Am I right that the chosen voltage regulator is the better choice for my application (terms of efficiency)?
Did I choose the right capacitors (1µF)? The datasheet mentions 0.1µF aswell.
How do I program the output voltage (3.3V)? I can't seem to wrap my head around the calculations done for programming the regulator. (datasheet chapter 7.5 or page 17)

Thank you for reading this far :)


texts:
I have a satellite communication system at office running on C-band. The C-band is downconverted to L-band and carried to the l-band modem. With this RF coaxial waveguide/cable, +12V DC power cable for the outdoor amplifier is also routed tied together. I know ac power cable shouldn't be laid along with the RF/coaxial cables. But I am not sure with the DC cable. So my first question is Can we route RF cable along DC power cable? And what is the minimum separation to be maintained if we have to.

For the second question, I read researching on the subject that power cable can laid in perpendicular with the RF cable but not parallel. I have a guess for the reason being that the magnetic field vector from the power cable shouldn't effect the electric field vector of the RF cable, but sure. So can someone please explain the reason for laying the power cable with RF cable in perpendicular (if needed) but not parallel?


texts: How to determine how long a relay can stay engaged?

texts:
I have a device where I want to use relays to run some important equipment. I want to use monostable relays because if power is lost or if there is any sort of system failure I want the connected device to shut off. This means I'll probably be running the relays continuously or nearly continuously for up to a few hours. I'm concerned about coil heating or otherwise damaging the relay.

I've been looking at some datasheets like these G5Q Datasheet, G5LE Datasheet and I'm having trouble determining how long I can safely keep the relay engaged. I don't see anything indicating a max time or max duty cycle. Does this indicate I can simply leave the relays engaged indefinitely or is there a proper way to go about calculating this?


texts: Detecting 1'bx and 1'bz bits in a Verilog variable

texts:
I have a 128 bit wire:

wire [127:0] test;

I want to stop simulation if any of the bits of test is 1'bx or 1'bz. This is what I tried:

if(&test == 1'bx || &test == 1'bz) begin
   $stop;
end

Unfortunately, 1'bx and 1'bz do not seem to propagate under &. I have also tried replacing &test with |test.

How can I quickly check if test contains any "don't care" or "tristate" bits?


texts: Drive 4 DC motors off a dual drive motor controller

texts:
I'd like to build a 4-wheel skid steer robot. I have selected this motor and this motor controller.

The motor controller can handle a 10A draw and has the ability to operate over serial TTL and give me encoder feedback (which is what I want).

The motor controller is designed to drive two motors (not four). I know that I can link two motor controllers together (one for left wheels and one for right) — but is that necessary? I mean the motors are rated at 2300mA max and the motor controller is 10A. Would it be a bad idea to simply connect two motors to channel A and the other two to channel B?


texts:
So I am building a rather simple constant current load to test power supplies. I am using an INA138 for high-side current measurement with only 5V power (and I have reasons for that, unfortunately) and a couple of opamps to control the current through the Q1 mosfet. On the schematic, VCC is 5V power, CURSENSE is the voltage proportional to the current passing through the R1 resistor and Q1 mosfet and CONTROL is some voltage setting the constant current (e.g. DAC output or well-filtered PWM straight from a uC). The power input is on the left.

At first, I tried to simply put an opamp in a comparator mode. The schematic started oscillating and crashing in the simulation. Then I tried to lower the error amplifier gain to 100 V/V (second schematic). This schematic kinda works in the simulation, however, that raised a number of questions in my head.

Since I've essentially created an analog PID controller with only proportional coefficient in the second schematic - do I need to implement a full-scale analog PID controller (like the one in this question) with an integrator and differentiator or will the second schematic be sufficient?
When exactly (excluding cases with mechanical systems and such) do I need to implement a PID controller or lower the error amplification gain? For example, a simple opamp voltage follower is also essentially a controller that tries to set it's output voltage equal to the input one and somehow it is fine without PID or gain reducement.
If I only need to lower the gain - how should it be selected?
What could be the requirements for the error amplifier opamp?


texts: Package/Device for a component with duplicated pins

texts:
I have a L79L05 from ST Microelectronics, which has the following pinout:

I have created a symbol and package in Eagle for that component. The symbol has three pins - IN, OUT and GND, while the package has 8 pads. When creating device, I connected pads 2, 3, 6 and 7 to the IN pin. As a result, in board editing mode, Eagle adds airwires that asks me to connect all these pins on PCB:

Of course I can overcome these airwires by either ignoring it, or by creating a symbol which has 8 (or 6, as two marked as NC) pins, and assign some of them to a same swap network. But I would like to find a better solution, if there is one.


texts:
So I am little weak when it comes to circuits and i am confused in transistors. There are two diagrams for an npn transistor and both seem different..

Now in the first picture the base is connected to positive terminal through Vee and negative terminal through Vcc. How is this possible? In the second diagram however the base is only positive.

1) If the first one is correct. Then how does the base know to choose the + and become forward bias for base-emitter and when to choose negative to become reverse biased for base-collector?

2) If the second one is correct then how is the base-collector reverse bias as they are both connected to +ve terminal. The depletion region may still widen because the electrons in collector are attracted by the positive terminal (Vcc) and the positive ions left behind will repel the positive holes from the base. Also the +ve terminal (Vee) is also repelling the holes so how does this work out?

3) If both are correct then this means both diagrams are equivalent? How is this possible? Do note i am a computer science student so try to give the answer in simple words.


texts:
I have an issue quite similar to this one.
The behavior of my MAX7221 is the following:

when powering on the board the first time (let's from cold & dark) it turn on all the segments and does not respond to any SPI command
turning off and on the power supply leads to the correct behavior
turning off the power supply, short-circuit V+ with GND, and turning on leads to the same behavior of point 1.

Here my schematic:

Other information:

I checked the source of the IC: Mouser
I tried with different SPI clock speeds: it changes nothing. When it works, it works always. When it hangs on power on, it does not respond until a power cycle.
I tried with different C51 values: it changes nothing. From 0 pF to 2200 uF the behavior is exactly the same. On the 5V rail I only have another 10 uF placed close the power supply and a bunch of 100 nF placed close the other ICs.
the datasheet says: "Display Blanked on Power-Up" but this is not true. Even when it works correctly, on power up it shows some random segments on. Anyway, I can issue the SPI commands to turn them off.

Because after a power cycling it works fine, I bet there is something about the capacitors. Because the MAX7221 does not have a reset pin, the only idea that comes to mind is to add a power switch to turn it on after a while... but I wonder if there is a more elegant solution.


texts:
I'm building a "precision rectifier" using an op amp and some diodes. The schematic is attached. On a breadboard, this circuit behaves as expected, producing a clean, rectified sine wave. When I transfer the circuit to a protoboard, I get the signal shown in the attached scope capture. One side of the sine looks clean and the other is noisy. I've done this twice now, with the same results! Any ideas?

One possible culprit... I'm driving the input with an iPhone signal generator app, because I don't have a proper function generator. Maybe it's not up to the task? It seemed to work fine when the circuit was on the breadboard. I've rung the circuit out multiple times with a multimeter and I'm still not sure what's going on here.


texts: What memory operation gets inferred when read port datawidth is larger than physical BRAM width? Xilinx 7-series + Verilog

texts:
From the 7 Series Memory Resources User Guide (page 11):

The block RAM in Xilinx® 7 series FPGAs stores up to 36 Kbits of data and can be configured as either two independent 18 Kb RAMs, or one 36 Kb RAM. Each 36 Kb block RAM can be configured as a 64K x 1 (when cascaded with an adjacent 36 Kb block RAM), 32K x 1, 16K x 2, 8K x 4, 4K x 9, 2K x 18, 1K x 36, or 512 x 72 in simple dual-port mode. Each 18 Kb block RAM can be configured as a 16K x 1, 8K x2 , 4K x 4, 2K x 9, 1K x 18 or 512 x 36 in simple dual-port mode.

I have some confusion about inferring the dual port block RAM using HDL. From my understanding if I want to use dual port mode, there are two 18 Kb RAMs to do so. If my data width is 16-bits, I need to use one of the 1K x 18 or 512 x 36 modes.
What happens if I create a Verilog module who has an output port that is larger than 36-bits? For example, I'd ideally like to read as big as possible of a chunk of data from BRAM at a time (same with writes), as quickly as possible. If I created a port that was 16-bits x 16 data wide (256 bits), what hardware would be inferred (Verilog example below)? Would it just happen over multiple clock cycles?
Also is it good design practice to wrap the reads around the end (back to the beginning of the BRAM) when the address + offset is greater than the depth of the BRAM?
module BRAM #(parameter DATA_WIDTH=16, DEPTH=8, N_READ_ELS=16) (
  input                             Clk,
                                    Reset,
                                    WriteEn,
  input [DATA_WIDTH-1:0]            DataIn,
  input [DEPTH-1:0]                 AddressIn,          // 2^DEPTH = number of elements
  output logic [DATA_WIDTH*N_READ_ELS-1:0]     DataOut);// [N_READ_ELS]);

  // Main storage
  logic [DATA_WIDTH-1:0] Data[2**DEPTH];

  // Combinational reads
  integer i, SHAMT;
  always_comb begin
    for(i = 0; i < N_READ_ELS; i = i + 1) begin
      // if address + offset is outside address range, wrap around to beginning
      if (AddressIn + i >= 2**DEPTH)
        SHAMT = 2**DEPTH;
      else
        SHAMT = 0;
      DataOut[(i+1)*DATA_WIDTH-1 -: DATA_WIDTH] = Data[AddressIn+i-SHAMT];
    end
  end

  // Clocked writes
  always_ff @ (posedge Clk)
  if (Reset) begin
    Data = '{default:'b0};
  end else if (WriteEn)
      Data[AddressIn] <= DataIn;

endmodule


texts:
I have this problem:

Consider the circuit below:

\$V_{in}\$ has an amplitude of 17V and a frequency of 125 kHz.
What is the peak of the short circuit current between the terminals \$a\$ and \$b\$?

Okay so this is how I thought about solving the problem. First finding all the impedances with the formulas:
\$X_C = \frac{1}{j\omega C}\$
\$X_L = j\omega L\$
Now creating mesh current equations, all currents going clockwise:
\$-V_{in}+X_{C1} \cdot i_1+X_L(i_1-i_2) = 0\$
\$ X_L(i_2-i1)+i_2\cdot R+X_{C2}(i_2-i_3)=0\$
\$X_{C2}(i_3-i_2)=0\$
Inserting all the values, setting \$V_{in}=17 \mbox{V}\$ to get the peak value and solving the equations with Maple we find that:
\$i_3=-0.029289+0.263783\cdot j\$
Taking the absolute vales we get: \$i_3=265.4042 \mbox{mA}\$, which I assumed was the correct answer. However, double checking with Lt-spice I get a different result for the peak value.

Who should I trust? My calculations or the simulation tool?
I hope someone can help me out.
EDIT
Another problem I have with the simulation tool, is that doesn't give me a consistent result of the peak value, as seen below.


texts: USB reverse polarity protection - MOSFET

texts:
I am thinking about a relatively cheap and simple protection against USB reverse connection/reverse polarity. At the moment I am thinking about P-channel MOSFET, with the drain directed towards the USB socket.
I heard that TVS diodes can also, in addition to protection against esd, prevent reverse polarity, but I would not be able to choose them exactly.
Pins D + and D- are connected via resistors to the STM microcontroller.
As it is a Type P mosfet, the gate being low will cause the transistor to conduct from the drain to the source. I predict that when the usb plug is plugged inversely, the mosfet gate will be high and the mosfet will shut off, preventing damage to the receiving circuit.
But these are only my modest theoretical considerations, and I would like to ask if I have not made a logical error here or if something is not ok from a practical point of view. I saw some  Regards!:)


texts: Can reversing AC polarity of one of two adjacent LED bulbs reduce overall flickering in a room?

texts:
Can reversing ac polarity of half of the bulbs in a chandelier bring the flickering out of sync (out of phase) so that half of the bulbs are ON while the others are OFF?
I mean the AC polarity of the socket and not the DC terminals of the internal driver circuit
I did some experimentation with a 5 w bulb, a testing socket and the phone's camera after removing the defusing cap and zoom to the LEDs but the result was not what I expected : the light was not exactly blinking but moving in a line from side to side and when the socket was flipped instead of reversing direction or just stay the same the light just flicker without the first pattern.
Another LED bulbs were not flickering at all but they are too bright and uncomfortable fir indoor.
To be honest the flickering is not detectable unless you put some effort to detect it by playing with the camera's anti banding and frame rate settings but I'm afraid it could one day ruin an important video.


texts:
In this pdf https://studylib.net/doc/18704299/chapter-1 the author writes that the Fourier transform of the current density is:
$$
\Delta j_{i}(\mathbf{k}, \omega) \equiv \frac{1}{(2 \pi)^{2}} \iiiint e^{-i(\mathbf{k} \cdot \mathbf{r}-\omega t)} \Delta j_{i}(\mathbf{r}, t) d^{3} r d t
$$
which looks like an ordinary Fourier transform. However, in the same calculations, they write that the Fourier transform of the electrical conductivity function is:
$$
\widetilde{\sigma_{i j}}(\mathbf{k}, \omega) \equiv \iiiint \sigma_{i j}\left(\mathbf{r}^{\prime \prime}, t^{\prime \prime}\right) e^{-i\left(\mathbf{k} \cdot \mathbf{r}^{\prime \prime}-\omega t^{\prime \prime}\right)}(-1)^{4} d^{3} r^{\prime \prime} d t^{\prime \prime}
$$
It thus seems that the Fourier transform constant is here \$(-1)\$ rather than \$\frac{1}{\sqrt{2}}\$, which doesn't seem to make sense since both Fourier transforms are used in the same derivation. The end result is correct, but I don't understand how different conventions of the Fourier transform can be mixed in the same calculations?


texts: Single pair ethernet (SPE) PHY with ESP32

texts:
can I connect this Single Pair Ethernet PHY http://www.ti.com/product/DP83TC811R-Q1 to a ESP32 chip? Do I miss something?

Does anyone already know a Switch for Single Pair Ethernet?

Looking forward to your input.


texts: Transfer function of a cascaded passive + active filter

texts:
How do I get my H(s) transfer function from this circuit? If there was infinite impedance between the two filters, I'd just do H_LP (s) * H_HP (s). However, we are assuming that the input/output impedance of the high/low pass components are having a non-negligible effect, call it H_z (s). So our final equation should look like: H(s) = H_LP (s) * H_z (s) * H_HP (s). I'm trying to quantify that H_z (s) term.

Solving the circuit should help with H(s). I think there's something I can do with KCL, but I'm stuck. If you could walk me through getting Vi and Vo as a function of s, R and C, that'd be appreciated as well.


texts: I'm trying to interface ADS1115 to MAX10 FPGA. I've managed to start reading from the ADS1115... but I'm facing another problem as of now... even when i connect A0 to 3.3v I'm reading junk i.e constantly fluctuating values from as low as 500 to 63000 from the conversion register... any help would be much appreciated...


texts:
I read that current is 'drawn' and voltage is 'taken'.

Im learning basic circuits with an Arduino, and in one tutorial, a resistor is needed to take a 9v power supply and bring it to 30 milliamps for an LED.

So my questions are:

Is it true that current is "drawn", if so, why is a resistor needed, why would the LED just "draw" the 30ma it needs.
I think I may have realised that current is "created" based on a voltage and resistance of the circuit, and in fact the 9v battery doesn't have an intrinsic amp rating, its just 9v and has the the amps are determined by the circuit, is that right?


texts: Reverse-Current Protection with p-Channel MOSFET

texts:
I'm encountering an issue where reverse voltage/current on an output pin of an IC is backdriving into the power rail of a board.  I would like to add reverse voltage/current protection to the circuit.  A simple schottky diode will not work here since the drop of the diode (0.3 V) will reduce the voltage at the Vdd pin to the absolute minimum operating voltage (3.0 V). (See very bottom image)
I've read that a p-channel MOSFET can be used, instead of the diode, to reduce the voltage drop.  The drop will therefore be Vds, which is I * Rds(on), which is hopefully smaller.
I'm having a hard time figuring out Vds and Rds(on).  How would I determine Vds or Rds(on) from the datasheet?  The IC draws 600 uA - 1100 uA of current.  So the drain current will be 600 uA - 1100 uA when the transistor is on.  Which seems very low.
Does drain current matter as long as Vgs < Vth(max)?
For instance, if I use a IRLML6402 (see top image), the max Gate Threshold Voltage (Vth) is -1.2V.  As long as I'm below that threshold, -3.3 V in this case, will drain current matter?  What then is Vds and Rds(on)?
Last question, if the p-channel MOSFET does not work, would a load switch IC be better? (See middle image)
I appreciate any help here.
Option 1: p-channel MOSFET

App Note: https://www.ftdichip.com/Support/Documents/AppNotes/AN_146_USB_Hardware_Design_Guidelines_for_FTDI_ICs.pdf
FET: https://www.infineon.com/dgdl/irlml6402pbf.pdf?fileId=5546d462533600a401535668d5c2263c
Option 2: Load Switch

https://www.ti.com/lit/ds/symlink/tps22930a.pdf?ts=1599715433170&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FTPS22930A
Circuit in Question:


texts:
I hate to draw things, but here is the system I am working on:

In this system, as I switch on/off the AC pump through the contactor(with a flyback diode), the circuit(controller card) randomly shuts itself to the start state. So far, I have yet to pinpoint the issue.

I will not request you to find the issue from this crude schematic though. I did some research on removing noise from circuits, and stumbled upon this:

Capakor General Technical Information

Here on page 4, it looks like my scenario - common mode noise: main circuit isolated from earth ground, yet close to it - and as a suggestion, it advises to encase the circuit with a grounded metallic case and shunt the stray current through Y capacitors.

My board doesn't look like a simple "source and load" system though, it includes a 40+ pin microcontroller.

So my questions are:

Are Y capacitors mandatory in this scenario, assuming the noise is caused by stray capacitances as on the document? Because everywhere else mentions they are mostly used in SMPS's and mains voltage related things.
If they are necessary, where should I connect them? It seems to me that the noise is radiated type, because input voltage is already fed by an SMPS, which gives stable voltage (as far as my cheap non-True RMS multimeter says)


texts: Changing pin direction without glitching on LPC800

texts:
I'm looking at an LPC812 Cortex M0+ microcontroller and its GPIO functions. On a PIC microcontroller, one would always set the LATch prior to changing the direction of a given pin. This avoids the possibly nasty situation where a pin "gitches". ie: the output state of the pin is a 1 just before you change direction and set it to a 0. This results in a pin output changing from 1 to 0 over a sub-microsecond duration.
(related: Why set PORTx before TRISx?)

However, it is not obvious from the user manual (UM10601) whether writing a value to a pin which is currently an input has any logical effect (it will not have a physical effect on the pin state as it's an input). Thus if I write a zero to PIN0 (page 92/93) that should in theory clear all the output bits. If they were latched, which isn't certain.

Section 7.7.2 says that "If either or both of these conditions (ie: set to gpio and set to output) is (are) not met, writing to the pin has no effect.". Which isn't helpful as I know there's no physical effect.

Under the IOCON description (6.3, page 68) is the following Remark:

  If the open-drain pins PIO0_10 and PIO0_11 are not available on the package, prevent the pins from internally floating as follows: Set bits 10 and 11 in the GPIO DIR0 register to 1 to enable the output driver and write 1 to bits 10 and 11 in the GPIO CLR0 register to drive the outputs LOW internally.

In my opinion this is an incorrect sequence (unless the GPIO port outputs defaults to low, something else that isn't documented). On a PIC16 I would set the HI/LO state first, then change the direction.

I admit that if the part had arrived I would just test this on the bench. However I'll put this on stackexchange as I'm seeing examples everywhere which set direction and then the value, all of which may be glitching output pins.


texts: How do you change the default via dimensions in Altium?

texts:
When I place a via, it always has a diameter of 1.27mm and a hole size of 0.711mm. I want all of my vias to be smaller and it's really annoying to have to change them manually EVERY time. I tried going to Design > Rules and changed the "RoutingVias" rule so that the "Preferred" dimensions would be the ones that I want, but they still come out with the larger default dimensions.

I've googled this but haven't found what I'm looking for. I also tried changing the maximum hole dimensions to be the ones that I want, but the vias are still coming out way larger.

Anybody know how to get my vias to default to particular dimensions when I place them?

Thanks!


texts: DC voltmeter gives unknown reading when powered

texts:
I just bought a DC 3 wired voltmeter and it was working perfectly. Here is it image:

I used the yellow wire for measuring the voltages. But for some reason, I desoldered the wires and soldered pin headers. Now it gives unknown reading like 0.XY (eg 0.37) whenever I just connect the positive and negative to battery. It was not happening before.
Can I be helped to troubleshoot what I did wrong? Have I damage the circuit?

Here is the underneath image of the one I soldered:


texts: What happen if i connect the capacitors with few LED Strip in parallel?

texts:
I want to make my LED Strips which connected in parallel to dim out slowly. Therefore, i thought of using few capacitors (in parallel) to make this possible.
if i"m using 12V batery as power supply and few LED strips with different length, my qustion is:
1) if i using the capasitors in the circut, will the voltage drop on the through the every LED Strips be the same???
2) is the discharged time for capacitors would be the same as if i use one LED strip?


texts: Confusion of how current can flow in a 1+ henry LR circuit

texts:
I'm trying to understand how current actually flows in a circuit where you have a 1 Henry or greater inductor in it.

I understand that the voltage across the inductor is V = L*(di/dt) but if L is 1 or greater then how do actually get a starting current flow at all assuming say a 1 ohm resistor with a DC power source of 10 volts, making i(max) = 10 amps.

Wouldn't as soon as you connect up an "ideal" dc power source you get an instantaneous change of 10amps over lets just say 1 time unit (however small you want to choose that to be) and therefore back emf be 10v and then the current would be 0 since those two voltages would cancel each other out? And therefore the change in current couldn't actually be possible unless di/dt were less than i(max), but even then if you have a greater Henry inductor even that doesn't hold true? Does L*(di/dt) always HAVE to be less than power supply voltage, is this situation just not possible, if so why?


texts:
Many simple MCUs do not provide DACs despite having PWM output. For low clock frequencies like 8MHz, PWM does provide very poor quality if used for audio purposes. E.g., TI mentions in application notes that 32kHz PWM with 8 bit timing resolution would result in an analog signal quality compared to 4-5 bit resolution DAC.

I wonder if one would be better off using UART TX at the highest possible baud rate - e.g. some MCUs would push out up to 400kBit/s at 16MHz.

Compared to the PWM method with its 8 or 16 MHz time base, we have only 400kHz timing resolution for each bit, but on the other hand, we may do far more level switchings in some given interval.

32kHz PWM does 64k switches per second with an 16Mhz timing resolution.
400kBaud UART allows for 400k switches per second with 400k timing resolution.

If we convert 50k samples per second to 50k 8-bit dithering patterns, what effective audio signal quality can be expected?


texts: When power removed from LED circuit LED stays on

texts:
I have a 12v DC input that I am stepping down to 2v with 610 ohm resistor. When power is removed the light is staying on for a period of time and slowly dims.

Would the resistor be acting like a battery?

Any ideas if not the resistor?

Thanks

EDIT:
My circuit is a resistor wired to the positive arm of the LED and the negative wire off of the negative arm. I am connecting it to a car battery in this case. When I take the leads off the battery the light stays on and dims over time


texts: How to choose MLCC cap values for power supply decoupling?

texts:
I've read that it's best to use several MLCC caps with different values to filter out as much the varied frequency noise as possible.

On the output of the voltage regulator, I see some noise in the 100MHz frequency that I would like to filter out. According to datasheet, this noise is expected as a side effect of the switching effect of switching transistors inside the switching regulator (fsw = 1.5MHz). The 100MHz noise is associated with the switch-node ringing resulting from the parasitic inductances and capacitances.

What should I look for in an MLCC that would best filter out this 100MHz noise as much as possible?

I already have 10uF and 0.1uF caps, and considering adding a 3.9nF cap.  The 3.9nF was selected since I see this cap has the lowest ESR and lowest Z at the 100MHz frequency.  (The ESR and Z graphs show a V that hits about 100MHz at the lowest point).

Would this be a suitable capacitor to filter out the 100MHz noise?

What impact if any would the SRF (self resonance frequency) would have on the output, and should I be concerned with this?  It appears the SRF of this capacitor would be around 100MHz (as the f where Z == ESR is 100MHz).

If I go even lower in value such as 3.3nF, the SRF shifts higher, but I will gain a higher ESR and Z at the frequency I'm trying to filter out.

What's the best way to select MLCC values?


texts: I'd like to use this connector in my design but couldn't find what it's called. Anyone know?


texts: How to interface common-ground microphone headset with separate-ground audio device?

texts:
I am trying to interface a theatre Comms unit with a consumer TRRS microphone headset.

Comms headset outputs consist of a 4-pin XLR with the following pinout:
1. Mic input; 5V phantom for electret
2. Mic ground
3. Speaker output
4. Speaker ground

These units separate the microphone ground from the speaker ground. If the two grounds are bridged (i.e. pins 2 & 4 shorted), a very loud buzzing occurs when the microphone is enabled.

My problem is that consumer headsets with TRRS connectors have a common ground between microphone and speaker L & R. I assume there must be some passive method to take the speaker output from the comms unit, and couple it to the headset common ground, while leaving the two grounds separate.

Below is a guess at a circuit to do so — would it work? What transformer spec would be appropriate? I want the impedance to work for 30-300 ohm headphones.

NB. the Microphone must remain a complete circuit due to the DC phantom power for the electret preamp.


texts: Does all the alphanumeic LCD modules have backlight? and where can I find LCD commands for this module?

texts:
I am using Oriole 8x1 LCD Module - 08108-3SL/X. I interfaced this module with my pic18f458 and made it display "12345678", so its working.However, the back light is not ON and when I vary the contrast pin, It only affects the numbers being displayed on the LCD but not the brightness. So my question is:

1). Does this model of LCD module even have a back light feature? If so, then why isn't it working? - It has not been mentioned in the website anywhere.

2). Does anybody know where can I find the LCD commands relevant to this module?. As there is no information regarding the LCD commands on oriole site. The image below is the datasheet for 16x2 LCD module, I used this one since there was no datasheet for the one I am using i.e. 8x1.

To those, wondering how I interfaced this LCD module and made it work without knowing where to find the commands, I am using a code snippet that was being used in my previous company. But I do not know from where they got the LCD commands relevant to this module, as its not there in the official oriole website. The below shows the schematics of LCD + PIC connections. I have used PORT D for D0 to D7 of LCD. Port C0 for RS, C1 for R/W and C2 for EN. I believe rest are understood. The schematics I have provided is generic.


texts: Which diode would I use to prevent over charging a battery?

texts: For my school science project, I need to prevent overcharging my 1.2v rechargeable batteries. I have two which adds up to 2.4 volts. I need to make sure my batteries don't overcharge with my solar power. Should I use a diode? Should I use a resistor? Should I use a charge controller? Please link possibilities from Amazon.com so I can buy them! Project is on a tight deadline!


texts: Explanation of Conditions of Equivalent Electric Circuits

texts:
Two electric linear circuits are equivalent when they have the same voltage-current relation at the terminals of interest under all circumstances.

In order to check if two circuits are equivalent across two terminals you have to

Turn off the current sources and find the equivalent open-circuit resistance across the terminals in both circuits
Short-circuit the terminals and find the short-circuit current flowing there

What I can't find is why those two procedures ensure that the circuits are equivalent under all circumstances?

Why we only check for open-circuit resistance and shot-circuit current?

If you could link material or sites or books (even better) explaining the reason I would be glad.


texts: Enery and power when we have trigonometric functions (Fourier transform)

texts:
It is asked to evaluate the energy and power of the signal

$$x(t)=10\cos(100t+30°)-5\sin(220t-50°)$$

Since it is periodic, I need to find

$$\int _{-\infty}^\infty |x(t)|^2 dt \text{ and } \frac{1}{T}\int_{-T}^T |x(t)|^2 dt$$

Where \$T\$ is the period of \$x(t)\$ (which is \$18\$). By Parseval's theorem, we know the energy is conserved when we do a Fourier transform and I was trying to use it (but I couldn't). What is the best way of evaluating those integrals?


texts: Why the DC voltage doesn't affect the high pass with the NMOS Transistor?

texts:
By changing the gate-source voltage of the NMOS transistor, I can alter the resistance in the triode region. The transistor becomes a voltage-controlled resistor.
I don't understand how it affects the high pass filter and the \$I_{\text{DS}}\$ current when I decrease the voltage to 2.0 V.

I decreased the voltage here in V2 and I got this graph.

And for the V2 = 3.3V I have got this result.

Where I can see that the voltage to the gate doesn't affect the high pass filter.


texts:
I'm new with vhdl code. I have three (and) components and one (voter) component. I don't want to active those (and) components in one time, I want to active the first then, when I have the answer of the first (and) component, active the second and when I have the answer of the second, active the third. Then vote between three answers. what should I do?
Please help me with this problem.

here is the top entity:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity triple is
port ( A, B: in std_logic;
      O: out std_logic);
end triple;
architecture Behavioral of triple is
component and_1 is
port (a1, b1: in std_logic;
      o1 : out std_logic);
end component;

component and_2 is
port (a2, b2: in std_logic;
      o2 : out std_logic);
end component;

component and_3 is
port (a3, b3: in std_logic;
      o3 : out std_logic);
end component;

component voter is
port (a, b, c: in std_logic;
      output : out std_logic);
end component;
signal out1, out2, out3 : std_logic;
begin
 -- ands---
 firstand: and_1 port map (A, B, out1);
 secondand: and_2 port map (A, B, out2);
 thirdand: and_3 port map (A, B, out3);
 ---Voter---
 vote: voter port map (out1, out2, out3, O);
end Behavioral;

The first and component:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity and_1 is
port (a1, b1: in std_logic;
      o1 : out std_logic);
end and_1;

architecture Behavioral of and_1 is

begin
o1 <= a1 and b1;

end Behavioral;

The second and the third components are like the first.

Here is the voter component:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity voter is
port (a, b, c: in std_logic;
      output : out std_logic);
end voter;

architecture Behavioral of voter is
begin
output <= (a and b) or ( b and c) or (a and c);
end Behavioral;


texts: Why put unpopulated components on a BOM?

texts:
I've ran into quite a few engineers from unrelated backgrounds that put unpopulated components on the BOM. Some will do a section clearly labelled DNP at the bottom, others will leave them dispersed throughout the BOM, but highlight the rows.

Having a DNP section seems like the way to go if you must do this, the only downside I can think of being that there will have to be more manual editing of the CAD package output. (Have personally witnessed this, the DNPs were changed at the last minute, the DNP section didn't get editted properly, and parts that shouldn't have been on the board were placed.) Leaving them throughout and highlighting the rows seems suboptimal because there could easily be duplicate rows for populated and not populated, and again, more manual editing.

I don't see why this practice is necessary. A BOM by definition is a list of things required to build something. If a component is not on the BOM and assembly drawing, it should not be on the board. Adding components that aren't actually there just seems like a source of confusion further down the line for whoever enters the BOM into the ERP and purchasing. What does putting unpopulated parts on the BOM achieve that leaving them off the BOM and assembly drawing doesn't?


texts: Do the SPI modes have a specific application?

texts:
I recently started learning and applying the SPI protocol with a OLED display and it's been a good learning experience. The sample code of the display used the SPI Mode1.
This made me wonder, if there are specific applications for each of the SPI Modes?

To be more specific, Are any of the 4 SPI Modes (eg: Mode0) more preferred in a specific industry (eg: Automobile industry or Aerospace Industry)?
OR

Are any of the SPI modes more preferred in a certain application (eg: display interface or 4-20mA circuits)?

Thank You in advance.


texts: How does a connection of a wire to a bus bar work without overheating?

texts:
The typical design of a bus bar used in a house main panel is like this:

a solid bar of brass or copper has two sets of holes - wires are inserted in holes without threading and screws are driven into holes with threading and those holes are perpendicular to each other and so when a screw is driven in it presses the wire to the opposite side of the hole without threading and that secures the wire.

What bothers me is the following. A wire is typically round and a hole is typically round and typically the wire has smaller diameter that the hole. So when a small cylinder of the wire is pressed onto a bigger cylinder of the hole

the area of contact between them is not very large. Yet this setup is widely used.

How do such connections that presumably provide a very small area of contact conduct up to dozens amperes of current without overheating?


texts: what is the torque required by stepper motor to hold an object of 400 grams

texts: What is the torque required by a stepper motor to hold and fully rotate an object of about 400 grams ? I will be using an arduino uno along with the motor. The object will be mounted on a circular platform below which the motor and arduino will be placed.


texts: What does actually the "unravel branch wrap" option do to the phase plot in LTspice?

texts:
Below two Bode plots are identical just that in the second one the option "unravel branch wrap" is unticked for the phase plot:

What does this option do to the phase plot?


texts: Does enabling the alternate RXD function on an AVR GPIO pin disable the pull-up functionality?

texts:
The datasheet seems to imply that either the PORT register or the alternate alternate pin function, but not both....

Since the pull-ups are controlled by the PORT register, does this mean that the pull-up are no longer functional when the RXD alternate function is enabled?


texts:
I like to ask to the experts out there.. What is the best embedded linux distro for:

Flash memory ~ 700Kb
Ram ~ 256Kb
Processor: High end arm cortex M3 (something from STM32 family for eg)

Required modules:
- Kernel core
- Basic driver set: USB/Networking (for WiFi - No AP, just client, no security)/SPI/Uart/I2C

Is this at all possible or am I dreaming?

The idea is to use a 5$ high end CortexM3 and don't use any external memories so that I can enjoy the ready drivers for SDIO/WiFi etc.

I updated the question with clarification on WiFi. WiFi in the sense that it is a simple, run of the mill client. Nothing fancy, perhaps wep if I can fit it.
Another update: How about uCLinux?


texts: Analog Multiplexer as the first stage of DAQ system?

texts:
Recently I am designing a Data Acquisition system which utilizes FPGAs and ADCs. As my project needs to have a good balance between price, performance and quality, I have looked into the market to find available medium-cost ADCs. My current selection is the single-channel AD977 ADC (100/200 Ksps, 16-bits where I need 12 Effective Bits (ENOB)) from Analog Device. Also there is the AD624 instrumentation amplifier which is again, single-channel but is great if you want to programmatically amplify your signal in the analog zone, not losing your dynamic range.

But my design requires 4 or 8 analog inputs. So what I thought was to place the ADG508 analog mux in the first stage of the DAQ, just before the near Hi-Z inputs of AD624 instr. amp.

However my instructor believes that this is a bad workaround, suggesting to use multi-channel ADCs which have the Analog MUX On-Chip which, reduce noise. Surely that would be a better choice, but if I am going to use a multiple channel ADC with the same parameters and quality of ADG508 (sample rate, SNR, SFDR, ...), I will be have to heavily increase the budgets!

I had some research on the internet for comparison of MUXes. Everyone just seem to compare various MUX ICs with respect to bandwidth and RDS(ON) (On-Resistance).
From the noise aspect in Communications Circuits Engineering, the equivalent thermal noise introduced on the signal could be equivalent to sqrt(4 K T R B). But is that all the noisy source?
Other people have also had the same question but in other senses, such as:
How much is the noise of a multiplexer for analog inputs?

The question is: Is my discrete analog MUX solution a big deal from the signal integrity and noise aspect? Did anyone have these problems with the same approach?
If it is really a bad idea, what would be other ways of solving this issue?

I have important design rules of analog systems such as grounding (Analog GND, Signal GND, Power GND, Digital GND,...) and shielding in my mind.

Please note that the input signal of each of the channels is thought to have these properties: about 10 KHz maximum frequency, maybe as weak as 1mV or even less, impedance in range of 10KOhm~300KOhm

Extra Note: Does inserting a buffer before the MUXes make things better?

Thanks to All


texts: LED to switch ON when an analog signal is outside the range of -10V to +10V

texts:
I would like to make a simple circuit to detect when an analog signal goes either above +10V or below -10V, and switch on a single LED if either of these cases occur. I have available only +12V and -12V power supply rails. The figure below shows what I want to achieve:

So far, I have discovered the so-called windowed comparator, and tried to implement it for the circuit. To do this, I used the LM393 dual comparator chip, powered by +12V and -12V, and then used two pairs of resistors to get the required +10V and -10V references derived from the existing PSU rails. I have also pulled the open-collector output up to the positive rail. So far so good. The schematic so far is shown below:

Now, this circuit does not quite do what I want - namely the voltage V_comp is -12V when I want an LED to be ON, and +12V when I would like it to be OFF, as shown below:

So, my question is: What is a simple way to take this and finish the last part of my goal? Would I need to use some inverter chip now? Or can it be done using some simple logic inversion / level shifting using MOSFETs? Also, if there is a nicer way to do it without the comparators, I would be interested to learn.

Thanks


texts: LC VCO sub 30nm node circuit and layout design

texts:
I am working on an LC VCO in a sub 30nm node to oscillate between 3 to 6 GHz. Here are the things I did so far:

I already have the layout and extracted netlist for the integrated coil, L.

So I did AC analysis simulation of the coil with ideal cap and current source of 1 A to determine the parallel resistance, \$R_p\$ at 3 GHz resonance. (This is with assumption that the inductor Q value will increase with frequency). I got \$R_p = 43 \Omega\$ which is the peak value I got.

From equations I get \$2<g_mR_p\$. I put some margin and set \$g_m = 50\text{ mS}\$. But, the oscillations are dying out.

Next, I set \$g_m = 160\text{ mS}\$ (randomly set) and I get oscillations.

Why is my \$g_m\$ calculation is off? How do I determine the optimum value of \$g_m\$?
Let me know if there is mistake(s) in my approach of the design.
Also, please let me know the hspice circuit to test the VCO design.
Everything here is ideal except the coil. I replaced the actual extracted coil in place of my ideal one in the circuit.
I'm hoping to figure out the sizes of the transistor devices before worrying about the layout challenges beyond that.


texts: Normally ON Switch using N-CH MOSFET and pull-up resistor

texts:
I am learning about electronics and am having a hard time finding a normally closed (i.e. on) switch using transistors and FETs. Am I violating any rules with the circuit below which is using an enhancement mode N-channel MOSFET with an NPN driver transistor? Can I simply pull up the FET's gate high with R1 to keep the switch on (by default)?

simulate this circuit – Schematic created using CircuitLab


texts: Do both Vss pins on a 6502 need to be connected?

texts: Are the 2 Vss pins on a 6502 connected internally? Or do they drive separate parts of the chip? I'm designing a circuit on perfboard and I only have space to connect one of them to GND, will that cause a problem? What about then using the other Vss pin to source a Vss on, say, an EEPROM chip? Is it ok to treat them like this i.e. as though there's a regular wire running through the chip connecting them?


texts: Opamp inverter with bias voltage on non-inverting input

texts:
I was reading the datasheet of TDC1000, an ultrasound front-end IC manufactured by Texas Instruments, and had a doubt regarding the biasing scheme (to VCOM) they use for the amplifiers in the Rx path. The power supply for this IC is +5V (VDD) referred to 0V (GND).

It can be seen that the non-inverting terminal of the LNA is connected to VCOM, which is simply a DC voltage equal to VDD/2. What is the purpose of biasing it to VCOM?

I derived the expression for the output voltage Vo ofthe LNA as

Vo=Vcom*(1+Rf/Rin) - Vi*(Rf/Rin)

where Vi is input source voltage.

If Vdd=5V and thus Vcom=Vdd/2 = 2.5V, Rf/Rin=9, Vi and Vo varies as shown below:

Vi(V) Vo(V)
2.2  5.2
2.3  4.3
2.4  3.4
2.5  2.5
2.6  1.6
2.7  0.7
2.8  -0.2

Thus the output varies within the range of its power supply voltage (0 to +5V) when input varies from 2.2 to 2.8V (centered at 2.5V with 0.3V swing on either side). If Vi is outside this small range, Vo will saturate.

Since the input signal to this IC is an ultrasound crystal which generates only a few hundreds of mV (-200 to +200mV), how does this configuration work? What am I missing?


texts: External cellphone battery - to keep on, or only use when phone battery low?

texts:
I found the charge in my smartphone (Samsung Galaxy s2, if that matters) was insufficient to carry me through a day of constant usage, so I bought myself an external battery case (Lithium polymer, rated 2200mAh, 5V output, 750mAh output current).  This case has a button on the back, such that until you push the button, it's sitting dormant; after you push it, it starts charging the phone.

I have no scientific evidence, just an "anecdotal" sense that when I start the day with the battery 100% full, and switch on the battery immediately, so that it sustains my battery at 100% until the external battery has fully discharged, it doesn't give me as long a lifespan as if I wait until the battery is down to about 40% and only then switch it on.

Is that correct?  If so, what happens to the charge in the external battery while the phone is at 100%?  Does it "leak" somewhere?


texts:
I have to test a quartz crystal and I am not sure what
What does it mean to have a low quality factor for an RLC circuit?
Does the value of this factor has anything to do with the frequency?


texts: Simple high side driver for multiplexed 7-segment displays?

texts:
How can I best drive and switch high side power (for multiplexing) between the 7 displays with as few components as possible, for under $2.  I am trying to simplify a design.

I have a custom board design with seven common anode 7-segment displays. I plan to build a large amount of them where I want to minimize components as well as keep component costs down.

Currently, on the high side, I use a SN74HC595 to switch power between 7 IMD10AT108 (combined NPN/PNP on 1 chip) drivers which power the displays.

One IMD10AT108 (NPN/PNP driver) powers each display.  That makes 8 components to drive the high side of 7 displays.  I'm not satisfied with this, although it works great.  For comparison, I'm able to handle to low side of all 7 displays with only 2 components...chip + resistor.

It seems "odd" that I can't find a single chip shift register style solution to this at low cost, like is quite easy to do on the low side via a number of different chips and methods.  (Yes, I see $5 chips (qty 100) are available do to this.)

I'd be happy to switch over to common cathode if that made a solution available.  I am also looking to stay with something that can be driven via shift register logic, because these board chain together to add more displays in a chain.

This seems to be a question that has been asked in a number of forums, and is a common design problem for people trying to drive a number of multiplexed 7-segment displays.

A PNP array chip seems like the easy answer, until you start looking and find out they don't exist.  To me, this seems like a common problem without a simple (cheap) answer.

Since the design is about to be finalized, I'm making one last ditch effort to find an alternative.  Thanks for any input.


texts:
I was reading through Linear Technology's AN70 application note
and on Figure 40 there is a part of the circuitry that I can't understand.
It looks like a BJT pass transistor voltage regulator but instead of a Zener diode as a reference it uses a BJT with its base and emitter shorted.
My only idea that it somehow uses the CB diode in reverse conduction as a voltage reference.
Can anyone explain how exactly it works?


texts: LMS7002M: I & Q DATA formats from LIMESDR

texts:
Can any one tell me what is the data format of LMS7002m I & Q sample? Are they unsigned int or floating or double? how are they ?
Also kindly anyone show me any hint of proof for their answer....

LMS7002M is a chip from LIMEMicrosystem for RF application used popularly in LIMESDR-USB board.

Datasheet available here


texts: Voltage measurement is different between an oscilloscope and a multimeter

texts:
I am trying to measure the voltage between 2 points using an oscilloscope and a multimeter.
Question 1:
I am getting a difference when I measure the voltage using an oscilloscope and using a multimeter in the order of 10mV and in some cases 100mV. I am using a ground clip when I use the oscilloscope as shown below. What might be the reason for the difference for this?
Question 2 :
Suppose I measure voltage between two points (both of which are not ground - differential voltage) using an oscilloscope, is using differential voltage probe the only way to measure the voltage between those two points (both are not ground,) or can I use a single probe with the ground clip (shown below) to measure the voltage between those two points (both are not ground) - Is it safe?
I perform this above test with 2 power supplies : Using a bench power supply to the power the board and in another case, I use a 12V lead acid battery to power the board.
The oscilloscope is connected to earth ground and the power supply through which the board is powered is also earth grounded. In another case, I am powering the board using a 12V lead acid battery alone, and the oscilloscope will be connected to earth ground.)


texts:
This is a part of my program which reads data from SD card File and Display that on LCD screen.

  File dataFile = SD.open("1165.txt");

  if (dataFile) {
    Serial.println("File Opened");
    lcd.clear();
    delay( 5 );  //LCD-specific M
    lcd.setCursor( 0,0 );
    while (dataFile.available()) {
      Serial.write(dataFile.read());
      lcd.write(dataFile.read());
      lcd.print(dataFile.read());
     }
     dataFile.close();
     } else {
        // if the file didn't open, print an error:
        Serial.println("error");
     }

When I look at the Serial Monitor It prints the contents of that File but

nun of these commands prints what is printed in the serial monitor,

lcd.write(dataFile.read());
lcd.print(dataFile.read());

Any Idea?


texts: Can I use a 12v 20A DC switch for a 24v 10A DC load?

texts:
simulate this circuit – Schematic created using CircuitLab

I have a toggle switch that is rated for 12v 20A (240 Watts) and I have a load from a battery that I want to turn on or off with this switch. The battery is 24v 10A (240 Watts). Everything is DC

Can I use this 12v switch with a 24v load if the watts are the same? If not why?


texts: Can I represent the value by using this unit

texts:
I want to represent this value in a better way for my report. This value is 3.1x10^-4 the unit is dBi

Can I rather represent this value using this:
310 udBi

The u in udBi is micro dBi


texts: Log-Taper Variable Resistor from Linear-Taper

texts:
I'll start by saying: I've read quite a bit about how to make a "log taper potentiometer" using a resistor and linear-taper potentiometer, but I'm not sure if that will work in my case.

I'm working on an all-pass filter to use as a corrective phase-shift for an active-noise-cancellation circuit I'm designing.  This circuit will be used primarily to filter out car noises from a nearby highway when I'm trying to sleep.

I'm using this diagram for my phase-shift/all-pass filter:

I figure I should be able to modify VR1 and R6 to give me the frequency response I'm looking for.

As I understand it, the 90-degree (center) frequency is calculated by f=1/(2*pi*R*C).  I want that frequency to be user-variable between ~30hz and 3kHz.  I figure it's easier (and probably more reliable/cheaper) to use a variable resistor than it is to use a variable capacitor, but maybe I'm wrong - I don't have a lot of experience with variable capacitors.  For the capacitance provided in the diagram (100nF) I've calculated I'll need ~500 ohms of resistance for the top of my frequency range, and ~50Kohms of resistance for the bottom.  Thus I need to use a variable resistor that ranges approximately 50Kohm - pretty good, pretty standard.

When I graph the frequency vs linear rheostat position, however, I don't get a very good response:

It looks like the first 1/5 of the range of the rheostat/potentiometer will cover 90%+ of my frequency range, though - so I guess I'd better use a log-taper potentiometer.  I want it to closely approximate the log curve rather than a cheap 2-line approximation (though maybe it's better to just give up on this count) - which means either:

A) find an expensive accurate log-taper potentiometer,
B) Approximate it myself

Here I run into another problem: from my research, it's easy to do a reverse-log taper variable resistor, but I can only make a linear-taper potentiometer into a log-taper if I'm using it as a voltage divider.  I don't know if a voltage divider is appropriate for my intended use.  If so, I'm not sure how to visualize it.

My question, then, is: What are my options?  Is it possible to make a log-taper variable resistor that's not in a voltage divider configuration?  If so, how?  If not so, is it appropriate to use a voltage divider configuration here?  If so, what values would you recommend, and how best to hook it up?  If neither is possible/acceptable, what other options remain to me (aside from giving up)?

And, as a side, if you see anything wrong with my overall idea/proposition for this active-noise-cancellation circuit, let me know!


texts: Where can I find the in-depth LPC2132 datasheet?

texts:
I have searched high and low on Google for the user manual about the LPC2132 ARM chip. So far, all I have come up with is the ARM7TDMI manual and a short (41 pages) overview of the LPC2132 chip.

However, I'm looking for a more detailed description of the various parts of the micro controller, such as register addresses and peripheral information. I have found several promising links, but the PDF documents appear to be broken

Can anyone point me to the full length LPC2132 data sheet?


texts:
I am trying to modify a work light (1S3P 18650 3,6V) that is controlled by an 8 pin PADUK type micro.
An output from the micro goes through a 100 Ohm resistor straight to the MOSFET gate.
It has the usual 100%, 50%, SOS modes. One drawback is that at the 100% setting, after 2 min, it throttles down to 16% PWM, in order to meet the battery life claim on the box. LED heatsinking is to a massive block of aluminum and not a problem.
As in the picture, I would like to add a switch so I can feed the gate directly with battery voltage so I can get a mode with 100% light with no throttling.
In the setup I propose, will there be a problem with me backfeeding the micro output with battery voltage, while it is either off/0V or doing a 16% PWM duty cycle at 3,6V?
I thought that such outputs are protected by a diode/FET so that this wouldn't be a problem, am I correct?
(I connected the circuit as in the picture for a few seconds and no magic smoke. Also I measure no big voltage drop BAT+ to MCU gate, certainly not a 0.6V/0.3V (Shottky) diode drop, so if there were protection it would be a low Rdson FET not a diode.)
Is my solution reliable in the long term?
I considered putting in an SPDT switch so I could choose what 'source' powers the gate and could avoid any backfeed (gate connection on COM, either MCU pin or battery on the other two switch contacts) but due to size constraints of a smaller switch (only available as a SPST) I'd prefer to use the 'backfed' option if it is safe to use.


texts:
I've got this homework about PSPice and op-amp.
I need to make this triangular waveform and sawtooth(?) waveform of non-inverting op-amp circuit.
I know the triangle one is 500us like the picture. But what about the sawtooth? The teacher told us to change TR and TF to 750us and 250us but it doesn't work. Am I missing something?

Oh and also, the triangle one supposed to start at 0V but mine starts at -4 volt instead.
What can I do about it?

I'm new to PSPIce so please be kind ^^ Please do minor changes at the circuit.. (ex. changing the value of VPULSE) because that is what my teacher wants. Sorry for my bad english, and thank you for any help you can provide.

down here is the sawtooth thing circuit I've tried and also the result.


texts: MCU 3.3v to 5v Relay Driver, MOSFET or BJT

texts:
I couldn't find a definitive answer.

What's more suitable to drive a 5v relay from a 3.3v MCU, a MOSFET or a BJT Transistor? NPN or PNP?

I will be using a Schottky SS34 as flyback diode. Relay consumes 75mA.
I can use NPN transistor MMBT3904LT1G or N-Channel MOSFET BSS138 for turning on the relay, emmiter/source to ground, would that be ok?


texts: Using a 19v power brick on a 12v pico power supply?

texts:
I was reading this review http://www.jonnyguru.com/modules.php?name=NDReviews&op=Story&reid=207

and it gears us towards an FSP 19v power supply, but the pico units are only 12v

http://www.amazon.com/Mini-Box-picoPSU-160-XT-Power-Mini-ITX-Supply/dp/B005TWE6B8

  160 watts 12V DC output

According to this link Choosing power supply, how to get the voltage and current ratings?

  Higher than specified voltage is definitely bad. Electrical components all have voltages above which they fail. Components rated for higher voltage generally cost more or have less desirable characteristics, so picking the right voltage tolerance for the components in the device probably got significant design attention. Applying too much voltage violates the design assumptions. Some level of too much voltage will damage something, but you don't know where that level is. Take what a device says on its nameplate seriously and don't give it more voltage than that.

This leads me to ask why exactly the ratings for the FSP 19v power block are so high, compared to the other units, when it's voltage is a decent amount higher?

This review leads us to believe that this power supply would be the "best" choice, but the above link to this website mentions that it would be a bad idea, so I'm confused which is correct, and if this pairing "pico 160w, with a 180w FSP 19v adapter" would work, or if I should find a better power supply?

Also, if the 19v is a bad idea, then what should we look for in a power supply?  JohnnyGuru gives not so good ratings on the other units, so if we aren't discrediting their info about the 19v, then what do we actually look for?

Not too sure if this is the right place, but I figured that this would be the best place to talk about voltage with these units, and the power supplies... Thanks.


texts: Is 3dBi PCB etched GSM/GPRS Antenna Possible?

texts:
Is it possible to design a GSM/GPRS antenna that has a gain of 3dBi? if not, what is the maximum gain possible with a PCB GSM/GPRS etched antenna?

I'm thinking of a PCB sized 11cm long and 5cm width. FR4 of higher grade material for PCB can be used if necessary. I only want to know if it's possible.


texts:
I'm developing a control unit for ventilation systems. Beside switching those fans with a relay they are often controlled with a 0-10V analog signal. Now I found a product that uses a RJ45-plug to supply a 0-10V analog signal.

As the controller's going to have network features as well, chances are that a user will mix up the fan-dimming-RJ45 plug with an Ethernet plug.

So I wonder:

might connecting this 0-10V output to a network harm a router/other network devices?
isn't it generally bad practice in electronics to (ab)use a plug that belongs to a different standard for this purpose?

I'd like to support this interface only if it is safe if accidentally connected to a network.

The 4 lines involved are:

10V power supply for internal circuit
0-10V dimming signal
ground
tachometer signal

Remaining lines are NC.

Pin Assignment

Fan's Circuitry


texts: Why is IR Transceiver transmitting/receiving rubbish?

texts:
I am trying to interface two microcontrollers wirelessly using IR transceivers. The microcontroller I'm using is ATMega164PA running on a 3.3V supply at 8MHz and the transceiver is TFDU4101-TR3. I am using serial communication for both. When I try to send a character 10 times from one transceiver to another, I get a range of numbers between 255 and 193. Is there something that I'm doing wrong? Even if I send any other character I get the same rubbish.

Also, can I write my own protocol to establish communication between the two devices?

A schematic of my setup is shown below:


texts: Wiring DIN connector with 3 wire DC solenoid valve

texts:
im buying [smc VQZ 212 5YZ1 C6] 3 port solenoid valve with 2 possible position(let say A and B).

This solenoid work with 24VDC and have 3 pin/ wire. There is No 1, No 2 and GND pin.

I will never tried to wiring directly without enough information.
How to switch the solenoid valve position (from A to B and from B to A) with 2 wire 24V adapter (24V and GND)? What does (-)(+) mean in wiring diagram? The full manual book is here


texts: I'm trying to fix a bad switch, what is this blue switch called?  It has 6 pins and clicks on and off.


texts:
I am using Altium 14.0.9. I have a split plane on my inner layer of a 4 layer PCB. This split plane is connected to the net C6_2.  It is basically 2 polygons on my bottom layer that are connected to each other via a small split plane on the inner layer.

This can be seen in the image below:

The split plane on layer Vcc is enclosed by the green lines as shown. The 2 polygons can be seen as 2 grey shapes on another layer. I am assigning the split plane the net name NetC6_2 (as shown).  But still the vias are not connecting to that split plane. As you can see there is an unconnected net connecting the 2 islands (this is shown as a thin white line bridging them 2 islands).

Does anybody know why this does not work?


texts: Does this Sallen and Key filter work on a single supply and does the input offset matter?

texts:
This is the schematic for a Sallen and Key from the Doepfer Musikelektronik website:

simulate this circuit – Schematic created using CircuitLab

I intend to run this in a synth, the oscillators use a single 12V supply and have an amplitude of +6V (I don’t know what the offset from Ground is)

Questions:

Can this be run from a single supply, connecting V- on the op amp to the same Ground as the capacitor?
And does an input signal need an offset from ground for the filter to operate correctly?


texts: Use a Mosfet/PNP transistor to boost voltage for mcu pin

texts:
I am looking to turn off/on a 5v laser diode with an esp8266 micro controller.
The mcu's gpio pins can only take 3.3v.
A PNP, NPN and mosfet, among these three which will help me boost the voltage to 5v and how should it be connected?


texts: 4-bit parallel data bus using DMA and GPIO on STM32?

texts:
It's possible to generate 8 or 16-bit parallel output on an STM32 by using DMA to transfer from a buffer to the ODR register of a GPIO port, by transferring either a byte or a word at a time. However I'm wondering if there is a way to transfer a half-byte at a time to 4 GPIO pins, and generate 4-bit parallel output?

I know this could be done by bit-banging easily enough but I want to know if it can be done by the DMA controller. Or alternatively, is there a component available which will take 8 bits and generate 2 * 4 bits, sort of like an array of 4 2-bit shift registers in parallel?

The application for this would be a simple VGA controller with 3 1-bit RGB signals plus one control signal. So I would have an in-memory frame buffer of pixels, each byte containing 2 pixels.

Thinking about this, it should be possible by using a scanline buffer, and expanding each half-byte in the frame buffer a byte in the scanline buffer, with only the first 4 bits set.

Or alternatively, each byte in the scanline could be assigned using a 4-bit palette index lookup. Which would yield 8-bit colour with a 16-colour palette.

The expense would be some CPU processing before each scanline.


texts:
I have a circuit that is to be used together with a car stereo. The circuit detects DTMF tones (touch tones) using the Holtek HT9170B.

I need to feed the HT9170B with the high level speaker output from the car stereo so that any DTMF tone (dialed with the internal car telephone) is recognised by my circuit.

The HT9170B has an op-amp input, the standard input circuit is shown below. The input voltage is -0.3V to +0.3V.

I was thinking of using a line out converter with a load resistor and transformer as described at http://www.bcae1.com/loc.htm, but will this be sufficient?

Can anyone suggest a cheap transformer to use for this purpose?


texts: How input offset voltage (2mV max) will effect input which is at 0.5mV and 0.5 to 5Hz frequency? The input voltage and frequency are of heart vibrations which will be very low.


texts:
I'm connecting two BGAs (0.8mm pitch) which are DDR3 signals. Vendor recommends 40 and 80 ohm for SE and diff traces.

My PCB manufacturer suggests the following specifications for the diff traces:

Width:      10   mils
Distance:   7    mils
Thickness:  0.67 mils
Dielectric: 5.1  mils
di.constant:4.2

For single ended, the trace will have to be even wider. Breaking out from the BGAs, this is clearly not possible. I am new to PCB design, but it seems to me that 12 mils traces are rather huge relative to the size of the ICs.

The only information I've found about this width change and the challenges of breaking out/fanning out in this relation is simply "it's complicated".

I'm using Kicad and the number of available simulation tools is limited. How can I make sure that the impedance is controlled within reasonable accuracy?


texts:
I have a XD-RF-5V receiver wired to my Raspberry Pi listening with RFSniffer (433Utils). I also have a XD-FST 433.92mhz transmitter wired to my Raspberry Pi running codesend (433Utils).

I can successfully transmit and receive between these two devices.

$ sudo ./codesend 500000
sending code[500000]

$ sudo ./RFSniffer
Received 500000
Received 500000
Received 500000

I also have a 12v 4 channel relay that has a built in RF receiver and came with a remote transmitter. The paper than came with this relay kit says it is operating at 315mhz.

I want to sniff the codes from the remote for this relay kit. Whenever I try to run RFSniffer (433Utils) with the remote, it doesn't pick up anything.

On the back of the XD-RF-5V receiver it says 433mhz, 330mhz, and 315mhz so I would assume it can receive 315mhz signals.

Am I doing something wrong or making incorrect assumptions? Is there something I need to do differently to receive the 315mhz signal? Can this receiver even receive both 433mhz and 315mhz signals (like it says on the back)? I am a bit new to RF (and electrical hardware in general) so I am not really sure how these different frequency devices play together.


texts:
I want to build an esp32 device using the esp32-pico-d4 chip that I will sell to hobbyists.

However, I recently came across something called the FCC. It requires radio devices to get certified which can cost thousands of dollars. I cannot afford that.

I lot of esp32 devices use modules that are already certified but I don't want to use one because there too large.

Also, I have seen boards such as the Sparkfun Esp32 Thing that aren't FCC certified. Is that illegal?

Can someone simply explain these complicated guild lines for someone only trying to sell an esp32 board.

Thanks!


texts: Discrete solution for alternate zero (low) and one (high) at output?

texts:
I am trying to figure out a discrete solution for alternate low and high at the output for varying input. Consider the discrete solution as a block.

Input to the system consist of a push-button. Normally input to the system will be high. When pressed the push-button, input to the system will be low. Each time prasing the push button(that is input goes to low), output should change the state from previous state( that is low (0) to high (1) or high (1) to low (0)).

Any lead to the solution will be helpful.


texts: How can I find the current draw of an SN74HC595 when OE is disabled?

texts:
I am trying to daisy chain 4 SN74HC595's together in an "always on" battery powered system.  When the system is "off" I am disabling a few components via their EN pin to lower current into the 10's of uA.
I can't seem to determine how much current these SN74HC595 chips will draw when I set the !OE pin to disable the output.

Any help would be wonderfully appreciated!  I could always add a load switch for this, but I'd rather do it elegantly rather than add more components.

Specifically, this chip: SN74HC595BRWNR.
Here's a snapshot of (I think?) the pertinent information from its datasheet.

I can't tell from this if the current would be up to 1000 nA (maka 1uA) by disabling via !OE, or if I just need to be sure to set all logic inputs to 0 to obtain that level of minimal current draw.

Anyway, again any help is greatly appreciated.  Thank you!!

Edit: actually after reading through my post again, is it fair to assume that Icc is the current draw? and based on its Test Conditions, if Io (Iout?) is 0, then the device should only draw 8uA at normal temperatures.  and I can be sure Iout is 0 by disabling the device with !OE?..

I think?


texts: Newbie question about BMS boards and 18650 cells

texts:
I would like to replace/convert some old (non working) 18v Nicad power tool batteries to use 18650s instead. I've got some brand new 18650s and some 5s battery management system boards, but as a non-engineer, there is just one piece that isn't in the wiring diagrams and seems pretty critical.

Based on my online reading, it appears that 5 cells will give me the best match for 18v tools, it sounds like 4 isn't enough

I understand that each 18650 need to be charged at 4.2v, and if I was just charging one, that makes sense. When I look at the diagrams for the BMS wiring, they don't indicate line input voltage for five 18650s wired in series along with the BMS. Does my input voltage need to be 5 x 4.2 (21v) or do I have input of 4.2 to charge the whole system, and still expect it to deliver ~21 on the way out? Sorry for such a basic question.

Here is some additional info; I have two chargers that are interchangable for the old batteries; they indicate output of
21.75v 85ma
24v    210ma

In an ideal world, I'd use the existing chargers against the new 18650 5-packs to charge, and then just plug into my 18v tools and be able to use them again.

Thank you for any clarification!


texts: Can I run a 2000W power tool off of a 2000 (4000W peak) modified wave inverter?

texts:
Would a 2000W power tool (electrical chainsaw) be able to run off of a 2000W (4000W peak power) modified wave inverter connected to a 12V-40AH AGM battery?

Would the motor need more than 2x the rated power when starting? Would a 20% power loss maybe mean the sustained load would be 2400W, hence too much for my selected inverter?

I do expect it to run for just around 10 minutes which would be enough for my need if it does work. (I'm trying to cut the wood from an obsolete structure down to pieces but it's too far from my house to reach it via electrical cord.)

If this wouldn't be feasible, would I probably be able to run something like a 1200W handsaw off of the said system?


texts: How do I get this PFET to switch off when G=5V (high)

texts:
What am I missing (and why) to allow this PFET to switch on and off? I'm new to this but am learning. The circuit is part of a larger schematic I am working on. Once I get this working I can insert it and finish the schematic. Any lessons would be of enormous value added to schematics help to me. I don't want just the answer, I want the reason for the answer, so I can grasp this concept. YouTube tutorials only help so much...

simulate this circuit – Schematic created using CircuitLab


texts: Inverter output goes to 0V when transformer is attached

texts:
I am making a 5 level inverter using an Arduino Mega and I am getting about 18V AC output from the circuit given below.
The problem is when I attach a transformer the output goes to 0V.  I don't know why this is happening can anyone please help me.
I am using two 5V adapters with boost converters to give power to the circuit.
This is the exact circuit I am using:

This is my arduino code:
    float f=50;
    float t=(1/f)*1000000;
    float a1=10;
    float a2=40;
    float a1p1=(a1*t)/360;
    float a1p2=(a2*t)/360;
    float d=5;

    int pin1=1;
    int pin2=2;
    int pin3=3;
    int pin4=4;
    int pin5=5;
    int pin6=6;
    int pin7=7;
    int pin8=8;

    void setup() {
      Serial.begin(9600);
      pinMode(pin1, OUTPUT);
      pinMode(pin2, OUTPUT);
      pinMode(pin3, OUTPUT);
      pinMode(pin4, OUTPUT);
      pinMode(pin5, OUTPUT);
      pinMode(pin6, OUTPUT);
      pinMode(pin7, OUTPUT);
      pinMode(pin8, OUTPUT);
    }

    void loop(){
      digitalWrite(pin1,HIGH);
      digitalWrite(pin2,HIGH);
      digitalWrite(pin5,HIGH);
      digitalWrite(pin6,HIGH);
      delayMicroseconds(a1p1-d);

      digitalWrite(pin2, LOW);
      delayMicroseconds(d);
      digitalWrite(pin4,HIGH);
      delayMicroseconds(a1p2-a1p1-d);

      digitalWrite(pin6,LOW);
      delayMicroseconds(d);
      digitalWrite(pin8,HIGH);
      delayMicroseconds(t/2-(2*a1p2)-d);

      digitalWrite(pin5,LOW);
      delayMicroseconds(d);
      digitalWrite(pin7,HIGH);
      delayMicroseconds(a1p2-a1p1-d);

      digitalWrite(pin1,LOW);
      delayMicroseconds(d);
      digitalWrite(pin3,HIGH);
      delayMicroseconds((2*a1p1)-d);

      digitalWrite(pin4,LOW);
      delayMicroseconds(d);
      digitalWrite(pin2,HIGH);
      delayMicroseconds(a1p2-a1p1-d);

      digitalWrite(pin8,LOW);
      delayMicroseconds(d);
      digitalWrite(pin6,HIGH);
      delayMicroseconds(t/2-(2*a1p2)-d);

      digitalWrite(pin7,LOW);
      delayMicroseconds(d);
      digitalWrite(pin5,HIGH);
      delayMicroseconds(a1p2-a1p1-d);

      digitalWrite(pin3,LOW);
      delayMicroseconds(d);
      digitalWrite(pin1,HIGH);
      delayMicroseconds(a1p1);
    }


texts: Pull-up resistors required on both side of level shifter?

texts: My I2C sensor and my embedded processor do not agree on the logic level. So I need a level shifter. Normally I would put a pair of pull-up resistors on the SDA/SCL lines. With the level shifter in the middle, do I need to provide pull-up resistors on both side?  Or can it be either side?


texts:
I just got a rheostat from radio shack to connect to my homemade stir plate. The rheostat looks like:

(from here)

My question is, how do I set it up? I want to use it to vary the fan speed.

I am using the wall plug from and old DSL modem as a power source (12V output) and an old CPU fan (12V input).

Which is the positive terminal, negative terminal, and ground?


texts: I have a 5000 watt, 3600 rpm  60 hz generator.I plan to connect it to a 1500 watt  baseboard heater. Assuming the water wheel can supply sufficient power to the generator, how will water wheel rpm affect power output? In other words if I supply all the power it needs to the generator, but the generator runs at say 500 rpm can I still  in theory get full power from it or do I have to gear up 3600 rpm? I am planning to run one or more electric baseboards only


texts: Using Arduino to control mosfet switches for an inductive load failure

texts:
I'm trying to control four maglocks with mosfets using an Arduino uno, but the results are a bit unpredictable. When only one maglock is connected, no matter which one, it works perfectly (I.e. Arduino can energize/de-energize the maglock). When all four are energized, only 1-2 will de-energize reliably. Grounds are connected, mosfets have been switched out, etc. Any ideas about what's wrong with my schematic? (Sorry for messy drawing) Mosfets: IRLZ44n, diodes: 1n4007.
EDIT: I'm using a 30A power supply, each maglock pulls 200mA when energized. The problem is not that they're able to energize, but that they don't de-energize when gate voltage is removed.
EDIT: here's the code I'm using for test purposes:
void setup() {
  for (int i = 2; i < 6; i++) {
    pinMode(i, OUTPUT);
    digitalWrite(i, HIGH);
  }
  Serial.begin(9600);
}

void loop() {
  if (Serial.available() > 0) {
    int magNum = Serial.parseInt();
    Serial.print("OPENING MAGLOCK ");
    Serial.println(magNum);
    digitalWrite((magNum + 1), LOW);
    delay(1000);
    digitalWrite((magNum + 1), HIGH);
  }
}


texts: Design 5 bit counter with two control inputs (direction and stop)

texts:
I am designing a 5-bit counter with two control inputs including direction (up/down) D and stop S.

Here is how counter works:

DS = 00: down (or decrease)

DS = 01: don't care

DS = 10: stop

DS = 11: up (increase)

I tried this as the reference here by using 5 D flip flops and logic gates.

However, the result requires a lot of logic gates.

There are some questions I am not clear now.

For this problem, is there a way to know what kind of flip flops (SR, JK, D,...) will use the smallest number of logic gates?
I referred the method to solve this problem by drawing state diagram and then implementing it as the reference above.

However, because the large number of bits (5 bits), the implementation is complex and mistake-prone.

Is there a better way to design instead the way above?

Also, are there any simpler counter that can do the task above?


texts: Help for Changing the ATMega328's clock source to External Clock

texts:
I want to change the fuse bits of the ATMega328 to operate with external clock (function/signal generator) instead of the crystal. The clock speed will be 8MHz. I have been trying for months and all of my attempts failed as I locked the chips due to the wrong connections or misunderstanding the bits.

I understand the part where we need to set the CKSEL to 0000 (External clock)

I also understand how do we use the avrdude and connect the clock (function generator) input to the XTAL1

My command would be something like this:

avrdude -c avrispmk2 -p atmega328p -P COM6 -U lfuse:w:0xe0:m -U hfuse:w:0xde:m -U efuse:w:0xff:m

I have bought an avrispmk2 ISP and I think I have the appropriate connections on the breadboard at this point.

My question is, after burning the chips fuse, what kind of modifications do I need to make on boards.txt file?

Do I need to include the fuse bits or anything extra in boards.txt?

atmega328p.name=Mynewarduino
atmega328p.upload.protocol=avrispmkII
atmega328p.upload.maximum_size=32256
atmega328p.build.mcu= atmega328p
atmega328p.build.f_cpu=8000000L // clock speed is 8mhz now
atmega328p.build.core=arduino
atmega328p.build.variant=standard

What else should be in the custom boards.txt file?

I have been trying for months and I would greatly appreciate any answer or comments. Could you please explain me steps as I can follow without ruining another chip?

If I understand the procedure correctly, are these the steps?

Make appropriate connections with ATmega328 and chipless Arduino board, connect with the ISP (mkii)
Burn the fuses with the avrdude according to the fuse bits while the signal generator is connected to XTAL1 as 8MHz
In boards.txt, change the F_CPU to 8000000L (or need to create a new boards.txt entry?)
Then upload the blink sketch with Arduino IDE (do I need to upload using programmer?)

If I am missing any step, I would appreciate to hear.


texts: Replacing a thermal cut-off with a potentiometer

texts:
I think this is a pretty basic question but I don't know much about electronics and I could really use some help.  I'm trying to modify a hot air popcorn popper to use as a coffee roaster.  The popper has a thermal cut-off switch that will cut power to the heating element when it reaches somewhere around 350 degrees.  That temperature is too low for roasting coffee so I've removed that switch.  This works but I'd like to get a little more control over the heating element.  I know that I can put a simple toggle switch in place of the thermal cut-off and just switch the heater on and off but I'm wondering if it's possible to put a potentiometer in its place so that I can vary the the heating element.  My concern is that this may destroy the pot or worse.  The thermal switch is rated for 125V and 15A and the heating element runs at over 1000W.  If anyone has any ideas about what I can do, I'd love to hear them.

Thanks.


texts:
I am new to Matlab. I wanted to use Simscape resistor element and want to make it Temperature dependent. However i open the code of the component by view source code. I modify the code but couldn't save it. It gives only option to save as "Save as" . If i save as to new .ssc file then i cannot run that code to generate the component either. Your suggestions and opinion regarding this issue will be appreciated.
Thank you!!


texts: Probing and Analyzing MIPI CSI 2 Interface

texts:
I'm looking at probing and analyzing the MIPI CSI 2 interface on D-Phy with a Keysight 16802A 68-channel logical analyzer plus the N4851A/B probe.

The question is, usually a 16802A can have different memory depth, from 1M to 32M. If the image being analyzed is a 4-k image, in 12bit raw format, how much memory would be required on 16802A?

As a side question, does anybody have other approaches to probe and analyze the interface with a simpler equipment?


texts: Thermocouple socket wrong way round on board - problems?

texts:
Just come across a board where the K-type thermocouple socket has been tracked the wrong way around. A partial fix is to forced the plug in the wrong way around as well, but this will cause a mismatch in the metals at the connectors leading to an error in signal.

Question is, how much of an error? The plug/socket combination can be assumed to be at constant (room) temperature. My guess is "not much", given that we only need accuracy to a degC between 10degC and 40degC. Opinions?

[Yes, I know it's a service nightmare waiting to happen unless well documented but no choice until we do a re-layout. Fortunately it is the first time we have used this feature]

UPDATE - the problem just got simpler. The socket is tracked correctly but the component (socket) pin numbers on the circuit diagram are wrong. This means the wiring loom and plug are reverse wired, which is easy to correct - no re-layout!


texts:
As i said in the title what's differences between privileged mode and unprivileged mode in the RTX RTOS?
And why in privileged mode  threads has allowed full access to the cortex M processor?


texts:
I searched the voltage doubler circuit and I understoond how it should operate but I don't understand something.

simulate this circuit – Schematic created using CircuitLab
This is a voltage doubler: ( or at least what I have found).

In the first half-cycle D1 will be on and D2 will be off and in the second half-cycle D2 will be on and D1 will be off.
In the first quarter-cycle of the sine wave C1 will be charging to a voltage.However in the second-cycle quarter of the sine wave C2 will discharge through the source-> becoming uncharged.
When we go to the third quarter-cycle the C2 and C1 will be charging while in the fourth quarter-cycle C2 and C1 will be discharging through the source.
However for this circuit to be a voltage double C1 must remain charged with opposite polarity to the source's polarity in the third quarter-cycle so C2 becomes charged from the total voltage of those 2.
Any help?