texts: Getting overly complicated logic functions when designing a state machine, is there any way to simplify them?

texts:
I am having a bit of problem when trying to solve a state machine exercise. Basically I am supposed to design lock, when we get the right input in sequence etc it will open.

The problem are the complex logic expressions I get for q1+, q0+ and u from the state table, is there any way to simplify them? I have already done the Karnaugh maps on them but they still seem to be too complex.

q1+ = q0*x1*x0' + q1*x1*x0 + q1*q0*x0

q0+ = q1*q0 + q1*x1*x0 + q1'*q0'*x1'*x0'

u = q1*x1*x0 + q1*q0*x0 + q1*q0*x1


texts: CircuitMaker: part without any net, how come?

texts:
I have a circuit made in CircuitMaker, below is a fragment:

This is connected via I2C to the MCU:

However, when importing the parts in the PCB, there are no connections made:

When I remove the J6 part, and I select: Project - Import Changes from Fuzz.PrjPcb, I get the following warning:

I select yes, and get:

I select Execute Changes, and Close. And I again see J6 without any net connections.

What should I change to be able to connect J6 to U1 (MCU) ?


texts:
This diagram is found online.
My input would be audio signal in 0-3.3v range.
Will it work under 9v with 2N3904 or BC54x transistors?
Does it need component value adjustment while operating under 9v / 5v?
What does Rt means at the left bottom corner?
Thanks.


texts: Step-Down/Buck-Converter: How to replace feedback voltage reistor divider to electronically control the regulator output voltage

texts:
Most today used switching regulator ICs that I've seen have some kind of feedback voltage pins. I think I've pretty understood the way it works:

A resistor divider from output to ground is created to fed back some portion of the output voltage to the feedback amplifier that will generate a voltage for the PWM generator logic.

simulate this circuit – Schematic created using CircuitLab

The voltage will be compared to some internal reference voltage, 800mV in this example. If the feedback voltage is higher than that reference the PWM generator will be turned off, otherwise the duty cycle will be adjusted accordingly.

My goals are:

Trying to build a power supply with the ability to electronically
control the output voltage.
Trying to understand whats going on

My question is, what is the best way not to use this static resistor divider but to use some proportional voltage? My Idea was to generate a reference voltage (my desired regulator output voltage) with help of a micro controller and an DAC. If I know the required proportion of R1 to R2 to generate a specific voltage I can derive a division factor like:

\$V_{FB} = \frac{V_{O}}{N}\$

The division factor N is a function of output voltage in most cases as I found out. However I have no idea to build that kind of circuit. Should I use logarithmic opamps for that kind of mathematical division or is there a better solution which I have not even considered? May be there is a much simpler solution?

Edit: My basic idea

simulate this circuit

This kind of operation would be possible either with two expensive logarithmic op-amps or by very expensive special purpose circuits. Because it use analog voltages without taking a detour over ADC/DAC, latency would be low enough. But as I said I'm not sure if there are better ways.


texts:
I have some difficulties to understand what are the fatest diodes. Schottky diode are known for being the fatest diode (at least according to my knowledge) nevertheless their diode capacitance is higher than a PN diode like the 1N4148. Does someone can tell me what are the different paremeters which impact the switching speed of the diodes?
1N4148

Schottky diode :

Here are two datasheets, one which is a Schottky diode and the other the 1N4148 datasheet:
https://www.mouser.fr/datasheet/2/427/1n4148w-1767905.pdf
https://assets.nexperia.com/documents/data-sheet/PMEGXX05EH_EJ_SER.pdf
Thank you very much and have a nice day!


texts: Direct Connect Solar Panels to 12v Chargers (for misc electronics)

texts:
Can I safely connect 12V solar panels directly to electronics that have a 12V auto charger?   The "Car charger" essentially contains the electronics necessary to regulate the voltage from the solar panel down to that required voltage for a given electronic device.  And the electronic device controls the charging...  my only downside is that the charging will be sporadic and might turn on and off with passing clouds.

I'm thinking of doing this for cell phones, MP3 players, GPS navigation units, etc.. I don't like the solar chargers as most require the use of batteries in the "middle" that you first charge and then discharge to charge your device although they all have switches in them that need to be manually activated.

Thanks!


texts: A question about electrons, charges and current

texts:
Let's talk about DC, a very simple circuit: a light bulb and a battery.

Some authors say that electrons move from negative to positive and current from positive from negative.

I always thought electrons moved in a wire at the light speed, but this video says that charges move very slow in a wire, about 5 centimeter per hour (2 inches per hour).

If electrons are charge carriers, is this video saying that electrons move at 5 cm/hour????

If electrons are that slow how can circuits work?

The video says that electric fields move at light speed.

So, I am not understanding anything.

I aways thought the whole magic were dome by electrons...

What is the correct explanation for this?

Charges, electrons and current?

Is the effect similar to a newton cradle, where one ball knocks the first one and the force is transmitted through the chain?


texts: What's the difference between the ST-LINK/V2 and STX-RLINK programmers?

texts:
Do both support full on debugging with the ability to set breakpoints etc?

ST-LINK/V2

STX-RLINK


texts: Wattage calculation for resistors in series

texts: I need the formula for calculating resistor wattage when the resistors are in series.  For example, say I have 3 1/4 watt 10 ohm resistors in series.  What is the potential power dissipation for the entire circuit?


texts:
I am attempting to make a circuit that would allow me to control a standard CFL 13W lamp with a microcontroller. As the lamp would run on AC power, I am making use of the following circuit using a T435T-600FP TRIAC (Datasheet: https://www.st.com/resource/en/datasheet/t435t-600fp.pdf) and also using an MOC3022 optoisolator to isolate my microcontroller from the AC portion of the circuit (Datasheet: https://optoelectronics.liteon.com/upload/download/DS-70-99-0019/MOC302X%20series%20201606.pdf).
I cannot seem to get the TRIAC to conduct however and have been unable to figure out why. I can confirm that the optocoupler is working as expected, and suspect that the current being provided to the gate of the TRIAC should be sufficient to turn it on (I_GT = 35mA). The lamp in the circuit is a 13W CFL rated at 120V and a max current of 235mA. The CFL is not dimmable, however I simply want to turn it on and off, rather than do any dimming. What are potential problems that may be occurring? Are there any better implementations of the circuit that could be used?


texts:
I am driving a peltier (thermoelectric heater/cooler) using a DAC (MCP4725), Arduino mega, quad-opamps to shift/invert the DAC voltage (LT1885) and 4xOPA549 (2 per peltier). I use PI control and thermistor to feed the current temperature back to the controller. The intended use of this system is to head up a liquid that will flow through silicon channels. Currently, I use 2 peltiers, so 4 of OPA549. I have some issues when the circuit is powered on (not happening everytime), they may be from the circuit or the control scheme itself. I wanted to be sure if the circuit part is okay.

I have (0-30V, 0-30A) voltage source. All opamps are powered by this, I don't have negative rails. Peltiers are specified at Imax: 3.9A, Vmax:14.4V, 3.9ohm module resistance, so my maximum allowable current & voltage that will not break them down are 3.9A & 14.4V.

I designed the circuit such that the maximum voltage swing between peltier terminals is +15V/-15V. To change the current direction, I basically change the voltage around peltiers. DAC is 12-bit, communicating with atmega through I2C. Quad opamps are used to shift and invert the DAC voltage (for 2 terminals of each peltier). These voltages are then fed to 2 of OPA549 buffers. Peltier is hooked to the outputs of power-opamp buffer.

The DC characteristics were verified with the real circuit (For VDAC=5V, I can get maximum 20V to 5V output for heating (ie +15V around peltier), and for VDAC=0V, I get 5V to 20V output for cooling (ie -15V around peltier). When VDAC=0, no voltage/negligible voltage around peltiers, so current flow is very close to zero. This is the point where I start my PI control. It increases or decreases the DAC voltage from 2.5, depending on the error term calculated inside the loop.

Below are the TINA diagram of the circuit, and simulation results for varying input voltage. ie. U1 delivers 3VDAC+5 voltage to one terminal of peltier, U2 delivers 25-(3VDAC+5) voltage to the other terminal of the peltier. The DC swing values were verified with the circuit itself, I am in a linear range for the operating voltages. 0 ohms after OPA549 do not exist in the real circuit, I put there for the simulation to run. Power supply capacitors 0.1uF and 100nF are added as the datasheet suggested.

My questions:

1.When I power up the circuit (open-load, no peltiers connected, VDAC=2.5V), it sometimes draws 1.6A current and/or quad-opamp gets hot. It does not do the everytime, but it keeps doing this most of the time. Do you have a suggestion/explanation for this?

2.I suspect that the peltier resistance is not constant. When the PI runs, the current around peltier bounces up and down. I use a single thermistor on a peltier as temperature feedback, other thermistor is on other peltier to monitor its temperature. I expect the same amount of current to be delivered to both of the peltiers, for a VDAC voltage. However, it seems like it is not the case. I can see this from both the current drawn with 1 vs. 2 peltiers. Additionally sometimes one peltier is cooling down, other one doesn't change. Assuming their resistance is close to each other, what can be a solution for this?

3.What are your general comments/suggestions about the operation/circuit?

Thank you in advance.


texts: Level shifting a +/- 2.5V signal to 0 - 5V

texts: I have a front end module that generates an (ECG) signal that varies from +/-2.5 V. I want to shift this signal to 0 - 5V. What is the best way to do this? Would a summing amplifier like the below circuit good enough? With R1 = R2 and V1 = 2.5V, V2 = my signal, V3 = V4 = GND


texts:
Above circuit is taken from a book. It uses an NPN and a PNP transistor combination. In saturation, the author's answer to the Q2's collector current is 4.4mA and claims only 0.6mA of it comes from R3.

When I try to calculate this I get different answer. Apparently something wrong with my way here:

When Q2 is saturated I follow the following logic:

1-)The current comes down to Q2's qround through R3 and R2 resistors is: 15V/4.3k

2-)The current comes through emitter-base of Q3 is: (15V-0.6V)/3.3k

note: here 0.6 is the voltage in emitter-base junction in saturation

3-)The total collector current is the some of above two currents which is way above the author's answer

How can I analyse this circuit to find Ic of Q2? Whats wrong with my assumption?


texts: AVR simple bootloader - how to call application code?

texts:
I am using the atmega328. I want to create a simple test application using a bootloader. I want to: Blink an led at one speed in the  bootloader section of flash, and then blink at another speed in application section of flash. these are my fuse bits:

From my knowledge, if I set the BOOTRST fuse I can set where the program boot(or rests from)
so, I have set the program to execute from the begging of the boot loader section, 0x3800 (for a page size of 2048). this is on page 282 of the datasheet ).

This is the current code:

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

void boot_program_page ()
{
    DDRC = 0xFF;
    PORTC = 0xFF;
    _delay_ms(1000);
    PORTC= 0x00;
    _delay_ms(1000);
}

void main(void)
{

    boot_program_page ();
    asm ( "jmp 0x0000" );// Jump to application code.
    PORTC = 0xFF;
    _delay_ms(10000);
    PORTC= 0x00;
    _delay_ms(10000);
}

This is my understanding:
Because I have set the BOOTRST fuse at the beginning of the boot loader section, this code is burnt into the bootloader. As soon as the program sees the jump to application code (asm command) it burns the rest of the following code in the application memory. this is not what happens though, the boot_program_page() is just run indefinitely.

How can I fix this?

Thanks!!


texts: Can reading VGA signals from my computer harm the hardware?

texts:
I was really hoping to be able to get (or make) a Y type VGA cable with two outputs and one input.

The input would be coming from my desktops graphics card
(specifically an R9 270).
One output would go to my monitor as normal
and the other output would be going to a breadboard/oscilloscope
setup

Im looking to study the signals coming out of them (average values, manipulating the output signal, etc).

Are there any issues with this? Are there any precautions I should take? Any possible ways I could accidentally fry my graphics card or other components?


texts: What is the recommended way to connect TP4056 charger module to NodeMCU v2

texts:
I want to power a NodeMCU v2 with a 3.7v 2000 mAh LiPo battery and charge the battery with the NodeMCU connected (i.e. under load). After looking into various forums, I ordered a TP4056 battery charger module with overcharging protection to safely charge the battery.

However, I am really confused about the recommended way of connecting the TP4056 to the NodeMCU. I have seen similar questions in various forums online, either without an accepted answer or proposing entirely different approaches for achieving this. For instance, Power ESP32/ESP8266 with Solar Panels suggests the use of a low dropout voltage regulator along with a capacitor while Using TP4056 module to charge battery while load remains connected suggests the use of a relay and MT3608 DC-DC boost converter. Some forums also mention the use of schottky diodes. What will happen if I connect the TP4056 directly to the NodeMCU. Can someone give a technical explanation and suggest the recommended way to achieve this?

I am an electronics noob. So, kindly bear with any stupidity in the above question! I will be glad to provide any more details if required.


texts: Driving throttle sensor output to "play" on motorcycle

texts:
I'm trying to create device that allows to play music with motorcycle engines - something like that.
I need help with electronic circuit to make that work.
Bikes which I would like to use have fly by wire throttles, and throttle sensor is device with two potentiometers inside:

I added that circuit to make that work:

So - I have used PWM output from microcontroler to send whole 5V to ECU SIG pins, and "smooth" them to proper throttle open % by PWM.
But it has 2 problems:
1 - R6 and R7, on one bike they are OK, but when I put that exact same circuit into another I get "CHECK ENGINE" Error. Then i have to increase resistance to 1.5k Ohm. I would like not to use mechanical pot to change resistance. That problem might be due to some voltage leakage?
2 - PWM smoothing doesn't seem to hold RPMs very well.
So now comes time to redesign circuit.
First thing I came up with is using simple Up/Down protocol digital potentiometer like MCP4021. That way I can solve problem 1, by making some presets in MCU memory and select proper for each motorcycle. I've only used one DPot instead of 2 (R6, R7) to make voltage on both ECU_Sig lines closer to each other (no mismatch in resistors R6 and R7). Will that work?
Thats circuit (dont mind digital potentiometer control pins):

Second problem is harder for me to solve, but I have some ideas. What I know is that I have to use DAC, and OPAmp to boost voltage from 3.3V(using STM32 for now, but probably I will go with MCP4725) to 5V to take advantage of full throttle range. I'm using LM358 there. Have You got any better recommendations regarding OPAmp?
That is circuit for DAC - OPAmp boost:

And now I'm looking for way to connect that to motorcycle ECU. I don't want to connect that straight to it, but with using MOSFETs, so when not used that circuit will be "disconnected" from motorcycle, and won't cause any problems. I'm not in favour of relays etc. Because in future I'm planning to use that circuit as throttle blipping device for downshifts, relays are too slow.
There is only one way of connecting that I came up with:

But there is one major problem I see (correct me if I'm wrong). Whem OPAMP_OUT will drop to low voltage (lets say below 0,5V for AO3401A PMOS) Vgs would be at -0,5V with Gate grounded and it will be constantly ON, so I'll have to provide software "ALLWAYS DAC HIGH WHEN NOT USED", so that I could "disconnect" that circuit. Do You have any other ideas how I could achieve that?


texts: Where should I place the series termination resistor for AVSBus?

texts:
I'm dealing with a AVSBus interface (like SPI, there are CLK/MOSI/MISO signals).
The CLK may run up to 25MHz, so we'd like to add series resistors on the board, as a back up if we need to tune the SI later.
My question is, where should we put these series resistors? Close to transmitters or receivers?
And, should we use series or parallel termination method? Why?
Thanks for the feedback.


texts: Why does shorting the phases of a BLDC motor cause it to lock?

texts:
Normally a motor can be locked by shorting its phases.

When the motor is not connected and we short all the the three phase terminals (tie them together) and try to rotate the shaft it offers lot of opposition.

Why is this the case?


texts: Electricity only flows in a complete circuit, so how does TDR (time domain reflectometery) work?

texts:
In high school we were all taught that electricity only flows in a loop. But it seems that one can send a "pulse" down an open conductor. This is used in a time-domain reflectometer. How is this possible?
How can you send electricity down an open conductor? What didn't they explain in high school that allows this to be possible?


texts: Unpredicted behavior in an energy harvester circuit using max666

texts: I conducted the simulation of a circuit used for energy harvesting. Its functioning is explained in detail in How the voltage stable mechanism work in Bridge rectifier?. But it was observed in the simulation that the voltage across energy storing capacitor(C1 in the link above and C4 in the simulation figure) is becoming constant at 5V rather than charging and discharging about 12V as designed using the zener diode. Why is this happening?


texts: A question about enclosure material for a filter

texts:
Currently some transducer outputs through BNC connectors are directly coupled to a data acq. hardware's inputs.

I want to install low-pass filters right before the data acq. inputs and for the passive filter I want to use an interface as shown below:

Sometimes I see they use aluminium enclosures for such purposes.

My question is that, does it matter whether the enclosure is aluminum or plastic? Would the enclosure material have impact on 50Hz magnetic pickup?


texts:
How can i choose a safe wire gauge for a motor? I know the power output is given by Power = current * voltage, but in most cases the current will be relatively low due to back EMF, is that correct?

In that case, how can i determine how much current the motor will draw normally? Is there a rule of thumb of what is the max current draw, based on nominal power and voltage?

I see motors for electric bikes and cars with nominal current (derived from power/voltage) over 100amps, but the wires don't seem very thick. Judging from AWG tables, it would take some very beefy wires to handle that much current. Is that because in most cases the motor will draw much less than the nominal current?


texts: I'm looking for a very low cost barometric pressure sensor. The SCP1000-D01 available at Sparkfun and elsewhere is around $25 but I was hoping to find something in the $5-10 range. I am only interested in rough relative pressure change, so it does not have to have high precision or be calibrated. Basically something like the thermistor equivalent for pressure...


texts: Giant pogo pin or spring probe pin for registration during electrical test

texts:
Solved:  if you search for "GP-2 PCB Board Umbrella Shape 5.3mm Tip Testing Probe Pins Receptacles" you will find these probes!  Thanks for the help!

I am designing an electrical test fixture, and I have all the probes figured out for testing pads and soldered pins for terminals.

However, I am having a hard time finding any pogo pins that would partiall fit into a 0.155" mounting holes, to act as registration points and guide the device under test down onto all of the probing pins.

I know that at least one must exist, since I found it in this YouTube video.

Here is a picture of the giant registration or locator probe for the four
mounting holes.

Can anyone suggest a proper name or part number or search term for this device?

It is not in the IDI (Smiths Connectors) or ECT Contact Products websites as far as I can tell, and the google searching results failed.

Thanks for any help!


texts: Two VHDL process statements reading the same signal and one modifying it

texts:
Lets say we have two process statements in VHDL both reacting on the same clock edge.

Beside the clock we also have for example the reset signal. I know that only one process can modify the reset signal otherwise we get multiple drivers error.

Now lets assume one of the processes is modifying the signal and the other one is reading it. Which will evaluate first. Or in otherwords will the signal change be triggered in both processes and the code will work as expected ?

To clarify here is the VHDL code.

-- First process
process (clk, reset)
begin
    if rising_edge(clk) and reset= '1' then
        -- do work
    end if;
end process;

-- Second process
process (clk)
begin
    if rising_edge(clk) then
        case reset is
            when '1' => reset <= '0';
            when '0' => reset <= '1';
        end case;
    end if;
end process;

The code is hypotetical and totaly irrelevant. But will the first process execute on every other clock or not.

Based on a test this will happen. But can I assume this will always happen or not.

Thanks in advance.


texts: How to create a 2000 Amp load from 500 Amp Power Supply?

texts:
So I got this surge test I need to do some research on and need some help as my electrical background minimal.

The test i'm working to setup is as follows:
I have to surge test this big switch (just shoot 12V DC, 2000 AMP to the switch terminal for 1 second)

We only have a 500 amp power supply but we got tons of 300 Watt load banks
From what I understand, I can connect the 500 amp power supply to one load bank(master) and than chain a bunch of other load banks (slave) in parallel to add up the currents until I get 2000 AMPs.

The final load bank at the end of my parallel chain positive lead will connect to the positive terminal on the switch and the first load bank (master) negative lead will connect to the ground terminal on the switch?

Am I doing this correctly?
I believe my math is correct, that I can use my 12VDC/500A power supply to create a 12VDC/2000A output via chaining x amount of load banks in parallel
I'm not sure if my wiring is correct thou..also how will the resistance from the wires affect my output? I believe i need a 3/0 AWG wire at the minimum..(probably safer to go with something even bigger)

Any help or suggestions for better methodology would be appreciated!
Thank you!


texts:
Does anybody here know a good windows program to control the Arduino Uno Board?

Simple things like graph view to test values of sensors... you know... something simple like this program for another board:

http://www.gogoboard.org/cocoon/gogosite/software/monitor/images/screenshot.jpg (dead link - archive.org)


texts: Use BJT transistor as a switch without inverting the signal

texts:
I know I can use a transistor as a switch like this:

simulate this circuit – Schematic created using CircuitLab

Can I use only one transistor that will output the same signal (not inverted)? I want to use it to shift voltage level. The input is digital at 3.3V and should output 5V TTL levels.


texts: How to make an entire (irregular) surface sense touch with a capacitive sensor?

texts: I'm looking for a way to make a surface touch sensitive. The sensors have to interface with a keyboard encoder to send signals to the computer as keypresses. This is just the way it has to operate. I have capacitive proximity sensors, but I'm thinking they will not be capable of extending their field to an entire (and irregularly shaped) surface. Is there some kind of capacitive switch that can be used with a foil-like material or fabric-like material that could be glued to the inside of an object, thus making the outside touch sensitive?


texts:
Say, you have an arduino uno + audio shield, a speaker and a jog-wheel (or mouse scroll-wheel).

And you want to play some audio-file tied to the movement of the wheel, just like you move vinyl disc.
For example, you scroll forward(fast enough) — the audio plays forward(fast enough), you scroll back(slowly) — audio play backwards(same slow).

How do you do it? Is it possible anyhow?
i hope i`ve made it clear.


texts: R series by terminal A in a potentiometer

texts:
I have a question to clarify about potentiometers. Maybe the question is something silly or obvious, but I would like clarification because I'm not so sure about it and I need to be so as not to miss my calculations. I'm using a retractable spring sensor that works like a potentiometer. Well, it is a potentiometer. So I will explain the case as if it just was a potentiometer to avoid a mess.
If a potentiometer is something like this:

If A node, which is the one that is not ground and usually goes to V++, is connected to another R in series with the source voltage, like this:

Is it suppossed that W has RW = R26 + Rpot? That is, taking as an example the case where Rpot is maximum - for this case: 5K -, What is there in  W terminal? Has it Rpot = 1M + 5K? or does it represent that W stills having only RW = 5K when I connect W node to another part of circuit?

Which one will be the correct equivalent circuit? how Rpot is really connected? 1 or 2 option?

If someone could explain me how to translate this configuration it will be helpful.

Thanks in advance.


texts: Save variable between loops in Arduino IDE

texts:
I have this code:

int data=0;

void setup(){
    Serial.begin(9600);
}

void loop(){
    Serial.write(data);
    delay(50);
}

void serialEvent() {
    data = Serial.read();
}

This example should update the data variable when serial data is received. But for some reason it does not work that way, nothing gets printed in the serial monitor.

But when I move the Write method to serialEvent function, I have my data printed as expected.  Why is this happening? If I'm correct, the data variable should be printed with the last value I got from Serial.read().


texts:
Im trying to understand what is the output voltage\current (pin 3) of that 555.

If I get it right, when low (logic 0) AND Vcc is 5v AND output current is 8mA, the output voltage is 0.4v
And when high (logic 1) AND Vcc is 5v AND output current is -100mA, the output voltage is 3.3v.
So I have 2 questions:

why -100mA when high? and not +100mA?
In order to get that 100mA, should I connect a load (lets say resistor) to the output, with the value of (3.3v \ 100mA) = 33ohm?

Appreciate the help


texts:
I wrote a riscv core in verilog which works fine, but is slow. It can't go faster than 50mhz when synthesizing in Xilinx ise for spartan 6. I have however seen similar cores be able to go to 100mhz or even 200mhz in some cases. I'm wondering how they reach such speeds. I think my main culprit is that I made everything an if(with if's inside the if), but don't know what to replace the if's with.
Basically, I extract the op code from the instruction, then have an if else for every instruction. How would I optimize that? What do I replace the if's with to get a faster core?
Little snippet of my core to demonstrate the if's:
else if (op == 7'b0000011)// Load instructions
begin
  if (funct3 == 3'b010)// LW
    begin
      `dbg($display("LW"));
      addr = ItypeIMMSignExtended+rs1Reg;
      reqSize = 2;
      rw = 0;
      activate = 1;
      TA = ~oldTA;
      newCounter = counter + 1;

      validInstr = 1;
    end
  else if (funct3 == 3'b001)// LH
    begin
      `dbg($display("LH"));
      addr = ItypeIMMSignExtended+rs1Reg;
      reqSize = 1;
      rw = 0;
      activate = 1;
      TA = ~oldTA;
      newCounter = counter + 1;

      validInstr = 1;
    end
    /*...*/
end

else if (op == 7'b0110111)// LUI
begin
  `dbg($display("LUI"));
  rdReg[31:12] = UtypeIMM[31:12];
  rdReg[11:0] = 0;

  validInstr = 1;
end

Can anyone give me some advice on this?
Thanks!


texts: can I place 250ma fuse instead of 200ma fuse in multimeter, affacts meter calibration?

texts:
Well I know that it fuse will pass more 50ma in my multimeter but I want to know that will it make some change in my calibration of multimeter?

can more 50ma current can damage my meter?


texts: Design advice for asynchronous operations requiring a delay using STM32F7

texts:
n00b advice is needed. I am trying to figure out the best approach to delay an operation of relatively small value (10-5000 microseconds) without slowing down the main run loop. I assume I'm misunderstanding something. My approach so far has been the following:

216 MHz core (F767)

Create TIM2 with Prescaler=0 and 216*10^6 period/ARR to give me a high resolution counter.
Interrupt receives external signal event (120 Hz).
Do any GPIO and timing within the interrupt handler (also tried launching a timer and doing it there; it doesn't make a difference).

Because I need microsecond resolution delays, I'm doing something along the lines of:

startTime = __HAL_TIM_GetCounter(&htim2);
while(GetMicros(__HAL_TIM_GetCounter(&htim2) - startTime) < delayMicros);

uint32_t GetMicros(uint32_t counterValue)
{
    return counterValue / (108 / 1000 / 1000); // (216 MHz with APB2/2 = 108)
}

But what I've noticed is that the longer the delay, the more it slows down my program's while loop (the LED blinks much slower the longer the delay):

while(1){
  HAL_Delay(50);
  HAL_GPIO_TogglePin(GPIOB, Green_Pin);
}

Is there a better structure to perform precise delays? Or am I doing something really simple really wrong?


texts: How to determine an expression that detects underﬂow?

texts:
This is a part of my computer science assignment:

When adding two unsigned binary integers, an overﬂow can easily be verified by observing
the carry out. Specifically, an overﬂow occurred if and only if S' · Cout = 1.

Does anybody know what this S might represent? is it the sum? if it is how is this expression making sense?

The adder-subtractor circuit also performs the subtraction of the two unsigned integers: A−B.

If the magnitude of B exceeds A, then the subtraction will produce an unusually large result, i.e., an underﬂow occurred.

In terms of the inputs and outputs A3A2A1A0, B3B2B1B0, S3S2S1S0, Cout and
S, determine an expression that detects underﬂow.
Determine the simplest Boolean expression that simultaneously detects overﬂow
or underﬂow.

I have no idea in which direction I should go. I don't even know how to tag this. Can anybody give me a little hint on how to solve them? Like what the answers are supposed to look like?

I think it shouldn't be too hard.


texts: Idea/solution for building target to detect nerf dart accuracy?

texts:
I'm doing some modifications to a nerf gun, and have already done speed/FPS tests with a chronograph I built, and the next test is modifications that can be done to increase the accuracy. I'm trying to build a target that will sense the x/y position of a dart as it hits a target, or breaks a plane. I have a few ideas, but I'm trying to keep it as simple as possible.

One idea involved a mesh grid of wires, and when the dart strikes the grid, it would cause wires to complete a circuit. Problem there is thats a lot of wires (to get any sort of accurate reading), a lot of points of failure (accidental wires touching), and what sounds like a huge pain in the butt to make.

Another idea was an array of IR leds and sensors. The issue there is then I have to rig up an absurd number of IR receivers, and write an function to determine just which sensors were blocked by a dart. Sounds complicated and like a lot of work.

Are there any sensors out there that react to light (IR, laser, visible, whatever) that are like a strip, and will provide an analog result depending on what section is lit or unlit? Or a sensor that uses a spinning laser that can detect it's position/angle when the laser bounces off something?

Or am I making this a lot harder than it needs to be, and there's an easier solution than what I'm coming up with? I want to fire a dart at, or through, a target, and get an x/y coordinate reading on it. I'd like it to be moderately accurate (1/4" or 1/2" resolution?). Better is great too.


texts: How come a 4 core intel chip has the same TDP as a 6 core intel chip

texts:
This has been puzzling me for a while.

Here is the definition of TDP from intel spec sheets:

  Thermal Design Power (TDP) represents the average power, in watts, the
  processor dissipates when operating at Base Frequency with all cores
  active under an Intel-defined, high-complexity workload

Now, how come the i5-9300H and the i7-9850H have the same TDP?

The latter has both more cores and higher base frequency and they are both from the same generation of chips.


texts: How to measure inrush DC current in PV solar system?

texts: I need to measure inrush DC current in PV solar system. Can I do that with a clamp meter?


texts: GNU ARM Eclipse - flash and run without debug

texts:
I have successfully installed and configured Eclipse for ARM development according to this excellent tutorial:

http://gnuarmeclipse.github.io/

Almost all the tutorials (including the one above) I have seen provide instructions on how to set up debugging, but I cannot figure out how to just load program to the flash memory without attaching the debugger (e.g. release version of the firmware).

One tutorial solves this problem by installing and calling st-link utility from Eclipse environment, but my current setup is already able to flash the MCU - why should I install anything else? I just want to make GDB flash the memory and exit.

So guys, how do you upload release versions of the firmware to your ARMs?
Thank you for your suggestions :)


texts:
So let's say I have a perfectly symmetrical Voltage transfer function curve for my CMOS inverter. The curve looks like this:

The question is, how would this curve change if the size of the NMOS transistor was reduced.

My answer: The curve would still be symmetric but would start shifting right.

But I just know that from my textbook, I don't understand WHY the curve would shift right.

So why exactly will it maintain symmetry and shift right?


texts:
I am using the built-in ADC of Renesas S5D9 microcontroller.
I am setting the ADC clock frequency to 60 MHz and a 12-bit resolution.
I am getting the samples, but I want to know at what sampling frequency it is being sampled.
Formula conversion time = ADC CLOCK period * bits being converted = (1/60MHz)* 12 = 0.2 microseconds
Is my understanding correct ?


texts: Reverse engineering old serial devices and cloning with Arduino

texts:
I have a piece of music equipment that uses a remote control. This remote control communicates bi-directionally with the main unit. It communicates over RS-422 protocol (mainly for the cable distance, I believe).

I have purchased a couple of RS422 to USB adapters with the intention of snooping the data in both directions using some serial port monitoring software.

I haven't quite gotten that to work properly on its own yet; I think it's most likely the connection settings I am attempting as the data I see looks messed up. From what I can tell from the service manual, this should be 8 bit characters with no parity and 2 stop bits.

Anyway, as this device is now archaic in terms of technology (1982, I believe), I think it would be a great candidate for cloning with an Arduino.

The remote itself uses an old Intel 8749 microcontroller. This was an MCS-48 based device (I think) which also had a small EEPROM built into it for program memory. This was 8-bit with 3 I/O ports.

The remote unit basically has 12 old Litronics DL-1414 alphanumeric 4 digit displays (which receive an ASCII character and hold it in their memory until refreshed), a bank of buttons and faders (which are connected via an ADC) and a dB level meter.

I have the service manual of the unit which goes into much more depth about the bit addressing scheme of the devices, which I can upload.

I might be thinking about this the wrong way but my idea was to sniff and capture the data being sent and received to figure out what is sent, when for instance, a fader is moved. This I would imagine would then be easy to strap to a slide pot in Arduino and then have that movement sent to the serial bus possibly with some control bits added and then the value.

I'd really appreciate some thoughts and maybe advice, on how such reverse engineering can be tackled?


texts: Nodal analysis independent and dependent voltage source and current source

texts:
After spending quite a few hours I am stumped with this problem while trying to solve for Vo, which is supposed to 0.5V and this was confirmed through PSpice. I have no idea what I am doing wrong or if I missed a step. So here is what I have so far since I have 5 nodes and a reference node as labeled on top based on what I have I have made V5 = Vo and V4 = Vx.
Here are my 5 equations when not reduced:

(V1-V2)/1k + (V1-V3)/1k + (V1-V4)/1k + (V1-V5)/1k = 0 From V1
(V2-V1)/1k + (V3-V1)/1k + (V4-V1)/1k - 4ma + V3/2k + V4/2k = 0 When treating V2,V3,V4 as a supernode.
(V5-V4)/2k + (V5-V1)/1k + V5/1k = 0 from V5
V3-V2 = 2Vx where Vx = V4
V4-V3 = 12V

When reduced the equations become:
 1. 4V1/1k -V2/1k - V3/1k - V4/1k - V5/1k = 0

-3V1/1K + V2/1K + 3V3/2K + 5V4/2k - V5/1k = 4ma
-V1/1k + 0V2 + 0V3 - V4/2k + 5V5/2k = 0
0V1 + 0V2 - V3 + V4 + 0V5 = 12
0V1 - V2 + V3 - 2V4 + 0V5 = 0


texts:
I want to play with valves running at 300V.

Is there some suitable form of breadboard or prototyping system that anyone is aware of?  Clearly you wouldn't use one of those common white push in things that you use to play with an Arduino.  Is there some home brew system that can be used?  I remember a long time ago there being electronics kits that had a bunch of springs that you clipped resistors into.  Is my only alternative to solder every circuit up every time?


texts: Can you help me to add a multiple pins input in Quartus 2? If there is not a default one, how can I add it by MegaWizard Plug-in Manager? Thanks!


texts: Light dimmer circuit modified, have some questions

texts:
Thanks to the suggestions, I modified my circuit, hopefully making it a bit safer

I'm having trouble choosing R6 though, in the datasheet for the triac (L4004L3), this one
datasheet

Igt = 3mA, so if I calculated the resistor value for peak voltage and 30mA current

R = Vpeak/I = 230/30mA = About 8k

But now lets say the triac is triggered when the AC voltage is 10V

I = V/R = 10/8k = 1.25mA

But since Igt is 3mA, the triac wont turn on

If I try choosing higher currents, the resistor power increases

Right now it's sitting at

P = I^2 * R = 0.03^2 * 8k = 7.2W peak power

And also whats the minimum current needed to turn the photocoupler on or activate the other side ?

For R2, I calculated it this way, for a chosen current of 10mA

R2 = Vpeak/I = 230/10mA = 23k

For R5, chosen current 10mA. I think the max the MCU can source is around 20mA

R5 = (V-Vled)/I = (5-1.2)/10mA = 380 ohms


texts:
I want to purchase 20 MHz ATtiny85 chips in SOIC-8 on a full reel from Mouser. I found these two variants:

ATtiny85-20SUR
ATtiny85-20SHR

I have studied the specifications but cannot for the life of me find the difference between the two, and I don't want to order a full reel of the wrong part if there is any difference between them. Does anyone know?


texts: Switched Mono jack + battery: Make circuit when plugged in

texts:
I would like to replicate the functionality inside the Ampoids guitar amp (9v battery) in which the circuit is turned on only when you plugin a male 6.3mm mono jack to it

I believe that the most common form of this connector is actually a stereo NC type of connector, in which the circuit "breaks" when the plug is inserted in

Is there a way in which I can achieve the desired functionality with a NC female 6.3mm (1/4") connector?, that is: making the 9V battery power on the circuit when a male mono plug is inserted on the switched female connector
I have looked at this article by Brian Smoot on CUI Devices a few times but it explains it in terms of stereo connectors and I get confused.


texts: STLink cannot connect, unless VDD is connected

texts:
I have made my own board with an stm32g474 on it. Unfortunately I have some problem with connecting to it with ST-link. The board has it's own power supply.
If I connect the SWDIO, SWCLK, NRST and GND pins , then the ST-link cannot connect to it.
However it works, if I disconnect the board's power supply and connect the ST-link's 3,3V.

Do you have any idea, why is that?


texts: How to select a coaxial cable for 5kV DC and 0.1 mA

texts:
I need to select a coaxial cable that is safe to use with a DC voltage of up to 5kV DC and very low current  - less than 0.1 mA. This cable will be used to supply power to a microchannel-plate (MCP) detector.
The detector has two female MHV connector and one female SHV connector (all are ~5 kV and 0.1 mA).
I saw that some people use RG8U, but I was not able to find any general guidelines for selecting a cable (usually the bandwidth is the main consideration, but in this case I need DC).


texts: Use CT current sensor to measure AC current of a single device

texts:
So I recently bought 3 current transformers with the goal to measure the current of 3 washing machines. All I want to measure is if the machines are running or not so accuracy isn't really a concern.
Now I ordered them a bit hasty and didn't think of the actual working logic of these guys. From what I read, I thought I can just clamp them around a power cable and read the current.

Which apparently is not the case because I can only measure one phase with a CT as far as I understand. I live in a country with a 3 phase system and I don't understand that much about alternating current. I tried to read into this 3 phase system but its quite a bit over my head.

Now from what I think I understand, this means if I clamp this around a standard power plug I wont get any output voltage because the phases cancel each other out and I don't get any magnetic field that the ct could sense, is that correct?

Question: Would it be possible to remove the outer isolation of a power cable and clamp the CT to just one of the three cables/phases?
Or would they be too close and interfere and still cancel each other out? Or is it a stupid idea all together because I totally didn't get how this 3 phase alternating current system works?

This is the CT sensor I'm using:
http://www.seeedstudio.com/depot/noninvasive-ac-current-sensor-30a-max-p-519.html
Datasheet: http://garden.seeedstudio.com/images/b/bc/SCT013-030V.pdf


texts: Will repeatedly turning a light bulb on and off damage it?

texts:
I have been hearing a common saying that if one keeps switching the lights on and off you will probably damage the light bulb itself, since every time you close the switch there would be a sudden rush of current through the circuit. Given that we are talking about modern light bulbs you would find in a normal household environment (incandescent /fluorescent/LED), will repeatedly switching it on and off cause long term damage to the light bulb?

I personally do not think it will because of the fact that the initial rush of current will not even have enough energy to cause any noticeable effect. That's what I believe, but I'm not sure if that's true or not. Aren't those lights in decorations and signs also flashing all the time? I don't see them wear out faster.


texts: Different pullup resistors on the same I2C SCL and SDA before and after a I2C repeator hub

texts:
My Environment:

STM32L476RG
RTOS: Zephyr 2.1.0-rc
I2C device: AQM0802 (character display 8x2)
I2C device: MLX90632 (FIR thermometer) with 1k pullup resistors

Problem

I am trying to use the AQM0802 and MLX90632 on the same I2C bus. However, I found that the AQM0802 does not work with the 1k ohm resistors mounted on the MLX90632 board.

The AQM 0802 board works with 2.2k and 4.7k ohm.

Trial

I found the following datasheet.
http://www.ti.com/lit/an/slva689/slva689.pdf

In Figure 1 of the above PDF, there are two pullup resistors before and after the repeater hub.

I came up with an idea to use different pullup resistors:

A. 1k ohm: before the I2C HUB
B. 4.7k ohm: after the I2C HUB

Attached is the circuit.

Question

Is this a possible solution for the problem?
I wonder whether there is any problem using this circuit (breakdown of the I2C devices, for example).


texts: IEC 61000 vs IEC 61326? Electromagnetic compatibility(EMC)

texts:
I have been working on a product which requires EMC tested based on an IEC Standard. The product application is measurement and monitoring of various Solar String Parameters like voltage, current and therefore power. Some of the similar products in the market are offering two different certification/compliance. IEC 61000 and IEC 61326. Now on initial assessment, I can't find a clear difference between these two as both of them talk about Electromagnetic compatibility. Is there anything that helps decide which one to go for based on some parameters or application?

Thanks in advance


texts: Is it possible to design a dynamical/adaptable functionally/logically complete circuit?

texts:
Biologist here but I've been reading about functional completeness in digital logic and I am wondering if there is a universally complete circuit that can be modified to express any boolean function for 2 or 3 inputs? Maybe this could be done by having a big circuit and turning on/off certain logic pathways of the circuit to change its boolean function? Or modifying connections as to skip certain gates altogether?

I am sorry if this is a dumb question but couldn't find any information on this. I am thinking this could be interesting for synthetic genetic circuits.

---------------- NEW EDIT

Clearly, my question was too vague. In synthetic biology, we are starting to create what we are calling "genetic circuits" (like a genetic flip-flop, circuits with memory, or any other simple circuits), emulating the electrical engineering discipline. But instead of cables that transport electrons, it is genes that produce transcpritors (or RNAP flux) that activate or repress other genes. We are even at the point where we are creating genetic design automation tools.

However, the endeavor of building a genetic circuit and implementing it into a host organism is one that takes a lot of time, money, and effort. So my question is more like: Could a universal genetic circuit be built once, to implement into a host organism once, and then turning one or more gates ON or OFF, have the circuit behave with different behaviors?

So I imagine something like this:

Where one could cancel/knock out one or two gates or cables and change the function of the circuit to one which the researcher would like.


texts: Switching and protecting batteries from external power supplies

texts:
my device can work from external power source as well as from two AA batteries, so voltage in this case is 3V, but external supply is 5v.
I need to protect my circuit and power supplies in case of connecting all power sources together at a time.
I have restricted space in my device, so the circuit cannot be relatively large.
Please suggest what to do in this case.
I would be grateful for any help.


texts: Using different 18650 to repair laptop battery

texts:
Background: I have a laptop with a bad battery. Upon opening it up and testing the six 18650 cells that make up the battery, I found one to be completely discharged while the other five were still at an acceptable voltage. I partially charged this cell in isolation to bring its voltage back up to the average of the others in an attempt to get the battery working again. Which it did. But the battery isn't lasting nearly as long as it used to, so I am assuming this one cell is damaged.
Now my actual question is whether I could e.g. replace the cell with a 2000mAh cell when the others are 2600mAh, or if that's a bad idea. We're talking about a laptop battery here with a relatively low current draw and fairly advanced charge controller. Though I admit that I know nothing of these things aside from what I learned in school up to 10th grade in the 90's.
I salvaged a number of these cells from other laptop batteries but I have no idea whether they're all the same capacity, so I just want to make sure that I can safely do this, or whether I'd have to bite the bullet and spend the $50 it'd cost me for 6 brand new high quality cells (which may as well all be the nice 3000mAh ones while I'm at it).


texts: Identification of round, keyed, two-pin high power connector

texts:
I just got a new electric bike and I'm thinking about adding an extra 36V 20Ah battery to get more range.

What I'm thinking is to pull out the main battery when it runs out and connect the second battery to the port which the main battery connects to.

This is the port on the body of the bike:

And this is the port on the main battery

But for that I need a male connector same as the main battery. I don't know what it's called; does anyone know? I did Google it but I guess I don't even know what to look for...


texts: Audio using PWM, what is the principle behind it?

texts:
I have seen a schematic of a PIC board which uses filtered PWM to provide audio output signal to an audio jack. It shows PWM output filtered using 3 stages of passive RC filter followed by an LM386 stage. I have the following questions:

Usually an audio signal would have multiple frequencies summed up simultaneously. How does PWM do that?
Is the audio quality as good as using PCM with DAC, filter and amplifier?
Since this technique looks and is so convenient, why don't all audio devices use this to save money and cost, including sound cards in computers?


texts: How to measure the maximum power of a solar panel

texts: What is the best way to measure the maximum power generated by a solar panel?


texts: RS Flipflop Truthtable for Q=1 and Q* = 0

texts:
I am studying Computer Science and I am very confused.
Let us say our Q is 1 and our Q* (Negation of Q) is 0. So when we go for R = 1 and S = 0, why isn't the value of Q* = 0?

I mean the NOR Gate for Q gives us Q = 0, which makes sense for me. But why is this value taken for the input of the NOR Gate for Q* instead of the earlier saved one (which was our 1). How is it accomplished? Shouldn't be the NOR Gate for Q as fast as the NOR Gate for Q*?


texts: Using an AVR Programmer to program the TQFP version of ATMEGA328P

texts:
I am attempting to upload the Arduino bootloader and a program to an ATMEGA328P-AU with an AVR programmer. I have done this before using the Arduino UNO board and and the 28 pin DIP version of the ATMEGA328P, however I'm running into issues using the TQFP version.

Using a TQFP adapter socket, I have simply used jumpers and a breadboard to connect the necessary pins to AVR programmer. For convenience, I've provided the schematics of both the AVR programmer connector and the IC:

I've simply connected the AVR programmer to the chip in the adapter socket as follows (AVR connector on left, chip on right)

1 (MOSI) - Pin 15

2 (VCC) - Pins 4, 6, 18

5 (RST) - Pin 29

6 (GND) - Pins 3, 5, 21

7 (SCK) - Pin 17

9 (MISO) - Pin 16

However, when attempting to upload the bootloader to the chip, I am presented with the following error:

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: bus-0:\\.\libusb0-0001--0x1781-0x0c9f
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : USBtiny
         Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude done.  Thank you.

Error while burning bootloader.

Clearly I'm doing something incorrectly, and I wouldn't doubt if it was because it's not as simple as hooking the AVR programmer directly up to the chip to program it.

Any help would be appreciated.

Thank you.


texts:
I have the following expressions for some logic which will each power a motor:

A OR (NOT B) OR D
NOT(A AND C) or (NOT C AND D)

I have a limitation on the number of integrated circuits I can use, with each IC being able to hold 6 of any 1 gate type on it.

I have tried below to turn both of the expressions below into circuits using only two types of gate, NOT and NAND gates, I know that I can create a NOT gate using a NAND gate with both of its inputs being into the NAND but I don't believe it makes too much of a difference for my requirements.

Circuit 1

simulate this circuit – Schematic created using CircuitLab

Circuit 2:

simulate this circuit

If possible, I want to be able to combine the circuits together, having 4 inputs A B C D with each of the outputs to the motor being separate I'm looking to keep the number of IC's as little as possible - 2 MAX.

Formatted the question since the first post made hardly any sense, Sorry!


texts: Unable to upload Arduino sketch to Arduino Uno using AVR ISP MKII and Ubuntu 12.04

texts:
About a week ago, I tried to use my Arduino Uno to program a a stand-alone ATmega328P with Optiboot. Not only was I unsuccessful, but now I can't upload sketches to the original ATmega chip. The "L" stays lit even when I press the reset button.

So I ordered an AVR ISP MKII to either unbrick my Arduino Uno or bypass the bootloader and upload a sketch. I followed the tutorials to use the ISP in Ubuntu 12.04 (Precise Pangolin), I have the programmer set to AVRISP MKII and I tried to "Upload sketch using programmer". This is the response:

avrdude: stk500v2_command(): command failed
avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Unknown status 0x00
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


texts: Error-Detection Circuit -- How does this work?

texts:
I'm currently studying for finals (I have the solutions here already, so this isn't helping me bypass doing homework or anything like that.)
My professor has done an unsatisfactory job explaining this particular circuit's step-by-step functioning and so I'm really confused:

how the columns are being generated and
how the errors are detected.

If anyone could help explain how this is working, I would appreciate it very much.

Problem: For the single error correcting code circuit, fill in the response to reception as far as necessary, and determine if any error is detected and, if so, what symbol is corrected.

Solution: the second from last position is corrected, yielding 0110100, time from left to right.

UPDATE: I think I finally have a hard-fought understanding of this circuit, except for one issue. If you could take a look at this proposed explanation and see if it's correct, I would again be very appreciative.
This is an error-detection circuit. It will tell you where the error in the given codeword is by outputting a 1 on the upper right. For the first seven digits of the codeword that are input, they are stored in the register as well as cycled through the feedback shift register in order to arrive at the 3 bits on the seventh timing. If these three check bits are nonzero, then there is an error. The right-hand side of the AND gate is enabled on the seventh timing, meaning the output of that AND gate will be a 1 when the input to the previous AND gate is a 001.
So, we wait for the shift feedback register to keep cycling through itself (the upper line of the XOR that goes into the shift feedback register is constantly 0 during this post-seventh timing cycling process, so it's always the contents of the final register XOR'd with 0). Once 001 manifests itself in the three registers, the AND gate outputs a 1 and is XOR'd with the given 7-unit delay register contents, yielding the location of the error.
The issue that I have with this is that it says the the correct solution is that the error bit was in the second-to-last bit. Is the error not in the third-to-last bit because we must wait until the clock refreshes in the registers for the 001 to be pushed into the AND gate in the thirteenth timing?


texts: Resistor between input and output for push-pull follower

texts:
I'm reading about push-pull output stages in The Art of Electronics, 3e. On page 107 he presents the following circuit:

I'm confused about the function of the \$100\Omega\$ resistor used here. Below the figure he writes this:

  In this circuit we’ve added a resistor from input to output [...]. This serves to eliminate the “dead zone” as conduction passes from one transistor to the other [...], which is desirable especially when this circuit is included within a larger feedback circuit.

When I simulate this circuit in Ngspice, the output voltage and current don't seem to be affected by the presence of the resistor. There is some current through the resistor, but it's small compared to the output current and the currents through the two other resistors. In my simulation, I've used \$R=220\Omega\$ and \$\pm20\mathrm{V}\$ for the voltage supply rails. I also included an \$8\Omega\$ load impedance. For the input voltage I used a sine wave with 0 bias and a 10V amplitude.

What is meant by "dead zone" here? If he's referring to crossover distortion, isn't that eliminated by the presence of the diodes?

Here's the schematic used in the simulation.

And the waveforms that I see regardless of whether R4 is included.

Red is the output voltage, green is the output current, yellow and green are the collector currents of Q1 and Q2, respectively, and blue (which is a horizontal line at 0 and thus covered) is the current through R4.

Finally, here is the circuit with only the output voltage and R4 current included.


texts: A problem regarding connecting the grounds within two seperate circuits

texts:
Figure 1

I am trying to design the above circuit for my project to create zero crossing detector as shown in the above figure. This configuration was proposed originally by the member named "Transistor" in this community.

But the problem is I cannot connect the grounds at the Point A and Point B as shown in the above diagram due to the nature of my full circuitry.

My full circuit is shown below

Figure 2

simulate this circuit – Schematic created using CircuitLab

1) The red squared portion is a different section of my full circuit and its functionality does not need to be understood and it has nothing to with my zero crossing detector circuit. But it plays a significant role in preventing me from implementing the circuit shown in the previous image

2) I have a +12V and -12V power supply with the common point at the middle acting as ground. (POINT B)

3) My AC source is 3V 50Hz providing AC signals to the red squared portion of the circuit. But I am also using that particular AC source to supply power to my rectifier circuit as shown in the above image.

4) I have connected my AC source to the common point of the two +-12V supply (I have to do it to provide reference)

5) Now comes the problem, please compare the figures 1 and 2.

In figure 1 , my point A has been connected to the point B (common
point of the two +-12V sources).
But in figure 2, point A cannot be connected to the point B since
point C has already been connected to point B to provide a return path for
the AC current.

How can I change my circuitry in figure 2 so that the results in figure 1 can be achieved?


texts: Why do FPGA projects always take the same amount of time to compile?

texts:
With software, when we compile the project for first time it may take a while but afterwards, it does not take so long anymore. If we change a single file in the project, everything does not need to be compiled again.
This does not seem to hold true for compiling FPGA designs.
Now I have used Intel Quartus Prime Standard with MAX 10 and Cyclone IV & V and Microsemi Libero SoC with IGLOO2 and SmartFusion2. With both programs and all the FPGAs I mentioned, it always takes the same amount of time for the project to compile. I want to know, why? Am I doing something wrong? It should take less time to compile after the first time isn't it? How should this be fixed?


texts:
I'm looking at using the S-8261 for reverse polarity protection. On page 24, it reads

  R2.. Select a resistance as large as possible to prevent large current
  when a charger is connected in reverse.*5

Yet, *5 reads

  If R2 has a resistance higher than 4 kΩ, the charging current may not be cut when a high-voltage charger is connected.

So does that mean R2 shouldn't be "as large as possible" but rather <= 4kOhms?

In fact, is R2 designed to protect against reverse polarity protection even if it's embedded in a device that drains the battery rather than one charging the battery? The language it uses seems to have an emphasis on 'charger'.

Thanks


texts:
I have a DSO-S 104A scope. I have it connected through a USB 3.0 cable to a PC with MATLAB. I want MATLAB to read the waveform from the scope into a vector. I'm sampling packets of pulses, the frequency of the packets is 10 KHz. Currently I'm using the following code:

h=1;  %Number of packets to sample (from 1 to 10K)
for k=1:h
  empty=0;
  data0 = query(scop1, 'WAVeform:DATA?');
  r=0;

  while not(empty)
    data1=fscanf(scop1);
    empty=isempty(data1);
    data0 = sprintf('%s%s', data0,data1);
    r=r+1;
  end

  Data=str2num(data0);
  DATA(:,k)=Data;
end

This reads each point on the scope and assembles them into a string, which is then converted into a vector. My issue is that this process is incredibly slow. At the packets rate of 10 KHz to obtain an acceptable resolution I need to sample at least 3000 packets, and at the speed that I'm currently doing it it will take an hour at least.
Does anybody have a better way to read from a scope?


texts: Using K-type thermocouple to measure human body temperature

texts:
Is there anything I need to he aware of when using K-type thermocouples?

I got the idea by touching the probe. I can get a reading when measuring temperature for 30 seconds using a DMM. A commercial electronic thermometer needs around  minutes for the same result.

This gave me an idea to make a device which will use K-type thermocouple to quickly measure temperature. On the other hand if it was so simple to measure temperature, why don't the commercial thermometers produce their result faster.

I have a feeling that I'm missing something important here.

So my question is: Are there any non-obvious problems I could face when using a K-type thermocouple to measure  measure human body temperature?


texts: Flow of current in a simple inverting amplifier circuit

texts:
I am considering a simple circuit like the one below.  Let us say that the voltage source suddenly turns on (from 0V to 1V), then current will through through the resistor R1, correct?  But assuming an ideal op-amp (drawing no current) and an ideal voltmeter (drawing no current), where does the current flow to (in order to satisfy Kirchhoff's current law)?

Simply put, what is the behavior of this circuit after the voltage source is activated?

Thanks all.

simulate this circuit – Schematic created using CircuitLab


texts: Output a pulsing signal when input is high/low

texts:
So I have a proprietary system that outputs high when there is an error, and low when there's not.
I want to put this signal onto a D flip-flop clock, so that if theres an error, my system clocks a high signal out, which latches the system off.
The D flip-flop clocks on rising edges, so in order to always catch an error I want to turn the high signal from the proprietary system into a pulsing signal.
I am open to suggestions, but this is some of the ideas I have, and the questions I have regarding them.

Run the error signal into a AND gate together with a oscillator.
Run the error signal into the enable pin on a oscillator. However, I'm a bit uncertain what happens when the clock is disabled. Can I have a pull-down on the oscillator output?

I've added a circuit showing the D flip-flop, however, it also has a clear pin, which I use at start up to make sure things start up correctly.

simulate this circuit – Schematic created using CircuitLab
So the error signals latches the system in an error-state, i.e. it clocks the 3V3 onto the output, theres no way it can change without restarting the entire system.
Oh, and cost is less of an issue than many components/complexity.


texts:
Is it possible for someone to identify these backplane (motherboard) connectors, the ones in brown color? The daughter cards which plug-into these connectors are 3U size cards. This is an outdated chassis. Maybe someone know about these by his old experience.

The connectors have 11+45 = 56 points in a row.


texts: Syntax error(10500) when compiling VHDL code: near text "when", expecting ":"

texts:
I want to compile my code but I get multiple errors surrounding a statement which is repeated several times in the architecture. The error message (Error 10500) says a ":" is missing near "when" but to me everything seems consistent. Part of the code is pasted below. As you see it complains about row 308 where an WHEN statement used.

I have checked this specific part and the entire code itself, but I don't find anything inconsistent about it. The conditional statement is terminated with a semicolon as it should and it is consistent with the syntax of a WHEN statement according to this webpage: http://www.ics.uci.edu/~jmoorkan/vhdlref/cond_s_a.html


texts:
I am trying to use a 9.5A (max) 12v DC motor in the circuit of the coil side of a 10A 12v DC relay and although its opening the NC contacts, its not allowing the motor to run. What i'm trying to do is cut off an irrigation solenoid whenever the 12v DC motor is actually running, so as to avoid a sudden loss of pressure.
Am I missing something basic here?


texts: LTSpice: What breaks KCL in .op but not in .tran simulation?

texts:
Simple BJT rheostat circuit, with a couple of resistors R1a and R1b representing the two parts of a potentiometer. Simulated in LTSpice IV using a part not suitable for this particular application and current values (I thought I had picked a 2N2955 power transistor, not a 2N2905 small signal transistor) but the problem still stands.

The problem is that currents in the transistor operating point do not add up. KCL is blatantly broken with .op (all currents exiting the device, with a large error in Ie - that's more than 6 amps, considering the sign). Please note, the following listing has been slightly edited, but all values are those returned by LTSpice using the default 2N2905A model included in the program.

--- Operating Point ---
V(e):    24         voltage
V(b):    21.6403    voltage
V(out):  22.41      voltage
I(RL):   2.241      device_current

Ic(Q1):  -2.241     device_current
Ie(Q1):  -4.70438   device_current  ???
Ib(Q1):  -0.134429  device_current

I(R2):   0.139615   device_current
I(R1b):  0.139615   device_current
I(R1a):  0.0051861  device_current
I(Vin):  -2.38061   device_current

And yet, a .tran simulation (with or without startup directive) gets the currents right as shown here (I made the curves all positive to fit them in the same quadrant).

So, what gives? What is breaking the solver in .op?

EDIT: here's the netlist

Vin E 0 24
R1a E B 455
R2 N001 0 150
R1b B N001 5
Q1 out B E 0 2N2905A
RL out 0 10
.model NPN NPN
.model PNP PNP
.lib I:\Nike\LTSPIC~1\lib\cmp\standard.bjt
.op
.backanno
.end


texts: Feed-through termination to vary bandwidth and signal power

texts:
I'm currently facing an interesting problem regarding RC low-pass filters. In my experimental setup, I have a reverse-biased photodetector (DET01CFC from Thorlabs). To amplify this signal, I make use of a low-noise amplifier (LNA-1440 from rf-bay).
As the photodetector has an internal capacitor, it functions as an RC low-pass filter with a cut-off frequency given by f = 1/(2piR*C), i.e this limits the bandwidth of our circuit. This is however no problem since with the 50 Ohm source impedance of the photodetector this cut-off frequency is way larger than our signal (which is around 300 MHz).
However, I was thinking that since according to Ohm's law the signal power increases with the increasing resistance, it is tempting to introduce an e.g. 1 kOhm feed-through termination between the photodetector and the amplifier to trade some bandwidth against the output signal (higher resistance increases the signal strength according to Ohm's law but according to the previous paragraph it also decreases the bandwidth)
Did anyone of you try something like this before and do you think it makes sense? I am also a bit concerned about the impedance matching, so maybe you have some thoughts about this as well :)
Thank you very much for your help!


texts: Can a board have two power supply circuits?

texts: I have a PCB holding a Video decoder, FPGA and a USB controller, powered by USB3.0. Can I have two different power circuits generate power from same input and deliver to the same output?


texts: How can I properly control the CS and R/W inputs of the DAC7821 Digital to Analog Converter?

texts:
I am using DAC7821 in unipolar mode. The datasheet gives specific timing requirements for D/A conversion as seen below:

I simply ignored this information and applied the same clock signal (1 MHz) to CS and R/W inputs that I also use for updating the digital data. It worked, the conversion was flawless. However, I am wondering if there are any standard methods for controlling such D/A converters besides simply applying the same clock signal to CS and R/W pins?


texts: Transistor differential wein bridge oscillator wrong frequency

texts:
So I have created the attached Wien bridge oscillator using a transistor differential amplifier, the Negative gain is controlled using a potentiometer, center tapped and yes I understand that in the real world I would need to use an AGC to stabilise the output.

My problem  is that the calculated frquency given the component should be,

f = 1/2picr = 1 / 2*3.141*10nF*5koHM = +-318.369Hz,
But as you can see on the image, I'm getting something in the tune of +-863.04,

I have searched everywhere and I don't know what i'm doing wrong here,


texts: Cascaded op amp instability, oscillations

texts:
I'm trying to design simple voltage regulator with differential feedback.
Vin = 12V
Vout = 2-5V
Iout = 0-7A

In simulator I can see large oscillations. The larger the output current, the higher oscillations. When I remove the first op amp, the regulator works fine.

How to fix oscillations in cascaded op amp schematic?

UPD sorry for bad schematic, I've redrawed it.

I was promped to add a capacitor C3 between negative input and output of U1B:

And now it works fine, there is no oscillations. Is it right solution? And how exactly this capacitor stabilizes the schematic?


texts: Proper ways to disconnect ICs during low power states to avoid parasitic/backfeed supply

texts:
I’m working on a low-power battery-based AVR-based project that integrates a few different devices including a neopixel strip and an Adafruit pixie. When the overall device is quiescent, I’d like it to draw less than 0.1mA to maximize the LiPo battery life.

I got this all working (measured 0.035mA) but I’m not sure I necessarily did it in the “right” way and I plan to build a product based on this so would like to do it right.

(Not shown: a flyback diode for the relay)

The core concern I have is the “parasitic” powering of devices when VCC is disconnected via current flowing from data pins. For instance, the Pixie (which communicates via serial), has no power down mode and even when “off” drains about a milliamp. So I placed a small relay to disconnect its VCC, and discovered that the serial pin was actually still powering the pixie. Hints elsewhere suggested that many chips have a diode shunting their digital input pins to VCC as power protection. To solve this, I’ve had to suspend the serial library and actually digitalWrite( PIN, LOW ) during sleep.

Same thing with the WS2812b strip — disconnecting VCC still allows the device to be powered from the data pin. And in other designs when I’ve disconnected GND with an N-Channel MOSFET, I’ve seen the reverse - a back flow of current through the data line to ground! (This had to be solved with a diode per a post on PJRC.) The WS2812b’s actually take about a milliamp each even when unlit,

So the question: Is there a general, “clean” way to disconnect VCC and GND from parts of a project during system sleep when there are data pins in the mix. What is the best practice?

Some ideas:

Force VCC to GND (not sure how? Hbridge?). (If I do that, what happens to the data pins that are high?)
Place a tri-state buffer between all data pins and these devices, and during sleep put the tri-state buffer in a high impedance state, disconnect VCC or GND only with P or N mosfet
Disconnect GND only with N mosfet, and place diodes on all data pins
Is there some kind of power latch that disconnects both VCC and GND and puts them into a “high impedance” state (like a tri-state buffer for power?) That way current has no way to flow "out" from the data lines.

Can someone enlighten me to the cleanest, most repeatable way of handling this sort of “load disconnect” problem? (Needless to say, I have spent hours googling this problem with little luck, although I did find this tech note on load switching but it doesn't address back-feed and parasitic power)


texts:
At a previous employer, we had an issue where some of our power supplies would brown-out when turned off, and this destroyed some hardware. By 'brown-out' I mean they acted like there was a capacitor connected directly across the output terminals (probably because there was), and the output voltage would drop gradually  from the set-point to zero over the course of a few seconds. Under certain conditions, this relatively slow drop in voltage could result in unexpected conduction paths that permanently broke things.

It seems to me that an ideal power supply should open the circuit when output is disabled, e.g. via relay-like action. Thus, it would be like pulling a plug from the wall. Is that desired behavior, or am I missing something?

If that is desired behavior, how can I achieve that without resorting to a solid state relay? I can't imagine the contact bounce on a mechanical relay would be good. If I connected a thyristor in series with the load, would that eliminate the bounce when the relay is opened? When enabling output, I'm thinking close the relay, then trigger the thyristor. When disabling output, I'm thinking the thyristor will choke the current as soon as it first drops, and then it will stay closed during subsequent bouncing of the relay.

If I recall correctly, the issue was with peripheral hardware remaining at least partially functional after the main hardware shut down. The main hardware involved an FPGA, and the peripheral continued to apply a voltage to one of the FPGA's I/O pins. And it so happens that when an FPGA is unpowered, applying a voltage to an I/O pin can fry the chip by creating a short between the power rail for the pin's I/O bank and ground. So the FPGA becomes a solid state heater.


texts: How do you convert a number to its 4-bit binary equivalent using logic gates?

texts:
Circuit storing number as binary
]2

My aim is to store numbers from 0-15(4 bits) as binary. The numbers are inputted using a keypad with buttons labelled N0-N9.
The circuit works for single digit numbers(0-9). But I don't know how to make it work for numbers 10-15.
I also want to use two 7-segment displays to display the numbers inputted from the keypad. Initially, the display shows "00". If a single-digit number like 4 has to be inputted, the display reads "04". If a two-digit number like 13 has to be inputted, the display first reads "01" when 1 is pressed and then "13" when 3 is pressed. If a number greater than 15 is inputted(overflow), "NA" or something should be displayed.


texts: A question from Sedra/Smith Microelectronics

texts:
regarding question 1.12 from Sedra and Smith MicroElectronics book (2009 international edition):
A transducer characterized by a voltage of 1V rms and a resistance of \$1M\Omega\$ is available to drive a \$10 \Omega\$ load. If connected directly, what voltage and power levels result at the load? if unity-gain (i.e \$A_{v_o} =1\$) buffer amplifier with \$1M\Omega\$ input resistance and \$ 10\Omega\$ output resistance is interposed between source and load, what do the output voltage and power levels become? For the new arrangement, find the voltage gain from source to load, and the power gain (both expressed in decibles).

I do get the first two answers, but I don't get the other answers.

So wev'e got: \$ V_L = 10\mu V_{rms} , \ P_L= 10^{-11} W \$

I know that we have: \$v_o = v_i \frac{R_L}{R_L + R_o}= v_i \frac{10}{10+10} =0.5 \cdot v_i\$

Now if I am not mistaken, \$v_i\$ is the voltage of the transducer which is \$\frac{1}{\sqrt 2} \$, so unless I am mistaken here I should get \$ 0.5\cdot \frac{1}{\sqrt 2}\$, which is not \$ 0.25V \$, where did I go wrong here?

For the power I get:

\$P_o = v_o ^2/R_o + v_i ^2 / R_o = (1/8+1/2)/10 = 6.25\cdot 10^{-2} W\$ and again not as in the texbook which is \$6.25\cdot 10^{-3} W \$.

Again can someone please inform me what did I do wrong? perhaps I misused the formulas.

Thanks in advance.


texts: How to use an audio output to generate IR frequencies

texts:
I have an idea for a project but need some help on achieving what I want to do.  I want to create a device which will insert into the audio jack of my iPhone which will emit IR signals to control my TV.  Most IR devices use signals in the 35-45K range and the audio out has a max frequency of around 20K.  So, since I cant directly tell the IR LED what frequency to emit, I'm thinking this device will need to have a microcontroller in the middle.

So what I'm thinking of doing is, having my iPhone app send a signal via the headphone jack to the device, have the device interpret it and then generate the appropriate IR signal to control the TV.

Any suggestions on how I might achieve this at a high level?
Any suggestions for kits which might allow me to easily prototype this kind of thing?
Any alternatives to my suggested solution which might work better?


texts:
Trying to develop a dark sensor. Have successfully made it but with a major problem. As you can see the circuit here:

When the LDR is covered the LED lights up using the relay NO terminal. However the problem is that with slight disturbance of light falling on the LDR the relay triggers on and off very quickly and that makes the LED blink rapidly.

I want to slow down the switching speed. ie, the relay coil only turns off if the LDR is illuminated for atleast a second or so.

Note that I need a high current to run the LED in high brightness. I need around 450-500mA current through it. That is the reason I have used a relay.


texts: MAX7219 led matrix prints unwanted artifacts when it is powered up

texts:
I’ve got Led matrix 32x8 which is driven by MAX7219. Like this:

MAX7219 Dot Matrix Module Microcontroller 4 In One Display with 5P Line

When I power it up, I can see different glitches.
How to power it up softly, without these glitches?


texts: What's the maximum safe discharge current of my sealed lead acid battery?

texts:
So I had a sealed lead acid battery which have a characteristics of 4Ah and 6v and 20h.

First if all when I searched about discharge rate of this kind of battery I found this "The sealed lead-acid battery is rated at a 5-hour (0.2) and 20-hour (0.05C) discharge".

I incidentally had a lipo battery of 7.2v 1000mAh rated at 35C which after a bit of research , it turned out that this number is the maximum safe current it can deliver so 35 * 1000 which is 35000mA or 35A.

So is this the same for lead acid battery? So for my battery I get 0.05*4000 200mA only or I mixed two different meanings together ?


texts: Bidirectional half-duplex communication between PIC16 and an FPGA over a single copper track

texts:
I need to implement a bidirectional communication mechanism between a PIC16LF microcontroller and an FPGA. It shall be used to transmit only a few kilo bits of data at most per second. The PCB cannot be changed now and I only have one spare pin that I can extend the functionality of.
Is it possible to implement a mechanism whereby just one copper track is used for bidirectional half-duplex communication between the two? I believe that if I do this, I shall have to implement some type of bit banging on the side of the PIC. The PIC shall be in charge and can poll the FPGA to see if it has any data.
Is there a well known example of this mechanism can work so I don't have to design the whole thing from scratch? Unfortunately, I cannot use SPI that would have solved all the problems.


texts: I've noticed that most of the opto-isolators (optocouplers, opto-triacs) have a white package. Why is that?


texts:
Disclaimer: I am decent with math/theory, but I have zero hardware knowledge (apart from some basic microcontrollers).

I'm looking to build a (possibly crude, but functional) hardware prototype of a receiver with an antenna array. The application involves frequencies in the 2.4 GHz ISM band. I am experimenting with array processing algorithms and would like to be able to play around with the array geometry a bit. I would also like to do most of the processing in software. Given my background though, I have very little clue how to start. In particular, I've been trying to read data sheets for various types of components, but I can't figure out what the components expect as input and what they output.

Here's what I've figured out so far:

I'll need a couple of antennas, of course, close enough so that I don't get spatial aliasing. The antennas will need to be connected to an RF front end, which does the downconversion. At some point, I'll need an ADC for sampling, and then I'll need a 'bridge' into software.

Assuming what I just described at least makes a little sense, here are my questions:

How do I bridge the RF front end and the ADC?
How do I bridge the ADC and the software part?
Can I make things a bit simpler?, e.g. can I try oversampling the received antenna signals and then just doing everything in software from there?

Additionally, is there a decent resource for learning about practical RF circuitry and prototyping? I think that is perhaps where I am weakest and need the most help.

Thanks!


texts: What things to consider when designing a single layer board?

texts:
I currently have a 2 layer FR4 board that is basically a microcontroller with a motor attached to it. There are some discrete switches and connectors as well.

Most of the components are SMT components (0805 being the smallest). There are some through hole LEDs and connectors.

For a single layer (one side) board would I have to replace my SMT components to through hole ?

For a single layer (one side) board would a decent board house still be able to do 10 mil traces or are there new rules for single layer boards ? ( I understand that I should contact the board house directly to find out their capabilities)

Any other useful gotchas (or questions I have failed to ask) would be appreciated from your own experience when doing a conversio, design or increasing manufacturing yield.


texts: Difference Between Elmore Delay and OCTC Method

texts:
I have the following RC network I want to get a delay estimate for (drawn two different equivalent ways):

simulate this circuit – Schematic created using CircuitLab
Assume \$R_1=R_2=...=R_n = R \neq R_L\$ and \$C_{out}=C_1=C_2=...=C_n=C\$.
Using Elmore delay, one goes downstream starting from the source down to the output node, multiplying each resistor on the path with all capacitors downstream from that resistor, not just the ones on the target path. So for this circuit you get \$ R_L(nC) + R(C) = C(nR_L+R)\$. This is exactly equal to what I get if I actually solve the differential equation.
My understanding is that open circuit time constant analysis (OCTC) is essentially the same thing, that is it tries to approximate any given system as a first order system and then find its approximate time constant (the circuit here is first order anyway). In any case, following the steps in that link, I seem to get something different.
By considering each capacitor (opening all the others), it looks like each one produces \$(R_L+R)C\$, so the overall time constant would be \$n(R_L+R)C\$. This isn't what I got from actually solving the differential equation or doing Elmore, so I'm pretty sure this is wrong. Is there a step about accounting for the location of the output port that I'm missing or something?
Thank you!


texts: how to increase output power of multistage audio amplifer?

texts:
In the circuit given below, I'm working on an audio amplifer. It is driving a 4-Ohm load (speaker.)

Input : 1.1V peak-peak sine wave of frequency 1Khz. Input dc = 12v
Output : 4-Ohm load. Gain = (8 peak-peak) / ( 1.1 peak-peak) = 7.2

Circuit Description :

This circuit is meant to amplify audio input from a typical smartphone audio jack.

Input stage of amplifer is driven by 2N3904 low power NPN. At output stage I have used TIP147 and TIP142 to amplify the signal. Input potentiometer is used to control biasing current of driving transistor at 34% of its value(1k potentiometer), it gives me optimal results, after that it starts to clip.

100uF(C4) bootstrap is also used to feed-back at R9-R2 junction increase the voltage gain. Rest are just biasing resistors and filtering caps.

Yellow = Output & Blue = Input

Question:

Q) What can I do to increase the gain of this circuit and consequently increase the output power (I don't want to increase supply voltage?)

Keeping this circuit in mind, also suggest me some better design options too.

Give me a heads up if other circuit specific information is needed to entertain my query.

Please bear in mind that this circuit is for my learning experience only. I know there are other more efficient ways to do what I am doing, but they are a bit advanced for me at this stage.


texts:
We all know that birds don't get electrocuted while standing on a single power line, but if the bird touched the ground while holding the power line, it will die instantly.

One thing that riddles me is that I don't understand why the bird doesn't act as "ground" while touching the power line with voltage of 120v while the bird has a voltage of 0v. the potential between the two is 120v. why is it that only when the bird touches the ground that also have voltage of 0v the bird dies?


texts:
Good evening.
i confused to extract the transfer function of the following loop, (shown below)
where Cin is a switch cap operated by feedback Fout and Cx switch cap is operated by an external Fref = const. LPF is say first order filter and VCO with factor K. clock divider is N.
I would wonder to see transfer function any z or s domain with some short explanations.
Thanks in advance.


texts: Why do you have to use the nominal voltage of the transformer for the no-load or open-circuit test?

texts: I was wondering why exactly you have to use the nominal voltage of the transformer for the open-circuit or no-load test. Is this also the voltage over the parallel elements, even in a situation where the transormer is loaded? Or in other words, do the parallel elements produce as much losses in a loaded situation with a source applied and in a no-load situation when the nominal voltage is applied?


texts: How can I make a mod for VGA cable to display only grayscale or Black & White?

texts:
My computer connects to the monitor using a VGA cable. I want to turn the display grayscale or black & white.

I don't want to use any software solutions as I fear it will not be as effective as I want it to be.

So I researched the Internet for RFC of VGA pin and cable and I couldn't find such an RFC and pin layout configuration was not helpful.

Is there a way I can build a mod which I can attach to either the output of the computer or to the input of the monitor, which discards the color information and display either a grayscale image or black & white image? If possible I would also like the mod to throttle the refresh rate to either 24Hz or 30Hz.

It has to display a resolution of 1920 x 1080.


texts:
I wan to simulate earthing or frame ground which is separate from circuit GND in LTSpice. I want to simulate line filter using Y capacitors C2 and C3 in the below image.

See below image for clarity.

I can consider negative terminal of input source as Neutral, so will that be ground? If yes then what should I connect to common connection of C2 and C3 where GND is connected right now?

There is one option which is to put two different ground in the simulation, one for Neutral and another one for frame ground. Now, what will be the parasitic elements to be put between Neutral and frame ground to simulate frame ground as earthing?


texts: Follow-Up: LTSpice “Error:undefined symbol in:” problem

texts:
Thanks to those who have provided helpful answers on the original post. I've tried @Ernesto 's suggestions, but I must not be implementing them correctly as I'm still receiving similar errors. Please let me know what I'm missing.
Original Post
New Schematic and Test circuit:

The errors I received are:

Questionable use of curly braces in "v4 n004 0 {fnmod(v(pos))}"
....Error: undefined symbol in: "(if((v)>0,5,0))"
Questionable use of curly braces in "v5 n006 0 v={fnmod(v(mom))}"
....Error: undefined symbol in: "(if((v)>0,5,0))"
Questionable use of curly braces in "v6 n005 0 v={fnmod(v(mom))}"
....Error: undefined symbol in: "(if((v)>0,5,0))"
Error on line 22 : v:x1:4 x1:n004 0«:0» fnmod(v(n004)))
....Unknown parameter "fnmod"
Error on line 23 : v:x1:5 x1:n006 0«:0» v=(fnmod(v(x1:mom)))
....Unknown parameter "v"
Error on line 24 : v:x1:6 x1:n005 0«:0» v=(fnmod(v(x1:mom)))
....Unknown parameter "v"
x1:c1: Increased Cpar to 4.7e-011
x1:v6: Missing value, assumed 0V @ DC
x1:v5: Missing value, assumed 0V @ DC
x1:v4: Missing value, assumed 0V @ DC
Dots are mine
So, I'm sure I messed up on something.
I also tried to make a subcircuit from the netlist and tried a variety of changes but received similar errors for those as well.

Subcircuit:

C:\Users\rober\OneDrive\Documents\LTspiceXVII\Schematics\RM-Relay-SPDT.asc
.subckt RM-Relay-SPDT POS NEG COM1 N1 N2
.func fnMod(x) {if(x>0,5,0)}
V2 +V 0 15
V3 -V 0 -15
XU2 N006 N1 COM1 -V 0 +V ADG1201
XU1 N003 N002 +V 0 Mom level2 Avol=1Meg GBW=10Meg Slew=10Meg ilimit=25m rail=0 Vos=0 phimargin=45 en=0 enk=0 in=0 ink=0 Rin=500Meg
R1 Mom N003 100k tol=5 pwr=.125
R2 N002 N001 100k tol=5 pwr=.125
R3 N003 N004 10k tol=5 pwr=.125
V1 N001 0 3.3
R4 POS 0 100Meg tol=5 pwr=.125
XU3 N005 N2 COM1 -V 0 +V ADG1201
R5 NEG 0 100Meg tol=5 pwr=.125
V4 N004 0 { V=fnMod( V(POS) ) }
V5 N006 0 {if(V(Mom)>0,5,0)}
V6 N005 0 {if(V(Mom)>0,5,0)}
C1 N004 0 47µ V=100 Irms=240m Rser=0.363 Lser=5.76604n mfg="Würth Elektronik" pn="865080862008 WCAP-ASLI 12,5x14" type="Al electrolytic"
.inc c:\Users\rober\OneDrive\Documents\LTspiceXVII\lib\sub\ADG1201.sub
.lib ADG1201.sub
.lib UniversalOpamps.sub
.backanno
.ends RM-Relay-SPDT
.end

You can see in the .subckt that the definition for V4 isn't the same as V5 or V6 - This just shows me trying different things to see if they work... but they didn't. I'm really missing something.

Once again I am grateful for all the help I am receiving.
RobMcN


texts:
I am trying to model a 0.125GB RAM memory in Verilog using ModelSim of width 512 bit using memory chips of width 32 bit. So I have created a
   32 * \$\2^{18}\$ memory array whose code is as follows:

    //The 32x2**18 MEMORY CHIP
      module mini_sub_chip (word_out, word_in, word_addr, cs, we, clk);
        parameter WIDTH = 32,
                  DEPTH = 1 << 18,
                  SEL_BITS = 18;

    //output
      output reg [WIDTH-1:0] word_out;

    //inputs
      input [WIDTH-1:0] word_in;
      input [SEL_BITS-1:0] word_addr;
      input cs, we, clk;

    //regs
      reg [WIDTH-1:0] schip [0:DEPTH-1];

      always @ (posedge clk)
      begin
       if (cs)
        begin

         if (we)
          begin
          schip[word_addr] <= word_in;    // write into memory
          word_out <= word_in;
          end

        else
         begin
         word_out <= schip[word_addr];    //read from memory
        end
      end
    end
  endmodule

I then tried to increase the memory width to 512 by creating 16 instances of the above module in a different module as follows:

     always @ (posedge clk)
     begin
      if (reset)
       count <= 4'b0000;
      else
       count <= count + 1;
       word_output <= word_out[count] //word_output is the 32 bit output register
     end

     decode_4x16 dcd416 (sel, count);

     generate
     for (i = 0; i <= 15; i = i + 1)
     begin: loop
     assign chip_sel[i] = cs & sel[i];
     mini_sub_chip mschip (word_out[i], word_in, word_addr, chip_sel[i], we, clk); //Instantiating 16 modules in parallel
     //word_out is 32x16 array, with a different 32 bit array element driven every time 'mini_sub_chip' is instantiated
     end
     endgenerate

At every clock cycle, a 32-bit data is transferred from every instantiated module in a consequtive manner such that it takes 16 clock cycles to complete the 512-bit data transfer.

The first module is working correctly, but the second module is not. Data is being written to and read from memory correctly at every clock cycle, but the 'word_output' register is not getting updated as long as memory write is taking place. So it remains undefined for as long as 'we' is asserted. However, it is getting updated during memory reads. Please guide


texts: Amplifying high frequency AC using op-amp or alternative methods

texts:
Right now, for my project, I am trying to design a circuit for generating 10 kHz to 1 MHz AC signal with ~80 Vpp to 100 Vpp. Currently, I chose to the AD9850 chip for generating AC with Vpp being around 0.6 V. By using multi-stage OPAMP with large gain-bandwidth-product, I can successfully get high-frequency AC with Vpp being around 8 V.

Using similar methods, I am trying to keep adding stages using OPAMP for boosting the AC. However, the challenges are limited by the power rails of the most of OPAMP with large gain-bandwidth-product. For example, if I want to get 80 Vpp AC, meaning the gain is X10, then the gain-band-width-product I need is 10 MHz. The OPAMP of such requirement typically doesn't have high bandwidth, which doesn't seem very useful.

I am wondering if there any way for boosting the Vpp of such small AC signal to higher voltage over wide frequency band (up to 1 MHz)?

P.S. If there are ways for designing power amplification circuit, it will be awesome. However for my application, there is no need to deliver power, hence amplifying voltage will be more critical.


texts: Are there compliance problems with selling products with exposed PCBs?

texts:
If I were to go to mass production with a consumer product is there a good guide on making sure I was following the correct compliances so that stores would accept selling it?

For example can part of the PCB be exposed? If it was a wall-mounted clock for example would it need a cover on the back of it?