texts: How to use VHDL Entity in logisim evolution?

texts:
I'm new in Logisim and VHDL. I'm trying to use VHDL entity-component but the output always is "x". Then I read a document ( this link ) that said Logisim requires ModelSim to use this feature. So I installed ModelSim ALTERA STARTER EDITION 10.1d - Custom Altera Version.

And I add the program path to Logisim's third-party software in the Questa Advanced Simulator path section.

C:\altera\13.0sp1\modelsim_ase\win32aloem

Then I create a VHDL entity in Logisim with code below.

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity and_or_top is
    Port ( INA1, INA2 : in  STD_LOGIC;    -- AND gate input
           OA   : out STD_LOGIC);    -- AND gate output
end and_or_top;

architecture Behavioral of and_or_top is
begin
    OA <= INA1 and INA2;    -- 2 input AND gate
end Behavioral;

And I click VHDL simulation Enable in the simulate menu. Then the VHDL simulator log appears with errors.

Reading C:/altera/13.0sp1/modelsim_ase/tcl/vsim/pref.tcl

# 10.1d

# do ../run.tcl 51429
Run simulation environnment build...
# ** Warning: (vlib-34) Library already exists at "work".
#
# Modifying modelsim.ini
# Model Technology ModelSim ALTERA vcom 10.1d Compiler 2012.11 Nov  2 2012
# -- Loading package STANDARD
# -- Loading package TEXTIO
# -- Loading package std_logic_1164
# -- Compiling entity and_or_top
# -- Compiling architecture Behavioral of and_or_top
# Model Technology ModelSim ALTERA vcom 10.1d Compiler 2012.11 Nov  2 2012
# -- Loading package STANDARD
# -- Loading package TEXTIO
# -- Loading package std_logic_1164
# -- Loading package NUMERIC_STD
# -- Compiling entity top_sim
# -- Compiling architecture comp of top_sim
# ** Error: (vsim-3296) Unknown option '-errorfile'.

# Use the -help option for complete vsim usage.
# Error in macro ./../run.tcl line 31
# ** Error: (vsim-3296) Unknown option '-errorfile'.

# Use the -help option for complete vsim usage.
#
#     while executing
# "vsim top_sim"

VHDL entity output still is "x". If you know what I do wrong, please tell me. I'm using CS3410 Logisim evolution version 2.14.8.4. Thank you.


texts: How to Modify Arduino IR Recievers to detect Unmodulated IR?

texts:
I'm trying to find the easiest way to interface between an Arduino IR receiver and an IR flashlight.

Yesterday I learned a lot from a question: Can Arduino IR Recievers Detect Signals from IR Flashlights? Basically, the moral of the story from that was, at least with that particular Arduino IR receiver, it expects a modulated frequency in the IR signal. That means that remotes can work well with such receivers. On the other hand the IR flashlight would not, because it is not modulated.

Since then, I have been thinking about the best next step to tackle the problem. I now turn my interest to modifying the Arduino module. Not only do I believe reworking the IR flashlight may be more difficult in comparison, but also I need to keep the IR flashlight's signal intact.

Question: Is there any hope for modifying an Arduino IR receiver module to capture unmodulated IR? Or perhaps even better, is there an off-the-shelf solution that could work for me?

Further Clarification

Signal: I need to work with an unmodulated signal, the IR flashlight's IR must remain on and uninterrupted. it has beam mode and flood mode, ideally the solution would be robust to both
Range: I would like it to be sensitive to at least 10 yds, ideally much further
Environment: I have a night-time environment in mind, so the ambient IR should be minimal, hopefully only the IR flashlight will be detected
Application: For the moment, this is nothing too fancy, I would just like to have a green LED to light up if the module is hit by my flashlight's IR
Duplicate Distinction: allow me to explain my rationale. The prior post I asked about the proof of concept. In this post the focus of the question was on implementation and hardware/software selection and modification. While the subject matter of the two posts are identical, the scope of the inquiry is different. After I got the community's feedback about the first question, I was able to contemplate and think on how to approach the problem with a better understanding of the underlying principles. At least in my mind, each post served a distinct purpose. Perhaps if I had combined them into one question it would be more concise, but given all the new material (to me) that has unfolded in this discussion, I probably would have butchered the terminology/physics to even phrase a question that wasn't really confusing. I decided to err on the side of safety and take it step by step and only ask a specific question once I was confident that I knew how to formulate that question in a clear and scientific way.


texts: Counter in assembly, using interrupt to prevent multiple counts with single push?

texts:
I am completely new to assembly, and I must develop a counter using PIC16F628A, a push button, and a display. Additionally it there will be an external oscillator (555).

I made some progress on this, but I think I need some help from you people.
At first I did a delay based on decrements in order to be able to watch numbers on the display.

My problem now is that once I press the button, I need it to count only one number, independently how much time I keep it pressed. Something like, if it changes state up, it will increment 1. I believe this must be done with interrupts, I guess.

Now, what is the best solution to my problem? External interrupt, by state interrupt? Any other thing?


texts: Narrow TVS margin between operating and overvoltage

texts:
Devices like the PIC16F18323 have an extremely narrow margin on I/O pins. The standard logic-high voltage level is 5V, but the absolute maximum is Vcc+0.3V, i.e. 5.3V.

Reading about TVS devices, in particular those offered on DigiKey, for a diode whose Vwm is 5V, the lowest clamping voltage I can find is 7.5V for the 1N6373. I can assume that by that point my I/O port will be destroyed.

So what gives? Should I be using a TVS diode with a lower Vwm and have it already in avalanche when the device is under normal conditions? Or just cross my fingers with a diode whose avalanche and clamping voltages are significantly above what the pin will tolerate?


texts: When to use pull-down vs. pull-up resistors

texts:
After learning and experimenting with microcontrollers, I've understood the concept of pull-up- and pull-down resistors. I now understand when and how to use them, and how they work. I've mainly used pull-ups because I was taught to, but it has always seemed a little backwards to me, as closing the switch sets the MCU input to LOW. I think it would make more sense to use a pull-down resistor, so that the input is LOW when the switch is open, but that is just my way of thinking.

Should I pull my single-throw inputs up or down? When is pulling down preferred over pulling up and vice versa?


texts: What TVS diode should use for MAX232 and MAX485, whether uni or Bi-directional?

texts:
What TVS diode should use for MAX232 and MAX485 driver, whether to use unidirectional or Bi-directional TVS diode? if any reason why?

Also, Please tell me what clamping and standoff voltage to use.

As per my research, I believe following ratings are right. Please correct me if am wrong.

For MAX232

Standoff voltage: 15v
Clamping voltage: 24.4
Breakdown Vmin: 16.70
Breakdown Vmax: 18.50

For MAX485

Standoff voltage: 6v
Clamping voltage: 10.3
Breakdown Vmin: 6.67
Breakdown Vmax: 7.37

P.S I am aware of ESD protected line driver readily available. But still, I wanted to know the rating of TVS diode for upgrading my knowledge and also for cost analysis. So I request please no suggestions on ESD protected line driver.

Am not from an electronic background so please forgive me for any wrong electrical term used.


texts: Sustaining amp circuit for MEMS oscillator

texts:
A MEMS oscillator can be modelled as a lumped mass-spring-damper with a high resonant frequency and Q factor.

According to Wikipedia "All commercial MEMS oscillators use electrostatic transduction". i.e the resonator motion is detected with a capacitor. An Electronic sustaining amplifier detects the resonator motion and drives additional energy into the resonators driving the resonator in continuous oscillation.

What is a simple circuit that will achieve this? I need a circuit that will drive the oscillator at its resonant frequency. I need the simplest circuit possible, just for mathematical modelling purposes, so I'm not interested in advanced features or practical considerations.


texts: Confused about the XIP (eXecute In Place) function of QSPI FLASH

texts:
There are lots of NOR QSPI FLASH chips that support XIP (eXecute In Place). In this mode the embedded cpu (or MCU) can directly execute the codes stored in the flash. But as we know, the qspi flash can only output 4-bit data per cycle (if in DDR mode, 8-bit data per cycle), while many MCUs, such as ARM Cortex-M series, need a 32-bit instruction per cycle. So the MCU have to wait at least 8 cycles to get a valid instruction, which seems very slow. Besides, the max frequency of a nor qspi flash chip is often below 130MHz and the frequency of a MCU could reach 200MHz or higher, which means longer delay for cpu to receive a valid instruction from an external flash.

Although we can program some bootloader codes that copy the user application codes and data into Instruction/Data RAM after the power-on, I think this operation would cost lots of time. Besides, if the RAMs in MCU are not big enough to store the codes and data in the flash, it will also make things difficult. I know that we could add I/D Cache in the MCU, but this also means more complexity. For example, STM32F479XX doesn't have cache, but it has QSPI interface which support XIP.

I don't know if my understanding is wrong, but I really couldn't find much details about XIP. The Techinal Reference Manuals of STM32Fxxx only say that they have QSPI interface and support XIP, but they don't show any details. Therefore, I guess we also need to implement a very complicated QSPI controller in the MCU to support XIP.

Can anyone give me some answers to this question? Is there any books or websites that tell how to design a QSPI interface that support XIP?


texts: Need help to understand DigiKey/Mouser "Switch Function" terminology

texts:
I first read Switch Basics  from Spark-Fun tutorial to help me better understand how to find what I am looking for using DigiKey/Mouser Advanced search terminology.

I know I am looking for a maintained latching switch where I push once to turn on, push again to turn off.

When I look at the DigiKey/Mouser advanced search under the "Switch Function" section I find:

DigiKey:

Off-Mom
Off-Mom-Mom
On-Mom
Mom-On-Off
Off-On: Does this mean that the switch is initially off? Then it is on when pushed?
On-Off: Does this mean initially On?
On-Off, Off-On: Is this a toggle type?
On-On-On-Off

Mouser:

(ON) - (OFF)
OFF - (ON)
ON - (OFF)
ON - OFF

What is the difference between each function?


texts: Encoder direction change during index pulse

texts:
I have a quadrature encoder with an index pulse, and I would like to keep track of angular position over multiple turns. The microcontroller I am using has counters that count both index pulses (revolutions) and phase edges. Each time an index pulse is seen, the revolution counter is incremented (or decremented if going in reverse) and the edge counter is reset to zero.
Everything works fine for a normal 'clean' transition through the index pulse. However, if I am unlucky and the direction changes during an index pulse, then the counter that tracks revolutions (i.e. counts index pulse edges) becomes incorrect. It increments the revolution count at the rising edge of the index, but does not decrement it at the falling edge (which corresponds with the same physical position as the rising edge). The result is that the revolution counter is one count higher than it should be.
Is it common to use encoders with an index pulse to track multiple turns? What can be done to avoid this problem?
I am considering using only the first index pulse to reset the edge counter, and then ignoring all subsequent index pulses (just allow phase edges to accumulate instead). The downside is that without the index pulse to reset counts, the accumulated counts may drift over time if used for long periods with occasional missed pulses.


texts:
I have about 50 or so 1'x2' Al-clad MCPCBs, each with hundreds of LEDs attached. Each panel has 4x WAGO 2060 terminal blocks mounted at the corners.

Unfortunately the WAGO connectors have sustained some mechanical damage and I need to remove and (ideally) replace all of them (~200 PCS).

I have basic soldering skills but am having trouble using a basic soldering iron approach due to the high thermal conductivity of the MCPCB and the fact that the components are lead free soldered - i.e. I cannot get the solder to melt and the terminal blocks to detach.

The soldermask is pure white so I am also concerned about excessive and uneven heating on the circuitbaord as prior experience has shown this approach to cause soldermask discoloration (yellowing = lower reflectance).

What would be the best way to rework the damaged terminal blocks? I would be open to buying specialized equipment, with a budget of < $300 USD.


texts: Testing a connection to a TCP socket through SIM5320A cellular module

texts:
I'm using a SIMCOM 5320A module like this one to try to establish a TCP connection.

I'm going through SIMCOM's application note on TCP/IP as a reference.

The AT commands I'm using may very well be working, but I'm not sure the best way to verify this.  I later plan to build atop this TCP connection to add a MQTT protocol connection to Amazon's AWS servers for IoT.  But I like to do smaller "unit-testing" and build my way up, so that when I get to the MQTT and it's not working, I know that my TCP foundation it's built on is not the issue.

I believe my preliminary steps to this are working fine (registering to GPRS, connecting via APN, establishing PDP context, open network connection, open TCP socket).  At least, they seem to be giving me the expected AT command return values indicating they're OK.  It's from that point on where I have my doubts.

Currently what I'm doing is ust connecting to a web server (happen to be using Adafruit's IP address) and I send a simple message, like:

AT+CIPSEND=0,5   // send 5 chars to link 0
> HELLO
OK

When I send the command to see sent/received, it reports 5 chars were sent, 0 received.  I don't think the Adafruit server is configured to do anything in response to my sent data, like I am not doing an HTTP GET request or anything, so it does nothing.  So again, it might be working, but I don't know.

I thought the best way to test this might be an echo server.  I poked around for quite some time trying to find free online echo servers I could try to connect to, who whould just send back my "HELLO" ever so politely.  There is a whole UNIX protocol for this, but it looks like it's been obsoleted.

I then tried to set up a local echo server on my PC and connect into that.  I think I set it up right, because when I ran both a server and also a client (on the same machine, connected to localhost IP address), I got echoes in both terminals.  But when I tried to connect to it from my SIMCOM module, I couldn't establish any connection.  I messed around with firewall settings forever, and probably opened up every port to hackers in the process, but no dice.

I'm a bit out of my expertise with this internets stuff (more of a circuits/embedded guy), so I'm hoping someone can help point me in the right direction.

Finally, there are two similar questions to this on Stack Exchange, but I'm having trouble reaching those guys to see how they had configured their testing.
Is it possible to send AT commands through TCP?
How do I send data over TCP from a SIM5320A?

Essentially, I just want to connect to a TCP socket in transparent mode (vs. data mode), send some data one way, and read some data back successfully, then close the connection.  Any help greatly appreciated.


texts:
I'm trying to find a robust solution to linearize four hall effect sensors outout to obtain a signal that I can use in a PID control scheme.

The output data is collect via 4 ADC channels on an ATmega328p chip (Arduino) by sliding a magnet with the south pole first, perpendicular across the sensors with a fixed velocity and distance

I then remove the offset, my idea is to look at the phase shift between the "sine waves" with the atan2(x,y) function

avgADC0 = ADC0-mean(ADC0);
avgADC1 = ADC1-mean(ADC1);
avgADC2 = ADC2-mean(ADC2);
avgADC3 = ADC3-mean(ADC3);

phase = atan2(avgADC0,avgADC1)
phaserad = phase * pi/180;

The idea came from this application note Application note

The result is, very very poor :) Mostly because the sensors aren't spaced exactly 90 deg. but I would expect to see something that doesn't look like this and more in the style of what's refered to in the application note.

I'd love to end up with a nice curve, I can curve fit and feed into my control system? But how would you go about linearizing this signal, am I missing something?

The sensor data sheet is linked here

I realize the application note isn't targeted for my sensors, and usually I don't mix and match. But surely the method would still work regardless.

Thank you


texts: Why do electronics have a low temperature limit?

texts:
Apart from condensation why do electronic components usually have a low temperature limit? For example my laptop says something along the lines of -10 °C to 75 °C temperature while in use.

I can understand the high temperature limit, as things will probably melt!

But why is cold such a bad thing?

Apart from batteries, which components will extreme cold damage, and how?

Will using it increase the damage?

Will using the equipment offset this damage (as they warm up from use)?

Also, I am talking about extreme temperatures below -50 °C, so is condensation still a problem?

Note: I am not storing it so it is not a duplicate of another question.

Note 2: I am not talking about semiconductors, but generally speaking.


texts: Can anyone recognize this module in this pic here? I am analysing a circuit and it would help me a lot!


texts:
A real inductor has resistance due to the wire.  Should this resistance be modeled as in series or parallel with an ideal inductor?  Assume the frequency of interest is so low as to make capacitive and skin effects negligible.

On one hand, it makes sense to model them in series, because if a DC voltage is applied across the real inductor, all current will still have to flow through the resistor (i.e. a short will not occur).

On the other hand, it also seems reasonable to model the LR components in parallel, since both will see the same voltage applied across them.

I would like to verify I am using the correct equations when experimentally determining inductance, and when selecting a capacitor to achieve resonance in an LC tank circuit (since the inductor's resistance will affect the ideal resonance frequency).


texts:
As you may know, along with my previous posts in SE I've shown myself as getting familiar with Eagle. And hence, new things to learn are coming and some are not always transparent.

A simple thing such as making a proper title block/frame in Eagle is not an easy task to me now. I've tried Google but the available answers out there are not satisfying

I can make a title block now which is done similarly to adding a component

However, it's more meaningful to customize the information on the block such as some description, project name, author.... are not editable

the project's name is currently tied to the project file name and cannot be changed. Other fields are customized by using Text command but the fonts, size are not consistent with the ones come with the frame.

I'm confused already

Thanks in advance for help!


texts:
Can someone elaborate on the concept of density evolution?

So far, my understanding is that density evolution is essentially how many ones there should be in each row and how many in each column of the low-density parity check matrix.

However, how exactly is this determined?


texts: How to tell monocrystalline from polycrystalline solar panels

texts:
This is a very simple question, but I haven't found the answer yet. It seems to me that monocrystalline panels are always black (though I have seen some dark blue ones), and polycrystalline panels are bright with lots of patches of different shades of blue. However, I've seen some panels that still seem to have the patches but they are very dark overall. Is there a proper way to tell what kind of panel one has just by the looks? is the presence of shades/patches of blue a good indicator of a panel's polycrystalline structure no matter how dark they are? or for that matter, are monocrystalline panels always black?

Thanks in advance.


texts:
My country's power supply is AC 220 V. My equipment is rated 220 V 5 mA and linked to a power socket rated 250 V 15 mA.

Will my equipment be fine?


texts: AVR- "Bootloader Main function and Application Main function"

texts:
I am just trying to build a custom bootloader for avr. I know that the bootloader functions can be shared with the application program. I am really confused with the main function though. Do bootloader and application program, both have main function? If not, how to write two separate programs with only one main function

Application Program:

    #include <avr/io.h> // application program at 0x0000
    #include <string.h>
    int main()
    {
     uart_init();
    }

Bootloader Program:

    #include <avr/io.h>
    #include <avr/boot.h>
    void uart_init();
    void (*funcptr)( void ) = 0x0000;
    int main(void)
    {
   uart_init();
       //Boot or Goto Application program
    }
    void uart_init()
    {
       //UART initialization code;
    }


texts:
All i know is electric current travels in a loop. So how / where in its way does electricity (electric energy) get wasted?
And what do we do on switching electric appliances off? If it's not electric current that is wasted then what is it?


texts: Connecting TVS diodes to a floating shield

texts:
I need a little help with shielding for ECG leads.

The design I'm working on has 3 leads, about 60mm in length. We use shielded cable for each lead, which all come to a meeting point at the connector. I am planning to add a TVS diode to each lead. The device is battery operated. Another engineer and I have different opinions about how that diode should connect on the anode side and I'm hoping you can help with the optimal design:

Option 1: ECG lead shield is not connected to the main GND directly, TVS diode anode connects to the ECG lead shield, shunting any EMI to the shield.

Pro: Theoretically, EMI would discharge directly to the shield and never affect the main circuit GND, would avoid GND bounce.

Con: Shield voltage could be at a different point from board GND and therefore pull the ECG signals out of the dynamic range of the differential amplifier on the main board, making the device unable to properly capture ECG. Normal dynamic range is +/-300mV so it is quite sensitive.

Option 2: Shield is connected to main board GND directly, TVS diodes would shunt EMI energy to shield AND GND (same potential).

Pro: Shield is at the same potential and the main circuit GND, ECG signal will always be at voltage that is referenced to GND and therefore stay within the dynamic range of the OpAmp.

Con: Any noise coupled to the shield will also be coupled to the GND, could cause GND or signal bounce.

Option 3: Connect the shield to GND via 1Mohm resistor in parallel with a 0.01uF cap.

Pro: Seems like a potential middle-ground solution. The shield is still referenced to GND potential but is not directly connected to GND itself, minimizing transfer of EMI to the main circuit.

Con: Decoupling capacitance has to be chosen carefully (too large could cause GND bounce, too little might allow shield voltage to vary drastically), should could still be at a different potential for a brief period of time.

I am very curious to get some input on this especially from people who may have faced this problem before or have some good understanding of interactions / pitfalls with wire shielding and EMI protection.

Thanks!


texts: If we already having a center tap rectifier with just two diodes doing the same work then why is there a need to use four diodes or the so called Bridge rectifier.


texts: Logic analyser reads bits as if they are shifted left by 1 bit, what could be the issue?

texts:
The logic analyser is from Hobby Electronics, and is being run on the PulseView software.
It is not reading the data correctly. All of the bits are shifted one to the left so everything is read incorrectly.
I tried changing the settings like clock phase/polarity but this didn't help.
Additional information:
I'm sending the data from an ESP32 slave to an ESP32 master (CHPOL = 0, CHPA = 0, msb-first, word size 8).
Here's what the signal looks like, I'm sending all 0x42s, it's reading as 0x84.
It should be this: 01000010
It's reading this: 10000100

This is the start of the transaction, here I tried to send a 0x01 but it read 0x03. The clock seems to be starting at the right time...

EDIT:
I am manually driving the CS LOW which means it is ready to transfer to the master. Please note, the sent data is being read correctly on the other end, it's just the logic analyser that is reading it incorrectly.
EDIT2:
As per the answers and comments below, the issue was due to the CS pin.


texts: Realize switching function using only 2/4 decoders and logic gates

texts:
I am given the function $$f(A, B, C, D) = CD + A'B + BD'$$

The question states realize it using only 2-to-4  decoders and logic gates (if needed). My approach:

Use 3 2-to-4 decoders, one with inputs C and D, one with A and B, and one with inputs B and D. Take the output which satisfies $$CD, A'B, BD'$$ respectively and then combine them using an OR gate to get the function I needed. Is this method correct, and if not, what do I do?


texts: How does a electropermanent magnet work?

texts:
I’m trying to wrap my head around electropermanent magnetism. I read this wonderful PhD Thesis by Ara Knaian as well as  details the history of this concept as well as Kyle Gilpin, Ara Knaian, and Daniela Rus’ implementation with the Robot Pebbles project (also quite fascinating ).

As I naively understand, by using a neodymium magnet along side a Alnico magnet (which I believe is solely wrapped with a determined turn count of magnet wire) and sandwiched between two iron “keepers”, a positive voltage and current can be inducted through the magnet wire causing the Alnicos magnetic “polarity” to flip/change.
This change can turn on or off the magnetic holding  power.

First off, is my understanding of this remotely correct?

The author includes a schematic outlining the H-bridge method which I think is necessary as method for providing different power polarities?

I’d like to try to build one of these electro perm ant magnets, yet getting caught up on the h-bridge concept as well as the general current “building” concept pulsing voltage into a capacitor (which I think builds up current).

All of this I can imagine is quite elementary for you all. Thank you you any help or guidance.

http://www.hizook.com/blog/2010/12/07/electropermanent-magnets-programmable-magnets-zero-static-power-consumption-enable-s

http://www.hizook.com/files/users/3/RobotPebbles-GilpinKnaianRus-ICRA10.pdf

http://www.hizook.com/files/users/3/Electropermanent_Magnets_Knaian.pdf


texts: What sort of switch to swap the order of two signal processors in series

texts:
I'm building a guitar effects processor which is a 2-in-1 effect. Basically they're two separate circuits I've already built on perfboard which I want to put in the same box.

I haven't decided which one I want first and I would like a switch to be able to switch between the two.

So what sort of switch will I need? I'll need to switch between:

IN -> FX1 -> FX2 -> OUT

And

IN -> FX2 -> FX1 -> Out


texts: Fungus causing my board to shortcircuit?

texts:
I have an electric bike, which started to act strange a while back. The switches no longer function properly, possibly because things got moist. During the winter the cover of the bike was shredded by a storm, and it took a while for me to get a new one.
Now I've opened up the switch. Its a really simple board with just 5 switches on it.
These are the buttons

And this is underneath them.

When I flip the board over I see this white stuff that resembles fungal growth to me. (Sorry for my background in agriculture I guess).

Now I know the board shorts as it acts continuously like the plus and minus button are pressed together, while none are actually pressed. The other 3 buttons function properly.
Now I highly doubt the white stuff to be a fungus, as I don't think it would conduct very well. What would be a likely explanation for this, and how to restore the functionality of this board.
I've looked at simply replacing the part, but there are only parts available with the attached computer included. That would set me back about €200+, so I would love to get this fixed.


texts: High Side P Channel MOSFET damaged after turn off

texts:
The circuit below is a power switch controlled by a push button. Basically, the switch (Q1) is controlled by a On/Off IC controller.

During testing on the real circuit, a DC Electronic Load is connected on Vout (as load) and a DC power supply is connected to the input (Vin).

When the IC (U1) turn off the load, the P channel transistor is damaged in the following conditions:

DC electronic load (connected at Vout): 2A
DC Power Supply (connected at Vin): 24V (max 4A)

Any suggestions?

Thanks,

Edit: after adding a 40V 15A Schottky diode (SK154-TP) parallel to the load, the following test were performed:

1A load with 24V input
2A load with 24V input
3A load with 24V input

Below the voltage on load during the turn on/off of the transistor.

Below the setup:

Performing the same testing (3 cases) without C1 and R2 = 0 the results on Vout


texts: How can I calculate the inductance of brushless DC motor?

texts:
I want to solve the differential equation of brushless DC motor

$$ L\frac{di(t)}{dt}+Ri(t)=V-k_e\omega$$

How I can calculate the inductance (L) of brushless DC motor?


texts:
I will soon be assembling multiple computers and want to reduce the danger of ESD as much as possible. Not an expert myself so I'm looking for people with knowledge in ESD safety to comment on my planned procedure.

The ESD tools I will buy is an antistatic wrist wrap and an antistatic mat. The surface of my table is melamine laminate so I think the mat is required.

The most common advice I have seen is to install the PSU into the cabinet, connecting power cord to wall socket while turned off and attaching antistatic wrist wrap to cabinet. However, this will not have any effect in my case as the systems I'm building are using picoPSUs with external 12V power bricks and these have no ground wire.

The following are the steps I will follow while assembling a computer:

Attach antistatic mat and wrist wrap to cabinet.
Put on wrist wrap.
Place screwdriver and other tools on mat.
Unpack motherboard from ESD bag and place it on mat.
Mount CPU, CPU cooler and M.2 SSD on motherboard.
Install motherboard in cabinet.
Install RAM and picoPSU.

The flooring is linoleum or vinyl and I will be assembling the computers barefoot while sitting on a wooden stool.

Is the above enough to reduce the risk of component damage from ESD, or is the procedure completely wrong?


texts: Two bulbs of different wattage in one AC circuit

texts:
If I connect two bulbs of different wattage in one circuit, can that lead to problems? Is that a bad idea?
Does it make a difference if the circuit is serial or parallel?


texts:
I'm attempting to build a homemade head tacking unit for use in computer games using infrared LEDs for my kid. I followed one tutorial where they were wired in parallel. After doing more research, I read posts on here and on Nuts & Volts that wiring LEDs in parallel is not ideal because one or more LEDs will hog the current. This appears to be true because the one LED with the longest distance from the power source always seems dimmer.

I figured out the resistance needed to wire the LEDs in parallel. There are three LEDs with a forward voltage of 1.2V and a continuous forward current of 100mA. They are powered by a 3V source (two AA batteries), requiring a resistance of 6 ohms.

If I wire them in series, the LEDs take more voltage (3.6) than the batteries can supply. I don't want to move to a bigger battery box as this is head mounted. Can the LEDs still work with a bit less voltage. I did a quick test and they did not seem to light up. Maybe moving to a 9V battery is an option, but those things are far more expensive than AAs :)

If I am stuck with wiring in parallel I read it's better to put a resistor on each LED diode. How do I calculate the resistor value I on each LED. I know wiring resistors in parallel halves their resistance (thanks Element14!), so if there are three paths, do I need 18 ohm resistors at each LED to get to the 6 overall ohms the circuit needs?

Yes, I am very new to all of this.


texts: Best way of confirming system clock of controller

texts:
I would like to know the tricks or hints which could be used to find the system clock of 8   bit micro controllers.
What are the cool ways in which we could find the system clock and can be verified with documents.

I have heard of toggling a pin continuously but i don't know the specifics.It would be helpful if you could share your way of doing things to find system clock.

It would be helpful if you could list the common tricks to verify the clock other than reading data sheet.
If i could determine that by toggling an i/o pin continuously.What data is obtained from the observed frequency?.It would vary depending up on asm or c compiler i trust.

Please do enlighten me

Im using pic18f26j50

Regards


texts: How to choose voltage divider resistors for correct biasing in emitter follower circuit?

texts:
One simple rule are presented in many sources that I read (for example, Art of Electronics). This rule tells me that I have to choose resistors (R1 and R2) to meet the condition:
(R1 || R2) << h21e*Re. But I don't understand the reasons for it. I read that emitter follower are available for low-resistance load (this is not clear for me).


texts: I'm looking to convert 6v AC (.5A) to 5v DC for use in charging a phone via USB. idealy a relatively inexpensive pre existing solution would be perfect, but I've been unable to find anything like that online so I'm curious how I might go about building my own. Would this be a PWM circuit? a transformer? what is the easiest and most cost effective solution.


texts: Determining peak to peak voltage of an NE5532 using an 8 ohm speaker

texts:
In order to calculate the peak to peak voltage of a an op amp (in this case an NE5532) I need to simply multiply the short circuit current from the data sheet (38ma for this IC in typical operating conditions) and the resistance of the speaker I am using (8ohms). Is this correct?

.038 x 8 = ~600mv

What I am seeing on the oscilloscope seems to tell me this is right as the speaker seems to distort when it starts going much higher than that.

Is there anything in the equitation that I am missing? What part do the supply voltage play in it? I am using -12 / +12.

Thanks


texts:
I was asked to find the Is current

I applied KVL in that loop but my ans is wrong.
what concept is wrong on my approach?Why kvl cant be applied on that loop please explain


texts: Why the ESP8266 is not sending data when working with RPS but not power bank?

texts: I have circuit which is connected in the breadboard containing components PIC16F877A, ESP8266, INA125, 3.3v regulator and load cell. The wifi is sending data to the server when connected to rps at 5v and consumed current is 0.1A but when i am connecting a power bank which has 5v and 1A capacity the wifi is not sending data(only gets power on, no tx and rx occurs).


texts:
I'm currently repairing smartphones and I usually desolder some components from damaged phones for later use as a replacement.

I usually use hot air for the task. But when trying to remove small push buttons with some plastic as a part of the button's body, I partially melt the plastic due to heat.

What is the best way to desolder components like 4 pads smd push button without melting the plastic and damaging the button?


texts: 5v hydro power generator produces almost 12v

texts:
I have this hydropower generator.

At its specs it says that it would produce a 5v voltage.

So when I have installed this to my water system, and measure it using a tester it says that it produces 11.68v. Is this normal?


texts:
The opamp functions only when EN=1, otherwise it is off. When EN =0, Zout = 6kohm.  Also, what does the opamp being "off" imply?
If the opamp is off, does it mean that no current flows inside the opamp at the output node?
P.S. this is my first time asking a question here, please guide me if I am doing something wrong.


texts: Ultrasonic range finder with single transducer

texts: I would like to make an ultrasonic range finder with a single transducer. The reason for only one transducer is because I'm limited in the amount of space I have for what I'm sensing. I've purchased the EZ01 ultrasonic sensor and it works well but I need to make my own now with a waterproof transducer. I have the transducer which is 40kHz but need to put together the other components along with my arduino. I'm wondering if anyone has any experience with this and could direct me to a schematic or any information on how to wire this up and use the one transducer as a transmitter and receiver.


texts:
I'm debugging a single I2C master (Raspberry Pi Compute Module) connected to a single slave (a TLV320AIC23B audio codec on separate board)

They are connected by 3" jumper wires (4 wires SDA, SCL, PWR, GND).  There are 4k7 pull up resistors on the master side.

About 20% of the time the slave doesn't successfully pull the line low for ACK and I can observe the following pulse in the scope:

And up close:

Does anyone know what would cause a condition like this?

When I add 220 Ohm series resistors to SCL and SDA at the slave side, the problem goes away completely, but trying to understand why.


texts:
I am trying to choose an regulator to drive an IC with 3.3V TYPICAL current consumption of 132mA at it's full operation(says datasheet)

The regulator we normally use has 150mA capacity.

Will it be safe to use this regulator? or should I look for something with bigger current capacity?


texts: Can't figure out what kind of transformer I need

texts:
I am doing some beginner project through YouTube and some books. So now I need a transformer which primary side has 3 wires while secondary side has only 2 wire. It consists 40 0mH coil(called the primary) and 2 mH coil (called the secondary) wrapped around an iron bar.
For better understanding I have given a schematic of a particular small project

So what kind of transformer this is?
And what will be the other numbers?


texts: How bad are 3 degrees Celsius for a lithium battery and electronics?

texts:
I have a PCB powered by a lithium battery , it works well inside the house, but when I leave it exposed to low temperatures with humidity the PCB or the battery stops working.
I leave the PCB in the backyard "garden"of the house inside a waterproof box  where temperatures at this time reach perfectly 1 degree celsius, it works correctly until to become night, when the temperature drops.

Could it be that the humidity, the low temperatures are causing the electronics to fail? (Only one day it showed signs of oxidation, despite being protected by the box)

this is the evidence of oxidation


texts: How would you even begin this question? You could resort to a massive amount of equations using nodal or mesh analysis, but is there any faster way to go about solving it?


texts: Help building a latch from 1 AND gate and 1 OR gate

texts:
I'm having trouble with part of a build I have to do for an alarm system circuit.  The Boolean code is I = M.(A + B + C + D + E). The +s are ORs, . is AND, and I'm using 2-input OR gates and 2-input AND gates.  When M, the master switch, is on, and any of the sensors A,B,C,D or E are triggered, then the alarm will go off i.e. LED lights up.  I need to latch the output signal once the alarm has been triggered and the latched condition should require a cycle of the master switch to reset the alarm i.e. LED stays lit until reset.  I have to do this using 1 OR and 1 AND gate.  I can't use an SR-latch.  All I know is that I need to loop the AND and OR gate to get feedback/memory so the alarm/LED will stay on until reset, at which point reset LED will light up.  Not sure how to do this.

Here's a pic of the circuit I've built so far.

As I said I'm not sure what way to connect the looped AND and OR gate to get the desired result.

I'd really appreciate some help as it's driving me bananas at this point..

ps I got some help on this forum recently as regards latching and since then I've been playing around a lot with the ciruit but I genuinely can't get it to work.


texts: What is this, a capacitor, if so what value. It's a mystery to me

texts: If anyone know what kind of electrical component  this is can you help me identify it please. Here is a picture, and I do t remember what I pulled it from.


texts:
I cant communicate with the Atmega328p. I've flashed fuses low: 0x59, high: 0xD9 and changed wiring. Now I've connected 16Mhz crystal to the XTAL1, XTAL2 pins, and 2x22pF to the crystal. But I can't read/write from/to the chip. How can I recover my avr? Is it possible?

My chip is Atmega328p.


texts: How do I work out the total circuit Current?

texts:
I am trying to work out the circuit current so I can workout the voltages across my resistors but I don't know how to change the diode Which has a 0.6V drop into ohms so i can complete the formula.

What am I doing wrong?

I know the formulas but cant seem to apply any of them because I only have the 1 value of the voltage.


texts:
$$ I = 1.43 \mu A  \space \space R_p=1.8M\Omega  \space\space R_s = 17k\Omega$$

I am trying to find the Norton current. This seems like a simple problem, but I keep getting it wrong.

I tried using current divider:
$$ 1.43 \mu A \cdot \frac{34k\Omega}{ 1.8M\Omega} = 0.027 \mu A$$
Yet the actual answer is $$1.40348964013 \mu A?$$

I am just wondering what I did wrong?


texts: Do all SDRAM applications require high-speed routing?

texts:
I am a chemistry student and I am beginning to realize that I have fallen into a EE rabbit hole..
I am trying to create a PCB (digital audio delay unit) from a schematic which includes a SDRAM, this is due to the fact that the circuit is supposed to be controlled from an external clock source and because the SDRAM is supposed to store audio data/signals (sampling).
I read that any signal(s) above 50 MHz constitute a high-speed design, requiring special routing rules. The max clock frequency that the SDRAM can handle is 163 MHz.
This is an audio circuit and the specifications for the circuit state that the audio inputs and outputs ( rise and fall time = < 1us) can range from 0-24 kHz and that the sampling rate is at 48 kHz. It also states that the external clock input can track a signal ( normally below 50 Hz) up to 2kHz (i.e from a vco) and multiply it up to 16 kHz.
So my question is, do I need to route this sdram according to high-speed guidelines when it seemingly will never need to operate above 50MHz?
Any thoughts/comments wille be greatly appreciated.
A section of the schematic with the main mcu and the sdram

First page of the datasheet

Link to datasheet


texts: Wire color coding: not sure about the correct wire

texts:
Today, I had a new PC screen at home, but without power adapter. I got the one from the old screen and I had to replace the original plug for another one, that matches with the new screen. The one problem I have is the color code. The power adapter has two output wires: one black and one white, and the other cable (the correct plug) has three wires: browm, yellow/green and blue.

The problem is: I don't know wich wire is the correct one (+/-), not sure if black is + and blue is + too or these are the other wires.

I would like to know what respresents each color code in this case (black, white, green/yellow, blue).

I can't attach any photo of it because the phone's camera is broken, so I'm adding a little "description":

From power adapter:
- Black
- White

From the new plug for the screen:
- Green/yellow (both)
- Blue
- Brown

Thanks.


texts:
I am trying to find the correct components in order to achieve the same results with a MOSFET that my current 5V relay board does.

Reason being is that I don't like all the "clicking" the relay makes when I turn it on and off and I was hoping that using MOSFETs would achieve the same results without all that clicking noise?

What would the schematic look like when hooking up a MOSFET to the digital line of a Arduino (5V max per pin)?

As an example of what I am currently using one of my relays for:

In the image above I am sending a video signal through depending on which camera I am wanting to view. Other examples are just your normal sending voltages on and off to something (max 12V).


texts: Positive Sequence (ABC) Balanced Delta Load Vector Diagram

texts:
Why isn't Vab at 0 degrees angle?
Source:
PPI PE Power Reference Manual, 4th Edition – Comprehensive Reference Manual for the Closed-Book NCEES PE Exam
Publisher : PPI, A Kaplan Company; Fourth edition (January 31, 2021)
ISBN-10 : 1591267838
ISBN-13 : 978-1591267836
by John A. Camara PE


texts:
Maybe this is a dumb question, but I am trying to get my units straight.

I have an electrical system which has its consumption metered every hour, so I need units that are graduated in hours.

So, given SI units, should I base it in "Joule hours" which would be Watts * 3600?

In other words, let's say I have a 100 Watt light bulb and it runs for 3 hours. Then energy consumption would be 100 * 3600 * 3 = 1,080,000 Joule-hours. Is that right?


texts:
I'm working on a project using a micro to control two industrial servo drives. These drives take analog inputs of -10 to +10v. My plan is to use a dual-rail opamp circuit that takes a pwm input from the micro (0-5v) and outputs -10 to 10v. My question for the community is about how to provide the dual-rail supply to the opamp. I believe I could theoretically get, say a 24v supply, use resistor divider circuit to set 12v as ref point/gnd and then get +12 and -12v at 24 and 0v, respectively. However, I am concerned about this method when there is more going on. It is my understanding that with this method I would have to:

supply power to my 5v micro using 17v and ground it at 12v
supply all power demands to the servo drive with this offset and do the same for its grounds

If these assumptions are correct, then I do not think this method will work. I have a bunch of additional inputs and outputs that require power that might make this complicated (but maybe not--I would be happy if someone could convince me otherwise). I have been looking for dual rail supplies to purchase, but haven't had much luck. I also considered using a pc power supply unit, but the current ratings on the -12v line seem too low. I would appreciate any guidance on where to move from here!


texts: HDMI Adaptor Board - Blank Screen [not working]

texts:
I have a Raspberry Pi and a custom HDMI screen board stacked as shown in the photo here.

If I use a 'standard' HDMI lead then I have no problem. However, due to the form factor a lead does not suit my application so I created a HDMI connector PCB as shown below, and this does not work (the screen just remains backlit).

The first mistake I apparantly made was assuming point-to-point connections. I metered out a lead that worked and noticed that the GND connections are not through connections. I cut all these tracks, the problem persisted. Even though I have not been able to find any evidence for not having point to point connections on any pinout diagram

I then dissected a known working cable just to double check I hadn't missed anything obvious and couldn't see anything. So then I cut down this cable to make it so it could at least get me up and running in my application ... however, the cut-down version now does not work (blank screen).

The commonality between the two is that there is no shielding and/or twisted pairs ... I thought that this might have some impact on quality, but not cause it to not work!?

There are many 'PCB' adaptor boards online, so I am sure this is not just a case of wrong impedance/shielding ....

Any thoughts and suggestions would be very welcome.

Regards,
Tom


texts: GPIO pins unintentionally all high on custom PCB (Arduino Due MCU - ATSAM3X8EA)

texts:
I made a custom PCB, using the ATSAM3X8EA which is the same as for the Arduino Due board. When I connect the power (the two holes on the far right), even before uploading any code, the LED (PC25) goes on. If I then upload an Arduino blink sketch (via Atmel ICE), the uploading goes fine but the LED is unresponsive to the pin toggle commands and stays in a high state. I've tested the voltage on other GPIO pins and those seem to be consistenly high too.
My suspicion is that there is a short somewhere, and that some pin is wrongly connected to a high voltage, but I can't see where though.


texts: EGA display converting to VGA - screen's shaking

texts:
I've recently tried to make conversion from EGA (probably, couldn't get scope to verify) to VGA to replace an old factory CRT monitor to LCD.

Screen displays fine but it appears to shake vertically in a terrible manner that make it hell to read information from it. Video presentig the issue is linked below.
What may be possible cause of this issue?

vimeo .com/235485641

EDIT:
Some informations that might appear to be useful (most have been asked in comments section):

i'm using GBS-8200 CGA/EGA to VGA converter (manual for this one specifically is here:  arcadeworlduk.com/content/CGA-VGA-Manual.pdf),
i'm trying to pass signal directly from machines graphic card monitor socket

I've soldered 6 cables to the bottom of monitor graphic card and connected them to the converter's P11 as follows:

(GROUND->black, GROUND->none, VS->white, HS->none, S->yellow, B->blue, G->green, R->red)

frequencies on yellow/white pins are: yellow-15-17Hz, white-18-21Hz


texts: Maximum power point, why do you need to change voltage again? Isn't it simply \$ P = i^2 \cdot R \$?

texts:
So I'm reading up on MPP, and I don't get it.

Let's say there's solar panel, now there's flow of electrons from solar panel, correct? That's how you get so-called "power" into the battery, right?

I don't get what's the point of Boost converter, if you just simply need to hook solar panel to battery, why does it not give maximum power point?

The so-called "explanation" is that current varies non-linearly to voltage? Some kind of IV curves, and how you need to change voltage to get MPP.

I don't get all that? Like, why?

Formula for power can be written as:

\$ P = i^2 \cdot R \$?

doesn't matter what voltage is! Just make R as big as you can, and voila! You've got the maximum power point! Why doesn't it work that way?

So R, I guess is the load, right?

I looked at circuit diagrams for solar panels, inverter and battery. And I don't quite understand why they draw solar panel as "voltage source", this is false.

In reality, you have flow of electrons from solar panel, so it's more accurate to draw current source, not voltage source... Right?

So for simplicity sake, here's circuit:

I1 is current from solar panel, say it's 50 mA, so in order to maximize charging of battery, R1 must have maximum voltage across it, correct?

Since R1 and Battery are in parallel, so they both will have same voltage.

\$ V_{R1} = i \cdot R1 \$

In the example shown, \$ V_{R1} = 50mA \cdot 1000Ω = 50V \$

And same with power coming out from resistor? \$P = i^2 \cdot R1\$

So obviously, I should just make resistor as big as I can to get maximum \$V_{R1}\$, and thus power! What's wrong with this thinking?

The only way this won't work, is if current somehow drops if you increase resistance... but why would it? ... I don't think current coming out solar panel would care... the flow of electrons just gonna keep flowing into load... no matter load's resistance... right?


texts:
Well I finally decided to get familiar with PICs and got myself a PIC18F4680 and a clone of PICkit 2. I made a simple hello world circuit as shown here:

So basically I have an LED from port A pin 0, a crystal oscillator, one of those all in one units in a can (am I using it correctly?), two 100 nF capacitors and the MCLR pin pulled high (and connected to the programmer when I'm using it).

On the programmer, I have Vpp/MCLR, Vdd, Vss, ICSPDAT/PD, ICSPCLK/PGC and AUX pins. After some reading, I found out that the AUX should be connected to the PGM pin on the PIC. I connected all pins of the programmer connected to the respective pins on the PIC.

I've tried using the PIC with the external oscillator at 40 MHz and with internal oscillator at 1 MHz and it made no difference to the main problem. I think that the oscillators are fine because I can see a 250 kHz output on pin 14 when I'm using the 1 MHz internal oscillator and some strange reading when I'm using the 40 MHz external oscillator (which is to be expected since my multimeter can measure frequencies up to 5 MHz and I'm expecting 10 MHz output, according to the datasheet of the microcontroller).

The problem is that when I connect the programmed PIC to power, it won't do anything as far as I can see. Instead I need to connect the PICkit to it, open the Microchip's PICkit 2 application and after it verifies the chip, LED starts blinking as it's supposed to with correct frequency. When I disconnect the PICkit from the circuit or the computer, the flashing LED stops.


texts: Circuit for reversing a DC Motor with two 5 pin relays

texts:
I'm manufacturing a "running boar" target for my local shooting club. The boar will have an on-board 12V battery and drive a wheel via a wiper motor. Boar starts its run on the end of a track, runs the length of the track and returns to the start.
SW2, 3 and 4 are on the boar, and are momentary.
Sprung contacts are to be positioned for SW1 (momentary), this is a remote switch, so only connected at the start and finish position. Pushing SW1 starts the boar run, and connectors will physically disconnect SW1 on short boar movement, say 50mm.
Boar runs until SW2 is hit, this disconnects the motor. Inertia is expected to move the boar on a little, and I didn't want to immediately switch into reverse.
Very shortly after SW2 is hit, SW4 is hit and this reverses motor direction.
Boar travels back to start where it hits SW3 and stops, hopefully in contact with spring loading connections of SW1.
I have added diodes to prevent feeding the motor directly from SW1 and SW4.
I'm a mechanical engineer, so would like to ask some questions.

Will this work?
Can I add an RC Snubber in parallel with the motor? Will an RC Snubber work in reverse polarity?
Are there any simplifications?
Do relay coils need protecting?


texts: Help with fixing LED night light that won't turn off

texts:
Software guy here, with limited practical electrical engineering skills (barely used a soldering iron since the university). :)

My daughter has a LED night light  using inductive charging. After dropping it on the floor, it is no longer possible to turn it off. I'm struggling a bit both with understanding the basic function as well as how to fix it.

The normal function of the light is like this: when you put it on the charging base, it turns off the main LED and a small charging LED turns on instead. When taking it off the charging base, it turns on the main LED automatically. There is also a power a switch underneath which can turn on/off the main LED.

Thing is, that after the accident charging works, and when taking it off the charging base it turns on as it should, but it is not possible to turn it off using the power switch.

Naturally I tore it open, unsurprisingly finding a coil, a rechargable Li-ion battery, a power switch and a circuit board. One of the cables to the power switch was severed. To be honest I'm not even completely sure where it's supposed to be connected, but it looks like it's been connected just next to the other end, through holes in the board and soldered on the above side.
Before starting any soldering I've tried to just manually hold the cable to the connector where I assume it should go, but with no luck - the LED still turns on but cannot be turned off using the switch.

So, first of all, how does this work? How can a closed switch turn OFF a LED, and an open switch (or severed cable :)) keep it ON? I know way too little about LED's, obviously.

Second, is it possible for someone with more knowledge to tell me how I should fix this, from the attached photos?


texts: How to use the print step option in LTspice XVII?

texts:
I'm aware of the print_step option for transient analysis, but I can't seem to get it to work.
I'm using LTspice XVII for windows 10 to simulate a DC DC converter for about 3s (It is necessary to do it that long).

I use '.tran 100us 3s 0', so I would assume that only every 100us a data point is saved and when I convert to a .txt file I would get about 30000 data points per trace. But whatever I fill in for {Tprint}, nothing changes.

ALso when I change e.g. the stop time or the start time through the UI, the Tprint entry resets to 0, which is peculiar.


texts:
I have an SDR (RTL2832u) that connects to an antenna and can receive over the air just fine. I'm wondering if the signal of a home cable connection would be too strong to connect to the SDR input or is it safe?

Say for example my home cable modem transmit power is 35dBmv. Downstream power is showing around 10dbmv. Is this too much RF energy to feed into the SDR's antenna input?

EDIT:
My capture card uses the e4000 Elonics tuner. datasheet.

Thanks!


texts: How to distribuite high current in multilayer PCBs

texts:
I'm designing a 150Amp controlled rectifier and I'd like to know how to distribute the current using a multilayer design.

Currently, I have a 4 layer design containing:
Top Layer: 6oz, Vdc+ and Vdc-
Internal Layer 1: 1 oz, Vcc and some control traces.
Internal Layer 2: 1 oz, GND and some control traces.
Top Layer: 6oz, Vdc+ and Vdc-

I have used online calculators to know the minimum width of the traces, and for physical restrictions, there are some cases that I'm close to the minimum. Then, I have to go to a thicker board (which is not an option because our provider works up to 6oz). Then, I was thinking of using the internal planes to distribute some power current too:

Top Layer: 6oz, Vdc+ and Vdc-
Internal Layer 1: 1 oz,  Vdc+ and Vdc-, Vcc and some control traces.
Internal Layer 2: 1 oz, Vdc+ and Vdc-, GND and some control traces.
Top Layer: 6oz, Vdc+ and Vdc-

Vdc+ and Vdc- will be connected in the four layers through capacitors-IGBTs vias. The internal planes will have a bigger resistance but lower current, but I'm not sure about the heat dissipation and/or other technical problems that might arise.

I'd like to know if some of you have some experience in this subject and can provide me with the pros and cons and/or providing some references that deal with similar problems...


texts:
I was looking at the datasheet of AD620 instrumentation amplifier. It had a circuit for measurement of EMG signals.

The gain of 7, as written on the amplifier, is justified for this amplifier configuration, as Gain= (1+ 49.4kohm/Rg)  with Rg=8.25kohm. But what's the purpose of adding this additional circuit here (highlighted in green). I think it is for creating some reference. But how? And won't it cause any deviation from the gain of 7?


texts: What is the maximum rate at which two PCIe 1.0 device can communicate with each other?

texts:
I went through some PCIe documents. What I found is " transfer rate of PCIe is 2Gbits per second. So 2 Gbps is the maximum rate or is it the only rate at which two PCIe device can communicate?

Edit:  Is it possible to transmit data at 1 Gbps using PCIe 1.0?


texts: How do I prevent line wrapping in HSPICE output tables?

texts:
For example, I have the following .measure lines in my HSPICE netlist:

.measure a1 <measure_spec>
.measure a2 <measure_spec>
.measure a3 <measure_spec>
.measure a4 <measure_spec>

It annoys me that HSPICE outputs the table (with the .mt0 extension) line-wrapped:

a1    a2    a3    a4
  temper    alter#
1.23  4.56  3.21  4.32
  25.00     1

How do I prevent it from wrapping the lines?


texts:
I want to build a USB peripheral device. The Device is to connect to an Android smartphone with USB OTG capabilities. The smartphone will be a host and will run an app that communicates with my device. I want to design that peripheral device from scratch i.e. create my own PCB.

USB peripheral controller chip - I was researching for chips that I could use for my device but then I thought that I should get an eval/dev board to train on, first. I want to be able to set up and program the chip so that it communicates with android phone. I don't want these FTDI usb-to-serial converters because they seem unprofessional and I would like to have a proper usb-to-usb communication.

Questions:

Are there any reasonably priced eval/dev boards for USB chips ?
Can you recommend any specific chips ?
I'd like to learn more about usb, I've researched a bit and I'm a bit confused - would writing my own usb drivers for my device be too crazy ?
Is there anyone else who done something similar that could share their experience ?
Should I ditch my plan entirely and just get some sort of an off-the-shelf solution ?


texts: Clock Frequency for 4 digit 7 segment display in VHDL

texts:
I am using basys 3 and VHDL to create a stopwatch and I need to do it for both the 7 segment display of the basys3 itself and for a external 4 digit 7 segment display. I am given the clock divider code for the 7 seven of the basys3 by my instructor and I managed to do the stopwatch. When I changed all my constraints to the PMOD pins and connect to the external 7 segment I can see that it works because it stops and resets but it does the counting so quickly that I can't read at all.

I am thinking that the problem may be because of the clock divider and the frequency of the clocks. The given code states that since the original clock of the basys3 is 100 MHz a counter will count up to 500000 to obtain a 100 hz and another counter will count up to 208334 that is 240 Hz.

First of all I didn't understand why the second clock is 240 Hz and why do the counters count up to these irrelivant numbers. Secondly what can I do for the external 4 bit 7 segment to slow it down?


texts: Current delivered by the vehicle alternator

texts:
I have a vehicle alternator with following parameters: 14V, 140A. In parallel to this alternator is connected 14.4V vehicle lead acid battery. The alternator is used as a power source for a load which consumes 115A. Please see the attached circuit diagram.

This circuit works in an operating point where the alternator delivers 105A and the rest 10A for the load are drawn from the vehicle battery. Due to this fact the vehicle battery is being discharged which is of course undesirable. I am not sure whether I understand why the vehicle battery is being discharged in a situation when the current drawn by the load is less than the alternator nominal current. Does anybody know the reason? Thanks in advance for any ideas.

The alternator is Bosch 0124 525 064. The combustion engine is simulated by a three phase induction motor supplied from the voltage source inverter. The induction motor has 1500 rpm synchronous speed and there is a belt transmission with ratio 2:1 so the alternator works at approximately 3000 rpm.


texts: LED resistor on 3.3V source - what happens to LED current/voltage drop?

texts:
This may be very basic here but for some reason I can't seem to wrap my head around it.
I've got a chip delivering 3.3V to drive a LED. The LED has a typical 3.2V voltage drop and max 3.5V.
First off, yes I can pick another LED but now I'm curious.
Assuming a 3.2V drop at 20mA (typical for LED) I would need a 5ohm resistor in series.
Now the thing that might be so basic but I'm not sure about:
When I increase the resistance, will the current decrease or will the voltage drop across the LED decrease, or both?
I know that most likely my LED will shine less brightly but that is not the problem. It might be half for all I care about. What will happen if, for instance, I were to use a 400ohm resistor?
Please could it be elaborated on why the one happens or the other?
EDIT:
Data sheet of the LED.


texts: How does a 44E21D hall sensor work? And how to wire?

texts:
I've got this component and I don't know how it works. I'd like to how how it works and how to wire it because i want to rebuilt the pcb and modify it a littlebit.

All I know is that it's a sensor for a motor to measure it.

It has 3 pins and I assume it has something to do with PNP.


texts: solar panels: multiple roof surfaces on one inverter string?

texts:
Notice below part of electric scheme as designed by solar company:

On the left you can see inverter used - Delta Solivia 7.6 TL
(see Operation and Installation Manual for details) which supports up to 4 strings of solar panels.

Legend on the right side:

MP2 and MP3 are different roof surfaces (slopes). This is important for the whole story below: MP2 and MP3 surfaces are pointing towards different azimuths (so peaking energy production at different times of the day/ peaking voltage at different times);

You can see that the design has only two strings used (marked as "4" and "6" on the diagram):

String "6" (the upper one) has panels from both surfaces (!) - and that's why I created this question - it seems to me a big problem right here as, again, panels on roof surfaces MP2 and MP3 peak voltage at different times of the day so that panels on MP2 and MP3 would only provide voltage of lowest ones of them !?
String "4" has panels from surface MP2 (only) but also notice that some other solar panels from that same surface MP2 are also connected to String "6" (probably okay).

Can somebody please confirm if that's a valid concern above?
I thought that was the whole selling point of microinverters (which this design doesn't have) - is that each panel can produce slightly different voltage, and so energy production can be combined efficiently. That's very strange (to say the least) that they've used panels facing different azimuths - on one string ..

This will work, but it will not be optimal. What they should have done is: use one or two strings for surface MP2 which has more panels, and a separate (third) string for surface MP3. Does this make sense?


texts: What material are the thin, colored wires in my headphone cable?

texts: My broken headphones have different colored wires. Are the red, green and blue wires all copper? The colored wire is wrapped around a white thread.


texts:
This link says that the bandwidth is the frequency at which the magnitude of the frequency response is decreased by 3dB from the value of the initial horizontal asymptote.

But wikipedia says "In signal processing and control theory the bandwidth is the frequency at which the closed-loop system gain drops 3 dB below peak."
So, should the bandwidth be calculated from the initial horizontal slope or from the peak value ?


texts: Which areas do I remove copper pour to reduce noise?

texts:
I have a 2 layer PCB that carries a microcontroller (Particle Electron), connects to a sensor with an ADC reading, has an ADC comparator IC, a watchdog timer IC, a PNP switch, an power bus and I2C lines.

To protect the Analog reading line from EMI, should I be removing the ground pour around certain areas/ICs? For example, I am thinking of removing the ground pour around the watchdog timer IC because it may be introducing some noise. Does removing ground pour in this situation help, or hurt?


texts: Implement \$AB \overline{C}+\overline{BC}\$ using only a maximum of three 3-input NAND gates only

texts: I need help with this question, I am lost.


texts: 5V to 3.3V what is wrong on my schematic?

texts:
I made a schematic based on the SY8089A1AAC(Datasheet)
My schematic(I tried with and without C8):

I soldered everything but the output is 0V(0.04V to be precise)
What is so wrong ?
It is part of a bigger PCB which does not have any other components soldered at the moment. Only the ESP32 and the DC/DC circuit.
Power to the DC/DC circuit is provided with 2 little cables soldered temporary on the pcb from USB +5V and GND (measured the voltage and it is 5V..)

I tried to "copy" the schematic of LilyGo which is based on SY8089AAAC(datasheet)


texts: Algorithm for finding next data in eeprom

texts:
I have an EEPROM and I'm storing data in it, from address 0x00 to 0xff. I have to scan the EEPROM regularly for non zero values.

eg:

address  0x00 0x01 0x02 0x03 0x04......0x0A 0x0B 0x0C.........0xFF
values    0    0    1    1    0          0    1   0             0

If I do a scanning function to find first address of value I'm able to do it. But, how will I bypass the first detected address (0x02), and find the next address in the second call of function?

Note: If we encountered more than one consecutive 1's, then the first address is taken (0x02).

I will be extremely happy if you provide some technique to tackle this.

int scaneeprom(void)
{ static unsigned int x,
  static unsigned int counter;

for(i=0+counter; i<255;i++)
 {
     while((eepromread(i++)!)==0)
 {
      x=i;
      counter++;
}

 return(i);

}

  This is suppose to scan from 0x04-0xff on the second call.

I would appreciate your input that will rectify my mistake.


texts:
I'm making a voltmeter for the college senior project, and the problem is that voltage divider should equally split 17V into two 9V(nominal value of the batteries. As of now, an actual voltage is 8.5V and eventually will go down as the batteries die, so don't freak out too much by my round errors.) sources, but as soon as I connect Arduino board to the circuit, voltage( across the resistor it's connected to) drops to 2-3 Volts. Which is apparently enough to power the micro controller, but not enough to light the display up. (it's also enough to use the other resistor as a space heater with 14 Volts across it).

Please feel free to look at the schematic of the device provided above.
(either models, or specs of the components are written on the schematic)

Now I'll explain the design thoroughly:
The idea is to use piezoelectric element (thin laminated  flexible piezoelectric beam), place it into a fluid flow (air) and rectify the outgoing AC signal with a full wave bridge. The next step is to amplify the signal, because it has very low magnitude and arduino analog pin can't register it without amplification.

Amplifier needs at least +-7V supply, so it's provided to it from the two 9V batteries, that are connected to a voltage divider. Therefore, the virtual ground of the circuit is in between the two batteries.

At the same time I want the arduino board (Actually it's not arduino, it's arduino compatible board dubbed Pro Micro 5V) to be powered from the same two batteries.

The whole thing works fine from USB, but from the batteries it works as it pleases!

Here are the design constraints of the device:

The entire device shall hang somewhere in a remote location, so it has to be powered from an autonomous power supply (two 9V batteries in my solution).
The device should be as light, and as small, as possible. (solutions like adding another battery are not desirable).
Arduino board have to have 5V on it to light the display.

Additionally I'd like to learn why micro controller has variable input resistance and what it depends on.
I've tried to figure out what is the resistance across the arduino's ground and RAW by assuming that the resistor of the voltage divider and the arduino are connected in parralel. In three different setups I've got the arduino's resistance to be equal to 221.93, 527.73 and 743.4 Ohm.
As I understand, the board has some kind of reducer at the voltage input that prevents the board from burning at supplied voltages above 5V and below 12V, but why it drops the supplied voltage from 8V to 2-3V?


texts: Capacitors with same voltage, same capacitance, same temp, different diameter?

texts:
I recently had an old LCD monitor power supply go bad and figured I would try replacing the caps, all four of these were bulged and or leaking. They are all rated to 105 degrees C, all 1000uF and 25V yet two of them are much higher diameter. In my experience with a physically larger capacitor, you either get more voltage (more plate separation?) or more capacitance (more plates?), why are these caps different diameter?

Side question, the board had more than enough space for the larger caps everywhere, why not use the large (or small) caps everywhere for higher quantity discounts.


texts: Block diagram of 16:1 MUX using four 4:1 MUX only

texts: As far as I know we can make a 16:1 MUX using five 4:1 MUX. For four 4:1 MUX, I think we have to apply NOT to different selection lines but I am not getting the correct configuration to do that.


texts: How to identify the positive and negative connectors on a PCB connector

texts:
It's possible this question has been addressed, but I don't understand the terminology to know if it has.  I have taken apart several of my older BNC-style home security cameras.  What I'd like to do is take the infrared light board and power it up independently to be a supplement night light to the replacement cameras.

The top-right board is the back of the camera.  The bottom-right is the back of the IR board.  The bottom-left is the front of a different IR board, for perspective.  My goal is to figure out how to wire up a 12v source (because that's what the power to the camera was) to just the IR board to have it stay on all the time.  I'll plug it into an Zigbee compatible plug to control when it turns on and off.
But I have no idea which of those 4 leads are the positive and negative.  Is there a way to tell (other than guessing), which ones are the power connectors?
Thanks!


texts:
I am very new to the electrical design and had a very basic question. I am trying to program a Atmega328p using the MCP2221 interfacing chip. I picked this chip due to it being the only converter I can find in a dip package/ so package. Looking at my design I have connected the reset pin from the chip through a 100nF cap to the reset pin on the atmega. I got this design from the arduino uno ftdi setup. Would this work in order to program the atmega when it already has the arduino bootloader loaded on it?

Thanks.


texts: Suppose there are two identical capacitors of capacitance C and one of them is charged to a potential V and gets a charge q. The energy stored in this capacitor is \$1/2cv^2\$ or \$q^2/2c\$ . Now this capacitor is connected with the uncharged capacitor. Now the net energy of this system will be \$q^2/4c\$ . How is the other half of the energy lost ? Where does it go ?


texts:
In my project based on stm32F107 i use four pins (PINE 12-15) to catch rising level on them.

My problem: two pins always produce external interrupts but there are no rising level on them and other two pins never respond to rising level.

My question: i'm looking for some debug ways and may be advices. May be reading some registers in the interrupt routine will help to solve my problem.

      RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOE, ENABLE);

      GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
      GPIO_InitStruct.GPIO_Mode  = GPIO_Mode_IN_FLOATING;

      GPIO_InitStruct.GPIO_Pin = GPIO_Pin_12;
      GPIO_Init(GPIOE, &GPIO_InitStruct);

      GPIO_InitStruct.GPIO_Pin = GPIO_Pin_13;
      GPIO_Init(GPIOE, &GPIO_InitStruct);

      GPIO_InitStruct.GPIO_Pin = GPIO_Pin_14;
      GPIO_Init(GPIOE, &GPIO_InitStruct);

      GPIO_InitStruct.GPIO_Pin = GPIO_Pin_15;
      GPIO_Init(GPIOE, &GPIO_InitStruct);

    RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);

      EXTI_InitStructure.EXTI_Mode    = EXTI_Mode_Interrupt;
      EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising;
      EXTI_InitStructure.EXTI_LineCmd = ENABLE;

    // KeyI_0
        GPIO_EXTILineConfig(GPIO_PortSourceGPIOE, GPIO_Pin_12);
        EXTI_InitStructure.EXTI_Line    = EXTI_Line12;
        EXTI_Init(&EXTI_InitStructure);

    // KeyI_1
        GPIO_EXTILineConfig(GPIO_PortSourceGPIOE, GPIO_Pin_13);
        EXTI_InitStructure.EXTI_Line    = EXTI_Line13;
        EXTI_Init(&EXTI_InitStructure);

    // KeyI_2
        GPIO_EXTILineConfig(GPIO_PortSourceGPIOE, GPIO_Pin_14);
        EXTI_InitStructure.EXTI_Line    = EXTI_Line14;
        EXTI_Init(&EXTI_InitStructure);

    // KeyI_3
            GPIO_EXTILineConfig(GPIO_PortSourceGPIOE, GPIO_Pin_15);
            EXTI_InitStructure.EXTI_Line    = EXTI_Line15;
            EXTI_Init(&EXTI_InitStructure);

    NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
      NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
      NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
      NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn;
      NVIC_Init(&NVIC_InitStructure);

 void EXTI15_10_IRQHandler(void)
{
  printf("exti\n");
  if (EXTI_GetFlagStatus(EXTI_Line12) != RESET) {
    EXTI_ClearITPendingBit(EXTI_Line12);
    printf("key1\n");
    //keyboard_StringStart(0);
  } else if (EXTI_GetFlagStatus(EXTI_Line13) != RESET) {
      EXTI_ClearITPendingBit(EXTI_Line13);
      printf("key2\n");
      //keyboard_StringStart(2);
  } else if (EXTI_GetFlagStatus(EXTI_Line14) != RESET) {
      EXTI_ClearITPendingBit(EXTI_Line14);
      printf("key3\n");
      //keyboard_StringStart(3);
  } else if (EXTI_GetFlagStatus(EXTI_Line15) != RESET) {
      EXTI_ClearITPendingBit(EXTI_Line15);
      printf("key4\n");
      //keyboard_StringStart(1);
  }
}


texts: Verilog design question: How to generate internal interrupts without delay?

texts:
I made a single-cycle RISC CPU in Verilog, and it works well on a real FPGA I have. It has multiple components that communicate over an internal bus. One of these components is a programmable timer, that has a prescaler and counter, and has multiple ways of counting time. It works fine, and can generate PWM output (verified).

My problem lies with the concept of timer generated interrupts: Many microcontrollers can generate internal interrupt signal when the timer counter resets, and so does my timer. It has an interrupt line, that it pulls low when it wraps around:

always @(posedge clk or negedge reset) begin
    if(!reset) begin
        timer_irq <= 1'b1;
    end
    else begin
        if ((prescaler_value >= (prescaler_threshold))
             && (counter_value >= (counter_threshold))) begin
            timer_irq <= 1'b0;
        end
        else begin
            timer_irq <= 1'b1;
        end
    end
end

This logic works fine conceptionally (verified in simulator and with a logic analyzer on real hardware: The interrupt signal is generated when it should be), but it will not be sampled by my CPU, since it also samples the interrupts in the write-back phase on rising clock edge:

always @(posedge clk)
begin
  // ...
  if (((~irq_sources & irq_mask) != 3'b0) && (in_isr == 1'b0)) begin
      ipc <= pc_next;
      pc <= irq_target;
      in_isr <= 1'b1;
   end
   else begin
      pc <= pc_next;
   end
end

So the interrupt goes low when my clock goes high, and the FPGA does not sample this as an interrupt. It basically "just misses" the interrupt. My interrupt implementation works fine with external interrupts. Maybe the problem appears because of propagation times? Does anybody have a hint how I could design this better?

Here is a GTKWave plot of the problem: The interrupt is only "sampled" one clock cycle later (the main program is idling at address 0x0028, and the ISR is at address 0x002C)


texts: Satellite array antenna beamforming - basic intuition help

texts:
When you see a satellite coverage region on the earth, the array antennas form tens of circles (small coverages) in a large coverage. My question is whether all these small circle coverages exist at the same time.

My understanding was the beam forming network delays the signals to all the antenna elements in different amounts. This means one signal of a particular frequency going through all the elements and then radiating into space will have radiation from the elements adding constructively and deconstructively at different points. We can adjust the phases so their add constructively in a desired direction so peak radiation is focused at a particular earth coverage area.

But can multiple signals go through the array and all be simultaneously be focused to different points on the earth? Meaning all those small coverage circles exist at the same time?

Please help, thanks


texts: It's known that forward drop of diodes has exponential V-I dependence, and -2mv/°C V-T dependence. But what about reverse drop of Zener?


texts: Electric current felt over the case occasionally!

texts:
We have made one vacuum former for dental medical usage.

In testing, the operator reported:

1-Electric current felt  over the case of the  device occasionally!

2-hanging in some routines occasionally! ( maybe  noise or ...)

So in my country we have only phase and null in home electrical wiring, so I guess this is because of ground fault current.

The circuit schematic is here:

Controller part's Circuit Schematic:

Or in this PDF

We have used one transformer at the power source with isolation from metal case body, does this transformer prevent from  the ground electric current fault in the device's case (isolate the circuit from this ground current !),if yes does why this happen?

We used ordinary electrolytic capacitor and the second side of transformer as input of the controller board as you can see in the middle pic in second row , they are black  cap on the top C6 And C7 with value of almost 3300 uf. Is this related to case electrical shock current?

So do you know why this happened and how could we solve this electric current shock problem and could this shock current could be the reason for the second problem (hanging in some routines occasionally?)


texts: Is there any need of EMC/EMI shielding of LCD used for Aviation pruposes?

texts: We have a TFEL technology display which uses Indium tin oxide (ITO) Coating for EMC/EMI shielding. Now we want to replace it with newer LCD TFT display. the question is would ITO coating is needed for LCD EMC/EMI shielding?


texts:
The circuit diagram is taken from TI's LDO Basics. I don't understand how this circuit regulates the voltage, and neither do I know where I should start. But here's my attempt (with some values plugged in for better intuition):

Supply a 2.5V \$ V_{REF} \$ to \$ V_- \$ of the opamp. By virtual short, \$ V_+ \$ or \$ V_{R2} \$ will also be 2.5V.
Since \$ R_1 \$ and \$ R_2\$ forms a voltage divider, for \$ V_{R2} \$ to be 2.5V, \$ V_{OUT} \$ has to be 5V
\$ V_{SD} \$ is also 5V (\$ V_{IN} - V_{OUT} \$)
Any fluctuation or difference between \$ V_- \$ and \$ V_+ \$ will take the opamp's output (\$ V_G \$) to either rails (10V or 0V).
If we start with \$ V_+ > V_- \$, then the opamp will swing to the positive rail and output 10V, and \$ V_{GS} \$ is essentially zero (\$ V_S - V_G = 10V - 10V = 0 \$). The PMOS is switched off, and \$ V_{OUT} \$ will be 0V.
Following step 5, \$ V_{OUT} \$ is zero and so will \$ V_+ \$. We have now \$ V_- > V_+ \$ and opamp will swing to the negative rail which is ground, and output 0V at \$ V_G \$. Since \$ V_G \$ is more negative than \$ V_S \$ for the enhancing PMOS, the transistor conducts in the saturation mode with an effective resistance that consumes half of the supply to leave \$ V_{OUT} \$ at 5V

According to my analysis, \$ V_{OUT} \$ should fluctuate between 5V and 0V because \$ V_- \$ and \$ V_+ \$ can never be perfectly equal. But an LDO should output a stable 5V - how does it work and in which steps I had my thinking wrong?

[EDIT]
Let me try to visualize @Rohat Kılıç and @tobalt's comment to see if I understand them correctly. So \$ V_{SG} \$ changes the operation point and thus changes the current \$ I_D \$. The relation between gate voltage \$ V_{SG} \$ and the drain/source current \$ I_{D} \$ is what produces the so called "variable resistor" effect.  If \$ V_{OUT} \$ drops below 5V, the PMOS drives a higher \$ I_{D} \$ through \$ R_1 \$ and \$ R_2 \$ to increase the \$ V_{OUT} \$.
And vice versa: when \$ V_+ > V_- \$, opamp's output will increase positively at \$ V_G \$, causing \$ V_{SG} \$ to drop, less current \$ I_{D} \$ to the voltage divider, and output voltage to drop until it hits its regulated target of 5V.


texts:
In my circuit I am seeing strange behavior from my piezo. I am driving a 4Khz (TDK PS1240P02BT) piezo buzzer with a BSS138K N-channel logic-level enhancement FET. The PWM output of my microcontroller (PIC18) is connected directly to the gate of the transistor with a 100K Ohm pull-down also attached to the gate. The PS12 piezo has a 1K Ohm resistor in parallel just like the data sheet recommends. The voltage driving the piezo is 12V, and the gate voltage is 3.3V.

Circuit:

Edit: Added potential simulation with Olin's suggested clamping diodes:
simulation

The issues I am seeing are dying transistors, piezo volume dropping during longer tones, and the piezo failing to work for a while after playing, and then working again after "resting" for a while.

I have a couple of questions:

Any ideas why the transistors are dying? It doesn't appear to be getting too hot.
Is there a way to determine the impedance of the piezo? It does not appear to be listed in the data sheet. I tried modelling the circuit but this is difficult to do accurately when the capacitance of the piezo is unknown. I did see much higher current spikes than expected when using ~100nF values.
The data sheet lists the piezo at 3.3VP-P, but says it can tolerate up 30V with no DC bias. Is running this through 12V going to destroy the piezo?
Generally, are current limiting resistors and flyback diodes needed for piezo drivers, and if so how does one calculate the value of the resistor?
Finally, as an aside, would the piezo survive in an automotive environment (my current problems occur on the bench with a regulated supply), e.g. would the voltage transients quickly destroy the piezo?


texts: Linear increase of collector current in CE mode of a BJT

texts: Why is there first, a linear increase in the collector current in the output characteristics of an NPN BJT in CE configuration if we increase the Vce(collector-emitter) and then the current remains almost constant.?Is there an easy explaination? My book just has the graph but doesn't provide an explanation.


texts: What is the name of this connector (Apple Time Capsule)?

texts:
I salvaged a power supply from an Apple Time Capsule (Delta Electronics ADP-30HF A). This connector was connected to the main board of the time capsule tot supply it with 5.1V.

What is it called?


texts: Impossible filter design on bad amplifier

texts:
I just recently created this audio amplifier. I built it with real components and it works great. I built it without the "EQ" parts though, since I had not created them yet, so I don't know if they actually work, but they do work completely as I expect on Falstad Simulator.
Now I decided to create another audio amplifier, which so far looks like this:

simulate this circuit – Schematic created using CircuitLab
It works as I expect on Falstad Simulator.
The problem is, I seem to be unable to implement a filter on the audio input. I have tried moving the audio input around, splitting the filter into multiple blocks at different locations, but nothing works. Somehow I seem to only be able to either do a high pass, or a low pass, but not both at the same time with just passive components. I'm suspecting it has something to do with Q1 not being where the audio input signal wants to flow to, but I still couldn't do anything about it.
The filter I'm trying to make is a band reject that diminishes 1.1kHz to 0.35 its level with a certain valley width. I implemented it successfully (at least with the results from the simulator) on my previous audio amplifier circuit.
The intended filter looks like this:

What could I do?
Is my circuit just bad?
Here are some of my many attempts at the filter:
Attempt A
Attempt B
Attempt C
By the way, I'm creating these circuits myself. I think people in the comments seem to think I'm getting them from somewhere. I am totally against copying and executing other's ideas and fully trusting they will work for you even though you have no idea what you're doing or don't understand how those ideas are supposed to work. I'm here trying to learn.


texts:
i'm using zc706 (xilinx) eval board.
I want to connect ZC706 and custom board for transcevier.
The zc706 board has SMA, SFP+ connector for GTH trancevier.
Can I use SFP connector for just cable with using only tx/rx pin like figure below (molex 74441-0010)


texts:
How to convert any MATLAB code(.m file) to VHDL(.hdl code). As i have to use my image processing code in a FPGA kit. Any solution?

Possible method: Using hdl coder in simulink, converting the original code into
an embedded matlab code.
Areas of concern: Image processing, converting .m to .hdl, EMBEDDED
MATLAB, how to fetch an image file in EMBEDDED MATLAB code?

Please give any example and explain.


texts: SMD LED polarity marking: is the cathode marking standardized?

texts:
SMD LEDs normally have some kind of marking like the following image from here indicates:

The site states

  The CATHODE lead is  always the lead to be identified with ALL LEDs, including surface-mount LEDs.

There are definitely manufactures that do NOT follow this scheme like this one from CREE.

We recently had 300 PCBs manufactured where each had 32 LEDs of those. However, the assembly house placed all LEDs in reverse. The first thing we obviously did was looking at our board layout.

If you assume that always the cathode is indicated, the footprint is correct. However, it is not consistent with the marking of the actual LED that was mounted. The manufacturer probably just looked at the matching markings.

Long story short, the manufacturer checked their production and "admitted" that it was their fault. Actually, we worried that they just "but the marking says otherwise".

This could have ended up in a long discussion about who's fault this was, so:

Is there a standard that defines that the marking actually HAS TO indicate the CATHODE?
Has the assembly house to double check something like this?


texts: Can I use 1 resistor for both inputs of an RTL NOR gate?

texts:
I am working out the ideal RTL NOR circuit to use as universal gates for a large project.
Based on what I've found on Wikipedia, to implement a NOR gate using BJTs and resistors, we have the following:

In this case, R3 & R4 provide paralell input to the base of the transistor.  We can ignore R1 as it really isn't required for silicon transistors.
Inputs A and B seem to supply the same 5V whether they are both high or not right?  To test it, I have implemented this NOR gate like this:

The pullup resistor is 1K ohm and the input resistor that both inputs go through is 10K.
The transistor is a 2N3904.
I've tested this NOR gate and the truth table it yields is right on for NOR.  I'm wondering if this simplification has any implications that I'm missing.  Is there a specific problem with fan-in here?  Ideally, I'm looking for the simplest circuits for mass production.  I would like to avoid any complications that may arise when combining many NORs to produce other gates.


texts: Adding indicator LED to optointerruptor circuit?

texts:
This question relates to my earlier question on how to wire an optointerruptor:Figuring out wiring of optical encoder

I was able to get the optointerruptor working using the circuit below. I wanted to add an LED to indicate sensor state. The blue LED in the image below is what I tried initially. However this doesn't work: the result is that with the LED connected, it will light and show state, but the input to the microcontroller (an Arduino) stops showing correct state. This is totally confusing. Why would the LED interfere what the Arduino can read (as a digitalRead)?

I've breadboarded the circuit and it seems to work - but in my actual project it doesn't. As a starting point in figuring this out, is the circuit below wrong?


texts: How to find load impedance when input impedance and reflection coefficient over range of frequencies is known

texts:
I know that there's a relationship between input and load impedances and reflection coefficient and it's given by following expression:
Г=(Zload - Zsource)/(Zload+Zsource)
However, the problem is that this cannot be used when we only know that Zsource = 50ohms  and when it comes to reflection coefficient, we know it's graphic representation over a range of frequencies. Let's say it looks something like this:

Now, it is possible to determine load impedance when we choose value of reflection coefficient for one particular point on this graph (meaning one particular frequency), however, considering the fact that load impedance can be complex value, i cannot find a way to determine unique value for load impedance this way. I need to create impedance matching circuit for load that produces reflection coefficient shown in picture for source with 50ohms resistance. Any help is appreciated!


texts: How can shot noise be dependent on dc current, not instantaneous average current?

texts:
After looking at the formula of shot noise and its derivation, I thought current in shot noise refer to instantaneous average current, not dc current. By instantaneous average current, I mean current that would have been obtained if not for noises. DC current, as far as my usual understanding goes, refers to dirac delta spike magnitude in zero frequency when current is fourier-transformed, or average of current over time.

Derivations heavily suggest that current being used is instantaneous average current, but all sources I looked at say current in the formula is dc current.

Can anyone clarify what is going on here? For specific context, I am thinking of noise inside MOS transistors.

Edit:

So spectral shot noise density is said to be S(w) = 2q|I_d| where |I_d| is "dc" current and q is electron charge constant. Current I can be I_0 + I_1 cos(w_1 t) + I_2 cos(w_2 t) +.. with I_i being constants. and usually I_0 is said to be dc current. My question is whether I_0 is |I_d| in spectral shot noise density, or I itself is |I_d|.


texts: What is the purpose of these plastic "wings" on this power plug

texts:
The plug in the picture has plastic "wings", which seem to have no other purpose than to irritate when trying to insert multiple devices into a power board. The wings do not allow cords to be plugged in on either side of the plug.

I am wondering why they are there. There is nothing inside of them and no damage at all would occur if they were removed. This particular example is for an external hard drive, but I have seen several plugs of this sort for various devices.

This is an Australian plug. The only other information I can find on the web is this old forum post which does not give a clear answer.


texts:
I have a Fusion5 tablet which is not working. There is a mosfet which gets very hot when I plug it in so 1st thing I want to replace. But I'm looked online and can not find where I can get a replacement. Is there places which sell there or can I get an alternative? Marking on one below which seems to be the same is 8029.
Thanks!
P.S to the left of the mofset is the DC jack. When I plugged in I used micro USB to charge as currently don't have the correct power adapter.


texts: Stabilizing the 12 volts from a car battery

texts:
I'd like to put a small gadget that I made into my car and power it from the car battery. The gadget works on 12 volts and the car provides 12 volts also. And the consumption would be somewhere around 2-4A.
However as I understand those 12 volts from the car are not very stable and can have short spikes up to 60 volts. Which would be a problem for my board.

Could you recommend a good way to stabilize those 12 volts from the car?
I'm wondering between maybe buck converter, linear stabilizer and overvoltage protection.

Thanks!


texts: How to solder large smd components on a PCB with 2oz copper

texts:
I’ve got a large inductor that needs to be soldered to my board. The pads are hidden underneath the component so hand soldering is not an option. The data sheet says to reflow at 260c for 40 seconds max.

I did just that with a hot air gun and pre-heating underneath at 180c. I still couldn’t get any flow after a whole minute since the thermal mass is just so huge.

My super wide 2oz copper traces aren’t helping either. How do I solder this part?


texts:
While the problems I am having span across several projects of mine, the common denominator is the electromagnet present in each project. I have made three electromagnets and none of them seem to be generating any magnetic flux. My research tells me that the determining factors of electromagnetic field strength are amperage and the number of turns of enameled wire, and my gut is telling me that amperage is the problem, but I'd like to be sure before I post another question regarding amperage.

I am using 30 gauge enameled copper for all three. Separate tests indicate that the wire is operating as it should.

Electromagnet #1 has a ferrite core that is 0.5" long and with 150 turns of wire using a total of 21.875' of wire.

Electromagnet #2 has a stainless steel bolt for the core, is 2.25" long, and has 450 turns of wire using 37.5' of wire.

Electromagnet #3 is a toroidal inductor that I wound myself. It uses a ferrite core, has a median circumference of 3", and has two wires turning around it. Each wire has 300 turns and uses 31.25' of wire, for a total of 600 turns using 62.5' of wire.

The power source for each electromagnet is a generic alkaline 9-volt battery. My gut tells me that this battery does not provide enough current, but even adding more batteries does not improve the electromagnet.

Which factor is to blame for my failing electromagnets? Am I missing something?