texts: Amplitude of PSD on spectrum analyzer varies strongly with RBW

texts:
I have a question about the amplitude of my spectrum analyzer. I'm producing upconverted white noise over some bandwidth (say 150 MHz), in the 7 GHz range. In this sense everything is as expected; there is a 150 MHz white noise band, which drops off to the noise floor on both sides. But the amplitude of the noise, this is behaving rather unexpectedly when varying the RBW. Note that the spectrum analyzer used in all that follows is the E4407B Spectrum Analyzer.

I understand the situation as follows: the spectrum analyzer shows the power in dBm/RBW, so to convert it to dBm/Hz one has to incorporate the RBW. I do so by converting the power to Watts (10^(dBm/10)*10^-3) and then dividing by the RBW; this should be the proper Watts/Hz power spectral density, should it not?

Now what puzzles me is that these values are not consistent for different RBW. Taking values between 100 kHz and 10 MHz, each time I end up with a vastly different Watts/Hz power spectral density, differing by substantial factors. How is this possible? I thought that the main factor in choosing the RBW was just that smaller RBWs mean your trace takes longer and is more accurate, but the scaling seems absurd. How do I determine which one is the most faithful representation of the true PSD, if any?

As for the calibration of the spectrum analyzer itself, I know that in principle the amplitudes can be trusted; using a signal generator generating a 20 MHz signal at some known power, I get a single peak with this exact power on the spectrum analyzer.


texts: Atmel ATtiny EEPROM partially erased on power cycle

texts:
I have a Digistump with an Atmel ATtiny85 MCU. I can flash the MCU's EEPROM with an ISP programmer no problem. The chip works fine, the bootloader runs and the user program executes correctly.
Occasionally on power cycling a 200W Meanwell PSU the ATtiny will stop working. I dumped the EEPROM and compared it to the original Intel hex file. I noticed that the first handful of bytes are erased. See below. This doesn't happen all the time, just occasionally. I can reflash the chip but eventually this happens again.
If you think this is a defective chip, know that I have 30 of them from different suppliers and many of them exhibit this behavior.
Also, the Digistump is directly powered by the PSU. There are no USB data connections.
Question: Why does this happen?
Could a ripple from the PSU being shut off initiate a partial erasure?

Solved:
The ATtiny85 has a Brown-Out Detect (BOD) circuit but it is disabled by default. There is a fuse calculator for AVR chips here. By setting the high fuse to 0xDD it activates the BOD threshold to 2.7V. With this enabled, EEPROM integrity seems to survive repeated power-cycling.


texts: ST Microelectronics I2C Interrupt HAL Library question

texts:
I am trying to get I2C (with interrupts) on an F411RE to work. I dived into the HAL library code and found this tid bit...

static HAL_StatusTypeDef I2C_SlaveTransmit_TXE(I2C_HandleTypeDef *hi2c)
{
  /* Declaration of temporary variables to prevent undefined behavior of  volatile usage */
  uint32_t CurrentState = hi2c->State;

  if(hi2c->XferCount != 0U)
  {
    /* Write data to DR */
    hi2c->Instance->DR = (*hi2c->pBuffPtr++);
    hi2c->XferCount--;

    if((hi2c->XferCount == 0U) && (CurrentState ==          HAL_I2C_STATE_BUSY_TX_LISTEN))
    {
      /* Last Byte is received, disable Interrupt */
      __HAL_I2C_DISABLE_IT(hi2c, I2C_IT_BUF);

      /* Set state at HAL_I2C_STATE_LISTEN */
      hi2c->PreviousState = I2C_STATE_SLAVE_BUSY_TX;
      hi2c->State = HAL_I2C_STATE_LISTEN;

      /* Call the Tx complete callback to inform upper layer of the end of receive process */
      HAL_I2C_SlaveTxCpltCallback(hi2c);
    }
  }
  return HAL_OK;

I am little confused. I was expecting to see while loop go through the transfer count. Instead, it is if statements. So, my question is, am I understanding this correctly? The way that HAL treats a slave transmits on interrupt is that it relies on an interrupt to be generated for each byte of the transfer instead of one interrupt for transferring all the bytes at once?


texts: Meaning of “with respect to rotor and stator”

texts:
In the following example, when it says “with respect to stator” and “with respect to rotor”, did they mean the rotor part of the synchronous generator in both cases?

Example: The excitation field in the synchronous generator is stationary with respect to the rotor. When the rotor rotates at synchronous speed, the excitation field rotates with respect to stator.


texts: ExplainIng how isolated rs232 interface works

texts:
I trying to drive the rs232 interface, so I can send and receive data to the device am controlling.

I want to know why you need the two transistors on its comms line. Why not just one?


texts: How to measure voltage of a floating GPIO (Raspberry Pi)

texts:
I would like to measure that voltage of a floating GPIO on a Raspberry Pi 3. When I use a multi meter or an oscilloscope it looks like the pin is pulled to ground and shows 0.

Another way of asking the question is, 'How can I determine if a GPIO pin is floating using an oscilloscope or multi-meter?"

How can I use an oscilloscope to measure the voltage of a floating GPIO pin on a Raspberry Pi?


texts: Embedded External Flash Device using NAND architecture

texts:
Our SoC device supports both external NAND devices as well as Multi-IO/QSPI NOR devices.
I can use either of them.
Now, for NAND device, it will store only Program Code and Const Data.
That means SoC will never write anything back to NAND device. It will always read from the NAND device.
Do I need to implemented Wear Leveling as well as Bad Block Management support within the SoC software as NAND device is purely being used as Read-Only Mode device always?
Will there be Bit-Flipping Error possible in the NAND device in this mode of operation?
Thank you.
Regards
Pashan


texts: Use only two phases of three phase for heating element

texts:
I've got a 15,6A kanthal resistor wire (14,84 Ohm) which I use as a 220V heating element, yielding 3410W.

I was wonderig how I could run this element on three phase.

The potential difference between L1 and L2 is say 400V. So could I connect L1 to one end of the wire, and L2 to the other? So I wouldn't use L3 nor would I use the neutral.

If this is possible, It would give me:

400V/14,84Ohm= 26,95A
So... 400V * 26,95A = 10780W

Apart from the element not being able to handle the amount energy being emitted.


texts:
Goal
On my current project I have connected a multiplexer (4051) on 8 adcs that I read from a single pin on my stm32h7. I would like to sequentially change the three gpio's connected to the mux between the values 000,001,010,011...,111 and on every change read the adc's values.
Design
I would like to achieve that with as less CPU interaction as I can so I decided to connect the adc with a dma(peripheral to memory) , and after a finished adc conversion cycle the gpio's values from another dma (memory to peripheral) as the three gpios are on the same port.I tried to do all that with a makefile project generated from the CubeMx and I tried to use the low level drivers at most parts as I have noticed that in several cases HAL was quite buggy.
Caveats I surpassed
The dma could not access the main ram so I had to change my linker script to allocate my dma buffers on an accessible part of the memory. So I did the following on the linker script:
 .dma_buffer (NOLOAD) :
 {
   *(.dma_buffer)
 } > RAM_D2

And the following on my buffers:
#define DMA_ACCESSIBLE __attribute__((section(".dma_buffer"))) __attribute__((aligned(32)))
DMA_ACCESSIBLE volatile uint16_t adc_val[4] = {0};

Also I used the high level drivers for the adc as I noticed a bug on initialization
The problem
On the current state the adcs seems to work correct but I can not make DMAMAMUX and the gpios to work.So here is a minimal example and the configurations on CubeMX :
#define DMA_ACCESSIBLE __attribute__((section(".dma_buffer"))) __attribute__((aligned(32)))
DMA_ACCESSIBLE volatile uint16_t adc_val[4] = {0};
DMA_ACCESSIBLE volatile uint32_t mux_val[8] = {
  MUX1_Pin << 16 | MUX2_Pin << 16 | MUX3_Pin << 16,
  MUX1_Pin       | MUX2_Pin << 16 | MUX3_Pin << 16,
  MUX1_Pin << 16 | MUX2_Pin       | MUX3_Pin << 16,
  MUX1_Pin       | MUX2_Pin       | MUX3_Pin << 16,
  MUX1_Pin << 16 | MUX2_Pin << 16 | MUX3_Pin      ,
  MUX1_Pin       | MUX2_Pin << 16 | MUX3_Pin      ,
  MUX1_Pin << 16 | MUX2_Pin       | MUX3_Pin      ,
  MUX1_Pin       | MUX2_Pin       | MUX3_Pin
};
int main(void)
{
  HAL_Init();

  SystemClock_Config();

  MX_GPIO_Init();
  MX_DMA_Init();
  MX_ADC1_Init();

  HAL_ADCEx_Calibration_Start(&hadc1, ADC_CALIB_OFFSET, ADC_SINGLE_ENDED);
  HAL_ADC_Start_DMA(&hadc1, (uint32_t*)(&adc_val), 4);

  LL_GPIO_SetOutputPin(MUX1_GPIO_Port,MUX1_Pin);
  LL_GPIO_SetOutputPin(MUX2_GPIO_Port,MUX2_Pin);
  LL_GPIO_SetOutputPin(MUX3_GPIO_Port,MUX3_Pin);

  LL_DMA_SetDataLength(DMA1, LL_DMA_STREAM_1, 8);
  LL_DMA_SetMemoryAddress(DMA1, LL_DMA_STREAM_1, (uint32_t)mux_val);
  LL_DMA_SetPeriphAddress(DMA1, LL_DMA_STREAM_1, (uint32_t)&MUX1_GPIO_Port->BSRR);
  LL_DMA_EnableStream(DMA1, LL_DMA_STREAM_1);

  while (1)
  {
    printf("adc arr is:%u,%u,%u,%u\n", adc_val[0],adc_val[1],adc_val[2],adc_val[3]);
    LL_mDelay(1);
  }
}

On these example I just read the 8th adc (as I initially have the gpios to 111) and the gpios doesn't seem to update,what am I missing about the dma configurations?is there a better design I could use?


texts: Will USB 2.0 degrade through connectors?

texts:
In my design I have a national instruments chassis (cDAQ 9132) inside of a closed rack fixture. I want to be able to access the usb port on the NI chassis from a front panel on the external of the rack. My thoughts were to just connect a male-to-male usb cable from the NI chassis into the front panel via a panel mount usb connector.

My question is, will the usb extender and connector cause signal degradation? The total length would only be a few feet, much less then the 5 meter maximum.


texts:
I have developed a soft-starter for a project of mine. I am using an Arduino Uno to generate PWM to an OAC-5 relay that turns on and off the voltage across my bridge rectifier.

Here is a simple block diagram:

Everything is working fine, it blocks the in-rush current as its supposed to, however I can't generate a clean response:

Without my soft starter the motors in-rush current reached 8 A. So from this we could see that the application is working, however I'm not liking that noise.

I know its from the PWM, as you could see the faster it speeds up the faster the load reaches it's maximum voltage.

Any thoughts on this? Is the relay switching too fast? or is my Arduino frequency too fast for the relay & motor?

*Note: A typical desired step response for a soft-starter is shown here:

http://green-we.com/Green%20Air/airConditioner/images/01/soft%20starter.jpg

Also, my method of current measurement was putting a 10ohm resistor in series with the motor, and measuring the voltage across it to calculate current.


texts: Using a USB device locally on 2 computers

texts:
I would like to make what I can best describe as a reverse USB switch, where one USB 2.0 device (a dongle) is physically connected to 2 computers (located side by side). The dongle is powered through USB.

I.e. what I'd like to make is a Y-split, with one female going to two males.

Could this be done simply by wiring together 3 cable ends with the appropriate connectors? Do you think the dongle would be recognized locally and useable on both computers? Should I make sure that power only runs from one of the computers?


texts: I'm having trouble with this circuit, It is showing capacitors to ground in two different ways. Would anyone be able to help? And could I used polarized instead of non polarized?


texts:
I want to make a holder for 2S2P(2 series, 2 parallel) non-rechargeable AA cells. Connection should be easy, because there are a lot of 2S1P holders . But I'm worried about the possibility that current flows from 2 cells to other 2 cells.

(1) If the voltage of two 2S1P cells are 2.8V, 2.5V respectively, should I expect that I will have a short circuit? In other words, could current flow from 2.8V battery to 2.5V battery?
(2) If so, could I avoid such situation by putting connecting diodes to the 2S1P cells? Would the diodes consume power?


texts: RC low pass filter not working as expected

texts:
I have designed a high voltage power supply and I'm trying to filter out the switching noise.
I'm using a transformer that is driving a basic Cockroft-Walton voltage multiplier to a 1200V DC signal.
At the end of the voltage multiplier I have a 2nd order low pass RC filter on that doesn't appear attenuating the switching noise from my power supply.
My switching frequency going to the transformer is ~36kHz and the oscillation of noise I'm seeing on the output of voltage multiplier is ~350-400kHz.
Below is an oscilloscope image of before and after the RC filter.

According to the calculations (http://sim.okawa-denshi.jp/en/CRCRtool.php) I should be seeing a -150 to -180 attenuation of the noise, but in the real world I'm only seeing -10dB.
Any thoughts on why this filter is not working correctly?


texts: What is an economical way to supply DC power for small projects?

texts:
electrical engineering isn't my strong suit, but Im trying to do a home project with some automation to it. I just don't know how I'm supposed to provide power to some higher voltage components that I wouldn't be able to power off, say, GPIO pins from a Raspberry PI or something.

I can get a bench power supply off the internet and use that to form my circuits, but I don't know if that's the way it should be done. What's the way people usually power projects.

The component that I need to control now is simply a small fan, but my solution needs to be extensible to more components in the future, and I need it to be DC powered so I can control it using a circuit.

Thanks for any help!


texts: Is there a way to send a NACK on I2C on STM32F407? There is no way to do that using the HAL, and the datasheet says nothing about it.


texts: What is the physical size of a logic gate?

texts:
I always hear about process size improvements in the news, but could never figure out how it translates into dimensions of a logic gate. I found a chapter from Weste's CMOS VLSI Design, that contains figures which looks like things I create when playing KOHCTPYKTOP. There's a figure of a 3-input NAND gate, but none for a simple 2-input NAND. So I used Inkscape to draw my own, based on Mead & Conway's design rules mentioned in the chapter:

(I have no idea about the spacing around the well tap, I made it just 1 lambda)

So if I were to just plug in the current state of the art process size, which is supposedly 14 nm in 2014, can I say that the size of a NAND gate is about 448×518 nm²? Or is it possible to design it even smaller?


texts: I just bought 74HC595 shift register IC and I'm having trouble finding the first pin. There is no first pin mark anywhere on the chip as you can see below.


texts: tube amp - high power supply voltage ?! troubleshooting

texts:
So I started working with troubleshooting a channel imbalance on the schematic attached, 12ax7 + 6L6GC push pull.
But the problem seems to be a bit different...

My voltages seem to be a bit hot!! (a lot hotter I think...)
V2 is even higher than C16 450V rating :S

Please see attached. Any locations/components I need to check first? Thanks a lot.

full schematic


texts:
I'm trying to find a way to measure SWR digitally. Generally SWR is measured with analogue equipments and it is not practical on self designed PCB. I did not find so much resource on how to do it digital way.

I have 10 Mhz hcmos oscillator which is filtered and converted to sine wave. The most simple idea which came to my mind was, connect PCB's sma output to also an ADC of uC in PCB design. I'm sure there should have been some more clever solutions.


texts: High neutral to ground voltage, and other problems

texts:
The situation I will describe is in a rural property that recieves only one wire from the power grid at 13.5kV. We have a single phase 25kVA transformer, that is shared with another house. On the primary side, one of the leads is connected to the wire from the power grid and the other to earth. On the secondary side is the standard 240V/120V 3 wire split-phase connection.

The problem encountered is that with almost no load (at the time of the testing I checked the neighbors electric meter and it only reported only 300W) the ground to to neutral voltage is 10V, one line to ground voltage is 130 and on the other line it's 110; note that the voltage between both hot wires is 240 and between each hot wire and neutral it's 120v. When a heavy load is aplied, we tested connecting a 4500W 240V water heater, the voltages were N-G:50V, L1-G: 170V, L2-G:70V and when the voltage between the ground of the circuit and an improvised ground was 5V. The measurements where taken both at the electric panel that is imediate to the electricity meter and on an electric socket inside the house. The values I wrote are rounded, as expected the L1-L2 voltage droped a small amount when the heater was on.

My conjecture based on the behavior of the voltage dependant on load and visual inspection of the wiring of the tranformer is that the same ground connection used for the primary side is used to ground the secondary side neutral and that the connection to ground used has a relatively high impedance. Those two things combined mean that the ground connection with too much impedance causes the IR voltage drop in the conductor between the transformer primary side neutral lead to the ground rod to be affecting the secondary side neutral voltage with respect to ground. The L1-L2 and L1,L2-N voltages are okay, even though the L1,L2-G and N-G voltage are dangerously wrong since the neutral to ground voltage is in phase with one of the lines and out of phase by 180º with the other line. Another important detail is that the electrician connected the house's circuit ground to the ground rod used for the transformer, wich explains why the circuit ground to improvised ground voltage was 5V when under load.

I wanted to ask here to know if my reasoning is posible or if there is some other explanation for the problem, since we contacted the electricity company and they have only, for the momment, sent an electrician and got nowhere, since they measured the L1-L2 and L1,L2-N voltages and saw they were okay and before they could do any further testing the electricity went out, so they had to leave (on that zone the electricity company has programmed blackouts, 6 hours of power/6 hours without power).


texts: AC converter, step up or step down, which is more efficient, which loses more energy? why can't support large power and being small

texts:
I want to buy a AC voltage converter for frequent international travel with some small appliances, and should support step up and down between 110V and 220V; found this one https://amzn.to/2voExKD is portable but it supports max 100 Watts only, then found this one https://amzn.to/30UKV8b supports up to 2000 watts but it weighs 30 lbs very bulky not convenient to carry on to flights;
then found this one https://amzn.to/2U7FDF1 supports up to 2300 watt and lightweight to carry, but it supports step down from 220V to 110V only, not the step up;

so I wonder is it possible to make a product that

support both step up/down AC voltage converter, between 110V and
220V;
support large power consumption up to 2000 watts ideally;
also being lightweight and portable, easy to carry to flight
check-in luggage? (less than 3lbs, or as small as possible)

Update: I edited a little bit to be clear I wish to see a product has all the 3 features, especially large power appliances (like 1500 w induction top cooker), not only laptop/phone charger which I know that takes 100-240V variant AC input;

Thanks;

If not, could someone tell the rationales why can't make a product with all above 1 & 2 & 3 features?

If can only choose 2 features out of the 3, I would possible choose this https://amzn.to/2U7FDF1 supports up to 2300 watt and lightweight to carry, and one-way only step down from 220V to 110V;   why I am not seeing a step-up only product?   Is step-up harder to make than step-down only?  which one of the step up/down is more energy efficient, and less energy loss inner heat dissipation?

I like to hear some in-depth answer about rationales behind step-up and step-down; that can explain why

the first product https://amzn.to/2voExKD is lightweight/portable but supports max 100 Watts only
the second one https://amzn.to/30UKV8b supports up to 2000 watts for both step up and down between 220V <=> 110V, but why it weighs 30 lbs why it needs to be made so bulky, is it related to heat dissipation? how much energy loss if this is really working at 2000 watts;
the third one https://amzn.to/2U7FDF1 supports up to 2300 watt step down from 220V to 110V only, it's lightweight to carry, Weight:1.3lb, is it because step-down is easier to make than step-up AC transformers? Does step-down only converters have better energy efficiency? Nearly no heat dissipation, Or 100% energy conversion? Is that the reason why it can be made so small (Weight:1.3lb)?

Thanks again;


texts:
I am attempting to power an arc lamp (which I have) using a programmable power supply (which I have yet to source.) Though the lamp is rated at 1000w (37v at 27A) I would like to power it at about 800w in order to modify its emission spectra and extend its lifetime.

The lamp in question is out of production but nearly identical to an Osram HBO 1000 W/D. While the lamp housing is a modified Christie Xenolite 1000 W lamphouse fixture. The xenolite housing has been modified mechanically. The system had originally used a more modern (but still solid state) Christie power supply rather than the original rectifier power supply. We smoked quite a few caps in that power supply when we tried to fire it up. AFAIK the igniter in the Xenolite lamphouse still works but we haven't actually seen a bulb light since only the igniter works.

When attempting to source a power supply I see items like a Sorenson DCS 40-30E which can supply 0-40V and 0-30A. This seems perfect for me. Reading through the manual, it describes operating the supply in current limiting mode and voltage limiting mode. I may have misunderstood the terms but it seems to me the operation of an arc lamp requires both current and voltage be limited as the lamp will draw any "available wattage."

So, to restate the question, what is the theory of operation for a arc lamp regarding voltage/ current regulation and how does one specify this in the design of a power supply?


texts: Using an old 2 way switch in 3 way setup

texts:
i'm not an expert in electronics and i'm keen to get some guidance on the below...
I have an old vintage 1-way (On\Off) light switch I would like to use as a 2-way switch to control a light from two locations (the other light switch is a modern 2-way (COM, L1, L2)).
I am very keen to use this old 1-way switch, hence the reason to not just replace it with a modern 2-way switch (it looks nice!).
My current thoughts are to use a Relay and wire up COM, NO, NC as you would for a 2-way switch and use the 1-way switch to activate \ deactivate this Relay, but I am not sure how best to do this?
Keen to get feedback on how this may be possible or any better solutions that could allow me to use this 1-way switch in such a setup?
Many thanks!


texts:
I am reading about current-mode control from this site.
Please look at the excerpt below and especially the boldfaced part.

Question:

Why we can consider inductor as a current source when the current loop gain infinite?

From feedback theory, if the loop gain is infinite then we have \$i_{L}*R_{i} = v_{c}\$.
However, vc is not a constant voltage so how the inductor current constant?
The output capacitor will be charged and discharged alternatively so there should be some non-zero vc.

  Infinite-Gain Models

  Probably the most universal approach used by industry appeared in the
  Unitrode Handbook and application notes. If the gain around the
  inductor current is assumed to be infinite, we can treat the inductor
  as a current source. This follows the logic of the current following
  the reference by the action of the comparator. Figure 4 shows the
  resulting model. The controlled current source feeds the RC load, and
  the resulting model is first order.


texts:
I would like to build a 3x10 decimal digit dvm for an edge lit numerical display. The nearest schematic that I can find is using a CA3162E / LM74LS147 which can be found at:

http://www.seekic.com/circuit_diagram/Measuring_and_Test_Circuit/DIGTAL_LED_VOLTMETER.html

A copy of the diagram at the above URL:

However, the CA3162E is difficult or expensive to obtain. The output leds are multplexed similar to a 3 digit, seven segment dvm driven by a PIC16F676 at
http://www.circuitvalley.com/2012/02/30-volts-panel-volt-meter-pic.html

Is there a more modern circuit or a MCU replacement available or is there is there a MCU that can be configured as a BCD driver to drive an LM74LS147 or an MCU that can be configured for decimal output? Many thanks in advance.


texts:
The tip speed ratio is given by TSR = w.R/v where w = rotational speed of the turbine, R = radius and v = wind speed.
Now the speed of the tip is a function of the energy extracted from the wind, but the energy extracted from the wind is also a function of the TSR.

Under a no-load condition, the turbine is free to spin, and I would imagine that the TSR is a simple function of the pitch angle. The TSR should be able to go right up to the value dictated by the Betz limit.
Under loading conditions,  the rotational speed of the generator should be such that the power output from the turbine is in equilibrium with the marginal load in the system, and therefore the TSR is a function of the rotation speed, and therefore the output of the WT.

If the above thinking is correct, then what is the use of the TSR or the Cp in wind turbine calculations? Aren't they determined by the external load, and not by the wind turbine design, under loading conditions?


texts:
I am trying to design a very simple schematic and trying to understand how the transistor works as switch.

Transistor: Datasheet
Description:  NPN - Pre-Biased 100mA 50V 100mW USM(SC-70-3) Transistors (NPN/PNP) RoHS

Assuming I have the + of a lamp connected to P and the - of the lamp to N, if IO18(connected to a microcontroller) is "low" the light will be off.
If IO18 is set to high, will the lamp turn ON with the way I designed the schematic?
Edit:
Why does this transistor have embedded resistors?


texts: How is a Twisted Pair's +-2.5v used to send a 1 or a 0?

texts:
This is a multi-part question that I'm asking as a follow on to this answer from my other question.

I know 100BASE-TX transmits through a pair of wires, that are twisted around each other so that the effective of ambient EMI affects them both identically (for the most part).  I know that the signal is sent through one wire (TX+), and the exact opposite signal is sent through the other wire (TX-).

If the 100BASE-TX runs +-2.5V, does that mean the TX+ wire uses 0 through +2.5V, and the TX- wire uses -2.5V through 0?

I also know that "sending a signal" is effectively "applying a voltage" to the wire. And that a certain level of voltage correlates to a 1 or a 0.

What is the voltage range that equates to 1, and what is the voltage range that equates to 0?
Who and how is this range set? Is it a standard, or dynamically learned based on percentages of what either end of the wire is able to push through the wire (aka, different each physical connection)?

EMI is unavoidable, but due to the twisting of the pairs, the effect on the TX+ and TX- wires are identical, and as a result the noise added by EMI can be extracted on the receiving end.

How is the noise removed?

I am assuming if the wires send +1 and -1 respectively, and the EMI noise (for simplicity) adds +3 to both, the receiving side would receive +4 and +2. If you subtract those values from each other, you get a difference of 2, and if you put the 2 on either side of a 0 on a number graph, you end up with +1 and -1 again.  Is that about it for the process?

Lastly, if noise is nothing more then adding or subtracting from the voltage on the wire, to what degree can noise affect the voltage.

If 100BASE-TX uses +-2.5V, in a typical office environment, about how much mV of noise can you expect?

I'm mostly curious to see how much voltage is added/subtracted by noise, proportionate to the sending signal. AKA, if typical noise might apply +-50mV, that wouldn't be all that much compared to a sending signal of 1000mV (1V).  Not looking for a technical deep dive on this, just an idea so I have a basic understanding of the numbers / number ranges.


texts:
When I try to simulate a circuit I  designed in Proteus, I'm getting an unexpected output from the op-amp.
As you can see from the image, for op-amp U1:A, the inverting terminal voltage is about 3.25V while the non-inverting terminal voltage is set to 2.5V reference.
Hence as the inverting terminal voltage is greater than the non-inverting terminal voltage, the output should be -VSat i.e. 0V.
However, I'm getting 3.72V as output.
Can you guys please tell me where I've made my mistake? The op-amp is an LM324 as a single rail op-amp. ( +Vsat = 5V, -Vsat = 0V.)
The expected inputs for JK F/F are 0 1. Which means output of U1:A should be 0V and U1:C should be 5V (Logic 1.)


texts: Alternative to LM386? To drive 8 ohm speaker with 9V circuit

texts:
I am getting pretty tired of debugging the LM386 integration into my project! I'm building a drum machine, based around schmnitt trigger oscilators and a white noise generator. I'd post the complete schematic, but its getting complicated, and everything works accept this part - the audio output.

When I tap the output of my device and plug it into a battery-powered guitar amp I have on my desk, everything is great, I'm done. BUT I want my project to also have a built in speaker. I've used LM386 for tons of synthesizer stuff like this before, but this one just ain't happening. I'm getting wild oscillations, sometimes no sound at all, sometimes only part of the sound (like the "kick" but not the "snare"). I've tried decoupling capacitors in series, on the power-pins, and zobel network.

TL;DR - Can anyone recommend an easy replacement for the LM386. A 9V powered IC that can drive a speaker.
THANKS!


texts: How to turn a switch on/off repeatedly in 1 minute intervals?

texts:
I have a light bulb plugged into an outlet and I need to be able to turn it on and off again and again in 1 minute intervals for a period of 10 hours per day (a total of around 600 on/off events per day). I have found a similar question on SO here:  How can I turn on and off a switch every 20 minutes?

However, besides the fact that the question was for 20 minute cycles long I saw a number of answers about micro controllers which I understand will take a lot of work and know-how to achieve.

Is there any pre-packaged solution or something that can be done easily ?

As a side note most digital timers that can be set for 1 minute increments can only be set around 7 times per day (max I found was 50 settings per day) so this isn't a viable solution.

The timer will need to withstand 500-1000 watts (if this matters).

Thanks


texts:
Hi I am from computer science background and hence lacking solid foundation of electronics. I am learning SR latches .
Below is SR latch with NOR gates:

And below is enable SR latch with NOR gates:

I dont get why in the first image, S corresponds to Q and R to Q', whereas in second figure S corresponds to Q' and R to Q. Why the polarity of output is switched in enable SR latch. These diagrams are from this page.


texts: Cache Memory Read and Write Miss/hit policies: details of a real processor

texts: All the references I have checked so far explain the Read Miss,Write Hit/Miss policies at the same level of detail. I understand their concepts but I am looking for more details on their implementations. I really would like to see more details about the typical bus widths between the different on chip caches and the upper cache level and the off chip memory; the data bus datapath when Write Through Policy is used; or "Read No allocate" on a Read miss. With the latter policy; how the cache block will be addressed in the main memory, since the fetched word is sent first to the CPU before the entire cache line is copied; in what order the words of the cache line from the main memory will be sent to the cache. I am looking for a good reference or explanation here. Thank you


texts: How does the Arduino do serial communication with a PC?

texts:
I am trying to develop a program such that I am able to communicate over USB to a PC. I have developed a usart library that I can use for such a purpose, but the problem in-lies with the conversion to the usb protocol.

I searched around on the net a bit and found a very useful USART to USB converter bridge but I am having issues getting it setup, but that is something for another question.

How exactly does the Arduino convert USART to USB and interface with a PC?


texts: Advice on BNC cables for beginners electronic lab

texts:
I'm setting up an electronics lab so I can increase my knowledge of electronics. I've bought some equipment of ebay ('scope, power supply, signal generator etc.,) but don't know what sort of BNC cables I should get.

Do I need to worry about impedance when connecting the equipment together and buy (for example) 50 ohm cables or would straight through work OK?


texts: How does current flow to the ground in Delta connection (Ungrounded) in an Earth Fault?

texts:
I'm an electrical engineering student and I'm currently in In-Plant training in Electricity Company of my country. Recently I visited an electrical grid. I got to know about Earthing transformer. I asked an engineer about how the current flows to the ground in a delta connection as it's not grounded and to flow current there must be a return path to the source. But she didn't give me a satisfying answer, she said there will be current flowing and said that current flows from high potential to low potential (zero potential earth). However I had doubts since that time because unlike in star connection (grounded), there is no path for return current in delta system (with ground I meant).

I know that an earthing transformer creates a virtual ground to current flow in delta system to the virtual ground, so they can measure earth faults for tripping. But it is not clear to me how current flows to the ground if there's no earthing transformer.

I saw in some post saying that this is due to inductive coupling. I'm talking about a 33kV delta system. Since current flows through a closed system, why is this possible?

I'm talking about ungrounded delta system, no neutral, no leg is connected to ground and no earthing transformer. Fully isolated Delta connection. So I want to know how and why current flows to the ground in an earth-fault/1-phase touch earth in a delta-system. In theory it must be zero as there's no return path to the source?


texts: Spin two wheels in opposite directions with single DC motor?

texts:
I'm using a simple DC motor and the wheels from a small toy car to build a basic ping pong ball launcher.

I've got one of the wheels rotating clockwise, mounted directly on the motor's spindle, and the other wheel is free running (with 40mm distance between the two outer rims).  So it does sort of launch the ball, but because one wheel is not connected to the motor it has a real large side spin.

How would I connect the second wheel to the same motor so that it spins in the opposite direction?


texts:
I am studying this reference design, and see the following 4 connections (only 1 is circled):

At first glance its telling me to use a large trace and/or multiple traces; but I am not sure as there are no notes. What could this possibly mean?


texts:
I am using USRP B210. (product page)
I want to know the output transmitted power so that I could remain under FCC regulations.I am operating at a frequency of 2.4 GHz(ISM band of 2.4-2.4835GHz).

In the specification sheet it is written that output power is >10dBm and receive noise figure is <8dB.
How can I calculate the output power transmitted?Whether the output power given in the sheet is before the Antenna and i have to add antenna gain also??

Thanks in advance


texts:
I am trying to use the VHDL 2008 floating point libraries.  When using the type conversion "to_float" is this converting to single precision or double precision?

Also, if there are any useful links or resources that talk about the floating point libraries in VHDL 2008 that would be a great help.


texts: How to use MOSFET as a switch to drive LEDs

texts:
LEDs used : 150 mA, Vf = 3.1 V

I need to control 3 LEDS using a microcontroller signal with MOSFET acting as a switch. I am having trouble selecting the MOSFET and deriving the gate current.

The MOSFET I have currently is IRF540N, Vdd = 5 V, I need to find out the values of resistance between LED and source, and R in gate.


texts: Can I put +33 dBm through an 0402 capacitor/inductor?

texts:
Consider the following capacitor here on Mouser (C1005C0G1H330J050BA). If my understanding is correct, the only power dissipated is due to the ESR - ideally, reactive elements dissipate no power (or is it no average power?).

The capacitor is 33pF rated at 50V. Let's suppose the frequency of interest is 915 MHz. Thus:

$$X_c = \frac{1}{2\pi f_c C} = \frac{1}{2\pi(915\times10^6)(33\times10^{-12})} = 5.271 \text{ }\Omega$$
$$I_{\text{peak}} = \frac{50 \text{ V}}{5.271 \text{ } \Omega} \approx 9.5 \text{ A}_{\text{peak}} \approx 6.72 \text{ A}_{\text{rms}}$$

If the current exceeds 6.72 A rms, the capacitor will be in bad shape. However, I would like to know if the capacitor can handle an RF power of +33 dBm (2 W)? My thinking is the following:

$$P = I^2 (ESR)$$

However, I only see the "low-ESR" claim and no actual number. Would this also depend on whether the capacitor was acting as a bypass or dc-blocking cap?


texts:
I am currently working on a home project. I want to put my LPC1769 in deep power down mode. this is the code I have so far:

SCR |= (1 << SLEEPDEEP);
PCON |= (1 << PM1);

It doesn't work, I don't know why. I read something about __WFI() and __WFE(), I tried to implement this, but the following error appeared:

  __WFI was not declared in this scope

Can someone help to to put my LPC1769 in deep power down mode?


texts: Fourier series and Fourier transform of signals which can be generated in real world

texts:
Let first remind on Dirichlet conditions:

  In mathematics, the Dirichlet conditions are sufficient conditions for a real-valued, periodic function f to be equal to the sum of its Fourier series at each point where f is continuous. Moreover, the behavior of the Fourier series at points of discontinuity is determined as well (it is the midpoint of the values of the discontinuity). These conditions are named after Peter Gustav Lejeune Dirichlet.

The conditions are:

f must be absolutely integrable over a period.
f must have a finite number of extrema in any given bounded interval, i.e. there must be a finite number of maxima and minima in the interval.
f must have a finite number of discontinuities in any given bounded interval, however the discontinuity cannot be infinite.

To be able to represent periodic function using Fourier series (or nonperiodic function using Fourier transform), it must meet conditions above. My question is, are these conditions always met for signals which can be generated in practice?


texts:
I was doing a simple logic circuit in proteus when i realised that something was going wrong.

It looks like the NAND gate provides high voltage to its inputs from nowhere. No errors provided, but if i let the simulation running for a while, it always end with an unexpected close.

You can see that in the picture that i'm getting 4 volts from the inputs of a non-connected nand gate, and you can also see that if you connect the terminal to the ground(the ones on the top of the image), it seems to work as expected.

Should the nand gate have +4V on their input terminals when they are not connected? I think that it will only should have high state on the output terminal if the inputs are not connected or connected to the ground.

I'm newbie, its never late to learn. Pls help :D


texts: High resolution angular position (~0.5 degree) measurement

texts:
I am attempting to replace a light/mirror sensor to measure the slight low speed oscillations/ rotations of a disc over a period of time. I want to record the angular position, but I wanted to find a method that will allow me to record 0.5 degree movement (at minimum). (Similar shown below

Does anyone have any suggestions?

I am currently considering:

Potentiometers, but I am have difficulty getting the resolution I need. (Everywhere is saying potentiometer resolution is "nearly infinite" but I am not very sure what that means..)
Encoders/ resolvers(?), but I only need 1 turn and encoders, with their price + max rpm seems like overkill
I have had suggestions RVDT, but I do not know how I would attach it on this set up.


texts: I am getting question marks on serial while trying to read SD card

texts: I am using SPI and I'm trying to initialize and read a SDHC card. In the terminal, all I get back are question marks scrolling across the screen. Normally, I would think this is a baud rate issue but I have tried different baud rates and verified the the baud in the code matches the baud rate of the modem. My question is why am I getting question marks "?" in place of alphanumeric characters as expected. The question was answered and resolved. The issue was due to the terminal not interpreting HEX because the setting was set to interpret ASCII. I changed the terminal settings to HEX and all is good.


texts: Solar DC circuit: Preventing Buck Converter from Dropping out Due to Motor switching on/off (in Parallel)

texts:
I have an off-grid orchard which has a well pump running directly off of a 24v PV array. (27-32v when at full power) Parallel to this direct circuit, I have a buck converter to power a Raspberry pi (via GPIO), which has a switching solid-state relay and a camera to watch the pump and its gauge.

When the Pi triggers the SSR, the voltage coming into the buck drops from 27v to 24v on my multimeter (I don't have an oscilloscope, so perhaps its more of a severe drop), and this causes the output voltage to briefly go to zero, causing the Pi to reboot.

While it's entirely possible this is the fault of the cheap 12v/24v to 5v buck I bought on Amazon, I'm wondering if this is expected, and if so, can I do something like add a capacitor, either on the input or output to buffer this, and keep the pi running.


texts: What kind USB Cable connector of connector is this?

texts: Which connector is this? It has a USB-A Male on one side, but what is the other connector on the right?


texts: I have searched for a way to convert an I2S stream to USB audio and have only managed to find USB to I2S, not I2S to USB. Please advise me as to how this is possible.


texts:
I am using HLK-PM-03 to power ESP-12F Chip with 3.3V, the recommendation by AI Thinker is to use 3.3V regulator with LDO. What is the recommendation from the community.

Should i remove the PM-03 from circuit and add PM-05(5V AC-DC Converter) & use LDO to regulate the 5VDC to 3.3V power the cirucit ?.

What is the recommended LDO to use ?


texts: AC to DC power supply using full wave rectifier with 4 outputs

texts:
I simulated the circuit below with multisim and got the required values.

[![enter image description here][2]][2]

1.25 to 22V using the poistive regulator
-1.25V TO -22V using the negative regulator
+5V using 7805
-5V using 7905

But when i built the circuit on the bredboard i dont get close to these vakues except the +5V using 7805. The inductor gets very hot and the transformer starts stinking up. Transformer secondary voltage is around 17Vrms.


texts: What is the wiring for a pull-down resistor on the Or gate?

texts:
Is this wiring and resistor the best choice as a pull-down resistor?
Is it necessary to put the pull-down resistor(s) on all inputs and outputs?

I put a 10K Ohm resistor connected to the chip ground. The IC is a HD74LS32P, and it is a positive OR gate.  I connected two inputs to the other end of the resistor.

With power to the chip, the multimeter reads:

Vcc to ground is 4.92V
A2, V=1.02
B2, V=1.03
Y2, V=0.74

I have a PWM driving device, and when that is powered and set to the lowest setting:

A2, V=0
B2, V=0
Y2, V=0.17

When the PWM is set to max value:

A2, V=4.3
B2, V=4.3
Y2, V=0.42


texts: How to Check Rechargeable Battery NiMH Status with Microcontroller?

texts:
I created a device, based on an Arduino Uno, which runs on 6 rechargeable NiMH batteries. Now I would like to add a check, if the batteries have enough power left, to warn with a signal when the batteries needs recharging.

As I understand, the voltage of the batteries will slowly go down, until they drop under the minimum required level.

How is a battery load level check implemented? What kind of elements do I need?


texts: Slope compensation in current mode control

texts:
There is something a little bit confusing to me between papers dealing with the theory of external slope compensation in current mode control of SMPS and application notes dealing with implementation (Practical side) of current mode SMPS.

*In the theory, when we talk about external ramp compensation, we draw it on the graphs as a ramp with a negative slope (it is like if we subtract some amount of current from the inductor current). I understand that we have to inject an external ramp with a negative slope.

*In practice, as I have seen it in many applications, like MCP1630 from microchicp, or "designing ramp compensation NCP1200 from ONSEMI", the ramp is designed from a driver signal (square wave) using a simple way by an RC circuit and a diode like the one shown bellow.

The ramp generated by this circuit with a positive slope is directly injected to the sense current pin of the IC using two resistors to add the inductor current and the ramp signal.

So my question is: What did I miss from the two descriptions. Why do we talk in theory about injecting ramp Se with a negative slope to get rid of sub-harmonics, and in practice we add a ramp Se with a positive slope?


texts: 7-segment LED display with multiple digits

texts:
I was looking at the datasheet for the LTC-4627JR, and it looks like each digit shares a common anode, and each segment shares a common cathode.

My question is given this configuration, I don't understand how to drive each digit separately.

For example, say I want digit 1, segment A and digit 2, segment B to be on, with everything else off.

I could attach pin 1 and pin 2 to Vcc to enable the two digits, but if I try to connect pin 14 to ground (through a resistor, of course), this will turn segment A on for both digit 1 and digit 2. Likewise, trying to connect pin 16 to ground, this will turn segment B on for both digits.

Is there something I'm missing here? Or is this how this display is intended to work?

This is similar to this question, but as far as I can tell the answers to that question doesn't allow powering all digits differently from each other.


texts: For a low pass filter, derivephase of the transfer function, Vout/Vin

texts:
simulate this circuit – Schematic created using CircuitLab

I have calculated the magnitude:

\$ ||H(j\omega)|| = \dfrac{1}{\sqrt{1 + {(RC\omega)}^2}} \$


texts: I am trying to write a program where the user uses a dial to adjust the intesity of one LED at the frequency of Red light and another LED in the same circuit that is at the frequency of Far Red light is auto adjusted to keep the the overall photon flux at 20 mircomoles per meters squared per second. How do I relate this to the power going to each LED


texts: Resistor symbol in a schematic with zero value

texts:
I can't figure out the purpose of the 0Ohm resistor in bellow schematic. It's crystal oscillator configuration and why the designer have included a resistor there with 0ohms ?

Any idea ?


texts: How to tune an RF receiver with a microcontroller?

texts:
Is a simpler question just how do you control capacitance or inductance with a microcontroller?

If that isn't possible then I've read something about using PLL's, but I do not understand how it tunes to a specific frequency, only how they synthesize a new frequency.

I commonly see digital tuners on all sorts of devices so it seems like there should be a straightforward way.


texts: AVR Atmel MCUs with 12bit ADC and ArduinoIDE support

texts:
I am searching for more powerful MCUs than the ATMEGA1284p that I am currently using, in particular I want to have better ADCs and switch from 10 to 12bit resolution. My constraints are the following:

12bit ADC
Low-power during sleep
Available Arduino bootloader
ArduinoIDE support but I guess that is the saame as an available Arduino Bootloader


texts: Will connecting an electronic instrument's output to a computer's microphone input overload the computer?

texts:
I would like to record the demo music on our Yamaha CVP 201 electronic piano, preferably by connecting it directly to a recording device's input.

Right now, I have a 3.5mm splitter to separate the L and R channels, sort of like this:

as well as a 6.5mm to 3.5mm converter:

I also have a long dual RCA cable:

My stereo requires a L and R input so I use the 3.5mm splitter and the RCA cable to connect an MP3 player or computer (or other device with just one 3.5mm output) to the stereo.

The piano has a 6.5mm output so the converter is needed to plug in headphones, etc. I am thinking I could plug the 3.5mm splitter into the converter, connect the dual RCA cable to that, and somehow connect the other end of the dual RCA cable to the computer's microphone input (no line in).

According to this website, this is possible and is known as reverse wired. I would need something like this I think: https://www.amazon.com/USB-Video-Audio-Grabber-Recorder/dp/B01GSJS0V2

First, I would like to confirm that such a setup would even work. Secondly, this question mentioned that connecting line out to line in from the same device could damage the hardware. Since this is from one device to another, would this be safe? Or would the voltage levels coming out of the piano overwhelm the computer's microphone input? I am assuming that since the piano has a 6.5mm output, like an electronic drum kit, the voltages are pretty low since they are meant for headphones, not speakers without amps.


texts: Lowest power consumption technologies for short range low data rate wireless comms

texts:
Say you need a wireless communication channel to a single device with a range of 1 meter, and a date rate of 10 b/s. What you are after is to minimize the power consumption whilst keeping the antenna small (5x5 cm). What would be the best approach for this?

I'm thinking you need to avoid PLLs etc. because they are just too power hungry. You can generate a single frequency with an oscillator, add some switches and you have a transmitter. I am not too sure about the receiver though.

Or can you use some sort of coupling in this short range? Something similar to wireless charging but for comms.

I have one of those bicycle computers that measure the speed you are going and they seem to last forever. I've done 1000 km and it is still going on its original coin battery. How do they do it?


texts: High frequency detection for missing pulse issues for a high freq. pulse train

texts:
I know opinion based questions are not welcome but for a project I need to monitor 2MHz pulse train with 1ns ON times. Basically I need to monitor rising edges and if let's say the pulses are not 2MHz several times I want to shut down another system.
My problem is where to start for such a scenario. Would a uC suffice for such high speed application? or are there ad-hoc subsystems for such purposes. I dont want to re-invent the wheel.


texts: Voltage Divider - Arduino Pro Mini 3.3V - Smartphone Battery (4.2V max) - which resistance values?

texts:
I want to measure the battery voltage on my arduino pro mini (3.3V version), which runs from a Li-ion smartphone battery (max 4.2V).

I used the typical voltage divider setup with R1 = 5.6M and R2 = 2M, because of this formula:

// ((R1+R2)/R2)*1.1 = Vmax = 4.2 Volts
// 4.2/1023 = Volts per bit =  0.004105572
   float batteryV  = sensorValue * 0.004105572;
   int batteryPcnt = sensorValue / 10;

But it doesn't seem to work.. currently it is giving me a voltage of 1.28V, but my multimeter is measuring 3.86V.

What am I doing wrong?


texts: PIC16F1936 Multiple ADC channel readings

texts:
I am programming a PIC16F1934 and using it's two ADC channels namely AN0 and AN1.

I take the maximum out of a bunch of few readings for the AN0 reading and then just one sample for AN1.

Here is my code:

    ADCON0 = 0b00000001;                // Source: AN0, Enable ADC
    for (uint8_t i = 0; i < 46; i++) {

        ADCON0bits.GO_nDONE = 1; // start conversion
        while (!ADCON0bits.GO_nDONE); // wait for result

        rawADCResult = *((uint16_t*) & ADRESL);

        ADCResult = ((uint32_t) rawADCResult * 500ul) >> 10; // Scale it to 100x volts

        if (maxADCResult < ADCResult) // Check if value has changed
            maxADCResult = ADCResult; // and update last value

        __delay_us(50);

    }

    ADCON0 = 0b00000100;                // Source: AN1, Disable ADC
    __delay_ms(500);
    ADCON0 = 0b00000101;                // Enable ADC
    __delay_ms(500);

    ADCON0bits.GO_nDONE = 1; // start conversion
    while (!ADCON0bits.GO_nDONE); // wait for result

    rawADCResult = *((uint16_t*) & ADRESL);

    ADCPORTA1 = ((uint32_t) rawADCResult * 500ul) >> 10; // Scale it to 100x volts

The maxADCResult from channel AN0 is fine. But the value of ADCPORTA1 is always matching the value of channel AN1.

I am printing these values on the LCD and have made sure that I am not copying the same variable twice:

lcdSetCursor(1, 1);
sprintf(msg, "AN0: %d  ", ADCResult);
lcdWriteString(msg);
lcdSetCursor(2, 1);
sprintf(msg, "AN1: %d  ", ADCPORTA1);
lcdWriteString(msg);

One more thing, if I change the order of the channel reading (AN1 first, then AN0). The situation is reversed. Now the result of AN1 gets copied over to AN0.

I tried these things, but it's no use:

Disabling enabling the ADC in b/w each channel change.
Introducing huge delays to allow the MUX to change the channel or the ADC to power up.
Writing whole registers in each command to make sure all bits are according to need.
Completely changing the names the variables used with AN0 and AN1.

Can someone help me with an insight to this issue?


texts:
I'm trying to incorporate a USB-PD controller into my design for a Dual Role Port (DRP). I'm currently building with a Cypress CCG2 24-pin QFN, and using their reference block from the datasheet found here.

Unfortunately, I can not figure out why they have a resistor where I have marked in red circle, suggestions for this? I'm pretty sure the the symbol in the purple is P-Channel FET, can someone confirm?

Below is Dual Role Port (DRP) Application from page 11 of attached datasheet.


texts: Finding inverse of a signal using analog circuits

texts:
How do I use an op amp to find inverse of a voltage signal? In other words, my output signal has an amplitude inverse of amplitude of input signal.

My solution was to convert the signal to digital form, find inverse digitally and then convert back to analog form.

Is there another solution using just analog techniques?


texts:
So im using ESP32 to output 38khz 40% duty cycle wave to ir led and connecting a vs1838b on the other side. The vs1838b works as it outputs LOW when i  send a signal from my remote. Anyways, after the code is uploaded, vs1838b works for less than a second then produces continuous HIGH signal. So what amends do i have to make for my code for break beam to work properly?

const int IrLedPin = 4;
const int RecLedPin= 13;

const int freq = 38000;
const int ledChannel = 0;
const int resolution = 8;

    void setup(){
      Serial.begin(115200);
      pinMode(RecLedPin,INPUT);
      // configure LED PWM functionalitites
      ledcSetup(ledChannel, freq, resolution);

      // attach the channel to the GPIO to be controlled
      ledcAttachPin(IrLedPin, ledChannel);
      ledcAttachPin(2,ledChannel1);
      ledcWrite(0,102);

    }

    void loop(){
    Serial.println(digitalRead(RecLedPin));
    delay(50);
    }

Edited: The code is now optimized for software modulated pwm.

// the number of the LED pin
const int IrLedPin = 4;  // 16 corresponds to GPIO16
const int RecLedPin= 13;
const int timer=2;
// setting PWM properties
const int freq = 38000;
const int ledChannel = 0;
const int resolution = 8;
unsigned long timer1;
unsigned long timer2=millis();
 const int freq1= 600;
 const int ledChannel1=1;
 const int resolution1=8;
 unsigned long timer3=micros();
 unsigned long timer4;
bool recieve;
void setup(){
  Serial.begin(115200);
  pinMode(RecLedPin,INPUT);
  // configure LED PWM functionalitites
  ledcSetup(ledChannel, freq, resolution);
  ledcAttachPin(IrLedPin, ledChannel);

  pinMode(16,INPUT);
}

void loop(){
  recieve=digitalRead(RecLedPin);
  timer1= timer2-millis();
  timer4=timer3-micros();
  if (timer1>50) {
Serial.println(recieve);
timer2=millis();
  }
 if (timer4<600){
  ledcWrite(0,102);
  } else if (timer4>600 && timer4<900){
    ledcWrite(0,0);
    } else if (timer4>900) {
      timer3=micros();
      }
}


texts: How to measure car battery current precisely in wide range (starter current, charging)

texts:
I want to measure car battery currents in high resolution and in wide range and both directions (including engine start and charging currents).

I don't need very high precision measurement, but I want high resolution.

I decided to use large 600A/60mV 0.5% accurracy shunt.

I have lots of amazing Microchip MCP3424 4 channel ADCs in my workshop, it's my favourite ADC and I want to use it.

I figured out, that typical op-amp in differential mode is bad idea, it produces a lot of error (offset voltage error? noise?). It's too hard for me to get reasonable precision witch such low resistance shunt and general purpose op-amp.

There are auto-zero, low noise, low offset amplifiers, dedicated differential amplifiers, but my op-amp knowledge is not enough to make use of them, but I found that there is easier way - dedicated current monitor amplifiers.

My general idea looks like this (sorry for Paint drawing):

Questions:

Which op amp for current sensing can I use? Price limit 3-5USD.
How to use it? Can I power it from USB, and measure current in another circuit?

I've seen datasheets, I've seen this:

Need help with circuit design for current measurement of car starter

But I'm not sure how to connect op amp power, ground etc.

Edit:

I realized that I don't need high side current sensing.
I made this incomplete schematic. Can someone help to fill it up?

simulate this circuit – Schematic created using CircuitLab


texts: Could someone please explain what the terms REF and BSC mean in the left figure. It's a drawing for 6 pin linear technologies Boost converter. I want to draw the symbol in Altium but I'm unsure what the correct dimensions are.


texts: How to reduce a MOSFET fall time with an IC driver

texts:
I'm working on a Flyback converter for approx. 28V/12V for 30W throughput.
I'm using the IC "ADP1071-2" which provides isolation, and a lot of interesting features.
I've been considering Vishay NMOSes for the switching transistor, and this being a flyback (discontinuous), most of low-Rdson MOSFETs have a higher Qg and thus heavy switch-off losses. Frequency of operation is 400 kHz.

Is there (and there may not be any practical way to do this) a way to reduce fall-time of Q1 WITHOUT adding a driver IC and without disrupting the PWM IC ? I'm looking for something that would be 5 components max.

Down here is the switch-off profile :
Blue is direct current, Red is Vds and green is dissipated power.


texts:
I'm very new and I'm trying to do an I2C trace of ADXL345 with Ch1 to SCL and Ch2 to SDA, but the traces look like these:

Is the clock not supposed to oscillate continuously? Is it normal for it to stay high when data is being written (although the decoder fails to decode).

I wonder if I'm doing something wrong and missing something basic.


texts: How to calculate resistors and capacitors values for analog RC filters?

texts:
How to calculate resistors and capacitors values for band-pass RC filters based on LM348 operational amplifier?
In this example, 3.2KHz, 4.3KHz are standard center frequencies, that are individually adjustable down to 1.2KHz and 1.8KHz. I need calculate values of R40, R38, R54, R52, C29, C28, C27, C26 values for my custom center frequencies, for example  1.8KHz, 2.4KHz

Below is Filter frequency response

Full schematic:


texts: ROV (underwater) temperature sensor design considerations

texts:
I'm the 'technician' for a SeaPerch ROV team (since I know the most about electronics) and I need an underwater temperature sensor able to mount on a ROV. Since I don't have much experience with microcontrollers, I was planning to use an Arduino, basing my design from this tutorial.

There's a few things I was wondering about though:

The controller and display will be on the surface, so the thermistor will be on the end of a 15-20m Category 5 wire. Would I need to offset the calculations to work around the extra resistance?
The thermistor module itself will be underwater. Will I need to waterproof the whole thing, or will insulating the leads be sufficient?


texts: Sync Pulse generator for Composite Video. (Stabilizing video)

texts:
I am trying to make a Composite Video Sync Pulse generator with the Help of a micro Controller STM32 ,

Short story.

I have a wireless video source that is transmitted  from a VTX So there is a PAL Camera that is connected to the VTX .
From the other side i have a VRX (receiver) that is connected to a monitor.
When the video signal goes bad , Synch Loss , tearing, rolling etc , So i need to regenerate the Synch Pulses into the video out  just as it was when the video was crystal clear and solid  , in order to stabilize the image...

What i have done so far.

-I can generate PAL or NTSC signal pulses from my Micro Controller.
-I can get the Horizontal and VErtical synch pulses with the LM1881 from my video source.

i tried programmatically to monitor the timing for the Hsynch and Vsynch from the LM1881 while the video was Crystal clear, and right after that i tried to push back  the "cloned" sync pulses with my micro controller , but it doesn't seem to synchronize, because i cant see any deference in the image.

SO before i start digging more into the code ,

First of all , id like to know from you guys if what i am trying to do is possible,

is there an IC that does this dirty job?
(take a Composite video in and spit out a synced ,stable signal out?)


texts:
How can I stabilize a 12V input to a 12V stabilized output voltage?

I have a battery that supplies 12V but not regulated and a device that uses 12V regulated, how can I supply power to that device using thus battery?

EDIT

I just searched on the subject a bit more and found a part called a "zener diode" it seems from a quick reading on Wikipedia to do what I want, make an unclean 12V to a regulated 12V. but I'm not sure. Can someone please clarify if this is in fact what I want?

My "needs":

12V @1A from a ~12V lead acid battery - can go down to 8V - to an XBOX Kinect.


texts: Reset pin (15) behaviour of 4026 counter

texts:
I'm trying to play with CD4026BE counter and I'm unable to solve the problem with reset pin (15 according to datasheets and numerous examples). In my case, if pin 15 (reset) is  grounded with the wire, the counter works perfectly. Otherwise this pin outputs (!) 5V voltage! If it is grounded, through this pin flows a significant current of 50mA, which is way too much in my opinion.  Any resistor between this 15 pin and ground, as suggested everywhere, keeps high voltage on this pin and prevents the counter from counting. I'm at a loss, since in every example I see, people send HIGH signal on pin 15 to reset it, but it is already high in my case.
I've searched "4026" questions here with no result. Indeed, no evidence of a similar problem. Could i have missed anything (quite possible, since I'm only starting to learn electrical engineering)?


texts: USB C - max current without negotiating PD

texts:
I have a device that requires 5W @ 5VDC and want to convert it to USB C power. I am torn between a design that just has two 5.1 kΩ Pd resistors on the CCx lines or one that includes a PD negotiator (my weapon of choice is the CYPD3177).
I'm fairly strongly inclined to just go with the two resistors and leave it at that, after all, it seems like there are lots of examples of relatively high draw circuits just doing that (exhibit A is the Raspberry Pi 4).
Is there a strong pragmatic reason to include the PD controller for a 5V only dataless sink? What's the maximum 5V current one should draw without negotiating?


texts: Why voltage decrease in battery when more current is drawn from it?

texts: I have a load which needs around 12V and 6.5A. When I connect a 12V battery pack with 4400mah capacity with no load then the output voltage shown is 12.3V but when I connect my load the voltage tends to drop to 10.4 V. I assume the reason is because of internal resistance, but still I am not sure. Can anyone help me out here? Apart from this is there any other way to retain the same voltage to draw the same current rate, so the power remains same?


texts:
I am trying to design a U core electromagnet to pluck a ferromagnetic guitar string.
The strings would sit at the outside center of the U core.
I am wondering if high flux cores are ok for this application or if laminated electrical steel is ok for this frequency range.
I seem to have concluded that powdered metal cores are the way to go at this frequencies to have somewhat high saturation margin and balanced eddy losses.
It seems however that high flux cores exhibit soft saturation.
The supplied signal would probably a damped sinewave and maybe other pulse profiles.
Thelectromagnet should be powerful enough to apply the equivalent force of a finger plucking a guitar string. Did not look at impedance considerations yet.


texts: A strange problem in BLDC motor drive: PWM frequency and duty cycle go wired

texts:
I am working on a BLDC motor controller to drive a 2kW BLDC motor with six-step control. The design has two board, one MCU board and one interver board, and the picture below shows one phase drive circuit on the inverter board.

The MCU used on the controller board is STM32F301, and all gate driver input signals are from MCU board to inveter board through normal connectors. Now, here is the problem I had when I did the test.

The MCU outputs inverter gate driver PWM signals with frequency
20KHz and duty cycle 5%.
Before we connect the three motor terminals, we use oscilloscope
to check the inverter gate driver input HIN and LIN, which is the
same as what we set.
After we connect the three motor terminals and switch on power,
we use oscilloscope to check the gate driver signals HIN and LIN,
the PWM frequency became about 76KHz and the duty cycle became about
30%.
After we disconnect the gate drive signal between MCU board and inverter board, and manually rotate the motor to generate Hall sensor outputs, the MCU can generate correct PWM signal as well as correct phase switching.
We used the same board and same program to drive a smaller power
motor (90W), everything is correct. The frequency and duty cycle can
follow what we give.
We used a different inverter board (designed for much smaller power, but able to drive the 2kW motor at no load condition), the same MCU board and ran the
same program, to drive the 2kW motor, everything was fine.

The signal waveforms are shown in the picture below.

After the aforementioned tests, it seems the inverter board design had some problem or there could be some kind of mismatch between the MCU board and inverter board. But I have no clue at all.

My question is, why did the PWM frequency and duty cycle were changed when motor was driven to spin, even though the MCU ran the same program? What could be the possible cause? Since I totally have no clue at all, any idea is welcome.

In case anyone would ask, the other inverter board used 2EDL05I06P and BSC014N06NS without parallel connection.

Updates

First, I would like to thank all who have provided comments and ideas.

After debugging and using trial and error approach, it seems I fixed the problem, although I don't understand why it is fixed. Here is how I did it.

The motor has Hall sensor output and below is the designed Hall interface.

During my previous test, I didn't solder C24, C27 and C28. So when motor runs, the Hall signal, when viewed in oscilloscope, contains a lot of spikes. I initially thought it was coupled during the measurement and not the true signal values. But after I failed with all other means, I changed R91~R93 to zero Ohm, soldered on C24, C27 and C28 and whala! everything is working fine!

Honestly, I still don't understand why it worked. If Hall sensor did contain noises and caused wrong switching, the HIN and LIN pattern wouldn't have been correct.

So, if you have any idea, please let me know.


texts: Alkaline Battery for Boost converter for 1000ma current requirement?

texts:
I am working on a very small scale project that needs 300-600ma bursts at 5v for 10-20 seconds (a bank of LEDs) followed by a period of low power consumption (around 10ma for around an hour or so for the timers).

The idea is to have a battery connected to a boost converter (I chose this one https://www.adafruit.com/products/2030,PowerBoost 1000 Basic - 5V USB Boost @ 1000mA from 1.8V+) to power all the components.

I have looked into different battery sizes and have so far disregarded:
-coin type batteries due to high current requirement.

1- Am I correct in assuming that even 5 coin cell batteries (in parallel) would not be able to provide 600mA of current for any reasonable amount of time without overheating?

This website claims that an AA CAN provide 1 amp, but not for very long.
http://rightbattery.com/118-1-5v-aa-duracell-alkaline-battery-tests/

If their calculations are right, i should be able to draw 1 amp from an AA battery with an estimated capacity of 509mah. If only I could use one AA it would be perfect for my project, but at 300ma one AA would just about power on the components but would probably not be able to provide enough current for the converter to output 5V and 600ma.

In which case, is it feasible to power something like this using 2 or 3AA or aaa batteries? or do i need to count my losses and get a small 500mah lithium ion battery instead?

Would be great if someone could comment on just how sturdy alkaline batteries are to power something like this.

Thanks


texts:
I am using a 12 V power supply to run a series of motors in Parallel expecting them to pull up to 25 ampere.
The motors are running too fast at 12 V so we need to drop it down to 9 or 10 V, preferably making it adjustable..

I am familiar with voltage dividers and voltage reg. chips, and zener diodes but never worked at such high Ampere situations, we are even looking at lamp dimmers(?)

Can anyone suggest the most efficient and simple means of achieving this without excessive cost?
The system does not need of dynamic control, I'm fishing for a hi amp voltage-regulator/ zener-diode type solution, if it exists!


texts:
When I search on web, I see three types of electrical braking exist for induction motors.

1-Regenerative

2-Dynamic

3-Plugging

Regenerative is said to be possible when rotor speed is higher than syncronous speed. What I want to ask in plugging braking (reversing supply flux direction) if it is possible to regeneration of energy. From my understanding, I can also regenerate kinetic energy to electrical one in plugging braking mode but I am not sure about it. I am waiting for your comments.
Thanks in advance.


texts: I'm specifically talking about a motor-generator AC to DC converter. Are there applications where you'd need perfect, ripple-free DC current(and voltage) so you'd use an AC motor coupled to a DC generator?


texts: open-circuited stub VS stepped-impedance

texts:
What is the difference between open-circuited stub and stepped-impedance ?

  The open-circuited stub microstrip realization method is a
  modification of the stepped-impedance microstrip realization method.
  It approximates the series inductance as a high impedance transmission
  line while the shunt capacitance effect is simulated by an
  open-circuited stub using Richard’s transformation.

See 2GHz Microstrip Low Pass Filter Design with Open-Circuited Stub


texts: A question about triac output of zero crossing SSR relay

texts:
In a zero crossing SSR if the output is a triac, would the gate be fired/triggered every 180° or would the gate be applied a constant voltage all the time?

I'm asking because in both cases the load will pass the whole aleternating current.

EDIT:
First of all, the question is not about the phase control; it is about ON OFF control either with a random or with zero crossing relay.

Below is a hand drawn figure for clarification:

As you see as long as the control input of the SSR Vcon is ON the AC is always ON. I also added the time points A, B, X and Y.

But when the Vcon is turned ON at time A, the zero crossing circuit waits a bit more for Vac(or Iac?) to approach almost to zero and at point X the gate triggers to turn ON the AC power. Similar relation is valid for point B and Y.

And all these are for to minimize L*di/dt.

So this type of ON OFF zero crossing control can be used for inductive loads(?). But phase control cannot be used for inductive loads because there is no zero crossing mechanism there?

But my main questions are the following:

1-) In my hand drawn figure, how would the gate voltage look like?

2-) If a relay is used for turning ON a device for one day and turning it OFF for one day, would one still needs a zero crossing option. Because in this case the triac will only turn ON or OFF at non-zero voltage only two times a day. (In some cases ON OFF action is many times a second so zero crossing helps to prevent spikes; but if the function of the relay is just to turn ON for very long time the switching action will happen only one time when turning on and one time when turning off. Is it still required to use zero crossing in that case?)

I hope my questions are more clear now.

Edit 2:

At turn ON zero crossing prevents high current for capacitive loads.

But for the inductive loads the following reference is interesting:

And here is comparing resistive and inductive circuits at off time:

And plots:

The first plot is mimicking zero crossing control signal and showing line voltage.

The middle plot is the voltage across a pure resistive load 220 Ohm.

The third plot is the voltage across R L the inductive load.

What is the way to prevent such peak in real? (Same peak across the triac as well)


texts: Realizing a multitasking program with Timer Interrupts

texts:
This is my attempt to realise multitasking (well almost) through interrupts. In this example, Task 1 is: Toggle LED connected to PB1 at 2Hz (Timer 1 is used, OCR1 can hold values upto 65535), Task 2 is: Toggle LED connected to PB3 at 61Hz (since Timer2 OCR2 is 8bit). It seems to be working too.

Have i understood the concept of multitasking right?
How can i allocate time slices for a "Task" or is it not possible in this case?
Can i replace the "Task" from toggling LED to ADC measurement or receiving bytes on USART? Or would that be realised differently?

Here is my Program:

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

#define COMP_REG_VAL 61250

void timer1_init()
{
    DDRB   |= 1<<PB1;        // Set PortB Pin1 as output
    TIFR1  |= 1<<OCF1A;     // Clear Output compare flag
    TIMSK1 |= 1<<OCIE1A;    // Enable Interrupt on Output compare match
    TCCR1B |= ( (1<<CS12) | (1<<WGM12) );     // Prescaler Fosc/256 ===> 62500
}

void timer2_init()
{
    DDRB   |= 1<<PB3;        // Set Port B pin3 as Output
    TIFR2  |= 1<<OCF2A;     // Clear Output compare flag
    TIMSK2 |= 1<<OCIE2A;    // Enable Interrupt on Output compare match
    TCCR2A |= (  (1<<WGM20) | (1<<WGM21) );     //FAST PWM mode
    TCCR2B |= ( (1<<WGM22) | (1<<CS22) |  (1<<CS21) | (1<<CS20) );  //Fast PWM MOde, Prescaler=fosc/1024
}

int main (void)
{
  sei();
  timer1_init();
  timer2_init();
  OCR1A = COMP_REG_VAL/2;
  OCR2A = 255;

  while(1)
  {

  }
}

ISR(TIMER1_COMPA_vect)
{
   PORTB ^= (1<<PB1);       // Toggle Pin when overflow occurs
}

ISR(TIMER2_COMPA_vect)
{
   PORTB ^= (1<<PB3);       // Toggle Pin when overflow occurs

}


texts:
I wish to build a radio which can receive a 60kHz, amplitude modulated signal.

What is the simplest circuit that will achieve this?

Assuming a ferrite rod in an inductor/capacitor configuration, how would I tune this setup?


texts: Solving for an unknown current: Mesh Method, or Node Voltage?

texts:
Given the power absorbed by each resistor, and the resistance value - do I have enough information to solve the circuit?

I found the Voltage Supply value by \$v^2=pr\$ but I'm not sure how to find the currents for \$V_{in}\$, or the branch currents...
I created 4 mesh equations - the three along the bottom, and one along the edge . but since I dont know \$V_{in}\$ I can't create my matrix to solve for \$V_{k}\$.

EDIT:
I am very aware of \$p=iv\$ and \$v=ir\$

I am able to find individual Voltages and Currents but not what the values of \$V_{in}\$ and \$I_{in}\$ are.  I'm not sure how to tell what the direction of these currents are. I'm trying to find out if the \$I_{in}\$ absorbing or delivering power - to dot that, do I need to know the directions? To find \$V_{in}\$ can I sum the individual currents? \$v=\sqrt{p_{1} r_{1} + p_{2} r_{2} \cdots p_{n} r_{n}}\$.  What do I do with the current source?


texts:
I am trying to reduce the power dissipation of a P-Channel MOSFET high side switch. So my question is:

is there any way in which this circuit can be modified so that the P-Channel
MOSFET will always be "fully-on" (triode / ohmic mode) no matter what the load is?

Edit 1: Please ignore the on/off mechanism. The question remains somehow the same: how can I always keep V(sd) the smallest possible (P-MOSFET fully on / ohmic mode), independent of the load so that the power dissipation of the MOSFET is minimal.

Edit 2: The switched signal is a DC signal. Basiclly the circuit replaces a switch button.

Edit 3: Voltage switched 30V, max current switched 5A.


texts:
I am designing an Alpha particle time of flight detector which consists of two scintillators separated by 5cm of vacuum (few Torrs).

The two scintillators are connected to two separate avalanche photodetectors which would generate photons as soon as the Alpha particle pass through the scintillators.

I now need to design a circuit (preferably an analogue integrator) to measure the time interval between those two events to an accuracy of a 0.1ns.

Could anyone help me with this circuit as I am not very much adept in it?

Thank you very much in advance, and feel free to ask me any questions on the design itself.


texts: Why doesn't the microwave motion sensor make its output negative when the object go away from it?

texts:
this the link of datasheet for the sensor hb100
http://www.theorycircuit.com/wp-content/uploads/2016/09/HB100_Microwave_Sensor_datasheet.pdf
after I had got the results I noticed I couldn't catch the negative frequency when the object go away
I get always the positive frequency whereas the object is moving closer or away from it.
I just need to understand what this is happened


texts:
I'm a bit new to this stuff so please excuse my elementary question.
A gas generator rated at 700 watts and 120V puts out about 5.8 amps. Is it possible to step down the voltage to 12V with a power supply and make available 58 (DC) amps to draw?? Or is the excess voltage simply lost? Thanks.

Added:

The Generator has an AC output of 120V 1000W max (rated @ 8.3A).

Usage will be charging high capacity lithium Polymer batteries.
Basically I would like to have 20A available to charge.


texts: IGBT inverter welder circuits as DC power supplies

texts:
In the perennial search for more economical ways to power a large bank of LEDs (24V COBs) I have come across this technology.
I have a MIG welder so always knew about it, but in looking at it again from the perspective of purchasing a low cost circuit board and utilising it as a continuous running AC->DC converter is another thing.
They are certainly low cost, high amperage, constant current devices with a good DC voltage range (for our application) and reasonable efficiency.
What am I missing?


texts: DIY electronics projects powered by Sony NPF batteries

texts:
I'm looking into making some DIY projects to be powered by the Sony NPF series of batteries. These batteries are usually found in photography and video equipment.
The issue is I can't seem to find detailed specs on these NPF standards.
I know the nominal voltage is 7.2V and capacity varies by the size of the battery itself. Everything else, I'm in the dark.

Are there protections built into the batteries like short-circuit?
Is there a mechanical mounting dimension available so I can design and 3D print the mount, or does Sony only release these info to approved third party manufacturers?


texts: Calculate transmitting power of the Transmitter

texts:
I cannot get a hold of my professor and I'm stuck tyring to understand how to solve this problem. It's not homework or an assignment I'm preparing my self for a test.

So as the title states I need to calculate the transmitting power of the transmitter if we Increase said power? for 20db or 3db.

There is very little explanation in the book about this the first are given and go as follows:

Initial step:
$$ dB = 10 \cdot log_{10} \bigg( \frac{P1}{P0} \bigg)$$

First step:
$$ 20dB = 10 \cdot log_{10} \bigg( \frac{P1 + x}{P0} \bigg)$$

Third step:
$$ \frac{20dB}{10} = log_{10}\bigg( \frac{P1 + x}{P0} \bigg) $$

That's it only thing that they added was:
P1 = Transmitting power,
P0 = Reference power?

Can anyone please give me a better detailed explanation about this how to solve it. The problem does not provide and information regarding values of P and what the hell is that x in First step.


texts:
I am looking to design a bias-T wide band circuit for 10-2000MHz.
I know how to calculate the cutoff frequency at 2GHz and can also find the value of the inductor to be used using the following formula.

How do I calculate the lower cutoff at 10MHz in the same circuit, basically looking at wideband?
Any ideas if my calculation is correct?
Do I need to use only 1 capacitor or can it be a combination of multiple for fine tuning?

Xc = 1/2pifC; C=1/(2pifXc)
C = 1 / (2 * 3.14 * 2000MHz * 2Ohms) = 80pF
Xl = 2pif*L;  L = Xl / (2 * pi * f)
L = 20,000 Ohms / (2 * 3.14 * 2000MHz) = 1.5uH


texts: Optoisolator with EL wire won't turn off, TRIAC works fine. Why?

texts:
I'm pretty new to electronics, and I'm making a circuit to control EL wire with a DC logic control signal. Specifically, I would like to blink the EL wire with the output of a 555 timer.

My first pass at this was with an optoisolator.  MOC3031 data sheet

The circuit looked like this:

(C1 is a stand-in for the EL wire, which I'm told is a capacitive element, and the 555 outputs 5V)

The good news is that if I turn the EL wire inverter on when the 555 outputs 0V, the EL wire will be off until the 555 jumps back to 5V. The bad news is that the EL wire never shuts back off, even when the 555 outputs 0V again (I've confirmed that the 555 circuit works w/ a multimeter).

I ripped out the optoisolator and replaced it with a triac, so now it looks like:

And everything works perfectly. I'm happy in the sense that I have a working circuit, but I'd like to know what changed. Can anyone explain why?

EDIT:

I want to switch some of the EL elements on and off while the inverter remains switched on and drives other EL elements continuously.  The frequency is likely higher than 50-60 Hz and the voltage is probably not a clean sine wave.


texts: Why are graphic displays still so expensive?

texts:
As a new electronics enthusiast, I've been able to score a lot of components for very cheap, ranging from beefy MCUs in the 10$ ballpark to heaps of ICs for sub-dollar prices. However, buying a coffee-maker-sized OLED screen cost me roughly 50$. Meanwhile, I can buy a computer monitor for 90$, although they're full HD, 60Hz full color screens.

Why are the components relatively so expensive?


texts: How is current lowered as Voltage is increased in AC power transmission

texts: I was reading about power transmission on wikipedia and came across the explanation of the efficiency of AC power transmission that said power in the load = (I^2)* R while power transmitted= IV. The page then says "Thus, the same amount of power can be transmitted with a lower current by increasing the voltage." What I don't understand is how voltage can be increased without also increasing current, this seems to violate ohm's law. How is this possible?


texts: Difficulty using CircuitLab to build a Zener Diode Voltage Regulator Circuit

texts:
So I'm trying to build a Zener Diode Voltage Regulator in CircuitLab.

I've been searching around Google for some insight into building these, however, I'm required to use a triangle wave input, while the examples I've been seeing online do not.

Basically, my issue is that when I run the simulation, I get an input/output voltage of 0, even though I set my input to 10V.

I suspect something simple is going wrong here, apologies for the lack of in-depth information to debug this issue, I'm just getting started building circuits.

Here's the circuit I've built that is giving me issues:

Thanks in advance for any guidance you guys can provide me!


texts: Q: Finding the current through the capacitor

texts:
Having a hard time trying to find the current through the capacitor I don't know what method to use.

simulate this circuit – Schematic created using CircuitLab

This is how far I have gotten:

Using DC analysis:

1V Positive Cycle input: The op amp is turned off during the positive cycle thus:

simulate this circuit

Nodal analysis:

\$ \frac{V_{out}-V_{in}}{4k\Omega}+c\dot V_{out} = 0\$

\$ \frac{V_{out}}{4k\Omega}-\frac{V_{in}}{4k\Omega}+c\dot V_{out} = 0\$

\$ \frac{V_{out}}{4k\Omega}+c\dot V_{out} = \frac{V_{in}}{4k\Omega}\$

Laplace Transform:

\$ \frac{V_{out}(s)}{4k\Omega}+sc V_{out} = \frac{V_{in}(s)}{4k\Omega}\$

\$ V_{out}(s)[\frac{1}{4k\Omega}+s470uF]=\frac{V_{in}(s)}{4k\Omega}\$

\$ \frac{V_{out}(s)}{V_{in}(s)} = \frac{1}{1.88s+1}\$

as S->0

Becomes DC gain of 1
\$ \frac{V_{out}(s)}{V_{in}(s)} = \frac{1}{1.88(0)+1}\$

\$ \frac{V_{out}(s)}{V_{in}(s)} =1\$

Thus Vout = 1V

EDIT: Just to add on to the discussion

Positive cycle becomes a RC circuit, to be exact a

\$ H(s) = \frac{1}{1.88s+1}\$

You can even predict the output via transfer function

\$ H(jw) = \frac{1}{\sqrt{(1.88*2*50*\pi)^2+1^2}}\$

\$ H(jw) = 0.008465676V\$

\$ H(jw) = 8.47mV\$ which is exact answer.

However looking at the whole thing positive cycle it doesnt match? Should it be the same thing? As we model? During the positive cycle it should have a behavior of a RC circuit?


texts: I am using a module which gives me an output of -24V. I need to convert this to +5V so it can be read by my NI Data Acquisition Device. What would be the easiest way, I was trying to use a P-channel MOSFET giving it the module output of -24V as Vgs and operating it with a +5V power supply. But it seems to get switched on at very small negative voltages, (my Vgs or Vin without receiving the module output is around -0.02V and this seems to be enough to switch on the P-mosfet). Are there better ways to do this..I would ideally not like to use an op-amp(inverting configuration) as I would need extra power supplies to operate one. (As of now I have two dc power supplies giving me -24V and +5V). Thanks!


texts: Issue with programming Atmega32u4 (lfuse memory not accessible using FLIP)

texts:
From my last question, I've managed to connect my Atmega32u4 to my computer.

Now, when attempted to initialise the bootloader using avrdude, I get the following error message:

j4cob-antergos :: ~ » sudo avrdude -p m32u4 -P usb -c flip1
avrdude: Warning: USB bDeviceClass = 255 (expected 254)
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: Error: "lfuse" memory not accessible using FLIP
avrdude: Error: "lfuse" memory not accessible using FLIP

avrdude: Error: "lfuse" memory not accessible using FLIP
avrdude: Error: "lfuse" memory not accessible using FLIP
avrdude: Error: "lfuse" memory not accessible using FLIP
avrdude: Error: "lfuse" memory not accessible using FLIP
avrdude: safemode: Sorry, reading back fuses was unreliable. I have given up and exited programming mode

avrdude done.  Thank you.

Now, I'm very confused. If I want to simply get a memory dump, I would've that the fact that the "Reading" loading bar reached 100% means that the memory was read, no?

I'm also not sure what the fuses mean. Am I using the wrong programmer? I'm using flip1, as you can see in the command.

Any help is much appreciated, thanks!

(If the circuit schematic is relevant, it can be found in my previous question, to which I linked at the top of this one.)


texts: What is each pin's output voltage of an ATmega328P?

texts: I would like to operate an ATmega328P in 3.3V supply alongside some other 3.3V non-5V-tolerant-peripherals. I looked up in the datasheet but I couldn't find an answer as to what is the output voltage of each pin. I assume it is the Voltage on any Pin except RESET with respect to Ground on page 303 but I would like to know for sure for both practical and educational purposes.


texts:
Considering only transient (not DC) simulations for circuits in which every node has a capacitor path to any other node (a stack of capacitors connects any pair of nodes), and in which all initial node voltages and initial inductor currents are specified, is there always exactly one transient solution for the node voltages?

I hear about SPICE convergence problems and am looking for simple example netlists.  My above question is independent of the numerical algorithm and therefore is simply about the theory in solving Kirchhoff's Laws, but in case the answer is yes, I would still like to see example netlists which cause convergence difficulty.  I imagine that nonlinear devices, like MOS transistors in saturation with infinite differential resistance, are needed to cause such problems.

A short SPICE input file is really the best answer here.


texts: I am currently working on a senior design project. I have always been a software person, but it seems that this project requires quite a bit of hardware knowledge. We are trying to measure respiratory rate using respiratory inductive plethysmography. My supervisor told me that I am going to need an EVM/eval board, but I have never used one, and the existing information online is confusing. Does anyone have any recommendations for what types of EVM boards we could use, or just a good place to find more general information about them?


texts: designing PID controller using Ziegler Nichols algorithm

texts:
I'm trying to use Ziegler Nichols algorithm to design  PID controller for the following transfer function: G=w^2/(2*xws+w^2), w=1 , x=0.2.
 so since the step response for this function  is a second order degree I think I have to use the frequency response method for Ziegler Nichols, which mean  I have to determine Kp critical which make the system oscillate in the closed loop, then after that use the table to determine the KI and Kd constants, but the problem is I couldn't determine the Kp which make the system oscillate in the closed loop, so how I can use Ziegler Nichols algorithm here?


texts: How does one get ticks of a clock from an atomic clock's microwave signal?

texts:
I understand that in an atomic clock there is a microwave signal that is locked to the frequency of the atomic rotation. However, if one wants to extract time ticks from the microwave signal (shown below):

$$v(t)=V_0[1+\alpha(t)]\cos[2\pi \nu_0 t+\phi(t)]$$

it would seem that we need to assign a tick of our clock as either when the signal crosses some threshold or when the signal reaches a peak (dv/dt=0). However, in choosing one of these, your ticks will be susceptible to amplitude or phase fluctuations respectively. So, what is the standard that is used in atomic clocks (or more generally if there is a more general standard), and why (i.e. maybe amplitude fluctuations are smaller than phase fluctuations or vice-versa)?


texts: Calibrating buck LED driver by altering Vsens

texts:
Many switch mode buck LED drivers use a current mode scheme with a sense resistor back to a Vsens or Current Sense input on the chip. A good example is the LM3404. Here's the typical use circuit:

I am wondering can I tweak the driver, for calibration purposes, by altering the voltage going in a the CS input. I realise I can PWM drive this device via the DIM input but, if the purpose is one off calibration, then this is extra effort for nothing. The reason is that we have an expensive UV LED emitter that runs nominally at 700mA, but may need to be brought down to 500mA for calibration of a UV receive sensor. Changing Rsns is a nuisance and a variable Rsns isn't really reasonable.

If I set up for 500mA, then pulling CS down to ground a little should allow me to raise If by a proportionate amount:

I've taken the "circuit with overvoltage protection" example from the datasheet - thus the zener - and added a pulldown. I've done it in the way I have so that if the wiper doesn't connect for some reason, the current doesn't jump up (it would if the wiper went directly to CS).

This looks ok but with SMPS feedback systems I'm never sure. Should there be a bypass cap around the 1K resistor to couple voltage ripple to the LM3404's CS pin (seems necessary for operation of its COT system)?

Edit: Just as I posted this I found this interesting link which does it the other way - takes the Vcc output from the LM3404 and pulls upward. Doesn't seem too precise though as the Vcc pin is quite variable.

Edit: and the AL8805 allows analog dimming on its dim input. Still, I'd be very interested in if this mod is a reasonable one.


texts: Can I approximate impedance Z% to X% neglecting resistance in > 25MVA transformers?

texts:
I extracted this table from Network Protection & Automation Guide - Alstom which is based on IEC 60076 (although X/R ratios are not part of IEC 60076).

And I saw that X/R ratios increase as rated power. Also, as I'm looking for a transformer bigger than 100MVA, can I assume that Z% is equal to X% in order to calculate its leakage inductance?


texts: High Frequency Characteristics of Solder-Filled Vias

texts:
If a via gets plugged with solder, does this destroy its ability to pass high frequency (RF noise) currents? Since there is no longer a surface along which the high frequency currents can travel due to the skin effect?

Somewhat related, with regards to via-in-pad technology, I read that conductive materials are usually undesirable because thermal mismatching between the fill and surrounding PCB causes thermal fatigue. But I've not found any mention of high frequency effects of conductive fills. The only other effects ever mentioned are higher thermal and electrical conductivity (presumably for low frequency currents only).

EDIT: I've been trying to make drawings that show current flow on both sides of every PCB trace, layer, and via in a full closed loop but have not been able to do it in a clear, coherent way so for now I've simplified it down to the drawings below

According to the discussion the RF currents don't actually flow on the inside surface of the via anyways since since it is acting as a waveguide (I don't know anything about waveguides so I'll just take your word on that). This somewhat changes my question since now the question has turned into how high frequency via currents flow in general, unfilled or filled. Accordingly, these are two of the scenarios I had in mind.

This image below is the typical trace to via to trace. So according to the discussion, the current travels on the outside of the via. Since current enters the trace from the top (by means of a component lead). Then is the drawing below accurate in that the current must wrap around the edges of the trace to get underneath it in order to reach the outside surface of the via?

Assuming the above is correct...traces tend to be thin so current does not have to take a large detour to get to the edges of the trace in order to wrap around to the underside. But then consider the scenario below where current is dropped into the middle of a large plane via a wire or component lead.

I usually run into this in power circuits when I have large current carrying traces that are essentially planes. The planes often connect to planes in other layers to carry the current in parallel. Large through-hole snubbing components end up dropping down into the middle of the plane due to the physical size of the component. If current cannot travel down the inside of the vias, whether conductively filled or unfilled, doesn't that mean they must take the long trip to the edge of the plane in order to get underneath it so that they can access the outside of the vias in order to continue traveling?

Should I be adding little "cutout holes" in the plane so that the high frequency currents don't have to travel to the edge of the plane in order to get from top to bottom?

I think you also run into this if you have two ground planes (power planes, or any plane) and stitch them together with vias. The via drops current directly into the middle of the ground plane. The current entering the plane travels on the outside of the via and so ends initially ends up on the inner surface of the plane. Then it must find it's way to some edge along the plane so it can wrap around to the outer surface. Presumably, in this case the "cutouts" in theplane I was referring to in the paragraph would accomplished by anti-pad of vias from the signal layers passing through the plane? That would mean that via stitches for planes should be done close to signal vias?

Like so: