texts:
I get a String like: XXXXXXXXX

Its length is fixed and 9.

I need to get an char array like:

char array[9] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

... from there on my sketch processes this array.

Maybe someone has an idea on how to achieve this. I thought about a for-statement to store every single letter in a string array. Then another for-statement to build an char array with the hex presentation of each string. Seems to be a bit complicated though I think.

Really appreciate your help.

EDIT:

What I need to do:

Separate the string into letters / figures.
Change every single letter to its HEX representation.
Build a char Array out of the HEX values.

Example:

123 (String)
0x310x320x33 (String or whatever ...)
{0x31,0x32,0x33} (Char-Array)

This is what I need!


texts: Altium polygon pour doesn't cover same net pads

texts:
I've made boards and seen more that use polygon pours that flow over pads that connect to the same net. However, I was tasked with making minor changes to an old board that I didn't design. On the original even though all the pours are set to solid they appear crosshatched over the pads on the LGA parts and several other parts (pours over empty space are solid). As soon as you repour polygons the connections between the pour and the pads with the LGA chips, the MOSFETs and several other chips are lost. Any ideas?

This is a small album showing how it looks before and after repouring.
http://imgur.com/a/rLivL

Of interesting note is that even before repouring the polygon pour appears as a hatch even though it's set to solid (over the pads, empty areas are fine).  I did notice with the MOSFETs that there as a large ground pour over them that was taking precendence and once I changed the priority those went back to "normal" i.e. hatched even though they're not supposed to be. It didn't fix the problem with the LGAs though.

These are the rules set up for this board, though nothing seems off to me.
http://pastebin.com/HSc4Fjnt


texts: How possible is producing very high voltage and electric arc by a using this simple setup

texts:
I have the basic series RLC circuit in simulation below.
As one can see in SPICE simulation, the output voltage at resonance frequency goes upto 1KV:

Can I really obtain that much voltage as in the simulation in practice by using a function generator and setting the input to around 1.6MHz(resonance freq.)?

Does it also produce a visible continuous electric arc if a grounded metal plate is placed in the vicinity? Or would the function generator's current will be an issue?

Or the resonance will displeasure if there will be some discharge?

I wonder what kind of practical challenges or issues I might encounter.

Edit:

2nd version with the ideas from glen_geek to make it as realistic as possible:
..
I increased the inductance to 10mH. Something like this: https://images-na.ssl-images-amazon.com/images/I/414-dRJ5jTL.SX425.jpg
Now I took account parasitic capacitances, output impedance of function generator ect. And increased the input voltage amplitude from 1V to only 2V.
Here I still can get 1kV at 290kHz:

Is it really possible in real? If so how many mm plate gap I need to obtain a continuous electrical arc at 1KV?


texts: Automatic cut off after switch is pressed

texts:
I have a fun one for you. Here is my diagram:

It's a 555 timer in a monostable one shot configuration. What I want to do is find a way to prevent the LED from staying on if the switch is held down. So whether the switch is just pressed or held down, I want the LED to stay lit the same amount of time and then shut off.

I was trying to find an auto shut off switch, but I didn't really have luck with one.


texts: Pulling too much power from a 9V battery?

texts: I found something that makes 9V go to 15V 3A and before I make the project is it bad to do that and will it kill my 9V batteries?


texts: Radiation Resistance of a Straight Wire Antenna

texts:
I am new to antenna theory, and I have been reading up on antenna properties to create my own antenna.

I want to use a piece of copper wire, maybe around 18 gauge, as a monopole antenna, but it will also be electrically short, at least less than lambda/10.

Furthermore, the antenna will be designed for a single frequency.

Other than the fact that electrically short antennas have a high input reactance, I can't find any information on how to calculate the radiation resistance of a straight, round wire without using a network analyzer. Does anybody know of any information or software I could use to calculate this radiation resistance for impedance matching? Thanks!


texts: 2 SMPS connected together for ground shifting

texts:
I have two SMPS of same manufacturer.

FOLLOWING ARE THERE DETAILS:

MANUFACTURER: Maa-Ku

MODEL: S-24v-5a

INPUT : 240V AC

OUTPUT : 24V 5A DC

WATT : 120 W

Product link: https://www.amazon.in/gp/product/B07B2RXK4C/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

I have a requirement where the board needs input of 24-0-24 5A.

Following is my general idea for neccessary schematic:

As i am a beginner, I want to confirm the schematic will provide me 24-0-24 5A DC in output ?
If not, can some one suggest article for the same ?


texts: Would multiple radio repeaters experience feedback or interference from eachother?

texts:
I'm creating some sensors that repeat each others' audio feeds over radio in a point-to-point fashion in order to listen much like a distributed baby monitor.

Each sensor has a circuit for a repeater which it uses to repeat radio signals from the others. In this sense it operates like a radio based analog mesh network.

I'm worried though. Will two or more of these point-to-point repeaters experience feedback from each other? Will they experience interference?


texts: I am trying to configure an alarm on the M41T82. According to the datasheet, I need to write appropriate values to the alarm registers and when the clock time matches that of the alarm registers it must raise the alarm1 bit in the flag register. But I have been unsucessful at getting to raise the alarm1 flag bit in the flag register. Wondering if I am missing anything. The M41T82 chip does not have any flag to enable the alarm, there is just a flag to enable alarm in battery backup mode, which I tried to set without success. Any ideas on how I can debug this?


texts:
I'm interested in turning my cautery pen (one of those with the replaceable batteries) into something that's DC powered through an AC adapter.

I've figured out the internal wiring for the pen, and by plugging it into one of the shop power supplies, I can tell that it uses 3V at around 3-3.3A to get the glow i want for my application.  I'm looking for something more portable than the shop power supply.

Would it be possible/worth it to modify something like this to power this thing?  https://www.amazon.com/Type-C-Charger-Security-Google-Include/dp/B01IHE38Z4/

What would be necessary to do so?  I know i'm probably looking for a potentiometer to give me some fine tuning ability as well.. or am I just looking at it way the wrong way?


texts: Examples of using a circular polarizer filter for LED display

texts:
I was looking for ways to increase the contrast of a LED-based seven-segment display like this against indoor ambient light, and found this comment on EEVblog suggesting using circular polarizing filters. The basic idea is that

when circularly polarised light gets reflected (off the surface of the display), the reflection is polarised in the opposite direction, and so gets attenuated.

Are there visual examples of circular polarizers being used on LED displays to attenuate ambient light? I'd like to see how they look before purchasing them, but haven't found anything so far.
Bonus question: is this technique commonly used? If not, what is usually done to achieve the same effect? e.g. in clock radios or other consumer equipment.


texts: Can TI chip CC2540 be used for mobile phone access with bluetooth?

texts:
I want to use Ti chip cc2540 for communicating with a mobile phone. I'm not familiar with this kind of chips.
""
What I found is this: http://cn.mouser.com/ticc2540/ it said "Texas Instruments CC2540 2.4 GHz Bluetooth® SoC" "Mobile Phone Accessories".

Anyone who have done something with this chip ?

If it cannot, what else chip can be used to communicating with mobile phone via bluetooth ?


texts: simulink transform integer to pulse (seen by scope)

texts:
I have a custom M function block on simulink as follows with input (a) and output (c).

correspond to input (a) output (c) maybe zero or else. I want to transform this output integer to pulse (can be seen in scope) in sumulink. what is the tips?


texts: Eliminating negative output voltage in a LM317-based power supply adjustable down to 0V

texts:
I've been looking to build a linear power supply with current limiting and output adjustable down to 0V and I found this circuit in a LM317 datasheet.:

So I've built it on a breadboard with minor changes. I used J111 JFETs as current sources, with 1k resistors between source and gate to limit the current to about 6.5mA. Negative voltage rail is provided by a 555-based charge pump, outputting about -13V at this load level. And while this works and regulates down to 0V, it can be adjusted even to negative voltages. When using in CV mode, it can go down to negative few-hundred millivolts, consistent with 1.25V minus the voltage drop across D3, D4. When the current limit is set to minimum and voltage to maximum, I can get the output to go as low as -4V!

I think this should not be the case, since the design above uses a polarized tantalum cap on the output. Even if it's expected, I would like to eliminate it because I don't want my circuits damaged from negative voltage when I turn the pot too far. So far I thought about using a more precise shunt reference below 1.25V in place of D3, D4 and/or adding fixed resistors in series with the pots to limit their regulation range.

So to sum up my questions are:

Is this supposed to happen or am I doing something terribly wrong?
What is the best way to limit regulation to positive voltages/currents only?

Thanks in advance.

EDIT: Schematic of the full circuit below as requested, exactly as I have it on the breadboard.


texts: Need help interpreting a basic circuit question

texts:
In my Nilsson "Electric Circuits, 5th ed" book, there's this drill exercise near the beginning of the book.

Here it is:

  Current at the terminals of the element is

  t<0:
  $$
i=0
$$
  t>=0:
  $$
i=10e^{-2000t} Amps
$$

  Calculate the total charge in microC entering the element at its upper terminal

The element is just an ideal basic circuit element with two terminals.

The answer is 5000 microcoulombs.

This is very early on in the book, in a chapter describing Voltage and Current.

With current as i = dq/dt

I have no idea how to go about it, since the book said algebra would be used until capacitors and inductors, and that no problem-solving tools were given for it.

Is it some calculus-related question? I tried putting in the values in the

i = dq/dt

but my calculator said "calculation error". (from the -2000 exponent, probably)

Any help would be appreciated, thank you for your time. :)


texts: DC/DC Pi output filter inductor gets hot and causes voltage drop

texts:
On my PCB I have a pi-filter as shown below at the output of a DC/DC converter. The DC/DC has an output voltage of 19.5V and will supply a max current of 1.3A. The switching freuqency of the converter is 250kHz. C1, C2, and C3 are ceramic caps. Target ripple is 50mV (i know, not achievable with current design).
Inductor physical size is 4.2 x 4.2 x 2mm and max DC resistance is 16mOhm.
The issues are the following:

Output voltage is only ~17V
Large voltage ripple (400mV at no load, more with load)
Inductor gets hot (80°C or more)

So I tried shortening the inductor and the result was way better. I still have a too large ripple but at least the output voltage reaches the expected 19.5V (a little bit less but okay). I am aware that I have to change the filter design and especially C1 may be larger (or a second 10uF added in parallel). However, I have the following questions for the current design:

Why is the inductor causing a voltage drop of about 2V?
A 47uF electrolytic cap for C2 and C3 will have a larger ESR instead of the currently used cermaic caps, which however will have beneficial impact on the resonant behavior of the filter. Is this assumption correct and is it advisable?
Is my way correct that I have to choose an inductor with a higher current rating and also increase the inductance value to 470nH in order to get the cut-off frequency down?

EDIT:
C1,C2,C3 are rated for 25V. I know that C1 should be rated higher (e.g. 50V).
Here is the measurement after the filter at about 0.9A load:


texts:
I just wanted to confirm my calculations with someone. Here below is the question:

  So what I did was I found the voltage drop across V_E
  (which is equal to V_EE minus the constant V_E)
  which was 15V - .04V, which then I was able to find
  current I_E = 14.6V/1.5E3 = 0.0097 amperes.

Then

  I did the same with the voltage drop across V_B = V_in - V_B (4-.6) = 3.4V.
  I then used the equation I_B = I_E/(1+B) (B is 200 (beta) in the figure.)
  I got  0.0097A/(1+200) = 4.84E-5 amperes.

Finally

  I used Ohms law to rearrange to find R_B = V_B/I_B = 3.4/4.84E-5 = 70212.3 Ω.


texts: What's the best method of measuring displacement and speed without resorting to GPS?

texts:
Is it possible to determine the displacement, speed and acceleration of someone while running, by using methods like dead reckoning, sensor fusion or other, and sensors like accelerometers,  gyroscopes, magnetometers, altimeters or others?

It should be a standalone solution (no GPS or RF).

In the affirmative case what's the ballpark precision and accuracy for distances:

below 50cm;
between 100 to 400m.

And where could I get more information about that particular method?

Could an inertial measuring unit (IMU) be a good solution for this case?


texts: Error initiating microSD card in SPI mode

texts:
I am trying to interface a 32 GB microSD card with PIC32MX795F512L using SPI communication. SPI communication is working fine as I have tested it by shorting the Data Input and Output line and receiving back the data which I sent. I am following the examples provided in Lucio de Jasio's book, Programming 32-bit Microcontrollers in C.

Following are the tasks I am performing:

1. Initializing the SPI Communication in initSPI(), setting the baudrate=76 (250&nbsp;kHz)
2. Initializing the SD card
   -> CS = 1
   -> Sending 80 clock cycles to wake the card
   -> CS = 0
   -> Sending CMD0 command (0x40, 0x00, 0x00, 0x00, 0x00, 0x95)

But the problem is I am not receiving the R1 response from the card, instead I am receiving the 0xFF. Following is the code:

#define FCY 77000000UL
#define FPB (FCY/2)
#define BAUDRATE    9600
#pragma config POSCMOD=HS,FNOSC=PRIPLL
#pragma config FPLLIDIV=DIV_3, FPLLMUL=MUL_21, FPLLODIV=DIV_1
#pragma config FPBDIV=DIV_2, FWDTEN=OFF

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

#define SDI  _RC4
#define SDCS _RA9
#define enableSD()    SDCS = 0
#define disableSD()   SDCS = 1
#define readSPI() writeSPI(0xFF)

int main(int argc, char** argv)
{
    TRISAbits.TRISA9 = 0;   // CS as output
    TRISCbits.TRISC4 = 1;   // SDI as input
    TRISDbits.TRISD0 = 0;   // SDO as output
    TRISDbits.TRISD10 = 0;  // SCK as output
    AD1PCFG = 0xFFFF;
    DDPCONbits.JTAGEN = 0;
    OpenUART1( UART_EN | UART_NO_PAR_8BIT | UART_1STOPBIT, UART_RX_ENABLE | UART_TX_ENABLE, (FPB/16/BAUDRATE)-1 );
    disableSD(); //CS PIN INITIALLY HIGH TO DISABLE CARD
    initSPI();
    initSD();

    while(1)
    {

    }
    return (EXIT_SUCCESS);
}

void initSPI( void)
{
    SPI1BRG = 76; // FPB/154=250KHZ; (76+1)*2 = 154, so brg = 76
    SPI1CONbits.MSTEN = 1; // MasterEnable
    SPI1CONbits.CKE = 1;   // CKE on
    SPI1CONbits.ON = 1;    // SPI Module ON
}

unsigned char writeSPI(unsigned int b)
{
    SPI1BUF=b; // Write to buffer for TX
    while( !SPI1STATbits.SPIRBF)
        ; // Wait transfer complete
    return(SPI1BUF);
}

int initSD(void)
{
    int i,r,rx;
    int data;

    // Step1: Disable SD card
    disableSD();

    // Step2: Send 80 clock cycles to wake up the card
    for(i=0; i<=9; i++)
    {
        data = writeSPI(0xFF);
    }

    // Step3: Enable SD card
    enableSD();

    // Step4: Send CMD0 command to RESET
    r = sendCMD0();
    disableSD();
    if(r!=1)
    {
        putsUART1("CMD reject\n");
    }
}

int sendCMD0()
{
    int i,r;
    enableSD();

    writeSPI(0x40);
    writeSPI(0x00);
    writeSPI(0x00);
    writeSPI(0x00);
    writeSPI(0x00);
    writeSPI(0x95); //CMD0 Command

    for( i=0; i<100; i++)
    {
        r = readSPI();
        if ((r & 0x80) == 0)
            break;
    }
    return ( r);
}

Here is the schematic:

I am not receiving the R1 response. It is stuck at step4 in initSD().

Is there a way I can know if the card has woken up or not after sending 80 clock pulses? After 80 clock pulses, the response from the card is 0xFF.

Do I need to reduce the clock frequency? Currently it's 250 kHz.

Why is the card not initializing. How can I fix it?


texts:
I recently designed a double sided PCB which controls 230V appliances via relays. Here's the picture of the PCB's Topside:

One of the Reddit users commented that the main line is directly below the data line and hence the concept of creepage doesn't apply. Should I be worried about it? I understand that the board act as a big insulator barrier and PCB punch through might cause arcs. Will that be a problem in this design?


texts: Is there a SoC for IoT with cellular network, Wi-Fi, Bluetooth?

texts: I am looking for SoC with support for cellular network, Wi-Fi and Bluetooth. In fact, any Mediatek is suitable, but I am an individual and no one will sign an agreement with me, I suppose. Yes, and I do not want to use two modules, for example ESP32 and SIM800, because I plan to make a very small device and every square centimeter counts.


texts: iPad Doc connector: is it possible to using the camera connection kit while charging the ipad

texts:
I'm building a touch screen kiosk using an iPad and a USB BarCode Scanner (through the camera connection kit).

the problem:

The pinout here shows the USB pin that the scanner would connect to.  However it appears that the charger (info here) also requires the D+ D- Pins to initiate charging.

How can I charge the iPad at the same time as the Bar Code Scanner being used?  In theory, this should be possible since iPhone/iPad do charge (however slow) while connected to a PC.


texts:
Is there a reliable way to etch a PCB(from working product) so as to be left with the surface without the substrate?
Sometimes  an existing PCB product which wasn't designed with weight, size or flexibility in mind is to be reworked.

Looking for a good process to address that aspect of existing PCBs for ultralight weight application projects(air water etc)

Mechanical approaches have serious drawbacks as most PCBs are dual sided but perhaps I am wrong?

Once left with the thinest possible layer of all active components it will be replaced with flexible PCB  type base .

Edit : Would  'Aqua regia dissolve the copper/tin as well as the epoxy holding the fibreglass? That is about the only way of doing away with substrate sandwiched in dual sided PCB design


texts: Solder joint used between copper wires and a button switch is behaving strangely. I don't think it's a cold joint

texts:
The circuit I'm attempting to construct:

I'm constructing the circuit shown in the above image, but I'm experiencing strange behavior when I solder on the switches and test the circuit. The switches are normally closed and are meant to break the connections between the NOR gate inputs and ground. The NOR gates (NTE74S02 TTL gates) are arranged as a SR NOR latch that is meant to turn on the lamp when the switch attached to the SET NOR gate's input is opened and turn off the lamp when the switch attached to the RESET NOR gate's input is opened. The voltage source is 5V DC.

After soldering on the switches and connecting the voltage source, the lamp is meant to remain off until the SET switch is pressed. It is meant to turn off when the RESET switch is pressed. However, the lamp remains persistently on when the voltage source is connected, even after I press the RESET switch a few times. Here are pictures of the solder joints connecting the SET switch to the SET NOR gate:

The circuit works as intended if pressure is applied to the completed solder joints on the contacts of the SET switch. This behavior suggests that the joints are cold joints, but use of a multimeter indicates that the joints are in fact connecting the switch contacts and the wires. I also made sure that I used flux on the contacts and the wires.

Has anyone else encountered a similar problem with solder joints?


texts: Arduino Uno R3 hardware serial: peripheral interfering with the USB/Serial-converter?

texts:
I like to use the hardware serial port (pin 0 RX and 1 TX) to connect a bluetooth module.
Internally these pins are also connected to the onboard USB to serial converter microcontroller which is used to flash the ATMega328 using the bootstrap code.

(From http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf)

Now these two signals would interfer, I think.

Can the RX/TX pins be used to interface with an UART peripheral?
If, what should one do to avoid colliding signals?

I couldn't find examples in my Arduino books and with Google that used the hardware serial port of the Uno R3 to connect peripherals.

Edit 1:

Let me add the following: I don't want to use the Serial monitor (of the Arduino IDE) and the peripheral (Bluetooth module) at the same time. I don't expect that it can be used at the same time. The device should run without USB connected. The Bluetooth module, in this case, will be used to remotely and wirelessly control the Arduino.

Even when not using both together, I suspect the ATMega16U and the periperal might interfer.

And: I know, there's a shield and also an "ArduinoBT", but I don't want to use them as long as it's possible to do this with the hardware serial port of the Uno.

Edit 2:

The peripheral (Bluetooth) module operates at 3.3V while the Arduino operates at 5V.


texts: How supply or flash a LED with a low power solar cell?

texts:
I have a low power solar cell producing roughly 25uA at 1.13V.
What I would like to do is to make a circuit that could store the energy from the solar cell until it reach the voltage and current needed to light up a LED for 1s or just "flash" it. The idea is to show that the solar cell can provide enough current and tension to power something else.

I know there is already that kind of question here and i think the schematic described in the comments may work in this situation. Should I try it with or without a boost converter ? Could it work with an input of only 1.13V ?


texts: Finding percentage memory utilization in pipelining architecture

texts:
I was solving problems from the exercise of the book "Computer Organization and Design" by Patterson. The problem reads like this:

  Consider stage latencies:

IF      ID      EX      MEM      WB
250ps   350ps   150ps   300ps    200ps

  Consider instructions %:

ALU     BEQ     LW      SW
45%     20%     20%     15%

  What is utilization of memory?

The solution given was:

  LW and SW instructions of pipeline use memory. Thus,
    20 + 15 = 35%

However, I was guessing shouldnt we also consider stage latencies? That is , shouldnt this be:

$$
\frac{300}{250+350+150+300+200}\times \frac{35}{100}
$$

?


texts: How to reduce noise in strain gauge measurements

texts:
I have two strain gauges on a 1 m length wind turbine blade which will rotate at 800 RPM. The amplifier and DAQ system will rotate with the blades. I'll have relatively noise environment and the turbine generator will be close. I am using strain gauge for first time and was wondering if any body has any suggestion to reduce noise in my measurements.

For example, What is the best solution to connect the strain gauge shield wires to PCB (amplifier) in order to reduce noise? I was wondering to use screw terminal, but probably there is a better way.


texts:
Standard play VHS video cassette recorders offered only about 3 MHz luminance bandwidth by recording the signal on an FM carrier. What is that carrier frequency? Is it possible to confirm the carrier frequency or even the FM deviation by analyzing archived VHS recordings?

Later edit: Since answers are describing the chroma handling in VHS recording I point out that it is only the luminance that I seek information about. Specifically, how is a European Teletext waveform distorted? Teletext is a non-return-to-zero digital stream at 6.9375 Mb/s added to luminance on spare lines in the vertical blanking interval. Recovering Teletext from archived VHS recordings would require detecting the phase of the clock run-in stream at half bitrate i.e. 3.46875 MHz which is below the noise AFAIK.


texts: Modelling a low-pass filter on LTSpice to filter an input square wave at 50kHz to obtain a sinusoidal output at 50Hz

texts:
I'm trying to create a filter that filters the output of an inverter at 50kHz PWM (from reading the comments, I'm not sure if I should be calling this the switching freq?) to a sinusoidal one at 50Hz with a THD of less than 2% for the output voltage waveform (output voltage should be at 230Vrms). This circuit is supposed to model an inverted DC-AC output, with a filter attached to this output.

The schematics provided should model the inverter with an output of 50kHz PWM, although from reading the comments, I'm not sure if the voltage source allows this simulation?

I'm experimenting with a simple LCR one stage filter if possible. I understand that a low pass filter requires the shunt capacitor to short the high frequencies, but I'm not sure why the design recommended the use of a series inductor. In the schematics provided, R2 can be viewed as the parasitic resistance of the circuit, and R1 is the load resistor. I'm not sure how to calculate for the L and C values to be used to obtain the specified THD value.

I've tried running through a range of values, but I'm not sure which combination of L and C I should be using. The output waveform (a little messy because of the number of simulations I ran.)

The ideal values for L and C might not be in the range provided. Please advise.

Edit:

I've included the inverter circuit so that I can output a PWM waveform. I've modelled the switches to turn ON and OFF to output a triangular wave


texts:
In my recent project, I'm working on 5V DC USB fan's speed controlling.

My fan motor looks like below:

Here fan controlling is done by PWM which is coming from Arduino NANO controller. For controlling the speed of FAN, I developed one circuit which is below:

Now, when I give full PWM means full value 255 and at that time when I measure the voltage across motor then it just around 3.50 V. I just thought it may be full 5 V. I don't know why this much loss happen? Any suggestion regarding this.

And my Arduino code is below:

const int kPinSw1 = 8;
const int kPinSw2 = 9;

const int kPinPWM = 3;

int oneBtnState = 0;
int lastOneBtnState = 0;

int twoBtnState = 0;
int lastTwoBtnState = 0;

int count = 0;

void setup() {

  Serial.begin(9600);

  pinMode(kPinSw1, INPUT_PULLUP);
  pinMode(kPinSw2, INPUT_PULLUP);

  pinMode(kPinPWM, OUTPUT);
}

void loop() {

//-------------------------------------//

  oneBtnState = digitalRead(kPinSw1);

  if(oneBtnState != lastOneBtnState)
  {
    if(oneBtnState == HIGH)
    {
      count--;

      if(count <= 0)
      {
        count = 0;
      }
    }
    delay(50);
  }

  lastOneBtnState = oneBtnState;

//-------------------------------------//

  twoBtnState = digitalRead(kPinSw2);

  if(twoBtnState != lastTwoBtnState)
  {
    if(twoBtnState == HIGH)
    {
      count++;

      if(count >= 4)
      {
        count = 4;
      }
    }
    delay(50);
  }

  lastTwoBtnState = twoBtnState;

  Serial.println(count);

//-------------------------------------//

  switch(count) {

    case 1:
            analogWrite(kPinPWM, 0);
    break;

    case 2:
            analogWrite(kPinPWM, 128);
    break;

    case 3:
            analogWrite(kPinPWM, 192);
    break;

    case 4:
            analogWrite(kPinPWM, 255);
    break;

    default:
            analogWrite(kPinPWM, 0);
    break;
  }
}


texts: Annoying problems getting started with logic circuits (SN74LS)

texts:
I'm trying to get started making logic circuits but I'm not making much progress even with the most basic. I have a SN7408 which is an AND gate however it doesn't matter what I put over the inputs (1A and 1B) I get continuity from Vcc to 1Y which is rather irksome.

I have been playing around with a few USB power sources 5v from a 230v mains adapter. 5v from my macbook and 5v from a recently purchased phone powerbank.

I'm guessing I'm burning out the chips. How can I stop doing that?

Any help gratefully appreciated!

Cheers,

Andrew -


texts:
I have completed my schematic design and started PCB layout. I am considering two layers and 45 mm x 95 mm. There are not any critical signals and according to current values of nets, I will draw power nets with 40 mils and 12 mils for others.

My desired board size is indicated at the bottom-left side of the image below. Do you think that this size is enough for these components? Thank you for sharing your ideas. I am trying to put it as at most 2 layers because of the cost of 4 layers is much higher than relative 2 layer board.

This is the layout;


texts: Arduino Leonardo doesn't get auto-detected in Windows 7 (64bit)

texts:
I recently purchased an Arduino Leonardo to control my Sumo robot. I plugged it in to my friends computer and was able to use the Arduino IDE to upload code to the board and run a simple wheel-test program. When I got home and sat down to play around with it myself, I discovered that it wouldn't connect to my computer.

I plugged the micro-usb in to my computer and the board turns on and the LED goes into it's two-second pulse, but Windows 7 64bit never auto-detects new hardware. I've searched around on Google and tried some of the things that were suggested and it still doesn't work.

I manually installed the Leonardo driver in the System section of the Widows Control Panel and it still doesn't register the device. I've tried manually changing the port of the device from COM1 all the way up through COM9, hoping that my computer was just stupid and didn't recognize what it was doing.

I'm using a Gateway laptop (I looked around for a model name or number, but it doesn't seem to have one. It's just a cheap development machine that I bought at Wal-Mart)

Any suggestions?

Solution: The crappy USB cable I was using did not have a data connection, so even though it would power the board, Windows was never able to establish a connection to the device. Terrible cable. :(


texts: What's the noise figure of an attenuator not at room temperature?

texts:
I'm confused by the following:

What's the noise figure of an attenuator with 10 dB loss at very high temperature, having a noise power of like 80 dBm/Hz?
How about if the attenuator at very low temperature having a noise power of -500 dbm/Hz?

The attenuators are 50 Ω matched and purely passive.
Now, we connect a 50 Ω source with room temperature (noise power -173 dBm/Hz) to these two attenuators. What is the noise power coming out? How about if the attenuators are not 50 Ω matched, rather 70 Ω or 100 Ω with mismatching, what's the noise power at the output now?
Could anyone help? I have read many articles, but not a clear explanation.
PS: please do not think much about the non-realistic values, i took the large values to show the problem. 'Noise figre of attenuator equals to its loss' seems not correct in some cases.


texts: Issue of IC 7486 and IC 74LS86 Exclusive Or Gate in Proteus,

texts:
Why does IC 7486 Exclusive OR gate is giving and error in PROTEUS Simulation. Error is Simulation Failed due to partition analysis error.
But when IC 74LS86 is implemented it works. Truth Table of Exclusive OR gate is then verified.
What is the difference between IC 7486 an IC 74LS86.
Why IC 74LS86 is working properly but IC 7486 is giving an error?


texts: How could you (in theory) run an induction cooker from a DC supply?

texts:
What would be the most efficient way in thoery to build an induction cooker (hob) to run from DC power at low (ish?*) voltages? I say in theory, so the answers are not limited by products that exist on the market, but by the practical physics/engineering (and in case anyone is listening, and wants to bring a specialised cooker to market for Yachts, RVs, off-grid installations etc).
So, asssuming that an inverter to step up the 48V DC to 240V AC would work (if it has enough rated power) but has some inneficiency/loss, could an induction cooker be designed that runs natively on 48V DC source (or 24V) more efficiently?
For context, increasingly sailing yachts are moving to electric only power[1][2][3], with big battery banks and no engine. These systems seem to run at around 48V DC (various other voltages are also used). However, as far as I can tell all induction hobs run on AC domestic power (240/250v AC - or 110V AC in the US I assume). Anecdotally, some of these boats also use electric cooking, so they do not to have to carry gas for the cookers, but I didn't find details of these cooking set ups.
Off-topic for this question is the batteries, their storage capacity and current/power availability. Let's just assume there's plenty. (it's an interesting topic, but it's not what I'm asking here).
* I say low voltage, I don't know if 48V counts or not. It's a far cry from 3V inputs in a microcontroller, but equally far from the multi-kV of high voltage systems.


texts:
Does anyone know some ref of high voltage high bandwidth analog multiplexer? I am looking for a mux that can tolerate input voltages up to 10V, but has also a high bandwidth of at least 1Ghz. I am not sure that such component actually exists...

I need a high bandwidth because I want to pass very short pulses, typically between 1 to 10 ns, in the multiplexer.

Follow-up: I just found parts from Analog that look promising: ADG1236 and ADG1213. Both have a 1 GHz bandwidth and can use a power supply of +/-15V. However the bandwidth is given for a load of 50 ohm. Will the bandwidth heavily depend on the load? In that case, what would be the bandwidth for, say, a load of 1 kohm?

Thanks.


texts: Voltage Regulators in Computer Power Supply?

texts: I have a damaged ATX 230WCE power supply unit and wondered if I could find 12V, 5V, and 3.3V Voltage regulators inside. I tried looking in another unknown model psu and only found transistors and diodes which looked like voltage regulators. If I can find voltage regulators, what might the part numbers be? Keep in mind, this is a very old PSU. If I won't be able to find regulator inside them, then how does it have 12v, 5v, -5v, -12v, and 3.3v outputs?


texts: mixed oscillating circuit resonance frequency

texts:
So I have been trying to calculate the oscillating frequency now for a while, but have not been able to. all the textbook examples seem to be either a parallel or series oscillating circuit.
In order to get to the ω i need the complex Resistance of the circuit. This is what I have to far.
The circuits in question are in the other picture.
I am still learning and need an educated help here.
This is kind of a last resort more to ask you guys. I know these kind of questions are not liked, though I am kind of desperate.
Sorry for the german text in them, if people feel required I will redraw the circuits and formula with proper english characterization.
complex resistors for circuit 1/2


texts: Is there a wire (a bus), albeit a very short one, between the CPU and its level-1 cache?

texts:
I was wondering what is the specific connection mechanism between the CPU and its level-1 cache so that in practice level-1 cache access time is reduced to match the CPU clock frequency?

Do level-1 caches avoid connection with the CPU by wires to achieve that speed, or is some other special mechanism in place for that?

Or there is a wire, but it's so short as to have negligible effect on the speed of the signal going through it?


texts: Can LED strips be used as photodetectors?

texts:
As I did not find any photodiode/PD strips available, I am wondering if it would be possible to use LED strips as photodetectors. And if yes, which type of LED strip could be used for that purpose?
My idea would be to detect an object moving between two aligned strips and to determine the objects position. The distance between the two strips would be between a few centimeters and about 100 centimeters. The resolution needed would be about 5-10 centimeters, which is the reason I thought about using LED strips in the first place.
Strip: o----o----o----o----o
Object ->
Strip: o----o----o----o----o
Other suggestions would also be highly appreciated.
Thank you very much!


texts: My product PC board malfunction on moderate temperature

texts:
We have been developing a product to work outdoors.

During the winter months we have had no problems on our product and now in the summer the following problem came up:

Our product charges in a vehicle and we discovered that when the vehicle is outside and the product is charging the pcb resets. Once cooled down the problem is away.

Now all our microchips on the pcb is rated to work at 80 - 85 degrees celcius.

We took out the pcb and tested it again with a hairdryer. Heated up the product resets and the with more heat the pcb shuts down took it to under an aircon and while cooling down it started to work again.

Our PCB has the following circuits on Main Control Microchip IC which communicates with bluetooth chip. Also we have a MP3 decoder chip STA013 which communicates with an amp. Further more we have a lithium Ion charging circuit for the battery.

As all the components are rated for high ambient temperature we get resets of the pcb at around 50 - 60 degrees which is normal in a vehicle as our daily summer temperatures is around 30-40 degrees celcius.

With the scope we picked up that the MP3 and Microchip IC is normal. But on the MUte pin on the op amp we saw a drop once heated

I hope someone can help with this problem.


texts: Simulate bad cell phone reception in the lab

texts:
I'm currently developing an internet of things device that utilizes a uBlox SARA-U260 gsm/3G modem.

In field testing, we have had significant software/firmware issues due to poor cell phone reception in our deployments in sub-saharan Africa.

I'm having a hard time duplicating the problems in the lab because the cell reception here is too good.  Even if there is no antenna plugged into the modem, it is still able to connect to the cell network internet!

So, I'm looking for the best way to thwart my modem into thinking it has bad reception.

One thought I had was to cut the coax cable of the antenna and solder a resistor between the gnd shroud and the center conductor.  Would this work?  What size resistor would make sense? Probably a fairly low-value resistor (say 50 ohm?)

I'm confused about why the modem can still connect even without an antenna.  I thought that during normal operation the modem must short the ground and center conductor when it is transmitting (hence the high current associated with a transmission burst).

Under normal circumstances, is the short locate inside the antenna?  If so, wouldn't the center conductor of the coax always be at ground potential (i.e. during reception)?

EDIT:

Thanks for the replies.  I have a big metal box sitting on my desk ready to mount the DUT (thanks for that acronym @Ali Chen ) tomorrow!


texts: Do I really need a large smoothing capacitor?

texts:
When I design a basic power supply that uses a full wave rectifier, The smoothing capacitor is very large. The output of power supply is 5V and 1A.

The ripple voltage equation is: V = I / (f*C)

f = 100 Hz and I assume that ripple voltage are 10 % (0.5V).

The capacitor value is 20 mF. I think that's too much and the cap is not available practically. I saw many previously designed power supplies and their capacitors ranged from 470 uF to 2200 uF.
What Am I missing?

Thank you very much,


texts: high current passing through mosfet is damaging the nrf52

texts:
simulate this circuit – Schematic created using CircuitLab

recently trying to make a led strip that can be controlled over bluetooth. I need high currents up to 10A. for the test purposes I implemented the circuit above. and instead of leds I used 12 volts halogen capsule bulb, because led strip that draws 10 amps is very long. one of these capsules draws 1.6 amps and I connected 7 of them parallel. when I connected it directly to the power supply, it draws about 10 amps.

but the question is when I connect them to the mosfets drain, mcu instantly get burns. I am using nrf52810 SOC. the interesting thing is I have 2 more channels with the exact same circuit and both works fine. I tried to change bulbs, didn't work. what could be wrong with my circuit.

the light buls are theese

mosfet and bjt documents.

I am doing the test with the 0% duty and 100hz pwm signal. mosfet should be fully conducting.

ps: It works with low currents like 3A.


texts: calculating micro controller power consumption

texts:
I have searched and looked through the data sheet and I can't find the information I am looking for.

I am designing a circuit that uses an ATtiny45-20PU operating at 5V. I will be using three digital (high/low) inputs and driving one output that will draw 22mA when driven high (a PLC relay, APAN3105).

I am trying to figure out how to calculate the power consumption both when the output is low and when the output is high.

The datasheet I am looking at is here: http://www.mouser.com/ds/2/268/Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATti-1065586.pdf

The power consumption when the output is low is important because the power supply is a battery.

The power consumption when the output is high is important so I can chose an appropriately rated voltage regulator.

I do understand that the operating speed chosen during programming will effect power consumption. High speed operation is not critical here as all of the inputs are electromechanical in nature and require a physical (human interface) input, so I plan to use as low of a speed as possible.

I don't want anyone to spoon feed me the answer here. I just need help figuring out how to get to the answer. Is there a more detailed datasheet that I am not finding? I searched the Atmel website and got lost in a web of links for hours and didn't find anything helpful.


texts: What is the correct way to implement heavy-write persistent memory?

texts:
I'm designing a current meter, which should retain the Ampere-hour count during power loss (e.g. power cable is disconnected without regard for first saving the data). The Ampere-hour value could be written every 60 seconds, e.g. +500k writes per year.

I was considering EEPROM, but commonly only support up to 100k writes.
But perhaps by using a 32k memory space, each byte could be cycled 100k times? And using a few seperate bytes for keeping track of the current address, as well as counting every 1k writes or similar, to essentially achieve a small storage with high number of writes?

Another way could be to use volatile memory with a battery, to sustain for at least a few days.

Or, a power-loss detection circuit, and just enough backup power, to allow the MCU to write the current state before shutting down.

Is there a better way?


texts:
I am using the IR2110 drivers and this is the schematic of a half bridge, to obtain the complete H bridge I repeat the same circuit 2 times
I measured the voltage between gate and source of each MOSFET, the low side MOSFETs work fine, the high side MOSFETs do not work, I realized that the Vgs is 12v for a short moment(1 ms) until a capacitor is charged, once the capacitor is shorted between gate and source and therefore the voltage between them is 0, I have no idea why


texts:
I read somewhere that PNP transistors have lower noise than NPN transistors. The majority carriers in NPN are electrons where as in PNP they are holes, so I thought the noise would be much be less in NPN transistors.

Which is correct?


texts: Calculate RC snubber for 240v ac coil relay

texts:
In a project I use several 12v dc coil electromechanical relays. I use diodes in parallel to the coil protect them from flyback.

I also have one relay with an 240v ac coil. I have learned that I should use an RC snubber in parallel to the coil in stead of a diode (I'm new to electronics). I have researched a lot, but I feel unable to transpose most calculations or answers I found on here or the internet to my project (again, I'm a novice). Can anyone help me calculate which type of RC snubber (or which values) I need for my relay?

These are the numbers from the datasheet (marked in yellow):

Is an RC snubber enough for protection?


texts:
Editing question to add details:

The "analog resources" are programmable DACs which I described as voltage sources on the original question. The speed is not critical as the circuit intended to control switches for a DC bench measurement (I can spare 10s of seconds if needed).
The digital outputs don't need to drive "heavy" loads, but digital switches, so the current should be around 1uA or less.
I was very conservative on the original question and I believe the tri-state zone of the switches I need to control is probably around 2.25v to 3v, so anything < 2.2v should be a logic 0 and anything > 3.1v should be a logic 1.
The idea I have in mind is to use a low voltage comparator with voltage dividers at the inputs.

Original question:

I need some suggestions to solve my problem without complications. I have 3 analog resources which can force voltage anywhere from 0 to 5v. I need 4 digital signals which logic 1 is >=3.3v and logic 0 is <= 0.5v.

I cannot use microcontrollers. Only those 3 lines to convert to 16 different binary states. I was thinking an ADC, where 2 resources are used for supplies and the last resource for input, but I don't know if this is doable.

Ideally, if I had another resource then my problem would be solved, but I don't have it and the solution is limited to those 3 analog voltage resources.
Thanks!


texts:
I 'm planning to control a DC motor via certain signals. Motor requires 9 V, 700 mA of voltage approximately. The voltage will be provided by a Ni-Cd battery. However, the signals that are responsible for the control of the motor are the output of a BeagleBoard-xM (1.8 V, 20 mA approximately).

How can I combine the signals with the battery voltage in the circuit I have to construct? I am a begginer in electrical engineering and any suggestion would be appreciated.


texts: Drill batteries for an electric mountain board

texts: I've been searching around for some rechargeable 36V battery packs and I can't seem to find one under $200. I found drill batteries are inexpensive and are 18V with 3AH. On top of that I wouldn't need to buy a charger. I could get 4 18V 3AH batteries for around $70. The only thing I'm worried about is that they might not be able to supply the amperage needed to the motors. They seem pretty powerful considering that the drill motors have pretty high torque. Do you think they can supply the amperage necessary to power the two 36V 190KV motors, or do drills just have a really good gearbox that creates most of the torque?


texts: Difference between E/SP and I/SP and other variants

texts:
First post in Electronics and Robotics... I've been trying to order a DIP PIC off of Microchip (first time going directly off the website) for use with the RFM12, but I dont really know what all the variants are.

I'd like to get http://www.microchipdirect.com/ProductSearch.aspx?keywords=PIC16F873A so that it would fit on a non-solder breadboard. Most confusing is E/SP and I/SP, what's the difference? I couldnt find anything online.

Thanks in advance!


texts:
I'm doing this conversion and I have a problem. I must convert from 0°C to 30°C, and I know that the LM35 bring me 10mv/°C. Therefore, if the temp=30°C, the Vout=0,3V=Vmax. I amplify this output with the LM741 with a gain G=16,7, because like this my Vmax=5V. The output of the OPAMP goes directly to the ADC0804.

My question is: How do I do to show the temperature value in two display BCD 7-seg? What's the combinatorial circuit that I need to build?
I don't know how to pass from binary to BCD and also use only 5 bits to goes from 0 to 32.


texts:
I'm working on a project that involves swapping out a couple of pots of a circuit board for a couple of digital potentiomters. I'm trying to make sure that I'm using the right resistance values, so I'm measuring the resistance of the old pots. These are standard 3-terminal pots. I'm calling the terminals A, WIPER, and B.For the first one, these are the values I'm getting:

A to B: 4.84k

CENTER:
A to WIPER: 1.66k
B to WIPER: 3.55k
            -----
            5.21k

FORWARD DIRECTION:
A to WIPER: 2.333k
B to WIPER: 2.785k
            -----
            5.118k

BACKWARDS DIRECTION:
A to WIPER: 1.00k
B to WIPER: 4.16k
            -----
            5.16k

I had always understood that the resistance from A to WIPER + the resistance from WIPER to B should add up to equal the resistance from A to B, but no matter how many times I measure the A to B resistance is not 5.2k.

Obviously there is something that I'm not understanding correctly. What is it?

Thanks!


texts: Allow current draw only when it is over a certain value

texts:
Is there a way to passively allow the current to flow over a certain amount? i.e., if it is a small parasitic drain, ignore it, but if it is something larger like starting an engine, allow it. Almost a reverse fuse?
I realize this could be done with a microcontroller but I am hoping/looking for something passive + efficient.


texts: Minimum time to write all memory of DDR3 (micron)

texts:
I have a 1GB DDR3 memory from micron. Do you know how to calculate the minimum time to write the entire memory consecutively ?

My problem is to know how to include all timing in the bandwidth calculation (banks/rows activation time, pre-charge, ...)

My DDR3 is clocked at 800Mhz -> MT41K1G8SN-125


texts:
[An antenna must have] current flowing along its length, so that the resulting fields radiate that energy into space. (Receiving antennas are just this process in reverse).

  [This] explains why you can't just stick a small tank circuit on a board and expect it to radiate efficiently.

(source)

I understand this is true from experience, but I don't understand why. I guess the dimension of the antenna changes the fields it produces somehow, but how does this make energy radiate away more effectively? What's an energy radiating away look like?

I do understand the need to tune the antenna. I'm just wondering how after we've tuned for maximal power transfer to the antenna, we get more of that energy to go to the receiving antenna.


texts: Relay parallel to wall switch: Is it safe?

texts:
I am currently working on a home automation project and I have the low power electronics sorted out. My setup requires me to connect a relay to the light which is simple but my design requires me to keep the original switch on the switchboard and importantly it must work alongside the relay. To clear things out, the relay must be able to turn the light on and off but at the same time, if the light is off let's say, turning the switch on must also turn the light on but if lights are on by either relay or switch, the other's state should not affect the light's state. The same logic of an OR gate basically. I don't care about the switch position or anything since the switch is like a failsafe in case the system fails. So if I connect them in parallel, should that do the trick or do I need to do something else?. If yes, is it safe? (Can't stress on this enough)
I am switching lamps on and off and would like to clarify that the wall switches are 2 position switches, the relay is a generic 2 ch relay board and I am not using any components beyond their specified range.


texts: frequency and type of pulse for time domain reflectometer (TDR)

texts:
I would like to apply the time domain reflectometry method in an fpga. However, I could not find information about the frequency and type of pulse used by reflectometer.

Can anyone give me a guide?


texts: Can I use both poles of a DPST relay for double intensity?

texts:
Is it acceptable to solder both poles on each side of a DPST relay so that it becomes a SPST relay with double maximum intensity? The voltage remains the same (230V AC).

I am quite confident that it would work in my case since the relay is already almost good enough: the relay is rated 30A, and I would use it for a 32A (max) appliance. Beside, this appliance doesn't start with a high intensity (soft start), and gets stopped before switching off the relay in normal operations.

But I'd like to know if this is an acceptable practice in the general case. In particular, I don't know if this could cause issues when closing or opening the contacts, since they may not close/open exactly at the same time, could it somehow reduce the relay lifetime or even cause a catastrophic failure? I don't believe over-heating the relay would be possible since the over-intensity time would be very short (the total close/open time is below 10ms).

I'm also interested to know how this would behave in the case the relay fails (at end of life). For example, would this increase fire risks?


texts: I'm in the process of creating a RAM module for a breadboard computer I'm making. The RAM I've decided to use is the AS6C62256A SRAM chip, in 32K x 8. Here's the datasheet: https://www.alliancememory.com/wp-content/uploads/pdf/AS6C62256A.pdf. I'm quite new to this field, and don't have much of an idea on how to access the memory. At first I assumed that I would have to simply set the inverted write line to low in order to write data to the current address, but there must be something wrong with the timing. I've looked at the timing diagrams, but have no idea what they mean. Could anyone give me some step-by-step instructions on how to write data to this chip?


texts:
I keep getting this error again and again and most of the time that is due to a silly mistake. But this time I am unable to find out what wrong I am doing. Please help me to solve this.

And here is the FET


texts:
why this circuit doesn't work? I need this circuit to sense vibration, then after some delay, turn on the piezo beeper, and then after some delay, turn it off.

Q1 is turned on when vibration is detected, and charge up C1 via R1;
after some delay, Q2 will be turned on, and the piezo is beeping;
after awhile C1 is discharged via R2, and Q2 will be off.

C2 is used, so when Q2 is on, it will turn off Q1, preventing Q1 from charging C1.


texts: SR Latch output pin biases state of the logic gate under special circumstance

texts:
I am having a really hard time putting my question in the right words, but I will try my best. So I am working with an MCU (EFM32TG11) that features a bootloader with pin activation. To make the process of booting into the bootloader as autonomous as possible, I thought of a circuit which can set a pin high that determines the boot procedure and remain it high when I perform a software reset. The circuit contains a section that triggers a one shot at power up to initialize the SR latch and the SR latch itself (constructed with two NOR gates) with pull downs on the input pins. Here is my circuit for reference:

Latching the BTL_SIGNAL, which is connected to the activation pin, works actually well by pulsing BTL_ENTER or BTL_EXIT with two other GPIO pins. Now the problem:
When the BTL_SINGAL is latched high and I perform the software reset on my MCU the BTL_SIGNAL falls to a LOW state and I have now idea why. I measured all the nets in the circuit but nothing unexpected occurred as far as I can judge. Disconnecting the transistor from the BTL_EXIT signal did not help. What actually helped was using one of the OPAMPs from an LM358 I had laying around in buffer configuration. I can live with that solution, but I was just curios why this happens... another piece of information: When booted into the application the BTL_SIGNAL pin is actively disabled, when booted into the bootloader it is set to input without pull resistors.


texts: How to measure bipolar analog signal accurately (to 1mV) on raspberry pi

texts:
BACKGROUND

This is my first question on Stack Exchange so apologies for any missteps. I'm currently working on a project measuring tilt outputing an analog signal that ranges from -2V to 2V. But the device I'm using has a precision of up to 1mV. I am looking for a way to measure the analog signals without losing accuracy.

SOLUTIONS I HAVE TRIED

I tried using a resistor divider network as a level shifter. I soon discovered that the capacitor in my ADC chip (MPC3008) pull the voltage down so I added a unity gain buffer using a rail to rai op amp (MCP6281). I connected the ADC as shown on the Adafruit page and using the 3.3V as supply. This solution only works to about 10mV.

I also tried some other various level shifting circuits like the ones suggested here but the op-amp seemed to be affecting the accuracy of the signal by pulling up the voltage.

I only have a unipolar power supply to work with also.

QUESTIONS

Are there any ADCs that take an input range of +/- 2V which are compatible with the Raspberry Pi
Would a chip would more resolution make it better? Although the problem seems to be my analog circuitry
Any suggestions for an accurate level shifting circuit as most of the ADC seem to only take positive inputs
The analog signal comes from a BNC cable. I have found a BNC to Monoplug Adapter and a USB Audio Sound card. Would that do the job?
Lastly, the solution I tried that gave me accurate readings to 10mV had some random fluctuations, when averaged over 30 seconds, it was fine but is there a way to reduce the fluctuations in readings. A capacitor at the input to the ADC perhaps?

Thanks in advance for any suggestions


texts:
I found ENC28J60 Ethernet PHY chip.
The specifications say that the Physical Network Type is '10BASE-T' on the one hand, but on the other hand the data rate is '10 Mbit/s, 100 Mbit/s, 1000 Mbit/s'.

As far as I know, a 10BASE-T chip can not support a data rate of 1Gbit/s !
Moreover, the 10BASE-T doesn't support Full-duplex, but the specifications say that the Communication Mode is 'Full Duplex, Half Duplex'.

Please help me solve this contradiction.


texts:
The below is the circuit in question using LTSpice XVII(x64) (17.0.21.0)

The two sources have the exact same sine wave, just with different DC offsets. One with a DC offset of 5V, the other with 0V.
So, when you subtract, or measure the voltage between Vcc and Vref, you should get a perfect DC value. And we do. But, when you measure the voltage between Vdiv and Vref, it has some AC signal.
I'm going to assume there is a setting or a way LTspice functions that I don't know about.
Here is the output measuring the voltage between Vcc and Vref. A perfect 5V DC

Here is the output measuring the voltage between Vdiv and Vref.


texts: Do I have adequate crosstalk and ground loop preventions in place?

texts:
I'm moving away from project boards for the first time and was looking to get a bit of feedback before I send my PCB design into production. I'll preface this by saying that the design itself has been prototyped and is working, and that portions of the design came from the assembler games forums, though I've made some additions and tweaks.

Anyways, I'm building a Dreamcast RGBs and 480i/480p switcher for myself and a few friends who're interested in one. I'm pretty happy with its current state and I just need to ask a couple of questions before it's finalised.

Images of the PCB Design Option 1 (One Ground Plane)

Images of PCB Option 2 (Two Ground Planes)

My PCB is has two layers and the bottom layer of it is a solid dedicated ground plane. I'm fairly certain it's adequate, though I want to be sure. I've not dealt with using planes before.

The top layer of the PCB contains all of the traces and components. My R, G, B and Left and Right audio lines are fairly sensitive, given analogue video and analogue unbalanced audio. I've spaced the traces generously (upwards of 15 times the traces width in some spots for video signals) but the top of my PCB currently has no copper fill. Will not having the spaces between my analogue traces filled or via shielded lead to interference concerns? I've also heard of boards becoming warped if one side is filled and the other isn't. Is this true?

Off-topic, but for my decoupling capacitors I have three vias on each ground pad going to the ground plane. I was reading a Texas Instruments document that mentioned to do this. Given that inductance is reduced in parallel, is this a good design choice?

Lastly, if I did fill the top layer, the video and audio traces run along the length of the board (my spacing is to minimize cross-talk and parasitic capacitance, due to running these traces in parallel) and the video traces each have a 220µF capacitor in series. The combination of the spaces between the capacitors and the parallel traces would create ground loops and I'm unsure of a way around it. Given my spacing I'm unsure of whether or not I would see a large benefit of having a ground plane on the top layer. Any pointers are appreciated.

In case it matters, Vsync is at 60Hz, while Hsync will be at either 15.75kHz or 31kHz, depending on the SPDT switch position. I don't believe the audio lines will exceed 44.1kHz and RGB lines should peak at around 14Mhz. It's a low frequency circuit, overall. My power and ground traces are 20 mils and data lines are 10 mils. I don't expect current much over 50mA - 100mA. My +5V source is from the multi out on the Dreamcast which itself comes from the power supply 5V rail.

That was a lot. Thanks to anybody who read that and has suggestions.


texts: Why does the capacitor need to be small in RC filter circuits?

texts:
Hi there, in this example, it mentions that "One should choose R2 to be as close to 100kohm (to make the C2 small)".

My question is: what are the reasons for C2 to be small? Other than the fact that R2 needs to be large enough so that there's no loading effect.

Does it have anything to do with ESL and/or ESR?


texts: Measuring and Replicating Electrical Codes from heating controller

texts:
I'm wondering if the fantastic electronic engineering community can assist with a little project I'm attempting. I have a Rinnai tankless hot water heater that is controlled via a hot water controller (2 wires running to it, low voltage), such as the one shown here. I'm wondering what the best course of action would be to be able to measure the signals being sent from the controller to the heater, and replicate them. For example, I'd like to develop a web interface from which I can control the hot water heater, and when a button is clicked on the interface, a corresponding signal (which I measured previously) will be sent to the heater.

I know it's not a lot of information, but I'm wondering if anyone could point me in the right direction.


texts: Give a second life to a 18650 battery cell, which has 0.1 V?

texts:
I have a 7.4V battery pack consisting of 2 x 18650 cells.

One of them has 3.4 V, so I tried to charge it with a good old TP4056 board, and it worked:

The second 18650 cell seems nearly dead with ~ 0.1V. When I connect the TP4056 charging board, it doesn't seem to charge (blue light: full).

Is there a way to give an initial "boost" to a dying 18650 cell, to bring it to 2.5 V, so that eventually a TP4056 charging board will recover it?


texts:
I am trying to understand why the calculating the last delay is \$max(t,mt)+2t\$. I suppose thats derived from \$max(max(t,mt), t)+t\$? But how do you extract the \$t\$ from \$max(..., t)\$ out.

UPDATE

I also dont get the next part ...

whats m? and how is \$S_i=max(t,mt)+t\$ and \$C_{i+1}=max(t,mt)+2t\$ simplified to \$2t\$ and \$3t\$ respectively?


texts: How can I find out basic information about what an IC does, if it isn't clear by context and google doesn't reveal anything useful?

texts:
For example, I found a Sony CXM4015R. When googling I couldn't find any information or datasheets on it, but at least I would like to know its basic function. The only (unreliable) hint I found was that on one site it is called a 'Sony Pro Audio CXM4015R', so it probably does something with audio.

Are there any there any tips for searching for or are there any lesser known sources where I can find more about random ICs?


texts:
I've got a  TCMT1102 Vishay optocoupler. Its a 4-pin SMD part but there is no standard package type associated on the datasheet - i.e SOP, SSOP, TSSOP etc. Vishay has a footprint document that describes this footprint as a "SOP-4 miniflat" according to the dimensions. Based on the footprint doc I assumed its a SOP-4. But when looking at the IPC-7351 standard, section 9 there is no description for a "SOP-4." The lowest SOP pin count is SOP-8. And when referencing this package classifications document there is no description for a SOP-4, SSOP-4, or TSOP-4.
Additionally, the linked CAD Model for the TCMT1102 Digikey page is not in alignment with the datasheets dimensions.
Is SOP-4 a non-standard footprint? Where can I get this footprint?


texts: This is a question about squirrel-cage induction machine theory

texts:
When operating as a motor, the stator rotating field induces voltages (and hence currents) in the rotor windings and makes it spin (hence the rotor produces a torque).

When operating as a generator I rotate the rotor faster than the stator rotating field. this should induce in the stator windings some voltage, but how if it was connected to the voltages that are generating the rotating field? how do I ''get'' from the generator the output current/voltage?

I need the stator rotating field to have currents on the rotor, so I haven't turned it off... what happens? Do I have extra windings with no potential in the stator?

basic induction motor:


texts: How to direct input and output of circuit for multifunctional 4 bit calculator

texts:
I am trying to build a 4 bit calculator that can add subtract and multiply using a FPGA board (Altera DE2).  I have an adder/subtractor and multiplier already built and functioning but need to know how I can merge each function and give an output based on user input.
For each module:

there will be 8 inputs (X0-X3,Y0-Y3) which represent the two numbers used for the calculations
the adder/subtrator has an additional input to select the function (add or sub)
The multiplier has an additional input to reset the clock that is used for the counter that shifts the bits
the multiplier has 8 outputs (A-H) that are fed into the
The add/sub has 7 outputs for the sign display for results that are negative
The add/sub has 5 outputs
all outputs except the sign display are fed into an already functioning 7 segment BCD display

How do I connect the 2 modules in a way that only the selected module gets the input and the output from only the selected module goes to BCD display?

I have included a start to my schematic with the display attached to their respective output ports.


texts: Circuit to switch negative to negative, or positive to positive connection

texts:
I am wondering if there is a negative to negative (and/or positive to positive) switch.  I know mechanical relays work, but I need an electronic way of doing it.  Is there a transistor that functions as such? or any other semiconductors?

Edit

I have 2 batteries, 12V  (both the same), similar to the link below.  They are connected in parallel.  I need to switch the positive and negative connections of the batteries, to break the connection. I would like to have these switched controlled by a micro-controller and for it to be electronic.

Any help is appreciated and thanks!

https://www.amazon.com/Power-Sonic-PS-1290-Rechargeable-Battery-Terminals/dp/B002L6R130/


texts: Getting glitches on GPIO using a MOSFET as a logic level converter

texts:
I need to connect an Event Detection pin (pin of the NXP NTAG 5 component) to a GPIO of the NXP i.XM6 processor.
The problem is that the NTAG 5 pin has a logic level of 5V and the GPIO has a logic level of 1.8V.
So I used this N-Channel MOSFET to drive the i.MX6 GPIO.

But now the problem is that every time the ED PIN changes state, I get glitches on the GPIO.
How can I solve that?
Thanks!
EDIT 1:
The ED pin changes from 1 to 0 when an NFC field is detected by the NTAG 5 component. This pin is thus connected to GPIO1_18 of the i.MX6 whose job is to detect the rising edges (not the falling edges because the MOSFET inverts the output voltage).
By glitches I mean that instead of detecting a single rising edge, I detect several dozen each time an NFC field is detected.
EDIT 2:
From 5.1 Example 4 - NFC Field Detect part of this document, the oscilloscope screenshot shows that the ED pin only goes to 0 once while the NFC field is detected.
EDIT 3:
The ED pin is an open drain, so we just have to connect it directly to the GPIO1_18 pin, keeping the 1.8V pullup.
So here is my new, simpler schematic:

Please understand that the i.MX6 processor and the pullup resistor are elements of a product on which the less modifications are made, the better.


texts: Proper way to wait N cycles in ARM Cortex-M4

texts:
After enabling a clock for a certain port you have to wait 4 cycles for the clock to finish initializing. How can one wait for N cycles the proper way?

In my code I used this:

__asm("nop");
__asm("nop");
__asm("nop");
__asm("nop");

After which uKeil IDE seem to stop complaining.


texts:
I've a question about how are made batteries connector of smartphones. I've tried to find images of an opened battery, but with no result.  In particular this image:

This connector is a module? How it's soldered internally?

Also, It can be a pcb attached to plastic with gold plated pads?(or in case of no, it's possible to do something like this or will result unreliable contacts?)

EDIT:
I mean gold pads on PCB and not on plastic.


texts:
I would like to trigger the output of a sound card such that the device starts playing at a precise moment in time.

Normally the sound card attached to your pc will start playing after it receives a software trigger from the operating system. When the user clicks play, there is some delay before the sound card starts its output. This delay is not the same every time, and it depends upon what the operating system is doing when the user attempts to start playback.

I would like to remove this irreproducible latency, such that the sound card will start at a known time, provided by a electronic trigger from an external device. (The external device would provide a TTL digital signal, and I would like to trigger on the rising or lowering edge.)

Does anyone know how to achieve this with any commercially available sound card?

Thanks,
labjunky


texts:
I'm designing my own home automation gateway and I've already added a rs485 transceiver, everything is fine, but I'm thinking about adding also a CAN bus transceiver because I've seen that it's often used in long communication buses and many embedded electronics devices supports it.
My question is about this bus...it can be a good idea to integrate it? It will replace the RS485 in the years? It's a good equivalent replacement in term of reliability?


texts:
So, I bought my first soldering iron. (I used trafo until now..) It was pretty cheap, wasn't expecting much from it. Wanted to try it out, but the tip turned black. (Picture included, sorry for the quality.) I used Flux before trying to get a bit of tin on the tip, but the tin just wouldn't stick! Instead, it melted and fell off.
I have replaceable tips, I somehow knew I'm going to mess it up. But I don't want to make the same mistake. Any help?


texts: I want to learn enough image and video processing to execute a project idea, pointers?

texts:
First of all, I am a total newbie to image processing. I have a project idea, part of which will involve doing the following:
I have a white board and a camera (a normal webcam by z-star). I will draw a shape on the white board. The camera will capture the video and process it to identify the shape I have drawn. To keep it simple, the shapes that can be identified using by the program will be limited.
I want to execute this idea and will learn anything that is required to make it happen. I want to get started in image processing, but just enough so I can execute this for now. Will incrementally study more. Can you give me any pointers on where to get started?


texts: Will this computer case fan power a lightbulb?

texts:
I'm attempting to help my daughter build a wind generation model for her science fair. I've found some prebuilt kits but the shipping is more than the product. Doing some research it seems she can build her own using a DC motor. A brushless DC motor seems like the best option. This Insignia 80mm PC Case Cooling Fan looks like it would work for the project.

Question is, will this produce enough to light a small LED bulb? I'm not entirely sure how to figure that part out.

If this is too broad or of-topic please let me know.


texts: Why can't I get a resistance reading on my temperature probe?

texts:
I'm a complete beginner to electrical engineering, so I think I might be doing something stupid here.  I have a set of grill temperature probes I ordered from Amazon.  I am trying to find out the resistance of these probes using this tutorial from adafruit.

I don't want to cut the connector off of the end, so I am trying to measure the resistance of the probes by clipping alligator clips between the two sections of the connector and my multimeter probes.

No matter what Ohm range I have my multimeter set to (600, 6k, 60k, 600k, etc.), it only ever displays "0.L".  Am I doing something wrong?


texts:
I have two questions in one:

I have collected some schematic from datasheet from manufacturer of chip. Inside the datasheet there are the following circuit shown below.

1./ The manufacturer don't provide the BOM, so I don't have part number for all those small passive components. How to decide which one to use in terms of tolerance, X5R/X7R, Voltage, package ?

2./ On some schematic there are some polarized capacit, typically some round cylinder space consumming. By what type of SMD can I replace those big cylinder to make the circuit smaller ?

While answering this question, please explain it so I can understand what logical methodology you are using


texts: microSD card, how many times can I write the same sector?

texts:
I'm using a microSD card in an embedded system which use a microcontroller interfacing with the microSD card using SPI.
I do raw data write, without a file system. Every time that I want to store data, I write an entire block of 512 bytes. I write for example, one 512 byte packet to the sector each 10 minutes.
I would like to know how many times I can write the same sector.
I won't use always the same sector to store data, I'll use around 300 sectors to store the data, writing one entire sector per data packet write, being the sector number incremented sequentially. Let supose I have a sector range from 0 to 299 to store the data, when I write for the first time the sector 0 will be written, then sector 1, 2, 3 and so on until it reaches the write to the sector 299, then the next write will be at sector 0 and the cycle (sector 0~299) starts again. I'll do this way because the only data that matters for me will be on the last sector written, and I'll use a incremental 32 bit (4 byte) number to identify what was the last sector written (which will be stored together in the sector).
I'm going to use this technique but anyway I need to know what is the minimum endurance of a sector, that is, I need to know how many times I can write the same sector entirely (at the minimum). I'm understanding that the minimum number of sector writes that I can do with security will be 300 x 'the sector endurance'.
I know there are consumer and industrial cards. Consumer cards use TLC cells, and industrial uses MLC and SLC cells. I plan to use a commercial one due to the cost per product. According the Kingston document below, the number I'm searching is 500, but for me it sounds too small, because on many forums people say that the endurance is 10.000 write cycles at minimum. Somebody know  what should be the correct minimum number of times that I can write the same sector number entirely?
---> According to this file from Kingston, on page 3:
For Multi-Level Cell (MLC) Flash, up to 3000 write cycles per physical sector based on current lithography process (19nm and 20nm) at the time of this writing. For Single-Level Cell (SLC) Flash, up to 30,000 write cycles per physical sector. For Triple-level Cell (TLC), up to 500 write cycles per physical sector. Lithography of the Flash. Memory Die plays a key role in cell endurance and decreases as the size of the die gets smaller
https://media.kingston.com/pdfs/MKF_283.1_Flash_Memory_Guide_EN.pdf
---> People saying 10.000, 100.000 write cycles
https://superuser.com/questions/159602/max-read-writes-to-an-sd-card
https://www.raspberrypi.org/forums/viewtopic.php?t=21281
EDIT1:
I'm using Hex Workshop software to check the content of each sector of the card, in the picture below I stored 1,2,3,4 + 508 bytes with value 0 to the sector 1 (and I'm able to write the same sector again with new values without using any erase operation in my code), BUT I don't know if that's the physical or logical sector that's being shown on the software...
I would like to know how can I store data to the SD card without a file system (writing the way I'm doing with the MCU), in a manner that I can write many many times on the card, for example, around a million times or more. Or the best way to achieve this is by using a file system (supposing I use only one file and always overwriting it)?

Regards.


texts: How can it be determined if two cells of equal voltage are connected in parallel?

texts:
I have an alternator that always charges a car battery, which rests at 12.5V, but sometimes is connected via a latching relay to a large LiFePO4 battery for charging purposes.

In case of system failure, it would be nice to know whether the relay is open or closed. This could easily be achieved by simply measuring the voltage of the two batteries. If they're almost equal, they're connected.

But when the large battery is drained, the voltage may drop from resting voltage of 13.0V to 12.5V. Thus the two batteries have equal voltage, and it cannot be determined by this method whether the relay is open or closed.

Is there another way to determine this?

Ideas:

One way could be to induce a load on the car battery side, which would cause a change in voltage, but maybe there's a better way?
Another way could be to place the latching relay on the ground side, but this would prevent monitoring the car battery voltage. Also, in this specific situation, there must be common ground (chassis, to reduce cabling requirements).

simulate this circuit – Schematic created using CircuitLab


texts:
I have been asked to select a replacement BJT for a resonant circuit which uses the now obsolete BUV27.

I have selected some based on V(CE) and hFE but all selected types perform a lot worse (low efficiency, more heat) in the circuit.
The t(on) time of the BUV27 is very high (400-800µs) compared to the storage/turn-off times (0.5µs/0.12 µs). Why is this so?

How would I go about finding a replacement? Most datasheets I have looked at don't even specify the turn-on time and if they do it is a lot faster.


texts:
I have a small problem. I want to design a "multiple differential amplifier". With this, I mean a circuit that, given the inputs and outputs:

simulate this circuit – Schematic created using CircuitLab

So, it has four inputs and four outputs; each output has the difference between the corresponding input and the next one.

All inputs are "ordered" as voltage, and the power supply of the circuit is greater than Vi1 (the greatest of the four).

The application is for a battery monitor. The battery is composed by four cells in series, and I have to have the voltages of each cell in order to sample and compare it.

The k factor can be fixed to 1 or to 0.5 if it is better for the calculations, but if there is the possibility to change it in order to better fit the next calculations it is better. In any case, I prefer having a k value not greater than 1.

At present the only solution that comes to my mind is to have four differential op amps (even the last one needs to have a differential one since the gain should be 1 or less). This leads to 4 op-amps and 16 resistors. Is there any circuit which uses less components?

Thank you


texts:
I have ONE Boston Acoustics Micro90X Speaker (for 15-125 watt amps), and a Topping VX1 2x25W Class T Amplifier (notionally 2 x 25 watts) that I don't currently use.

I thought both of these gave terrific performance for the price when I had two of the speakers (plus a decent subwoofer) in my hifi STEREO system. The amp was actually a little underpowered, but sound quality at non-ear-splitting volumes was way better than I'd have expected.

What I'd really like to do now is drive that speaker as a MONO system. I don't know much about electronics, but I found this in an article titled The Mighty T-Amp: You’ll Be Blown Away...

  Being BTL [bridge-tied load], these amps have some other interesting characteristics, including the ability to output a mono audio output from a stereo input by simply connecting the load from the + terminal of one channel and the – terminal of the other.

Can it really be that easy? I guess all I'm really asking for here is someone who sounds like they know what they're talking about to say Yes!, and give me the confidence to give it a go. Also to reassure me there's no significant fire risk (I'd shed a tear if my Brave Little Amplifier simply died, but I wouldn't want to go down with it! :)


texts: Why is it recommended to not use a device while charging? How does it harm the battery or the device?

texts:
I was planning on getting the new VR headset from Oculus, dubbed Oculus GO.

The battery life of that thing is roughly 3 hours max. So, during long VR sessions, powering the headset via a power bank seems to be a great solution, but many people were against this method.

According to them, it is not recommended and it simply degrades the battery's life. So I have some few questions:

Q: Why is charging and using the device at the same time considered to be bad for the device?

Q: How is a battery affected by this method?

Q: Why haven't we developed a battery that can remain unaffected while using it during charging?

Q: What is the factor that gives a battery this demerit?


texts: Zero crossing detector using 311 comparator

texts: Is the explanation correct? The output on positive voltage should be high and on negative voltage it should be low.


texts: What's the thermal time constant/capacitance of a 1/4W resistor?

texts:
I can't find it anywhere, what is the thermal time constant or thermal capacitance of a standard discrete 1/2W resistor?

A table with other resistors of different power ratings would be nice, too.


texts: Find fundamental period of a discrete-time signal

texts:
I have the following discrete-time signal:
$$x[n] = \cos(\frac{\pi}{2}n)\cos({\frac{\pi}{4}n}), \quad n\in\mathbb{Z},$$
By looking at it, I'd say that the time period of the signal \$x[n]\$ is \$\frac{2\pi}{\frac{\pi}{4}}= 8\$, since the smaller sub-period is \$\frac{\pi}{4}\$. However, is there a more rigorous way to prove this?


texts:
I'm building a robot that needs a lot of small hobby motors (or similar) to operate in sync. I was looking for ways to have as many of them controlled by a single source of truth as I am not sure I can sync multiple sources well enough. The motors will need to spin at variable speeds, individually from each other.
I was looking for a way to get the data up to the motors and I remembered about WS2811 chips. Could I possibly use them (without LEDS) as a way to transmit data to daisy chained motors? Looking at the datasheet for the chip it seems it should be able to support 5v outputs. I could also maybe put a transistor in there to avoid the full power going through the chip.
At the same time, thinking about it, it sounds like a crazy idea and I do not know enough about motors to figure out if it would be possible. I could really use help understanding where I'm wrong and how can I learn more, and maybe what a proper solution would be.
Thanks!


texts: Do chargers use power when they're not charging?

texts:
1) If I connect my mobile charger to a wall socket and it is switched on, but I don't connect my mobile to the charger, does the charger still use electricity?

2) If I connect an extension box to a wall socket and connect my mobile charger to my extension box, but again I don't connect my mobile to the charger, does the charger still use electricity?

I want to make sure my electricity bill is not going up.


texts: Can't run code in Keil for STM32L433RCT6P on NUCLEO-L433RC-P

texts:
Recently at Embedded World 2018 in Nuremberg I got, for free, NUCLEO-L433RC-P with STM32L433RCT6P chip onboard. I want to broaden my knowledge in STM32 chips. Before, I did simple stuf on STM32F4.

All the jumpers on the board are placed correctly.

I opened STMcubeMX, selected the NUCLEO-L433RC-P board from board selection and used all the default settings for it. I also did a version with selecting the STM32L433RCTxP chip directly, not the board, and setting everything manualy. My end goal was to blink a LED.

I folowed this tutorial only for guidance, did not change RCC or SYS or anything like that: https://www.youtube.com/watch?v=BJdXR0Al6os

This is where problems began. After generating code and opening Keil I got the update window and updated everything for STM32L433RCT6P. Under boards there was no NUCLEO-L433RC-P to be found or updated. After closing that window this appeared (I tried and tried again while going through all the options):

At this point I just tried writing code an seeing what would happen. I have checked everithing in options for targer and compiled everything. After clicking the Download button if got the same thing for both scenarios:

What am I to do to fix this?

Versions: Keil V5.24.2.0, STM32CubeMX 4.24.0


texts: Output resistance of non-inverting amplifier

texts:
I'm reading a book*, and it derives the output resistance of a non-inverting op-amp amplifier by grounding the input voltage, applying a test current source at the output, and measuring the resulting output voltage:

Here L is the loop gain (i.e. open-loop gain a x feedback gain b).

Here's my take on finding the output resistance, which gives a different answer. We can think of the closed-loop amplifier as a black box, as shown below.

We can measure the output resistance R_o by shorting the output and measuring the current that flows through. The resistance is then:

$$
R_o = \frac{Av_i}{i_{o,\text{short}}} \approx \frac{v_i}{bi_{o,\text{short}}}
$$

Where I have used A = 1/b, with b being the feedback gain.

If we short the output of the actual circuit (with v_I included), we have:
$$
i_{o,\text{short}}=\frac{av_D}{r_o} = \frac{av_I}{(1+L)r_o}
$$

(Note that \$R_1\$ and \$R_2\$ appear in series with each other and in parrallel with the short, and therefore do not affect the output current).

Then:

$$
R_o = \frac{(1+L)r_0}{ab} = \frac{1+L}{L}r_o \approx r_o
$$

*"Design with Operational Amplifiers and Analog Integrated Circuits", by Sergio Franco.


texts: I am working on a lab in school with a common source JFET amplifier, and I needed to express \$v_{out}\$ in terms of time domain. If \$f\$ is the frequency and \$T\$ is the period, then I need $$v_{L}(t)=V_{m}\sin(2\pi f T \pm \theta)$$ Now this is just a concept question, when I plug in the numbers for the frequency and multiply that by 360, then multiply that by the period what is the next step? I think you evaluate; put into the calculator '\$\sin(x)\$' (whatever \$x\$ is) and then multiply that answer by \$V_{m}\$ or peak to peak of the system \$v_{out}\$. Don't worry about if I am at mid band or high frequency I just need to verify if what I am doing is right cause my numbers are iffy.


texts: Can I use a transistor to switch to battery backup power when main power goes out?

texts:
I am putting together a circuitry, and I want the circuit to continue running even after main power goes out. So I was thinking about this idea of using a PNP transistor and a one-way diode to possibly wire up a 9V battery backup. My idea looks like this:

Basically: When the main power goes out: The PNP transistor (Q1) loses power on the base line: Making it close the emitter. So the battery is now connected to the circuit. While Q1 and Q2 closes, Q3 opens so that GND is closed of to make sure the electricity flows back into the cathode of the battery.

When power is restored: Q1 and Q2 opens to isolate the battery, and Q3 closes back up to connect GND again.

I have also connected a Capacitor (C1) to prevent a bigger fluctuation during the switch-over.

The problem is is that I am not very familiar with electricity, so I am a little terrified to plug this thing in and break something. Is there anything I need to be aware of, or will this not work as I expect it to at all? And when I plug the power source back in: Is there a danger it will overload, or damage the battery during transition?


texts: Will diagonal PCB traces affect a sensitive CPU circuit?

texts:
I am trying to design a Z80 Computer Boards from scratch, just relying on the Z80 datasheet and some assembly language tutorials (I have no experience with the Z80 and never used them before but I am learning computer engineering with it), I used an NMOS Z80 on a breadboard with pretty low operating frequency which result in unwanted reactions, after asking on another SE site I identified the problem, here is the other question if you want to see it.
So I have been designing a mother board and some cards to Home make those PCBs, yet it is the first time for me to design sensitive card circuit which should avoid any distortions that could affect the CPU (I am an Electronics hobbyist and learner at school so I don't have much experience in sensitive designing stuff), I tried to have smooth circular edges so that no radiations are emitted from my circuit but My question is: will those diagonal lines in my circuit affect the sensitivity of this circuit? plus is there anything I am missing in my design? (adding a ground plate is quite impossible for me)

Here is my design
Shall I consider anything else in my design? I am actually willing to operate the Z80 at maybe 2 MHz or up to 10MHz if I replaced my CPU and I want my PCB to be ready for that, I actually have a limitations as I will manufacture it at Home, which is traces width shall not be smaller than 0.5mm and I shall have a clearance of at least 0.45 mm so I could refine the manufacturing if anything went wrong. Please if you have suggestions about it please tell me.
Thanks in advance.


texts: What limits the number of buses, devices and functions on a PCI bus?

texts:
I am learning the PCI/PCIe bus. I learned that:

A PCI hierarchy can support at most 256 buses.
A PCI bus can support at most 32 devices.
A PCI device can have at most 8 functions.

I checked the Configuration Header Type 0.

There's a Device ID field which spans 2 bytes. 2^16 is much greater than 256.

So where do the 256, 32 and 8 restrictions come from?


texts: Suppose I have a 3w amplifier and two 1w maximum rated speakers, what would happen If I play some music?


texts: Does it make sense to buy usb 3.0 sd card readers?

texts:
I recently bought a USB 3.0 microSD card reader for a couple of dollars of eBay but haven't quite tested it out. It works only on smaller cards (up to 4GB) which is bad, but not the question.
My question is:

If the circuitry in an SD card reader acts as a serial to serial converter (I'm guessing SDIO or SPI to USB), does the USB interface make a difference in speed?
Does it make sense to buy a USB 3.0 card reader, or will it result in same speeds due to other circuitry limitations?

I will try it out, however, I am interested in a theoretical answer.


texts: Crystal oscillator ECS-2520MV connection

texts:
First time connecting this type of oscillator and need some help as too how to connect it. The oscillator I will be using is the https://ecsxtal.com/store/pdf/ECS-2520MV.pdf
Does this seem correct to you?

Edit after receiving guidance from answers
So now I seem to understand a bit better now and this is what I have come up with. Since the component does not require ceramic capacitors and only one output with the tri state to make active. This is it?


texts: Why does this led driver label acl and acn opposite?

texts:
I purchased this led light and it has a driver. But the label for load and neutral are opposite of what I would expect. Note that it says ACL (line) white and ACN (neutral) black.

What am I missing here?


texts: How to Ground DC 12V Battery, Charge Controller and Solar Panel?

texts:
In my shed, i've got a 12V 120AH leisure battery and 30A MPPT solar charge controller, on the shed roof there are three 100w 12V solar panels.

I wonder if I need to ground any of those?
If yes what is the best way of doing it? There is no way to connect to house earth cable and there is no metal parts outside of the shed.


texts: Modifiying SparkFun Uh-Oh Batt. Indicator - TL431 Regulator Diode Based

texts:
I'm trying to modify a simple SparkFun Uh-Oh Battery Level Indicator - KIT - 11087 https://www.sparkfun.com/products/11087

It can handle a maximum voltage of 12 or so volts, above that I believe it would burn out. I need to use it with a battery pack that has a nominal voltage of 19.2 V (made up of 16 NiMh cells). It has to act as a low battery indicator in the 17 or 18 V range.

I'm far from being an expert in electronics, so I've been trying to understand the basics of this simple circuit, but I can't clearly see how I could modify it.

Here is the schematic for the batt. level ind.:

http://cdn.sparkfun.com/datasheets/Kits/UhOh-v11_corrected.pdf

Please ask for clarification if needed!

BTW, if I can sort this out, I need to make about 100 of these higher voltage versions.


texts:
I am designing a tool to be used for in-house product testing & development, part of the tool is a "probe" that is inserted between the end of an AA battery and the end of its holder (effectively a protrusion from one side of the PCB with copper top and bottom). The free space in these holders necessitates a thin PCB (I was thinking 0.8mm). I am concerned that since this tool will be handled a bit flexing of the PCB could cause bad solder joints or damage to tracks.

What would the best way of preventing this kind of damage, on a 0.8mm board do I need to be concerned about this kind of damage, my largest part is probably going to be an MSOP10.

My current thoughts on solutions are.

Just glue the PCB to some kind of backing, this seems a bit of a dodgy solution
Find a case of some variety, not much readily available in the form factor I am after and this is a small 1 off job.
Use a screening can of similar size as a mechanical element, seems a reasonable solution but I have not used these components before and am not sure on their mechanical robustness.
Solder bits of heavy wire along the edges of the board, once again seems a bit dodgy and not at all professional.

I believe most of these options would work but was hoping for some real world experience to point me in the right direction.


texts: How does the fuzz face guitar pedal actually output any gain to the input signal?

texts:
I'm referring this this circuit right here:

I do not understand why the circuit would be designed like this and why the output wouldn't be drawn from the collector of Q2. I have 2 questions, which are interrelated.

What is the purpose of the 330 ohm resistor? I've never come across something like this in audio stages
If the output is being drawn from the potential divider circuit formed by the 330ohm resistor and 8K2 resistor, wouldn't the resulting signal output voltage range be very small (with a large DC voltage) since it is quite close (in terms of impedance) to the power rail?


texts: sublw carry bit: Microchip PIC16C instruction set "two's complement method"

texts:
As is well known, the Microchip PIC parts implement subtraction by the "2’s complement method", generating a carry bit when the sum of (the first parameter, and the two's complement of the other parameter) generates a carry.

So mostly, if the answer is a "positive number", there is a carry bit.
And you get a carry bit from

movlw 33
sublw 33

because 33 + 223 = 256.

What do you get if you subtract zero from zero?

movlw 0
sublw 0  '0 + 0 = 0, suggesting c=0.
         'unless someone is right, in which case c=1

Two's complement of zero is zero, add zero is zero, carry is zero. But the code I'm seeing, and some advice I'm receiving, is otherwise. This is very confusing for me.

And if you subtract zero from anything?

movlw 0
sublw 33  '33 + 0 = 33, suggesting c=0
         'unless someone else is right, in which case c=1

These cases aren't demonstrated in the documentation I have.

Is this a "special" Microchip implementation of 2's complement subtraction? Or is this normal? Please point me to any general documentation of the math method, and/or any Microchip documentation.

ps: PIC16C parts are just like PIC16F parts - only the hardware is different