texts: Bus-powered non-USB device (like fan,lamp) USB pin arrangement to getting highest power from USB host

texts:
Bus powered means device that only use Vbus of USB for it's power supply. I want to use micro USB as my board power supply. The is designed to take 600mA by 3.3v regulator. But I just don't know how to behave to it's pins?
I have found somewhere that, it's data pins must shorted or connected together through 0-200 ohm resistor.

What and why must be exactly it's resistor?

How must be behaved to it's "shield" and "ID" pins? GND must be simply gnd isn't that?

how it will behave to charger and PCs?

Update:

I've found some nice theory about chargers beacon, for telling to hosts: I have XmA (X is variable) current available. Then they adapt themselves to accept that power. It means host will detect chargers available power.

But I want my board to beacon to the host like this: Hey host I want lot's of power please give me 1.5A (dedicated charge port) if possible.

Ok, but my question is on the suppliant side not the supplier.I want good wiring configuration for:

(1)Ability to take required current from every supply including PCs without digital enumeration through MCU. (And is there any wiring config to get ride of enumeration?) (2)Nice noise, EMI, EMC performance

I've also asked my question in other form here.


texts:
Does anyone have any experience with the Microchip MRF49XA sub 1GHz transceiver? I have been trying to get one of these to talk to a pic16f886 over the last week or so over SPI and having no luck getting a response out of it. I have followed the data sheet on the required connections correctly as far as I can tell and I able to send data out on the SDO, but when I pull chip select low and write 0x00 to the SPI output (which should get a response from the MRF49XA status register) the SDI line stays low. I have tried writing all my own code using the data sheet as my source and when that didn't work I downloaded the Sample Demo Application and ripped out the relevant parts from, still no luck.

I have attached a screen shot of a sample of an SPI write cycle, Ch. 1 is the SDO, Ch.2 the chip select line and Ch. 3 the SCK.

Suffice to say that when executing the SPI read the SDO is low, the SDI is low (sadly) the chip select (CS) is low and the clock pulses correctly. The MRF49XA uses Word writes so that is why the clock line pulses 16 times with a gap in between where the CS remains low.

If anyone has had any experience with this chip help would be great, some of the articles I have found online have hinted that is can be a pain but nothing has really helped so far.

I am using a PIC16F886 to talk to this thing, running off 3.3V and here are the SPI setup and commands:

.
.
.
.

//set up SPI
    SSPCON = 0b00100000;
    SSPSTAT = 0b11000000;
}
void spiWrite(BYTE data)
{
    BYTE i;
    PIR1bits.SSPIF = 0;
    i = SSPBUF;
    SSPBUF = data;
    while(PIR1bits.SSPIF == 0){}
}
BYTE spiRead(void){
    spiWrite(0x00);
    return SSPBUF;
}

void RegisterSet(WORD setting)
{
    nCS = 0;
    spiWrite(setting >> 8);
    spiWrite(setting);
    nCS = 1;
}


texts: Using an NPN transistor as a signal switch

texts:
I'm using this NPN switch to turn on and off a clean guitar signal (as part of a much bigger circuit not seen.)  The base is connected to the switch, which gives the base 9V through a 1 megaohm resistor.  The idea is that when the switch is on it will allow the clean signal from the collector to the emitter.
LTspice does not like this part of the circuit at all, as it takes an extremely long time to simulate, if it doesn't crash. I have a feeling it's a terrible little circuit, but I'm not sure why.  Is this circuit acceptable, or is there something I'm missing?


texts: To what extent are alternators "flexible" to variations in input speed and output voltage?

texts:
An automotive-style alternator works from 750 RPM to e.g. 7000 RPM, a range of nearly 10:1.

In terms of output voltage, I know they target a fixed output voltage, but I believe it wouldn't be too hard to change the voltage regulator so that it targets 16V for example. 24V is probably also possible, but that's where I'm starting to guess, and this question arises.

To what extent can an alternator's parameters be varied, especially in terms of output voltage?

EDIT: I'm also concerned with practicality. As in, "it will work, but the alternator efficiency will be abysmal at the extremes of the RPM range" - then it's not really working.

Background (for the curious)

I'm asking this in reference to my previous question. It is possible to use a large, water-cooled alternator for the generator part there. I am wondering whether an alternator supporting a 6:1 input speed ratio and 5:1 output voltage ratio would be feasible (specifically: 1500-8000 RPM, 24-120V, ~400A). I feel that it's not, but I don't have the exposure in this area and I wasn't able to google anything relevant - I don't know the right terms. If it's unfeasible, I'd like to learn about the technical difficulties that make it so, and what can I do to optimize the whole system (e.g. is it better to vary speed, or voltage?). Pointers to resources for people unaccustomed to electrical machines would be well appreciated, especially if focused towards alternators.

Keep in mind that the alternator would be custom-built for this task, but I would want to avoid being totally clueless about the work those guys would be doing, and I like to know what is considered reasonable to ask them for.


texts: Current sensing power supply for hobby servos

texts:
I'm trying to design a power supply for 8 hobby servos which senses the current consumed by each of them. Size and cost are the main drivers, much more so than absolute accuracy.

I'm designing for 1A per channel, although it might be nice to have a couple of 2A channels.

I have an MCU with enough single-ended analog inputs. If the best way to do this is differentially, which I suppose might happen if the sense resistor is on the high side of the load (is there a reason to put it there), then I might need more pins and would probably add something like a MAX11609 or MAX11611 I2C ADC. Apart from knowing whether it needs to be single-ended or differential, I've got the ADC part under control.

My questions are:

Where do I put the sense resistor?
How do I do sufficient low-pass filtering that I can sample these current measurements slowly (say 10Hz) and smooth out whatever is going on at frequencies higher than that?
Does it make sense to look at something like a current-mirror FET? I can't seem to find any with current ratings remotely as low as 1-2A, they all seem to be rated for 40A+ and sized accordingly. It would be nice because then there would be over-current protection, but I can certainly live without it if its going to be a 300% price difference and a 100% size difference.
How do I amplify the signal? Does it make sense to amplify before or after filtering, and before or after multiplexing?
Is there something I'm not thinking of which is going to cause a major problem. ;)


texts: Can't get PWM to work on a PIC12F683 using MPLAB XC8

texts:
I'm trying to make PWM to work on the PIC12F683. According to my calculations I should get an 8 bit 20kHz PWM at GPIO2, but that does not happen. Instead I get a 5kHz "weird" PWM signal such that when I set the duty to be 255, which should be maximum, I get this 5kHz wave. What could the problem be?

EDIT: I am following this procedure which is written in the PIC12F683 datasheet, but I am either not doing it right or there's something else I need to do.

This is the code:

  /*
   * File:   main.c
   * Author: Calin
   *
   * Created on November 9, 2015, 11:10 PM
   */

  #define _XTAL_FREQ 8000000
  #include <xc.h>
  #include <PIC12F683.h>
  #define CHECK_BIT(var,pos) ((var) & (1<<(pos)))

  /* Prototypes *****************************************************************/
  long calculatePower(void);
  unsigned int readVoltage(void);
  unsigned int readCurrent(void);
  void PWM_setup(void);
  void PWM_set_duty(int);
  void interrupt ISR(void);
  /******************************************************************************/

  void main(void) {
  // Select 8Mhz internal clock
  OSCCON |= 0b01110001;
  // Configure GP0 and GP1 as analog inputs
  TRISIO  = 0b00000011; //input
  ANSEL   = 0b00000011; // clock = 1 meg and analog configure
  INTCONbits.PEIE = 1;
  INTCONbits.GIE = 1;
  INTCONbits.T0IE = 1;
  PIE1bits.CCP1IE = 1;
  PIE1bits.TMR2IE = 1;
  PWM_setup();

  PWM_set_duty(255);
  while (1){
      //long power = calculatePower();
  }
  return;
  }

  void PWM_setup(){
  TRISIO &= 0b11111011; // make sure GP2 is OUTPUT
  PR2 = 0x65;
  CCP1CON = 0b00001100; // active high PWM
  PIR1bits.TMR2IF = 0;
  T2CONbits.T2CKPS = 0x1; // set prescaler to 1
  T2CONbits.TMR2ON = 1; // enable Timer 2 and therefor PWM
  }

  void PWM_set_duty(int duty_cycle){
  // Sets the PWM duty cycle by setting
  // the 2 LSB's in DCB and the 8 MSB's
  // in CCPR1L. 10 bit resolution
  CCP1CONbits.DC1B = duty_cycle;
  CCPR1L = duty_cycle >> 2;
  }

  long calculatePower(){
  return readVoltage()*readCurrent();
  }

  unsigned int readVoltage(){
  /*
   * Reads and returns the voltage at AN0
   */
  // Select channel 0 and turn on ADC
  ADCON0 = 0b10000001; // enable ADC
  ADCON0 = 0b10000011; // GO

  while (CHECK_BIT(ADCON0, 1)){
      // wait
  }

  // 10 bit ADC result
  unsigned int voltage = ADRESL | (ADRESH << 8);
  return voltage;
  }

  unsigned int readCurrent(){
  /*
   * Reads and returns the current at AN1
   */
  // Select channel 1 and turn on ADC
  ADCON0 = 0b10000101; // enable ADC & select channel
  ADCON0 = 0b10000111; // GO

  while(CHECK_BIT(ADCON0, 1)){
      // wait
  }
  unsigned int current = ADRESL | (ADRESH << 8);
  return current;
  }

  void interrupt ISR(){
  // Timer2 overflow => start a new PWM cycle
  if(PIR1bits.TMR2IF == 1){
      PIR1bits.TMR2IF = 0;
      TRISIObits.TRISIO2 = 0;
  }
  }


texts: Why does a circuit model of N-MOSFET exhibit a finite resistance between source and gate?

texts:
In the T-equivalent circuit model of a MOSFET in small signal analysis the MOSFET shows an infinite resistance between its gate and source when looking from the gate while it shows very little resistance when looking from the source.
I can't see how it can shows two different resistances like that. If the current has no path from the gate to source how it can be that it has a path from the source to gate - it's completely isolated by the SiO2 layer
One more thing is that in first glance I thought that since it's a small signal analysis the capacitive gate should be represented as a short circuit like we do with normal capacitors in the small signal analysis but instead the analysis seems to assume an open circuit in the common source configuration and a short circuit in the common gate one.


texts: How many bits of information does a voltage of 0-5V , with accuracy of ±50mV convey?

texts:
In my intro to logical design class, we were shown this simple question as one of the first examples for the exercises we will have. The question was:
An analog voltage is in the range of 0–5 V. If it can be measured with
an accuracy of ±50 mV, at most how many bits of information does it convey?
The answer we were provided stated that:
Accuracy of ±50 mV means that the analog signal is divided every 100mV, so we have 50 discrete measurements from 0 to 5V. Thus  $$log_250= 5.64$$ bits.
My questions are:
What does accuracy of 50mV really mean?
How did we come up with a division of every 100mV?
If out analog voltage was in range 0 to 6V, then would we say that 6V = 6000mv, so
$$\frac{6000}{100} = 60 \text{ discrete measurements, thus } log_260 = ... \text{ ?}$$
And lastly, what am I really being asked here? What do 5.64 bits really show us?
I would appreciate any help given!!


texts: For a Y connection, why would a line-neutral current be the same as a line-line current?

texts:
For the following image of a Y-connection (taken from here)

How would a line-to-neutral phase current be the same as a line-to-line current?

Assuming I_{1N} is the phase current and I_{13} is the line current,
how is it possible that I_{1N} = I_{N3} (as per original assumption),

as opposed to I_{1N} = I_{N3} + I_{N2}?

EDIT: From that same info. source,

  "The terms line current and phase current follow the same logic: the
  former referring to current through any one line conductor, and the
  latter to current through any one component."

meaning for current, "line" =/= "line-to-line". So this question comes from a confusion with regards to what the terms actually mean.


texts: LTspice unicode trouble with micro symbol

texts:
I am having a pretty simple issue with LTspice, I built my circuit and it works fine, but the units for the capacitors don't display properly and I get the that "fE" unicode error I guess instead of the proper symbol for micro, I tried to find a setting to make it stop using any symbol and just display u or something alike. I want to show the circuit neatly on a presentation and having the proper units either as u or micro symbol would help a lot. Currently the best bet I have is just hiding that text.

The images I provide are a segment of my schematic and the settings for the capacitor, I actually have to type 5u in the box and when I apply the settings it changes automatically to that micro symbol. it displays properly there but not on the schematic.


texts: Charging and discharging 18650 batteries with TP4056 modules via their power output terminals

texts:
I'm having those fancy ESP boards that come with a battery input pins/holders that can be connected to a battery to make them portable. They also have a dedicated USB port for charging/sketch uploads.

However, these ESP boards do not protect the cell against short-circuit or come with over-charge/low voltage protections. My intention is to use the cheap "18650 charging modules" that come with TP4056 chip and battery protection ICs, such as this one.

After wiring up, the output from the TP4056 module goes to the ESP board. There's just a problem. It'll work fine when the setup is being discharged, but how does it get charged when the ESP board gets connected via its USB? It just sends ~4.2V to the battery connectors and since this is already connected to the output of these modules, I'm worried if there might be any damage to the to either of these boards. I could charge them separately but during sketch uploads, the battery terminals are going to be fed with the charging voltage anyhow.

I'm wondering if it's somehow already safe against a reverse current, or should I add something to make this work.

Edit: Here's roughly what I mean:


texts: What does register and bus size depend on?

texts:
So here is a hardware sequential multiplier depicted. Number A is 51 bits width, number B is 48 bits width. I have to choose the most efficient size of buses and registers (optimize according to memory usage).

My actual question is: what do these sizes depend on? How should I proceed in this task? I am not looking for exact solution, but at least a hint, because I have no idea where to begin my search for information.


texts: Why would you right shift 8 bits for 8 bit register?

texts:
MCU: Atemega328P Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf (Page 143 - USART)
Note: I am beginner :)
Using the BAUD rate formula found in this picture we can calculate the UBRRn value for 9600 BAUD rate. Therefore UBBRn = 103.

103 is loaded into UBRR0H and UBRR0L with UBRR0H taking the 4 most significant bits. According to the datasheet this is the method to load 103: UBRR0H = (103 >> 8); UBRR0L = 103;
103 = 1100111
Wouldn't this just load 1100111 into UBRR0H and shift right 8 bits pushing the entire value out of the register to give 00000000?
And in UBRR0L would this not give 01100111?

FROM DataSheet


texts: What do the "optional" resistor and capacitor do in this circuit?

texts: I'm designing a circuit that includes a boost converter with a few mysterious "optional" components and I'm trying to decide whether or not to include them. Does anyone know what they do? At first I thought they might be some filter but now I'm not sure. Here's the datasheet for the FitiPower FP6717 step-up converter chip.


texts: Why does this USB device draw different currents from different sources?

texts:
What would cause a USB device to draw drastically different amounts of current, but still function properly?

Background & Research:

I purchased a Playstation 2 Graphics port->HDMI converter (like this one) that requires external power via micro-USB port, claiming to require a 1A rated source.
Using a USB Tester, I found the typical current draw to power the HDMI converter from a USB wall adapter to be .25A (250mA) (~1/4 of the manufacturer recommendation).
The USB specs for my Playstation 2 (Model SCPH-30001) is supposed to be USB 1.1 with a maximum output current of .1A (100mA).
I tried plugging in the HDMI converter to the Playstation 2 for a few seconds at a time to see if it would function correctly, and it did, though it only drew about 0.01A (10mA). So...

Questions:
1. What is going on here?
The HDMI Converter pulls 250mA at 5.05V from the power brick, but only 10mA at 5.05V from the 100mA-rated USB 1.1 socket. It seems to work just fine from either, displaying HDMI signal on the TV.
The HDMI Converter does not seems like it would require a lot of power, as it should only need to provide power for HDMI communication (rated minimum: .055A) and powering the tiny chip. Why would it pull so much more from the wall adapter?
2. Is this safe?
Am I damaging one or both of the devices by powering the converter from the Playstation 2?
I DO NOT want to harm the Playstation 2, as I have burnt out USB ports by overloading them before. (But I CAN afford to fry the HDMI converter for experimentation's sake.)


texts:
I am new in the electronic industry and I would like to investigate more about resistors failure modes.

I have some doubts that came up when I read this article:
http://www.dtic.mil/get-tr-doc/pdf?AD=ADA259655.
See pages from 3-177 to 3-183 (which is the pages 231-237 of the PDF).

What means "Lead Damage"?
What is a "Drift" parameter?
What is "Binding/Sticking" resistor?
What is a "Contaminated resistor"?
What is a "Seal leakage" ?


texts:
I purchased some steppers motors with relatively little known about the specs.  I'm hoping to drive them with a L293DNE wired up like this.  I've got it working and it all seems to be going well - except the L293DNE is getting quite hot.  It would burn my finger quite quickly if I left it running long.

I understand they can run quite hot, but I'd rather not have it that hot if I can reduce it.  I require minimal torque for my application, so I was hoping to be able to run it off a 5v 700ma wall wart.

I'm pretty new to all this, but I thought increasing the resistance would lower the current and solve my problem, but it didn't didn't seem to help (or very possibly I did it wrong).

What should I do to reduce the heat?


texts: How to increase the audio power out to amp from tv

texts:
I have LG led tv 43lh576t . Im trying to connect the audio system using aux by taking output from tv's headphone out. Audio system doesn't have optical in. The problem is tv's output is very low. Is there any way i can increase the output by connecting an intermediate boosting circuit between tv's out and speakers in? If yes is there any good device or circuits available? Is there any better alternative way?
Thanks in advance.


texts:
I'm working on a project that uses a 2.8" arduino LCD. The LCD uses an ILI9341 driver. Now I'm testing this library: https://github.com/martnak/STM32-ILI9341 with an STM32F4-Discovery board (STM32F407) that runs RTOS. The problem is, if I do not use RTOS, the library works great. On the other hand, when I enable RTOS, The commands does work only before "MX_FREERTOS_Init();" in main.c. I thought  it was a problems of "HAL_Delay" instead of "osDelay" but it looks like SPI stops sending data to the LCD after some bytes sending. Here is what I coded inside the task:

  ILI9341_Init();//initial driver setup to drive ili9341
  ILI9341_Fill_Screen(WHITE);
  ILI9341_Set_Rotation(SCREEN_VERTICAL_1);
  ILI9341_Draw_Image((const char*)snow_tiger,SCREEN_VERTICAL_1);
  osDelay(2000);

When I do some debugging I get this message "Hard Fault Detected". I use no DMA, Interrupt, just Hardware SPI.

Can somebody help me?
Thanks!


texts:
I'm using a 2 coil latching relay named TQ2-L2-5V. I came to know that, 2 coil latching relays have two modes 1.SET and 2.RESET.

I want know, what happens in SET and RESET modes, in my case, in SET mode, the contact is not connecting to any of the pins in the relay. But in the reset mode it is coming to default state.

simulate this circuit – Schematic created using CircuitLab


texts:
I've designed my first PCB that will be machine populated. I sent my design to a fab who is going to panelize and make the bare boards.

I'm using a separate company to populate the boards. Would it be typical if they just wanted the pick and place file I generated for the individual board, or would I have to somehow make one for the whole panel?


texts:
I have following circuits :

Rf Amplifier :

Mixer :

The amplifier is able to give me a good gain of around 200 to 300 for signals in 100 MHz range. The mixer, which follows the amplifier, is more of a copy paste job to which I have added a couple of resistors to simultaneously amplify the output a couple of times.

The amplifier is preceded by an RF filter. The mixer is followed by an IF filter ( 10.6 to 11 MHz). So the scheme is as follows :

Rf Filter -> Rf Amplifier -> Mixer -> IF Filter

The Rf filter and Amplifier taken together work as expected. The mixer and IF Filter together work as expected. But problem occurs when I connect the Amplifier to the Mixer.

My output suddenly goes pretty weak and low frequencies begin to appear superimposed on the intended 10.7 MHz ( and nearby) frequencies.

Here is the output for 100 MHZ input signal :

while ideally it should have been my intermediate frequency 10.7 MHz.

Can someone tell me where am I going wrong ?

Thank you.


texts:
I hope everyone is doing well.
I am newbie in the electronics world.
The optocoupler is  PS2501L-1-F3-A.
the 'In' is supposed to be the input of a dry contact ( GND or floating state ),
In the previous design I used A simple pull up resistor but my colleague accidently connect the power supply of the dry contact to the input what Leeds to damaging the IC (stm32f4).
I want to protect the stm32f4 IC so I am using an optocoupler.
My question : what will happen IF I connect 24V to the input IN. I added the Diode ss210 to prevent frying the led ( it has a reverse voltage of 6V max )


texts: In terms of the load, what is the significance of the following circuit?


texts: How to determine Frequency response in BJT

texts:
What do I want to look for on a BJT datasheet to find out the maximum operating frequency before distortion occurs?  Or perhaps the question should be: How do I know how fast a transistor can cause the main current to change in response to a change in the base signal current?

Also, is there a noteable difference in PNP and NPN BJTs in this regard?  I read that P-Channel mosfets generally have higher slew rates than N-Channel, making them favorable if you need extremely fast response.  Is there any rule of thumb like that for BJTs?


texts:
I am following calculating resistors video lesson and stuck on trying to understand how combining of:
1/Rp=(R2/R1R2) + (R1/R1R2)

to
1/Rp=(R1+R2)/(R1R2)

at https://youtu.be/S0AJZjt0sEg?t=159 happened, what are the idea behind this, because if I try to derive Rp I assume I can do the following:
(1/Rp)^-1=(R2/R1R2 + R1/R1R2)^-1

that results to:
Rp=(R1R2/R2) + (R1R2/R1)

Correct?
But seems that:
(R1R2/R2) + (R1R2/R1) != (R1+R2)/(R1R2)

Because, once I test with values for example R1=3,R2=5 these expressions results in different values.
What I am doing wrong here here?


texts: Schematic symbol for DC barrel jack - and plug?

texts:
If I go along the definitions in What is the difference between a connector, jack, plug, and port?:

  The plug is part of a cable that connects to a port. The plug always connects to something else (e.g., a jack or port).
  A jack is similar to a port and is a hole or other connection that allows a compatible plug to be connected to the jack.

... then in this image (found here via image search):

... I'd call the things on the left DC (barrel) plugs (or "male" connectors) - and the things on the right would be DC (barrel) jacks (or "female" connectors). Would this be a correct nomenclature (even if I'm aware conventions like these are not strictly followed in the market)?

That being said, I'm aware there is a schematic symbol for DC (barrel) jacks - like this one, taken from Deciphering a DC jack schematic:

My question is: is there a schematic symbol specifically for DC (barrel) plugs, and if so, what does it look like?


texts: Calculating A Transformer Core Power Capability

texts:
I'm trying to build a transformer for a full bridge dc-dc converter and it's my very first time to design a transformer and I got limited knowledge.

I'm checking some ferrite cores and I've found this:
https://www.tdk-electronics.tdk.com/inf/80/db/fer/e_55_28_21.pdf

But I can't figure out it's power limits from datasheet, so how can I calculate this?

(planning to use this core in EE configuration, without a gap, in 30kHz, output is slightly higher than 2kW)


texts:
I have an IC that I need to replace by a small PCB. IC is currently plugged in the 44-pin PLCC socket. Is there a way I can keep this socket in place? That is, can I somehow "plug" this new PCB (which I will use instead of IC) into the 44-pin PLCC socket?

PCB is not yet designed, so I have flexibility of adding various pins or adapters.

PLCC Socket looks something like this:

Thanks.


texts: Solar inverter stops drawing power from PV

texts:
I have 3.2 kVA solar inverter with MPPT charge controller along with six  340 W solar panels installed. What I have noticed is that the inverter stops drawing power from PV though there is bright sun light. The inverter draw all power from utility only. In this phase, I have checked with the amp meter that there are no current even in wires coming from solar panels. But then I switch off utility to inverter and in few minutes inverter starts drawing power from PV and current come back in wires coming into inverter from PV modules.

This happens often during the day and I fail to understand why inverter is doing so because every time it is switched to utility all solar power is being wasted and I am still paying for utility.

Any suggestions would be appreciated.

PS: Inverter is set to draw power first from PV then battery and then utility.


texts: For an Ideal Opamp since the input terminals are virtually short circuited we dont need to worry about which input terminal is inv and which one is non-inv. Should I be careful while making this assumption? Thanks.


texts: Why do I get constant voltage across load of single phase inverter even with increasing input voltage?

texts:
I built a single phase inverter, as shown below. However, for PWM gate control signal of maximum 9V peak, I noticed that the output PWM voltage across the a 10k resistive load  does not increase above 6V no matter how much I increase the Vdc, above .
I suspect the MOSFET is in saturation, but it does not make sense as according to the datasheet states that the saturation current at 9V Vgs is above 10A.
Can someone explain to me why the peak load voltage is constant and how may I increase it with increasing Vdc?
For your information, I am using STP75NF75 N channel MOSFET.
I get similar results even if I change the switch to IRF740 N channel MOSFET.


texts: IMU Madgwick filter pitch effect on roll and yaw

texts: Using even Madgwick provided raw data, algorithm gives inaccuracies on roll and yaw when only pitch angle applied. This is also valid for our data which is collected with BMX055. We apply only pitch, the algorithm gives roll and yaw angles too. But there is a point I doubt about mathematics with positive pitch, roll&yaw show similar characteristics, with negative pitch their response similar to mirrored to each other. I'm sure about pure pitch with 1 axis motor. Why is such behaviour of the algorithm?


texts: Using cascaded totem-pole structures to supply more current for gate driving

texts:
simulate this circuit – Schematic created using CircuitLab

I want to drive a totem-pole structure with a logic gate. The problem is, the logic gate can only supply 8.8mA output sink/source current. Can I use cascaded totem-poles to supply more current to the MOSFET gates? I googled for it, but there was no result.

(I tried to do a simulation, but I couldn't observe the results I was looking for, because the logic gates are ideal (can give infinite current) and they supply 5V output high level voltage.
The double inverters at the low sides are for buffering the output of TL494.
I hesitated to use something which I have never seen before in other people's circuits. So, I decided to ask it here. Would it cause any problem?)

Larger image of the schematics:

Waveforms:


texts:
I know google's answer and wikipedia's answer for the above question. But I have a more specific question on hand.  USB hubs have many incoming and port and just one outgoing port, I am able to use say n-number of devices together because of this. But, I do not understand how can one USB port do data transfers with n-number of USB ports?
 how can it send different data to all USB ports at the same time?

*

simulate this circuit – Schematic created using CircuitLab

*.


texts: How to create timing waveforms for an H-Bridge Inverter

texts:
This is my first question on Stack Exchange.
I am in the process of simulating a wireless charger coil setup on LTSpice. I have tried a Royer/Baxandall oscillator to provide the necessary sinusoidal waveform. I would like to try it with an H-Bridge inverter (learned from here: https://www.youtube.com/watch?v=Z1dYlZASnS0). I am providing the timing waveforms for the gate using pulses generated by the inbuilt pulse generator. However, since I have to realize this circuit on a breadboard, using signal generators and setting delays is not feasible.
I am looking to simulate a circuit in LTSpice (and can subsequently be created on a breadboard) that can generate a square wave of 50% duty cycle and vary between 10k-100k (as in, the circuit should be able to reliably generate waveforms of that frequency range). These are basically to replace the pule generators I am currently using. Also, along with this, I need to delay the pulses for C2 and C3.

My line of thinking - I create a schmitt trigger to generate the original waveform for C1. Then, I can use a digital logic inverter to provide the waveform for C4 (which is just C1'). But, this will introduce a delay in the C4 timing signal which might be problematic during runtime. However, I cannot think of any way to actually delay the waveforms as required for C2 and C3.
Any and all help is greatly appreciated. If you would like the .asc file for simulation, please let me know how I can attach them.


texts: Can't work out Arduino 12v Relay (5v Logic)

texts:
I have a 12v relay but I just can't figure out how to use it. I went to tech support, but they just waved me away. So, my problem is that I have an 8 channel relay, but can't get it to work. I did try a shared ground (I know, bad idea) but disconnected that after half a second.

So the board has 10 pins, VCC GND IN1 IN2 IN3 IN4 IN5 IN6 IN7 IN8 and two linked ones, COM-GND. So, the relays require 12v in to move the coil (already have a power supply) and requires 5v logic to move the coils. What I can't figure out is how I'm supposed to use the logic and 12v input at the same time. Shared ground... didn't work. I'm lucky I was just touching some male jumpers and it scared the life out of me and I disconnected them.

But it's basic electronics: there's no flow if the ground isn't connected. The Arduino doesn't have a ground for its 5v logic, and there's no ground on the board that won't blow something up.

So, how do I provide enough power to work the relays and get the 5v of logic to switch them, without setting something alight?


texts:
I'm doing some coursework on control theory and I'm unsure whether I'm getting the right answer for one of the questions:
When I go through all the analysis, I get the response $$y(t) = 3U(t)(4-2e^{6t}(\cos4t+6\sin4t))$$
which is clearly unstable. This is not what I expected since the poles of the characteristic equation (\$-6\pm4j\$) lie in the left-hand plane, and the system should should therefore be stable. Should the system be stable or not?


texts: Efficient assembly/fabrication of PCBs differing only in solder jumper configurations

texts:
I have a PCB design with solder jumpers which need to be bridged to select specific functionality - say A and B. Half of the PCBs are going to have A and the other half B bridged.

Is there an efficient way (read: cost-effective) to manufacture such PCBs (i.e. so that it is still "counted" as one design as opposed to two)?


texts: Is factory burned bootloader required to communicate with ROM for NuvoTon w78E052D (8051)

texts:
This article on 8051 based NuvoTon w78E052D says:

The nuvoTon w78E052D controller comes with UART boot-loader and can be directly programmed from the serial port.

The block diagram on NuvoTon website shows this to be the case. The datasheet for the device shows a 2KB LDROM which will be used to boot based on config bits. So this part must be protected from being overwritten I guess but in the same data sheet on section 8 MEMORY ORGANIZATION (page 14) there Memory Map shows a 16k ROM shown with no LDROM as an option. Wouldn't that make the UART stop working? Is there anyway to program it without the bootloader?
My understanding, atleast in the case of AVR series is, you would need a Arduino like bootloader to use FTDI like devices to flash the ROM through USB->serial. Without the bootloader, SPI with a programmer like VUSBTiny or USBAsp will be required. Is this correct?


texts: Effect of large capacitor for differential channel in S-parameter simulation

texts:
I have created a differential channel with Transmission line and interconnects for simulation. In the real channel, there is 100nF capacitor in between 2 transmission lines. Now the problem is when I put this capacitors in series while connecting the transmission line (TL), I see very steep transition of S21 as well as S11 at low frequency (around kHz level). but If I remove the capacitors the transition is not there at those very low frequencies. I am not sure why is this transition happening at low frequencies while capacitors are placed? I have given the pictures below:

Simple block channel with capacitors:

S21 and S11 for the channel with capacitors:

Simple block channel without capacitors:

S21 and S11 for the channel without capacitors:


texts:
If I have the circuit where I have Vcc = 30V and Vee = -30V. Transistor's beta equals 300. I want my Ic to be around 10mA and Vce = 25V, Vrc = 25V, Vre = 10V. I want to bias the base of transistor from the common node of both positive and negative supply rails, that is GND.

What will be the voltage drop across Rb (base resistor)?

I have no idea how to calculate it in such situation...

simulate this circuit – Schematic created using CircuitLab


texts: Microswitch debouce circuit plus high impedance points - case study

texts:
I have a circuit where 3.3V are used for MCU and other peripherals, but microswitches are running on 12V. In the first version, microswitch was connected to the base via base resistor of a BJT. What I realized is that the process of switching was producing spikes in the near lines, high enough to trigger my external interrupt of the MCU. I have never seen something like that in practice. So i decided to put rc filter between microswitch and base of BJT. First try has shown that spikes are gone in the near lines. The circuit is shown below.

simulate this circuit – Schematic created using CircuitLab

The idea is to have debounce circuit to prevent input of microcontroller swing for the firs 20ms of the swich vibrations, plus to filter out spikes.

Now, a friend of mine, warns me that 200k ohms in the base circuit is too much, and that one should be aware of such a high impedances in base circuit, cause every induced voltage between Rb and R1 could go to the base, since to the left is 200k. Before I ask my question I wanted to say that I want to have interface between microswitch and MCU via transistor, and I will not consider divider solution.

My questions are:
Should I move debouncing between collector and MCU, and use RC filter with smaller time constant in the base in order to remove spikes?

Could you please explain a bit more why high impedances in base circuit are possible problem, as well as all points of high impedance in one circuit.

Whar are possible problems with this circuit?

Cheers


texts: Why does Li-ion charging require very tight voltage tolerance?

texts:
I have seen on many places e.g. here and here that it is very important to have steady voltage when charging a Li-Ion within 50mV.

On the other hand, charging voltage is generally 4.20V, but can be much lower e.g. 4V.

So why do we need steady power supply?

In other words, what is wrong with charging at 4.1 +-0.15V instead of 4.2 +- 0.05V. This charger would be much easier to produce.


texts: Can I add more RAM to the stm32f103c8t6?

texts:
I am currently working on my project using the "super blue pill" which uses the stm32f103c8t6. This board has about 20kb of RAM so there is not too much to work with here.

So far I have managed to hook up my Bluetooth module, small OLED display and now am trying to get my camera functioning, here is the thing I need help with - because this board has 20kb of ram I don't think I can hold this in memory even if the JPG is compressed.

Two options:
  - 1) Get another chip one that has 1 MB or ram preferably.
  - 2) the cheaper option use external ram or find another creative way to preserve the image and ship it off to the bluetooth to send to the users phone ( perhaps write to a SD card)

How I might do this on this board and preferably what ram ID# I should use and the best supplier. I also am curious if I could somehow write to a SD then read and send the image off? Although I think the external ram is more efficient and quicker - but i'm just a newbie so not too sure!

Here is some numbers and points for consideration

VGA - 640 x 480 x 3 = 921.6KB

Does the camera have compression and can mitigate memory footprint?
Image cannot be in grayscale! This will go to a Django backend for image processing

UPDATED REQUIREMENTS:

drive some kind of display
able to take a photo and send it to the users phone quality standards
need to be 640 x 480 or better

Biggest thing here is the camera. This circuit is being used to take a photo of object(s) then is being sent to a backend for p reprocessing and finally ran through a predictive model.


texts: Insufficient force from 6 V 1 A push-pull solenoid powered by a stepped down 9 V battery (relay) -- why and what can be done?

texts:
I am powering a 6 V 1A push-pull solenoid using a 9 V 1Ah rechargable lithium ion battery (form: 9 V alkaline) using a relay; the 9 V is stepped down to 6 V; controlled by Arduino. It is to be used as a kicker for a robot. The force is weak, perhaps less than the 5N advertised, why? Is it because the current draw is low (i.e. far less than the rated 1A)?
What can be done?

Should I use 9 V without stepping down?
Use a capacitor to store charge, and then discharge, so the current supply will be ~1A?
Can >1A of current be supplied to the solenoid for a short duration?
Should I get another solenoid, maybe a 12 V 1A?
If I should use a different power supply, what can I get that is small? I have a bunch of 3.7 6.8Ah li-on batteries around.


texts: Unwanted mosfet turn on and irregular duty cycle when driving with IR2110 how to fix?

texts:
I am designing an MPPT charge controller and testing all the different components. At the time of writing I am testing the buck converter.

During testing, I used a 10 ohm load instead of the battery and the following setup

R7 is a high side shunt resistor (value to be determined)
C7 and R8 (RC snubber, values to be determined) were not used in my test
D4 was not used in my test
D2 is a 1N4007 diode
C4 and C5 are 50 nF polyester capacitors
C2 is 100uF electrolitic
PWM is 50 kHz 0-5V signal
Atmega328p is driving the gate driver IR2110.
Buck converter input voltage: 30V

I tested the circuit with a fixed duty cycle and noticed 2 problems (point 1 and 2) which may be related to the gate driver:

The gate pulse to drive the mosfet is not always consistent with the PWM signal from the ATmega (see picture 1, high duty cycle, AC coupling).
The mosfet seems to turn on slightly at the wrong time (see picture 2, 10% duty cycle).
I will remove the ringing using the RC snubber at a later stage.
I think D4 is not needed in this circuit.

Where are these problems (1 and 2) coming from? I thought using a mosfet driver would remove much of the "driving" related problems.
Picture 1

Picture 2


texts: Hook up an automatic transfer switch with two phases only

texts:
We have a house in Haiti connected to the shore line. The shore line isn't always working so we bought a generator. I wanted to ground one of the two phases to create one neutral, one phase and a ground but people there said they don't do that. We had a lot of problems in the past we people getting shocked when they touch a freezer or a toaster. I keep saying that one of the two phases should be grounded but they won't listen, am I right to assume that?

Second question, I bought a Southwire Automatic Transfer Switch 50A Hardwire
Model 40100 to transfer a shore power to a generator when the shore power is down.

The switch box has three input on each contactor, L1 (phase 1), L2 (neutral) and L3 (phase 2). If I plug only L1 and L3 using the two phase it doesn't work. That's because the board uses L1 and L2 to detect electricity. Can I simply plug the ground to L2 and leave the two phases on L1 and L3, should I plug the L3 phase on L2 instead or should I consider them wrong and ground one of the two phases to get a neutral before the switch box?

It's worth saying that my shore line is a 220v line.


texts: Massively parallel AND gate using relays

texts:
Suppose I'm tasked to build an AND gate for a large number of inputs, say 1024.  I'd like to design a circuit that has 1024 relays in series, the "toggle" input of each being plugged to an input bit:

(source)

Question 1: Is it realistic to think that the execution time does not depend on the number of input bits?  Indeed, when the input bits are changed, the relays ought to toggle in parallel their state.  The propagation between the left-hand side and right-hand side is then negligible.

Question 2: Does such a relay exist at a nanometer scale?

Thanks!


texts: How does IF remain constant in a heterodyne receiver after mixing?

texts:
Below is an illustration about heterodyne principle:

I can see the motivation behind heterodyning. I read that it is basically done to obtain a "fixed" frequency for the amplifiers at different incoming tuned RF carriers. But look at for instance the above illustration. The mixer produces a beat freq. which is |f2-f1|. But how can that be fixed for different carrier frequencies? I mean if oscillator has a fixed freq. f2, how can f2-f1 be fixed when f1 changes?

I really couldn't find an answer by googling this. Am I missing a point here?


texts:
I am trying to build three circuits, an AND, a OR and a NOT gate for a personal side project.

I think I have the logic part down right, i.e. using the following gate logic:

simulate this circuit – Schematic created using CircuitLab

I'm building this by connecting two switches and a led to a 4011 Integrated Circuit. I'm powering this with an Arduino (5V) or battery (6V).

Here is the newbie question. The behavior of the IC is ...inconsistent once I try to cross connect any pins In order to use more than one gate (e.g. to build the AND gate)

What resistors do I need to insert in this circuit to make it work properly? How do I calculate their value? Or is it simply a case that I can't use the IC like this?


texts:
Classical education of EMF generation usually starts with something like this:

Where a wire is placed within a magnetic field and moved to create EMF.
Or this:

Where a magnet is moved within a coil.

In both of these examples, the conductor has magnetic flux lines cutting and traveling through it.

In a generator, the stator is usually constructed with teeth holding the coils.  These teeth focus and channel the flux, so that the flux path is through the teeth: the flux is concentrated within the teeth.

In this way, how is EMF generated if no flux actually cuts through / crosses the conductors, but rather travels between them?


texts: How to get TinyCAD to output correct netlist when using hierarchical design?

texts:
I've got a design (PIC microcontroller that uses transistors to turn on banks of LEDs). I have 2 instances of the LED array, so I made a hierarchical design - I have a separate schematic for the LED array, and I put 2 instances of it into my main project.

The LED arrays are just a bunch of resistor/LED pairs, labeled R1/D1, R2/D2, etc.

The problem comes when I generate a netlist - the netlist appears to include everything, but it doesn't differentiate between the R1 from the first instance of the array and the R1 of the second instance. So I get things like this in my netlist file:

*SIGNAL*  _HN_1_!ON
Q1.3 D1.1 D14.1 D2.1 D15.1 D3.1 D16.1 D4.1 D17.1 D5.1 D18.1 D6.1 D19.1 D7.1 D20.1 D8.1 D21.1 D9.1 D22.1 D10.1 D23.1 D11.1 D24.1 D12.1 D25.1 D13.1
*SIGNAL*  _HN_2_!ON
Q2.3 D1.1 D14.1 D2.1 D15.1 D3.1 D16.1 D4.1 D17.1 D5.1 D18.1 D6.1 D19.1 D7.1 D20.1 D8.1 D21.1 D9.1 D22.1 D10.1 D23.1 D11.1 D24.1 D12.1 D25.1 D13.1

Q1 feeds the first LED array, Q2 feeds the second LED array, but you see that D1 is referenced in both. If I feed that into FreePCB, I'm only going to get one LED array and it's going to be wired ALL wrong.

Is there a way to make TinyCAD do the right thing here?

Update: I tried putting the LED arrays on separate sheets, but that didn't help.

Update again: I suppose I could just copy the LED array design onto separate sheets and then number their reference designators appropriately, but that's giving up the hierarchical design altogether.


texts:
I am trying to read the contents of register written in serial mode of WM8253 using SPI in Basys 3 FPGA. Link to Datasheet. I'm reading from register '011100'  but the result that is read is always "111111111" irrespective of my inputs written in the register.[Register data "01010001" in my code] . The serial clock is set at frequency of 10MHz.

Here is my code:

entity WM8253_ADC is
  port
    (
      -- command input
      clock    : in  std_logic;         -- 100MHz onboard oscillator
      Dout     : out std_logic_vector(7 downto 0);  -- data from ADC
      -- ADC connection
      adc_sdo : in  std_logic;         -- ADC SPI MISO
      adc_sdi : out std_logic;         -- ADC SPI MOSI
      adc_sen : inout std_logic;         -- ADC SPI CHIP SELECT
      adc_sclk : out std_logic          -- ADC SPI CLOCK
      );

end WM8253_ADC;

architecture behavioural of WM8253_ADC is

  -- clock
  signal adc_clock,sen_clock,sen_clk : std_logic := '0';

  signal D   : std_logic_vector(7 downto 0) := (others => '0');

  signal spi_count : unsigned(4 downto 0)         := (others => '0');
  signal sen_count : unsigned(6 downto 0) := (others => '0');
  signal Q         : std_logic_vector(7 downto 0) := (others => '0');

  begin
    clock_divider : process(clock)
    variable cnt : integer := 0;
    begin
      if rising_edge(clock) then
        cnt := cnt + 1;
        if cnt = 5 then
          cnt := 0;
          adc_clock <= not adc_clock;
        end if;
      end if;
    end process;
    adc_sclk <= adc_clock;

 clock_divider_senclk_50Mhz : process(clock)
  variable cnt : integer := 0;
  begin
    if rising_edge(clock) then
      cnt := cnt + 1;
      if cnt = 1 then
        cnt := 0;
       sen_clock <= not sen_clock;
      end if;
    end if;
  end process;

  sen_clk <= sen_clock;
  shift_out : process( spi_count)
    begin
        case spi_count is
          when "00000" => adc_sdi <= '0';
          when "00001" => adc_sdi <= '1';
          when "00010" => adc_sdi <= '1';
          when "00011" => adc_sdi <= '1';
          when "00100" => adc_sdi <= '0';
          when "00101"  => adc_sdi <= '0';
          when "00110"  => adc_sdi <= '0';
          when "00111"  => adc_sdi <= '1';
          when "01000"  => adc_sdi <= '0';
          when "01001"  => adc_sdi <= '1';
          when "01010"  => adc_sdi <= '0';
          when "01011"  => adc_sdi <= '0';
          when "01100"  => adc_sdi <= '0';
          when "01101" => adc_sdi <= '1';
          when others => NULL;
        end case;
    end process;

   process(sen_count)
       begin
       case sen_count is
       when "1000111" => adc_sen <= '1';
       when "1001000" => adc_sen <= '1';
       when "1001001" =>adc_sen <= '1';
       when others => adc_sen <= '0';
      end case;
      end process;

   process(sen_clock)
      begin
      if rising_edge(sen_clock) then
      if sen_count = "1101111" then
      sen_count <= "0000000";
      else
      sen_count <= sen_count + 1;
      end if;
      end if;
      end process;

   adc_sm : process(adc_clock)
      begin
        if adc_clock'event and adc_clock = '1' then
        if spi_count = "010110" then
              spi_count <= (others => '0');
              else
              spi_count <= spi_count + 1;
          end if;
          end if;

      end process;

      -- Register sample into output
      outreg : process(adc_clock)
      begin
      D   <= Q;
      end process;

Dout   <= D;

      -- MISO shift register (rising edge)
      shift_in : process(adc_clock)
      begin
        if adc_clock'event and adc_clock = '0' then

            Q(0)          <= adc_sdo;
            Q(7 downto 1) <= Q(6 downto 0);
                  end if;

      end process;
   end behavioural;

I've tried to change the SPI Clock frequency with no progress.
Any inputs will help.


texts: How to Make a bode plot of an inverting amplifier?

texts:
I am trying to create a bode plot of the open loop gain and the closed loop gain of an inverting amplifier using mathematica. I know the documentation of the bode plot in Mathematica (BodePlot[lsys]) but I do not know what to put in the brackets to plot the function. For reference to the problem I am doing here is the setup:

Rf = 100 k(Ohms)
R = 10 k (Ohms).
I calculated low frequency gain to be: -10, and Bandwidth fb to be: 90.9 kHz


texts:
I am studying analogue electronics. In specific BJT transistors. There is this question that kind of confuses me:

Somehow the first question managed to confuse me really easily, and I am still stuck on that one. For the second request I calculated \$I_B\$ as follows:
$$I_B = \frac{I_C}{\beta} = \frac{20mA}{200} = 100\mu A$$
Then considering of wanting \$V_{CE} = 5V\$. I calculated as follows:
$$R_B = \frac{V_{CC}}{I_B} = \frac{20V}{100\mu A} = 200k\Omega$$
$$R_C = \frac{V_{CE}}{I_C} = \frac{5V}{20mA} = 250\Omega$$
As maximum input signal I suppose it is the maximum value that will eventually saturate \$V_{CC}\$, but at the moment I am confused about this as well. I suppose this is not a good circuit, as well, if it is not, why?

Thank you in advance for any clarifications given!

Luca


texts:
I am trying to understand transformer behavior for a project that i am currently doing. I am trying to simulate characteristics of transformer using simulink models. In the various papers that i have gone through, there have been mentions of energization angle and how varying that affects the inrush currents of the transformer.
Can someone please explain what is energization angle and how to vary it in simulation.

Thanks in Advance


texts: Getting PWM to work on STM32F4 using ST's HAL libraries

texts:
I'm trying to switch to the ST HAL libraries and can't seem to get the PWM to work. Compiles fine, just doesn't start.

In my main() I call the Timer initialization function:

/* TIM3 init function */
void MX_TIM3_Init(void)
{

  TIM_MasterConfigTypeDef sMasterConfig;
  TIM_OC_InitTypeDef sConfigOC;

  htim3.Instance = TIM3;
  htim3.Init.Prescaler = 0;
  htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
  htim3.Init.Period = 1300;
  htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
  HAL_TIM_PWM_Init(&htim3);

  sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
  sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
  HAL_TIMEx_MasterConfigSynchronization(&htim3, &sMasterConfig);

  sConfigOC.OCMode = TIM_OCMODE_PWM1;
  sConfigOC.OCIdleState = TIM_OCIDLESTATE_SET;
  sConfigOC.Pulse = 650;
  sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
  sConfigOC.OCFastMode = TIM_OCFAST_ENABLE;

  HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_1);
  HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_2);
  HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_3);
  HAL_TIM_PWM_ConfigChannel(&htim3, &sConfigOC, TIM_CHANNEL_4);
  HAL_TIM_PWM_MspInit(&htim3);

}

The GPIO is initialized in the HAL_TIM_PWM_MspInit() function:

void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* htim_pwm)
{

  GPIO_InitTypeDef GPIO_InitStruct;
  if(htim_pwm->Instance==TIM3)
  {
    /* Peripheral clock enable */
    __TIM3_CLK_ENABLE();

    /**TIM3 GPIO Configuration
    PC9     ------> TIM3_CH4
    PC8     ------> TIM3_CH3
    PC7     ------> TIM3_CH2
    PC6     ------> TIM3_CH1
    */
    GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_8|GPIO_PIN_7|GPIO_PIN_6;
    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
    GPIO_InitStruct.Pull = GPIO_NOPULL;
    GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
    GPIO_InitStruct.Alternate = GPIO_AF2_TIM3;
    HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);

  }

}

finally my main() looks like this: (I'm calling SystemInit() from main because I'm using STCube generated files with coocox coide)

int main(void)
{

    SystemInit() ;

  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();

  /* Configure the system clock */
  SystemClock_Config();

  /* Initialize all configured peripherals */
  MX_TIM3_Init();
  MX_GPIO_Init();
  MX_LWIP_Init();
  while (1)
  {

  }

}


texts: Component identification, between USB-C switch IC and connector

texts:
As the title really, can you identify this component?

It's on a line connecting a USB-C switch IC (PI3USB30532) to the USB-C connector and I believe the line is for Display port functionality.

How Critical are the values of this part as i have no way of finding them?


texts: How to add temperature control to a soldering iron

texts:
I see lots and lots of builds of "temperature controlled iron" that simply either:

adds a timer to an uncontrolled iron
adds a dimmer to an uncontrolled iron

The first is the same as turning on the iron later. And the second is the same as paying too much for a 25W iron (because that's what your 75W iron will become).

Are there any projects out there really adding closed loop temperature control to an unregulated soldering iron?

I think this can be done way cheaper than buying an overpriced Weller, but before I start something I would like to see where others failed/succeed and I'm failing miserably in finding any preceding work on this.


texts: What causes Arduino UNO to burn out with analog input of 4V and no power to board?

texts:
I have an arduino UNO R3 board and a Keyes SD card data logger shield operating on a 12Vdc wallwart supply that we are using to monitor battery voltage on a 24Vdc off-grid solar system. We collected about 8 million data points with the system over a week! One time, I unplugged the 12V wallwart supply (as I always do) and took out the 2GB card to get another batch of data. I got distracted and left the arduino unpowered with a +3.8V signal into A0 (actual battery voltage was around 25.1V) for more than usual minutes or two. When I remembered to put the card back into the SD Shield and plug the power supply back in, it was acting unusual. Then I smelled the arduino and it was clearly fried with that classic smell of fried electronics.

For the input signal hookup, I simply have one end of a 50K pot to Vcc (25.1V) the other end of the pot to Ground (battery negative, which is grounded) and the wiper goes to A0 on the board.

I am using the 50K potentiometer to reduce a 24Vdc to 31VDC DC battery voltage to 5Vmax (I set it so 32Vdc is 5.0Vdc on A0).

Another observation was when I carefully measured the output voltage of the pot to be 2.50V with a 16V input to the pot. When I connected the wiper to A0 on the board, the voltage dropped to 0.9V or so. But when I turned on the power, then it went back to its normal 2.50V.

What do I need to do to make sure I can power off the device AND not blow out the board?

I don't understand how a 50K pot could allow enough current to flow into A0 to burn off the conformal coating on the circuit board A0 trace, melt the plastic on the A0 pin of the ATMEGA328P-PU and, apparently, wreck the MEGA16U2 so that the laptop can no longer detect the board.

The pot presents about 8,000 ohms between ground (battery -) and A0 and about 42,000 ohms between Battery +ve and A0. When the DC power plug is pulled out of the arduino, that is the ONLY thing connected to the Arduino!

??? It seems so strange to me that there could be a problem!


texts: MIPS: Instruction Memory: Referring to instruction in memory

texts:
I'm implementing MIPS processor using Verilog.

input   [31:0] address;
output [31:0] instruction;
reg [31:0] instruction_memory [255:0];
assign instruction = instruction_memory[address[9:2]];

This is an almost complete body of Instruction Memory module.
The thing I cannot understand is why we refer to the instruction in memory using address[9:2]. I mean, why [9:2] ?

I've found an answer, but I cannot understand it. It says:

  What bits select the first 256 words? [9:2]!

Can you, please, explain me this detail in some other, more understandable way?
Thank you.


texts: What is the acceptable margin for radiated emission on an European CE device

texts:
One of our prototype (IOT gateway) has completed the emission test (EMC) but we have a margin on two particular frequencies, just wondering what is the acceptable margin for CE device in Europe ? I have been through various sites but still not able to figure out this the Margin acceptable. This will be installed at private sites (with public access).

For 160 MHz - Limit=40dBµV/m QuasiPeak=37.20 Margin=-2.80
For 550 MHz - Limit=47dBµV/m QuasiPeak=43.01 Margin=-3.99

Any suggestion would be greatly appreciated !!


texts:
As I'm relatively new to the electronics world, I was wondering if you can connect multiple  ground terminals (corresponding to several different voltage outputs) to the same ground. Or do they each need their own?

In my case I have 5 lines, one 12V, one 3.3V, two 5V and one variable from a 12V in using a  voltage regulator that already has its own ground. So I'm guessing that each would need its own ground, but it is never bad to ask.


texts: Strange behavior from a circuit, please explain

texts:
I was attempting to build a very simple class A amplifier. As far as I can remember from how I have breadboarded simple amplifiers for my headphones before, this circuit is identical to what I have done in the past. Obviously I did something wrong this time... It is very confusing. To test the amplifier, I connected the capacitor from the base to the positive rail, expecting to hear a pop. Instead, this thing started oscillating. It sounds like a dirty square wave, and the frequency is highly sensitive to capacitive bodies connected to the collector; if a free wire, like an antenna, is connected to the collector, I can play this oscillator like a theremin. If C1 is made smaller, the frequency increases, and vice versa for a larger capacitor. I can see no reason why this would oscillate, please explain. Thanks!

simulate this circuit – Schematic created using CircuitLab

Headphones used were Bose AE2 and crappy earbuds from an airplane, both worked.
9V battery is quite depleted, reading around 5.65V. R2 is not necessary to reproduce the effect, but it was part of my original circuit.

EDIT:

So I thought about this for a while and came to the conclusion that this might be an LC oscillator / RC oscillator mashup. When the capacitor is at peak voltage, a current runs through the base and a bigger current through the collector (and thus, through the headphones, which act as an inductor). Once the capacitor has discharged, the transistor switches off, so the inductor will, in an attempt to maintain constant current, cause a negative voltage spike at the collector, drawing the capacitor to below the voltage at the emitter through the now forward biased base/collector diode, until the inductor's magnetic field has collapsed. The voltage of the capacitor will then creep up, being fed current through R1. Once inductor reaches peak current, the voltage at the collector drops, and that is why C1 doesn't maintain that peak voltage, instead falling in voltage as in the beginning of the cycle. Does that make any sense at all, or is my speculation just wrong?


texts:
In practice, the effects/results described below are much easier to achieve with an MC -- I know.

However, for the sake of understanding and learning, I was considering the following scenario to be solved with basic ICs only, and could not find a good enough solution:

A counter system provides four decoded decimal numbers, i.e. for each digit there is essentially a 10-line bus. (think: http://www.electricstuff.co.uk/nixcct.pdf with the last flip-flop (UBA) replaced by another 4017)

I was considering how one could tweak this to display the numbers on one output device (in the above example, one nixie tube) sequentially, let's say, displaying one digit every second.

Now, one solution I came up with was to use four bus switch ICs which are driven from e.g. Pins Q0-Q3 of U5. This is in theory very neat, but the routing (more like wiring) would be a nightmare, well, quite a mess for single, even double sided PCBs. Also, bus switch ICs are comparatively expensive and are often available only in bulk.

So, my question is: What would be an better solution to achieve this goal with basic ICs (not FPGA or MC)?

EDIT: PI3B4011 seems like something I could use, however, I this chip seems to be obsolete (and is in the particular package not handsolerable). Any suggestions for surrogates?


texts: If I want to design a BJT with giving parameters like in the attachment, I know that the ideal voltage swing would put my Q point in the middle of the load line graph. To my understand, the Q point (Ic, Vce) is only with respected to DC analysis. Why was AC equivalent resistor included in calculating the Icq?


texts: confusion regarding QNET VTOL(Vertical Take off and Landing)

texts:
I was reading a manual about QNET VTOL and i came across a block diagram(shown in attached snapshot)

In the explaination of diagram, manual writes that

  The VTOL device is broken down into two subsystems: the voltage-current dynamics of the motor
  and the current position dynamics of the VTOL body. The cascade control implemented in the VTOL
  trainer is depicted in Figure 10.2 below. A PI current controller, the inner loop, is designed to
  regulate the current inside the motor according to a desired current reference. This current
  reference is generated from the outer-loop controller: a PID compensator that controls the pitch of
  the VTOL trainer.

Where are the two subsytems in block diagram,i think one systems is motor represented by the one with denominator Lms+Rm,if yes how/where other system is represented?

After locating the two subsystems in block diagram,please also mention their working/aplication


texts:
I'm designing a finite state machine (FSM) to detect the sequence "10001" in Verilog.

I'm having a similar problem to that described in this question in that my FSM does not tick when the sequence is seen but the solution to that problem does not apply in my case.

This is my FSM design:

Here is my verilog code for the FSM.

module fsm_detector(
input wire clk, reset,
input wire sequence,
output reg tick
);

// FSM state declarations
parameter A = 3'b000;
parameter B = 3'b001;
parameter C = 3'b010;
parameter D = 3'b011;
parameter E = 3'b100;

//signal declaration
reg [2:0] state_reg;
reg [2:0] state_next;

// state register logic
// asynchrous reset
always @(posedge clk, posedge reset)
    if(reset)
        state_reg <= A;
    else
        state_reg <= state_next;

//next-state logic and output logic
always @ *
begin
    state_next = state_reg; // default state: the same
    tick = 1'b0; // default tick = 0
    case(state_reg)
        A:  if(sequence) // sequence = 1
                state_next = B;
            // else stay in A
        B:  if (~sequence)
                state_next = C;
            // else stay in B
        C:
            if (~sequence)
                state_next = D;
            else
                state_next = B;
        D:
            if(~sequence)
                state_next = E;
            else
                state_next = B;
        E:  if(sequence)
                begin
                    tick = 1'b1;
                    state_next = B;
                end
             else
                state_next = A;
       default:
                state_next = A;
    endcase
end
endmodule

And testbench:

`timescale 1ns / 1ns
module fsm_detector_tb();
    //declerations
    parameter T = 20; //clock period in nanoseconds
    reg clk, reset;
    reg test_input;
    wire test_tick;

    fsm_detector uut(
        .clk(clk),
        .reset(reset),
        .sequence(test_input),
        .tick(test_tick)
        );

    // clock
    // 20 ns clock running forever
    always
    begin
        clk = 1'b1; //high
        #(T/2); // delay half a period
        clk = 1'b0; //low
        #(T/2); // delay half a period
    end

    initial
    begin
        reset = 1'b1;
        test_input = 1'b0;
        #(2*T); // delay two clock cycle

        reset = 1'b0;
        test_input = 1'b0;
        #(T); // delay one clock cycle
        test_input = 1'b0;
        #(T); // delay one clock cycle
        test_input = 1'b1;
        #(T); // delay one clock cycle
        test_input = 1'b0;
        #(T); // delay one clock cycle
        test_input = 1'b0;
        #(T); // delay one clock cycle
        test_input = 1'b0;
        #(T); // delay one clock cycle
        test_input = 1'b1;
        #(T); // delay one clock cycle
        test_input = 1'b1;
        #(T); // delay one clock cycle
        test_input = 1'b0;
        #(T); // delay one clock cycle

        $finish;

    end

endmodule

The FSM should tick high at the point marked below:

Any suggestions?

Simulation output showing state transitions:


texts:
I am building a sensor using an Arduino connected to a laptop; I noticed that the readout is much more noisy when I use a non-grounded laptop (either running on battery or connected to a power socket without ground prong) compared to when I use my grounded power supply. Some kind of high-frequency noise appears the second I disconnect the grounded power supply.

I assume that it is a floating ground problem: all the components are connected to the Earth (including the USB cable ground) - would there be some kind of floating ground in the laptop?

Only one of my laptops has a ground prong, and I would like to use the others for the same purpose, so I am wondering if there is a "canonical way" to ground a laptop to the Earth. I thought properly grounding the USB cable would be enough, but apparently not...

Should I create a ground pin for my arudino laptop?


texts: In a previous question, I asked about an audio-induction loop, and how I would amplify it. I am wondering what chip I should use to  drive a 8 ohm speaker and what the circuit would look like. I mentioned the tl082,(an op-amp I have a lot of) but that didn't seem to delver enough power. I want to power this with a 12 volt battery.


texts:
I want to generate a high frequency (4.25 GHz) clock for a high frequency communication circuit. So, my question is:

What are the alternate ways of generating the high frequency clock and which would be the best way out?

Some pointers to components/ICs would also be of great help.


texts:
I am trying to make a Analog-to-Digital Converter for my MKS Type 250E Controller (data sheet). This would be the first time I've every attempted to make an ADC, as the company does not sell any. It is also an odd connector, with 14-pin SCSI connector... not an Amphenol connector.

Now, I have an Arduino UNO with 6 Analog pins, A0->A5, and I wanted to see if it is possible for it to both act as a ADC and connect it with Labview (along with a series of other serial devices that I have already interfaced with) to read the values.

I can probably find some Labview package for Arduino, so the main issue is the ADC. I've added an image for the Interface Pinout (the 14-pin SCSI connector) and I was wondering if anyone has any insight to physically connecting it to the Arduino, can I just straight take the wires, that I connect to the pin that I need, to the Arduino?

The pin's I think I will need are 1 and 8 (+,- of Setpoint) and pin 9. Would I also need to connect to one of the Grounds?

Thanks, in advance, for any help.


texts:
I'm trying to design a hand-held device which would allow to measure the weight and a size of a fruit (orange/apple).
For the weight I can use a load cell, but not sure how to measure the diameter.

What I'm thinking at the moment is a cone shape. The bigger the orange the farther it will be from the end of the cone.
What I can measure is the distance from the end of the cone to the orange or by measuring the distance from the end of the cone to where the orange touches the wall.

For the first one I could use some kind of resistive rod which the orange will push out and then measure the resistance.
For the second one I could use a touch bar sensor.

Any ideas what kind of elements I can use for either solution?
Can someone think of a better way to measure the diameter of an orange on the go with arduino?

A little bit of a background: the quality of oranges in my local stores is not very good - you get a lot of dried out ones. The idea is that the heavier the orange given the same diameter the better it is (it contains more juice). I want to build a kind of hanging scale which you hold in your hand and put an orange in it - it will sense the diameter of an orange and it's weight and displays the "juiciness" of the orange. This way I can filter out the bad ones.


texts: KiCad component doesn't match manufacturers model

texts:
I am trying to incorporate the ADA4898-2 into my simulation. The KiCad symbol shows up with only 3 pins: 2 input, 1 output, while the actual op amp has two more supply pins: +Vs and -Vs.
If I try to associated the .cir file supplied by Analog Devices with the ADA4898-2 circuit symbol from the KiCad library and then try to run the simulation, I get the error:
warning, model type mismatch in line
s1 98 1030 106 113 switch
warning, model type mismatch in line
s2 1 100 106 113 switch
warning, model type mismatch in line
s3 9 101 106 113 switch
warning, model type mismatch in line
s5 81 82 83 113 switch
warning, model type mismatch in line
s4 104 313 106 113 switch
Circuit: KiCad schematic
Too few parameters for subcircuit type "ada4898" (instance: xxu1)
Doing analysis at TEMP = 27,000000 and TNOM = 27,000000
Fatal error: DCtrCurv: source / resistor +vdc not in circuit
doAnalyses: no such device
run simulation(s) aborted

How can I fix this? Why isn't the KiCAD component EXACTLY like the actual device from Analof Devices? Afterall, it was given the exact same name...


texts:
Are all linear circuits passive in nature? Or is it possible that there is some active element which is also linear?
Here, all elements are considered to be ideal, i.e. they are unlike the elements in physical circuits but rather the lines on a page. Also, please don't consider amplifiers as a whole, as this question is an attempt to understand why we need non-linear elements to construct amplifiers and no amplifier can be created using linear elements only.
In essence, the question is 'Does linearity imply passivity ?'.


texts: VI curve varistor and compere between varistor and arrestor

texts:
why we need  to connect arrestor in parallel with varistor in some circuit ? and we know both is work to protect against high voltage?
like this pic.


texts: What do you mean by -3db cut off frequency in low-pass-filters?

texts:
I have a low pass filter as follows.

simulate this circuit – Schematic created using CircuitLab

Using voltage divider I get

$$\frac{V_{out}}{V_{in}} = \frac{1}{\sqrt{1+(\omega RC)^2}} $$

But now I got a problem. I have been given the property of low pass filter as -3db cut off frequency. How am I supposed to put the value of \$\omega\$ if no frequency is given but only -3db?

If It helps the reader to understand more the question: Actually I have been given two resistors with 1kΩ and 5kΩ and two capacitors with 2nF and 4nF and I have to choose only three of the component, to  realize the circuit with -3db cut of frequency. So I came up with this schematic that could also be the possibility.


texts:
I have a question regarding a measurement scheme of phase noise that I'm trying to implement. The idea is that I have two identical signal generators (I actually do) that generate a sinusoidal voltage signal, say

$$V(t) = V_a(t) cos(2 \pi \nu + \phi(t))$$

where \$V_a(t)\$ is the amplitude, nu the frequency (I'll just assume that this is implemented perfectly for now) and \$\phi(t)\$ the phase, where the time dependencies are due to the noise; ideally both the amplitude and phase would of course be static values but in practice they are not. In general this noise has a vanishing mean, so I could for example write

$$V_a(t) = V_a + \delta V_a(t)$$
$$\phi(t) = \phi + \delta \phi(t)$$

where \$ \langle V_a(t) \rangle = V_a\$ and \$\langle \phi(t)\rangle = \phi\$. With this the signals produced by the generators become

$$V(t) = (V_a + \delta V_a(t)) sin(2\pi \nu + \phi + \delta \phi(t))$$

Now, the purpose of my investigation is to characterize \$\delta \phi(t)\$: I am trying to find its power spectral density. The way I do this is by measuring the voltage signal in a time series and using (discrete) Fourier transforms to find the voltage spectral density and then the power spectral density.

However, in general the noise is of course quite hard to distinguish when it competes with the actual time alternating part due to nu. So to get this out, we use an IQ mixer with an LO and RF signal at the same frequency, and we use the down converted signal at their difference (=0) frequency to get a DC signal, which is actually slightly time varying due to the phase noise.

So then (I think) we would have a signal of the type (setting \$\phi = 0\$ for convenience)

$$V(t) = (V_a+\delta V_a(t)) sin(\delta \phi(t))$$

But here is where my question comes in. We only want to measure the phase noise, not the amplitude noise, and I don't understand how this is achieved. The scheme we use is depicted here

It uses an IQ mixer (inputs LO and RF) with outputs I and Q, but we terminate Q and only use the output from I. Somehow this gives a signal in which the amplitude oscillations are not relevant, according to my supervisor. Personally, I don't see this however. I feel like the amplitude dependence is still going to be carried in there.

However, the argument my supervisor is giving me (which I don't follow) is that we tune our signal in the I-Q plane such that the mean is along Q, which means that if we then measure I it is insensitive to the amplitude compared to the phase. We do this by using the voltmeter: while the two signal generators have the same clock, their phases are still not identical, so we set a relative phase on one of the two until the voltmeter shows (nearly) 0.

Could someone help me understand (preferably with an equation or two) why this is indeed not sensitive to the amplitude (modulation) noise?


texts: CDC Synchonisation primitives for an Altera FPGA

texts:
I am working on my first non-trival FPGA design and finally have a need for Clock Domain Crossing (CDC).

There are multiple resources (amongst others) which discuss various architectures for CDC and some related questions. The theory is fine, but at least one of those resources lists traps for the unwary and at least one project lists multiple VHDL attributes required to synthesize correctly on a Xilinx device.

I am targeting the Altera MAX10 for this project using VHDL.  I have hand-coded a push-handshake synchoniser, but I somehow suspect there is more to it.

So:

Does Altera (or another well-regarded source) supply a library of synchronisation primitives?
If not, what steps need to be taken to ensure that a hand-written synchronisation block synthesises correctly, simulates correctly and is subjected to timing analysis correctly?

An answer with an example of a basic synchroniser (e.g. 2-Flop) would be well regarded.


texts: Non-inverting op amp on breadboard isn't working

texts:
I have posted this before and I have another question. I just can't get this working on a breadboard. I don't know what I am doing wrong. My voltage source is from an Arduino UNO which outputs a 5 volt max. Below the schematic is what I have done on a breadboard and I'm sure it's totally wrong. But the right of the picture the red and black cables are going to the V2 supply and and two black and red cables stick up are the outputs. Can anyone suggest what I can do differently or at least show me with their version on a breadboard?

simulate this circuit – Schematic created using CircuitLab


texts:
I am trying to read data at 119Hz and above from the gyroscope embedded in the LSM9DS1 9dof IMU package and transfer the raw data from the gyroscope to an Android device. On the Android, I plan to use this data along with the accelerometer and magnetometer data to calculate roll, pitch, yaw, and xyz position.

I was wondering about one of the setting on the gyro, called the bandwidth. I read from a few sources  that this refers to the read rate of the gyro, but for this sensor the ODR tells me the output data rate. The ODR goes much higher than the bandwidth. Is the bandwidth a lowpass filter applied to the sensor data before being collected by the ADC? That seems to be what is suggested in this data sheet in section 2.6, although this is describing the accelerometer.

Thanks!


texts: 12v SLA charging, when do I have to stop?

texts: I have a used 12v SLA which I got from a computer UPS. I want to charge it but I don't have a specific charger to charge it. But I have a 12v car battery charger. If I connect the battery to that charger at what voltage should I stop charging?  I already did that and  disconnected the battery when it was 14.4v (checked while the battery was still charging) when I disconnect the battery from the charger voltage goes down to 13.3v in about 1minute. is it normal or the battery is dead?


texts: Finding the specific Turn Ratio of a Transformer

texts:
I'm finding the turn ratio for a Hammond 166G28 28VCT transformer. I already had calculated the voltages for the Primary and for the Secondary and I divided them and got 3:1 ratio for the outer loop (Green to Green).
Where can I find this turn ratio from the transformer's specification sheet or from any other source so I can verify my findings?
Thanks


texts:
I am working on a project on Perfboard which involves controlling a motor that draws about 10A, and I am using 18AWG stranded wire to connect the MOSFET on board to the battery and motor which are off board.

The problem is that the wires are too large to fit in the holes, and if I cut some of the strands short so that the wire fits in the hole, the other strands work their way out of the insulation and are in danger touch nearby components. What I'm doing now is laying the wire flat across a few holes and soldering it surface mount, which seems to work better, but I'm worried about pulling the copper right off the board. The oval shapes on the boards above also seem to be useful for this purpose as there's more copper to attach to.

What's the best way to solder power wires to a piece of protoboard? How do you handle strain relief?


texts:
I've read a topic on Transistors about "Using a Transistor as a switch" and then it says "To use a Transistor as a switch you have to work the Transistor on either Cut-Off mode or in Saturation mode". And then it says that "A Transistor behaves as an open switch in cut-off mode and as a closed switch in saturation mode".

So I wanted to ask as to why a Transistor behaves as an open switch in cut-off mode though it is not open and as a closed switch in saturated mode though it has some resistance? (In CE configuration)


texts: semiconductor equilibrium and steady state

texts: Why should equilibrium imply steady state? For example, there is a process whose rate increases with time  and this process can be exactly balanced by an inverse process whose rate also increases with time.Is this not a case of non-steady state equilibrium condition?


texts: Transistor based relay driver for DC motor is not working with 12V-8A DC motor?

texts: I am trying to run a 12V-8A DC motor from pic microcontroller output pin via relays(28V-30A output rating). It only starts for a split second and stops. Where as small DC motor runs perfectly on the setup. My colleague said using an opto-coupler (thus isolating grounds) with a motor drive could solve the problem. Whats the reason for the problem and how to solve it.


texts:
As part of a product upgrade we are looking at replacing looms of wires bound together by cable ties or spiral wrap with ribbon cable. We are doing this to try and cut cost and assembly times.

We are happy with the current noise performance of the system, but ribbon cable always seems to be referred to as "Bad" in terms of noise and interference.

The signals consist of a few medium speed digital signals (4 MHz SSI interface) and predominantly +-10V differential analogue signals with a 2 kHz filter on the receiving end. All up we are planning on using a 50 Core cable.

The environment is lab/light industrial, the cable will be approx 300mm long running parallel thin steel plate.

We are looking at using the standard 1.27mm Pitch cable (2 row 2.56mm plugs).

Ultimately, while rated as bad, can I expect at least similar performance from a ribbon cable as bundled wires.


texts: 12V Pulse circuit to operate a double coil latching relay uses no power unless switching

texts:
I have this double coil latching relay and I need a circuit that will provide a pulse to switch it on.

After doing the pulse I don't want it to use any power.

There are two sides to the circuit, one to turn the latching relay and another to turn it off.

I'm using the latching relay as a high voltage disconnect for a 12V LiFePO4 battery.

My BMS has a small 1A 12V relay with NO NC which will provide the power to the pulse circuit that would latch and unlatch the relay.

Thank you


texts: How to implement unsigned subtraction using 2's complement?

texts:
I want to implement unsigned subtraction using 2's complement. I arrived to this, where if I have 2 4-bit binary numbers A and B, I transform B to 2's complement (let us name it B' so we don't get confused) and then add A to B'and I get the result C. This was the easy part for me.

Then if the final carry out is "0" I should transform C to 2's complement and add a "-" sign, but if the carry out is "1" I just don't adjust anything. And this is where it got me. I don't know how to implement it and I should put a led in the final result to let know if the sign is "+/-".

I think I should put a 2-to-1 multiplexer where the select input will be the carry out of the circuit I posted.

And by the way, my implementation is correct, whenever I put random values and then calculate those by hand I get the same result.

Thank you in advance.
(The program I used is called "logicCircuit".

So this is what I got to.(After editing my post)

The circuit above is my main circuit.

These 2 pictures above are just zoomed in photos of the circuit

Now my question is, can I do something so I can get only one result. For example if the carry is "0" The multiplexer gives me the correct result, but in the same time I am getting a result in the upper part of my circuit which is the part that should give me a result whenever the carry is "1" and vice versa.

The gray bubble are leds so when the result is 1, the led lights up.


texts: Using as little pins as possible for multiple buttons

texts:
I'm using an Arduino Nano to make some sort of "console" and I'm currently designing the controller. However, I would like at least two of them with 6 buttons each. I have reserved 4 pins for the VGA output so there simply aren't enough pins.

The controller only consists of the 6 buttons, with a cable going back to the arduino. The cable must include power and ground. I have considered using radio but that's out of scope for me at the moment.


texts:
I'm planning a build for a guitar amplifier with 2 stages, the first being a tube pre-amp and the second stage being a solid state amplifier. Both amplifiers will be powered from the same source, a 31v DC power brick.

The pre-amp will be powered with a DC-DC boost converter from the 31v DC power brick to obtain the high voltage required; the boost converter ground output is tied to the input ground. The audio signal ground will be tied to the same ground.

The solid state amplifier requires a dual supply which I will create with a voltage divider, giving -15.5v, virtual ground and +15.5v.

As the audio signal ground will be relative to the ground of the 31v power brick (equivalent to the -15.5v of the voltage divider) then this signal would cause an issue connecting from the output of the pre-amp to the input of the solid state amp, effectively shorting -15.5v and the virtual ground.

It would seem that I need to isolate the audio signal so it can be provided as a floating AC voltage.

Can the signal and ground be isolated by adding a capacitor in series with each component like so:

Or would the only solution be a 1:1 audio transformer?


texts: Inductance value for ceiling/pedestal 230/240Vac single phase ac fans

texts:
I need to know how to roughly get idea about indcutance value of ceiling pedestal single phase AC fan?
I want to roughly model this.


texts: Do I need to limit logic current into this SSR

texts:
This Opto22 OAC5 (datasheet link below) relay has a logic input current of 12mA. I am building a transformer/rectifier to feed the logic switch. Can I just connect the power to the input or does it have to be current limited? I dont know how that all works or how to limit the current if that is needed.

Any advice appreciated, thank you.

https://www.opto22.com/products/oac15


texts: cheap usb hubs passing on mains voltages

texts:
So we've heard a lot of sensational stories about people dying from cheap mains->5V USB converters. What sort of corners do these manufacturers cut and do they even save much money than if they made a robust circuit?

I'm interested in circuit diagrams and their flaws. I just figured the standard switch mode supply was simple enough to copy so I don't know how they can get it so wrong. Do they just leave out fuses?


texts:
I noticed that pullup resistors for reset pins that are pulled to ground with a switch are commonly placed between the power rail and the pin, for example the EN pin on an ESP32.

Could the resistor just as well be placed between ground and the switch, with the reset pin connected directly to the power rail?

I always see it done this way, so I assume there's a reason to not do it the other way?


texts: BDM pads on a Renault 450 DXI (EURO 5) Truck ECU

texts:
I'm trying to find the BDM pads for connection and map download from a Renault 450 DXI (euro 5) truck.

Attached is a picture of the ECU.

The control unit is MPC5XX ECU TRW EMS 2.2

Other details on the control unit are, 314D08254183 EMS2.2 Min A. above which the characters 59312307C are printed on the board.

For reference i have attached the documentation i have been working from to locate the pads, however it is pointing to an ECU TRW EMS2, which appears different.

Any information, or guidance would be greatly apprecated.

Tony


texts:
Question:

Positive half-cycle: D1 ON, D2,D3  OFF
Negative half-cycle: D3 ON, D2 OFF(Vin>=-4V), D2 ON(Vin<-4V), D1 OFF

First positive half-cycle is not steady state.
Considering from the first negative half-cycle after Vin <-4V,

Correction: The above AC Voltage source's shape would be triangle not sine.

V(c) = 0-(-4) = 4V , Vo = 0V
For positive half-cycle the capacitor can be replaced by a 4V battery.:

Vo = 10V.

Output waveform:

Have I done it correctly?


texts: How do I bring back to life a very un-excited 3phase 10kVa alternator

texts:
We are restoring a water mill and have recently got our 2 wheels turning once more.  One of them is connected to an existing 3phase 10KVa alternator which although a little old seems to be in good condition.  It spins and we achieve around 49.5Hz (- more to come when the river rises).

However the expected phase to neutral of c230v is only between 10 and 12.  We have been advised this is because as it has stood still for a number of years it has lost much of its magnetism.  We are also told this is an easy fix with a DC source and a couple of pieces of wire.

We appear to have 6 connections (3 phase, 1 neutral and 2 voltage adjusters that are connected to a remote rheostat).

Could someone tell us how to get this back to life?

Links to some photos:
!http://moulin2roues.com/projects/alternator/Alternator-brushes.jpeg
!http://moulin2roues.com/projects/alternator/Alternator-connection-box.jpeg
!http://moulin2roues.com/projects/alternator/Alternator-connections.jpeg
!http://moulin2roues.com/projects/alternator/Alternator-nameplate.jpeg

!http://moulin2roues.com/projects/alternator/Alternator-rectifier.jpeg
!http://moulin2roues.com/projects/alternator/Alternator-rheostat.jpeg


texts: Up to what frequency is it practical to make my own filter?

texts: I have some experimental radio systems.  One needs a filter, and it's hard to find at its frequency, at a reasonable cost.  Up to what frequency is it practical to use my own (eg. capacitor/inductor) filters?


texts:
i have made a simple test bench for ROM. I would like to write a test bench for a VGA display. I'm kinda beginner so I don't know how to write it. I know I need to generate a clock, but how would I generate the counters,..etc.
Thanks so much!
here is my vhdl design

  library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;

entity VGA_display is
          port (
            -- Assuming 50MHz clock.If the clock is reduced then it might give the unexpected output.
                  clock: in std_logic;

             -- The counter tells whether the correct position on the screen is reached where the data is to be displayed.
                  hcounter: in integer range 0 to 1023;
                  vcounter: in integer range 0 to 1023;

          -- Output the colour that should appear on the screen.
                  pixels : out std_logic_vector(7 downto 0)
                );
end VGA_display;

architecture Behavioral of VGA_display is
    -- Intermediate register telling the exact position on display on screen.
         signal x : integer range 0 to 1023 := 100;
         signal y : integer range 0 to 1023 := 80;
         signal addr: INTEGER RANGE 0 TO 15;
         signal pix: STD_LOGIC_VECTOR(7 DOWNTO 0);
                   -- Clock period definitions
         constant Clk_period : time := 10 ns;

begin

      rom1: entity work.rom port map(address => addr, data_out => pix, clk => clock);

 -- On every positive edge of the clock counter condition is checked,
  output1: process(clock)
              begin
                    if rising_edge (clock) then

                    -- If the counter satisfy the condition, then output the colour that should appear.
                        if (hcounter >= 1)  and (hcounter < 128) and (vcounter >= 1) and (vcounter < 128
                               ) then

                           addr <= vcounter * 128 + hcounter;

                           pixels <= pix;

                    -- If the condition is not satisfied then the output colour will be black.
                        else
                          pixels <= x"00";
                        end if;
              end if;
           end process;
end Behavioral;


texts: What is a dead battery cell, what causes this to happen, and what are the implications?

texts:
Today I had a bit of car trouble where the culprit turned out to be the battery. I had driven my car just 5 minutes earlier without issue, but upon attempting to crank the vehicle it made a final effort at turning over and abruptly stopped, as if the battery leads were suddenly removed and all power was cut-off. After a bit of troubleshooting I solved the problem, but several questions came to mind.

I measured the open-circuit voltage to be 12V, but when the battery was wired-in (vehicle remained off with key removed) the same test measured only 8-9V. I am not sure exactly what kind of load remains on a car battery when the vehicle is off, but there certainly was a significant voltage difference. So

What causes a battery cell to die?
Are there symptoms of a dying battery or do they often quit as this one did (immediately, like a switch was flipped)?
The behavior described above leads me to believe the battery was working fine right up until something caused it to abruptly stop working. What "something" might this be?
If a cell was indeed "dead" as I was told, why did I measure these voltages? I would expect lower voltages if an entire cell was not working properly.


texts:
How does one model an IR diode in SPICE?  Specifically, the TIL38.

Datasheet here: http://www.supermoduul.com/PDF/TIL38.pdf

I get it that Is needs to be found -  is this the same as If in the datasheet?

The diode apparently seems to work in reverse-bias mode.


texts: This is part of the Auto Sun Tracking Pump. It is attached to the agriculture solar system but damaged and I want to replace it. I don't know the black two-leg sensor.


texts:
We are currently studying BJTs in electronics I and I am a bit confused on the notation of the current, specifically the collector current here. Throughout this chapter they will swap \$I\$ and \$i\$ to seemingly refer to the exact same thing. The book itself doesn't explain it either. There seems to be no consistency. Why wouldn't it just be \$I_{C1}\$ and \$I_{C2}\$? I understand that usually lower case refers to instantaneous voltage or current, but when solving this example, for instance, \$I_c\$ and \$i_c\$ are simply different examples used to solve the \$i_c = I_{s}e^{V_{BE}/V_T}\$ equation to give the \$V_{BE}\$ needed for the design choice.
I cannot find any other info on this so I figured this was a good chance to ask here.


texts: How to blink an LED (~5Hz) at 3.3V (coin battery) with minimal components to save power?

texts:
I need to build a circuit to blink an LED (about 5Hz) with a coin battery, so on 3.3V.
Main specifics:

Single coin battery (3.3V.)
The LED is an SMD5050 with 3V and 100mA maximum.
I would save battery as long as I can.
The circuit must be very small because it fit under the coin battery in a 25mm radius PCB.

How can I achieve that?
I'm thinking about a LM555 in SMD package.


texts:
Im trying to wire 4 3v LEDs in series, I tested one light to make sure it worked with a standard 9v battery.  It lit for a second then dimmed out.  Did I burn out the light, or is the battery not right for it? If anyone could help with what size battery I should use that would be great.

Thanks


texts: Offset when trying to convert square to triangular wave

texts:
Hi I constructed a circuit to create a 1Hz square wave with LM741 Opamp. The first part makes that and it makes it perfectly.
But I need to convert it to a 8Vpp triangular wave. Without any offset, I simulated the circuit below in LTSpice it was flawless. But in real life I got some weird offset from the output of the triangular wave converter.
Figure I implemented, first part creates 1Hz 21 Vpp zero offset square wave,2nd part convert this into a triangular wave with 8Vpp:

In real life it has 8.2 Vpp which is very good for me but it starts from -6 to +2 (it has -2 V offset)
How can I get rid off this offset?
Better one:


texts: How to replicate/simulate experiments done on dsp kit 6713 without using hardware?

texts:
Although i posted this question on DSP SE yesterday but still couldn't find any helpful reply there so i am reposting my question here
Due to covid, our university is now offering online classes to under grad students, even labs are conducted online.
But we are bit confused regarding evaluation? We make videos of demonstration of dsp kit 6713 and upload them to web and share their link with students.
But question is how we can evaluate / assess learning of students especially their ability of C programming to program DSP kit and especially in starting labs experiments for example switching on/off Led using dip switches available on dsp kit 6713.
It isn't practical to deliver each student a dsp kit at home, please recommend other solutions!


texts:
I am using an ITR20001/t optical sensor for a no-touch application.
It is working properly indoors, but if I put the setup in sunlight  the IR receiver is enabling automatically.
How can I overcome this problem?


texts:
I have an LMC6001 op-amp, and I would like to build the ph probe amplifier featured in the datasheet. Unfortunately, I am not sure what R9 is or should be.
Does R9 control slew rate? How would I calculate the value for R9 feed back resistor?