texts: STM32: I2C Master does not generate START bit

texts:
I am programming Blue Pill stm32f103c8t6 mcu, and I am having troubles implementing I2C driver for it. I have tried one I2C example from one site, then tried to implement it on my own by datasheet, yet it does not work - it does not generate START.

I know this I2C and I2C device work, because I have tried using STM32Duino software and the device with address 72 replied, but I have troubles reimplementing it on my own. I use CMSIS, no HAL and the minimal code is as follows:

void i2c_init() {

  I2C_InitTypeDef i2c_initstruct;
  I2C_StructInit(&i2c_initstruct);

  // Initialize I2C
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C2, ENABLE);
  i2c_initstruct.I2C_ClockSpeed = 100e3;
  i2c_initstruct.I2C_Mode = I2C_Mode_I2C;
  i2c_initstruct.I2C_DutyCycle = I2C_DutyCycle_2;
  i2c_initstruct.I2C_OwnAddress1 = 0;
  i2c_initstruct.I2C_Ack = I2C_Ack_Disable;
  i2c_initstruct.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit;
  I2C_Init(I2C2, &i2c_initstruct);
  I2C_Cmd(I2C2, ENABLE);

  // Initialize GPIO as open drain alternate function
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
  GPIO_InitTypeDef GPIO_InitStruct;
  GPIO_InitStruct.GPIO_Pin = GPIO_Pin_10 | GPIO_Pin_11;
  GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF_OD;
  GPIO_InitStruct.GPIO_Speed = GPIO_Speed_2MHz;
  GPIO_Init(GPIOB, &GPIO_InitStruct);

}

void i2c_start2(uint8_t addr_with_mode) {
nlio_print("(0");

  // Wait until no longer busy
  while((I2C2->SR2 & I2C_SR2_BUSY) != 0);
  // Send start bit
  I2C2->CR1 |= I2C_CR1_START;

  // Wait until no longer busy
  while((I2C2->SR2 & I2C_SR2_BUSY) != 0);

  //while((I2C2->SR2 & I2C_SR2_MSL) == 0);

nlio_print("(1");
  // Wait until START bit is actually sent
  while((I2C2->SR1 & I2C_SR1_SB) == 0);

nlio_print("(2");
  // Write address
  I2C2->DR = addr_with_mode;

nlio_print("(3");
  // Wait for ACK (address match)
  while((I2C2->SR1 & I2C_SR1_ADDR) == 0);

nlio_print("(4");
  // Read SR1 followerd by SR2 to clear (I2C->SR1 & ADDR)
  (void) I2C2->SR2;
}

void i2c_send(uint8_t byte) {
  // Wait until Data register is empty
  while((I2C2->SR1 & I2C_SR1_TXE) == 0);

  // Send byte
  I2C2->DR = byte;
}

void i2c_end() {
  // Wait until Data register is empty
  while((I2C2->SR1 & I2C_SR1_TXE) == 0);

  // Wait until Byte transfer finished
  while((I2C2->SR1 & I2C_SR1_BTF) == 0);

  // Send stop
  I2C2->CR1 |= I2C_CR1_STOP;
}

#define WRITE 0

void i2c_test() {
  i2c_init();

  nlio_print("Hello\r\n");
  i2c_start2((72 << 1) | WRITE);
  nlio_println("Chp1");
  i2c_send(0);
  nlio_println("Chp2");
  i2c_end();
  // i2c_write(72, 0);

  nlio_println("Chp4");
  uint8_t rec;
  i2c_read(72, &rec);
  nlio_println("Chp5");

  // uart_println("Wait busy");
  // i2c_wait_busy();
  // uart_println("Wait done");

  // info();
  while(1);

  // uart_println("Sending STOP");
  // i2c_read(72);

  // uart_println("DONE\n");

  // while(1) {
  //   info();
  // }
}

int main() {
  // ...
  nlio_print("NLIO\r\n");
  i2c_test();
  while(1);
}

and it hangs when waiting for START condition, so the output is as follows:

NLIO
Hello
(0(1

I have no clue what I am doing wrong. Any help is appreciated.

EDIT: This problem happens also with pull-up 5k1 resistors each connected to SDA or SCL and 3.3V.

EDIT: I have printed the values of the I2C registers immediately after "(0" is printed:

 CR1 0001
 CR2 0024
OAR1 4000
OAR2 0000
  DR 0000
 SR1 0000
 SR2 0000
TRISE 0025

and immediately after printing "(1":

 CR1 0101
 CR2 0024
OAR1 4000
OAR2 0000
  DR 0000
 SR1 0000
 SR2 0002
TRISE 0025

and they remain that way until the program ends.

EDIT: I have compared the register values of I2C2 registers and GPIOB registers to the working example of STM32Duino, and there is no difference. I just don't understand why this code stops working.


texts: I have never really done much RF design before, and am looking into getting an SDR and messing around with it. I have been doing some research into how they work, and havr found that IQ modulation and demodulation is very important. One thing that I do not quite understand is where the IQ data comes from. How does the digital logic in the SDR capture both the real and imaginary components of the signals being fed into it?


texts: What is the connector on kinesis keyboard board called?

texts: The connector on board of kinesis advantage pro keyboard (for usb and rj cables).


texts: AC-DC Adapter - Output lower than rating and what's this 'cont' output for?

texts:
I have a Canon AC adapter, Model K30321, that I'd like to use in a project. I'm attempting to test the adapter for correct voltage output.

Adapter specs:

Input Voltage: 100 - 240VAC ~ 50/60Hz 60VA 0.65A
Output: 24V === 1A
Connector: 3 pin rectangle white flat 1 [ ■ ■ ■ ] 3
(from Left to right)
Pin1 = + 24v
Pin2 = Cont
Pin3 = GND

When I connect my multimeter to pin 1 and pin3, I see only about 8V DC.
I also see the same voltage between pin 2 and pin 3.

After some experimentation, I've learned that applying a constant 3.3V DC to the control pin causes the pin 1 voltage to rise and fall periodically between ~19V DC and ~21V DC. I can also hear a clicking sound coming from the adapter when doing this.

Questions:
I'm wondering if the control pin needs a PWM applied to it to function, or maybe it's expecting something else?

Thanks for all the advice!


texts: Please help in identifying this blue LED, around 470nm, 3030 SMD. Has this kind of "strong blue" phosphor coating. Very interesting piece and can't seem to find it. Any help appreciated.


texts: Can I run custom firmware on a pre-certified RF module without needing to redo full FCC certification?

texts:
I need BLE connectivity in a product, so to save costs on FCC certification, Bluetooth SIG membership, etc. it will use a pre-certified module for this purpose.

Usually such modules work in one or multiple of the following ways:

Controlled through an external interface (e.g. AT commands over UART)
Programmable using some proprietary scripting language (e.g. Bluegiga modules)
Fully user programmable

The first two approaches seem logical, the manufacturer of the module has very tight control over what can be done with the hardware (especially RF parameters, etc.).

The third approach is very appealing - most BLE chips already contain powerful microcontrollers, so it make sense to do all the processing on them. However I'm not sure whether one still gets the simplified FCC certification. I was under the impression that firmware is part of FCC testing too, especially since RF parameters (usually) can be changed significantly by software. However I wasn't able to find any warnings/clarifiactions about that in the datasheets/app notes/other docs. Could anyone clarify this a bit?

I'm mainly looking at nRF52 based and Cypress EZ-BLE modules.


texts: Why doesn't a normal npn transistor with common emitter configuration, in active mode, not behave as a DC amplifier?

texts: If a normal npn BJT transistor amplifies the base current (DC) to beta+1 times (the emitter current = (beta+1)*(the base current), why can't we call it a DC amplifier?


texts:
I backed the RFduino project on Kickstarter to use it in my next project. It is basically a tiny Arduino compatible board with built in Bluetooth LE that supports additional shields.

I've also got a regular Arduino Uno with an Ethernet Shield.

What I'd like to build

I'm thinking about a sensor network (humidity and temperature) for indoors using multiple RFduinos with the coin battery shield lying around the house. The Arduino Uno with the ethernet shield and a bluetooth shield connected to a router would send the data to my server, so I can monitor the stats remotely.

Question

I'd like to transmit data every 10 mins to keep energy consumption low. How can I wake up the sensors and my mainstation (the uno) at the same time, transmit data (from sensors to mainstation and from mainstation to my server) and put them back to sleep again? Is there any risk at losing data because one of the sensors might be awake when the mainstation is still sleeping? Can the Uno Bluetooth shield interfere with the Ethernet shield?

I'm not asking for code but does the idea make sense? Links to related projects would help a lot. I also thought about using xbee for data communication but i found it quite complicated and now that Bluetooth LE needs less energy I can't see any advantages of xbee over Bluetooth LE.


texts: Help converting PSPICE .lib with multiple subcircuits to LTSPICE

texts:
I'm trying to convert an unencrypted PSPICE buck converter model (http://www.ti.com/product/LM2678/toolssoftware) from TI. I translated the top subcircuit based on these steps: https://www.analog.com/en/technical-articles/ltspice-simple-steps-to-import-third-party-models.html

But when I ran the circuit I received this error:

Here's the top subcircuit:

.SUBCKT LM2678_AVG VIN RDIV VOUT GND OUT2 PARAMS: IND = 15u
* WB_CAP_POLARIZED Spice Model
*
X2 VIN RDIV VREF EAOUT GND LM2678AMP_0
V3 VREF GND DC=1.21
X1 EAOUT VIN VOUT GND OUT2 BUCKVM_0 PARAMS: IND1={IND}
.ENDS LM2678_AVG

Rest of the subcircuits:

.SUBCKT LM2678AMP_0 2    6    12   1    4
* NODES:              VIN  IN+  IN-  OUT  GND
* GM1 VALUES --> ADJ=0.673M, 3.3V - 0.48M, 5V - 0.673M, 12V - 1.54M
GM1 4 15 6 12 4.8E-4
GBGM2 4 17 VALUE= {V(12,15) * V(13)}
XA1 2 13 GM2GAIN
R3 12 16 10K
R4 15 16 2K
L1 16 12 20MH
R5 17 18 15K
C1 18 4 10NF
C2 17 18 105P
R17 17 4 300K
E1 1 4 17 4 0.415
.ENDS

.SUBCKT BUCKVM_0 DON IN OUT GND OUT2 PARAMS: IND1=15u
GBGA IN GND VALUE={I(VLM)*V(DON)/(V(DON)+V(DOFF)+1U)}
GBGB B GND VALUE={V(DOFF)*I(VLM)/(V(DON)+V(DOFF)+1U)}
D1 GND B DBREAK
VLM OUT1 OUT2
EBELM OUT1 GND VALUE={V(DON)*V(IN,OUT)+V(DOFF)*V(B,OUT)}
VCLP VC 0 9M
D2 VC DOFF DBREAK
D3 DOFF 6 DBREAK
R4 DOFF 7 10
EBDOFFM 6 GND VALUE={1-V(DON)-9M}
VDUMMY L1asVoltage 0 {IND1}
EBDOFF 7 GND VALUE={((2*I(VLM)*V(L1asVoltage)/((1/ 260000.0 )*(V(IN)-V(OUT))*V(DON)+1U))-V(DON))}
.MODEL DBREAK D (IS=1.0e-14 RS=0 N=0.01 TT=1N CJO=10P VJ=1 M=0.5 EG=1.11 XTI=3.0 KF=0 AF=1 FC=0.5 IBV=1m
+TNOM=27 IBV=0 ISR=0 NBV=1 NBVL=1 NR=2 TRS1=0 TRS2=0 TBV1=0 TBV2=0)
.ENDS

.SUBCKT CIN 1 2
* C = 9.4E-6 F
* ESR = 0.0010 Ohm
Ccap 1 3 9.4E-6
Resr 3 2 0.0010
.ENDS CIN

.SUBCKT COUT 2 4
R1 2 3 0.025
C1 3 1 1.1399999999999999E-4
R3 5 4 150; "free space" reduced by sqrt(dielectric constant)
R2 2 4 8771929.824561404
R4 3 26 3.125E9
R6 3 7 3125.0
C5 7 1 4.56E-5
R7 3 10 3125.0
C6 10 1 4.56E-5
R8 3 13 3125.0
C7 13 1 4.56E-5
C2 26 1 4.56E-5
R9 3 28 3.125E7
C3 28 1 4.56E-5
R10 3 29 312500.0
C4 29 1 4.56E-5
L8 1 5 0.2e-9
R24 1 5 0.07500000000000001
L12 5 4 10e-12
.ends COUT

.SUBCKT GM2GAIN 1 3
EPWL2  2 0 TABLE {V(1,0)} ((0,1.48M) (10 1.48M) (20 0.673M) (40 0.48M))
EPWL3 3 0 VALUE={LIMIT(V(2),0.48m,1.48m)}
.ENDS GM2GAIN

Do I need to convert all the subcircuits into symbols? I don't have much experience with SPICE but that method has worked for me for .lib files with a single subcircuit, what am I doing wrong here? Any help would be appreciated!


texts: Can ECG electrodes be used for EEG detection?

texts:
Im having financial limitation for purchasing EEG monitoring modules or electrodes. But so is not the case for ECG. I am doubtful whether I can use ECG electrodes for EEG since brainwaves are in the order of micro while ECG are much higher . On the hand I  have searched and found some sites claiming that this is possible.
Can someone give me a definite solution?
Also if I can use what precautions should I take?

I am planning to use these electrodes

Are these suitable for EEG?


texts: AREF Voltage same as VDD but through a reference IC

texts:
My project has 9V and 3.3V on the board. I would like to use a precision voltage reference IC for the analog reference on the MCU (MCU powered by 3.3V).

The precision of the voltage reference IC is 0.5%, which is more precise than the 3.3V regulated output voltage from the regulator powering the MCU. The datasheet for the MCU says the AREF High voltage should never exceed the VDD.

In an ideal world, the voltage of the reference IC and the voltage from the switching regulator would both be exactly 3.3V. However, I am nervous of the real world possibility that the reference IC, with its high precision, will be a higher voltage that the VDD. For example, the reference IC could output 3.29V and the regulated voltage could end up being 3.22V. Is this enough to cause a problem? Or is this small of a difference negligible?

My alternative option would be to use a reference voltage of 3.0V and guarantee the reference voltage will ALWAYS be below the regulated 3.3V, However, it is easier to voltage clamp 3.3 volts as a ceiling for the analog inputs since I already have a 3.3V plane on the board.

Or would it be possible to use a 3V reference and still clamp to the 3.3V plane? According to the datasheet, the analog input voltage cannot exceed the reference voltage :( but IDK why...

Shouldn't the ADC value just max out at anything above the reference voltage? Obviously going above the 3.3V could cause damage...

Any thoughts are appreciated!


texts: Would this be ok to control the speed of a PC fan?

texts:
I have a 240mm PC fan connected to a 12v adapter. The fan is quite noisy and i would like to have the option to turn the speed up/down or off completely.

The Fan is: Current (A): 0.18
The 12v Mains adapter is: Output 12v 1a

I've seen this LED Light Dimmer switch on amazon and other sites, Just wondering would it work in the same way as just giving the fan less volts and therefore slowing it down ?

However the dimmer is 8a output, Would it be safe?


texts: Where to put a spark gap for ESD protection--to an isolated "GND" or to protective earth?

texts:
I am designing some PCBs for a system that runs on a fully-isolated DC power supply. I have three power inputs:

Protective earth (connected directly to the line earth of a three-pin US 120V AC power outlet, and connected to the power supply only through EMI/RFI filter caps)
0VDC ("GND"), isolated from earth
+12VDC, isolated from earth

My device has a large number of input and output lines. I would like to use spark gaps to provide some low-cost additional ESD protection.

My question is where should the spark gaps go:

Between input/output pins and protective earth?
Between input/output pins and 0VDC ("GND")?
Between input/output pins and +12VDC?

My initial thought was to put them to 0VDC, which I am treating as ground for all of my digital logic, but I can't see any good reason to prefer that over +12VDC, since both are floating. Therefore, I thought, perhaps it makes sense to put the spark gaps between my pins and the protective earth.

What is the industry standard for protective circuitry when a protective earth is available? (Note that I am also putting class Y caps between the protective earth and 0VDC and between protective earth and +12VDC for EMI/RFI filtering.)


texts:
I have two questions. I have the following filter circuit:

  1) How can I find the transfer function?

(I think):

$$\text{H}=\frac{\text{Z}_2+\text{Z}_3}{\text{Z}_1+\text{Z}_2+\text{Z}_3}$$

  2) When I have two voltage probes (+ and -) what do I measure?

I think:

$$\text{V}_{\text{probe}}=\text{V}_{\text{Z}_2}+\text{V}_{\text{Z}_3}$$


texts: Is there a way to wire a digital display into a thermistor input to read the value of that thermistor?

texts:
I have a solar thermal system on my house and that system is run by a differential temperature controller having two thermistors. The controller does not have any kind of readout on it, thus I have no way of telling what the two temperatures are at any given moment.

My question is: is there any way to wire a digital display into the controller to read those temperatures? The two sensors are 10,000 ohm two-wire thermistors. The sensor inputs on the controller are 0-5VDC and the thermistors are of the NTC type. Are there any LED displays made that run on a 120volt power source and accept a 0-5VDC input that can be scaled as needed? Any assistance is greatly appreciated. Thank you.


texts: Can somebody tell me what display technology this is? There're digits made out individual pixels and then there're glyphs. It is installed behind white plastic.


texts: Best Electronics and Robotics Resources for a Novice

texts: I know guys hanging around here are quite experienced in electronics and robotics. But I am rather new to this area. I have only A/L physics knowledge in electronics. But I am working as a software engineer. Can anybody tell me the best resources that I can follow to become throughly acquainted with the subject. Thanks in advance.


texts:
I am using an LM317T, trying to use it to create a constant 5v output.  I've wired it from the diagram shown here.  I am using a pot trimmer to control R2.  As far as I can tell, it's wired properly (checked a few times).

What's happening is; if the input voltage is above 5v, it will limit the voltage to 5 volts.  But if the input voltage goes below 5v, so does the limit voltage.  It seems that it is creating a cap instead of a constant.  It's capping the voltage to 5v, but when I go below 5v, it mirrors whatever the voltage is.

Is there a common mistake that I might be making?  I've made this circuit before with success, but I think I was using an LM317 instead of the LM317T.  Would this make a difference?


texts: Why is my Altium gerber file merging component borders with a polygon pour?

texts: I have a pcb design which has two layers with two star ground polygon pours respectively, and all the components are throughhole. When I generate gerber files however, on both layers the border of the component connects to the trace and the polygon pour. I am confused. Why is altium considering the component borders to be part of the polygon pour?


texts:
Recently I bought a 12V 200Ah battery for my solar system with 500W 18v (27A) solar panels. I find a label on the battery which is notice that the minimum charging current is 10% of the battery capacity. 10% of 200Ah is 20A.

Max. current comes from my solar panels in cloudy days is less than 10A,

So dose it means that the charging process totally stop in cloudy days or just become slow?

I want to connect two batteries together in parallel (400 Ah), so the minimum current to charge them become 40A? (according to this battery label).

Datasheet of battery.


texts: Unclear block diagram of Hamamatsu's Hybrid Photo Detector

texts:
I am trying to understand what's happening in the block diagram of Hamatmatsu's Hybrid Photo Detector (HPD).

The datasheet is available here.

What exactly the two 2.5G Ohm of resistors doing there? It seems as the HV supplied will be directly fed to the photocathode. They look like potential divider but not really doing their voltage divider purpose here.
Why is the other end of the series resistors connected to the "casing" that enclosed the photocathode and avalanche diode (in solid line)? I can't see the purpose of that.
What are the resemblance of vertical dash line that the capacitor is connected to? The ground of the coaxial wire that connects to the High-Speed Amplifier?

Can anyone that has experience with Hamamatsu's HPD help me with these questions?
EDIT:
After reading the document suggested, I found a picture in the manual (Diagram a) and it seems like there's no "internal plates" or anything similar drawn in the diagram.
Also, I also found another possible use of the voltage divider as a focusing electrode (Diagram b). Will it be possible that they are just focusing electrode instead of connecting to "internal plates"?


texts:
I'm implementing the circuit in the schematic on the breadboard.

Difference of inputs V1 and V2 is about 5mV.
Differential opamp has gain of 17,4
Inverting opamp has gain of 26

First problem: I implemented the circuit without 1uF capacitor the I get these;
After the differential opamp, osilloscope shows the output voltage is about -90mV (5 * 17,4 = 87). But after passing the inverting opamp the output voltage is about 1500mV which should be 90*26 = 2230mV according to my gain calculations.
Second problem: Then I put 1uF capacitor between opamps, oscilloscope shows the output is about -70mV which should be close to before.

What should I do to get close to the theoretical calculation?


texts: Does this high-bandwidth transimpedance amplifier ring (Multisim)?

texts:
I designed a front-end for the S5972 high-speed photodiode. See the following schematic.

In Multisim an AC sweep analysis gives the following Bode plot:

1. Is the presented front-end stable? If not, what part of the Bode plot tells me about the stability? What value do I need to adjust to stabilize the design?

From my understanding, we need constructive interference at the inverting input of the op-amp as well as a gain larger than unity. In the phase diagram of the Bode plot, the blue curve describes the difference between the voltage at the inverting input of the op-amp and the output of the op-amp. When the blue curve hits -180 degrees at about 230 MHz the constructive interference condition is satisfied, however, the magnitude of the frequency response is below unity, therefore, there is no positive feedback that makes the circuit ring.

2. How much of my understanding is correct?

What I believe I am missing is that usually the stability is defined in terms of noise gain. The reasoning behind using the noise instead of the signal gain (am I using the terms correctly in this context?) is that both gains can be different. For example, the standard inverting amplifier has a signal gain of -Rf/Ri while it has a noise gain of 1+Rf/Ri, thus, although if Rf/Ri falls we still have a unity amplification of the noise and the noise can be caught in a positive feedback loop.

3. Is this correct? How would I simulate the noise gain with Multisim?

Update 1:

As requested a transient analysis of a pulsed current source. The pulsed current source is configured to start at 0 A. After a delay of 100 ns the current source jumps in 1 ns rise time to a value of 440 uA. The pulse width is 50 ns. Fall time is 1 ns. The period between pulses is 300 ns.


texts: application of current source and current sink concepts

texts:
The terms current source and sink, imply the direction of current flow.

For a source circuit, there is a "switch" connected between the positive terminal and load, where it sources the current through the load from a voltage supply.

For a sink circuit, there is a "switch" connected between the load and negative terminal, where the current sinks to ground through the load.

Is my understanding correct or not ?

What is the importance of understanding the source and sink concept in schematic design ?


texts:
This microcontroller failed in an electric fireplace. I'm trying to identify it, but the markings are ground off.

I've narrowed down the pins to something like the below chart, but I'm unable to locate any microcontrollers matching this description (VCC pin 5, VSS/GND pin 16, OSC/XTAL on 13/14).

1   GPIO o  GPIO    20
    GPIO    GPIO
    GPIO    GPIO
    GPIO    GPIO
    VCC     VSS
    GPIO    NC
    GPIO    XTAL1   14
    GPIO    XTAL2   13
    NC      GPIO
10  GPIO    GPIO    11

Bottom view (mirrored, upside down):


texts: How is Switching between standard electricity and solar/other electricity achieved?

texts:
I'm contemplating various ways of using renewable energy, but I'm also interested in learning more about the subject. At the moment I'm trying to understand a few aspects:

How to measure and track when traditional energy is used rather than renewable energy?
What mechanism controls the switching between the two, or how is load balancing achieved when renewable energy is only 10% of what you need.


texts: Safety/Quality issues by modding PC PSU to be floating.

texts:
Since I don't have enough money at the moment to purchase a good bench power supply, I want to 'mod' a PSU. In the first instance not by opening the PSU, but just by making an adapter that also puts a load on it's 5V rail.

But after taking a closer look (with a multimeter) I found an issue that could be a problem. In contrast to bench supplies (from my University) I'm familliar with a PSU is not floating. It's ground outputs are connected directly to ground.

This could be a very big problem if I mistakenly connect the ground hook of a probe to a higher potential point, thus creating a short which probably will evaporate the probe lead. I know myself, this will happen someday.

As for the  AC side I think without opening it should look like this:

simulate this circuit – Schematic created using CircuitLab

Where the Live, Neutral and Earth wire are labeled, My personal safety simply modeled as a resistor, and a failure that should trigger the RCD/Circuit-breaker as a switch.
RLOAD being of course an very basic simplification of the rest of the circuit.

Now for my question: Are there any issues that could occur by making the modification:

Lifting the Earth from the neutral line @RLOAD
Keeping the Earth connected to the metal chassis of the supply.

simulate this circuit

Are there also concerns with quality/stability. As in +5 or +12V rails being way out of spec when measured?

I've been thinking about this for some hours and I think there wouldn't be any major issues, but since I do not have a background or vast knowledge in power supply design I'd like to hear your take on this.


texts: Factors to be considered while replacing dead cells with a new 18650 Li-Ion cell in a Laptop

texts:
I am currently using a Lenovo Z50-70 laptop. My battery condition is very poor and it lasts for only 20mins. So I decided to replace the dead cells inside the laptop battery on my own.

My Laptop battery consists of 4 cells with a Capacity of 2200mAh(14.4V). What I am planning to do is to replace all the 4 cells with a new 18650 cell with a capacity of 2600mAh of each. So my whole capacity will be (2600mAh*4=10400mAh) and each cell rated with 3.7V.

My Question is whether this going to work or not? If yes, what are the factors to be considered while replacing my dead cell with a new one? My implementation crosses the manufactures capacity, so will this going to affect my laptop in any way?

The 18650 cell I am going to use:
Link

Laptop Battery :
Link


texts: how reliable are IMUs for a long usage (6 hours) rotation (only) tracking?

texts:
I know they are bad for positional tracking and drift from actual position over time but would like to know what is the situation with rotation only.

I know Oculus DK1 used ordinary off the shelf cheap IMUs for rotation tracking of the users head, as does any other VR headset such as GearVR where there is no positional tracking, but I havent had chance to use them more than few minutes to know how much they (their IMUs) drift from original orientation over time.


texts:
I'm looking for a way to supply 19V at 6.32A, with an input voltage of 11.5-15V.

I'm currently using a pure-sine 1000w inverter + OEM 120w power supply. It draws about 3.33 A at 11.96V (40w). The laptop self-reports to using approx 25w, giving an efficiency of ~60-70%.

I've looked at a previous previous answer, which suggested:

building one from scratch (I don't know how to do it)
buying an OEM "car" power supply (I haven't found any that support 120w, only 90w)
using a boost converter from eBay/Aliexpress

Non-OEM "car" power supplies exist which support 120w. Most seem to be cheap crap. I bought a branded one ("Lavolta") which had good reviews on Amazon, but first it refused to charge the battery until I turned off/on the computer. Then it fried my battery. Maybe it produced voltage spikes higher than 19V.

I already have a 6A DC-DC boost converter that I bought from AliExpress. But when adjusting the potentiometer, the voltage can jump quite a bit +/- 1v.

My conclusion is that the cheapest and simplest solution is to use the DC-DC boost converter, but add some over-voltage protection, perhaps with a crowbar circuit.

Is there a better way? Any suggestions for the components I should use in the crowbar circuit?


texts: instantaneous overcurrent relays for motor protection

texts:
Can someone please clarify something about below statement.
"For motors that are prone to locked rotor, instantaneous overcurrent relays, adjusted to pickup at 200 to 300% of rated motor current, are used. Their contacts are connected in series with the inverse time overcurrent relay contacts to automatically trip the motor breaker. High-reset instantaneous relays should be used to make sure they will reset when the current returns to normal after the inrush of starting current has subsided"
My understanding is that in addition to inverse time overcurrent relay there is also instantaneous overcurrent relay connected to it in series, and this relay will be energized if motor current reaches > 200% of rated design, thus tripping the breaker.
However, what is "high-reset"? How can motor keep running even after breaker is tripped? There shouldn't be any current if breaker trips.
Thank you for clarification.


texts: Calculating power measurement error from V and I error margins

texts:
I am using a Yokogawa WT310 for measuring DC power.  The manual (available here) says that both current and voltage have accuracy of +/-(0.1% of reading + 0.2% of range).

Assume this example setup:

  Input current: 700mA
  Current Range: 1A
  Input voltage: 10v
  Voltage Range: 15v

Based on that setup and the meter specifications, we can calculate the following:

  P = V * I = 7w
  Verror = +/-(0.001 * 10v + 0.002 * 15v) = +/- 0.04v
  Ierror = +/-(0.001 * 0.7A + 0.002 * 1A) = +/- 0.0027A

My goal is to calculate the power measurement's error margin. Here's what I've done:

  Perror = Verror * Ierror = 0.04v * 0.0027A = 0.000108w

Note that in this example, Perror is less than both Verror and Ierror.

Now imagine I'm using a less accurate meter and measuring much higher voltage and current ranges. Assume I get these results for error margins:

  Verror = 1.17v
  Ierror = 1.2A
  Perror = Verror * Ierror = 1.17v * 1.2A = 1.404w

Now, Perror is greater than both Verror and Ierror.

This makes sense mathematically; that's just how multiplying numbers less than 1 and greater than 1 works. But it makes me feel like I'm missing something conceptually. Shouldn't Perror scale consistently relative to Verror and Ierror? Am I just calculating Perror incorrectly?


texts: Electron transfer and thermal efficiency in series vs single battery?

texts: If you have 10 batteries in series all generating 5W, does every battery in the series have the same temperature as a single battery drawing 5W? I have trouble visualizing how the electrons travel from the middle batteries. Does the transfer make the series version run hotter?


texts:
I have a problem with this chaser circuit.

It should work like this:
When I switch on the power, no outputs should be activated.
When I press the reset button, the clock signal will be started and the outputs should be activated one by one.

If the last output is activated, the clock signal must be stopped and the outputs should keep their "ON" status.
No worries about switching the outputs OFF, I will switch off the power supply to manage that.

But what actually happens:

When powering up, the circuit instantly starts with activating the outputs; without using the RESET button.
And sometimes, the first one or two outputs, are NOT activated while the other outputs will switch ON.

I experimented with the values of R3, C20 and C21 they seem to do something with the startup conditions?

Maybe someone can put me on the right track?


texts: I've designed a simple WS2812B LED Controller utilizing the ATMega328p and an ESP8266 to connect to WiFi. The two are supposed to be communicating over UART. I've made a mistake of not testing the programming capabilities of the ESP8266 when the UART is connected to the AVR. When I connect the ESP to the PC the standard reset data garbage as well as a pre-programmed ready message shows up on the Serial Monitor confirming the TX is working. I'm however unable to re-program the ESP, even when the AVR's reset is being pulled low. I do not own an oscilloscope, so I'm unable to probe the RX pin of the ESP. I have not soldered the R9 resistor as my programmer is 3.3V, not 5V like the AVR.


texts: Do I need to worry about Min/Max footprint length values in datasheets

texts:
I'm currently generating a set of pads for a footprint found in a datasheet. All of the length values in the footprint have min/max values e.g. 1.8 +- 0.1
Should I be using the 'middle' value, and if so, why do manufacturers bother with the min/max values?


texts: How this form can be induced? (BJT accurate value of vbe)

texts:
I even don't know how this form can be induced. I know that I have to study more but I really want to know about this form please help
(please ignore the actual value. I just want to know about formula)


texts:
I have a question about the process that I wrote to divider a 1MHz clock down to a 10kHz clock.
I don't know why my code always splits up like it does below, if someone can edit it to look better and let me know what I am doing wrong.
Now my question is how are the if and elsif statements inside the process performed? On the rising edge of the clock, the Count signal will be incremented by 1. But will the elsif statement ever be executed as the if statement will have to be true?
Include libraries / packages

Entity Clock_Divider is
 Port (Clock_in : in std_logic;
       Clock_out : out std_logic
      );
end Clock_Divider;

Architecture Behavioral of Clock_Divider is

signal Count : integer := 1;

signal Temp : std_logic := '0';

begin

    Process (Clock_in)

    begin

    if (rising_edge(Clock_in)) then
           Count  <= Count + 1;

        elsif (Count = 100000) then
              Temp <= not Temp;

        end if;

        Clock_out <= Temp;

    end Process;

end Behavioral;


texts:
I noticed strange behaviour, for which I cannot find any documented confirmation. In my program I measure two ADC channels:

ADC0
Internal 1.1 V bandgap reference (in order to know the value of applied supply voltage VCC)

I measure these two channels by polling. It seems when I measure a channel I always get the value of the previous measured channel at first. To get the actual correct value I have to wait some time (delay) and measure again. Why is this? This is my code for reading the ADC values.

Reading ADC0:

ADCSRA &= ~(1<<ADEN); /* ADC ausschalten */

/* Set VCC as reference for ADC */
ADMUX &= ~(1<<REFS1);
ADMUX &= ~(1<<REFS0);

/* Measure PA0 (ADCSRB[MUX5] = 0b0; ADMUX[MUX4-MUX0] = 0b00000)*/
ADCSRB &= ~(1<<MUX5);
ADMUX &= ~((1<<MUX4) | (1<<MUX3) | (1<<MUX2) | (1<<MUX1) | (1<<MUX0));

ADCSRA |= (1<<ADEN) | (1<<ADSC); /* Enable ADC and start conversion */
while((ADCSRA & (1<<ADIF)) == 0); /* Wait until conversion done */
ADCSRA |= (1<<ADIF); /* Reset ADC interrupt flag */

/* At this point I read a wrong value (from previous channel) */

/* My current workaround starts here */
_delay_us(50); /* Wait some time */

/* Measure again */
ADCSRA |= (1<<ADSC); /* Start conversion */
while((ADCSRA & (1<<ADIF)) == 0); /* Wait until conversion done */
ADCSRA |= (1<<ADIF); /* Reset ADC interrupt flag */

/* Now I got my correct value */

ADCSRA &= ~(1<<ADEN); /* Turn off adc */

When reading the 1.1 V bandgap the only thing I change from the code above is:

/* Measure 1V1 bandgap reference (ADCSRB[MUX5] = 0b0; ADMUX[MUX4-MUX0] = 0b11110)*/
ADCSRB &= ~(1<<MUX5);
ADMUX |= (1<<MUX4) | (1<<MUX3) | (1<<MUX2) | (1<<MUX1);
ADMUX &= ~(1<<MUX0);

I have to read the wrong value, then wait, then read again. When I omit one of these steps it does not work anymore.

My target microcontroller is the ATTiny861V and I use avr-gcc under Windows 10 for compiling.


texts:
I'm trying to compile a simple C file to later upload to my MSP430 uC but when I try to compile I get something that looks like a linking problem:

main.c:7: undefined reference to `outPWM'

my folder contains these files:

main.c
pwm.h
pwm.c

main.c only has this simple instructions:

#include <io.h>
#include <stdint.h>
#include "pwm.h"
int main( void ){
    // Stop watchdog timer to prevent time out reset
    WDTCTL = WDTPW + WDTHOLD;
    outPWM(1,4,100);
    return 0;
}

pwm.h only has the function prototype and some macros:

#define MCU_CLOCK       160000000
#define PWM_FREQUENCY   50
//Set z% PWM duty cicle output on port x.y
int outPWM(uint8_t x,uint8_t y,uint8_t z);

and pwm.c has the function that is quite big so just for the sake of the example it will be this:

#include <io.h>
#include <signal.h>
#include "pwm.h"

int outPWM(uint8_t port,uint8_t sel,uint8_t PWM_Duty){
    return 0;
}

I might be using the wrong options while compiling but I have no idea what should I use besides what is provided in some examples on the web that I adapted to this:
msp430-gcc main.c -mmcu=msp430x2252 -O2 -Wall -o main.o

What am I doing wrong?

Thank you.

EDIT
Corrected function name in pwm.c


texts: How does the transfer function of a filter change if I change it form active to passive keeping the order and cutoff frequencies unchanged?


texts: Can a DFIG operate in a synchronous speed?

texts: A DFIG can operate in both sub and super synchronous modes. Can a DFIG also operate (stable) in a synchronous speed? If so, would the rotor current (as decided by IGBT switching) be DC since the rotor is already moving at synchronous speed?


texts: Why are the USB signal pins always swapped on USB bridges?

texts:
So I've been looking around for quite some time for a USB<->UART transceiver that has the pins properly ordered.

If you'll look at the picture here, you can see that the pin order of the connector is

VBUS
D-
D+
GND

and the pins at on the bridge are swapped which means I have a problem with laying out the USB signals should both the connector and the IC be on the top layer.

Pulled from the CP2103 datasheet

I've tried with the FT234xd and other various bridges but I run into the same layout issue like below where the signals cross which becomes a problem.

FT234xd without the resistors in between the signal and the bridge.

Of course I could turn the bridge around and have the pair be run non-parallel down the length of the bridge although I feel like that would be less than ideal.

In the end I'm left wondering is there a good reason for this or am I missing something entirely related to the layout of a USB transceiver?


texts:
In linux, do lscpi command:

we can see

    LnkSta2: EqualizationComplete-, EqualizationPhase1-

Sometimes the EqualizationPhase1 is EqualizationPhase1+.

Can you tell what's different?

The expected value is EqualizationPhase1+?

Is it a necessary procedure in the handshake?


texts: How to power grid suppliers control the voltage and frequency?

texts: Can anyone give me some pointers on the ways used by electricity suppliers to control voltage levels and frequency in power networks?


texts: I want to make an Interfacing between my pic microcontroller and the ESP8266-12 through SPI protocol, but i found two types of SPI in the ESP8266-12, the Hspi and on gpio 12,13,14 and another one on 6,7,11 , so which one should I use and what is the difference?


texts: How to switch one output between two buses

texts:
I'm looking to take the output of some registers (e.g. 74LS670) and have them each be able to output either to an A bus or a B bus, obviously only one register can output on each bus at one time.  I've looked at decoders/demultiplexers, multiplexers, etc and either I'm not finding what I need, or I'm too ignorant to see my use case in the various data sheets I've read through.  I'm basically needing a SPDT switch that can be controlled by another logic signal.  I'm trying to stick with the 74LS series if possible, or at the very least I need something TTL compatible.
Any help is definitely appreciated.


texts: There is a capacitor that is charged to 20V. When we connect 1.5 megOhm resistor to it, it takes 6.1 seconds for the capacitor's output voltage to drop to 2V. How do I calculate the capacitance of the capacitor?


texts:
I am trying to make a buffer for short, 5V pulses.
The pulses are negative (form 5 to 0 V) and last for 500 ps to 10 ns (Half maximum, full width).
The load is capacitive, around 50pF, and as close as possible to the buffer.
The input will probably be a differential pair.
The pulse repetition rate is expected to be around 50MHz.

I considered several options:

Several fast logic gate, like SN74LVC2G04 in parallels. They could have adequate rise-time but the maximum frequency is low, around 150MHz.
Fast, high slew rate Op-amp like an AD8009. The bandwidth is better and this could work with pulses around 5ns, but probably not with shorter ones.
An RF amplifier, with a gain block or an RF FET. I don't know that much on those circuits beside basic class A amplifier and this will continuously consume power.

Thanks for any suggestions!

The pulses will be generated by some CML logic. The device driving the buffer will be similar to an ADCMP572. It's differential with a swing of 800 mV, so I need voltage gain, and enough current to get a good rise time.


texts: What is the real every moment exact situation of an a.c source?

texts:
in advance of every discussion, i want to say thanks to this great scientific website that i'm recently getting to know it more and more and i'm really happy with.

sometimes i get stuck with really dumb inquiries of my mind! i'm beginner to electronics though. last day, i was reviewing this simple full-wave-bridge-rectifier, almost for the ninth, or the tenth time in my life, and fortunately, i really have no problem with the operation, i understand it all, but...

but while looking at it, some other question(weird.Q!) sparkled that is this:

when the source is in the positive peak of its signal, and obviously D1 and D2 are forward biased and are conducting, what is the amount of the negative end of the source?!

are the two ends symmetric in their values? e.g. 2V and -2V? so... if yes..., then why we're showing the source voltage in that moment by that positive amount in the figure at all?
or what...?
definitely(or probably...!) it shouldn't have the ground value as well, since the D2 and the D3 are conducting in every half-cycle!
well what is my silly misunderstanding please...!?!?
thank you again ;_)


texts: Voltage drop on batteries when connected to ups/inverter

texts:
I have recently installed a solar system and trying to understand the voltages of batteries when they are being charged and when they are providing power to load.
Here is what I observed:

I have 2 Lead Acid 12v Deep Cycle 200ah batteries connected in series with a 24 volt solar inverter/charger.

During the charging phase I notice that the voltage of batteries as shown on the lcd display go up as high as 29.1 and then stops.

At night when connected with load and providing about 100 watts 220v the batteries read 25.9 in the beginning and drops to about 24.9 in about 6 hours.

Is it normal for a battery to charge upto 29.1v but then read 26v when it starts to provide power to inverter for dc to ac inverter?


texts: Can an electrostatic voltage be divided with very large resistors?

texts: Is it possible to divide an electrostatic voltage from a Van de Graff generator or electrostatic generator with very large resistors?


texts: I am trying to source some toggle switches that also have a built in solenoid and can effectively toggle themselves. Like what they sometimes have on sound mixer boards for automation. Basically a relay that can be manually flipped. But what exactly would you call that? I cannot find it on mouser, etc. Not looking for a specific product reccomendation just what the darn thing is called.  Thanks!


texts: Let say they are two different closed circuit. One circuit uses 400 V and another uses 12 V. Let say I touch the positive terminal of 400 V circuit and the negative terminal of 12 V circuit. Should I get shocked because I myself can be considered as some wiring although I have some resistance?


texts: Infinite thermal current noise in a wire?

texts:
The thermal noise density can be written as:

$$nd_V=\sqrt{k_BTR}$$
or
$$nd_I=\sqrt{\frac{k_BT}{R}}$$
The units begin V/sqrt(Hz) or A/sqrt(Hz). For the second expression, does this imply infinite current noise density for an ideal wire? This seems strange! I understand that the final noise power does not depend on resistance, but still infinite noise density seems absurd.


texts:
I'm working on a Nixie tube clock and I'm having issues with the power supply. It's a flyback converter based on the LT3757 and the Coilcraft DA2032-AL flyback transformer. I designed to work with an input of 19 V and an output of 230 V at 38 mA of maximum load. The problem is that at its initial intended switching frequency of 100 kHz, it outputs 230 V under no laod and as soon as the tubes turn on, the voltage drops to about 140 V and the chip seems to enter some sort of protection mode, outputting a very low duty cycle gate drive signal. This happens at a load current of less than 10 mA.

I tried to change anything that could cause this: loop stability compensation capacitor, softstart capacitor, decreased current sense resistor, changed diode, tested with and without snubber, nothing helps.

I increased the frequency to 275 kHz and this caused the transformer to heat up to 80 degrees Celsius and the diode to fail after about 2 minutes. So I found a sweet spot at 185 kHz that provides enough power without excessive heat, but I'm still not happy with the final result because I did not find the root cause.

I simulated the circuit in LTSpice at 100 kHz and it can provide up to 70 mA, so there is a huge discrepancy between simulation results and practical results.

I think the limitation is due to the transformer somehow, but I'm not sure. So my question is: what could cause the circuit to fail to provide enough power at 100 kHz?

Here are the schematic and the layout:

Here are some scope captures at 100 kHz under load, with snubber populated, during the described behavior:

CH1 - Q2 Gate

CH2 - Q2 Source

CH3 - Q2 Drain


texts: RS485 noise problems: signal ground / common ground / isolation?

texts:
I'm experiencing a lot of noise in an RS485 network I've put together using ST485 chips. The cable lengths are very short (<1m total cable length), I'm properly biasing the A and B signals and I've tried both with and without a terminator (seems to make no difference), and I'm only running at 19200 baud.

I suspect the problem is ground noise, as I'm using the RS485 input signals to set PWM levels for high-power LEDs (up to 1000mA momentarily at 3.8V). I'm using a four-wire connection between each node (+12V, GND, RS485-A, RS485-B, with the RS485-A & -B a self-twisted pair of hookup wire).

Although it's not suggested in the ST485 datasheet, would it be enough to add a signal ground wire between the RS485 device ground inputs, with 100Ω resistors in series between the RS485 device ground and the signal ground wire? Or should I think about adding full isolation to the RS485 device, including a transformer for floating power supply and opto-isolators on the A and B signal lines? Or is this excessive?

Thanks in advance.

EDIT I know I'm getting noise because in order to get the desired effect (particular brightnesses of particular LED lights), I have to use a CRC-8 on each packet (to drop bad packets at the receiving end) and send every message twice (to make up for dropped bad packets), and even then I'm still getting incorrect packets showing up on the receiving end.

EDIT Removed baud-rate error comments, as baud rate is in fact very accurate.


texts:
module queues;

  bit [7:0] a[$];

  bit [7:0] d_array[];

initial begin
  for (int i=0; i<140; i++)
  a.push_back(i);

  a.push_back(140);

  a.push_front(144);

  foreach(a[i]) $display("\tValue of a[%0d]=%0d",i , a[i]);

  $display("----- Queue size is %0d  -----",a.size());

end

  initial begin

    d_array = { >> {a}};

    $display(" Dynamic array = %0p ", d_array);
  end

endmodule

Error: design.sv:19: sorry: Streaming concatenation not supported.
Exit code expected: 0, received:

I want to copy my queue 'a' into dynamic array and print it.
Next, I want to copy my dynamic array into another queue (b).
Then copy this queue (b) partially into queue (c) and print it and implement "Access Random queue Entry".


texts: How to use GENERIC with internal signals in VHDL?

texts:
I am trying to learn the GENERIC keyword in VHDL:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity adder is
    generic (N: integer := 4);
   Port ( Cin : in  STD_LOGIC;
          x : in  STD_LOGIC_VECTOR (N - 1 downto 0);
          y : in  STD_LOGIC_VECTOR (N - 1 downto 0);
          s : out  STD_LOGIC_VECTOR (N - 1 downto 0);
          Cout : out  STD_LOGIC);
end adder;

architecture RippleCarryAdder of adder is
    component fullAdder
        Port ( Cin : in  STD_LOGIC;
           x : in  STD_LOGIC;
           y : in  STD_LOGIC;
           s : out  STD_LOGIC;
           Cout : out  STD_LOGIC);
  end component;
  SIGNAL C : STD_LOGIC_VECTOR(1 TO N - 1) ;
begin
    -- First stage gets the carry in
    stage0: fullAdder PORT MAP (Cin, X(0), Y(0), S(0), C(1));

    -- Middle stages follow the same pattern
    gen_stage:
        for I in 1 to N - 2 generate
        stageX: fullAdder PORT MAP (C(I), X(I), Y(I), S(I), C(I + 1));
        end generate gen_stage;

    -- Last stage spits the carry out
    stageN_1: fullAdder PORT MAP (C(N - 1), X(N - 1), Y(N - 1), S(N - 1), Cout);
end RippleCarryAdder;

I get the error: Undefined symbol 'N'. for the internal signal [the line that reads: SIGNAL C : STD_LOGIC_VECTOR(1 TO N - 1) ;]

How can I use my generic value N in internal signal of my architecture?


texts: How to copy attributes between package variants in eagle library editor

texts:
I have entered a set of attributes into a eagle library. However I started to enter the data after having drawn all package variantes. The package variants are only different pad layouts I use for ease of layout.
The outcome was, the attributes showed up in only the technology/package combination I was editing then. Copying them to all technologies (with the differing attributes changed) was straightforward.

Now I want to do the same for all package variants. I found the ULP "copy-attribute-at-deviceset.ulp". But it does only partially, what I need. In fact it generates all attribs in all packages for all technologies. But it doesn't copy values reproducible. I managed to copy the values of one technology once, but it was copied to a different technology in all packages and opened the default technology "" which I did not intend to use.

Does so know a different script or some trick? Or do I have to resort to writing my own ULP?


texts:
Just bought a bunch of transistors and one supposedly to be requested as a 2N7000 general purpose mosfets or J201 FETs... Finally unpacked everything and it came in this smaller than a SOIC8 pinout, micro-smd package.
Component marking says K27 0N.
It's very likely a lcd-set mosfet 2n7000, eventually a dual positive-negative pair of mosfets or a dual-in-packs according to some datasheets.
Couldn't find any datasheets on 6 pin mosfets.
Can you help me out finding a datasheet or pinout diagram? thank you.


texts: MOSFET driver for digitally controlled, battery powered boost converter

texts:
I have a circuit powered from a single Li-ion cell. It contains a microcontroller which is powered by 3.0 V directly off the cell (through an LDO linear regulator).

This circuit has a 12 V load, so I designed a boost converter to step up the voltage from the battery, and to save on cost, rather than going with an SMPS controller IC, I've implemented the control logic in software inside the MCU, outputting the MOSFET switching signal from a GPIO with the same voltage level as the MCU's supply (i.e. 3.0 V) and limited current sink/source capability. Thus, a gate driver is called for.

Finding a suitable gate driver circuit has proved a daunting task, especially as most MOSFETs don't like being driven with only 3.0 V. My first attempt was to use the FAN3111 as a gate driver, but I didn't pay attention to its minimum supply voltage of 4.5 V. It was meant to be supplied from the boost converter's 12 V output, but this created a bootstrap problem: before I start switching the MOSFET, my boost converter's output is the battery voltage minus a diode drop, so not enough to power on the gate driver, and thus the switching won't start.

I investigated the following possibilities, but none are completely satisfactory, so I'm looking for new ideas:

Use a charge pump IC or even a small boost converter to generate the supply voltage for the gate driver. It feels like building a Rube Goldberg machine, plus after adding up the cost of the new supply IC (and supporting circuitry), the gate driver and MOSFET, it's cheaper to replace the whole contraption with an integrated switching regulator IC.
Use a complementary emitter follower-type gate driver IC, like this one. It's also cheaper than the FAN3111, but would require a level shifter from the MCU to the gate driver input, supplied by the boost converter's output. Initially the MOSFET would switch poorly due to the bootstrap problem, but after picking up some voltage it would work fine. This idea works in principle, but I've had no luck finding a suitable level shifter. Something like the CD4504 might work but it's a physically large IC at 16 pins and I can't afford the board space. There are other options but they start to get expensive. I also considered using a cheap BJT/MOSFET wired as a NOT gate, with a pull-up resistor from collector to the boost converter's output voltage. The problem is that, in order to save power, I'd have to go with a high value pull-up resistor, which prevents the MOSFET from being driven hard enough: the gate driver can only deliver 19 mA if fed from a 10 kΩ impedance, according to the datasheet.
Use the same complementary emitter follower-type gate driver IC as in (2), but drop the level shifting idea -- feed it directly from the MCU -- and go with a low Vgs(th) MOSFET. The choice of MOSFETs is more limited but this might work. However, according to the datasheet, the gate driver's output voltage could be as low as 2.2 V with 3.0 V applied, and as high as 0.5 V with 0.0 V applied. I'm especially worried that a low Vgs(th) MOSFET would be on the brink of conducting with 0.5 V applied. I'm not saying this can't absolutely work, but the lack of headroom feels troubling.

Can anyone point out alternatives that I'm missing?


texts: What's the difference between a thousand 0.2W LED's and two-hundred 1W LED's?

texts:
1000 x 0.2W = 200W
200 x 1.0W = 200W
What's the difference in the light output over a given area, in terms of PAR, PPFD, PPF?
I grow plants indoors under LED panels. People in this industry say to use +1W diodes and that below 0.5W is useless or inefficient. I want to know if there really is any difference between the two.
I cannot see why there would be a difference.
Does the bigger wattage diode penetrate deeper, Can having a large number of lower wattage diodes produce the same effect, etc.


texts: ESD clamping voltage in SIMCard interface too high

texts:
I planned to use SIM868 and what makes me confused all this time while choosing ESD protection is the voltage after clamping the transient voltage, it is still way too high especially when looking at ESD clamping characteristics graph. But first time I wanna tell you what have I done to solve this issue (indeed it still not solved yet).
According to SIM868 hardware design v1.07 page 37 they also include the recommendation part number for ESD protection, which is ESDA6V1-5W6 from ST or SMF05C from Onsemi.
After looking both datasheets, here is some basic information :

ESDA6V1-5W6 : Vrwm 3V, Vbr min 6.1V, Vcl @ 8A is around 12V

SMF05C : Vrwm 5V, Vbr min 6.2V, Vcl @ 8A is around 12.5V

Unfortunately only ESDA6V1-5W6 that has ESD response graph or maybe I can call it ESD clamping characteristics, the test is using IEC61000-4-2 air discharge +15 kV. The chart is in page 5 of ESDA6V1-5W6 datasheet, here is the screenshot :

I am pretty sure it is 5V/div so it makes around 15V at the beginning of pulse and then stay at around 6V.
In that case, the voltage that will SIMCard interface see is 15V max and I think it is too way high for the interface.
Later on I also looking for absolute maximum rating for SIM868 and found it in hardware design v1.07 page 58 but there is no information about the maximum voltage that allowed to come in to SIMCard interface.

After that I looking for internal ESD protection of SIM868 and found it in hardware design v1.07 page 60, and again, there is no information about maximum voltage for SIMCard interface.

I think this is little bit the same with other data line ESD protection, maybe like I2C or USB but they need more small parasitic capacitance, so I use the search bar in Electronics StackExchange and found some answer.

Using some series resistor, it will limit the current when overvoltage is occurs
Using bypass capacitor to eat the remaining energy after clamping
Using additional zener diode and series resistor

I believe all the advice above are working, but I think when it used to protect the data line I need to consider more about signal integrity, and I believe the best way for keeping the signal integrity is only using one protection.
So after all I wanna ask, is that OK if in such short time the SIMCard interface is exposed with more than its data line voltage level? (around 3V for SIMCard and exposed by more than 10V while ESD occurs)
For another ESD protection candidate that has lower clamping voltage I will choose PUSB3FR4 from Nexperia, but I little bit not sure about snapback voltage that can be as low as 1.5V, what do you think?
If you have any resource like article or some similar question, you can post it here, that will be a Great new information for me.
Please correct me if I wrong, Thank You.


texts:
I have bunch of TDA2003 (class AB) amp ICs and I would like to make some amplifiers with them. One would be stationary bridged 20w version and one portable version. However I'am a beginner and I never had expierence with batteries.

Is this IC efficient for working on battery?
I'am planning on buying 5ah battery, how long would such battery
last for me? Maybe 5ah is an overkill? 4-6h of constant work is
what I need. (NOTE: I'am not going to blast it on full power all the
time. I guess 50% of power ussualy)

Battery charge time, size, weight doesn't matter for me at all. Price and efficiency what matters


texts:
I was looking at a circuit/control board of COMMERCIAL/INDUSTRIAL CONTINUOUS DUTY BELT DRIVE APARTMENT TROLLEY OPERATOR and came across 24 VAC in multiple places (both in Hard-Wire and Circuit Board sections). My recollection of 24 VAC is that it is used to relay or switch to break contact. I am trying to understand what is it in charge of in this specific trolley.
I am afraid this may be a very broad/complicated question, but I hope my question it is clear. Please let me know if you need further clarifications.


texts: How do I interface an XBee wireless module with the Uno?

texts: I want to use an XBee wireless module with my Arduino Uno. How should I go about doing this? Do I need a shield like this one?


texts: Is the Diode RMS Reverse Voltage spec important in a DC circuit?

texts:
Consider a 12Vdc automotive power supply design where +12V power connects first to a Vc=49.9V bidirectional TVS diode (e.g., TPSMB36CA) and subsequently connects to an SB370 Schottky diode.  The SB370 is used for reverse polarity protection and was chosen over a 1N4004 for its lower forward voltage drop.

A Load Dump spike could be 100V to 125V in some cars, but the TVS would clamp that spike to Vc=49.9V.  The SB370 datasheet cites Vr=70V (DC blocking voltage) and Vr-rms (RMS Reverse Voltage) = 49V.  The Vr=70V of the SB370 is higher than the Vc=49.9V of the TVS and therefore would appear to be safe, but what of the Vr-rms=49V spec (0.9V lower than Vc)? Does the Vr-rms spec not matter in this automotive DC circuit?

Thank you.


texts:
I'm having hard time understanding how inverter works and why it works.

I mean why is it possible to power a say fridge (220V AC) with a 5v battery using a  5v to 220v inverter ?

And since this is possible why are electricity companies using high voltage lines ?  that are so dangerous, why not use low voltage, and then increase it at the end point using inverter ?

Thanks to help comprehend it.


texts:
How to classify the voltage transfer curve into various regions, as shown,

(In the image, \$V_0\$ refers to \$V_{DS}\$ and \$V_i\$ refers to \$V_{GS}\$)

Since, the various regions of operations are classified based on the output characteristics of the MOSFET, where \$ V_{GS}\$ is constant for each curve.I mean, why is the MOSFET pushed into various regions while we change \$V_{GS}\$.

The circuit,


texts: Creating a low power, high AC current using a current transformer?

texts:
I want to create 0-32A AC to test 1:2000 current transformers with. Create the current in a rough way, use a scope probe to measure RMS and verify calibration of current transformer circuit under test.
And I am playing with the idea to create high currents using a similar current transformer, but reversed. With 10mA say 5V AC on the 2000 winding side hoping to get 2000x the current when I put single copper wire through it with short circuited ends.
Could that possibly have a current start flowing through the copper wire at an extremely low (1/2000th?) voltage?
A similar question I couldn’t answer is what happens if you want to make a transformer with a massive copper core and two 2000 winding coils at each end. It shouldn’t work since magnetically it is all a nightmare. But I just wonder.


texts: ICs ("chips") are typically packaged in what material?

texts:
ICs are typically packaged (encapsulated) in a black "plastic". What is this packaging material made of?

(source)


texts:
I'm currently testing a PCB with a 650V SI Mosfet. When they fail due to voltage spikes or Over current, they fail short. This can cause extra work in testing because this can burn traces and cause other parts to fail. If I can use a device that fails open, It will save me from having to replace other parts and/or destroying the bare board.
Do all SIC Mosfets inherently tend to fail open or short or is it more of a case by case basis depending on which specific SIC Mosfet you choose?


texts: How to find socket for keyboard connector?

texts:
I am looking for a socket which is able to receive the connector of the ThinkPad X41's keyboard. How do I identify the socket so that I can find it on the (German) market?

Background: I want to build a custom keyboard controller, to connect the keyboard via USB.

Picture: Receptacle (left, 20 pins) and plug (22 pins)


texts:
I have this QFN 48 chip which has the following design :

As it can be observed, the pitch is 0.4mm. It seems like the conventional QFN adapters won't fit because the conventional ones has the pitch of 0.5mm.

I should have read thoroughly before buying it. Do you have any suggestion to help me use this chip?

The chip is just a little small for the QFN adapter, so I tried soldering it anyway but it doesn't work.

The chips is 6mm x 6mm but the QFN is 6.07mm x 6.07mm. I have three different kinds of QFN48 adapters but they have the same design in terms of size.

For your information, I don't have the hot air gun.... would that be a problem?


texts: Another question about power to homes in Europe

texts:
I have a couple more questions about power to homes in Europe.
Our device draws between 12A and 45A (at 230vac) depending on its configuration. It appears that at the high end of the scale that will be a problem in the UK or France or Germany, where the domestic distribution panel is a single phase. (protected by a main breaker in the 60 to 120A range) In these circumstances (UK etc.)
I assume there will be several individual circuit breakers each rated at 16A?
IIRC I saw something about 32A circuit breakers somewhere - is this possible?

In other countries (like Sweden) is the main protection a 3 phase breaker such that if one phase is overloaded all phases are interrupted? or are there 3 individual breakers?
In these cases I assume the 3 phases are distributed throughout the home - some lights are on phase A, some outlets on phase B and some of each on phase C.
Is there more than one circuit breaker for each phase? For instance is it possible that the outlets on the first floor use phase A, breaker 1 while the outlets on the second floor use phase A, breaker 2?
What would be a common rating for each


texts:
Hi nearly finished my first electronics project and I need to think about how to mount it into a box.

I feel like I am missing something absolutely obvious with how to use PCB spacers.

Here is a picture of my box:

Here is a picture of some plastic PCB spacers:

The question is how to mount those spacers into the box so they don't fall out?

Should I glue them?

Should I drill holes in the box and then screw through from the other side of the box?

Any other method?

I have also looked at the spacers with sticky pads on the bottom but I prefer to reduce the risk of the PCB falling off at some point especially as the PCB is connected to a security system.

I appreciate this must be very obvious and lots of people are doing it every day but I would appreciate some direction on how to achieve this.


texts: Wye-connected alternator changed from wye to delta

texts:
A wye-connected alternator is rated at 20 amperes of line current. The internal connections are changed from wye to delta. What is the new line current rating?

From what I understood, to get the line current for delta, phase current is multiplied to 1.73 (I got 11.56A). While the line current for wye is equal to the phase current. They have different ways in getting the line current. What happens during the internal connections being changed?


texts: Short circuit protection for digital input

texts:
In my question here: Review of my first ever PCB design for a watering control robot. it was pointed out that I should probably protect the LEVEL_ALERT line.

So essentially I have a digital off-board input signal (5V) that shares connector with a high power 12V (up to 5A) wire and there is proximity to water. So there is a real risk that the 12V may short to the input signal. I'd like to avoid magic smoke... The exact circuit is in the question linked above but I'll reproduce the relevant bits here:

simulate this circuit – Schematic created using CircuitLab

The values of the components aren't correct I just added the components, values shouldn't matter. I have added the fuse, it wasn't in the original.

As you can see in the big box at the top that represents a connector that runs off board. And there is a risk that the 12V going out of the relay could short to the wire going to the LEVEL pin on the ATmega and magic smoke would ensue.

If it was just an ESD or minor transient I'm sure the ESD diodes in the GPIO pin could handle that. But this may be a continuous short to 12V which I'm sure would fry the micro.

Here are the options I have considered:

Clamp diode to 5V rail. Can the regulator (LM7805CT) handle the output being strongly driven to the same voltage as it's input? Even if it can, will the 5V rail rise above the maximum Vcc of the ATmega? If the water level drops so that the switch is actuated while the output is shorted, then the fuse should blow preventing the pump from dry running.
Put a PMOS between U2 and ATmega and add a voltage divider to LEVEL line where the division point is tied to the gate of the PMOS so that anything over 5V on LEVEL cuts the power to the relay and breaks the short. I'm not sure if this will be fast enough to prevent damage to the ATmega. It is also at least three more components. Speed might be solved by RC filter on LEVEL line. If the level switch actuates due to low level while the output is shorted it won't be an issue as the relay will turn off the pump anyway.
Dedicated current and voltage limiting IC. I'd really like to avoid adding another IC at this point.
Similar to 2 but put the PMOS parallel to C1 and blow the fuse instead.
Use a voltage divider to create a suitable, close to 5V potential from the 12V rail that is not connected to the regulator and clamp to that using a diode from LEVEL has same effect as 1. but I think doesn't risk blowing the regulator or raising Vcc.

Could you please advise if any of these methods are suitable for protecting the ICs? Or if one is better than the other?


texts:
I have read the I2C bus specification and don't quite understand the limitations of a multi master I2C bus mentioned on page 10:
https://www.nxp.com/docs/en/user-guide/UM10204.pdf

One the one hand there is the description in the overview that I2C is a true multi master bus. One the other hand, there is the problem that both master have to identify the rare cases of overlapping access. I think i understood the mechanism during the address phase, but the section ends with the following:

  There is an undefined condition if the arbitration procedure is still
  in progress at the moment when one master sends a repeated START or a
  STOP condition while the other master is still sending data. In other
  words, the following combinations result in an undefined condition:

  Master 1 sends a repeated START condition and master 2 sends a data    bit.
  Master 1 sends a STOP condition and master 2 sends a data bit.
  Master 1 sends a repeated START condition and master 2 sends a STOP

I found a datasheet and interpret it such that these rare conditions are actually an unsolved problem of I2C multi master operation.
http://www.ti.com/lit/ds/symlink/ds90uh947-q1.pdf

  The I2C specification does not provide for arbitration
  between masters under certain conditions.The system should make sure the
  following conditions cannot occur to prevent undefined conditions on
  the I2C bus:

  ... above 3 conditions ...

  Note that these restrictions mainly apply to accessing the same register offsets within a specific I2C slave

So how to interpret these 'undefined conditions', how do they occur?

Is I2C by design only capable of handling multiple masters if one can guarantee that both will never access the same slave/slave register?

EDIT:

I found the following in the Atmega datasheet on page 179

http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7530-Automotive-Microcontrollers-ATmega48-ATmega88-ATmega168_Datasheet.pdf

  Arbitration will continue until only one master remains, and this may
  take many bits. If several masters are trying to address the same
  slave, arbitration will continue into the data packet. Note that
  arbitration is not allowed between:

  ... 3 conditions ...

  It is the user software’s responsibility to ensure that these illegal
  arbitration conditions never occur. This implies that in multi-master
  systems, all data transfers must use the same composition of SLA+R/W
  and data packets. In other words: All transmissions must contain the
  same number of data packets, otherwise the result of the arbitration
  is undefined.

I'm not sure if they want to say that either

ALL transmissions must be done with the same pattern
or
just consistently per slave.

I guess they mean the latter in that access to a specific slave should be done by all masters with the same pattern of register read/write, repeated start etc.
This would be a way to handle it in practice if multiple master MUST access a slave.

If they meant that any transmission to any slave had to follow one specific pattern, some devices would become unusable (16 bit vs 8 bit data transfer).
Or am i missing something here?


texts:
I am trying to make a printed circuit board for a robot.

I would like to make this look as neat as possible, and I would like to have the peripherals like the sensors and other stuff, and the ATmega328 chip on the same PCB Board.

Unfortunately, all the tutorials online are for breadboards or recreating the actual Arduino with I/O pins, not what I am looking for.

I would simply like a circuit diagram explaining how to power the chip using a 9V battery, including a crystal oscillator.

If there was a place where I could download an Eagle schematic, that would be super helpful.


texts: How do you calculate regulator lost current?

texts:
We are using on the board an az1117 regulator to some kind of toy.
The toy works with 3.7v, hence we use this regulator.

The question- when the processor sleep, the output current will be 5uA, but I guess a 9V battery as an input with this regulator will be a bottle neck in terms of quiescent current.

How do you calculate from the data sheet, what would be the quiescent current for 9V or 5V inputs? it says on the data sheet that its 5mA for VIN=VOUT+1.25V. What about VIN=VOUT+4.25V?
Is there anything you can do to eliminate this bottle neck? the only option is to disable it but then there will be no voltage to the sleeping processor.

https://www.diodes.com/assets/Datasheets/AZ1117.pdf


texts:
This might be a straight forward question:
An AVR gets its power from a regulator which can be turned off with a digital low level input. However on a spike (digital high followed by digital low) the regulator will re-enable itself.

If I use a GPIO of the AVR to control this regulator enable input, the regulator will be turned off, hence the AVR powers off too. Kind of a suicide thing, I know but I need it.

What can I expect from the AVR ports after cutting down the power from it?

What shall I do to kill the spikes on the ports?
I must be sure that on the AVR's port remains on GND after the specific suicide instruction.

Is there any hardware requirements which applies to this situation?


texts: How can I build a power bank which charges to 16.8V and outputs 12V?

texts:
I am working on a battery build project to drive a small 12V electric motor (7A max current draw), and so far I have gotten this far:

I will use Li-ion 18650 cells in a 4S6P configuration
I will wire up the cells in parallel first, series second
I will use a balancing 4S BMS with balance wires connected between each of the units in the series

So the motor is rated for 11-15V, so at max voltage, the battery would be out of range.  Because of this, I want to use a buck converter to output a steady 12V.
Where I am a bit lost then is, how can I charge the battery?  Do I just wire an input path and output path in parallel, with a buck converter set to 16.8V on the input and 12V on the output, or do I need some other components there?


texts:
I've been trying to build the cap drop power supply as the major requirement in the project is to reduce cost.In the reference circuit 5.6 zener diode was present but out of curiosity I removed it and I found following results.

voltage across c2 = 8 volts.
I'm not getting how to analytically solve this problem and get the voltage.

Any help is appreciated.


texts: How to achieve common ground for a single ended input?

texts:
I'm using  a current loop transducer as in the set up picture I provided. The transmitter is regulating the current proportional to a physical quantity and regulating the current. It is a typical 4 to 20mA loop. We have a data acq. board which can read voltages so we read the voltage from 250 ohm resistor's ends. We use single ended input(red colored in my picture). Input amplifier is part of the data acquisition board. From R we use a BNC cable to connect to the daq board.

But in this link: http://www.ni.com/white-paper/7113/en/ (look at Figure 5) my setup seems to be not recommended.
Isn't my setup common grounded?


texts: Executing push $reg using one instruction on single cycle datapath

texts:
So I know how to push a register using two instructions, but how can I push a reg onto the stack using one instruction? Here's the single cycle datapath

I'm seriously stuck here


texts:
In most of electrical SCADA systems, RTU (Remote Terminal Unit) panels are very common in power transmission & distribution companies. There are several cards inside each RTU panel, some are binary input/output cards and the others are analogue input/output. I would like to ask about the function of these cards? These are some images of that cards:

Edit: This is the data sheet of 23BE23 card not 23BE21,but I guess it is for same purpose.


texts:
I have started studying synchronous generators in more detail of recent and I'm finding it difficult locating helpful information regarding their operation.

What is the formula that can be used to calculate the induced emf on the stator windings, and how does the rotor rpm affect this induced emf? I am also trying to find an equivalent circuit model of the rotor and stator windings to understand the generators terminal output voltage.
Also how to calculate the required magnetic field strength of rotor, i.e. the dc field current and voltage, that will produce a desired peak voltage at a given rpm?
Also how does the synchronous machine's parameters affect these above calculations? Like for example, the rotor and stator resistance and self-inductance (inductive reactance)?

Can anyone help or recommend good books or webpages/videos etc that may prove helpful? I cannot seem to find much info and books are expensive to buy if they will not be off any help.

I have created a basic model in MATLAB Simulink of a synchronous generator and would like to be able to enter machine parameters, measure produced simulated values, and have calculations that produce similar answers.

Thanks guys.


texts: Does it ever make sense to use a 50Ω input with 10X scope probe?

texts:
I'm at the point in my learning where one discovers measurement setup for a scope at RF frequencies is quite a bit more involved than I thought :)

I see the importance of thinking about the probe + scope input as a circuit/schematic all its own.

I understand that \$C_p\$ and \$C_{in}\$ form a capacitive divider that dominates when frequencies get into the MHz range and even a little below.
I understand that the use of ground pigtails constitute a direct invitation for the devil to enter and cause your scope traces to lie to you until you go insane. Some other ground connection, having a loop size measured in millimeters is essential.
I understand that the characteristic impedance of the coax connecting the probe to the scope is 50Ω. Further, I understand that when the scope input impedance is not 50Ω, that a portion of the signal is reflected back, but I guess I'm a little fuzzy on that bit because it doesn't usually seem to be a problem.

So far, in my getting-fancier-with-probe-setup exploration, I've made current measurements by soldering coax directly to a 1Ω resistor and placing that in the current path; there was on the order of 100mA peak in that self-oscillating boost converter circuit, but it had a waveform complex enough to be both interesting and instructive. It was a noisy, spiky mess without the 50Ω pass-through terminator but became really clean with it. I'm thinking the latter was the "true" waveform, but have no corroborating evidence so far. It was definitely nicer to look at :)

So I'm definitely seeing the benefit of using a 50Ω signal path (I'm believing I am anyway :). But of course not all situations are super low impedance like that one so wondering if there's any place for 50 ohm input in situations where one might prefer not to load the circuit quite so much.

Just thinking it through, I'm inclined to believe using a 50Ω input (feedthrough or built-in) with a 10X probe amounts to making a half-a-million-X probe at DC, which wouldn't be much use of course.

Are there applications where it might actually make sense?


texts: Connecting Solenoid (12v DC) with a battery source (12v 23A)

texts:
i'm a new bee and trying a DIY project with DC solenoids.
I'm having some basic (i hope so) with powering this solenoid - please let can you me know what is wrong with my attempt.

Solenoid is : 12v  540mA DC (normally closed)
Power Source :  12v 23A Alkaline
Diode :  IN4007

I have tried the approaches described below and in both approaches, Solenoid was not moved !
i have tried this solenoid on a commercial product and it works just fine. And battery is tested with a multimeter and it is working independently BUT not in my circuit.  so, i don't understand what i'm doing wrong here - any help is much appreciated.

Directly power solenoid with diode  (see image 1). I have also tried as explained here  Can i use 12 v solenoid valve directly connect with the 12 v battery?. But mine did not work :(

Use arduino uno board to drive solenoid (see image2) - i have connected DC converter (12v 1A)  as power source plugged into Arduino board

int solenoidPin = 4;                    //This is the output pin on the Arduino

void setup()
{
  pinMode(solenoidPin, OUTPUT);          //Sets that pin as an output
}

void loop()
{
  digitalWrite(solenoidPin, HIGH);      //Switch Solenoid ON
  delay(1000);                          //Wait 1 Second
  digitalWrite(solenoidPin, LOW);       //Switch Solenoid OFF
  delay(1000);                          //Wait 1 Second
}

Here is image of Solenoid and Battery:
.


texts: How to approximate the behavior of a phototransistor in the circuit editor?

texts:
While phototransistors are often used in this common turbidity sensor application (at least in part) because of their gain, their response is not linear since the gain will depend on the intensity of the light.

I'd like to learn to model circuits here with CircuitLab, and while this one is a little challenging for a beginner, it's has everything I'd like to understand. My first problem is that I don't find a phototransistor in the library.

So I would like to ask if there is a way I could approximate the response of a phototransistor by connecting a photodiode to the base in order to inject a photocurrent. I understand it would not be correct, but at least it gets me started on my way.

Also I've assumed that there is a way to "shine" the LED into the photodiode with some fraction, like 1E-03 or 1E-06 of the light producing a photocurrent, but haven't figured out exactly how to do that. If it's not possible, should I just connect a variable current source to the base in place of the photodiode? (In that case I might leave the LED in place for more advanced tests like low-quality voltage regulation, ripple, etc.)

simulate this circuit – Schematic created using CircuitLab


texts:
I am trying to accurately measure the power a solar panel produces over a day as cheaply as possible. To accomplish this I am trying to build a "dummy load" that will hold the panel at its Vmp and immediately dissipate the energy via some load (avoiding the need for a battery). The challenge here is that the voltage will remain constant but the current will change as the panel's illumination changes. Any suggestions as to how to do do this? Should I use a different approach?

The panel I am working with has a Vmp of 17V and a Pmax of 75W.


texts: output of a cascade system with known impulse responses

texts:
We have a system
\$x(t) -> |h1(t)| -> |h2(t)| -> y(t)\$

and \$x(t)= e^{(-2t)}u(t)\$ and \$h_1(t) = h_2(t) = e^{(-2t)}u(t)\$
and we want to find the output \$y(t)\$ of the system.
What I am thinking is to use the associative property of convolution but I think that I can't use this property , since we don't know if the system is LTI(am I right ?). ( even if I use this property I should make a lot of math)
Any suggestion or a smarter way?


texts:
Okay, I have very large designs to implement on FPGAs and heard about this concept of temporal partitioning that allows us to implement designs which swap in and out parts of the designs Although I couldn't find anything more than some research journal publications, some googling for temporal partitioning does show links for dynamic reconfigurable FPGAs.

So, what exactly are temporal partitioning and reconfigurable FPGAs? And are they useful in my application?


texts:
I want to get three phase input to an output when all the phases are available.
If I have lines, L1, L2, L3  and like to have one of the output with any one of those phases.
If any of the phase is over or under voltage, output should be off, otherwise output should be on.
I'm trying to use this to control three phase solid state switch. Output can be less than 1 Amperes.
L1, L2, L3 -- Voltage ranges from 170 to 250 to Neutral.
What is the best component I need to look for in the market to solve this problem? Better to have a solid state instead of anything mechanical relays.
If there are any companies offering a readymade device to this problem, please share it as well.
Thanks for the help.
Update:
Here are the exact components I'm trying to use.
http://www.crydom.com/en/products/catalog/ha-series-ha48-ac-panel-mount.pdf
ha48 needs AC as a control signal to turn and off. I have one for each phase, all connected to a single control input.
Need a device to a single control output that takes L1,L2 and L3 as three inputs checks for under/over voltage and gives the control output.


texts: Power absorbed by a resistor in a crossed circuit

texts:
The given problem above is asking for the power absorbed by the resistor R given R = 1 Ohm. According to my professor, the two inductors do not cross so I redrew the circuit into the one shown in the image below. I then redrew the circuit into its phasor equivalent also shown in the same photo.

I then did the following steps:

KVL at I1:

-2 + I1(2j-j/2) - I2(2j) – I3(-j/2) = 0

(3/2)j I1 - 2j I2 + j/2 I3 = 2  (1)

KVL at I2:

I2(2j+1+-j/2) – I1(2j) – I3(1) = 0

-2jI1 + (1+(3/2)j)I2 – I3 = 0     (2)

KVL at I3:

I3(1+2j – j/2) – I1(-j/2) – I2(1) = 0

j/2 I1 – I2 + (1+(3/2)j I3) = 0  (3)

Using Cramer’s Rule to get I2 and I3:

Divisor:

[((3/2)j)(1+(3/2)j)(1+(3/2)j) + (-2j)(1)(j/2) + (j/2)(-2j)(-1)] -

[(j/2)(1+(3/2)j)(j/2) + (-1)(-1)((3/2)j) + (1+(3/2)j)(-2j)(-2j)]

= -1/4 + 3j

Dividend for I2:

[0 + 2(-1)(j/2)+0] – [0+0+(1+(3/2)j)(-2j)(2)] = -6+3j

Dividend for I3:

[0+0+(2)(-2j)(-1)] – [(j/2)(1+(3/2)j)(2)] = 3/2 + 3j

I2 = (-6+3j )/ (-1/4 + 3j) = 168/145 +(276/145)j

I3 = (3/2 +3j) / (-1/4 + 3j) = 138/145 – (84/145) j

I2 + I3 =   [168/145 +(276/145)j] + [138/145 – (84/145) j] = 306/145 + (192/145)j

Using the Average power equation:

P(1-Ohm) =(1/2)|306/145 + (192/145)j|^2 Re{1} = 3.1 W

The answer in the book however is 2 W. Where did I go wrong? Is my redrawn circuit correct? Thanks.

Thoughts on using the Thevenin equivalent circuit to solve this problem?


texts:
I'm trying to run an ATtiny2313 on this 32KHz crystal. The load capacitors I've used are 22pF. The crystal does not oscillate unless I touch capacitors with a finger or just touch one of the capacitors with isolated tweezers.

What could be a problem?


texts: What's the reason for keeping a base line in optocoupler?

texts:
Image Source: https://www.vishay.com/docs/83725/4n25.pdf
The pin no 6 of the optocoupler IC is connected to the base of the NPN transistor. Should I keep it open? Or grounded? Does it anything to do with improving the performance of the optocoupler?


texts: Switched bleeder resistor on a capacitive power supply

texts:
I posted a more vague version of this question a few days ago here and this question was linked as being similar. Answers in both threads were extremely helpful and were along the lines I was thinking, namely using a transistor or FET to switch the resistor on when power is off. This would drain the smoothing capacitor quickly and allow maximum power while running, both of which I need.

It was mentioned that if I provided a schematic, then my question can be better addressed. .

It is a simple capacitive power supply for 120 V AC. I've racked my brain trying to find a way to connect the transistor or FET in this particular circuit. Is it even possible?

I'm hoping for a simple solution; something relatively small (< 1 cm^3) and cheap (< $1).


texts: Cat 6 STP 4x2x23AWG 500MHz cable earthing without using connectors

texts:
Regarding the following wire, I will use this to connect some signal wires between sensors and microcontroller, the only problem being that I will not use any dedicated connectors. Instead, I will be soldering every wire.
How can I put the cover to ground (meaning the GND of the microcontroller) without using connector?


texts:
I have a complete board which is sent to factory. However, for pricing reasons it would be better to mirror the whole board. This means that everything that was on the top, will be on the bottom, and vice-versa.

How can I do this in Eagle?
The components and wires should remain as-is. But everything goes onto the other side.

Could you recommend something to do this?

Thanks.


texts: VAC ratings & VDC ratings from components

texts:
i've been looking at switches and have noticed a few of them only note their voltage / current ratings
for AC but dont mention DC ratings at all.
Is there a reason to this and if so is there a equation/ general rule to get an idea of its DC limitations ?
Example a (dc rating)

Example b (ac and dc)


texts: What are LCD Display Drivers & LCD Display Controllers? What are their applications?

texts: I have used graphic and alphanumeric LCDs. I have come across LCD Display Drivers & LCD Display Controllers ICs. When are they needed and what do they do?


texts:
I am trying to control a 12v solenoid from a NodeMCU. I bought the wrong MOSFET, I've got an IRF520 (the website I bought it from said the gate threshold voltage was 3.3v, so  I thought it would work, but it appears to require much higher voltages than a GPIO can provide in order turn on).

I'm wondering whether I can make a voltage divider with a couple of resistors to get the gate to the required voltage. This is what I am thinking:

I'm not entirely sure how to work out the resistor values. I've read that a NodeMCU can sink 20mA. So the total resistance needs to be 600Ω in total.

The way I've calculate it, if it is 300Ω each, then the gate voltage varies between 6v and 4.35v as the GPIO goes between 3.5v and 0v.

Is this correct? Will it work?


texts: Current mirror: is there a name for this NPN-PNP pair, and how does it work?

texts:
I'm looking at the schematic for the MC1460 voltage regulator. At the top it has three current mirrors, each with an NPN-PNP pair. Is there a name for that transistor structure? These pairs look like Sziklai pairs except there is an emitter-base connection rather than an emitter-collector connection, and four connections in total.

I've experimented with the circuit in LTspice, but I'm not sure why they implemented it this way. It's more complex than other current mirrors I've looked at. The mirrored currents are sourced by the PNP collectors, but I'm not sure what current is controlling the mirror. There's a Zener-controlled current going to the bases of the NPN transistor, and a second current going through resistors to the emitter-collector connection. It appears that both of these currents affect the output. Any suggestions on how this current mirror works?


texts: Calculating dielectric constant of a dielectric sample placed inside a rectangular waveguide

texts:
Im trying to calculate the dielectric constant of a dielectric sample placed inside a rectangular waveguide over a range of frequenices. I used WR90 ( X band ).Using the s parameter data (S11 and S21), I used the Nicholson-Ross-Weir method to calculate the material parameters. But Im not getting a constant value(expected), rather Im getting wide variation in the dielectric constant. Given paper shows what i simulated in CST.

https://repositorio.unican.es/xmlui/bitstream/handle/10902/9337/NewMethodDetermine.pdf;jsessionid=F4CB2EE66B7B7A891F74C9EE342E0345?sequence=1


texts: What is the need for using active low inputs like EN' (read as "Enable bar") in digital electronic circuits?

texts: Is there any special reason because of which active-low inputs are occasionally used instead of active-high inputs? Example: We have active-low inputs RD' (read as "READ bar") and WR' (read as "WRITE bar") for memory chips, instead we can have RD and WR as inputs right?


texts: What are these white spots on my solar panel

texts:
I purchased a 5W solar panel from Sparkfun, and after using it outside for about a week, these large white spots started showing up.

Here's a closeup:

The solar panel is not being back-fed thanks to an inline diode blocking any reverse current.

What is causing these white spots to form.  Is the panel overheating when connected to the load?  Is this a manufacturing defect?


texts: Kinetis K64 Flash Block 0 can't be programmed

texts:
I've written my own flash programming functions to be used in a bootloader.

I have a small function that actually performs the write operation that is copied into ram so that both flash blocks can be written to.

Documentation reviewed and code complies with: AN4695 "Avoiding Read While Write Errors
When Developing In-Software
Flash Programming Applications
for Kinetis and ColdFire+ MCUs" and the "K64 Sub-Family Reference Manual"

I have fully tested writing to flash block 1 and everything works as expected.

When I attempt to write to any properly aligned block in flash block 0, there are no error noted by the K64 (FTFE_FSTAT) BUT the flash at the specified location is NOT changed.

Again -- all works well in block 1 but does not write to block 0 and no errors are reported.

I have checked the flash protection registers and there is no flash write protection in place.

I'm out of ideas so I'm hoping someone on the forum and provide some insight.

Thanks.

Joe


texts: Communicating microcontrollers over bell wire

texts:
I found some old wiring in my house I want to put to new use. In the cable there are four bell wires and it runs in the wall along the full height of the house. For me (utter non-expert) the cable could be similar to CAT3 cables.

I had the idea that I could use two of these wires to provide 3.3V and use the other two for interconnect. From end to end the cable is about 30 meters.

Is there some kind of easy to obtain and implement communication technology I can use?

I only have theoretic knowledge and I mostly only know Ethernet. In theory 10 and 100 MBit Ethernet do use CSMA/CD and have a half-duplex mode of operations which only requires one circuit, i.e. 2 wires, to work.

In a "sophisticated" setup there would be a central hub and each device would be directly connected to that hub. As the hub has no intelligence whatsoever, it might be possible to forget about the hub and just use one wire to connect all pin1 and use the other wire to connect all pin2, effectively creating a bus. I guess I have to solder some resistors at the ends, but this is definitely the least problem of the whole idea. With all the intelligence in the endpoints a working Ethernet seems possible.

There are 10Base2 and 10Base5. I would look at something like 10BaseBell. Of course outside of every standard and it would not quite perform as well as 10Base2. But can it work? Has anybody ever tried and documented things like this with recent microcontrollers that have a 10/100 Ethernet interface?

Or is there something else ready to use over these poor wires? This would be just some fun free time project, so no real requirements, yet a working TCP connection between a few microcontrollers would be awesome!

I don't even know if this is the correct site for such an idea but I figured people with knowledge about electrical engineering could know such things ...


texts: Thevenin equivalent with multiple sources circuit

texts:
Sorry if I may ask an idiot question, but its gonna be for few hours right now I have spent on this question.
I am asked to find out the value of the voltage between points A and B, aka Uab, and I am supposed to use the Thevin equivalent.
I found 12.4 ohms for the thevenin resistance, but for that I replaced every sources by the equivalent, and that short circuited the 4ohms resistance on the left, cause of the replaced 20v voltage source. But when it comes to the Thevenin voltage, I dont know what to do, the 2 resistances above are bothering me, do I need to use the Kennely theorem?

Thanks in advance!


texts: Signal Conditioning using Opamp -Need Help

texts:
I need help in designing signal conditioning circuit using op amp.

I have my sensor out put as 0.6V for 0 deg Celsius and 1.6V at 100 deg Celsius.

So I need to level convert it to 0-5V range for an adc.

So I identified gain as 5 AND OFFSET Voltage as -3V.

Please help me to design an circuit using as differential amplifier.


texts: Difference in SystemVerilog-2005 HDL simulation behavior between Quartus Prime Lite (20.1) and ModelSim-Intel Starter Edition(2020.1)

texts:
A SystemVerilog module using an always@ block with a gated trigger does not compile in Quartus Prime Lite (20.1).  Quartus Prime reports the following compiler error message:
Error (10170): Verilog HDL syntax error near text: "iff"; expecting ")".
However, the "iff" conditional in the always@ sensitivities list is SystemVerilog-2005 compliant.  The module does successfully compile and simulate using ModelSim-Intel Starter Edition.
The following is the SystemVerilog code:
module always_ff_process();

reg [7:0] sum,a,b;
reg       parity;
logic     clk = 0;
reg       rst = 0;

initial begin
  $monitor ("@%g clk = %b rst = %b a = %h b = %h sum = %h parity = %b",
  $time, clk, rst, a, b, sum, parity);
  #1 rst = 1;
  #5 rst = 0;
  #2 a = 1;
  #2 b = 1;
  #2 a = 10;
  #2 $finish;
end

always #1 clk ++;

// use of iff makes sure that block does not get
// triggered due to posedge of clk when rst == 1
always_ff @(posedge clk iff rst == 0 or posedge rst)
begin
  if (rst) begin
    sum    <= 0;
    parity <= 0;
    $display ("Reset is asserted BLOCK 1");
  end else begin
    sum    <= b + a;
    parity <= ^(b + a);
  end
end

endmodule

I obtain no compiler error message using ModelSim-Intel and the following correct simulation results:
@0 clk = 0 rst = 0 a = xx b = xx sum = xx parity = x
Reset is asserted BLOCK 1
@1 clk = 1 rst = 1 a = xx b = xx sum = 00 parity = 0
@2 clk = 0 rst = 1 a = xx b = xx sum = 00 parity = 0
@3 clk = 1 rst = 1 a = xx b = xx sum = 00 parity = 0
@4 clk = 0 rst = 1 a = xx b = xx sum = 00 parity = 0
@5 clk = 1 rst = 1 a = xx b = xx sum = 00 parity = 0
@6 clk = 0 rst = 0 a = xx b = xx sum = 00 parity = 0
@7 clk = 1 rst = 0 a = xx b = xx sum = xx parity = x
@8 clk = 0 rst = 0 a = 01 b = xx sum = xx parity = x
@9 clk = 1 rst = 0 a = 01 b = xx sum = xx parity = x
@10 clk = 0 rst = 0 a = 01 b = 01 sum = xx parity = x
@11 clk = 1 rst = 0 a = 01 b = 01 sum = 02 parity = 1
@12 clk = 0 rst = 0 a = 0a b = 01 sum = 02 parity = 1
@13 clk = 1 rst = 0 a = 0a b = 01 sum = 0b parity = 1
Both Quartus Prime Lite and ModelSim-Intel Starter Edition support SystemVerilog-2005.  However, Quartus Prime Lite's compiler doesn't appear to support clock-edge gating (the "iff" conditional) even though it's legal SystemVerilog-2005.  I have set the settings of both compilers to SystemVerilog and I cannot find any other applicable settings.
Please advise.  Thank you!