texts: Diode small signal model and exponential model comparison

texts:
I'm working my way through the chapter on diodes in Sedra and Smith Fifth Edition

Exercise 3.15 asks:

  Consider a diode with \$n=2\$ biased at \$1ma\$. Find the change in current as a result of changing the voltage by \$(a) -20mV (b) -10mv (c)... \$ etc. In each case , do the calculations \$(i)\$ using the small-signal model and \$(ii)\$ using the exponential model.

so for \$(i)\$ we find the diode small-signal resistance with: (page 161.)

\$ r_d = \frac{nV_t}{I_d}\$ with \$V_t = 25mv\$

\$ r_d = \frac{50mV}{1mA}\$

\$ r_d = 50\Omega\$

so then it's simply

\$\Delta I = \frac{\Delta V}{50\Omega}=\frac{-20mV}{50\Omega} = -0.40mA\$

This agrees with the answer given.

For \$(ii)\$, the exponential model:

\$ I = I_S e^{\frac{V}{nV_t}}\$

and as per the book, this can be used to get: (page 150.)

\$\frac{I_2}{I_1} = e^{(V_2-V_1)/nV_t}\$

substituting in the values:

\$\frac{I_2}{1mA} = e^{-20mV/50mV}\$

\$I_2 = 0.67mA\$

this does NOT agree with the book:

the answer given is:

\$0.33mA\$

which can be gotten by

\$0.67mA - 1mA\$

so I think I have made a small mistake, but I have been stuck on this for last two nights so I thought it was time for some help.

All advice is appreciated!!!


texts: I'm trying to update the code on a STM32F407vgt06 mcu using OTA. Using python code, the new program is sent in packets of 128 bytes through MQTT and the bootloader on the mcu checks the crc and then writes it into the flash. The issue is that it takes upto 4 hours to update the mcu. I was wondering if there was a way to improve the performance of the OTA download or is it possible to use MQTT to update the mcu, would it be better to use FTP instead.


texts: Analog and digital ground plan with isolated DC-DC converter

texts:
I use two isolated DC-DC converter in parallel from 24V

One TDN 3-2411WISM (single output) to create 5V for the "digital world" followed by LDO to create 3V3 and GND for the VDD (+Vout) and VSS(-Vout) of my microcontroller (STM32).
One TDN 5-2422WISM (dual output) to create -12V (-Vout), +12V (+Vout) and AGND (Com.) for the "analog world" followed by low noise linear LDO to create -3V3 and 3V3 for opamp amplifier chain and for VDDA and VSSA of my microcontroller (STM32)

So, I got two ground plan AGND and GND, I wonder:

It is ok to use isolated DC-DC in this case?
Do I need to connect the two ground plan AGND and GND (in one point)?
Can I connect the two ground plan AGND and GND nearby the VDDA pin of the STM32, it is judicious?


texts:
I am currently working with SIMCom's SIM808 2G+GPS modem. In my setup, an MCU communicates with the modem over UART to save some data in the SIM808's filesystem. As the modem's built-in memory is < 100KB, I want to add an SD card to the filesystem and save data to it through AT commands passed between the MCU and SIM808.

The problem is, I am unable to access the SD card from the SIM808. According to SIMCom's docs (links below), the AT command AT+FSMEM should return the drive letters and free memory count of both the internal memory (C:) and the SD card. However, in my case it always returns only the "C:\" and its free memory count. I am aware that the SD card functionality has to be enabled in the modem, thought I don't seem to grasp the practical difference between AT+SDMODE=1 and AT+SD2PCM=0. The SDMODE command works fine on my setup, the parameter is saved and remains set after power cycling, but it still doesn't change anything in the filesystem. In contrast, the SD2PCM command is never read correctly by the modem and always gives a cheerful ERROR, no matter if I want to set the param or just read it. I don't know if both these commands have to work in order for the SD functionality to be enabled, as my sources give contradictory or incomplete information. All operations on the files stored in SIM808's internal memory work flawlessly. It might be relevant to mention that SIMCom lists both aforementioned commands as enabled only on certain devices, but then lists SIM808 explicitly for both of them.

My setup is a custom board so there is a risk of improper connections, but I followed the reference circuits in SIMCom's Hardware Design doc for this component and all other features work properly. An improvised setup made with modified off-the-shelf components (Arduino, Waveshare SIM808 Shield and a SD card breakout board) shows identical symptoms. My scope shows zero activity on any of the SD card's pins (obviously except powering the VCC up from VEXT when the modem wakes up), so this brings my attention to the modem's inner workings. I have tried the following firmware versions: 1418B03SIM808M32_BT_EAT, 1418B04SIM808M32, 1308B02SIM808M32.

I have followed the AT commands manual:
http://simcom.ee/documents/SIM808/SIM800%20Series_AT%20Command%20Manual_V1.09.pdf
An app note about the filesystem-related ATs:
http://simcom.ee/documents/SIM800x/SIM800%20Series_FS_Application%20Note_V1.03.pdf

And the Hardware Design doc:
https://cdn-shop.adafruit.com/datasheets/SIM808_Hardware+Design_V1.00.pdf

Also I have been getting firmware packages from this directory:
http://simcom.ee/documents/?dir=SIM808

I also read up about a relevant Arduino library, whose authors sell a product with a working setup like this and also posted info on enabling the SD card:
https://elementztechblog.wordpress.com/2016/12/20/interfacing-sd-card-with-e-tracker/

https://elementztechblog.wordpress.com/2016/07/30/interfacing-sd-card-with-sim800-gsm-modem/

I really hope I'm missing something obvious, but I've no idea how to proceed from here. It's even more puzzling to me as I've been working with these components for a while and even if serious problems arose, digging in the docs always brought solutions. If some essential info was left out, please point it out and I'll be happy to elaborate.


texts: Fast Fourier Transform (FFT) of power consumption signals

texts:
I want to compare two power consumption signals, i.e., how the power consumption varies throughout a day. Now I have two options:

Take two raw power signals and compute the Euclidean distance between them
Convert the input power signals using Fast Fourier Transform and then take Eucliden distance  of outputted FFT signals

I was ok with  the first option, but recently I remember that I read about second option somewhere. So, my question is - which option is better? and what is the intuition behind taking the FFT of input power time curves.


texts: Demodulaion of AM (modulate signal is square wave)

texts:
MY modulate signal is square wave. When I used the diode detector technique to demodulate AM signal I get a distortion.
what technique  is used to demodulate the AM square wave ?


texts: How Can I Find “temperature coefficient” of a Battery?

texts:
I am studying mathematical modeling of a battery in simulink and for this it is necessary to determine some parameters. I'm stuck in the part where I need to determine an alpha parameter, which would be the relation between capacity and temperature. Not all battery manufacturers provide this parameter and would like to know with the author or how I could get to the value of it to proceed with the study of the model. Below the discussion that deals with the subject and attached the paper about it.

Paper: https://drive.google.com/file/d/1u__5DWaSZtZ60xpXi2b1eJa0bVuv8yyt/view?usp=sharing

UPDATE

Looking for some manufactures data I found a data sheet with some informations I think can help me. So, with this specifications what is the value of alpha ?


texts: Parallel led segment with (1 led) and (2 led in serie) without resistor?

texts:
I try to understand this datasheet:

How it's can be possible to have in parallel (1 led) and (2 led in serie) without resistor for the led alone?

[Edit]

Here the only "datasheet" that I found:
https://datasheet.lcsc.com/szlcsc/1-2inch1bit-Red-digital-LED_C53679.pdf

https://lcsc.com/product-detail/Led-Segment-Display_1-2inch1bit-Red-digital-LED_C53679.html

[Edit]

Here what is inside:


texts: Antenna tuning & impedance matching, do i need to connect the IC?

texts:
I want to make a pcb rf trace to use it as an antenna, for a bluetooth IC. I have already studied the basics of impedance matching and antenna tuning, smith chart and antenna clearance.
The specific project is on my github, if anyone is interested: https://github.com/Basilisvirus/QFN48-nRF52811-Bluetooth-5.1-KiCad-and-Altium-Designer ,where i have a folder 'Antenna Design' with whatever i have studied.

My question is,

a) while i am tuning the antenna do i need to have the IC connected to the antenna?

b) while i do the impedance matching, do i need to have the IC connected to the antenna?

I will use a Vector Network Analyzer for tuning. I have a miniVNA Tiny available from a friend for that.

My guess is, probably not, but i wonder since my antenna has a ground connection [see image 2]. But i want to be sure, since the ICs i bought and the pcb printing are expensive for me, and i want to make it right on the first attempt.

I am right now building a pcb antenna without the chip footprint,
image below:

GND connection of the antenna [design found in github/antenna design folder]:

Thank you.


texts: Can we store hex data through UART into flash and RUN it from that particular location

texts:
I am trying to store my hex file in another sector of the flash memory i.e (0x00050000)
I want to store a hex file at different sector of the flash and to change the execution point to that address through my bootloader. I am able store and change the address through the MCUExpress IDE. Now i want achieve the same without using the IDE.

Through IDE:-
I have flashed the .hex file at 0x00050000 and i'm changing the execution pointer to this address through MCUExpress IDE settings.
At 0x00000000 i have my boot loader code which changes the execution point to 0x00050000.

When i write the .hex file(Some data)(Image 2) content at the location 0x00050000 , i observe that the stored hex data at the address is different . I checked it through flash magic.
My data is being displayed in the ASCII region rather than the Hex region of the display memory in flash magic.

Image 1 : The Hex Data and its ascii form when observed through flash-magic when actual hex is flashed through IDE

Image 2 : Hex data when written through the application code.

So how to copy the hex into flash through application code ? Is there any conversion happens while flashing the hex file ?


texts: working principles of Electronic Throttle Body

texts:
Could someone shed some light on a working principle of this Electronic Throttle Body from MagnetiMarelli? (Found in BMW R1200GS motorcycle).

Seems to be contactless feedback via the 4 tiny pins. The two big pins go direct into the motor.

Can't measure the resistance on the tiny pins, as it floats.


texts: Reason for the output capacitance in boost converter being higher than that in buck converter

texts:
Understanding the main difference in utility of a boost converter (step-up) versus a buck converter (step-down). May I know how if there is an intuitive explanation as to why the capacitors we choose for boost converters are usually of higher capacitance as compared to buck converters?

Is it because a higher voltage output (due to voltage gain >= 1) is expected, hence the corresponding voltage ripple needs to be further filtered and minimized with larger capacitors. Or are there more accurate explanations to this practice?

Thank you.


texts:
Previously, I tried to make a cusotm PCB with a tm4c123gh6pgei (https://electronics.stackexchange.com/questions/176117/tm4c123gh6pgei-custom-pcb)

After investigation of that PCB, I was able to observe that the JTAG communication occured but because of Faulty design , the MCU couldn`t be programm.

Now, I am doing a second version with a smaller MCU tm4c12333h6pm ( 64 pins instead of 144).

My question is how to verify your PCB? Now, I followed more carefully the design PCB rule: putting VDDC cap and VDD cap very close to the MCU and much shorter JTAG line but still I feel like I doing a "blindshoot".

I got access to an Altium Designer license, can you use this software to verify the PCB implementation? How can you check that your PCB design is okay? Is it a empirical procedure or you can  somehow check if a Design is flawed from the beginning?

Here is my PCB layout:

Here is my schematic layout:

I can send you the AD files if you have enough rep ( I just don`t want to put in public the files)

[EDIT]

I went for 4 layers. Here is the new screenshoot:


texts:
simulate this circuit – Schematic created using CircuitLab

I am using a L293D to light up LED's.
I provide a 24 volt To light up my LED's.
Courant comsuption of each LED is 30 mA.
The maximum number of LED's I turn on is 10 (current of 300 mA).
Minimum LED's I trun on is 2 (current of 60 mA ).
Is the L293D appropriate for my application ?
Am I in the recommended operation range of the L293D ?


texts: Basic circuit voltage question - Using a driver to control a stepper motor

texts:
I'm pretty new to electronics. I'm using an Adafruit ESP8266 microcontroller connected to a L293D motor driver to power a bipolar stepper motor. I'm struggling to understand the various voltage levels throughout the circuit. For example, the datasheet for the L293D has a supply voltage VCC1 ranging from 4.5V to 7V. However the high-level input voltage has a minimum voltage for a logical true of 2.3V. The microcontroller can supply 3.3V. So does that mean i can connect the microcontroller to the L293D, but i would need some other voltage supply connected to the L293D as well that would be in the range of the supply voltage?

Also, the motor requires 12V to run. How do i control the output voltage on the L293D? Do i need to use a voltage regulator or level shifter on the output? Thanks


texts: How to connect 2 different power supplies together

texts: I have a power supply that provide the following outputs (+&-15V) & (+&-10V) sadly this power supply is obsolete so I have to get those voltages from two separate power supplies one that will provide (+&-15V) and another that will provide (+&-10V)the problem is how to connect the 0V because in the machine there is one (0V) from the old power supply now I have two , so should I connect them together ?


texts: How is the code written in ARM7 compatible with ARM9?

texts:
I'm studying ARM families,

In the above image, it is written that the code by supported ARM7 can be migrated to ARM9 and others.

ARM7 uses the Von-Neumann architecture (single bus for data and instructions) and 3-stage pipeline (i.e., fetch, decode and execute). ARM9 and others use the Harvard architecture (separate bus for data and instructions) and 5-stage (fetch, decode, execute, memory and write (for ARM9)). Also, ARM7 doesn't support a memory management unit, but others do.

How can the code be compatible if the processors are using different architectures and pipelines? Won't there be any affect of architectures to the codes?

I'm assuming, as ARM9, ARM10, ARM11 have same architectures, code can be compatible, but ARM7 is different from other processors. Hence, one must do some changes in code before migrating because of different architectures. I'm wondering if it is correct or not.


texts: Voltage divider for monitoring solar/battery

texts:
Can someone please just sanity check my math?
I'm trying to design two voltage divider networks, one for the solar panel and one for a LiPo battery so that I can connect them to my 3.3V ADC (RP2040)
RP2040 Datasheet: https://datasheets.raspberrypi.org/rp2040/rp2040-datasheet.pdf
Page 579 has some info on the ADC.
Someone else also performed their own ADC Tests: https://pico-adc.markomo.me/
I've tried to pick as large a resistance as I have in my box of parts to minimise current drain, which I believe is the correct thing to do.
The 12V solar panel open circuit voltage is ~20V.  Although it will never be open, I'm designing to allow for overhead just in case.
$$
Vout = \frac{(25V)(68,000 Ω)}{68,000 Ω + 470,000 Ω} = 3.16V \because V_{\text{out}} = \frac{V_{\text{in}}(R_2)}{(R_1 + R_2)}
$$
$$
I =\frac{25V}{68,000 Ω + 220,000 Ω} = 0.0000465A \because I = \frac{U}{R}
$$
The same for my LiPo battery, where the maximum voltage will be 4.7V
$$
V_{\text{out}} = \frac{(4.7\text{ V})(470,000 Ω)}{220,000 Ω + 470,000 Ω} = 3.2\text{ V}
$$
$$
I =\frac{4.7\text{ V}}{220,000 Ω + 470,000 Ω} = 0.00000681\text{ A}
$$
If I've done my math right, there should be 0.00116 Watts and 0.000032 Watts dissipated respectively.
Do you think I'll have any problems with these? Are they safe? Are there better values to pick?


texts: Protecting reed switches operating 240V AC relay from welding shut

texts:
I'd be grateful for some advice about protecting the reed switches in this pump-down setup I am installing.

I naïvely thought that the relay alone, which is rated as drawing only 5.3mA, would be adequate to protect the reed switch contacts from welding shut. I now know that this is not the case and that some sort of additional protection is required.
Research led to this post that recommended using a TVS (specifically a P6KE300CA) across the coil.  However, other posts put snubber circuitry across the switches themselves and I'm not confident about what configuration will produce the most reliable results. Advice and suggestions would be welcome.
To give some more details of the application, it is a condensate pump for a gas-fired ducted heating system.  The unit was installed with a pump used for split air conditioners. With a very small reservoir, it ran almost continually and was been very unreliable as, I believe, is often the case with these things.
There is plenty of space for a bigger tank to store the litre or two of water produced in day, so I sought to design a latching circuit that would fully pump out the tank only when full and operate just once or twice a day. The float switches used are on Amazon and were sold as having a contact rating of 1A at 220V AC so I didn't think powering a relay would be a problem.


texts: Turning on an automotive relay when enough voltage is avaialble

texts:
I'm trying to drive a relay off a dome light in a car, where the dome light fades in smoothly. That is, say, I have a constant ground and the other wire goes from 0 to 12V (up to 14V) over a couple seconds. The dimmer is being run by the car's computer.

While the relay does come on, it does so while making a sound of entering a hyperspace. I figured the sound is due to the relay not getting enough voltage during the initial startup. In so far, I've tried a zener diode in series. 5v zener reduces the noise, but not completely. 10v zener is not enough to activate the relay (datasheet claims coil activation is around 8v) due to zener voltage drop. I also tried a capacitor in parallel to the coil 560mu 36V I had laying around seems to work the best. 300mu 24V and smaller did not seem to work. Still, being an automotive application, I'd rather not have a large electrolytic capacitor near the hot roof. Is there a better yet simple solution? A comparator using zener as a reference seems like an overkill. I can also try a much smaller PCB-type relay with a hope of it being more tolerant to the startup conditions. Any suggestions? Bonus points for not frying the car's computer that drives the dimmer!

EDIT:  I have simplified a bit. In reality, I have 3 wires: 12+, ground, and 'door'. With the door closed, the 'door' wire is at 12+, when the door opens - the 'door' wire goes to close to 0. My goal is to convert the 'door' wire into 'interrupted 12+' (no signal when door closed, positive when door open) required by a dimmable mirror.

EDIT2: Would simply comparing ground to 'door' signal make more sense?

EDIT3: My ultimate goals are 1) to provide a positive 'door' signal to a Gentex 221 mirror that came from a Ford using a 'door' signal from Toyota that, upon opening the door, goes from +12V to 0V; 2) trigger a Hella timer relay that feeds +12V to this mirror. My original plan was to use the Toyota door signal to trigger a second relay that would send +12V to the mirror's door pin.

Upon much struggle with the chatter on the relay, I realized I don't actually need the second relay. All it takes is a PNP transistor like 2N3906. The base goes to the Toyota door signal, Emitter goes to +12V, and Collector goes to Gentex door pin. This setup essentially reverses the +12->0 signal from Toyota into a 0->+12 signal sufficient to drive the Timer relay and the mirror's door function.

Now, I'm not 100% positive why the timer relay does not exhibit a chatter; most likely because I'm switching on the full +12V rather than the PWM'd ground.


texts: What are minimum requirements to start of with STA

texts: What are the minimum requirements to start with static timing analysis. I know usage of FPGAs and VHDL. Will that be enough? Are there any free tools for STA pls.?


texts: Is a PD controller necessary if VBUS is always >5V?

texts: I'm trying to implement a board that will use USB-C Power Delivery. We want to operate with 20V 5A input. If we know the source will always be at 20V, is it necessary to put a PD controller on the board? From what I've read, the PD controller is meant to protect the board from sourcing too much current when different sources are being used - since this is not the case for my application can I get away with not using a PD controller? Is there something that I would be sacrificing?


texts: How does the Early effect limit the voltage gain?

texts:
As far as I understand, the  Early effect increases the quiescent Ic for a given Vce.

At the same time texts treat this effect as a limiting factor for the gain.

Here is an excerpt from a text:

  There is one additional quantity we will need on occasion, although it
  is not derivable from the Ebers–Moll equation. It is known as the
  Early effect, and it sets important limits on current-source and
  amplifier performance.

Another text says:

  Does another mechanism in the circuit, perhaps in the transistor,
  limit the maximum gain that can be achieved? Indeed, the “Early
  effect” translates to a nonideality in the device that can limit the
  gain of amplifiers.

But the Early effect increases Ic so it must also increase the transconductance which is gm = Ic/Vt. So if I'm not mistaken, the Early effect causes increase in the transconductance. But why then it is treated as if it limits the voltage gain?


texts:
I'm having a MPU-6050 (gyro / accelerometer), it's connected to Arduino over I2C (via Wiring.h) and everything works well. Now I'm trying to port this code to an Atmel SAMD20 (Cortex M0+), which is bundled with Sercom I2C libraries. I have a connection to the device (it seems), and writing all yields OK, but I cannot read anything...

Arduino

const int MPU_addr=0x68;  // I2C address of the MPU-6050

void setup() {
  Wire.begin();
  Wire.beginTransmission(MPU_addr);
  Wire.write(0x6B);  // PWR_MGMT_1 register
  Wire.write(0);     // set to zero (wakes up the MPU-6050)
  Wire.endTransmission(true);
}

void loop() {
  Wire.beginTransmission(MPU_addr);
  Wire.write(0x3B);  // starting with register 0x3B (ACCEL_XOUT_H)
  Wire.endTransmission(false);
  Wire.requestFrom(MPU_addr, 14, true);  // request a total of 14 registers
  AcX = Wire.read() << 8 | Wire.read();  // 0x3B (ACCEL_XOUT_H) & 0x3C (ACCEL_XOUT_L)

SAMD20

static enum status_code writeByte(struct i2c_master_module* module, const uint8_t byte)
{
    static uint8_t buffer[1];
    buffer[0] = byte;
    struct i2c_master_packet packet = {
        .address = 0x68,
        .data = buffer,
        .data_length = 1,
    };

    return i2c_master_write_packet_wait_no_stop(module, &packet);
}

struct i2c_master_module module;

struct i2c_master_config config;
i2c_master_get_config_defaults(&config);

enum status_code initStatus = i2c_master_init(&module, SERCOM2, &config);
i2c_master_enable(&module);

enum status_code s1 = writeByte(&module, 0x6b); // PWR_MGMT_1 register
enum status_code s2 = writeByte(&module, 0x0);  // 0x0 wakes module up
i2c_master_send_stop(&module);

enum status_code s3 = writeByte(&module, 0x3b);
static uint8_t buffer[14];
struct i2c_master_packet packet = {
    .address = 0x68,
    .data = buffer,
    .data_length = 14,
};
enum status_code s4 = i2c_master_read_packet_wait(&module, &packet);

So all my return values are always OK, but the value of buffer is garbage (all 0's except at buffer[10]).

Anyone knows more about I2C and Sercom?

Edit: Reading the who am I byte (0x75) yields in the correct value. So I'm starting to wonder whether the device actually gets out of sleep mode.


texts:
I am using nested for loops using generate module for creating multiple instances of sub-modules in verilog
this is for finding 4x4 determinant. I generated the sub-modules with inputs given accordingly but I want store outputs in array register serially from (1 to 6) as it runs 6 iterations in tempu[1:6] and tempd[1:6] but generate is not allowing to do so. I tried all the possibilities

    module det_4x4_v2(
         input signed [15:0] a11,a12,a13,a14,a21,a22,a23,a24,a31,a32,a33,a34,a41,a42,a43,a44,
         output signed [15:0] out
        );
     wire signed [15:0]  v1[1:4];
     wire signed [15:0]  v2[1:4];
     wire signed [15:0]  v3[1:4];
     wire signed [15:0]  v4[1:4];
     wire signed [15:0] tempu[1:6];
     wire signed [15:0] tempd[1:6];

    assign v1[1]=a11;
    assign v1[2]=a12;
    assign v1[3]=a13;
    assign v1[4]=a14;

    assign v2[1]=a21;
    assign v2[2]=a22;
    assign v2[3]=a23;
    assign v2[4]=a24;

    assign v3[1]=a31;
    assign v3[2]=a32;
    assign v3[3]=a33;
    assign v3[4]=a34;

    assign v4[1]=a41;
    assign v4[2]=a42;
    assign v4[3]=a43;
    assign v4[4]=a44;

    genvar i,j,count;

    generate

       //localparam count=0;

      //for(count=1;count<7;count=count+1)

    for(j=1;j<4;j=j+1)

    begin:gen_det2x2_sub1

          //localparam count=0;

     for(i=j+1;i<5;i=i+1)

         begin:gen_det2x2_sub2

         det_2x2 m1(v1[j],v1[i],v2[j],v2[i],tempu[count+1]);
         det_2x2 m2(v3[j],v3[i],v4[j],v4[i],tempd[count+1]);

         end
    end
    endgenerate

assign out = ((tempu[1]*tempd[6])-(tempu[2]*tempd[5])+(tempu[3]*tempd[4])+
              (tempu[4]*tempd[3])-(tempu[5]*tempd[2])+(tempu[6]*tempd[1]));
                            // above equation want to implement-------(1)

    endmodule

/*    det_2x2 m1(v1[1],v1[2],v2[1],v2[2],tempu[1]);  //finally want to generate
      det_2x2 m1(v1[1],v1[3],v2[1],v2[3],tempu[2]);   // these modules
      det_2x2 m1(v1[1],v1[4],v2[1],v2[4],tempu[3]);
      det_2x2 m1(v1[2],v1[3],v2[2],v2[3],tempu[4]);
      det_2x2 m1(v1[2],v1[4],v2[2],v2[4],tempu[5]);
      det_2x2 m1(v1[3],v1[4],v2[3],v2[4],tempu[6]);

      det_2x2 m2(v3[j],v3[i],v4[j],v4[i],tempd[count]); // same way as above m1
                                                                   module

*/

module det_2x2(
 input signed [15:0] a11,a12,a21,a22 ,
 output  signed [15:0] out
    );

 wire signed [15:0] temp;

 assign temp = (a11*a22)-(a12*a21);

 assign out = temp ;

endmodule

the sign of each term in equation 1 depends on (-1)power(i+j) in each iteration and should me multiplied with `tempu or tempd' in the particular iteration.

i can implement these manually (instatiate manually and write out equation (1) manually) but its difficult when doing for higher order matrices where for (8x8) it takes 70 modules for instantiation.

please help me in assigning the  temp,tempd registers continuously indexed for the above nested loops.

thank you


texts: Finding the state space representation of a circuit

texts:
I want to find the state space equations for the following circuit.

simulate this circuit – Schematic created using CircuitLab

The equations I find are:

Ir = I1 + I2 = (U-Vn)/2
I2 = I3
I1 = 2*X1'
I2 = 1*X2'
I3 = 3*X3'
-X1 = X2+X3
Y = X3

Plugging in (3) and (4) to (1) I get:
(U+X1)/2 = 2*X1'+ X2'

I need to decouple the derivatives, but I don't see a relation that can do that.


texts: Using C++ in resource constrained environments

texts:
In the past I've been using C (or ASM) to develop microcontroller firmware. It's what I learned during my EE studies. It seems though, that the job market here has a high demand for C++ developers in the embedded systems field. Unfortunately I only have very little experience working with C++ and therefore I would have to properly start learning it.

Now, I read through Is C++ suitable for embedded systems? and am aware that C++ (or "C+") is suitable for use in resource-constrained environments, but as a programmer I have to be aware of what language features I can and can not use.

Therefore my question: When learning C++, what language and library features do I have to be aware of? Which features are not suitable to use in a resource constrained environment and which ones are very useful?


texts: Transistors: Quiescent voltage and Active mode

texts:
I am struggling to understand two things about this circuit.

1) when input and output terminals are open circuit, why is this assumed to be in active mode?

2)What range can the quiescent output voltage of the amplifier be in?

Now I know that active mode you need EBJ to be forward bias and CBJ to be reverse bias but how would this apply in this scenario?

I understand what quiescent voltage is but I am struggling to apply his here with the input and output terminals. I would appreciate any help.

Many thanks.


texts:
I found that I can control one dc motor with PWM from P1.2.What how i'm going to wire it?
How I am going to divide voltage in this picture.In physical way.


texts: Are Micro A USB plugs actually ever used?

texts:
Wikipedia states:

  An OTG product must have a single Micro-AB receptacle and no other USB receptacles.
  An OTG cable has a micro-A plug on one end, and a Micro-B plug on the other end

Micro-A is apparently similar to the standard Micro-B plug, but without chamfered corners:

A Micro-AB receptacle is also rectangular.

However, in practice, all of my phones that support USB OTG have Micro-B receptacles, not Micro-AB. And the OTG cable I have it front of me has a Micro-B plug. Also if you google photos of "OTG Cable" they all show Micro-B plugs

In fact I can't remember ever seeing a Micro-A plug. Is this something that Wikipedia has totally made up? Or is it something that is in the USB spec but the entire electronics industry wisely chose to ignore?


texts:
Wondering is LCD's backlight adjustable? If so, by making it dimer will the elements on the screen still be visible?

Thanks


texts:
I have a 2-color LED (3 pin out: one common, and one for each color). I have a DC motor running on two AA batteries. Both color LEDs are OK while testing on a battery pack.

Now what I need is the green light on with forward motion of the motor, and the red light on with reverse. When I connect the LED, it causes a short circuit that paralyzes everything. How should I connect those to get the color on motion as specified?

here is the circuit board, and the led... i what the red on clockwise motor rotation, and green on


texts:
I was just wondering if someone knows if it is possible to conveniently place a SMB female connector onto a standard breadboard.
From the specs, it seems to match, but I just want to be sure before the purchase.


texts: Problem shrinking Arduino project to ATtiny 85 20MHz

texts:
This is a similar problem as this one: Programming an ATtiny 85 with Arduino

However the latter question refers to older software/arduino and did not reach a resolution.

I'm using Arduino 1.0.1 (also tried this with 1.0.2) on Mac OS X ML. I've successfully ran the following program on the arduino:

int LED_Pin = 3;
int howBright;
void setup() {
  pinMode(LED_Pin, OUTPUT);
}
void loop() {
  howBright = random(128,255);
  analogWrite(LED_Pin, howBright);
  delay(random(50,150));
}

Now I have an ATtiny 85 20MHz wired up as instructed here: http://hlt.media.mit.edu/?p=1695

I'm using the hardware for the ATtiny85 here: http://code.google.com/p/arduino-tiny/downloads/detail?name=arduino-tiny-0100-0015.zip&can=2&q=

I am "uploading with programmer" with "Arduino as ISP" to the ATtiny85 and get this error:

avrdude: stk500_recv(): programmer is not responding


texts: Which communication system would you choose for the elevator?

texts:
The communication system is used to connect the floor fixtures (e.g. elevator diplays, elevator call butons) to the control panel which is existed in the elevator machine room.

Please look at the following picture:

simulate this circuit – Schematic created using CircuitLab

Dn represents the device connected at nth floor.

The first system uses serial communication (e.g. Canbus) to connect the devices to the control panel. The second system uses multihop wireless network to exchange information between the devices and the control panel.

Which system should I use from both a technician and a business perspective? Why?

Assumptions:

This is a 5 floor elevator.
Low data rate is sufficient.

I have asked many people who are working in this field; and I got answers (may be right or wrong) with no facts or prove. Links to the questions (1), (2).

They claim that even though wireless system has higher initial cost, it is more cost effective.

There are many patents on the internet of famous companies that started to use wireless technology. It is mentioned in this patent that the main reason for using wireless (and here where I got surprised) is to reduce the number of wires. I mean, how many wires are there in a serial communication system? (2 for Canbus).
Why would you prefer using about 10 wireless modules (for 5 floor elevator) to avoid using a 2 wire cable.

With that being said, would you shed light on my question?


texts: Why Cubemx use 0x32F2 as an indicator for the RTC configuration?

texts:
I've created a program with activated RTC peripheral by cubemx. After analyzing the code and searching in the internet, I found out that the reason of writing 0x32F2 in RTC_BKP_DR1 is for checking weather the RTC was configured before or not.

Why it uses 0x32F2 as an indicator and not another number?
Is there any reason?

static void MX_RTC_Init(void)
{
     RTC_TimeTypeDef sTime;
     RTC_DateTypeDef DateToUpdate;
     /**Initialize RTC Only */
     hrtc.Instance = RTC;
     hrtc.Init.AsynchPrediv = RTC_AUTO_1_SECOND;
     hrtc.Init.OutPut = RTC_OUTPUTSOURCE_CALIBCLOCK;

     if (HAL_RTC_Init(&hrtc) != HAL_OK)
     {
        _Error_Handler(__FILE__, __LINE__);
     }

     /**Initialize RTC and set the Time and Date*/
     if(HAL_RTCEx_BKUPRead(&hrtc, RTC_BKP_DR1) != 0x32F2){
         sTime.Hours = 1;
         sTime.Minutes = 0;
         sTime.Seconds = 0;

         if (HAL_RTC_SetTime(&hrtc, &sTime, RTC_FORMAT_BIN) != HAL_OK)
         {
            _Error_Handler(__FILE__, __LINE__);
         }

         DateToUpdate.WeekDay = RTC_WEEKDAY_MONDAY;
         DateToUpdate.Month = RTC_MONTH_JANUARY;
         DateToUpdate.Date = 1;
         DateToUpdate.Year = 15;

         if (HAL_RTC_SetDate(&hrtc, &DateToUpdate, RTC_FORMAT_BIN) != HAL_OK)
         {
            _Error_Handler(__FILE__, __LINE__);
         }

         HAL_RTCEx_BKUPWrite(&hrtc,RTC_BKP_DR1,0x32F2);
     }
}


texts: EMC (radiated emission test) issue in buck converter

texts: i am designing CV smps 12V 1A (with EMC design) post that output side i will use dc to dc buck (Vin-12V Vout-9V, 400mA) or Boost convreter (Vin- 12V VOut-36v, 100mA). which configuration will be more suitable considering don't need to add EMC component in both)


texts: Need more than two external interrupts in 8051

texts:
I am working with 8 YS-17 flame sensors and may need more in the future. There are only two INT0 and INT1 in port 3.  Is there any way to get the other interrupts or I/Os to work as external interrupts?
The microcontroller is an AT89S52 and the oscillator is running at 16MHz.


texts:
Personally, I have experience on 8-bit and 16-bit architectures (such as Atmel or Microchip) and now I would like to continue with 32-bit ARM Cortex-M family. I wanted to learn the internals of Cortex-M architecture and how to flash/program it.

According to my fast and superficial searches, it seems there are CMSIS libraries provided by ARM's itself to remove manufacture dependency. However, I also saw some extra hardware abstraction libraries in some manufacturer's website.

Trying to figure out from where should I start to work but it I'm a bit confused.

I actually do not want to be a manufacturer dependent when I'm developing software for Cortex-M family since the internals of the chip would be fairly similar for each manufacturer (so is it?). I believe I can read and find the differences of an MCU which is using Cortex-M3 core by looking the datasheet provided by manufacturer and can write code with CMSIS libraries (so can I?)

So, my questions are;

Is it possible to develop a firmware for Cortex-M family by just using CMSIS libraries (and using manufacturer's datasheet to figure out chip's internals)? If I want to change manufacturer (without changing the Cortex-M core), will it be a headache to adapt the code for a the chip by using CMSIS libraries?
For changing the manufacturer and deciding for a new chip, will it be another headache? Imagine you're all adopted your both hardware and software work environment for Microchip family and you're migrating your applications to Atmel family (learning new libraries, code syntaxes, IDEs, programmers, debuggers etc..). Sometimes you have to change even the OS that you're using just to use some suitable debugger or programmer interfaces. Will it be same?
If it is a headache to change the manufacturer, what are the tradeoffs of selecting manufacturer at the beginning? (Actually, how could it differ in 2 different chips from 2 different manufacturers while the core is still Cortex-M3?)
Do you have any suggestion for where to start? (Readings, evaluation kits, debuggers, programmers etc. Everything that is needed to bring up a Cortex-M family.)

Thanks in advance.


texts:
I'm looking at some old chemistry education literature where a constant current source was proposed (J. Chem. Ed. 1969, 46(9) p613, link).  I am trying to better understand the circuit and could use some guidance.

simulate this circuit – Schematic created using CircuitLab

Question #1 I am trying to do an KVL/KCL analysis and am getting stuck.  I have the following set of equations, where i1 is the current through the battery, i3 is the current through RS and i5 is the current through RP2.  (The remaining symbols are, I think, self explanatory).

eqns = {
   v - ic rl - vce - ie re == 0,
   v - i3 rs - i3 rp1 - i5 (rp - rp1) == 0,
   ie == ib + ic,
   i1 == ic + i3,
   i1 == i5 + ie,
   i3 == i5 + ib,
   \[Beta] == ic / ib
   };

I believe I am missing one more relationship.  It's possible, I think, to create one more loop which goes through the base and emitter of the transistor; however, I have to assume that Vbe is equal to 0.7 and I do not think this is correct.

Question #1 What is the recommended set of equations to analyze this circuit?

Question #2 I do not understand the role of the zener diode in this circuit.  Removing it from the simulation does not appear to have an effect.

Note:

While I used CircuitLab for the schematic drawing, I've used this simulator for analyzing the circuit.  The circuit can be loaded into the simulator by importing the following text:

$ 1 0.000005 10.20027730826997 50 5 50
t 288 224 288 272 0 1 -5.916033570237703 0.6317620685748468 100
w 304 272 352 272 0
r 352 272 352 176 0 100
w 352 128 208 128 0
r 272 272 208 272 0 500
w 208 224 288 224 0
r 208 176 208 128 0 1500
z 144 272 144 176 1 0.805904783 6.1
w 144 176 208 176 0
w 144 272 208 272 0
v 80 272 80 128 0 0 40 9 0 0 0.5
w 80 272 144 272 0
w 80 128 208 128 0
370 352 128 352 176 1 0
p 352 320 272 320 1 0
w 352 320 352 272 0
w 272 320 272 272 0
r 208 176 208 224 0 250
r 208 224 208 272 0 750
38 2 0 1 10000 Load
38 4 0 1 1000 Re
38 6 0 1000 10000 RS

Another Note

I noticed after posting this question and receiving an answer to it that this circuit is only a slight modification from what is shown in Chapter 2.06 of The Art of Electronics (2nd edition).  Future readers of this Q&A are referred to that text for more information on current-source biasing and compliance.


texts:
I'm attempting to build a compact way to charge six laptops (of the same model) so that I may avoid using six individual power cables. I'm trying to make it cost-effective yet safe.

My initial design was to take a simple 24V 15A DC power supply off Amazon and branch the output connection to six individual boards that each drop the voltage to a specific value using an LM317T. However, all parts including an enclosure came out to be about $45. I need 5 of these power hubs. Additionally, the charger for this brand of laptop is rated at 19.5V 3A. Wouldn't that mean that all six laptops draw a combined load of 18A, or does the manufacturer design the charger with some sort of leeway?

I am unable to find any DC power supplies that exceed 15A and are under $30. How hard would it be to build something that is capable of providing, let's say, 20A? Could I take a circuit designed for 5A and substitute parts that are rated for higher amperages?

Below, I've provided an image that illustrates the device I'd like to build:


texts: Single-phase motor and speed control with used parts

texts:
Asking for a friend who is intending on setting up a one-off, custom-built appliance for a farm. He needs a motor and control scheme for "rotary impact cleaning". It should be:

Low-cost (insofar as that's possible)
Accuracy and efficiency do not matter whatsoever, direction doesn't really matter either
Three-phase is unavailable so he's stuck with 110VAC single-phase
Has rudimentary speed control - either continuous or multi-setting
Is "reasonably powerful", perhaps 500W
Can handle unpredictable mechanical load
Target RPM up to perhaps 300 RPM

Commonly-available used parts are preferred if possible, but new parts are not ruled out completely. Custom circuitry is fine if needed.

I've seen controllers for sale that convert a single-phase supply to a lines controlling a three-phase motor, and that's OK in principle, but these controllers were somewhat expensive.

My questions are:

What kind of control scheme (phase or inverter control, etc.) is appropriate here?
Are there any common types of appliances or automotive systems, etc. viable as used sources for such a system?
Failing used parts, what category of new parts should I be looking at - motors with integrated speed control, or a separate controller, etc.


texts: Blue Screen of Death for Beginners Learning C?

texts: Someone I know wants to learn C, but run their own programs and exercises on a PC. Which is all well and good until we get to pointers. Is there a significant chance of them damaging the PC or crashing it?


texts:
Why do circuits mostly run on a DC current? I understand that electric motors use AC but things like my laptop operate on DC.

Are there another advantages to AC current that made it the standard besides the big one, that voltage can be more easily changed?

Thanks


texts: fiber optic output source for testing an embedded fiber bragg grating array

texts:
I have a single 1 meter array of 5 fiber bragg gratings that has FC/APC connectors on both ends. I will be embedding the array in a material and want to be able to do a quick check that the array is ok and can transmit light before I ship it off somewhere.

I have a fiber meter to recieve the light, but I need some kind of light source to send light through the array and test. I am hoping for a cheap option.


texts: "Typical" temperature of resistor at its rated power

texts:
Many components (resistor, transistor, diode...) have their power ratings. One of the simplest example is a resistor: 0805 SMD usually rated at 125mW, 1206 as 250... However this should depend on many "external" conditions such as ambient temperature, forced air cooling, even topology (especially for SMD components).

In my opinion (correct me if needed) the main reason why manufacturers specifies power ratings of their components is to keep them at reasonable temperature. If so, can we say that the resistor should be heated to so-and-so degrees at rated power in some circumstances (just for example: at 25C ambient, no forced air cooling, open frame...)? Can I suppose that this temperature should be below human pain threshold (something around 60C?)?

I'd like to discuss this in general and not to involve some special cases like heat-proof components.


texts: Modelling transfomer phase shift in Matpower case data

texts: A branch in Matpower that models a transformer using the Pi model has the phase shift component. However, in this document https://www.gridpack.org/wiki/images/7/7e/Ybus.pdf, it uses the phase difference of the F_BUS (i in document) and T_BUS (j in document) in Matpower. Which one is correct? I can't really see a reason why they might be equivalent...


texts: I'm controlling an IGBT inverter with a DSP. I'm pretty sure I turned on two IGBT's at the same time which made a short circuit. The PCB I'm using to step up the PWM signal to drive the IGBT's let the smoke out and I'm trying to figure what my problem is. If the IGBT did get turned on to cause a short then is it possible that the currents going into the IGBT driver got massive? Thanks


texts: GBE (Gigabit Ethernet) Magnetic Coils Connection Order

texts:
I am designing a MEZ PCB and I need to connect the GBE coils to the assigned pins of single board computer's MEZ connector. My trouble is I do not want to use any more via for this connections. Hence, I want to connect coils with a different order (just the reverse), i.e.:

MX0+ to MDI3+
MX0- to MDI3-
MX1+ to MDI2+
MX1- to MDI2-
MX2+ to MDI1+
MX2- to MDI1-
MX3+ to MDI0+
MX3- to MDI0-

Would this work properly?

I will not use following part of the question for my situation, but for being this question a good reference to others, if I connect pins in more complex orders, i.e.:

MX0+ to MDI2+
MX0- to MDI2-
MX2+ to MDI0+
MX2- to MDI0-
and so on..

or

MX0- to MDI0+
MX0+ to MDI0-
MX1- to MDI1+
MX1+ to MDI1-
and so on..
would they work?
Thank you for your answers.


texts: Place of matched filter in fiber optic communication

texts:
In short-haul communication via optical fibers, we use photodiodes (PD) to detect the light. So if we want to use a matched filter, should we use it before the PD (optical domain) or after the PD (electrical domain)?
If we use it after the PD, should its impulse response be $$h(t)=s(T-t)^2$$ due to the square law property of PD?


texts: Cheapest TQFP-44's & SO-28's to practice SMD soldering?

texts:
I'm looking for a cheap source of broken/outdated TQFP-44 and SO-28 ICs or packages which I can test my soldering skills with. The chips I'm using are £3 each and this is money I'd rather not throw away if I damage them.

Any suggestions will be appreciated! Thanks!


texts:
I am a systems engineer working with various instrumentation devices for ground platforms. These platforms can vary in speed from 0-60+mph. Current instrumentation provides TSPI at 1Hz and is based on GPS. We are looking at a new system that claims to provide TSPI up to 20Hz. I have no additional details at this time on what additional sensors are in the loop.

Since GPS uses 1PPS, how do you get 20Hz TSPI? IMUs?


texts: DDR4 frequency decrease if populated with more than one module per channel

texts:
I'm curious how one particular company Gigabyte ensures its server motherboards
to run at the maximum supported memory frequency even when there're two or three DIMMs per channel (of coure we're talking about RDIMMs and not UDIMMs).
What trick they use in such motherboard to achieve that:
(look at the overview section)

Some time ago I read a leaflet claiming that on Haswell-E/EP motherboards populating them with more than one module per channel decreases the frequency:

1 DPC = max 2133 MHz
2 DPC = max 1866 MHz
3 DPC = max 1600 MHz

Some other motherboard manufacturers put a condition on their specifications,
something like 2133MT/s@1DPC only, whereas Gigabyte boasts that its products reach 2133MHz frequency even with 3 DPC.

How such feature meant to be done?


texts:
I have a 90V PMDC motor with an triac/diac speed controller. Although, I am not sure, the power output is around 90V, but it may be higher. The torque is fairly constant, but it hiccups at the lowest setting unless you put some load on the motor. Here's a schematic:

I purchased the following PWM controller online:

6V-90V 15A DC Motor Pump Speed

Unfortunately, I don't have a 90V DC power supply and didn't want to fry my new board, so I connected the original speed controller output to the new PWM controller power input. As soon as I turned it on, POOF! The rectifier and triac were destroyed on the original board, but the PWM was unscathed. Can't figure out what happened, but my theory is that the low speed hiccup was probably caused by the voltage dropping below zero and the PWM controller sent it back whence it came from (latchup?).

I am able to get the motor to work, but only on low voltages, which easily stalls with finger pressure.

Now, I don't have a 90V power supply anymore, so I will have to make one. Can I just use a voltage divider using high power resistors and a full wave rectifier?


texts: Little change in Verilog module results in high change in power consumption (Synopsys Design Compiler)

texts:
I am comparing two Verilog designs:

Design (1): A top module that is driven by a clock running at 50MHz, which is the main system clock.
Design (2): The same top module as in Design (1) with one difference, i.e., the main system clock runs at 400MHz, but I use a divide-by-8 (/8) clock divider to obtain the same clock frequency as Design (1).

Intuitively, the two designs should have comparable power consumptions. The primary reason behind this intuition is that the two top modules of the two designs are running at the same clock frequency of 50MHz. However, it is expected that Design (2) consumes slightly more power, due to using the overhead clock divider.

However, after synthesizing the two designs using Synopsys Design Compiler, the power reports of the two designs indicate that Design (1) consumes 63.4 micro Watts, whereas Design (2) consumes 500 micro Watts, i.e., Design (2) consumes almost 8X the power consumed by Design (1). Please note that the reported power figures refer to the total power consumption, i.e., the sum of all power categories.

In an effort to understand the reason behind this 8X higher power, I  suspected that the /8 clock divider is responsible. However, after synthesizing the divider alone (all by itself) with a master clock frequency of 400MHz, its total power consumption turns out to be 35.4 micro Watts only. The numbers don't seem to add up somehow, no?

Anyway, I hope someone can explain to me the source of this 8X higher power, please? Thanks in advance.

PS: I guess the question does not need my Verilog sources and synthesis scripts, right? Regardless, please let me know if these are needed, and I will update the question with more details.


texts:
I am using the BQ25570 power management IC for energy harvesting from a solar panel. I am currently designing the PCB layout for the IC, and I am a bit confused about the ground. As you can see in page 4 of the datasheet, there exist two separate VSS pins. In the typical applications (for example 8.2.1, pg 25) all grounds are noted with the same ground symbol. Lastly in 10.1, pg 34, the second paragraph makes a reference to the ground practice. Also, pg 35 you can see a layout example.
I would like to see how do you interpret the above-mentioned information (that is, where would you connect each ground), as I am not 100% sure about the best solution.
If I am not mistaken, in the layout example, both VSS pins are connected to the same ground plane. What about the PowerPad of the IC?


texts: Master-slave flip flop without gate delay?

texts:
It seems like a master-slave flipflop always has around a 2-gate delay between the Master and Slave sections of the flip flop. For example:

My question is what would happen if, theoretically, there was a zero-delay between the Master and Slave sections of the flip flop? Would the master/slave relationship still work properly, or is it dependent on there being a delay between the Master and Slave sections of the flip flop?


texts: Can individual pins of different port of a microcontroller be mapped to a register and their values be changed when changing the register value?

texts:
Q: Can individual pins of different port of a micro-controller be mapped to a register and their values be changed when changing the register value?

Scenario: I have used up some pins from each port(8-bits) of the micro-controller. Now I want to interface a device which needs an 8-bit bus (suppose D0 to D7 IN SEQUENCE) that is to say I need 8 pins from controller so that I can connect them in one-to-one fashion

portx0  -> D0 // x is the name of port followed by bit location on that port
portx1  -> D1
...
portx7  -> D7

but I don't have a whole port of 8 pins which I can connect with this device, rather I have some pins from portx, some from porty and some pins from portz. The new connection scenario is as (connection from micro-controller to device respectively )

portx0  -> D0
portx1  -> D1
portx2  -> D2
porty4  -> D3
porty5  -> D4
porty6  -> D5
porty7  -> D6
portz1  -> D7

In this condition if I want to send a value say

unsigned char dataReg = 0xFA;

to my device from controller I have to perform bit wise operations on the value to be sent and set each pin according to the value in the register individually. For example

portx0 = ((dataReg & 0x01) >> 0 );  // Masking and shifting as bit position
portx1 = ((dataReg & 0x02) >> 1 );
portx2 = ((dataReg & 0x04) >> 2 );
porty4 = ((dataReg & 0x08) >> 3 );
porty5 = ((dataReg & 0x10) >> 4 );
porty6 = ((dataReg & 0x20) >> 5 );
porty7 = ((dataReg & 0x40) >> 6 );
portz1 = ((dataReg & 0x80) >> 7 );

Now, coming to the main question, to avoid these individual calculations on each bit on different ports,  can individual pins of different port of a micro-controller be mapped to a register and their values be changed when changing the register value?


texts: EL wire brightness, per m not per m\$^2\$

texts:
The datasheets and catalog pages for commercial electroluminescent (EL) wire in hobby quantities, e.g., adafruit's, list brightness in candelas per square meter.  That's ok for two-dimensional EL sheet, but not for one-dimensional wire.

(I understand that frequency and voltage affect brightness, as well as half-life, power consumption, color, etc.)

How do figures like 46 cd/m\$^2\$ convert to cd/m, which can be meaningfully compared to LED strips or neon tubes?  Just consider the circumference of the cladding? Or of the phosphor? If there's multiple layers of phosphor, which one?

Also, the candela measures luminosity only in a particular direction, while EL wire has nontrivial off-axis brightness.  Are there specs for lumens per meter of such wire?


texts:
I am trying to find a way to install a component in an aluminum box. This component comprises a rectangular unit measuring about 80mm by 100mm and a power supply of similar dimensions joined by a 5mm cord.

I do not wish to cut and splice the cord so I'm looking for something like the aperture on an SLR camera but large enough to admit the above described. This could be closed around the cord so as to be both vapor and light tight. What are possible solutions?


texts: How to properly read current of a PoE Mode A device?

texts:
I'm trying to measure the power consumption of a PoE device using Mode A.
I assume I would need 2x current readings - one for pin 1 (I1), one for pin 2 (I2), and then 1 voltage reading of from either pin 1/2 to either pin 3/6 (V)? Then my consumption would be P = (I1+I2)*V
I'm currently splicing the wire in the middle and sticking 2x current reading devices in between to measure the current as well as the voltage as seen here .
I'm using 2x TI INA169's for my current readings and a simple voltage divider for my voltage reading. This is then being processed by an Arduino ADC for now but will move over to something more sophisticated in the future. I'm confident the INA169's work as intended as they work with some other (simpler) DC circuits I've tested. I just want to make sure I have the right idea for measuring PoE current before I start redesigning/simulating my INA169 circuits again.


texts:
The Drive terminals are connected to a PWM signal generated by an arduino micro controller. The purpose of this circuit is to isolate the arduino from the motors to avoid too much current being drawn.

This is my best guess, but I'm completely unsure: When the NPN BJT is in forward active mode (i.e when the LED is turned on), current will flow from the +6V rail to the -6V rail. There will be a potential difference across the 1K resistor and therefore a potential difference between the gate and source of the n channel FET. The FET is now in conducting mode, which will then reverse bias the diode and turn on the motor.

When the NPN BJT is in cut-off (i.e when the LED is turned off), the FET will act like an open circuit, so no power goes through the motor. Under no circumstance is the diode ever forward biased.

Is this correct?

And what is the capacitor and Rx for?


texts: What is the use of making measurements using both forward and reverse currents? (Kelvin bridge)

texts: For measuring low resistances using the Kelvin double bridge arrangement it was mentioned in our electrical measurement lab class that we should use both a forward current and a reverse current (i.e. in opposite direction) during any Kelvin bridge experiment. The final observation is made by taking the "average" of observations when using forward currents and reverse currents. Our teacher said that "thermal emf" generated when using a forward current would be opposite direction to the "thermal emf" generated when we use a reverse current. I'm not sure what "thermal emf" means in this context. Also could someone explain what exactly is the use of taking measurements using both forward and reverse currents?


texts: Why in the following solution the 6Ω resistor is not considered?


texts: Standard transformer for higher-voltage dual output flyback converter

texts:
Is it possible to modify this flyback converter to get the output voltage somewhere up in the range of +/- 26-60v (preferably 30v or more) without having to make my own transformer? I would also like to use an input range of 6.5-9v. I saw another schematic that did +/- 15v output, but I can't find any standard examples going above that. This will only be driving a 50mA load max. I used the TI WEBENCH software to generate designs, but every thing I tried requires me to build custom inductors.

EDIT: I think I'm getting somewhere with the WEBENCH tool. I told it to generate a solution for a single 30v output and it told me to use this transformer:

http://www.digikey.com/product-detail/en/VPH4-0860-R/513-1542-ND/668203

Here is the schematic:

Then I went back and generated the dual output version that required a custom transformer for some weird reason:

Both transformer configurations are 1:3 so I think all I have to do is add D2 and Cout2 to the single output configuration and I should be good to go, right? The only other issue I can see is the different inductor value they suggested for the dual output version (65uH instead of 160uH). Is that significant or can I just use the 160uH?


texts: Best way to shift automotive logic to Arduino TTL

texts:
My vehicle ignition switch voltage is 9V when the vehicle is not running. It is 6V when button is pressed. I need a way to convert this to TTL Arduino digital logic levels. I thought I could use a voltage divider, but I can't compute resistor values that satisfy both conditions. I.E. 9V can be 5V, but the 6V would still be high enough to be considered a logic High. Maybe I missing something?

I thought about optoisolators, but it presents the same challenge as the voltage divider, the 3V Delta linearly scales on both sides. Again, maybe I'm missing something with calculating the left hand resistor to find the right hand resistor.

Then there is the ADC of the Arduino, which I can scale in the software with a voltage divider. My concern with this is the power consumption will increase more versus using a digital IO. And I'm trying to be mindful of my car battery and not draining it.

EDIT:
I didn't explain well what I'm trying to do. I have a raspberry pi that I'd like to be gracefully shutdown by an Arduino monitoring the ignition of my vehicle. So if I push my ignition button, I'd like my arduino to detect that I'm either entering a vehicle turn on or turn off state and make the appropriate decision for the Pi's power. This gets tricky because the arduino needs a way to know the ignition state. And as someone suggested, maybe I'm not looking at the right signal?

I found the ON/OFF switch voltages from here: https://www.autocats.ws/manual/chevrolet/tis0911/en/documents_2012/Volt/SM-R/92535312.en.html

I've also found this description as well:

"The vehicle ON/OFF switch contains two individual switches that provides redundant switch inputs to both the body control module (BCM) and the keyless entry control module. The BCM supplies the vehicle ON/OFF switch a constant B+ signal. The BCM monitors this signal to determine if the switch is released or pressed. When the vehicle ON/OFF switch is not pressed, voltage on the signal circuit is pulled down through two resistors in the switch. When the vehicle ON/OFF switch is pressed, voltage on the signal circuit is pulled down through only one resistor, changing the voltage seen at the BCM and indicating that the vehicle ON/OFF switch is pressed."

Source: https://www.autocats.ws/manual/chevrolet/tis0911/en/documents_2012/Volt/SM-R/92610436.EN.html#4711


texts:
I need to check if a micro-switch can do the below (Honeywell 11SM1-H2):

"the contacts shall switch an inductive load below 53V DC / 0.4A with a time constant of 40ms"

I'm not sure I understand what is being asked.  My understanding is this: the load has a time constant of 40ms, meaning that L/R = 0.04.  R = 133 Ohms (using I and V), giving an inductance of 6H, which is massive.

If the switch was abrubtly opened, the back EMF will be extremely large and it won't be possible to fit a freewheeling diode across the coil.

I've asked the manufacturer if this can be done and they said they could run tests, but couldn't at the moment due to heavy workloads.

I'm not sure if I'm looking at this properly.  The only other thing it could mean (that I can think of) is that the 40ms time constant doesn't refer to the load, but to the switch response time.  This would depend on the inductance though.

Are they saying 'this is the load, can you do it?' or are they saying 'here is the load, can you switch it within this time?'?


texts: Using a relay to switch between 230VAC inputs

texts:
I have two mains power inputs (in case one fails, the other is likely to still work), but the device only has one power supply, so I decided to use a relay to switch between the inputs (the device should be able to cope with a momentary interruption during the switching), like this:

In theory and for low voltages this should work just fine. When the primary input fails, the relay switches to the backup input. Is there any potential problem I should be aware of when using this for 230V?

Connected to this: is there a way to add a fuse to this circuit so if something (the relay or the device) shorts out that fuse blows instead of tripping the circuit breaker? Maybe some resistor to limit the short circuit current?


texts:
Because I tried to wire-solder a protoboard which failed miserable, I'm intending to order a PCB. However, to minimize the area, I want to use some SMD1206 components. I ordered some basic ones (resistors, capacitors etc).

However, now I read that for example SMD 1206 MLCC (Multi Layer Ceramic Capacitors) are very difficult to hand solder. e.g. here. That there is a need to preheat every component for 90-120 seconds and/or to use a heat gun.

I do not have a heat gun or other professional equipment.

My questions are:

Can I hand solder SMD 1206 resistors? (1/8 W and some 1/2 W)?
Can I hand solder SMD 1206 ferrite beads?
Can I hand solder SMD 1206 diodes/LED diodes?

Btw, my soldering skills are far from perfect.


texts: Is it OK that I accidentally swapped TX and RX on a UART bus?

texts:
I accidentally swapped the TX and RX pins on a UART bus when hooking up a to a 3.3V bus with this 3.3V cable: https://www.sparkfun.com/products/12977.

Did I cause any permanent damage to this board as I debug it?

Can we all agree to use TXO, RXI?


texts:
I bought a 908S soldering iron from AliExpress.  It was great until a resistor exploded.
Can someone help me find a picture of the PCB so I know what resitor to use to replace it?
I can't identify it because the cover is gone.


texts: How to connect a line-out to mic on Android plug? (CTIA)

texts:
I want to connect line-out of a device to the microphone input of an Android phone, a Xiaomi Mi 4X. Then I can record and live stream from the phone.

If I simply connect line-out left/right (red/white) to the sleeve and ground (yellow) to ring 2, then the microphone does work. However, the phone will still use the internal microphone in addition. This does not happen when I use a headset (Bose QC25). So apparently additional wiring is necessary, but how?

I also tried connecting the (unused) headphone connectors to ground, using a 220 Ω resistor. These are ring 2 and the tip. The idea is to match the 32–300 Ω impedance in the Android 3.5 mm Headset Jack Device Specification, hoping that this will make my adapter be recognized as a regular headset. It did not help.


texts:
I repair intelligent lighting fixtures. These devices have a large number of motors, and so they also have a large number of motor drivers. It's not uncommon to have a single PCB with more than a dozen individual motor drivers mounted. A common issue with a particular series of fixtures is a driver failing in such a way that the 24V motor supply rail is shorted to ground. (Here's the datasheet for the driver in question)

My question: How can I identify which driver has failed, without desoldering multiple drivers until the short goes away?


texts: how to calculate thickness of copper conductor

texts:
Can you please explain how to calculate thickness of a copper conductor for the next task:

I would like to use a DC power supply instead of some batteries for my sensors. So we have V volts and AH Amp*hour. A sensor working T Hours with the batteries.
My sensors will be connected in series with different distances, I do not know them for now (I suppose we will need the worst case). There will be X sensors, and L meter for total length of the conductor. Enough voltage to operate for a sensor Vmin.

So what is the formula?
Thanks a lot.


texts: Power an LED strip, power supply or transformer?

texts:
I'm new to electricity so don't judge me too much. I need to power 5 watts of led strip. Is there a difference between a power supply and a transformer? I found a transformer in my local hardware store and it says: connecting power 10-50 watts, can I use it to power my led strip or do I need to look for suitable power supply?

This:

Or this:

Edit: The led's are 12v 7.2w per meter the power supply shown in picture is 12v 12w, I'm actually building a light pad and searching for a simple way to power led's


texts: Why are there so many relays used in a car, instead of transistors?

texts:
Recently I did some work on my car electric circuits. I see many relays are used in car circuits. These relays are used for simple switching, and I wonder why these circuits are based on relays and not on transistors or other electronic components usable for switching purposes. I thought that transistors were cheaper, smaller and more reliable than classic el-mech relays for switching.

Note: In car applications a 12 V car battery is used to power the coil of a relay and the same 12 V power is what's switched by the relay. Sometimes a relay switches just another signal line, i.e. without any high power load on it. And still, I can see no transistors in there. So I believe there is a solid reason why it is done this way, and I must be missing something here. :-)


texts: nand gate astable vibrator do not work at 400kHz

texts:
I want to build a 400kHz square wave oscillator with NAND GATE using the CD4011BE circuit.
Unfortunately, it does not work as expected when I use R2 and C values according this schematic:

Vcc = 5V
R1  = 1Mohms
R2  = 1100ohms
C   = 1nF

Expected: Fosc = 1 /(2.2*1100*1E-9) = 413,223kHz

The signal on the 2nd NAND  Q output stay at 5V with small noise oscillation (seen on scope).
But when i replace R2 by a 10Kohm resistor, there is a real square wave signal around 45kHz.
So, what is the problem with the 1.1kohm ?

Thanks for help !


texts: What is a signal distributing device called?

texts: I have a DC power source of 5v which I want to distribute to a few circuits (amplifier, motor driver etc.). But I couldn't figure out a component that we can use for splitting the power to a line on which you can connect jumper wires to (Please see the image.).


texts: Popped a power supply fuse - What did I do wrong?

texts:
I recently purchased a 5V 40A power supply that looks similar to this:

It didn't come with a power cable, so I found one that I wasn't using and stripped the side opposite the three-pronged side (the other side was a female connector that looks like what you'd plug into a computer power supply).

After stripping it, I noticed that there were three wires, each a different color:

Green (I assumed this to be ground)
White (I assumed this to be neutral)
Black (I assumed this to be live)

I screwed the stripped black wire into the L (AC) position, the stripped white wire into the stripped N (AC) position, and the stripped green wire into the position beneath the ground symbol to the right of N (AC).

I plugged the power supply into the wall, and there was a bright, blue light for a fraction of a second, and then nothing. I unplugged it immediately, waited a bit, and tried it again; however, the positions beneath +V were not supplying any voltage, so I assumed it was dead at that point.

After waiting a bit, I opened the power supply cover and noticed that the fuse looked like it wasn't there anymore. I also noticed that the copper for the neutral and ground wires were very close to one-another, but didn't seem to be touching.

What exactly did I do wrong to cause the fuse to burn up?

Did the copper of both the neutral and ground wires being close together cause it to arc, resulting in a short?


texts: Transistor maximum base breakdown voltage

texts: In a npn transistor with 5 volts VCE and current limited to 10ma by a resistor, it needs to drive its base with a DC voltage ranging from 3 to 500 volts DC, using a base resistor of 10 K ohms the voltage in the base never exceeds 900mv, is my drive correct? In this case, how do you set the maximum current you can receive at the base?


texts: Read / write hardwares values for FSUIPC (module for FS)

texts:
I'm building an auto-pilot module for FSX (flight simulator) with push buttons and rotary encoders. My micro is one ATmega88. My question is how I do the communication with FSUIPC (software to read and write assignments to simulator) and my hardware? I'm going to use a serial communication to PC. I have to use a program to read and write values but how do I get these values for FSUIPC?

PS: I have SDK for FSUIPC (language C)...


texts:
Why telephone lines use -48V not +48V? What’s the difference practically in -ve and +ve voltages?
Detailed answer would be appreciated.


texts:
I have made a Arduino Leonardo clone and have been trying to burn a bootloader into it.
I am still unable to connect to the Atmega32u4. It says "Unable to enter programming mode.

"Unable to enter programming mode.Please verify device selection, interface settings, target power and connections to the target device."

I have all the pins connected fine and I rechecked them. I had a chip before and it was detected. It was an Atmega32u4 with internal RC oscillator. The new one has an external one. So I think its this crystal thats messing things up. I placed a probe on the crystal and it shows a dc level of 1V. Shld it not show 5V pure sine wave. As far as I know a crystal and 2 balancing capacitors are sufficient for such circuits. I feel the balancing capacitors (18pF) are making it misbehave.

Also, do I need a working crystal to detect the controller via the AVR ISP.
The Vcc and GND pins are as shown in image

The reset pin has a 10K pull up and 100nF cap. These are not so close to the reset pin. But, I dont think it can cause any disruption.
I strongly suspect that the crystal is the culprit here.

The programming header is as shown in 2nd image
![Programming header2

I would apreciate any tips please. Now, the crystal I use is 535-10907-1-ND(digikey part). The Cl = 10pF. I calculate the C1 = C2 = 15pF. But I placed 18pF. But, can it cause such a drastic malfunction. Also, how is it possible to test a crystal. Is it a question of fuses.


texts:
One of the things I've noticed in a few power supplies is the use of a TL431, a voltage reference, as a comparator of sorts.

It seems to be set up in a configuration where when the voltage across it exceeds some point, it conducts, and this turns on an optocoupler. But I thought, almost like a zener, the 431 would only drop a few millivolts across the optocoupler - not enough to turn it on - until it exceeded the set point plus some volts for the optocoupler's LED, but that would be too indeterminate to produce a precise set point.

Below is one example. Page 28 of the datasheet shows exactly what I'm talking about. It's quite useful in this configuration, because it turns out if you put a potentiometer across one of the resistors, configured as a rheostat, you can adjust the feedback and output voltage.

So how can it work or am I missing something?


texts: What does A x B mean when referring to wire strand count?

texts:
Stranded wire is often specified using two numbers in the format A x B.  For example, 16 AWG wire might come with a 19 x 29 strand count.

What do the first and second numbers mean?


texts: Mirror PCB only, not the whole page when plotting as HPGL with KiCad

texts:
It's easier to place the PCB near the origin when using a pen plotter to draw it.

However, when I plot a mirrored PCB with pcbnew, it also changes the PCB position (it mirrors the whole page).

So, in order to get my PCB near the origin, I have to place it at the right bottom corner. This solution doesn't seem to be the standard way of doing that, because the PCB needs to overlap the page borders, as seen in the screenshot below.

I also tried to flip my board over and place it at the origin, then plotting it without mirroring.
As seen in the picture below, that's not the best solution either.
I can't figure out where exactly is the origin and the PCB again needs to overlap the page borders.

Inkscape doesn't seem understand some HPGL commands used by KiCad so I can't use it to fix the PCB position. EAGLE has an option to offset the PCB origin (the actual PCB left bottom corner). Is there anything similar in KiCad?


texts: RC low pass filter difference with RC high pass filter

texts:
This is a low pass filter:

simulate this circuit – Schematic created using CircuitLab
This a high pass filter:

simulate this circuit
If we add a load resistor to the high pass filter it becomes like this:

simulate this circuit
The total resistance of the R1 with the RL will be lower than the smallest resistance(R1 or RL).
If we add a load resistor to the low pass filter it becomes like this:

simulate this circuit
The total impedance of the C1 with the RL will be lower than the smallest impedance(C1 or RL).
If we start from a frequency when the impendance of C1 is smaller than the impendance of RL then the strength of the signal passing through  RL will depend on  frequency.
However if the impendance of the load resistor becomes less than the impedance of the capacitor then the strength of the signal passing through  RL will not depend anymore on frequency
(in both cases i am reffering to voltage not current passing through RL resistor)
Low pass filters stop working below below a certain frequency and high pass filter always work?


texts:
I am trying to repair an old radio-controlled toy car. It would only go backward, and forward movement would stutter. After some investigating, it turned out that one of the H-bridge NPN transistors is faulty. Since a direct replacement is difficult to get, I found a substitute. I wasn't worried too much about parameters, I thought transistors in an H-bridge operate in the saturation region and there should be a lot of leeway.

Here is the schematic, reverse-engineered from the PCB:

I substituted the original Q14 (2SD882, marked as NEC D882) with a BD238. The BD238 has a lower hFE (>40, instead of >80), and lower Ic, which I didn’t think would matter. [Edit: as people correctly pointed out, the rather ridiculous mistake I made was that the BD238 is a PNP transistor! There is nothing like another pair of eyes. So, at least this part of the question is already answered.]

Well, it turns out the replacement does not work. Which made me investigate the circuit closer, which made me realize that I don't really understand how it works, much less why the replacement doesn't work. And the circuit is rather interesting and uses very few components. Note for example the lack of catch diodes. I guess that's why transistors with Vceo=30V were used, with the hope they would withstand the voltage spikes.

After replacing the faulty transistor, the motor never turns in the direction which is handled by that H-bridge branch.

I tried a number of things. I narrowed it down to a single direction not working. Replacing the NPN transistor in that branch with a 2SD882 makes this direction work again. I also tried doubling the base currents (to possibly compensate for the lower hFE) by connecting another 47Ω resistor in parallel with the 51Ω resistor in the branch. No change.

I thought about the B-E voltage drop of the new BD238 transistor — after all, the circuit is powered from about 5 volts, which has to be enough for 3 junctions (B-E of Q12, E-C of Q10 and B-E of Q14), but I can’t see how it could be high enough to prevent the circuit from working.

I am seeking answers to the following questions:

How does this circuit work? It has amazingly few components. Bringing one of the inputs low should switch on three transistors (for example, Q10, Q12 and Q14), but I don't see how just pulling the base of Q10 low would do that. Where does the voltage on Q12's base come from? There is no biasing, no pullups. Is bringing the base of Q10 low enough to start current flowing through Q12 (E-B)?
Why does replacing a 2SD882 with a BD238 not work? I have to understand this before I go looking for other replacements. [Edit: this part is already answered, I made the silly mistake of substituting a PNP transistor without noticing it.]
How important is PNP/PNP complementary pair matching in an H-bridge? I couldn't find any information on that. Everybody mentions that it's good to have a matching pair, but no rationale is given. I don't see how minor differences in hFE could (or should) influence the behavior of a simple motor driver circuit.

The toy car is powered by 4 D batteries (so slightly above 5 volts), and the motor draws about 0.4A in normal operation. I also measured the base current for the NPN H-bridge transistors when activated: it's 60mA when an 2SD882 is installed, and 2.2mA when the BD238 is installed.

Links to relevant datasheets, for easier access:

2SD882: http://www.jameco.com/Jameco/Products/ProdDS/1380439.pdf
BD238: https://www.fairchildsemi.com/ds/BD/BD238.pdf


texts: How to select between different PLL and divider configurations with same result

texts:
I'm new to STM32 and totally ARM. I'm learning STM32 by a NUCLEO-L053R8 board and currently working on clock configurations.
I want to clock CPU, USB and RNG all by PLL connected to HSI16 so there is no need to HSI48 which saves some power. I can use two configurations:

What's the difference between these two configurations?


texts: 50MHz SPI PCB routing, use vias or resistors?

texts:
I am trying to route the SPI between MCU and ADC. However, the pin orders between MCU and ADC are not matched, there are crossings. A four-layer board is used.(signal - ground - power - signal)

I tend not to use vias (I am not familiar with grounding, EMI and etc.), as the SPI runs at 50MHz. I have the impression that a via from one signal layer to the other will worsen the ground loop. Is the impression correct?

Therefore, the following connection is used: A resistor acts as a bridge... The resistor is serial connected for matching purpose. Is this kind of connection valid? I dont like it as well, since the resistors are in 0402 package, which makes the trace through very thin.

And

One last question, should I worry the interference between different signal traces, if the following connection is used (with vias)?

EDIT

What my question actually is:

This post mentions something similar, PCB routing: EMI and signal integrity, return current questions

It says:

  "The second component is a high frequency return signal which tries to
  follow the signal trace on the ground plane. If you switch layers from
  say the top layer through to the bottom layer on a 4 layer board
  (signal, ground, power, signal) the HF return signal will as I
  understand it try to jump from the ground plane to the power plane by
  detouring through nearest available path (nearest decoupling cap,
  hopefully... which to HF might as well be a short)."

How is the power plane influenced? And why is that??

It should also be related with this post: The best stack-up possible with a four-layer PCB?

The first point of the first answer:

  1.Signal layers are adjacent to ground planes. Stop thinking about ground planes, and think more about reference planes. A signal running
  over a reference plane, whose voltage happens to be at VCC will still
  return over that reference plane. So the argument that somehow having
  your signal run over GND and not VCC is better is basically invalid.


texts: How to interpret the vertical axis of this attenuation plot?

texts:
How can I interpret the following curve for this toroidal ferrite?

It shows the attenuation vs frequency. But the vertical axis is not dB, it is impedance in Ohm. This is unusual for me. How can I interpret the vertical axis in terms of dB?

As an example at 10MegHz for 1 turn the black plot shows around 70 Ohm. What does that impedance tell us about the actual attenuation?


texts: Is my use of the L9637 iso9141 single-wire transceiver a robust design?

texts:
Eventually, I want to tap into the K-line of my Kawasaki Ninja with an (ISO 9141) OBD reader, using an ESP32 WROVER and a L9637 single-wire transceiver.  To get there, I'm at the stage of confirming my L9637 chip is wired properly to my ESP32.
Here's where I am:
HardwareSerial Sender(1);   //  Serial port1 is the 'Sender'

/*
 * LilyGo TTGO T7 v1.5 pins
 *               ___________
 *    GND  RST  |           |  TXD  GND
 *    N-C   VP  |   ESP32   |  RXD   27                  ____________
 *     VN   26  |  WROVER   |   22   25   22 <- RX   1  |   SENDER   |  8  LI
 *     35   18  |   TTGO    |   21   32         LO   2  |   L9637    |  7  Vs(12v)
 *     33   19  |    T7     |   27  TDI     (5v)Vcc  3  | transceiver|  6  K  ->->
 *     34   23  |   v1.5    |   25    4   25 -> TX   4  |_____#1_____|  5  Gnd
 *    TMS    5  |           |  GND    0            510ohm between K and Vs
 *    N-C  3v3  | WiFi+BLE  |   5v    2             caps to Gnd on each V
 *    SD2  TCK  |           |  TDO  SD1
 *    CMD  SD3  |______usb__|  SD0  CLK
 *         (back) (+) (-) LiPo Batt Conn
 *
 *  Because the L9637 is puts out 5v, and the ESP need 3.3v,
 *  to the RX, I added a 47k to Gnd, and a 470k to the ESP32.
 *  It worked.
*/
//  define Rx and TX on the L9637 chip, with K probed:
//  TX is Input for K as output. RX is Output for K as input.
#define Sender_Txd_pin   25    //  to Tx on Sender
#define Sender_Rxd_pin   22    //  from Rx on Sender L9637

void setup() {
  Serial.begin(115200);

  //  init L9637 RX with a short HIGH-LOW
  Serial.println( "init with Rx HIGH" );
  pinMode( Sender_Rxd_pin, OUTPUT );
  digitalWrite( Sender_Rxd_pin, HIGH );
  delay(300);
  Serial.println( "sending Rx LOW" );
  digitalWrite( Sender_Rxd_pin, LOW );
  delay(25);

  Sender.begin(10400, SERIAL_8N1, Sender_Txd_pin, Sender_Rxd_pin);  // iso9141 baud rate
}

void loop() {
  Sender.println( 3 );    //  just an integer
  delay(2000);
}

Note: I've tested the code and the ESP32 serial ports extensively.  That works well.  I've check the wiring on the L9637 chip, properly powered, 510 ohm resistors, proper capacitors, with their K-lines connected to each other.  When I Digital.Write to the Sender L9637 TX, should I be able to see the K respond?  Sometimes it seems like it does, and sometimes it doesn't.  How do I make this robust?


texts: why is the product of gain and bandwidth constant for an amplifier? IS this statement always valid or holds true under certain conditions only?


texts:
I would like to upgrade my RC project, changing from common AA batteries to li-poly. I've chosen them because I always see them in RC planes/cars. My model would require 7.2/9V and a max instantaneous dran of 1A, the capacity depends on the cost.

I've searched over Google, but I can't get my head around what's needed to use such batteries. Most guides I've found refer to batteries for arduinos or don't mention chargers/vendors, but since I'm not in the circle, I can't distinguish good from scam, cheap for dangerous.

What are the full set of components needed and any possible risks in mishandling litium polymer batteries?  (beside most oblivious ones like overcharge or puncture).


texts:
I want sense a \$20\mathrm{kHz}\$ PWM signal from an electronic board. I want read this signal with "analogRead(A0)" function on my Arduino board. Therefore, I made a 1st order low pass filter that consists a resistor, capacitor and opamp buffer.

Firstly I produced a \$20\mathrm{kHz}\$ PWM signal from D9 pin of my Arduino. The duty cycle of PWM signal is fading with \$0\mathrm{\%}\$ and \$100\mathrm{\%}\$ continuously. The PWM generation code:

pwmWrite(led, brightness);
brightness = brightness + fadeAmount;
if (brightness == 0 || brightness == 255) {
    fadeAmount = -fadeAmount ;
}

According to my calculations, for \$20\mathrm{kHz}\$  low pass filter, resistor should be \$82\mathrm{k\Omega}\$ and capacitor is \$100\mathrm{pF}\$.

But I used \$68\mathrm{k\Omega}\$  resistor because don't have \$82\mathrm{k\Omega}\$. In this case cut off frequency of low pass filter is being \$23\mathrm{kHz}\$. I read this signal from A0 pin with analogRead and ADC sampling. The reading code is:

int c;
long a;
for(c=0;c <32;c++) {
    pwm_deger=analogRead(A0);
    a += pwm_deger;
}

int f = a / 32;
Serial.println("pwm_deger:");
Serial.println(f);
delay(200);

I've added the results below. The figures are scaled in 0-1023 (Arduino's ADC value)

Figure 1 shows \$20\mathrm{kHz}\$ PWM signal that I want to test signal with fading from \$0\mathrm{\%}\$ to \$100\mathrm{\%}\$ duty cycle with \$200\mathrm{ms}\$.
Figure 2 shows LPF signal without buffer.
Figure 3 shows LPF signal from output of opamp buffer.

Is there any problem in figures? Why figure 2 shows 0.7 of 1023 and cutting after ADC value of 700. Is it because of the opamp?

Figure 1

Figure 2:

Figure 3:


texts: Why isn't a depletion region considered at the P-N junction of a MOSFET?

texts:
I'm trying to understand the working of an n-channel depletion type MOSFET. I'm confused why no tutorial talks about the depletion region between the P and N type silicon i.e between the 'bulk' and the 'channel'.

Even if I were to consider that the depletion region is actually present but neglected in the explanation, here comes the next question, 'How can the MOSFET ever work in the 'Enhancement Mode'?'

Because I presently understand that this MOSFET will be in the Depletion mode when I forward bias the P-N junction (the depletion region gets destroyed and holes shift towards the gate to decrease the carrier density) But for enhancement mode, when I reverse bias the P-N junction, the depletion region should further increase (become wider) and once again the channel should become SMALLER thus REDUCING the drain current, whereas the drain current actually INCREASES in the Enhancement mode (Transfer characteristics diagram attached). What am I missing?


texts: Same type of jack - different current ratings

texts:
I'm looking for not expensive DC barrel female connector that can handle 8A of current. I found only barrel jack 5.5x2.1mm which can handle 3A, I couldn't find anything similar. But same type of connector(but male) can handle 10A of current.
Why? Why female jack can't handle 10A but male can?


texts:
I hope there is someone who will assist me with this.
I have 5 LEDs, with a switch in front of them. I use a 12v supply.
Switches can be randomly turned on or off. LED's are 2v, 10 mA.

I can not get my head around how it should be assembled. I am afraid to send too much current through the LED's. Should I put a resistor in front of the LED's?

You can probably read that I am not very good at electronics. But when has it stopped anyone :)

Thank you in advance.

I am very sorry I have written something wrong. There is a switch in front of each LED. So each of them can be switched on and off. Again, I'm sorry, and thanks for the replys.


texts: Replace an inverter and a MOSFET with an IC for 3v3 to 5v level shifting?

texts:
First, I'll go through what I think is going on in this circuit. If I understand it correctly it's basically a logic converter. The 3v input comes from STM32 GPIO and the output goes to a floppy disc controller.

When 3v3 input is low the inverter will raise the voltage on the gate of the transistor, transistor will open and the 5V will be pulled to ground and there will be no output. So when there's no voltage on the gate, transistor is shut and output will sense 5V on the line.

simulate this circuit – Schematic created using CircuitLab

Assuming that my analysis here is correct, I am wondering if I could possibly replace this this whole part with an IC?

I have six lines that need level shifting and I found TXB0106 IC. It says that it is a bidirectional level shifter and voltage translator. Reading the specs I figured I could just replace the inverter IC, resistor, mosfets and the 5V pull-up resitor with this IC.

I set VCCa to 3.3V, VCCb to 5V, OE pulled to high, take care of decoupling and then just use the input and output for each line that I need.

Because this seems a little bit too easy, I have a feeling that I'm not seeing something and I'm missing some detail that will break my design.

I know that I don't actually need a bidirectional converter, but this one fits perfectly so I'm not going to be pedantic about it.

So, any ideas why it might not work and if there are better solutions, I'm open to all the suggestions.


texts: Determining the open-loop output impedance of a buck-boost converter. How to do it?

texts:
I'm currently working with a circuit that is slightly more complicated than a buck-boost converter, but for simplicity let's just consider the small-signal model of a standard buck-boost converter.

I want to determine the open-loop output impedance of this converter. I'm familiar with how to find output impedance of a simple amplifier, but the small-signal aspects and the open-loop specification are, for lack of a better phrase, throwing me for a loop.

I know the general idea is to make the sources zero. Does that mean eliminate (short the V sources, open the I sources) both voltage sources and both current sources in the picture?

Then what exactly are my Z_1 and Z_2 (i.e., Zout = Z_2/(Z_1+Z_2)). Or is that even the correct method? Do I push everything through the transformers to the output and just use that expression containing all the impedances in the circuit for the total impedance?

Confused.


texts: What is the physical difference between a solar cell and a photo-diode?

texts: I am aware that they are different in their application (Obviously) and their area for capturing light, however from an initial reading of their working they seem to be the same thing at a fundamental level, A p-n junction excited by light.


texts:
I just ordered a printed board from OSHPark.  I'm done soldering all my components to it, and I tested it and found one small mistake.  I have a "error" signal that is normally high, but goes low if anything goes wrong.  I have an LED to indicate an error condition, and I tried to use a BS170 n-type mosfet to control the LED, because the 4043 latch I'm using to drop the error signal can't sink that much current.

Schematic:

simulate this circuit – Schematic created using CircuitLab

The problem is that during an error condition, Q is LOW, hence the diode is off, whereas during normal operation, Q is HIGH, hence the diode is on.  I want the opposite behavior, preferably while making minimal changes to my already soldered, printed circuit board.  Writing over the silkscreen with a sharpie, for example, might be a last resort.

Unlike the latch that comes with circuitlab for the diagram above, the 4043 does not have a "not Q" output, or I'd wire that to the FET instead.  I realize that this is a tall order, but what I'd really like is an "inverted" FET that I can just swap out the BS170.  High -> closed, low -> open, three pins, TO-92 package if possible.  My board footprint is such that it doesn't matter if the pin order is the same as the BS170, I can rotate and bend pins to accommodate any pinout.  Just as long as it has three pins and is roughly TO-92 sized.  Given the vast variety of specialized transistors out there, I figured it was worth an ask.

I looked into N-type depletion mode FETs, and learned that to switch them off you must bring the gate voltage below the source voltage, which won't work because I'm looking for a drop in to my existing circuit.

I consider getting a p-type FET, cutting traces, and adding flyovers to put the FET above the LED on the schematic, but I'd rather do this with minimal impact to the existing board.

Thank you for any help.


texts:
I designing a pcb with 14 sheets in hierarchical option. While transfering my components to the PCB doc I get an error sign in some net names without error messages! With that error I get "failed to add class member" error in all sheets and in all signal harnesses.

The second issue that I encountered is in Engineering Change Order when I import the objects and executing. After it, when trying to import the same objects again, without change anything to pcb, some of the objects appear again and still remain in Engineering Change Order, I don't see the expected "no differences detected" message. This disturbs me and I'm afraid for PCB design.

My project, compiled successfully.


texts:
Reading an SPI Flash datasheet, I encountered the concepts of "dual I/O" and "quad I/O". At first I thought that "dual I/O" was synonymous to "full duplex", but then what is "quad I/O"?

What is dual I/O and quad I/O, and how do they compare do duplex and full duplex?


texts: Adding a remote switch and battery to a 9 volt dispenser

texts:
I have an insecticide dispenser in my shop.  The unit is designed to spray a short burst of insecticide once every 8 minutes.  I have found I don't need this frequent of a burst and my thought is to add a remote switch on the battery positive lead and to relocate the battery to an area that makes changing the battery easier.
I have cut the wires for the battery connector and spliced in approximately 20 feet of cat 5 cable with a RJ-45 connector to make removing the dispenser easier.  The dispenser no longer works.  I have tested the power at the dispenser and have 9 volts.  I am wondering if I no longer have the amperage available at the control board to operate the dispenser.  I will be going outside shortly to get some pictures of the control board and how I have everything set up.  Any help I can get on this would be greatly appreciated


texts: What is the role of the rightmost transitor in this circuit?

texts:
I extracted the following circuit from an schematic. It is part of power section. The switch on the +2V line is actually a GPIO from a microcontroller which turns to +2V when powering on the device.

I understand the role of the first, leftmost, transistor which acts basically as a switch for the power on regulator. The question is, why the rightmos transistor? And why the (high pass filter?) driving its gate?

Note: The rightmost transistor is actually a trench-MOS, but I couldn't find the symbol for the schematic.


texts: How to find Z Transform of the function which is on S domain?

texts:
Given a $s$ domain function $$F(s)=\frac{3\, e^{-0.2s}+3}{s(s+3)}$$ and i have to find the Z-Transform of the function for (1)T=0.1 sec (2) T=0.3 sec
For T=0.1 sec i can write $$  3(e^{-0.2s}+1)\rightarrow 3(z^{-2}+1)$$ and then i can use partial fraction for the denominator part and take ZT .

But for the second part can i write $$3(e^{-0.2\,s}+1)=3(e^{-0.3\,s \cdot \frac{2}{3}}+1)\rightarrow 3(z^{-\frac{2}{3}}+1)$$
is it valid ? i think it's not because ZT can't be valid in between any fractional interval . then how to solve this ?


texts: How to avoid Relay buzzing noise? (LDR dependent)

texts:
I have the following circuit where I'm switching a relay based on whether it's day or night. I made a voltage divider using a pot and an LDR, which leads to the NPN transistor. So when it's dark the NPN will switch, which then causes the relay to switch.

Problem: I am getting a buzzing noise whenever there is a gradual decrease in light, which is a problem since I'm going to be placing this outside. My guess is there is a threshold where the voltage causes the relay to switch back and forth quickly, causing the buzzing noise. How do I ensure the relay only switches once when light slowly fades? Is there some latching device I could use?

Also, my DC power source is via a full-wave rectifier without a capacitor, so there seems to be very small fluctuations in the DC voltage. Would that be the problem?

EDIT: I read about relay hysteresis, but so far I only read about solutions using microcontrollers, which I want to avoid.

simulate this circuit – Schematic created using CircuitLab