texts: Design Review: 3.3V Logic to 12V Logic (Uni-directional and Bi-directional)

texts:
I'm looking for feedback and improvements on my design below. Specific questions are at the end. I created this as an attempt to answer my own, previous question. From my feedback there, it seems like I needed to be more clear in my requirements.
These are screenshots from Eagle. If there's a better way to share, please let me know so I can correct it.
Entire board

The overall purpose of this board is to translate between 12V logic, and 3.3V logic. The top portion of the board represents the 12V side. The LEDs are placeholders to indicate whether the 12V signal is HIGH or LOW. In practice, these would be replaced with more 12V relays, requiring up to 3A. The switches are also placeholders, allowing one to manually turn the 12V signal on and off. They are only for test purposes, the "real" 12V signal would be coming as the output from other relays.
The bottom half is the 3.3V side. This will be connected to a BeagleBone Black (BBB). The board will connect to 2 output GPIO pins and 2 input GPIO pins of the BBB.
Overall, I want to translate the 3.3V I/O from the BBB to the 12V signals on the other side (to control more relays and read their signals). I have designed 3 modules to control both directions individually, and together.
3V3_TO_12V Module

This module converts the 3.3V GPIO output from the BBB to a 12V signal on the other side. When the 3.3V signal is low, the 12V signal is low. When the 3.3V signal is high, the 12V signal is high.
To do this, the 3.3V GPIO output is connect to a high side power switch, which turns a 12V SPST relay on and off. This switches the 12V power as output of the module to be used elsewhere.
12V_TO_3V3 Module

This module converts a 12V signal to 3.3V signal, to be read by a GPIO input from the BBB on the other side. When the 12V signal is low, the 3.3V signal is low. When the 12V signal is high, the 3.3V signal is high.
To do this, the 12V signal simply turns a 12V SPST relay on and off. This switches the 3.3V power to be read as input by the BBB.
DUAL_12V↔3V3 Module

This module combines the previous two modules to create a bidirectional translation. If the 12V side is high, the 3.3V input to the BBB GPIO should be high. If the 3.3V output from the BBB GPIO is high, then the 12V side should be high too. It's similar to a logical OR, if either side is high, the corresponding signal on the other side should be high too. A single 12V signal has to be split into individual input and output signals on the 3.3V side for the BBB.
Questions

Is the high side power switch and 12V SPST relay combination overkill for having the BBB GPIO output control the 12V power line? I like the isolation and safety it provides, but it seems too much (in terms of cost and board space)
Is there a better solution for the 12V to 3.3V conversion. I like the simplicity of the 12V SPST relay switching a 3.3V signal, but it takes up lots of room.
Does the DUAL_12V↔3V3 Module (which combines each translation direction) even make sense? This seems wasteful to use 2 relays and a high side driver, but I haven't found simpler solution that achieves the same result.
Should I add pulldown resistors for the BBB GPIO inputs, or are the internal pulldown resistors good enough?

Any other feedback is welcome. I'm new to electronic design.


texts: Sequential I2C read from MPU6050 with PIC16F18877 different from expected

texts:
To save time and reading I copied a code block from a program found on the internet to determine the X angle of inclination.

int Ay = (((int)I2C_Read(0)<<8) | (int)I2C_Read(0));
int Az = (((int)I2C_Read(0)<<8) | (int)I2C_Read(1));

During the executing I could not get the expected results.
Comparing the code with a similar code block in an Arduino sketch showed a good approach. The Arduino sketch worked well but the pic program behaved strange.
Finally I decided to hook up a logic analyzer and noticed the incoming byte before last had the NACK instead of the last one. I decided to change the code into:

AcY = (int)I2C_Read(0)<<8;
AcY +=(int)I2C_Read(0);
AcZ = (int)I2C_Read(0)<<8;
AcZ +=(int)I2C_Read(1);

Now the results are correct. This brings me to the conclusion that the executing order is different depending on the environment. It would be nice to know if my conclusion is correct and is it possible to change the behavior of the compiler (XC8).


texts:
I am trying to simulate a simple amplifier with LTspice using LM1875 which I have imported. Whenever I try to simulate, it ends up giving me an error message.

Circuit: * C:\Users\Ulv\Documents\LTspiceXVII\Simprosjekt.asc

ERROR: Node U1:14 is floating and connected to current source G:U1:U2:R11
ERROR: Node U1:16 is floating and connected to current source G:U1:U3:RES
ERROR: Node U1:U_TF:VP1 is floating and connected to current source G:U1:U_TF:P1
ERROR: Node U1:U_TF:VP2 is floating and connected to current source G:U1:U_TF:P2
ERROR: Node U1:U_TF:VP3 is floating and connected to current source G:U1:U_TF:P3
ERROR: Node U1:U_TF:VP4 is floating and connected to current source G:U1:U_TF:P4
ERROR: Node U1:U_TF:VZ1 is floating and connected to current source G:U1:U_TF:Z1
ERROR: Node U1:U_TF:VZ2 is floating and connected to current source G:U1:U_TF:Z2
ERROR: Node U1:U_TF:VZ3 is floating and connected to current source G:U1:U_TF:Z3
ERROR: Node U1:U_TF:VZ4 is floating and connected to current source G:U1:U_TF:Z4
ERROR: Node U1:18 is floating and connected to current source G:U1:U_TF:Z5

WARNING: Less than two connections to node OUTPUT.  This node is used by R§SPEAKER.
Direct Newton iteration failed to find .op point.  (Use ".option noopiter" to skip.)
Starting Gmin stepping
Gmin = 10
Gmin = 1.07374
vernier = 0.5
vernier = 0.25
vernier = 0.125
vernier = 0.0625
Gmin = 0.995033
vernier = 0.03125
vernier = 0.015625
vernier = 0.0078125
vernier = 0.00390625
vernier = 0.00195313
Gmin = 1.00079
vernier = 0.000976563
vernier = 0.000488281
Gmin = 0
Gmin stepping failed

Starting source stepping with srcstepmethod=0
Source Step = 3.0303%
vernier = 0.25
Source Step = 7.57576%
Source Step = 15.1515%
Source Step = 22.7273%
Source Step = 30.303%
Source Step = 37.8788%
vernier = 0.375
Source Step = 48.8636%
Source Step = 60.2273%
Source Step = 71.5909%
Source Step = 82.9545%
Source Step = 94.3182%
vernier = 0.5625
Source stepping succeeded in finding the operating point.

Date: Mon Apr 20 16:35:01 2020
Total elapsed time: 2.934 seconds.

tnom = 27
temp = 27
method = modified trap
totiter = 170928
traniter = 161335
tranpoints = 29394
accept = 21505
rejected = 7889
matrix size = 72
fillins = 114
solver = Normal
Thread vector: 7.8/5.0[2] 1.7/1.7[1] 2.7/2.6[1] 0.6/0.8[1]  2592/500
Matrix Compiler1: 8.38 KB object code size  1.8/0.8/[0.5]
Matrix Compiler2: 7.38 KB object code size  1.3/1.0/[0.3]

You can find circuit I'm working on here:
https://github.com/ulvehender/elektro/blob/master/Simprosjekt.rar


texts: Beginner Question: Get 2 Reference Voltages for Comparator using Voltage Regulators

texts:
I'm working on a project where I have a 12 V voltage supply. I need reference voltages of 4.5 V and 3 V which will be each be used as the Vref for a comparator. I am aware that I shouldn't use a divider to split these voltages. I wanted to use voltage regulators to do so, but I am not sure exactly how to get 2 reference voltages using regulators. I am very much a beginner, so simple explanations/guidance would be appreciated greatly!
Edit:
First attempt at regulation, resistors not selected correctly


texts: How do I size a zener diode for use as a freewheel diode for a ZVS induction heater?

texts:
My electronics experience is "hobbyist" and I'm in some new territory with this question, so forgive me if this question turns out to have an easy answer or prove to be dumb.

I have a basic ZVS induction heater circuit:

It runs on 12VDC and works fine for light duty work, similar to a wax carving tool heater. Each heating event lasts 5-10 seconds, max.

I activate it via a momentary switch controlling a MOSFET relay, which handles the high current. It is not included in the above schematic for simplicity.

After a heating event, there is an inductive voltage spike of up to 50V when the momentary switch is opened.

Due to the oscillation inherent in a ZVS circuit, I didn't think I could use a standard freewheel diode to bleed off this excess voltage. Instead, after some reading, I opted to use pair of 24V zener diodes, wired in reverse, as per this thread:

https://www.eng-tips.com/viewthread.cfm?qid=426309

These are diodes D5 and D6 in the above circuit, and they are in the return/recovery path. They work very well for this function and reduce the voltage spike to a MOSFET-friendly 20V.

Finally, my question:

How do I determine the correct wattage for these diodes for the power they must withstand in this function?

The heater draws 9A at full power (as measured on my Klein inductive current meter.)

I had initially spec'd 24V, 1W zeners for this function, but it seems that my math was way off, as they have been failing, and I suspect it is because they are being pounded with potentially 9A of current when the heater is operating normally.

How do I determine the correct wattage zener to use for this function?

Can someone point me to the correct specs and calculation, and which are specific zener specs I should seek out?


texts:
I am designing a GPS board with an SMT patch antenna (SGP.25cfrom Taoglas). I understand that the rf feed is 50Ohms impedance controlled track. But the datasheet shows 2 feeds - inner feed and outer feed. What are the 2 feeds. Does the inner feed mean that I can place the GPS on one layer and the antenna on the other layer and connect the RF track via the inner feed. In that case how is the impedance controlled through the via.

Thank you.


texts: Switching frequency and controller's crossover frequency in DC-DC converters

texts:
In the context of control loop stability of DC-DC Converters,

  A switch mode power supply is essentially a sampled-data system, therefore the theoretical maximum bandwidth is one half the switching frequency. Practically the phase and transport lag there make it impossible to close the loop there, so 1/5 to 1/10th the switching frequency is a good rule of thumb.

Could some one tell me what does the words in blockquote mean when it says , "there make it impossible to close the loop there" ? What does "close the loop" mean in electrical terms ?


texts: Do power MOSFETs have significant disadvantages over normal MOSFETs?

texts:
I have noticed that many power MOSFETs are cheaper, have a much greater \$I_{D}\$ and \$V_{DS}\$, and have comparable \$R_{DS(on)}\$ and \$V_{GS(th)}\$ values to normal MOSFETs amongst other advantages (shorter \$t_{d(on)}\$ times, etc.) without any apparent disadvantages. For example, the IPS105N03L G is cheaper and (apart from having a lower \$V_{DS}\$) appears to be better than the 2N7000 in every possible way.

IPS105N03L G

\$I_{D}\$ = 35A
\$V_{DS}\$ = 30V
\$V_{GS}\$ = \$\pm\$20V
\$R_{DS(on)}\$ = 15.5mΩ (max)
\$t_{d(on)}\$ = 3.7ns
\$t_{d(off)}\$ = 14ns
\$V_{GS(th)}\$ = 1 - 2.2V

2N7000

\$I_{D}\$ = 0.2A
\$V_{DS}\$ = 60V
\$V_{GS}\$ = \$\pm\$20V
\$R_{DS(on)}\$ = 5Ω (max)
\$t_{d(on)}\$ = 10ns
\$t_{d(off)}\$ = 10ns
\$V_{GS(th)}\$ = 0.8 - 3V

What am I missing here? Do power MOSFETs have any significant disadvantages as such, or are they suitable for general purpose use?


texts:
Newbie question. I have a Davis 7852 Rain collector that measures Rainfall using a Reed switch. The output comes via an RJ11 plug with following pinout

Black - Unused
Red - Switch terminal
Green & Yellow- Switch terminal

I am assuming that when Rain tips the collector, a circuit is completed and a voltage output will come on these wires. My plan as of now is

crimp the wire - tip the switch and measure wire voltages using a multimeter
There would be a high voltage wire and another would be low voltage
Now I have to measure the difference between high voltage and low voltage wires
The difference will tell if the switch has been flipped.

Does the plan look reasonable? How can I interface these wires to Arduino input pins? Any precautions in pushing the RJ11 wires to Arduino?

EDIT

Manual from Davis
http://www.davisnet.com/product_documents/weather/manuals/07395-275_IM_07852.pdf
Another link talks about modifying instrument to one wire protocol
http://tom-itx.dyndns.org:81/~webpage/pdf/1wire/raingauge%20conversion.pdf

EDIT-2 (in reponse to Michael)

Much Thanks. I am reading electronics text to work out this circuit :D

EDIT-3
Thanks. figured out the schematics :D


texts: Automotive 24v TVS suppression Question & feedback

texts:
Iv been contemplating which approach for voltage suppression for a 24V system.
the parts in consideration are
RBO40-40G//
TPSMD20A  || TPSMD251A//
PNS40010ER,115
Load Dump

for the one on the top reading the sheet kinda implies its more towards a 12v systems so iv ruled it out.
the second one, is my original attempt.  im unsure if it needs a resistor with the max pulse current of 84A since the expected values at the input are between 151-202V, or i could have 2 in parallel like the following 2 circuits.
the final one is one that i had seen mentioned on VISHAY documents else where they have a beefy tvs at the start to drop it down to say 80 volts and have the other trim it down further which id assume would work alot nicer at a higher cost and less space.
another alternative i thought might be to use a surge suppressor IC from Analog  LTC4366 which would be a little more dear than the other options ive presented.


texts: Why are SMD resistors marked with their value, but SMD capacitors are not?

texts:
Why are SMD resistors marked with their value, but SMD ceramic (and similar) capacitors are not? Most SMD resistors, even the very small 0402 and 0603 ones, have their values written on them. Most SMD ceramic caps are not, I haven't to date seen a single one. The only possible reason I can think of is that resistors are far more likely to fail than capacitors as they natively dissipate heat. Supporting this theory is the fact that tantalum and aluminium electrolytic capacitors generally have a value written on them, because they are less reliable than ceramics.

Out of curiosity.


texts: Do electronic devices consume more power when the ambient temperature is cold?

texts:
Just a casual observation: when it is winter, my personal devices such as cellphone and Ipad consume power more quickly compared when it is in the summer.

But this could simply because of change is usage habit: staying at home more leads to using your gadgets more often.

At the same time I have noticed that the back of my Ipad heats up a lot more during the winter, which could be caused by greater power usage.

Does anyone have any insights into how ambient temperature dictates power consumption in electronics (maybe even consumer electronics)?


texts: Is it ever a good idea to rely on wire resistance instead of a proper resistor?

texts:
I implemented a breadboard prototype based on the circuit below (image created by a LED circuit calculator here).

The LEDs are SFH4556P. Voltage for the breadboard is provided by a wall wart adapter (phone charger) and supplies 5V (1A max) via a USB cable salvaged from a PC mouse (has 5 wires, two for data, shield ground, plus and minus - of which only the latter two are used). I also added a 500mA fuse to the circuit, the resistor is rated for 2 Watts.

I hooked everything up and started my measurements and immediately hit an issue. The current draw of the circuit was below 30mA meaning my LEDs were way too dimm.

I replaced the resistor with a 1.5 Ohm one (same wattage rating) and current draw rose up to around 40mA, which is still too low.

I then I removed the resistor and voila - around 50mA.

I also found the culprit - the salvaged USB cable. It seems that due to thin wires used in it, each of the two used cables cause a resistance of around 5 Ohm so it causes the circuit to already contain 10 Ohms of resistance.

How bad of an idea would it be to just leave the circuit as it is (without a resistor)? Can I calculate if the wires in the cable are capable of sustaining the circuit without any resistor in it?

The circuit is part of a DIY TrackIR project and that is also its intended usage.


texts: Changing the i2c address of a different type of OLED display

texts:
I am working with 2 oled displays, both which uses the ssd1306 chip which has interchangeable addresses. Now, there's one chip that looks like this :

This chip has a clear indicator on what to connect to change the i2c address of the chip.
However i also received a chip that looks like this :

I've been tinkering with R3 and R4 and yet, to no avail, i haven't got the method to change the address of this chip. Does anyone recognize this type of breakout board and how to change the address of this board?


texts: Op amp integrator output has DC offset even when a coupling capacitor is used

texts:
Please help me understand why this op amp integrator output has a DC offset.  Why doesn't the coupling capacitor block it?

EDIT:  Running the simulation for longer time resulted in the expected output behavior


texts: How do I reset an AVR's SPI read shift register?

texts:
I'm using an AVR chip (i.e. Arduino Uno) to monitor SPI traffic on an external device and I'm running into a problem due to the fact that the external device periodically restarts itself (by design). This results in a momentary drop in voltage across the CLK pin which my AVR mistakes for an extra bit. Net result is that the SPI shift register goes out of sync to the incoming data stream by 1 bit every time the device restarts.

I can detect these restart events due to the start-up delay where no SPI traffic is being sent, is there any easy way to reset the shift register when this happens to cause SPI reads to restart at bit 0?


texts: I am designing a pure sine wave inverter and I am using IR2110 as a driver for the H-bridge. On Proteus however only IR2112 is available so i used it. I managed to get all the connections in a correct way with a good value for the bootstrap capacitor. However I am always getting a distorted signal with spikes on the output of the h-bridge(pic is below). I changed my spwm code and still the same. I am using pic16f877A with 32 values for the sine array.The generated spwm freq. is 16kHz. The clock frequency of the uC is 16MHZ. Any ideas why this could happen?


texts: human weight scale (60-180kg) with gram resolution

texts:
Is it possible to create a scale with a dynamic range of 5-6 figures? (measure the weight of a person in a gram resolution)?
If not why?
If yet, how?


texts: Calculating Battery Charge from Solar Panel

texts:
I am trying to create an arduino system with radio-transmitters and radio-receivers. The system runs from a rechargable battery that is charged with a solar panel. I am using a 1.1W 6V solar panel.

My problem is that I don't know how to make such a connection and I don't know what batteries to choose to power the arduino, assuming that I need it to run for 5-7 days without solar power and that the solar panel is good enough to recharge the batteries while they power the arduino. We are also assuming that the solar panel has 8 hours of sunlight.

To the arduino are connected the following sensors:

Flame Sensor
Light Resistor x2
Smoke Sensor
Radio Transmitter
Radio Receiver
DHT11 Temperature & Humidity Sensor

I am also looking to see if I can power down most sensors and power them on later if an event occurs. So probably all the sensors could be sleeping except the DHT11 and the Radio Receiver. Preferably though, if at all possible, the rest of the sensors should be on, if we can handle 5-7 days without the solar panel. I don't know if more information is needed but I'd be pleased to help out in the comments, or provide more information by editing the question. :)


texts:
I'm building a device that needs to run from Lithium batteries.

I am well aware they need to be charged/dis-charged properly to avoid damage and explosions.

To my knowledge a charging system has two components which are the managed charging and cut-off once charged and discharge protection when the batteries voltage drops.

I found a board that uses the common TP4056 controller to charge the lithium battery and cut-off once charged. It also has discharge protection at 2.5V.

Charging Unit

Lithium Batteries

I have two questions:

So this means I can hook up the above (or any) Lithium batteries to the charging board as well as my device and it would run well from the batteries until they got too low, at which the board would cut off the supply to the device leaving the device isolated from the batteries until charged again.
It says the discharge protection is at 2.5V isn't this well below the safe discharge voltage of a lithium cell. I thought you should never go below 3V?

I apologize if this question is rudimentary however I'd like to make sure when dealing with constant use of lithium batteries.


texts: How to take the sample out of a impulse function

texts:
I have a system which is built from taking the transfer function.

Lets call it "sys".

Now I found the impulse response for this system by taking,

impulse(sys)

I could do (y,x) = impulse(sys) to get the sample values out of this impulse waveform.

But these sample time are fixed, and I am looking for getting the samples out of this impulse waveform at specific sampling intervals, example: 1/100.

How can I do this ?


texts: Getting a USB PD 3.0 port to output a constant voltage

texts:
I am trying to use this AC-DC wall adaptor as a simple constant voltage source to power a compact adjustable DC-DC converter.

www.amazon.com/Charger-RAVPower-Adapter-Compatible-MacBook/dp/B07PLR7T1M

I want the high power density that these new GaN transistor converters have, but the only ones I've found have only a USB-like output rather than a simple constant voltage that I want to power my DC-DC converter. Is there a way to make this AC adaptor output just a constant 20V?

I have tried to research how the PD 3.0 system decides what voltage and current limit to supply, but I have not understood an explanation for what I want since it is not what the USB PD system was designed for. I am thinking the solution would involve connecting certain value resistors to certain pins in the connector to signal the adaptor to output a constant voltage. Can any USB experts help me?


texts: Controlling heater with PWM through MOSFET

texts:
I'm trying to control a heater coil (resistance ~0.9 Ohm) with PWM using a MOSFET. PWM modulator is based on LM393, MOSFET is IRFR3704 (20V, 60A).

If I place 1k resistor in place of heater everything runs fine and waveforms at testpoints CH1 and CH2 are nearly square. But when I place an actual heater in the scheme, oscillation occurs on the falling edge of pulse at the moment when voltage crosses Vth (channels are mixed here: yellow oscilloscope channel is connected to testpoint CH2 and cyan channel to CH1). Oscillation amplitude is somewhat larger than battery voltage and reaches 16V at its maximum.
I'm mostly a microcontroller specialist and my knowledge of this kind of circuits is poor. Is it an effect of the heater inductance or something else? How to oppose it?


texts:
I want to design this circuit using the Velilog HDL.
However, I can't make a feedback part well.

Here is my code about it!

`define TAP7 7'b1000001

`define TAPS `TAP7

module TEST_LFSR_2(Clock,Reset,Y);
    parameter Width=7; /*bit parameter*/

    input Clock,Reset;
    output [Width-1:0]Y;

    wire [Width-1:0]Taps;
    integer N;

    reg [1:0] semiFeedback;
    reg Bits0_Nminus1_Zero,Feedback;
    reg [Width-1:0]LFSR_Reg,Next_LFSR_Reg;

assign  Taps [Width-1:0]=`TAPS;

always@ (negedge Reset or posedge Clock)
    begin : LFSR_Register
        if(!Reset)
            LFSR_Reg=0;
        else
            LFSR_Reg = Next_LFSR_Reg;
    end

always@(LFSR_Reg)
    begin:LFSR_Feedback

        Bits0_Nminus1_Zero=~| LFSR_Reg[Width-2:0];

    for(N=Width-1;N>=1;N=N-1)
                Next_LFSR_Reg[N]=LFSR_Reg[N-1];

                if (Taps[N]==1)
                    Feedback=^LFSR_Reg[N];

                Next_LFSR_Reg[0]=Feedback^Bits0_Nminus1_Zero;
    end

    assign Y=LFSR_Reg;
endmodule

I want to make N-bit LFSR. So, After checking the TAPS's bit that has 1. Next, I want to Xor each bit that has 1. However, I don't know how to do.


texts: Is there a way to sweep duty cycle over time in LTspice

texts:
I can sweep the frequency in time by using modulate, but I couldn't find any example on creating a varying duty cycle or a duty cycle is swept from zero to 100% at a given frequency f in a time interval.

Is there a way/workaround to sweep duty cycle over time in LTspice?

Edit:

I have the following timer circuit which can do that.
But that wasn't I was looking for, since this type of solution slows down the simulation a lot. I was wondering is there a fast way to do that with a single special function or SPICE command.

Please left click on the below plot to enlarge and be able to see the duty cycle variation:


texts: Using Cat5 for DSL from NID - good idea to double up wires for signal integrity / strength?

texts:
I am doing some rewiring of our internal phone lines (almost entirely removal of unused lines).  The issues we have run into is the router will every now and then simply not connect from the house to our provider.

The wire from the NID to the router is an old, very thin 4 wire phone cable (GRBY wires).  I am going to replace it whether it is the culprit or not.  The outer sheath is getting brittle.

The plan is to use an outdoor UV gel filled Cat5e to go from the NID to inside the house, then Cat5e from a box there to the router (or maybe just gel filled all the way, it's a fairly wet basement).  This is an old house and the cable will run near and across many power cables.

Given the possible interference would it be worth it to double up cables from the NID to the router (i.e. use blue/blwh together for ring and orange/orwh together for tip)?

I'm not exactly clear how the twists work with data communication so maybe it would be better to use blue/orange and blwh/orwh instead?

Would this even help with possible interference or signal strength?


texts: Since current through capacitor (between the plates) is displacement current, what is the current flowing to the leads of a capacitor called?

texts:
Since there is no conduction current through the capacitor, what is the current that flows between the battery and the leads of the capacitor while the plates are charging (or discharging) to their respective polarities?  Is it still conduction current even though [conduction] current is not completing the circuit "through" the capacitor?  Or is it more like a transfer of charge between the battery and the capacitor plates making it more like drift current?  I realize that these are not free carriers, but I'm struggling to reconcile the fact that there is no "physical current" through the capacitor (although displacement current current acts as a "real" current inducing a magnetic field), and the fact the I tend to think of conduction current as requiring a closed loop (ie, conduction from battery + to battery - terminals).
Is a closed loop equivalently created (or simulated) as far as the battery is concerned by the collection of electrons from the positive plate on the positive terminal of the battery and the expulsion of electrons from the battery negative terminal to the  negative plate of the capacitor making it "look" to the battery as if electrons flowed all around the circuit?
I apologize if the question is not clear.  I understand displacement current between the plates of the capacitor (insulator between the plates, so no conduction).  I just want to better understand the physics of the current flowing between the battery terminals and the capacitor plates.


texts:
I want to communicate with a device that is using SMBus. I use PIC18F26K83. I am inexperienced but before that I implemented I2C communication. In I2C communication, what I do in order to write to slave was:

After making configurations of I2C module, initialize it.
Set address buffer and byte count register.
Write data to be sent.
Then enter master start bit. ( I enabled repeated start bit.)

That was it. However, now when I check SMBus read word protocol it is like the picture:

Now as it can be seen this one is slightly different that what I did in I2C. First difference is, they enter master start bit first. Which I was not doing. So my questions are:

Does enabling I2C module enters master start bit by itself?
Do I really need to send start bit before setting up the address and command code and send another start bit again? Or can I simply set address and command code and then send a start bit?

Here is the part of the code for SMBus reading: (I could not test it so it may not work.)

  void SMBus_Data(){

I2C2STAT1.B2=1;// CLRBF=1, EMPTIES TRANSMIT BUFFER,i.e. TXBE=1

         //BUS FREE?            I2C1
 while (!I2C2STAT0.B7)  { }  // BUS FREE BFRE=1

 // I2C2CON0.B5=1; //MASTER START BIT
I2C2CNT=0X01;   //BYTE COUNT REGISTER

            I2C2ADB1=0x16;    //Address for smart battery
            I2C2TXB =0x0D; //Relative SOC

           //******START**********
           I2C2CON0.B5=1; //MASTER START BIT
           //I2C2CON0.B6=1;//Repeteated start enabled    (?)
           I2C2ADB1= 0x17; // Addresss + 1 = Read.
            Data_10 = I2C2RXB; // Read from the buffer

 }


texts: Operating Point of CMOS Folded Cascode Differential Amplifier

texts:
Designing a pMOS folded cascode differential amplifier to be used as a comparator with input 'IN' and ground as the reference input.
Now, there are tons of different architectures that one could use, tons of things that one could improve just by looking at this circuit view. That's not what I'm after with this post, unless a modification of this circuit could help answer my question or an obvious mistake is found.
(The lowest node at the bottom is connected to ground, as symbolized with 'gnd')
About the circuit
45nm process node, actual sizing is displayed on the picture
Vdd = 1.2 V, Vss = gnd
The pMOS called 'CSS' at the top is a current source providing DC current 2 * I (two times I), just like the two cascoding nMOS at the bottom right 'NMO' and 'NM1' are. (same function, same DC current theoretically). The DC current 2 * I will split uniformly into the two branches through 'PM0' and 'PM1' becoming equal to I.
I'm looking for an explanation of what determines the potential (DC) at the output node in this specific circuit.
This potential is 819.977 mV in the represented simulation below. That is unfortunately too high to create a voltage across the pMOS 'PM0' and 'PM1' which would put them in saturation to amplify properly and it is also too high considering the output common mode desirable to operate a comparator should be closer to Vdd/2 = 600 mV, I think.
I have noticed that changing the DC current 2 * I by changing the biasing voltage of the current sources has an effect on this, my assumption being that higher current pulled through the nMOS pair will pull down the gate voltage of the pMOS current mirror. However, unnecessarily high current will be pulled by the nMOS pair to bring the voltage at the output node down to 600 mV. And bigger problem: This doesn't create a larger voltage across the pMOS input pair. What can pull the potentials at the drain and source of the input pair further away from each other, to bring the pMOS pair into saturation?
Input range: from negative 100 mV to positive 100 mV at the node 'IN'


texts: I am doing a project that consists of reading a sensor and outputting 0V to 5V based on the value of the sensor. In other words, if the sensors reads, for instance, a value of 2.5 then I will need to output 3.4V using Arduino. I know this is not possible with only Arduino itself, I am not an expert in electronics but I think there is a way to do this. I appreciate your help.


texts: How to find a Pin-to-Pin Replacement for TL-081, but with higher VCC?

texts:
After ordering and assembling one of those¹ "red" 0-30V/0-3A power supplies from eBay/AliExpress and taking a bit of a closer look at it, I'd like to replace the TL-081 op-amps. It's working fine with the specified 24VAC input, but two of the three op-amps are being powered at a total of almost 37V, definitely beyond their Absolute Maximum Rating of ±18V.

The only op-amp I've used before and know to be cheap and readily available and that handles higher VCCs (up to ±22V) is the NE5532, and that's a pin-incompatible 2-in-1.
How do I find another op-amp that is (a) still available, (b) affordable, (c) pin-to-pin-compatible, and (d) happy with, let's say, up to ±20V, so that it would work as a replacement for the above-shown circuit? Edit: as long as the other pins are a fit, I don't much care about the presence/absence of the null-offset pins (the ones which have RV1 connected to them).


texts: What will happen if two SD card readers are connected to the same SD card?

texts:
The title is somewhat misleading. Specifically, what I'm trying to do is to connect the SD card inside of my Nintendo 3DS to a USB C port which can be used for charging (so I don't need to keep another charger with me). I figured that because USB C has data anyways, it might reduce some of the wear on the SD card socket and door (it's just two puny plastic tabs keeping it in place!) by putting a reader inside of the DS connected to the data lines on the port.
The trouble is, I doubt it's safe to turn the DS on while it's plugged into a computer (filesystem locking and all that, even if I'm not doing any filesystem operations it will still be mounted by my computer).
My first instinct was to try and put the +5v power for the SD card reader on a NOT gate between the console's power and the port's power. (In other words, if the console is powered on, the reader isn't provided with the power from the USB C port)
Would this NOT gate idea work? I think it should, but I wanted some opinions!
Edit: after reading justme's comment, perhaps I should add an additional gate (or reed switch?) on pin 4 of the SD card as well to isolate the console's power from the reader?


texts: Implementing guard trace/ring in PCB design

texts:
I have read here and there some articles about pcb guard trace/ring. But none of them discussed how to correctly implent it. What I could find were some pictures and comparison that cant help me at the moment!

What I would like to know is how can I make the following circuit more current-leakage proof (In design case - I know that PCB material and SIR plays a big rule).

The circuit will supply up to 30V through resistors and each resistor is connected to capacitor. Each Capacitor is then connected to a switch matrix and finally single output from switch matrix is connected to a picoammeter to measure the leakage current of the capacitors.

I am wondering if I should care about leakage current in the circuit or not! If so, how can I improve it?

This is my test circuit:

I am thinking of connecting the capacitors just by wire into the circuit, that is one pin of capacitor soldered to by a wire in the little circuit I designed, and the other pin also with a wire soldered to BNC shield that goes to picoammeter and is in common with voltage source  (SMU)


texts: How to determine the end of transmission UART?

texts:
How does UARt determine the end of transmission of a series of bits?
The single stop bit could be apart of the transfer data?
How does UARt know the previous 1's were not the end of transmission?


texts:
I have a dilemma.

I need to read ADC values from PIC18F4520. My configuration, and code, is as follows:

#define OSC INTIO67
int adc_result = 0;

void main(void)
{
    OSSCON = 0x70; //Set it as 8Mhz.
    OSCTUNEbits.PLLEN = 1; //Enable PLL 4x multiplier, thus we have 32 Mhz internal clock.

    //Set PORTA direction ports as input
    TRISA = 0xFF;

    OpenADC( ADC_FOSC_32      &
         ADC_RIGHT_JUST   &
         ADC_4_TAD,
         ADC_CH0          &
         ADC_REF_VDD_VSS  &
         ADC_INT_OFF, ADC_5ANA);

    while (1) {
        SetChanADC(ADC_CH0);
        ConvertADC();
        while (BusyADC());
        adc_result = ReadADC();
    }
    CloseADC();
}

The issue is this:

When I run it in MPLAB v8.x, my reading is slightly off, and terminates my debugging.
I can't debug the PIC again since I get errors like "Cannot enter debug mode."

How do I fix those issues? Also, is my ADC configuration correct (seeing that ADC requires a clock to do ADC conversion) with my internal clock? Is this correct to set the clock signal to 32 MHz.

I am programming using PicKit2 (with the black button).


texts: How approach breadboard layout using KiCad?

texts:
Rather than just piece together my breadboard layouts node by node, I'd like to be able to lay them out on the computer and optimize things by clicking and dragging rather than reconnecting jumpers and components. Another benefit would be they would be documented for when I want to recreate the layout later, or perhaps use it as a module in a bigger circuit.

I've adopted KiCad as my PCB layout solution, and I was thinking I could just put together something like a solderable breadboard layout, one of those PCBs that has the same holes and connections as a breadboard. Then I might place components on that pattern that match the layout on the breadboard.

What would be a sensible approach to accomplishing this in KiCad?

The challenges I see so far are these:

I don't know how to place a pad/footprint without a part attached. So maybe I'd have to make up some sort of dummy component(s), or maybe there's a way I just don't know about yet.
I expect I'd need to build custom footprints for standard parts like through-hole resistors and the like, or at least make sure they fit on 0.100" centers. This would be some work but is definitely doable.
The pads on the components would need to replace the "empty breadboard" pads that they occupied. I suppose I could just delete the ones I needed to replace.
If there were dummy parts, which maybe were single holes so they could be deleted individually, I expect my schematic would have a whole family of those (~300 maybe?) that would be hanging around cluttering things up.

Is this something anyone has done before? Or perhaps an experienced KiCad-er can suggest how they might approach the problem?


texts: Triggering a MOSFET causes my ESP32 to reboot

texts:
I have an IRLZ44N MOSFET gate connected to a ESP32 Dev board IO pin.  When I drive the IO pin high, it will put the ESP32 into a reboot cycle, rebooting each time the MOSFET is triggered high.
This happens when I have a 47k pull down on the gate (or no pull down) and also when using any series resistor, 100-390 Ohms between the IO and the gate.
The drain is connected to a hacked 12V piezoelectric humidifier mister, which pulls about 200mA. Previously I was using an NPN transistor, at one point I noticed it was getting very hot (anomalously). Also when the gate is floating, sometimes it will allow current through the drain. Also sometimes the loads may be disconnected, could this damage the MOSFET potentially?


texts: Switching analog and digital inputs to uP

texts:
I have a microcontroller, which requires that no signals are connected to its input ports during startup. There is a control signal SYS_RESET, that should first rise, before any input is connected to the uP's expansion headers. As a result, I am looking for a way to use this SYS_RESET signal as an enable signal, to efficiently switch all the input signals. The choices I am considering are tri-state buffers, multiplexers, and electronic CMOS switches.

What I am looking for is a single IC, with many channels (the more the better, the BBB has around 40 GPIOs, and 7 AnalogIns) that are all controlled by a single enable signal. Also I need a through-hole package. Any suggestions?

I am using the beaglebone black wireless. What I am referring to in the question above, is found in this link at the "tips and pointers" section, "expansion headers pin usage" subsection, the points 1 through 5 (especially point 3).

  Do not apply any voltages to any I/O pins when the board is not powered on.
  Do not drive any external signals into the I/O pins until after the SYS_RESETn signal is HI (3.3V).
  Do not apply any voltages that are generated from external sources until SYS_RESETn signal is HI.
  If voltages are generated from the VDD_5V signal, those supplies must not become active until after the SYS_RESETn signal is HI.
  If you are applying signals from other boards into the expansion headers, make sure you power the board up after you power up the BeagleBone Black or make the connections after power is applied on both boards.

I am also posting the datasheet of the BBB


texts: Looking for an easy to use circuit design software similar for beginner

texts:
I'm teaching my son digital circuit design. I am looking for an easy to use design tool that can serve to sketch out the circuit and simulate it before we go and blow chips and money.  The ideal product would have the following features:

Schema editor
Simulator
Ability to roll schema into reusable a component or module
Support for primitive operations (AND, OR, NOT, NAND, ETC.)
Intuitive User Interface
No Java (No offense to java lovers)
Runs on Windows 7

I don't mind paying for a quality piece of software provided it is reasonably priced.


texts: Can I use a bench power supply as a substitute for a 9V DC adapter?

texts:
I want to test a guitar pedal but I don’t have a 9V adapter around - but I do have access to a DC power supply.

Is it possible* to alligator clip the +ve to the power terminal and ground to the chassis and power the pedal that way?
I’ve scoured the internet and I’ve nowhere else to turn! Thanks in advance.
EDIT: *possible and safe!


texts: NPN transistor high resistance across collector and emitter

texts:
I have a MMBT3904L SMT transistor (datasheet http://www.onsemi.com/pub_link/Collateral/MMBT3904LT1-D.PDF) and I am getting wierd behavior accross the emitter and collecter terminals. The base is held high at 3.3v measured with a multimeter but the resistance between the emitter and collector is about 1.4M ohms compared to the 1.6M ohms when the base is held low.

I am very confused as to why the circuit is not working as there should be enough current to saturate the transistor but the resistance only dropped slightly.

I have tested this on multiple transistors and they all exhibit this behavior.

I would appreciate if someone tells me what is wrong with my setup.


texts: Can someone tell me if this topology for a crude battery charger is sound? Block diagram included

texts:
I am making a portable phone charging battery for fun. I have a micro USB input that ties to a 5V - 4.2V buck converter to charge a li-ion battery. The IC is made to charge batteries so I think that part is fine. I then go from the battery to a 5V boost converter that connects to a USB receptacle so you can charge your phone. I use a dedicated charger port IC between the USB data lines to make it charge most devices (correct me if I'm wrong).

Basically I want an explanation on what happens if I have a wall outlet plugged in to charge the battery while I have a phone plugged into the output also charging. Is that okay? How does the battery create the 5V rail (from the 4.2 to 5V boost) if charge is being pumped into it? Wouldn't charge need to leave it to make +5VDC?!

Is there any precautions I need to make to ensure it can charge a device while also being charged?


texts: Charging three individual capacitors with one AC power source

texts:
I'm trying to charge three capacitors by using my country's net voltage of 230V (60Hz) AC. The net voltage is connected to a diode bridge, which thereby results in approximately 325V DC. Each capacitor can hold 2200uF with up to 450V. I wanted a charging time of approximately 60 seconds, so I should put it in series with a 5.6kOhm resistance. Each capacitor should be connected to a coil, such as seen in circuit one down below.

I've figured this firing circuit out myself, however, I'm still confused about the charging circuit for the projectile accelerator. See this image below:

In this image, we can see the firing circuit, the diode bridge part of the charging circuit and the 'transformer part' of the charging circuit. I'm still a little confused about the diode bridge part.

Will the current of the diode bridge be split over each of the capacitors and how about the amperage? Should I put the mentioned resistance in series of each capacitor, or just in series of the positive output of the diode bridge. Are the diodes before and after each capacitor really necessary? How come that when allowing the first capacitor to discharge over the first coil, the other capacitors will not discharge? As this should not happen, because the other two capacitors are necessary for the second and final coil.

And of course, last but not least: Is the way shown in circuit 2 the right and/or best way to do what I'm trying to achieve?

Thanks in advance and my apologies for the perhaps incorrect usage of specific physics terms, as I'm used to using those of my own language of origin. If anything is still unclear feel free to ask me for clarification


texts:
I am trying to control the speed of motor using ADC value received using ATMega16, the system works well with 12V. But when I go for 24V the motor runs continuously, even when ADC value is 0.

I have checked with oscilloscope, the PWM output suddenly goes HIGH and remains HIGH even when ADC input is 0.

I believe that the code is correct since the system works perfect in case of 12V.

#include<avr\io.h>
#include<avr\interrupt.h>
#define F_CPU 1000000UL
#include <util/delay.h>

int del;
int x,x1,z,z1;
int rpm = 0;

int main (void)
{
    DDRA = 0X00;
    DDRD = 0xFF;
    DDRC = 0xFF;
    DDRB = 0xFF;
    ADCSRA = 0x87;
    ADMUX = 0xC0;                   // Selecting ADC0

    while (1)
    {

        ADCSRA |= (1<<ADSC);
        while ((ADCSRA & (1<<ADIF)) == 0);
        {
            x = ADCL;
            PORTD = x;
            x1 = ADCH;
            PORTC = x1;
            del = ADCL;
            del |= ADCH << 8;
            del = (del-512)/50;

            if (del > 0)
            {
            PORTB = 0x08;
            _delay_ms(del);
            PORTB = 0x00;
            _delay_ms(10-del);
            }

            else
            {
            PORTB = 0x00;
            }
        }

MOSFET Datasheet: http://www.mouser.com/ds/2/205/ixys_98625-342386.pdf

Link to setup


texts:
I am trying to understand how load cell works and which one to choose for my project.
For example lets say I use this load cell.

List of properties in case the link won't work:

Weight Capacity Max 5 kg

Zero Balance ± 75 g

Cell Non-Linearity Max   2.5 g

Rated Output 1 mV/V

Rated Output Error Max   ± 150 μV/V

Supply Voltage Max   5 V DC

Let's say I give 5 V to it from an Arduino [I know it will be a lower voltage but I am trying to make it simple for my own understanding].

How can I know  what will be the output/kg? i.e what will be the voltage output for 100 gram, 1kg, 5kg?
What is the minimum difference I can notice? I mean how much I need to increase the weight in order to get a noitceable increase in voltage output?


texts:
I have developed a board with stm32f373VB and I'm trying to test the PCB with ULINK/2 and uVision V4.70.0. I got a SWD Communication Failure, and I can't program the uC.

And here is the layout:

Any ideas what could be wrong, or where to look for the problem?


texts: LTSpice capacitor ciruit behaviour doubt?

texts:
I have basic knowledge of electronics and i have been using LTSpice to clear my concepts lately. I also have breadboard, multimeter etc.
The first circuit i tested is a simple capacitor resistor circuit...

Below is the second circuit....

What confuses me is how in the first circuit the current through R1 resistor increases again.
Is this some sort of resonating circuit? Why does this phenomenon occur.. I am a novice to this field. Please explain.


texts: Super fast magnetic field by an electromagnet?

texts:
Was wondering about the possibility of creating a magnetic field in milliseconds or less? I know it's possible based on certain labs achieving 60-100 Tesla and more. But what about creating a 2 - 5 Tesla magnetic field in milliseconds? How much power will be required? How will the electromagnet be designed?

Typically what cooling is required? This is more of a "pulse-like" electromagnet that could be used multiple times without being damaged, like a magnetizer. Where the fields are creating somewhat instantly. What properties will this electromagnet have?


texts: How efficient are Thermomelectric generators

texts: How effective is a thermoelectric generator, as in how much electricity would it provide over a period of time vs other methods of energy? is it useful and practical at all? an idea of how you can reference this to me could be like how much electricity can it produce in a day for a city.


texts: What is the name of this PCB making software feature?

texts:
While researching about PCB making I found exactly the feature I need, but forgot the name. It is the one which allows you to make PCBs with all copper and just thin lines, sort of inverted board style. It allows for strong currents to flow and would be ideal for the LM338K based power supply I'm building. It's a 5A 1.2 to 25V power supply, and I'm using DipTrace for the design.

This is a image to give you guys an idea, this feature has a name and I'm struggling to remember it.


texts:
Mostly, whenever it is asked to find the DC gain of A system; in the solutions provided, they find the steady state error coefficient (corresponding to the Type of the system).
But I figured out that finding the DC gain this way is equivalent to simply finding the open loop DC gain, and not the closed loop DC gain for the system. So is it something understood , that whenever we are asked find the DC gain we must find the DC gain of open loop transfer function?

For example for this question:

Question: A ramp input applied to a unity feedback system results in 5% steady state error. The Type number and zero frequency gain of the system are?

The solution describes the zero frequency gain of the system equal to the Velocity Error Constant, which is equal to 1/0.05=20. Isn't this the DC gain of open loop instead of the complete 'SYSTEM'?

Where am I going wrong?


texts: Correct MOSFET choice for brushed DC motor

texts:
I'm looking for a few MOSFETs for a really small motor. This question is exactly what I am asking but I'm afraid this might be marked as a duplicate.

Basically, I have really small motors rated more or less 1A 3.7V. The answer provided in the question was to use a SSM3K123TU mosfet but I'm having a hard time looking for the specific piece. What I found instead while roaming around eBay were these:

IRF9540 IRF9540N Power MOSFET P-Channel 23A 100V
IRF3205 TO-220 IRF 3205 Power MOSFET 55V 110A
IRFZ44N IRFZ44 N-Channel 49A 55V Transistor MOSFET Component TO-220
IRF840N IRF840 N-channel 8A 500V MOSFET TO-220 IR Transistor
2N7000 MOSFET N-CHANNEL 60 Volts 0.2 Amps TO-92
IRF510NPBF IRF510N IRF510 Power MOSFET N-Channel 5.6A 100V

I'm guessing that these are extremely overkill for my purposes, but I might be wrong. I'm just looking to control a 1A 3.7V motor using PWM. I'm concerned that these might be too inefficient and there might be smaller ones available.

Are these okay to use with a small load or should I go look for smaller ones?

This might/might not help:

Power source: 3.8V to 5V

Max motor current: <1.5 A


texts:
Been a while since I have been on here but I do not know where else to turn for help! This is more of a hardware issue than anything so i do hope that I am in the correct forums to be asking, if anyone knows of somewhere else I should be looking for help please let me know!

Anyway, this circuit simply drives a 10W RGB COB LED, using an esp8266 as the micro which then controls 3 MOSFETS via PWM that drive each channel of the RGB LED.

LED: (This is not the same manufacture that i am using but specs are the same)
http://www.ledguhon.com/u_file/images/14_11_25/57d628dfd6.pdf

The input voltage is 12 - 15V AC as these are powered by low-voltage AC landscape transformers. The input is then ran through a full wave bridge rectifier followed by a 1000uF capacitor in order to produce DC voltage. This is then followed by a buck converter that drops that voltage down to 10V DC in order to drive the LED. 3 Constant current drivers are then used for each channel of the RGB LED in order to produce 350mA for each channel.

Constant Current Drivers:
https://datasheet.octopart.com/AL5809-50P1-7-Diodes-Inc.-datasheet-76802127.pdf

The issue I am having is with the Red channel, in my last batch of 50 of these boards I have more than 10 that the red channel has stopped working on. They work at first and then over time some of them the red channel begins to flicker than just shuts down. Oddly enough if i press on the LED it self the red channel will turn back on but again fails as soon as i let go of pressure. ( I have checked all solder connections and everything seems to be just fine, ive even re-soldered some) I am not sure if this issue is due to a bad batch of LEDs or if i have an issue with my PCB design / circuit. Below are my schematics, the resistor R6 is 10 Ohm, 3W. The second buck converter is used to drop the 10V DC to 3.3V for the esp8266. Also A1 - A9 are the constant current drivers. A1-A6 AL5809-50P1-7 & A7-A9 AL5809-150P1-7 (PN's Located in data sheet link above).

These two PCBs then clip together to form the final assembly, The reason for the two separate boards is the heat generated by the LED needs to be far from the esp8266.

If you need more information or have any questions on the board in order to assess the problem please let me know! I could write an entire book on the function of this board but I am trying to keep it short and sweet.


texts:
I put this in the comments of my last question but I realised that might not get many eyeballs so I will ask it here.

I have have been thinking of making a battery using 18650's.
the battery arrangement would be 12 parallel 18650's making the 'block' and 13 'blocks' in series,  totalling 156 batteries.
Each Battery has it's own PCM and the 12 parallel 'blocks'are each attached to a 48V 30A BMS device.
I will have the batteries seperated (not touching) and a thermal sensor fan that activates when tempratures go beyond a certian point, the sensor will be near the middle.
This makes one battery.

I then take 24 of these batteries and parallel them together to make the final array.

I attach the final large battery array to a CHarge Controller that can charge them from my solar panels thus a PV charger and it is a 48V 45A controller
MorningStar TS-MPPT-45

The plan is to make a SAFE battery that can store around 30Kw of energy so the house can run purely on batteries for a few days.

I need advice on the design of this operation and when I wire the 24 batteries to a single + terminal and - terminal is it the correct way to do this?
Have I taken enough procautions?
Should I abandon the idea?
In total there will be 3744 18650 Batteries.


texts: Connecting PWM pulse out to another chip

texts:
I am working on a small hardware project where I am generating a PWM pulse of 5ms from an ARM chip pin that I provide as an input to a counter chip that counts these pulses. The input pin on the counter chip is pulled down with a resistor of 100k. Do I need to add any additional passive components to ensure robustness? I apologize if this is a basic question.

EDIT: The PWM out is from a general purpose I/O pin of this BLE module and I am connecting it to a hardware counter chip to check if it is alive or not and reset otherwise. They will share the same power source (small battery). A small pulse shouldn't affect the Vcc but I wanted to make sure it doesn't drain too much current as to affect Vcc. Do I need to ensure any pin is in high impedance state?


texts: Optimal Solution for function using Distributed Law

texts:
I was given the function:

\$ h = .' +  + .'. + . + '..'. \$

I was told to construct it in the most optimal way using only any size NOR gate by applying distributive law.

I proceeded as follows:
\$ h = (C+B'C)(C+D'F) + B'CD + BE + AB' \$

Which means I applied the distributive law on C and B'CD'F. Assuming \$x\$ to be \$C\$, \$y\$ to be \$B'C\$ and \$z\$ to be \$D'F\$ I got \$(x+yz = (x+y).(x+z))\$ and continued as follows for the remaining terms to come up with a final equation:
\$h = (AB' + BE + BD + B'C +C) . (C+D'F + BE +AB'+BD)\$

I then used de Morgan's law to come up with the NOR design. That is all I did. Can any other simplification be done?


texts: Circuit for Inverse Chebyshev or Elliptic LPF

texts:
I know I came across a 2 op-amp, 2 capacitor circuit that can be used for a single section of an Inverse Chebyshev (a.k.a. "Chebyshev Type II) or an Elliptic (Cauer) filter.  It has a pair of zeros on the \$j\omega\$-axis at \$\pm j\omega_z\$, and with resonant frequency \$\omega_0<\omega_z\$ and the transfer function is:

$$ H(s) = \frac{1 + \left(\tfrac{s}{\omega_z}\right)^2 }{1+\tfrac{1}{Q}\tfrac{s}{\omega_0}+\left(\tfrac{s}{\omega_0}\right)^2} $$

I know how to brute force derive a circuit with a pair of integrators and the canonical form we learned in Linear Circuits class 4 decades ago.  Such as this:

I just thought I saw a more elegant circuit, with one less op-amp and a couple fewer resistors, that pretty much guaranteed that the zeros lie on the \$j\omega\$-axis and at a higher frequency than the resonant frequency \$\omega_0\$.  Anybody know how to save a couple of parts with this?  Is there a single op-amp, two-capacitor, 4-resistor circuit that can do this?

A sorta Sallen-Key with zeros.


texts:
i need to use a GPIO pin to test whether an LED is on/off. the LED only has 2v power which is not enough for my digital input (3.3v) so i would like to use a transistor to amplify the voltage from 2v to 3.3v.

currently i have tried it with an NPN transistor and a 10k resistor on the base (no others). with this set up only 0.8 volts of the 3.3v collector voltage comes through at the emitter. the base voltage also drops from 2v to 1.6 somehow.. how would i set up the transistor as a voltage amplifier? or how else could i read these signals?

i am using a beaglebone black.


texts:
I'm trying to make a module using an ADC10158 for a Z80-based uC.
Problem is that it has a pin labeled as VREF OUT and, since i'm not very found in this ambit, i don't know it's function.

The datasheet says the following description:

  This is the internal band-gap voltage reference
  output. For proper operation of the voltage reference,
  this pin needs to be bypassed with a
  330 µF tantalum or electrolytic capacitor.

Now i'll just do what it says but i want to know what does it do.


texts: VHDL: How to convert Bit_Vector to Std_Logic_Vector?

texts: I want to move data from a "Bit_vector" to "Std_logic_Vector". For that, I want to convert Bit_Vector into Std_Logic_Vector. Please help me for the same.


texts: In several papers, books etc. I have encountered to expression of "average gain of the path is ... dB", now I wonder this is the average of dBs or dB of averages? The sources have not mentioned anything about their usage. Which one is used as a common definition?


texts: PIR sensor led strip with N channel mosftet

texts:
I have a PIR sensor (HC-SR501) and I want it to turn an led strip(12V 0.8A) on when the sensor detects motion and off when there's no motion.
I checked a previous thread which is similar in that thread they were going for a P channel mosfet and I can't get them in shops near my area.

My options are an N channel mosftet IRF540 and or a 2n2222 transistor. The transistor I presume can't handle a load this big so I'm going for the mosfet.

Will the mosfet work with the 3V trigger from the PIR sensor? Do I need to add resistor before the gate? Will this mosfet work at all or should I get another N channel mosfet?

Here is the diagram of my project.

Thanks in advance.


texts: CML/LVDS driver for several GHz, parasitic RC filter formed by terminating resistance and load capacitance

texts:
Update:
Based on useful comments of The Photon, Andy aka and PlasmaHH.

As I got, there is indeed the parasitic low-pass. There is no magic bullet that will mitigate it. Large receiver capacitance is to kill the high frequency signal.

So the question, what is the maximum allowable load capacitance for CML (/LVDS) for say 1G, 5G and 10G Hz signals? If based on experience or supported by links - better.

Summary
How to design a high speed CML driver given a low-pass filter formed by  parasitic load capacitance (several pF) and terminating resistor (50 Ohm)? The problem is that high frequency signals are attenuated by the low-pass.

Details
1. I am designing a high speed (several GHz) CML driver.
2. The transmission line (a microstrip or a coax) must be terminated (either at source or at receiver) with 50 Ohm (assuming single-ended termination).
3. A parasitic capacitance of several pico-Farads is expected (either at the receiver or at the source) (contact pad's parasitic capacitance to ground).
4. The driver drives high frequency AC current. Terminating resistor and load capacitance form an RC low-pass filter.

For my specs (50 Ohm, 5 pF) signals above around 1 GHz are attenuated substantially by the parasitic filter. What can be done?

They say (URL, table 2), that CML may drive signals up to 10 GHz while i am stuck with around 1 GHz given 3 pF load. Do they assume very low (say 500 fF) load capacitance for such high frequencies (10 GHz).

Below is a simplified schematic of the driver in LTSpice (can be downloaded here) that shows how the filter works. Green line correspond to output voltage signal for 1 GHz and red one (attenuated) for 3 GHz input signals.

PS:
I can mitigate the problem at one end of the line by decreasing Rterm. However, decreasing Rterm at both ends is not an option (improper termination). So, the only option I see is to decrease substantially parasitic capacitance where the transmission line is terminated.

Addendum
As Andy Aka kindly suggested I added 7.5 nH in series with the TL without noticeable improvement in amplitude or edges.

Below are test setup, simulation in Spectre with 7.5 nH and without it respectively.

Fig1: Setup

Fig.2: 7.5 nH

Fig.3: 0 nH (original setup)


texts: Does this (seemingly) corrosion create problems for the operating of the chip?

texts: We have a PCB of a VME machine of ours and it has some kind of white corrosion on it. Does this impact the functionality of the machine and what could it exactly be?


texts: How can I obtain 12 V DC, 3.3 V DC and 5 V DC from a single Li-ion cell?

texts:
I am working on a project in which I require three separate DC voltages from a single Li-ion battery (cell) of 2600 mAh capacity. I want my Project to be portable, and I only have the single battery to work with. How can I get voltages of 3.3 V, 5 V, and 12 V from my battery?

I measured the battery voltage and it is 4.2V but I understand that the battery voltage will range from about 3V when fully discharged to 4.2V when fully charged, so the power supply needs to accommodate this battery voltage range.

I am using an Arduino Pro Mini 5 V 16 MHz for my project.


texts: BJT: what are differences between \$r_{be}\$ and \$r_e\$; \$r_{in}\$ and \$r_{in(t)}\$?

texts:
On the topic of small signal analysis in my textbook Transistor Circuit Techniques: Discrete and Integrated; 3rd Edition, G.J Ritchie, I encounter the two pairs of terms: \$r_{be}\$ and \$r_e\$; \$r_{in}\$ and \$r_{in}(t)\$, but cannot find a definition that clearly distinguishes them. Can someone clarify the difference between the members of these two pairs and perhaps their prose names? In particular, I see \$r_{in}(t)\$ used in some AC equivalent models but not others. In what ways is it different from \$r_{in}\$?

Also in this textbook, it says to determine \$r_{out}\$ by short-circuiting the input voltage source (\$v_{in}\$ I assume) and applying a voltage across the output terminals. I don't understand what the former means.


texts: Current through resistor in opamp circuit

texts:
I have problems calculating the current through the resistors Re, Rr

Maybe someone can help me with this, I don't know how to handle the wire from + to -.

Here is Falstad code:

Circuit

Here is the circuit:


texts: Activating apartment building buzzer "Door" open button remotely

texts:
I often times have difficulty getting to the buzzer of our building quick enough for FedEx and UPS, etc... or when I get visitors, they are sometimes inpatient and keep buzzing even though I'm still trying to get to the buzzer to let them in.  I'd like to build a remote control to activate the "Door" (open door) button on my building's front lobby buzzer system.  I imagine the "Listen" and "Talk" buttons are a bit more difficult, since you need to build audio and a microphone into a remote device.

Below are a bunch of pictures of the outside and inside of my buzzer system.  This system is directly wired to the front door of our building.  How can I integrate this with a remote control, a smart phone, or other remote device, so that I can press this button 30 feet away from the actual button?

EDIT:

White mode button instructions taken from Amazon review:

  There is a small, white mode button on the relay circuit board. With
  some experimentation, I have found 4 modes so far: (1) Push the mode
  button on the relay board once and the remote button once and you get
  a mode with the relay "on" (or "off" at the normally closed terminal)
  ONLY DURING THE REMOTE BUTTON PUSH. (2) Push the mode button twice and
  the remote button once and you get a mode that is "armed". When you
  push the remote the relay turns on (or off) and cannot be reset with
  the remote (alarm?). (3) Push the mode button 3 times and the remote
  button once and you get the usual latched on/off operation. Each
  remote button push toggles the relay state. (4) Push the mode button 4
  times and the remote button once and you get an on (or off) state that
  lasts about 4 seconds and then goes off. (Use?) I couldn't find any
  more modes. If the relay board power is interrupted and turned back
  on, it reverts to mode(1).


texts: Why PBTI is recoverable, and NBTI is not recoverable?

texts:
Why we discuss more about NBTI in mosfet, not PBTI?
PBTI - postive bias temperature instability
NBTI - Negative Bias temperature instability


texts: Laptop Charger Failure during AC supply undervoltage

texts: My Laptop Charger is rated 240V AC Voltage. While plug in the outlet the undervoltage occurs (using multitester) the voltage is 107V. At that instant my charger is very hot, right now my charger is not working. What is the reason behind of Undervoltage to the Charger that cause overheating/damage?


texts: Is there any risk in storing solder paste and flux in living space?

texts: I have solder paste and flux that I regularly use. A lot of times I keep them in my drawer. The solder paste go dry and flux leaks out from the syringe. I have not thought about health risks associated with this practice. Should I store them in a sealed container?


texts: AT91SAM7S512 Oscillator, GPIO, & Reset questions

texts:
I just need some clarification of my circuit

Oscillator:
So for my circuit I want to be able to program it via USB, the datasheet gets a bit confusing to me tho. If I read the datasheet correctly I need an 18.432MHz clock with 10pF capacitors tied to ground for USB application, does this sound right?

GPIO:
Other than PA0, 1, 2 GPIO can only drive 8mA signals will this be enough to drive a gate on a ULN2003? I couldn't find a base current requirement. I'll be sinking a 3v relay on the other side of the gate.

Reset (kinda also GPIO):
If all GPIO is pulled high until initialization is complete could I leave pins PA0, 1, 2 floating and still drive the TST pin high on boot to perform the SAM-BA Recovery Process?


texts: Biasing a cascode in a BJT differential pair

texts:
How do I bias the cascode in a differential pair?
For some reason when I set it to a constant bias voltage it either does not work at all or the cascode BJTs turn on for only a fraction of the input cycle. At first I thought it is probably because the collector of the input differential pair is swinging with the input, but then I remembered that one of the advantages of a cascode is that it keeps the collector of the differential pair at a rather constant potential. Following this logic the cascode should turn if their base is around 0.7V higher than their emitter, but when I set Vbias to 0.7V higher than the quiescent emitter voltage it does not work either. How is it usually done? Also, don't pay attention to the 50mA value for the current source, it was just one of the parameters I varied while trying to understand why the cascode BJTs were not behaving as expected.


texts: P channel mosfet battery charging/power selection circuit help

texts:
I am a hobbyist and new to this, but I am not sure if my circuit it right.  The goal is:

To power the rest of the circuit from a DC source, a USB, or a battery, in that order.
When there is no DC or USB, then the battery should supply the circuit.
When there is DC or USB, also charge the battery (MAX1551/1555).
Avoid a large voltage drop from the battery of USB when those are powering the circuit.

So, my main question is if I am using MOSFETs correctly here:  My intention with Q1 is to only allow the battery to supply current when the DC or USB are off.  Since they will either be 0V or ~+5V, then when either are on, the V should be greater than Vgs and the switch will be open.  When those sources are off, Vgs is greater and the switch will be closed allowing the battery to power the circuit.  Is that correct?

Q2 is to allow the USB to power the circuit only if the DC power is off.  I was planning to set the output of the DC-DC voltage converter to be such that after the schottky diode it would be a little higher than the max USB level.

Is this diagram correct?

Thanks in advance!


texts: Does V_EN have to be equal to V_IN to be "high" on an step-up dc-dc converter? (MT3608 on/off control)

texts:
I have an MT3608 step-up converter[PDF], that I'm using to power a small fan (DC 12V 0.1A) with a DC 5V (4A max) power supply.
On my board V_EN and V_IN are soldered together ex factory, meaning it'll step-up if V_IN is connected.
Currently I'm using a RaspberryPi GPIO port (0V⭤3.3V with 50mA max.) over a 5V relay board (with optocoupler) to apply the 5V to the MT3608 to turn the fan on and off... but this may be overkill.
My question is: Can I unsolder the V_EN from the V_IN and connect it directly to the GPIO port? Or are 3.3V too little (or have to be equal to V_IN for "on")?
And also: If this is ok, is the  current maximum of 50mA not enough for that?


texts: Why ship power distribution systems have no neutral?

texts: What is the reason for this difference between the distribution systems of power companies and the systems implemented at ships?


texts: Can I use USBLC6-2SC6 to protect 3.3V bus and lines?

texts:
In a small board where space is important I need to place ESD protections near some 3.3V bus with I/O lines (4 pin: 3.3V, GND, digital input, digital output).
The most sensitive IC to protect is an xmega32A4.
I'm going to use a USBLC6-2SC6 due to its very small package. I'm concerned about clamping voltage: using standard bidirectional 3.3V TVS, the clamping voltage can be as low as 5.7V @ 10A (example SD03C) while USBLC6-SC6 offers only 17V @ 5A.
How can I decide if this is enough or not? Is there any information in the xmega datasheet that I can use?


texts:
So I've three relays connected in parallel. Each of them gets triggerd with 9v and I've a 5v source. Can I trigger all the relays with 5v by connecting  some kind of  additional electrical part, like capacitor or something? Btw they all should be triggered always be default (continuous flow should be present).

Also a 5v relay is not available where live, so I've to manage with the same relays.


texts:
I’m currently trying to create a programmable current sink. And I’m still trying to build up my circuit and searching for new parts. As I was searching for a OPA, I encountered much information about stability.

I was searching for a while and coulnd´t find anything about calculating the size of Riso, Cf, and Rfb.
Is there a way of saying what size these should have in my application or is it just like trying and figuring out?
In other similar circuits from TI I just found cuircits where they use Riso = 100 ohm, Cf=100 pF, and Rfb around 1k.


texts: Step up 3.3V to 5V to use as power of op-amp

texts:
In my previous question I was thinking about how can I "reuse" this circuit (0-10V, 0-20mA and digital contact input), when I only have 3.3V regulated power available from my LoRa Node:

After searching a lot, and without doing some deep changes to the circuitry showed in above picture, I was thinking to use a step-up boost converter using the MCP1640, in order to get 5V output to power the op-amp (LM224D) and leave the rest of the circuit untouched.
This is the recommended design circuit from the datasheet:

Do you think that this solution will work without any issue? Might it be a good compromise or will it be a total failure?
Edit:
Here you can see the circuit that reference the netflag VLIM:


texts: The flight controller for a quad needs constant 5V supply. But since I have a battery protection circuit, during the switch between the primary and the secondary battery the power supply goes low for a brief moment of time which causes the flight controller to reboot. Is there a buffer circuit that can be added between the power supply and the controller so that there is cut in the supply?


texts: Voltage regulator like LM 317 which can interface like SPI or I2C

texts: Is there any variable voltage regulator IC similar to LM317 available the output of which can be programmed through a digital interface like I2C or SPI?


texts:
Below schematic is how I'm going to control the output of LM2596:

simulate this circuit – Schematic created using CircuitLab

I want the output of the LM2596 to be 3-15V and it does exactly that, the problem is it's doing it inverted! When the applied voltage to the feedback pin is 0V output is 15V and when it's 12V the output is 3V.

I know that I can use an inverting opamp to simply invert the voltage before giving it to the feedback pin but then I'll need a 6V reference voltage and it's get complicated...

How can I configure the feedback pin so that 0V on feedback pin give me 3V at the output?


texts: What's the suitable wire size for 9VDC @25 Amps line?

texts:
I am trying to put together the requirements for a cable and I was wondering what would be the most suitable wire size to load the DUT with 25Amps @ 9VDC. I will have few other high current lines 13Amps @ 5VDC. There will also be 2 DC lines 160V @5Amps each.

I was wondering if all of this can be bundled (or what would be the key things to keep in mind) with some other wires carrying RF signals without causing any signal integrity issues.

I plan to use shielded Coax cables (at least 20) and bundle all of it along with some other signal lines (like DIO, SPI, CAN bus, etc) in one cable. The RF signals are not going to have a frequency higher than 15MHz but I will need to sample it quite fast to detect a time difference between 2 signals in 5 nanosecond range.

Would anyone suggest:

The right wire size for this application
Would there be any issue in regards to RF measurements?

The overall cable length is going to be about 15ft.


texts: Multiple I2C devices with the same address

texts:
I have multiple devices with the same address, and only one I2C bus. If I don't want to/can't use an address multiplexer, will the following arrangement work? (sorry for the messy schematic)

simulate this circuit – Schematic created using CircuitLab

SW1 and SW2 are microcontroller I/O, and are pulled low when we don't want to talk to the corresponding IC, and set to high impedance when we do want to talk to that IC. Can anyone see any problems with this, apart from with clock stretching? Assuming you choose diodes with a small voltage drop, like a schottky.

Edit:

Also assuming that the VIH and VIL all worked out with the diode drop and the VOH VOL.

The diodes could also go on the data lines instead, not sure if there would be any benefit/difference (maybe some I2C devices do something special when the clock goes low even if it's not their address? It's probably safer to not clock at all i.e. have the diodes on the clock lines.


texts: Total noise in an amplifier with multiple noise sources

texts:
I have some doubts about how to evaluate the total noise in a circuit. The noise evaluation theory is well explained on the web, there are not specific practical examples similar to that I need. I'll consider, for instance, the following common emitter amplifier:

The previous picture shows the ideal circuit. Now, suppose that:

All resistors are noisy (Thermal Noise): so they can be represented as ideal resistors with parallel current sources or series voltage sources. For instance, I'll consider the voltage source model.

There is a leakage noise current between collector and emitter, represented by a current source.

All the previous noise are known in terms of RMS

So, the overall real circuit will be:

My purpose is to evaluate the total noise at the amplifier output. In this circuit there are many noise sources. It's proved that in this situation, the overall noise may be evaluated by summing the square of all noise voltages or all noise currents, and then taking the square root. We'll get the total equivalent rms current or voltage noise:
$$i_{tot} = \sqrt{\sum_k(i_{k}^{2})}$$
or
$$v_{tot} = \sqrt{\sum_k(v_{k}^{2})}$$
But, I have these doubts:
I) In this case there is no simple connection (series or parallel) between noise sources. Is it correct in any situation (so also in this case) to apply the previous equation to find the total noise?
II) In this case there are both current and voltage sources. Of course, I may convert resistor series voltage models to parallel current ones. But suppose I keep the situation like that in figure: how can we apply the previous equation?
III) Once I've evaluated the total noise current (rms), how can I add it to my signal? I'd do this procedure:

Consider the ideal circuit, without noise sources.
Find the Norton or Thevenin equivalent circuit, in order to represent it like a signal voltage source or a current voltage source
Add to the signal ideal model, the noise contribution found before.

In this case, this is a voltage amplifier, so it can be represented by a voltage source with a series output resistance:

Now, after I have found the total voltage noise with the equation:
$$v_{tot} = \sqrt{\sum_k(v_{k}^{2})}$$
I may add this noise voltage source in series to my ideal equivalent circuit:

Is this analysis correct?
IV) If the previous analysis is correct, I'll have a signal voltage source and a noise voltage source. The last one is expressed by its rms value. How can I manage this situation? Should I treat it like a mean value constant in time?


texts:
Consider a RC circuit functioning as a high pass filter. The transfer function is given by:

\$T(j\omega)=\frac{K}{1-j(RC/\omega)}\$

For a frequency of 0, the transfer function is 0. Which means for DC input signals, the output response is 0.

However, by modelling the circuit with a differential equation and then solving it shows that the voltage across the resistor in a RC circuit is actually a decaying exponential.

Isn't this a contradiction? The transfer function shows that the output should be 0, but the differential equation shows that it's a decaying exponential?


texts:
I've recently finished some work with hspice, and now I don't have access to the server. I've installed ngspice on my Fedora 15 machine, but I'm unfamiliar with how it works. In hspice, I was able to produce an output file with measured values and a set of waveforms that were plotted out with cosmosscope easily.

However, I'm unsure of how to do this in ngspice. Here's some basic SPICE code:

Transient Response of a Linear Network

** Circuit Description **

* input signal source
Vi 1 0 SIN ( 0V 10V 60Hz )
* linear network
R1      1   2   1Ohm
C1      2   0   2.65mF
Rload   3   0   10Ohm
E1      3   0   2   0   10

** Analysis Request **
* compute transient response of circuit over three full
* periods (50 ms) of the 60 Hz sine-wave input with a 1 ms
* sampling interval
.TRAN 1ms 50ms 0ms 1ms

** Output Request **
* print the output and input time-varying waveforms
.PRINT TRAN V(3) V(1)
* plot the output and input time-varying waveforms
* set the range of the y-axis between -100 and +100 V
.PLOT TRAN V(3) V(1) (-100,+100)

.END

How to I get ngspice to output the values requested as well as plot the values requested AT ONCE?

UPDATE:
I've gotten more familiar with ngspice. It seems it was indeed able to output the data I wanted and it can plot data. However, I have to do this separately with different commands in the ngspice interpreter. I'm wondering how can I get ngspice to simply plot everything and output all the data in a single go. Here's a picture of how it works:


texts: Why is my Gated Latch not a Gated Latch?

texts:
After watching the excellent Carrie Anne's Crash Course Computer Science #6 (https://www.youtube.com/watch?v=fpnE6UAfbtU), I tried to design a Gated Latch in Logicly.

I played with it a little, and created a design that uses four gates, whereas Carrie Anne's uses six gates.

I tried it out in Logicly and it seems to work, although when the latch holds 1, and WRITE ENABLE is 0 - the output flickers.

So, can anyone please point out my mistake in the design? (and also explain if and how it relates to the flicker I see on Logicly).

Here is Carrie Ann's design, from the Youtube video mentioned above:

Here is mine:

Thank you!


texts: AC-to-DC Conversion: Which topology is better?

texts:
I am putting together a circuit board that is supposed to do its own power regulation. I need to convert 120VAC to ~5VDC. Due to the very limited real estate on the PCB, I would rather not use transformers. With some research, I was able to find two different circuits that can achieve this conversion without the need for a transformer.
The first circuit utilizes a primary-side regulator and has an offline buck topology. From the datasheet, the circuit looks like this:

Datasheet of the regulator
The second circuit does not have a regulator, but rather a full-bridge rectifier. The circuit looks like this:

Datasheet of the rectifier
The output I am aiming for should be around ~5 V (although the output of the converter will be run through an LDO regulator) and a current of at least 50 mA.
My question is, what would be the pros and cons of using either of them? I am guessing the latter could be less efficient, however has fewer components and no ICs, it will be cheaper and would require less area on a PCB. Would that make it a better option?


texts: Paralleling MOSFETs or MOSFET and IGBT to increase capacity in QRSMPS

texts:
Is there a relatively simple way to increase the load capacity of a integrated SMPS/MOSFET controller by adding a parallel device?

This is the device: Fairchild FSCQ1265RT

The method has been successfully used: MOSFET-Assisted Soft-Switching of IGBTs

However, a potential problem is that since the main device is integrated, there is no way to connect to the gate signal.  The logic to turn the assisting device on and off would have to come from some kind of sensing circuit, thus introducing possibly undesirable delays.

The required addition in switching current is about 3A, across a frequency range of 24kHz-~100kHz.. The least amount of additional components, besides the helper device, is desirable. Essentially, the capacity of the FSCQ1565RP device (which has been discontinued) is required.


texts: Deciding which compiler for PIC18F26K22 in MPLAB X, C18 or XC8?

texts:
I'm trying to program a microprocessor for the first time, and having lots and lots of doubts.

I have installed both the C18 and the XC8 compilers, plus a few others. When I create a new project and select my microprocessor, PIC18F26K22, I get to choose between these two compilers, in addition to the two mpasm assemblers. When they are both available to choose, does that mean that they both work?

How do I decide which one to use? I have tried googling but cant seem to find the answer; perhaps because I don't know what to google for and don't know how to read the results. Or perhaps it makes no real difference which one I pick?


texts: Determine resistor power rating using data sheet?

texts:
Info:
I am having trouble properly calculating the power rating for a resistor on a robotics design.
I have a circuit diagram which I need to use for my power calculations.
Can someone please clarify what is the correct method to calculate the power rating for the resistor? (diagram below)
My calculations are giving me an extremely high power rating which I really hope is wrong.
What I have tried:
The motor requires 3.17A but will draw more during start up, so the current drawn from the power source has to be at least:
3.17A + Iu + In = Itot.
(In  goes to the 10n and Iu goes to the 1000u).
PVDD = 48V.
The current charging the capacitor is
Vs/R so 48/3.3 = 14.545454...
So according to my calculations, the resistor needs to have a power rating of ((48/3.3) * 48) = 698W?
Can anyone please provide input on this? Something seems wrong about that answer to me.
Extra information:
Here's a link to the datasheet (the circuit in question can be found on page 20)
https://www.ti.com/lit/ds/symlink/drv8412.pdf?ts=1608116336564&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FDRV8412%253Futm_source%253Dgoogle%2526utm_medium%253Dcpc%2526utm_campaign%253Dasc-null-null-GPN_EN-cpc-pf-google-wwe%2526utm_content%253DDRV8412%2526ds_k%253DDRV8412%2526DCM%253Dyes%2526gclid%253DCjwKCAiA_eb-BRB2EiwAGBnXXjIwXdpz1L1nXdPJPRXSLugDHtAnJE25B3C8Q-H9L3S2S25mG7D48hoC3S0QAvD_BwE%2526gclsrc%253Daw.ds
Note: in the diagram (below) [PVDD] is the motor power source rated at 48V and the branch that goes off screen leads to the motor.
Edit:
I was hoping to use a small SMD resistor for this. I also believe 50W is a physically large resistor, at least for my application.
[CIRCUIT DIAGRAM BELOW]


texts: How to ground wi-fi antenna outer wire on circuit board connector?

texts:
I have a quick question regarding a Wi-Fi antenna modification I am doing to my drone controller. I want to replace the antenna which is soldered to the board in the controller. I want to replace it with a SMA connector, so that I may mount an external antenna instead.

My question is: how do I ground the outer wire on the circuit board? Is it okay to run a wire carrying the outer wire current to GND? Or do I have to use the antenne ground? Where would I find that?


texts:
I recently worked with a client who experienced a transient on their Ethernet cabling. As you can see, no actual PCs were damaged, only the Ethernet cards of some machines.  We don't know where the surge originated.

Can anyone explain how the damage could have occurred as shown?  I thought Ethernet had isolation transformers at each connector which would likely stop surges from propagating.

Damaged nodes are highlighted in red.  Note that main network stack in the center has AC mains surge protection.

Also note that the main network switch was completely destroyed - i.e. would not even power on.

As a follow-up, would Ethernet surge protection hardware be helpful for preventing this type of damage? If so, where in this diagram should it be installed? main stack or at each PC?

Thank you!


texts: Is this capacitor from a ceiling fan dangerous?

texts:
I'm taking apart a ceiling fan to get the motor. The only other components besides the motor is a switch and 2 capacitors. To get to the motor I have to cut the wires to the capacitor and I don't know how/if I should do that. So:

The fan has been disconnected for several days.
The capacitor has three wires attached, purple brown and grey.
The capacitor has the following diagram

"--Grey---4microF--| |-----"
And "--Purple-4.5microF-| |----"
Going into a node and
"----------brown" leaving the node

The only other marking on the capacitor says 250 WV.AC. I've never seem a W here before.

Any help?


texts: Measure resistance and capacitance with bias in low frequencies

texts:
I have a device which can be modeled with a resistor in parallel with a capacitor. Now I want to measure its resistance and capacitance as a function of voltage bias (from -2V to 2V) and frequency (from DC to 10kHz). Originally I was thinking of using a LCR meter such as hand held Agilent U1732C which can measure in 100Hz, 120Hz, 1kHz and 10kHz. But the problem is I am not sure how to apply a bias and measure with this equipment at the same time. On the other hand, I don't need very high precision. I think 5% precision should be okay. But more frequency points from DC to 10kHz will be helpful. So my question is:

How can I apply bias on the device and measure its C and R using Agilent U1732C? Can I do that?
If 1 doesn't work, can I do it with a not-so-complicated DIY kit rather than resorting to a high-end LCR meter?


texts: How to connect 3.5mm Stereo to crystal radio

texts:
I'm attempting to build a crystal radio according to the following schematic:

Rather than attaching a piezo electric earphone as shown, I would like to hook the radio up to a stereo amp using a 3.5 mm jack. Where should each wire be attached to on the headphone jack?

I'm not 100% confident that the picture of the headphone jack is the correct one, but it looks like the one I have.


texts: PC 12v rail shows ripple under load when checked through a multimeter

texts: Recently after having some issues in my gaming PC, i checked the 12v rail under load(benchmark). The 12v rail dropped to 11.6v that's within spec. But when i switched my DMM to AC it was giving me 100mV to 200mV while checking through the 8 pin connector that plugs into the gpu. I am wondering if this is the right way to check for ripple in PSU? And if so how bad are these readings? Also while the 12v rail drops to 11.6v, the 5v rail increases from 5.04v to 5.15v


texts: What is the difference between "Slow Blow" and "Time Delay" fuse?

texts:
I'm wondering if there is any difference between "Slow Blow" and "Time Delay" fuse or those are just different terms.

There are many answares for Slow Blow vs Fast Acting Fuse but are offtopic for this and unclear for this question.


texts: Did I solve the Thevenin equivalent circuit left of the terminals correctly?

texts:
I get $$v_{Th} = v_{ab} = v_{4Ω} = 0.8V$$

The solution is $$v_{Th} = v_{ab} = 1.2V$$

Isn't 1.2V the voltage drop over the 6Ω resistor?


texts: Single input controlled full H bridge for piezo buzzer

texts:
I would like to incorporate a buzzer in a PCB design. It would not be a coil buzzer, but more a piezo buzzer, and its operation is to be controlled with a micro-controller powered by the same voltage than the buzzer driver circuit, so with compatible logic levels.

Everything is powered up at 3V (linear regulator after a single cell li-ion battery), and I would like to maximize the audio power given by the buzzer. As far as I understood, there are 2 main ways to power a buzzer: either the direct way, which is with a MOS for the switching and a parallel resistor across the buzzer to reset it's state. There is also the full H-bridge way, which in an ideal world would double the peak-peak voltage across the buzzer, and thereby allows a gain of 6dB in the audible power transmitted.

I would like to go for the H-bridge method, and I also thought of taking the output of one of the half h-bridge to feed the control of the other one, hence having a single input control pin (which would be used by applying a square wave signal of the desired frequency) for the buzzer sounding. It results in the following schematic

simulate this circuit – Schematic created using CircuitLab

Hence some of my questions:

As far as I understood, piezo buzzer are mostly capacitive loads, so I don't think I need extra protection like free-wheel diode. Am I right ?
Would I need any kind of decoupling capacitor across the H-bridge ? The equivalent capacitance of a buzzer of the type i'm interested in is around 20nF, and the consumption current is said to be around 3mA
With this circuit, each time I don't apply varying input command signal , the piezo element is going to be forced in a given stressed position for a long amount of time. Could that damage it ?
Most of the diagrams I've seen are using BJTs instead of MOSFETs. Is there a particular reason in this application ?
I'm thinking about adding some logic or MOS driver at the input, to avoid in-between states which could fry the MOSFETs. Since it's going to be commanded by a Microcontroller with compatible logic levels, and I'm planning on using logic compatible MOSFETs, do you think it worth the extra complexity ? Is there a real risk of frying things up without this input logic or MOS drivers ?

By looking at the schematic, I told myself this was exactly 2 inverted logic gates, with the output of one commanding the input of another one, like on the following diagram (sorry for the screenshot, but I was unable to load a second circuit-lab diagram):

So I looked around for some logic gates, and noticed that most of them (like the 74LCV2G14) presented consequent voltage drop on the output with respect to the power rail. This would give me a peak-peak voltage across the buzzer of approximately 4V, which is not super high...

Isn't there any king of rail-to-rail logic like with op-amps ? I couldn't find one... I only found entries about op-amps.
Given the fact that the current is quite low, and internal resistance of mosfets (considering we're in the linear region) is quite low too, I think I could achieve better results with discrete MOS instead of Off-The-Shelf inverter gates. Is that true, or is there any trap I've to think about ?

Some references I've used (I've never used piezo buzzers before):

https://www.cuidevices.com/blog/buzzer-basics-technologies-tones-and-driving-circuits
Is this circuit for driving a piezo buzzer correct?
https://www.allaboutcircuits.com/industry-articles/an-overview-of-driver-circuits-for-piezo-transducer-buzzers/


texts: LED circuit and resistor recommendations

texts:
I have the below LED and a rechargeable battery with the specifications below. To make an emergency LED light myself, I guess I don't need a resistor connected in series since battery voltage (3.7V) is almost equal to operating voltage of LED (3.2 V to 3.6 V). Please confirm.

Also, I believe the LED will automatically draw the current it needs to lit since the battery capacity is 2600 mAh and the LED operates with a minimum current of 350 mA. Or do I need to add any component to limit the current drawn from the battery?

LED
Power: 1 W - 3 W
Model Name: CREE XPE-R3
Emitted Color: Cool White (6500k)
Brightness: 1 W: 122LM   3 W: 320LM
DC Forward Voltage (VF): 3.2 V-3.6 VDC
DC Forward Current (IF): 350 mA ~ 1000 mA
Maximum Pulse Voltage: 3.8 V
Maximum Pulse Current: 1200 mA

Ultrafire 18650 Battery
- Capacity: 3600 mAh (actual 2600 mAh)
- Voltage: 3.7 V


texts: I have the circuit below and I need to find the voltage between the terminals A and B, which steps do I need to follow? And if there are several methods to do so, what are they?


texts: How is the power factor part involved in wattmeter reading?

texts:
In a wattmeter, the current coil helps in measuring current and the potential coil is used for measuring voltage... but the real power that the wattmeter measures is \$V \times I \times \cos(\phi)\$.

How is the power factor involved in the measurement made by a wattmeter?


texts: Use attiny as an external watchout timer

texts: I like to failsafe an Atmega8 mcu despite having its own WDT. does it make sense that if I add an attiny to the circuit to check if each loop is taking a specific time, if not reset the Atmega chip?


texts:
It's body is blackened, just after 5 minutes of heating and it's body is also bent.

How can I solder when the iron itself works so poorly?

P.S: I am using it for the first time.


texts:
I'm controlling 4 Relays(10A) with a controller. While randomly switching it without zero-cross my controller gets restart. To avoid this I'm switching relays at the zero-cross point, But my question is every relay had the different operating time(on time) and different release time(off time) in the datasheet.
Should I add these times with zero-cross detect time or directly switch relay whenever zero-cross occurred.???
Little bit confused with these time durations, Can anyone explains how to use zero-crossing for relays switching exactly???


texts:
I am working on an Android ADK project. I am looking for a way to detect the locations of chess pieces on a board (8x8). I was looking at things like NFC but It looks too expensive. Is there a different technology that I should consider. I need something that world be able to read the full state of the board at any time. For example some of the pieces might get knocked over and once they are set back up I need the locations. To explain this further, in a touroment chess game if the pieces are moved to the wrong location and neither player notices the game will continue. So I need to record the game even if the position is impossible based on the game rules.

I just want to be pointed in a general direction of what technology to look at.


texts:
I'm repairing an old amplifier Sansui A-40 which I got from a friend. Here's a portion of the original schematic:

What does the red marked area do, and how does it work?  I'm not familiar with that circuit, and I won't dive in for a repair unless I understand the whole circuit.

From what I understand, the left portion of TR06 as an emitter-follower used as an input buffer for the preamp and amp stages. What does the right side of TR06 do?

(In this case the failing in the equipment isn't important, I want to learn the inner workings)

Just in case you need it, the double PNP transistor is a 2SA798.
(The full schematic is everywhere on the web, just look for sansui A40 schematic and there you have it.)


texts: How to avoid rookie mistakes while designing a PCB?

texts:
I am not sure if its correct place to ask, I am going to ask it anyway. Its more of "Quora" question but since I am not so active there, I thought I would ask it here. So please bare with me :)

I am new to PCB design, I was wondering as to what are most common mistakes that designer do (professional or otherwise) while designing a PCB . In hopes of avoiding them ;).

Thanks