texts:
I'm using MPLAB X IDE v4.20 to compile the following code:

            #INCLUDE <P18F4321.INC>
            CONFIG OSC=INTIO2 ;     Select internal oscillator
            CONFIG WDT=OFF ;    Watchdog Timer OFF
            CONFIG LVP=OFF ;    Low Voltage Programming OFF
            CONFIG BOR=OFF ;    Brown Out Reset OFF
            BSF TRISC,TRISC1;   Configure bit 1 of Port C as input
            BCF TRISC,TRISC0;   Configure bit 0 of Port C as output
            BSF TRISD,TRISD1;   Configure bit 1 of Port D as input
            BCF TRISD,TRISD0;   Configure bit 0 of Port D as output
    BACK    RRNCF PORTC,F;      Align data in Port C and output to LED
            RRNCF PORTD,F;      Align data in Port D and output to LED
            BRA BACK
            END

and I get the following error message for all the lines starting on BSF TRISC,TRISC1; to BCF TRISD,TRISD0; and also for the line BRA BACK,

  "Error[152]   C:\ECE\ECE3301LRAFI\LAB4.X\LAB4RAFI.ASM 12 : Executable code and data must be defined in an appropriate section".

So it doesn't compile because of that.

Now, what it intrigues me is that if I compile it in MPLAB IDE v8.50 it does compile without any errors. The reason I was doing it in MPLAB IDE v8.50 is because my professor uses it for the labs, but he uses PICKit 3; however, I have a PICKit4, and MPLAB IDE v8.50 doesn't seem to be compatible with it. So I'm using MPLAB IDE v4.20. I know that it has to do with keywords or something like that, but I don't really understand. Do I need an ORG to compile even if I don't need it for the actual code? Any help will be appreciated. By the way, the experiment is really simple: "to perform a simple I/O experiment by interfacing DIP switches and LEDs to the PIC18F4321 using Microchip’s MPLAB assembler
and PICKit3." He said that we can use either PICKit3 or PICKit4.


texts: Is it possible to change the ground voltage level for the ADC/DAC at a STM32F373?

texts:
I want to change the ADC and the DAC ground so the ADC begins to measure at e.g 0.64V and the DAC begins to send out voltage at 0.64V.
Is it possible to change VSSA and VSSSD

One issue I found is that VSSA can only be 0V. But 0V just a difference point. We can say that 0.64V is the zero-ground-voltage. Right? Or can't I change VSSA and VSSSD?

Datasheet: https://www.st.com/resource/en/datasheet/stm32f373cc.pdf


texts: 4 to 20ma current loops - best power and receiver practices?

texts:
A customer wants me to add an expansion board to my industrial computing platform to handle multiple 4 to 20ma loops. Currently, he wants to power the loop and receive data from transducers. I've done a little research, and I've found that typically each receiver has a 250 ohm resistor to turn the 4-20ma range into 1-5V. 12-36V (24V nominal) seems typical for power requirements.

However, the examples for receivers seem way oversimplified. A simple 250 ohm resistor would need to be 6W+ to handle a shorted 36V line, for example.

Here are the problem areas as I see them:

1) Shorting performance. I'd expect the system should handle indefinite loop shorts.

2) Isolation. How important is isolation? I see a note that separate loops powered from the same supply could induce ground loops. This would complicate supporting multiple channels. Currently, I'm ignoring this.

3) Multiple receivers. If they want to chain receivers, 250 ohms seems limiting. Is this still common? Could I use say 50 ohms to reduce the voltage drop? I guess that'd be dropping my noise immunity by a factor of five.

4) Surge events. I think I'll put in a series diode, a parallel diode, and a Bourns surge supression IC per-line.

I'm going to set a goal and say 4 channels of up to 36V loop voltage.

I'm tempted to boost my 12-36V system input to 40V and use a power amp to drop that to the loop current. I could use a power amp like the OPA452 for each channel, which would give short circuit protection and per-channel voltage selection.

Am I overthinking it? Not thinking it through enough? Do I just stick four 250 ohm resistors and ADCs in parallel tied to a 24V source and call it a day? (mostly rhetorical)

Bonus question: What's the best way to transmit 4 to 20ma signals?  Should I use something like an AD421?


texts: When connecting to Ethernet through ENC28J60, why use ATmega88 instead of ATmega8?

texts:
I know the general differences between ATmegaX8 family (ATmega88, ATmega168, and ATmega328) and the ATmegaX family (ATmega8, ATmega16, and ATmega32).

But I'm confused, as when I intended to work on a project to connect the ATmega8 to Ethernet using the ENC28J60 chip, I found that most projects on Internet are using ATmega88 and ATmega168, specially the ones from tuxgraphics.org:

And when I tried to port those source codes to work with ATmega8 instead of ATmega88, I faced a problem with prescaling the frequency many times and some other problems. I failed to reach a .hex code that works on ATmega8.

So why are ATmega88 and its family more suitable to connect to Ethernet than the ATmega8?


texts:
I have an audio amplifier that draws about 200-300mA max that I would like to switch on/off using either an I/O line or a the switch pin from the headphone connector. I was thinking about using an npn transistor or an N-type FET but I've never really done anything like that before so I was hoping for some tips.
The I/O is from an ATTINY85 and the amplifier I'm switching is an LM386


texts: Output voltage diagram of a 3-input OR logic gate (using diodes)

texts:
Let's say we have a 3-input OR gate (using 3 diodes and a resistor) as follows:

A hypothetical input voltages diagram is the following:

I want to find the output voltage diagram (voltage Vo) that corresponds to this diagram from 0 to 6 seconds. I have drawn the following diagram:

So:
t = 0sec to t = 3sec -> at least 1 input is non-zero (not grounded) -> output is high
t = 3sec to t = 6sec -> at least 1 input is non-zero (not grounded) -> output is high
I am not sure that this is correct. Basically, I am wondering what is the maximum and minimum output voltages.
Thanks!


texts: DC Switching Boost Regulator at light load - power saving

texts:
I am new to DC-DC switching boost regulator. In my application, I need regulated 3.3V output from 2 (1.5V) single alkaline batteries. I have a light load taking only about 0.5 mA most of the time and as per the user activity intermittently, power to a module is switched (with a load switch), which takes about 75 mA for about 250 mS.

In my experimental setup, I've used TPS61201 / TPS63001 from Texas Instruments, which has a power save pin to reduce power consumption at light load.

My goal here is to increase the battery life as much as possible and be able to use the regulator down to about 1.6V from 3V of the alkaline batteries.

What I am trying to understand are as follow:

Can I keep the power save mode enabled all time time in my application with such DC regulators to minimize inductor current and to increase battery life?
What difference it would have in performance with power save mode enabled or disabled all the time?
With power save mode enabled, would the regulator start up with voltage as low as 1.6V or lower?

At the moment, I am evaluating different DC boost regulator and their characteristic curves for best efficiency in my application but your input would help me clarify my understanding about power save mode of such DC regulators and how to increase battery life for light loads for most of the usage duration.


texts: Question about trigger on FNIRSI oscilloscope

texts:
I am new on oscilloscopes.
I bought a FNIRSI PRO DSO.  To test it I tried sending ASCII characters on an Arduino UART with the probe connected to TX and GND.  I put the command 'Serial.print("hello world")' in the loop function. I am able to see all the character's waveforms in the whole screen but they seem too crushed in the screen to analyse it.
Suppose that I need to analyze the last character (d) of the phrase. I can't find a way to zoom in on the 'd' character waveform (with all the letters.) Is there is some way to tell the trigger start cursor to start at the 'd' letter or some kind of trick?


texts: What does ".1M/250" mean as a capacitor rating?

texts:
I'm not very familiar with capacitor markings, and I'm trying to understand what exactly this one means. I'm guessing .1M indicates 0.1 microfarads with 20% tolerance, but I have no idea what the /250 means.
I don't have any documentation for it since I just pulled it out of a dimmer switch.

This is what it looks like:


texts: Why is the Earth a useful reference of electric potential?

texts:
I may be a little confusing, but I honestly need a good help to make me understand certain things. I like very much to learn theory, but I feel that if I learn it without associating to the real life, it would be like 2 isolated boxes with knowledge, with no interaction.
In this post I'm trying to stablish a connecting bridge between Electrical Potential, and how it is useful to us, and how this can connects to our daily knowledge.

I get that we use Earth as a reference point, the origin of our referencial, and I get that we only consider the relative values of potential according to Earth (ground).

My question is, why is ground/Earth used as a reference? Why isn't 1 meter above the ground our reference? Is it because its potential relatively to infinite is -500...(something)Volts, so any overcharge in our devices could simply discharge to the ground? But even considering that this is right, why is it useful? What makes it useful to know that in some point, you got X potential relative to our zero referencial?

Per example, If I say my gravitational potential energy referencial is the floor, I can say that a ball 1m above it has $$m\cdot9.8\cdot1 J$$ of energy that can be converted to kinetic energy. So it's useful to know the velocity before it collides! So, how can we make use of our eletric potential referencial assumption?

Also, when we talk about "neutrals", in our homes(per example), I think that they are used because they complete the circuit between Power Source and ground, but are these "neutrals" the same neutrals that we talk in three-phasic configurations (Triangle, Star) ??


texts: A 100µF capacitor and a 15kΩ resistor are placed in series with a 9V battery

texts: How long will it take the capacitor to charge to about 63% of the battery’s voltage when first connected?


texts: SSD1306-based OLED display E/RD# and R/W# pins

texts:
This is the OLED display in question and this is the datasheet of the display. I am going to connect to it using I2C.
The datasheet provides mostly understandable explanations for the pins as far as their usage in different communication modes (I2C,SPI,8 bit parallel etc.) goes.

These are a couple that I have trouble with:

Both of these pins have mentions of their function when driving them using using "68XX-series and 80XX-series microcontroller". From the datasheet it seems they mean 8-bit parallel com:

The question is, should leave them floating when using I2C? Or is data read still dependent on the state of those pins. I assume not, but I'd like to hear from someone who has had actual experience with them.


texts: Where is Altium Designer 13 Supplier Unit Price in BOM?

texts:
I got a month trial from Altium sometime in January, I believe that was Altium 12. While playing around with it, one thing we liked was that that for our BOM we can retrieve live supplier information such as unit price. I created a template, and everything looked good.

We recently upgraded to the latest Altium, and the Unit price in the supplier data is no longer there. Instead, there is a pricing column which has ALL prices for the varies quantities (1,10,50, 100 etc..). That's useless to me, because we want the total cost of the project within the BOM for our internal records.

Is this a bug or is there another way to extract a unit price ?

I'm still fairly new to learning the ins and outs of this software, I've only really played with it for about 2 weeks prior to this.


texts:
I recently purchased this 32650 LiFePo4 6Ah cell, and I'm looking for simple ways of charging it. I am not able to find LiFePo4 specific chargers that charge single cells, and I was wondering if I could use this TP4056 module to charge it. Would it work? Are there any other charging circuits I could solder together myself to charge this cell? And could you show me a few examples of chargers dedicated for single cell LiFePo4?
Thanks in advance.


texts: Which IC can I use to control 7-segment display? I want to make simple projects like a reaction timer but I don't have an Arduino or some other microcontroller available. What ICs can I use instead?


texts: Arduino + Microphone how to grab values?

texts:
I have a simple microphone.  How can I send some "volume" or "oscillation" values via serial to the computer?

I built a simple preamp but it does not respond, any hints?


texts: How was the Zero Flag implemented on Z80 ALU?

texts:
Z80 was a popular 8-bit processor with a 4-bit ALU.

Implementing a zero flag for a register should be straight forward, it would be a logical NOR of all the bits on the register.

Something like that would work for a small number of inputs. As for a 64-bit processor you cannot make one gigantic NOR gate with 64 inputs. The fan-in would be too high. Too many transistors would be in series.

So, I can see some other options (non-exhaustive list).

The zero flag could be generated directly from the 8-bit result using 2 level logic.

The zero flag could be generated directly from the 8-bit result using 3 level logic.

The zero flag could be generated from each nibble and then put together, like if there was a "half"-zero flag. The result for the lower would be saved using a flip-flop while waiting for the high nibble result to be calculated.

Ken Shirriff wrote a nice article about reverse engineering the Z80 ALU. However when it comes to the zero flag he states:

  Not shown in the block diagram are the simple circuits to compute parity, test for zero, and check if a 4-bit value is less than 10. These values are used to set the condition flags.

So, although they are simple circuits I would like to know exactly how they were implemented and if they used any of the implementations proposed above or something else completely different.

There is a related question where they talk about zero flag implementation in general terms.


texts: 2200mAh powerbank with 7,4Wh lion battery inside

texts:
Out of curiosity have I opened the powerbank I got. (Nothing dangerous, could be normally screwed open.) Inside there was a 3,7V Li-Ion battery with 7,4Wh marking on it. 5V powerbank should be 2200mAh. Is it a scam or do I miss something?

7,4Wh on 3,7V battery means = 2000mAh at 3,7V. With boost converter => ~ 1300mAh.


texts: Is this ST7735 based LCD module broken? (Photo: random color pixels on the entire screen)

texts:
I have been testing my LCD module. I think it is burnt, although I hope not....
Can anyone confirm that I just badly programmed?

I try to send a pixel(green, red, black whatever the color is) to the    ST7735 chip and it gives me randomly generated pixels all over.
It happens as I set "Sleep Out" mode

A   random pixel at the same address doesn't change its color, though.   The pixel at (0,0) is always green no matter how many I turn off and    turn back on.

What should I do to prevent this from happening ever again? I think I have limited the current more than enough.
I am about to take out another LCD module, if anyone confirms it is indeed unusable.

P.S Sorry about the lack of detail.
I thought the question is more simpler question. I thought that explaining the phenomenon and the end result would suffice to troubleshoot the problem.
Here are the datasheets:

http://aitendo3.sakura.ne.jp/aitendo_data/product_img/lcd/tft2/Z180SN009/LCM-Z180SN009V00.pdf

https://displayfuture.com/Display/datasheet/controller/ST7735.pdf

This LCD uses 4-lines SPI (Register select, chip selection, SDA, SCL).
Initially, I just took a look at the datasheet and I tried to interpret it myself. I couldn't even have something that shows in the photo, so I referred to the examples online.

I followed the initialization process of theirs:

https://bitbucket.org/jschick/tft_st7735
(The one above corresponds to a pi code.)

github.com/adafruit/Adafruit-ST7735-Library.

My code is a bit of mass... I haven't commented it yet.
So I will explain it myself:

Hardware Reset -> Delay 50ms -> Software reset -> Delay 50ms -> Window setting( setting X address & Y address) -> Normal Display Mode On -> 10ms delay -> Display On -> 500ms delay.
Then I use "Ram write" command and a parameter(24bits). Just once (1 pixel).
Finally an infininte while loop.

I removed all power control and other initialization process because it yielded a result no different from the photo above. I thought the default setting is very well sufficient.


texts: Criticize Totem pole + Level Shifter topology

texts:
I'm designing a FET gate driver that allows 1.8V MCUs to control FETs up to 100kHz.

FETs to be used will vary a lot so I'd like to have as much current drive as I can.

I need it to be based on discrete transistors.

What could I add or remove to improve performance?

Not shown are capacitors close to the driver components. I've considered adding a Schottky diode in parallel with RGate to improve turn off.

Transistors are BC847BW / BC857, V+ is 9V ~ 30V. Resistors are to be chosen.


texts: How to ensure that an SPI master sends exactly 16 clock pulses to the slave?

texts:
I'm using this current sensor: TLI4970-D050T4 According to the datasheet:

How can the SPI master send exactly 16 clock pulses to the slave, so I don't receive the 0's?

When I'm reading this sensor, I get a lot of 0's. So, I thought that it might be the reason, that I'm sending more than 16 clocks pulses. I'm using an STM32 Nucleo running at 2 MHz, but the SPI clock has been prescaled to 1 MHz. I would appreciate any advice. This is the code that I use to read the sensor and calculate current:

while (1)
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET);
HAL_SPI_Receive(&hspi1, (uint8_t *)&SPIRx, 2, 10);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_SET);
motorCurrent=motor_current();

float motor_current() {

    float Iout;
    float BIout;
    int16_t Bit15;
     Bit15 = SPIRx&0x8000;
            if(Bit15==0x8000){
                HAL_GPIO_WritePin(GPIOB, GPIO_PIN_4, GPIO_PIN_SET);
            }
            else {
                BIout= SPIRx&0x1FFF;
                Iout = (BIout-4096)/80;
            }
        return Iout;
     }


texts: Things to know about a motor when setting up a circuit?

texts:
I'm trying to build an electric bike. However, when looking at motors online, they often have statistics, such as this.

Specifications:
* Wheel Size: 26"      * Spokes: Steel, 12G×2.6mm
* Max load capacity: 150kg (36V500WR、36V500WF)
* Max load capacity: 200kg (48V1000WR、48V1000WF、48V1000WRC)
* Max load capacity: 250kg (48V1500WR)
* Tire: Nylon
* Motor: Brushless Gearless
* Rim: Alloy double wall

Model     Wheel     Power        Max speed   Torque
36V500WR    Rear    500W / 36V      22 mph      35 N.M
36V500WF    Front
48V1000WR   Rear    1000W / 48V     28 mph      45 N.M
48V1000WF   Front
48V1000WRC  Rear    1000W / 48V     28 mph      45 N.M
48V1500WR   Rear    1500W / 48V     34 mph      48 N.M

I know some basic electrical engineering terms, but I'm confused on what I should be looking for in this instance.
I want to balance efficiency with speed, and am also wondering in advance what batteries/factors I should be looking out for.


texts: So I am using an LM741/A Op-Amp. Wondering whats the value of its Vsat? Have been looking at its datasheets but cannot find anything. Am I missing something? Is the Vsat just equal to its output voltage swing?


texts: Understanding CPU clock signal processing

texts:
Although I have a pretty good background in math/cs, I don't have much experience with circuits and their functionality. I've browsed the internet and looked at some books on integrated circuits, but I still have yet to find an answer to a simple a question: how do CPUs process memory/signals.

A lot of answers tend to reduce to analogy: typically, the answer is of the form "it's like a low of switches." Yeah, yeah, I get that. I understand how a transistor works.

What I'm trying to understand is how these signals are actually relayed in, say, electron form. If I just randomly (and wrongfully) assume it's a pulse of electrons carried along s conducting wire to the transistors, how does this get processed? More directly, how is a binary signal actually read by the cpu?

No need to get complicated with modern cpus: a simple example/computer would be excellent. For direction, let's say we have a bunch of transistors that are storing some level of electrons to represent a simple byte. How is this then passed to a crude cpu? Any links, would be helpful. Sorry if I seem a bit direct: brevity and polish don't always go hand in hand.


texts: How do I reset an FPGA development board to its factory settings?

texts: I have programmed an Altera board in configuration mode so that it runs my program when booted up. Now I want to revert it back to factory configuration. How do I do that?


texts: Do Induction Motors only work if the rotor's coils have a finite resistance?

texts:
I just did some calculations, and to me it seems that the induction motor only works when the rotors coils have finite resistance:
I will show that for a single conducting loop, whose current is driven by change of flux due to the exterior magnetic field, the torque on the loop will be zero when the current is zero, and when the voltage is zero as well.

I assume that the stators coils produce a rotating magnetic field. For the sake of the question, I I'm switchting to a rotating frame of reference, that rotates with the same frequency, by which also the rotor rotates. In this system, the only thing that is moving is the rotor (unless it's rotating with the same frequency. I assume that there is a "slip", so in the reference frame of the outer magnetic field, the rotor rotates to the right).
I'm aware that a rotor doesn't consist of only one loop, but of many, and that they are arranged in different angles. I still think that for the sake of the question, it's enough to draw one loop.
In the 2nd picture, the voltage induced in the loop BY THE OUTER ROTATING MAGNETIC FIELD ALONE is at max, because the change in magnetic flux reaches an extreme point when the magnetic field lines are perpendicular to plane of the loop.
The voltage drives the current in the loop. Because the loop is an inductor itself (it creates a magnetic field as well), the current is behind the voltage by 90 degrees.
That means the current is at max in reverse direction in the first picture.
However, In the situation of the first picture, there isn't any torque acting on the rotor, because the torque generated by Lorentz forces acting on the charges sums up to zero.
In the 2nd picture, current would generate the maximum possible torque. But here (since current is behind voltage by 90°) the current is  zero.
Question: Is it wrong to just look at the 2 cases that I described here? Or do we in general need to introduce resistors into the rotors circuit, to change the phase-shift between voltage and current?


texts:
I have some questions about the AND-gate which is made by two transistors in this picture below.

When input A or B or both are open (z) the output is '0' by default; is it right?
When input A and B are '1', two transistors drive '1' to output so it is conflict because '0' and '1' are driven to output. But according to the truth table, the output is 1 when A & B are '1'. This is ambiguous for me. Please explain about it.


texts:
I'm designing a circuit to drive two 12V dc motors.
I've got two low current switches connected to relays as can be seen in the schematic. These are for power isolation and local motor isolation.

Can you tell me if relays are an appropriate switching mechanism for these loads?

Considering the 24V relaym aware a typical 24V relay requires 200mA to drive. Is there something else I should be using with less current drain? (more battery life - I'm using two 12V lead acid batteries)


texts: Are we controlling the speed or torque when we press the accelerator pedal in an electric car?

texts:
In this video, at 16:23, the presenter says that when we press the accelerator pedal in an electric car, we are "commanding torque and not speed". I'm confused here, aren't we making the car go faster (more speed) when we press the pedal? So aren't we in fact commanding speed?
Moreover, at 4:27 the animation is depicted in a way showing that higher torque means faster rotation (thus more speed).
But, doesn't high torque not always equal high speed for a motor? (Because there exists high torque low speed motors, etc.)
Also, in situations where high torque does equal high speeds, then is there no need for speed control at all? Can we go faster or slower by just controlling the torque alone?
P.S. I apologize for asking 3 individual questions in a single post. They are all connected and hence I asked them together.


texts:
This is the circuit for reverse voltage protection, R2 is the load of a motor. The problem is that there is a test where the changing of polarity is very fast ( <5ms) and the MOS burns.
Power supply is 32V and Vds in MOS is up to 200V, also gate voltage is fixed to 15V by Zener for not reaching max Vgs voltage that is +-20V, so MOS should withstand.
Any idea of what is happening here? Thanks a lot.

Here is the oscilloscope trace, when blue (Vds) goes down is when it dies:

Legend:
Yellow trace: Vgs
Blue trace: Vds


texts: I need to come up with a swap immune connector for a project of mine, and I can't come up with a simple design. The connector is supposed to connect PCBs of the same kind, however, an upside-down swap in the four ports (ABCD -> DCBA) is possible due to the design. The ports are VCC (12V), GND, DATA (5V) and SELECT (0-5V I/O). Can anyone help suggest a solution?


texts: What can trigger this unwanted start signal?

texts:
I have a semi-automatic labelling machine that is malfunctioning in a strange way. Here's how the machine should work: https://www.youtube.com/watch?v=FmlPliTG2KY&feature=youtu.be&t=22
I.e.
Pull handle down manually  =>  microswitch closes circuit  =>  start signal to the motor  =>  1 label rolls on and the label roll stops where it should when a sensor detects the label end and sends a stop signal.
But what happens in addition to this is:
Handle lifted up  =>  microswitch opens the circuit  =>  another start signal to the motor  => 1 more label rolls onto the same bottle (and then the label roll stops where it should).
The big question is: What condition or component could cause this behaviour?
Everything except for this double start signal works as it should. I tried replacing the microswitch (vendor's only suggestion so far) and also to remove the microswitch and close the circuit by hand with the wires, and the result is the same. So it's not just a faulty switch.
The malfunction was not present when the machine was brand new, but started appearing after a short while. Sometimes, when the machine was just turned on, it would function mostly correctly for fifteen minutes (malfunction only 1 in 15 labels) but then 'degrade' to every time. And now it's every time.
Do you think it would solve the problem if I send the circuitry board back to the vendor and get it replaced?


texts:
Basically (Although I'm using an LM358 op amp):

Is what I'm trying to design, if I change the current source from the 48uA to 8uA the output on the simulation changes but the output does not in physical testing which leads me to believe that something on the op-amp is incorrect in terms of hookups or what not.

This is how I am currently hooking up the op-amp in terms of the pin diagram of the LM358:

What I did notice is that when I do not have the +V connection hooked up to 5V there is a small change whenever I vary the current but that seems to me that the current is entirely bypassing the op-amp entirely since when I short the inverting input and the output (Removing the 100K resistor) the difference is greater. When I do connect the +5V to +V then the volt meter jumps up to ~4V and just stays there, varying the current does not change anything so I'm completely stumped on why it seems to ignore the op amp without +V and only wants to take +V voltage and ignore everything else when it is connected.

When either the 5V bias from the non-inverting lead or the +V pin is set to ground the op amp seems to not function and any current I deliver just goes straight through the resistor to the volt meter, changing the current does change the voltage but it's just a V = IR relation and nothing to do with the op amp.

When the +V and the non-inverting lead have voltage bias then it decides to just hit some voltage value and stay there and no changing the current seems to do anything. So it seems like the 5V is just hitting the volt meter and drowning out anything else.

Any ideas on what I may be missing?

Edit:

So I've went ahead and provided 3.3V to the input and 5V to the rail so there is that 1.5V difference between them.

So I've done the following to test it:
1.
Changed the 100k resistor that connects the inverting input and output to 10k because I thought that it was providing a voltage that was too close to the 5V supply and that might be causing problems and didn't change.

2.
Removed the resistor entirely so there is nothing connecting the inverting input to the output and the same thing, nothing changed.

3.
Looked at my circuit again but I don't see any shorts or anything that could be allowing a bypass so I'm stumped.

Just so weird, if I don't have any voltage to the +V pin it bypasses the op amp entirely and I can measure the change in the current in the volt meter through resistances which makes sense because obviously the op amp isn't turned on.
But when I do provide the +V pin power and try to keep the inputs 1.5V away from the rail it just seems to only output 1 single voltage value and ignores the current source from the inverting pin.


texts: Variable resistor that can handle hundreds of watts?

texts:
We have some big resistor test loads, like 8 Ω 250 W loads for simulating speakers:

Are there also big variable load resistors for testing power supplies?  What are they called?

If not, what do people use instead?


texts: Angles Measurement to control (move) a robotic arm

texts:
I am working on a robotic arm, I am going to use servo motors, those are going to be controlled from the PC with command (it is a chess-game arm) so the command will be some thing like move piece from A1 to E7 for example.

How can I calculate the angle that I am going to pass to the servos for each specific command?


texts:
I have enabled a digital pin of microcontroller CC2650 as an output pin and as curious about the circuit i placed a push button with one end to this pin and other end to the +5V pin interestingly whenever i push the switch the microcontroller is booting up

So my question --- What happens if an input is applied to an output enabled pin of a microcontroller


texts: Is this polygon pour, how much current can it carry?

texts:
On my attached picture, I draw battery pins, (red square) component that want to current, (blue square, a component want to about 4-6 ampere) and way of current (black line).

I have a some questions. This picture is a example for my question.
I'm wondering this polygon pour(copper area) really can carry about 20 to 30 amperes?

Second question is, really do a component reach to wanted current from this polygon pour?

If I use a trace, of course I can known can trace carry to wanted current or cant. Because ı can calculate trace width and ı learned how much can carry current.


texts: In SR latch when apply a pulse to reset latch how the Q is changed?

texts:
Here is the initial state of SR latch both reset and set inputs are zero.

Here we apply a pulse to the reset input and it shows it changes in this way
first -

and then -

The thing that I don't understand how R pulse can change Q state without receiving feedback signal from second NOR gate, and second NOR gate must receive feedback  signal from first NOR gate  which one of them happens first?


texts:
Question: Is there an algorithmic way to produce a digital logic circuit for an n-bit majority function? (hopefully reasonably efficient as well).

Motivation: Half adders can be put together to make full adders, which in turn can easily be put together to make an n-bit adder. This is a nice hierarchical solution.

Another nice solution would be a sort of simple logic equation like the one from Wikipedia:

$$\operatorname{Majority} \left ( p_1,\dots,p_n \right ) =  \left \lfloor \frac{1}{2} +  \frac{\left(\sum_{i=1}^n  p_i\right) - 1/2}{n} \right \rfloor. $$,
except that this requires adding 1/2 which is not allowed in Boolean logic.

Attempts:
For 3 and 4 bit adders, I can come up with a logic circuit from the truth table. Now, you could do this for n bits, but that is not a nice algorithmic solution


texts: What will happen when two capacitors C1 and C2 are added in series instantly by a switching mechanism, How the charge sharing will take place?

texts: Suppose there are two capacitors ( of capacitance suppose C1 and C2 ) .There is a switch S1 between them which is open for lone time .Initially the capacitor C1 is charged to a voltage V1 volt .Now at time t=0 , the switch is closed instantly .What will be ultimate resultant voltage of the two capacitors after closing the switch ?


texts: How do I import a spice model into LT spice?

texts:
I decided to create a question of how to import models into LT spice since there were questions that are related but no definitive guide on how to import 3rd party models on this site. There are many ways to do this, post your favorite method

How do I import a 3rd party spice model into LT spice?


texts: I like to know the details of how capacitors work?

texts:
After all these years I am back to the start position of how capacitors work.  I don't know to laugh or to cry.
Okay even before that. When I hook up two wires, one on each terminal of a 12V DC battery and I measure the voltage difference at the end of the wires, it reads 12V.  That goes without saying.
Now we learned, at least I seem to have that no current of charges moves at all in an open circuit.  So what moved from the battery to the end of the wires?
If I place an ammeter in any of the two wires also before I test the voltage at the end of the two wires, I must not read any current in the ammeter but I assume I would read volts in the voltmeter.
Since I certainly read volts, it must imply that energy ( I had to throw in that word) moves without any charge movement, unless charges actually do move in an open circuit.
Capacitors by actual design is an open circuit no matter how close are the plates.  To my understanding, that is the whole idea, not to allow charges to move through.
So you can see what my mind is looking at here.
And capacitors are not like a battery where the plates are connected by the fluid/electrolyte in some respect.
( I realize also that Antennas are basically open circuits....)
Furthermore current of charges is at a maximum in a capacitor and it is described as a short circuit assuming no resistors are there.
Can anyone explain this without using formulas?
Thanks in advance.


texts: Will a star-shaped Vdd net reduce ground oscillations?

texts:
One of EE.SEs famous answers advocates to use local ground-planes or -nets on ICs that generate broadband noise on power rails (like microcontrollers) in order to reduce excitation of planes as patch antennas and to improve EMI properties. I know there is some controversy about splitting planes, but I would like to ask about a special aspect:

Is using a star layout in the supply-layer (Vdd-star with a ground pour around it) and leaving the adjacent ground-plane unbroken also effective in reducing excitation of ground? Will the placement of such a star point (on center or near border of plane) make a difference?

The thinking behind this: high frequency return currents will be confined to the area below the star and partially cancel each other. Each branch of the star (to be precise: its return current on GND) will excite the plane in a different mode, depending on length and orientation of the branch. I prefer this approach, because this way, signal traces (which have their own return currents) do not have to cross plane boundaries.

I know I can get quantitative answers on such questions for specific cases from FEM analysis, but, not having access to such a tool, I am more after a general rule of thumb.

(Because I reference another post by Olin Lathrop, it may become confusing what "original post" means. Please make clear what you are referring to).


texts: Simulate isolation transformer in LTspice

texts:
Hi,

I am new to simulating transformers with LTspice, and I struggle getting the circuit to function as expected.

The source is a three phase TN-S (wye) connected. Then I wanted to add a 1:1 isolation transformer (wye/wye), but I cant get the output voltage to match 1:1 with the input voltage.

Played around with a lot of different values, but not getting any closer, so I dont know what I am missing...

Ignore "Rpe", the source was used in a previous model to simulate leakage current, and was used as a measuring point.

Help and pointers would be greatly appreciated.


texts:
I got a x86-based firewall, produced by Stonesoft. It has serial interface, but it would be easier to install new operating system if I would get VGA output from the device. I discovered promising looking header on the PCB, labeled "J11 VGA".

It's 10-pin header. I discovered the ground and 5V-lines with multimeter and measured resistance from the other pins against the ground pin. Then I took an oscilloscope and measured every pin. Now I need your help to reverse-engineer these measurements into pin-out of VGA-cable. Any advice is very welcome. If any additional measurement is needed, please write a comment to this question.

Attached image show the results. I marked the pin number on upper left corner. The voltages marked there are peak to peak. I was able to find one pin with video-like signal (pin 9, ~120mV peak to peak). Pin 10 looks like sync, but I'm not sure, and I have no idea what the pin 8 is for..


texts: Why some photodetectors have large areas?

texts:
Why some photodetectors (specifically Si pin PDs) have large areas? and how this large area affects on the figure of merits of a photodetector?
Excuse me if the question is and general.

I could not find good (answer and) references for my question. Thank you.


texts: different resistors connected parallel, finding the maximum power dissipation for specified values of resistances and wattages

texts:
what will be the resultant wattage when 4 resistors having individual resistances and wattage given as (2.4ohm,1W) , (5.1ohm,2W) , (10ohm,5W) , (22ohm,10W) connected in parallel across an DC voltage source? which resistor would dissipate more power in the resultant circuit?
please help me on this question. i had spent lot of time trying to understand it in detail.


texts:
For a school project, I have to design and perform an experiment of my choice. I have chosen to test the efficiency of variable resistors and PWM circuits by testing the amount of energy wasted (heat produced) in applications such as light brightness or motor speed control. The basis of my experiment is inspired by results seen in GreatScott's video on this subject.

I was wondering if there are any other important variables I should include in this experiment that are not mentioned in the video. So far I'm thinking that I should cover: different applications of each method; different power levels being used and; availability (cost) of each method, depending on the power levels used.

I would appreciate anything pointed out to me which I may have missed out or certain aspects of the experiment I should focus on.

Thanks!


texts: STM32F3 CAN Hardware not Entering Init Mode

texts:
I'm trying to write a bare metal driver for the STM32F302 on a Nucleo-64 board. I'm having trouble getting past the very first steps and getting the hardware to set the Initialization Acknowledgment. This driver is being written to run side by side with the mbed OS framework if that detail is important, I had issues whereby the firmware would go to an error state if I called the CAN constructor they provide (admittedly the board isn't technically supported under mbed OS 5, but I've been told by an engineer with ST that this is due to the amount of static RAM).

Here's the snippets of code that are relevant:

void can_initialize(unsigned int frequency)
{
    // Setup the CAN registers
    RCC->APB1ENR &= ~RCC_APB1ENR_USBEN;
    RCC->APB1ENR |= RCC_APB1ENR_CANEN;

    MY_CAN_PORT->MCR |= CAN_MCR_RESET;

    // Set to init mode
    can_setMode(CAN_MODE::INIT);

    // Enable transmit and receive
    MY_CAN_PORT->MSR |= (CAN_MSR_RXM | CAN_MSR_TXM);

    // Set the frequency
    can_setFrequency(frequency);
}

void can_setMode(CAN_MODE new_mode)
{
    switch (new_mode)
    {
        case CAN_MODE::SLEEP:
            MY_CAN_PORT->MCR |= CAN_MCR_SLEEP;
            // Wait for acknowledgement from hardware
            // SLAK = 1, INAK = 0
            while (~(MY_CAN_PORT->MSR & CAN_MSR_SLAK)
                   || (MY_CAN_PORT->MSR & CAN_MSR_INAK));
            break;
        case CAN_MODE::INIT:
            MY_CAN_PORT->MCR |= CAN_MCR_INRQ;
            if (my_mode == CAN_MODE::SLEEP)
            {
                MY_CAN_PORT->MCR &= ~CAN_MCR_SLEEP;
            }
            // Wait for the acknowledgement from hardware
            // INAK = 1 indicates initialization mode
            while (~(MY_CAN_PORT->MSR & CAN_MSR_INAK));
            break;
        case CAN_MODE::NORMAL:
            // first make sure we aren't in loopback mode
            if (MY_CAN_PORT->BTR & CAN_BTR_LBKM)
            {
                // go to init so we can modify loopback mode
                can_setMode(CAN_MODE::INIT);
                // clear loopback mode
                MY_CAN_PORT->BTR &= ~CAN_BTR_LBKM;
                can_setMode(CAN_MODE::NORMAL);
            }
            MY_CAN_PORT->MCR &= ~(CAN_MCR_INRQ);
            // Wait for acknowledgement from hardware
            // SLAK = 0, INAK = 0
            while ((MY_CAN_PORT->MSR & CAN_MSR_SLAK)
                    || (MY_CAN_PORT->MSR & CAN_MSR_INAK));
            break;
        case CAN_MODE::LOOPBACK:
            // go to init so we can modify loopback mode
            can_setMode(CAN_MODE::INIT);
            // set loopback mode
            MY_CAN_PORT->BTR |= CAN_BTR_LBKM;
            can_setMode(CAN_MODE::NORMAL);
            break;
    }

    my_mode = new_mode;
}

I'm planning to use the device in Loopback mode for testing so I currently have nothing externally connected. Do I need a two node CAN bus just to put the peripheral in Init mode?

I noted that there's an extremely similar post and I've tried some of the proposed solutions here: CAN Initialization Timeout Error in STM32F4

Things I've Tried in HW:

I've attempted to connect TX and RX directly, though since it isn't sending anything (I think) that shouldn't be required.
I've also attempted to tie CANRX to 3V3 in order to emulate the bus being in a recessive state for the 11 bits, but this didn't solve the issue either.
Tried on a second identical board.

Short of connecting up a second node I'm not sure what to do from here. If there's any tricks to these boards I'm not thinking of or if there are more details required to diagnose the problem let me know!


texts:
I am doing some assembly on a PCB which has a variety of SMD components.  I accidentally got a little crazy with some paste on a large GND pad for an ESP32 component.  I went to place the component on top and melt the solder, it appears to have oozed out of 2 of the vias located near the GND pad.  I've checked with my multimeter and it appears the vias did not get shorted to ground, is that possible?

Am I safe to continue the assembly without desoldering the large SMD component (which I've failed to do so far) and removing the solder from the vias?


texts: How to proceed to draw the circuit diagram of an unknown circuit?

texts:
I have some old devices like SMPS power supplies, and I would like to analyze their workings by first drawing a circuit diagram of them.

I'm looking for some tips/techniques for doing this. Should I first draw all components of the circuit, then find out which ones are directly connected to each other by using continuity setting on my multimeter, and then try to figure out the values of individual components? Is there a good general guide/procedure for this?

Assume that the diagram of the circuit is not available online or anywhere else, I want to be able to build it on my own. Also, I'm looking for techniques for doing this in general, without having assumptions of the workings of the circuit beforehand. I'm mentioning SMPS as just an example.


texts: Can 2 9v batteries heat an electric range heating element

texts:
For an experiment I am trying to power the heating element in the link attached.

http://www.appliancepartspros.com/frigidaire-range-surface-element-316442300-ap4356466.html

My goal is to power it with the most lightweight battery possible. If this isn't possible, are there lower voltage heating elements that 9v batteries in series can heat up?


texts:
I'm aiming to find a transistor that will be used to switch a relay, and can handle the following specifications. I think I've found one and would appreciate having the calculations checked and checking if I have missed anything important:

A device is an Arduino and is connected to base of transistor.

Device voltage: 5V
Device source current: <= 5mA

The collector pin of the transistor is connected to a relay.

Collector voltage (Vce): = 5V
Collector current (Ic): = 90mA
Transistor power dissipation: >= ( 5 * 90 ) >= 450mW

DC current gain F.O.S. = 5
DC current gain >= ( Collector current / Device source current ) * DC current gain F.O.S.
DC current gain >= ( 90 / 5 ) * 5
DC current gain >= 90

I've found the BC337 transistor by ON Semiconductors and using this datasheet.

Collector - Emitter Voltage (Vceo) is 45 Vdc, which covers the 5V required.

Collector current - continuous (Ic) is 800 mA, which is well above the 90mA the circuit requires.

Total Device Dissipation @ Ta = 25c (Pd) is 625 mW, which is above the 450mW required.

DC current gain is given for Ic = 100mA and Vce = 1V, which the Ic is quite close to the collector current (90mA), so this should be okay. The Vce given is 1V, although the circuit runs at 5V, but from all that is understood, the Vce is a bit on the meaningless side once the transistor is saturated.

The resistor is needed to restrict the transistor sourcing too much current from the device, which is limited to 5mA.

Base − Emitter on voltage (Vbe(on)) for the transistor has a maximum of 1.2V, which will be used for a worst case scenario. So, the resistor connected between the device and the base pin should drop:

Resistor voltage drop = Device voltage - Base − Emitter on voltage
Resistor voltage drop = 5 - 1.2
Resistor voltage drop = 3.8

This means the resistor must have a resistance value of:

Resistance = Voltage / Current
Resistance value = Resistor voltage drop / Device source current (A)
Resistance value = 3.8 / 0.005
Resistance value = 3.8 / 0.005
Resistance value = 760 Ohms

Is this all correct, or have I made some fantastic error or overlooked a large problem?
Vbe(on) is quoted for Ic=300mA and Vce=1V. I think I understand that Vce isn't too much of a problem once the transistor is saturated, but the collector current is 300mA, while I'm passing only 90mA - is this something to be concerned about, and why should or shouldn't I be concerned over this?


texts: Motorcycle LiFePO 4 / Super capacitor 24v hybrid possibilities?

texts:
First please let me apologise, I’m quite frankly a complete newbie to electronics and come from a strictly design background. However, I'm really interested in learning and understanding electronics and especially incorporating new tech in ways that haven’t been done before. (Well I can try!!)

One of my motorcycles, an extensively modified Suzuki hyabusa requires a 24v feed to the starter due to the high compression of the engine and at the moment the bike has 2 heavy lead acid batteries powering it. One under the seat and one sitting on top of the engine. Not only are these heavy but they are inconvenient as the second batt is wired in after the starter relay and discharges after about 6 starts, requiring me to lift the tank and connect a charger after every ride. This has always bugged me.

Now I have an idea...

A DIY LiFePO battery which would work in a traditional way controlling the standard 12v feeds for the bike and some form of ultra-capacitor wired in series that would deliver a short powerful 12v boost that would be connected in series to the starter. Almost as if there was 2 separate batteries in one battery box. I’d like to keep the whole package as small and lightweight as possible yet deliver enough punch to start even on the warmest of days

Are ultra-capacitors the right way, or should I scrap that idea and use another bank of LiFePO to give me the boost?

I’d also like to include a form of charging circuit into the package along with the correct balance chargers and protection circuits to stop overcharging etc.

Any help or even a nudge in the right direction would be amazing, I understand I will know a lot less than 99% of people on here.. But please don’t shoot me down.

Thank you in advance!


texts: Designing a RAM, using 4x2 chips, with a 8 address capacity

texts:
This is a typical exam question, and I've seen some very helpful posts about, but I still have a lot of doubts.

Given an integrated circuit of certain dimensions, for this example a 4x2, I have to design a RAM memory with x addresses and y bits each. Here is an example of the circuit I have to use:

A0, A1 – address lines
D0, D1 – data lines
R/W – read/write line
CS – Chip Selection line

With IC1’s I’ll have to make a RAM memory with 8 addresses, 8 bits each, indicating the memory’s CS (Chip Selection) line.

So far what I can figure out from this is that IC1 has 4 cells, or addresses, and each one can hold 2 bits. So if I need 8 addresses that would mean I need to have 2 IC1's, but then they wouldn't hold enough bits, meaning that I need two more (using only the data pins)?

I'm very confused on how to make these designs, as I never had the chance to build any in a lab scenario. I hope someone can give me some hints or show me how these chips could be connect to make the desired memory. I'm not looking just for the answer to the example because I'll have to build other RAM's with different chips.

This is what I've come up with:


texts: Microcontroller driving a 12 VAC relay - with as few components as possible

texts:
I want my ESP8266 to drive eight relays with 12 VAC coils for my home automation system.
This is not a duplicate of this question because there's an additional catch - I have strict space constraints and I want to use as few additional components as possible. Also the G3VM-61A1 MOSFET SSR comes in a nice, small DIP-4 package.
The specs of the relay (a Finder 28.02.8.012) say that the coil takes 12 VAC and 370 mA; a single GPIO of the ESP8266 can source up to 12 mA at 3.3 V.
The Finder is a step relay, so the ESP8266 will only need a 0.1s pulse to make it toggle - the software will take care that no two GPIOs will be on at the same time.
I'm quite at ease with digital logic, but anything above 5V or involving AC always make me think that I'm overlooking something. I know I don't need a flyback diode, but maybe a snubber...?
Also the maximum load voltage for the G3VM-61A1 is 60 V AC peak, would that be enough?
Will my circuit work at all?

simulate this circuit – Schematic created using CircuitLab


texts:
For the past year or so I have been using a mains to 5VDC adaptor to charge various devices. Everything is working perfectly fine but this charger I think, has a noticable leak to the low voltage side because as i was touching a grounded metal plate with one hand and holding my mobile (which was being charged using this adaptor at the time) i felt a tingle on my hand.
Then i tried grabbing the lead connected to my mobile and touching it on the metal surface and i could see arcs. I compared that to my original Apple adaptor by doing the same thing, but there where no (visible) arcs.

I opened the non-original adaptor and I think it looks very well designed as it has a good seperation between HV and LV sides, a capacitor rated at 1KV with value 203 (0.02nf I think) between them, and also good isolation of components.

So i wanted to ask, what could I do to stop this leakage or at least minimise it?

Thank you!


texts: Dealing with JFET parameter spread in voltage controlled resistor configuration

texts: So I need to make a voltage controlled resistor to control a Q factor in RLC resonator, I'm using a P-channel JFET for this and I can't choose a JFET because datasheets show huge IDSS and VGS spread. Are there any ways to deal with this spread and make IDSS and VGS more controlled and determined? I need <5% resistance precision.


texts: What would it take to add Bluetooth capability to a digital (musical) keyboard?

texts:
I am completely new to electrical engineering. I have a software background and have an interest in tinkering with hardware.

I'm wondering what knowledge/engineering skill/equipment is required to add Bluetooth capability to an existing keyboard. The keyboard I own is a Roland EP-9.

I know there is something to do with analog-to-digital conversions. But in terms of what data is being sent to the internal speakers, I have zero understanding how that works. The issue is "I don't know what I don't know", so I'm probably communicating this incorrectly.

I don't expect a full solution, but any links to helpful documentation is greatly appreciated!

Edit: For clarification, I just want the audio output sent to a BT speaker or headphones. Currently it is sent to an internal speaker.


texts: Adding additional protections to a PSU (Meanwell IRM-01-5)

texts:
Since I am new here, first I would like to apologize if I did draw this schematic wrong (i.e. lines do cross, etc.). It is a few days that I am using this online editor, so I am still in the learning process and need to gain a bit more experience.

I created followed circuit:555 timer in astable mode that will power up 8 LEDs (blink 4 by 4). When output of timer goes high, first 4 LEDs will be on (it stays on about 0,69 × (1k + 470k) × 2,2 µF), and when output of timer goes low, remaining LEDs will be on (0,69 × 470k × 2,2 &micr0;F).

At the same time I hook up LED light bulb (10 W) via 5V relay with 230 V mains. Idea is that this LED bulb will light up every time when switch is pressed, and turned off with another switch press.

Current in a circuit is approx. 110 mA

As you can see, I am powering my circuit with PSU: MEAN WELL IRM-01-5.
In its datasheet, I can see that it has over voltage protection (OVP), overload protection (OLP), short circuit protection(SCP), but I didn´t find anything about OTP (over temperature protection).

I am assuming that these kind of protections protect only the 5V side, but what is with 230V side?

Since I am planing to put my regulator, PCB with all components, and relay inside a box and it would be human operated, I need it to be safe as much as possible.

So my question are as follows:

How and is there any need to protect PSU from 230 V mains? Fuse, crowbar, …?
Is it smart to protect it with some OTP (overtemperature) device like thermistor or similar?

I am very grateful for any advice and help.


texts: how to increase output current (5V Output, 1.5V input Switch Boost Converter)

texts:
I designed a small boost converter with discrete  transistors, and now I need to increase the output current. The output is 30ma/5V but I need more than 70ma.
How can I improve the circuit?
R5 is load.


texts: Would an ATX PSUs internal fan work as the dummy load for a benchtop power supply conversion?

texts:
The PSU has 2 12V rails listed in its specs on the side, however both show continuity between them when I tested it with my multimeter. I then tested continuity between the positive from the fan and 12V1 and it also showed continuity. The fan is rated at 0.7A. This is a higher load than the 22 Ohm 10W resistor I was originally going to use (0.55A). Should this provide enough of a load? Would it be necessary to put a load on one rail or the other if they are both connected internally anyway?

When I started it up with no other load connected, the grey wire came to +5V which I believe means power is OK. Is this a good sign that it likely doesn't need an extra load?

Finally, should I also put a dummy load on the +5V rail?

Extra Info:

I was able to dig up these specs, although they aren't from the manufacturer so it's hard to tell how accurate they are. They do suggest that extra load might be required though.

Min Load:

+3.3 - 0.3 A
+5V - 0.5 A
+12V1 - 1A
+12V2 - 1A

Although given that both 12V rails seem to be connected I'm not sure if that means 1A each or just 1A for both.


texts: How to wire unusual R13-112 rocker switch

texts: Can someone assist me in wiring this switch so the indicator and load can "light up" from 12V battery. By using terminals 1 & 2 I can power on the unit but I have no indicator light. Thanks


texts: Can a phase margin become bigger than 180° and is this bad?

texts:
I have a wrong mental model about phase margin in control theory.

I see that a phase of -180° is bad. If my input is a sine wave and I have negative feedback, which has a -180° phase shift, the feedback will become positive --> oscillation.

But why is positive phase margin good? Would a phase shift of +180° degree not be equally bad? I assume the best would be it is 0 every where. But I don't see why +45° is better then -45°.

When I am thinking about this I always try to imagine a sinusoidal signal, since one can not know how the input signal will actually look like. This is the reason I am treating positive and negative phase margins equally.

EDIT:

I just found one big mistake I have made. @Chu also pointed this out. The phase margin is 180° minus the phase at unity gain. Therefor all negativ phase margins mean an actual phase of smaller then -180°

This means my questions is almost obsolete. The actual questions should be now: Is a positive phase margin bigger than 180° bad and possible to achieve?


texts: Bucketing FFT into one-third octave bands

texts:
I'm trying to understand how to take the results of an FFT calculation and bin them to one-third octave bands. As my questions aren't about the code but about fundamentally understanding the arguments to and results from FFT, I assume this question fits better in electronics than in stackoverflow.
I start by calculating the center point and lower/upper range of each one-third octave band in Python:
freqs = [10**(0.1 * i) for i in range(12, 43)] # center frequency for 31 bands
fd = 10 ** 0.05 # 1.12201845
freqs_l = [freq / fd for freq in freqs] # lower
freqs_u = [freq * fd for freq in freqs] # upper

The minimum (freqs_l[0] == 14.125375446227551) and maximum (freqs_u[-1] == 17782.794100389234) values here give me the overall range of signals I'm interested in. Then I read in samples from my 16-bit, 48kHz WAV file using hound and run rustfft's forward-FFT on one second (48000 samples) of data:
const SAMPLE_RATE : usize = 48_000;
const NUM_BANDS : usize = 31; // this is the len(freqs) of the Python freqs above

let mut planner = FFTplanner::new(false);
let fft = planner.plan_fft(SAMPLE_RATE);

let reader = hound::WavReader::open(filename).unwrap();

let mut signal = reader
    .samples::<i16>()
    .take(SAMPLE_RATE) // just take one second of data for now
    .map(|samp| num::complex::Complex::new(samp.unwrap() as f32, 0f32))
    .collect::<Vec<_>>();

assert_eq!(signal.len(), SAMPLE_RATE);

// Convert time-domain signal to frequency-domain spectrum
let mut spectrum = signal.clone();
self.fft.process(&mut signal[..], &mut spectrum);

My main question here is around the frequency granuarlity of spectrum and how I can bucket these values into one-third octave bands. Both signal and spectrum are of size 48000, but does this cover the full Nyquist frequency range (0 - 24000 Hz), making each value 0.5Hz in width? For each input, I set an imaginary value of 0 (because all examples I've seen do this), but I have no idea if this affects the output in any important way.
Trying to find info on this, I read this SO question on finding the average FFT value of each frequency band and saw some code that pointed to numpy.fft.fftfreq that generates FFT frequencies for the sample length and sample spacing. From the former, It looks like I would calculate:
.
If I plug this into NumPy, numpy.fft.fftfreq(n=48000, d=0.14129655308810293), I get 48000 values, the first half non-negative (because it's symmetrical); the max value here is 3.538; I was expecting it would be closer to the Nyquist frequency.
I'm sure I'm way off here. How should I understand and adjust the FFT output frequencies?


texts:
Working on an existing product which has had field failures. Design is a short (60ms) pulse is sent via microcontroller to activate / deactivate a latching switch. I have determined failure is due to the fact that (coupled with external variables) there is no repulse upon sending of short pulse. Therefore if latching switch happens to not activate upon short pulse, product is dead in the water until power is cycled.

I have a design workaround via software to generate a pulse / repulse strategy. Basically stating I want to repulse every so often, just in case latch switch did not respond (I have no other way of sensing other the external variables as design is existing).

I have cleared this with the latch manufacture to state it is not detrimental to repulse the switches. I am now questioning what the down side of this pulse / repulse might be on the 4700uF capacitor (see schematic).

Bench testing shows 4700uf cap once fully charged is 28VDC and upon pulse, drops to 14VDC, then recharges to ~28VDC in ~15 seconds.

Cap using is NRLM472M35V25X25F which is 35V rating which I am also questioning. I would have used a 50V rating but there is some timing involved so possibly they had to use the 35V. I'm looking into that right now.

My investigation of the cap spec sheet has lead me to estimate 3.36 years for this cap if @ 35V and 113°F(installed outdoors) environment (doubling life expectancy every 10°C reduction from 85°C). I am looking to better understand the negative implications (if any) of the additional pulses are to the capacitor.

Anyone have any input to offer??


texts: Can this old portable CRT TV connect to a RPi?

texts:
I'm a scrapper and hacker of vintage electronics. I found this wacky old portable TV with a small B&W screen and I really love the look of it. I want to feed it video (or something) from a Raspberry Pi. However, it does not have any kind of video input. It doesn't have RCA Composite in, or HDMI in. I'm including a couple photos of the electronics to give you an idea what I'm working with.

Ideally, I would like to input video. Alternatively, I would be happy displaying something like PONG or any kind of vector line display.

Any ideas?


texts: Norton  Thévenin equivalents with complex impedances

texts:
Given a Thévenin equivalent circuit, it's pretty easy to convert to the Norton equivalent, or vice versa:

simulate this circuit – Schematic created using CircuitLab

Although the value of the voltage or current source changes, the resistance R is the same either way.

But what if this is an AC circuit, and R is not a resistance, but a complex impedance? Is some additional calculation required or does the impedance remain unchanged?

simulate this circuit

In other words, what's the relationship between Zt and Zn, and V and I?


texts: I need to control 4 solenoid valves concurrently. I have 1-120vac and 3-24vac in my toolbox.  Incoming signal from thermostat is 120vac.  Is it permissable to tap the signal to to the 120v solenoid through a 120/24 x-former to activate the other three 24v solenoids or would there be a problem with the fields in the transformer and solenoids expanding/collapsing together when switching occurs?


texts:
I am trying to control a 6v DC motor using Arduino, by feeding a PWM signal to the base of an NPN transistor hooked up to the motor circuit as shown in the schematic below.

simulate this circuit – Schematic created using CircuitLab
Individually, both circuits work fine; if I remove the transistor the motor spins and if I try to control the brightness of an LED using the output of D5 that also works, but when I introduce the transistor, it fails. I've tried both with the motor + transistor and an LED + transistor, but same problem: nothing happens.
My assumption is that it has to do with my choice of transistor - that a 2N4401 is just not the right kind for this - but if that's the case, I don't really understand why this one doesn't work, or what to look for in one that would work.
(I would also be willing to accept that I have completely misunderstood how transistors work and that there is something else wrong.)


texts: Magnetization Inductance vs. Transformer Inductance

texts: what is the difference between transformer inductance and magnetization inductance, as I know transformer inductance is calculated with magnetization current but I've never seen magnetization inductance calculation.


texts: Non ideal op-amp equivalent circuit output voltage

texts:
I am creating this question to ask you about a "strange" behavior I am observing in Matlab about an op-amp circuit. I am reading "Fundamentals of Electric Circuits" the 5th edition, and in the chapter about op-amps I was trying to solve the practice problem 5.1

I have tried to solve it analytically (by hand) and I couldn't get the results the authors give as solutions. Here are my two different attempts, the first one spanning 4 pages is a branch current method and the last (5th) image is the mesh current method: http://imgur.com/a/PHrTW#0.

To further confirm the results obtained I have modeled the circuit in Matlab in two different ways:

1) with a finite gain op-amp element:
!Can't post the link to this image...

2) with a controlled voltage source and input/output resistances equivalent circuit:
!Can't post the link to this image...

The first model backs my results. The second model backs the authors results.

I know that the different results (8.99959 vs 9.0004) differ by less than 0.1% and that it probably wouldn't even be worth creating this question, but hey, this is not homework nor am I an Electrical Engineering student, I am just curious about why this is happening.

Well assuming I actually modeled an equivalent circuit, why is Matlab giving me two different results for the output voltage?

How come is my analytical result different from the authors? Did I make any error in my calculations?


texts:
Part of my circuit needs -12v. What would be the simplest way to get this, considering I have a +12v supply already available in the circuit? I need ~500ma

I searched for -12v regulators on Mouser, but many of these needed a negative voltage input.

Ideally looking for an IC that can handle this.


texts: Factors that limit maximum power transfer through transmission lines?

texts:
I have read that the maximum power transfer is limited by (1) Thermal Limit, (2) Voltage Regulation and (3) Transmission angle (Stability).

Thermal limit is self-explanatory. Is voltage regulation the voltage drop across the line and transmission angle reactive power losses (if uncompensated)?
And what do they mean by Stability in terms of transmission angle?


texts: Voltage to segments on 7 segment display?

texts:
I am thinking of purchasing an LTS4680 seven segment display for one of my projects.Here is the datasheetdatasheet:http://www.icpdf.com/icpdf_datasheet_7_datasheet/LTS4680AE_pdf_1732299/LTS4680AE_datasheet.html

I understand that it is a common cathode 7 seg display, so ground should be connected to the common cathode pin.What pin is it?I'm not sure but i think it's pin 6 according to the diagram in the datasheet.Also what value of resistors do I need to connect to the anode(+) of each segment.My power supply is 5v at 0.6A(600mA).


texts: Design Decisions for using ADC with no VREF

texts:
I was looking at Freescale's KE02 processor family, and the MCU designers made an interesting design decision revolving around the ADC that I can't completely wrap my head around.

The KE02 has an internal bandgap reference, but it cannot be used as the reference for the ADC.  Instead, the ADC reference is set to VREFH/VREFL, and the bandgap reference is tied to an ADC channel.  From the datasheet:

As for adding an external VREF, the data sheet states that VREFH/VREFL is tied to AVDD/AGND in certain packages.  From what I've seem, with the exception of the highest pin count package, all other KE02s have VREFH/VREFL tied to AVDD/AGND.

  24.2.3 Voltage Reference High (VREFH)
  VREFH is the high reference voltage for the converter. In some packages, VREFH is
  connected internally to VDDA. If externally available, VREFH may be connected to the
  same potential as VDDA or may be driven by an external source between the minimum
  VDDA specified in the data sheet and the VDDA potential (VREFH must never exceed
  VDDA).

If the AVDD/AGND rail is accurate and stable, using AVDD/AGND as the ADC reference isn't an issue.  However, if AVDD/AGND is tied to a noisy rail (think EMI, SMPS, etc.), an inaccurate one (e.g. rail regulated to +/- 4%), or to a non-regulated rail (think direct connection to a battery), the ADC readings become unreliable.

In such situation, the solution would be to explicitly capture the analog value of the Internal Bandgap and apply some non-linear scaling in function of the acquired value.  This is a lot of extra work, especially since this would be a non-issue if the Internal Bandgap or an external bandgap were made available to the ADC's reference voltage.

So why would Freescale design the ADC this way?  There's already an internal bandgap reference on the die: would it be so hard to provide it as a possible source for the ADC reference?  Are there cost/yield benefits of not tying the internal bandgap reference to the ADC reference?

Or am I missing a really simple trick to calibrate the ADC readings in function of the measured bandgap voltage which would make this ADC HW implementation a non-issue?


texts: Cheap RFID tracking to log entry and exit?

texts:
I am performing an experiment where I want to track entry and exit of insect from a small opening over time. My goal is that each insect will have a tag and each pass through will ping the reader to log when the insect has entered or exited the location. This is outdoors and I will need ~5-6 of these.

Is there a cheap setup I can better understand to achieve the above task?


texts:
I've just come across some macros for my microcontroller compiler to force (or suggest) a function be executed from RAM.

https://siliconlabs.github.io/Gecko_SDK_Doc/efr32mg1/html/group__RAMFUNC.html#gac6abbc7f869eec9fb47e57427587c556

http://processors.wiki.ti.com/index.php/Placing_functions_in_RAM

https://www.iar.com/support/tech-notes/linker/controlling-placement-of-the-section-where-__ramfunc-functions-reside-ewarm-5.x--6.x/

https://community.nxp.com/thread/389099

In what cases is this valuable?  Why wouldn't I just always execute from RAM if the benefit is only increased speed?  Does this generally cause higher current draw?


texts: Using a miniature BNC connector on a PCB to measure high-frequency content with an oscilloscope

texts:
I am a power electronics engineer in R&D and often measure fast switching waveforms, specifically high bandwidth MOSFET gate signals. When connecting oscilloscope probes in the past I have found that the ground clip often induces unwanted HF content due to the inductance of the loop and the very high dI/dt and dV/dt in the area (switching 800 A at 900 V).
To mitigate this I was always taught to create little ground hoops with a wire and slot my probes in. However, due to smaller and smaller designs, the access is becoming increasingly difficult.
I was considering incorporating some of those miniature 2 mm RF connectors (U.FL) on the next PCB design and running very small diameter coax cable out of the device to monitor accurate waveforms on an oscilloscope. However, I am not experienced with RF and cable transmission specifics and was wondering how the connector impedance might affect/load my real signal or the measured signal on the oscilloscope.
Could anyone shed some light on this idea?


texts:
This is, probably, a very silly question, but I was thinking:

If you have a watt meter and you connect a step up transformer with the lower voltage side attached attached to it (both the voltage and current wiring,) and you connect your load on the higher voltage side of the transformer, will you measure a lower value?

I think you would, unless you connect the potential measuring to the high voltage side of the transformer (in parallel to the load.)

If this is so, what would happen if you connected a step down transformer to the higher voltage side of the step up transformer?

Assuming the step down has a turn ratio that exactly reverts the initial transformation, if you connect the load to low voltage side of the step down tranaformer and keep the watt meter on the initial position, what would you measure? Would you measure the correct value, or would it still be wrong? (No this is not a homework question not yet, anyways.)

Sorry if this sounds odd or just confusing, but I had this thought on the way home today, and couldn't figure out if I analysed it correctly or wrong. I think you would still get a wrong reading. Am I wrong in thinking so?


texts: Driving large common anode 7 seg LED with NPN transistor and arduino, worked but is it the right way?

texts:
I'm newbie, the circuit designed myself for driving large LED worked but I'm not sure is there better ways? I have only NPN transistors and common anode 7 segment display.

Thank you.


texts: Can I use an open-drain NXP 74LVC07A output as level translator for an 8V CMOS input?

texts:
I'm designing circuitry that uses an NXP 74HC4051 analog mux with a +8V supply. An MCU with 3.3V GPIOs needs to control the mux S0-S2 selection inputs. I am wondering whether an NXP 74LVC07A, powered by the +3.3V supply and having open-drain outputs, can be safely used as the level translator. Following are my proposed schematic, and excerpts from the NXP 'HC4051 data sheet and the 'LVC07A data sheet.

From the NXP 74LVC07A data sheet:

From the NXP 74HC4051 data sheet:

I'm concerned about the open-drain LVC07A outputs being pulled high to 8V through pull-up resistors. The LVC07A data sheet shows the Vo(max) limit is +6.5V. The footnote says "The output voltage ratings may be exceeded if the output current ratings are observed."

When the output is turned on, I expect the voltage to be close to 0, and current to be about 800 uA (8V through 10K resistor).  When the output is turned off, the voltage will presumably be close to 8V, but very little current will be flowing.

At first glance, the current should always be well below the 50mA max output current spec, so I would expect this configuration to be fine.

But on closer inspection of the language in the data sheet, the output current is only specified for the condition when Vo = 0 to Vcc. So technically, there is no output current rating for the case where Vo > Vcc.

I sent this question to NXP tech support 3 days ago, and haven't heard from them yet. Maybe someone on this forum can give me a definitive answer so I can proceed with the design.


texts: How can I estimate the speed of this code section for this microcontroller?

texts:
I'm using an ATmega328P to read the state of a digital input by using the following code section written in C (there can be alternative ways, but this is an example). val is a uint8_t variable type, and it stores the state of the digital input pin:

Here is the part of the code:

if ((PIND & (1 << PIND6)) == (1 << PIND6)) {
    val = 1;
} else {
    val = 0;
}

I set the clock as:

#define F_CPU   16000000UL

Imagine the digital input is an ON/OFF pulse train with 50% duty cycle and we gradually increase the frequency of it. At some point at a certain frequency the code above should not be able to capture the digital input state correctly.

How can we estimate roughly the maximum pulse frequency the above code can handle to read the state correct?
Should we find how many clock cycles it uses and multiply it by the clock frequency?
And if so, how can I do it in practice?

int main(void) {

    DDRD = B0100000;
    DDRD |= 1<<5;

    while (1) {

        unsigned long data = 0;
        uint8_t val;

        for (int i=0; i<25; i++) {
            data <<= 1;
            PORTD &= ~(1 << 5);
            _delay_us(2);
            PORTD |= (1 << 5);
            _delay_us(2);

            if ( (PIND & (1 << PIND6)) == (1 << PIND6) ) {
                val = 1;
            }
            else {
                val = 0;
            }

            data |= val;
        }

        // The rest of the code

    }
}


texts: Alternatives for the Atmel AT91SAM3U-EK Development Board

texts: I'm considering buying a AT91SAM3U-EK to learn the ARM Cortex-M3 architecture. I am considering this model because Atmel produce their own jtag device - AT91SAM ICE. The only disadvantage is that this is quite expensive. So what other alternatives are there with a similar spec?


texts:
What happens when a current source is connected in series with a voltage source? I mean to ask, what will the current be through the series combination and voltage across it?

Is it allowed to make such a connection?


texts: Can I run TP4056 modules from the same DC power source?

texts:
I am trying to set up a balance charger for 3S 11.1V LiPo battery using cheap components. I have a PC power supply and several TP4056 modules.
However, there seems to be something wrong with the circuit attached. I have noticed that everyone on youtube uses isolated power sources for each TP4056 module. Why is this? Does it apply even if my power source can handle enough wattage?
When I did this, the diode or transistors on the TP4056 closest to ground caught fire. I don't understand what's wrong about my reasoning.
Also, can I safely use these modules for charging 3.7V batteries even though they each output 4.2V?


texts:
I've a Y.S. Tech fan with 4 non-standard colored wires connected in a UPS, and I want to replace that fan with a bigger standard 4pin fan doing a "UPS case mod". Motivations aside.

Here I want to focus my question on how to determine which wire is meant for what, for me to know how to proceed. So I want to keep the question general, regardless of the model UPS used nor the model fan used. I'm sure the connector wires/pins sequence I'm trying to replace, is non-standard.

Please assume here that I'm right and that we can't know the function of the pins/wires only by the original sequence of wires/pins nor the colors of the wires without further measurements.

There are some knowns though. The fan takes in 12V according to its spec and I've witnessed the speed control in action, so some form of PWM is also functional. Let's assume the PWM function itself is standard.

I can with some effort figure out which wire/pin is used for RPM sensing, by unplugging 1 wire at any one time until the UPS complains of a failing fan without the fan stopping from spinning at default RPM nor possibly speeding up to 100%. If the latter happens, then I have the answer I'm looking for here, but in case that doesn't happen, I need at least one alternative during the testing. Because disconnecting any of the remaining three wires could also just lead the fan to stop spinning depending on the fan.

Assume right now I don't have a way to know which wire/pin is used for the PWM signal. From what I understand the PWM signal is most probably 5V max, while the fan we know (a given spec) is 12V powered by a different wire. But I don't know how to measure which wire is conducting 5V with my multimeter while not knowing which wire is "GND or negative" in the same circuit.

Please remember to assume that the colors only help keep track of our measurements, but that the colors are not from the start helpful to determine the function without measurements.

I've searched and thought about it a lot, and don't know how to proceed.

Thank you in advance for any feedback. Please keep the scope within my current focus, so aside motivations for the mod nor device model names.

I've only basic relevant technical experiences, but I feel confident enough about the rest of my plan. And I'm willing to take the somewhat calculated risks.

Thanks again!

Edit:
I measured and found the correct functions, and the color coding wasn't entirely non-standard, but the sequence definitely remains non-standard. My next step is soldering the wires in a standard sequence to a repurposed (part of) fan extension cable with plug/header pins.

I'm not sure I'm allowed to share the answer, or if it is considered "a trademark secret" by some stretch of the imagination by Y.S. Tech's reach.

The comment by gregb212 contained the needed general instructions and lead to the final answer I was looking for, but I remain responsible for the actual measurements and mod: Y.S. Tech Fan 4 wires, but which is which?

Edits: spelling, brand name fix, clarity and addition.


texts: Common Gate Transimpedance Amplifier Transfer Function

texts:
I am trying to find the transfer function of the common gate transimpedance amplifier.
The transfer function that I got is different than the one at the original publication even though it leads to the same DC gain.
There is no derivation in the publication, only final result, as I copied in my post below. So, I think it is just fine not reading the original manuscript.
I am aware that the transfer function can be different depending on the assumption used. looking at the result from the publication, it does not ignore \$ r_{o} \$.
Am I missing something here?
This is the diagram:

From observation:
$$ v_{s1} = \frac{1}{sC_{PD}}i_{1} $$
$$ v_{out} = \left(R_{D} || \frac{1}{sC_o} \right) (i_{pd} - i_{1}) $$
$$ i_{1} = i_{pd} - \frac{v_{out}}{\frac{R_{D}}{sC_{o}R_{D}+1}}     $$
$$ \left( v_{s1} - v_{out} \right) = (i_{pd} - i_{1} + g_{m}v_{gs1})r_{o} $$
$$ v_{gs1} = \left(0 - \frac{1}{sC_{PD}}i_{1} \right) $$
From equations above, we can solve for \$ v_{out}/i_{pd} \$ by eliminating \$ v_{s1}, v_{gs1}, i_{1} \$.
Two checkpoints are written here:
$$ \frac{1}{sC_{PD}}i_{1} - v_{out} = \left[ i_{pd} - \left( i_{pd} - \frac{v_{out}}{\frac{R_{D}}{sC_{o}R_{D}+1}} \right)   +g_{m} \left( - \frac{1}{sC_{PD}}i_{1} \right)  \right] r_{o} $$
$$ v_{out} \left(1 + \frac{(sC_{o}R_{D} + 1)r_{o}}{R_{D}}  \right) = \left( \frac{1}{sC_{PD}}  + g_{m} \frac{1}{sC_{PD}}r_{o} \right) \left( i_{pd} - \frac{v_{out}}{\frac{R_{D}}{sC_{o}R_{D}+1}} \right) $$
At the end, I got this:
$$ \frac{v_{out}}{i_{pd}} = \frac{(1 + g_{m}r_{o})R_{D}}
{sC_{PD}R_{D} + \left[ (sC_{o}R_{D} + 1)(sC_{PD}r_{o} + g_{m}r_{o} +1 ) \right]   }$$
From the publication, this is the transfer function:


texts:
I am creating a closed loop gycol heating/cooling system for beer fermentation and lagering. The system uses a ITC-1000 temperature controller and two power supplies to feed a heating circuit and a cooling circuit with peltier devices attached to a water block and pump. See below:

I need to have a single pump(to pump gycol) and fan(to cool internal components) powered when either circuit is active. The circuits will not be active at the same time. How do I wire these to not create a feedback loop and not supply power to both circuits? Do I need to use diodes, and if so how/where do I wire them?


texts:
I am making a two layer pcb, and I'm not sure where to keep the power and ground lines.

.
This is circuit is a design block. And in the pcb, there is going to be around such 20 design blocks. Power supply to the PCB is 24V. Max current consumed is around 4A.

I understand that is recommended to keep one plane as ground.
And so I was wondering if it is okay to keep the other plane as power line. If not, what else can I do?

Any help would be appreciated. Thanks in advance.


texts: How should I understand the intrinsic body diode inside a MOSFET?

texts:
I know there is an intrinsic body diode inside all the MOSFETs, but I'm confused about the reason why it's there. I've searched the articles but can't find a good explanation for it. Can anyone use the "normal" NMOS structure (when I say normal, I mean the standard structure, two n+ doped are source and drain, and the gate is in the center to create the N channel, not the U-type or something else.....) and show where the body diode is?
Thanks a lot!


texts:
I am trying some simple programs to test my microcontroller, but I am having trouble with the first test program: blinking an LED using interrupts.

I'm using an Atmega168A-PU.

Here is my program:

#include <avr/io.h>

    #include <avr/delay.h>
    #include <avr/interrupt.h>

  //ISR(TIMER0_OVF) -> this syntax also not works
    ISR(TIMER0_OVF_vect)
    {
        PORTB ^= (1 << PB1);
    }

    int main(void)
    {
        DDRB |= (1 << PB1); // set PB1 as output
        PORTB |= (1 << PB1); // led on
        TIMSK0 |= (1 << TOIE0); // enable timer overflow interrupt
        TCCR0B |= (1 << CS00) | (1 << CS02);  //set prescaler to 1024

        sei();
        while(1)
        {

        }

        return 0;
    }

All of the connections are good, but the LED won't blink.


texts: 3-terminal feedthrough capacitor VS 4-terminal X2Y capacitor

texts:
I am concerned only with SMD type capacitors, with typical sizes of 0603 - 1206. I am considering to use X2Y in parts of the design, instead of feedthrus or regular caps, if performance can benefit.
I know that feedthrough capacitors have excellent noise filtering capabilities by placing their series inductance and resistance also in series with noise and offering a very low impedance to ground.
The X2Y type is commonly praised as the ultimate part by its manufacturers, also as a replacement for feedthru caps, but I fail to see how this can work.
Question 1:
This is about line noise filtering for power supply lines, e.g. after a switching power converter. It seems possible to "abuse" a X2Y cap as a feedthru cap: namely by passing the line thru its two transverse pads and attaching GND to the two capacitor pads. Will the noise filtering of this be similar to a feedthru cap ? For the feedthru cap, as the GND is attached to the transverse pads, there would be less inductance in the shunt path, so I image filtering would be more efficient for the feedthru cap ?
Question 2:
X2Y seems to be good for local IC decoupling, especially for bipolar power rails. Adding V+, V- and GND to the same part is not possible for feedthru caps, but would require two normal caps instead. So let's compare one 0603 X2Y cap to two 0402 caps for instance and let's assume a moderate IC size of 5x5 mm with power supply pins at opposite sides. Isn't the trace inductance in this scenario already the dominant part of the power loop ? My feeling is that the ~0.2 nH lower inductance of the X2Y caps won't really help because of power trace inductance. Also with X2Y caps you lose the ability to route under caps in the top layer. So again I don't see how X2Y would make an improvement in performance or even in board space.
EDIT:
Still didn't get around to do the test because other projects were more important, and this one was more of a curiosity but some new insight anyway. The layout of the X2Y caps helps when used in a global decoupling context with vias. However, when used for local decoupling, where it is connected with traces to the IC, the remarks made in question 2 counter the advantages.
I would be still grateful if anyone had some insight into "abusing" X2Y caps as SMD feedthrough caps. The reason this is interesting is because both feedthroughs and X2Y are sort of niche, and one could consolidate the stock.
Best Regards


texts: Can a single, large multilayer ceramic capacitor replace the classic electrolytic + ceramic decoupling capacitor arrangement?

texts:
In classic decoupling designs, it is common to see a large (10 µF or bigger) electrolytic capacitor in parallel with a smaller ceramic capacitor (in the range of 0.1 µF). The larger electrolytic capacitor can deliver more current over a longer period of time,  but suffers from high ESR, thus a ceramic capacitor was used to handle higher-frequency current spikes.

However, it's 2016; today our circuits run on 1.8 V instead of 18 V. We can easily get ceramic caps as large as 100 µF in the voltage ratings we need.

Is there any reason we still need the classic 0.1 µF + 10 µF design? Why not just go with a single, 10 µF ceramic cap, which has similar ESR as the 0.1 µF?

I ask this because I've seen a large number of reference designs that have switched their polarized electrolytics over to ceramics, but still use the multi-value parallel approach. In one particular reference design, I even remember seeing a 22 µF, 0.1 µF, and 0.01 µF — all ceramic — run in parallel.


texts:
I want to sense the current that battery supplies to the low current (few mA) circuit. As everyone said before, forcing discrete design does not make sense, so I decided to apply simple OPAMP & bjt based design.
I've tried the design for very different resistance values and it worked well as long as Rload<= 37Ohms.

In real case, on the other hand, Vsense was always less than 2-3 mV whatever the load resistance was, and the output of the OPAMP was quite different than the simulation. It is genereally impossible to get the same results with simulation in the real case; but, I could not find the problem with the design?

What could be the problem?

Here is the datasheet of LM358: http://www.ti.com/lit/ds/symlink/lm158-n.pdf

simulate this circuit – Schematic created using CircuitLab

edit2:


texts: Audio amplifier controlling volume with Arduino?

texts:
I'm building a project that outputs audio via an Arduino to a powered computer speaker. This audio signal comes from a sine-wave-table lookup that I step through at various frequencies, setting a PWM pin to wave_table[0], then wave_table[1], etc...

I'd like to modulate the loudness of this signal, but I don't want to just divide the wave table value by an integer because I'm worried that it will distort the audio -- instead of having a range of 0-255 for the sine-wave it might only go 0-3 for example and then it's not a nice sine shape anymore.

Is there a way I can use a second Arduino PWM pin to control an amplifier to change the analog signal coming from the Arduino to modify the volume before it hits the speaker?

Thanks!!


texts:
So to start I wasn't quite sure about where this question should be asked, so feel fre to relocate it if you want.

I'm setting up a system to notify me when a user enters an area. My plan is to use an old PCIE WiFi card powered from a small battery to detect when its within range. I want to know if a powered WiFi card needs to be initialized by the CPU or if a 5v power buss would be to have it show up in something like airodump-ng.

Thanks!


texts: verilog file with own library import into cadence

texts:
I need to import a verilog netlist into cadence. I'm writing the verilog file with my own developed application. I defined several library elements inside the netlist file which are not part of the reference library to check against during the cadence import process.

I need to tell cadence during the import the names and pins (Input & output) of  my new library elements. Can I do this inside one verilog file and how does this basic layout of a verilog file like is look like ?
My Idea not working goes like this ....

`timescale 1ns / 1ns
`resetall
`celldefine
`delay_mode_pa
// Description  : 2 input SMD
module SMD_X (SMD_1,SMD_2);
input  SMD_1;
output SMD_2;
endmodule

// Description  : 4 PIN CLK DEVICE
module CLOCK (CLOCK_1,CLOCK_2,CLOCK_3,CLOCK_4);
input  CLOCK_1,CLOCK_2;
output CLOCK_3,CLOCK_4;
endmodule
//
//  now the net list based on above defined libelements
//
module  mytest (D+,D-,VCC,VSS) ;

input D+,D-,VCC,VSS;

...
SMD_X X_1 (.SMD_1( net1), .SMD_2( net18));
..
..
SMD_X X_2 (.SMD_1( net1), .SMD_2( net27));
...
CLOCK X_10     (.CLOCK_1( net1), .CLOCK_2( net4), .CLOCK_3( net3), .CLOCK_4( net1));
...
endmodule

Can I get help on the correct format / verilog syntax for this task?


texts: ESP8266 Getting Unstable with the following circuit

texts:
When the resistors in this circuit are removed, the NodeMCU is working absolutley fine, however when these are put, ESP gets unstable and the relays are flickering. Also unable to flash with these resistors in place.

These are pull down resistors for external digitalRead as input. I need help to understand the issue better.


texts: What capacitor to use for high voltage & high current filter application

texts:
I am designing a filter that needs a capacitor. I am not allowed to paste the schematic here, so only the maximum voltage at and current through the cap, pasted from the spice simulation:

(voltage is purple, current is blue)

It should have 2,2uF capacity.

It cannot be e-cap because the voltage can go negative (again down to ca -300V, with similar current shapes).

The question is what other type of capacitor to use?

I've considered this type:

https://www.tme.eu/en/details/wxpc-225k/x2-y2-foil-polypropylene-capacitors/miflex/

https://www.tme.eu/Document/b4386034adefaa335c5813b75e3b0989/wxpc300_ang.pdf

Does this cap withstand the currents? What about the leads? Do they withstand the currents?

The datasheet says nothing about current limits the capacitor can withstand for such or similar repetitive currents (its internal construction, leads etc.). I know about ESR and its influence on temperature rise but the datasheet only mentions dissipation factor @1kHz. Does this parameter help here or how do I calculate the ESR from this and the temperature rise in my case?

I know I can physically test the cap and measure its temperature rise but I would like to calculate it first theoretically to see if the cap is really safe to use.


texts:
We are using to the AD421 parts on our industrial products and we are testing the EMC/EMI test for getting certification.

I'm trying to find the root cause about surge(IEC61000-4-5)/burst(IEC61000-4-4) for EMC because We are failing continue at surge/burst test item.
(AD421 datasheet link: http://www.analog.com/media/en/technical-documentation/data-sheets/AD421.pdf)

We should solve the below Issue.

Status 1: The initial 4-20mA Output was 8mA. The AD421 have to output 8mA.
But suddenly drop from 8mA to 4mA or increase from 8mA to12mA when testing Surge or burst. and output have recovered after about 1sec.

Status 2:This problem occurs too when the walkie-talkie operates on closely distance to  AD421 .

Questions.

What condition occur this symptoms in AD421?
What is "POWER-ON RESET" in internal functional block diagram of AD421?

Could you give me the anything reference material of AD421 for the solving EMC/EMI?

Please help me about the way of solution for problem.


texts: Does free electrons from the conductor itself flow or electrons inside the battery flow?

texts:
I am new to electronics. I read electricity works this way: some atoms have more electrons than protons. These free electrons flow through a conductor such as a copper wire. However, to induce flow of electrons we need a source to push the electrons such as a battery.

Does this mean the free electrons from the conductor itself (copper) flow or does that mean electrons inside the battery flows?

(If free electrons from the copper flow, wouldn't copper eventually run out of its free electrons?)


texts:
I'm doing a timing analysis on the SPI bus connected to an EEPROM (25AA128T-I/ST) on a product and parameter 11 (Clock Delay Time) seems to be less than self explanatory as to what it is for.

My assumption is that it is for a multi-slave bus and that the CS line has to be released for at least 50nS before the bus can be used for another device. However, the way it is drawn it looks like the clock is still finishing a transfer to this first device.

If it is still finishing its transfer when the CS line goes high, that violates how my understanding of how a SPI bus works. Which is that is the entire communication should be encompassed by an asserted CS line.

Is this just a bad drawing or does my understanding of the SPI bus need to be tweaked?


texts: Adding negative feedback to a common-emitter transistor amplifier

texts:
I am trying to learn how to implement negative feedback to a common-emitter configuration.The goal is to reduce distortion by sacrificing some of the gain.

simulate this circuit – Schematic created using CircuitLab

This is how the complete circuit should look.

I am talking about \$R_{NFB}\$ (I have not inserted it yet).This site specifies that after having everything calculated(excluding \$R_{NFB}\$ and \$C_4\$),its value should be calculated in order to preserve the initial gain.The formula to be used for this gain is now \$\frac{R_L}{R_{NFB}}=GAIN\$ at high frequencies.After getting its value,\$R_E\$ must be recalculated so \$R_E\$+\$R_{NFB}\$ is the same as the \$R_E\$ original value.

In other words,I understand that I am supposed to unplug \$R_E\$ and put it in series with \$C_3\$ and call it \$R_{NFB}\$.This doesn't make sense to me.I know that this negative feedback works by allowing a certain part of the AC output signal on the emitter,reducing the shunt effect of the bypass capacitor,but I don't understand the calculations.

How am I supposed to calculate the value of \$R_{NFB}\$?


texts: Best way to remove pins from IC storage tubes?

texts:
I often buy ICs that come in clear plastic storage tubes like this:

There are plastic pins on either end that keep the ICs from sliding out. I'm sure you're all familiar with this..

Sometimes I can easily push the pins out with my fingers, but other times they are extremely difficult to get out. What's the easiest way to get the pins out?

Thanks for your help!