texts: Designing a PID control with plant controlled using relays

texts:
I am working on a project to design a Controlled (Constant Current) DC Battery Charger.
The charger has a variable transformer (Plant). The output of which is fed to the batteries to charge them via a rectifier circuit.
The winding of the variable transformer(Autotransformer) is controlled via a Motor (Fixed RPM synchronous motor with only two relays as input for forward and backward rotation). The motor changes the number of windings of the transformer, eventually controlling the output voltage and thus maintaining a constant current through the batteries.
Also, Steady-state error is negotiable, and the user can change it as per requirements.
Schematic attached below.

The plant is controlled via two relays ( forward and backward motion of the motor, FIXED RPM). Therefore only whether to stop or run the motor in forward or backward direction (for a given duration) can be controlled The sensor is assumed ideal, and therefore, its dynamics are ignored.
My goal is to design and tune a PID controller for this plant. And embed this logic into a micro-controller for its implementation (Arduino).
I have a few questions in mind and require your assistance for the same.

Can this system be controlled using a PID method?
Is it better to have a PID control, rather than having a standard error based decision?
E.g. I can measure the output current, compare it with the set value and decide where the motor has to move based on intuition.
I am not able to model the system, assistance appreciated.

If I have missed anything, please let me know. Thanks in Advance.


texts: Does alumide provide any electromagnetic shielding?

texts: Alumide is a new 3D printing material that contains aluminium dust. It is mechanically stiffer, but little is said about its conductivity and electromagnetic shielding properties. There is probably not enough of the aluminium dust in it to make it a good electric conductor. From the other side, ferrite looks somewhat the same, even if aluminium is not magnetic. Let's assume there are aluminium particles suspended in nylon. Would it have any effect on electromagnetic shielding?


texts: Do I need to solder snap in through-hole connectors?

texts:
I have a snap-in style through-hole pins on a header.  They snap into my board firmly and stay securely. Do I have to solder these connectors?  Are through-hole style connectors ever rated for use without solder?

More:

I know I could get away without soldering the connections, I am wondering if they are designed to be put into service without soldering?

For reference, I am using a 12 pin header (1-2178713-2) from  TE. Here is a link to the data sheet.

http://www.te.com/commerce/DocumentDelivery/DDEController?Action=srchrtrv&DocNm=2178713&DocType=Customer+Drawing&DocLang=English


texts: Why does the CPU consume more battery during computationally expensive operations?

texts:
Is it because the CPU increases its hertz as necessary?

And when a CPU cycle has to enter a register, does the extra distance in its path measurably affect the speed of that specific cycle?  And will it delay the start of the next cycle?


texts: Confirm re model of transformer coupled BJT amplifier

texts:
Could someone confirm my conversion of this transformer coupled BJT amplifier into a \$r_e\$ model?

simulate this circuit – Schematic created using CircuitLab

I get \$I_E\$ = 3.11mA and \$r_e\$ = 8.04Ω.  No problem there.

I'm not completely sure of how the \$r_e\$ model handles the transformer coupling.  \$R_C\$ is replaced by the resolved R'.

\$R' = α^2 \ R_L = 12^2 \times 8Ω = 1152Ω\$

\$V_{out} = 1/12 V' = 0.0833 V'\$

simulate this circuit

I've searched the web for an example with no success.


texts:
I want to measure the speed of a gear underwater (max 10 meters or 33 feet).
The gear will be made out of stainless steal so I plan to mount a small piece of iron on top of it that will be reconcilable by the sensor. Because normally stainless steel has a value of 0.6 times steel I think it will work. I'm going to make the sensor inside a resin to make it watertight but will this work or am I forgetting something? This is the sensor I intend to use.


texts:
im looking into bootloaders and how they work this picture from application note by atmel for their SAM series bootloader "AP-Note_AT04189"

so Stack pointer and reset? Stack pointer is an address of the first instruction in the Flash memory right? what about the reset?? what is it exactly?


texts: Controlling 32 solenoid valves from a single BeagleBone Black

texts:
I am trying to control 32 solenoid valves from a single BeagleBone Black. My EE skills are not up to par for this task, but I am learning.
In this system, at most one solenoid will be active at any given time, which simplifies things. Working from intuition, my thought was to control a single solid-state relay via one of the BBB's GPIO pins and then demux the SSR's load circuit output to the 1-of-32 solenoid that is selected using 5 (log232) additional GPIO pins on the BBB.
The solenoids being controlled are Spartan Scientific 4B23. They are 24VDC with a 10W power rating.
My first idea was to use a SparkFun A/D mux breakout board (datasheet). I don't think this will work, however, since the required solenoid voltage and current both exceed the absolute maximum rating of the IC.
Without just simply introducing 32 SSRs (one to control each solenoid valve), is there an economical way to do this? Is there a mux board that can handle this kind of voltage and current?


texts:
I was ripping off a Center 352 Infrared Thermometer. The basic functionality is to sense the temperature and display it on an LCD. The LCD turned out to have no interface to the controller. The PCB had 3 LEDs which were focused onto the LCD to provide backlight. Other than that there was no other active component(/connector) that can transmit the data to the LCD.
How is this interface done?

I tried googling and tried searching for connectors/interfaces without electrical contact. But, I got no idea how it works.

Attached


texts: Measure current through a screw terminal

texts:
Let's say that I have two wires spliced together with a screw terminal: I don't know exactly how they are called in English, maybe Mammouth? These things here, where you have one wire "screwed" on one side and the other wire connected to the other side:
Since the screws are in contact with the conductors inside, can I measure the current with a multimeter by probing the screws?
I feel like it's a bad idea: I'm picturing the connector as a node that connects the two wires and the probes together, which is wrong, since the multimeter should be in series with the circuit. Given that when used for measuring current it has a very low resistance, current should flow pretty much all through the multimeter, shorting out the connector, thus risking to blow a fuse inside the meter or even worse.
Am I correct, and should never try to measure current by probing the screws?


texts: DC voltage in collector after active load

texts:
I am trying to analyse the DC Q bias point of the following circuits with a current source/mirror involved. I do not know how to calculate by hand the Q2 and Q5/Q4 collector voltages. All the currents and the remaining voltages are easy to get.

Just some thoughts:

Are Q5 and Q2 saturated?
In that case, why?
Why cannot Q4 be saturated?
Could cascading another stage could put them in active state?

Circuits:

I used a LTSpice simulation in order to get some intuition, but still I am confused, as I am not even able to find any relation between the differential pair and the single transistor circuit.

Note: I assume, when doing calculations by hand, VBE = 0.7, VCE=0.2 when saturated, beta = 100 and all transistors are matched.


texts: Collector current in a BJT transistor whose base and emitter are forward biased

texts:
I'm reading a book about electronics and I have a doubt about a NAND gate implemented with Transistor-Transistor Logic. The question I have is actually about BJT transistors specifically (not the gate itself). I thought I understood how BJTs work, however, in my book, there is a new type of connection I don't understand very well, let me explain:
The NAND implementation the book provides is the following:

Now, my question is about Q1. Quoting the book:

[...] If both A and B are high, Q1 has no emitter current; however, its base-collector junction is forward biased, supplying base current to Q2. [...]

My understanding is that, if A and B are high, the voltage between them is 0, therefore the BJT is opened, so no current flows from its colletor to its emitter. However, the book states that the Q2 base receives current. That is what I don't understand.
Does this mean that the voltage in the Q1 base drives current to the Q2 base as well? If so, does this work the same way (but with voltages) with MOSFETs?
Here (BJT regions of operation), the BJT regions of operation can be seen. However, there is no region for B = E > C. What region of operation in the above table is supposed to describe this one?


texts: The LO side of a Mosfet Half Bridge Gate Drive

texts:
I seem to have a discrepancy between what happens in my simulator and what is happening on my breadboard. In my simulator this configuration is an OFF mosfet however on my breadboard I set up up this configuration and I have on ON mosfet. Why might this be happening?

I added the 1k resistor to my breadboard it's still an ON mosfet on breadboard but not in sim.

I'm using some IRLZ34N's for mosfets on my board. My power supply is drawing about 0.8A I just crank up the volts slowly from 0.

Thank You!


texts: How the lightning arrestor works in an aircraft?

texts:
The doubt may look silly. I referred the article about this in http://www.scientificamerican.com/article/what-happens-when-lightni/

It says that the current will exit through some extremity like tail. But as per my understanding there will be charge stored on the exterior of the plane. Wouldn't this be causing some issues because then it will be like a charged sphere moving through the charged clouds with opposite polarity. I would like get an explanation regarding how the lightning currents  are handled in planes, missiles etc.


texts:
I need to combine this 3 coding to form one whole PWM system by using FPGA. I  tried it, there is no error, but the process is not synthesizable. Please help me.
Thank you.

This is code for FreqDivider200Hz

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity FreqDivider200Hz is
port(
clock   : in STD_LOGIC; -- 50 Mhz
clear   : in STD_LOGIC;
  freq1 : out STD_LOGIC
);
end FreqDivider200Hz;

architecture Behavioral of FreqDivider200Hz is
signal adjfreq: STD_LOGIC_VECTOR(16 downto 0) := "00000000000000000";
signal adjclock : std_logic := '0';

begin

         freq1 <= adjclock;

countClock: process(clock,clear)
begin
if (clear = '1') then
    adjfreq <= "00000000000000000";
elsif(clock'event and clock = '1') then
    -- Flip a the output once every 125,000 cycles (400Hz)
    -- to give a 200Hz output with 50% duty cycle
    if (adjfreq = "11110100001001000") then
        adjfreq <= "00000000000000000";
            if adjclock <= '0' then
            adjclock <= '1';
            else adjclock <= '0';
            end if;
        else
        adjfreq <= adjfreq+1;
    end if;
   end if;
  end process;
 end Behavioral;

This is for code for FreqDivider400Hz

enter library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity FreqDivider400Hz is
port(
clock   : in STD_LOGIC; -- 50 Mhz
clear   : in STD_LOGIC;
  freq2 : out STD_LOGIC
);
end FreqDivider400Hz;

architecture Behavioral of FreqDivider400Hz is
signal adjfreq: STD_LOGIC_VECTOR(15 downto 0) := "0000000000000000";
signal adjclock : std_logic := '0';

begin

freq2 <= adjclock;

countClock: process(clock,clear)
begin
if (clear = '1') then
    adjfreq <= "0000000000000000";
elsif(clock'event and clock = '1') then
    -- Flip a the output once every 62500 cycles
    -- to give a 400Hz output with 50% duty cycle
    if (adjfreq = "1111010000100100") then
        adjfreq <= "0000000000000000";
            if adjclock <= '0' then
            adjclock <= '1';
            else adjclock <= '0';
            end if;
        else
        adjfreq <= adjfreq+1;
   end if;
  end if;
 end process;
end Behavioral;code here

This is code for 2x1 multiplexer

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity mux2to1 is
Port ( freq1 : in  STD_LOGIC;
       freq2 : in  STD_LOGIC;
       sel : in  STD_LOGIC;
       y : out  STD_LOGIC);
end mux2to1;

architecture mux2to1 of mux2to1 is

begin

p1: process (freq1, freq2, sel)
begin
if sel = '0' then
        y <= freq1;
else
        y <= freq2;
end if;
end process p1;
End mux2to1;

This is code for overall system

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity OverallSystem is
Port ( clock : in STD_LOGIC;
         clear : in STD_LOGIC;
         sel : in STD_LOGIC;
         y : out STD_LOGIC );
end OverallSystem;

architecture Behavioral of OverallSystem is
component FreqDivider200Hz is
port(
     clock   : in STD_LOGIC;
     clear   : in STD_LOGIC;
     freq1 : out STD_LOGIC);
end component;

component FreqDivider400Hz is
port(
     clock   : in STD_LOGIC;
     clear   : in STD_LOGIC;
     freq2 : out STD_LOGIC);
end component;

component mux2to1 is
Port ( freq1 : in  STD_LOGIC;
       freq2 : in  STD_LOGIC;
       sel : in  STD_LOGIC;
       y : out  STD_LOGIC);
end component;

signal freq1 : std_logic;
signal freq2 : std_logic;

begin

chip1 : mux2to1 port map ( freq1 => freq1, freq2 => freq2, sel => sel, y => y );
chip2 : FreqDivider200Hz port map ( clock => clock, clear => clear, freq1 => freq1 );
chip3 : FreqDivider400Hz port map ( clock => clock, clear => clear, freq2 => freq2 );

end Behavioral;


texts: MPLABX + XC8 + Proteus 12F683 Configuration Word problem

texts:
I use MPLABX + XC8 with Proteus to simulate PIC designs.

It usually works fine...but I recently tried to use a 12F683 part and I get an MPLABX message "ERROR writing to CONFIG_MEM".

I think the problem is this: MPLABX creates a configuration word of 0xFF94 (for my desired operation) which it writes to the processor program memory at address 2007. But for some reason the Proteus 12F683 model won't allow any values above 0x3FFF for its configuration word.

I can't find any meaning for the high bits of the 12F683 configuration word in the Microchip docs, and 0x3F94 works with the Proteus model when not simulating through MPLABX.

So I'm asking one of two things:

Has anybody figured out how to use MPLABX + Proteus to simulate a PIC 12F683 (or 12F675 or 12F1840, which have the same problem); OR...
Does anybody know the correct pragma or instruction to have my program code write "0x3F94" to program memory location "2007" instead of the "0xFF94" that MPLABX writes using its #pragma config directives?


texts: IAR errors about extern and global vriables

texts:
I want to get values of a global array in a c file. the print screen of code is shown below:

'data' is the global array and 'slave_buffer_rx' is another global array defined in this file to get values of 'data'.each red cross has two errors:

Error[Pe094]: the size of an array must be greater than zero
Error[Pe028]: expression must have a constant value

I know how to get rid of errors: make assignments in a local function. the code without errors
is shown below:

But I do not known the exact reasons and how can IAR consider it as an array with zero length. Can anyone give me some ideas?


texts:
I am wondering how plug-and-play usb-midi controllers are created?

To the moment I've created a simple midi controller based on Arduino Uno, but I am not able to use it directly. I have to use something like Serial->Midi convertor (Hairless Midi)

Now my aim is to create a midi controller from scratch.
I've chosen an AVR micro controller as a brain for the device. But I can not find any info, how to create a device which can be connected to a computer without additional setting.

So, can anyone explain how to create a plug-and-play midi device?


texts: Adding fiber optic ethernet to a circuit

texts:
I'm working on a project that involves transmitting data over very long distances (10-25km) where radio communication is unavailable, and I have been looking into the possibility of adding a fiber optic ethernet connection to the board.

The first issue I have run into is trying to figure out what specification I can or should be using.  My first thought was to use 100BASE-FX sfp transceivers, and connect the other end to a TRENDnet TFC-110S60i which claims a maximum distance of 60km, however further investigation seems to suggest there is a 2km limit for 100BASE-FX connections.  If my objective is to connect over these long distances, what specification should I follow?

The second issue I've run into is actually connecting a fiber optic transceiver, be it SFP or otherwise, to the controller.  At this time no decision has been made for what controller will be used on the board, so I'm trying to select as generic an interface as possible.  Unfortunately most chips I've found such as the Microchip KSZ8041 are only PHYs, or the Microchip KSZ8441 which uses a host bus that I am unfamiliar with how to implement.  I've also found the Microchip LAN7500 which handles MAC and provides an SPI interface, but the documentation doesn't specifically say if 100BASE-FX/BX/LX/etc. is supported.  Would I be able to connect this chip to an SPI socket on a circuit board, or do I need something that specifically says it supports a fiber ethernet format?


texts:
I am replacing a blown capacitor on my LCD monitor power supply board. While I have the thing in pieces I thought I would replace the other electrolytics as well as they may well fail in the future. However one of them is missing part of its value and I'm hoping that someone will be able to help identify it.

The capacitor is rated at 50v and the part of the value that is visible is possibly 8uF, however the characters before are missing (the plastic sleeve is damaged). Physically it is 10mm high, 5mm in diameter. It is part C824 on a Digital Decode Ltd P/N BLM1700P60411 board. It is adjacent to the 817c optocoupler.

As I said above it looks OK so if it can't be identified I'll just leave it and hope for the best.


texts: How do I eliminate PWM noise when driving a fan?

texts:
I'm driving a 12V 0.11A brushless DC fan with PWM using an MSP430Gxxxx --> TC427CPA FET driver --> BS170 N-FET. The fan is on the low side of the FET.

Even with a duty cycle of 90% and a frequency of 10kHz, there's audible buzzing coming from the fan. Lower duty cycle = more noise.

I tried to eliminate the noise by adding a 4.7uF cap in parallel with the fan, and it's a little less noisy, but still very audible.

How do I make the noise go away?


texts: What is the difference between a Helix antenna and a UFL one?

texts:
I have bought a SIM800L, and I see two antennas:

Connector UFL (IPX Antenna)
Helix Antenna

What is the difference between these antenna?

Can I use both of them together?


texts:
I am a beginner in electronics, and if you have a look at my profile, you'll understand that I'm completely confused in nomenclature of components.

I recently downloaded a datasheet of a Zener diode series, but I need a bit of help in studying it. I can't understand most of the column headings.

The above one is a picture of the diode characteristics table.

Please correct me (or help me) in identification of the column headings:

Zener voltage - this is the voltage that can be applied across the diode in reverse bias state.
\$\mathbf I_Z\$ - the current in the zener diode in reverse bias state.
\$Z_Z\$ @ \$I_Z\$ - as far as I can guess, it's the resistance offered by the diode in reverse bias mode.
Leakage current - I haven't come across this term. Does it have something to do with the efficiency?
\$T_C\$ - the temperature conditions in which the diode works the best.
\$C\$ - the capacitance of the diode.


texts: Can a permanent marker be used on a PCB without damaging it?

texts:
I need to cover up a line of text on the silkscreen of some PCBs and I'm not sure of the best way to do it. I've read that removing the printed text with a chemical will likely damage the boards, so covering it up seems like the best option.

Can something like a Sharpie permanent marker be used on a PCB's silkscreen without damaging the board?


texts: General question about convolution and Fourier

texts:
I'm working on a system that includes a bunch of elements and I arrived at the following general expression for the output:

$$\mathcal{F}\left\{ T\cdot\left(\left[T\cdot\mathcal{F}\left\{ E_{1}\right\} \right]* h\right)\right\} $$

where \$ mathcal{F}\$  is the Fourier transform of whatever is inside of it.

From the way it looks, it's begging for me to employ the convolution theorem, and so I did:
$$\mathcal{F}\left\{ T\cdot\left(\left[T\cdot\mathcal{F}\left\{ E_{1}\right\} \right]* h\right)\right\} =\mathcal{F}\left\{ T\right\} *\left(\mathcal{F}\left\{ \left[T\cdot\mathcal{F}\left\{ E_{1}\right\} \right]* h\right\} \right)=$$ $$\mathcal{F}\left\{ T\right\} *\left[\mathcal{F}\left\{ T\cdot\mathcal{F}\left\{ E_{1}\right\} \right\} \cdot\mathcal{F}\left\{ h\right\} \right]$$
$$=\mathcal{F}\left\{ T\right\} *\left[\left(\mathcal{F}\left\{ T\right\} *\mathcal{F}\left\{ \mathcal{F}\left\{ E_{1}\right\} \right\} \right)\cdot\mathcal{F}\left\{ h\right\} \right]$$

Assuming I did these steps right, I'm not sure how to carry on from here? can I make it simpler?

Thanks in advance and hope you're all safe and healthy!


texts: Is Lora maximum transmission 1 km in real?

texts:
I'm new to wireless communication and Lora.
I'm using Lora Ra-02 and Arduino UNO and small 800 Mhz antenna.
I'm using Arduino website library.
How can I increase that range?  What do I need to do to get that 2-3 km urban range?
Does it need line of sight even in short distance communication?
What points should I focus on to have maximum range?


texts:
I am learning various control techniques for 3-Phase ACIMs. So far I have understood about the SPWM implementation.. in which we save Sin values in a LUT and then modulate the duty-cycle of PWM wave using scaled values from the Sin LUT.

But regarding the SVPWM so I could not understand what are its implementation steps? Does it also require a Sin LUT or not?

And if I am implementing a scalar V/F control loop for the 3-Phase ACIM then is it possible to use SVPWM technique to drive the motor?


texts: Does max current (amps) always flow through circuits?

texts:
I'm trying to understand how current (amps) flows through circuits, and if the max available amps is always flowing.

For example, take the following:

Say you have a battery, and a circuit that connects the positive and negative, and a switch & led as part of that circuit.

Does the max amps that the battery can provide always flow through that circuit? Or does it only provide what the led would draw? I'm confused as to how that works.


texts: White Dust: Is it bad for electronic devices like smart TVs or phones?

texts: As a side result of using an ultrasonic air humidifier, this white dust thing can be seen on house furniture during its activity. I googled about it but I only found a few articles, saying that it is safe for human body but I found nothing about house devices. Does it have any bad effect on my LED TV? I use a homemade cover for it but, I'm still kind of worried.


texts:
Why is Cat 5 cable only specified up to 100Mhz, if it's to be used for 100BASE-TX, which surely contains frequencies much higher than 100Mhz?

Likewise, why is Cat 6A only specified to 500Mhz, but is suitable for 10GBASE-T?


texts: Can't derive INL of current-steering DAC

texts:
In Razavi's data converter system textbook, he shows the following thermometer-coded current-steering DAC, with output voltage \$ V_{out}=-jI(R_1||\frac{r_o}{j}) \$, where \$j\$ is the number of current sources switched to the output. Razavi says this about the INL:

The dependence of the term in parentheses introduces integral nonlinearity. To obtain the INL profile, we pass a straight line through the end points of [the equation above], given by \$j=0\$ and \$j=N\$, and find the difference between [the equation above] and that line. Assuming \$r_o >> NR_1\$, the reader can easily show that \$ INL_j = \frac{I R_1^2}{r_o}j(N-j) \$.

Unfortunately I, the reader, cannot easily show this.
My thinking is that the straight line mentioned is \$ V= -jI(R_1||\frac{r_o}{N})\$ (since the line passes through the origin and \$V_{out}(j=N)=-NI(R_1||\frac{r_o}{N})\$. Then \$INL_j = -\frac{jIR_1(r_o/j)}{R_1+r_o/j}-(-\frac{jIR_1(r_o/N)}{R_1+r_o/N})\$.
EDIT: I was actually able to derive the result up to a negative sign, so what I found was actually \$INL_j = \frac{I R_1^2}{r_o}j(j-N) \$. Is the above setup correct?


texts: Remote triggering by using optoisolators

texts:
I need to hardware-trigger three modules from a pulse signal source.
According to their data-sheet each module requires between 5 to 15V for trigger high and 0 to 5V for low. Each module draw around 6mA so the input impedance is around 2.3k.

The triggering source on the other hand is a pulse train at a fixed frequency 32Hz will come from this DAQ hardware sync output. The sync output is only 5V. Here is sync output specs(At 32Hz short duty cycle worries me):

Anyway, the distance from the control source and a module can vary between 10 meters up to 50 meters.

I have two main challenges here:

-The first one is to send trigger from a single source to three modules.

-The second one is the length which can be max 50 meters.

Some suggested to use differential line transmitters with multiple outputs. But the data-sheet of the module says it needs to be 5V and 15V to be triggered.
So that means the transmitted differential signal must be converted back to single ended signal right before the module.

Another user suggested to isolate the outputs at the module end.

A while ago I had asked this related question.

One of the answer was simpler to implement. Since it requires less electronics, I decided to try optoisolator way at module ends.

Below is the diagram showing that scheme:

[left-click to zoom in]

As you see a DAQ's 5V 32Hz sync output is triggering all three modules at once. Vp1, Vp1, Vp3 separate power supplies for each module. Optoisolator is right before the module. Rg1, Rg2 and Rg3 are just to indicate and simulate that the grounds of opto input and output are isolated. A STP cable can be be used.

It is okay to have some noise or glitch sometimes at the trigger input.

I just need most of the pulses arrive to the module as clean and accurate as possible I can to. Do you think at 32 Hz for around 50 meters length I can trigger those three modules as in the scheme and proper way? What can be modified if necessary?

edit:

Photo-darlingtons(4N32) used, a buffer for sync added, STP used:


texts: I have 2 different microcontrollers and I need to use their internal RTC. however I need the 2 RTC's to be in sync when they are used. How would I achieve something like this?


texts: Find the V1 value interval (V1min, V1max) for which D2 emits light?

texts:
I know I'm supposed to use Thevenin equivalent circuit, but can someone please guide me through the steps of solving this problem?

Edit: I have simplified resistors R1, R5 and R3 to a resistor R2 of 2K ohms. And I know that a minimum voltage of 0.65 needs to go through D2 and a minimum voltage of 6.2 needs to go through D1. I also now that I need to find the Thevenin circuit which I found to have a resistor with a resistance of 5K ohms in series with D2 and D1. Is that correct? What's the next step?

$$
(R1+R5)//R3=\frac{1}{\frac{1}{3K+1K}+\frac{1}{4K}}=2K=R2
$$

$$
R_{TH} = R2//R4=\frac{1}{\frac{1}{2K} + \frac{1}{2K}} = 1K
$$

$$
V_{TH} = V*\frac{2K}{2K+2K}=\frac{V}{2}
$$

When I reach here, I don't know what to do:

$$
\frac{V}{2} - 0.65 - 6.2 - 2000i_0 = 0
$$

This is the equation I get for the Thevenin circuit. Does having the $$i_0>0$$ make diode D2 emit light?

Does negative voltage not work in this case since D2 would be in reverse-bias?


texts: Power source interference on Bluetooth audio module?

texts:
I am building a Bluetooth Speaker and I been getting static noise or high pitch tone with certain configuration. I am new to electronics, hopefully the seasoned hobbyists here can help me explain what I am observing.
I initially build the speaker with the following configuration:

I am experiencing static noise and high pitch tone with this configuration. At first I thought it's due to the 12V->5V step down converter I built, so I replaced that with a off the shelf USB Auto Charger (the one that plugs into the 12V outlet in car and powers a USB port) but still experience the same issue.
Later, during some trial and error I came across the following configuration:

With this configuration, where 5V is coming directly from a cellphone charger, the static noise and the high pitch tone are gone. Everything is working as I expected it would except the fact that I have two power adapters powering one project.

I did some research and came across this post by Jake, I believe we ran into the exact problem. It seems to be resolved through the use of ground loop isolator. I read up on the ground loop and how an isolator can address the issue but couldn't get a good understanding of it.  So here are my questions:

What is ground loop?
How can I solve the problem I am having without a ground loop isolator?

Thanks in advance for the advise.


texts: Does anyone know the UL standard related to resistors and isolation on AC mains?

texts:
I have a circuit that is attempting to measure AC line voltage 120-240V but I was told by the certification test lab that my voltage divider resistors would require an expensive 3 week soak test. The resistor voltage divider is behind a 275V varistor to clamp the voltage, a fuse to protect from short circuits and the voltage is being sent through a high linearity 3750V isolation optocoupler biased by a transformerless mains side power supply so I was thinking that the circuit would meet the isolation requirements. Unfortunately, this does not seem to be the case.

Now I am trying to understand what I can do to create a DC bias to power the optocoupler and how to reduce the voltage to be able to send through the optocoupler since a resistive voltage divider does not seem valid without extensive testing. As a result, I need more information and the test lab seems unwilling or unable to provide this. A reference to the relevant standard as well as any suggestions would be appreciated.


texts: Why does N25Q512 has 0x20 for capacity ID?

texts:
Command 0x9F is expected to return three bytes - manufacturer ID, and two bytes of ID[15:0] with LSB being capacity ID. I am building catalogue of the serial flash chips basing on this excellent header file, and see the following:

....
db  0bah,019h,"N25Q256",0
db  0bah,020h,"N25Q512",0
....

Till today I thought that if I take capacity ID of the serial flash device I can reliably know its size. Now I am stuck:

N25Q256 - capacity ID 0x19 - 2^25 * 8 = 256Mb

N25Q512 - capacity ID 0x20 - 2^32 * 8 = 32Gb ???

While for N25Q512 datasheet says "512Mb, Multiple I/O Serial Flash Memory".

And it seems not to be a mistake in the doc - as I read over the internet that device really reads 0x20.

Why they did not set capacity ID as 0x1A? Stacked device IDs start with 0x20? Any knowledge or legitimate guess?


texts:
I am going to work with one TFT LCD 2'8 (ILI9325 Driver) with STM32F103RE ARM MCU.  So I have one example program in Mikroc for ARM ( Microelectronica Co), which is working good, you could download the code:

ili9325-tft-touch-screen

I have changed the code to work in Keil v5.14.  My code is here:

ili9325-tft-touch-screen in Keil

And it's conection here:

As you can see in the debugging mode after GPIO_Init(GPIOB, &GPIO_InitStructure); ( port B is used as data port "B0-B15" -> "D1-D17" Of LCD) in line 197 I added this :

GPIOB->ODR=0xFFFFFFFF;

this pic:

But when I reach this line in debugging the pin_4 AND pin_3 of ports have had a little voltage and current on it and don't set to 1 logic when the other pins of this port become high, you can see here:

and by running this code :

GPIOB->ODR=0x00000000;

pin_4 AND Pin_3  don't become off completely, as you can see in this picture

but the other pins of port B become one like this:

and completely off.

So what do you think?


texts:
It might be a silly question but I can't figure out in what cases a flash mass erase from in-application programming (IAP) is relevant, as it would erase the user code as well?

For STM32 devices, ST provides example code in reference manuals like this one:

A.2.4 Mass erase sequence code example

/* (1) Set the MER bit in the FLASH_CR register to enable mass erasing */
/* (2) Set the STRT bit in the FLASH_CR register to start the erasing */
/* (3) Wait until the BSY bit is reset in the FLASH_SR register */
/* (4) Check the EOP flag in the FLASH_SR register */
/* (5) Clear EOP flag by software by writing EOP at 1 */
/* (6) Reset the PER Bit to disable the mass erase */
FLASH->CR |= FLASH_CR_MER; /* (1) */
FLASH->CR |= FLASH_CR_STRT; /* (2) */
while ((FLASH->SR & FLASH_SR_BSY) != 0) /* (3) */
{
 /* For robust implementation, add here time-out management */
}
if ((FLASH->SR & FLASH_SR_EOP) != 0) /* (4)*/
{
 FLASH->SR = FLASH_SR_EOP; /* (5) */
}
else
{
 /* Manage the error cases */
}
FLASH->CR &= ~FLASH_CR_MER; /* (6) */

I don't understand how the CPU can reach the instructions from (3) to (6).

Shouldn't they be erased already?


texts:
What are cables like this called?

(Bonus: what are the parts called?)


texts:
I have a broken GPS/Compass and would like to get it working again.

The device takes 5 Volts input and powers a GPS at a max of 3.6 Volts.

I believe the below chip is bad and I would like to test it. It says IL314.  I have no more information on what it is/who makes it?  I suspect it is a regulator.  Please advise on what this chip is and where I can source a few?  Regards


texts: Possibilities for 24v Solar charging of 12v batteries in series and parallel with different Ah capacities

texts: I have two 12 volt 200Ah lead acid batteries and two 12 volt 150 Ah lead-acid batteries. I have a 24 volt 50 Amp charge controller connected to a 150 watt PV panel (overkill for now, but ready for future expansion). Is it possible to connect the 200 Ah batteries in series (Bank A),and the 150 Ah batteries in series (Bank B) then connect Bank A and B in Parallel to connect to the 24 volt charge controller. I need to draw off 12v (80-120 watts) of LED lighting for our school classrooms.


texts:
Consider the following circuit :

If we need to find the voltage drop across R2 , this will be V2=(R2/R1+R2) *(-12). My question is why we have negative sign in the formula here ?


texts: Why does a channel need to have bandwidth requirement for digital data transmission?

texts:
I'm not from EE background and try to understand how digital is sent in a channel as a non-technical audience.
Let's say we use fiber optics to transmit digital data 010101....,
Since fiber optics use light to transmit information, I can picture something like this:

A torch can flash light
a flash means 1
no flash means 0
this torch is connected to one end of the fiber optics cable
as long as the torch's flash rate is fast enough like flash/no flash X 100 million times per second
theoretically we can transmit as many bits as we want if we can have a torch with unlimited flash rate
how many bits we can transmit is really determined by the torch, not the bandwidth of the channel (fiber optics)

I know my assumption is wrong, could someone give me an intuitive example to explain why it doesn't work like this with little EE terminology?


texts:
I have a project (pinball machine) that will have a decent number of microswitches that will be connected in an 8x8 switch matrix. I'm trying to determine what my options are for reading this matrix without consuming a large number of pins on a microcontroller.

I tried looking for an IC designed specifically for such an application (scanning a large number of buttons) but all I could find is the TCA8418 and TCA8418E chips from TI, looking for similar chips lead me to a couple others but they all share a common problem. They're only in QFN or BGA packages which is beyond my ability to hand solder. I know it's possible, but not something I want to undertake. Those chips are beautiful for this though, it's a real shame.

Alternatively, I've looked at 16 port bus extenders that can be communicated with via I2C or SPI. These seem to be a good option, but I worry about missing button presses. The pinballs will be racing around rapidly, so probably in the millisecond range. That isn't all that fast in terms of an MCU, but it's going to be busy doing a lot more than just reading switches (audio, dot matrix display video feed, and an 8x8 matrix of LEDs). On top of that, it would have to handle switch bounce.

My other concern is the necessary diode that may cause V(il) to creep up towards the 0.8V limit of LVCMOS. A 2x2 example is below.

I've also considered using a small 8-bit microprocessor to be dedicated to keyscanning, it could probably emulate the function of those TCA8418 chips. But I'd have yet more code to write, and another source of bugs to work out. They're about the same price as the bus extender though, so if it's a superior solution than it is what it is.

Is there something else out there, or some method for scanning large (ish) arrays of switches/buttons?

simulate this circuit – Schematic created using CircuitLab


texts: Deriving Differential Mode Gain of an Op Amp

texts:
I have been looking all over for derivations of the expression for the differential mode gain of a simple single op-amp differential amplifier. One thing that I have found very interesting is that every derivation uses the superposition principle to find the differential mode gain. Is this the only way to calculate it? And if so, why?

Here is one example derivation that I have looked at:
http://www.ntu.edu.sg/home/aschvun/FAQ/DiffAmp.html


texts:
I need some guidance on how to begin troubleshooting a specific problem with a bareboard.
Board Info-
Size-22"x26"
Laminate-ITEQ
Layers-30

In addition to standard bareboard ET (10v with 10Mohms isolation threshold), we also do HV test @ 500v (with isolation threshold of 500Mohms).  It passes standard test, but fails HV test for pwr/gnd shorts.  The only way it passes HV test is when we use voltage ramp up delay.  Using Fluke 8845A to measure resistance, it will detect resistance between pwr and gnd (that should be isolated from each other), but quickly dissipates within 1 second.  I then pick up probes and touchdown on the same pins and it no longer detects any resistance.  I then switch polarity (switch probes) on the same pins and it picks up resistance again.  What is causing this discharge?
Cu pour (not thieving) was added on all signal layers (.5oz. striplines with .008" dielectric to gnd) and on empty areas on power layers (1oz. with .004" dielectric to gnd).  Cu pour have airgaps no less than .050" to nearest features.
Blindly, we released another lot w/o the Cu pour to see if it resolves the issue.  If we do find that removal of Cu pour fixes this issue, can someone detail what exactly is happening with the board; how is Cu pour creating the problem (which is TBD)?


texts: Is 3k ohm too high impedance to an op amp differential amplifier?

texts:
I have a pressure sensor, MPX2100 and I need to read its output with an Arduino. To do so I want to use a differential amplifier with a gain of 40 times (3k and 120k resistors). The impedance of the sensor's output is 3k. So is this input impedance too high that I will get non-linearities in the output?

The amp op that I am going to use is LM258.

My schematic:

Even though a In-amp is better I assembled the circuit above just to test my sensor while I wait my AD623 to arrive, however the gain is about 3 times! When my sensor's output is 50mV the output of the amplifier is about 170mV!

Another odd thing that is happening is that when I connect the sensor to the op-amp the voltage at the sensor's output changes to -4mV.
I am not sure whether my sensor is not working properly or the amplifier circuit is messing everything up.


texts:
The transfer function is \$F(p)=10/(p^2+2p+1).\$
Using Wolfram Alpha, the Nichols plot shows that the argument \$\to -\pi\$ when \$\omega \to +\infty\$.
However, calculating the argument on paper gives
\$-\arctan(2w/(1-w^2))\$
which \$\to 0\$ when \$w \to +\infty\$.
Where is the error, mathematically?


texts: SPICE modelling of microwave cavities using a circuit

texts:
Hi I am new to SPICE and after doing some research into the spice software, I need some help understanding which type and how to model microwave cavities in SPICE.
I want to model a microwave cavity in SPICE, however I will need to use an equivalent structure, can I just use an LC circuit to do this ?. The microwave resonator I am trying to model is just the cavity used in labs.


texts: Automation - Stealing a signal from a circuit

texts:
I am a software designer (for reference).  I struggle with electronics and signals.
I have a device that has a microswitch that completes a circuit with a PCB.  I would like a way for that microswitch to trigger the action on the PCB as well as a USB key encoder attached to a computer.  Essentially, one trigger sending to two destinations.  The microswitch (leaf switch) works with both systems, but you obviously can just hook both sources and grounds to the switch and expect it to send to both.
Is there a way to know when source one has completed the circuit?  I know I am not the first person to ask this, but I could not figure out a similar question asked (probably because it is an impossibility that everyone else in the world understands except me).
I am trying to avoid using an additional micro switch on the same trigger.


texts: Simple power amplifier biasing calculations

texts:
I’m trying to simulate that amplifier from Proteus!

First I found quiescent current for Q1, Q2 transistors: IcQ = (12 – 0.7)/R1 = 35mA

But to set that current through R1-D1-D2-CE(Q3)-R5 I need the proper biasing of BC184.
How I can calculate the R2 and R6 for that proper bias?
I have the BC184 datasheet:
http://pdf1.alldatasheet.com/datasheet-pdf/view/50719/FAIRCHILD/BC184.html
And know that UR1 = 11,2V and UcQ3 = 11,2V
From datasheet I may found the hfe of BC184 but there is no minimal hfe for Uce = 11,2V what value I need to choose?

That schema may have a very big output DC voltage and the very little changes in base voltage divider resistors changes output DC dramatically. What I must do to tune the output voltage correctly?


texts:
I have a problem with my PCB. I recieved it a few days ago and it is already completly presoldered. If i connect it via USB-TYPE B to my pc it is showing me nothing in device menager.... The CH340G should be visible to be able to programm it via usb....

If i connect it via micro-usb unknown device is popping up. But that does not help me :).

Sorry did not attach the schematic. here it is]1


texts:
Inspired by this post

Designing a *linear* MOSFET driver stage

I used this kind of driver for my controlled current source.

I use LTSpice for simulating and everything works fine until today :) when it happens that I put a long cable as (highly inductive) load. Digging the mess, I realized that if low frequency waveform (1KHz) with high slew rate (1uS rise/fall) will pass to my driver, very high peaks of current (and power) will appear on 2n3904 (3906) which are Q1, Q2 in my schematic.

Of course, I can change Q's to something bugger (~5W) but I'm just curiouse if this is the answer. I cannot slow down the wave form since it's comming from a 1uS settling DAC.

Even the peak pulses are narrow (1uS) I wonder how will perform this in real life (see attached image). As can be observed, very high peaks appears in simulation. Will be the drivers overloaded and burn?

I tried to limit the current by inserting R16 but this will limit the dynamic range and so, performances.

I forgot to mention, average power is only 14.693mW so appears to be fine.
In real life would be needed bigger transistors?

Appreciate comments, thank you.


texts: How to make a power supply cable for a 10.5V 4.3A laptop OR how much higher voltage can I use

texts:
Let me preface this by saying I've spent countless hours researching and learning what I can about electronics before asking this, and I cannot find a clear answer to this. So sorry if this seems like something that's been asked before- trust me, I've read everything relevant and I'm still lost.

I have a Sony Vaio Duo13 laptop/netbook/tablet thing, which I had given to me with nothing else, no manual, no cable etc. I've managed to determine it requires 10.5V DC 4.3A.
My only problem is, it's absolutely impossible to find a cable matching that. The closest I managed was 9V 1.5A which is absolutely awful, taking about 24 hours to fully charge it. It also switches on and off (as in, the power will cut in and out every 10 seconds, give or take.) But hey, at least it kinda works.

I came into a 9.5V DC 3A Polaroid "audio/video apparatus"

It had the wrong size connector, so I replaced it with the correct one (not sure what to call them, the cable had the black one that seems to be standard here in Canada and my laptop requires the yellow one which is slightly smaller).

The polaroid cable is coax, and not understanding at first entirely how they work I cut the extra thing (regulator?) that's just before the connector off thinking perhaps there's two RF wires beneath. No, but then I learned coaxial cables often supply power, and it's okay to rewire them for that purpose.

So I spliced them, forgetting I had removed the other part, which might be my problem. The red indicator light on the middle-box part of the cable lit up when I plugged it into the wall. But when I plugged my laptop in, it went out and didn't charge. Is that where I went wrong?

Would it be easier/feasible to just make my own cable at the correct specs somehow? I have enough spare parts and cables laying around to scavenge from. How would I go about that?
I should add I don't have any equipment for saudering etc.

And on that note, do I have any wiggle room regarding cables for varying voltage? As in, if the Amps were high enough what would my potential range of possible voltages be (such as 8-14V, as an example.)

Thank you for being patient with such similar questions so often! I hope mine can be more broadly applicable.


texts: Logic Design simple door security system with using MUX

texts:
I draw the cicuit without using any MUX. But my project says I need to use 4x1 MUXs
and I couldn't find where to use 4x1 MUXs. I tried put MUX of each output but this was very pointless, no need to use 4x1 MUX for the X output. So how do I need to design the circuit using 4x1 MUXs.


texts: Identify SMD transistor - top marking BC RJ

texts: I need to know the specifications of the transistor Q5 with top marking BC RJ


texts: Very dim RGB LED strip when using MOSFET

texts:
I am trying to run an RGB LED strip using an ESP32 but I cannot get it to full brightness. Here is what I've done:

I started with a diffused RGB LED and a simple ESP32 sketch. This worked how it should. I was able to send a hex color code and varied the color of the LED correctly.

I then bought the REG LED strip above and some T220 mosfets (Datasheet) along with a 12V 6A power supply. I followed this example wiring.  My ESP32 is powered by micro USB and the LED is powered by the 12+ from the power supply. The ground is tied to each MOSFET and the ground on the ESP32.

So using the same sketch I can vary the color correctly but they never get near full brightness. I.e. if I ground R, G, or B directly I get a nice bright pure color. However using the schematic I get maybe 10% light output? So I can send it FF0000 and get just the red but its barely lit, 00FF00 and just green dimly lit, 0000FF blue same thing.

What could be wrong or where can I test? I have a good multimeter but I'm not sure what I should be looking for. I pulled it all apart and went back to the diffused RGB LED and it is full brightness how it should be running off the ESP32 directly so I'm assuming the addition of the MOSFET's are the issue...like they are not being told to go full open (drain?).  Or they can't react fast enough to the PWM on the ESP32?

Oh, and they do vary between 00 and FF so if I send #400040 I get a little blue and red. If I send #FF00FF I get more blue and red but still maybe 10 - 15% total instead of 100%.


texts: How to measure a 100 ohm differential signal on a spectrum analyzer?

texts:
I have a pair of 1.5V PCML differential signals coming out of an Altera Cyclone V GX FPGA, terminated on the FPGA in 100 ohms with common mode voltage = 0.65V (also provided on the chip).

I need to convert the 100 ohm differential signal to a 50 ohm single-ended signal so that I can measure it on a spectrum analyzer. Apparently the best method is to use a balun transformer but I am unsure on exactly how to go about this. I have chosen a 2:1 impedance ratio, 0.25-750MHz (bandwidth is perfect) balun with no centre tap. Here is my attempt:

My main questions are:

Is the impedance ratio 2:1 correct and is this circuit going to work?
Do I need to use a balun with a centre tap so that I can provide a matching bias voltage (0.65V) or can I AC couple the signal to the balun as shown above?
Is there a quick and dirty way of doing this without a balun? E.g. Terminating one of the differential pairs to ground with a 100 ohms resistor and connecting the other signal straight to the spectrum analyzer through a 50 ohm resistor? (I only need to observe the signal on the spectrum analyzer and the data path from the FPGA will be very short)
Can this exact same configuration be used to measure an LVDS signal in the future if needed?

Any help would be greatly appreciated. Cheers.


texts:
I haven't developed with an ARM, and I'm a little confused on the programmer.

I've been coding with PICs and 8051s and both use loaders that are from the manufacturer.  No confusion.

But ARMs are a bit different since the cores are mostly the same?

Do you have to buy a Segger "J-Link" JTAG  programmer to program ARMs?  I see the professional Segger loaders are like multiple hundreds of dollars.  Seems a little harsh...

I see ST makes a JTAG  programmer the "ST-Link" for much less than the "J-Link" -- what gives?

What is the deal with the loaders for ARM Cortex M?  Are the loading tools from ARM MCU makers locked to only work with their MCUs?

Can the ST-Link program another ARM Cortex M, if you pinned it up correctly?

I'm trying to ultimately have a compatible loader for an ARM Cortex M3, whose manufacturer does not make a loader...


texts: How to configure ADC input (ADS8681) for AC mains measurements

texts:
I want to measure full AC mains voltage with let's say 100ksps, 240Vrms and I plan to use a resistive divider 1/100. From my understanding, this means +/-Vp = +/- 340V or after divider +/- 3.4V.
ADC will be powered from a isolated brick.
I'm not clear how to properly configure (hardware and software) the ASD8681 for high voltage AC measurements. This device appear to be a Pseudo-Differential True Bipolar (image from LT)
https://www.ti.com/lit/gpn/ADS8689

In the datasheet, it says that one of bipolar range can be +/-5.12V and this seems to be most convenient to me.
What is not clear is related to input impedance.
They say that it's about 1M and so, allowing to use directly (without OA) in some cases. But in my case, resistive divider should be high enough to not draw significant power. A 1M total resistance will dissipate 160mW at 400V which is acceptable. But this will also make a big low pass filter to the input right?
It is ok to hook divider directly to the ADC input?
Another question is related to AIN_GND

They say

In order to maintain the dc accuracy of the system, matching the external source impedance on the AIN_P input pin with an equivalent resistance on the AIN_GND pin is recommended. This matching helps cancel any additional offset error contributed by the external resistance.

What should I understand from this? Add also 10K from this pin to GND ?
(suppose my divider is 1M//10k)


texts: Electromagnetic energy harvesting designing problems

texts:
We designed a very simple energy harvester made of a little magnet that moves inside a coil.

We have a vibrating environment moving at 12 Hz with 10 millimeters peak-to-peak. Our pcb will be attached to the vibrating table and will be potted to avoid problems to the components soldered onto the pcb.

Currently only a gyroscope, an accelerometer and a bluetooth module are on it.

The problems derived from the rectification are not the major issues.

Our PCB has to be attached to this vibrating table, that works 24/7. We realized that our energy harvester has to support ca 14 millions vibrations in just two weeks.

Is this enrmous number of vibration going to destroy my energy harvester?
Should we use another solution (we thought of a battery solution but there are other problems that I cover here: Are Lithium Thionyl Chloride Battery usable in my vibrating environment? Are they safe?)?


texts:
Im trying to design a cascaded amplifier with 3 common emitter stages.
As long as the input AC voltage is below about 20mV the amplification is fine, as you can see on AMP1.
But the output of AMP2 is also maximum at 20mV and and goes much below zero. AMP3 is also maximum 20mV.
The bias of each stage is at 773mV.
How can I modify the bias of the second and third stage for higher input /output amplitude than 20mV?

Many thanks]1


texts: I need to make this electronic electroscope, http://amasci.com/emotor/chargdet.html#13 , but i dont get it , how can i connect an antenna to the gate lead and where the resistance would be connected , in series to FET or to the antenna , if it was to be connected to the gate lead , how?


texts: Earning a living in analog IC design w/o an EE degree

texts: I've asked other questions about having a career in electronics without an EE degree.  I'm wondering specifically about being an analog IC designer.   What would it take to land a position doing that before having that degree?   What would convince an employer to hire me despite lacking that piece of paper?  What kind of employer would I best off sending my resume and other info to?


texts: How can I best amplify a signal from my headphone jack to operate a relay 3-32VDC?

texts:
I'm working with the following op-amps:

LM308AN
LM358P
UA741CP

I want to make a small box that will control the power to any string of christmas lights based off of music that is playing. I would like it to pulse with the base. I want the input to be the signal from the headphone jack of my computer and I want the output to be something that would operate any light that could be plugged into a wall outlet (120VAC?).


texts: Does zxms6004ff come with flyback diode internally?

texts:
As question above, does anyone know better about product from DIODES? I am using zxms6004ff, but not sure about if it comes with flyback diode internally? I read over their datasheet. It only says it is self protected and i email their North America Branch, no one reply me yet. I have no choice to replace to other MOSFET currently. Does anybody know? And if nobody sure about it, would it be possible to add flyback diode anyway no matter it has or not?
Thanks in advance.


texts: Why bridge rectifiers are used in case of DC power supply.?

texts:
I was searching for 12v to 3.3v/5v DC voltage conversion. I found many schematics and the voltage regulators. But in most of the schematic, they have included a bridge rectifier at the starting. As I am a beginner, I thought bridge rectifiers are only used in case of AC to convert AC to DC. I found this similar question but they are discussing about AC volts.

So why bridge rectifiers are used in case of DC power supplies.

Here is the schematic which I found:


texts: I made am making a relay module based on the EC2-3NU relay and just wanted to ask if there was any error in either my circuit or my perfboard layout


texts: Generate gate with a parametrized number of inputs

texts:
I'm trying to generate a multi-input gate for which the inputs can be selected when the design is elaborated.

Let me give an example to (hopefully) make this more clear:

module selectable_xor(input [7:0] in, output out);

parameter [7:0] SELECT = 8'b10010100;

// this should be generated for the default value of SELECT:
assign out = in[7] ^ in[4] ^ in[2]

endmodule

So, out should be the output of a XOR gate which has those bits of in as input for which the corresponding bit in SELECT is set.

I'm attempting something like the following:

generate
  genvar gen_i;
  assign out = 1'b0;

  for (gen_i = 0; gen_i < 8; gen_i = gen_i + 1)
    if (SELECT[gen_i])
      assign out = out ^ in[gen_i];
endgenerate

But this produces undefined values for the out signal.

Is there any good way to generate a gate with a variable number of inputs in Verilog?

PS: About the use case: I'm trying to implement a LFSR for which the polynomial is a parameter.

Edit: The consensus seems to be that I should use the following equivalent expression and trust the synthesizer to optimize it to the circuit I want:

assign out = ^(in & SELECT);

Although I do trust that any decent synthesizer will be able to do this, I still would like to know if there is a way in Verilog to actually code this circuit myself.

Consider that, instead of the XOR-gate above, I wanted to code an OR-gate. The equivalent expression is:

assign out = |(in & SELECT);

Ok, that's practically the same as for the XOR-gate. For an AND-gate, however, the expression is different:

assign out = &(in | ~SELECT);

My point is that for every type of gate, I might have to come up with a different equivalent expression. I'd rather have a general way to code a gate for which the inputs can be parametrized because then I can use the same technique for any type of gate.

Edit 2: Since my bounty expires tomorrow, I will edit this question one more time to bump it. This is a comment I left to explain what I want which I hope will be more visible in the question's body:

  What I want has nothing to do with physical resources. When I talk
  about "gates" I mean the Verilog concept. I want to be able to define
  a gate with inputs depending on some parameter. More specifically, I
  want this gate to have in[i] as an input iff SELECT[i] is set. I
  do not want an equivalent expression that might be optimized to the gate I want. As I've said before, this equivalent expression might
  as well be implemented as 8 AND-gates and an 8-input XOR-gate because
  that's what's actually coded. I hope this clarifies things :-)


texts:
Good day,

I have built a simple power supply that converts 220VAC to 5V and 12V outputs. I used only 1 heatsink for both regulators (LM338). The power supply works, but I am unsure what the common output (Vout left on the schematic) will have on the regulators. One voltage regulator's output is 12V and the other one's is 5V. Below is the schematic of the LM338 voltage regulator and a picture on how the voltage regulators and heatsink look like in my power supply.


texts: RC circuit and bessel filter finding the cutoff frequency

texts:
I've the following filer circuit and I want to know if my analysis is right.

simulate this circuit – Schematic created using CircuitLab

Using the transfer function of a series RC circuit:

$$\text{V}_{\text{C}_1}\left(\text{s}\right)=\frac{1}{1+\text{R}\cdot\text{C}_1\cdot\text{s}}\cdot\text{V}_\text{in}\left(\text{s}\right)\tag1$$

And a Sallen-key filter:

$$\text{V}_\text{out}\left(\text{s}\right)=\frac{\frac{1}{\text{s}\cdot\text{C}_3}\cdot\frac{1}{\text{s}\cdot\text{C}_2}}{\text{R}\cdot\text{R}+\frac{1}{\text{s}\cdot\text{C}_3}\cdot\left(\text{R}+\text{R}\right)+\frac{1}{\text{s}\cdot\text{C}_3}\cdot\frac{1}{\text{s}\cdot\text{C}_2}}\cdot\text{V}_{\text{C}_1}\left(\text{s}\right)=$$
$$\frac{\frac{1}{\text{s}\cdot\text{C}_3}\cdot\frac{1}{\text{s}\cdot\text{C}_2}}{\text{R}\cdot\text{R}+\frac{1}{\text{s}\cdot\text{C}_3}\cdot\left(\text{R}+\text{R}\right)+\frac{1}{\text{s}\cdot\text{C}_3}\cdot\frac{1}{\text{s}\cdot\text{C}_2}}\cdot\frac{1}{1+\text{R}\cdot\text{C}_1\cdot\text{s}}\cdot\text{V}_\text{in}\left(\text{s}\right)\tag2$$

Which also gives:

$$\mathscr{H}\left(\text{s}\right):=\frac{\text{V}_\text{out}\left(\text{s}\right)}{\text{V}_\text{in}\left(\text{s}\right)}=\frac{\frac{1}{\text{s}\cdot\text{C}_3}\cdot\frac{1}{\text{s}\cdot\text{C}_2}}{\text{R}^2+\frac{2}{\text{s}\cdot\text{C}_3}\cdot\text{R}+\frac{1}{\text{s}\cdot\text{C}_3}\cdot\frac{1}{\text{s}\cdot\text{C}_2}}\cdot\frac{1}{1+\text{R}\cdot\text{C}_1\cdot\text{s}}\tag3$$

Now, in order to find the \$-3\$ dB point I need to find:

$$\left|\mathscr{H}\left(\omega\text{j}\right)\right|=\frac{1}{\sqrt{2}}\tag4$$

  Am I right about my analysis?

In my work I used the following values:

$$\text{R}=220000,\text{C}_1=2.7\cdot10^{-9},\text{C}_2=10^{-9},\text{C}_3=150\cdot10^{-12}\tag5$$

And I used:

$$\text{s}=\omega\text{j}=2\pi\text{f}\text{j}\tag6$$

So, I got a cutoff frequency of:

$$\text{f}_{\space\text{c}}\approx200.196\space\text{Hz}\tag7$$

But I cannot check that so I need to know if my work is correct


texts: Can you help me understand how this circuit works? I really don't understand the resistor connected to the 0V rail. How does the BJT ever turn on?


texts: Need advice on laying out a 2 layer PCB. Grounding and power?

texts:
I'm working on a 2 layer PCB with very poor grounding. I want to improve it but I'm a little lost. Basically the PCB as a DC input, a couple of buck converters and some communication signaling like USB, UART, etc that goes to connectors for external devices.

There are no controllers, procesors or RF devices on the board.

Any tips, ideas, application notes, books, etc would be greately appreciated.


texts: Li-ion battery life after being 'completely' discharged

texts:
If the voltage of a lithium-ion cell drops below a certain level, it's ruined. Lithium-ion batteries age. [Source]

As an owner of quite a lot of expensive mobile devices (lots of Apple stuff for example) I wonder... what if I, say, put my Airpods in a drawer at, say, 3% charge and "forget about them" for a few months?

  Li-ion: 5% in 24h, then 1–2% per month (plus 3% for safety circuit) [Source]

Will my device be unusable? As I understand it I won't be able to charge it anymore?

Also: How does Apple (or any other manufacturer) make sure that devices in warehouses etc. don't "die out" during the time they're in there? I know that Apple devices usually come out of the box at least partially charged, but I assume Apple doesn't charge the devices to 100% anyway. But what if the charge drops below "0%" (or: the 'certain level' from above quote)?

Also: what is "ruined"? The above quote implies the cell being unusable, beyond repair, FUBAR. However:

  The protection circuit turns off and most chargers will not charge the battery in that state. A “boost” program applying a gentle charge current to wake up the protection circuit often restores the battery to full capacity. [Source]

and

  Some battery chargers and analyzers (including Cadex), feature a wake-up feature or “boost” to reactivate and recharge batteries that have fallen asleep [Source]

Would such a 'wake-up' be available in consumer products (laptops, phones, earbuds, whatever) or would this be put only in industrial stuff?

  Lithium-ion batteries age. They only last two to three years, even if they are sitting on a shelf unused. So do not "avoid using" the battery with the thought that the battery pack will last five years. It won't. [Source]

Is that information outdated? I have had quite a few mobile devices over the past decade(s) that lasted much longer than that.

I'm trying to make sense of a lot of sources that all seem to contradict each other one way or another.


texts: INA125 single supply small weight problems

texts:
TL;DR My wheatstone bridge won't respond to small weight changes when using single supply.

I'm trying to wire up this circuit below using these 5kg load cells.

I am able to get the circuit working with a single supply to the INA125P but the output does not change (stays around 54mV) with small weights in the 10-100s of grams range and will then start working normally with larger weights.

I switched over to a dual supply which seems to work well and is extremely sensitive but I'd rather not need to add to the circuit for negative voltage nor have to offset the entire output voltage as to only output positive voltages to the ADC since it can't handle negative inputs.

Being as this is a prototype for a project I'd like to eventually make a small batch of, I'm amenable to using nearly any other configuration of electronics so long as cost stays fairly low. A different instrument amplifier that may be rail-to-rail, adding in an ICL7660 for negative voltage, or any other recommendation is welcome. That said, I'm extremely limited in physical footprint for the scope of this project and could not use a board like the HX711.

So my questions are:

1) Why am I not getting any response from the bridge with small loads when using single-supply and how can I fix it?

2) If it comes to needing to use a negative voltage, would an alternative rail-to-rail amplifier be a better selection bang-for-buck?


texts: Mechanically, is a latching switch always a momentary switch?

texts:
I am looking for a switch that (mechanically, not by circuit design) is first a momentary switch and then latches down when depressed far enough to be a maintained switch.

Do all latching switches have a "momentary moment" before latching, or do I need to look for a specific sub-type of latching switch? I'd rather not buy a switch only to find out it doesn't have the momentary function.

Edit: Sorry I'm not sure if my description was clear. What I am looking for is a switch that when you depress it to say 5mm connects the circuit (turns on an LED etc.). If you release it at this point it just springs back and turns off the LED, i.e., a momentary switch. However, if you depress it to 10mm it locks mechanically and keeps the LED on permanently. Then when you depress it to 15mm this unlocks it and it springs back up and disconnects the circuit and you are back where you started. I'm sure I've used these in real life before, I just wasn't sure if it was standard behavior.


texts: I have a Powertip "PC1602F B" LCD I bought a while ago for a project, and have long lost the design specifications for it. The datasheet is rather confusing, listing several different voltages. Do I need a negative voltage? What should the range of adjustment for contrast be? Is the voltage relative to Vdd? (which will probably be 3.3V.)


texts:
the whole thing i'm trying to do for about 3 mounth's is measuring IR-level with high accuracy, i tried many newbie circuits with huge noises, unstable results etc..
then i focused on ADS1110, an ADC chip which has an internal 2.048V vref so i can't use any value bigger that Vref for measurement. in other side, i'm using a voltage divider to generating voltage changes in different IR levels. not matter how much photodiode is sensentive and what is maximum and minimum resistance of it, the importance is just steady results for ever...
so an steady power supply is the key, and i just found LM4040CIZ-2.5 available for myself (and don't know any other steady supply) which can provide 15mA maximum current.
but that is 2.5 not 2 in voltage! then i decide to use this formula to calculate R1 :

and this one for R2 & R3 (considering an absolute maximum current drawing or passing trough Lm4040) :

also i moved photodiode before the divide line in serie with R2 (instead R3)
here is the circuit :

simulate this circuit – Schematic created using CircuitLab

i cant validate this method, im not crowling for a negative answer (80% i guess my circuit not works) i just trying to find a way to get an steady result from photodiode and ADS1110

TLDR : i read some things about Op Amps with a few understanding, im not sure if they are undependent voltage stability? here is the reference

EDIT:
Answer to comments, my imagine of steady is something near to a Big 1.5v Battery which i used many times to measuring IR level but unfortunately the whole of the big batteries goes empty then and new batteries are different from each other in millivolts,


texts: How to implement control of the bidirectional buck-boost dc/dc converter in software?

texts:
I am at the beginning of the development process of the control software for this dc/dc converter i.e. bidirectional buck-boost converter

I have studied the available literature and I have found that there are four possible operational modes of this converter

energy transfered from \$V_1\$ to \$V_2\$ in buck mode (in this mode: \$S_1\$ controlled by pwm, \$S_2\$ off, \$S_3\$ off, \$S_4\$ off)
energy transfered form \$V_1\$ to \$V_2\$ in boost mode (in this mode: \$S_1\$ on, \$S_2\$ off, \$S_3\$ off, \$S_4\$ controlled by pwm)
energy transfered from \$V_2\$ to \$V_1\$ in boost mode (in this mode: \$S_1\$ off, \$S_2\$ controlled by pwm, \$S_3\$ on, \$S_4\$ off)
energy transfered from \$V_2\$ to \$V_1\$ in buck mode (in this mode: \$S_1\$ off, \$S_2\$ off, \$S_3\$ controlled by pwm, \$S_4\$ off)

As far as the control strategy in most cases the cascaded control loops (outer voltage loop and inner current loop) have been mentioned in the literature

Let's say I will use this control strategy. A couple of questions arise in my head

How to determine whether the energy shall be transferred from \$V_1\$ to \$V_2\$ or from \$V_2\$ to \$V_1\$?

Can I use the same control structure mentioned above for both the directions of the energy
transfer and only change the controlled variable according to the direction of the energy
transfer i.e.
energy transfered from \$V_1\$ to \$V_2\$, then controlled variable is \$V = V_2\$ with reference value \$V^* = V^*_2\$
energy transfered from \$V_2\$ to \$V_1\$, then controlled variable is \$V = V_1\$ with reference value \$V^* = V^*_1\$

Let's say I somehow determine the direction in which the energy shall be transfered then
I need to determine whether the buck or boost mode shall be used. Can the control software made this decision  based on only on the measurements of the V1 and V2 and their relationship i.e.
energy transfered from \$V_1\$ to \$V_2\$ and \$V_1 > V_2\$, then buck mode
energy transfered from \$V_1\$ to \$V_2\$ and \$V_1 < V_2\$, then boost mode
energy transfered from \$V_2\$ to \$V_1\$ and \$V_2 > V_1\$, then buck mode
energy transfered from \$V_2\$ to \$V_1\$ and \$V_2 < V_1\$, then boost mode?

According to the summary of the operational modes mentioned above each mode contains
several transistors which are permanently off. It means that the control software has to mask
the pwm outputs for those transistors. Is it possible to do this based on following table
energy transfered from \$V_1\$ to \$V_2\$ in buck mode, then mask pwm outputs for \$S_2, S_3, S_4\$
energy transfered form \$V_1\$ to \$V_2\$ in boost mode, then mask pwm outputs for \$S_2, S_3\$
energy transfered from \$V_2\$ to \$V_1\$ in boost mode, then mask pwm outputs for \$S_1, S_4\$
energy transfered from \$V_2\$ to \$V_1\$ in buck mode, then mask pwm outputs for \$S_1, S_2, S_4\$?

Thanks in advance for clarification.


texts: Isolation between measuring voltage from low current circuit?

texts:
simulate this circuit – Schematic created using CircuitLab

I have a low current current circuit and I would like to be able to measure the voltage on one point of the circuit but have electrical isolation between the low current circuit and the circuit for measuring the voltage. Needs to be impossible for higher voltage to make it to the low current circuit.
Any ideas?


texts:
I am a newbie. I am trying to finish a school project, I need to transmit an analog signal to the computer via Bluetooth.

I am using Bluegiga WT12 as the Bluetooth module, and I want to use it with SPP profile. I need to host this module with a uC, which will send iWRAP5 instructions via UART to control the module and send data via UART.

The signal has bandwidth around 4000 Hz, thus I need to convert it to digital with a rate of 8000 samples per seconds at least.

My question, since I am not familiar with uC's around,

what should I look in a uC to fulfill my project? (other than ADC and UART interfaces)
With that how can I use the uC as a host in the UART connection? (the wiring and the software?)


texts: measuring microampere current without noise

texts:
I have a constant current source that can output current in the range of 0mA to 1mA. I am driving 100 microamps through a load resistance (1.5Kohm) and then connected another test resistor (1.0 Kohm) in series with the load resistance. I am trying to monitor the voltage drop across this resistor so that any fluctuations in the current generation can be picked up. For this, I am connecting an oscilloscope across the test resistor and monitoring the voltage waveform.

However, inspite of using high impedance probes (10Kohm) with the oscilloscope whose channel input impedance is set to be at 1Mohm, I am detecting a fair amount of noise in the voltage waveform, which makes it fairly difficult to monitor the 100mV signal that I should be seeing.

Can someone please suggest an approach where I can decrease the noise that is creeping into the measurement? I would like to monitor the current waveform continuously to be able to make sure I am indeed getting the right rating from the current source. Is there a better way to monitor the current waveform which might be far less susceptible to noise?

Thank you.

P.S: At the moment, the entire circuit is on a breadboard and I will make a PCB soon and encase it in a copper lined box (faraday cage) to decrease any EM noise pickup.


texts: PIC: Global variable not modified inside interrupt handler

texts:
I have an interrupt handler for my PIC 16 that should modify a global variable. The global variable is then read by main() in an infinite loop.

For some reason, it seems that the global variable is being modified inside the interrupt handler, but that the modifications do not persist out of the interrupt handler. I am sure that:

The interrupt handler is being called properly
The handler modifies the global variable inside the handler
The code in main() that reads the global variable is correct

Finally, I have been careful to declare the global variable as volatile as recommended here.

What could explain that the global variable change in the interrupt handler does not persist to main()?

[Note: My C code is compiled by XC8. Below is the full code of my reduced test case.]

#include <pic16f1824.h>
#include <xc.h>

volatile unsigned char buttonPress = 0b0;

void interrupt InterruptServiceRoutine(void) {
    // Update the button press value
    buttonPress = 0b1;
}

void main(void) {
    // Make RA4 an output
    TRISAbits.TRISA4 = 0b0;

    // Turn off status LED
    LATAbits.LATA4 = 0b0;

    // Enable interrupts
    INTCONbits.GIE = 0b1;

    // Enable interrupt-on-change to wake from sleep
    INTCONbits.IOCIE = 0b1;

    // Make the RA2 pin a digital input
    TRISAbits.TRISA2 = 0b1;
    ANSELAbits.ANSA2 = 0b0;

    // Interrupt on RA2 negedges
    IOCANbits.IOCAN2 = 0b1;

    while(1) {
        if(buttonPress == 0b1) {
            // Turn on LED <-- Never turns on
            LATAbits.LATA4 = 0b1;
        }
    }
}


texts: Why should we charge the capacitor halfway in 555 timer circuit(as given in datasheet)?

texts:
In the Texas Instruments datasheet for LM555 IC, at Page 11 below Figure 15, the calculations for charging and discharging of the capacitor are given. In those calculations, the capacitor is made to charge halfway only, as concluded by taking time-constant coefficient as ln2.

Is there any merit taken in account while considering this, or is it taken arbitrarily?


texts: Weatherproofing a cheap ultrasonic sensor

texts: Is there a way to weatherproof a cheap ($15-25) ultrasonic sensor for moderate outdoor use? I know Maxbotix sells weatherproof sensors, but these run for $100 each, which is too steep for my project. I just need a sensor to resist light rain. Is there any simple modification I can do, like cover the sensor in saran-wrap, to protect it from small amounts of moisture? i.e. What firm materials are transparent to ultrasound?


texts: Can you have two sources run to one speaker if the power is cut to one?

texts:
I have a Radio that I am modifying to be able to play a old radio programs off of a SD card.

Basically I have a mp3 player and radio in one case the mp3 play is powered off of its own power supply and the radio is powered normally but with a relay in line so that the mp3 player can cut power to the radio. Then put it own signal to the + - lines of the speaker.

Can I have both devices soldered to the + - lines of the speaker or will this cause problems?

They should never be playing at the same time. If the mp3 player is playing there should be no power going to the radio and if the radio is playing that means that the mp3 play is not playing otherwise it would have cut the power to the radio.

Is it safe to do or would I have to make some kind of mixer? Is there any way there could be some kind of feed back that could damage ether device?

The mp3 play is powered of 5v usb if that helps and the Radio is 110v. The only connection would be the - and + of the speaker with both connecting to the - and +.


texts: I recently bought a 3VDC 350mA (13800RPM) motor. Only problem is, I can't seem to find a way to power it. I have a 9V battery, can I use this to power it? If not what do I need to do to power it correctly?


texts: Is 26 AWG good enough for a ~1.5 amps current at 5V?

texts:
I have recently started to learn about electronics and as my first project, I'm trying to make a wifi-enabled LED strip.

I have read a lot about all the theory, followed tutorials, and try to be extra careful because well, toying with electrical stuff can be dangerous.

I don't know what to use to make electrical schematics but I took photos of my design and I would feel a lot safer having some feedback from experienced electrical engineers, especially about my chosen wire size (details below).

Here is some information:

Power supply: 5V, 3 amps (max).
LEDs: WS2812B (20 leds separated in 5 groups of 4, each connected through).
Controller: NodeMCU
26 AWG silicon wires for connecting the LED strips together and also the power supply to the first LED strip.

Here is an overview of the thing:

And here is a close-up of the board, top and bottom (my soldering skills still need improvement, there is no doubt):

Now my main concern here is:

Is my chosen wire size (26 AWG) adequate for such sustained full LED brightness activity?

From my calculations, LED at full brightness (full white) should draw a maximum of 60 mA each, so 1200 mA for my 20 LEDs. I've let that design run at full brightness for an hour now, trying to see if things get hot and so far, it doesn't seem to be the case. But that's hardly a guarantee, especially as I plan to put the PC in a plastic casing in the future, so I assume heat will dissipate even less.


texts:
There are examples for so called neural computing like SHAVE based Myriad2 chip, basically or at least part of it, a VLIW (under 30nm and 1-2 W)

Now, does it make sense to design a neural net on an FPGA? Specifically, a RNN or TDNN?


texts: Running an induction motor with flickering DC

texts:
Is it possible to run(or at least cause some vibrating movement in) an induction motor by powering it with direct current and turning the power on and off?

I am aware that if not switched on and off, DC can not run an induction motor.

As far as I understand induction occurs when the there is change in the magnetic field. Alternative current is used because the magnetic produced by it varies and rotates.

But as Faraday himself observed when he first discovered induction, direct currency causes a stable magnetic field and at that moment some induction occurs and when the DC is turned off the magnetic field disappears and then induction occurs again. But this time it is in opposite direction.

So I don't expect the rotor to turn but can it at least move back and forth to cause a vibratory movement which can power a vibration-powered generator?


texts:
Simple NPN switching circuit to open a relay circuit, first NPN switching part didn't want to work (3rd PCB and endless times of trying).

Circuit wizard diagrams, I split its first part to figure out the problem, then removed the push button to ease it even more:

(Note top view of components below has been photographically mirrored)

Solution by @ Andy aka: I had short circuit at all resistances.


texts: How to design two circuits with Instrumentation Amplifier to produce the same output?

texts:
I want to measure the current in a 5V circuit. The current is between 50uA and 2.5mA. The current is from a NTC and it changes slowly (10Hz measurement is fast enough).

Here is the typical application circuit from the MCP6N11 datasheet. My circuit is very similar.

I intend to use the Instrumentation Amplifier MCP6N11 (because it does the job and I can buy it locally) with the output connected to a 12 bit ADC MCP3204.

I plan two identical circuits (to measure similar sensors). For the same current the circuits should produce the same digital value in the ADC.

I am thinking how I can make sure to see identical values. Because even if I use 0.5% resistors they are likely different in each circuit. I could have i.e. a nominal 100 Ohm resistor which is one time 99.5 Ohm and the other one 100.5 Ohm.

I see the following options:

Add a trim pot parallel to Rsense or Rf or Rg and adjust it so that the circuits match.
Like 1 but with a fixed parallel resistor, i.e. 100 Ohm with a parallel 47k Ohm resistor
Don't change the resistors. Adjust the digital output of the ADCs in the microprocessor (i.e. a * 1.013 = b)

What is the best approach to do this? Initially this has to work with a temperature of about 20 to 50 degrees Celsius. But in the future maybe it should work for automotive temperature range.

I don't really know how accurate I have to build this and how accurate I can build this with of the shelf parts. I try to make the accuracy better than 1% - if possible without a huge amount of work.


texts: CMSIS driver for my ARM Cortex M4 STM32L1xx Series MCU?

texts: I have STM32L1 series  I want to use CMSIS driver for my application but my device does not  Support to CMSIS Driver, There is another STM Family i.e STM32F1 Series MCU  which is supports to CMSIS Driver  So is there any solution to use STM32F1 CMSIS driver to STM32L1 Series MCU ???


texts: Multi-speed control of cage Induction Motor

texts:
Good day All.

KIndly help me to find that why slip (s) is subtracted from synchronous speed (Ns) to get value for actual speed of Induction motor in "Separate-Winding Motor" case( a method for providing multi-speed control)??
                                 i.e.   Speed = 120*Frequency/No. of poles - Slip

Ref : STEP series by Siemens, Basics of Control Components, Page # 56

Basics of Control COmponents


texts:
simulate this circuit – Schematic created using CircuitLab

I have a problem with a voltage divider circuit. I'm not an electrical engineer, so I am having some trouble finding a solution.
I have a circuit with ACS712 30A and another with a precision amplifier (INA125p) and both work properly. The problem is that both circuits give me an analog signal of max 5V. I have a microcontroller (msp432) that accepts an analog signal of max 3.3V. To solve this problem I have done another circuit that implements two voltage dividers. The problem is that when I link the voltage divider circuit, neither of the analog signals have the expected value.
In particular when I use the ACS712 circuit, and nothing is attached at the circuit, I measure a voltage of 2.48V, but when I attach the voltage divider circuit, at the same condition, I expect to read a voltage of 1.6V, but in reality I read a voltage of 0.6V.
Can someone help me find where I'm wrong?


texts: 12-15V to 9V power supply required to power audio equipment

texts:
I have a 12-0-12 transformer with output after filtering 15-16V.
It's for audio equipment uses. I want to power a guitar pedal with 9V. I tried L7809 but it's making a whistling noise, so I tried LM317 with 820 ohms and 4.7k as R1 and R2 which is giving me around 9V.
When I play the guitar, higher notes work, but when I hit the bass side hard, a continuous noise is coming, like a drum roll which can only be stopped by disconnection power supply. I am able to run this with 9V wall adaptor and no issues. I need some way to power the pedals with the transformer. The particular pedal uses .52 mA as per multimeter.

Update : I tried 7v with Lm317 and it's working. How can it work with 9v on linear wall adaptor and not with 2 amp Transformer power supply 9v!


texts: Why is my replacement triac not working?

texts:
I have a Hakko FX-888D soldering station which stopped heating the iron. I found out that the triac (which is a BTA06-600b) went bad so I went ahead and replaced it with a BTA12-600bw. It didnt work. The triac was off all the time even though it was getting its triggering pulses (I know because I saw it in the oscilloscope and compared it with another working soldering station of the same model and brand).

The replacement triac was ok, it was knew and I also tested it outside the circuit.

I know the problem was just that because later I soldered another triac of the same the station came with and it worked.

If you check the datasheets of the two triacs you can see they are really close in specs, so, why didnt it work?


texts:
I have bought a DS3231M Real time clock.
From the datasheet, one can see that when the RTC is powered from VCC with 3.63V, the max current I_CCA is 200uA when I2C is active, and I_CCS 130uA when I2C is inactive. These numbers are supposed to include the temperature conversion current, as it says in the datasheet. However, it also mentions a Temperature Conversion Current I_CCSCONV that reaches up to 575uA

When powered from the battery, the max current with Vbat=3.63V is I_BATA 70uA with I2C active, and I_BATT 3uA with I2C inactive. Note 4 also says that it includes the average temperature conversion current.

However one can also find to the battery characteristics a temperature conversion current I_BATC of 575uA maximum.

So, my question is how can I know the average current consumption when powered from VCC and when powered from Vbat? Also, it seems that if I have one power source, it is better to power it only from VBAT.


texts: SWD vs ST-LINK on STM32F4 Discovery board

texts: Why do we have 2 connectors namely CN2 (SWD) and CN3 (ST-LINK) on STM32F407 Discovery board? Are not they the same thing?


texts: If I buy a full reel of components (let's say resistors) with the intention of sending it to an assembler later so they can assemble my product, is it OK to use components from the reel when I'm soldering at home, or will this make it difficult/more expensive if I later send that partially used reel to the assembler?


texts: Wires not making proper contact/interfering

texts:
I want to register button presses via a Python program I wrote with a Raspberry Pi 3. My buttons are connected both connected to ground and GPIO pins 22 and 27. However, when the buttons are pressed, it isn't giving a constant True but it changes really fast, so I get something like 'True, False, True, True, False, False, False, True, True' when it should be all true.

When the button isn't pressed however, it gives a constant false. I have checked all wires and tried it with and without resistors (10k and 4.7k), but they give the same result.

Is there any way to get this problem fixed? I also tried it with different switches, but they all give the same result. They are wires up with standard jumper wires.


texts: I have an audio interface device and it has a power supply requirement at 9V DC 3.5A. The original power supply adapter that came with it was 9V DC 4A. Can I replace this with an adapter rated for 9V DC 5A with no risk to the interface device?


texts: Connecting 5V device to 3.3V input through a single resistor

texts:
Hi I've got a Raspberry Pi, that's 3.3V device, and a Nextion display, which is a 5V device. They are talking over UART. Obviously RPi's UART RXD link can be damaged if connected directly to the Nextion display output.

Long time ago I read somewhere an explanation that it's not the voltage that damages the lower voltage devices but the current that can flow through. And therefore for input pins like this it's enough to put a big enough resistor between the 5V output pin and 3.3V input pin to limit the current and be done with it. No resistor dividers, no level shifters, just a single resistor. Makes sense to me, but I can't find the original article for reference.

How can I tell what value should such a resistor have?


texts:
I have a ESP12 module which is connected to multiple I2C devices such as an 24C08 EEPROM, DS1307 RTC and a PC8574 expander.
Everything works fine until I decided to add an OLED module to this setup. After adding this module, I2C bus stopped working and no devices were found by the ESP. I tried to remove every component one by one to pinpoint the conflicting component. It seems when I remove the PCF8574 IC (or OLED module), every other component works fine. I tried to reconnect the expander (and OLED) while the circuit is running and then the ESP can detect every component on the bus including the added one!
I tried to change I2C pull-up resistors but no luck. I use Adafruit OLED library for display and this for expander. Both libraries use proper methods to start and end transmission.
Is it a know issue with these two devices? I couldn't find anything on the Internet.
Are there symptoms related to any known issues?


texts:
I am attempting to design an "array switch" where a user can toggle a switch and a different array of LED's are turned on based on multiple reference traces. The picture is my best attempt so far. I have not been able to build this yet, but from my basic electrical knowledge, it should work.

The goal is for the 3 reference HI/LO traces to actuate two separate LED's based on the switch position, 1 LED from array 1 OR 1 LED from array 2 depending on the switch position.

Question 1) Will it work?
Question 2) Is their a better way to do it?


texts:
could someone please explain why is needed to connect common grounds on rc switch. I am trying to understand inner working of this device and why connection with the ground has not been done internally.

Device is called Turnigy RC switch and documentation is provided here: enter link description here


texts: USB null modem cable using 2 x PL2303: are resistors necessary?

texts:
I've built a USB to USB null modem cable using 2 x Prolific USB to serial "converters". I use this cable for debugging linux kernel crashes (in the same way that people have tradionally used "serial to serial" null modem cables) and it works perfectly. I have incorporated 3 x 100 ohm resistors into the cable thus:

                        /  Tx - 100 ohm resistor - Rx  \
Computer A USB - PL2303 - Gnd - 100 ohm resistor - Gnd - PL2303 - Computer B USB
                        \  Rx - 100 ohm resistor - Tx  /

I incorporated the 3 resistors because of something that I read on the internet, but I can no longer remember why or where I read it.

I have 3 questions:

Are the 3 resistors necessary?
(perhaps more importantly) how do you know (whether the 3 resistors are necessary)?
Is a resistor necessary if I perform a loopback "test" on 1 single cable (i.e. by connecting its Tx pin to its Rx pin)?

(For bonus points, what tags should I apply to this question?)

I've searched electronics.stackexchange.com for relevant questions, and I've already found:

USB data serial termination resistors. Need them for STM32F2 micro? If so, what wattage?

USB termination on STM32F437xx

TTL RS-232 current limiting

but I'm reasonably certain that these questions are not duplicates of my question(s).


texts:
I need a single PCB solution for data storage (~2 MB) that can be accessed through USB using a computer.

I DON'T want the micro-controller to access external USB devices. I want the memory to be on the circuit board and files to be easily loaded using a USB cable and a computer.

Does anyone here know of a common solution? NOR/NAND flash just seems like a cheap solution with many things to go wrong if bad sectors aren't handled properly (erase/write is most likely once, but I want to cover my bases if someone changes files a lot).

Maybe a dedicated memory chip (soldered to the PCB) with USB interface and some interface for the micro-controller? The micro-controller needs to read this data after being disconnected from the PC.

I have seen cases where people used SPI flash chips, but the problem is that these need to be erased before the new data can be written and can have issues with bad sectors. I'm looking to avoid this if possible and need a cheap, simple solution (if one exists).

TL;DR
I want storage (~2 MB max capacity) for micro-controller that allows audio file uploads from a computer using USB. I would like it to be a common solution and not a weird alternative. I don't want an SD card as they are too expensive for this small cheap device. If it can take care of bad sectors automatically that's ideal.

I will try my best to answer any more questions you may have. Hopefully I covered everything for now.

Also, I hope this is not a duplicate. I've looked everywhere but my search terms are broad and I don't know how to narrow them down further.


texts: Digital Analog Converter chip , pre programmed?

texts:
Is there a pre-programmed DAC chip?

I don't want to program any DAC, I would like to receive digitized voice data via a transceiver then feed it to a speaker/amp. The data is processed by Arduino Uno (8K Fs) then sent via a transceiver.

Trying to build something like a walkie talkie.


texts:
I am having difficulty calculating the Thevenin resistance of this circuit

I know I need to replace the batteries with links but then I am confused about how to approach R1,2 & 3 in terms of being in series or parallel. Would I consider R2 and R1 in parallel and therefore 1*2/1+2 = 0.667 then add R3 as they are is series then treat R4 as parallel?

I'm looking for the Thevenin equivalent as seen across 'A' amd 'B'

Losing the will with this slightly...

Thanks


texts: Using piezoelectronic components as position trackers

texts:
I've been trying for a while to get this circuit working, I looked all over the place and now, defeteated, I come to the point where I need to ask for help with my specific case.

My plan was to use several piezoelectric components laid out in a grid under floor tiles to track a person's position on the surface. The original plan was to use pressure sensors for this, but given that they are around 20x as expensive per piece than the piezos, I figured it was probably a good idea to try these first. I got the idea that it was possible from this paper: Link to Paper, where they also include a decent explanation of how the system works. Sadly, they don't include a very detailed explanation of the circuits used for measuring or the specific type of piezos they used, so I'm having some problems trying to replicate their system.

Here is the physical arrangement suggested by the above paper:

And here is the behavioral schematic suggested by the above paper:

I have these piezos: Link to Datasheet, for which I haven't been able to find much information online other than this relatively unpopulated spec sheet. They are connected through a voltage adjustment circuit to analog pin 0 on an arduino micro, which then sends the signals through USB to a small processing sketch I have set up to graph them. The problem I'm having right now is that the circuit doesn't seem to work as expected. I want a circuit that is idle at +2.5 volts and goes either to +5 or 0 depending on whether pressure is applied or lifted, so that I can basically track whether a person walked on to or off from the tile.

I initially wanted to use a circuit like the one described in the paper, but even disregarding the fact that their circuit diagrams show absolutely no values for any of the components, since I could relatively easily infer those, there is the problem that at the moment I don't have a transistor at hand, so I couldn't even test it out if I wanted to. Instead, I have attempted to use other circuits I found online with more detailed explanations, but to no avail.

Currently the one that works best is the answer to this other question: Circuit
The output seems to hover at around 2.5v when left alone and react to positive displacement by sending out some sort of pulse. However, it still doesn't seem to react to negative displacement very well or at all. Since this is my first time making this specific type of circuit, I'm not exactly sure what the problem is or if I'm missing something, but I've been trying to make this work for hours and am at a loss of ideas at this point.

I'm pretty sure it's not my program since it seems to work as expected when the piezos are just connected directly to the arduino (with a current drain resistor.) Here's the output of my program after pressing down on the sensor with my finger:

And here it is after lifting said finger:

Any help would be greatly appreciated, and I'll supply any more information if needed.


texts: Replacing a component in an Eagle board that has already been routed?

texts:
I'm pretty new to eagle so there might be a better way to do this..

There's an error in one of the parts I'm using.  It has one of the connections from the schematic to the board going to the wrong I/O pin.  The problem is I've already routed the whole thing before I noticed it.

I changed the connection in the library part file but I think I need to update the part in my board somehow?  It's still showing up with the old connection.  I've tried deleting the part and adding a new one in but I loose all of the routing that I've done.  What's the best way to fix this?