texts: VHDL: How to only update register at rising edge of the clock?

texts:
I have a counter called lastelem_reg. At the rising edge of each clock, it should check whether another signal enqueue is HIGH. If it is, then lastelem_reg will be incremented by 1 in the next clock, otherwise it continues to hold its old value. This seems like a very simple problem, but I'm not getting the intended behavior. Here's the VHDL code:
    process(clk,reset)
    begin
        if (reset='1') then
            lastelem_reg    <= (others=>'0');
        elsif (rising_edge(clk)) then
            lastelem_reg    <= lastelem_next;
        end if;
    end process;

    process(lastelem_reg)
    begin
        if (enqueue = '1') then
            lastelem_next <= lastelem_reg + 1;
        else
            lastelem_next <= lastelem_reg;
        end if;

    end process;

Simulating the above code, results in the waveform shown below. We see that lastelem_reg never gets updated.

So, I thought let's add enqueue to the sensitivity list of the second process and see what we get. The waveform is shown below. We see two things happening here that not supposed to happen. First, the lastelem_next signal changes twice every clock cycle, which shouldn't be happening. Second, the lastelem_reg is updating 1 clock before it should. For example, at 10ns, when the first enqueue signal comes, lastelem_reg should be 0, but here it is 1.
Any idea how to overcome this issue ?


texts: Does it make sense to use differential ended inputs to measure current signals with shunt resistor?

texts:
If I use 500 meters 4-20mA current loop in an outdoor environment, does it matter whether I use single ended or differential ended data acquisition inputs?

I know that for voltage signals differential ended inputs are good to reject common mode interference.

Below is the current loop measurement I'm talking about with a shunt resistor:

As in the above diagram, if the sensor is a 4-20mA loop and converted to voltage at the DAQ side by a 250 Ohm shunt resistor and coupled to the DAQ input as voltage, is there any advantage to using differential ended inputs?

Edit:

Here is the two options single and diff ended inputs for several current loops:

Above there are 3 current sensors hooked up for both single ended(Figure1)  and diff ended(Figure2) data acquisition board channels. If I have many sensors that way, would using diff ended make any difference in this case in terms of interference noise immunity? (I know if the signals were transmitted as voltage it would have big impact but I dont know the current case)


texts: 10 pcs 10amp rectifier Diode in parallel for 14.v 90amp DC input

texts: I'm thinking to have 10 pcs 10amp rectifier Diode in parallel like in my drawing so I can have 100amp diode for 14.v 90amp DC input voltage. I tested the voltage drop is minimal from actual and simulation.   Is this ok? please help


texts: Is making a D flip flop with asynchronous level triggered reset possible?

texts:
I am starting to learn verilog coding in college and didn't have that much of a problem till now. I think I have the basics down perfectly. But I just hit a brick wall with this one. I was experimenting with behavioral modeling and ended up having this problem.

It is easy to make a D flip flop with synchronous level triggered reset like this

always @(posedge clk)
begin
    if(clr) begin
        q <= 1'b0;
    end
    else begin
        q <= d;
    end
end

Or making a D flip flop with synchronous edge triggered reset like this

always @(posedge clk or posedge clr)
begin
    if(clr) begin
        q <= 1'b0;
    end
    else begin
        q <= d;
    end
end

But how can I make a level triggered but asynchronous reset? I cannot do

always @(posedge clk or clr)

because that would be oring two incompatible types, so an error will be thrown while doing the RTL synthesis. I cannot do

always @(posedge clk)
begin
    q <= d;
end

always @(clr)
begin
    q <= 1'b0;
end

since that would require multiple sources to drive q, again problem at RTL synthesis.

So my question is, is making a D-flip flop with asynchronous level triggered reset possible or not? Both in verilog and in digital logic.


texts:
I want to downconvert a simple 100kbit/s NRZ OOK/ASK signal from 900 MHz. In a previous design I found two options:
Option 1:

simulate this circuit – Schematic created using CircuitLab
Option 2:

simulate this circuit
L1 and C1 are an L-match (input is 50 Ohm). The diodes are Schottky diodes (HSMS-285C).
I recognize both options as an instance of an N-stage rectifier (option 1: one stage, option 2: two stages).
I simulate both options in LTspice and the output voltage of option 2 is twice as high as option 1 which sounds definitely better to me. I assume this would not increase the SNR (?) but it would make threshold detection of Vout easier when the voltage is larger.
Questions:

Why would I pick option 1 over option 2? Is there any advantage of using option 1?
Why stop at 2 stages? Why not multiple stages? (I know that the voltage multiplication will be limited by the parasitics and the diode drops). But could there be a deeper reason why the original author used only one or two stages?


texts: Why were NES cartridges unreliable? Why did they take so much effort to get playing properly?

texts:
This has always been something I was curious about, but now as I'm researching building circuits for use as game pieces it's actually a professional curiosity. Specifically swappable, interlocking pieces, so connections akin to how cartridge games worked.

Why were NES cartridges unreliable? By which I mean, why did they take so much effort to get working? SNES and Genesis cartridges by comparison rarely required reseating or odd efforts, like using the another controller to hold it in place.

Is this just a matter of a bad design in the NES that was corrected with the SNES? And if so, how was it solved? Even the NES v2 (top loading version) seemed to suffer from these problems, albeit less frequently.


texts: Why does my electricity tester work on DC Adapter?

texts:
I have a problem to understand how AC electricity tester works.
I have a 12V DC Adapter (from 220 VAC). The multimeter gives the results “12,2” for it.

When I connect the tester to an output wire of adapter then the other wire, the neon glows at both situation. Why does this happen with 12V DC, both wires, while it doesn’t on a DC battery?

When I connect a probe of multimeter to one wire, the other probe to my hand (my body is connected to ground), Why does the voltage change on the screen results?
https://www.youtube.com/watch?v=B3BciRd32Ag


texts: Wien bridge oscillator circuit doesn't work

texts:
I've connected the circuit of Fig 3.4.6 in this link which is shown below:

Here is the circuit that I've connected:

Where in my circuit:

R3 = 100 kOhm
R4 = 47 kOhm
R1 = R2 = 5.1 kOhm
C1 = C2 = 100 nF
Op amp is of type 741
Diodes are of type 1N4001

I chose R3 and R4 based on this circuit from here:

This circuit is the same as the one in the first figure except that there are no diodes.

When I connected the output of the circuit to an oscilloscope, here is all what I could see:

I tried connecting a potentiometer in place of R4 and varying its value but with no noticeable changes in the output.

Note: I've simulated my circuit using Multisim but using different diode types (1N4148), and the results were good.

How can I get the circuit to operate properly?


texts:
I have an FPGA (Xilinx Spartan 6) for which I want to stress test the power supply in "steps" (e.g. the FPGA runs in loops of 1 seconds: full steam for 900 ms, halted for 100 ms) to check that the voltage drops at the power source are acceptable.

What would be my best strategy to test the FPGA "full steam"? Ideally I would have to write little Verilog code and I could programmatically control the FPGA usage (from 0% to 100%) from an external microprocessor.


texts: Portable headphone amplifier - max output and power supply

texts:
According to the specs listed on this page, that portable headphone amp can produce different maximum voltage, depending on the impedance of headphones:

  Max Output @ 600Ω 4.146 VRMS

  Max Output @ 150Ω 3.580 VRMS

  Max Output @ 32Ω  1.182 VRMS

I guess such a big difference in maximum voltage is caused by the fact, that low impedance headphones draw much more current, and higher voltages would exceed the maximum current the amp may provide (with 32 Ohm cans, for example). Is that the reason why max voltages vary that much?

The second thing in the "amplifier performance" column:

  Power Supply  14.0 Vpp

How can a portable amplifier equipped with a 3.7V battery produce 14V? Or maybe it simply means something else.

I'm not saying there's anything wrong in the specs, rather I'd like to know why this may be true (as a beginner in this field).


texts:
How do I change the dimensions of a PCB in Altium Designer 19.1 using by entering the value I want the dimension to be?

Please for the love of 555 DO NOT tell me how to edit the size using the mouse OR by editing the grid snap size. I want to actually define the width and length of a rectangular PCB.

EDIT: Clarification: What I meant when I said do not tell me how to edit using the mouse is that I didn't want someone to tell me I can click and drag the board edges to resize (as this is a very inaccurate way set dimensions). A good example of what I want to do can be taken from SolidWorks, in Solidworks when you can type in the value (mm, inches, etc) of the line you've just clicked on to define its length. That's what I want to do except for the width and length of a PCB.


texts:
I'm currently working on my thesis project on making a secure pendrive.

For that I  have to design an USB protocol implementation on an FPGA.

But I don't know how to physically connect that USB core implementation on the FPGA to a PC. It always failed in that enumeration process (UTMI part is what I have designed but I don't know whether that works).

The PC does not detect my fpga after connecting it  with a cable.

After searching a lot and discussion with industry people, what I got is that we can only check USB on simulation part not physically implement

So my question is their any way

we can physically check it on fpga by sending file from pc to fpga.
any usb host shield are available which can handle that enumeration process.

I have gone through one site and I have posted their approach. But that doesn't work. I added that link below
http://www.xess.com/projects/fpga-usb-v2-project/


texts: How to use SCPI over RS232 with a Rigol Programmable load?

texts:
I have a Rigol DL3021 programmable load. I'd like to control it as part of an automated test setup, over SCPI from a Linux box.
Their programming manual assumes you're on a Windows machine and wants their software to be installed as a prerequisite. Luckily there's an open source VISA implementation called pyvisa which I've had success with over USB. I'm able to detect the device and send it commands. On a side note it seems a bit finicky, but I am new to SCPI and it is perhaps my fault.
Regardless, if I could, I'd like to control it directly over RS232 with SCPI commands. I am ok with writing a small SCPI wrapper driver and giving up whatever nice abstractions VISA provides me in doing this. I have a RS232 to USB FTDI cable which is known working.
When I write SCPI commands to the serial device, though, nothing happens and I receive no response. I have checked the baud, parity, stop bits, control, many times and am confident they match. I see nothing in the manual about needing to explicitly enable RS232 communication on the device.
As an extra datapoint, pyvisa documentation says it should pick up the device over the RS232 adapter, but it doesn't. I'm unsure what to make of this, I have no way to talk to it with the RS232.
This might be where I'm a bit lost, as I'm unclear if there's some handshaking or other magic that needs to be done to start communication with the load. I am working under the assumption that I can send it SCPI commands directly over the RS232 connection, but perhaps I've oversimplified this.
How do I connect to an instrument and check the serial connection?


texts: How does Atmel's XMEGA numbering scheme work?

texts: Atmel has several series of XMEGA chips. How does the numbering scheme work?


texts: Why are delay slots problematic in implementing interrupts in a pipelined processor?

texts:
I have been refreshing my memory on pipelined processors for fun. Currently, I'm reviewing interrupt implementations in (in-order) pipelined CPUs, and various complications that arise. I've found this PDF to be helpful, but it leaves some questions as exercises to the reader.

One of these questions is:

  What makes precise interrupts hard?
  Delayed branches cause a problem. What is it?

My educated guess is that "if an exception or I/O interrupt happens in a delay slot, state about the processor having a branch pending- exclusive to delay slots- is not accounted for when restarting the instruction.

My solution would be to create some state that indicates we are within a delay slot, along with information about the result of the branch. This should work because if the delay slot faults, the branch will complete so that sequential execution of instructions matches pipelined execution.

However, I'm not confident in my solution is correct. Is there some other state or explanation I may be missing?


texts: How to increase the resoltuion of a 20 khz pwm Wave (Atmega 328p)?

texts:
#define F_CPU 16000000UL
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>

double dutycycle = 0 ;

#include <avr/io.h>

int main(void)
{
DDRB = 0xFF;
TCCR1A |= _BV(COM1A1) | _BV(COM1B1);
TCCR1B |= _BV(WGM13) | _BV(CS11);//PRESCALER=64 MODE 14(FAST PWM)

ICR1=50;

OCR1A = 25;

while (1)
{
}
}

With this code i have been able to generate a PWM wave of 20 khz but the resolution is very low is there a way to increase the resolution of the wave ?


texts: XY graph modulating/demodulated signals in FM

texts:
I am using Labview to simulate a communication channel using FM modulation/demodulation (with MT Modulate FM VI and MT Demodulate FM VI to be more precise).

I made a XY-plot (see below) showing the amplitude of the modulating signal and the amplitude of the demodulated signal but I am experiencing some difficulties to understand what it means.

The modulating signal here is a simple tone at 10kHz, amplitude of 1V with a 1V offset. Modulation index set to 1. Increasing the modulating signal frequency increases the width of the ellipse on the plot.

How can I interpret this graph and what causes this ellipsoid form? As commented below, this ellipsoid suggests a phase shift between the modulating and the demodulated signal, what causes this phase shift?


texts: ESD Mats failing with constant monitoring system

texts:
At my job we have constant monitoring systems with ESD wrist straps attached to ESD mats. The way they are supposed to work is when the ESD wrist strap is attached, if the connection with the skin is not good, it beeps to let you know you are not properly grounded. When the ESD wrist strap is not plugged in, it isn't supposed to beep.
However, there were several anomalies yesterday. We have 3 stations, stations 2 & 3 worked fine, but the 1st station failed, beeping regardless of skin contact, even when the ESD wrist strap wasn't plugged in. Oddly, the beeping would only stop when we both wore the wrist strap and also were touching the mat. Next, we tried to isolate the problem by swapping the ESD ground snaps, the constant monitoring system machine, and the mat to another station. After individually testing them, we found that the only thing to fail on the 2nd station was the 1st station's mat. Next, we tried swapping the 3rd station's mat with the first, which also failed. We then tried all the mats on the 2nd station, and now the 3rd station mat (which was working fine before) also failed. We used digital multimeters to test the mats and the grounds, which all were within normal tolerances and read out the same (.02 MΩ if I recall correctly), yet for some reason it seemed like the ground on the 1st station was killing these mats.
I am at a loss to explain what is happening here. I don't know how a ground could cause mats to fail or be fried, especially since the readings are the same on all grounds with the multimeter, but for now I'm going to avoid plugging our mats into the 1st station's ground. The only thing abnormal about the day this occurred was very heavy rainfall.


texts: How to connect large traces to pads in PCB?

texts:
I am designing a PCB, and 10 A-15 A current is flowing in a trace. I think a 300 thou track should be used for 1 oz Cu-thickness. I see that it is impossible to connect two pads with a 300 thou track, because it violates design rules and also other pads are included into the trace, which is undesired.

Figure: 300 thou width trace connection, between pad and the 300 thou trace there is a 80 thou trace (above) and a 60 thou trace (below).

What I ask is:

Can this connection carry the current that a 300 thou trace can carry? Which measurements must be taken?


texts: Piezoelectric Voltage and current measurement across a 3.3kohm resistor.

texts:
I am testing a PZT 43 material with tapping sequence. The measurement of the material is: 10mm in length and 0.8CM in diameter.

I am tapping the material with a plastic and holding it down with a fat-glove to ensure that no other materials interfere with the reading across the oscilloscope. I have enabled noise rejection plus any Low frequency rejection.

This image is my output seen across the oscilloscope:

can anyone confirm if this reading is reasonable?
can you suggest me a way to find the averge of this waveform (this wavefrom was kept on Trigger mode)
by using the ohms law across the resistor, will my current value be accurately measured?

Note: this is channel 1 and my 1st question here.


texts: Unable to interface BeagleBone Green with MCP3008 ADC using SPI

texts:
I am unable to interface MCP3008 with BeagleBone Green. I am trying to set communication in mode 0 (CPOL=0 CPHA=0), the built in frequency in dts is set to 1MHz.

Things I have tried:

Enable device tree BB-SPI0-MCP3008-00A0.dts on execution of ls -al /dev/spidev1.* I got crw-rw---- 1 root spi 153, 0 Oct 7 16:40 /dev/spidev1.1
On execution of cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pingroups group: pinmux_bb_spi0_pins pin 84 (PIN84) pin 85 (PIN85) pin 86 (PIN86) pin 87 (PIN87)
Executed the spidev_test to perform loopback test while connecting p9_18 and p9_21 it only returns spi mode: 0x0 bits per word: 8 max speed: 500000 Hz (500 kHz) for spidev_test I enabled the BB-SPIDEV0-00A0 device tree and disabledBB-SPI0-MCP3008-00A0.dts
The circuit I am following is:

(Image source: "Figure 8.A1 The BeagleBone SPI ADC circuit" from Exploring BeagleBone)

My reference code for MCP3008 is as follows:

#include <stdint.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <linux/spi/spidev.h>
#define ARRAY_SIZE(array) sizeof(array) / sizeof(array[0])

static const char *DEVICE = "/dev/spidev1.1";
static uint8_t MODE = SPI_MODE_0;
static uint8_t BITS = 8;
static uint32_t CLOCK = 1000000;
static uint16_t DELAY = 5;

/* * Ensure all settings are correct for the ADC */
static int prepare(int fd)
{
  if (ioctl(fd, SPI_IOC_WR_MODE, &MODE) == -1)
    {
      perror("Can't set MODE"); return -1;
     }
  if (ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &BITS) == -1)
     {
       perror("Can't set number of BITS");
       return -1;
     }

  if (ioctl(fd, SPI_IOC_WR_MAX_SPEED_HZ, &CLOCK) == -1)
     {
       perror("Can't set write CLOCK");
       return -1;
     }

  if (ioctl(fd, SPI_IOC_RD_MAX_SPEED_HZ, &CLOCK) == -1)
     {
        perror("Can't set read CLOCK"); return -1;
     }

      return 0;
}
/* * (SGL/DIF = 0, D2=D1=D0=0) */
uint8_t control_bits_differential(uint8_t channel)
{
   return (channel & 7) << 4;
}
/* * (SGL/DIF = 1, D2=D1=D0=0) */
uint8_t control_bits(uint8_t channel)
{
  return 0x8 | control_bits_differential(channel);
}

/* * Given a prep'd descriptor, and an ADC channel, fetch the * raw ADC
value for the given channel. */
int readadc(int fd, uint8_t channel)
{
   uint8_t tx[] = {1, control_bits(channel), 0
 };
 uint8_t rx[3]={0,0,0};

struct spi_ioc_transfer tr = {
.tx_buf = (unsigned long)tx,
.rx_buf = (unsigned long)rx,
.len = ARRAY_SIZE(tx),
.delay_usecs = DELAY,
.speed_hz = CLOCK,
.bits_per_word = BITS, };

if (ioctl(fd, SPI_IOC_MESSAGE(1), &tr) == 1)
{
  perror("IO Error");
  abort();
}
return ((rx[2] << 8) & 0x300) | (rx[2] & 0xFF);
}

int main(int argc, char **argv)
{
  int fd = open(DEVICE, O_RDWR);
  if (fd <= 0)
   {
      printf("Device %s not found\n", DEVICE);
      return -1;
   }

   if (prepare(fd) == -1)
    { return -1; }

uint8_t i,radc=0;
for(i = 0;i < 8;i++)
{ printf("Channel %d: %d\n", i + 1, readadc(fd, i)); }

close(fd);

return 0;
}

After executing this code, I am getting 1023 count for any applied voltage, where I am expecting count 0 for 0 input voltage and so on. Can anybody please help me? Can you tell me where I am going wrong? What are the other things do I have to consider while using SPI on BeagleBone? Any help will be greatly appreciated!


texts:
I'm using a 74LS257 to select between 2 4-bit buses, but instead of 0V it's outputing 2V.
Here's the schematic:

The problem appears when Reading is logic 1 (selecting Actual). If Actual0 is logic 1, @0 outputs 2V. All the inputs are 0V or 5V (the problem lies in the IC's output). I have tried to replace it with another one, same results. The exact model is: SP8524 - DM74LS257BN.
All the outputs are conected to this RAM following this schematic:


texts: Seemingly unstable basic PIC18F2550 circuit

texts:
From my work I've had quite a bit of experience with hardware development, but purely from a supervisory role, and so recently I've been playing around with ground up MCU circuit design to try to get a better understanding.

I put the following circuit together to allow me to play around with the MCU registers a bit and it does work - only intermittently.

The LED blinks as intended, then stops for an arbitrary time, flashes again a different number of times, off again etc. There doesn't seem to be any cyclic behaviour to it. It starts working without any external input (i.e. nudging it) so doesn't seem like a loose connection either. I realise the second Vss pin isn't grounded in the schematic, but this didn't help the circuit either when I tried it. Could it be because Vusb isn't grounded? I would have thought this would only affect USB operation.

Code:

#include <stdio.h>
#include <stdlib.h>

#include <p18f2550.h>
#include <delays.h>

#pragma config FOSC = INTOSCIO_EC

#pragma config WDT = OFF

void main() {

    TRISAbits.TRISA1    = 0;    // Set RA1 as output
    LATAbits.LATA1      = 1;    // Set RA1 as HIGH

    while (1)
    {
        LATAbits.LATA1 = ~LATAbits.LATA1;   // Toggle LED pin
        Delay10KTCYx(25);                   // Delay
    }
}

Here is the datasheet for the part.


texts:
I want to build a 1-D (azimuth), bidirectional optical tracker. The idea is to have two identical transceiver, mounted on DC servo-motor. The user can move the two servos on rails (reasonably fast), while the servos have to automatically adjust their angular position to face the other transceiver. The distance between the two transceiver should be at least 20 cm. The drawing below will certainly explains better what I mean:

So far, I have thought about using 1-D PSDs (Position Sensitive Detectors like this one) and LASER diode. PSDs are basically sensitive surfaces that have a direct relationship between the LASER dot position on the surface and the output current:

To estimate the angle that the servo motor must rotate, we need two distances: the position of the LASER dot on the PSD (x, given by the above equation), and the distance between the LASER and the PSD (y). With that, we can apply some basic trigonometric formula to find the needed angle:

$$\theta=tan^{-1}\Big(\dfrac{x}{y}\Big)$$

The problem with this solution is that it is needed to have the distance y. I found two solution to estimate this distance: RSSI (Received Signal Strength Indicator) and ToF (Time of Flight). I read somewhere here that RSSI is not reliable enough to estimate distances. ToF would be much more reliable here. I found this chip which is an all-in-one ToF module that has a range accuracy of around 5 % (depending on several factors). The problem with this is that it increase the complexity of the system and since both sensors (PSD and ToF) work in the IR range, they might be reached by the other sensor's source and it would increase the error in the x and y direction.

Is there another way to reliably estimate the distance between the LASER and the PSD?
Has anyone any idea on how the system can be simplified while allowing for angular tracking between the two transceiver?


texts:
I want to ask how to choose correct ceramic antenna for wifi applications. I've very tight space constrictions and I need to use a small smd antenna. Which is the best antenna(characteristics) for wifi 2.4Ghz that provide me best performance in signal quality/distance relationship?

EDIT:

I'm not asking for a specific product but what specifics means and what are good values.

Linear Max Gain [dBi]
Average gain [dBi]
Efficiency [%] / [dB]
Return loss min. [dB]
Impedance [Ω]
Input power [W]
Power level [W]
Band Width 100Mhz
Maximum VSWR


texts:
I am giving -8 to +8 V supply to the op-amp. So, output of the op-amp is varying from (-8 to +8) V. I want to give this to ADS1115 ADC module. But the ADC module's max. Vin is 5.5 V.

I decided to use voltage divider. What I need is one voltage divider circuit which gives the output that ranges from 0-5 V, when we give the -8 to +8 V as Vin.

Problem here is negative voltage of -8 V. How can I over come this problem ?


texts:
I used an ACS 723 current sensor to measure a very small current. The output of the current sensor gets converted into a proportional voltage.
I have attached the output of the current sensor. Could somebody tell me the formula or a way to convert this voltage into current?


texts:
I have a hobbie project in which I'm trying to assemble a wearable health/fitness oriented device and I want to measure my blood sugar levels. I've visited this area first 5 years ago and technology wasn't there at a time. Does anyone know of any portable, non invasive (sound or light based, without taking blood) sensors to measure glucose/sugar level?

Cheers.


texts:
I have a 127VAC -> 24VAC transformer to power a project and I want a LED to light when my electronics is ON. I rectify it and pass through a smooth 2200uF capacitor and get a good 32VDC.
I don't have the ratings for my transformer, so I don't know the max current it can output. I used some online math I found to estimate it as 1A.

How is the best and safest way to get it down so I can power a single LED?
I know voltage divider, but I don't know how and if I have to worry about current and if I may fry my resistors. I'm also not sure about my transformer max current, so if it is less than 1A, I'd have to do something different?

Thanks.


texts:
I have a 7 year old Vizio soundbar that, when it works, is amazing. In the past 8 months, it has broken twice. The first time, I found some troubleshooting advice on a Reddit page that suggested that it’s a broken capacitor.
I opened up the soundbar and sure enough, the exact capacitor was swollen like a balloon. I removed it and replaced it with a new capacitor. It was all good for 5-6 months and then went dead again. I opened it back up and there was a new capacitor that was swollen up. I replaced that and it turned on for a couple hours then went dead.
Here is my first question:
Why do my capacitors keeps breaking? It just swells up. While I’m perfectly ok with and considering just pulling all the capacitors and replacing them with new ones, I want to identify what’s causing them to break like this. Does anyone have any ideas on what could cause the capacitors to break out of nowhere and what I could fix to save the new capacitors?
Here is my second question:
I’ve attached some pictures below. This time, I don’t seem to identify any swollen capacitors. I’d appreciate it if someone can attempt to identify the broken component from these pictures.
Please let me know if this question doesn’t belong here. I couldn’t find a better page for this.

Just a disclaimer, I’m an absolute novice at electrical stuff. But I do know how to do a clean solder. So if a simple component change is all it is, I might be able to do that. I just want to save this soundbar if it’s possible.


texts: Finite State Machine Design for Entering/Exiting Door Sensor

texts: I have attached an image of the assignment. I don't need to physically build it, just draw it using flip flops, mulitplexers, and logic gates. Not sure where to start at all. I appreciate any pointers and help.


texts: How to calculate the power rating of zener diode for flyback protection?

texts:
I'm trying to calculate the power rating for the zener diode I'm using on my circuit for flyback protection.

For example, if a flyback event occurs, the cathode of the zener diode is having a 30V and 500mA momentarily before the diode conducts and dissipate the power to ground, how should I rate my zener diode power as it would be 15W at the cathode? The current will only be a pulse instead of a constant current. Most of the zener diode are rated to 1W or less.
Thanks.


texts: Why conceptually we connect circuits to earth but in reality that doesn't really work?

texts:
This question is best seen with an image:

Above we can see two equivalent representations of a circuit, on the left side we have a voltage source closed-loop connected to a Resistance (R), and on the right side the open-loop equivalent connected to earth. From this point we would say that both circuits should behave equally.

However when we try to translate the conceptual representation to real life, we find that the current doesn't flow in the second circuit, this is obviously because the floor is usually made of a non-conductive material, but then why do we make such a conceptual representation? On the other hand I've seen in constructions and other big electrical devices that the usually wire the machine to the floor, how come the floor will conduct in such case?

I was taught in school that 'earth' represents an infinite warehouse of charge, so we can give and extract as much charge as we need from it, then why in my example circuit I can't extract the charge?


texts: Inappropriate readings of pulse and temperature sensor (LM35)

texts:
I am facing quite a bit trouble with an LM25 temperature sensor. The readings are a bit too high (90-120*C) for room temprature. I have tried thefollowing things to get an  expected result but none seems to work:

Adding a filter capacitor to the power rails of the LM35 to stabilize the temperature reading.

The fluctuation of temperature output might be the noise from the power supply so it’s better to use an electrolytic capacitor at power supply i.e. connected to Vcc and GND of LM35. (I added 10 uF)

Adding resistance between output pin and GND pin
According to datasheet of the LM35 it has low sinking capability. As a result, its output become more sensitive to electromagnetic interference. 1K or 2K resistor between output and GND can solve this issue to some extent and also solve self-heating errors.

Taking average reading rather than single reading.
Fluctuation or drift are one of the major issues of the Arduino sensor. One way to make fluctuation less is trying to calculate average reading instead of single reading.

Minimize the error.
When we use the default reference i.e. 5V refence at analog input, it is less sensitive to voltage difference. At this reference the Arduino can map 5V input voltage into 1024 steps i.e. 0-1023. This means resolution at 5V = 5/1023 = 4.88 x 10-3V = 4.88mV. So, if we use the default 5V analog reference the minimum temperature deviation that the Arduino can detect is 0.50C. If we use the default Arduino reference voltage we will end up with adding 0.50C extra error.
This error can be minimized by selecting the proper reference value for the Arduino. I used the 1.1V internal reference for the Arduino so that the minimum temperature deviation that the Arduino can measure improves.

At the end I even purchased a new sensor assuming the first one was faulty but tono avail. I am still facing the same problem.


texts: Can I directly connect GPIO to RS232 RXD and TXD?

texts:
Is it okay to connect a 3.3V GPIO pin to the RXD and TXD pins of the RS232 port and supply it with 12VDC from an external source for serial radio? Or would I need to step up the voltage to 12VDC on the RXD pin to the RS232 and step down the voltage respectively for the TXD pin?

I'm using n920 - OEM 900 MHz Spread Spectrum Wireless Modem  serial radio.


texts: Common emitter voltage amplifier does not work

texts:
Since I'm a beginner to electronics, I'm trying to build the following circuit in order to see the way a common emitter amplifier works. I'm using the transistor of type BC547, as indicated in the picture.

My problem is that the voltage \$U_{out}\$ is lower (by a factor of app. 5) than \$U_{in}\$. This is a picture of my circuit on a breadboard. The red circles indicate the points at which I measured the voltages.

Can anybody see what I'm doing wrong? Please tell me if I have to provide more information about the circuit or something else.


texts: Programming Arduino Nano through Arduino UNO

texts:
I am trying to Program arduino Nano using ICSP but the problem is uploaded program only works as longs as Nano is connected to UNO. Here is what i am trying.

Upload arduinoISP program in UNO.
Make connection b/w UNO and Nano.
Upload the my program to UNO(with Programmer Option as
"Arduino as ISP" an board as Nano)

Something like this


texts: Which interface is better for my OLED display?

texts:
I have a 0.96 inch 128x64 Yellow-Blue OLED display module like this: OLED module and I want to use it for a project. The Driver of it is SSD1306. if you see in the datasheet of SSD1306, you will know that it supports 8-bit 68xx/80xx parallel and 3-/4- wire SPI and I2C interfaces. Now, I have several questions:

If you were me, Which one would you choose to connect it to MCU?(8-bit 68xx? 80xx parallel? 3-/4- wire SPI? and or I2C?) and why?
Which one is better for simpler?
I think parallel interfaces are faster(right?) but I can't find anything about 8-bit 68xx and 80xx!(article or web-page or etc. If you have any information about these please let me know). Also, I could find this:What are 6800-series / 8080-series parallel interface? and Is there any 8080 Series Parallel Interface standard? but, these are not enough. What's the diffrence between the 8-bit 68xx and 80xx? Which one is faster? Totally, In your opinion which one is better?

B.T.W: My MCU is STM32F1(it supports all interfaces even 80xx and 68xx parallel) and all AVR series.


texts:
I'm using a TI F28379D to generate a sinusoidal waveform from a DAC channel. The output of the DAC is shown in Figure 1 with a Vpp of 688mV. This signal is then connected to a resistive network of 1k ohms with a 1V DC source as shown on Figure 2. The DC source is a power supply.

Unfortunately, the DAC output signal gets clipped once the DC voltage source is connected. If I use a 1.5V alkaline battery same issue occurs. It is a simple circuit, yet I do not fully understand why the clipping is happening.

Figure 1. DAC Output

Figure 2. Superimposed circuit

Figure 3. Clipped DAC output

The datasheet for this particular MCU, states the maximum resistive load is 5k ohms. Since I am using 1k ohm would this be the root cause of the issue? I do not believe so since I remove the 1V DC source, the clipping goes away.

I am confused why the DC source is causing the clipping of the DAC output. If I were to increase the DC voltage from 1V to 2V, the clipping increases.

Lastly, if I increase R1 and R2 to 3.9k or 5k ohm, the clipping disappears. This means the current is decreased throughout the circuit, and somehow the DAC output is affected.  If I must use 1k ohm, what can I do?

The following are key observations:

Tried isolating the DAC output by adding a voltage follower and the clipping persists
Different frequency output does not affect clipping
Simulations do not show any kind of clipping
If I change R1 and R2 to 5k ohms, clipping disappears
If I change R2 to 5k ohms, and keep R1 to 1k ohms, clipping persists
Removing DC power supply removes clipping
Simulation shows approx. a current of .667mA flow through R1 when it is 1k ohm

Solution:
The voltage follower with LM324A I had was powered by a single power supply. I decided to try the dual-supply operation of the op-amp and it solved the issue.

The root cause was trying to drive an AC signal close to 0V using an op-amp in single supply operation. By using dual-supply operation, the output range of the op-amp can handle 0V.


texts: How to find the Fourier series of an output given input and transfer function

texts:
I have an input rectangle pulse, \$f(t) = rect(t/\tau) \$ and a transmission line whose transfer function depends on frequency. The transfer function of the t.l. is the transmitted wave divided by the incoming wave: \$(1+\Gamma)/((e^{j\gamma l}) +  \Gamma e^{-j\gamma l})\$.

\$\Gamma\$ is the reflection coefficient. \$\Gamma = \left(Z_L-Z_0\right)/\left(Z_L+Z_0\right)\$

where \$ Z_0=\sqrt{\left(R^\prime+jwL^\prime\right)/\left(G^\prime+jwC^\prime\right)}\$ is the characteristic impedance of the line, \$Z_L \$ is a constant

\$\gamma\$ is the propagation constant. \$ \gamma=\sqrt{\left(R^\prime\ +\ jwL^\prime\right)\left(G^\prime+jwC^\prime\right)}\$

The transfer function \$H(s)\$  is now a complex function where \$s=j\omega\$. I am looking to plot \$g(t) \$ which would be the inverse fourier transform of \$F(s)H(s) \$. I also know how to obtain the Fourier series coefficients for \$f(t) \$, but I am not sure what to do with these.

How should I proceed to obtain the output function in the time domain?


texts:
I built a simple op-amp circuit using LM324 (SO-14 package). The structure of the circuit is shown below and Vout = 1.65 + 3.3*Vi. I first used 3.3V single power supply as Vcc and applied a signal 0.125+0.125*sin(t) to Vi. The Vout was suppose to be 2.0625 + 0.4125*sin(t). However, the actual output was capped at about 2.0V and only the lower half of sin(t) was correct. Assuming VCC might not be high enough, I changed VCC to 5V and this time, Vout was correct as full sin wave with offset at about 2.0V.

Since the LM324 datasheet says it supports single power supply from 3V to 30V, how come the Vout was capped at about 2.0V when VCC was 3.3V?

All resistors are in kilo ohms and I think there shouldn't be any current driving capability issue.


texts:
Im trying to build a device powered by a 3s lipo batteries and charged with 3 TP4056 module for each cell. Did some googling around and found out that it wouldnt work due to the common ground of the TP4056.
Found a few alternative and one of it is by using a 0505 dc-dc isolator. Can someone teach me how to use the isolator? And what's the disadvantage of using one? I've tried googling but dont seem to get an answer.


texts: Fastest way to get integer mod 10 and integer divide 10?

texts:
If a hardware doesn't support modulus or division operations, it takes many more CPU cycles to simulate modulus/division by software. Is there any faster way to calculate division and modulus if the operand is 10?

In my project I frequently need to calculate integer modulus 10. In particular, I'm working on PIC16F and need to show a number on an LCD. There are 4 digits to support, so there are 4 calls to modulus and division function (software implementation). That is, like the following:

digit = number % 10;    // call to an expensive function
number /= 10;           // call to an expensive function
somehow_lit_segments();

digit = number % 10;    // call to an expensive function
number /= 10;           // call to an expensive function
somehow_lit_segments();

digit = number % 10;    // call to an expensive function
number /= 10;           // call to an expensive function
somehow_lit_segments();

digit = number % 10;    // call to an expensive function
number /= 10;           // call to an expensive function
somehow_lit_segments();

There are other areas that uses similar code.


texts:
I have a problem when calculating voltage over resistor because one method worked for one problem but not the next.

I solved (b) like this:

$$12-4=8V$$
$$8*\frac{60}{60+20}=6V$$
$$V2 = 6V+4V=10V$$
and that was correct according to the solution manual. I solve (c) like this:

$$-14-(-2)=-12V$$
$$-12*\frac{60}{30+60}=-8V$$
$$V2 = -8V+-2V=-10V$$
And this is wrong. It should be -8V. What am I doing wrong?


texts: How to power a low voltage LED with a high voltage source?

texts:
I have a panel-mount LED (https://www.digikey.ca/products/en?keywords=A-LED8-1GAAS-PR7-1) that is described as "2.2V 30mA" and I would like to power it with a 28V DC source. My questions are as follows:

1) Would I be better off to find a 28V rated LED such as https://www.digikey.ca/product-detail/en/dialight/24979723732504F/350-2400-ND/2428891

or

2) What kind of circuitry would I require to power the 2.2V 30mA LED with the 28V DC source?

Additionally, the first scenario would be quick and easy, but which scenario would be better in terms of power consumption?

Thanks!


texts:
I have attempted to design a 12V to 3.3V switching regulator for my PCB that will draw 0.5A Max. The problem is that after assembling the components, the output voltage is the same as the input voltage, meaning something is wrong with my design, and I just cannot figure out what it is.

I am using THIS regulator

The data sheet calls for this layout on page 13, using a recommended list of components:

And here is my layout. In addition, I am using 2 seperate power planes. The dashed orange line on the bottom represents the 12V power plane (and everything below the line), and the dashed line on the top is the 3.3V power plane.

So the large vias at the top are connected to the 3.3V power plane, and the large vias at the bottom are connected to the 12V power plane.

Here is the schematic (This version is fixed, now that the feedback pin is connected):

There is a list of recommended components in the datasheet on page 13 as well, and I am using components that are substitutes for these, since they are now outdated.

CBYPASS (C21) - C3216JB1C106K160AA
COUT (C19,C20) - C2012X5R1A226M125AB
LOUT (L2) - NRS5020T4R7MMGJ
CBST (C22) - CL05B223KA5NNNC

Is there something that I am completely missing from this design? It appears that it should work, but does not.


texts: Purpose of black overlay in flex circuit design

texts: Does anyone know the purpose of the black overlay I see applied to flexible circuits inside phones?  This is inside the S7, I see the same thing in the iphone.  It's clearly been applied on top of the coverlay.  So what purpose does it serve.  Could be EMI maybe?  Maybe it's just for style...


texts: Film or Ceramic Capacitors for Op Amp Feedback BW Limit?

texts:
Does it matter what type of capacitor is used in the feedback path of an op amp to limit audio bandwidth?

I have always used cheap Radio Shack ceramic caps reasoning that I shouldn't care about distortion at frequencies above the audible range as long as it serves it's purpose to stabilize the circuit. But it so happens that I have some fancy 47p film caps (polystyrene I think) and I'm wondering if they would actually be better somehow. I must ask because I don't have the equipment necessary to actually measure a difference.


texts: Screw Terminals versus crimp terminals in a mating connector

texts:
I have a project where I have to make 300 six wire connectors. I'm highly considering using screw terminals on one end of the connector, but I don't know if they provide enough stress relief on the copper to last long.

Would I be better served by using legitimate crimped terminals in a mating connector that goes to a compatible header?

I just don't want to crimp 3600 wires, but obviously I want a quality wire in the end.

This harness is going to be a fixed application in a vehicle, so while there's not much strain on the wire, there will be vibrations to contend with. It will interface a vehicle connector with a small PCB I've designed.

I'm looking at this screw terminal

and this connector family.


texts: Performing different actions on the same timer

texts:
I am working with MC9S08AW60 on the Board-DEMO9S08AW60E. I have written the following code to perform Serial Comm, LED sequence and Keyboard Tx-RX.

for(;;)
{
    int i =0;
    if(TPM1SC_TOF == 1)
    {
        // this part shows the percentage of the voltage regulator on Hterm
        bob = ADC1RL;               /*ADC*/

        if((SCI1S1 & (1<<7)))
        {
            SCI1D = ((bob*100)/255);
        }

        if(SCI1S1_RDRF == 1 )  /*KEYBOARD RX- lights up a specific LED*/
        {
            bob = SCI1S1;
            if(SCI1D_R7_T7 == 1) PTFD_PTFD7 =1;
            else PTFD_PTFD7 = 0;
        }

        // the following LED sequence is the PROBLEM-A-
        /*for (i=1;i<=8;i++)
        {
            if (i==8) i = 1;
            if (i==1) PTFD_PTFD0 = 0;else PTFD_PTFD0 = 1;
            if (i==2) PTFD_PTFD1 = 0;else PTFD_PTFD1 = 1;
            if (i==3) PTFD_PTFD2 = 0;else PTFD_PTFD2 = 1;
            if (i==4) PTFD_PTFD3 = 0;else PTFD_PTFD3 = 1;
            if (i==5) PTFD_PTFD4 = 0;else PTFD_PTFD4 = 1;
            if (i==6) PTFD_PTFD5 = 0;else PTFD_PTFD5 = 1;
            if (i==7) PTFD_PTFD6 = 0;else PTFD_PTFD6 = 1;
        }*/

        TPM1SC_TOF = 0;
    }
}

Now, board performs the 2 actions really well: the Keyboard RX and Voltage regulator to percentage conversion. But as soon as I bring in the LED sequence part, it stops working on other two.

the logic for TIMER control is check for the overflow flag.
logic for Keyboard Rx is to check for hte RX-Flag.
logic for ADC is to check for the ADC data register.

I don't know how to place this question more accurately. If any ambiguity please let me know.

EDIT: the keboard RX and ADC percentage conversion is happening once per second whereas I want the LED sequence to occur at a rate of 250ms, i.e. once every 250ms, led changes state (1 to 0 and 0 to 1).

Links:

MCU
Board userguide

Newer code with respect to Oli Glaser's suggestions

for(;;)
{
    if(TPM1SC_TOF < 1)
    {
        bob = ADC1RL;               /*ADC*/

        if((SCI1S1 & (1<<7)))
        {
            SCI1D = ((bob*100)/255);
        }

        if(SCI1S1_RDRF == 1 )  /*KEYBOARD RX*/
        {
            bob = SCI1S1;
            if(SCI1D_R7_T7 == 1) PTFD_PTFD7 =1;
            else PTFD_PTFD7 = 0;
        }

        TPM1C1SC_CH1IE = 0; // channel interrupt flag is reset
        TPM1SC_TOF = 0; //timer overflow flag is reset
    }
}

void ledseq()
{
    for (i=1;i<=8;i++)
    {
        if (i==8) i = 1;
        if (i==1) PTFD_PTFD0 = 0;else PTFD_PTFD0 = 1;
        if (i==2) PTFD_PTFD1 = 0;else PTFD_PTFD1 = 1;
        if (i==3) PTFD_PTFD2 = 0;else PTFD_PTFD2 = 1;
        if (i==4) PTFD_PTFD3 = 0;else PTFD_PTFD3 = 1;
        if (i==5) PTFD_PTFD4 = 0;else PTFD_PTFD4 = 1;
        if (i==6) PTFD_PTFD5 = 0;else PTFD_PTFD5 = 1;
        if (i==7) PTFD_PTFD6 = 0;else PTFD_PTFD6 = 1;
    }
}

ISR

__interrupt void isrVtpm1ch1(void)
{
    void ledseq();
    /* Write your interrupt code here ... */
}
/* end of isrVtpm1ch1 */


texts: Can cells get burned in EPROM by programming twice?

texts:
I have ordered my monthly electronic components dosage online, due to the covid-19 disease... in my dosage and for the first time I got an UV EPROM and started a personal challenge of programming it myself without following any tutorials because 1. I didn't find any tutorials on my UV EPROM and 2. I wanted to understand the datasheet for the first time, as you might know I am in secondary school not yet entered a college, yet I love electronic engineering and ask questions, search for courses etc... but anyways I have successfully followed the datasheet and programed my EPROM using 12V and pulsing the correct pulse time which was a great achievement for me !!! Yet I wanted to program another address but unfortunately as my setup was so crude, no switches or anything just generic hanging jumper wires on a breadboard, I forgot to change the address and programed again that address with new data bits, I quickly shutdown everything and when I toggle read mode on that memory address all bits were zero ! My PROM is "M27C256B" and I don't know if I have burned this address or no ..... I tried programming another address and it worked, yet I am now very nervous about the bits I reprogrammed unintentionally again.

In short, if an address on an EPROM is programed twice with different data bits, will that address get burned forever? Or just the EPROM need to get UV cleared?(I couldn't test as I didn't have enough amount of UV LEDs to successfully try clearing the PROM)

Thanks in advance.


texts: How exactly does this shift-register work? - Fairchild 74HC589

texts:
I'm using a PISO shift-register, specifically the Fairchild Semiconductor 74HC589.

I got the jist of the workings of a generic shift-register via the very useful animated GIF in Wikipedia link above, although, there is a step that is elluding me:

According to the datasheet, there is a Serial Load pin (13) and a Read Clock pin (12). Supose I just want to load whatever is in the input latches to the shift-register itself and then simply clock the bits out one by one to the serial output pin. What kind of signal/timing sequence am I looking for?

As I figure it out, the serial load pin should be activated to latch the input pins and then the read clock should transfer from the latches to the shift-register, right?

I need to know this because I'm controlling the SR via a PIC32MX and for now I need to know how I can SET or CLEAR the pins I have connected to the SR so I can then read serially in other PIC32 pin.

Any thoughts?

EDIT:

To help everyone understand my question (hopefully) a bit better, each pin on the shift-register is directly connected to a pin in the PIC32. For instance:

    #define READ_CLK                PORTFbits.RF0
    #define READ_CLK_TRIS           TRISFbits.TRISF0

    #define SERIAL_LOAD             PORTEbits.RE4
    #define SERIAL_LOAD_TRIS        TRISEbits.TRISE4

    #define SR_CLK                  PORTEbits.RE3
    #define SR_CLK_TRIS             TRISEbits.TRISE3

    #define SDI_BUS                 PORTEbits.RE2
    #define SDI_BUS_TRIS            TRISEbits.TRISE2

This way, by SETing or CLEARing each signal, I can enable/disable the pins in the shift-register.

In the end, the idea would be to read in the PIC's SDI_BUS pin whatever comes out of the shift-register's QH (pin 9) output.

EDIT2:

I've been searching a bit more about this - I found out it's a technique called bit-banging. I've kinda reduced my particular problem to the chip enable/select phase of what I'm trying to achieve. It isn't very clear to me how the serial load and the read clock pins fit in the picture.

There must be a sequence in which they are brought high (or low) as to enable the clocking out to the QH pin via toggling the serial clock pin. This is fundamentally what I'm trying to understand.

EDIT3:

Following @shuckc's answer I need to clarify the following:

The pin doesn't directly connect the shift-register and the PIC. There are level-shifters between them. Voltage-wise, the signals are correctly adapted.
The fact that the shift-register design being used is 30 years old is out of my control. I'm working on a circuit built with components that have been stored for quite some time and were used to prototype a design concept. I have no other option, ATM.
What I'm trying to understand is the sequence of signals I need to enter at the shift-register so I can output the latched bits serially. This aims to READ into the PIC from the SERIAL OUTPUT of the shift-register.

Right now what I'm trying to do is something in the line of:

enableShiftRegister() // OE pin in SR ->High; SLOAD pin in SR -> High
latchSignal(); // LATCH_PIN = SET; delayNs(2); LATCH_PIN = CLEAR - RCLK in SR
loadSR(); // SLOAD_PIN = CLEAR; delayNs(2); SLOAD_PIN = SET;
for(i=0; i<8; i++){
    clockSR(); // SRCLK_PIN = SET; delayNs(2); SRCLK_PIN = CLEAR; - SRCLK in SR
    sdiBus = SDI_BUS;
}

The delayNs(x) function delays the CPU for x nanoseconds. I also tried to explain which pin in the SR is being controlled by which PIC pin - remember: they are voltage adapted, so that is not a question.


texts: What are the reasons why this analog to digital conversion is inaccurate?

texts:
I am planning to wire up the following sensor to an Arduino or a Raspberry Pi with a ADC.

The following segment gives a wiring diagram and than says that "Analog to digital conversions rely completely on VCC [...] this may be as high as 5.25V or as low as 4.75V"

I am a beginner to electronics - what is VCC? Additionally what is the "onboard 3.3V reference"?


texts: How does a preamplifier improve the Signal-to-Noise Ratio (SNR)?

texts:
I'm trying to understand how a preamplifier works.

Is the noise not amplified the same amount as the signal?
If so, how is that done in the preamplifier?


texts: I want to monitor the capacity of a 7.4V, 2200mAH Li-ion battery. I have found a that LTC4150 coulomb counter can able to measure the battery capacity. So, suppose I have connected a fully charged battery and monitor the battery capacity. So, after draining the battery to a some amount, what value it will show through a controller, the remaining battery capacity or the amount of AH I have used? I think it will show the amount of battery capacity I have used as per as its calculation of coulomb charge formula given in datasheet. So, if it works like this, then how can I estimate the battery capacity if it is not fully charged? (if 70-90% charged is present and connecting to the load).


texts: Small size clamping device to protect 5V circuit from high voltages

texts:
Are there any small size clamping device or ICs to protect a circuit working on 5V? I would like to protect the circuit from high voltage like 200V - 300V.

Edit: I want to use SN6501 or MAX845 to make dc-dc converter. The chip should just stop working if Vcc is over the max. rating. So, the output of dc-dc converter is zero and it should be safe. But are there any such devices which will just clamp the input to 5V or protect the circuit until the high voltage is present?


texts: what is the mistake of my calculation ,Transformation of the \$\Delta\$ to \$Y\$ circuit

texts:
If \$I=4A\$ ,and \$r=6Ω\$,then what is \$R\$?The answer for this is \$R=18Ω\$,but my answer of my calculation is always \$R=36Ω\$.

My calculation

Transform the \$\Delta\$ circuit ,which resistors are all \$RΩ\$ ,to \$Y\$ circuit , and combine it with the other \$Y\$ circuit,which resistors are all \$r=6Ω\$,and the circuit will become this

simulate this circuit – Schematic created using CircuitLab

So the resistance for this circuit will become

\$R_{th}=(6|| \frac{R}{3})+[(6|| \frac{R}{3})||(6|| \frac{R}{3})]=\frac{6R}{18+R}+\frac{3R}{18+R}=\frac{9R}{18+R}\$

So \$I=\frac{V}{R}\$.that is \$4=\frac{24}{\frac{9R}{18+R}}\$ ,so \$R=36Ω\$.what is the mistake of my calculation,can anyone tell me??


texts: How to measure the peak startup current for an electric motor?

texts:
How would I measure the startup current for an electric motor?

For greater context, see https://diy.stackexchange.com/questions/194224/what-kind-of-inverter-do-i-need-for-an-inductive-load/194227?noredirect=1#comment345387_194227

The general problem is that I need to size an inverter to run a portable AC unit. I have a clamp meter and line splitter that I can easily use to test steady-state current at various temperatures and loads. However, I'm not sure if the response time will be enough to catch the actual peak load when the compressor starts.


texts: Can a MOSFET operate at very low temperature?

texts:
This is not a PCB question and asks only for a single MOSFET. I always wondered if there is a way that a single MOSFET would work at (any) very low temperature. I tried to find some source that answers this question and returned with none satisfactory.

Would junction diffusion process stop in very low temperature or something like that?


texts: Open loop vs closed loop in control theory

texts:
I have two questions:

Why we study stability in open loop rather than closed loop (which is the system that will be implemented).
and is there a relation between response time in closed loop & open loop (I know that this depends on the system, but some general points will be appreciated)

So as you would guess from my questions I have a difficulty in understanding the performance's study of a feedback control system. For me, if we're going to implement a closed loop system (process+ controller+ feedback loop) we should study its stability not the open loop's (process+ controller) because it's the one that we are interested in and the one we're going to use.


texts: Why is it that a full bridge rectifier requires input to be derived from a transformer that provides dc isolation from the supply?

texts:
Recently I came across this and searched a lot online for an answer but couldn't find one...

I found it mentioned in basic electronics book under rectification...It was also mentioned that the cicuit will not function properly if one of the input terminals is grounded.


texts: What is the difference between 74HC595N and 74HC595B1R shift registers?

texts: They seem pretty the same, but B1R version is almost twice cheaper (at least in my country, and I don't know what are the manufacturers).


texts: Lower Vcc of power amplifier and still provides 30 watts

texts:
The above circuit is a power amplifier delivering roughly 30 watts (11.7V times 2.9A) in the 4 ohm load (assuming its a speaker). When we look at \$V_{cc}\$, it looks huge when compared to electronics books providing only 9, 12 \$V_{cc}\$. Can we lower the \$V_{cc}\$ so that it still delivers the same amount of power? I'm planning to use voltage regulator ICs like LMxxx18 which regulate 18 V DC so I'm planning to make \$V_{cc}\$ equal to 18V also.

For the speakers, is the current flowing through the speakers that determine its loudness? We can still get 30 watts of power across the speaker but the sound generated might be miniature, so is it the voltage or current that determines loudness?


texts: Using a Transistor to "Fully" Illuminate a Lamp

texts:
Consider the following:

In the diagram, \$R_C\$ is resistance offered by the lamp, which is \$240\Omega\$. The emitter is at \$0V\$, though this is not marked in the diagram.

Question. I do not understand the line which reads

  Thus, \$100mA\$ of collector current must flow through the transistor to fully illuminate the lamp.

What is meant by "fully illuminate"? Does it mean that the maximum current that can possibly flow through the lamp in the circuit is \$100mA\$?

If my interpretation is correct, then I am not able to undersand the reson behind it. If we choose \$R_B\$ very small, then the base current is high. Thus so is the collector current.

Can somebody plese clarify.

PS: I am a math major who is trying to learn some electronics during the summer vacations. I hope I haven't asked a stupid question.


texts: How to simulate adc with avr simulator 2?

texts:
I would like to know is there a way to simulate (without involving real hardware) analogue input for the ADC pin with stimuli file in avr simulator 2?

I've failed simulating it in Proteus and in my opinion it does not provide enough flexibility and most important speed.


texts: What does J1, J2 and J3 represent on a Schematic?

texts:
I'm looking at this schematic for the TSL1401 line scan camera module and trying to understand what the various pins do. I understand what the labels SI, CLK, AO and Vdd mean but I'm totally lost when it comes to what the J1, J2 & J3 mean.

Here is a picture with the J labeled:

Can anyone here shine some light on this? I looked it up online and it seemed like it was a pretty standared term but I can't find any good documentation on it.


texts:
When i am using Superposition Theorem i am getting 80W but when i using Source transformation getting 0W.Why getting different answers?

Is there anything Hidden in source transformation that I need to know.

I am sure about applying Superposition Theorem. For Source transformation I am converting both current source in voltage source with resistor in series. After that I am applying KVL that gives me zero current. Am I doing something wrong?
I am new in circuit Analysis.
Please Guide

Thanks


texts: How can I change the "USB Serial Port" name to something else? (or serialNumber for USB)

texts:
In our system, we want to plug more than 50 devices that have PIC1846j50, connected through USB serial COM port to a computer. We are experiencing that the computer does not recognize more than 44 PIC devices. But it recognizes other CDC devices beyond that 44 devices. We tried different computers and operating systems (Win7 and Win10). What I realized is that our devices do not have SerialNumber to inform the computer about that, or the USB capabilities are different. I compared (using UsbTreeVeiw app) the PIC81F Serial Port with an STM32L CDC COM Port:
for PIC81F: "Capabilities             : 0x84 (Removable, SurpriseRemovalOK)"
for STM32L: "Capabilities             : 0x94 (Removable, UniqueID, SurpriseRemovalOK)"
So, my device does not have either this capability of UniqueID or Serial number, or they are tied to each other. I could not understand if these are the settings that must be set in the MCU or the computer driver, or both.
Following is the piece of code I have, and I added a few lines to add the serial number. But it seems it is not set properly or not transmitted to computer. The computer does not show this serial number.
Can you help me to fix the problem either by setting the serial number or change this limit on the computer?
Inside usb_descriptors.c file in MPLAB:
//Language code string descriptor
ROM struct{BYTE bLength;BYTE bDscType;WORD string[1];}sd000={
sizeof(sd000),USB_DESCRIPTOR_STRING,{0x0409}};

//Manufacturer string descriptor
ROM struct{BYTE bLength;BYTE bDscType;WORD string[25];}sd001={
sizeof(sd001),USB_DESCRIPTOR_STRING,
{'M','i','c','r','o','c','h','i','p',' ',
'T','e','c','h','n','o','l','o','g','y',' ','I','n','c','.'
}};

//Product string descriptor
ROM struct{BYTE bLength;BYTE bDscType;WORD string[25];}sd002={
sizeof(sd002),USB_DESCRIPTOR_STRING,
{'H','H','M','S',' ','W','e','a','r','a','b',
'l','e',' ','M','o','n','i','t','o','r','i','n','g','.'}
};
// This is what I added:
//Serial string descriptor
ROM struct{BYTE bLength;BYTE bDscType;WORD string[10];}sd003={
sizeof(sd003),USB_DESCRIPTOR_STRING,
{"0123456789"}
};

And I just added sd003 to the following code:
//Array of string descriptors
ROM BYTE *ROM USB_SD_Ptr[USB_NUM_STRING_DESCRIPTORS]=
{
    (ROM BYTE *ROM)&sd000,
    (ROM BYTE *ROM)&sd001,
    (ROM BYTE *ROM)&sd002,
    (ROM BYTE *ROM)&sd003
};

And,  I changed the serial number string index from 0x00 to 0x03:
/* Device Descriptor */
ROM USB_DEVICE_DESCRIPTOR device_dsc=
{
    0x12, // Size of this descriptor in bytes
    USB_DESCRIPTOR_DEVICE, // DEVICE descriptor type
    0x0200, // USB Spec Release Number in BCD format
    CDC_DEVICE, // Class Code
    0x00, // Subclass code
    0x00, // Protocol code
    USB_EP0_BUFF_SIZE, // Max packet size for EP0, see usb_config.h
    0x04D8, // Vendor ID
    0x000A, // Product ID: CDC RS-232 Emulation Demo
    0x0100, // Device release number in BCD format
    0x01, // Manufacturer string index
    0x02, // Product string index
    0x03, // Device serial number string index
    0x01 // Number of possible configurations
};

Apart from the above solution or question, is there any way to increase/remove this limit on computer? Is it the USB proliferation issue?
Thanks


texts: Op - Amp: Linearity, Negative Feedback and Virtual Short

texts:
I need some explanations about  Linearity, Negative Feedback and Virtual Short for an ideal Operational Amplifier.

Precisely, I have been always told that an operational amplifier with negative feedback works in linear region, i.e. that with the diagonal straight line in the following picture:

Now I always saw this reasoning: since the negative feedback forces the op-Amp in the linear region we may write that A = Vout/(V+-V-).
Now, since A is very high, ideally infinite, we get that (V+ - V-) = Vout/A = 0. This property is called virtual short between op-Amp input terminals.

My question does not regards this last step (which I saw also in many topics here) but the sentence "the negative feedback forces the op-Amp in the linear region": why? Why does the connection of the output terminal to the inverting input terminal determine this condition? I think that probably I should know the internal structure of an op-Amp to understand it correctly, but can you give me a brief explanation?


texts: Which manufacturing technology do the LoRa (Semtech SX1276) belong to? Is it a CMOS based chip?


texts: Is this a bidirectional buck/boost converter

texts:
I found this interesting IC on Linear Technologies site, but I don't understand if it, or its development board, can both boost input voltage to output and buck output voltage back to input.
http://www.linear.com/product/LT8705#demoboards
Board:
http://www.linear.com/demo/DC1924A

I want to use it (or whatelse) to connect a 500F/2.7V supercapacitor to my 60V electric scooter, which do not have regenerative breaking, hence I must use the battery to recharge it.
I just need a 5 seconds boost every some minutes.


texts:
I'm a complete beginner to electronics, but I'm trying to follow Ben Eaters video series "Building an 8-bit computer". I tried to do the first part of an astable 555 timer, but the LED does not oscillate and on top of that the timer draws A LOT of current and heats up pretty fast.
Does anyone have an idea what I did wrong and how?

I'm using NE555P, 1uF capacitor, 5V from a rigged phone charger.


texts: How many disc revolutions make 1kWh on this kWh-meter?

texts:
This a kWh meter from a TV show. I'd like to know how many disc revolutions make 1 kWh. I think it's somehow coded in the whole data on the panel or could be derived from that information:

I found a formula

P = (3600 * Kh) / t

(t = time in seconds taken by the disc to complete one revolution, P = power in watts)

which gives me 138,(8) revolutions per 1 kWh but I am not sure I used the formula correctly.


texts:
can the Mosfet be turned on as shown on picture? My desire is voltage on M1 fire the SCR stay on forever.

V2 is ramp voltage.


texts: Types of current sensing in a MCU controlled synchronous buck-converter and there uses

texts:
I am trying to design a synchronous buck-converter driven by a PWM signal generated by a Atmel XMEGA microcontroller.
The input voltage comes from two series Li-Ion batteries so when they are fully charged the input voltage is at 8,4V and the circuit stops operating when the battery voltage decreases to 6,4V. The output current is a maximum of 40A and the nominal value will be around 20A.

The converter is operating at 100kHz and are using a 6µH(but I am starting to wonder if that isn't a little high), I haven't picked out output capacitors yet but it will be ether one large value ceramic or several small value ceramic.

One of the main uses for this converter is to regulate the heat of a heating element presenting a low resistance to the output(it will be capable of driving elements as low as 0,025Ω if I recall correctly but most often the resistance will be around 0,1Ω-0,2Ω), the resistance of the heating element(coil) will be measured at room temperature and that value is stored to be used to compare to the value of the resistance of the heating element as it's temperature is rising and that is the information used to regulate the temperature,the heating element are made out of SS316/L.

I plan to measure both input/output voltage and current, the input current is no mysteries but what about the output current?

I need to compute the output power and to be able to alternatively regulate the output by setting a desired power level(when temperature regulation isn't used).

But I don't understand and I can't find anything online explaining what the difference it of measuring the current through the inductor and the current after the inductor/capacitor.
Measuring the current through the inductor will provide the information needed for cycle-to-cycle current limiting as far as I know and I would guess that the current after the LC filter would be the average current.

But what I don't know is which one I need, or if I need both to be able to control the output current well enough to regulate the output power/temperature(by increasing and decreasing the output power as to maintain a steady temperature)?

Does anyone know about this?

Regards


texts:
I'm looking for the bullet type connector that is used with Tracer Power batteries. Here's the link for their version of it: https://www.tracerpower.com/bullet-bare-ends.html

I found a connector called "seadog" or "SAE", however it is about twice the size in all dimensions. Tracer themselves also say it is a SAE -connector..

The dimensions of the connector are WxH = 14mm x 7mm and the "male" plug's dimension at it's widest is aroud 3.1mm. The larger SAE connector that I had was at least 3.5mm in diameter.

This is what the Tracer connector looks like:


texts: Switching 3.3V with a Raspberry Pi gpio pin

texts:
I recently bought an IR Camera for my Raspberry Pi, something like this:

https://www.amazon.com/kuman-Raspberry-Camera-Module-Supports/dp/B01ICLLOZ8/ref=mp_s_a_1_17?crid=M3FSU2COLT5W&keywords=ir+raspberry+pi+camera&qid=1553193365&s=gateway&sprefix=ir+rasp&sr=8-17

The only problem with the camera is the temperature of the IR leds which get way to high over time. Because I need these leds only one or two times in an hour I want to turn off those leds. My idea is to use a transistor which is switched by an gpio pin of a raspberry pi. But since I'm an amateur in using transistor I don't know which transistor and resistors to use. Any help?

The leds are powered by the camera with 3,3V and I measured about 0,28A at full brightness per led.


texts: I have 3 cables (blue,green,yellow) from my ESC to my motor. However I’m confused whether the voltage it provides is AC or DC. Does the nature of the voltage have anything to do with the kind of motor used?


texts:
I've been trying to get a multiple feedback lowpass filter to work.
With this schematic.

The filter works in the simulation but when i try to build it, it gives no output.

The op amp used to build it is a MCP6002 dual op amp with a rail to rail supply.
I'm using 5v and 0v to power the op amps and im supplying a 1v sine wave.

I've read online that i might have to use a vref bias voltage to get it to work but i can't find too much about this and i'm unsure as to why it's not working.

Any help would be appreciated.


texts: What are the essential properties of a PWM signal that can be captured with an oscilloscope?

texts:
My question is regarding general guidelines when it comes to using oscilloscope captures in a professional-grade report to be presented to people working with signal processing, embedded systems, etc. Although there are a few obvious ones (i.e. cursors and labels), I was hoping to hear from the community about what kind of information do you think would be the most useful on an oscilloscope screen capture?

The focus is on different characteristics of a PWM signal.

To narrow down the question - I am looking to put together a small presentation (~ 15-20 slides including pictorial slides and bullet point info) that gives an overview of a PWM module on a specific uC. One of my main assets for facilitating this task is an oscilloscope. The purpose of this question was to ask fellow users for an advice regarding possible properties of a PWM signal that may be of interest to a professional embedded systems engineer evaluating a new board.


texts:
I am currently using a variable inductor, like this one. I'm trying to find a way to make the adjustment programmatically controlled, kind of like a digital potentiometer. Does such a device exist, or are there other good methods for achieving this? It's being used for matching resonance to an imperfectly manufactured device, which is why it cannot be fixed value.

Edit #1, added schematic


texts: How do I build a solar charger for my phone / other devices?

texts:
I have an HTC Incredible phone which eats a lot of battery, and a cy-fi speaker which I use with the phone.  I'd like to charge them both while riding my bicycle, and I think the best choice is a solar charger, so I can avoid carrying along tons of AA batteries.

How do I go about building a solar charger?  I've soldered in the past, but have no specific electronics knowledge.


texts: SPI communication between MCU and slaves

texts:
If there is only one SPI master and 8 SPI slave devices,
How to we connect them together?

I am not allowed to have 8 dedicated Slave select pins on the master, nor am i allowed to daisy chain the complete setup

I was asked this question in an interview and i am not able to figure it out.


texts: Designing brake light with specific luminous intensity

texts:
I am currently designing a brake light for a Formula Student car and I am looking into existing solutions on the market for inspiration.

The two specific solutions are this, and this.
The LED I found to be suitable is this one.

Based on my research I was thinking about having a regulated buck converter converting from 12 volts to the forward voltage of one LED (2.3 V in this case), and putting them parallel to each other. The converter being regulated, it would maintain that voltage so it would not cause thermal runaway, meanwhile maintaining low power consumption. I would not like to have multiple LEDs connected in series, because if one fails, multiple would fail.

I have troubles finding a straightforward way to calculate the total light output for the brake light from the luminous intensity of a single LED, and the way these correlate to each other.

How does having multiple LEDs next to each other affect the total light output, what spacing and viewing angle would be the optimal, do I need a lens on top of these LEDs and are there any better options?

How should I approach this design question which goal is to achieve similar light output as those I listed previously?

Also, the bulb size for the LEDs in the listed examples seems to be 9.5 and 6.8 mm respectively.


texts:
I need to work on a design for an SD card connector. I'm having some trouble understanding the 'SD card detect' Switch and 'Write Protect' switch operation. Unfortunately, I don't have a physical model to confirm the working.

It's a Yamaichi FPS-00902960 SD card slot.

I've attached a picture of the switch circuit as given in the datasheet.

If card is inserted does 'card detect switch' connect to common terminal(ground)?

Would appreciate the help,

Thanks


texts: I'm looking for the simplest way to produce a 1-bit high resolution (1080p or so) DVI signal

texts:
It doesn't need to be high performance, I just need to draw a bit mask.

I'll be driving it from a micro controller, arduino or perhaps a BeagleBone Black.

The application is to produce structured light patterns with a off-the-shelf projector.


texts: Replace Electret Microphone With Arduino Output

texts:
I have the following circuit for a simple FM transmitter.

I want to replace the electret microphone with a simple tone generated by an Arduino (or equivalent) that will be broadcast over FM radio.

Qns:

1) Is this possible to do?

2) How would I go about doing this? (E.g. will a PWM signal from a digital I/O port on the Arduino work?)

3) Maybe there is a simpler way to broadcast a simple tone over FM radio?...


texts: How to dynamically regulate voltage from a DC power supply to motors

texts:
I'm currently trying to take an approximately 12V, 2 to 3 Amp, LiPO battery and dynamically (using either a microcontroller or a good old fashioned dial/slider) adjust the voltage it is supplying to a pair of hobby motors, probably bottoming out at around 5 or 6 volts, but being able to go lower wouldn't be a problem.

I've read a bit about voltage dividers, but it seems that it might not be the best way to go?

This question might be a bit obvious and for this I apologize, my knowledge of circuitry is pretty barebones. Anyone have any ideas?


texts: Outputting correct data on shift register with clocks tied from microcontroller

texts:
I want to be able to output correct data from the microcontroller to the 74HC595 shift register without using the clock lines separately. This schematic matches my ideas for 16 bits of data:

The micro I'm using is 8051 based (at89C2051).

If the RCK and SCK lines were connected to the microcontroller separately, then my code to send out the data would be as follows:

RCK equ P1.1
SCK equ P1.2
DATA equ P1.3
LOWBYTE equ 20h
HIGHBYTE equ 21h

clr SCK
clr RCK
mov A,HIGHBYTE
mov R1,#8h
send1:
  rlc A
  mov DATA,C
  nop
  setb SCK
  nop
  clr SCK
djnz R1,send1

mov A,LOWBYTE
mov R1,#8h
send2:
  rlc A
  mov DATA,C
  nop
  setb SCK
  nop
  clr SCK
djnz R1,send2
setb RCK
nop
clr RCK

But I don't have enough GPIO pins on my micro to allow for separate clock lines and I don't have enough board space for a larger micro. So I attempted code with the lines tied together as follows. Here, CK means all clocks tied together:

CK equ P1.2
DATA equ P1.3
LOWBYTE equ 20h
HIGHBYTE equ 21h

clr CK
mov A,HIGHBYTE
mov R1,#8h
send1:
  rlc A
  mov DATA,C
  nop
  setb CK
  nop
  clr CK
djnz R1,send1

mov A,LOWBYTE
mov R1,#8h
send2:
  rlc A
  mov DATA,C
  nop
  setb CK
  nop
  clr CK
djnz R1,send2

Somewhere, someone mentioned that the shift clock (SCK) is one ahead of the data latch clock (RCK) when they are tied and used together, but how do I apply this into my code and still ensure the correct 16-bits are sent on the shift register output lines?


texts: Where can I find those metal shield cans that you can solder directly on a pcb for EMI shielding? Just like the ones on the back of XBee modules? I'm not having any luck searching on farnell, perhaps with the wrong keywords, or maybe it's not a commonly bought item?


texts: Is it really possible to "boost" 6 V DC to above 50 kV? Or even 400 kV?

texts:
I am trying to create an arc generator and I have read about the marx generator but I am looking into more compact modules like the image below. All the ones I have found seem to be fake and actually supply less than 1/10th of what they are advertising.

Is there any reliable way of generating a (non-continuous) super high voltage arc?


texts:
I'm using a TSOP34838 IR reciever on an ATMEGA MCU, However, I see a problem in dark areas... If I put my finger in front of the receiever, it starts spewing out garbage, even worse when the room is completely dark (intended use case is a custombuilt rgb controller, so.. darkness is kinda needed to see the rgb). Powered via a wallwart, and more than enough (1k uF) caps on the power rail.

Issue dissapears when I connect for example my oscilloscope's grounding lead to the circuit... Therefore is quite undebuggable.. does anyone have any ideas in what I could try?


texts: Opamp: amplifying DC bias problem in output?

texts:
OpAmp beginner here. I'm trying to do the simple 1KHz, 1V p-p sine wave amplification circuit using TL071 or similar OpAmp.
Simulation currently in LTSpice.
I've biased the VCC to half to try to achieve a good voltage swing but I'm getting the waveform clipped, seems that the Opamp is amplifying my DC bias also?
I don't expect this Opamp to be rail-to-rail, of course.
First, here's the output waveforms:
V(out) is the small output signal, red is AC sinewave, green is biased waveform, centered at VCC/2.
Here's my circuit:

Any help? I'm new to this world of opamps and struggling a bit, thank you!


texts: How many stall cycles resulted by incorrectly predicted branch in instruction pipelining

texts:
I have been solving following exercise problem from book Computer Organization by Patterson and Hennessy:

  The importance of having a good branch predictor depends on how often conditional branches are executed. Together with branch predictor accuracy, this will determine how much time is spent stalling due to mispredicted branches. In this exercise, assume that the breakdown of dynamic instructions into various instruction categories is as follows:

  Also, assume the following branch predictor accuracies:

  Stall cycles due to mispredicted branches increase the CPI.
  What is the extra CPI due to mispredicted branches with the always-taken predictor? Assume that branch outcomes are determined in the EX stage, that there are no data hazards, and that no delay slots are used.

The solution given was:

  Each branch that is not correctly predicted by the always-taken predictor
  will cause 3 stall cycles, so we have:

Doubt

I was thinking how incorrectly predicted branch can cause 3 stall cycles? I was able to guess only 2 stall cycles. Consider instruction sequence:

BEQ R1, R2, Label
INSNX
INSNY
:
:
Label: TINS1
TINS2

Where,

BEQ is branch if equal instruction.
TINS means target instruction.
INSN means instructions next to BEQ.

Consider that "static branch taken predictor" is used which always prefetches branch target instruction, thinking branch will always be taken. However, assume that the prediction fails and the prefetched two instructions needs to be discarded. Shouldnt this execution cause two stall cycles as explained below:

BEQ       F   D   E
TINS1         F   D   X        (Branch Taken prediction, target instruction prefetched,
                                but prediction failed, thus instruction cancelled)
TINS2             F   X        (prediction failed, thus instruction cancelled)
INSNX                 F   D... (Instruction after BEQ executed)

             |<--->|           (Two instructions cancelled.
                                Isnt this equals two stall cycles?)

Isn't this proves incorrectly predicted branch result in 2 stall cycles? What I am missing?


texts: What techniques do you use for testing/simulating circuits? As at my college we use Circuit Wizard which we have to simulate our circuit on. I am looking for something a bit more advance. I have tinkered with SPICE but for more sophisticated circuits it gets more complicated and seems lack of documentation for support for microcontrollers. For designing circuits i've used eagle but it is difficult to get used to after coming from circuit wizard. What do engineers use for testing/simulating circuits? Do you use breadboarding, PCB prototype or similar?


texts: How to power LCD backlight converter (from HP elite 8300)

texts:
I have 3 LCD screen form broken "all in one" pc (HP elite 8300) And would like to recycle them as normal monitor, but for that i have to power the screen backlight.

It's 4 wire coming out from the screen to a "Voltage Converter Morse Steamer Board 48.3GH02.011" (https://www.ebay.com/c/1821982848) module that take 8 wire in input.

I haven't find a datasheet for this. Does anyone know how i can power it, or remplace it by another module ?

Thanks in advance for your time !


texts: What is the voltage of "high" signal on "out" pins? Do I understand it correctly, that it is dependent only on provided Vdd and it is a little (approx. 0.5 V) lower than Vdd?


texts: Needing a simple circuit to switch a vacuum pump from a pressure switch at 4.5v

texts:
I’m looking for some help to build a simple circuit to take a NO switch input and use this to drive a 3-5v vacuum pump.
The switch I’m using is open when the pressure has not been reached (Which is when I need the pump to operate), and closed when the pressure has been reached.
This circuit and the pump are running of 3x AA cells.
As it’s running on batteries I need the circuit to consume as little power as possible please. I’m sure the motor needs some fly back protection but not sure what’s appropriate.
I’m trying to keep the cost and part count down as well.
Any help much appreciated.


texts: How to tap the full power of a 3-phase circuit

texts:
I know I can power my high voltage single phase AC or DC circuit by tapping either one of the L-1 to L-3 legs and return a neutral to the neutral line however I'll only get as much power from one 60Hz cycle.
However is there a way to absorb all the current from 3 lines and convert that supply to a high power,  high voltage single phase AC or DC circuit where only a single power source is needed but with very high and stable current?
Some applications are: EV fast battery charging?


texts: My first MCU PCB and a new JTAG Cortex + ETM connector

texts:
I am trying to build my own PCB with a Cortex-M4 microcontroller LPC4088. I decided that JTAG still is the easiest option for programming it. But ARM has implemented a new 0.05'' pitch SAMTEC micro connector.

I own a SEGGER J-link EDU which implements an older 0.1'' pitch connector and in order to use new connector I bought this adapter from SEGGER.

I soon found out that older ARM connectors implemented different pinning than the one used in my new adapter.

The old one (named ARM 20-pin I think):

The new one (named ARM 19-pin Cortex debug + ETM):

What does "---" stand for? Is "N_RESET" pin same as "TRST" in older scheme? Can I leave pins 11 and 13 unconnected?

So I am trying to figure how to plan the connector on my PCB in order to work with my new adapter. So this is what I managed to do so far:

But as you see there are some pins which I don't know what to do with them... So If anyone could please tell me where to connect them I would be really happy. Pin details for LPC4088 can be found on page 10 of the first link that I posted.


texts:
I'm looking for a male 3.5mm audio plug (3 or 4 band) that can be mounted directly to a PCB. Both surface mount and through hole are fine. I'm surprised that all the usual suspects (Digikey, Farnell, Mouser) seem to have nothing like this. Any idea where i could find this?

I could of course take a regular cable mounted plug and bend it etc to fit but i'd prefer a solution that's meant for this purpose at least until proven it's not really possible

Something like this would be ideal (but smaller quantities and preferably not directly from China)  (http://plug.manufacturer.globalsources.com/si/6008828495047/pdtl/Phone-jack/1065872532/3.5mm-Male-Plug.htm)

Anybody seen something similar somewhere?

Edit: Preferably horizontal (as in the picture) but vertical might work as well.


texts: I am using Arduino DUE for my project which gives a 3.3 volt output signal. I have to convert it to 5 volts to use it with another device. The problem is that my signal frequency is 1 MHz. I have tried using Spark Fun logic level converter which uses BSS138 MOSFET. The converter does give a signal of 1MHz but its output amplitude remains at 3.3 volts. I need to convert it to 5 volts. Can anyone tell me whats the problem. Why the signal amplitude remains at 3.3 volts? I have also tried the same circuit with 2n7000 MOSFET but it also gives the same problem. If frequency is the problem then can anyone suggest a level converter or circuit that can convert the 3.3 volt signal to 5 volts at 1MHz. Thank You


texts: How to calculate Energy Readings in DALI-2?

texts:
I'm reading the memory bank202 from a DALI-2 supported led luminary for energy consumption. When the lamp is on, I see that memory bank location 9 and 10 is increasing. But I couldn't understand how to convert the raw bytes to actual energy consumption in watt.

Below is a log from memory bank202:

Bank [202] , Loc[0x03]: Read Error!
Bank [202] , Loc[0x04]: 255
Bank [202] , Loc[0x05]: 0
Bank [202] , Loc[0x06]: 0
Bank [202] , Loc[0x07]: 0
Bank [202] , Loc[0x08]: 0
Bank [202] , Loc[0x09]: 23
Bank [202] , Loc[0x0A]: 103
Bank [202] , Loc[0x0B]: 255
Bank [202] , Loc[0x0C]: 0
Bank [202] , Loc[0x0D]: 0
Bank [202] , Loc[0x0E]: 3
Bank [202] , Loc[0x0F]: 200

As I understood, the active energy is 5991. The scale factor for acrive energy is -1. So the resulting active energy is 599,1 watt hour?

By the way, I always get timing error when I try to read the version of the memory bank (location3). Anyone have idea why I only have problem with this location?


texts: How to batch update package delays in Altium Designer?

texts:
Altium Designer lets me specify a package pin length and a propagation
delay for each pad of a component.  However, I don't know a way to do
this besides manually selecting each pad and typing in the propagation
delay in the properties window.
I tried writing a script to do that.  Sadly the scripting interface's
documentation is old, probably before the pin propagation delay feature.
I couldn't find documentation on how to access this property.  Ultra
Librarian uses the scripting interface to import their models, but they
don't support pin length or propagation delay.  I guessed about the
method names based on the general naming scheme, but the methods don't
exist.  I was using JScript, if it matters.

SetState_PropagationDelay

SetState_Pad_PinLength

I also tried loading the csv generated by Xilinx Vivado in the pin
mapping popup.  The csv has columns named Min Trace Delay (ps) and
Max Trace Delay (ps), but the pads' propagation delay property doesn't
seem to get updated from those columns.
So, how to import package delays into Altium Designer?


texts: How to improve humidity sensor (Si7021) accuracy?

texts:
I am trying to measure humidity in a textile factory more accurately.
I found this sensor Si7021 (circuit was copied from SparkFun this is the link from SparkFun.) It is measuring very good. I am comparing with a Testo 625. Both results are almost same.

This IC is no longer in stock, so I found this IC from Adafruit instead of SparkFun.

Both of them use a Si7021, but the second one is NOT measuring humidity correctly. For example if I measure 46% with Testo 625, it measures 40% humidity. In a second test if I increase the humidity I'm measuring 71% with the Testo 625, but the Adafruit sensor shows 59%. On the other hand my first sensor is almost same with the Testo 625 for both measurments.
What is wrong? I don't understand. My only solution is to multiply by a number, but I didn't need this with the SparkFun sensor.


texts: Can an n-channel mosfet gate be held closed for months at a time and still reliably open when Vin falls below threshold?

texts:
I made a prototype circuit to detect the loss of individual 12V lithium batteries in a larger parallel bank due to BMS cutoff (12V continuous signal from an individual battery suddenly becomes open circuit). It's just a 10k/5k voltage divider on the Vin side, and a 10K pullup resistor on Vout.
I got the idea from this forum when someone answered my overall logic question by suggesting a mosfet inverter, but I found the 1K resistor they suggested on the input was too low to provide enough voltage to close the gate, so I had to increase it to 5K. I'm using IRF510N models, so maybe that was the difference although IRF530N appear similar.
But the circuit relies on the gate being held closed indefinitely so Vout remains at 0V. This could continue for months, or even years. Will the gate reliably open after all that time when Vin goes to 0V? It works fine now, but I can't find much about mosfets being held closed like this.
I'm not exceeding the max Vgs value, so there's no apparent stress being applied based on the datasheet's parameters. But even so, continuous operation like this is a problem with devices like side stable relays, even ones rated for continuous operation, which were my backup plan, so I wondered if mosfets have some similar issue. I hope not!
Thanks in advance.


texts:
I'm trying to control the back-light of a TC1602A-09T 16X2 Character LCD by using an output pin on a Teensy 3.2 microcontroller. This is the circuit I have at the moment:

The LED- pin would be connected to the backlight ground pin of the LCD and it would be pulled to ground via a signal from the teensy microcontroller. R1 limits the current into the base of the NPN transistor while R2 will pull the base to ground when the backlight should be off. My question is about R3. I put R3 into the circuit so that the LED- pin on the LCD would not be floating when Q1 is turned off. Is this necessary to do? Is there any harm in just leaving the pin floating?

Regardless of whether or not R3 is necessary in this particular application, I was trying to determine what the best value of R3 should be such that the power dissipated through it when Q1 is on would be at a minimum. Using the data I obtained from LTspice I created this graph:

LTspice clearly shows that the higher the resistance value, the lower the power dissipated in the resistor. If this is the case, is there any reason not to choose the highest value resistor that one can get in order to minimize power consumption? Are there any other considerations when choosing a pull-up resistor that help in determining the correct value of the resistor?


texts: expressing a boolean function in another way

texts:
The following boolean expression is given:

g(p,q,r) = ((p->q') -> r)

Depict this boolean function only by using the operations ∧ (AND), v (OR), ¬ (NEGATION).

How can I do this?

I thought I could replace just the q' with ¬q, so:

g(p,q,r) = ((p -> ¬q) -> r)

But i have no idea, how to replace the implication symbols.


texts: What is the transfer function of an ideal buffer in time domain?

texts:
Convolution is is defined as the integral of the product of the two functions after one is reversed and shifted. And in a system where its transfer function is g and the input is f, the output is the convolution of these two functions.

And if a signal is buffered, an ideal buffer should output the input exactly the same.

Lets say the input is f(t) and the transfer function of the buffer is g(t), so convolution of f and g should yield f as the output.

Can we then say the ideal buffer is a Dirac impulse at origin as a function of time?


texts:
I have a microphone attached to a Realtek ALC5640. The circuitry is as below:

L9 is Murata BLM15PD121SN1D

The noise capture is here.

How could I improve the situation and reduce this noise, if possible, by only changing component(s)?


texts: Credit Card Sized BT receiver, circuitry, eink display and power supply. Possible?

texts:
New to this forum. Read a bunch of replies to other 'like' questions, seems a lot of you know your stuff. Forgive me if this has already been postulated (don't think it has).

Curious to see if you can fit a BT receiver, the circuitry required to 'deal with the data' and rewrite the magstrip, a power source and possibly an e-ink display into something the size of a credit card (width/height - not necessarily thick).

Essentially, looking to be able to send mag strip rewrite commands to the card via BT from a cell phone or other BT enabled device that has the information required to the 'device' I am trying to assemble. The BT chip only has to be able to receive, not send any info. The magnetic strip has to be credit card thin, but the rest of the device, can be a little thicker.

I know I am reaching here, but would it be possible to also fit an e-ink display, 24 characters wide on the device as well, displaying certain, identifiable information required at the time of usage?


texts: Inverting 3-to-8 decoder with all-active option

texts:
I have a requirement for an inverting 3-to-8 decoder circuit (i.e. all 8 output high except the selected one being low), but with an option to have all the outputs go low.

The 74HC137 or 74HC138 is close to what I need, but it's three reset conditions all have all outputs high.

Does anyone know of a real-estate-conserving solution (i.e. not a lot of components)?

EDIT: Desired truth table:

A B C R   7 6 5 4 3 2 1 0
0 0 0 0   H H H H H H H L
0 0 1 0   H H H H H H L H
0 1 0 0   H H H H H L H H
0 1 1 0   H H H H L H H H
...
1 1 1 0   L H H H H H H H
X X X 1   L L L L L L L L

R represents some sort of reset input that enables all the outputs (lines 0-7). A, B, and C are the address inputs.


texts: Strategy for a learning lawnmower robot, and choices of motors

texts:
I am pondering on building a practical learning lawnmower robot (could be Arduino based) and I am wondering if this will work.

The robot will be both autonomous and RC (radio controlled). Given some specific lawn, the robot will first learn the path it will have to take via RC. So initially the user has to use RC to control the bot to mow the lawn completely. Necessary data will be recorded by the bot, to be used in later autonomous sessions.

To keep things simple, the RC controller will have only a 2 buttons: rotate (0 radius) and go (forward). The path will then be made up of straight segments (i.e. in a zig-zag manner).

So basically, when learning the path, the bot will record the angle (by mean of an onboard IMU) and length of every straight segment taken. In an autonomous session, the bot will first be placed at the START point, and will just re-play whatever has been recorded. It will ensure recorded angles are maintained, and segment lengths are covered precisely.

I understand that using this strategy, if there are new obstructive objects that emerge on the lawn (lamps, sprinklers...) , re-learning will be required. But I guess that this is still much better than the bot having to improvise everytime it mows the lawn (very likely the same lawn). The advantage of this approach is that it will be much cheaper than fully-autonomous approaches, and might even be more efficient.

My questions:

Do you think this strategy will work, or there are deal-breakers I haven't thought of? What else do I need to consider for this to work?
What kind of motors (stepper, servo, DC with encorder) will be most suitable for this application?

If you can even recommend a specific motor model, that would be great.

I am obliged to any thoughts that you could share.

Cheers,
Dave