texts: What does the second code on transistors mean?

texts:
I have several transistors, I understand that the last digits on the first line define what the transistor is.

There's a second code as well.  I've added some photos.
What does this code mean?


texts: How to bypass DC-DC converter with N-channel high side MOSFET

texts:
I have a DC-DC SMPS converter which is used as a pre-regulator in the power supply with linear post-regulator. A specific requirement is to provide mode of operation when pre-regulator is bypassed. One possibility to achieve that is by disabling it and in the same time activate mosfet which is connected in parallel with the pre-regulator to bypass it (see picture below).

Another possibility is to keep pre-regulator active but with 100% duty cycle which effectively connect input (DC in) to output (Preg Out). The problem is that DC-DC converter is using N-channel mosfet as a high side switch when you in the best case could comes close to 100% duty cycle since boot capacitor which is used for gate bias need some "OFF-time" to be recharged. Here I comes to idea to "reuse" high side mosfet that is already a part of the  pre-regulator as a switch mentioned in the first proposal.

In this case gate driver output will be disconnected (using small relay) and continuous gate bias voltage will be applied to ensure continuous conduction. Simultaneously with this operation pre-regulator enable input will be disabled. A whole operation is not time critical, and post-regulator circuit should not have any problems with handling higher input voltage especially because "bypass" mode will be MCU-controlled to not exceed allowed power dissipation (i.e. 20W).

My question: Is it possible to do something like this "mechanically" or I need to do that is some other way because this could cause damage of DC-DC controller chip (I'd like to do this with LM5118 or LM5088)?

There is some proposal to deploy charge pump to keep boot capacitor timely charged (i.e. TI's slva444 - Providing Continuous Gate Drive Using a Charge Pump) but I'm not sure that such approach is possible with higher input voltage like 50+ VDC.


texts: CAN module in STM32F207 - continuously transmitting the same message

texts:
I have configured the CAN module in a STM32F207 to transmit at 1 Mbit/s. The program is such that it will transmit the same CAN frame for every 2 ms. I observe that even if the code is not executing the transmit function, the data is continuously coming on the CAN port, unless I clear all the mailboxes.

How can I overcome this situation?


texts: Confusion in understanding characteristic impedance and input impedance of an open circuited transmission line

texts:
The characteristic impedance Zo can be derived by considering LC sections throughout the line with open circuit at the end of the line, and this value is independent of length of the transmission line but when we calculate the input impedance for the line of finite length(l) with open circuit at the end of the line, we get Zo * coth(gamma x l).

Since characteristic impedance is independent of length, we get same value everywhere but when we calculate the input impedance for open circuit, we get different value.

I am unable to understand why is that happening? Since I believe both are impedances and can be calculated in a similar fashion, so the value in both the case should be same.


texts: Overvoltage i/o pin fried my arduino uno. Can it be saved?

texts: I accidently put 12V into one of the i/o pins and fried the board bad enough to go through the usb and shut off my laptop.  Is the whole board junk now or just the atmega?


texts: Why is the refresh rate of most LED LCD TVs 60Hz?

texts:
Can anyone explain to me why (at present day) the refresh rate of most LED LCD TVs is 60Hz? Is there a physical limitation to the technology of LED TVs that make it much more expensive to implement a faster refresh rate? Additionally, what is a "native" refresh rate, vs. a "simulated" refresh rate (eg. Vizio's Clear Action, Samsung's Clear Motion, Sony's Motion flow, etc...) in terms of the physical processes causing the real or simulated refresh rates? Is a simulated refresh rate even noticeable compared to a TVs native rate?

I used to own a Panasonic Plasma that was natively 600Hz. It was great for gaming and watching sports. Now that plasma's have unfortunately gone by the wayside and I have to get a new TV, I'm struggling to find reasonable deals on high native refresh rate LED TVs, which is why I was hoping to get a better intuition on what the real world differences are between native rates and simulated rates.

This webpage goes into a little detail on comparing native and simulated refresh rates for different brands, but ultimately falls short of describing the inherent differences of the native and simulate rates.

I want to emphasize that I am interested in better understanding the technology differences between LED TVs and Plasma TVs that result in limitations on their refresh rates, and understanding the technology that is supposedly simulating non-native refresh rates. Nonetheless, if this is still not the right community to be posting this question, please let me know and I will move it.


texts: USB current limiter and under/overvoltage protection

texts:
I know recent motherboards already provide these, but lately USB ports are also available in many different gizmos (smartphone chargers, TVs, standalone players, etc.), which I am often tempted to use as a power sources for USB toys, mini PCs, etc.

So I am looking for a solution to dynamically limit the output current so both the USB host and the guest won't take any damage due to overcurrent.
Under/overvoltage protection is also needed for the same purpose.

I prefer an easy solution (based on an IC?) that i can connect like an USB extension cable to "unsafe" power-hungry toys.

EDIT: i'd like a solution with an user-selectable upper current limit. My ideal range would be 0.1-2.5A. According to the ICs i've found this range is too wide, so maybe i will build 2 different limiters for 2 different ranges (unless you know some trick to extend the range).


texts: trouble getting two PICs to communicate via I2C

texts:
I'm having a bit of trouble getting two PICs to communicate with each other over an I2C line.
Both are 16F886, one sitting in the PIC 28-pin demo board, second one sitting inside a board which I designed for some different purpose but trying to use it for prototyping this configuration.
I'm trying to get them to communicate with a very simple piece of code, however I'm getting a wrong result on the slave side.
When I scoped the SDA/SCL I'm getting correct reading of the address, and the slave seems to be acking the address byte (though it does seem like one of the sequences isn't running right). By the value of the reading I was thinking this is due to the SDA not being pulled down in time due to wrong resistor values on the line(??)

Master code:

#define _XTAL_FREQ 4000000
#include<htc.h>
#include<stdio.h>
#include<stdlib.h>

#include "i2c_sim.h"
__CONFIG(FOSC_INTRC_CLKOUT & WDTE_OFF & PWRTE_OFF & MCLRE_OFF & CP_OFF & BOREN_OFF & IESO_OFF & FCMEN_OFF);

void main(void)
{
OSCCON = 0b01100111;
I2CInit();

unsigned char data=5;

while(1){
I2CStart();
i2c_dly();
I2CSend( 0xB0 ); //send address
i2c_dly();
i2c_dly();
I2CSend( 0x0 ); //send data
i2c_dly();
I2CStop();
__delay_us(50);

}
}

I2C init function

void I2CInit(void)
{
TRISC3 = 1; /* SDA and SCL as input pin */
TRISC4 = 1; /* these pins can be configured either i/p or o/p */
SSPSTAT |= 0x80; /* Slew rate disabled */
SSPCON = 0x28; /* SSPEN = 1, I2C Master mode, clock = FOSC/(4 * (SSPADD + 1)) */
SSPADD = 0x28 ;/*0x28= 100Khz @ 4Mhz Fosc */ //==31 with 20mhz
SDA = SCL = 1;
SCL_IN = SDA_IN = 0;
}

Slave Code

#define _XTAL_FREQ 4000000
#include<htc.h>
#include<stdio.h>
#include<stdlib.h>

#include "i2c_sim.h"
#include "uart.h"
__CONFIG(FOSC_INTRC_CLKOUT & WDTE_OFF & PWRTE_OFF & MCLRE_OFF & CP_OFF & BOREN_OFF & IESO_OFF & FCMEN_OFF);

void main(void)
{
OSCCON = 0b01100111;
UART_Init(4800);
I2CInit();

SSPADD = 0xB0; //SSPADD contains I2C device address in SLAVE mode

unsigned char data=5;
while(1){
if(PIR1bits.SSPIF == 1)
    {
    UART_Write_Text("0,");  //this prints out just fine
    if(SSPSTATbits.BF == 1 && SSPSTATbits.D_A == 0) **this block is never entered**
        {
            //PIR1bits.SSPIF = 0;
            unsigned char addr = I2CRead(1);//read with ack
            i2c_dly();
            data = I2CRead(0); //read nack
            i2c_dly();
            UART_Write_Text("1,");
        }
    data = SSPBUF;
    SSPSTATbits.BF = 0;
    char str[12];
    sprintf(str,"%d",data);
    UART_Write_Text("*");
    UART_Write_Text(str); //yields 254 constantly
    UART_Write_Text("*");
    SSPSTATbits.D_A = 0;
    }

    }
    }

I2C Slave init

void I2CInit(void)
{
TRISC3 = 1; /* SDA and SCL as input pin */
TRISC4 = 1; /* these pins can be configured either i/p or o/p */
SSPSTAT |= 0x80; /* Slew rate disabled */
SSPCON = 0x28; /* SSPEN = 1, I2C Master mode, clock = FOSC/(4 * (SSPADD + 1)) */
SSPADD = 0x31 ;/*0x28= 100Khz @ 4Mhz Fosc */ //==31 with 20mhz
SDA = SCL = 1;
SCL_IN = SDA_IN = 0;
}

Scope...


texts: Adding potentiometer to fixed SMPS circuit

texts:
Im trying to design 36W constant voltage SMPS circuit that has an 24V DC  mean output voltage and it will be adjusted 22V to 28V by potentiometer. I have a limited experiment about it. And Im using circuit design tool to design smps. I created 3 different design for 22V, 24V and 28V output. Feedback circuits of them are below.
22V 1.63A Circuit

24V 1.5A Circuit

28V 1.28A Circuit

As scheme seen that feedback resistor(Rfbt) change between 32 kohm to 42 kohm.
At this point ;

I removed regulation circuit that is at feedback block(I don't know why I need it or not)
I added 32K resistor and 10k variable resitor

Is this a proper way to adjust output voltage? Or is there any good way to do it?
There isn't enough article about variabled smps or I couldnt found. I need an advice from experts for this feedback circuit


texts:
Is there a way in EAGLE CAD (Version 7) to create "sharp" traces?

Here an image for better explanation:

The trace can be made wider. But if I increase the width, it looks something like this:

Which is not what I want. Rather I want something like this:


texts: Can I use an axial inductor instead of a radial inductor?

texts:
I want to build this Arduino DDS waveform generator. A Chebyshef lowpass filter with a cutoff at 12 KHz is required to filter out the 32KHz sampling noise.

The inductors are 4.7mH. Now in the photo, one can see, what I assume are Magnetic Core 4.7MH Radial inductors.

I would like to know if I can use Axial inductors instead?

Will the performance of the Chebyshef filter be the same or degraded?

I have no implementation, or design, specific reason for doing this, apart from cost. This question is similar to Axial inductor vs winding inductor, but the application (frequency range) is different, Audio (KHz) rather than FM (MHz), so I was not sure if that would affect the answer.


texts:
I am trying to find a short on my board. So far, I have used my fluke to measure the resistance to gain some clues but everywhere I measure 4 ohm, so that didn't work.

I am thinking of trying to push <2V up to couple hundred mA with a power supply (current limited) make it work for a minute or so to find the heat location but not so sure that is safe. Is this the only way to do this?


texts: What is the importance of an "RC filter array" in GPS module circuit design?

texts:
I am in the process of designing a breakout-board style PCB for a project that uses the ORG1411-PM01 module (datasheet here:https://www.origingps.com/wp-content/uploads/2016/11/Nano-Hornet-ORG1411-Datasheet.pdf) and I am trying to figure out if a suggested component is required.

In the Typical Application Circuit (Figure 9, pg 26) a 3 Terminal RC Filter Array is placed on the comms lines between the GPS module and the host MCU. It is a Murata module NFA31GD1004704.

Main question - What is this unit (the RC filter) really meant to do? Is it really necessary?

I have come across other example schematics where it is not included - for example Mikro Nano GPS click (I will have to attach the link in comments as I do not yet have sufficient reputation).

Any advice greatly appreciated!


texts: What is the PCB name of this speaker connector?

texts:
I am designing a PCB board in EasyEDA for a DIY audio amp. I have searched in several places to find the proper technical name of this speaker connector but I could not find it.

I searched in Mouser and LCSC with the following keywords (speaker clip, spring clip, speaker connector, speaker terminal, binding post, spade connector) but I could not find anything related to this picture.

I want to find a proper component for EasyEDA or Eagle so that I know the correct dimensions on the PCB.

However on Amazon or AliExpress I can find by typing speaker spring connector.

Does anyone knows the correct name so that I can find a component and use it?

This is Amazon link in case someone needs it.


texts:
This Battery Charger has the following line in its notes:

The connection wire should not be too thick.

Why might that be? Aren't thicker wires supposed to be better? What issue might a thick wire cause?


texts:
I have come across this circuit configuration of an oscillator on a older metal detector.

Searching around I have not been able to find any examples of a similar circuit in the wild.  The output is attached to an obsolete amplifier that feeds a search coil.  As drawn above the circuit generates a faint signal, but it is being lost through the amp.
It looks like there is some issue with either the choice or sizing of components I am using to replicate this. Has anyone worked with a similar configuration before?


texts: Measuring phase difference - LTSPice simulation problem

texts:
I'm trying to detect the phase difference between two signals (voltage and current) given from the same source (an ultrasound generator) which works at 20kHz approximately.

I found a circuit that is supposed to do that, but when I do the simulation with LTSpice I think that I'm doing it wrong because it does not works as it's told in the page. I think that the D-Flip Flop is not working as expected.

I "test it" using different phases for one of the signals and it gives me very different results in the different simulations.

Can anyone look at the file and  give me some help so I can do the simulation correctly?

I attach the LTSpice file:

https://www.dropbox.com/sh/be6k6jhx6h9ipo5/AACywKL40KTgJz2wyFPXie0sa?dl=1

Image obtained from: www.next.gr/meter-counter/meters/measuring-phase-difference-l12144.html


texts:
I'm not sure if this is the right place but I'm a bit puzzled by this (cheap chinese) bicycle tile light. I opened it up, but I don't seem to get it working again.

It has three components:

the housing with the batteries
the circuit with the LEDs
a rubbery blue button but with a hard black centre piece

By simply pushing the button you could change the flashing modes. From all on, over all flashing, flashing on at the time, to all off. There were 8 modes (including off).

It's somewhat frustrating that with just these three components that I can't get it to work again (I haven't tampered with them). And now I'm also curious as to how it works.

So does anybody have any ideas?

the blue button black centre piece makes some connections but how does it work?
what's the black dot on the circuit board?
...

Thanks for any pointers, help, ...!

Some pictures:


texts: Important characteristics of high speed diodes

texts:
I am wondering if an application requires high speed diodes, what charactristic I should look for in datasheets?

For example, between 1N4448 and 1N914 and 1N3595  who is the winner?

My guess will be forward and/or reverse recovery time...But I am not sure if that is the only important factor to consider.

I need a high speed diode for my measurement setup of capacitor leakage. In Keithley manual Figure 4.8 they state using a diode in series with the series resistor can help to reduce noise and also it will allow for lower value of series resistor


texts: Short circuit protection on a charging line

texts:
I have a device that runs off SLA batteries that needs to be charged in a dirty environment. There is a possibility that the circuit may be shorted by accident during the charging cycle (this is unavoidable and must be protected against from a safety standpoint). I know that the smart chargers we are using will be able to handle the short but I'm worried about the batteries themselves shorting out.

I thought about a simple diode inline but with a 15A charging current I'm worried about heat buildup on the diode. Also, I don't know how the smart chargers will react to a diode inline when it expects only batteries (i am making the assumption that the smart charger wont see the diode).

What is the best way to protect the batteries from a short circuit in this situation?


texts: What is a typical light bulb screw temperature? Is it safe to put a microcontroller there?

texts: I'm working on a small engineering project that involves putting a microcontroller inside a screw of a light bulb and I need to find what are the typical heat outputs of 60W bulbs and strong (like 20W/2300lm) LED ones. I've found plenty of information from reptile owners about the best lamps to heat you vivarium, but they don't test usual home ones, and rarely for the temperature of the bulb itself.


texts: From what I understand it wouldn't matter other than maybe the max VA would be different.


texts: I'm confused about the following discussion of the Miller effect/approximation from Razavi (image below). I don't understand the premise of the question. If one reasons that the gain seen by the capacitor at the pole would have dropped by \$3 dB\$ at the pole frequency (even if as the example points out, it doesn't), wouldn't one then decide that a better approximation would be to multiply \$C_{GD}\$ by \$1+g_m R_D \frac{1}{\sqrt2}\$ to reflect the reduced gain?


texts:
I know the difference between AM and FM. What I don't get clearly is how the transmitter with a single antenna can transmit up to nine different channels with almost no interference between channels. I am trying to build an 72 MHz or 40 MHz radio control. The problem is that I build RC submarines, and the 2.4 GHz does not work at all in the water. It only works on the surface.

I want to  build a transmitter that picks the PWM output of a modern 2.4 GHz RX and re-transmits the signal in 72 MHz or 40 MHz. The lower frequency the better results I get. Old 40 MHz FM radio works like charm in an RC sub.

I found this circuit of a single channel FM transmitter that claims that works fine and with a respectable 1 W output. Could that circuit help me?
http://www.electroschematics.com/2436/1-watt-fm-transmitter/


texts:
I am trying to measure the noise at the output of my buck regulator. I am getting some ripples. I feel that the ground loop caused by my oscilloscope GND ref might have a small impact here.

I was thinking of approaching this via the tip-barrel approach. Now, I wanted to know if I need specialised probes for the TIP-Barrel approach.

Now, the probe has a met section shown in the image above. Is that GND?
If yes, in the tip-barrel approach, is it ok if I just connect a wire from here to my GND reference in the PCB?

This is shown in the image below. Will just a piece of wire from here to my PCB act as a GND?


texts: Does bridging amplifiers affect their sound?

texts:
If you'd bridge two IC amps (correctly) would their tone, THD, 'quality' be affected?
(in other words - their recognizable characteristics)

And how do you calculate bridged amplifier output?
 (I.E.  single 5w, bridged 8w)

I am giving a few example schematics:

LM383

TDA2030


texts: Is it always possible to reduce the number of layers on a PCB by making the board larger

texts:
I see that a 2 layer PCB is really cheap to prototype. A 4 layer PCB is almost 4x more expensive . I have a design that uses DDR3 RAM where I need to match trace lengths. However I also need to keep the costs down. I observe that going in for a larger 2 layer PCB is more economical compared to a 4 layer PCB. WOuld by design work if I use the 2 layer PCB instead of 4 , although my trace lengths are much longer?

Why is the 4 layer PCB so much more expensive compared to the 2layer? From 2-4 layer is a large price difference? I would like to know why ? Most commercial designs seem to be using 4 layers when they have RAM. Yet they are able to sell for such cheap prices. I get that making in bulk really helps, but by how much does the PCB cost actually come down b? LEts say in small quantities to make a 4 layer PCB is 4$? How much would it be when I make it in quantities of 100?


texts: Implications of 2G network demise for basic (SMS/USSD) device communication

texts: I'd like to know if basic GSM functionality will be affected by the phasing out of the 2G networks. I have several devices with modules like SIM900, old 2G Enfora, etc. and they use SMS and USSD for communications (not GPRS/EDGE or any IP protocol). Most answers from the Internet are about IoT devices (which do use IP), so they don't apply to my situation. My poor understanding of the GSM base protocol tells me that SMS and USSD use a control channel as a transport, and as I understand it those channels would never be touched (e.g. the base antennas would negotiate a better protocol from them, when possible), or will they? I've heard of countries where complete bands would be reassigned. My devices are quad-band. Thank you!


texts:
I undesrtand that ground plane should be continuous so return current will follow right path so no delay and additional noise voltage along with the reduction of empedance which is good and necessary thing especially for high speed.(If anything wrong or lack in this part please let me know)

What bothers me is this: Ground plane has many functions but why do i have to allocate a second layer for vcc plane. If i do then i wont have enough room for wiring in 4 layer since 2 of them already gone for vcc and ground.

Cant i just allocate one layer to continuous ground and use rest for proper trace wiring. And I will draw vcc traces thicker based on current required. I am confused because everyone says allocate power plane besides ground but in high level designs i saw like this a10-proto kicad there is no power plane only continuous completely allocated ground plane and other layers are for wiring. And they wired power traces with thick wires.

Could you provide me some insight please.


texts:
What kind of sensors are suitable for measuring liquid level accurately? minimum level 2 or 3 millimeter. Ultra Sound sensors are not such precise.
*There are various types of liquids with different densities.


texts:
With regard to termination of ethernet shielding I have been taught always to terminate only ONE end of the shielding to ground to prevent ground loops occurring.

Is this best practice?

and is there any other way of terminating the shield?

Finally.. and I'm sorry for the list of questions but the way I look at this schematic symbol is that the shield connects to pin QE. Is this what others think too?


texts:
I'm currently making a PCB with 2 ethernet ports and a CPU running at 200+ Mhz. This isn't the fastest PCB by any means and I don't foresee any issues with the placements, however in the future I might want to know how to do this properly.

And before anyone asks, yes I did in fact check the hundreds of other posts for this subject. The problem is that it's conflicting each other every other post. One person says the loop matters, the next says don't do vias, the next says power should hit cap first then chip etc.... It's confusing as hell.

This is kind of the style I'm using for this particular board:

It's a 4 layer PCB with signal-ground-power-signal layers. I simply route the vias to these massive planes in the picture(sidenote: is it ok to occasionally route other voltages over the power plane?). I'm also thinking of moving the vias on the inside of the chip directly on top of the SMD pads but I'm not sure if the manufacturer(Eurocircuits in this case) allows this.

What is the correct way of placing decoupling capacitors?


texts:
I am trying to store DMA buffer array such as below;

////////////////////Global Area;////////////////////////////////////////

uint16_t ADC_Vbatt=0;
uint16_t ADC_buffer[2];

/////////////////main function/////////////////////////////////////////

HAL_GPIO_WritePin(Vbat_Meas_En_GPIO_Port,Vbat_Meas_En_Pin,GPIO_PIN_SET);

HAL_ADC_Start_DMA(&hadc, (uint32_t*)ADC_buffer,2);

ADC_Vbatt = ADC_buffer[1];

HAL_GPIO_WritePin(Vbat_Meas_En_GPIO_Port,Vbat_Meas_En_Pin,GPIO_PIN_RESET);

but when I look in debug mode, ADC_Vbatt variable is empty. I do not understand why.

So, how to store ADC_buffer[2] array in two variable?


texts:
I'm interested in charging a 12V Sealed Lead-Acid battery from a single monocrystalline solar cell. The solar cell's voltage is only 0.5V at maximum power point, but it supplies 8A. I will need a 32X voltage multiplier to emulate a 12V panel to drive my SLA charger.

Could someone suggest an appropriate voltage multiplier design? I have read about Villard- and Dickson-type cascades, but they all will incur too much loss in the early-stage diodes.


texts: ICIS opamp circuit - current gain derivation

texts:
My textbook simply gives the formulas w/o derivations. Using node voltage method, I'm able to successfully prove the formulas for VSVS, ICVS, and VCIS. But I couldn't do the same for the current gain of the ICIS circuit shown :

I tried to apply KCL at the 3 nodes shown (thick black dots) in the figure. But I'm getting complicated expressions and they are not simplifying to the given formula. My work :
1) At input node (call it \$V_-\$ )
$$-i_{in} + \dfrac{V_{-} - V_x}{R_2} = 0$$

2) At outut node (call it \$V_{out}\$ )
$$V_{out} = -A_{VOL}V_{-}$$

3) At the 3rd node (call it \$V_x\$ )
$$ \dfrac{V_{x} - V_-}{R_2}  + \dfrac{V_{x} - V_{out}}{R_L} + \dfrac{V_x}{R_1} = 0$$

Solving these 3 equations is giving me a really scary looking expression for \$i_{out}\$. Are the above 3 equations look okay ? I've ignored the currents going into the inputs of opamp because I thought they're negligible.. I feel I'm doing something terribly wrong. Appreciate any help. Thanks!


texts: Problem Refreshing 4-digit 7-segment display with UART on the MSP430G2553

texts:
I'm working on a program that:

samples the ADC every half a second with timer interrupt
sends a signal via UART on button press (port 2 interrupt)
displays the ADC value to a 4-digit multiplexed 7-segment display refreshed at 100 Hz using timer interrupt

The problem I have is that the 7-segment seems to be muddling up the UART signal.  Here is the portion of code that sends the integer to the 7-segment to be displayed.  It seems to be causing the problems.

void shiftOut(short val)
{
    //Set latch to low (should be already)
    P2OUT &= ~LATCH;

    int i;

    // Iterate over each bit, set data pin, and pulse the clock to send it
    // to the shift register
    for (i = 0; i < 8; i++)  {
        if ((val & (1 << i))){
            P2OUT |= DATA;
        } else {
            P2OUT &= ~DATA;
        }
        P2OUT |= CLOCK;
        P2OUT ^= CLOCK;
    }

    // Pulse the latch pin to write the values into the storage register
    P2OUT |= LATCH;
    P2OUT &= ~LATCH;
}

If I slow down the 7-segment refresh rate, the UART signal is fine, but the 7-segment flickers.  I'm not quite sure why the UART signal is getting messed up, so if someone can point out the errors that I've made, that would be great.

Thanks


texts: I am testing some hardware in lab that computes the four Stokes parameters. To test the hardware, I want to generate circularly polarised sine wave. Provided the frequency is high enough (above ~100 MHz), can one use a ferrite based circulator to generate RHC/LHC polarised signals? Thanks in advance for your suggestions.


texts: How do I know if a development board can be charged by batteries?

texts:
So this question might sound a bit weird since I'm pretty new to programing development boards. What I need is a board that can be powered using a battery and that also supports Bluetooth. I'm interested in the Arduino Blend Micro(https://store.arduino.cc/blend-micro), how do I know if this boards supports the usage of batteries?

It would be even greater if the board would charge its battery when connected to a power source via USB. However I have no idea what this concept is called, nor do I know how to search for a board online that supports this feature.


texts:
I've made a simulation of three-phase MOSFET rectifier in LTSpice. I am simulating different conduction angles and calculating efficiency. However, I would like to also take a look at the switching losses, particularly switching losses vs. conduction angle. I am not after high-accuracy data, I would just like to see if there is a difference. Can I do that in LTSpice and how? If not, is there a software that has MOSFET switching losses functionality built-in?

LTSpice simulation


texts:
I have a relay as an additional safe torque-off switch for a motor driver, that supplies the power to the MOSFETs. Now the main capacitive load is behind the relay, otherwise it will be destroyed after the first use, but to reduce some ringing when switching the high-side, a 10 - 22 μF capacitor (ceramic) should be added and this will be seen as a capacitive load by the relay.
The relay is the following:
https://docs.rs-online.com/5098/0900766b80fa75dd.pdf
How can I decide, what the capacitive load limit of the relay is? The supply voltage is 48 VDC, the energy by the capacitors is 0.5CU2 = 25.3 mJ, which seems not a big problem on a first sight, but I'm no sure. As a final solution I see to use a resistor of around 22 kΩ next to the relay contacts, which should load the relay to around 36 V in 0.5 s.
What do you think about this capacitive load size?


texts: How to mitigate/stop voltage spikes when turning AC transformer on and off

texts:
I wish to use a certain transformer in a project of mine but when I power the transformer on or off I see a series of large voltage spikes on the oscilloscope.
The project is a DC power supply.  The transformer takes 230vac mains and steps down to 20vac then that gets rectified and etc., etc..  The transformer alone is generating these spikes and they appear to come from RF radiation from the transformer itself.
The spikes can be as large as 39Vpp.  Each "spike" is actually a decreasing amplitude voltage oscillation where the frequency is quite high (>20Mhz/see screen shots).
These spikes are bad and will certainly cause the CPU that I am going to use in my project to fail.
The transformer is a Triad Magnetics FP20-2400 (PC Mount: Flat Pack) power transformer, 230VAC primary to 20VAC secondary.
I have done a lot of research and I am still unclear how to stop these.
I've seen that these spikes are possibly caused by powering up/down the transformer at an inopportune moment in the 60hz mains cycle.  Is that the cause?  If so, would using a TRIAC fix the issue?  How would I implement this on an AC transformer with significant secondary winding load (~6A sustained)?
Something that confuses me is in my research I have seen that these types of spikes are caused by back EMF when the power to the transformer is turned off.  But I see these spikes when turning the transformer on too.
I have tried fully encasing the transformer in a grounded metal box, low pass filters (3db point @ 1.6Khz), and snubber circuits across the secondary coil and nothing works well enough.  I still have large enough spikes of about 14Vpp.
So I need some help here.
I would like to know what is causing these spikes and how to reduce them to acceptable levels (<0.3Vpp) or even to prevent the spikes from happening in the first place.  An example circuit would be greatly appreciated.
I have provided some screen shots of the problem from the oscilloscope.
Pic #1: Main body of spikes occurs ~50us after switch is turned on.
Pic #2: Zoomed in on a few of the spikes.
Pic #3: Zoomed in further on just one "spike", it is a decreasing amplitude voltage oscillation.
Thanks in advance,
Pat


texts: Schematic capture/PCB layout program recommendations

texts:
I'm still using PCAD2006 for my schematic capture and PCB layout. I'm not very happy with this; it is rather buggy, but it's a leftover for which I have an extensive library.
Due to the problems I'm having with PCAD and the fact that it is no longer supported by Altium I'm looking for an alternative. Shopping list:

  Free or low cost (Altium Designer is out)
  No restrictions in board size beyond the obvious. E.g. Eurocard (160x100mm) or 200x150mm should be possible. 1 meter square shouldn't. Some free packages have a 100x80mm limit IIRC.
  Gerber output
  Extensive library of both PTH and SMT components
  Nice to have: real-time DRC

Suggestions?


texts: What is the most efficient way to convert high Vin DC to low Vout DC?

texts: I need voltage regulator to convert high range of Vin 20-60V to fixed 5 or 12V and the maximum output current is 200mA. What could be the efficient way to do this?


texts:
I've chosen this Reference Design as starting point. Here the schematic. I'm using full wave rectifier instead.

I'm designing a buck converter with these requirements:

Input voltage: 120-690Vrms AC (three phase) 50/60Hz
Output: 50V/200mA (max)

To meet the high voltage requirements, the reference design uses a balancing network of three 400V capacitors, which may be expensive.

For my application following the controller datasheet, I calculated a minimum capacitance of 10 uF. However, I'm considering if I really need it. For example, this another Reference Design based on flyback topology doesn't use bulk input capacitors, just ceramic ones. But I think that applies if I always have three phase, right? If it happens that only two phases are available, then may I run into issues? What do you suggest?


texts: How to improve this Power ON/OFF circuit?

texts:
I'm working on a small mobile-phone sized gadget and I'm trying to implement a tactile momentary power button that is controllable from the MCU (Press to turn on, press again to turn off). I struggle finding a simple and elegant circuit for this. This one is almost there, but it can't be used to turn off the gadget without a dual pole switch.

PWR_ENABLE is an active high signal that turns on power to the MCU.

When power is off, PWR_ENABLE is pulled low by Q20 being enabled (R32 holds Q20's gate high, Q19's gate is low because MCU is unpowered). When button SW4 is pressed, Q20 is disabled, allowing PWR_ENABLE to be pulled high. As soon as MCU comes up, it asserts POWER_HOLD pin high, which keeps the gate of Q20 pulled to ground. To shut power off, MCU sets POWER_HOLD low, gate of Q20 goes back high, pulling PWR_ENABLE low, power turns off.

This is all good, however I would like to let the user turn off the device with a long press on SW4. The best would be a signal from SW4 so the MCU can do housekeeping before turning off. Trouble is that the gate of Q20 is at ground potential when power is on, so I can't simply get a signal back straight from SW4.

In OFF state, a press should pull PWR_ENABLE high. In ON-state, a press should NOT pull PWR_ENABLE low but trigger the MCU, which in turn pulls PWR_ENABLE low (after saving settings etc).

I've come up with the circuit below, but it seems overly complicated. Can anyone see an elegant way to simplify? The goal is to get a signal back to the MCU that the user requests a power down.


texts: I just bought a Honda Generator Model# EG 6500CL, with the setting on 110V only, I want to deliver the maximum rated current of 45.8V to one load.  There are 3 receptacles available, 2 at 20A, 1 at 30A and all the outputs are in phase and from the same winding.  The Operation Manual states you cannot exceed receptacle current limits. Can I parallel 2 or 3 receptacles to achieve the maximum current rating of 45.8A? Honda Canada would not give a definitive answer.


texts: When I have a spectrum analyzer, do I need a power analyzer?

texts:
I wonder whether I need a power analyzer or not in the case I already have a spectrum analyzer.
Do I need a power analyzer?
Application is antenna measurements.


texts: Any possibility of dead short in trim pot

texts: I want to add one trimpot of 1K in my ADC board to test several analog channels. I thought of connecting two ends to VCC and GND and middle pin (wiper) to analog input. But I am not sure if I need to add any additional resistor on one of the sides to protect any possible short in case of faulty trim pot. But in such case, I guess I will not get 5V (or 0V) on extreme ends and that will be an issue for me. So my question is: Is there any possibility of defective trimpots making dead short between any two end points? Since pots are also being mechanical parts, does wear and tear cause any issue. Since resistance between ends is fixed, I am hoping that dead short may not occur and no extra safety is needed. But thought it is better to ask this forum. Any one have seen any dead short between ends?


texts: Non-inverting operational amplifier Bandwidth

texts:
Hi,

I have been asked to calculate the bandwidth of this 741 op amp circuit as part of my A Levels. I’ve done a lot of reading up on it and don’t know where to start. Could anyone guide me through the process or give me a starting point please?

I realised the image provided is not enough so I’ll add more results once I’m at a college computer

Thank you. :)


texts:
It's well-known that for powering up a standard PC power supply, its PS_ON# line must be momentarily pulled low (i.e. connected to GND).

But how does the motherboard actually turn it off?


texts: LCR circuit with squarewave input: Why does the output take a decreasing amplitude through each cycle?

texts:
I understand a square-wave will be made up of a sum of sine waves in the form $$\frac{1}{n}sin(nf_0)$$

So when a squarewave is input to a LCR circut designed to be a bandpass filter, it will attenuate the signals either side of the resonant frequency, eg say $$f_0 = 5000 Hz$$

The signals other than the 5th harmonic will be filtered out (with elements of the 3rd and 7th coming through since it isn't a perfect band-pass filter).

I do not understand the output waveform however.

So there should be 5 peaks between each cycle of the square wave right? Due to it being the 5th harmonic. That's about all I understand, and I'm really struggling to find good sources which discuss the square-wave input to tuned bandpass filters.

The output I have has the 5 peaks between one cycle of the squarewave. When the squarewave is high, the output's first peak is at the peak amplitude, which then decreases until the squarewave switches to low, once it switches to low the output will increase in amplitude (but less than the first peak) and then decrease again until the squarewave switches back to high and the cycle repeats.

What is the cause of the decreasing amplitudes of the output and the relation between the increase in amplitude when the square-wave switches from high to low?

edit:
The LCR is in series.

edit:
scale on channel 1 is 2V, had to resize to decrease the file size to <2MB


texts: Receiving additional garbage data (for some characters) from STM32F103C8T6 (blue pill) UART1

texts:
I am learning bare metal embedded development using CMSIS Core framework. The problem I am facing is with UART communication. I am getting additional garbage value along with the character I am sending from a STM32F103C8T6 MCU. The garbage value comes only with few characters. e.g. a --> a, c --> c?
Detailed logs are mentioned below.
Couple of questions:

why is there an additional garbage value
why is this with some characters only
even if I leave out the GPIOA AF configuration, the UART works

Here is the code I have written so far:
#include "usart1.h"
#include "stm32f103xb.h"

void initUsart(void){
    /**
     * enable alternate funtion
     * enable clock for USART1
     * enable clock for PORTA
     */
    RCC->APB2ENR |= RCC_APB2ENR_AFIOEN;
    RCC->APB2ENR |= RCC_APB2ENR_USART1EN;
    RCC->APB2ENR |= RCC_APB2ENR_IOPAEN;

    /**
     * configure PORTA pins
     * PA9 (TX) -> AF output push-pull
     * PA10 (RX) -> input floating
     */
    GPIOA->CRH &= ~(GPIO_CRH_CNF9  | GPIO_CRH_MODE9);   // reset PA9
    GPIOA->CRH &= ~(GPIO_CRH_CNF10 | GPIO_CRH_MODE10);  // reset PA10
    GPIOA->CRH |= GPIO_CRH_MODE9_1;
    GPIOA->CRH |= GPIO_CRH_MODE9_0;
    GPIOA->CRH |= GPIO_CRH_CNF9_1;
    GPIOA->CRH |= GPIO_CRH_CNF10_0;

    /**
     * set baud rate to 9600
     * 8MHz/(16*9600) = 52.08
     * DIV_Fraction = 16*0.08 = 1.28 -> 1 = 0x1
     * DIC_Mantissa = mantissa(52.08) = 52 = 0x34
     * BRR = 0x341
     */
    USART1->BRR = 0x341;

    /**
     * enable USART
     * word length 8 bits
     * no parity
     * enable Tx and Rx
     * one stop bit
     */
    USART1->CR1 |= USART_CR1_UE;
    USART1->CR1 |= USART_CR1_TE;
    USART1->CR1 |= USART_CR1_RE;
}

void send(char data){
    /* wait till TDR gets empty */
    while(!(USART1->SR & USART_SR_TXE));

    /* wite data to data register */
    USART1->DR = (data & 0xFF);
}

char read(){
    /* wait till data is loaded into RDR */
    while(!(USART1->SR & USART_SR_RXNE));

    /* read data from data register */
    return (uint8_t) (USART1->DR & 0xFF);
}

#include "usart1.h"

int main(void){
    initUsart();

    while(1){
        send(read());
    }
}

// echoed ASCII characters
abc�de�f�ghi�j�kl�mno�pq�r�st�uvw�x�yzA�B�CD�EFG�H�IJK�LM�N�OP�QRS�TU�V�WXY�Z

// hex dump
0000000 61 62 63 ef bf bd 64 65 ef bf bd 66 ef bf bd 67 | abc...de...f...g
0000010 68 69 ef bf bd 6a ef bf bd 6b 6c ef bf bd 6d 6e | hi...j...kl...mn
0000020 6f ef bf bd 70 71 ef bf bd 72 ef bf bd 73 74 ef | o...pq...r...st.
0000030 bf bd 75 76 77 ef bf bd 78 ef bf bd 79 7a 41 ef | ..uvw...x...yzA.
0000040 bf bd 42 ef bf bd 43 44 ef bf bd 45 46 47 ef bf | ..B...CD...EFG..
0000050 bd 48 ef bf bd 49 4a 4b ef bf bd 4c 4d ef bf bd | .H...IJK...LM...
0000060 4e ef bf bd 4f 50 ef bf bd 51 52 53 ef bf bd 54 | N...OP...QRS...T
0000070 55 ef bf bd 56 ef bf bd 57 58 59 ef bf bd 5a 0d | U...V...WXY...Z.
0000080 0a                                              | .
0000081

I am using an ESP-Prog as serial-usb adapter.
ESP-Prog    STM32
VDD ---- 3V3
GND ---- GND
TXD ---- A9
RXD ---- A10

Thanks in advance for putting any effort into this.


texts: What is this section category in Model Library Setup in Cadence Virtuoso ADE L?

texts: I usually leave it at default while constructing circuit in Cadence Virtuoso. I didn't really understand what it is or why it is used for.


texts: In Buck Converter, when switch in ON, Vi(I/P voltage)=Vl(inductor Voltage)+Vo(O/P voltage)when we switch it On, current increases linearly(according to the wikipedia) then Vl=Ldi/dt=constant and Vo(=RI) increases linearly. So Vl+Vo increases but then it must be equal to Vi which in constant in ON cycle. How is it possible and why does the current increases linearly?


texts: What effect will changing the LED connection / polarity have on the ADC work and load?

texts: In the current circuit, the LEDs indicate the state on the ADC pins. Unfortunately, it is inconsistent (inverted) with what I have on the outputs of IC7. I would like to change it as simply as possible. The solution may be to change the position of the LEDs - then the ADC will not sink current, but the source current. The question is, if I do not exceed 1-2mA per pin, the ADC operation will not be disturbed and not overloaded. Datasheet says Isource / Output Source Current / design limt = -6mA.


texts:
I've been playing around with a Lego Mindstorms NXT robot, gearing it for speed and power.  To my dismay, when geared for power, it wasn't any harder to stop than when geared for speed -- I suspect that it doesn't have very good traction (as there really isn't much mass pushing down on the wheels).

It would be nice to be able make quantitative statements about how much force (and thus, how much torque) a robot puts out.  Does anyone know how I can do this?  Would, for example, a spring scale or force gauge work well for this purpose, and if so, what is a good maximum rating to look for?


texts: Is there some way to measure mains voltage with the ACS712 sensor?

texts:
Last year I went to a maker event where some guys used an ACS712 sensor with an Arduino to monitor the mains voltage and current to monitor the energy cost in the house.

One thing I saw there is that they were measuring the mains voltage with the ACS712 sensor (as its values had some 0.1V to 0.5V variance when I was talking to them).

I was playing at home with one of these sensors, but I couldn't find a way to measure the mains voltage with it. Is there some example or tutorial of how can I can do it?


texts: Power sequence solution with limited board real estate

texts:
I am designing a power supply using the LTM4639 part. VIN (3.3. V) needs to be sequenced before the bias input (5 V) in order for soft start to work. However there is no fixed timing relationship between both sources in my design and I am running out of board space.

I have considered a DC/DC (3.3 V to 5 V) converter such that it has a common VIN with the LTM4639 and its output is used to power the control circuit of the LTM4639. However such circuit (SOT-23 and several 0603 discrete components) will take up more board space than desired. I am also thinking about a power FET where the gate is tied to 3.3 V (still brushing up on my past transistor knowledge).

Any idea on a simple and small circuit that can sequence a 5 V output after a 3.3 V input? The threshold requirements are not detailed in the datasheet but I don't expect more than a 1 A current demand at the bias circuit.


texts: LTSpice capacitance dependend on voltage source

texts:
I am looking for a way to change the value of a capacitance dependent on the voltage source of the circuit.

How do I create a voltage dependent capacitor in LT spice?

Edit:
Two capacitances in a row are connected to a voltage source. The voltage source has a defined slope of the voltage. One capacitance shall be dependend (nonlinear) on the current voltage that the voltage source outputs. Example:::: Voltage (Power supply)= 200V -> Capacitor_1 = 10uF :::: Voltage (Power supply)= 400V -> Capacitor_1 = 1uF


texts: Can Anyone tell me what is the default gain of Electret Microphone Amplifier 4466. I need the gain, to calculate the db SPL value.

texts:
I am using the MAX4466 microphone amplifier to calculate the db SPL level of sound.
I have obtained the peak to peak amplitude in volts and I know that the microphone sensitivity is -44 db which translates to 0.0063096 V/Pa. 1 Pa is 94 db SPL.

so, say my voltage reading is 1.7 volts ; in db it = 20 log (1.7/0.0063096) = 48.6 db

Now acc. to a formula I found on this thread How to convert Volts in dB SPL

to calculate db SPL, I must add the mic sensitivity + 94 db SPL i.e 48.6 + 94 - 44 = 98.6 db SPL.

I don't completely understand why we do this?

Secondly, this formula is for unity gain. I don't know the gain of my device to subtract from the db SPL level  and I can't seem to find this anywhere. Please help!


texts: Purpose of using per unit when calculating faults?

texts: I read a book about power system faults - they all use per unit. They show examples of generators supplying motors through a transmission lines. They convert real voltages, powers and resistances into per unit quantities and then use ohms laws to calaculte internal per unit voltages in the motors and generators to find short circuit fault currents. Why convert into per unit? Why not just use resistances ect to calaculte fault values?


texts: SOLVED: TLV809E Push-Pull Supply Voltage Supervisor Reset PIN Voltage

texts:
I'm attempting to use the RESET pin of a TLV809EA26DBZR Push-Pull Active Low Voltage Supervisor IC to assert a high signal when my VDD input voltage exceeds the low voltage threshold of the Supervisor IC, which in this case is ~2.6v. My setup is a TLV809 soldered to an SMD to DIP adapter on a breadboard.

With the low voltage threshold of the TLV809 at 2.6v and the VDD input of the power supply set to 3.3v I expect the RESET pin to be HIGH. Based on page 8 of the data sheet I expect a minimum VOH (voltage output high) to be VDD * .8 or approx 2.6v. Instead I'm only reading ~200mv on the RESET pin instead of the expected 2.6v. When I turn the voltage input down near 2.6v the RESET pin voltage drops to 0v as expected since the supervisor is active and pulling low.
Is there something flawed with my logic? Why isn't the RESET pin voltage closer to 2.6v when my input voltage is 3.3v?
Data sheet for the TLV809


texts: How to make sure my motor will not start spinning on power up in case the throttle (POT) was not at a 0 position?

texts:
I am trying to make sure my motor which is connected to my controller circuit would not just start spinning when you first apply power to it as if the Potentiometer is left high before the battery is connected it could be dangerous. here is my code.... and it works on power up, so if the POT is if left high when you first power up the circuit the motor does not spin you must turn the pot all the way down to zero and than it will start working which is what I want, however, the issue here is for some reason when I Increase the duty cycle using the pot the motor stops completely and I would have to zero the pot again, this happens over and over again unless I remove the while loop which reads the pot value, how can I fix this?
void main(void)
{
    unsigned char start=0;

    while (1)
    {
        while (ADCRead()==0)
        {
            start=1;
        }
        CCPR5L= ADCRead()>>2;                  // Function call for PWM
        if (start && PORTAbits.RA3)
        {
            commutation180anti();
        }
        else
        {
            start=0;
        }
    }
}


texts: How do distribution/transmission operators manage unbalances from LV grids?

texts:
Low voltage (LV) grids are characterized for being unbalanced due to: 1) the considerable amount of single loads, 2) unbalanced three-phase loads, and 3) unequal impedances in the cables/lines that are used in these grids. Given that, and despite the effort to reduce unbalances (for instance by distributing single phase loads equally on the three phase system), if no other action is performed, unbalanced three-phase currents would be translated to MV lines, and then to HV lines (correct me if I am wrong here). So I wonder where the unbalance is handled in case of a LV grid encounter huge degree of unbalances. Is it in the LV/MV or MV/HV substations? if so, what kind of devices or techniques are used for that purpose?

Image adapted from this post


texts: DMA triggered by Timer using STM32F4-Discovery board

texts:
I am trying to trigger the DMA peripheral by the Timer using STM32F4-Discovery board, but it doesn't seem to work.

I want to get the value of a port (Port C) every 5 ms and save the value in memory at certain address. When the timer (TIM5) overflows at 5 ms, I want the DMA (DMA1 Stream6 Channel6) to be triggered.

What I have done: configured the Timer, the DMA, the Timer interrupt and also the DMA interrupt.

Should I respect a certain order of the instructions? How to make the connection between the DMA and Timer, other than using the specific DMA channel?

How do I get the DMA working on the STM32F?

Edit 1: I attached the code

void Timer5_Setup(void)
{
TIM_TimeBaseInitTypeDef Timer5_InitStructure;
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM5, ENABLE);
Timer5_InitStructure.TIM_Prescaler = 1;
Timer5_InitStructure.TIM_CounterMode = TIM_CounterMode_Up;
Timer5_InitStructure.TIM_Period = 0x48;
Timer5_InitStructure.TIM_ClockDivision = TIM_CKD_DIV1;
TIM_TimeBaseInit(TIM5, &Timer5_InitStructure);
TIM_ITConfig(TIM5, TIM_IT_Update, ENABLE);
TIM_DMAConfig(TIM5, 0, TIM_DMABurstLength_1Transfer);
TIM_DMACmd(TIM5, TIM_DMA_Update | TIM_DMA_Trigger | TIM_DMA_COM, ENABLE);
TIM_SelectOutputTrigger(TIM5, TIM_TRGOSource_Update);
TIM_Cmd(TIM5, ENABLE);
}

void DMA1_Config (void)
{
DMA_InitTypeDef  DMA_InitStructure;

DMA_DeInit(DMA1_Stream6);
DMA_StructInit(&DMA_InitStructure);

DMA_InitStructure.DMA_Channel = DMA_Channel_6;
DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t) &(GPIOC->ODR);
DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t) sdram_adr;
DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralToMemory;
DMA_InitStructure.DMA_BufferSize = 2;
DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable;
DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Enable;
DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord;
DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord;
DMA_InitStructure.DMA_Mode = DMA_Mode_Normal;
DMA_InitStructure.DMA_Priority = DMA_Priority_High;
/*
DMA_InitStructure.DMA_MemoryBurst = DMA_MemoryBurst_Single;
DMA_InitStructure.DMA_PeripheralBurst = DMA_PeripheralBurst_Single;
DMA_InitStructure.DMA_FIFOMode = DMA_FIFOMode_Enable;
*/
DMA_Init(DMA1_Stream6, &DMA_InitStructure);

DMA_ClearFlag(DMA1_Stream6, DMA_FLAG_TEIF6);
DMA_Cmd(DMA1_Stream6, ENABLE);

DMA_ITConfig(DMA1_Stream6, DMA_IT_TC | DMA_IT_HT, ENABLE);

TIM_DMAConfig(TIM5, TIM_DMABase_CR1 ,TIM_DMABurstLength_1Transfer);

TIM_Cmd(TIM5, ENABLE);
}

void TIM5_IRQHandler(void)
{
 if (TIM_GetITStatus(TIM5, TIM_IT_Update) != RESET)
 {
    TIM_ClearITPendingBit(TIM5, TIM_IT_Update);

    /*code related to app */
 }
}

void DMA1_Stream6_IRQHandler (void)
{
      if(DMA_GetITStatus(DMA1_Stream6, DMA_FLAG_TCIF6))
      {
      DMA_ClearITPendingBit(DMA1_Stream6, DMA_IT_TCIF6);
      }
 }


texts: How to replace push buttons on an intercom?

texts: This is the intercom panel in my apartment, it's 30+ years old and I want to give it a face lift. The push-buttons are momentary, and I want to replace them using modern ones like these, but I'm not sure what considerations must be made for voltage/amps. If it helps, the wiring diagram (last photo) shows how the intercom connects to the master unit, I emphasized where the buttons reside and how they short the circuit to active talk/listen/door functions.


texts:
Wikipedia says that many of the early machines were accumulator-based machines.
My guess is that in those machines the accumulator did not play the role of a speed-up register as do registers in today load and store architectures.

The accumulator had mainly the role of implicit operand so that instructions could be shorter
(one operand of an arithmetic operation always resided there and also its result was stored in the accumulator)

Is my guess right ?


texts: Finding the Power developed by the Nominal Frequency in FM

texts:
Question

  The sinusoidal signal \$f(t) = \cos(2 \pi f_m t)\$ is applied to the
  input of an FM system. The corresponding modulation signal output for
  \$f_m = 1kHz\$, is

  $$Q(t)=100 \cos(2 \pi 100 \times 10^6 t + 4 \sin(w \pi 1000t)) \space
> V$$

  across 50 ohm resistive load.

  What is the power developed at 100MHz?

My Work

\$Q(t) = 100\cos(2 \pi 100 \times 10^6 t + 4 \sin(w \pi 1000t))\$ \$\space\space\space\space\space\space\space\space
       = 100 \cos(2 \pi 100 \times 10^6 t) \cos(4 \sin(2 \pi 1000 t))
         - 100 \sin (2 \pi 100 \times 10^6 t) \sin(4 sin(2 \pi 1000 t))\$

Where  \$\space\space\space\space\space\space\space\space\cos(4 \sin(2 \pi 1000 t) \approx 1\$ and;   \$\space\space\space\space\space\space\space\space\sin(4 sin(2 \pi 1000 t)) \approx 4 \sin(2 \pi 1000 t)\$
(These relationships are obtained from my lecture note)

Therefore, \$\space\space\space\space\space\space\space\space
    Q(t) = 100 \cos(2 \pi 100 \times 10^6 t) - 100 \sin (2 \pi 100 \times 10^6 t) \times 4\sin (2 \pi 1000 t)\$

Using equation \$P=\frac{V^2}{2R}\$, \$P\space =\space \frac{100^2}{2\cdot 50}=100\space W\$.

There are two things containing \$100*10^6\$ Hz, I do not know whether it is correct...
Can you explain more about this question to me?


texts:
I'm playing around with the idea of adding a capacitive sense switch to an all-metal lamp, and have some questions around safety as I'd, obviously, prefer not to turn the whole thing live.

In the plastic, isolated base, I'll put a 220V->5V SMPS which powers a board with an ATTiny45, opto-isolater/triac, and zero crossing detection circuitry. What sort of trace isolation do I require for the 220VAC? And between the live and isolated side? Anything else that's likely to kill me?

Board top:

Board bottom:

(edit for improvement)

Is the below better?


texts: I've got the following layout for 4 layers PCB, I would like to know why there are so many vias on the ground trace.


texts: Parasitic capacitance of planar pcb coil

texts:
As an experiment I attempted to make a planar PCB coil as shown below:

Showing parts of a single layer for presenting detail.

Together with a an EE ferrite core it generated 85mH of inductance as expected. What was not expected was 11mF of capacitance according to my LCR meter (DE5000 @ 100Hz). Checking 600ohm signal generator and scope also suggests this may be the case, as voltage across the inductor will barely rise even with a 100kHz signal.

Possibly better summarised with an equivalent circuit. Measurement are across terminals differential mode. NOT towards any ground.

simulate this circuit – Schematic created using CircuitLab

My question is what can be the source of such a high capacitance?

General info:

Trace width = 100um
Trace space = 100um
Producer = aisler (most dense traces allowed by design rules)
45 turns, 2 layers, connected in center via
1.6mm board - 1.55mm between layers
11mF is measured even without the core, so not suppling core data
The long sides are not directly on top of the other trace layer, specifically to avoid capacitance between layers.
Total trace length aproximately 15m
Resistance = 54Ohms. Dont know if this high resistance can confuse my meters? However it doesnt explain why my 2v 600ohm 100kHz signal doesnt get above 200mV. So there have to be quite a bit of capacitance.
FR4 with 4.4 relative permitivity
Solder mask with 3.6 relative permitivity.

Replacing LCR meter with Picoscope 2000 Sine generator + scope:

Signal generator and oscilloscope probes are connected in parallel. Signal generator output impedance is rated to 600 ohms. Sweep between 10kHz to 100kHz. +-2V amplitude, which is shown in trace if disconnecting coil. However its always approximately at +-800V with coil connected. I expected the impedance to be enough with 600+ 54ohms to get voltage up to almost +-2V. At least have it vary with frequency.

Something like this:

With 1000pF which is what I would assumed would be a lot of capacitance for a project like this.

No vector analyser available for better details unfortunately.

Testing Cp with LCR heavily depends on frequency:
100Hz: 11mF
120Hz: 7mF
1kHz: 85uF
10kHz: 900nF
100kHz: 9nF

Might all be tool operator errors of course.


texts: how to scale dynamic range voltage to 1-5 volt

texts:
how can i make circuit that scale input voltage that have dynamic range to 1-5 volt output?

the circuit will have Vref+ and Vref- as maximum and minimum for Vinput and then scale to 1-5 volt output

output equation wil be like Vout = (((Vin - Vref-)/(Vref+ - Vref-))*4)+1

ex. if I have Vref+ = 6V, Vref- = -2V, and Vin = 3V as input and the output will be 3.5V
and if I change Vref+ to 4V, Vref- to -1V and Vin still 3V output must be 4.2V


texts: How is "Overtemperature shutdown/protection" implemented for ICs?

texts:
IC data sheets often give some informations about the circuits over-temperature protection. Lets take a Microchip LDO (MCP1702) for example:

"...If the power dissipation within the LDO is excessive, the internal junction temperature will rise above the typical shutdown threshold of 150°C. At that point, the LDO will shut down and begin to cool to the typical turn-on junction temperature of 130°C. If the power dissipation is low enough, the device will continue to cool and operate normally. If the power dissipation remains high, the thermal shutdown protection circuitry will again turn off the LDO, protecting it from catastrophic failure."

How exactly this is achieved on the chip-level? Especially the hysteresis behavior.


texts: Which CMOS logic families can safely be used to construct linear circuits?

texts:
I've just learned that digital CMOS inverters can be configured to perform analog functions (most notably oscillators and amplifiers). However, many of the examples tend to favor old CD4000-series devices. In addition, this application note mentions in Section 3 that the use of buffered inverters can cause stability issues.

Which logic families can be reliably configured to perform linear operations? Which families should be avoided?
Will "special" protection circuitry such as the 5V-tolerant I/O for AHC and LVC cause additional stability issues or prevent linear operation?
What would happen if I tried to build a linear circuit using a TTL-compatible device (HCT, ACT, AHCT)?
Is it considered bad practice to use digital ICs in their linear region?


texts: How to obtain 3db frequency from transfer function

texts:
How can I calculate the 3db Frequency of the following transfer function

$$ H(w)=\frac{1}{1-j\frac{250}{w}} $$  I have thought of doing the inverse fourier of H(w) so I can find h(t) and from that the period T and then the frequency . But I think that frequency will not be the 3dB I am looking for . Can anyone help?

The j on the H(w) is the imaginary number $$ j^{2}=-1 $$

I have found this formula : $$ H(f_{3db})=H_{max}(dB) -3dB $$ But I still can't find any solution


texts: Promoting a sub-sheet with variants up the hierarchy in Altium

texts:
Let's suppose I have three sheets, Connector1.schdoc, Connector2.schdoc, and Connector3.schdoc.  Each sheet has an instance of the sub-sheet InputFilter.schdoc, which has something simple like an RC filter on it.  Complicating things a bit, one instance of the sub-sheet InputFilter.schdoc uses different parts, and the whole board is already laid out.

I'd like to get rid of the sub-sheets and have all the components on their respective parent sheets, but I figure if I copy and paste it the layout will get torn up.  Is there a way to do an inverse refactor, basically the opposite of "Moving Selected Sub-Circuitry to a Different Sheet" from the documentation here, and preserve the layout and component variants?

I'm on Altium 19.1.


texts: Is there a single IC solution which will act as serial parallel driver for this 7 segment led


texts: Not enough power going through IRLZ44, activated by Arduino

texts:
I've a 9v battery and I'm trying to get 9v through my IRLZ44, to power an solenoid. It's a seperate system from my arduino who's sending a 5v signal to the  IRLZ44 in order to activate it.

For some reason i can not get more than 4.5v through my IRLZ44? What am I gonna doo???

simulate this circuit – Schematic created using CircuitLab

Tried drawing it as correctly as possible, but I'm super new to this. I'm sorry if i screwed up.


texts:
I have a motor in a vending machine (picture) it only has these numbers on.

What I'm hoping to do is turn the motor on and off.  However I have no idea what this motor is aside from 24v dc.

How do I work out what the RPM / wattage / Spec of the motor is?


texts: I am not able to understand why for the above problem \$ V_{ECQ} \$ = 6 V for the transistor Q-point to be in the center of the load line?


texts: Low-pass filter for IMU accelerometer data

texts:
I am using Labview to get data from an IMU and I need to filter the data since it is noisy.
I am using a low-pass filter but the filtered data is less than the measured data (the acceleration was 10 and it becomes 2).
Does anyone know the problem and how to fix it?


texts:
I need to build a circuit with a DC gain of 2 for a 0-5V input, 0-10 V ouput (input will be adjustable). Current can be low since it doesn't really matter (this will be purely as a control signal). Input impedances aren't given.

I'm having trouble getting started. I've read I could use an noninverting amplifier and can choose resistors such that G= 1+R/R2=2, but usually circuits with op amps are for higher gains on small signals right?

So I am not sure how to design / choose components for this circuit. Thanks for the help in advance!


texts: Using 1N5822 (40v 3A) schottky instead of 1N5819 (40v, 1A)

texts: Is it okay to substitute 1A 40V Schottky with 40V 3A version of it and what can go wrong with that setup?


texts:
I am trying to design 100W (100V - 1A) Opamp Current Buffer with unity voltage gain. I will use PA441 or LT6090 opamp.

Apex published a circuit for this amplifier. Please look at page 3 from the link below

https://apexanalog-public.sharepoint.com/Resources/AN52U.pdf

Shared circuit is for inverting amplifier configuration. I need non-inverting configuration. When I tried the circuit in LTSpice, for negative side, it seems works well. But for positive side there is a problem witn nmos i could not handle.

How could I amplify 0 to 100V 100mA output to 0 to 100V 1A with non-inverting configuration?

I would be very glad if anybody could help. Thanks.


texts:
For this BSC0902NSI Infineon MOSFET from page 3, I am trying to determine the size of heatsink required, temperature and heat dissipated. I have the following

Pd: 0.2 W
Ta: 35 °C
Theeta_jc: 20 °C/W - The datasheet has two jc, top and bottom. I chose the top since that is where I would placing the heatsink, because the bottom will have a copper pour of 6 x 6 cm.

Is Tsa and Tj calculated as

Tsa: 35 + (20 x 0.2) = 39 °C
Tj:  35 + 39 + 0.2 =  74 °C


texts: lcd display with black background under a semi reflective mirror?

texts:
I'd like to make a "magic mirror", something very similar to this https://blogs.windows.com/msedgedev/2016/05/31/magic-mirror-hosted-web-app/, but much smaller.

Basically, I have a closed box (no light can enter), with the electronic board inside, and a semi reflective mirror on the top (screen under the semi reflective mirror).

I am currently using an OLED display like this http://www.buydisplay.com/default/oled-display/2-4-inch because I thought it was the only solution to have black background, so that we only see the white characters which seem to float behind the mirror.

But, actually, I found out that there exist cheap lcd displays with a black background. I'm not sure to understand because I thought that lcd were working with a backlight, so that I can't understand how the background can be black (which is not light !).

If it exists, would you explain me how it works, and if I could obtain the same effect that white characters seem to float (no rectangular backlight under the mirror) ? That would be great because OLED screens are so expensive.

Thank you


texts:
Noob question here.

Currently I'm using a darlington transistor array to drive about 14 IR leds. I want to be use a CD74HC4067 multiplexer to simplify and shrink things up a bit. The IR led's I'm using require 100ma of current, so from what I understand, the problem is that this multiplexer cannot handle this amount of current.

From the multiplexer's datasheet, it says at 4.5V, the "on resistance" is 70 Ohms. Correct me if I'm wrong, I'm assuming this means that the maximum current that it can handle is around 64ma given by Ohms law.

Put simply, this is the what I'm trying to achieve:

From this:

To this:

My questions are:

Assuming the aforementioned is correct, is there a way to change the "on resistance" to handle 100ma of current, or temporarily reduce the amount of current passing through until exiting the multiplexer?
If so, is this as simple as adding a resistor somewhere or how to do so?

If I'm completely off, I'd appreciate suggestions or advice.


texts: Encrypting a JDEC file in Lattice MachxO2

texts:
I am working on lattice MachxO2 FPGA. Our customer is asking to  to encrypt the JDEC file (the bit file). How do I do this?

There is sample Unencrypted JDEC file and some information given here from p.no 35 onward, but it does not mention of encrypting the same.


texts: MOSFET produces excessive spikes from transformer

texts:
simulate this circuit – Schematic created using CircuitLab

I have built a circuit, which consists of a 9V AC transformer, feeding a bridge rectifier and the current to the load (a length of resistance wire ~3Ω) controlled by a MOSFET. The gate of the MOSFET receives a PWM signal from an Arduino control module which allows the duty cycle to be varied from 0% - 100%.

NOTE The MOSFET is intended to chop the full wave rectified AC voltage.

The circuit works, and has been in use for a year.

I decided to add a circuit, consisting of a diode and filter capacitor to derive a DC power for the Arduino, but several electrolytics went up in smoke, and the output voltage considerably exceeded the 13V I was expecting (so it ended up being removed).

I recently bought a BitScope and was using this to circuit.

When at 0% to voltage is the expected full wave rectified DC.

As the duty cycle of the PWM control increased there appeared voltage spikes on the rectified DC, and also on the input AC.

It appears that when the MOSFET turns off the falling current generates a spike.
As there is no other component with any inductance, this seems to be coming from the transformer itself. This was unexpected, as I am working well below the current rating of the transformer, at a much higher frequency than it would normally run. I modified the control circuit to produce 4kHz PWM, which reduced the amplitude of the spikes, but they are still of concern.

I had expected some ripple, but not the massive spikes, which I am concerned may exceed the 60V rating of the MOSFET.

My question is, can anyone suggest some way of suppressing these. None of the normal techniques for suppressing inductive pulses from the load seem applicable.


texts:
I have been working on it for two weeks in this project. Last day I have built a circuit to control the DC Motor speed that is shown in the image here. I have seen some questions like this in this forum and take those as references to build a circuit. But My circuit is not working at all. Here is the measurement I have given as input to the circuit and some voltage measurements.

I/P for optocoupler 5V from Arduino,
 VGS of MOSFET is 3.9V.
 VDS of MOSFET is 24V.

According to the datasheet, input voltages are enough for this circuit. But I don't know which causes the problem in this circuit. The motor is 24V DC and it is not running when connected with this circuit. What must be the problem here? Help, please!

Links for DATASHEET:

MOSFET STB55NF06L: http://www.st.com/content/ccc/resource/technical/document/datasheet/49/c5/a8/71/93/60/4f/86/CD00002690.pdf/files/CD00002690.pdf/jcr:content/translations/en.CD00002690.pdf

OptoCoupler PC817: http://www.sharp-world.com/products/device-china/lineup/data/pdf/datasheet/pc817xnnsz_e.pdf

Schottky Diode 1N5819 : https://www.vishay.com/docs/88525/1n5817.pdf


texts:
I am trying to figure out what exactly is happening
on ATA/ATAPI bus right after power-on. From what
I understand - host shoud send RESET command, then
after some predetermined time send query to identify
devices on the bus. But in reality, it does not look
much like that. I have connected logic analyzer, and
from what I see there are flying some READ commands
before any WRITE (to send a command) happen. Why ?

Anyone know/understand what should be the actual
sequence of events ?

Report this post


texts: Determining base-emitter voltage in a CE BJT with base supplied by constant current source

texts:
I apologize in advance for posting a homework problem. I am given this simple BJT circuit as shown below. I have to find the base-emitter voltage with reverse beta equal to 0.5 and forward beta 50. Also a saturation current of 10^-16 A is given, which doesn't sound right to me, but is written anyway in the problem.

I haven't encountered this biasing configuration before and so I have no idea how to proceed except that the collector current can be found to be 12.5 mA using the provided current gain. Aside from that I don't see any reason why the base-emitter voltage would not be 0.7 volts as usual, but the problem states that the correct value is 0.84 volts. I also want to know what this kind of bias setup is called.

simulate this circuit – Schematic created using CircuitLab


texts: What is the easiest way to transmit data from a computer to an FPGA?

texts:
I have never programmed for a physical interface before. This is the board I am currently using, although I do have access to most of the DE boards on the list.

I need to continuously transmit 3 16-bit numbers at 50 Hz from the computer to the board, in one direction. I don't think serial/parallel transmission matters given the frequency. However, I would prefer one that is easier to code.


texts: How does two way communication between a baseband modem (on a phone) and a mobile phone mast work?

texts:
I've been thinking absent-mindedly about how mobile phone communication works when I wondered how something as power efficient as a mobile phone can have such a powerful radio. I am guessing that most celltowers have a transmit power of, say, 100w (I have no evidence, but the point is that it's a lot), and they have a range of >6km. What I want to know is how can such a power constrained radio (I'm guessing max 2w) transmit a receivable signal to the phone tower?

I have tried googling it but of course it just comes up with a bunch of very basic and irrelevant descriptions of how a celltower works.

Of course I have absolutely no knowledge of radio stuff besides the highschool physics stuff, so I am not able to do any calculations to see whether my question is unjustified.


texts: How to solve the transfer function for this OP-AMP circuit?

texts:
I've came across the circuit below in EDN. This circuit is a "DC Offset Compensator" according to the article. It is used in an ultrasonic sensor circuit which requires self-adjustment to the level of an AC input signal. Also, this circuit accommodates the signal's unknown and variable DC bias voltage.

IC1 is a single supply, high input impedance, rail-to-rail input, rail-to-rail output dual operational amplifier.

I've tried to simulate this circuit using LTSpice, with LTC6241. However, the output stays the same as \$V_{REF}\$. Below is my spice netlist.

I have tried to solve the circuit using below equation, the general equation of operational amplifiers, however it gets too messy too soon.

\$V_{Out}=A_{OL}*(V^{+}-V^{-})\$

Can you, with details, explain me how to solve the transfer function of this circuit?

SPICE Netlist:

XU1 N001 N004 0 Vcc N002 LTC6241
XU2 N002 N005 0 Vcc N003 LTC6241
R1 N005 ss 1.5k
R2 N003 N005 43k
R3 N004 N003 100k
R4 Vcc N001 1k
R5 N001 0 1k
C1 N002 N004 1µ
V1 Vcc 0 5
V2 Signal 0 SINE(1.25 1 40k)
V3 ss 0 AC 1
.ac oct 100 1 1Meg
.lib LTC4.lib
.backanno
.end


texts:
I having trouble understanding PU system especially "briding" the gap from PU system -> to Actual system
To illustrate this here is an example where I am given the one-line diagram for the three phases system:

The first objective is to find the current going from 2 to 3 in pu. When I am given the line voltage at bus 3 and the complex power of the load:
 $$V_3 = 400\ kV\require{enclose}%\enclose{phasorangle}{a+b}$$
 $$S_3 = (77+j14) MV\!A$$
 in the following calculations I will use:
$$S_{base}=100~~MV\!A$$
$$V_{base}=400~kV$$
using that the formula for pu power in a three-phase per unit system is:
$$S_3=V_3\cdot I_{23}^*$$
$$I_{23}= (\frac{S_3}{V_3})^* $$

$$ I_{23} =(0.77-j0.14) pu  = 0.78\enclose{phasorangle}{-10.3^\circ}~pu $$
In the above calculation I let \$V_3\$ be the reference angle. If I wanted to find the actual current I would need to time the per unit value by base value:
$$ I_{base} =\frac{S_{base}}{\sqrt{3} \cdot V_{base}}$$
$$ I_{base} =144.3\ A$$
Hence:
$$ \{I_{23}\}_A =  \{I_{23}\}_{pu}* \{I_{base}\}_A = 112.9\enclose{phasorangle}{-10.3^\circ}~A$$
Question 1: Is it correct that \$\{I_{23}\}_A\$  is the current flowing form bus 2 to bus 3 with \$V_3\$ (Line-Line) as reference angle set to 0? (of course the angle could be +120 and -120 also)

Now let's say I would like to first find the actual current then convert to per unit value. Using the line voltage for the red phase as reference (same as before) angle, assume a star load:

Line current equals phase current in star connection, for the red phase:
$$ \{I_{23}\}_A =I_{RN}= (\frac{S_{3\phi}}{3\cdot V_{RN}})^* $$
$$ V_3 = V_{RN} \cdot\sqrt{3} \enclose{phasorangle}{30^\circ}\ V $$
$$ \{I_{23}\}_A = (\frac{S_{3\phi}}{\sqrt{3}*V_{3}\enclose{phasorangle}{30^\circ}\ V})^* $$
$$ \{I_{23}\}_A = 112.96\enclose{phasorangle}{-40.3^\circ}\ A $$
Getting per unit value:
$$ \{I_{23}\}_{pu} = \frac{\{I_{23}\}_A}{I_{base}}$$
$$ \{I_{23}\}_{pu} = 0.78 \enclose{phasorangle}{-40.3^\circ}\ pu$$
Question 2 Why the difference in result (angle) from method 1 and method 2. I get the same magnitude but I get a difference in 30 degrees in the angle, why do I get that difference? What have I done wrong?
My thoughts on question 2:
I can see that in the second case if I used \$V_{RN}\$ as reference angle I would get the same angle, but on the other side in both cases, I used the line voltage for the red phase as the reference angle.

Sorry for my poor English, but thanks for the help in advance:) Literature suggestions to get a good understanding of per unit systems would also be greatly appreciated:D


texts: Won't the back EMF from the relays hurt the LEDs?

texts: In this ULN2803 based relay driver schematic, why won't the back-EMF from the relays hurt the relay status LEDs?


texts:
I was asked by my professor that why the standard of 4-20 mA is set for measurement of current in measurements circuit. Is there any reason why this level is used ? I mean why the value of 4 ? Can't it be 5-25 mA or anything ?

Please note that I know why we dont use a non-zero starting point fpr measurement.


texts:
I bought some 7 segment decoders specifically the CD4543B and the datasheet https://www.ti.com/lit/ds/symlink/cd4543b.pdf mentions "Direct LED Driving Capability"

Does that mean I do not have to use current limiting resistors for each segment? (excluding the dp segment, of course)

I tried adding a 220ohm resistor for one of the segments but I couldn't see a noticeable brightness difference, and none of the segments has burnt out, yet.

I'm using common anode 7 segment displays if it makes a difference


texts: USB direct connection and implemention on FPGA

texts:
A few months ago I did some research on the web for implementing USB on an FPGA, I came across several articles that hinted that it was not possible for complete USB implementation on an FPGA citing the following concerns

The voltage levels of USB data lines are in 3.3V range while FPGA runs on 3.3 or 1.2 logic levels. (i was a bit skeptical regarding this since PIC24F which work on 3.3V supply have implemented USB hardware on chip)
USB requires embedded software that needs to be implemented on a MCU that will work in tandem with the hardware part of USB.

Today I came across an FPGA dev board, The Orange Crab where the USB pins were directly to the FPGA. Its an open source board with schematics available to be checked out.
Citing from that page

Direct USB connection to the FPGA (Operate as a DFU, MSC, CDC, or
composite device!)

I began to wonder how would they be implementing the USB inside the FPGA and the resources that would be necessary for that. Would they for instance instantiate a soft CPU core inside the FPGA and then handle the necessary USB code on it using a C library for the USB framework.
Wouldn't that be a terrible waste of FPGA resources, instead of just using an external FTDI chip to offload the USB part?
It would be interesting to know if my hunch is correct or is it really possible to do USB completely in hardware and how?


texts: Why did my Atmega328p chips stop working?

texts:
I am fairly new to embedded programming. I bought some Atmega328P U chips (not Atmega328P-PU). I have two Arduino boards and the chips worked just fine, and were letting me upload sketches. One of those chips stopped working while trying to upload bootloader using one Uno board to other.

I bought a usbasp programmer like this one - (https://www.fischl.de/usbasp/bilder/usbasp_kit.jpg) which has two jumpers (it is set to J2). I used ProgISP software from Zhifengsoft, which successfully read my chips. But after clicking 'ERASE', the Atmega chips did read for a few times and then stopped responding at all. Now, everytime I click read (RD) on the software, it says CHIP ENABLE PROGRAM ERROR. However, it successfully reads an Atmega8A chip I have, which suggests something is wrong with only my Atmega328P chips. I do remember the setting 'PROGRAM FUSE' was enabled at time of erase.

What has gone wrong with them?
Is there a way to recover them or they are just useless now since software cannot read them anymore?
Do I need some other programmer and technique to use that I am not aware of?

[UPDATE] I tried using Arduino IDE and Khazama AVR programmer software which give the same error for my Atmega328P chips - "target doesn't answer. initialization failed rc=-1. Flashw riting fail. However, as usual, Atmega8A chip programs just fine.


texts: Help me figure out this 12AX7 Tube Preamp mess

texts:
A few years ago I built a Tube guitar amp / pedal / preamp with a 12ax7 tube (and some other pin compatible tubes). I don't remember what schematic I used to make it and I wasn't skilled with electronics then but surprisingly sound does come out of it, and I really like the distortion when the tube is overdriven.

It looks like I've made some whack decisions when building it:

I have no idea how I arrived at the resistor values, as well as their wattage
The capacitors don't look like they are the right type or values
The heater connections look weird, whats with the grounded middle?
The pots look like they are 1M each, Is that sane?
The amp is really quiet, even turning all pots to maximum with line level input. It distorts slightly, but I was expecting it to be massively distorted (in a good way) when turned up to the max.
Whats with the 100uF Electrolytic caps on the cathodes of the triode?
Where should the ground be connected in this setup. I'm getting intermittent hum when I connect a guitar to the input, and speakers/amp to the output, but fine if I play music to it from my phone
Why the two resistors around the output potentiometer (see Update below)

I would love for someone who is familiar with tube amplifiers to look this over and help me work out right values and parts.

Here is an album with couple of pictures of the insides, Its not pretty.

Update:

Crud, I forgot about the two resistors across the output potentiometer. From the 2nd picture from the bottom of that album, the resistor across output and ground is 100k and one across capacitor and output is 1M


texts: Why does my ground current look like this (and why is my current so low)?

texts:
I have a simple RL circuit with a MOSFET, as shown, with the FET switching at 200 kHZ and 50% duty cycle. I expect, for a given input voltage V2, to have an output about half the voltage (thanks to the 50% duty cycle), so in this case an average amperage of about 7.5A. Instead the actual circuit and my spice simulation show a current of only ~60 mA, and bizarre current behavior at the source of the FET. The FET is an IXFB210N30P3, and the signal generator is in reality a PWM controller and MOSFET driver, separated by an optocoupler.

The current through the resistor and inductor, according to a spice model, look like this.

but incomprehensibly, the current at the source looks like this

with enormous current spikes as the MOSFET switches, but no current when the MOSFET should be on (where green is the gate voltage and red is the source current, see clearer image in link).

I am trying to understand, first of all, why there is so little current in the circuit (a hundredth of what I'd expect), and also why the ground current doesn't seem consistent with the current in the rest of the circuit. This is what the drain voltage looks like, with large voltage spikes due to the inductance of the circuit. I'd discount this as a simulation error if it weren't consistent with what I'm seeing in my scope. I'm happy to attach scope readings or the model itself if they would be helpful (not sure what the SE policy on file uploads is).


texts:
Can someone explain, or provide a good reference to an explanation of Poles and Zeros for say, a power supply compensator, or any control system for that matter.  I'm not really looking for a mathematical explanation, as that seems rather straight forward, but what they mean in a practical sense.

It seems common, for example, for papers or app-notes to mention something like "a type III error amplifier configuration has three poles (one at the origin) and two zeros" or "adding capacitor C1 introduces an additional zero into the system" as if I'm supposed to take something from that without any further explanation.  In reality, I'm like "ughhh, so what?"

So what would something like this mean from a practical sense.  Are poles points of instability?  Do the number of zeros and poles indicate something about stability, or lack of it?  Is there a reference about this somewhere written in an understandable manner that would allow me (more of a practical use, not hardcore math for the sake of math type) to join the in-crowd when it came to app-notes referencing Zeros and Poles?


texts:
I'm using a SAW filter which has balanced input and output.

In the datasheet there is shown a matching application for 50ohms balanced output.

But plotting the S22 parameters into a Smith Chart and trying to get the same matching circuit is not working for me. I'm guessing the matching circuit is optimized for the center frequency 1090MHz.

Can someone please verify if the datasheet is wrong, or if it is just me (most likely :-) )

Datasheet and S-Parameters are available here:
http://www.triquint.com/prodserv/more_info/proddisp.aspx?prod_id=856096


texts:
I have made this contraption in order to quickly switch one keyboard between a PC and a laptop:

The keyboard hooks into USB_A and it gets routed to either J1 or J2 depending on the position of a 3PDT switch.

I am using similar lengths of cables at both J1 and J2 (0.5 - 0.6 meters; less than 2 ft). Plug either one of them into the laptop - works. Plug either one of them into the PC and it will work sporadically. And when it does, give a few seconds to a few hours and it will stop working. Oh, and yes, plugging the USB keybd directly into the PC works as expected. What gives here ?

edit

More photos:


texts: What's the difference between a FP, gain guided and DFB laser diode?

texts:
What is the difference between a Fabry-Perot (FP), a gain-guided and a Distributed Feedback (DFB) laser diode?

I think Fabry-Perot is the default configuration, gain-guided has something to do with a strip electrode (but I'm not clear on how it works) and DFB uses a Bragg-grating to limit the output of the laser to a single wavelength. However, I'm still a little blurry on the details. Help clearing up the differences would be appreciated.


texts:
I've just starting learning electronics.  I've been using Autodesk Eagle for a little while now since it runs on Linux and seems to be pretty full featured.  I like that you can easily design a circuit schema, layout PCB, and then order the PCB and parts. However, it seems to be missing a simulator which I really need.  Searching online it seems that there an add-on simulator called PCBSim.  It looks very cool, but the pricing is very high and as a hobbyist, I just cannot afford it.

Does Autodesk Eagle have any other, more moderately priced, add-on simulators?
Did I miss anything with Autodesk Eagle's built-in functionality when it comes to circuit simulation?  Should I be looking at other options other then Eagle?  I've tried running LTSpice via wine, but it's been buggy.

Thank you


texts:
I have a doubt in I2C pull up resistor. Actually I am developing a I2C module using GPIO pins. I have used external pull up resistor(10k) for the SDA and SCL lines. Do I need to enable the internal pull up also along with External pull up or external pull up is enough. How does the combined external and internal pull up effect the communication.?
Please reply

Thanks


texts: Basic C Programming Question On Microcontroller

texts:
I think this question is ok in the electronics stack and not the programming stack (I hope).

I have a simple code written in C, on a TM4C123 evaluation board. It uses the  two on board switches to control the colour of the on board RGB LED.

The switches are configured in software with pull up resistors and the PORTF configurations are all correct. I had the same functionality working using switch case statements, but tried to re-create it with if else statements but it doesn't work as it is supposed to.

Below is the original working code:

#include "include/tm4c123gh6pm.h"
#define RED_LED (1U << 1)
#define BLUE_LED (1U << 2)
#define GREEN_LED (1U << 3)

int main()
{
    SYSCTL_RCGCGPIO_R = 0x20U;
    GPIO_PORTF_LOCK_R = 0x4C4F434BU;
    GPIO_PORTF_CR_R = 0xFFU;
    GPIO_PORTF_DIR_R = 0x0EU;
    GPIO_PORTF_PUR_R = 0x11U;
    GPIO_PORTF_DEN_R = 0x1FU;

        while(1)
        {
        GPIO_PORTF_DATA_R &= (0x011U);

            switch(GPIO_PORTF_DATA_R & 0x11U)
            {
                case 0x11:
                GPIO_PORTF_DATA_R |= RED_LED;
                break;

                case 0x01:
                GPIO_PORTF_DATA_R |= BLUE_LED;
                break;

                case 0x10:
                GPIO_PORTF_DATA_R |= GREEN_LED;
                break;

                default:

                break;
            }

        }

}

Here is the troublesome code:

#include "include/tm4c123gh6pm.h"
#define RED_LED (1U << 1)
#define BLUE_LED (1U << 2)
#define GREEN_LED (1U << 3)

    int main()
{
    SYSCTL_RCGCGPIO_R = 0x20U;
    GPIO_PORTF_LOCK_R = 0x4C4F434BU;
    GPIO_PORTF_CR_R = 0xFFU;
    GPIO_PORTF_DIR_R = 0x0EU;
    GPIO_PORTF_PUR_R = 0x11U;
    GPIO_PORTF_DEN_R = 0x1FU;

        while(1)
        {
        GPIO_PORTF_DATA_R &= (0x011U);

            if(GPIO_PORTF_DATA_R & 0x01U)
                {
                    GPIO_PORTF_DATA_R |= RED_LED;
                }

            if(GPIO_PORTF_DATA_R & 0x10U)
                {
                    GPIO_PORTF_DATA_R |= BLUE_LED;
                }

            if(GPIO_PORTF_DATA_R & 0x011U)
                {
                    GPIO_PORTF_DATA_R |= GREEN_LED;
                }

            else
                {
                    GPIO_PORTF_DATA_R &= 0x0U;
                }
            }
}

The switches are stored in PORTF bits 0 and 4. And the red, blue and green LED is stored in port F bits 1, 2 and 3 respectively.

On line 63 I have an 'AND' assignment to check if bits 0 or 4 is high (button(s) been pressed).

Next the data register is logical 'ANDED' with 1's on bits 0 and 4 to check if it is a 1.

Then the IF statements should switch on the LED's accordingly.

Operation should be:

No switches pressed (bits 4 and 0 = 00) , no LED on

Switch 1 pressed (bits 4 and 0 = 01), green LED on

Switch 2 pressed (bits 4 and 0 = 10), blue LED on

Both switches pressed (bits 4 and 0 = 11), both LED's on

When I step through the code with the de-bugger, the IF statements all appear true with the red, blue and green LED all coming on in order. The else statement is appearing false.

Am I making a mistake that with the pull up resistors, the bits 4 and 0 will be active low (1 when not pressed, and a 0 when pressed)?

Thanks for any replies.


texts: How to detect low battery of a lead-acid battery?

texts: I've heard that discharging a lead-acid battery to 0% is bad and wears it out. I have a 10Ah 12v lead-acid battery, is there a circuit to tell me when the battery is low?


texts:
I'm trying to build a simple circuit to control a church lampadary for an escape room game. I don't know if you've seen these but they're fairly common in catholic churches where I live: You input donations and a fake candle lights up for each coin.

Here's a basic blueprint for it:

I bought this coin acceptor:

And powered it up with a 12V, 1A adapter. At the same time I'm using a car usb phone charger as converter (12V to 5V) to power my logic.

This acceptor has a NC signal configurable to output 100ms, 50ms or 22ms square pulses whenever a coin is inserted. To adapt this signal I used a couple of 10M resistors in series and a parallel 5V Zener diode in reverse connected to my 7474's ¬PRESET pin. Two ANDed flip-flops catch this signal and send a "clock pulse" to a 74164 which puts one bit up and lights a candle.

You can see the mounted thing in:

(Sorry for this, newbies can't post more than two links) All ICs in the picture are pointing west. Pin #1 is on the south west corner.

simulate this circuit – Schematic created using CircuitLab

Still, when I input a coin in my acceptor, nothing happens. I've also tried to simulate acceptor output with a switch, and I saw two consecutive bits light up at the same time at each switch push. Maybe switch bouncing, which I thought I could solve with my flip-flops? Or maybe it isn't a good idea to use gate output as a clock signal for another IC?

Acceptor output gives 2.56V in my multimeter, which according to the datasheet should be enough to activate the latch.

This being the case, my question is: Is this a/the proper way to interface my 12V acceptor with my circuit? Am I missing something?

Thank you for reading. Any help would be appreciated!

EDIT:

I implemented the voltage converter using the IRF530 as proposed in this answer. Still the circuit wasn't responsive. I suspected the coin acceptors so I tried to test them connecting a couple of LEDs to N.O. and N.C. outputs through a 10K resistor. None of the LEDs lights up but they aren't burnt. Are the acceptors definately broken or is there something I'm missing?


texts:
I have a servo motor and it's driver
I wired up everything and it's almost working.
The driver generate a 12V signal and I control the motor with 0~10V analog command.

I started from the point 5mA was enough as a command, hence I used a 400ohms resistor to drop the voltage from 12 to 10V
Then I calculated I need a 2KOhm potentiometer to be able to adjust from 0V to 10V
I wired evething such as the picture. But at the end I got 12V to 2V when I adjust the potentiometer, I can't go below 2V. And normally I should get 10V to 0V

What is wrong with my setup?


texts: Special LM317 Constant Current Power Supply

texts:
An unusual problem came up that requires a substantial dip in current when the load is increased.  The solenoids hold the bass audio contacts closed on a Hammond H-100 Series.  The feature is called "String Bass".

Here's how it supposed to work:  One pedal is depressed--then released, its corresponding solenoid is held in by a holding contact.  When a second pedal is depressed, the current is divided and the first solenoid drops out due to insufficient holding current.  The second pedal doesn't care since it is manually held with the foot, and consumes the full 130mA once the preceding solenoid drops.

Problem: 1/2 of the constant current is enough to hold some solenoids in due to manufacturing tolerances.  The need is to have the current momentarily (~30ms) dip substantially below the 65mA to insure dropout of the pedal that had been released.

Hammond accomplished this with many transistors (some Ge), two zeners, one diode, two adjustment pots, and several resistors.  Rebuilding the original scheme (that burned out) is not insurmountable, but undesirable.

Holding contacts and diode clamps not shown.

Any ideas or alternative approaches appreciated.


texts: pull-up resistor for MOSI pin of SPI communication

texts:
I want to know how to calculate pull-up resister values for MOSI pin of SPI communication,details are,
1.speed of communication 12Mbps.
2.master is controller (datasheet:R01DS0190EJ0130) and Slave is Flash(AT45DB041E).
3.I am using Simple SPI mode.


texts: Will my 12V power supply ever burn these IR leds blinking at 38kHz even without a resistor?

texts:
I'm new to electronics, my background is mostly on the software development side... so go easy on me, as this might be a really stupid question. I just want to be sure what is safe to assume and what not.

My project consists on emulating the IR signal sent by the RC controller of a toy helicopter so I can then command it with my hand using a LEAP motion device.

The IR signal works perfectly, but I was not being able to match the range the RC controller was capable of getting. Anything like a computer monitor in between was enough for the helicopter to fall to the ground.

I purchased the brightest IR leds I could get (TSAL6100, 1.35V@100mA) and I was definitely getting some better range than my previous IR led but still nowhere near as much as the RC controller.

Since the IR is always blinking (and not constantly on), I assumed "it wouldn't hurt much" if I started reducing the resistors and try to get more brightness (that I've been checking with a cellphone camera). I was still not being able to match that of the RC controller.... so then I started increasing voltage with a separate power source, since arduino max output is 5V and RC controller using 6 AA batteries must be somewhere around 7V

I know the dangers of doing this, but I went ahead anyway and had a 12V power source without any resistor, making those 3 IR leds blink and now I get the same and even farther range than the RC controller..... so far none has burned, however, how crazy am I for doing this ?

What would be the correct way of achieving the exact same performance as the RC controller...

Will the IR leds blinking at 38kHz ever burn out under these conditions ?

Only under these conditions I am able to see through my camera that the led brightness matches that of the RC controller..... so how are they doing it "properly" ?

Thanks in advance.


texts: Is soldering extra wires to increase current capacity on a pcb trace good design?

texts:
I was working on a bunch of PC PSU organ donors and noticed that on lots of them through all the wires that lead the power to the outside there were wires soldered, and lots of solder added. This is probably to increase current capability.

I only today thought about it, so did not take any photos, but it looks similar to this:

Now an ATX PSU looks quite crowded and there is probably not enough place for wider traces, so I was wondering if this is acceptable/good design or if I should avoid it and go for proper traces where I can; and why should I do what.