texts: Automatic power source selection circuit

texts:
I'm working on a project consisting of an ESP32 development board and a breakout PCB. I'd like the project to operate both with and without a USB cable connected to the ESP32.
The ESP32 has an on-board 3.3V regulator which is powered via 5V from USB if connected. My breakout board has an external 24V power supply as well as regulated 12V and 3.3V.
It'd be really convenient to power the ESP32 from the 3.3V supply on the breakout board when operating without 5V from USB being present, but having two 3.3V regulators connected to the ESP's 3.3V input when USB is connected seems like it'd be a problem.
What are good options for somehow disconnecting the external 3.3V supply from the ESP32 when 5V are provided to it via USB?
Just turning off the external 3.3V supply isn't an option as other components on the breakout board rely on 3.3V being available, and the ESP32's 3.3V regulator can't provide sufficient current for them.
The breakout board already uses op-amps, inverting Schmitt triggers, NPN and PNP BJTs, and N-channel MOSFETs, so it'd be extra convenient if my goal could somehow be achieved with just those and passives to keep the BOM small.
Thanks!


texts:
I am not sure what really the term "sensitivity" means when characterizing image sensors, so I will describe what I am looking for in the sensor at the following conditions:

the exposure time is very short
the intensity if light is very low

Therefore, I need a sensor that will allow me to "see" very dim light at short exposure times. To compare the sensors (assuming equal spectral responses, exposure times), I decided that the most sensitive one will be the one that will "see" the dimmest light.

EDIT:

One problem is that different manufacturers provide different information/specs for their product, so it is difficult to compare them and choose the best one for application. I took one example and tried to calculate it's minimum amount that must reach the pixel before it can be detected. Please, correct me if I am wrong:

I use "Output due to dark current" and "Conversion Gain" values to determine how many electrons converted from light are needed to reach the threshold above which they will become "detected": 6mV/3.4uV/e = 1765 electrons.
I find conversion efficiency at a desired wavelength (let it be 700nm): Given that the QE(675nm) is 60%, I find that at the 700nm QE=60% * 0.87 = 52.2%
Thus, the minimum amount of photons that must strike the pixel before they become detected is 1765e/.522e/ph= 3381 photons

Now, I wish to compare this sensor to S11639, however, there is not information to calculate the number of photons as in the first example:
- The amount of electrons needed is: 0.4mV/25uV/e= 16 electrons! That is 110x less than for the first sensor. Now, there is no QE plot for this sensor. The only thing I can do is assume that at 700nm it has a low QE value, say 20%. But even with this bad QE value the number of photons needed to reach detectable range is 16e/.2e/ph= 80 photons - muuuch less than in the first case. Thus is it right to assume that the second sensor is much more suitable for my application with very low light intensities and exposure times because it needs less photons to reach the detection threshold? Are my calculations correct? Anything that I am missing?


texts: Is there risk of damage if I power a fan with my bench supply but connect the yellow wire to a fan header on a computer that has its own power supply?

texts:
I'm trying to debug an issue with a fan's voltage and how the motherboard handles the tachometer. I want to power the fan from my bench supply to give it a constant 5v but connect the yellow pin to the motherboard which uses its own power supply.
As long as I take the necessary precautions so that I'm not making a short anywhere, is thee any risk of the power from my bench supply leaking through the yellow sense while and causing damage to the computer?


texts: Need of Crystal (During UART Programming A Bare SI-Tiny-Gecko Chip)

texts:
I'm trying to set up a proper circuit for a bare chip (currently I  have EFM32TG222F32 under my reach but I want to be able to work with any chip I get.) I'm setting up my circuit on a breadboard using a "QFP-to-DIP" adapter and proper capacitors, resistors, etc.

(I'm following the Hardware Design Considerations document that is released by Silicon Labs)

I'm using a USB-UART adapter to try to program the chip (using ".bin" docs generated by uVision).

(I'm following the AN0003 and AN0042 documents - also released by Silicon Labs)

Do I need an external crystal for my circuit?

If I decide to use a crystal, how I am going to find the proper values for the load capacitors that I need for connecting a crystal? (Values are not specified in datasheet or reference manual) (I'm planning to use a 24MHz or 8MHz crystal since those are the parts I own right now)


texts:
I've read that with an NPN transistor, there is a voltage drop of about 0.6v between the base and the emitter. So you need to have about 0.7v on the base to switch it on (circuit 1)

But what happens when you have say 5v on the base? (circuit 2) Where does that extra 4.3v go? what is it being dropped across?

If your base voltage is higher than 0.7v, should you always have a resister on the Emitter to drop the excess voltage? (crcuit 3)


texts: Why is there 10VAC between me and a gas oven, 50 VAC between me and an electrical oven, and 110VAC between electrical oven and gas oven?

texts:
I have a gas oven which connects to a metal gas pipe, this oven can be considered grounded through the gas pipe, (the oven is not grounded in any other way).
I also have an electrical oven which does not connect to the gas oven and it is elevated/sitting on a wood enclosure, it has a voltage on its chassis relative to the gas oven as 110VAC (220VAC is in the sockets). I think the voltage on the chassis is there because the chassis is a ground of a capacitor used in the AC->DC convertor for oven's digital clock and logic board
(see accepted answer here - Lack of Earth wire if you think this is a ground fault - it's not). This oven is not grounded in any way, so the leakage current will shock you if you touch both the gas oven and the electrical oven at the same time.
However, I also measure 50VAC between me and the electrical oven when I stand on the floor barefoot, it drops to about 20VAC if I sit and raise my feet above the floor or put on rubber slippers, so the less connection I have to the floor the less voltage difference there is between me and the electrical oven. If I touch the gas oven with one hand, the voltage difference between me and electrical oven is 110VAC . So, obviously, the less resistance I have to the ground the more voltage I measure.
Why does adding resistance causes the voltage reading on a DMM to decrease in an OPEN circuit? This is not a closed circuit when I only touch the ground as the electrical oven is elevated (it does not touch the ground).
I was actually expecting that the voltage difference between me and and electrical oven would be 100VAC even if I don't touch the gas oven, considering there's a 10VAC difference between me and the gas oven when the only thing I touch is the floor.
The circuit as I think of it:

simulate this circuit – Schematic created using CircuitLab
P.S.
I don't have grounding in the building because it's old and the wiring has never been updated, the system used is TN-C, there are only two wires in the sockets, hot and neutral.


texts: I am feeding a 7809 with a 12v input to generate 9v. The problem is my op amp needs a range of -9v to 9v. How do I set this up?


texts: Routing multiple power supplies on the same PCB

texts:
I am designing a simple battery monitoring board with Arduino nano BLE to send data to an android phone. For this board, I need a +15V,-15V,+5V supply for the sensors and Arduino respectively. Do I need to add a different plane for each and every supply trace? Or can I get away with a simple 2 layered board with the bottom plane as the ground plane?
Note: I am using LT3958 IC for power regulation. The datasheet for the IC is here. The supply is a 68V battery pack.


texts:
I am trying to install a video doorbell that requires an 18-24VAC supply voltage. The existing doorbell is supplying 28V.
How can I use a resistor to drop the voltage down to something below 24VAC so I can connect the doorbell without having to replace the transformer?


texts: Relation between C-rate and power of a battery

texts:
I'm a non-engineer, but I need to understand the function of a battery. I hope you can help me!

For example, I have two bulk storages.

5MW (power) 5 MWh (capacity)
5MW/10 MWh

So the definition of the c-rate is: A C-rate is a measure of the rate at which a battery is discharged relative to its maximum capacity. A 1C rate means that the discharge current will discharge the entire battery in 1 hour.

So for the second storage, a 1C shouldn't be possible? Because it is not possible to discharge the whole capacity in one hour because of the power? I'm a little bit confused.


texts: I need help calculating the output value for the OPA381. My circuit (see image below) is attached to a photo diode with a dark current of 9nA. The Rf resistor is 5.2M ohm.  The OPA381 is set up as inverting amplifier so Vout is (9nA x 5.2M ohm). But why is the value 2.8? This is an exercise and I need justify my answer to my teacher.


texts: How far apart should PCB traces be for mains isolation?

texts:
As a hobby project I'm building a power line monitor to detect when a load is switched on and turns on some additional loads.  I have 120 V 220 V running through my board and was curious what the standard board spacing is for high voltages.
I'm sure there's some specs by UL or other agencies for this, but I'm cheap.
Edit:
Correction, the voltage I'm working with is 220 V, powers a cabinet saw.  In any case, is there a general formula, possibly even for higher voltages (e.g. flyback for fluorescent lights)


texts: Is my 600W boost broken or malfunctioning?

texts:
I'm asking this mainly as a sanity check and to distinguish between whether I've just done something wrong or need to buy a new one.

I have a "600W" boost converter based on the UC3842A SMPS w/ CC chip.. Winfield Hill has done a pretty complete schematic which you can find here.

schematic http://cr4.globalspec.com/PostImages/201405/eBay__600W__boost-converter_sch_7D9E46E8-5056-8D7B-05C2BA65111E35F9.jpg

I'm using a 65W SMPS power supply. As a load, I'm using a 70ohm power resistor (heating element actually).

Using 19.0V in, when I turn the boost converter all the way down V-ADJ and I-ADJ 100% CCW, I get 18.9V out and a draw of 0.27A, as expected. If I turn I-ADJ all the way CW, nothing changes, as expected. Now, I turn V-ADJ CW so that I get 38V out and draw 0.55A. Everything as expected so far.

Here's the part that seems completely wrong: If I now turn I-ADJ 100% CCW (raising the resistance on the pot to 100K), very little happens. Voltage drops to 37.7V and current remains at 0.55A (probably a slight inaccuracy in my panel meter.) This is repeatable. 38V to 37.7V. This is repeatable at many other voltages as well, for example, something similar happens at 50V and 70V.

What I expect to happen is at 38V, if I turn I-ADJ 100% CCW, for the voltage to drop to 18.9V as it tries to limit the current.

Unless I'm losing my mind, this device used to work and I think I may have caused it to stop working. What I've done is replaced the 100K I-ADJ trimpot with a 100K wirewound pot. It turns out my 100K+/-5% pot is exactly 90K at max, so I've tested all of this with a 10K resistor in series with it, just in case.

So, just to clarify: I've tested the pot independently of the circuit and it's fine. I've ensured its wiring is correct and I've even reversed the wiring just to prove it to myself. Voltage adjustment is working perfectly as expected and it's also using a 100K wirewound pot instead of the default trimpot.

I've verified continuity of the pots to the correct positions on the board. I even verified continuity up to the pins of the chip. Everything is hooked up and hooked up correctly.

I've tried my best to understand how CS works on this board using the datasheet but it is honestly beyond my skill level at this point. I did some measurements anyway in hopes that they may be useful in this question:

At 18.9V, drawing 0.27A with pot set to 100Kohms,
the voltage across the pot is 15mV and the voltage across V.CS(pin 3) and GND (pin 5) is 15.5mV.

At 18.9V, drawing 0.27A with pot set to 10Kohms,V.pot is 5.5mV and V.CS(3)-V.GND(5) is 9.7mV.

At 38V, drawing 0.55A with pot set to 100Kohms, V.pot is 319mV and V.CS(3)-GND(5) is 330mV.

At 38V, drawing 0.55A with pot set to 10Kohms, V.pot is 33mV and V.CS(3)-GND(5) is 50mV.

Why does it seem to work just a tiny tiny bit?

What can cause this behavior? Did I fry the LM358 when I was desoldering/soldering? It's pretty far away from the pots but it's the only thing even remotely close to them. Anything else I should test? Anything else I should try modifying?

Update 1 I tested the exact same configuration with a different boost converter and it worked as expected, so mine is broken.

Update 2 I used a 2Mohm potentiometer. At 22V, drawing 0.30A, I was only able to get down to 21.90V with the 100K pot but with the 2M pot, I could get down to 2.80V. Is there anything I can do to fix it or at least further diagnose the problem?


texts: What can be the reason for a voltage drop across daisy chained RS485 servo motors?

texts:
We are using a set of RS485 servo motors(Robotis EX-106) for our humanoid robot.

This motor has a 4 pin connections namely Ground,VCC, D+ and D-. The Ground and Vcc terminals are from the power supply which is a 15V supply.

Since the motors serve as joints for the Robots limbs, they are connected in a daisy chain to send the power and data lines to each motor with minimal wiring. A schematic of the setup is as follows

(source: robotis.com)

So ideally the both the Power and Data lines reach all the motors in parallel.

With the premise set, here comes the problem.

At each node of the daisy chain(i.e. at each motor) there is a voltage drop. This voltage drop is low(0.2V-0.9V) but still significant.

For instance, with a 15 V supply, the values we get on measuring the voltage at 4 daisy chained motors is as follows(These values have been updated since the original post, with better observations)

15------[14.1]------[14.0]------[14.0]------[14.1]

Also from recent experiment , we see that the voltage drop is proportional to the number of motors in the daisy chain. For example for only one motor the drop is 0.2V, for 6 motors it's about 1V and for 12 motors we get  about 1.8V of drop.

The first reason that comes to my mind is the voltage drop across the connecting wires. But I am not sure if the wires can cause a voltage drop of this value. All my wires are less than 20cm in length and 22 AWG in gauge size. I dont think the resistance will be more than a few milliOhms. Plus these measurements are during the no load phase(no load on the servo motors) and according to the Robotis EX-106 Manual, the no load current is only 55mA which needs atleast 10 Ohms of resistance for this amount of drop.

What could be the reasons for this? Is there any way to avoid this voltage drop?

I will keep the post updated as we discover more things.


texts: Can 0V from an isolated source arc to earth ground?

texts:
I have a high voltage bus bar (~300-400VDC) that is powered by a variac.  This sits in a case that has other electronics that are powered by a step down transformer (120VAC to 24VAC, then rectified to DC).  My case is grounded to the 3rd prong of the receptacle that's fed by the wall outlet (driving the 120-24VAC transformer).

The dotted lines in the picture represent the case (an old gutted computer case, actually).

My question is, I have an LC circuit that will be ringing and temporarily getting instantaneous high spikes in voltage developed on it and some of those lines are close to the case...Since the isolated bus bars and subsequent downstream circuitry doesn't know anything about the earth ground, would it ever be enticed to arc to the case, which is earth grounded?


texts: Value of the link register when interrupt occurs

texts:
and reading the exception and interrupt handling chapter
of the ARM system design book.

I have noted that link register is not always pointed to the next resume
instruction. So it should be added or subtracted when returning.

It's not a big deal to write appropriate assembly code for that. But
my question is why they design the processor to behave like that?
Is that design is to reduce the complexity and number of transistors?
So that complexity could be switched to compiler writer, Am I right
guessing why.


texts: Fully Differential Amplifiers - Why does M3 drop to linear region?

texts:
From http://www.ece.tamu.edu/~spalermo/ecen474/lecture17_ee474_fully_diff_amps_cmfb.pdf

I'm having some trouble understanding why M3 drops to linear region.

First Question - The increase in Ib should only cause M3 to drop into linear/triode if that change in Ib was caused by an increase in abs(Vb) - correct? Then I can understand that the abs(Vds) > abs(Vgs-Vt) condition could be violated. So, what is causing the increase in Ib here?
Second Question - Consider the following Id/Vds plot

Now, let's say that M3 was in saturation when only Ib was flowing. How could an increased Ib be supported when M3 is in linear region? Surely, the linear region supports a lower current than in saturation?

TLDR:
What causes the increase in Ib and why would M3 drop to linear region because of it even though linear region supports a lower current than saturation?


texts: In which pratical cases are used parallel and thevenin terminations?

texts:
I've found some theory about various type of terminations but I can't figure in which cases are used parallel(pullup with half driving voltage and pulldowns) and thevenin termination. Since I'm used to simply boards with microcontrollers, where I can encounter this two type of termination and in which cases? Are something used in "extreme" cases like very long cables, critical or high power EMI applications?

This is an example of a Thevenin termination:


texts:
I have a PCB board and the ribbon cable keep drop out easily. I'm planing to find a way to solve it.

In my mind, I was thinking of:

Add in another connector (adaptor) with the locking type on top of the connector on the PCB board.
Replace the connector on the PCB. (I can not do it but the pin to pin distance is 2 mm)


texts: PIR HC-SR501 and TIP122 - TIP 127 heating problem

texts:
I'm having a problem with a circuit commanded by a PIR.

I managed to ring a chinese doorbell when someone pass in front of the PIR but the main problem is the two transistors become very hot and I don't understand why.
The doorbell is a chinese model like this:

This is the circuit:

When the button is pushed it connect the positive from an LR23A battery to the circuit and send the radio signal to the receiver so I use the PIR and the two transistors to close the circuit when the PIR detect a presence.
The battery can provide 55mAh so the circuit has a very low power consumption compared to the TIP122 and TIP127 capacity.

What's wrong with this circuit?

Thanks in advance for your attention.


texts: Why float data type is not accurate on a STM32?

texts:
I'm using STM32F103C8T6 and my compiler is KEIL 5. I have written a simple program to check something but I found out an interesting point. When I download the program to the MCU, aaa and bbb have to be 12.56 and 62.8, but when I debug the program on the MCU, the initial values of these variables becomes these: aaa=12.5600004  and bbb=62.8000031. the program:

#include "stm32f10x.h"
float aaa=12.56,bbb;

int main(void)
{
    bbb=aaa*5;
    while(1){}
}

Also keep in mind if I change float to double, it works without problem.


texts: What determines the number of pixels in front porch and back porch of VGA display?

texts: Besides this, is pixel clock dependant on the VGA resolution and referesh rate or independant of them? What does one know what duration each pixel should have?


texts:
I am a total beginner in electronics. I think it's apparently easy to identify all the concepts in the tutorials and books. The problem is that the concept is exemplified only a few times in simple circuits and when I try to analyze circuits "not didactic" I can not identify certain concepts, including the mesh / loop.

Everywhere says "meshes are closed paths between two points", "the voltage is divided between the mesh resistors!" but it seems very vague.

Ok, let's say a mesh is a closed path from A to B, but what if this path is cut by a branch, it will remain a closed path or become two spots?

In the examples I see only a square connecting the positive to the negative of the source but can not see it in larger circuits!

What is the easiest way to understand this?


texts: noise on RS485 with MAX485 on short line with biases

texts:
I am connecting an industrial device (controlled over LAN) with RS485 output signal with Arduino via MAX485 board.

I connect the RO (receive out) pin of the ma485 to D3 on the Arduino (read via change interrupt handler); RE (receive enable) is pulled low (receiving enabled), DE (driver enable) is also pulled low (transmitting disabled), DI (driver in) is unconnected.

The RS485 cable is UTP, only about 2m long, so I did not put any terminating resistors; I did put pull-up for A and pull-down for B (both 330Ω) though.

The communication works mostly fine, I switch the RS485 value in the device over LAN between 0 and 1 every few seconds and see the changes on Arduino side.

Sometimes, though, the reading goes crazy and when the signal transmitted should be 0, I am seeing rapid erratic changes between 0 and 1 instead of plain 0. The value of 1 is stable.

I don't have an oscilloscope ATM to check the signal more precisely; when the signal is stable, voltmeter report 0.2V  for 0 and -2.5V for 1 between A and B lines.

Can someone with experience tell me where to look for the source of this sometimes-occuring erratic behavior?

EDIT: finally data from a scope.

Logical 0 (high) on the RS485 looks like this:

while logical 1 (low) looks like this:

This is the first time I used a scope, hopefully the screen makes sense. The logical 0 is stable (after decoding via the MAX485 board) while logical 1 is unstable -- look at the high spikes ocussing periodically, they have the same value for both 0 and 1. Where could that come from?

I solved for now the problem by primitive low-pass filter in the arduino (sliding window) though I am curious if someone has an explanation. I removed my own pull-ups as suggested in comments since those are already on the max485 board.


texts: Transformer Design Using AP Method and Construction

texts:
I am designing a transformer for a traction inverter using the AP method.

1) I have chosen a Metglas core with a saturation flux of 1.56 Tesla. I have chosen a operating flux density of 0.6 Tesla. What is the practical limitation preventing me from running the core at 1 Tesla or more, is it simply core loss?

2) At full output the core loss would be 1.3kW at 0.6 Tesla and 3.2kW at 1 Tesla. Copper loss is another 300W. I can attach to core to the cooling plate shared with the switching devices. Is cooling 1.6kW to 3.5kW reasonable?

3) At full output the MMF will cause a decrease in AL value and hence decrease in inductance. Are there guidelines for acceptable decrease or is the evaluation done using circuit simulation

4) Using 400A/cm^2 current density (good value?) and 30kHz switching frequency I have determined the primary will require three parallel layers of 80mm by 0.508mm copper foil with 7 turns. Is it acceptable to have the parallel layers uninsulated with each turn insulated or must all conductors be insulated from each other.

5) How are the foil ends terminated? Soldered to like thickness copper at a right angle to form a tab?

6) What materials should be used to gap the core, is hard plastic acceptable

Thanks for the help]1


texts: 13Bit Encoder interface for microcontroller

texts:
I am running out of time and seeking a proper solution.
What I am willing to achive is getting the position of the encoder / motor shaft. To keep track of the movement. (Currently I am running 10 turn pots, but hey are going to wear out eventually and if there is a built in encoder why not to use it?)
The configuration is the following:
HiWin Motor (Builtin 13Bit encoder) -> HiWin D2 Drive -> A A' B B' Z and Z' lines coming form the drive.
They are differencial +-5V
The link for the motor controller:
http://www.hiwin.com/pdf/d2_drive_user_manual.pdf
Manual says:

Output pulse of feedback (buffered encoder or emulated encoder)
RS422

The waveform of signal "A":

I have got the following parts on hand:

SP3495EEN-L
SP3496EEN-L
ST485ECDR
ST485CDR

These are transcievers with various speeds from EXAR and STM.
I would like to get this work either an Arudino or a TM4C microcontroller (which has a built in Quadrature Encoder Interface).
My questions are:

Are any of these parts will do the trick?
As this is a serial communication I will simply receive a message containing the position?
What would be a better solution (Some other ICs to get? Maybe a different approach?)?

Edit: *typo


texts: In my book there is no explanation of the phrase short circuit but at many places the author has used it. I had googled it. Some explain it as the flow of charge along a high potential difference while others explain it as the flow of charge along a low resistance path. What exactly is a short circuit? An explanation along with a diagram would be very helpful.


texts: PSpice cascode mosfet design not working properly

texts:
I'm making a Common Source amplifier using a mosfet and then comparing that to the same basic setup but with 2 mosfets in cascode. However I get a nearly identical response for both circuits. I'm trying to use a Mosfet with Kp=1 mA/V2, Cgd=8fF, Cgs=50fF, Vtn=2V, LAMBDA=0.I believe I've edited the model correctly, but I don't believe I should be getting the same response from both circuits. What am  I doing wrong?

This is the Cascode Circuit

simulate this circuit – Schematic created using CircuitLab

ed.

And this is the Cascode

simulate this circuit

When I run them trough PSpice I get this output Where Red is the response from the cascode and yellow is the response from the common-source

And here is the model I'm using for the mosfet:

.model Mbreakn NMOS

LEVEL=1 VTO=2 GAMMA=0.45 PHI=0.9
NSUB=9E+14 LD=0.08E-6 WD=0.08E-6 KP=0.002 LAMBDA=0
TOX=9E-9 PB=0.9 CJ=0.56E-3 CJSW=0.35E-11
MJ=0.45 MJSW=0.2 CGDO=0.3E-9 JS=1.0E-8
CGSO=50fF
CGDO=8fF


texts: Pole/Zero plot is the same for passive and active (w/ gain) bandpass filter, why?

texts:
I have designed an active inverting bandpass filter, and when comparing its pole zero plot to a passive bandpass fitler with the same cutoff frequencys, the pole zero plot is exactly the same, even though the bode plots for both are different. I will run through my calculations and results below.

With a gain of 2.5, Lower cutoff of 75Hz, and uppper of 31kHz, I found component values to be: \$R_1 = 2122\Omega\$, \$R_2 = 5305\Omega\$, \$C_1 = 1\mu\text{F}\$, \$C_2 = 0.967\text{nF}\$. From which I derived the transfer function and came find the following:

$$H(s) = -\frac{R_2C_1s}{(1+C_1R_1s)(1+C_2R_2s)}$$

$$=> H(s) = -\frac{5.305\times 10^{-3}s}{1.088\times 10^{-8}s^2 + 2.127\times 10^{-3}s + 1}$$

Using Matlab, I got the following result (Bode and Pole Zero Map)

To compare how the system responded compared to a passive bandpass filter seen below, I used derived the transfer function and placed the same values used for the other filter, thus giving the same cut-off frequencies.

$$H(s) = \frac{R_2C_2s}{(1+R_2C_2s)(1+R_1C_1s+ \frac{R_2}{R_1}R_1C_1s)}$$

$$=> H(s) = \frac{5.13\times 10^{-6}s}{3.81\times 10^{-8}s^2 + 7.432\times 10^{-3}s + 1}$$

When processing this in MATLAB, I get the following plots:

What is didn't expect or understand is the pole zero response. What do the poles and zeros represent in this system, and also shouldn't the opamp introduce its own poles and zeros and its is adding gain to the system. I tried reading on the pole zeros responses of low pass and high pass filters on google, and they look nothing like my results! Added to that, I was originally trying to understand at what point of the system the gain is applied too, from looking at this response, is it correct to assume the system is LowPass>Gain>HighPass?


texts: How to control one motor with two float switches

texts: I have 2 tanks , one is under another and hopes to pump from under tank to upper one using a 0.5 Hp single phase motor.By connecting float switches for both tank,can I control the motor to turn on when the water level of lower tank is high and switches off when the water level of upper tank is high ( Upper tank has lower capacity than Lower ) and vise versa


texts: What does "strobe" do for this shift register?

texts:
I would like to know what 'strobe' pin does for HV5812 shift register, because I do see it in the time graph

But the datasheet does not elaborate on its function, it only says 'strobe'

Is this pin crucial for the functioning of this shift register? What does it do? I have worked with 74HC595, but I see this for the first time.


texts:
I have a couple of FPGA setups to capture images from an Aptina/ONSemi MT9P031 sensor.
I've done this in the past with no issues but now I have a strange problem.
I have a bit of scene dependent noise that follows along with some contours of objects that can be seen in the image. Will attach an example, you can see a ring of black or white pixels surrounding the lit-up button on the pictured equipment, and similar garbage on the text or edges of the other buttons.
A couple of REALLY weird things about it -- if I use a Salae logic analyzer, connected to some soldered pins on my board that are on the traces between the camera and my FPGA, it can actually capture a perfectly clean image without this noise. I would have thought if anything this should be worse because it's going off-board across some extra flying leads and at the end of the day the Salae logic is another FPGA.
Two reasons why I don't believe the problem is in my external memory that I use to store the image. One, if I replace pixel data with a test pattern driven by the camera's pixel clock, it comes across perfectly cleanly.
I also observe the same effect with the same camera attached to a Cypress FX3 dev board and no FPGA in between.
I've also tried doing what the Salae does, sampling both the pixel clock and data on a faster clock and just looking for the edges in the pixel clock, but the result is the same.
I have a hunch that this has something to do with too many bits on the parallel bus trying to change at one time, but it's really curious that the logic analyzer doesn't have the same problem. Anybody have any ideas on this by chance?


texts:
I am having trouble with a board I have had fabricated. The processor is an NXP LPC1788 Cortex-M3.

I am using a 12 MHz external crystal to clock the processor as recommended in the datasheet.

For some reason I cannot get the crystal to oscillate. I'm unsure if I am checking it correctly on my scope, but I cannot see any consistent oscillation.

Here is the datasheet for the crystal: http://www.txccrystal.com/images/pdf/8z.pdf.

It has a load capacitance of 18 pF, the LPC1788 datasheet recommends external load capacitors of 39 pF with a crystal of load capacitance of 20 pF, so I have tried 39 pF load capacitors with no joy. I have also tried 18 pF load capacitors as recommended by LPC1788 datasheet for crystals with approximately 10 pF load capacitance.

I would really like to at least understand why the crystal is failing to oscillate before I do another run of the board, as it is quite expensive (four-layer board).

Here is an image of the crystal routing.


texts: Convert the input of an ATX power supply from 110 V AC to 11-14 V DC

texts:
I was just wondering if it is possible to convert an old ATX power supply for my server. It feeds with 110 V AC from the grid, but I want to operate my mainboard directly from the solar battery, which has 11 to 14 V DC.

Could this be theoretically possible?


texts: uFL Antenna feed line on a 4 layer PCB [ESP32 WIFI Chip]

texts:
I'm designing a PCB which uses the ESP32-D0WDQ6 WiFi chip (not the entire module!). I want to add the uFL connector so that I can connect an antenna instead of using the PCB trace antenna.

Now, I searched for this before and found this in a datasheet of SIM9000 which is related to designing a 3G module which an antenna connector:

This shows the recommended layout for the 3G module's antenna feed line on a 2 layer board.

My question is, can I use the same idea with my ESP32 chip on a 4 layer board? (I have inner layers dedicated to ground and power plane each)

More specifically, is it needed that the inner copper pours (ground and power planes on inner layers) be left under the antenna feed line and the uFL connector itself or do I have to remove them?


texts:
I've been practising loop analysis questions, but don't really understand why the method is valid.

Say you have a circuit that only consists of resistors and some power source. Assume the circuit is valid (contains no contradictions)

How do we know that the currents in each node can be expressed as a sum of loop currents? Just because current exists in the circuit, doesn't necessarily imply that the current can be expressed as loop currents.

So could someone give me a proof that if a current exists through the circuit, its necessarily expressible as a sum of "loop currents"?

Example

For instance let C1, C2 be actual currents flowing through some nodes. They aren't abstractions - these are measurable currents that actually exist.

Now essentially loop analysis expresses these real, measurable currents as the sum of abstract loop currents. You represent the current in nodes that are on the "sides" of two loops as sums of the loop currents in those loops. Without loss of generality, for some loop currents L1, L2 say you express the physical currents as:

C1 = L1 + L2

C2 = L1 - L2

What essentially confuses is that loop analysis assumes that some values L1 and L2 exist that meet the above criteria. In other words, it assumes that the above system of equations has a unique solution.

So why is it okay to assume that the actual currents, the physical currents, flowing through the nodes can always be expressed as loop currents?

For an even more concrete example, consider this circuit:

Note how the real, physical currents are being expressed as sums of loop currents. I don't understand why this step is always valid. How do we know there exists some Ia, Ib, Ic and Id that fulfill the above system of equations?


texts:
I have a Blaupunkt Bluetooth soundbar where the USB 5V cable is broken (the plug is indefinitely broken no repair possible.)
My thought was to remove the 3.7V battery and use the cable to solder my 3.7V powersupply to it.
Would this be something that is possible? It seems logical to me that this is indeed possible.
I can post a picture of the PCB but I can't find the schematic of it online.
I'm not sure if a picture would be able give the solution.


texts: Changing DB9 Gender: Crossover or Straight?

texts:
I have a USB-DB9(Male) that needs to communicate with a device that has a DB9(Male) port.

Do I connect both DB9(male) ports together using a null modem (crossover) cable or a straight through cable?

Pinout of device is here. Pin 2 is Transmit, Pin 3 is Receive.

Pinout of USB-RS232 cable, I assume is the same pinout as the one found on computer motherboards. Pin 2 is TX, 3 is RX.


texts:
I have got to run a 240 volt 60 watt air pump for a domestic sewage treatment plant. There is no mains electric on site at all so generators run at evening time  for power.

I am now thinking that the only way is a battery bank and a 12 to 240 inverter.

My question is what size battery bank would be needed to power the 60 watt 240 volt load for 24 hours?


texts: I would like to ask about three kinds of electrical contacts: dry, wet and free voltage. What is the difference between them?


texts: Finding the system function of a digital filter

texts:
I am studying for exams and I need help with a question I came across in a textbook.

Given a digital filter $$y_n = a(x_{n-1} + x_{n+1}) + bx_n$$ find the system function of this filter and the location of its poles and zeroes.

This is what I have done to find the system function:
$$Y(z) = a(X(z)z^{-1} + X(z)z) + bX(z)$$
$$H(z) = Y(z)/X(x)$$ so $$H(z) = a(z^{-1} + z) + b$$

Because the denominator is one, the pole should be at the origin, but how do I find the zeroes? And is my solution for the system function correct?

Help is much appreciated, thanks.


texts: Male/female jumper wires for really small and close-to-each-other pins

texts:
I have a 20 pin 'male to male' 1mm pitch connector as shown in the included picture (I'm not sure if it's the correct name).
One side will be soldered to the board, and the pins on the other side need to be connected to USB, or a serial port.
The question is - what is the easiest way to do it? My soldering skills are not the best, and soldering wires to the really close together pins might be difficult. Are there male/female jumper wires so small that could make this process easy? I guess I would need less than 0,5mm female part of the jumper wires to be able to expose all the pins.
All suggestions are highly appreciated!


texts:
I was studying the manuals of the Horizon 1000XP Fuel Cell and I came across this chart:

First Question:
Lets assume that I put a specific resistance to the fuel cell output. How can I find the operating point of the fuel cell? As I see it, neither the voltage, nor the current are stable. I also don't quite understand how can the voltage depend on the current being drawn. In classic circuits, one has a certain voltage and a certain resistance, and can then find the current (I=V/R).

(In the manual it says that when the load is zero (also current is 0) the voltage has its max value. When a load is connected, a current flows through it. This in turn should drop the voltage a bit, which would also cause a decrease in the current and so on..)

Second Question: I have read that to increase the power sent from the fuel cell, you need to increase "the load", or "the current drawn from the load". Assuming that I have only ohmic loads, how can I control the current flowing through my load? For example, lets say that I want 1000W to be given from the fuel cell. What should my load be in that case?


texts: How does the power consumption and cooling capacity of a Peltier refrigerator change when the interior is made reflective?

texts:
I've a small Peltier cooler which I used to store some chemical stuffs. So, I recently modded the design to make it more bigger and improve its cooling + insulation.

I've added an aluminium piece plate as the base which is in contact with the cold part of the Peltier, the other four sides are covered with thermocole. I keep it running 24x7 on my atx power supply. I have installed a refrigerator gas expansion thermostat in it to turn-off once it is sufficiently cool inside(-1C to 0C).

My question is how does the cooling change if I stick aluminum tape on the inside of the thermocole insulation (interior of the cooling cabin) and make it reflective? Will it increase the cooling capacity and reduce the power-on time?

Note: I've posted it here since most of the Peltier questions are here. If this is the wrong forum please guide me move it to the appropriate forum.Thanks.


texts: Differential impedance of LVDS rules and tips?

texts:
I'm designing a interface PCB with I/O modules using ethernet.
It is my first PCB with high speed communication, which is giving me a lot of worries.

In the modules documentation it says that the LVDS differential impedance shall be 100ohm, but no tolerance. It also recommend that they are routed between two ground planes.

I have read design guides and rules:

My PCB stacking design looks like this:

18um copper
0.36mm FR-4 STD
35um copper
0.71 FR-4 STD
35um copper
0.36mm FR-4 STD
18um copper

Questions

I'm routing on the second copper layer, which makes the distance to
the upper and under GND layer different is that a bad idea?
The guides says spacing under 0.25mm between the differential pair with a width of 0.25mm trace. when i use Saturn PCB design to match the differential impedance to 100ohms i get 0.6mm spacing with a trace width of 0.254mm. This is more than the to times trace width which is recommended (also read as close as possibly). Should i make the trace width smaller or change something else?
I read that the maximum trace length should be 50mm(TIA/EIA-644 LVDS), which is not er problem. But what about the length differences tolerance ?


texts:
I am trying to use this 5V RAVPower battery pack to drive some electronics and a high-current load:
http://www.ravpower.com/ravpower-dynamo-on-the-go-rp-pb07-super-high-capacity-power-bank-10000mah-capacity-1a-and-2a-dual-usb-output-for-ipod-iphone-smartphones-digital-cameras-tablets-and-e-books.html

I find that when my logic turns on the large load (~800mA), the 5V voltage drops to around 3V and my LCD screen can no longer function.

It seems that I need to regulate the 5V output of this battery, correct?

I suspect that what I need is a buck-boost converter that will boost the voltage to something higher than 5V, and then step that down back to regulated 5V.

Am I on the right track? If so, could someone recommend a through-hole part? I am having trouble locating one...

EDIT:

Some of the comments below suggest that the battery pack I am using will not be able to provide the needed 800mA at 5V. This is ok - I am willing to let the current drop, as long as I can maintain the voltage at 5V. Could I use something like this for the job?
http://www.digikey.ca/product-detail/en/MIC2296YD5%20TR/576-2659-1-ND/1821819


texts: What is the coil voltage of this contactor?

texts:
Sorry for dummy question but I don't know how to identify the coil voltage necessary to activate this contactor?

Thank you


texts: Input Characteristics of MOSFET in triode region?

texts:
When a MOSFET is operating in saturation region, i.e. \$V_{GS} > V_{th}\$ and \$V_{DS} ≥ ( V_{GS} – V_{th} )\$, the drain current equation clearly indicates the parabolic relation between the drain current and input voltage:

\[
I_{Dsat}=Kn' \cdot \dfrac{W}{2L} \cdot (V_{GS}−V_{th})^2
\]

hence \$I_{Dsat}\$ is directly proportional to the square of \$V_{GS}\$.

However, when operated in triode region, the drain current equation is given by:

\[
I_D=Kn' \cdot \dfrac{W}{L} \cdot \left[(V_{GS}−V_{th})V_{DS} - \dfrac {V_{DS}^2} {2} \right]
\]

Am I right in saying that, for a fixed \$V_{DS}\$, the drain current is linearly dependent on \$V_{GS}\$? Although the equation indicates a linear relationship between drain current and input voltage for a fixed \$V_{DS}\$ such that the device is in linear region, the results of simulation are quite different.

Instead of a straight line, the simulation results in a parabolic curve that saturates for some value of \$V_{GS}\$ (even if there is no resistor connected between the drain and \$V_{DD}\$).

Edit

Here are a few questions:

What I understand is that, if the MOSFET is in saturation the ID versus VGS curve would be a parabola as shown:

Changing VDS has no effect on this curve (neglecting channel length modulation) right?

But if ID versus VGS is plotted for the MOSFET in triode region, it would be linear(For a fixed VDS such that the device is in triode region) as evident from the equation:
\[
I_D=Kn' \cdot \dfrac{W}{L} \cdot \left[(V_{GS}−V_{th})V_{DS} - \dfrac {V_{DS}^2} {2} \right]
\]

So in the above equation, if VDS is fixed, ID would vary linearly with VGS.

Why isn't this characteristic of MOSFET exploited? Why do we settle for the "nearly-linear" ID versus VDS relation when we can have a perfectly linear variation of ID with VGS?


texts: RC integrator circuit - can a high RC product really by approximately equal to Vin / R?

texts:
This question is very much related to Why do R and C have to be small for differentiator circuit asked earlier.

On page 26 of Art Of Electronics, 2nd Edition, the book makes the statement that if we manage to keep \$V\$ much less than \$V_{in}\$, by keeping the product \$RC\$ large, then.

$$
C {dV \over dt}
$$

is approximately equal to

$$
V_{in} \over R
$$

The original equation, prior to simplification, is

$$
I = C {dV \over dt} = { { V_{in} - V } \over R }
$$

Why is this so?  Or, Why must we manage a relation of \$V\$ and \$V_{in}\$ by juggling \$R\$ and \$C\$.

I know \$RC\$ is the time constant.  I suspect that if you make it long enough, \$V\$ can always be made to be less than \$V_{in}\$ given some \$dV \over dt\$. If that is so, I see the simplification above.

However if I expand the original equation I am not seeing it mathematically.

$$
I = C {dV \over dt} = { { V_{in} \over R } - { V \over R } }
$$

Yeah, if you make \$R\$ large enough, \$V \over R\$ will be insignificant, but won't \$V_{in} \over R\$ be getting close to insignificant as well? Is it always the case the \$V\$ will be less than \$V_{in}\$. If so, I see the simplification above.


texts:
I'm working on a high speed board design containing transimpedance amplifiers.
Right now, my layout seems fine, but I'm concerned about placing vias to connect ground planes. This is a 6-layered board, with all planes designated as ground planes. I was told that you should place ground vias to connect the ground planes together in order to create a stronger connection to ground between all the layers and/or possibly reduce the inductance of the overall board to allow for faster signaling.

Does the size of the via really matter, or is it better to just have as many vias as possible wherever you can? Are there some recommended areas where I should place more vias? Is this perhaps overkill with the vias? I'm using a coaxial connector for the output of the signal, so I placed tiny vias around it close to the no fill zones.


texts: Std_logic_vector to unsigned conversion problem

texts:
architecture behavioral of test is
signal lfsr_state : std_logic_vector (31 downto 0);
begin
LFSR_32_1 : entity work.setState port map(clk, lfsr_state);
process (clk)
begin
if (rising_edge(clk)) then
    if((unsigned(lfsr_state)) <= 2147483648) then
            Bit_out <= '1';
        else
            Bit_out <= '0';
        end if;
    end if;
end process;
end architecture;

Hello,
I have a problem concerning the conversion of a 32 bit logic_vector to an unsigned signal. The function above always returns '0', although I expect '0' and '1' to be returned with equal probability since the pseudo-random numbers of the 32 bit lfsr are equally distributed in the interval [0, (2^32)-1].
Might it be possible that the range of ((unsigned(lfsr_state)) is not in the interval [0, (2^32)-1]?
Thanks a lot.


texts: Do chips which do analog modulation/demodulation of QAM exist?

texts: I have this crazy idea of mixing Cb and Cr signals (from a YCbCr device outputting 720p video) into a chroma (C) signal, for a side project. Is there a simple drop-in chip solution for each side - both modulation, and demodulation/recovery? I've either only found RF/IF devices (which seem to have a limited span, often not including DC or low frequencies) or digital QAM - neither of which seem to be useful to me, unless I'm missing something. I'm targeting a low cost, low power and hopefully small size system -  but would be okay with some ideas on how to go about implementing a discrete QAM modulation system (using op-amps or other ICs as building blocks.)


texts: Laptop power supplies - why the spectrum of voltages and connectors?

texts:
Why do are laptops designed with different Voltage input requirements?  Is this just a power requirement consideration, or something more technical?  Maybe the lithium battery requirements? (And - for that matter - different jacks for the same voltage/current requirements)

Laptops that used less than 20 Watts could simply use the "yellow tip EIAJ-04 power jack". Basically this jack supplies 10.2V..13.5V@2Amps in such a way a mobile laptop can be plugged (without a voltage converter) into a Standard 12V Car battery: why isn't this done?


texts: I'm interested in using a step-up converter that has an input range of 20-500 mV (LTC3108). Is there a simple way for me to regulate the input voltage to less than 500 mV without adding significant dropoff to the low end of the range? I've been searching around a lot and am reading about zener diode regulators, low-dropout regulators, etc but everything I'm seeing appears to introduce very significant dropoff relative to 20 mV. It's totally fine if power is wasted when there are voltages above 500 mV, I just want to avoid putting more voltage than that into the chip while having a minimal or nonexistent impact on lower voltages.


texts: UART with PC : Reciving absurd characters in PC

texts:
I am working on a project using Atmega16 micro-controller of AVR family. I am using UART for my project. I need to send data to my PC AT 9600 baud rate via an USB-TTL converter and view the data using 'putty'.

I am getting absurd data in putty. I am not an electronics guy but a computer science guy so need a little bit of help.

I guess I might be writing the wrong fuse bits or something else.
Please specify the fuse bits if possible

The program for the micro-controller is below

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

#define UBRR_VALUE 51

//function to initialize UART
void uart_init(void)
{
    UBRRH=(UBRR_VALUE>>8);//shift the register right by 8 bits
    UBRRL=UBRR_VALUE;//set baud rate
    UCSRB|=(1<<TXEN)|(1<<RXEN);//enable receiver and transmitter
    UCSRC|=(1<<URSEL)|(1<<UCSZ0)|(1<<UCSZ1);//8 bit data format
}

//function to transmit data
void uart_transmit(unsigned char data)
{
    while(!(UCSRA & (1<<UDRE)));
    UDR=data;
}

void transmit_string(char *str_data)
{
    while(*str_data)
    {
        uart_transmit(*str_data);
        str_data++;
    }
}

int main(void)
{
    uart_init();
    while(1)
    {
        //transmit_string("hello");
        uart_transmit('h');
    }
    return 0;
}

The fuse bits specifications are given below

Thanks in advance for any type of help


texts: Powering multiple cellphones with a DC power supply

texts:
I have about 100 cheap cell phones that need to be on 24 hours a day.  Unfortunately (likely due to the cheap nature of these phones) the batteries end up bloating after a couple months of being connected to a charger continuously.

I’m exploring the idea of ditching the batteries and powering the phones off a large DC power supply connected to the phones battery terminals.

The batteries say they output 3.8 volts.  But should I be concerned about the over amperage?  If I connect a 3.8v 30a power supply to a single phone, is the phone going to fry?


texts: Why don't typical digital multimeters measure inductance?

texts:
Even with predominantly digital circuits, I am using inductors much more often than I used to, generally because of all the buck or boost converters (a recent board I was involved in has 12 different voltage rails -- six of them needed just by the TFT LCD).

I've never seen a standard digital multimeter (DMM) with an inductance range.  So I ended up buying a separate meter that does LC measurements.

However a lot of DMMs have a capacitance scale.  Since capacitors and inductors can be thought of as mirror images of each other with voltage and current flipped, why don't DMMs include an inductance scale also?  What's so difficult about measuring inductance that it is left off of DMMs and relegated to specialty meters?

Since inductance meters are usually LC meters (even LCR), do they measure capacitance in a different way than DMMs?  Are they more accurate than the capacitance scale of a DMM?


texts: Hello I'm very new in electronics/electrical field. I want to know what are these connectors called or where can I find reference source for connector type?


texts:
I would like to use the motor speed controller ESD5500E. Manual here.

The stationary engine which should be controled is equiped with a single phase flywheel generator which I have connected to a charging rectifier. The engine RPM range is between 600 RPM and 2200 RPM. Voltage is delivered from the flywheel generator between 1V and 18V AC.

Can I use the AC signal of the flywheel generator instead the speed control sensor?


texts: NEMA17 Stepper motor not turning, but making very little noise

texts:
I have a NEMA17 stepper motor (2 Phase, Rated 12V, 1.2A/Phase) and I am trying to make it run with an L298N and a Raspberry Pi. Everything is wired up as shown below in the pictures. I use a 12V, 2A power supply to power the L298N. The RPi is powered separately.

I measured the resistance between the different stepper motor leads. I have been told that two wires are a pair if they have very little resistance. If there is no resistance, they are not a pair. This way, I think The correct pairs are in the A and B terminals of the L298N.

I'm using the following python script:

import RPi.GPIO as GPIO
import time

# Variables

delay = 0.05
steps = 50

GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)

# Init pins

coil_A_1_pin = 9
coil_A_2_pin = 25
coil_B_1_pin = 11
coil_B_2_pin = 8

# Set pin states

GPIO.setup(coil_A_1_pin, GPIO.OUT)
GPIO.setup(coil_A_2_pin, GPIO.OUT)
GPIO.setup(coil_B_1_pin, GPIO.OUT)
GPIO.setup(coil_B_2_pin, GPIO.OUT)

# Function for step sequence

def setStep(w1, w2, w3, w4):
  GPIO.output(coil_A_1_pin, w1)
  GPIO.output(coil_A_2_pin, w2)
  GPIO.output(coil_B_1_pin, w3)
  GPIO.output(coil_B_2_pin, w4)

# Example rotations: forward and backward

for i in range(0, steps):
    setStep(1,0,1,0)
    time.sleep(delay)
    setStep(0,1,1,0)
    time.sleep(delay)
    setStep(0,1,0,1)
    time.sleep(delay)
    setStep(1,0,0,1)
    time.sleep(delay)

for i in range(0, steps):
    setStep(1,0,0,1)
    time.sleep(delay)
    setStep(0,1,0,1)
    time.sleep(delay)
    setStep(0,1,1,0)
    time.sleep(delay)
    setStep(1,0,1,0)
    time.sleep(delay)

The stepper motor does not move whatsoever, unfortunately. It does make very little noise when running the script.

Any ideas on how to troubleshoot this project are very welcome.

More details on the stepper motor:
PHASE : 2 PHASE
STEP ANGLE : 1.8 ± 5% ° /STEP
VOLTAGE : 12V
CURRENT : 1.2 A/PHASE
RESISTANCE : 10.0 ± 10% ?/PHASE
INDUCTANCE : 20 ± 20% mH/PHASE
HOLDING TORQUE : 48 N.cm Min
NUMBER OF LEADS : 4
LEAD STYLE : AWG26 UL1007
LEAD STYLE : AWG26 UL1007
ROTOR TORQUE : 68 g.cm2
INSULATION CLASS : B
SIZE : 41 x 41 x 62mm
WEIGHT : 181 grams


texts:
I'm trying to rate the speed of my pathetic attempts at electronics against what's historically possible.

So sticking specifically to through hole construction, how fast can a soldered PCB operate?  The fastest I've personally done is about 5 MHz (analogue) and I wonder where this falls on the speed spectrum.

I found this:-

It's   an AMD 586-133 motherboard,and in the top right you can see through hole memory chips. They're UM61256FK-15's with (I'm guessing) a 15ns access. There's also a DIP package squeezed in between two of the ISA sockets in the bottom left corner.  And lot's of through hole bypassing capacitors and parallel resistor networks.  You can also see other major components surface mounted, so I guess that this board was designed somewhere around the transition to SMDs.  Surely through hole PCBs can't go to 133 MHz can they?  And is there a different maximum for analogue and digital circuits?


texts: Is using memcmp when updating struct in EEPROM okay?

texts:
I am writing a generic update function for EEPROM which compares old value with new one and then if values differ writes new one to eeprom. This is the function:

template <typename T>
void update(uint16_t update_address, T& update_value)
{
    // Do not attempt to read until device is ready
    while (!TM_I2C_IsDeviceConnected(EEPROM_I2Cx_, EEPROM_ADDRESS)) {}
    T current_value;
    read(update_address, current_value);
    if (memcmp(&current_value, &update_value, sizeof(T)) != 0)
    {
        // Do not attempt to write until device is ready
        while (!TM_I2C_IsDeviceConnected(EEPROM_I2Cx_, EEPROM_ADDRESS)) {}
        write(update_address, update_value);
    }
}

The problem is comparison. I read that due to padding the variables might differ if they are structures in certain cases and its generally bad idea to use memcmp to compare two structures. But I want my function to be generic. I could assume that "==" operator is defined and use

template <typename T>
void update(uint16_t update_address, T& update_value)
{
    // Do not attempt to read until device is ready
    while (!TM_I2C_IsDeviceConnected(EEPROM_I2Cx_, EEPROM_ADDRESS)) {}
    T current_value;
    read(update_address, current_value);
    if (current_value != update_value)
    {
        // Do not attempt to write until device is ready
        while (!TM_I2C_IsDeviceConnected(EEPROM_I2Cx_, EEPROM_ADDRESS)) {}
        write(update_address, update_value);
    }
}

but I wonder if in this case a "==" operator is REALLY needed. After all I am really just comparing raw bytes, no logic involved (i.e. uint8_t boolean might be true in both structs even if one is 1 and other 100 and this should be handled properly, but in this case it doesn't matter at all as it should be one and same structure byte-wise), but that padding thing has thrown me off a little. My question therefore is Is it okay in this particular case to use memcmp (T can be any type, probably in a lot of cases a structure) and can padding cause any problems or should I assume or rather explicitly demand "==" operator to be defined prior to using the function?


texts: Old tvs, how did storing settings work, and what changed in the tv when we tuned a channel?

texts:
I don't have an EE background, but I would like to understand some aspects of old TVs.

When we tuned channel what exactly changed inside the tv. Was there a circuit card in the tv where something changed? What exactly changed in the circuit card? On some tvs you tuned physically, but on newer models(still old) you did it through the remote. Did you in one case change something physical?, and what did you change in the other case?

How did the tv save each channel? I assume there wasn't a hard drive there, so how did it retain its tuning? And how was for instance the channel number 5 saved as channel number 5 without a hard-drive?


texts: Confusion on the meaning of a BJT emitter follower's output impedance

texts:
Above figure is a BJT transistor emitter follower.

I can understand that in an emitter follower when talking about its input impedance what meant is Vb/Ib and here it is equal to (hfe+1)*R. The idea I think similar to Thevenin equivalent. The voltage applied to circuit input is Vb; and the voltage driven by the source is Ib. So it is easy to understand the meaning of input impedance here for me.

But I couldn't understand what meant by the output impedance of this circuit. What is the meaning of the output impedance here and how can we quantify it in terms of R hfe ect.?


texts: PIC16F88 - compare ADC results with a constant value

texts:
I am trying to write my first program in assembler for PIC16F886. The program is supposed to do the following:

Read ADC value on channel AN0
If the value is smaller than 128 - turn LED off
Otherwise - turn LED on

The schematic is rather simple:

And here is my assembly code.

    list        p=16f886        ; list directive to define processor
    #include    <p16f886.inc>   ; processor specific variable definitions

    __CONFIG    _CONFIG1, _LVP_OFF & _FCMEN_ON & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_ON & _PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT
    __CONFIG    _CONFIG2, _WRT_OFF & _BOR21V

    org 00                      ;start at 0x00

VALUE EQU 0x80                  ;value to compare adc results

    cblock  0x20
        RESULTLO                ;ADC 8-bit result
    endc

port_config
    movlw b'11111110'           ;set RB0 on PORTB to output
    movwf TRISB

start
    bsf PORTB, 0                ;turn LED on

adc_config
    BANKSEL ADCON1
        movlw 0x00                  ;left justify
    MOVWF ADCON1                ;Vdd and Vss as Vref
    BANKSEL TRISA               ;
    BSF TRISA,0                 ;Set RA0 to input
    BANKSEL ANSEL               ;
    BSF ANSEL,0                 ;Set RA0 to analog

adc_sample
    BANKSEL ADCON0;
    MOVLW b'11000001'           ;ADC Frc clock,
    MOVWF ADCON0                ;AN0, On
    BSF ADCON0,GO               ;Start conversion
    BTFSC ADCON0,GO             ;Is conversion done?
    GOTO $-1                    ;No, test again

    BANKSEL ADRESH
    MOVF ADRESH,W               ;Read lower 8 bits
    MOVWF RESULTLO              ;Store in GPR space

    ; if RESULT <= VALUE
    movf RESULTLO,w
    addlw 255 - VALUE
    skpnc
    goto led_off

    ; if RESULT > VALUE
    movf VALUE,w
    addlw 255 - RESULTLO + 1
    skpnc
    goto led_on

    ;loop
    goto adc_sample

led_on
    bsf PORTB, 0
    goto adc_sample
led_off
    bcf PORTB, 0
    goto adc_sample

    end

I expect the led to turn on/off when I change the resistance of the pot but instead the led constantly stays on.

Update: I suspect it has something to do with the way I compare RESULT and VALUE since I get the following warning during compilation: Argument out of range.  Least significant bits used.

Update: As I've mention in comments, the schematic is taken directly from Proteus. On the real device the controller is powered from 5V source, there should be a limiting resistor in series with a led (unless I drive the mcu from a smaller voltage) and nMCLR is tied to +5V through a 5k resistor.


texts: How to know component's offset when making custom footprint

texts:
First of all, I'm using KiCAD, but I guess the same problematic exists in any layout software.
When I need to create a custom footprint for an SMD component, I only set the coordinates of whatever this footprint consists of (pads, drawings, etc.) relative to the footprint editor's grid origin. When I generate the Pick'n'Place file for the final board, KiCAD uses those grid origins for the components' coordinates. That means, that the offset I might introduce when creating the footprint matters a lot. In fact, if I move all the shapes in a footprint relatively to the origin in the footprint editor, I will get different component positions in the final board while the layout is the same (namely, the gerber files are the same).
In my special case, I have the MOLEX-5025850570 with this recommended landing pattern:

In this case, it's pretty obvious that the x-origin is in the horizontal center, because the component is symmetrical. But I don't see how the y-origin is determined. Below are two versions of the footprint which will both result in a correct layout in the final board, but with different pick-place files.

The assembler has a similar problem (how does he know at which point the pick-place machine has to pick up a component from the tape), but for this, the datasheet specifies a "center of connector" in the packaging section.

But how do I know where this position is in the smd landing pattern? I would have expected this information to be there.
I'm not too familiar with the pick and place process in practice: do assemblers typically make a test run and adjust footprint positions manually or do they completely rely on the position files to be absolutely precise?


texts: When to choose active-low over active-high for a switch?

texts:
I was reading this intro article:

https://learn.sparkfun.com/tutorials/logic-levels/all#active-low-and-active-high

Is there a particular time when an active low signal is preferred over an active high signal or vice versa?
Does it make a different for simple buttons/switches, or maybe ICs?

Just curious if one has benefits over the other.

Thanks!


texts:
I have a LED driver with following Push-in screw terminal (from the markings of the side)

Here is the technical drawing.
I am unable to figure out the mechanics.
How can I connect the cables?


texts: Enabling RS485 UART driver and receiver at the same time

texts:
I am a software engineer so I hope that my question not stupid:

I work on board with an half-duplex RS485 transceiver.

From the software, I can handle a GPIO to handle the output driver of the transceiver.
But, the enable pin of the input receiver is tied at 0 on the board meaning that the receiver is always active.
So when I sent data, the driver and the receiver are active at the same time.

I am afraid that the transceiver won't support this for long before burning.

The transceiver is a ADM4851ARZ and here is it's datasheet.

The only relevant thing I found is:

  Half-duplex operation implies that the transceiver can transmit and
  receive, but it can do only one of these  at any given time

So I have a bad feeling about that...

Could someone tell me if this is safe?
Thanks!


texts: Protection against automotive power supply hazards

texts:
I'm looking for a way to protect a small circuit which is to be used inside of a car or truck (12V or 24V power system). The circuit consumes about 12-15W. I use an isolated DC/DC converter module which can regulate 9-36V down to 3.3V.

I'm looking for recommended circuits or a controller IC that can take care of the usual hazards:

Load Dump Spikes
Reverse Voltage
OV/UV Protection
General noise on the power lines.
... Anything I might have missed.

Currently I have my eye on the LTC4365 from Linear Technologies. I've thought about using it together with a bi-directional TVS, clamping the voltage to 32V and protecting everything with a fast blowing fuse.

Would this be a proper solution or did I miss something here?


texts:
I've studied that in thermal equilibrium we have $$
n p=n_{i}^{2}$$, and by thermal equilibrium we mean there are no external forces such as voltages, electric fields etc. But then I was studying about a PN diode in forward bias and a teacher(online) used the above equation to solve for the minority carriers.
But how can one apply the above equation which is derived when there is no bias to a case when there is a bias? I cannot understand it.
I'll be grateful for any hint.
Thank you.


texts: How can I transform 5 VDC from a powerbank into 60 VAC?

texts:
How can I transform the voltage of 5 VDC from a powerbank into 60 VAC?

Input 5 VDC from a powerbank.
Output 60 VAC (60HZ), my end-component is consuming 0.3 W.

Which components do I need to use? I could not find any finished product. Is this 60 VAC dangerous?


texts: I am attempting to revive an old HP-41CV calculator.  Everything works, but one of the leads on the battery pack is corroded.  Is there a quick fix, or will I have to figure out how to replace it?


texts: Question on the Power efficiency of a circuit

texts:
I wanted to find the effect of load resistance on the power efficiency of a circuit. When I apply the max power transfer theorem, the internal resistance of a cell = the load resistance right? So when the load resistance is not equal to the internal resistance of the cell, how do I find the internal resistance of the cell at that load resistance?

Any help is appreciated.
Thank You!


texts: How to create chip select functionality for SK9822 addressable LEDs

texts:
I want to connect some SK9822 LEDs to an SPI bus that is already in use. As these LEDs do not have a chip select, I need to make one.
Is it just as simple as an npn transistor (BC547 perhaps)? Feed the chip select signal from microcontroller to the base, the collector to the microcontroller clock and the emitter to the first LED clock input?
Does this work this way and, if not, what is the correct way?


texts:
I'm developing a CAN bus to WiFi bridge for car diagnostics using some commercial interfaces but sometimes I see latency can get high and some ECU's does not work, but some others do work, for example, if I get a latency over 90ms motor and transmission doesn't respond to interface, but some others as entertainment system respond.
Is there anyway I can tell the ECU that communication is still alive?, if I get lower latencies (60ms or less) everything works well.
I'm using an ESP32 microcontroller with ESPIDF.
I use two microcontrollers, one for scanner and one for the car. Thank you!


texts: Verilog: use calculated variable as length or index of another variable

texts:
I need to expand and truncate variables a lot in my Verilog project. The issue is that the constraints for these operations are dynamically generated.

Example:

function sometruncation;
  input a, b, Z;
  integer x;
  begin
    x = a + b;
    somefunction = Z[x:0];
  end
endfunction

Another example for replication:

function somereplication;
  input a, b;
  integer x;
  begin
    x = a + b;
    somefunction = {x{1'b0}};
  end
endfunction

Vivado is now telling me that 'x' is not a constant. I'm quite new to Verilog but according to my understanding I need to declare a parameter to get a kind of constant but this requires me to know the value beforehand, right?

Thanks in advance!


texts: Finding current through LEDs in series-parallel circuit

texts:
I'm stuck confirming that the current pulled in a circuit will be 15mA.
If I have hypothetical LEDs that pull 15mA each from 1.8V, and they are put in parallel (I know this is not a good idea, but just wondering what happened if is) with a 5V power input, the diagram should look something like this:

simulate this circuit – Schematic created using CircuitLab
The LED's aren't actually 1.8v 15mA in the schematic, but lets just say that they are.
Correct me if I am wrong:
I supply 5V, the 213 Ω resistor drops the voltage by 3.2V.
This means that going into parallel, we have 1.8V, which is perfect for lighting negligible-resistance LEDs.
The LEDs at this voltage draw 15mA each.
Now here's where my understanding ends: I know that voltage is equal for every parallel branch, 1.8V, but does the current ADD together and the total pulled current will be 60 mA because of the 4 branches?
I tried to calculate the current of the circuit using Ohm's law. V = IR. 5 = I * 213, I = 23.5 mA.
Is the pulled current actually 23.5mA, and the current is 'used' by the resistor? Or do I calculate the total current by subtracting the resistor? (I want to make sure I'm not pulling > 40mA for an Arduino)
I know I asked a lot of questions here and I apologize. Any help would be appreciated.


texts: Gain and output impedance of an amplifier

texts:
I am trying to understand the physical phenomenon that leads to increase in gain of an amplifier as the output impedance increases.

When we have resistive loads in a single stage amplifier, they convert the signal current change into voltage variation. Higher the value of load, more will be the conversion and hence
the gain. In MOSFETs, since it is not necessary for the output impedance to be less, higher gain can be obtained by increasing the RD**(physical resistance connected to drain)** while ensuring that the transistor operates in saturation.

But how does increasing the rds(the internal drain-source resistance) help obtain higher gain? Since rds is not a physical resistor, how does it contribute to increase in gain?

By using long channel MOS, the rds could be increased. This would mean, lesser current variation in saturation region with change in Vds. When we model the effect of channel length modulation, we of course obtain a resistor of higher value.

Can anyone explain me how does the change in length could increase the gain?

Update

I have edited the question and included correct notation for small signal dynamic resistance.

I understand that rds is not an actual resistor but a model that takes into account the effect of channel length modulation. But then how does it increase the gain of the amplifier?

Higher rds would mean small change in drain current for Vds variation i.e., a good current source. That is all I can gather from this model.

My question however is that how would this increase the intrinsic gain of the amplifier? I understand how gain increases as RD increases(which I have mentioned above). Am I correct?


texts: pmos transistor acting as pull down device

texts:
I have a simple question related to the pmos transistors. Why can't it be used to fully pull down a high voltage signal? Can somebody please help me to understand the electrical characteristics behind that. Is it possible to relate the voltage level to which a pmos can pull down a signal to the characteristics of the pmos device(e.g. Vth)?

Thank you very much for your help,

Helene


texts: Tl494 converter powerend kind of oscillation / buzzing

texts:
I'm in trouble with designing and testing tl494 halfbridge converter (schematic based on atx power supply and this one: https://www.hobbyelektro.eu/spinany-zdroj-0-30v-0-6a/) Converter wasnt quite working, so I decided to make it part-by-part. Present configuratoin is:
So i'm providing wariable pwm signal from tl494, and output is loaded, so i will not saturate TR2 core.
I'm also looking at oscilloscope in points A and B, referenced to low voltage ground. when i turn the potentiometer i can smoothly regulate ducy cycle, and see it on A channel, but when i'm in some narrow range of regulation it makes horrible sound like buzzing or squeek, and when i'm outside of it it's completly fine. When it makes this sound the scope also shows strange behavior on channel A. The best think is, when i disconnect high voltage i can see these "strange thinks" dissapearing and after 6 seconds i have got pure suare on the scope. Every measurment is made using short probe leads (this springy ones) so i don't think it's any kind of induced signal.

SCOPE SIGNALS:
Singal on points A(pink) B-completly flat and good looking. These somethinks after falling edge corresponds with the buzzing.

What can cause this behavior? Thanks in advance for your answers!

EDIT:
I did one think, added a buffer gate (made of two cmos nands) between TL494 and transistors:

And this not solves the problem... Waveforms on bases are ok, but circuit is still buzzing in narrow width of regulation. What can oscillate or something like that in such a simple circuit?


texts: How make a pulse acquisition from an electrical meter directly into a raspberry pi?

texts:
I would like to acquire pulse informations from a french electrical meter.
There is a picture of the outputs of this electrical meter.

These pulses vary in frequency and after acquisition, we can calculate the active power (M1) and the reactive power (M2) depending of these frequencies variations.
As I understand this documentation, I have to power it at 24VDC (27mA maximum and 10 mA minimum) through MC Pin and take the signal back from M1 & M2.
Also, it says one calibrated pulse ("Passing" state) is about 40 ms, 30 ms minimum.

My objective is to read these pulsation directly on the GPIO of the raspberry pi (this part already work, I tested it with a signal generator directly on the rasp).

The fact is, I need to lower this 24VDC signals to the classic 3.3V of the rasp GPIO. I think the best way to do it is to go with an optocoupler circuit. In principle, I shouldn't have problem to see the variation through the optcoupler as one pulse is at 30ms minimum.

There is my first guess for the circuit :

But I think maybe this one could work too ?  :

I tried to calculate the resistor from typical optocoupler circuit but I'm not sure at all. I can't access to the electricity meter for know so I can't test it to verify.
Moreover, the circuit may be used on other meters, the DC voltage needs to be between 18V and 27V and the current between 10mA and 27mA precisely.

Before I sent you the calculation of the resistors, can someone confirm that one of my schematics make sense for what I want to do ?


texts: Measuring a small resistance, ~0.001 ohm

texts:
I have a low resistance resistor that I would like to use to measure the current through another circuit, but first I need to accurately determine its resistance.

Its data sheet says it is 0.001 ohm +/- 1%

simulate this circuit – Schematic created using CircuitLab

A basic setup is to apply a voltage to the resistor, measure the current going through it and the voltage across it, the set up in the diagram above.

I am having some trouble understanding my current and voltage measurements and how the probes may effect the circuit.

The first thing is measuring the voltage. If I touch my probes together I get a reading of 0.02 mV. Is this something I need to offset in my measurement? For instance, if I measure 0.16 mV, should I subtract the 0.02 record the measurement as 0.14 mV?

Secondly the current measurement, when my power supply is OFF, my multimeter reads 3.7 mA, as I vary the current limit it is 3.7 mA less, than what the power supply indicates. For example, if set to a 200 mA current limit, the multimeter reads 197.3 mA.

The idea is to use one multimeter to verify the current to the resistor, as the power supply reading may not necessarily be accurate. However, as I write this I realise my power supply has an OFF button for the voltage output and for the device itself. When the device is OFF, the current reading is 0 mA, when it is ON, but the output is OFF, the reading it 3.7 mA, and when the output is turned ON (with the current limit 200 mA) the current reading is 197.3 mA.

So I reason that the current reading on the multimeter is probably fine as is. It is just when the supply is ON, even if the output is off, there is a small current leaking through.

But I am still not sure about the voltage.

Edit
The diagram I meant was this, with 2 separate meters one for current one for the voltage across the resistor.

simulate this circuit


texts: What should be the proper method to build a LINE-OUT signal from a Synthesizer that has only "Speaker" and "Headphones-out" outputs?

texts:
I've always wanted to add some RCA Mono Line out to my humble CASIO MA-101 90's PCM synthesizer. It currently has 2 connectors: "9V DC in" and "headphones out".

On the internet I've seen some modders tapping out the wires of the output circuits, mainly getting signal from the mono speaker SIGNAL + GND combo. I've even seen some people adding a capacitor on one of the mono speaker wires, and then they derive this parallel tap onto a drilled mono RCA female output jack.

I still haven't decided about it (I've just added the RCA Mono output onto the plastic rear wall, and done nothing more).
I can imagine tapping the mono speaker wires feels like an "emergency" way to get some mono output from them.
So my question is: Without using a dedicated small amplifier pre made circuit, what should be "the proper" way to tap out a mono signal from the mono output sub-circuits (or even the speaker cables) of my synthesizer?.

I wouldn't like to use headphones output because when you connect something into it, (as the typical headphones jack it is), speaker output gets switched off.

BTW, I defend myself nicely using my soldering iron and adding components, so I'm not afraid of messing around with the current original circuit to add some passive component (R's C's, etc..)
Note: The actual speaker inside my synthesizer is also CASIO branded one, with a 4 Ohm printed impedance.

Note 2: I've also taken some MOBO pics in case someone might peek and locate the proper output subcircuit. The sound generator chip is a typical one in the CASIO's from that era:  OKI M6387-06
I think I've located some sort of amplifier IC on the MOBO, but I don't have the actual specs of it... I suppose that some pin on this IC will probably be the amplified mono output I might get some juice from.

Whatever, TL;DR: I want to add proper Mono "Line OUT" connection capabilites to my CASIO synth and any nice idea about where to tap this output signal from will be more than welcome.

Thanks

EDIT: Added some pics (not amazing quality, but I'll try to add new ones taken under direct sunlight). Preliminar tracing can be done

EDIT2: I've started to study the tracks on the mobo, and the input signal for the top right amplifier (Sanyo LA4138) seems to get into the IC AFTER being attenuated (or not) by the main volume slider (consisting of silly value R's)... That probably means there's a "pure" unamplified synthesizer IC output signal that enters into the main volume slider, that could be the one I'm interested in...
But then this signal is not amplified, as is the original synthesizer IC output...
Maybe adding some small amplifier IC/components might be the final mod I need. Once added, that new circuit should get the" pure non volume slider processed" signal from there, amplify it and then drive it directly to my RCA Line out jack... (Just speculating)


texts: What is the role of resistor in this schematic?

texts: I am a beginner in Electronics and I am not able to understand why do we need to put this resistor(Resistor which comes after the switch) in this schematic? Does it save IC from current? but how ? Thanks


texts: Output of oscillator expected to be square wave, but looks sinusoidal

texts:
I've build a circuit exactly like the one below except Im using a SN74HC14N (schmitt triggered inverter).

The output of the circuit looks like this, however isnt it supposed to be more square wave looking? I've tried feeding the output to another schmitt triggered not gate but the output stays the same. Anyway to get a more square wave looking output?

Also when I used non schmitt triggered not gates there was no output at all. All the gates im using are TTL. The crystal is 8mhz, and my oscilloscope goes up to 100mhz

There is a similar question.
However, my oscillator is based on a pierce circuit

Edit: Here is what I get when I set the probe to 10x, I guess this is acceptable? even if it spikes?


texts: I need two join two traces of different widths, I use two different width at first place due to space constrains at some parts of the board. so what is the best method to do it elegantly and with no etching problems?


texts: Which pin of USB-C to use for analog signal?

texts:
I am working on a project which connects a microcontroller to an IR sensor device and decided to use a male-male USB C since I need 5 lines (V,GND,SCL,SDA,ADC).

Which pin should I use for my single-ended analog line?
Im guessing the SBUS audio line in Fig.2 (minimizing cross-talk and EMI interference)

Also which should I use for my SDA and SCL lines?

Fig.1

Fig.2


texts: Faradays law of induction - where does the energy for the current in second loop come from?

texts:
Lets say each of the loops have the same resistance \$R\$ and the emf of the battery is \$V\$.

Case1 :
There is no second loop. Then if I close the switch for \$t\$ seconds, then the energy supplied by the battery is \$\frac{V^2}{R}t\$ joules.

Case2 :
There is second loop and we notice current briefly in the second loop when the switch is closed. Suppose this current is constant \$i\$ and exists for \$t'\$ seconds. Where does the energy \$i^2Rt'\$ dissipated in this second loop come from ? I can guess it must be supplied from the battery itself. But my textbook doesn't say anything about this additional energy drawn from the battery. Is there any formula for the energy drawn from the battery when a second loop is present ?


texts:
I need to provide 12V DC to a DC brushless motors that need 12V 30A at distance of 30m from the source.

The cables I can us are 20 Gauge, I know that the cables are loosing power, how can I calculate the power that I need to provide from the source to the motors cable in V DC and current that I need to provide at distance of 30m from the motors?


texts: Would a bridge rectifier allow to detect µs-scale pulses of either polarity

texts:
The incoming signal is ground-referenced and consists of short (a few µs each) pulses at >150V. The signal is at ground potential the rest of the time (the "duty cycle" is low), and is of low impedance (< 100 ohms).

To adapt this signal to my 3.3V MCU, I've used a voltage divider + NPN like this:

simulate this circuit – Schematic created using CircuitLab

This works fine, but assumes positive polarity on the signal. I need to make the circuit more flexible and accept negative signals as well - I want to get a logical 0 whenever the signal's absolute value is above some threshold (e.g. abs(V_signal) > 110±20V).

I'm thinking about using a diode bridge after the voltage divider, but I'm worried that the divider + the diodes' junction capacitance will form a low-pass filter, which in turn would attenuate the short signals too much. I'm not exactly sure how to compute how bad it would be though.
I can also place the bridge rectifier in front of the voltage divider, which isn't ideal (the bridge rectifier will need to be high voltage rated, up to 400V in this case). But this will likely work.
Maybe other approaches (that don't use a rectifier) are also possible.

How to approach this conversion? Are there any caveats?


texts:
I created the following circuit on a breadboard and used the Arduino Uno 3.3V supply for the power supply:

               330 ohms         .......
 ------------------^^^^---------| LED |-----
 |                              ```````    |
 |                                         |
(3.3V)                                     |
 |                                         |
 |                                         |
 -------------------------------------------

It is mentioned on Arduino's website that the 3.3V pin has a 0.05A current. According to KVL this would give us
3.3V - (330 Ohms * 0.05A) - Voltage drop across LED = 0

According to the equation Voltage drop across LED will be negative and hence the LED should NOT turn on. However, on the breadboard the LED does light up... WHY? This goes completely against basic theory... is this normal? or is this only possible because I have made a mistake somewhere? =O


texts: What simple IC can I use to extract 500mA from a computer USB port?

texts:
I have very small and simple electronic projects that I power up using the USB power connectors plus a resistor.
For one project I require to use more than 100mA, however the USB port requires an enumeration process to be done before giving more than that (up to 500mA).

I've browsed TI.com looking for some IC that can help me with this task, however I'm not sure I'm on the right track (I've pre-selected LM3526 and BQ2402x ICs, but I don't fully understand how to use them... I'm still learning....).

Is there any simple example circuit design that I can use to solve this? Ideally, it should be something that I can connect to an USB port and that will just give me an output of 500mA and more than 4.5V.

Thanks for the help,


texts: How can I figure out how large a capacitance a chip has in-package?

texts:
I'm designing a board with a fairly high frequency chip.  It uses a 2.5GHz clock and can drive outputs of +-30mA total with edge rates in the 300ps range.

There is a reference design using this which has it bypassed with a 47nF IDC capacitor about 3mm away from the power pins and opposite side of the board (and through 4 vias in parallel).  Back of the envelope, the loop inductance is around 1000pH.  Considering the frequency, that inductance seems rather high (and the use of an IDC capacitor totally pointless).  There are also a couple of larger capacitors (200nF total) which are even further out (let's say 6mm and >2000pH).

I've done some simulations and it seems that there almost has to be a fairly sizeable capacitance either on the chip itself or in the package, for the chip to function at all.  If I assume the supply voltage as seen on-chip oscillates by around 10mV, there is must be over 1nF bypass capacitance on-chip.  Is that realistic?

Here is my model in Spice (ADIsimPE):

If that model is close to accurate, then changing either the value of the external bypass capacitor or the inductance of the loop between it and the chip (let's say within an order of magnitude up or down) has little effect on the size of the supply peak-to-peak swing as seen on-chip.  It does however affect the frequency (or rather multiple frequencies) of the swings.  It seems that despite the high frequency, because the chip is internally bypassed, it is probably rather insensitive to the quality of the external bypassing.

Is there a way to measure the effective on-chip capacitance?


texts: How does the oscilloscope trigger really work?

texts:
I'm trying to learn more about digital oscilloscopes, especially triggering. Here is how I think the trigger works: Let's say I set the trigger to edge mode, and the level to 5V. When the signal measured then hits 5V, the scope's ADC activates and it starts to sample the signal. Some amount of data points are gathered, and these are plotted on the screen. Then there is a small "dead time" after which the scope again waits for the trigger condition to be met, and the same amount of data points are gathered again. These should now line up with the previous set of samples, and therefore the scope output looks stable on the screen.

The time axis is something I don't completely understand. I believe that the origin of the grid, where the highlighted dotted lines intersect, is the triggering point. At that point (at "t = 0") the voltage should be equal to the trigger level voltage. Am I correct so far? The thing is, this is not always the case with my oscilloscope. Sometimes the voltage at the origin is not equal to the trigger level, and the signal even drifts slowly to either direction. What causes the signal to drift even if the trigger is set?

Another confusion that I have: I've seen the right side of the origin called the "post-trigger" data and the left side "pre-trigger" data. How is there data from before the trigger, if data gathering starts from the trigger? Shouldn't the trigger point actually be at the very left of the screen?


texts: About to start a new project I have some questions before I start

texts:
So I am going to start to build a table that will have two different stands of lights, which are linked below. I was planning on using an 18 volt Milwaukee battery, but after getting the lights, I realized they need AC to work. They both of AC to DC converters that then plug into the light. My first thought was to add an inverter to invert the battery's DC to AC for it to then get inverted back to DC. My questions are;

How much power will this lose during inversions
Am I better off making my own adapter and not using the wall plug that the lights came with?
Any advice is apricated!

lights:
https://www.amazon.com/gp/product/B08149RHYZ/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&psc=1
https://www.amazon.com/gp/product/B08P25GMCJ/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&psc=1


texts: Emitter follower with extra load in emitter path

texts:
I was reading through Linear Technology's AN70 application note and on Figure 42 there are two parts of the circuitry that I can't understand.

It looks like an emitter follower but there is a resistor in series of Q1 emitter. Why is it needed? And if it is needed why not in the base path of Q1?
There is a series RC in parallel with the the transformer before the rectifiers at the output stage of the transformer. Is it some kind of filtering?

Can anyone explain how exactly it works?


texts:
Can someone explain to me / point me to a good explanation of the theory behind an electronic oscillator? The Wikipedia entry explains what, but not how, which is what I need to know.

TIA.


texts: What documentation should an engineer produce for communicating with other people?

texts:
Im soon to be developing a product on my own, for possible or sale or given away(open source as such). But I am struggling with the "internal" documentation that I should produce.

What documentation needs to be produced with in companies for sharing with new people joining the project? Is there like one document that explains the development of the project from initial idea through to the designs for the specific final product.
What have other professional engineers had to do for their documentation in the past on their projects?

I understand that documentation varies from company to company but I'd like to start working with good practices and writing good documentation about my designs so that I am used to it when I start working.

I have read the following questions:

What should a contract Electrical Engineer Deliver once a project is complete?
How make hardware documentation?

But these refer to specific parts in the designing of a product. Such as the first one what to produce once it has been designed, and the second refers to the development of the hardware. I'd like to know about documentation at the other stages of the design process.


texts: PIC 16F648A memory getting corrupted some time after programming

texts:
While learning PIC programming I suddenly encounter the problem that the programmed information from the .hex files gets corrupted after a while. After reprogramming everything works fine but after a while it looks as if the EEPROM of the PIC gets corrupted. What could be the cause. I have no clue where to look.

The power supply of the PIC is a lab supply at 5V DC. The power lines on the experimental print have 2 capacitors. 1 220uF over the power and one capacitor of 0.1 uF directly over the supply terminals of the PIC.

I am working on a four digit timer. the timer pics up the required preset information from the EEPROM before the counting starts and puts the information in 4 display registers. These registers are scanned by the interupt routine. The counting cycle works fine. But when I want to select a new preset value. The EEPROM returns a non existing value. Verification of the PIC in the programmer indicates that that the the programming is no longer identical to the information in the hex.

The error must be in writing to the EEPROM. Since the overwritten positions in the EEPROM are not always the same I suspect that I have to look for an error just prior to the actual writing cycle.  So back to the debugging.


texts: Problems finding the Transfer Function of an OpAmp circuit

texts:
What is the quickest way to determine the transfer function

G(s) = V_out(s)/V_in(s)

of the circuit below?

EDIT: Ok, sorry for providing so little information. This is an exercise from an old exam. I do understand laplace operations, virtual ground and stuff. I could go ahead and use Kirchhoff and what not to try to find out the transfer function. However, the solution stated that it "obviously" was G(s) = s. This is why I asked for the quickest way because I thought some of you might also think that this was "obvious"!


texts: Motion of an electron in a uniform electric field

texts: An electron moves from negatively charged to positively charged terminal of a battery. When it does so, its electric potential energy decreases i.e it moves from high to low electric potential. But it is said that it moves from lower to higher potential. Why does that contradiction exist? Or is there a difference between potential and electric potential?


texts: Smartest way to use current limit using LM317?

texts:
As i understand, using this circuit:

Will cause the current to go right through the POT and resistor, which will generate a lot of heat. Is there a better way to use current limiting with LM317 without all of the current passing through the resistor? (Without spending a lot of money for a high power resistor/POT which can handle over 5 amps)

if anyone could draw an example circuit i would appriciate it!

I wanna be able to set a limit from 10mA to 1.2A, the output of the current limiter goes directly into another LM317 for voltage regulation. Input voltage i'm going to use is 15V.

This is how the completed project "should" look like:

The output voltage is not that important for me, as long as i can get from 1.25 - 10v. I just want to avoid the heat from the current limiting part.


texts:
I'm trying to understand the readings I am receiving from the analog to digital converter (ADC).

I am using an integrated uIceblue2 microcontroller. The microcontroller in the circuit is a 18F4550. In the manual of the uIceblue2 microcontroller it says the an analog range from 0 to 3.3v +/-0.8V. It is a 10 bit ADC.

Page 16 of the manual shows the specifications for the analog voltage
http://www.saelig.com/supplier/emxys/EMN0210_WE_uIceBlue2_Getting_Started.pdf

EDIT: I realized that I wasn't reading my ADRESH. So when I received 1V, my ADC readings ware 1070 or 1090.

Below are some readings I'm getting from the ADC when I apply a given voltage to the analog input. I am using Docklight to read my results in decimal. I receive to outputs for each result, which I believe coordinate to the ADRESH and the ADRESL. The first group of three digits is the ADRESH and the second group of digits is the ADRESL.

0.055V -> 000 020 to 000 031
1V -> 001 070 to 001 090
2V -> 002 139 to 002 160
3.3V -> 003 255
3.4V -> 003 255
3.5V -> 003 255

My questions are:

Why is there so much variability in the range of the voltage? I thought that 10 bit resolution was quite high and there for the numbers should be constant. For example, I would expect to get a fixed reading of 90 in a row, or a variation of at most 1 in the value, between 89 to 91.
I'm using the following formula to convert the reading back to the voltage, but I don't think it is correct for calculating the voltage from ADC reading.
Is it possible it is already converting to volts?
Should I post my code?

$$Input\,Voltage = Digital\,Reading \times \frac{Voltage\,Range}{Number\,of\,Bits}$$

Could someone please guide me to the correct formula?


texts: PIC M-Stack "add . to include" confusion

texts:
I am experimenting with the open source USB stack called M-Stack for the first time.  I decided to start by building the HID mouse sample application, but I had to create my own project configuration because the PIC MCU I am using is not supported with the default project configurations supplied.

Because I was creating my own project configuration I followed the M-Stack page instructions for "Making Your Own Project", which can be found about 2/3 of the way down the page I linked to above.

I added the usb/include directory to my project path as instructed; that makes perfect sense.  But the IDE still gives some complaints about unresolved identifiers after this.  The resolution was to follow step 4, which states

  Add . to the include path of your project.

I did this and the last of my IDE errors disappeared.  That's great, except I don't understand why! I don't know what "add . to the include path" means.

Is anybody able to enlighten me as to what this means?