texts: How can I get these two boards to be powered by the same source?

texts:
I'll try to set this up neatly;
Components:

[BAT] 3.7V Lithium Battery (freshly charged to 4.2V, capacity is almost 10Ah)
[AMP] LM386 Based 200 Gain Audio Amplifier (input is 5~12V, schematic)
[VUP] Voltage Boost Converter (amazon link, datasheet for a similar board)
[BLT] Bluetooth Audio Board Thing (input is 3.7V, sourced from some random cheap chinese earbuds, can't find the board or a schematic anywhere)

Colorful diagram thingy of setup:

As you can see, the battery is wired to the input terminals of the voltage booster [VUP], and also to the bluetooth board [BLT]'s power inputs. The voltage booster [VUP] is set to output 12V, and is wired to the amplifier [AMP]. The audio output of the bluetooth board [BLT] is wired to the audio inputs on the amplifier [AMP].
This results in an amplified audio signal on the unwired terminals on the amplifier [AMP].
The Problem:
When both [AMP] and [BLT] are on the same source –– [BAT] ––– the bluetooth board [BLT] gets really hot, has pairing problems, and/or powers on and off and restarts (I haven't yet gotten any audio playing at all through the full setup).
I've tested them in every other scenario where they aren't on the same battery, and they work PERFECTLY fine, even together.
Some modifications to the setup I've tried testing that work:

Take out [BLT] entirely, and just wire a 3.5mm jack to [AMP]'s audio inputs, and plug the jack into something. (no bluetooth, but amplified)
Take out [AMP] (and/or [VUP]) entirely, and connect test speakers to [BLT]'s audio output instead of [AMP]'s. (bluetooth, but not amplified)
Disconnect [VUP] and [AMP] from the 3.7V [BAT], and connect it to a separate spare 9V battery, so that the power sources of [BLT] and [AMP] are completely separate (bluetooth AND amplified, but it needs two batteries instead of one)

Solution?:
Do I have to somehow "split" the power coming from the battery into two distinct sources? How would I go about doing this?
Thanks.


texts:
I need to connect real time clock DS3231 to STM32F103C8T6 microcontroller. I connected DS3231 SCL pin to STM32 PB6 pin and SDA pin to PB7. The program code compile was successful, but DS3231 made no reaction. I also tried PB8 and PB9 pins, PB11 and PB10 pins. I can't figure out why DS3231 doesn't make any response. I think I use wrong pins. I was searching libraries and documentations for default pins, but I did not find anything. I'm programming via Arduino IDE. I use this code example:

#include "Arduino.h"
#include "Wire.h"
#include "uRTCLib.h"

// uRTCLib rtc;
uRTCLib rtc(0x68, 0x57);

unsigned int pos;

void setup() {
delay (2000);
    Serial.begin(9600);
    Serial.println("Serial OK");
    //  Max position: 32767

    #ifdef ARDUINO_ARCH_ESP8266
        Wire.begin(0, 2); // D3 and D4 on ESP8266
    #else
        Wire.begin();
    #endif

    #ifdef _VARIANT_ARDUINO_STM32_
        Serial.println("Board: STM32");
    #else
        Serial.println("Board: Other");
    #endif
#ifdef ARDUINO_ARCH_AVR
    int inttmp = 32123;
#else
    // too logng for AVR 16 bits!
    int inttmp = 24543557;
#endif
    float floattmp = 3.1416;
    char chartmp = 'A';

    // Testing template
    if (!rtc.eeprom_write(0, inttmp)) {
        Serial.println("Failed to store INT");
    } else {
        Serial.println("INT correctly stored");
    }
    if (!rtc.eeprom_write(4, floattmp)) {
        Serial.println("Failed to store FLOAT");
    } else {
        Serial.println("FLOAT correctly stored");
    }
    if (!rtc.eeprom_write(8, chartmp)) {
        Serial.println("Failed to store CHAR");
    } else {
        Serial.println("CHAR correctly stored");
    }

    rtc.set(0, 42, 16, 6, 2, 5, 15);
    //  RTCLib::set(byte second, byte minute, byte hour, byte dayOfWeek, byte dayOfMonth, byte month, byte year)

    inttmp = 0;
    floattmp = 0;
    chartmp = 0;

    Serial.print("int: ");
    rtc.eeprom_read(0, &inttmp);
    Serial.println(inttmp);
    Serial.print("float: ");
    rtc.eeprom_read(4, &floattmp);
    Serial.println((float) floattmp);
    Serial.print("char: ");
    rtc.eeprom_read(8, &chartmp);
    Serial.println(chartmp);
    Serial.println();

    for(pos = 9; pos < 1000; pos++) {
        rtc.eeprom_write(pos, (unsigned char) (pos % 256));
    }

    pos = 0;
}

void loop() {
    rtc.refresh();

    Serial.print("RTC DateTime: ");
    Serial.print(rtc.year());
    Serial.print('/');
    Serial.print(rtc.month());
    Serial.print('/');
    Serial.print(rtc.day());

    Serial.print(' ');

    Serial.print(rtc.hour());
    Serial.print(':');
    Serial.print(rtc.minute());
    Serial.print(':');
    Serial.print(rtc.second());

    Serial.print(" DOW: ");
    Serial.print(rtc.dayOfWeek());

    Serial.print(" - Temp: ");
    Serial.print(rtc.temp());

    Serial.print(" ---- ");
    Serial.print(pos);
    Serial.print(": ");
    Serial.print(rtc.eeprom_read(pos));

    Serial.println();

    pos++;
    pos %= 1000;
    delay(1000);
}


texts:
I observed one paper [A highly efficient interface circuit for ultra-low-voltage energy harvesting] and i tried Full-wave rectifier [attached in below].

But this circuit generating output wave form same as half-wave rectifier [observe in below].

I want to know this waveform is wrong or not?. Please, kindly consider my request and give me help.

Check 1

Check 2


texts: How should I interpret this CAN bus protocol - J1939

texts:
I have been using J1939-21(Data link layer) many times, but now I'm confused.
First I know that a J1939 protocol is build up from a data frame and that data frame looks like this in practice.
<ID> <DATA OF 8 BYTES>

The rest handels the CAN-bus controller.
The ID describes what type of message it is and where it comes from and where it want to arrive.
The DATA describes 8 bytes of different 8-bit values from 0x00 to 0xFF. That's all! Super simple!
But how should I interpret this table with a J1939 protocul from this Scania site?
https://til.scania.com/w/bwm_0001161_99

If we begin with the ID. Here we can see that the meaning if this message is 19FF and the message goes from 4A and want to arrive at 85. So the ID message is 0x19FF85FA in hex.

Now to the data. As I know, every CAN-bus message have 8-bytes.
So I assume that I would see something like this:
[Byte0, Byte1, Byte2, Byte3, Byte4, Byte5, Byte6, Byte7]

Example:

But I'm isint! Instead, I'm seeing this. What does this mean?
First, I know that this message are going to the ECU - Eletrical Control Unit, e.g PLC or controller. So this message is a R e c i e v e r message.
Then we have the bytes. Here I can see that we have different bytes such as byte 1 and byte 1. What??? I cannot understand this.
So here are some questions:

Is B y t e column only the index in [Byte0, Byte1, Byte2, Byte3, Byte4, Byte5, Byte6, Byte7] and Byte1 is acctully Byte0 in this indexing?

What is B i t ?

How can the message TelecomConnectionStatus (Telecom Connection Status) have the length 4 but 4 TelecomNetworkTechnologyInUse (Telecom Network Technology In Use) looks like it have more lengths because it has more rows?

I don't understand this. Do you?


texts: One double pole relay or two single pole relays for live and neutral?

texts:
I'm designing a PCB that will control AC 240V electric tools.
For now I decided to use a single double pole relay to switch live and neutral lines.
Is it also safe to use two separate single pole relays (one for each lines) that would be controlled by the same signal at the same time ?
2 relays would be cheaper than a double pole one.
I'm asking this question cause I'm thinking of the case where one relay would break and only one would remain good.


texts:
I have a 12V battery connected to a circuit driving an ignition coil. The circuit requires 2A to run. The ignition coil produces 40,000V and the spark is measured at 50mA. By simple calculations the input power is 24W the output power is 2000W, how?

If I could harness the output power and my battery is 200Wh does this mean I can run a 2000W device for 8.3 hours, as the input is only 24W from the battery?

This does not seem right, what am I missing?

Or am I actually drawing 2000W power from the battery (over time) to charge the capacitors in the circuit etc, meaning that it will only last 6 minutes?

Thanks for the help.


texts: Second order differential equation implementation using OP-Amp

texts:
I am trying to implementat the following equation \begin{equation} x''+4x'+25=\sin(20t+36) \end{equation}

using OP-Amp's. I tried to use state-space technique to implement it in the below circuit

x is the voltage of output node of up-right OP-Amp. But the problem is I don't have the x term in the equation. In other words the transfer function is of the form  \begin{equation} \frac{1}{s(s+4)} \end{equation} The 1/s term is problematic, the above circuit gives us low-pass characteristic of the form \begin{equation} \frac{1}{s^2+b_1s+b_0} , b_0\neq 0 \end{equation} What do you guys suggest I do to get the correct setup?

Also I noticed that if we introduce \begin{equation} y=x' , y'=x'' \end{equation} we can do something with it, but I can't figure out how? Also if another circuit configuration is better, please suggest it so I switch to that. The above circuit gives me wrong output when I simulate in OrCAD-PSpice , it is a homework for my (circuit-I) class and I thought it would take only 4 hours to solve but it's been a long 24 hours now , I really need help.

Any help would be appreciated.


texts: LTspice voltage source with varying Ton / Tperiod

texts:
I'm trying to simulate a buck-boost converter where Vin and Vout are constantly changing. As a result, the time it takes to charge/discharge the inductor varies as well, and a voltage source that controls the MOSFETs with a constant frequency won't cut it.
I've been simulating 1 or 2 cycles at a time by disconnecting the voltage source from the circuit after X seconds, but it's not efficient at all. Is there a way to vary the Ton of the voltage source with an equation? Or perhaps a way I can type a list of Ton values in a text box and have the voltage source pick one every cycle?
Thanks!


texts:
I am a mechanical engineer with basic understanding of electricity.  I am programming an app for ordering 3 phase heaters, and I have an argument to resolve with a coworker.  Lets say I have a 208V 3-phase heater (delta connection), with a heating element on each leg L1, L2, L3.  The total KW of the heater is 15 KW.  My calculation for amps in each leg is 15KW*1000/[208V*1.73] = 41.7 amps.  On each leg there is a thermal limit switch with 25 amp rating.  Since I1 = I2 = I3 = 41.7 amps in each leg, I need to split into two branches to divide the amps into two because of the 25 amp limit switch.

A coworker is arguing the following:  Each element is producing 15KW/3 = 5 KW per element.  Treating each leg separately, one can treat it as a 'single phase' circuit with 208V across the element.  So amps per leg is 5 KW *1000/208V = 24 amps.  So no need to branch for the thermal limit switch.

Obviously one can't come up with two different answers. My thought is that even though on average each element is producing 5 KW of heat, instantaneously it might be producing more than that, as long as all three elements together are producing 15 KW at any given instant.  So instantaneous amps would be 24 amps*1.73 = 41.7 amps (to reconcile the two approaches).  With a Wye connection my coworker's argument would work because the voltage across each element is 120V.  But intuitively I don't know why it works for Wye but not for delta connections.


texts: Preventing parasitic powering of FT232RL by ATMega328P

texts:
I have a battery powered board with an ATMega328P and some other peripherals such as SD card, RTC, sensors, etc. The design of the board is to be as low power as possible, whilst keeping with the ATMega328P as an MCU. The board uses the Arduino boot loader etc.

I added a FT232RL USB to UART chip to the design, to give better serial comms than having to have an external serial converter. The FT232RL has a 5V input from the USB with a 3.3V generator on board which I connected to the 3.3VIO supply it needs. So the FT232RL is powered from the USB when connected. The battery power circuit is separate. TX and RX are connected to the ATmega328P RX and TX.

The problem is that when the power to the FT232RL is disconnected, the chip is still drawing some parasitic power through the ATmega328P RX and TX lines. Another ATmega328P pin is used to detect TX from the chip, so the ATmega328P can turn off the serial whenever. Even with the serial turned off and TX set to 0V, and RX to input, the FT232RL still draws some power from RX, more so if pull-ups are enabled. This increases the power consumption.

My solution is (when no serial activity detected)

Disable serial port
Set TX to 0V
Set RX to input and add external pull-down resistor.

However this seems a bit inelegant. Is there a hardware solution that would work? Any other suggestions?


texts:
I am new to this forum, heard you guys are great and helpful.

I have been designing a nixie clock recently for my girlfriend's birthday.

The tubes run at 170v and have a current rating of 2.5mA. I want to use a high voltage interface driver chip HV507GP (datasheet in hyperlink) to drive them (sink only) but suspect that it doesn't have enough current sinking capabilities (1mA stated in datasheet at 300V I think?).

Can someone confirm or debunk my suspicion? It will be much appreciated.
datasheet for HV507PG

Thank,
Hang


texts: Where should be defined a device specific ISR when making a static library?

texts: Suppose I want to make a static library (.a file), which contains an ISR. That library should be used by many AVR MCUs, but each device has different ISR vector name, so it cannot be defined in .c file. Is it correct according to C conventions to define the ISR in the header file?


texts: How do I shield my pc-speakers from mobile interference?

texts:
I have a budget (not cheap :P) pc-speaker set from Logitech (2.1) at home which are extremely sensitive to cellsignal interference. My iPhone is about 1m from any part of the set - including the wiring - but still i get the funky bzzzzz-bap-bap-bap-bzzzz-bap-bap every few minutes. (I guess it's when the iPhone "calls home" to the tower.)

I have another set at work, which were even cheaper, which don't have this problem. And here I have my phone docked just a few inches away from the controlling speaker. (2.0 system)

Is there anything I can do to the set to make it more shielded? I'm not afraid to open it up ;)

http://www.logitech.com/en-ca/support-downloads/downloads/speakers-audio/devices/232 <- this is the set I have. There is also a very audible ground-hum that I want to get rid of. Any tips there?


texts:
I am designing a circuit to drive the brakes on a DC motor. The brakes are a 19.9Ω coil that is disabled when energized (think wheelchair motor style brakes). The brakes work on 24VDC.

I have found myself in a unique situation where the brakes are switched on and off from the main microcontroller (5V logic), but I want to be able to disable the brakes if certain conditions aren't met on the auxiliary microcontroller (also 5V logic). The auxiliary microcontroller is set up as a type of safety interlock device, with the idea of being able to disable power to the motor controller in the event of an emergency. This is done by the switching of a solenoid (separate system from what I am trying to ask about with this post). Sure this task could be moved to the main microcontroller, but I like the idea of keeping the systems separate.

My idea is to use an AND Gate to control two individual MOSFETS to control two individual brakes IF both microcontrollers have the pins set to HIGH. I feel like I've gone around in circles, trying to find the answer to this/implement this design in an intelligent fashion...

My question is in multiple parts:

Can an AND Gate drive two MOSFETs in the configuration below? (If not, what changes should be made?)
Have I chosen the correct resistors for the MOSFET gates?
Are pull-down resistors needed on the input side of the AND gate?

Parts:

AND Gate - https://www.mouser.com/datasheet/2/916/74LVC1G08-1319751.pdf

MOSFETs - https://www.mouser.com/datasheet/2/916/PMV40UN2-1320360.pdf

Microcontroller - Arduino Yun Rev2

Aux Microcontroller - Arduino Nano

Brake - Inductive load 24V 19.9Ω ~1.2A

This is my first post so please be gentle and thank you in advance for any input!


texts: Why do I have these delays in my simulation of VHDL code?

texts:
I tried to test two 2-digit BCD adders. One with CLA adders and the other with ripple.  I  have glitches in the simulation.
Are they from the clock or from my design?
library ieee ;
use ieee.std_logic_1164.all ;
use ieee.std_logic_arith.all;

entity testbench is
end ;

-- here we check each possibility by generating 2 numbers from 0 to 99 then add these numbers using ripple bcd and cla bcd
-- then we compare it to correct sum by using correctsum architecture

architecture outputanalyser of testbench is

-- intializing signals and give clock intial value

signal clk : std_logic :='0';
signal a,b : std_logic_vector(7 downto 0);

signal mysumripple : std_logic_vector(8 downto 0 );
signal mysumcla : std_logic_vector(8 downto 0 );

signal behavioralsum : std_logic_vector(8 downto 0);

begin
    clk <= not clk after 99 ns ;
    -- the ripple adder work perfectly when clk is 99ns ,,,but cla needs only 61 ns
    --i found these values by trying different values

-- design verfication parts ,, ripple bcd ,,, cla bcd ,,, and the correctsum that gives us the behavioral sum

s1 : entity work.designverficationparts(ripple)
    port map (a,b,mysumripple);
s2 : entity work.designverficationparts(cla)
    port map (a,b,mysumcla);
s3 : entity work.designverficationparts(correctsum)
    port map(a,b,behavioralsum) ;

    process

    type stringFile is file of string;  --  this type of files stores sequence of ascii characters
    FILE outputFile : stringFile ;     -- we declaring file  handle
    VARIABLE file_status : FILE_OPEN_STATUS; -- declaring file status variable

    begin

        FILE_OPEN(file_status, outputFile, "Result.TXT", write_mode);  -- we choose write mode so if there is error it can be written in file

     for x2 in 0 to 9 loop -- for second digit of first number
        for x1 in 0 to 9 loop  -- for first digit of first number
           for y2 in 0 to 9 loop -- for second digit of second number
             for y1 in 0 to 9 loop -- for first digit of second number

             a(3 downto 0 )<= conv_std_logic_vector(x1, 4);
             a(7 downto 4)<= conv_std_logic_vector(x2, 4);

             b(3 downto 0 )<= conv_std_logic_vector(y1, 4);
             b(7 downto 4)<= conv_std_logic_vector(y2, 4);

             -- error messages
     assert mysumripple = behavioralsum
     report "Here the answer of ripples  is wrong "
     severity error ;

     if (mysumripple /= behavioralsum ) then
     write(outputFile, " the answer of ripples  is wrong ") ;
     end if ;

     assert mysumcla = behavioralsum
     report "Here the answer of carry look ahead  is wrong "
     severity error ;

     if (mysumripple /= behavioralsum )  then
     write(outputFile, " the answer of ripples  is wrong ") ;

     end if ;

     wait until rising_edge(clk) ;

     end loop    ;
     end loop   ;
     end loop    ;
     end loop   ;
     wait   ;   -- this wait to kill procces statement
     end process ;
end;


texts: What is the proper way to store data into a frame buffer?

texts:
I am trying to plan a graphics processor project that will only render lines. It will use the bresenhmam's line algorithm. After reading on the algorithm, it makes sense how it works to calculate locations of pixel that make up a line. What is not clear is how will this be output to a screen. Perhaps, the data will likely be stored into an external memory, but the obvious way to do so appears highly inefficient.

Assume I have 10 lines. I calculate the pixel values that make each of these lines, do I store these pixels into some internal FIFO for "dispatch"? Then another part of the design reads the pixel values to be "dispatched", calculates what location to store them in memory and writes them to memory. This has to do be done for each line meaning that a memory location may be read and written multiple times for a single frame if multiple lines pass through nearby each other. Is this correct? If so, then as the number of lines to draw increases, it will be harder to write full frame to memory by rendering all lines before the next frame has to read out since frame rate for video display is fixed.

This means there is no way to go from top left screen pixel to bottom right and find out if a given pixel is part of a line. I can't find a simple explaination for how to implement frame buffer for this type of system.


texts:
I use the "PCB Logo Creator" script to convert my BMP logo and import it into the top layer. It works well. But I don't want to do this "conversion" every time, so I made the generated logo to a part in my components library, then I can place the part in the schematic, and it will be automatically placed on the PCB.

The problem is, because the generated "logo" are composed of many "lines", and the lines are 1mil thin, it's less than my width constraint, so it throw many "DRC" errors.

Of course, I can lower my width constraint to less than 1mil, but it seems so "brute". I wonder, what's the most "elegant" and easy method to put my logo onto the PCB without many tricks?

Any suggestion?


texts:
I'm a furniture maker and I built a unit which used three circuits of led lights.
Each circuit's transformer has a max output of 2.5 A.
I would like to use a single switch to put between the plug and the transformers.
I found a very tiny rocker switch which is rated 250vac 10A.....I guess it's ok but is so small that it makes me paranoid about catching fire or something?
Sorry if its a dumb question!


texts:
I have been using an NXP LPC1788 dev board which I have developed my application on (.NET Microframework Cortex-M3 Port).
  Everything was well and good on this board, I had no issues with RAM or otherwise, and so I was ready to begin development of my production board.

I created a new board with the same RAM and processor, and I took the binary from the dev board and put it on the new board and I am getting problems when running from SDRAM. Not the usual where there is no connection, nor is there an intermittant fault... I can run a memory test (write to the entire SDRAM block in 32bits, 16bits, 8bits and read back the correct data multiple times).

However when I try to run my application I get really odd problems with RAM either getting overwritten, or not written at all. This is only when running the application which is perfect on the dev board. It is not intermittant, it does the same thing every time. Because of this I assume it is not my routing that is causing me issues (because my memory check passes).

Is there some odd feature of the LPC1788 EMC (ARM PrimeCell™ MultiPort Memory Controller) that I am not aware of that could be causing buffering issues or read-ahead problems? If anyone with experience with this could point me in the right direction, or help me write a better memory test to test for these odd conditions would be very helpful...

I have attached a picture of the routing, which although is not optimal (I have only 4 layers, 2 signal, 2 power plane) does allow the RAM to function and I can read from the device.


texts: I require a simple circuit to create a 3v output pulse then drop to zero volts then back to 3v every 3 seconds (time adjustablevwould be good)

texts: I am trying to simulate a flow meter, it’s output is 3v every 3 seconds it alternates between 3v and 0 v continuous. I have basic circuit knowledge, and can create simple pcn circuits. I don’t want to us IC 555 timers ect if can be helped


texts: Can I use electrical braking with stepper motor?

texts:
Can stepper motor use electrical braking? I think I can stop a running stepper motor more quickly with an electrical braking resistor. Is this feature popular among stepper motor controllers? I am a little confused that most manuals of stepper motor driver don't say about electrical braking resistor or other electrical braking method.

(I know electrical braking is popular in inverters for AC motor, like brake resistor or DC braking in Omron inverter)

Thank you.


texts: Help with low-pass filter and TTL logic interface

texts:
I am working with a motor control board which controls a DC motor (speed and direction). This board uses two SPDT relays for direction, and some sort of PWM for speed.

Here's an abbreviated schematic, including my own circuit.

I need to feed the motor direction to a MCU using TTL levels.

I tapped the circuit at point "A", which outputs 0V when relay is not energized and 0.8V when energized.  This corresponds with the motor directions.

I amplified this signal to TTL levels using the circuit shown.

This works perfectly, except when the motor is running slowly (heavy PWM applied to motor outputs). In this state there are repeated spikes at point A and B (see this example) which cause the MCU to think the pin has changed state.

You can see the low-pass filter intended to attenuate anything above 2 Hz.  But it doesn't filter these spikes for some reason.

Does anyone have any suggestions for cleaning up this signal?

The controller and my circuit share a common ground.

Thank you for any advice!


texts:
My ESP8266-01 recognises the sensor TSL2561, but the readings always output 65535 for some weird reason. But as I said, when I run the I2C scanner and plug in the wire I see the sensor popping up at 0x39.

When I hook up the same sensor to an ESP8266 NodeMCU breakout and flash the same code on there it reads it out just fine. I have the wires connected as shown below without any resistors or anything in between.

| ESP8266-01 | TSL25611   |
|------------|------------|
| VCC (3.3V) | VCC (3.3V) |
| GND        | GND        |
| GPIO2      | SCL        |
| GPIO0      | SDA        |

I'm not sure what I'm doing wrong though.

My code:

#include <Wire.h>
#include <ESP8266WebServer.h>
#include <TSL2561.h>

const char *ssid = "Wouter's Place";
const char *password = "";

ESP8266WebServer server(80);
TSL2561 tsl2561(TSL2561_ADDR_FLOAT);

void handleRoot() {
  // Read illuminance
  float visible = tsl2561.getLuminosity(TSL2561_VISIBLE);
  float full = tsl2561.getLuminosity(TSL2561_FULLSPECTRUM);
  float ir = tsl2561.getLuminosity(TSL2561_INFRARED);

  String response = "";
  response += "{\"illuminance\":{";
  response += "\"visible\":";
  response += visible;
  response += ",\"full\":";
  response += full;
  response += ",\"ir\":";
  response += ir;
  response += "}";
  response += "}";

  server.send(200, "application/json", response);
}

void setup(void)
{
  Wire.begin(0, 2);

  Serial.begin(9600);
  Serial.println();

  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, HIGH);

  Serial.print("Connecting to: ");
  Serial.println(ssid);

  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED)
  {
    delay(250);
    Serial.print(".");
  }
  Serial.println();

  Serial.print("Connected to wifi, ip: ");
  Serial.println(WiFi.localIP());

  Serial.println("Setting up TSL2561..");
  if (!tsl2561.begin())
  {
    Serial.println("Could not find TSL2561 sensor, check wiring!");
    while (1);
  }

  Serial.println("Starting server..");
  server.on("/", handleRoot);
  server.begin();
  Serial.println("Web server running!");
}

void loop()
{
  server.handleClient();
}

Resulting output:

{
  "illuminance":
  {
    "visible": 0,
    "full": 65535
    "ir": 65535
  }
}


texts: How to guarantee the stability of a RF closed loop amplifier with inner loops?

texts: I've a 3 stage closed loop amplifier with many loops inside of which some loops cannot be broken, to analyze the loop gain, as the parasitic capacitors are intrinsic to the device. What is the method to analyze the stability of this amplifier and ensure a good phase margin?


texts: What's the voltage transfer characteristic of this power driver circuit?

texts:
[Exam problem for an instrumentation course]

Can anyone help me understand how this circuit works? I'm not too familiar with power circuits... This somewhat reminds of a BJT class B amplifier (but the diodes are not connected to the base), not sure if they are related or not. I also don't quite understand what the OpAmp adds to the circuit.

The problem asked for a sketch of the DC voltage transfer characteristic, but any elucidation related to the function of this circuit will help.

Thank you in advance.


texts: CT or Hall sensor to measure small current?

texts:
My project is an energy monitor(my grid is 127V/60Hz), based in Emon lib + Arduino UNO.
I want to measure currents from 50mA - 25A due my range of different loads, I have a CT 30A(SCT013) working fine only with currents > 1A.
I have more two options to try the reading that low currents, would be a CT 5A(200 ohms burden resistor) and a board with ACS712 5A(probably bad choice due mV/A rate).
My idea is "split" 25A in 5 cables or tracks on the board and install the CT 5A on one of these cables/tracks and use an opamp like the picture below:

Someone can help me please?
Thanks in advance


texts:
I've been having trouble trying to understand the circuit mentioned in the title, which you can see in the picture below.

Note that I'll be using the ideal diode model in my explanations. In case this is the reason I end up confused please let me know.

Let's see this step by step. During the negative half-cycle of the input, diode D1 is on and the capacitor C1 is being charged up to Vin (the maximum value of the input). Capacitor C2 is also being charged since with the charging of C1 D2 turns on but let's ignore this for now.

In most videos and websites I came across, the next crucial point is the positive half-cycle of the input. What I understand without doubt is that D1 will now be off. So we are left with the following circuit :

Now the part I don't understand is this :

Because there is a voltage across capacitor C1 already equal to the peak input voltage, capacitor C2 charges to twice the peak voltage value of the input signal.

I cannot just accept this. I get that applying KVL with C1 charged will give me a C2 with a voltage of 2VIn. However, in order for C2 to charge, current is necessary. This means capacitor C1 will have to discharge in the process.

Also, KVL doesn't seem to hold if we apply it before C2 begins charging(it doesn't instantly charge to the 2Vin value) so this leads to even more confusion. Like, what happens if we connect a voltage source in series with a charged and a non-charged capacitor?

You can ignore this last question, I'm mostly concerned about how the voltage doubler works and I'm not happy with the explanations I find.


texts:
I'm new to MPLAB X and I run into trouble right away.

I want to read/write the program memory and EEPROM of a chip because I have a corrupted chip and a correct HEX file.

I created a project, entered the PIC p/n and selected PICKit3. In the projrct properties I enabled target power. Then I went to read the flash of the chip using the toolbar button. It does nothing. In the Program Memory window I don't see any code. In the output I just see:

Connecting to programmer...

Interestingly, when I disconnect the programmer, it does the same. When I select the wrong programmer in the project properties (e.g. ICD2), it still does the same. In the output window the messages of Connecting to programmer... keep accumulating without ever saying anything else. In the IDE log, nothing appears either.

I checked if the programmer is installed in Device Manager. When I connect it, a HID Input Device appears.

Edit: I downloaded MPLAB 8.92 and it works instantly without any trouble.


texts: Band pass filter with CSB 455kHz resonator

texts:
I have a 2-pin CSB (ceramic) 455kHz resonator.
I'd like to know how I can make a bandpass 455kHz filter using it.
Can someone please post a schematic?


texts: How serial resistors actually reduce EMI?

texts:
I am recently working with a GSM based system, and there was this advice in the datasheet of the GSM module:

  22 Ω resistors should be connected in series between the module and
  the SIM card so as to suppress the EMI spurious transmission and
  enhance the ESD protection.

I tried to do a little search and I have found a document, PCB Design Guidelines
For Reduced EMI, it has similar statement in it, but no explanation.

  Put a 50 –100 Ω resistor in series with every output pin, and 35 –50 Ω
  resistor on every input pin.

An other part says:

  (Series Termination, Transmission Lines)

  Series resistance is an inexpensive solution to termination and
  ringing problems, and is the preferred method for microcomputer-based
  systems where minimizing the differential-mode noise is also a
  concern.

One more possibly related part:

  Impedance Matching at Inputs
  and again, the series resistance is the most likely solution. Resistance placed at the driver increases
  the output impedance, as seen by the trace and the input pin, thus
  matching the high impedance of the input

I have found something in this document as well, Understanding Radiated EMI it says:

  Add series resistance?  May help
   - Less current (good and bad current) flows through high impedance
   - May reduce EMI by reducing currents flowing outside IC

All in all, I need a little clarification about the topic, so my question is:

How serial resistors actually reduce EMI and what is the principle?


texts:
It's the fourth esp8266-12e that destroyed with my AMS1117-3.3 voltage regulator.
I'm powering esp8266 with AMS1117-3.3 module and this simple circuit:
Input voltage: 5.4 V from adapter
Input cap: 1000 uF
Output cap: 470 uF
Esp8266 current: about 100 mA

But the esp8266 will burn after some on-off switches.
Am I doing anything wrong?
I'm testing it on a breadboard and the ams1117-3.3 is a copy model. I've measured the output voltage of it with my scope and I saw some ripples with a maximum of 4.6 V and about 20 ns duration at the moment I switch input voltage ON and OFF. Can these short ripples burn the esp8266? How can I protect it?
I saw these ripples also on Lf33 and 7805 (original models)
Ripples on output voltage of AMS1117-3.3 triggering when switching input voltage ON/Off:


texts: How to calculate the total conversion time of DAC?

texts:
In the system shown below, the decoder conversion time is 100 ns, and the amplifier has unity gain bandwidth of 10 kHz. DC gain of 1000.
What is the total conversion time of the system?
The closed loop pole is:
w = w0(1 + 1000 × 1) = 1001 × 10000 = 10010000 = 10.1 MHz
So the tau of the amplifier is
Tau = 1/(2 × π × w) = 1.57 × 10-8.
So the total time is the sum of Tau and 100 ns?


texts: NMOS with gate source shorted and negative threshold voltage

texts: First of all is it really possible to have a nmos with negative threshold voltage? If threshold voltage for M1 was positive, then M1 would be in cutoff. How do I analyze this circuit?


texts: 700 °C insulating material used for a spacer

texts:
I have a problem with finding a material that does not self ignite below 700 °C.
It is supposed to serve as a 5 mm spacer that is also serving as a best thermal insulation as possible. The spacer must be non-conductive to electrical current. Because the spacer must not scratch or shatter the glass it will be placed on, the spacer must be relatively soft as it must hold 10 kg of mass.
If no one knows about such a material, then I must completely rethink my solution.
There is additional problem regarding the "glueing" such material to iron based hot base.


texts: How to check for frequencies with stronger signal in FM radio

texts:
I'm making a radio player using si4703 IC. I read RDS data to know the radio station name, PI code, etc.

I also get the list of alternative frequencies (AF) that the radio station send via RDS. However, in many cases this list is not very good because it doesn't include frequencies of the same station in a region which is close to mine one. However, this other frequencies have the same PI code and are, indeed, the same radio station transmitting the same audio content.

However, my car's radio is capable of switching to this frequencies not included in AF frequencies without interrupting what I'm listening, so it is not making a FM band scan to find this other frequency.

How does my car make this? Does it have a second FM receiver IC just to make frequencies scans?


texts:
I'm trying to to find the best way to force an inverting amplifier to postive saturation with a gate input, but otherwise leave the function of the op-amp intact. I've come up with a few ways to do this which all use some kind of current sink at the summing node. Using the open collector output of a comparator directly seemed the best way to go, but the offset contribution was significant in simulation. So now I'm not wondering if using a discrete mosfet or bjt is a better route. Unfortunately I need to control that with a positive 0 to 5V gate (from a schtmitt trigger), and the only way I can get this to work is with negative control voltages. Anybody have any suggestions for me?

The image shows the circuit working with a P-channel mosfet controlled by a -12 to +12V gate.


texts: Decoupling capacitors values in mixed-signal circuit

texts:
I know theory about decoupling capacitors (ESR, ESl, parallel capcitors etc.)
I have read Electromagnetic Compatibility Engineering,  H.W. Ott.
My question is about practical design. How shall i choose appropriate capacitors to achieve the best results ?

I have to design mixed signal pcb. It is measurement system with analog front-end, ADC, DAC, FPGA. There will be a few chips which will be working with different frequencies (shall I take into consideration each freq?).

Do engineers in this type of design calculate capacitors carefully (taking into considerations for example impedance peaks in resonance frequency) or put a few different range capacitors ?

I would like to solve this problem in correct way not only for the best system accuracy but also for knowledge for the future deign :)

Could I kindly ask more experienced people for an advises and answers ?

Cheers,
e2p


texts: 240 V instead of 230 V on a true RMS multimeter

texts:
I'm a beginner in electronics, and I've recently got myself a UNI-T UT61E multimeter, which is marked as true RMS. I stuck its probes into a mains socket and I was expecting 230 V (Europe/Poland) but the DMM showed 240 V. Is it possible that my meter is wrong, or is it a consequence of a true RMS measurement?

I don't have any voltage standard nearby to check the meter.


texts: How does equipment ground protects us from electrical shock?

texts:
What I have always learned is current leave the source and return back to the source, forming a closed circuit, here are the two thought experiments I had and got confused:
Scenario 1:
Here I have a black (hot), white (neutral) and green (ground) wires coming from the wall and into the box where the ground wire is connected to the chassis of the metal test box.
In the case if the black wire touches the metal casing and a person is touching the case, then the ground wire would lower the entire resistance since the person and the ground forms a parallel resistor of the circuit and drop all the voltage upstream so the person would be safe

Scenario 2:
But what if the ground wire isn't connected to the chassis? and somehow the hot wire made a connected to the chassis?

My inclination would be the current travels through the person, but here is the dilemma in my head, how does the current return back to the source from the person standing on the concrete ground? are we really saying the current travels from the concrete, into the building and somehow back to upstream?
If the person is receiving an electric shock from scenario 2, then how does the current get back to the source?
If there is no close circuit for the fault current to return to source, shouldn't the person be safe? since it is an open circuit?


texts: RL voltage across inductor differential equation

texts:
I have a simple RL circuit such as the one shown below

and I want to derive the differential equation relating the input and output voltages. I want to take the output voltage as the one across the inductor. So far I have done the following but I'm not sure whether I'm making a mistake or not, since I haven't been able to find a similar process in a couple books and internet. I want to do this as an exercise for finding Fourier Transform of output.

I know the differential equation starts out like this:

$$
V_{in}(t) = L\frac{di}{dt} + Ri
$$

From which I know that the current \$i\$ is

$$
\frac{V_{out}(t) - V_{in}(t)}{R}
$$

I replace this, and get

$$
V_{in}(t) = \frac{L}{R}\left(\frac{dV_{out}}{dt} - \frac{dV_{in}}{dt}\right) + V_{out}(t) - V_{in}(t)
$$

Is this correct? All that would remain would be to replace $$V_{in} = e^{jwt}$$ and $$V_{out} = H(w)e^{jwt}$$ and simplify, getting

$$
H(w) = \frac{2+\frac{L}{R}jw}{1+\frac{L}{R}jw}
$$

I believe I made a mistake somewhere since this result looks kind of weird.

Also: is this a high pass or low pass filter? How do I figure this out from looking at the equation? And how do I find the cut off frequency?


texts: Meaning of the terminology "referring to primary" or "referring to secondary" in the context of transformers equivalent circuits

texts: I`m studying transformers equivalent circuit and encountered this term "referring" to primary or secondary and I was confused by this terminology. I tried to look for a definition but couldn't find any. Is it implying that, for example referring to primary, just means looking into the circuit from  the primary coil?


texts: How to work with 2 or more AC Voltage sources simultaneously?

texts:
I think I have a simple or complex question, but I want to know if there's a way to use two or more AC Voltage sources to supply a system.

I made a simulation with Proteus software and it's working exactly at the same way that works the DC Voltage sources in series:

The main thing is to work safely and the purpose is to make a Smart Grid, which could be able to measure voltage on each source to know who exactly needs to add power supply to the system. Also I want to know if there's going to be a power issue to work with different sources with different power capabilities.

Hope to receive an answer soon! Thanks


texts:
Is it possible to simulate planar coil printed on a PCB with FEMM?
The only idea that come into my mind is to have 2n (if n is the number of turns) regions, each region represents a copper trace and has one turn (half traces have positive turn and half traces have negative turn). Something like this:

Is this correct approach?
If yes should this be solved as a magnetic problem or as a current flow problem?
Is what I draw something that is really a planar RFID coil in 3D? I can't seem to understand how those lines are closing.


texts: About oscillations in a time-delayed power system

texts:
I'm new here so pls correct me if there's anything inappropriate.
For a power system without delay, we can calculate its eigenvalues, where each pair of the complex eigenvalue represents an oscillation mode. The imaginary part represents the oscillation frequency. For a multi-area system, we can use modal analysis to determine whether this eigenvalue belongs to an inter-area oscillation, which has 0.5-1Hz of frequency and a very low damping ratio.
Here's my question:
Now if there are one or multiple time-delays in this system, the system's dimension becomes infinite, which means there are infinite numbers of complex eigenvalues.

Does each pair of complex eigenvalues still represents an oscillation mode, which can be seen from appropriate simulation?
Are there anyways to identify the participation factor in this condition while there's no left-eigenvector matrix and right-eigenvector matrix? If not, are there anyways to identify if this eigenvalue is an inter-area oscillation.
I know we can calculate the eigenvalue sensitivity to the time-delay, in this condition, while the time-delay change, the eigenvalue will change, i.e., the oscillation frequency will change. Does that mean there will be inter-area oscillation with a pretty high frequency (>1Hz) if we have a large delay?
In a delay-free system, are there any conditions that give the possibility of a high-frequency inter-area oscillation?

I have read several papers about inter-area oscillation and delayed system. However, there's very few intersections of them. The paper about delayed system focus on its stability (rightmost eigenvalue) and I'm open to any discussion or document recommendation.
Thanks very much!


texts: If I connect a cut-off BJT and a diode in series, which circuit element will see a voltage drop?

texts:
Consider the circuit below. Assume that SW1 is open. What voltage drop is observed across D1? What voltage drop is observed across Q1 (from collector to emmitter)? Why?

Since the base current is zero, we know that Q1 is in cutoff, and there will be no current through D1, R1, or Q1. So Ohm's Law tells us that there is no voltage across the resistor: the voltage drop across D1 and Q1 must add up to V1 = 5V. But without any current flowing, none of the I-V characteristic equations for either the diode or transistor would be applicable. So how can we reason about the results?

simulate this circuit – Schematic created using CircuitLab


texts: X9C103 10k digital potentiometer with LM317 0 - 20 V DC voltage source

texts:
I need some help about my current project. I am trying to do a voltage source which can be controlled remotely (0 - 20 V). I am using LM317T for this project. I examined the LM317T datasheet and designed a circuit for a 10k potentiometer.

After setting up the circuit, I tried the circuit with the analog 10k potentiometer and the results were fine. (I get 1.25 V to 19.5 V). After that I have tried to control X9C103 with Arduino UNO and again the results were fine. Here the codes.
#include <FastX9CXXX.h>
#define X9_CS_PIN 3
#define X9_UD_PIN 4
#define X9_INC_PIN 5

FastX9C103 Potentiometer;
String readString = "";

void setup() {
  Serial.begin(9600);
  Serial.println();
  Serial.println(F("ESOGU Uzaktan Laboratuvar"));
  Serial.print(F("Digital Potentiometer Application..."));
  randomSeed(analogRead(0));
  //Potentiometer.Begin();
  Potentiometer.Setup(X9_CS_PIN, X9_UD_PIN, X9_INC_PIN);
  Serial.println(F(" Completed."));

 }

void loop() {
  //Potentiometer.JumpToStep(random(100));
  Serial.print(F("Potentiometer (%): "));
  Serial.print(Potentiometer.GetStep(), DEC);
  Serial.println();
  delay(1000);    // wait for a second

     if (Serial.available() > 0) {
       readString="";
       while (Serial.available()) { // gelen komutu alıyoruz
       char c = (char)Serial.read();
       readString += c;
     }
     Potentiometer.JumpToStep(readString.toInt());
     }
 }

But after implementing digital potentiometer to my circuit. I didn't get the results that I want. I got 1.5 V to 7 V. The circuit is working perfectly fine with analog 10k potentiometer but not with 10k digital potentiometer. Thank you for your answers.


texts:
I am currently working on a project where I want to implement a Brushless dc motor (like the Turnigy C2226 - 1800kv) to run in-hub of an RC car. I need this entire project to be as lightweight as possible. Also Torque is way more important than speed.

I have the following questions:

Do you get any commercial BLDC Regenerative ESC for this class of motor? If not, I'll have to build one from scratch based on dlginstructables article.
Is this the best motor to do this with or can anyone suggest something better or different? As I mentioned, I'd like to use a motor that can fit into the hub of an RC car wheel. (Not decided on the size yet though, so still flexible.
Can you charge a 3S LiPo directly using this configuration or would I have to implement a Balancing circuit as well (any suggestions for a small, simple and lightweight version of this would also be cool - if required)?

Any help, suggestions and or comments would be much appreciated.


texts: What could be causing this sine on 7810 output when powering BLDC fan?

texts:
I'm powering a 12 V computer fan with a simple 7810 circuit shown here:

When the fan is connected to the regulator, on the output I get this wave:

When I zoom out in time, I get something that looks like this:

For those who can't be bothered to click on the image, the distance between the peaks is almost 10 ms.

When I zoom out a bit more, I can see that there is another wave here riding on top of those peaks like this:

The higher top peaks have peak voltage of 13.4 V and the lower peaks are 12 V. The peaks on the bottom side which go together with 12 V peaks are 8.8 V and the bottom peaks of 13.4 V top peaks are 8.6 V.

So any ideas what could be causing this?

UPDATE

Here's the input waveform with the output peaks:

The input peaks are 10 ms apart and are in phase with AC line transitions, as expected since the AC frequency here is 50 Hz. The input is coming from a diode bridge rectifier. The input voltage is a bit high since I changed the original 1N4007 diodes with STPS2H100 Schottky diodes because I initially believed that one of the input diodes developed a short.

I can't determine the exact relationship between the input and output wave. When I trigger by one of the waves, the other is flowing from left to right on the screen.


texts:
Is there an IC that have 4 and gate with 3 input each?
I have searched that only NAND gate have that and I know that using inverter to the output to produce the output in the AND gate, but it cost more so is there an IC like that?


texts:
When trying to send and receive using a PIC18F97J60 and MAX232 using a program written with the C18 compiler, I am only able to transmit data.  For receiving, I have tried at least 50 methods but none are working. I even tried the software on multiple micro-controller boards to check for a hardware problem but none of the boards ever receive anything. I believe that the following items are correct:

My clock is perfect at 41.6667MHz
My baud generation is perfect
My hardware is OK (some other IIIrd party hex code able to receive also)
My host PC, its COM port, and the serial cable are OK

Can anyone guide with probable areas I may be missing?

------------------ FURTHER CLARIFICATIONS -------------------------------------------

Thanks Olin for helping, you are great man. Sorry for not putting my question correctly. Please note:

I was trying to do serial I/O to write a boot loader for the PIC18F97J60 myself as my vendor's supplied boot loader stops sending/receiving with PCloader software after a partial user application hex download.  It also ensures that RS232 port is able to both send and receive.  Moreover, Microchip's boot loader described in AN1310 also stucks on receiving data.

My sample application (a bootloader) is able to transmit but never receives anything.  I'm in soup: either I need a new boot loader or my application must work. I have never faced such a problem in my 12 years of development and I am feeling like a fool.

Other details as you requested are as follows:

I had 10-12 PIC18F97J60 cards with MAX232 on C6/C7 for Serial I/O. The problem is the same for all boards (of different batches).
I wish to do 9600 baud, 8 bit, no parity, 1 stop, no handshake, no interrupt data exchange with RealTerm (Better Than Hyperterminal - Displays HEX Code).
My clock and baud rate calculations are perfect for 41.6667MHz. I have set OSCTUNE = 0x40 and BAUDCON = 1084. I am able to receive perfectly on the PC with RealTerm.
My program not able to receive anything on the PIC but able to transmit.
I tried polling as well as interrupt but nothing works.

Snippet of code is as follows:

void putchar(unsigned char Char)
{
    //Wait for (TSR==1)
    while(TXSTA1bits.TRMT!=1);
    //Trasmit Current Data
    TXREG1= Char;
    //Wait for (TSR==1)
    while(TXSTA1bits.TRMT!=1);
}

void putstr(unsigned char *String)
{
     do
     {
         putchar((*String));
     }while(*String++);
    //CR
     putchar(CR);
    //LF
    putchar(LF);
}

void main(void)
{
    unsigned char RS232[] = "RS-232";
    OSCTUNE = 0x40;
    TXSTA1 = 0x24;
    RCSTA1 = 0x90;
    BAUDCON1=0x08;
    SPBRGH1=0x04;
    SPBRG1=0x3C;

while(1)
{
    putstr(RS232);
    Delay10KTCYx(200);
    if(PIR1bits.RC1IF == 1)
    {
            MYChar = RCREG1; //*** No OERR & FERR present, RC1IF never gets set ***
    }
}

}


texts: STM32 VBAT ADC voltage measurement incorrect at low voltages

texts:
I have a problem with VBAT voltage measurement on a STM32F401VB.
As can be seen in the picture below, the ADC output is correct (identical to the calculated value "ADC Should") in the upper region of the input voltage, but incorrect when the input voltage drops below approximately 1V.

At 0V input voltage the ADC value is 239 when it should be close to zero.
The other ADC channels work as expected, so I think this has something to do with the internal VBAT circuitry.

Does anybody know what this could be caused by?


texts:
I have a circuit designed to run a electro piezotransformer at resonance frequency of around 80kHz. As a controller was used microcontroller Attiny 25, which by measuring feedback current generates PWM with the resonant frequency to drive the piezotransformer. Operating voltage is 4V and current around 1.5-1.6 A. The filter inductance is overheating due to the saturation and output current drops significantly, till piezo stops operating. Before was used 4.7 uH inductance with saturating current 4A, now I tried 6.8 uH @ 3.6 A from Murata, but the result is the same.
What could be done to overcome that problem? Any help is very appreciated.
Thank you very much in advance.
Thanks again for the response.
I have another question regarding output voltage and current of the driver. Voltage measured on the input of the piezo has a square wave shape on the positive part and sine wave form on the negative side. But the current shows very strange shape and frequency about 160 kHz instead of 80 kHz. Please, I need your help to understand the current shape reasons and to calculate the output power of the driver. It is very important for me. Thanks in advance.[The blue one is a voltage, and yellow is a current[][2]2


texts: I am mechanical engineer with very little knowledge of electrical engineering. I am working on a project where I need two have two sensors, one on each shoe to track the motion of the feet, and a third sensor on the wrist of a human. The goal is to measure the footwork and movement of arms. As certain times I want to know the relative position of the wrist to the two shoes (feet). What sensors and system should I use and how can I get the relative position of each sensor to the other two?


texts: ATMEGA TWI / I2C Slave - How to implement clock stretching?

texts:
I am programming a TWI slave based on an ATMEGA644PV.

It is working in general, the master can send and read data from the slave. So far so good.
But on some read-requests, the slave requires "more time" to prepare the data. I would like to utilize clock stretching to make the master wait until the data is ready.

The ATMEGA datasheet points out:

  The Slave can extend the SCL low period by pulling the SCL line low. This is useful if the clock speed set up by the Master is too fast for the Slave, or the Slave needs extra time for processing between the data transmissions.

This is exactly what I want, but I don't get how to implement this on the driver level. I see no way to indicate to the I2C slave hardware that it shouldn't immediately ACK, but instead pull the SCL for a period of my choice.

From what I get, I can only tell the slave to ACK or - well - not to ACK at all after being addressed or a data byte being transferred.

Am I missing something obvious here? This is the first time I look at I2C from the view of a slave.


texts: Detecting When a USB Device Is Plugged In For Status LED

texts:
I've seen this asked a few times, but no definitive answers. I've also been Googling this for a couple days now with no definitive solutions. So time to ask...

I'm building a fast charge USB charging station. I'd like to light a status LED next to the port when a USB device is plugged in. Really basic. Really straightforward.

I found this diagram below, and was wondering if it could be modified to omit the phototransistor. I just want an LED to light, maybe when a transistor is pulled HIGH\LOW. It seems like it would only be 3 parts: LED, transistor, and resistor.


texts: Connect 12V digital LED strip to Arduino

texts:
How to connect a T12V-10L-30LED-W LED strip to an Arduino?

Here is the strip specification.
And here the actual image of the strip:

The package says:
VCC: RED
GND: WHITE
DAT: GREEN

My question now is: Does the DAT input take 12V or something else? And how to wire this with an external 12V power source?


texts:
Say I have a 1kHz sine, so no higher harmonics, then I need to sample it at least at 2kHz to be able to reconstruct it.
But if I sample at 2kHz, but all my samples are on the zero-crossing, then my sampled signal doesn't show a sine at all, rather the ECG of a deceased patient. How can that be explained?

This can be expanded to higher sampling frequencies too. If I sample a more complex waveform at 10kHz, I should at least get the first 5 harmonics, but if the waveform is such that the samples are each time zero, then again we get nothing. This isn't far-fetched, it's perfectly possible for a rectangle wave with a duty cycle < 10%.

So why is it that the Nyquist-Shannon criterion seems to be invalid here?


texts: Standard LiPo battery packs & product liability

texts:
I'm designing a high-power portable product that I would like to eventually bring to market. I need to use LiPo battery packs in order to achieve sufficient energy density, but I do not think I will have the resources to navigate the regulatory hurdles associated with LiPo safety.

If I was using Alkaline batteries, for example, I would simply require the consumer to BYO batteries, and therefore not be exposed to the liability if those batteries explode in someone's face!

Lithium Polymer batteries seems to be much less standardised. Is it possible to obtain off-the-shelf standardised LiPo battery products that include internal charging and safety circuitry, where the battery manufacturer is the liable party in the event of a dangerous battery malfunction?

I am not asking for a list of recommendations, rather a confirmation that the approach I'm describing is a valid strategy for outsourcing battery risk.

I feel like this is a common concern in real-life Electrical Engineering and circuit design, so hopefully I'm not too far off-topic for this forum.

Thanks


texts: Why are GPU dies so much physically bigger than CPU dies?

texts:
I understand that the physical sizes of microchips are generally limited by silicon yields. The larger your chip is, the more waste occurs when you hit a defect in the silicon and have to throw it away, and at some point this becomes unsupportable. I've noticed, however, that modern GPUs always seem to be significantly bigger than CPUs.

High-end consumer GPUs seem to run in the 400-600 mm^2 range, with the RTX 2080 Ti sitting at a whopping 775 mm^2.

It's a bit harder to find die sizes for high-end consumer CPUs, but it looks like the i9-9900K, for example, has a die size of 178 mm^2. The latest Ryzen generation has even smaller sizes, what with their "chiplet" architecture, with the largest single die being the I/O die at around 125 mm^2.

Why are GPUs so much larger than CPUs? Is it something to do with silicon yields and chip architecture, or is there some kind of economic consideration?


texts: 2.5 to 4.5 volts I need to level shift to 0 to 10 volts

texts:
I have an output of 2.5 to 4.5 volts I need to level shift, and amplify it to give me 0 to 10 volts output.

A rail-rail op-amp, using the non-inverting op-amp appears to be the best way to do it. I've noticed a few different ways of doing it. Got very confused with the methods shown.

No AC coupling just a DC voltages in, and out.

I would like to use a Texas Instruments TLV2370IP, I have any regulated voltage that the device will work on (16v maximum).

Any help will be much appreciated.


texts: Best way to monitor on/off state with a microcontroller

texts:
I have 3D printer with a cooling fan that by design is on constantly, however it only needs to be on when there is something to cool! I have no idea why they have it on all the time since it is loud and wastes power...

So I need to build a circuit that can detect when the heating element is turned on, and then turn on the fan, and turn it back off when the heat is off. I will probably use a PIC for the brains of the circuit (since I want to have a countdown timer and some other functionality) but I am not sure the most efficient way to hook up to the heating element. It is a 24V, 40W heating element with a simple 2 wire lead. I dont want to worry about hooking into the thermocouple, it should just monitor the binary state of the heating element as either on or off (ideally with a 3-5 VDC output that can hook directly to one of the pins of the microcontroller)

What is the most efficient way to do this?

Thanks


texts: Will a <5mW laser Class IIIa become less dangerous to the eye if I supply it with less current/voltage? Or is there something about the laser itself that makes it dangerous?


texts: What sensors can accurately detect size of content in a closed container such as number of pills in a pill box?

texts:
I am a DIY enthusiast playing with different sensors and electronics.

Recently I've been trying to make a pill box for my grandparents to track their medicine intake.  However, I cannot determine what type of sensor can help me do that.

This company called adheretech claims they can detect how many pills are taken from the bottle but it is not clear how they did it.

I have considered things like weight sensors (which is too big for small bottle) and force sensors which doesn't seen accurate enough to detect pill use?


texts: How powerful of a soldering iron do I need for this job

texts:
I am working on a 12"x 18" board that has multiple ground plane layers. I am trying to remove a through component that is tied to these ground planes. My 65 watt Hakko iron heats up the entire board but cannot deliver enough power to reflow the (unleaded) solder. I also tried a hot air gun, but that didn't seem to work much better. Obviously, I need something bigger, but how much bigger? I tried a Weller 300W gun, but it was too unwieldy to work with.

Hakko offers some 140W stations and JBC offers at 250W station, but they are both very expensive. I want to make sure to get the right thing if I am going to spend that much money.


texts: Why might a D-Type flip-flop skip a beat?

texts:
simulate this circuit – Schematic created using CircuitLab
I am using a D-Type flip-flop to octave down a square wave.
The chip am using is the CD4013BE with a 10V supply.
The square wave is from 0V to +8.5V.
The input frequency can be anywhere between 100Hz and 4kHz.
When I check the oscilloscope it sometimes appears to hold low for twice as long as it should.
What could cause this to happen? How might I prevent this?


texts:
According to Wikipedia, the current of resistors in series will be Vin/R1+R2. Now I could be over thinking this but is that the current that you'll get out or is that just used for determining the power of resistors or both?

http://en.wikipedia.org/wiki/Voltage_divider


texts: PCB pads different diameter on top and bottom

texts:
When I had a DFM review on a board I have designed, the feedback was that the pads on layer 1 (top) needed to be reduced in size, to:

"avoid the issue of copper temperature taking during wave soldering and for reasons of rise of alloy in the plated through holes."

and also to increase the size of the layer 4 (btm) pad to hole ratio to increase solderability (fair enough)

Has anyone seen this before, as I have always used an equal pad stack size for top and bottom copper.


texts: Why does my AND cmos gate have less dissipation than my NAND gate?

texts:
I've just started taking a course in VLSI and from the little I know, this result seems a bit off. Below you can see the layout for the AND and NAND gate I designed :

They both seem to be working fine with rise and fall delays less than 0.5 ns.
( I will add the diagrams if necessary ) .
Measuring dissipation at the output node of each gate while changing the capacitance of the node I get the following results :

AND

NAND

I would expect the AND gate to have more dissipation but that is not the case here. I even checked the inverter's dissipation which reaches more than 2mWatts. Therefore, adding the inverter in series with the NAND gate should increase dissipation.

What am I missing?

Edit: The capacitance in the pictures is in femtofarads. The capacitance is added to the output of each gate, so it is added to the "out" node in the first picture ( AND gate ) and to the "out21" node in the second picture ( NAND gate ).
In both measurements the gates have the same exact inputs (clock pulses) and dissipation is measured at the output nodes.
The AND gate has a rise delay of 700 ps and a fall delay of 330 ps.

Edit2: During the measurements I made sure that the two NAND gates are identical.


texts:
I have a 75W amplifier with a 8ohm speaker connected.

I need to record the audio from that output, so i was thinking in using a voltage-divider to condition the signal and record it through the Line-In input of my sound card.

What I have to take into account?, what happen if the signal don't have a GND but both lines are driven by the amplifier?.


texts: Can you choose any crystal for a PIC Microcontroller?

texts:
I am using the PIC16F690 and I know that the internal oscillator has certain values (20,8,4...).

I would like to put an external 8MHz crystal, but I could find only 8.8MHz or 7.6MHz.

I would like to know if it's possible to put any of these to the PIC, or must it be exactly 8MHz? Also, how should I choose the capacitors for each?


texts:
I now have a PCB with 64 UV LEDs on it and I use this to expose other PCBs. I have a serial resistor for each LED which produces a lot of heat and consumes about 1.3 A at 12 V.

I am now considering to make a bigger UV unit with twice the size of my current UV unit. I have searched on the internet how to drive this amount of LEDs but the only things I came across where ways to drive each LED individually.

I was thinking to make groups of LEDs (5 by example) and use one resister for each group of LEDs.

Are any other efficient ways to drive 128 LEDs without grouping the LEDs?


texts: Ideas to for range prediction algorithm for electric scooter battery

texts:
We are working on an electric scooter (moped) project and would like to get the distance reading (that goes to the odometer from the hall sensor / bldc controller) on our IoT device.
The scooter uses a BLDC Motor Contoller (JH Brand model A6080B8P3 M TMK6) with a voltage of 60 V DC.
We want to be able to better predict the range of the scooter so we know how much it can go. The scooter comes with 4 bars of battery levels which is not reliable. We would like to translate it to get the distance. Our PCB (comprising of Arduino) can give us the voltage. We will know the distance that was driven since the last full charge. Can someone help us with ideas on how to build this model?
Help will be appreciated!
Many thanks!


texts:
I have a 12V DC motor that I plan to run in one direction with PWM input at 21A. However, in the other direction I want to drop the voltage to limit the speed. Ideally. the regulator would sit between the motor controller and the motor. The current draw is no more than 8A in this direction. What is a robust voltage regulation solution that can handle a nasty PWM input at relatively high current?

Alternatively, how could I limit the duty cycle of the PWM  in one direction with hardware given the above conditions?


texts: MOSFET for switching 12 V, 17 amps using 3 V signal

texts: I trying to find a MOSFET transistor that I can use to switch on/off a device that has a current of ~17 amps and a voltage of 12 V. I would like to be able to take the 3 V signal from Raspberry Pi to switch it on/off. Does anyone have any suggestions?


texts: Reading T/C voltage when Heater is present in series

texts: I am trying to read the thermocouple voltage of a Hakko T12 tip which has the heating element present in series with the thermocouple. The problem is that 24V DC will be present on T+/T- of the thermocouple when the heater is being powered. I have seen people get around this problem using OP amps that have overvoltage protection like the ADA4177. The problem with this is I want to have good temperature accuracy and that would mean that I would have to add an external ADC and also add cold junction compensation. Ideally I would like to use something like the MAX31855 which already does everything I want but I can't come up with a solution that would prevent 24V going to it and also maintain its accuracy. Would something like diode clamping work or should I be looking in another direction?


texts:
I have a x4 PCIe(Host) Lane which I am connecting to a PCIe Switch. With PCIe Switch , I have connected 8 PCIe SSD Drives(End points).

When I am doing power up, the PCIe Bus is getting enumerated & my drives are coming up. My design supports hot plugging of PCIe Drives. During power up , all 8 drives will be enumerated & will be allocated resources.I need clarification about below mentioned cases :-

In case, I want to remove a drive & hot plug another drive, will it get auto-enumerated?
In case, I have only put 6 Drives initially. After Powering up, I am hot plugging another 2 drives, will they get enumerated on the go?

In both the above cases, I don't want to enumerate entire PCIe Bus as another drives might be doing some operation. Only, the specific hot plugged drive should get enumerated. Please help.


texts: Can an old pentium III processor still be useful?

texts:
I have an old PC around the house, and i have no use for it at the moment. I was thinking (in the good old DIY (AKA Destroy It Yourself XD)) about scavaging the computer for whatever parts i could re-use. I have an arduino UNO, and often I find myself needing more sampling rate or faster computation and I thought that using that old pc's Pentium III processor might be a good idea. However, since I'm not that familiar with processors (only with arduino) I was looking for some pointer on how to make use of it. A few ideas I came with are:

An oscilloscope
A general-purpose meter (think home automation)

If you could give me some pointers about the feasibility (or even how to make something) out of those parts, much appreciated. Oh, and if you have any ideas for projects (preferably space-related since it's my major) please share them with me.


texts: Can you use a SPST to turn on and off two power sources?

texts:
I have several batteries in series and the ground point is in the center, such that I can achieve a negative and positive voltage. The OP amp uses both negative and positive voltage. Let's assume I am using two 9v batteries.

If I were to place a SPST on ground, is this sufficient? My confusion/worry is if I have the switch open, then it essentially is creating a 18V source:

With the switch open, the chip will have no source to the battery center tap. This seems safe but the chip would still be connected to both ends of the in-series 18V source (since it required the positive and negative 9v.)

Could the circuit somehow be closed inside of my op amp and pump double the voltage through my chip? Should I be using a DPST like this instead:


texts: LDO maximum output current during short circuit

texts:
I am using this IC - LIN Mini system basis chip - TJA1128

Using the LDO in that IC to generate 3.3V with 50mA of load current. I see that the maximum output current capability of the IC is 85mA.

But where to find the data on what will the maximum current during short circuit conditions?

Is it on the page 26 table - Io(sc) - Short-circuit output current = -200mA to -85mA. (If this is it then why have they indicated with the negative sign?)

I tried to short my 3.3V to ground for a brief 150ms, I get around 180mA (measured using scope with a current probe).

Shorting just by tapping the wires and doing it manually.

My questions :

Where to find the data regarding the maximum LDO short circuit output current? Is it the one which I have mentioned. If so, why have the given in negative figures?
How does the IC limit the current to only that much? What is the internal mechanism?


texts: Why do old batteries take the same amount of time to charge

texts:
I have a laptop that has a battery that is reaching the end of its life. Despite the fact that it is only running at around 35% of the capacity, it still takes the same amount of time to charge. Does anyone know why this happens to be so?

If this is better off on another stackexchange page, please let me know.


texts: Lengthening charging time of a capacitor

texts:
Alright, so I got a circuit that charges a capacitor and I want to charge it to a fixed voltage in a longer time than than the current provided would have (as the current provided would have charged it several times faster).

I can drop the provided current by putting a resistor, but I don't want to create feedback to the circuit that provides the current.

Well, I like minimalistic solutions, so I decided I would simply let the capacitor leak. Basically, I'll be putting a resistor to redirect a good portion of the current.

simulate this circuit – Schematic created using CircuitLab

-- where voltage potential 1 (V1), in respect to ground, may be less than or equal or greater than voltage potential 2 (2), in respect to ground.

I say "leaking" the capacitor because a lot of time, the capacitor wold be directly grounded and the redirected current would not be used anywhere, so it might as well be flowed back to ground. Hence, it's like placing a resistor in parallel with the capacitor, leaking it:

simulate this circuit

I have no idea if this is already being used, but my initial Googling didn't turn up a lot of hits. So I guess even if this is already being used, I don't know of any good sources that will guide me theoretically.

So my question is, given parameters

voltage source
resistance (R)
capacitance (C)
time

What are the equations describing this configuration, in ranges

V1 < V2
V1 = V2
V1 > V2

Or maybe just V1 = V2, as I'm using the configuration in figure 2.

I would hazard a guess that it's C = (I*t)/V ... But I don't know how to split the current (I) between the leaking resistor and the capacitor. Also (I'm not that sure) I think one has to take into account that the splitting of the current will change over time, as the capacitor gets more charged. Then again, one can simply assume that the charging is linear like we do with charging/discharging in smoothing capacitors.


texts:
I have a circuit diagram which is for a circuit used for testing batteries under a load, only one of the batteries can be tested at a time and I was just wondering what the point of the diodes in the circuit are:

I understand what the circuit does, I am just not clear as to why the diodes in this circuit are necessary, why can't the 100k resistors just be connected straight down to ground?

Just in case you were wondering I am not familiar with this circuit, I have been handed it to look at and haven't just gone about putting components in without knowing there use.


texts:
I have been tracing PCB for the first time and came to a few questions regarding GPS antenna selection and placement on PCB.

Basically, I am trying to make as small as possible PCB with GPS/GSM modem.
On the top layer, I placed a GPS antenna, on the bottom - GPS/GSM modem.
PCB is 30 x 30 mm size.

Can I place GPS/GSM modem directly below GPS antenna or should I move modem to the opposite side of PCB as much as possible? (I worry that there will be GSM antenna traces directly below GPS antenna).
Now I selected 25 x 25 mm GPS patch antenna. Should I select smaller antenna (18 x 18 mm) to have more space for better placement of modem (not directly below GPS antenna)? What is better: bigger antenna but modem directly below GPS antenna or smaller antenna but the better placement of modem?
As I understood, in order to get the best performance, the entire layer with GPS antenna must be plain ground. But what about inner layers (2nd and 3rd)? Should it be etched below antenna or it is better to make there ground pads too?

Thank you in advance for your time answering questions.


texts:
I mean it this fits a logic function or its the way its reduced only.
This is the truth table
\begin{array}{|c|c|c|c|}
\hline
A & B & C & V\\ \hline
\hline
\hline
0 & 0 & 0 & 1\\ \hline
\hline
0 & 0 & 1 & 0\\ \hline
\hline
0 & 1 & 0 & 0\\ \hline
\hline
0 & 1 & 1 & 0\\ \hline
\hline
1 & 0 & 0 & 0\\ \hline
\hline
1 & 0 & 1 & 0\\ \hline
\hline
1 & 1 & 0 & 0\\ \hline
\hline
1 & 1 & 1 & 1\\ \hline
\hline
\end{array}

$$ABC+\bar{A}\bar{B}\bar{C}$$

I was thinking of an XNOR of 3 inputs , but it is not.
The Karnaugh map suggest thats the minimal expression.

\begin{array}{|c|c|c|c|c|}
\hline
 & 00 & 01 & 11 & 10\\ \hline
\hline
\hline
0 & x &  &  & \\ \hline
\hline
1 &  &  & x & \\ \hline
\hline
\end{array}


texts:
OK, working on a project that would require the use of only one LED or mini bulb from a Christmas tree string of lights. I understand I can't use them direct from 110 volt or it will blow a circuit or ruin bulb. Can I put a resistor inline with the wiring to make it work and if so what kind or size. I need to use 110 volts input. Do not want to use a transformer for size and space reasons.Also is there something else I can use for this purpose, just need it to glow. Thanks

UPDATE: Ok I am using a suggestion form one of you all and decided to go the Neon Bulb route, but now would like something a little bit brighter, are some neons brighter than others? I tried the neons and not quite bright enough. Thanks


texts: What happens when two different voltages are connected to a car battery

texts:
I have purchase a battery charger solution that has a two part system.  I am having a few problems with it which has led me to realise that the unit supplies two different voltages to the battery at any point in time.

The system has two units, they are both connected to the alternator and the battery in parallel.

The first unit is effectively a solenoid, it delivers up to 120Amps directly to the battery.  It does not change the voltage, whatever voltage the alternator is outputting gets delivered to the battery.

The second unit is a "smart charger" DC/DC converter, it takes the alternator input and converts at the output to a particular charge profile.  This can be up to 14.7 volts depending where in the charge profile it's at.  It will pass a maximum of 20Amps to the battery.

So together the two units can deliver 140Amps.  Of course this is limited by the amount the battery bank can take and the size of the alternator.  MY alt is 115Amp, the most I have ever seen going into the battery is 63Amps which teters off quite quickly.

Apart from the fact that the two devices are connected in parallel they have no way of communicating with one another.

My question comes about because I always understood that you couldn't connect DC sources of different voltages in parallel.

So if my alternator is outputting 13.8 volts (which it seems to do all the time) and the DC/DC converter is outputting 14.7 volts, which it will do at some point in it's charge profile, what voltage does the battery see and how can this even work?

The product in question is a CTEK250 and CTEK120 for further reference.

Thanks

Block Diagram:

The earth cable from the SmartPass is tiny (0.05mm2??), while the positive cables need to be 35mm2.  The cables to/from the DC/DC smart charger are all 4mm2.


texts: Modifying headset's microphone to hear from it?

texts:
Problem?
I have a headset with a microphone, like this:
This is my headset http://www.gd-wholesale.com/userimg/21/3701i2/stereo-headphone-with-microphone-q-805mv-801.jpg
Good for you. What do you want?
I want to use my headset's microphone as a real microphone.
It's already a real microphone, you noob.
Sorry for ignorance, let me explain. I want to say something to my microphone and I want to hear what I say from microphone, like singers and reportes do. I will use it as something like voice volume booster. I plan using a battery for energy, and headset's circles to hear from microphone. I disassembled my headphone but I don't know what shall I do know. I don't know which cable wire I must connect to which cable wire.
I'm waiting for your answers.
Thanks in advance


texts: Does conductance in the transmission line model represent a physical quantity?

texts:
For context, someone asked a question on amateur radio SE which I'm having difficulty completely understanding myself:

Why is coax loss logarithmic?

I'm not looking for an answer to that, but rather it's made me realize there are some more fundamental concepts I don't fully understand.

Say we take a typical transmission line model, with inductance, capacitance, resistance, and conductance distributed throughout the line:

simulate this circuit – Schematic created using CircuitLab

The characteristic impedance is:

$$ Z_{0}=\sqrt {R+j\omega L \over G+j\omega C} $$

So wouldn't that mean if we expect to have a transmission line with a real characteristic impedance, it must be that \$R/G = L/C\$?

So then I wonder, do non-real characteristic impedance transmission lines exist? Are they typical? What does it even mean to have a non-real characteristic impedance?

If no, my understanding is G represents the conductivity of the dielectric, while R represents the resistivity of the conductor. Each being lossy non-ideal properties I'd guess the goal is to minimize them, but if hope to achieve a real Z0 this means carefully matching the non-ideal properties of both the conductor and the dielectric, ideally in a way which holds over a wide range of frequencies. Sounds difficult.

Or is it that R and G don't directly correlate to physical quantities, and they are just values mathematically selected to fit the equations to the behavior of the circuit?


texts:
i want to create a 40KHz sine wave with a STM32 Controller and an external DAC. I created my SPI connection to the MCP4922 and sending a sine wave table to it.
The init function of the SPI interface looks like this:

static void MX_SPI1_Init(void)
{
  hspi1.Instance = SPI1;
  hspi1.Init.Mode = SPI_MODE_MASTER;
  hspi1.Init.Direction = SPI_DIRECTION_2LINES;
  hspi1.Init.DataSize = SPI_DATASIZE_16BIT;
  hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
  hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
  hspi1.Init.NSS = SPI_NSS_SOFT;
  hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
  hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
  hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
  hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
  hspi1.Init.CRCPolynomial = 10;
  if (HAL_SPI_Init(&hspi1) != HAL_OK)
  {
    Error_Handler();
  }
}

At the beginning i had a sin wave table with 50 values. The MCP4922 was generating a nice wave like i expected it with 400 Hz. So i reduced the values.

uint16_t sine_wave[] =
{
0x800,0xcb3,0xf9b,0xf9b,0xcb3,0x800,0x34c,0x64,
0x64,0x34c,0x800,
};

It is still a sine wave but very edgy, the frequency increased to 4,3 KHz.
The function i call to send the data to the mcp4922 looks like this.

void MCP4922_SendByte(uint16_t dac_data)
{
  data[1] = ((dac_data >> 8) & 0x0F) | 0x30;

  data[0] = dac_data;

  HAL_GPIO_WritePin(GPIOA, SPI1_CS_Pin, 0);

  HAL_SPI_Transmit(&hspi1,data, 1, HAL_MAX_DELAY);

  HAL_GPIO_WritePin(GPIOA, SPI1_CS_Pin, 1);
}

So my question is, how can i change my code or my hardware setup to generate a 40KHz sine wave. Is it possible to increase the speed of my SPI transmission?


texts:
Different articles and tutorials provide somewhat contradictory information about ground loops.
For a balanced (differential) connection, the return path is "the other wire" in the differential pair. Despite the complete circuit, it is recommended to connect a ground wire as well. This is to assure that the difference between Ground A and Ground B is always within the common-mode range of the receiver.
However, in other places, it is mentioned that even for a balanced (differential) connection, connecting the ground wire could cause a problem. For such cases, it is recommended to use some sort of ground-lift adapter along the path of the ground wire to eliminate the "ground loop". If that is the case, then why do we even need the ground wire for a differential pair in the first place?
Even if there is a potential difference between Unit A and Unit B, connecting the ground wire will still create a ground loop, which will cause noise (hum), rather than solving the common mode range of the receiver!
How does connecting the ground wire work? When do we use it, and when do we avoid using it for a differential pair?


texts: Differential low pass filter to single ended -> Differential low pass filter

texts:
I'm designing an audio DAC based on the PCM1690 from TI. Datasheet

One requirement of the DAC is differential outputs. Since the PCM1690 has differential outputs, this is not a problem. However, the design of the low pass output filter is unclear for me. Figure 40 of the datasheet shows an example circuit, but this circuit converts the signal also from differential to single ended. What changes are needed to make this circuit a differential low pass filter alone? My assumption is to remove C1 and R1, R2 and R3 connected to the + input of the opamp. Is this correct?


texts: Simple reverse and forward controller for a 24v dc motor?

texts: I have a project for my grand father and I would like to make a simple switch for his electric wheelchair. The controller of the wheelchair is already not working. Just a simple switching just to make it working. Specification: 2 motors 50A max 24vdc each. If I push the switch in forward the two motor will move in forwad motion and same in reverse mode. For turning right and left only one motor will move. If turning left only the left motor will move. Pls help me to this project it will help alot to my grand father. Thanks in advance.


texts: How to deal with inrush current tripping circuit breakers?

texts:
I have a temperature controller supplied with 230VAC via a 0.5A circuit breaker curve C. The thing is, the MCB trips as soon as power is turned on. I have measured the inrush current profile without the MCB with a current probe: up to 90A for 20ms!

I can see three options:

A capacitor is first charged when power is turned on, and a second "power" switch allows the capacitor to discharge. I don't want another switch, so I'd rather avoid this option.
A RC + MOSFET ramps up the voltage. If possible and safe, I'd like to avoid adding components as it is a real hassle to go through the design update process.
The 0.5A nominal is changed for 10A. This is the quickest option as I have some around and it doesn't take much to change a value on a drawing and get it signed off; however that allows more potential destructive power in the downstream components (a couple of relays, a AC/DC, in addition to the controller). The technician used the same wire gauge everywhere, so up to 10A wouldn't melt the wires.

Is there any other option I am not aware of? If there isn't, then this post serves to those in the same situation. After all that's what forums are for.


texts: Finding the Thevenin equivalent Resistance for circuit with voltage-dependent sources

texts:
A linear circuit containing two voltage dependent sources, as shown. The elements in this circuit have the following values: \$R_1 = 7.2k\$ Ohms, \$R_2 = 12k\$ Ohms, \$R_3 = 3.3k\$ Ohms, \$\alpha = 0.025\$ A/V and \$\beta = 5\$.

Calculate the numerical value for the Thevenin equivalent resistance for terminal A-B.

I am having a hard time solving this. Letting \$i\$ be the current flowing into \$R_3\$, \$i_1\$ the current flowing through \$R_1\$ and \$i_2\$ the current through \$R_1\$—and the node between R3 and R1 be e_1;

Using KVL and KCL, I've managed to find that

\$i + I = i_1 + i_2\$
Hence \$\frac{e_1-\beta v_2}{R_3} + \alpha v_1 = \frac{v_2}{R_2} + \frac{v_1}{R_1}\$

also from one of the loops around V, R3 and R2, I have \$e_1 - 2\beta v_2 + v_2 = 0\$.

I have 3 unknowns so far, so I'm trying to find another equation, but I'm not sure what to do from here.


texts: Why are capacitors sold with imbalanced tolerances?

texts:
Short version: Some capacitors (and presumably some other components) are sold with imbalanced/asymmetrical tolerances. Why?

Explanation:

Many ceramic capacitors are marked with, for example, +80% -20% tolerance or something similarly imbalanced.

For example, let's say that I have a capacitor with the (admittedly contrived) value of 17pF and a tolerance of +80%, -20%.

(Please ignore abuse of significant figures.)

Maximum value: 17pF * (1 + 80%) = 17pF * 1.8 ≈ 30.6pF
Minimum value: 17pF * (1 - 20%) = 17pF * 0.8 ≈ 13.6pF
Mean value: (30.6pF + 13.6pF) / 2 ≈ 22.1pF
Tolerance above mean: (30.6pF - 22.1pF)/22.1pF ≈ +38.5%
Tolerance below mean: (13.6pF - 22.1pF)/22.1pF ≈ -38.5%

It would be fair to say that this supposedly "17pF" capacitor is virtually identical to a 22pF capacitor with ±40% tolerance.

By a similar process, a 10000pF +80% -20% capacitor (a real value from a catalog, not contrived) should be the same as a 13000pF around ±40%.

So, if I say I want a component of a given value, why am I being sold something that's quite a bit more likely to overshoot than undershoot this value? Is this imbalance useful to anyone?


texts: Two MAX3140 (SPI to RS485) connected to one another

texts:
I would like to ask if anyone had experience using this kind of IC, i had this school project where i have a lot of sensors using SPIs (each is 10-20 meters away from uC) and these needs to be somehow far from the main controller (uC). I knew that SPIs don't work well when implemented too far from the SPI master or SPI co-slave, so upon searching alternatives, i bump into some ideas like:

use two uC and convert SPI to RS485 then convert RS485 to SPI
use two uC and use their UART and convert them to RS485 then vice-versa
use two uC and apply Ethernet/PoE between the two
implement long distance SPI

i would like to re-consider the latter but i would like to try out first the former, then found this IC MAX3140, I'm totally new to this kind of data protocol connection when it comes to long distances. I have this image below where i want to use the IC in this kind of setup.

Did i get the gist of using these IC right?

https://www.maximintegrated.com/en/products/interface/controllers-expanders/MAX3140.html

i guess i do understand this structure below based on its datasheet

as you can see, there's only one Max3140 IC used and that'll only be (1) SPI to RS-485 alone. What i want to know if the below structure work out same since not specified on datasheet (using the IC vice-versa also, (2) RS-485 to SPI). Can it be the one way around? how about clock, etc?


texts:
I was trying to understand UART fundamentals.It is understood that

It is an asynchronous communication protocol and hence the TX and RX clocks are independent of each other
The data reception is guaranteed by the usage of start bit and one or more stop bits.Additionally the receiver must be aware of the data rate so as to generate suitable clock to drive the SIPO register used for  reception.

The questions here are

It is mentioned that normally a clock of 16X the bit rate is used to recover the data. So how is the conversion of bps to clock frequency possible? Please provide me some references to study the clocking mechanism employed in UART receiver.


texts: How can I program a surface-mount Atmega328?

texts: I want to program a surface-mounted Atmega328 before soldering it to my board. I have an AVR Dragon board that is capable of ISP. This works fine with DIP Atmegas where I can just pop them into a ZIF socket and program them. But how would I program a surface-mount Atmega328?


texts: Floating point addition. Are guard, round and sticky bit always necessaryl? analysis of a special case

texts:
I've a particular case of floating point addition. As you know for given floating point numbers \$x,y\$ one of the steps of the addition involves the fixed point sum:

$$
s = 1.m_x + (-1)^{s_x \oplus s_y} 2^{-\delta}1.m_y,
$$

I'm assuming $ |x| > |y| $, sx and sy are inputs signs, delta is the exponent difference. In all my reference the utility of the guard, round and sticky bits is always explained when a subtraction is performed, who would imply  a left shift as normalization step. I have now this special case to analize

$$
t = 1.m_x + 2^{-\gamma} 1.m_y + 2^{-\delta} 1.m_z
$$

where
$$
0 \leq \gamma \leq \delta.
$$

It easy to see that the normalization process in such a case would always imply a "right" shift, never a left shift. I want to perform a correctly rounded operation so I would like to understand how to implement it. As a start point I started from the computation of s, I propose to analyze this special case:

$$
s = 1.m_x + 2^{-\delta}1.m_y,
$$

Are in this case still necessary all the three special bits? or are just two of them necessary? (guard and sticky maybe?)

Once answered to that question how can I understand how many bits to look at when I perform the sum of three numbers?


texts: Sanity check: Using the DS3231 as a clock source for uC

texts:
The DS3231 is an RTC chip with an onboard temperature compensated oscillator and 32kHz output.

I want to use this chip in a small clock project I'm designing because I've got a couple lying around. Since it's got the the 32kHz output, I want to use that as a main clock source for the microcontroller (PIC18F4550) and skip the discrete XTAL to save on space and BOM.

All the examples I have found use a higher-speed crystal to drive the main microcontroller and ignore the 32kHz output of the RTC, although sometimes the 32kHz is used to drive other circuitry.

This is making me doubt my design decision, but I haven't found anything that outright says I can't do it. Are there any gotchas I should know about before I fab the board? I realize that by using this method I don't have a second clock source to tune the oscillator. I do plan on prototyping it.

Here is my schematic:

(The TPS chip is a 3.3V regulator connected right up to the 9V battery. EN should read /EN)


texts: Clock generator/synthesizer, Frequency generator/synthesizer. What is the difference?

texts:
EDIT: Question simplified:

What is the difference between frequency generator and frequency synthesizer.
What is the difference between clock generator and clock synthesizer.


texts: What OS do I install on parallels to run Quartus II and other design software?

texts:
NOTE: I see a few similar questions on here in regards to Quartus II but I have some additional questions I believe would be best delivered in a new thread.

I'm fixing to run windows 7 or 8 off parallels for my macbook pro v10.8. The whole reason is to accommodate software like mulitsim and Quartus II for school. I've installed parallels already but have not continued with installing any OS until I get some advice. I have three questions that I would appreciate anyone's advice or opinion on.

1.)

I was wondering if Quartus II is compatible with windows 8. I'm sure it is since it's just an updated OS from windows 7 but I wanted to make sure I wouldn't run into any problems. I'm attaching a link below that gives the system requirements for Quartus II. A few things throw me off because it shows it's compatible with 7 but can't find anything about 8.

http://www.altera.com/download/os-support/oss-index.html

2.)

What version should I install 7 or 8? I only ask because I've heard negative feedback on the interface/environment of Windows 8. I shouldn't be needing much functionality with it other than hoping on Quartus II, mulitsim or other related software for class projects and labs.

3.)

From my understanding ubuntu is a Linux derived OS. I like the interface/overlay of ubuntu and would prefer it above windows. However, can I run Quartus II of it? Again the link I posted above shows some Linux compatibility but can't find anything about ubuntu. If so would this be a better option or would I get more compatibility with windows 7 or 8 for circuit/design specific software?


texts:
I need to know which platform would be the cheapest, most creative (in terms of flexibility and audience support). I want to introduce a hobby platform. Thus far, I'm toggling between Arduino and PIC. I need to take the cost of the board to the bare minimum possible.
My audience are novices. It shouldn't be too complicated, yet it should be flexible enough to let us create as many projects as possible. This means compatibility with external sensors should be good.


texts:
I wish to experiment with GPIO line protection circuits in the form of Transistors, Zener and Schottky diodes with resistors.

What might be a simplistic 5v GPIO equivalent circuit to test if my protection experiments are clamping my test spikes. Would be nice if it drives a Led so I can see when failure has occurred.

I have a device that uses a PIC16F917. It has the traditional pull up to 5v and ground button to toggle the units activity. Because this input is extended off the device with a push button. The cable is acting like an antenna and one in five device fail due to installation where the push button cable is extended. Sharing plastic trunking with other power cables.

Datasheet says the port/bit that I am interested in it is a TTL compatible input and CMOS output. Input current clamp is 20ma with 0v to Vdd I believe.


texts: proteus simulation of overheat protection of motor winding's circuit using ptc

texts:
I want to design a circuit about the overheat protection of windings by using PTC.
As I try it out in Proteus, I came across these questions below;

1) Thermal Contact Res. (°C/W)

2)Thermal Res. to Ambient (°C/W)

3)Time constant (s)

this is the component that I am planning to use http://www.farnell.com/datasheets/2124871.pdf?_ga=2.233487134.1893456765.1569234274-1786565734.1568026869

how can I obtain those values from the datasheet?
Thank you so much for your consideration in advance. Any other advice about overheat protection windings is so welcome.


texts: why current lags 90 deg behind the voltage when inductor is present?

texts:
When we supply a voltage to an inductor then the phase difference between voltage and current is 90 deg (ideally).

Mathematically I have seen how it becomes 90 deg but can anyone help me to understand it in an intuitive way?