texts:
If the power source is connected to another power source and input voltage is higher than output voltage a bypass diode usually used to protect the regulator:

simulate this circuit – Schematic created using CircuitLab

In all power supply schematics that I've seen so far, none of the designers used a series diode:

simulate this circuit

While the voltage drop can be easily compensate for, heat might be the main reason.

The 12SQ045 schottky diode is capable of passing 12 A, thermal resistance is 3° C/W. at 3 A forward voltage is only 0.4 V;

3 x 0.4 = 1.2 W -- (1.2 x 3) + 25° = 28.6° C

Well that's not so much heat (if I did the math right...)!

The efficiency is important but not for a 3 A linear power supply which with or without a diode always dissipating some power in the main regulator.

Why designer don't use a series diode to protect the regulator and circuitry around it? it's easy and cheap to implant.

Update:

The first example in this question can't protect the components before the transistor unless we add another diode or some extra circuitry, while in the second example a single diode can protect the whole circuit against reverse voltage.

In two answers provided to this question they mentioned the capacitor charge may damage the transistor which is not going to happen because no current can pass through the diode (maybe very little), and the capacitors can be discharged quickly if it's in 10-100 uF region with a 10mA current sinking.


texts: Was this caused by arc flash or just short circuit without any arc flash?

texts:
Can the following be caused by short circuit without any arc flash? There was an initial short between lugs and chassis. Did arc flash occur that caused the lugs to melt. Or can it melt just by the huge current during the short circuit?

In the above. The live wire was lowered by the electrician to the terminal. Then somehow it shorted (between the 208v wire and neutral/chassis ground) causing the breaker lugs to melt and a hole to be produced at the chassis at the back. This also caused a rat size 2nd degree burn in the electrician arm. Was this caused by short circuit without arc flash or was it arc flash?


texts: DC voltmeter yields a value with 21% error

texts: In the following circuit, the dc voltmeter yields -2.36V while the analytical value is -3V which means there is an error of 21%. The error is rather huge. I've searched through the documentation but with no useful information. Is there any setting need to be changed regarding this issue? With the assumption that the diode is an ideal diode.


texts: Internal memory organization of Samsung NAND flash K9WAG08U1D

texts:
I am using samsung K9WAG08U1D NAND flash memory for storing logged data. Datasheet of K9WAG08U1D is shared for part numbers

K9F4G08U0D
K9K8G08U1D
K9K8G08U0D

I am trying to find difference between these multiple chip variants.


texts:
I recently found this op amp exercise and solved it using superposition .The result was UA

I first need to draw U1 and U2 and then based on UA draw the output result.Stuck doing this and now way to figure it out if I'm doing this right so I came here for some needed help

This is my attempt to just plot U1 and U2 without then trying to plot the output UA.

Asking for some advice if my approach of graphing this is right. U1 seems to be right I'm just not sure about U2


texts: High current buffer battery power management

texts:
In my application I have a motor that may require high currents (~140A) for some seconds. But I need to power the system for many hours from a 48V 10A switched mode power supply. The motor is current controlled, so the resulting voltage is not super important.

I thought about buffering the system with a 12S 3.6Ah 30C/60C LiPo battery. It's rated for 14A charging. The 48V/10A supply is then basically an IU-charger that will never completely top up the battery.

simulate this circuit – Schematic created using CircuitLab

How can I protect the battery from deep discharging? If possible, I'd like to avoid having to design a custom power management board.


texts: Current drawn vs Discharge rate of CR3032

texts:
I have been working in a simple LED project which will draw 200mA from the supply. I need the project to be portable, so decided to go with CR3032 Battery product link. It is rated 500mah, i should be able to run my project for 2 hours at least and that's enough for me.

While checking the product page i have noted Discharge Rate - 200µA . I don't understand what exactly this convey.
1) So am wondering that if i could even draw draw 200mA from this battery and power my project?
2) What exactly does the Discharge rate info convey?

P.S : I am a newbie, still working my way in Electronics tinkering. Kindly advice :)


texts: What does -1.#IND mean for real variables in vhdl simulation

texts:
We are writing a code in vhdl. yr22 and yi22 are signals. We are not getting what -1.#IND means.

Heres the code for reference.

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

-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;

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

entity lms2 is
    Port (wr9,wi9,xr,xi : in STD_LOGIC_VECTOR (12 downto 0);
           --u : in integer;

           yr,yi,er,ei,wr8,wi8,zzz,sum1 : out STD_LOGIC_VECTOR (12 downto 0));
end lms2;

architecture Behavioral of lms2 is
signal a,b :real;
signal yr11, yi11, yr22, yi22 : real;
signal p1,p2,p3,p4 :real;
signal q1,q2,q3,q4 :real;
signal r1,r2,r3,r4 :real;
signal s1,s2,s3,s4 :real;

--variable r,s : real range 0.0 to 15.0;

begin

process(wr9,wi9,xr,xi)--process also runs without the parameters,but it gives problems during simulation
--process(u,xr,xi)
variable wr : std_logic_vector(12 downto 0);
variable wi : std_logic_vector(12 downto 0);

--variable wr : std_logic_vector(4 downto 0) :="00010";
--variable wi : std_logic_vector(4 downto 0) :="00011";
--variable wr : std_logic_vector(4 downto 0) :=wr9;
--variable wi : std_logic_vector(4 downto 0) :=wi9;
variable xr1_1 : real;
variable xi1_1 : real;

variable xr1_2 : real;
variable xi1_2 : real;

variable xr_0 : real :=0.707;
variable xi_0 : real :=0.701;

variable xr_1 : real :=0.704;
variable xi_1 : real :=0.703;

variable xr_2 : real :=0.705;
variable xi_2 : real :=0.709;

variable xr_3 : real :=0.701;
variable xi_3 : real :=0.704;

variable dr1 : real :=0.807;
variable di1 : real :=0.801;
variable yr1_1: real;
variable yi1_1 : real;
variable yr1_2 : real;
variable yi1_2 : real;

variable er1_1 : real;
variable ei1_1 : real;
variable er1_2 : real;
variable ei1_2 : real;

variable wr1_1 : real := 0.0;
variable wi1_1 : real := 0.0;

variable wr1_2 : real := 0.0;
variable wi1_2 : real := 0.0;

variable u   : real :=0.008;
variable k : integer :=0;

variable f : real := 3.2;
variable g : real := 2.6;
variable h : real;
variable hh : real;

begin

h := f+g;
hh := f*g;
a <= h;
b <=hh;

--process(xr,xi,u)
--bi <= to_integer(unsigned(k)) ;
--bj <= to_integer(unsigned(l)) ;
--bk <= bi*bj;

for z in 1 to 100 loop
if (k=0)then
xr1_1 := xr_0;
xi1_1 := xi_0;
xr1_2 := xr_3;
xr1_2 := xi_3;

elsif (k=1) then
xr1_1 := xr_1;
xi1_1 := xi_1;
xr1_2 := xr_0;
xr1_2 := xi_0;

elsif (k=2) then
xr1_1 := xr_2;
xi1_1 := xi_2;
xr1_2 := xr_1;
xr1_2 := xi_1;

elsif (k=3) then
xr1_1 := xr_3;
xi1_1 := xi_3;
xr1_2 := xr_2;
xr1_2 := xi_2;
end if;
k := k+1;
if(k=4) then
k := 0;
end if;
yr1_1 := wr1_1*xr1_1-wi1_1*xi1_1;
yi1_1 := wr1_1*xi1_1+wi1_1*xr1_1;
yr1_2 := wr1_2*xr1_2-wi1_2*xi1_2;
yi1_2 := wr1_2*xi1_2+wi1_2*xr1_2;

er1_1 := (wr1_1*xr1_1)-(wi1_1*xi1_1)-dr1;
ei1_1 := (wr1_1*xi1_1)+(wi1_1*xr1_1)-di1;
er1_2 := (wr1_2*xr1_2)-(wi1_2*xi1_2)-dr1;
ei1_2 := (wr1_2*xi1_2)+(wi1_2*xr1_2)-di1;

if (er1_1<0.0) then
er1_1 := (-1.0)*er1_1;
end if;

if (ei1_1<0.0) then
ei1_1 := (-1.0)*ei1_1;
end if;

if (er1_2<0.0) then
er1_2 := (-1.0)*er1_2;
end if;

if (ei1_2<0.0) then
ei1_2 := (-1.0)*ei1_2;
end if;

if(z=1) then
p1<=er1_1;
p2<=ei1_1;
p3<=er1_2;
p4<=ei1_2;
end if;

if(z=25) then
q1<=er1_1;
q2<=ei1_1;
q3<=er1_2;
q4<=ei1_2;
end if;

if(z=50) then
r1<=er1_1;
r2<=ei1_1;
r3<=er1_2;
r4<=ei1_2;
end if;

if(z=100) then
s1<=er1_1;
s2<=ei1_1;
s3<=er1_2;
s4<=ei1_2;
end if;

wr1_1 := u*(xr1_1*er1_1-xi1_1*ei1_1)+wr1_1;
wi1_1 := u*(xr1_1*ei1_1+xi1_1*er1_1)+wi1_1;
wr1_2 := u*(xr1_2*er1_2-xi1_2*ei1_2)+wr1_2;
wi1_2 := u*(xr1_2*ei1_2+xi1_2*er1_2)+wi1_2;

end loop;

yr11 <= yr1_1;
yi11 <= yi1_1;
yr22 <= yr1_2;
yi22 <= yi1_2;

end process;

end Behavioral;


texts: SMD ceramic capacitors producing ticking sound?

texts:
I've soldered a couple of SMD capacitors to pads which were not intended to host them. As a result there's a bit of space between the PCB and the capacitors. I have a signal on the capacitors as shown in this question on the output of the circuit and if my sound-card is right, the capacitors are producing sound of same frequency as the signal.

My question is: Is that a reason for concern and if yes, how would I solve that problem?


texts:
When 2 solar panels are connected in series, the output voltage is sum of both panels but the output current (measured by short circuiting) is the same as single panel.

What I dont understand is that according to ohms law, if volts increase, current also increase. But in solar panels case why is it the same?


texts:
Till now I have derived potential equation like in the picture shown below.

But now i stumbled upon derivation of potential for coaxial cable where the minus sign is not there in front of the equation.

I would like to know the reason why it works there without a minus sign.
Is it because of the definite integral or better say, that we have the two points to find out the potential difference?
Thank you.


texts: Determining minimum number of NAND/NOR gates required to realize a Boolean expression

texts:
Is there any algorithm to determine the minimum number of NAND or NOR gates with

given number of inputs
availability / unavailability of complemented input

required for realizing a Boolean expression? We can get an AND-OR form as prime implicants via Karnaugh maps that is minimal (as far as I know, the Quine-McCluskey algorithm obtains them deterministically). Does a similar technique exist for NAND or NOR implementations, too? At least, such technique should determine the required minimum number of NAND/NOR gates even without finding the actual diagram?

Applying De Morgan's law on the prime implicants doesn't seem deterministic,

A ⊕ B = A'B + AB' = ((A'B)'(AB')')' [5 NAND gates]
A ⊕ B = (AB + A'B')' = ((ABAB+ABB') + (A'AB+A'B'))' = (AB(AB+B') + A'(AB+B'))' = ((AB+A')(AB+B'))' = (((AB)'A)'((AB)'B)')' [4 NAND gates by reusing (AB)']


texts: Charger says 5-cell li-ion battery at 17.7 volt OCV dead or deeply discharged, what could the cause be?

texts:
I have a lawnmower with two lithium-ion batteries. I charged them after sitting during the winter period. One battery charged happily to 19.15 volt open circuit voltage (OCV), whereas the other had the charger flashing both of its lights. I measured the other battery after trying to charge it for an hour and it had 17.7 volt OCV. I let it rest for another hour, and it still has 17.7 volt OCV.

The battery charger user manual specifies that if the charger flashes both of its lights, either the battery is dead beyond repair or deeply discharged. It won't tell which of these two conditions is true. Apparently it tries to rejuvenate the battery by charging it extremely slowly, so slowly that it does not heat at all.

I'm somewhat surprised by a battery having 17.7 volt OCV being proclaimed as dead or deeply discharged.

What could the cause be?

The fully charged battery has 19.15 V / 5 = 3.83 V voltage per cell.

The dead battery has 17.7 V / 5 = 3.54 V voltage per cell. To me, this does not seem to be beyond repair.

Is it possible that the 17.7 V battery has one bad cell and four good ones? If it's possible it has one bad cell and four good, what are the chances of rejuvenating it by trying to charge it slowly for many hours?

I cannot access the individual cells without dismantling the battery. It only allows me to access two terminals at the ends of the chain.


texts: Calculate output DC operating point voltage

texts:
For the circuit below, how do you do hand calculation to calculate DC operating point voltage Vo.

Actually, I can't find a way to do it now. Hope anyone can help.

Thank you.


texts: "Do your own balance car" can only use torque (Nm) but the tutorial is all voltage. How to convert?

texts:
I want to achieve a balance car in UNITY, but its API (and here) is using torque. I am not an electrical engineer.

I searched on the Internet about the production of self-balancing unicycles, and then implemented UNITY in UNITY which has a complete API but can only provide torque as a property but the tutorials are all output voltages.

Can anyone advise me how to relate voltage to torque?


texts: Is it possible to print on 0.035 mm copper foil with a laser printer?

texts: I have seen 0.035 mm copper foil. Until now I have used toner transfer method to etch my PCBs. If one could print on this foil directly it would be almost to good to be true. Any experience or thoughts on that matter?


texts: Usage of callbacks and circular buffer UART reads using DMA

texts:
Trying to understand the flow of the DMA transfer via uart:

- Configure uart
- Configure dma
- enable DMA stream to initiate the transfer
- IRQ handler gets fired
- disable interrupts, and invoke `DMAXferCmplCallback()` in case of receiving data from the uart
-  write the received data to a FIFO in memory (circular buffer) while keeping track of the start/end index.
-  process the data / do any action based on what was received?

Is that a general idea? My questions:

do we really need to have a callback? is the main reason for having it to mainly process the incoming data? is it better than something like:

    while(true) {
        usart_serial_read();
        parse_serial_read();
        execute_serial_data();
        //clear out the rx buffer for the next input ...
     }

is circular buffer really required if I don't have to keep track of past inputs? One reason I know circular buffers are useful is how you can continue writing to it without having to worry about overflowing it like in case of a linear buffer since you can wrap things around in a FIFO.
How I have it now is I receive the data, store it into a linear buffer, parse it before \r, and then clear it. This way I have the full buffer prior to each input reading.
should the callback be a part of the uart or dma file?


texts: Create Circuit to come ON when momentary contact is RELEASED, not pushed

texts:
I am trying to create an electronic circuit, that is sort of a "not?"  When the switch is pushed, nothing happens.  When the switch is released, after a momentary press, then the Led would light.  This will drive a simple light, and finally the entire process would be reset with a second button. The reset can happen at the momentary press of switch #2.

A friend of mine at work seemed to think this would be a good application for a 556 timer chip, which I gather has two 555 timer circuits in it, which are somehow linked, and the output of one of them controls the start of the second timer.  I'm not exactly sure how you would apply that to my project, but I suppose it makes sense, the first button would trigger the timer circuit, for as long as button #1 is pressed, and then AFTER that button press, trigger the second timer, which would go on forever until a signal from Switch #2.

I assembled and created this circuit.  I don't currently have a switch that does what #2 does, but with a jumper wire, I can simulate it.  It doesn't work.  :(

My friend from work seems to think it was in my description - But I re-read the description and it's pretty straight forward.

LOAD TO BECOME ACTIVE WHEN SWITCH #1 IS RELEASED.
SWITCH #2 TURNS OFF THE POWER TO THE LOAD.

Doesn't SOUND that complicated to me, although I wasn't able to figure out a way to make it work.  In my mind, logically, sure, you have a latch that's activated by the release of the first button, and is de-latched by the second.  Easy peasy!

Tons of Thanks in advance guys!  (and/or gals)


texts:
I recently heard that at fast switching speeds (rise and fall time in terms of nanoseconds) short circuits can occur inside logic gates. So to prevent damage to the circuit there should be a capacitor connected on the input of gates.

So why exactly do we use a capacitor and why does a short circuit occur?


texts: power down some but not all DDR on a bus? And I'm thinking of DDR3/3L and DDR2.

texts: I'm starting to learn about power managment, and am wondering, can you power off a DDR module on a memory bus while others are still in use? Or does that mangle signal integrity on the bus? I assume it's OK to turn off one full bus while continuing to use another bus, such as dual-channel memory controller?


texts: Does a 230 V (240 V) single-phase motor technically draw twice as much current as the label states?

texts:
I've always thought P = U * I (units watt, volt and ampere, respectively), but I ran across this discussion on a forum:

  If you look in your panel there are 2 “hot wires coming in from the
  pole”. 1 is the 120v A phase and 1 is the 120v B phase. you need a hot
  leg from each one to make 240V. if you have a machine drawing 20 amps
  on 120V it is drawing it from 1 phase. If you have the same machine
  drawing 10 amps on 240V it is drawing 10 from the A phase and 10 from
  the B phase.

  The easiest motor for me to read the name plate on is a 1.5 HP 3450
  rpm Baldor motor. It was on the shelf.  It states at 115V it draws
  13.2 amps.  next it states 230V it draws 6.6 amps.

  “amps x volts = watts”

  13.2×115 = 1518

  6.6 x 230 = 1518

  no matter what you do it will draw the same amperage total.

To me this explanation contradicts itself since it says that the motor draws both the same current and the same power. Is the motor actually drawing 6.6 A from each hot wire (for a total of 13.2 A), or is it drawing 3.3 A from each hot wire? If it's 6.6 A from each hot wire, it seems the classic "current x voltage = power" equation is misleading for 240 V "single-phase" circuits.

Update: to clarify, this question applies to 120 V and 240 V current in the US.


texts: Connecting 5 12V LEDs in a parallel circuit

texts:
I recently bought 5 12V ultra bright LEDs (all identical), and want to hook them up to a battery pack of 8 AA batteries. So I figured I could just make five parallel circuits with one LED in each, and hook them all up to the 12V DC. Since I'm quite new to hobby-electronics, I'd like to hear your input.

1) First of all, I've read in a related question that it's a good idea to always have a resistor in such circuits, even if the voltage matches the LED exactly. How many ohm should this resistor be?

2) It's ok to put the resistor "before/after" the the 5x parallel circuit, right? Or should I have 1/5 the resistance in five resistors, one in each parallel circuit?

3) Since the circuit now has a resistor, and it works by generating heat by consuming power, won't the battery be drained quicker with such a resistor in the circuit?

4) Finally, are all "regular" LEDs 20mA?


texts: Do I have to keep an AGM battery on float charge 24x7?

texts:
I have a 50 Ah  AGM battery that I use rarely (lighting during power failures,  off grid camping, etc) - I use it a few times/year.

To prolong the life of the battery, do I need to keep it on a float charger all the time, or is it sufficient to use a timer to turn on the charger for a few hours every month (week?) to top off the charge? The charger I'm using is designed for AGM batteries and is is able to supply a float charge indefinitely.

I'm diligent about minimizing vampire loads by using a hard power switch to turn off unused devices and appliances so would rather not keep the battery charger on 24x7 unless it will make a significant difference in the lifetime of the battery.


texts: If positively biasing amplifier does minimum voltage on input pins apply?

texts:
I am using an amplifier to bias a signal for an ADC.  The signal range is -1.25 to 1.25 volts.  I have the 2.5V precision reference for the ADC through a voltage divider to the inverting input of the amplifier.

Is it ok if the amplifier is powered from a single supply 0-3.3V to have the -1.25V appear on the input pin since it is biased to 1.25 volts?

This does not apply to any particular part, I have been looking at datasheets for the last hour and every single one doesn't want the minimum voltage on the input pins to be far enough below the V- for this application.

If it is safe I don't have to put in a dual supply.

simulate this circuit – Schematic created using CircuitLab


texts: Zener voltage resolution at fixed current and load?

texts:
Under a fixed optimum current and negligible load (ie being used as a reference into an opamp) how steady is the voltage of a smoothed zener? The scenario is a zener carrying a current of 5mA in its optimum region, with that zener voltage being fed into a resistive voltage divider with a 100n cap for smoothing.

How steady is the voltage, assuming constant temperature?
How does it compare to a "real" voltage reference chip?

Context: In a prototype I used the above configuration. In the second prototype I used a voltage divider smoothed with 100n cap fed from the power rail (3V on board regulator). The performance of the analog signal processing degraded considerably and I am wondering whether voltage stability is the problem.


texts: Is it possible to use openocd to program an atmega using an AVR ISP (mk2)?

texts:
I have an ATMega2560 on a custom board which I want to program with my AVRISP mkii.

I have successfully programmed it using the Arduino IDE, and also over the commandline using avrdude.

Is there a built-in "interface" config/script which is likely to work? I'm not even really sure what setting to use for the "interface" (e.g. ft2232, buspirate).


texts: Why do DRAMs retain their state better when they are cold (when powered off)?

texts:
I'm sorry if this is off-topic.  It may be better suited for a computer hardware forum, but I couldn't find anything appropriate.

I've been reading about the cold boot method, which can be used in forensic investigations, by enemy governments, or by criminal attackers to gain the key to an encrypted hard drive from DRAM when the computer is powered off.  This method fascinates me, because I never realized DRAMs retained their state when powered off, but apparently the capacitors can retain some of their charge for minutes or even hours when the computer powers off.

Something I was wondering about.  The paper says that the rate of decay is significantly slowed at lower temperatures.  Why is this so?  I'm guessing it's because the electrons are less excited at lower temperatures, so they are less likely to jump from molecule to molecule, so the capacitors are able to retain their charges for longer.  Am I correct in thinking this?


texts: Can you ground the dielectric of a capacitor?

texts:
To measure the soil moisture of a house plant, I've put two knives in the soil (covered with shrink sleeve), and attached a capacitance meter. The dielectric constant of water is really high, and as a result, when I add water to the dry soil of this plant, the capacitance increases!

However, the measurement is extremely noisy. The noise seems to depend on the size of the plant, measuring a glass of water is almost noise free, but when measuring a 1 meter tall plant, there's more noise than data and even averaging 1000 measurements isn't enough.

I thought it could be EMI (radio waves) related, so I attached the ground of the capacitance meter to the soil to short the interference to ground, but now I'm measuring a capacitance of zero. Does anyone know what's going on here? I've spent the whole day reading about the theoretical underpinnings of capacitance but still have no clue.


texts: Convert 3V unbalanced microphone to 48V phantom balanced

texts:
I have the following circuit in an existing product, which has a microphone, power switch, LED indicator, and is powered by 2 AA batteries:

simulate this circuit – Schematic created using CircuitLab

The LED and power switch are nice features, and I'd like to keep them in circuit if possible, but if there's a much easier/cheaper/better way to accomplish my other requirements that involves sacrificing those parts, I'd consider it.

Concerns

When the switch is OFF, XLR1 is shorted to XLR2. Wouldn't this potentially damage a phantom power supply? If so, how can I prevent this damage? Move C1 to (A)?

Desired Features

Instead of needing to use 2 AA batteries to make this microphone functional, I'd like to power it using a 48V phantom power supply. I can source that power from XLR1-XLR2 (based on my understanding). Can I just switch out R1, R2, C1, and switch some wires around, or would it be more straightforward (read: cheap) to build a small separate circuit to drop the voltage from 48V to 3V, then insert it where the battery is?

Additional Needs

I need a balanced circuit, so that I can use wires of longer length to carry the signal. The fact that XLR3 is not connected in the circuit above tells me that I am working with an unbalanced signal at the moment. I think converting this to balanced will involve a transformer like so:

simulate this circuit

The red wires are there to bypass the electrical isolation, so I can use the phantom power. If somebody knows what kind of transformer to use for this, can you give me a part number?

Electrical Characteristics

Capsule type: Condenser
Frequency response: 100Hz-16kHz
Output impedance: 200Ω
Sensitivity: -43dB±2dB
Polar pattern: Ultra-cardoid
Reference sound-receiving distance: 40cm
Power supply: DC3V

TL;DR

How can I (cheaply and efficiently) convert this unbalanced DC3V microphone into a balanced 48V phantom powered microphone, while preferably maintaining the functionality of the LED and the power switch?

I'm a newbie to EE, so any help or guidance is appreciated.


texts: Simulating RAM in modelsim - cannot find library

texts:
I have a design in Quartus that includes an (on chip) RAM module that was created using the altera mega wizard. The wizard warns me that to simulate i need to include the altera_mf file.

When I load my design in Modelsim and try to simulate, it errors out with "cannot instantiate altsyncram. Module not found.

Below my work library is a library called altera_mf which includes the altsyncram module in there. However, I cannot seem to figure out how to make Modelsim use it.

How do I add/link the altera_mf library to my project?


texts: Control a 3.6V motor (forward/idle/reverse) using two phototransistors facing a smartphone screen

texts:
My purpose is to build a cheap quick-and-dirty "robot" using 2 electrical screwdrivers connected to the wheels and a smartphone to control them. I want to control each motor (forward/idle/reverse) using two phototransistors/photodiodes/photoresistor facing the smartphone screen.

My idea is to use the battery (3.6V) and motor of this electrical screwdriver http://www.ikea.com/us/en/catalog/products/60196103/ and somehow connect it to a smartphone screen to move it forward or backward or switch it off. The smartphone would show two squares on the screen each of them can be black or white. The phototransistors would be placed on the screen, detect the color and switch the motor (using other transistors or relays). For example if both squares are white the motor would go forward, if both are black backwards and if one is white and the other black the motor would be idle (without short-circuiting the battery).

I am not an electronics expert and I don't know what is a good detector for the light coming from a smartphone screen (infrared detectors won't work). I assume that the detector should be touching the screen and isolated from exterior light. I don't know which is a good switch for this kind of motor (3.6V), either a transistor or a relay.

I would like the solution to be simple and cheap, using the 3.6V battery of the motor. I want the motors to be either on or off depending on a light threshold (no linear response depending on the light).

UPDATE:
This is the motor

When running without load (only the gears) the current I measured is 1.84A, but when it starts is higher (I think I saw more than 3A).

I found this specs that may be from the same motor: http://www.mabuchi-motor.co.jp/cgi-bin/catalog/e_catalog.cgi?CAT_ID=rs_380sh the name is nearly the same (there's an extra H) and the dimensions are the same.


texts: Alternatives to common collector transistor switch?

texts:
I am trying to connect a Raspberry Pi / Arduino to a coffee machine. The coffee machine has a simple function, with a single button (momentary switch, on a DC cicuit) to dispense a coffee. I'm trying to add a parallel control to this button, such that the coffee machine can be triggered electronically (app, website, IR remote etc).

I have seen many examples of doing such projects with transistors as switches. I bread-boarded an example myself, using an NPN transistor in the common emitter configuration, with the load connected between the power supply and the collector of the transistor. That prototype worked great.

Opening up the coffee machine, the switch I want to add the transistor to is connected between the load and ground, so as far as I understand, this would mean needing a common collector setup, which won't be possible as the voltage of the secondary circuit is higher than the signal to the base.

If any of the above assumption is wrong, corrections are welcome. Perhaps there is a way..

If I can't use a transistor here, what alternatives could be used to control the secondary circuit?

Software engineer here, learning small pieces of electronics on the fly for this project, so you may need to assume less basic understanding than usual.


texts: Hacking remote controlled RGB LED - Polarity

texts:
I took this little remote controlled RGB LED circuit out of a fake candle and want to re-use it to drive several RGB LEDs.
The LED on the circuit is common anode and I'm using common anode as well.

The circuit is designed to drive one LED, so simply connecting 10 to 20 additional LEDs will probably ruin it as it would draw a lot more current.
So my idea was to remove the LED from the circuit and use the power that it's getting from the remote control circuit to switch transistors (one per color) on my circuit that switch my LEDs.

However, I can't figure out how to achieve this.
If it were a common cathode LED, I would simply connect the cathode to ground and connect each color anode to the base of a transistor, but I don't understand how to do this with the LEDs being common anode and the color pin being negative voltage.

In the example circuit, I focus just on one LED color (let's say the Red ones). If anyone can explain me how to switch D1 - D10 in my circuit using the Red cathode on the remote control circuit, that would help me out.

simulate this circuit – Schematic created using CircuitLab


texts:
I've built a state-variable filter, to this schematic:

R6 and R7 are a dual gang potentiometer (with the 3rd terminal unconnected, so variable resistor), and R2 is a single gang potentiometer (again as a variable resistor). R6/7 controls the filter cutoff and R2 the Q-factor.

To a certain extent it works as expected (as my analysis expected), however, when I bring the potentiometer to the position such that R6 and R7 are zero, the circuit starts behaving as a square wave oscillator, with R2 controlling the frequency.

I understand that my analysis breaks down when R6/7 = 0 - I end up with the cutoff frequency being infinite because I'm dividing by zero, but can anybody explain why the circuit starts oscillating? Why is it a square wave, and can I mathematically work out the frequency?

Also, simulating the circuit doesn't (at least for me) end up with it acting as an oscillator


texts: NPN BJT base->emitter resistance is effectively zero?

texts:
I've been trying to better understand BJT transistors. In particular I've been trying to understand the inverting amplifier configuration. Wikipedia shows this schematic:

Which shows an input voltage Vin. However my understanding of how a BJT works tells me that there is effectively no resistance between the base and the emitter (is this correct?). This would mean an input from a voltage source would kill the BJT. And that it needs to be current limited like so:

I've written up my understanding in more detail here:

https://41j.com/blog/2014/12/npn-bjt-common-emitter-inverting-amplifier/

And tried to confirm experimentally, that there is no resistance between the base and the emitter. If there is an effective resistance between the base and the emitter, which parameter in the datasheet typically tells me what it is?


texts: Why was a transistor used in this circuit for setting the backlight of an LCD display?

texts: The transistor connection was used to set the back-light of an LCD display. Can you explain why a transistor was used and why those resistor values were picked?


texts: How to choose the correct TVS diode and how to size it?

texts:
So I was thinking about transient suppression and I found TVS diodes. I was wondering how to choose the correct TVS diode since they have 3 voltage parameters:

Vc --> clamping voltage, voltage I think you want to cut the transient spike. the voltage at which the device will conduct its fully rated current.
Maximum reverse standoff voltage --> the voltage below which no significant conduction occurs.
Breakdown voltage --> the voltage at which some specified and significant conduction occurs.

I would like to know if I'm trying to use TVS, how to choose the proper diode values if I want to work with Vin = 12V and clamp the spike at 13V?

Is it possible?
What 3 voltages must I select for clamping at 13V when Vdiode grows and keep 12V at load when Vtransient voltage is less or equal than 12V?
Some diodes I have seen with Vc = 13V has Vreverse and breakdown voltages less than 12V. I don't know if this could make it work wrongly. Or whether Vreverse doesn't matter.
I have here a TVS with Vreverse being 12V but clamping voltage 19V. I guess it only works when spike transients exceed 19V, is that correct?


texts:
I wrapped a function for I2C initialization on PIC18F26J50 and it happens to be somewhat like this:

void i2c_init()
{
                                          //Initialize pins as input for I2c
    SSPSTAT=0x80;
    SSPADD=0x18;                                     //100khz baud rate
    SSPCON1=0x28;                                    // Master mode in I2c.
    SSPCON2=0x00;
    TRISBbits.TRISB4=1;
    TRISBbits.TRISB5=1;
}

But when I burn the code into the PIC in simulation it does not work properly. Is there anything wrong with this function? It is supposed to show a clock running at 100kHz.

This is the new code:

void main(void)
{
    OpenI2C(MASTER, SLEW_ON);                         // Initialize I2C module
    SSPADD = 9;                                       //400kHz Baud clock(9) @16MHz
                                                      //100kHz Baud clock(39) @16MHz
    i2c_init();
    while(1)
    {
        StartI2C();
    }
}


texts:
I'm quite new in the field. I need to purchase an op amp chips MCP6004, but I found different version (seems not listed in datasheet)
enter link description here

MCP6004-I/P Microchip,, Op Amp, RRIO, 1MHz, 3 V, 5 V, 14-Pin PDIP
MCP6004-E/SL Microchip,, Op Amp, RRIO, 1MHz, 3 V, 5 V, 14-Pin SOIC
MCP6004-I/SL Microchip,, Op Amp, RRIO, 1MHz, 3 V, 5 V, 14-Pin SOIC

May I know what I/P, E/SL and I/SL mean? What's the difference?


texts: Variable Current Lead Acid Battery Charging

texts:
I'm designing a solar controller in order to charge SLA batteries.

I did some research on dedicated ICs that act as controllers, and found that most implement some sort of MPPT, in order to extract the highest amount of power.

Since the power that the PV panels give can vary in time, I suppose that the charge current isn't a constant but it depends on the conditions. How does this non uniformity of current impact on the battery life, compared to an ideal CC-CV charge curve?

Would it be better to disable the charge if the panels can't provide the power required to satisfy the set current (like an on-off control scheme)?

If anyone has any extra information, I'd appreciate it.
Thanks!


texts:
So I am a newbie.

I want to wire up a bunch of LEDS in parallel, and I have it all working fine on a bread board.

I can find loads of nice drawing of the schematics
But what I cant find a good example of is how to attach LED/Resistors to the wires.
I have seen wire nuts and people just removing the insulation on the wire and soldering on to the bare wire, and then not covering it up. All these just smell bad.

What would is considered best practice.

The project is about a square meter in size.


texts: Measure square waves without oscilloscope?

texts:
I have a Z80 which is misbehaving and want to check the signals. However I do not own an oscilloscope, so I'm looking for another way of checking the square waves on the pins.

I basically just need to determine if it is outputting any sign of life, I'm not interested in the bits per se. Is there a way?


texts: "recommended that CLK begin toggling within 150 ms ... to ensure long-term reliability of the device" -- why?

texts:
In Intel's Pentium Processor Family Developer Manual, regarding the CPU clock, it says that "it is recommended that CLK begin toggling within 150 ms after VCC reaches its proper operating level. This recommendation is to ensure long-term reliability of the device."

From a circuit implementation perspective, how might holding the clock low or high damage the device?


texts: Principles of Electronics Question Parallel Circuits

texts:
In a four-branch parallel circuit, there are 10mA of current in each branch. If one of the branches opens, the current in each of the other three branches is

a) 13.3 mA
b) 10 mA
c) 0A
d) either (b) or (c)

The book gives the answer as (b). I cannot figure out how (b) is the correct answer. According to my calculations the answers is (a). Please help me clarify this problem.

Calculation:
Total current is I total = (10 mA * 4) 40mA.
If one of the branches opens then the current is evenly split among 3 paths. The current for each path is Ix = (40 mA / 3) 13.3 mA. The problem does not specify the resistance for each path so I am assume each path has equal resistance.


texts: Question about how data sent from the tmp102 is processed

texts:
I wired up a TMP102 sensor(on a breakout board) from sparkfun. The wiring made sense, standard i2c wiring. Here is the TMP102's datasheet. I used this guide as a guide for the program that I wrote. The program that is running on the particle photon(the microcontroller board that I am using), has a confusing line of code. The line of code that I am referring to does this: The bits of the MSB that are received by the microcontroller(Most significant byte, not bit) are shifted left, 8 times and then Or'ed with the LSB(least significant byte). The bits of the result are then shifted right 4 times. Lastly, the whole thing is multiplied by 0.0625. This line of code sums up what I just said, and can be seen in the guide linked above:

int temp = ((( MSB << 8) | LSB) >> 4) * 0.0625;

I got everything to work(it measures temperature), but I don't know why it works. My question is: why is the above line of code required? Why do these operations need to be completed?. And as a side question, if the bits in a byte are shifted left 8 times, wouldn't that result in a value of 0000 0000? If my question is a bit vague, please tell me.


texts: Why doesn't this oscillator circuit work?

texts:
I want to make an oscillator for my step up transformer but I can't use an ordinary one because I can't buy anything right now. I have a few components (resistors and exactly two tranzistors). So I came up with this oscillator:

simulate this circuit – Schematic created using CircuitLab

At the beginng the Q2 starts to conduct because it has voltage on his gate so it charges the capacitor. After this step the Q1 is quickly turn on which turns off Q2 but it remainslike that until C1 discharges on R1...And then it starts over again create a square wave (almost).

But when I tried to build it, it failed... Why? What is wrong with this circuit and can you explain why ? And don't tell me that there are other oscillators (I tried arduino but I fried it...) Thank you in advance..


texts: Some questions about using h-parameters to model a BJT

texts:
Below is an excerpt from a book which explains why h-parameters model is suitable for a BJT:

I have couple of questions regarding the paragraph and use of h-parameters:

1-) The text says the reason h-parameters used is that it fits BJT CE as a model. But if we use h-parameters for BJT the independent variables become the base current I1=Ib and the collector voltage V2=Vce. But BJT is a voltage controlled current source which means Vbe must be the independent variable. Why not using a model where V1=Vbe is independent instead of I1=Ib?

2-) Why are h-parameters are valid only for small-signal analysis but not large signal-analysis? Is that because they are not constant for large signals? Why?


texts: When to consider Peak current/voltage vs. RMS current/voltage and vice versa

texts:
When manufacturers create power labels for AC electrical devices, what value to they use for the current and voltage? Do they use the RMS of the sine wave? Or do they use the peak of the sine wave?  Is peak current/voltage negligible when considering the safety of an AC circuit?
In general, when trying to determine which devices, or how many devices to plug into a circuit without overloading it, should one consider the RMS current/voltage or Peak current/voltage?
For example, let's say I am using a power strip that can accept a maximum of 10 amps.  I want to plug in two devices which each have a RMS current of 5 amps, but a peak current of 6 amps.  Also the devices accept 120v, but the voltage of the AC current is constantly fluctuating.  Why are the devices safe to plug in?


texts:
I'm trying to add some protection to an I2C bus, and keep getting an unexpected result.

simulate this circuit – Schematic created using CircuitLab

In principle, I'd expect this to clamp the signal (which I simulate with a sine wave and a small resistor) to between -0.6 to 5.6V. In the simulation, this looks good, but in reality (using LSM115JE3 diodes), the bus signal cannot reach above 3.6V -- which coincidentally is \$5V - (2 \times 0.7V)\$.

Any idea what might cause such an effect?


texts: Lightning Rod Hack By Using Satellite Dish

texts: Our condos' rooftops don't have lightning rods per se, but they do have satellite dishes and AC units mounted there as well.   Would these, if properly grounded (and these should be) act as lightning rod "hacks?"  This question just hit me like, well, a bolt of lightning !!


texts:
Can someone please help me in the analysis of this arduino board power supply works

To my understanding,

In the presence of DC power through the DC jac, Dc voltage is fed to the MC33269 regulator to generate +5V. This same voltage is fed through R10/R11 divider to +terminal of the comparator, while the 3.3v OUTPUT of the FT232RL is fed to the -terminal. the positive differential result drives the output high. However, i'm not sure the effect on the second comparator and the FET
When USB connector is used to power the board, I'm not sure what happens.

Larger version:


texts: How to limits Iout from 3A to 2A using LM2576?

texts: I realised that using voltage divider approach only change the Vout but Iout still remain 3A,is there any way to limit it to constant 2A with varying load resistance ?


texts: Is it possible to reverse engineer a chip design?

texts: Can we make something like chip reader, which can understand chip design and generate blueprint of it?


texts: Is it safe to apply a small voltage to a GPIO pin in output mode?

texts: I want to drive a speaker, in series with a 10uF electrolytic capacitor, from a microcontroller and was wondering what will happen when the GPIO pin goes low, given that the capacitor will try to discharge. Is it safe ? Or do I need to create an alternative path to ground with a resistor ?


texts: Using RS-485 receiver with RS-422 signals

texts:
I have a controller that has a RS-422 output.

Can I use it to only send data to another device that has RS-485?


texts:
I purchased an LED module p10 Led module 16x32 matrix . which i used to make led moving display .Refference -http://extremeelectronics.co.in/news/p10-led-display-panel-interface-with-avr-atmega8/

n that connection what is A & B ?


texts: Can you solder a jumper cable to an LED then to a resistor directly without breadboard?

texts:
The project involves lighting a simple LED from a Raspberry Pi, and I am planning on ditching the breadboard and soldering parts directly onto to each other. For instance:
3.3v pin - LED positive leg
resistor - LED negative leg - ground header pin

I am considering the health of the wires if I directly solder them together without a breadboard. Will they be damaged easily and shall I invest in heat shrink to cover the soldered parts?


texts:
I have a problem with a design of a flyback converter for a power supply. I am using UCC28C44 PWM IC. Converter should star up with at least 200V and VDD should be charged to 14V when 15V should appear on the output and that output should take over the supply of the IC. However, as soon as VDD reached 14 or 15V it starts going down to 9V, which is the lower threshold for the IC to turn off. The IC turns of, the VDD is again charged to 14V, it goes down again and so on in cycle. I have notices that there is no current flowing in the 15V secondary winding so that might be a problem. There is a load on start-up, so I am not trying to run a no load start-up since I've seen that some people had issues with no-load startup.

Does anyone have an idea what is happening and what is wrong?

The schematics is below:


texts: Why I cannot see SPI signal properly with oscilloscope?

texts:
When I monitor a SPI bus with only one probe, I see such output when data is transferred.

I know that I need to use a logic analyzer to monitor the SPI, but I wonder why I see such signal that looks like a glitch; why don't I see square signal waveform?

Or is it a sync function what I see on the output?


texts:
Edited solution:
There are 1k8 ohm pullup resistors on the Curiosity board and there are 4k7 ohm pullup resistors on the trackpad which will give a total pullup resistance of ~770 ohm at max which is too weak. Solution could be to desolder resistors from the board.

Original problem
I'm trying to establish I2C connection between pic32mx470 curiosity board(Master) and a trackpad(slave). After the slave address is sent from the PIC it can be seen on an oscilloscope that the slave pulls down SDA as to ack. However the ACKSTAT bit in I2CxSTAT register never seem change as the code hangs in:

LED2_Set();
if(wait_ack) while (I2C1STATbits.ACKSTAT == 1);
LED2_Clear();

(Whole code below, LED2 is for debugging -> LED on = it is stuck).

Below is an image from the oscilloscope and there are some anomalies such as SDA being pulled below normal operation during ack and SCL being pulled down.

I am using 4.7k pullup resistors on SDA and SCL to 3.3V.
SDA and SCL is set as open-drain output pins in pin_manager.
The same setup works on an Arduino with the wire library, no anomalies on the oscilloscope.
Is this a hardware fault or is there something I am missing with how ACKSTAT should change? I am still unsure exactly how the master is supposed to recognizes a slave ack. Any help is greatly appreciated.

Whole code (Except for pin_manager):

#define LED2_Set()               (LATESET = (1<<6))
#define LED2_Clear()             (LATECLR = (1<<6))
#define LED2_OutputEnable()      (TRISECLR = (1<<6))

uint16_t addr = 0x74;
uint8_t write_buff[2] = {0x00, 0x11};

void I2C_init(void)
{
    I2C1CON = 0;            // Turn off I2C1 module
    I2C1CONbits.DISSLW = 1; // Disable slew rate for 100kHz

    I2C1BRG = 0x9;     // Set baud rate
    I2C1CONbits.ON = 1;     // Turn on I2C1 module
}

void I2C_wait_for_idle(void)
{
    while(I2C1CON & 0x1F);

    while(I2C1STATbits.TRSTAT);

}

void I2C_start()
{
    I2C_wait_for_idle();
    I2C1CONbits.SEN = 1;
    while(I2C1CONbits.SEN == 1);
}

void I2C_stop()
{
    I2C_wait_for_idle();
    I2C1CONbits.PEN = 1;
}

void I2C_write(unsigned char address, char wait_ack)
{
    I2C1TRN = address | 0;
    while (I2C1STATbits.TBF == 1);
    I2C_wait_for_idle();
    LED2_Set();
    if(wait_ack) while (I2C1STATbits.ACKSTAT == 1);  // ### STUCK HERE ###
    LED2_Clear();
}

void writedata(unsigned char addr, unsigned char reg_address, unsigned char value)
{
    I2C_start();
    I2C_write(addr << 1, 1);
    I2C_write(reg_address, 1);
    I2C_write(value, 1);
    I2C_stop();
}

int main(void)
{
    // initialize the device
    I2C_init();

    LED2_OutputEnable();

    // Write to slave once then wait forever.
    writedata(addr, write_buff[0], write_buff[1]);

    while(true);

    return -1;
}
```


texts: Magnetic Field Interfering with Radio Waves

texts:
i am currently building a device that requires a NRF24L01 module to send radio waves to another NRF24L01 to be picked up and interpreted. This is a using an arduino running a code to transmit data via NRF and another arduino above it to receive those signals as seen below.

Everything works perfectly until the wireless charging coil which is in between the 2 NRF modules is turned on. After supplying power to the coil which powers the arduino above to receive NRF data from below no data is being perceived at all. Normally colors are supposed to change when the mouse moves, but instead the same color from what was left when other experimenting took place is the only color lingering as seen below.

After doing some experimenting and moving the arduino away from the coil and plugging it in all signals were being sent successfully. As long as the receiving end of the coil (or receiving end of the NRF module i'm not sure which one) wasn't too close to the transmitting end of the coil. Seen below are positions of the receiving NRF module where signals send from the transmitter were received successfully.

I understand this may not make a lot of sense so here is a short video describing what is happening. Video about problem

My question here is mainly what can i do to fix this issue? will changing the radio frequency from 2.4 GHz to 2.5 GHz or anywhere in between make a difference? Can i mount the NRF transmitter module on the green wall seen in the pictures so that it is above the wireless power coils? or do i need to use a different method of communication?

Here is the coil in question Coil. With the current arrangement when measuring with my multi-meter the receiving end is getting 0.004A or 4mA and the transmitting end is taking 0.01A or 10mA all at 12V. The rated current for the receiving end is 600mA and im not sure how much is being taken in from the transmitting coil when 600mA is reached up top.

here is the data sheet
datasheet. Apparently the coils operate at 0-5MHz

UPDATE: The NRF module isn't receiving data because of the data being obstructed by the magnetic field, but rather because the magnetic field is messing with the receiving module itself. In order to solve the issue im going to have to move the NRF module higher up from the circuit board and data sends perfectly.


texts:
I'm working on a circuit board driven by a PIC18F; one of the components on the board is a water sensor.  This is pretty straightforward, there are two electrodes on a probe; when immersed in water, there's enough conductivity to complete the circuit, and it pulls a pin high on the PIC.  Below is a sketch of the relevant portion of the circuit.  The electrodes are CN4-1 and CN4-2, the board is powered by a 3.6 V battery.

As it stands, it works as intended, but I'm seeing some undesirable behavior.  The system is highly sensitive to anything touching the second electrode, CN4-2; I'm assuming this introduces stray charge to the system, and I can get a false positive detection (even if nothing is touching CN4-1, so the circuit is not completed).  In particular, there's an LED that signals the presence of water, triggered by this circuit.  If CN4-2 is touched by a conductor (either water or something else, like a hand), the I/O pin gets pulled high enough to trigger the LED, but in some cases just having the LED lit is enough to pull some current from the battery, letting the signal to the I/O pin get pulled low enough that it turns off again, and we end up switch back and forth between states.  Tying the ground of the board to an external ground helps reduce this, but doesn't always eliminate it.

Reducing the size of the resistor pulling the pin low reduces these false positives, but then makes it hard for the circuit to pull it high when there's a legitimate signal.  Simultaneously reducing the size of the resistor that pulls it high can fix that, too, but then the total resistance of the circuit is low enough that when the circuit is connected across CN4, there's a significant current draw, which will shorten the battery life significantly.

I inherited the board design, so I won't be offended if you tell me that there's a completely different way to handle this that would be better.  I'm ideally looking to have the system very responsive to a connection across CN4, minimal power draw whether CN4 is open or closed, and preventing a false positive signal when only a single electrode has some contact.  If it can be done without requiring tying the system to an external ground, that would be convenient.


texts: Effect of capacitor size on output voltage of a rectifier circuit

texts:
I have been analysing a half-wave rectifier circuit, in which a smoothing capacitor is used to filter the undulations present. I have experimented with different capacitor sizes on Multisim.

I thought what I've found was strange. I have searched the internet and tried coming up with explanations, but somehow I can't and would greatly appreciate some help.

Observations (using a 5 V peak AC signal input):

If I leave the resistor fixed at 1 kΩ, and I used a 1 uF capacitor, I get a sawtooth shape graph (expected) with a decent sized ripple and the peak voltage of the ripple is 4.4 V.
If I increased the capacitor size to 100 uF and leave the resistor fixed, I get a smoother (more DC-like) voltage. However the value of this smoother DC is now 4.1 V, which I find strange. Shouldn't this DC voltage be exactly the same as the 4.4 V peak that was obtained using the 1 uF capacitor?
What I noticed also is that the bigger the capacitor size, the longer it took for the voltage to stabilise. Meaning that, for the 100 uF cap, it took approximately 40 ms for the voltage to rise and stay fixed at 4.1 V, unlike with the 1 uF cap which immediately produced a constant waveform at the turn on.

I'm wondering if the capacitor size has any effect on the response of the circuit.

I can't seem to find any explanation for this phenomena.


texts: Why is my MOSFET switch circut not working?

texts:
Using the falstad.com circut designer I found a simple mosfet switching circut. However, upon constructing it in real life I found that:

~after powering it on the led starts glowing dimly (it should not glow at all)

~after pushing the button the led brightens up and stay on until the power is cut out (it would be funny, if they st me a triac instead of an mosfet!)

What am I doing wrong here and how can I fix it?
Do you have any working mosfet switch circuts?

Thanks in advance!


texts:
I am in research for building a custom keyboard using an Arduino or Teensy microcontroller. Concerning the programming of the M/C I have come across firmware libraries such as tmk or qmk.

Yet I wonder, why not write some simple Arduino Wiring code such as:

https://www.baldengineer.com/arduino-keyboard-matrix-tutorial.html

What are the benefits of using a library instead of a simple code in which the press of a switch will be detected and an additional signal will be sent via USB?

Benefits on speed, flexibility or anything else?

P.S. I am not sure if this answer belongs here. Feel free to migrate it to Stack Overflow or Arduino Stack Exchange.


texts: How can I pull an op-amp output low without transients?

texts:
I am designing a simple 'junk box parts' adjustable constant-current dummy load. The following schematic seems to be the most promising design, where R4 and R3 are part of a current adjust potentiometer.

I would like to add overtemperature protection to the heatsink of Q1, and have the detection part of that sorted (LM35 sensor, voltage reference, and another op-amp in the LM324 as a comparator with some hysteresis). My question is how I can best use the output of this op-amp comparator to switch off current through the darlington pair Q1/Q2. The possibilities that have occurred to me are:

Use the comparator output to drive the base of an NPN or NMOS connected between the base of Q2 and ground, sinking current away from Q2 when the comparator output is high. The disadvantage of this is that, at least in LTspice simulations, large transients occur during switching (resulting in large current spikes through Q1), as the output of U1 switches between being railed high and being at whatever its equilibrium state is when feedback is active.
Use the comparator output to drive the base of an NPN or NMOS connected between R5 and ground. The disadvantage here is that, while there are no switching transients, the output of U1 is not being pulled all the way to ground when turned off, resulting in leakage through Q1/Q2 of several mA.
Replace the direct connection between the current shunt R1/R2 and the inverting input of U1 with a resistor (10K-100K) and use the comparator output to drive a PNP or PMOS that pulls the inverting input of U1 up to (nearly) Vcc when the comparator output is low. This seems to me like the most sensible solution, except that my junk box has no suitable PMOS parts, and using a PNP is a little awkward with an LM324: the output of the LM324 cannot pull higher than Vcc-1.5V, so the emitter of the PNP will need to be two or three diode drops below Vcc.

Are there straightforward ways to mitigate the disadvantages of solution 1 or 2, or would I be advised to go with solution 3? Or are there any other good solutions?

(I should mention that I ask this question as a hobbyist who is much more interested in learning about circuit design than in making this particular dummy load. I am aware that the best solution is probably to just use a big enough heatsink in the first place, and something like a BTS141 (MOSFET with built-in overtemp protection) instead of Q1/Q2.)


texts:
I want to create an Arduino Weather Station with
Temperature
Rain Gauge
Wind Speed
Wind Direction
Humidity

What peripherals should I be looking at getting?

Ideally I want this project to tweet the results - how do I do this?


texts: How long will an 6000 mAh battery pack power a 12v 60W amp for?

texts:
I could use some help calculating how long my battery will last. I’ve tried multiple online calculators.

Speakers: Peavey Monitors with 10 inch woofer, 1.4 tweeter ~ 101 max SPL

Amp: Pyle PFA200 60-Watt Class-T Hi-Fi Audio Amplifier with Adapter

Battery: TalentCell Rechargeable 12V 6000mAh/5V 12000mAh DC Output Lithium Ion Battery Pack

Using this milliamps to watts calculator, I put in 6000mAh and 12v and get 72Wh.

Since my amp requires 60 watts, shouldn’t it last for just roughly a bit over an hour?

I’ve been playing the speakers fairly loud off of this charged pack and it doesn’t seem to be losing so fast. I think I’ve already listened 6+ hours on just this charge.

What am I missing in my calculations? How long should these speakers really be able to go loud on this battery pack?


texts: DC to DC step-up boost converter compensation pin, what values to use?

texts:
Okay, so I decided on a DC to DC boost converter but am having some difficulty figuring out what values to use for the compensation pin capacitors and resistor. The data-sheet really does not go into how to choose these parts other than to provide a range so I am pretty confused on what components to use.

So far, I made my design to have a 9V output and followed the formulas in the datasheet to produce the following schematic:

How do you go about calculating R3 and C5??

(also, there is an error in the schematic, Fsel should go to ground not Vdd, I am opperating on 620kHz)


texts: direct ZigBee communication with Philips Hue smart light bulbs

texts:
Philips Hue light bulbs use a Bridge(transmitter) to connect between your network and their smart lights via a ZigBee protocol called Light Link.  Can you control the lights directly with your own xBee radio?

I'm most interested in creating my own custom mechanical dimmers and tactile buttons, switches, levers, etc!

Osram Lihgtify and Cree bulbs apparently use Light Link over xBee as well.


texts: Quadrature Incremental Encoder A&B phase

texts:
It’s been two days that I’m searching to understand how an incremental encoder’s precision is quadratured.

I found out that we must be counting the state changes of the two channels A and B,

where A is the signal produced by a photodiode that is lighted by a LED in a square waveform, due to the alternances of opaque and hollow parts of the rotating disque,

and B is the same signal as A but out of phase with 90 degrees, (as far as I comprehended, this shouldn’t mean that receiving photodiodes should be at an angle of 90degrees) it means that between A and B there is a quarter period of the wave spoken about earlier.

How could be this attained ? How can we separate photodiodes A and B in a such way that we have a quarter period of phase, knowing that the frequency of the rotating disque could vary and hence this phase difference between A and B will change too.

Another question, would the speed (frequency of lights) have an impact on the number of bits needed to save the elapsed distance, knowing that the distance is the same at each speed?


texts: Running code from RAM and not using FLASH (ARM)

texts: I have an application for my ARM7 which is usually burned to FLASH, and then on execution it is copied to RAM (to run a little faster). But I remember that my professor once said that I should run my program from RAM because you can only burn the FLASH that many times. So my question is - is there some special way of burning the program so it can be executed directly from RAM (not by copying from FLASH)? I know I could use some custom bootloader, but that's not an option. I can use SAM-BA loader but to my understanding it is used for flashing the device, it cannot be used to execute any code from RAM, and if it could, is writing directly to RAM possible?


texts: Altium hierarchical design assigning net to power port/port

texts:
I have a hierachical multichannel design and I´m having problems to set properly the project properties so that the following issue is removed.

As you can see one of the ports of the child sheet is connected to the Vm_GND power port net.
Once recompiled the schematics I have found that when alt+click over this net, the other Vm_GND port of other schematic sheets in the design do not highlight.
When importing this design to PCB the I_SNS- net is not connected to Vm_GND in the PCB of so this is a major issue because as you can see it should be.
These are my project options:

What am I doing wrong?


texts: Does LTSpice support a "Remainder" or "Modulus" function?

texts:
I am trying to change a parameter in LT Spice  with if statements and make it change on whether a different value is even or odd.

Mathematically, this would be easy with a remainder or modulous function because XR2 or X%2= 0 means it's even and XR2 or X%2= 1 means it's odd. However, I've looked through the LTSpice .param documentation and couldn't find any support for this type of function. Does anyone know another way to perform this operation or if this function goes by a different name?


texts: Potentiometer output voltage deviates from calculated value as knob is turned away from 50%

texts:
I am trying to use a potentiometer as a voltage divider and am finding that the output voltage deviates from the calculated value as I turn the knob away from the 50% mark.  The potentiometer I'm using has a total resistance of 100 kohms and looks like this one:

And here is the circuit I am testing:

Finally, here is a chart showing the deviation of the calculated output voltage from the measured value as a function of knob position on the potentiometer:

Is this a wiper resistance problem?  Any insight would be appreciated.

UPDATE:  This is actually incorrect, see next update

I simulated adding a wiper resistance (Rwiper) in series with the DMM input in LT Spice.  I found that a value of Rwiper = 5 kohm essentially eliminated the error in my calculated voltages.

Here is the circuit:

And here is the plot of the difference between measured and calculated voltages:

UPDATE:

Well, back to square one.  Turns out I was looking at the wrong column in my spreadsheet when I added the wiper resistance above. When I tried to simulate the circuit again I could not obtain the measured voltages using Rwiper.  At any rate, here is a table showing my measured resistances and voltages.  Maybe someone out there can figure this out.  Driving me nuts!


texts: Calculate junction temperature of MOSFET during pulse

texts:
I want to find out how hot the junction gets during a 300 us pulse of 400 A peak current.

Datasheet of MOSFET,
Datasheet

From the datasheet I came across this graph,

For a pulse of 300 us or 3*10^-4 seconds, I found Zth = 0.04 K/W

So, if I = 400 A and Rdson = 0.07 ohms (From datasheet), then

P = I^2*R = 400^2 * 0.07 = 11200 W

Then, Zth = 0.04*11200 = 448 K = 175 degrees Celsius

Therefore Junction Temperature = 175 + Ambient(Assuming 30) = 175+30 = 205 C

Is that correct ?


texts: I’m using a ADC with SPI output for my application, and I need to have two different devices to receive the data from ADC ‘simultaneously’. Since it is ADC, SPI communication will be single-directional. (Data from the other sides are out of interest.) And I have hard time to find a good example for this. Is this possible? If so, is there any good example? Or do I need any extra devices to duplicate signal properly? Need help..


texts:
I am interested in heating coils which are heated using Ohmic/Joule/resistive heating - specifically, how the material for the heating coil is selected.
When I read about heating coil materials - nichrome, carbon fibre etc, the material quality that is mentioned most is electrical resistance (along with a high melting point and stability with changes in temperature). It is my understanding that a high resistance material is typically selected to make heating coils, but how does the thermal conductivity of a material impact the suitability of a material for use as a heating coil?
If two materials had comparable resistance but very different values for thermal conductivity - which material would be the better choice, assuming the goal was a heating coil that heated up quickly using the least amount of electrical power?


texts:
Why do I only get 00? I should be getting a counter on the positive edge of the clock. How do I correct it?

The 8-Bit Synchronous Counter using T Flip-Flops and AND Gates Consider the circuit in Figure 1. It is a 4-bit synchronous counter which utilizes four T-type flipflops.
The counter increases its value on each positive edge of the Clock signal if the Enable signal is high, since it is an active-high signal. The counter is immediately cleared to 0 by setting the asynchronous Clear signal low, since it is an active-low signal. The output of the leftmost flip-flop in the diagram is considered to represent the LSB of the counter.

module lab4part1(SW, KEY, HEX1, HEX0);
    input [1:0] SW;
    input  [0:0] KEY;
    output [0:6] HEX1,HEX0;

    wire [6:0] W;
    wire [7:0] S;

    assign W[0] = SW[1] & S[7];
    assign W[1] =  W[0] & S[6];
    assign W[2] =  W[1] & S[5];
    assign W[3] =  W[2] & S[4];
    assign W[4] =  W[3] & S[3];
    assign W[5] =  W[4] & S[2];
    assign W[6] =  W[5] & S[1];

    tff0 u1 (SW[0],KEY[0],S[7]);
    tff0 u2 (W[0], KEY[0],S[6]);
    tff0 u3 (W[1], KEY[0],S[5]);
    tff0 u4 (W[2], KEY[0],S[4]);
    tff0 u5 (W[3], KEY[0],S[3]);
    tff0 u6 (W[4], KEY[0],S[2]);
    tff0 u7 (W[5], KEY[0],S[1]);
    tff0 u8 (W[6], KEY[0],S[0]);

    seg7 (S[3:0] , HEX0 );
    seg7 (S[7:4] , HEX1 );

endmodule

module tff0(T, Clock, ClearN, Q);
    input T, Clock, ClearN;
    output reg   Q;

    always @ ( posedge Clock, negedge ClearN)
            if ( ~ClearN )begin
                Q <=0;
            end
            else  if ( T ) begin
                Q <= !Q;
            end

endmodule

module seg7(bcd,leds);
 input [3:0] bcd;
 output reg [6:0] leds;

 always @ (bcd)
 case (bcd)
 0:  leds = 7'b0000001;
 1:  leds = 7'b1001111;
 2:  leds = 7'b0010010;
 3:  leds = 7'b0000110;
 4:  leds = 7'b1001100;
 5:  leds = 7'b0100100;
 6:  leds = 7'b0100000;
 7:  leds = 7'b0001111;
 8:  leds = 7'b0000000;
 9:  leds = 7'b0000100;
 10: leds = 7'b0001000;
 11: leds = 7'b1100000;
 12: leds = 7'b0110001;
 13: leds = 7'b1000010;
 14: leds = 7'b0110000;
 15: leds = 7'b0111000;
 default: leds = 7'bx;
 endcase

 endmodule


texts:
Hello, i build a system which suppose to run speed control of electric engine, with loginc of Raspberry Pi.

Control Signal does not go through SSR.

System Connection Logic:

(1) RaspberryPi 3 ->

(2) Bi-Directional Logic Level Converter Hookup Guide ->

https://learn.sparkfun.com/tutorials/bi-directional-logic-level-converter-hookup-guide
to change 3V3 logic to 5V logic

(3) SSR-40 DA ->

https://www.amazon.com/SSR-40DA-Solid-Output-24-380V-SSR-40/dp/B07FVHWN82
to change input signals from DC to 230 V with optocoupler, zerophase and triac

(4) PSC Engine, 1phase, 0,35 A, 1,5 mF

Electronic circuit schematics of SSR, https://www.youtube.com/watch?v=WLP_L7Mgz6M - Solid State Relay || DIY or Buy,

Problem description:

Engine speed control is being build.
At the beginning i though that SSR itself, will be sufficient solution, to command signal ON/OFF, between computer and motor.

It didn't worked. DC signal from 3V3 GPIO, can not open signal on AC side, and Raspberry do not have 5V control system.

However!

While using SSR:
I can run engine, if i connect DC side of SSR to constant 5V pin.
(if i connect DC side of SSR to constant 3V3 pin it DOES NOT work).
While using SSR:
Yes I can control speed control when using mechanical relay like JQC3F-5VDC-C between Raspberry and SSR, where 3V3 signal opens logic, and 5V is let through to SSR.

(But i do not want to use this solution - mechanical relay wont last long with such a frequent work)

To have other device in the middle, instead of Relay, I bought (2) Bi-Directional Logic to let 5V goes, but it does not move the engine.
I connect (2) Bi-Directional device to control Mechanical relay, (to check if (2) works), it is proven that (2) works

What i need to know:

So far as,

SSR with 3V3 signal directly Raspberry Logic AND
SSR with 5V signal indirectly through (2) Bi-Directional

do not let me the 230 V through,

But

5V Signal indirectly through Relay
does let me to control the speed

what i suppose to change in the system to make it work,
Is there any resistor i suppose to put in series somewhere in the system, or what?

Thank you!


texts:
First off, I have very little knowledge in electrical engineering and my last official contact with the subject was when I was in high school so go easy on me.

I am trying to understand if it's possible to control speed and torque on a motor (BLDC specifically) like changing gears in a car. I know that PWMs are used like a throttle; but to change the torque and speed characteristics, is it possible to use multiple transformers? For example. For the same power, a high voltage and lower current will give you greater speed with little torque, like a high gear in the transmission where as high current and lower voltage can you give you high torque and low speed, like a low gear in the transmission.

The idea is that if I have an electric vehicle, I could use a small battery to generate more torque/speed than the same motor with a bigger battery where the max speed and torque is fixed.

Is this idea flawed? If not is there a used case?


texts: I'd like to know if I could directly plug a 0-4 V Tx pin to the Rx pin of an Xbee Pro, serie 1. I've always seen the datasheet, and I can't find there whether this voltage is tolerates or not.


texts:
I have a component I can't identify.  It is a black plastic case component 1.4 x1 x0.7cm in size.  Has three leads and what appears to be a hole in top where some black resin was poured in.  Labelled as such:

6626 / P-B 72053 / 1 8 8

Google searching the label returns junk results.  I can't even guess what type of component this is, since the 3 leads have no appearant continuity or resistance between each other.  I was told this was scrapped from a reel-to-reel computer.

Just so I'm not making a habit of asking questions I can answer on my own, and to help anyone else, Is there a preferred ident method or search engine I should try instead of google?


texts:
I'm looking to draw about 6A. I have an LM338 regulator that can supply up to 5A. Searching the internet I came across this schematic,

So basically when the 1R resistor drops 0.6V then the transistor conducts the remainder of the current. I calculated my own values for those two resistors. Was wondering if my values are fine so that I can purchase the resistors

I want 3A to pass through the regulator, so I got R1 to be,

R1 = 0.6V / 3A = 0.2 ohm

PR1 = 3^2 * 0.2 = 1.8 W

The remaining 3A can pass through the transistor, using the 2N6491 PNP transistor, this one

Transistor

From the datasheet hfe at 3A is 50

So, Ib = Ic/hfe = 3A / 50 = 0.06 A

Vb = Vin - 0.6 (Vin = input voltage to the regulator)

= 13.85 - 0.6 = 13.25 V (Base voltage)

Rb = Vb/Ib = 13.25 / 0.06 = 221 ohm (Base resistor)


texts:
I want to have a LED light up when a load is in circuit, and go out when it is not.

Initially I set the circuit up so that the LED is in series with the load but this didn't work. I think possibly because the voltage drop across the resistor was too high. I could adjust the input voltage to match but I'm not sure I entirely understand the impact of doing so, especially given that the load might be variable.

It occurred to me that maybe I can use a transistor in positions X or Y in the diagram, but I have no idea what type of transistor to use or which pins I should connect where.

Ideally I'd also want to have a diode in series with the load to protect the supply against any voltage coming back the other way, how can I work out how much to increase the supply voltage by to compensate for this? (And can I just use the LED here after all?)

If it matters the load is a bunch of cells to be charged (4x 3.7v Li-on hooked up in parallel for charging, or series when in use)

+VCC is currently 4V but I can adjust this.

EDIT:
I've just realised that actually I can just move the"switch" after all, despite previously stating that I couldn't Basically there are spare pins on the plug that I can use for this purpose.


texts: Electronic test clip (hook/grabber): how to open it up?

texts: How do I properly disassemble one of these hooked test clips? The wire broke off: you can see the tiny remainder inside the oval hole. I want to fix / re-solder the wire, but how do I open up the plastic tube enclosure to get to the inside? I see copper/plastic moving parts inside, but no obvious way (like a paperclip hole etc) to unlock the mechanism.


texts:
This circuit with a bicolor led signals red/green, depending on polarity, working on a voltage ranging from 3-12V. However, it suffers badly from voltage spikes, probably of several 10s of V, in which case it breaks down.  What usually signals its demise is the led showing red and green simultaneously, until one color burns out. Typically, one or both of the diodes die, too.

My line of reasoning is that the diodes can stand a reverse polarity of 75V, and the resistors are dimensioned properly, which should be enough to secure the led, but I am obviously overlooking something. Could someone out there shed some light on this?


texts:
I've got a Hakko FX-888D soldering iron which takes T18 series tips. However, there are some very interesting SMD-type tips in the T15 series and T12 series.

Since Hakko don't seem to publish detailed specification sheets to show the inner diameter and depth of the soldering tips, in which the fixing pipe and heating element are inserted into, I can't figure out if there's anything stopping me from using those other tips on my FX-888D.

Does anyone know if the tips are cross-compatible? Or even compatible enough that I could jury-rig them onto my heating element by replacing the fixing pipe and/or tip enclosure?


texts: Voltage Multipler with change capacitor value ratio

texts:
I want to ask about Voltage multipler.
I understood voltage doubler. By setting the capacitor values of the two capacitors to the same value and setting the voltage doubler circuit, we can obtain a voltage twice as high as the existing voltage. However, what if, without adding capacitors or resistors, can we create three or four times the voltage(voltage multipler) by changing only the capacitor value(ratio) of the two capacitors?
Thank you!


texts: Active filter has unintended attenuation for lower frequencies

texts:
I have design an active filter with an online tool. The circuit looks as follows:

It should be a low pass filter of 3rd order with a cut-off frequency at 50kHz.

Unfortunately, it attenuatues DC components and some lower frequencies as well as seen in the transfer function below:

In case of DC input, the whole voltage drops at the potential shown below as a red dot.

I cannot explain this behaviour. Does anyone know what might cause such a behaviour?

Thanks.

PS: For the measurement setup I used a signal generator for the input signal and I measured the transfer function with a Sampled ACV measurement function of the DMM HP3458.


texts:
One of my tasks in a project is responsible for gathering information about values measured from sensors and write information in a .txt file on an SD card. What would be the best way to do this?

Right now, I create a task with 25000 size of stack depth (xTaskCreate(vtaskArchive, (signed char* )"vtaskArchive", 25000, NULL, ( unsigned portBASE_TYPE )2, &vtaskArchiveHandle);) and I'm gathering information about measurement in a variable char archBuffer[16000]; (16000 is the size of the SD Card) and when size of data in equals 16000, I'm using a sync function to move it to the SD card.
I found information on the FatFs site that performance is the greatest when the application writes the data size of the cluster, but I'm not entirely sure if that's a good way to solve this problem.


texts: What does a black bar across transformer symbol designate?

texts:
What does a black bar across a transformer symbol designate?

This appears in a power electronics context, and in particular in this case with substituting a DC transformer as an equivalent circuit for the guts of a DC-DC converter.


texts: Can an iphone/android cell phone communicate with RFID?

texts:
Is it possible for a cell phone to communicate with an RFID chip?

I'm looking for a low-powered solution to turn a device on/off wirelessly, using a cell phone.

Example: phone sends signal to RFID chip, circuit board switches on.

It really looks like Bluetooth will take too much battery, as this will be a portable device.

Any suggestions ?


texts: Charging Supercap with lower source discharging with higher

texts: Could you confirm I could charge a 13F 5.4v supercaps with 2.8v 3w source and discharge it at 5v? Is it efficient method to change input/output voltage or better use a step up converter?


texts: What happens to other component's power consumption, when uC is switched to low-power mode

texts:
Currently, I am using a uC (Atmel ATtiny85-PU20), which will eventually run battery powered, and I am trying to reduce power consumption of entire circuit to maximise time between battery changes. Apart from the uC this circuit has:

SR HC-04 ultrasonic range sensor module
This ISM band (433MHz) ASK/OOK transmitter module

While I understand how to put the uC into sleep mode, only to wake-up every 8 seconds using the watch-dog timer interrupt, I was wondering, what happens to the peripheral components/modules during this time ?

My initial thought was to put a NPN BJT as a switch, controlled by a GPIO pin, to switch the Vcc fed to the 2 modules, but is the behaviour of such a switch defined when uC goes to sleep state ?


texts:
I am trying to implement this, but there are a few problems I am facing..

Should I connect PIN 5 of DB9 to Earth ground or the negative pin of the source.
When the serial Rx and Tx cables are attached to the MAX232, loopback in occurring. I have checked, there is no short in the breadboard. How is the data coming back? Yes the 'echo' is off in hyperterminal.


texts: Using a rectifier and chopper in place of a transformer

texts: Is it possible to use a rectifier and chopper instead of using a transformer?  Is this something people have done before or that might be possible?


texts:
I am looking at the datasheet for the MCP4725 DAC and trying to find the minimum voltage the DAC will output. In other words, when my code tells the DAC to output 0v, what will the output be? There are two parameters listed in the datasheet that I think are related to what I am looking for. One is the Offset Error of the DAC, and the other is the Output Low Voltage. Anyone know which one is the parameter that tells me the minimum DAC output?

Here is the MCP4725's datasheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/22039d.pdf


texts: How to scale output of FIR filter implemented in VHDL

texts:
For a DSP school project we need to implement sound effects in a SPARTAN 6 FPGA using VHDL.

We tried to keep it simple and start off with a simple (100Tab) FIR filter.

As coefficients we used those created by the MATLAB FDATool.

The MATLAB output are 8bit hex values (like:01,fa,00,fd,fb,03,f4,0b,ed,...).

The filter seems to be functioning. The impulse response looks like one of a FIR filter and the music does sound filtered.

But the distortion is big and the music doesn't sound good.

We think this is due to 'bad' scaling.

The CODEC output (filter input) is 18bit wide, the filter output is 48bit. But the CODEC input (scaled filter output) is only 18bit.

How should we scale the 48bit output to make it fit the 18bit CODEC input?

We tried dividing the 48bit output by a scalar (more or less the same as shifting).
We also tried just removing some MSB values (which we estimated would never be used) and then dividing by a scalar.

None of these methods seems satisfactory and the signal gets distorted.

Would there be a better method to scale the output? We thought of scaling the coefficients but in their current form they just become 0 (sum all coefficients and divide every single coefficient with this value, good for fixed point values but not with these (MATLAB) values?).

EDIT:

After more investigation it appears that all distortion is due to the scaling.
I think this is caused by the removal of MSB when a small scalar is chosen (not enough shifting, so some MSB's containing info are removed). But also due to the removal of LSB's when keeping all MSB'S.

So my question still stands: What would be the optimal way of implementing scaling?


texts: Step response of high-powered servo motor

texts:
I'm involved with a project that will need a servo motor to generate a high torque and a high speed in a short amount of time. Using typical speed/torque graphs and taking into account a certain gear ratio, it's possible to find a (small, and expensive) variety of motors that suit our specifications. One example chosen at random might be this servo motor.

One thing that worries me, however, is whether the motor we select can accelerate in the time we're asking for (<1sec); as far as I know, speed/torque graphs are measured assuming steady state operation.

What would be the parameters to look for to estimate whether a given motor will have the transient behaviour we require? In other words, is it possible to approximate the step response of such a motor?

(Edit: after I wrote this question I realised it is probably necessary to specify what sort of motor control I'd be using; i.e., torque control, speed control, or position control. Ideally it would be good to have the step response of the torque output under a range of loads since the others would follow from that. As discussed in the answers, this might be impossible to know from a data sheet.)


texts: Thin wall to block LED light from hitting photodiode?

texts:
I'm designing a small heart rate sensor using green smd LEDs and a photodiode. The photodiode needs to measure the reflected light, and not direct light from the LEDs. The LEDs are near the perimeter of the photodiode, so I'm trying to figure out some sort of thin wall to block their light from hitting the photodiode. The LEDs have a relatively wide viewing angle (110˚) and are ~1mm tall, so ideally something that is about 2mm tall.

I'm wondering if anyone has suggestions for some type of wall or component I could place between each LED and photodiode to block light?


texts: Land line circuit suggestion / DTMF project

texts:
I am hoping to make a system that I can call in and using DTMF chip can control few things. I don't want to use a cell phone so it has to be a land line, however, it has to be automated so when the call comes in, I can switch the circuit to my MCU, do my thing, and after I press a certain key or after a minute it disconnects. I am not looking on how to build this, I am mostly interested in dev board that gives me this capability. Does anyone know about 56K data modems?
I rather keep it in the embedded level so I don't get into software programming for window, but if you think it's easier please let me know,


texts: What is the Microcode in the Intel's Linux Microcode update?

texts:
I am a bit confused as to the use of the word microcode in the following links:

https://downloadcenter.intel.com/download/27591/Linux-Processor-Microcode-Data-File?product=873

https://newsroom.intel.com/news/latest-intel-security-news-updated-firmware-available/

As far as I know Microcode is intermediate layer between the assembly code and the actual hardware, and perhaps resides somewhere on the processor chip?

If that is the case then how can an OS, in the above case the Linux, update the Microcode?


texts: About hole diameter size, tin diameter size and solder mask diameter size for pad of through hole components in Altium PCB design

texts: Is there any rule  that relate the tin diameter size and solder mask diameter size with the hole diameter size for the pad of through hole components in Altium PCB design?


texts: Why does a rise in ambient temperature cause a base-voltage-biased grounded emitter stage to saturate?

texts:
This is actually exercise 2.9 in Horrowitz and Hill 2nd Ed. which is posed as:

Verify that an \$8 ^\circ C\$ rise in ambient temperature will cause a base-voltage-biased grounded emitter stage to saturate, assuming that it was initially biased for \$V_C = 0.5 V_{CC}\$.

The section it appears in is talking about the shortcomings of the single-stage grounded emitter amplifier, and mentions three deficiencies:

(1) non-linearity such that the gain varies from 0 to a (negative) maximum due to the lack of an external resistor on the emitter

(2) a variation in input impedance \$Z_{in} = h_{fe}r_e = 25 h_{fe} / I_C\$ (for \$I_C\$ measured in mA and the 25 is 25mV which is an estimate for \$V_T\$ in the Ebers-Moll equation, \$h_{fe}\$ is the gain and \$r_e\$ is the internal resistance)

(3) the effect of temperature on biasing according to which \$V_{BE}\$ varies by about 2.1mV / \$^\circ C\$ for fixed \$I_C\$. Apparently \$I_S\$ (the saturation current of the transistor) is roughly proportional to \$1/T\$, such that for fixed \$V_{BE}\$ the collector current \$I_C\$ increases by a factor of 10 for a 30\$^\circ\$ rise in temperature.

It feels like the answer to the question is a trivial consequence of (3), but I'm struggling due to not really understanding the conditions of transistor saturation, and how the \$8^\circ\$ rise in temperature can cause saturation regardless of \$V_{CC}\$.


texts: How would you solve this resistive network?

texts:
simulate this circuit – Schematic created using CircuitLab

I'm not really sure how to solve this. I can't see any series or parallel connections.

I need to find the Total resistance, V1 and V2, and finally I3 with a direction.

Any help would be much appreciated.

(edit)

Okay so now I have taken your suggestions and redrawn it and worked out the values.
it is much easier now to work out, so thanks for all the great suggestions.

Feel free to correct me on any faults in my calculations.


texts: Using an opamp to reduce voltage of audio signal

texts:
I want to feed an audio signal generated by a Cortex M into a legacy IC that accepts 0.9 V max, and draws 1.8 mA max.

Clever people told me that a voltage divider would drain too much voltage out of the Cortex M, and that I should use an opamp with gain 1/4 instead.

Of course I have no experience with opamps at all. Looking at the selection at Digikey, I don't even know what to filter for, since "gain" seems to be a mostly irrelevant term for most opamps there.

Assuming it is as simple as I imagine, can you point out what terms or values I need to look for?

And if it's more complicated than that, can you describe what kind of opamp and circuit I need for this?


texts: Superposition problem with \$\Delta\$-Y conversion

texts:
I'm trying to use superposition to solve the following linear circuit:

Step I step I considered each active component as:

But results are always wrong.
Same procedure on many other circuits give me right answers, but not this one, for some obscure reason.

For example calculating I5

Step 1

Calculate parallel
$$RP=\frac{(R5+R4)\cdot R6}{(R5+R4)+R6}=\frac{2\cdot 1}{2+1}=\frac{2}{3}$$
Calculate serie
$$R_{tot}=R1+R3+RP=3+\frac{2}{3}=\frac{11}{3}$$
Current for the equivalent circuit (R1 and R3 current)
$$I_{tot}=\frac{E1}{R_{tot}}=\frac{10}{\frac{11}{3}}=\frac{30}{11}A$$
Current for R5
$$I_{R5}=I_{tot}\cdot\frac{R6}{(R5+R4)+R6}=\frac{30}{11}\cdot\frac{1}{3}=\frac{10}{11}A$$

Step 2

Quite the same as Step 1 but with half of voltage and opposite sign
$$I_{tot}=\frac{E3}{R_{tot}}=\frac{5}{\frac{11}{3}}=\frac{15}{11}A$$
Current for R5
$$I_{R5}=I_{tot}\cdot\frac{R6}{(R5+R4)+R6}=\frac{15}{11}\cdot\frac{1}{3}=\frac{5}{11}A$$

Step 3

Calculate parallel
$$RP=\frac{(R5+R4)\cdot (R3+R1)}{(R5+R4)+(R3+R1)}=\frac{2\cdot 3}{2+3}=\frac{6}{5}$$
Calculate serie
$$R_{tot}=R6+RP=1+\frac{6}{5}=\frac{11}{5}$$
Current for the equivalent circuit (R6 current)
$$I_{tot}=\frac{E6}{R_{tot}}=\frac{10}{\frac{11}{5}}=\frac{50}{11}A$$
Current for R5
$$I_{R5}=-I_{tot}\cdot\frac{(R3+R1)}{(R5+R4)+(R3+R1)}=-\frac{50}{11}\cdot\frac{3}{5}=-\frac{30}{11}A$$

Step 4

\$\Delta\$-Y conversion
In circuit 3 resistors have the same value so the equivalent Y have 3 resistors of value
$$\frac{1}{3}$$
Calculate parallel
$$RP=\frac{(R1+RA)\cdot (R3+RB)}{(R1+RA)+(R3+RB)}=\frac{\frac{4}{3}\cdot \frac{7}{3}}{\frac{4}{3}+\frac{7}{3}}=\frac{28}{33}$$
Calculate serie
$$R_{tot}=RC+RP=1+\frac{28}{33}=\frac{13}{11}$$
Current for branch RA
$$I_{tot}=A5\cdot\frac{(R3+RB)}{(R1+RA)+(R3+RB)}=10\cdot\frac{\frac{7}{3}}{\frac{4}{3}+\frac{7}{3}}=\frac{70}{11}A$$

So I5 should be
$$I5=\frac{10}{11}-\frac{5}{11}+\frac{30}{11}+\frac{70}{11}=\frac{105}{11}A$$

Which is wrong because of the result must be
$$\frac{85}{11}A$$

The same if I consider RB branch instead of RA.

What's wrong with my procedure?


texts:
I am trying to figure out the best practice for implementing a reset (async applied, sync cleared) and a clear input. I have a process that must run off a logic-derived clock (NCO) that is called code_clk, slower but synchronous to the actual clk. The process involves a Linear Feedback Shift Register that must reset to all 1's to begin a code generation sequence after the reset is lifted. However, throughout operation the process should also reset to all 1's when a new set of taps (T1 and T2) are selected for the output, of course in order to reset the code generation sequence and make sure the new code is valid with the new taps. This is done with a separate, synchronous clr input that gets held high for a single system clock cycle while the taps are moved around.
Here is my code:
  process(code_clk, reset, clr)
  begin
    if(reset='0' or clr='1') then
      -- EARLY LFSR
      EG1(1 to 10) <= (others => '1');
      EG2(1 to 10) <= (others => '1');
      early_code   <= '0';
      delay_os     <= '0';
    elsif(falling_edge(code_clk)) then
      if(delay_os='0') then
        -- LFSR feedbacks for early code
        EG1(2 to 10) <= EG1(1 to 9);
        EG2(2 to 10) <= EG2(1 to 9);
        EG1(1) <= EG1(3) xor EG1(10);
        EG2(1) <= EG2(2) xor EG2(3) xor EG2(6) xor EG2(8) xor EG2(9) xor EG2(10);
        early_code <= EG1(10) xor EG2(T1) xor EG2(T2); -- C/A output of early LFSR
      else
        -- delay of code chips commanded - do not shift this time
        delay_os <= '0';
      end if;
      late_code   <= early_code; -- one half chip delay from prompt code
    elsif(rising_edge(code_clk)) then
      prompt_code <= early code; -- one half chip delay from early code
    end if;
  end process;

The conditional if(reset='0' or clr = '1') kind of jumps out at me as being bad style. It just seems like one of those situations where synthesis will produce unnecessary logic or timing delay because the reset path is not as straightforward. Can I do this or should I try something else? The clear needs to happen immediately so I'd either need to make the process run off of the system clock or something else. Is this considered good practice?


texts: Altium Designer: file could not be found and will be removed from the project

texts: I downloaded a repository (from GitHub) of Altium files, and I am wanting to modify the PCB before sending it for manufacturing. However, I get the error: file could not be found and will be removed from the project when opening it. However, I clearly see those files in the downloaded folders. How can I link the correct files to the project? Thank you in advance for the help!


texts: How to make QAM (quadrature amplitude modulation) of a square or sinc wave signal？

texts:
I found this discussion of QAM in a communications text book and internet.

  "...load it into Matlab using imread(), which will give you an array of
  RxCx3 integers for an RGB colour image. Serialise however you want
  (e.g. using reshape() to get a 1x(R*C*3) vector). Add FEC and
  interleaving/puncturing if desired. Once you know how many bits/symbol
  you are using (QPSK would be 2, 16-QAM would be 4 etc.) then you can
  split each element of your array up into groups of bits (e.g. 2 at a
  time, 4 at a time... if 6 or 12 at a time you'd need to work with
  pairs of elements), apply Gray coding or whatever mapping scheme you
  wish to use to map each group of bits to a complex number, then put
  that in the array elements corresponding to data-bearing carriers of
  your frequency-domain vector. Continue until it is full. Populate the
  pilot carriers that you wish to use with the desired symbols. Take the
  inverse FFT of the frequency-domain vector. Voilà, a baseband OFDM
  symbol in the time domain. Continue until you've used up all your
  image data."

But I read the next formula in one paper, and I do not know how to express the sinc or square waveform into  $$ f(t) = A(t)\exp(j\theta(t) ) $$ and I do not see how to connect this equation with the method described above.

Can someone help me to figure out this?

Thanks a lot!


texts: All I know is that although Cortex-M3/4 micros are Harvard architecture, they can run code from RAM, at least some implementations can (like STM32F4). Can Tiva C series microcontrollers execute from RAM?


texts: What is the implication of supplying power the other way on this circuit?

texts:
We are having a debate on the implication of powering this circuit. The image is only a snipped of the complete hardware- but the debate arises from providing power using a PIN header connected to the +5v bus located somewhere else.

I suggested not to do this and rather connect to the usb +5/gnd pins as the +5v should be used for supply of external circuits and not really to power the entire hardware.

Will the filtering caps have any relevance if we put +5v on the +5V0 Rail instead of VBUS from the USB connector; like originally  designed?

Will this circuit actually have any benefit at all?

Would powering the circuit using the TP1/2 be better than directly powering +5V bus?

-EDIT

It is not powered from a PC but a USB charger rated at 5v 1A - The device peaks 500ma~800-ma depending on what its doing. People want to connect 2A or higher to the 5v0 pin because they cannot find a USB charger with that sort of output. I am trying to establish what can happen if the +5 is connected after this circuit instead of how it was desinged.. from the USB port side.