texts: This is an RF-based question. My professor told me that demodulating a TX signal that is 90 degrees out of phase with the receiver oscillator is impossible; there will be no baseband signal. He said that the TX and RX signal need to be in-phase in order for demodulation to work correctly. He also said that the way around this is quadrature demodulation. However, I have seen many RX circuits that use a single oscillator and a single mixer. How do they solve the problem of TX/RX phase synchronization?


texts: Can a transmitting IR LED (or an array of such devices) be focused into a finite area rather than allowed to spread out? I think this is how laser tag systems are implemented but I am not sure and I want to try this myself. If they can be focused, what what device can accomplish that? A lens? A waveguide of sorts? Thanks for any tips!


texts: Extra Current because of Unity Gain Buffer Amplifier?

texts:
i was reading on the unity buffer amplifier.
I did understand, that it can help provide extra current that source might not be able to provide. But where does this current come from?

Is it from the External power supply to the opamp?

If Yes, does that mean we should keep a different power supply for both the opamp and the source?


texts: General Feedback Theorem - Spice model and loop gain

texts:
I am implementing the General Feedback Theorem (Prof. Middlebrook, 2006) in LTSpice, using the example given in the Spice folder.

I used it to calculate the loop gain in a simple voltage follower configuration, to be sure that everything is working correctly (schematic below).

I plotted, as can be seen, the loop gain as:

  T= 1/(1/(D)-1)

Which, for this configuration, should be just the gain of the amplifier, since the loop gain is T=A*B, where "A" is the amplification of the main block (in this case the op.amp) and "B" is the feedback factor (in this case 1).

However, as you can see, the result looks incorrect, since we have a loop gain of about -6dB also at almost DC. The closed loop gain, H(), looks correct, being 0dB constant until the poles of the op.amp makes it decrease.

Any idea where I have made mistakes? Thanks a lot!


texts: What will happen if we add one more gate to the flip flop?

texts:
How does this sequential circuit with three NAND gates operate?

It looks like a flip flop. So, I wonder. What does it do?

simulate this circuit – Schematic created using CircuitLab


texts: How to determine full-load RPM of an induction motor at any arbitrary frequency?

texts:
Lets say an induction motor's spec sheet states the following:

1/ 50 Hz, 2-pole, full-load rotations-per-minute (RPM) = 2850.

2/ 60 Hz, 2-pole, full-load RPM = 3450.

Can we extrapolate this information to find out the full-load RPM for other frequencies (i.e.: 20 Hz, 30 Hz, 40 Hz, etc.)?

(SPECIFIC EXAMPLE)

Like for instance,
as per here,
the synchronous speed of the motor under 50 Hz is 3000 RPM.
The full-load RPM then, is 95% (2850 / 3000) of the synchronous speed.

Doing the same thing for 60 Hz @ 3600 RPM,
the full-load RPM is ~95.8% (3450/3600) of its synchronous speed.

Would it be reasonable to make an assumption that under different frequencies,
the full-load RPM is ~95% of its corresponding synchronous speed?

EDIT From a suggestion by @Transistor,
I am using a "VFD-B" variable frequency drive on my induction motor.
(manual, website)


texts: Over-discharge protection for 20V lithium battery pack

texts:
I am soliciting your help regarding a project I am working on. I have done my research but can't decide which solution is optimum for my needs. By optimum, in this case, I mean will consume the less, while allowing easy adjustment of the cut-off voltage (turning a trimmer or reprogramming is fine, swapping resistor values is not).

General description of the object :

The object in question is a homemade portable speaker, with a micro-controller connected to it to allow remote control of tracks, volume, etc.

Information related to the question :

Power : via a 20V Black and Decker drill battery, and a 24V power supply. When the power supply gets plugged, the battery gets disconnected. When the power supply gets disconnected, the battery connects.
Items that will get powered : An amp + micro-controller + speaker

The question :

What is the best circuitry to use in order to :

switch the power from the 24V power supply to 20V battery pack
prevent over-discharge of the battery pack, while allowing easy adjustment of the cutoff voltage (threshold would be 15V)

Initial idea :

As a tinkerer (and not a professional) with electronics, I initially got drawn by the idea of using a micro-controller and 2 relays (one latching, one non-latching). The only consumption should be the micro-controller (which can go as low as 4uA with the watch dog timer) and the tension dividers.

Here are two drawings. The first one, "situation actuelle" is how it is working today. No over-discharge protection. The second one shows my two initial ideas using micro-controllers + relays.

After some research, most of the help online redirects people to specific chips like DW01 or others.

Note that I don't have access to each cell individually for the monitoring part. Also, with the 20V battery, some regulators might be needed which might add to the consumption.

This specific project uses B&D battery pack which only provides the positive and negative contacts of the total 20V.

Also, there is no charging considerations in this project. The user removes the battery and charges it on a regular B&D charger, no hacking involved.

I have a feeling the most elegant solution revolves around a Mosfet and a dedicated monitoring chip, but I would really appreciate having your thoughts on this.

Thanks a lot for reading!

All the best,


texts: Automatic power selection circuit with solar panel

texts:
I am working on a design which includes a power regulator , Lipo Battery and battery charger circuit.

If V_USB power the battery gets charged and the MCU gets power, if no power is feed to the usb the MCU gets power from the battery, the circuit currently works as expected. I would like to add an additional power source, a solar panel, which is 6V 10W, If V_solar > V_USB the circuit is powered by the solar panel without causing any problem to the computer conected to the USB port. In case V_solar < V_BATT and V_USB a diode has to be placed to avoid current leaking to the panel? how should I update the circuit design for this third case?


texts: effect, if any, of input voltage on RPM of DC motor

texts:
I bought a home coffee roaster which is designed to sit on a gas cooktop. It has a small geared motor which turns the drum, which sits above the flame. The target rotational speed of the shaft turning the drum should be about 60RPM.

The motor has these markings:

output: 6W
voltage: 24V
speed: 2950RPM
current: 0.5A

The (overseas) seller shipped a 220V AC 12V DC 850mA adapter but I have 120V AC. So I'm looking to replace the adapter with one that can take 120V input and supply the needed amps.

But does input voltage have an effect on RPM?

I'm wondering why the seller provided a 12V adapter when the motor says 24V. Is the seller maybe relying upon the 12V DC adapter to reduce the RPM? Should I be searching for a 12V DC (as supplied by the seller) or a 24V DC adapter?


texts:
I want to step down the input voltage from my power supply (12V) to 5V and 3.3V.

Please see my schematic. Is it right or wrong?
I use LM2576 as switching regulator.

Thanks. Sorry for noob question


texts:
I have to design a spectrum analyzer that takes a normal audio input and creates a 4 band spectrum display.

My current plan to accomplish this task is to construct 4 band pass filters centered around the 4 frequencies that must be visualized. The audio input will be split into 4 identical signals via the use of 4 voltage followers (So as to ensure that they do not effect each other). These 4 signals are then each fed into a separate band pass filter. These filters then feed their output into a TI LM3915, which compares the input voltage against a reference voltage and then turns on between 1 and 10 of the output's. These are then fed into DIL Bar Leds for visualisation.

My question is: Does this seem like a legitimate method for accomplishing this, or am I way off the mark? And if it is a legitimate method, what improvements/flaws do I need to take a look at?

Side Note: I've seen the MSGEQ7 chip, however I have 4 specific frequencies that my analyzer must be centred around, so if anyone knows of an IC that can do this it would be even better.

Side Note 2: I can't supply a PCB schematic as this is for assessment.


texts: Can anybody please help me out with how to write test benches for inout ports in Verilog? I can't instantiate them as reg type variables in the test bench.


texts:
I was solving a question in an Electromagnetics book and need some help: two parallel plates were connected to a 100V battery. The battery was removed and then a slab of dielectric material was placed between the plates touching the upper one but leaving 0.25 mm of free space in the bottom. It is required to find electric field intensity and some other quantities after inserting the slab.

The idea of the question is know what remains constant before and after inserting the slab. It makes sense to assume that the charge would remain the same since it has no way to go after the battery is removed. However, after I solved the question with this assumption, I found that the total energy stored in the capacitor after inserting the slab is less than the total energy before inserting it. I thought the energy would also be conserved but apparently it is not. Can anybody give a physical explanation why the total energy of the system is less? Where did this energy go?

More details:
Plates area: 2x10^2 m2
Distance between the plates: 1.25 mm
Thickness of dielectric slab: 1 mm
Relative permittivity of the dielectric slab: 5

Solution:  before inserting the slab:
Total capacitance = 1.42e-10 F
Voltage = 100 v
Energy (W) = .5cv^2 = 7.08e-7 Joules
surface charge density = electric flux density = 1.42e-8 c/m2

After inserting the slab:
in free space region: C=7.08e-10 F, E = 80,000 v/m, v=20V, W = 1.42e-7 Joule
in dielectric slab: C=8.85e-10 F, E=16,000 V/m, V=16 V, W=1.13e-7 Joule
Total W = 2.55e-7 Joules compared to 7.08e-7 before inserting the slab. Where did the 4.53e-7 Joule go?


texts:
I've been playing with the ATmega328 and xbee a lot and wanted to take it to the next step and make it fully mobile. So i have decided to use 2xAA batteries along with a 5V step up to get a stable 5V output (link) for the ATmega328, and a 3.3V step down to power the xbee.

The 5V step up is a LT1300 and the 3.3V step down is a MCP1700 (). The ATmega328 is using the Arduino bootloader and code.

My problem is that the ATmega328 is not responding when using the LT1300 even though the output is a nice and clean 5V. It is working thought if I replace the LT1300 schematic with a regular 5V DC power source.

Any ideas as to why this might be happening?


texts:
I've looked around on the web a bit but it's the same jumbled up garbage. I'm convinced most of the articles are by people who've only heard what a microchip is but who don't actually know.

My assumption is that a microchip is like that thing above, not a green board with soldered connections but that it represents what one might put together on a bread board except in a much more condensed form. Is that correct?


texts: Cascading inverting op amp for increased gain and low noise on piezo contact microphone

texts:
My aim:

To create an amplifier that amplifies the output a piezo microphone with low noise and very high gain. Much higher than regular piezo amplifiers for musical instruments, I am doing underwater audio recordings.

I have the following design:

As-is:

If I put my headphone to TP1 and GND, I can hear if I tap the piezo or the desk, but I need higher gain, so I added a new op amp in series.
At TP2 I cannot hear anything, even though I know it works because if I
disconnect TP1 from the first stage and and tap it with my fingers, I
can hear the 50Hz humming.

Questions:

Why my second AD797 does not pick up the signal of the first and amplifies further, and how can it be fixed?
Is it a good idea to use this inverted setup, or should I go with the non-inverted one?
Generally speaking, what other kind of improvements can be made on this device? I am a software engineer, not an electrical engineer, so any suggestion is appreciated.


texts: How to calculate how much energy a circuit wiill use, to find the appropriate battery

texts:
I am designing a circuit, which use a micro controller (teensy 3.1), and various sensor.

I am aware of the sensor consumption, since it is in the specs, same for the MC; but these are theoretical values; which does not give you a real figure about how much your circuit will use.

Since I need to power the circuit with a battery, I want to know how to find out the actual consumption when the circuit is working.

Can I just grab the multimeter and measure somehow the energy used? I know the mA that each device takes; but beyond that; I am not sure about how to go for the calculation.
Someone suggested me to have the ciruit to run, with a fully charged battery; measure the operation time and then calculate the value based on the capacity of the battery

Example:
1200mAH last for 1h, the circuit use 1200mA; if it last 10h the circuit use 120mA.

This makes sense but I can't believe that this is how professionals actually measure consumption.


texts: Cheap USB-PD brick/dongle/dev kit with programmable current capability

texts:
Wikipedia claims that in USB-PD v2.0 or v3.0, a source can advertise that it is capable of outputting 5 V at any current from 0.1 to 3.0 A.
I suspect I could use this capability to limit the charging current of certain battery-powered devices with USB-C power ports.
I'm looking for either a power brick, or some kind of pass-through device, which could be programmed to advertise a specific current capability (of course without overloading the power supply itself) to the sink device.
Searching on Chinese sites, I found the WITRN-PDC002 cable (won't bother adding a link as it's likely to be short lived), but as usual with such Chinese junk, there's very limited documentation (the WITRN website doesn't even mention this product), and asking the vendor is hopeless. The price point of $10 is perfect, but without further information about the capabilities of this cable, I'm afraid I might end up just throwing $10 down the drain.
Does anyone have experience with this particular product to tell whether it would be able to, for instance, advertise 5V @ 0.1A to the sink device?
I'm also open to any other product recommendations, or even a cheap USB PD dev kit if there's some easily modifiable reference firmware that I could use. I'm partial to STM32 microcontrollers so these would be best if available. It's just a hobby project so the budget is not particularly high -- ideally up to $30 or so.
Note: I'm not looking to use the PPS capability of USB PD. I'm looking to advertise, say, 5V @ 0.1A, or 0.2A, or any other value of interest within the allowable range.


texts: Is it possible to reduce the Miller's plateau voltage?

texts:
Consider the following circuit:

Image source: Simplified Clamped Inductive Switching Model - Figure 3 from "Fundamentals of MOSFET and IGBT Gate Drive Circuits by Texas Instruments"

I would like to improve the turn on speed of a MOSFET/IGBT. To do this, I think about reducing the Miller's plateau voltage in order to have a higher voltage between the driver (output high) and Vgs in order to charge Ciss more rapidly. And so reducing the Miller's plateau time.

However I do not know if it is possible to reduce the Miller's plateau voltage. The Miller's plateau begins when the drain voltage begins to decrease, i.e. when the diode stop conducting. So how to stop the conduction of the diode faster? A diode with low reverse recovery time would be the solution? Did I make a mistake? Is this wrong? Have you other recommendations/advice? More generally, is this a good idea to reduce the Miller's plateau?


texts: LTSpice's ltline (lossy transmission line) symbol slowing down the simulation process. What can I do?

texts:
LTSpice has the element called Lossy transmission line (symbol name ltline):

I tried to simalate a pretty simple schematic:

R2,R3 and R4 resistors are for solve floating node problem.

Simulation of this scheme is extremely slow (about 30us/sec). If I remove the ltline symbols and replace them with a wire or a resistor the simulation speed is a link of an eye!

However I need an element representing an electrical wire. Is there any solution?

Thanks!

UPDATE 1

After making the simulation times shorter (1ms) I received some kind of a result:

And I make a note that if the O1 line becomes shorter the simulation time rises.


texts: Can I use a Y-harness to charge battery while in use?

texts:
I’m a beginner in creating circuits, and I need to find a way to charge a battery while the battery is powering a motor on another circuit.

I’m planning on using a parallel circuit, with one end of a dean connector/y harness connected to the motor, while the other is connected to the charger, with the female end connected to the battery.

Will the setup work? Or will the currents clash or some other effect will occur?

Connector I’m using:

Like these but costlier:


texts:
Quick question for someone with a bit more experience.

I'm working on a product which will sit in an environment which is likely to experience some static discharge from time to time. Basically, some sensors are connected to an MCU over on average 30 meters of cable, so I guess some static discharge is bound to happen from time to time.

I have been testing the system with the following circuit to protect the MCU pin with no "incidents" so far:

As you can see, there are two ESD TVS diodes (D401 and D404), and two Schottky diodes (D402 and D403) protecting the MCU pin "DQ".

For a final production board, I would like to reduce BOM, and hence my question is whether having two sets of diodes (TVS and the Schottky) is completely redundant? If yes, should I remove the Schottky or the TVS diodes to reduce BOM?


texts: Can an LED driver operate within the whole range between min and max specs effectively, or is a load right at the max specs too large?

texts:
I am making an LED film light which I hope will output a dimmable 10000 lumens. I am looking at a driver(link at bottom). It says it is a "versatile high voltage N-channel MosFET controllers for LED drivers" but then the description continues and sounds like it IS an LED driver. What is the difference between an N-channel MosFET controller and a driver? Anyway, it has these specifications:

These specs I do not know the meaning of:

Vref(V): 1.24
Iq(typ)(mA): 2
Type: Inductive
Topology: Boost, Buck-Boost, Sepic
Adjustable Switch Frequency
Enable/Shutdown

These I think I do understand:

Vin(min): 4.5
Vin(max): 75
Iout(max)(A): 5
Vout(min): 3
Vout(max): 72
Dimming method: PWM (although I am not sure how that is controlled)
Thermal Shutdown

The LED array that I am currently looking at is 9-12V, 10w, 1A. I would use 6 of them in series. Would that driver work if it was powered by a large 12V battery, or would I need a Buck Boost or some other type of topology? Would driver #2 (Texas Instruments LM3421) work?

I was looking for a higher quality LED from CREE or LUXEON, but could not find anything similar. I want to use a few high-power LED arrays rather than lots of little LEDs on a string. If you could tell me what specs a driver would have to have to power those LED arrays in series, that would be great, or if you could point me to some different LED arrays and a driver for those, that would also be great. I would not have asked this question except that the User Guide says it can power "up to 6 LEDs with 350mA of current." So where did they fish the 5A max current from, if it says it can only do 350mA?

Driver
LED


texts: I am building a portable A/C (really it's just a box with a fan and ice packs) and I want to use a 200CFM case fan. It's rated 12V 1.6A. I was hoping to direct connect this to a solar panel and keep it running (with a slower speed during cloudy conditions), but from what I've researched, I'd need a 25W-35W panel and the one I found was relatively huge in comparison to my cooler box. So now I'm thinking I'll just use a battery and charge the battery at night. So if I have a 30000mAh battery with 2 5V 2.1A port and 1 5V 1A, is there some way I can hack it to 12V 1.6A? Or should I just Amazon a 12V 1.6A drill battery? Any suggestions are welcomed, even negative ones.


texts: Student problem: Amplification of cascade

texts:
I'm trying to find amplification of this configuration. I'm using small signal analysis but I'm stuck.
I'm new to electronics so please have that in mind.
Here is photo of my problem and my attempt to find solution.
Thanks!


texts:
I am sampling a sinusoidal signal with an oscilloscope and viewing its spectrum using the FFT mode. The signal in time domain is this:

and I am getting this spectrum:

The peak above the red line is clearly the 30 kHz sine signal but, what are all those peaks below the red line? They are clearly not harmonics of my signal... There are peaks even at frequencies below the fundamental... Might this be caused by aliasing? Or what is this?

EDIT:

If the input is a square wave like this one:

I get this spectrum:

EDIT 2:

Following the guidelines in the answer of Ali Chen I have verified that all those "strange peaks" are due to aliasing, just sweeping the frequency and watching how the spectrum moved. I had prepared a gif but cannot find how to embed it here. So I left a link to the gif.


texts: Blinking an LED using a generator as the source of electricity

texts:
I made a little windmill which is turning a small generator to light up an LED, but the voltage is too low even with high wind speed for the LED to glow. I thought maybe the electricity could be stored somehow maybe by a capacitor and released when the voltage is high enough, making the LED blink according to the wind speed.

I know little about electronics so I'm asking for help.
Thank You.

Edit:
What I want to know is how to make a circuit that charges up electricity from a low power source and discharge when the voltage is high enough. The frequency of discharges should increase when the power (wind speed) is increased.
About the generator. It's actually a small electric motor. I tested it with another motor, connected their rotating heads together, applied 5V to one of them and measured about 4V coming from the other, so I thought it's not a bad idea to use it as a generator. This is a really small project and it shouldn't be taken too seriously.


texts:
I am designing a board on KiCAD and I am facing an unfamiliar issue. Most of the pad connection is done successfully but a few pads cant be connected. While I am starting a new track between pads, all it happens is that the arrow goes randomly and can't get close to the pad.

I also checked clearance settings, It set up to 0,1mm so it should be okay. what may cause the problem?


texts: Are cell phone emmitting when waiting for calls?

texts:
Considering a non moving cell phone, not in a call, not receiving/sending a message, not connected to data transmission services: does such a cell phone emit a signal continuously? Or is it mostly "listening" the network signal and very rarely, emitting something (like "I'm still here")?

Note: I am not sure this is the good place to ask, but I didn't not find a better one in the whole SE community...


texts:
I'm considering cooling a very sensitive photodetector with a Peltier module.
I have been told by a colleague Peltiers coolers produce electromagnetic noise, but I am wondering whether this is due to the Peltier device itself or rather a consequence of using PWM to power/control it, or the hot side fan motor.
If one was to use an adjustable linear regulator, and smooth out any step introduced by the control loop, the current flowing through the device would be ~constant in the steady state.
Would the Peltier device itself still generate EM noise in this configuration? If yes, by which mechanism?
Is there any frequency band that would be more affected?
Our preamp has a significant bandwidth and our sensor has a small signal, so any noise is potentially problematic.


texts: Question about Audio signal trace layout (TLV320AIC3204)

texts:
I am using the TLV320AIC3204 in an audio project.  The part is a stereo audio codec from TI.  I'm curious about how the traces are to be laid out.

With other chips such as the AD1939, you need to lay the ADC and DAC lines out as differential traces since the signals coming out of the chip are differential.

With the TLV320AIC3204, the signals appear to be single ended and have their respective Left and Right channels.  Now because of the way I have to lay out the board, I'm having issues with the audio signals "crossing" so I need to go to a different layer to sort the signals out.  I have two of these situations and i've solved them as shown below.

Is this okay with single ended audio signals?


texts: What colours correspond to what in Earphones?

texts:
I have repaired earphones a lot of times before. I was very confident that I can do it with any earphone. My friend happen to give me one to repair, Its from a company called KDM.
The problem is the jack but there is something weird. The earphones I have fixed have one red/green or blue colour wire and a copper color ground wire for each earbud. This one is a little weird as it has 1 red wire, 1 blue wire and 1 green wire and 1 copper color wire. I am having trouble identifying the other ground wire. I apparently did a check for continuity using a multimeter and found blue and green to be pairs and red and copper color to be pairs, but the continuity test could not tell me which of the wire blue or green is ground. Google wasnt much help either as all discussed the two copper and two color wires and not the ones I am having.
So my question is : Which of the wires is ground:Blue or Green?

I was thinking of powering the two wires, giving them appropriate voltage and checking which is which, I am worried if the reverse flow of current may damage the speakers..Should I be worried?


texts: Maximum frame sequence number in sliding protocols

texts:
I am reading about sliding protocols and in almost every book its written this:

  Frames have sequence number 0 to maximum \$2^n - 1\$.

Why is the maximum \$2^n-1\$?


texts:
I want Vout to be logic 0 when Vin is logic 1 (+5V), and Vout to be high impedance otherwise. I designed the circuit like an open collector switch. But how can I design R1 value ? Usually in transistor switches, I calculate the base resistance value by calculating Ic(sat), putting Vce = 0V in the collector circuit. Then I divide it by Beta to find the minimum base current needed to switch on the transistor. Here there is no collector resistance or collector current. So I can't figure out what should be the minimum value of base current to turn on the transistor.

simulate this circuit – Schematic created using CircuitLab


texts: I am new to electronics and recently bought Freetronics Arduino experiment kit with the Freetronic LCD shield with keypad. I have installed the LCD shield and now I realize I no longer have any pins to plug in my existing wire to breadboard and LED. Is there anyway out?


texts: Electrical device to keep circuit open once an open is detected

texts:
I'm working on a laboratory setup that has eight electric motors running at high speed. The motors are enabled by sending a 5 V enable signal from a NI DAQ setup/LabVIEW to the motor amplifiers. Presently, I'm trying to build in a manually-operated kill switch that will interrupt the 5 V enable circuit if anything goes wrong, thus shutting down the motors instantly.

One potential problem we've identified is that of an intermittent open circuit situation, where the 5 V signal is unintentionally interrupted by a loose wire, bad connection, etc. If the signal turns off then on, the motors will stop then start and immediately accelerate to the previously set RPM, which could be 7000 or more.

I'm wondering if there is a device that can detect an open circuit and, upon detection, keep that circuit open until the user performs some task such as resetting a button, or sending a signal from LabVIEW? Essentially, I want a way to ensure that once the enable circuit is broken for any reason, it stays that way until I can safely re-enable it. There are ways to do this in LabVIEW by monitoring the circuit voltage, but the program is slow, and I'd like something instantaneous.

Thanks


texts: STM32 - Reading EEPROM via I2C Delay Problem

texts:
Im trying to read/write EEPROM byte by byte but if i dont put an enough delay(~1ms) between read/write tasks, im getting or writing wrong value to the EEPROM. But this delay is taking a significant time when there is a many bytes to read/write and 400kHz losing its meaning. Am i missing something ? or its a nature of byte by byte process is slow. Thanks for your time and help.
MCU = STM32F072C8Tx
EEPROM = 24LC64
I2C Settings:
 Speed = 400 kHz
 Rise Time = 300 ns
 Fall Time = 300 ns
 Analog Filter = Disable
 Digital Filter Coefficent = 0

Basic R/W Code Sample:
 HAL_I2C_Mem_Write(&hi2c1, device_addr, mem_addr, I2C_MEMADD_SIZE_16BIT, data, 1, 500);
 Hal_Delay(1);
 HAL_I2C_Mem_Read(&hi2c1, device_addr, mem_addr, I2C_MEMADD_SIZE_16BIT, databuffr, 1, 500);


texts:
Please explain the following statement
"If \$P(s)\$ contains a time delay term, \$P^{-1}(s)\$ is non-causal". Here '\$s\$' is Laplace variable.

Can someone please explain the reason of non causality?


texts: Testing hot side of smps circuit with simple secondary loads

texts:
Goal: Testing hot side of SMPS independently of the cold /feedback circuit

I tested the Mosfet on the hot side of SMPS along with the rest of the circuit ( snubber circuit, bleeder, etc -  not shown) by connecting to  a resistive load in place of the pulse transformer and the oscilloscope verifies that it worked as planned. Since I am testing with open loop circuit the feedback circuit is not important at the moment.

Now I want to connect the Xmer . For the flyback system to work correctly I should connect some load on the secondary windings ( true ?) , but since I don't know the condition of the cold side I rather like to connect some load ( bulbs may be) directly to the secondary coils ( rectifier - filter - load would have been ideal I want short cut - this bad idea ?)

Q1 How to ensure that the energies from the transformer is correctly drain by the secondary loads?

Q2 What will be example of simple loads on the secondary?

Q3 Is loading all the secondary tapings essential?


texts: Simple PWM regulator, current measurement without high-side current sensing

texts:
I have a very simple Lead-Acid battery charger with slow (1kHz) PWM regulator.

I would like to add current and voltage measurement (with PIC18F ADC - 200kSPS).

I have no problem with voltage measurement, but I'm not sure about my shunt and current measurement.

2SK2554 transistor is logic-level, opens completely at Vgs = 4V, it has Id over 30A at Vgs 2.5V.

Maximum voltage on shunt will be no more than 1V.

I don't expect more than 10A current (this is powered from 100W power supply with 10A fuse).

PWM signal is 5V level.

Questions:

Question 1:

Can I avoid high-side current sensing and place shunt at transistor source like this?

At 10A current voltage on shunt will be 1V so Vgs will be 4V.
At 25A current there should be still 2.5V on gate, so transistor will not blow up and everything else will be fine, right?

Question 2:

Can I avoid "hardware" filter at ADC inputs and filter measurements "digitally" in microcontroller software (maybe by calculating average from 20-100k samples taken at 100kSPS)?


texts: Using a dc power supply instead of batteries

texts:
I have a device which takes 4xD batteries which I would like to instead hook up to a spare wall charger. I have looked at the voltage of the batteries and it seems most batteries are 1.5V. My device has 4 of them (seemingly in series - but with 2 down one side and 2 down the next. Ie:

simulate this circuit – Schematic created using CircuitLab

There is 1 wire (black) connected to the negative terminal on the top. A Red wire connected to the positive terminal on the top, and then an orange wire connected to the negative terminal at the bottom (although this terminal is just a plate of metal so I guess it's neither positive nor negative as they are both connected? Whereas the positive and negative at the top are separated.)

My wiring diagram seems to indicate this orange wire is ground (I guess that makes sense if both positive and negative terminals are connected then the voltage on this plate is 0 correct?

If that is the case - then am I correct in thinking 4 batteries in series this way can be substituted for a 6V dc charger? (the wiring diagram shows the terminals as -3V and 3V). Also if I substitute the batteries for a dc charger, how do I connect ground?


texts:
I am building a mini soccer field in my basement for my kids, and there will be two nets (recessed into wall), I would like to set up light sensors (I figured around 3 in each goal should cover the area) that would be connected to a pc, where each time a goal is scored (the light sensor light is "broken") it gives the scorer a point.

I'm new to electronics. What hardware and software do I need to do this?


texts:
I am working on a quad MOT (microwave oven transformer) tesla coil.

We tore apart 5 microwaves and got some MOTs. We first tested each MOT individually. They did not seem to have any problems. We then hooked up 2 MOTS together with the primary coils in parallel and the secondary coils in series. Once we got the "polarity" or phase correct in all of them, we went for 3 then all 4 MOTs.

We had some working arcs with all four MOTs and seemed good, so we soldered and heat-shrank everything.

We came in the next day, and fired it up, but problems started to occur.  When we plugged it in, quickly two of the MOTs had internal arcing, and we're really bright and smoke came out. We tested each MOT individually, and everything seemed to be okay, and the MOTs were all arcing, but when we added some MOTs together, the same weird internal bright flash happened. Even weirder, the flash seemed located in the PRIMARY, which I would not think arcing would happen there. If we felt where it arced, this powdery black stuff got on our fingers.

In addition to that, some combinations of MOTs together still worked, but there was low current "purple lightning" small arcing coming off of one MOTs secondary.

Now, we have tried so much, some MOTs are almost completely failed, and the arcs are degrading. If we can get anything to work, we hear a large hissing like an uninsulated area where corona is discharging.

We can get more MOTs easily, but we want to make sure we don't screw up this time and get out 8,000 volt PSU for the tesla coil.

Do we have to dunk the MOTS in oil? I have seen quad MOT tesla coils on the internet, so I know it has to be possible with out our weird failures.

And please avoid suggesting a NST (neon sign transformer) as they are too expensive for the low current output and wouldn't be suitable for the size of tesla coil we are working on.


texts: Driving series parallel combination of LEDs with a constant current source

texts:
I came across some products (fairly reputed) that use a series-parallel combination of LEDs and drive it directly using a CC source.
Here is the configuration of LEDs:
A series string consisting of 12 LEDs. 16 such strings in parallel. A total of 192 LEDs are laid out on a 30 cm X 30 cm metal core PCB. Thermals are good. After running for over an hour, the MCPCB back is roughly 60 degree C (140 degree F).
LED used - Samsung LM301H (Product page) (PDF datasheet here)
Vf of LED is roughly 2.7 V.
Sorting current - 65 mA but max current mentioned as 200 mA.
Power supply used is a meanwell 36 V 2500 mA CV-CC PSU (PDF datasheet here). I feel that this PSU runs in CC mode because PSU can deliver enough voltage (12*2.7 = 32.4 V). This design is relying on the wattage limit of meanwell driver so that driver hits the current limit and starts running into CC mode, in my opinion. When this happens, each LED will be getting 2500 mA / 16 = 156.25 mA (well under 200 mA limit).
LED datasheet mentions the bin voltage as a range with 0.1 V gap. (for ex: 2.7 to 2.8 V).
Is it okay to wire up such LEDs in the discussed series-parallel combination? Will the current distribution happen evenly in such case? (quite likely the string's collective Vf will be close to each other because of randomness but I want to understand how much Vf difference is acceptable for such designs to work reliably)


texts: Continued illumination of LED after removing voltage

texts: I am designing high-speed flash for my microscopy project and as I know from my practical experience when you stop applying voltage on the LED it needs some time to fully stop illuminating, because of the phosphorous cover. So, my question now is, how it will be possible to get rid of that effect because in my application is key to maintain short pulses of light for a good quality picture. The duration of the pulse should be around 100ns to pulses long some minutes.


texts: Can an HDMI input marked "ARC" be used for ordinary video?

texts: If a television has one of its HDMI inputs marked "ARC" can I use that input for regular video input?


texts:
For an application we are considering pulsing a current through a conductor.

The conductor have an ampacity rating of 12.5A for continuous operation.

During the pulse we get currents around 25A and are therefore limiting the on-time to <50% of the period giving us a mean current of 12.5A.

Is this reasoning correct?

Edit:

Period = 1 second

Size AWG kcmil: 14

Material: Copper

Temperature rating of conductor @ 90C = 25A

Number of current carrying conductors = 10-20 => Percent of values adjusted for ambient temperature = 50% => 12.5A

Shape of pulse is rectangular


texts:
I am trying to findout the pinout for Serial Connection to a router. However I wasn't able differentiate the pins other than GND.

Pinout:

PIN |  RESISTANCE (UNPLUGGED) | VOLTAGE (PLUGGED)

 1. ? -> 730ohm to the ground -> 3.35-3.37v
 2. GND
 3. ? -> Infinite resistance -> 3.34-3.36v
 4. ? -> Infinite resistance ->  3.32-3.34v

As far as I have read online. Rx should have been 0 (low). However all 3 pins are high. I don't know if this is a different interface or something is broken.

Edit: Added info about when this measurements taken.

UPDATE:

I tracked the pins to the SoC and they going to a location where UART pins of SoC are. There are few more findings:

There was a sign around 1st pin which indicates Vcc pin, which I wasn't able to make sense before.
After checking pins for a longer time, I realized that 3rd pin
fluctuates between 1.5-3.3v which indicates it's Tx. Therefore, that
makes 4th pin Rx.

Alltogether, Jasen's answer is the correct one.


texts: Does using electronics with poor power factor affect the pulse power capability of a generator rated for a certain KVA?

texts:
The situation is such:

There is a multi-pole, three-phase, permanent magnet generator (rated for 100 KVA, let's say) that feeds into a simple diode rectifier with a capacitive/DC Voltage load (something like a battery).

Without any active correction, the power factor of this circuitry is going to be pretty poor (maybe down around 0.5).

Now I understand that poor power factor is going to give us much higher \$ I^{2}R \$ losses in our wiring, diodes, etc. What I don't understand is the impact on the generator when running high power for short times with poor power factor.

I have two questions:

Can a multi-pole, 3 phase, permanent magnet generator even supply the power equivalent of its rated KVA at all with such power factor? (i.e. can I ever get 100kW out of this generator this way?)
Supposing I can, how long can I do that for? My limited understanding is that this will produce a lot of heat in the generator and cause it to fail if used this way continuously, but could still, in theory, provide this power. If I am to run it at 100kW at poor power factor for only a couple of minutes or less, am I not damaging the generator?


texts:
let say I have a discrete sine signal. I build the I and Q channel according to sampling with a frequency 4*time the signal frequency. that means multiplying the signal with [1 1 -1 -1.....]. in Matlab:

n1=1024;
n=[0:n1-1];
f=50;
sf=4*f;
PHI=150;
x=(1*sin(2*pi*(f*1e6)*((1/sf)*1e-6)*n+PHI*pi/180));
xx=reshape(x,4,n1/4);
xrr=[xx(1,1:n1/4) ;-xx(3,1:n1/4)];
xii=[xx(2,1:n1/4) ;-xx(4,1:n1/4)];
I=reshape(xrr,1,n1/2);
Q=reshape(xii,1,n1/2);

I filtred now the I and Q with a Low pass.

PHI=atan2d(Q,I)

Why get something different than 150?


texts: Making DC current gain assumptions when solvin BJT transistor circuits

texts: I spent an hour trying to figure out why my math was different than a simulation on a particular circuit. It turned out my DC current gain I chose, 100 as per the minimum value on the datasheet, was incorrect; It was approximately 200. It got me thinking, is there something I should be looking at that can help determine the actual DC current gain value prior to solving a transistor circuit beside the min and max values on a datasheet? Is it intuition I'm lacking?


texts: How can I control distortion in an op-amp circuit?

texts: What are common strategies/considerations for controlling distortion in an op amp given a 20-20K (Audio) frequency spectrum?


texts: Problems watch variables in the free STVD IDE while debugging code on STM8 MCUs

texts: Has anyone worked with ST Microelectronics STM8 8-bit MCUs and ST's free STVD IDE (COSMIC compiler) to write and debug code for them?  I'm so frustrated with it while debugging.  I set variables from constants and otherwise and see the watch window report totally different numbers.  The problem also seems to have to do with conversions from integers to floats.  float to int seems ok.  Notice in the attached that the variable 'delb' has been declared as a 16 bit unsigned integer and set to 1, and that code has clearly just been executed.  Yet, the watch window and the memory window say its value is '0'.  I can't tell if the discrepancy is due to the debugger, firmware or what.  Any ideas on what I'm doing wrong or what's happening?  Thanks.


texts: Problem with making a USB 3.0 A/B/Micro adapter - detects cable as USB 2.0

texts:
I'm trying to make a connector for a box of devices that have an Micro USB 3.0 input. The box is just a few physical connectors, no USB hub is planned.

But no matter how I try to connect the devices, it detects them as USB 2.0.

If I use a direct USB-A to Micro 3.0 cable, it detects them as proper USB 3.0.

I cannot use an USB hub because of bandwidth, I need separate USB channels, all of them go to a dedicated root hub on the motherboard.

I tried two approaches: first cut of the A plug from a USB 3.0 A-Micro cable and solder a female USB B 3.0 to that end:

Did not connect one pin as it was an OTG detect pin that did not even have a wire in the cable.

This detects as USB 2.0

Second, I tried to make a board with 3.0 female-female A-B, so I can connect a USB A-B cable from one end and a USB A-Micro cable from the other end.

This unfortunately also detects as USB 2.0.

From what I'm guessing, I have to exchange the SSTX+/SSTX-/SSRX+/SSRX- wires somehow. I tried to change some pairs, but wasn't able to find the proper combination.

This is what I tried, the two above methods on one board. Not too perfect solder, but electrically it was OK.


texts: Transmitter max output when checking ohms in parallel

texts:
To make my question simple and easy to understand I am giving an example below.
I have an RTD (platinum 100) which change resistance with increase in temperature, for checking that rtd is showing actual temperature I can check the ohms by connecting a multimeter and change its setting to ohms and it will show us the resistance of rtd.
now if we connect the rtd to a temperature transmitter or controller of which input is rtd's resistance and output is mA and we try to check the resistance of rtd while connected to transmitter/controller the output of transmitter rises to maximum which is 20mA. I want to know why is this.

I know we should not do like this but I just want to know for learning purpose.


texts:
Jitter as wiki explains undesired deviation in the periodicity of the clock and Phase Noise is random fluctuation in the phase of waveform caused by jitter. Exploring deeper into these terms when I look at measuring units i.e. femtosec or nanosec for jitter is easy to understand about the deviation in the periodicity.

But when I look into measuring unit of phase noise it is dBc/Hz.

Please explain the insight understanding that lies in dBc/Hz and how is co-related with the jitter.


texts: Is it safe to charge single 18650 cells without temperature sensing?

texts:
I was looking at 'power bank' circuit boards on Aliexpress, the kind that you add to a 18650 cell to make a basic 5V in/out supply.  I noticed they all seemed to be lacking any kind of temperature sensing.

Most serious BMSes come with some kind of temperature sensor, so they can kill the charge current if the temperature rises too much.  Is this necessary for a single lithium ion 18650?

I know about failure modes of packs where a cell goes short circuit in a parallel group, causing the other cells to discharge through it.  Or a cell in a series group has a bit less capacity and ends up reverse biased.  These events might cause   damage if the charger continues to pump current through the battery.

But neither single-cell 18650 charging boards, nor 18650 protection circuits, appear to have temperature sensing.  So is it safe to run a single cell without it?


texts: Does a battery's ability to supply high current mainly depend on its internal resistance?

texts:
I was posed the question of whether or not you would be able to start a car with 8 small 1.5V batteries in series (thereby creating the required 12V most cars run on). I immediately answered "no", with my reasoning being that the small AA batteries would not be able to supply enough current for the car.
Although I know this to be true, I have been thinking more and more about the reason behind this. Although there are many factors involved, would it be correct to say that the main determining factor for a battery's "current pushing ability" is its internal resistance?
My reasoning behind this is that, when the internal resistance of the battery is relatively high, and due to ohms law where I = V / R, the resistance of the battery will play a greater role in determining the current pull at low load resistances, but not much of a role at high load resistances?
This also makes sense to me, as it seems like car batteries tend to have internal resistances of many magnitudes smaller than tiny AA batteries.


texts:
I am fairly new to "electrical" engineering as a hobby/ past time.  I have always loved electricity and have made simple circuits since I was a little baby.

I am now working on one of my first arduino projects and I started thinking about what color wires I should use for the different I/O and serial communication.

I know it doesn't matter, but I am curious: are there standard wire colors for things such as Tx and Rx, Digital IO, analogue IO?

It is very common that Red is "Positive" and Black is "Negative."  I have also noticed that USB data wires are usually green and white.  Are there other standards that are commonly used for other applications?  Can someone give me a list please?


texts: Why there is only 4.5V at the 5V output of my arduino board?

texts: I have an Arduino Uno R3. At the 5V output port of the board with nothing connected and blinky running while powered through USB, I can measure only 4.5V. Is this normal? Or is there anything wrong with my board?


texts: How to Derive Capacitive- and Inductive Reactance Formula

texts:
I've been searching around the internet to find out how to derive the reactance formula for capacitors and inductors. But I couldn't really find anything, so I thought why not make a post about it.

I gave it a try myself though, but I could not get rid of the \$sin(\omega t)\$ in the numerator and the \$cos(\omega t)\$ in the denominator. This is what I was left with:

\$X_c = sin(\omega t)/(C\cdot\omega\cdot cos(\omega t))\$

I tried to convert the \$v(t) = V_{peak} * sin(\omega t)\$ to \$V_{RMS}\$, and the \$i(t)\$ by doing the same procedure, and it sure worked. But I feel like this isn't the right way of doing it. Wikipedia mentioned the use of phasors, but I couldn't really figure out a way to do it.

Thank you in advance,
Mr.Mongoloid


texts:
I am trying to find the standard dimensions for the spacing between the leads pictured below. The chip is an Intel 28F400 PSOP44 package. Does such a standard exist or do I have to rely on my own measurements?

I have searched, but not found useful documentation for possible spacing between each individual pad and between the rows. It may exist, but I don't know where to look.

This is the other side of the chip:

My goal is to access the pins through the pads on the bottom, and am trying to make an adapter of my own. That is why I was interested in the standard; I couldn't find an adapter either. Either would be appreciated, however, I cannot desolder the chip from the board.


texts: Remapping vector table in STM32F0 (no vector offset register)

texts:
I have written a bootloader before for a STM32 that had support for the vector offset and is easy peasy.

For STM32F0xx using HAL I read I need to move the vector table to ram and copy from flash. I have done as far as I know all the steps described here:

http://marcelojo.org/marcelojoeng/2015/09/bootloader-on-stm32f0.html

I can jump from bootloader to application but the moment an interrupt comes it crashes.

However, the ONLY thing I haven't done is to use the linker script. I have changed as follow the settings:

And I have selected "User memory layout from target dialgo" under Linker in Project settings. If I try to use the linker script by just writting):

MEMORY
{
VTRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192
RAM (xrw) : ORIGIN = 0x200000C0, LENGTH = 32K-192
FLASH (rx) : ORIGIN = 0x8008000, LENGTH = 256K-32K
}

I get the error:

*** Using Compiler 'V5.06 update 5 (build 528)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'Target 1'
linking...
.\Objects\DimmerBackend.axf: Warning: L6914W: option ropi ignored when using --scatter.
.\Objects\DimmerBackend.axf: Warning: L6914W: option rwpi ignored when using --scatter.
.\App2.sct(2): error: L6226E: Missing base address for region MEMORY.
.\App2.sct: Error: L6630E: Invalid token start expected number or ( but found x at position 8 on line 3
.\App2.sct: Error: L6629E: Unmatched parentheses expecting ) but found x at position 8 on line 3
.\App2.sct: Error: L6226E: Missing base address for region VTRAM.
.\App2.sct(3): error: L6292E: Ignoring unknown attribute 'xrw' specified for region VTRAM.
.\App2.sct(3): error: L6228E: Expected '{', found ')...'.
.\App2.sct(3): error: L6228E: Expected '}', found 'EOF'.
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 2 warning and 7 error messages.
".\Objects\DimmerBackend.axf" - 7 Error(s), 2 Warning(s).
Target not created.
Build Time Elapsed:  00:00:02

Without the linker script I can go to application but crash on interrupts. Therefore I assume somehow this magic misterious VTRAM is needed.

My questions are then:

What is this VTRAM?
Why I cant use that linker script?
How do I autogenerate a linker script, I dont think people write them themselves.


texts:
I asked a similar question here. I thought that that answer would be applicable to this code but I have the same problem. I have a ROM that runs at twice the speed of my CPU (left out all the commands except 'OUT' to make it easier to understand). The reason it runs at twice the speed is because the ROM has a pipeline.

The first value in my ROM is '0xF100' which would execute the 'OUT' instruction. For debugging purposes I let my 'OUT' instruction set 'output' to "11111111". When I simulate the design with ModelSim I find that 'output' doesn't get set to "11111111" immediately but instead needs another rising edge of 'ClockDivided' to set its value. I want 'output' to get it's value immediately, how do I do this?

code:

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use ieee.std_logic_unsigned.all;
entity first is
port(
input : in STD_LOGIC_VECTOR(7 downto 0) := "00000000";
output : out STD_LOGIC_VECTOR(7 downto 0) := "00000000";
PCout : out STD_LOGIC_VECTOR(15 downto 0) := "0000000000000000";
clock : in STD_LOGIC
);
end first;

architecture behavioral of first is
signal PC : STD_LOGIC_VECTOR(7 downto 0) := "00000000";
signal data : STD_LOGIC_VECTOR(15 downto 0) := "0000000000000000";
signal regC : STD_LOGIC_VECTOR(3 downto 0) := "0000";
signal regA : STD_LOGIC_VECTOR(3 downto 0) := "0000";
signal regB : STD_LOGIC_VECTOR(3 downto 0) := "0000";
signal opcode : STD_LOGIC_VECTOR(3 downto 0) := "0000";
type registerFile is array(15 downto 0) of std_logic_vector(7 downto 0);
signal registers : registerFile := (others => "00000000");
signal clockDivided : STD_LOGIC := '1';
component rom is
port(
    address : in STD_LOGIC_VECTOR(7 downto 0);
    q : out STD_LOGIC_VECTOR(15 downto 0);
    clock : in STD_LOGIC := '1'
);
end component;
begin
rom_inst : rom PORT MAP (
        address => PC,
        clock => clock,
        q => data
        );
PCout <= data;
process(clock)
begin
if rising_edge(clock) then
    clockDivided <= not(clockDivided); --dividing the clock because the ROM runs twice as fast
end if;
end process;
process(clockDivided)
begin
opcode <= data(15 downto 12);
regC <= data(11 downto 8);
regA <= data(7 downto 4);
regB <= data(3 downto 0);
if rising_edge(clockDivided) then
    registers(0) <= "00000000";
    case opcode is
        when "1111" => output <= "11111111"; --output doesn't get set to "11111111" immediately
        PC <= PC + 1;
        --OUT
        when others =>
        PC <= PC + 1;
        end case;
    end if;
end process;
end behavioral;

testbench:

library ieee;
use ieee.std_logic_1164.all;
entity testbench is
end testbench;

architecture behavioral of testbench is
signal inputX : STD_LOGIC_VECTOR(7 downto 0) := "00000000";
signal outputX : STD_LOGIC_VECTOR(7 downto 0) := "00000000";
signal PCX : STD_LOGIC_VECTOR(15 downto 0);
signal clockX : STD_LOGIC := '0';
component first
port(
    input : in STD_LOGIC_VECTOR(7 downto 0);
    output : out STD_LOGIC_VECTOR(7 downto 0);
    PCout : out STD_LOGIC_VECTOR(15 downto 0);
    clock : in STD_LOGIC
);
end component;
begin
uut: first port map(
    input => inputX,
    output => outputX,
    PCout => PCX,
    clock => clockX
);
stim_proc: process
begin
    clockX <= '0';
    wait for 1 ns;
    clockX <= '1';
    wait for 1 ns;
end process;
end behavioral;


texts: What are the advantages of controlling an ac pm motor in abc or qd0 reference frame?

texts:
let's refer to the following (vector) control schemes:

Qd0 is the synchronous reference frame, with d alligned to the pm magnetic field. the system is balanced and symmetric (so no 0 component).

the motor is an internal mounted permanent magnet ac motor.

for what I understood the main advantage is having vq and vd DC instead of va,vb,vc AC.

this means that at steady state I have a zero error (PI doesn't zero the error for AC? I'm not so sure about it). Qd0 scheme is more expensive due to the computational cost associated with the trasformation matrices.

Now I have this sentence on my book: ''Qd0 control is more performant since the current bandwidth does not depend on the speed''.

Why is that? I don't see why the current bandwidth is affected by the speed in the a,b,c reference frame, so I don't know wwhy this is not the case for q,d,0.

Is it because the speed (in a synchronous) pm machine is linked with the frequency of va,vb,vc (and so ia,ib,ic frequencies) ? I miss the actual connection to the bandwidth tho.

any advantage in using a,b,c? for now there doesn't seem any.


texts: Loading hex and binary data at the same time from text file into std_logic_vector

texts:
I'm trying to create a simple cache to use in simulation with my processor design.

I want to populate the cache with instructions that are stored in a file, .bin or .txt.

The file has no more than 1023 lines, and each line has the following format:

addr[tab]instruction

Adr is the address of the instruction, and the instruction is the instruction code, and [tab] is a tab (space between addr and instruction).

Here's the problem:

Addr is written as a hex value, has 32 bits, and instruction is written as a binary value
and also has 32 bits.
So one line looks like, for example, this

0000000A[tab]00001000000100001110000000000011

My idea was to create an array of std logic vectors and each line was one std logic vector where elem(63 downto 32) would be the address and elem (31 downto 0) would be the instruction code.

How do I read each line and at the same time convert hex value into binary, ignore tab, read the instruction and store everything into one std logic vector?

Thanks in advance for your help.

EDIT:

Would something like this work:

while not endfile(load_file) loop
        readline(load_file, rdline);
        hread(rdline, address);
        read(rdline, data);
        memory(index) := data;
        index := index + 1;
end loop;

My question is: does hread move the cursor when reading the line? Also, how would I go about skipping the tab character?


texts: Running LED on low voltage for a long time

texts:
I am trying to run a 0.5W white LED on a 2.4 V supply from a rechargeable battery. The LED needs a voltage drop of 3V to light up. My only constraint is to use commonly available components only.
Tried using a 555 timer followed by a Boost convertor,
but the 555 itself needs Voltage > 3V to run.

I also tried a joule thief but it is not easily available, and it reduces life of the battery and cannot be used for a long time.

Any suggestions are welcome.

Battery: 2.4V rechargable, 1000mAh.

Target run time is 3 to 4 hours (or more) per charge.


texts: How can I improve duty cycle of Ne 555 timer to the 50% if I am generating triangle wave above 200 kHz?

texts: In this circuit I am generating a 200 kHz triangular wave, in real-time when I am performing I am getting a  triangular wave with duty cycle of 62%, I want a 50% duty cycle. How I can get it?


texts: Effect of a longer loopback cable on radiated EMI

texts:
We have a product that we successfully ran through radiated EMI testing (EN55022) with our highest peak approx. 13dB under the permissible limit.

Looking at our test setup and what is required to comply with the new EN55032 standard, I see our original test setup used loopback cables which were only 0.8 meters in length rather than 2 meters.

I'm looking for an equation to help calculate what would be the worst-case increase to our radiated EMI from loopback cables which are this much longer.
I have a hard time believing a 2.5x longer cable would add 13db of noise, but I have no way to mathematically support that.


texts: Simulate the audio amplifier using the circuit shown

texts: Okay so I've done the exact same thing in Multisim but I don't know how to find the voltage again. I tried to place the multimeter in the audio (where I have placed the multimeter) but the values vary and when I put it in AC, there's no values at all


texts: Need Help With Transistor Logic Circuit Design

texts:
Greetings all and Happy New Year!

I've been working on a logic circuit to control the main entrance gate at our ranch for some time now.  I've been testing using Falstad's Circuit Simulator.

However, I've run into a problem: In the control head, I need to implement some simple logic to turn on the "STOPPED" indicator when the main entrance gate is not at the open limit (open limit = NOT grounded) AND not at the closed limit (closed limit = NOT grounded), OR when the "STOP" button is pressed (sending 12V to the latch interrupt relay).

I'm going to admit right up front that I have very little electronics knowledge compared to most people out here, but that hasn't stopped me from trying - smiles.

Let me post what I have first, and then I will explain the dilemma:

In the above schematic, I can see the Q3 transistor is forward biased even when all inputs are zero, and I fail to understand why.

I'm also not sure if I have the saturation points set correctly.

And lastly, not matter what I do, I cannot make the current draw of the LED equal to exactly 10 mA in all scenarios - it's close, but I'd like to know if there is a solution where it is always exactly 10 mA.

It DOES work....just not perfectly.  Q1, Q2, and Q3 are all 100 hFE transistors, and power consumption is a factor since this is all solar powered.

Appreciate any help on this.

I'm really interested in other's thoughts and ideas as I am sure there is more than a couple of solutions to this problem.

AnalogKid nailed it.  Can't thank you enough.


texts: Why are off grid solar setups only 12, 24, 48 VDC?

texts:
I am looking to produce 50kW for an off grid solar project. Ideally, I'd like to have a high voltage DC battery system with a high power battery inverter and charge controller.

I have only found a couple high VDC (384V) inverters and charge controllers, and they are from Chinese manufacturers. I'm a little hesitant to buy from them.

All of the big companies only use 12, 24, and 48 VDC. I understand that it's the most common and you don't need much power for a home, but if I want to produce 50kW at 48 VDC that's over 1000A! If I run that in parallel to 48V inverters I would need 10 or more inverters. That is a lot of wire and work.

Is there an electrical reason why they would cap these products at 48 VDC?


texts: What language do microcontrollers use apart from C?

texts: I want to start making devices and I read about microcontrollers and other stuff on the Internet. I wonder if there are other languages to program microcontrollers with in addition to C.


texts: TVS Diode Selection for automotive application

texts:
I'm looking to protect the input of a 5v buck regulator with an absolute maximum input voltage of 20v. The circuit is running a car.
The typical input of the regulator is 12v and at max, the circuit will pull 500mA.
I'm looking at the Nexperia PESD12VS2UT with has the following characteristics:
Vbr Min: 14.7
Vbr max: 15.3
Clamping Voltage @ 1A: 19v
My question is: Does this TVS provide (more or less) enough wiggle room for the circuit to operate under normal conditions without breaking down? I understand that vehicle charging systems run at 14v, but I haven't been able to find a part that clamps under 20v AND has a breakdown over 15v.


texts:
I am just testing this component MOC3021 optoisolator, its datasheet can be found here.

This is my circuit in Proteus:

Please forgive me for my ignorance of electronics, I have my background in computer science.

I tried the whole day yesterday trying to make out what's written about it in the datasheet, the point of connections was easy to understand, rest I don't know much. However, I did learn a lot and welcome to accept more.

However as you can see the LED didn't glow, now for one thing I know it's an AC optoisolator but shouldn't current flow from one of the diodes of the DIAC?

Thanks a lot :)

Update : Problem Solved

Thanks a lot, all of you it's a great community here ( especially for noobs like me ).
This is the final working circuit.

P.S.

All answers were correct but I could only choose one, sorry others :|


texts: Need comments and ideas for LED flashlight project

texts:
I'm thinking about making a simple LED flashlight.

After doing some research, I think I'm going to use some 5 mm 12 Cd white LEDs with 3.6 V drop which can pass 20 mA. I'm not yet sure how much LEDs I'd need, but for now, I'm thinking about 5 or 10.

For power supply, I was thinking about single 6LR61 battery or 4 serially connected LR6 batteries or maybe even two serially connected 6LR61 batteries (but I'd like to avoid that as 6LR61 are pretty expensive here).

The 6LR61 batteries popular here according to data sheet have capacity 550 mAh while LR6 have capacity of 2600 mAh.  Minimal voltage for 6LR61 is 4.8 V and 0.8 V for LR6. Since LR6 batteries have considerably higher capacity, I'm most likely going to use them, unless you provide a reason why to go with 9V battery. Also, if I serially connect batteries, would pack's capacity increase?

As for circuit itself, I was thinking something like battery pack with a switch serially connected to it. I'd the use parallel connection to connect a number of branches consisting of a resistor and LED to the switch on one end and battery pack on the other end.

However I'm concerned about energy usage. I'll have lots of resistors and each one will consume some energy. If I go for 9 V option or even 18 V option, I'd reduce amount of energy wasted by resistors, since I could connect several LEDs serially with a single resistor.

Another point which bothers me is what type of resistors to choose. I'd like to use up as much of the batteries as possible and have device work as long as possible. I've been experimenting with results form http://ledcalc.com/, but I'm still not certain what to choose.

EDIT 1
Another idea: Would a 555 timer plus a transistor as a switch be a good choice for making device PWM controlled?


texts: Help identifying a 4 pin and 3 pin screw on connector?

texts:
I'm hoping to identify the name of the connectors pictured here.

The inner diameter of the threaded ring is roughly 13mm, the outer diameter is roughly 18mm. The pin spacing is roughly 3.5mm. The slot  in the threaded ring is a little under 2mm.


texts: Are the two wires of a speaker identical?

texts:
I am working with speakers for the first time. There are two lines, one black and one white.
Are they the same? Is one defined as hi-voltage and another as low?


texts: Supervisory watchdog to assure UV LEDs are off and stay off during non-use

texts:
I'm designing a circuit consisting of 3 pairs of LEDs. Each pair has one UV-LED and a white LED. The pairs will be turned on consecutively and for about 1 second each. Between each use there will be an arbitrary time frame but the minimum amount of time between each use is at least 5 minutes.
Since I am working with UV LEDs and white LEDs (that contain wavelengths in UV area) I want to design this board in a way to make sure that even if the CPU crashes, or if gamma radiation changes a register on the CPU, that those LEDs are not turned on by accident.
I looked through a few watchdog timer ICs and stumbled over supervisory watchdog ICs that check if power rails are within a certain voltage range, https://www.ti.com/product/TPS386000. I would want to check if those power rails are on for a certain period of time and if they are then safely turned off.
Any suggestions on how to design this safety feature?


texts:
Yesterday (for the first time seriously) I was disassembling a broken kitchen machine. Not to repair it, but to (hopefully) get some interesting electric components.

Sadly, there was not much inside that was of much use, except some bolts and nuts. And a big AC motor which was too much attached to the machine to be reused.

However, the only interesting looking component was kind of 'exploded' only the enclosure to be in one piece. But I don't know what it is. I'm not planning to fix the machine, but just wondering what kind of component it is.

Below are pictures of the description. The pictures are overlapping mostly but this way everything is shown.


texts:
I have an Atmel SAM3X8E microcontroller on a board.  According to the datasheet, it should provide a '>' prompt on the serial UART when it's powered on, to allow you to download code to it.  Mine doesn't do that, and doesn't respond to any input on the UART.

Relevant information, AFAICT:

The VDDIO pins are at 3.3V.
VDDIN is at 3.3V and VDDOUT is at 1.8V -> the voltage regulator is working
The capacitors on VDDOUT recommended by the datasheet (table 45-3 note 2) are missing - could this cause this type of problem?
The VDDCORE pins are tied to VDDOUT.
The VDDUTMI, VDDANA and ADVREF pins are all tied to 3.3V.
The crystal across XIN-XOUT is producing 12MHz, though it is operating without the usual capacitors.
VDDBU is at 3.3V, though this appears to be driven by the SAM3X itself (there is no backup battery in place yet).
XIN32 and XOUT32 are unconnected.
PC0 (which doubles as ERASE) is being used as an output (to the gate of a MOSFET) - it is not being driven and is sitting at 0V.
FWUP, NRST and NRSTB are being pulled up to 3.3V through 100k.
TST is being pulled down to 0V through 100k.
JTAGSEL is tied to 3.3V.
A 3.3V UART is connected to PA8 and PA9 (and yes, I'm fairly sure they're connected the right way around!)
The SPI lines are connected to the SPI controller of a Raspberry Pi, but the SPI controller on the Pi is not enabled (the intention is for the SAM3X8E to be the SPI slave, though of course we haven't got as far as configuring that yet) so it's possible these pins are floating.
All available ADC pins are connected to analog voltages (I haven't checked all these in detail, but they should all in the 0-3.3V range).
PC4 is being used as an output in the same way as PC0.
Remaining pins are unconnected, though the JTAG pins are broken out to a connector.

I'm aware that there are a few design defects here (mainly missing capacitors).  But I'm hoping someone with some experience of the SAM3X (it's the same part used in the Arduino Due) will know something I've missed and be able to point me where I'm going wrong - either the defects listed above could quite plausibly cause the sort of problem I'm seeing and I need to get a new prototype made that resolves them, or there's something else I'm missing.

Sadly the connector I've picked for the JTAG pins is not the standard ARM one, which is proving a mistake.  I've got a 0.1" pitch, 14-pin connector with this pinout:

3.3V       GND
GND        GND
TDI        GND
TMS        GND
TCK        GND
TDO       NRST
3.3V       GND

Suggestions on how to make good use of this would also be gratefully received.


texts: I've recently been given a 24W 230VAC 2 pole shaded pole motor(Mellor Electric AC1004) to make a fan out of. This fan needs to have a variable output speed depending on the temperature of the room. I am quite new to motors and was wondering how to make the motor speed variable. I have done some research and seen that by just varying the voltage the speed can be reduced, however I believe this is not the best way to go about this. I've also seen people use Triac based dimmers in order to accomplish the same thing as well as VFD's but they are quite expensive(VFD's) and i don't think they are suitable to this. I would like some input as to what method would be best. Thanks.


texts: LED setup, general questions regarding amps

texts:
I'm trying to fully understand the limitations of amps when using a few various devices.

I tried to understand amps via this post:
Voltage at what Amperage

Specifically:

  So, the possible dangerous situations are:

  If the voltage is too high for the device. If the amps are too low for
  the device.

What I'm trying to do:

Using this Power Supply

Connecting the power supply to
this converter

Where the converter plugs into this controller

And the controller plugs into this
LED Strip

Will this setup work? If so, or if not, could you provide a quick explanation as to my misunderstanding here?

Any information is greatly appreciated! Just trying to learn a bit and make some neat stuff.


texts: Does the USB-C Alt Mode specification require support of the USB 3 protocol?

texts:
If a device is designed with a USB-C port that's intended for use exclusively in an alt mode such as Displayport or PCIe rather than for use as a general-purpose USB port, then the hardware to support the USB 3 protocol for that port would be a waste of money.

Does the spec require USB 3 support even if that support will be unused? Or can USB 3 be omitted, and just (relatively cheap) USB 2 provided for the billboard device class and for negotiating the alt mode configuration for the four twisted pairs that would normally be used for USB 3?


texts: What is the use of second transistor in this circuit?

texts:
This is probably not a good title, can you suggest me a better one?

I have this circuit above, and I am supposed to find its voltage gain \$V_{out}\over V_{in}\$. But I don't understand what use the second transistor(right one) has here. If it wasn't present, I would have calculated \$dV_{out}\over dV_{in}\$ by differentiating \$V_{out}=V_{dd}-I_cR_c\$ where \$I_c=I_se^{V_{be}\over V_T}\$. But due to the presence of second transistor, a part of \$I_e\$ will flow in it, which will in turn reduce \$V_e\$ of the first transistor. Can I get some hints on how to approach this problem? Are such circuits of any practical use?


texts: LM358 differential voltage and amplifier circuit

texts:
I designed a circuit that's rather common:

simulate this circuit – Schematic created using CircuitLab

And I have a problem. I have got few LM358s, some from ST, some from other companies. (I tested LMV358 also - it puts ~5 V as V_OUT_FINAL).
I made a designed circuit and already put every one of those LM358s in it and none works the way I want them to do. I always get a constant error of 1-3 V as V_OUT_FINAL. I also get wrong result as V_OUT_1 (because it's around 0,5-1 V).
I don't know what's wrong. The values in my real project are wrong in terms to the designed and simulated. I simulated it on many tools already and all give me results like those from attached circuit.

V_IN_1 = 12 V, V_IN_2 ~ 12 V (little less than 12V).
V_OUT_1 = few mV.
V_OUT_FINAL ~ 3 V.


texts: Designing a Modulator for a digital communication signal

texts:
If I have a device and its hardware that is a low-power and that the instantaneous energy it uses must be constant and my specifications indicate that the modulator must be rate adaptive. what modulation technique should I use, PAM modulation, QAM modulation, Phase modulation or multi-dimensional modulation?
I think my question here is what's the relation of PAM, QAM, Phase modulation and multi-dimensional modulation with rate, power and energy.


texts: Does "a signal is buried in noise" mean that the noise amplitude is still smaller than the signal amplitude? (Special case: Lock-in amplification)

texts:
I heard that Lock-in amplifiers (LIAs) especially play to their strengths when the signals are weak compared to the noise level. But then I talked with someone about it, who understands the principles of lock-in amplification, and she said - which makes sense to me now - that of course the signal amplitude still needs to be larger than the level of noise. Otherwise we couldn't represent the signal V_s like this:
$$
V_{s} = R\cdot cos(\omega_{s} t + \phi)
$$
Is that correct? I find the formulation "buried in noise" a bit confusing then...
PS: I often get criticized for not explaining enough about the basics of the topic that I ask my question about. Since I don't want my question to get closed again, I would like to refer you to this page, which I used to learn about it: https://www.zhinst.com/others/en/resources/principles-of-lock-in-detection
Also, to forestall criticism that I just stipulate that "buried in noise" is an existent phrase in this context, I would refer you to this page, where you can see some examples of this phrase: https://preview.tinyurl.com/y64re9ln (secure URL: only preview of website, that would otherwise redirect to a Google domain)


texts: What does the rectifier do in a crystal radio?

texts:
I have been reading up on semiconductors and all of the references that I have found say that the first practical application of the semiconductor diode was in crystal radios, and that semiconductor-based rectifiers quickly gave way to tube-based amplifiers.

So I am trying to understand why the rectifier is necessary at all. An excellent explanation of how a crystal radio works (and why it is now hard to get the components to build them) can be found here. For those who don't want to click, here is the circuit diagram:

So the coil and capacitor form a resonating circuit. Frequencies below a threshold go through the coil to ground, and those above a threshold go through the capacitor to ground, but those at the resonating frequency are stuck and have to go through the diode to the headphones. Every description of this circuit I have read say that the diode somehow demodulates the signal, and I just don't understand how it can do that. There is, say, a 88Khz carrier frequency which is AM modulated with a 300Hz-3KHz signal of the human voice. How does the diode, by chopping off the parts of the signal under the zero, do that?


texts: function of resistors in transistor switch

texts:
How does the ratio of R2 to R3 \begin{equation} Ratio=R_2/R_3 \end{equation} affect the transistor in the following circuit (note: V1 applies constant voltage of 4V):

When the transistor switches ON the base node has a voltage of 0.7V and current flows through the lamp. It switches OFF when VBE reaches 0V, this is achieveable when R2 is low enough so that all current goes through R2 to the ground. How can we find the ratio of R2 to R3?


texts:
I need to replace the 18650 battery of one application. The battery doesn't have any marking about volts, mAh or amperes.
Because it's 18650, the  voltage is fixed - done. mAh - will use 2000mAh (let's say or higher.)
Now I got stuck when I was looking for battery 18650 2000mAh. I can see 5A, 10A, 20A or even more. Not getting what current matters here.
Wondering if someone can help me understand it?
What will happen if I use same volt and capacity battery but different in current.
I may sound rubbish, but trust me I have tried multiple articles but no exact scenario and answer.


texts: What's the difference between uIP, lwIP, 6LoWPAN?

texts:
I just started to work on a wireless sensor network project and encounter these three terms: uIP, lwIP, 6LoWPAN.  Since I'm new to this area, could anyone please explain the differences between these three terms?

Thanks!


texts:
Background

I would like to make a simple battery-powered circuit with two alternatively selectable linear voltage regulators to set the output voltage.

Question

Given the circuit below should I worry about the two regulators "upsetting" each other in any way or is this going to work just fine?


texts: Simplest method to reliably detect small currents

texts:
I am trying to detect when there is a current in a given circuit using only a digital input and basic components (e.g. diodes, resisters, transistors); current is intermittent and power is small, 40-100mA @ 12V. I do not need to measure the current, simply know when it is present or not present.
I am trying to avoid additional chips e.g. INA219, optocouplers, etc. Is it possible to detect (again, not measure, only detect) current this way? Detection does not need to be rapid, within 100ms would be fine.
The load can have resistors, diodes, etc. in series or parallel. A voltage drop of up to 2 volts is fine. The power supply is stable around 12 volts and near the load. The digital input/output logic is 3.3V (Raspberry Pi); the presence of current would ideally be read as 3.3V (or at least 2) while the lack of current would ideally be read as 0V (or less than 2).
The important detail I forgot to mention is that the voltage source switches polarity. It is stable at 12 volts, but current can flow in either direction.


texts: Will the TVS diode work if a high alternating voltage accidentally gets into the circuit?

texts:
I have a controller with power lines 220V / 12V / 5V.
The 220 V line is well insulated from low voltage circuits. On the 12 V line, a TVS P6SMB16CA diode is connected.

What happens if 220 V accidentally hits the 12 V line?
Will the TVS diode trip with an AC line fuse? Can the diode protect the circuit so that the dangerous voltage does not go beyond it?


texts: This is a schematic for a very simple guitar pre-amp.  I understand the basic amplifier architecture except for those two 33k resistors in the middle, combined with the 220nF capacitor.  Any ideas as to what those are for?


texts:
I was going through the book for the difference between TTL and CMOS. What does the term high component density means in CMOS ICs?
As writtern CMOS has "high component density."


texts:
I'm trying to make mood lamp with only hardware PWM and interrupts (i. e. main loop should be empty). I'm doing it as a challenge to learn how timers work, not for any practical reason. So far I've done this:

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

#include <stdlib.h>

volatile unsigned int elapsed_cycles = 0;
volatile unsigned char red, green, blue;

int main(void)
{
    // init timers as fast PWM
    TCCR0A = (1 << WGM00) | (1 << WGM01);
    TCCR1A = (1 << WGM10) | (1 << WGM12);

    // set prescaler to 1
    TCCR0B |= (1 << CS00);
    TCCR1B |= (1 << CS00);

    // set ports to output
    DDRB |= (1 << PB2);
    DDRB |= (1 << PB3);
    DDRB |= (1 << PB4);

    // set outputs to PWM
    TCCR0A |= (1 << COM0A1);
    TCCR1A |= (1 << COM1A1);
    TCCR1A |= (1 << COM1B1);

    // initial PWM duty cycle
    OCR0A = 0;
    OCR1A = 0;
    OCR1B = 0;

    // overflow interrupt setup
    TIMSK |= (1 << TOIE0);
    sei();

    for (;;)
    {
    }
}

ISR(TIMER0_OVF_vect)
{
    elapsed_cycles++;

    if (elapsed_cycles == 10000)
    {
        red = rand() / (RAND_MAX / 0xff + 1);
        green = rand() / (RAND_MAX / 0xff + 1);
        blue = rand() / (RAND_MAX / 0xff + 1);

        elapsed_cycles = 0;
    }

    OCR0A = red;
    OCR1A = green;
    OCR1B = blue;
}

This code change colors randomly, but not fading between them. So, how can I achieve fading to next color? Thanks in advance.


texts:
hey i have some chips with the arduino bootloader on it and some chips without. I want to use them using the same circuit. The confusion I have is with the clock the arduino uses 16MHz external and avr has its internal will it cause a problem if I use them in the same circuit?

I was thinking, I just add the clock, the arduino chips will use the crystal and the other chips will not. Am I right?


texts:
In order to improve the output impedance of a current mirror emitter resistance are added to them..but on the other way these emitter resistances have certain drawbacks which involve restricting output voltage to a lower range etc..and then in order to nullify these disturbances cascode stages of transistors are required..which provides a much higher output impedances without large emitter voltage drops...

But how does cascode configuration improves output impedance to a higher level ???.....


texts:
I'd like to control a 3.5W heater using an ESP8266 GPIO pin, but I'm both a complete beginner and I'm unsure about the best setup to use.

I'm powering the circuit at 5v, which includes a nodemcu (with it's own 3.3v regulator) and the heater (an 8ohm resistor) which I'm using in a feedback loop and which I'd like to switch at a frequency of at most 1hz. I was hoping to avoid a relay for this reason, and use an NPN transistor to control the heater:

simulate this circuit – Schematic created using CircuitLab

I never had to switch that much power before, so I've got some questions related to both transistors and the circuit in general. The ESP8266 GPIO output pins are at 3.3v and can source at most 12mA. Can I actually use a 2N2222A BJT in this situation? The 2N2222A is rated for a total power dissipation of 500mW, which I understand I'm going to exceed in this configuration.

Do I have to use a power transistor/mosfet? In this case, what would you suggest that could be easily put into saturation just by what's provided by the GPIO pin?

To actually power the circuit I'm using a regular 5v/1.5A switched power supply. Do I also need to worry about voltage drops that could be caused by switching on the heater in this scenario?


texts:
I am in the process of repairing a circuit board.
Can you give me a replacement for the component outlined in red?
The imprint on the board is DZ with consecutive numbering (here DZ18).
Is it maybe a zener diode?
The component is installed on the power board of a 4kW controller of an e-scooter.(Power Board 4.2)
The size is about 5x2.5mm - SMA.


texts:
A message signal is modulated on a carrier wave of amplitude \$50V\$ using amplitude modulation. The modulation index is given as \$50\%\$. Find the amplitude of the AM wave.

I was able to calculate the amplitude of the message signal as \$25V\$. However I'm stuck at the amplitude of AM wave.

The maximum displacement of the AM wave will be \$50+25=75V\$ and the minimum displacement will be \$50-25=25V\$.

So is the amplitude of the AM wave \$75V\$ or is it \$75-25=50V\$ i.e. is it the maximum displacement or the difference between the maximum and minimum displacements?

I know amplitude is the maximum displacement from the mean position however I can't seem to figure the mean position of this AM wave.


texts: How to reduce AC voltage from 17V to 15.8V?

texts:
My old stereo's transformer has burnt out after a power surge and I'm trying to replace it.

I have 220V AC -> 17V AC toroidal transformer available. In the schematic diagram I found it indicates that it should be 15.8V AC. The fuse is rated for 3.15A.

What would be the best way to reduce the voltage?

Related question


texts:
I have wired a 600 p/r incremental encoder to an Arduino Uno.

My question is this:

Given that the Arduino has a clock speed of 16Mhz and I really do not want to miss a single pulse I am creating a CMOS hard copy of the logic. I have:

Inc Encoder -> firing edge trigger (by propogation delay) through xor and nxor cmos (acting as clock) -> 16bit binary up/down counter -> d flop register

The inc encoder also has a logic block which denotes which direction it is turning (it sets the up/down pin of the binary counter.

My problem is this - how would you deal with the Arduino reading the current count. I do not like directly reading the counter as it can change during read i.e. if it is 9, the arduino reads LSB and during time taken to read next the counter increment to 10 then I could end up with a reading of 19. I thought about a buffer but if I use the edge trigger logic then it appears that by the time the counter has done its logic the flip flop register will have read the revious value.

I am looking at async Preset with data hold but this type of d-flop / other flip-flop are rare(ish)

Any other scheme I should think about?


texts:
For several years now Don Lancaster is promoting magic sinewaves. They are strings of binary digits (like 420 bits for a full sine cycle) that, when used to drive a digital switch (MOSFET/IGBP), result in quite a clean sinewave (only very high harmonics remaining). For more details, please read the linked article or any other he wrote on that matter.

Had anybody actually used these for anything? The idea seems quite useful but I cannot find any information about these (that did not come from Lancaster himself).


texts:
I have the following problem, I need to use a pushbutton that is of the switch type on / off, but I do not get any since all are of momentary action and I need one that maintains the state until I press it again. This type of switch exists? I have doubts about it.
I got this, but I have the doubt if it is of momentary action. https://www.mouser.com/ProductDetail/Mountain-Switch/101-0464-EV/?qs=sGAEpiMZZMsgGjVA3toVBOvQBfIqAaeKOkMmYcOfYg8%3d
I appreciate any help.


texts: When/where to open and close a transformers output

texts:
I came across Beware of Zero-Crossover Switching of Transformers (TE Connectivity App Note) where they discuss about how you shouldn't switch a transformer at the zero crossing because it would have the highest inrush.

However, if I am looking to switch on secondary, would this still apply ? In this case, would the zero crossing be a good place to switch (open and close) or it doesn't matter at all ?


texts: How can i make my mod 10 up/down counter wrap from 0 to 9 when counting down?

texts:
I know there is something wrong with my reset logic because when counting down it starts from 5 and changes if i have any wires connected to the reset of the flip flops. I don't know how to fix this and have been struggling for a while now.

EDIT: this is the whole task. i wanted to make a decade counter so i could add two together and have a counter that goes from 0-99.1-99 is extra marks Image of task


texts:
I get an error message "Error (10398): VHDL Process Statement error: Process Statement must contain only one Wait Statement" for this code
       FOR i IN 0 TO N LOOP
   WAIT UNTIL tx_busy = '0';
   tx_data <= data(i);
END LOOP;
I understand what it means and why it's there, but I still feel there's a way to do what I intended, but haven't found a way


texts:
I'm trying to design a 16uH 50Arms 4kHz air core inductor.

At first it sounded nice and simple. I found this formula
L= (d^2 * n^2)/(18d+40l)

where:

L is inductance in micro Henrys,
d is coil diameter in inches,
l  is coil length in inches, and
n is number of turns.

Everything seemed great. Then i came across that this formula is only used for radio frequency 1 - 30MHz or so.

How would i design an air core inductor at 4kHz?


texts: Pullup resistors. Does it make any difference what side of the series resistor?

texts:
The line is high frequency digital line. It has to be pulled up. Does the side of the series resistor make any difference?

simulate this circuit – Schematic created using CircuitLab
or

simulate this circuit


texts: Nearly identical mosfets yet only 1 works (FQP30N06L vs RFP30N06LE)

texts:
So I’m trying to run a 3.7V motor off of a mosfet, and it works perfectly fine when I provide a 3.7V PWM signal to the gate of a FQP30N06L.

However, when I swap out that mosfet for the RFP30N06LE, it does not work. It did work when I provided it 9V however. I don’t understand why this is the case, I have compared the two data sheets and they are nearly identical, yet the LE does not seem to be even reaching its threshold voltage at 3.7V.

I have tried connecting the gate directly to a 3.7V rail instead of PWM pin but to no effect. I have 220 ohm resistors on the gate and I have tried with and without a 10k pulldown resistor, still nothing. Any ideas?


texts: Can't understand where backlight pins are in this LCD module

texts:
I have this LCD display: RC0802A-BIW-CSX

It is supposed to have a backlight, but I can't understand where the backlight LED is since the connections are just 14 pin, and backlight is not mentioned. Any idea?


texts: Hand in contact with laptop causes oscilloscope power spike

texts:
I recently placed my MacBook Pro next to an oscilloscope with a 2.4GHz monopole antenna.

Whenever I placed my hand on the metal casing of the laptop, this results in a large power spike. Why is this? I don't understand the principles behind this occurring.

These spikes do not occur when I touched the plastic keypads.

However, these spikes DO occur (with lower amplitude) when I touch the cords of my headphones (connected to the laptop).


texts: Multi-byte I2C read not working while "equivalent" Arduino one does

texts:
I understand people have probably asked this before but I've looked around for hours and can't find what I'm doing wrong.

I'm trying to get a multi-byte transfer to occur between an i2c device, the DS3231 and my microcontroller, an AT89S51 (8051).

I can get all the data out of it using multiple write/request methods but I would like to learn how to do multi-byte reads/writes so I can simplify my code and get a better understanding of how i2c works.

I've attempted to draw on the image what each portion of the signal does but as it turns out, a mouse isn't the best for this.

The first image is the Arduino equivalent waveform and the second is my implementation.

If you compare the waveforms of the Arduino and my 8051, they are fairly similar except for the fact that the Arduino sends back the full 7 bytes of data whereas mine only sends back 1.

At this point, the only thing I think could be wrong is that maybe my 8051 micro doesn't pull the SDA line low enough when it needs to send the ACK signal and so it doesn't get registered by the i2c device. If this is the case, is there a solution to it?

Thank you for your time.

edit:
I deleted the old image and replaced it with one with a better duty cycle.


texts: LiFePO4 cells - self-balancing in series or parallel?

texts:
I am building various banks / packs from individual prismatic LFP cells, nominal 3.2V each. New and pretty large, 60-400AH.

I have a good power supply, charge each cell independently, Bulk stage CC to a standard voltage setpoint, then hold CV Absorb until a standardized trailing amps, then stop, no Float.

This results in a batch of cells already pretty well balanced, but I want to ensure as precisely equal a resting voltage at that top SoC point as possible, by hooking a batch of them up (say 18 cells) and letting any potential differences equalize passively over time.

During that time, no loads, no charging, no devices attached at all other than the top-quality connecting wiring between cells, the block as a whole being isolated.

Should I do this by connecting them in series, or in parallel?

These connections are just temporary, before later assembling into production packs / banks.


texts: What is the difference between "Operating Voltage" and "Drain-Source Voltage" for an LDMOS FET?

texts:
The NXP AFT05MP075NR1 ~75W power N-Channel Enhancement-Mode Lateral MOSFET provides the following maximum ratings in the datasheet:

Operating Voltage (Vdd): 17, +0 Vdc
Drain-Source Voltage (Vdss): -0.5, +40 Vdc
Gate-Source Voltage (Vgs): -6, +12 Vdc

I thought Vdss for a FET was the maximum "Operating Voltage", but clearly they are listed separately.
Questions:

What is the difference between Vdd and Vdss?
How would it "operate" at a different voltage than Vdss?
What does it mean by "operate" in that sense?


texts:
I already asked this question Triac BT 136 getting shorted when load is given to T1.

When I referred this link, I understood rate effect is the root cause for our problem. To avoid this either we could use RC snubber or high power triac. Such as BTA316B-800E and BTA316B-800B.

Now I got confused which one to select from these.

My application is to dimmer control incandescent bulb or fan.

Switching ON/OFF LED lamps(all appliances with 240V/50Hz) or any other alternative step I could make in the circuit.


texts:
This sentence is seen on numerous datasheets:

NCV Prefix for Automotive and Other Applications Requiring Site and Control Changes.

The part numbers in those datasheets usually have this prefix as an alternative part number. For instance On Semiconductor's MC33079 is also named NCV33079.

Is this some manufacturer-independent system for more easily matching part numbers?

All the search engine hits about this are just datasheets.


texts: Why do almost all HD44780-based LCD displays use font pattern A00

texts:
The vast majority of text LCD displays for screens 4x40 or smaller use a controller based on the Hitachi HD44780.  It's a pretty nice design in a lot of ways, so its popularity is understandable.  One aspect of it puzzles me, however.

The display controller is designed to operate with either 5x8 or 5x10 fonts; according to the 44780 data sheet, the part is available with two stock ROM configurations--one with 248 5x8 character shapes, designated A02, and one with 160 5x8 shapes and 32 5x10 shapes, designated A00.  The 5x10 character shapes are only really useful on single-line displays which have a 10-high LCD matrix, and such displays seem to be very rare (I think I've seen data sheets for a handful of them, if that, and I don't know that I've ever actually seen one in person).

I am puzzled, then, by why it seems that every LCD display I've seen based on an HD44780-compatible controller, uses font pattern A00 which has many blank character cells, and whose glyphs for a number of characters (including 0xE4, 0xE6, 0xE7, 0xEA, 0xF0, 0xF1, and 0xF9) are essentially useless with anything other than a single-line 5x10 display.  I would have expected that at least some vendors would have at least changed the definitions for those characters to look good on a 5x8 display, but I'm unaware of any having done so.  I would also think that for many applications, ROM pattern A02 would be more useful than ROM pattern A00, but all the displays I've ever seen for sale use ROM pattern A00.

To be sure, in a lot of applications, the ability to define custom glyphs substantially mitigates the limitations of the built-in character set, but the display can only show eight different custom glyphs at a time.  Having built-in glyphs for things like arrows would mean that applications needing arrows could have more custom glyphs left over for other purposes.

If nothing else, it would seem logical for displays to have an option to fill in character ranges 0x10-0x1F and 0x80-0x9F with useful characters.  If a particular controller is only going to be used with 5x8 or 5x16 glass (would seem pretty likely), it should be a simple matter to use the 5x10-font control bit to enable or disable those characters.  That would make the controller compatible with software that would expect all of those characters to appear as blank, but would allow software that knows what it is to exploit those other characters.


texts: What are these four pin components labeled LB-4 on a motor control circuit from 1979?

texts:
This board performs the speed control logic for a 3 HP shunt-wound DC motor driver in a CNC mill built in 1979. The spindle turned on intermittently last week and then stopped working, so I'm reverse engineering the circuit to debug it.

I've ID'd everything except these three black components with the blue dots near the card edge connector. They each have four leads, and the only markings are "LB-4", a little chat bubble like logo, and +, - markings for two of the leads.

There's no continuity between any of the leads. Can anyone help me identify these?

I'm also not certain about the three big green bricks. They seem to just be power resistors but the markings on them say
E M L
2.2K 100
(logo) 0.60
for the large two and
1K 100
(logo) E.776
for the small one, where (logo) is a little downward arrow in a circle. What has me skeptical about the 'power resistor' guess is that they measure more than 2.2 kohms.

Edit: Back image: