texts: Erroneous results from ADC and piezo disk

texts:
Okay, so I posted this question before but my design has changed and has become unmanageable.
I am attempting to create an electric tuner device which uses a piezo disk to accurately measure the vibration of a guitar.
The piezo's voltage is passed through an op-amp to buffer it and convert it from a high to a low impedance signal.
The op-amp is connected to the ADC which converts it for the digital-only raspberry pi.

simulate this circuit – Schematic created using CircuitLab
The raspberry pi then uses the data and creates a graph.
At the moment when I plug it in I expect to see 0 voltage and then whenever vibration is made the voltage to only increase and return to 0. like a waveform cut down the middle. However, I get incredibly erroneous results and spikes. Shown below.
It might add some clarity, here is what the setup looks like.
From the top is the Rpi Cobbler, ADC, Op-amp, piezo and pull-down resistor and the voltage regulator ensuring 5.09V from the battery.
On the bottom right-hand side rails is the 5.09V, the top right is 5V and top left is 3.3V (The colours are inverted because of the pin configuration of the cobbler so blue is actually positive on that rail.)
I'm not using the 5V to power the ADC because the actual voltage fluctuated making it useless for a Reference.

Any suggestions are welcome at this stage, it's been driving me crazy for a few days.
Cheers.


texts: why is the the Line voltage drop formula is \$\Delta V=2I_1 (Rcos\theta+Xsin\theta)\$,not \$\Delta V=2I_1(\sqrt{R^2+X^2})\$?

texts:
There is a single-phase two-wire system,if the resistor \$(R)\$ of line is 1Ω and the reactance \$(X)\$ of line is 2Ω,and the power factor is \$\theta\$ .The Line voltage drop formula should be

$$\Delta V=2I_1 \times(Rcos\theta+Xsin\theta),\Delta V=VS-VR$$

simulate this circuit – Schematic created using CircuitLab

I want to ask why is the the Line voltage drop formula is \$\Delta V=2I_1 (Rcos\theta+Xsin\theta)\$,because i think the according to \$V=IZ\$,the line of impedance should be \$\sqrt{R^2+X^2}\$,the line of impedance should be \$\Delta V=2I_1(\sqrt{R^2+X^2})\$


texts: Default Units of length used in datasheet

texts:
I am trying to make a PCB footprint for the MT2 series relay using datasheet.

Am getting really confused whether the units of dimensions mentioned in the datasheet are mm or inches.

Can't seem to find anywhere what is the unit. Is there a default unit in case of electronic datasheets which should be taken if units are not mentioned?

See this datasheet.


texts: Short-circuit protection, reverse polarity automotive

texts:
I am designing a power circuit and would like to integrate the ic VN5160S to protect it, but I have doubts about the position of it.
Would the ic VN5160S be before the DC / DC converter in my circuit?
I am feeding a microcontroller, canbus, bluetooth and rf.

the power input is 12v and passes DC / DC converter to 5v and 3.3v.

The circuit I did is correct for me or something wrong?


texts: Amplifying and filtering a very low frequency signal(Bandwidth of 4Hz)

texts:
Good night, everyone. I want to amplify and filter a signal that has a bandwidth of 3.5Hz and is of the order of 5 - 40 milliVolts. I plan to amplify the signal before filtering it so as to prevent losses of any of the useful signal components in this particularly small signal. I've only ever worked with  signals with bandwidths of 1kHz - 10kHz before so I would like to get some advice on the following issues:

What characteristics for the op-amp should I consider when I am looking at op-amp specification sheets for the amplification stage and why? What types of op-amp should I consider?
Should I use active or passive filter for the filtering stage?
If using an active filter, what characteristics of the op-amp should I be paying attention to when looking at the specification sheets and why?
Does the type of capacitors I use with filtering stage matter?

Any help would be much appreciated.


texts: What is the reason for using h-parameters when describing transistors? Why are they used instead of the physical description?


texts: Why prescaler doesn't give 50% duty cycle pulse

texts: I am new to embedded electronics. While reading the datasheet of ATmega328P, I saw this when timers and their timing diagrams were given...  I wonder why clk/8 is not of 50% duty cycle...Please help me in understanding the reason behind it...


texts: Do we take significance of bit into account while calculating bit error rate?

texts:
The question is broadly about bit error rate, but to be concrete, I am asking it in context of 16-QAM.

Consider we have a rectangular 16-QAM modulation and also assume that we have grey coding. As I understand, grey coding is helpful because even if there is noise, we are off by just 1 bit.

Now, consider the symbols shown in red rectangle in the image below: '0000', '0001' and '0100'. If we incorrectly detect '0000' as '0001' or '0100', bit error is same as in both cases we are off by just 1 bit. However, if we incorrectly fall in '0001', error is tolerable as we are off by the least significant bit. On the other hand, if we fall in '0100', error should be worse as we are off by a higher significant bit.

To sum it up: do we take significance of bit into account while calculating bit error rate? If not, why is that?


texts:
Latency of BLE GATT Read Value Operation
Assume that a peripheral and central BLE devices have a connection established.  Central is running a GATT service with a particular characteristic.  Peripheral has searched for and found the service and characteristic, and it has all handles ready at hand.
What is the latency (in the peripheral) between issuing a read request for the characteristic and receiving value of the characteristic?  I realize there is some back and forth between the peripheral and central, and thus the latency is not constant.  What are the typical, min, and max latency values?  Assume that the peripheral and central have no other BLE activity competing for resources.
In my experiments (using Laird BL654 dongle), I am getting circa 200ms delay but I do not know if this is the best/typical/worst case.
PS: I am talking about regular environment e.g. someone's house. It can, of course, take forever if there is a lot of traffic, bad connection etc.


texts: What ohms value does this resistor have?

texts:
I can't figure out which is the first band of this resistor. The resistor is the damaged.
Can someone please help me?

This is the circuit of an Air-condition.

Backside


texts: Calculate Norton equivalent in a circuit with a voltage controlled voltage source

texts:
I'm trying to solve a problem related to dependant voltage sources. I need to provide two answers which either I can't obtain or don't understand why I have obtained it.

What I have done

This is a summary of what I have done, the details are in the section 'Details'.

For calculating the Norton resistance

In summary, I have obtained the correct Norton resistance by using the following KVL equation, and I have obtained the correct result:

V0 - v1 - v2 - v3 + Au = 0

What I don't understand is why Au is added instead of being substracted, since its polarity is the opposite as V0. As far as I understand, the correct KVL would be:

V0 - v1 - v2 - v3 - Au = 0

With which I obtain a Norton resistance that is wrong. Why is Au being added instead of subtracted?

Norton current

My second question is about the Norton current. What I have done is calculating the Port B voltage (the node just after R2), and divide it by the Norton resistance, that is:

Vportb = It / (R3 + Ru), where It is the total current across the loop and Ru is the Au equivalent resistance.

And then:

Inorton = Vportb / Rnorton

I obtain the wrong result at this point. What am I missing?

Details

The details about what I have done are below (the language used is SageMath):

# Declare known constants
V0 = 5
A = 2
R1 = 1
R2 = 3
R3 = 5

# 'i' is the unknown total current across the loop
# v1, v2 and v3 are the voltage drops in R1, R2 and R3 respectively
i = var('i')
v1 = i * R1
v2 = i * R2
v3 = i * R3

# v1 is the votlage drop in R1
u = V0 - v1

# Au --> dependant voltage source shown in the schema
Au = A * u

# (1) Use KVL
KVL1 = V0 - v1 - v2 - v3 + Au == 0
# Shouldn't the above be -Au?

# total current across the loop (solve the KVL equation)
_i = float(solve(KVL1, i)[0].rhs())
print("Total current = %f" % _i)

# voltage across 'u'
_u = V0 - (_i * R1)
print("Voltage across 'u' = %f" % _u)

# Dependant voltage as if it was a resistor
Ru = A * _u / _i

# Norton ressistance
Rn = float(1 / ((1/(R3 + Ru)) + (1/(R1+R2))))
print("Norton ressitance = %f" % Rn)

# Voltage across port B
VB = _i * (R3 + Ru)

# Norton current: voltage across Port B / Norton resistance
In = VB / Rn
print("Norton current: %f" % In)

############### Results ###############
> Total current = 1.363636
> Voltage across 'u' = 3.636364
> Norton resistance = 2.883721
> Norton current: 4.886364

EDIT - One solution found, but still there are things that I don't understand

Reading the comments, I have found the problem but, still, there are several things I don't understand. What I have done now is:

I have removed this part:

# Dependant voltage as if it was a resistor
Ru = A * _u / _i

And I have applied KCL, so add the current through the two branches (R1-R2 and Au-R3):

I1 = V0 / (R1 + R2)
I2 = 2 * _u / R3
print(I1 + I2)

I still don't understand why treating the dependant voltage source, once I know _u, as a resistor, is not correct.

In addition, I still don't understand how the wrong KVL equation can give me the right answer while the 'supposed correct one' is causing a failure in my results.

Finally, _i is supposed to be the total current across the loop, but it is  1.363636, which does not match with my other result. This is the thing that most disturbs me, it seems that my KVL eq., which takes into account Au, has given me the current generated only by V0.


texts:
i was tring to analyse pseudo nmos inverter but seem to be struck. The pmos above which is grounded will always be in triode region right coz v sd<|vov|? so what will be the R be as shown in my image....wont it change with vds? if so can you explain how this pseudo nmos works qualitatively?

I am having a hard time understanding graphs of its characteristics in my book.

i dunno....when the nmos is off, say 0 volts......book says output will be high , but how? the pmos is in triode so by its equations it should flow current through it but the circuit is open ckt coz nmos is off.......so there is this wierd current source with some resistance hanging at top according to me


texts: How to avoid input floating ports on a microcontroller?

texts:
I have 16-bit Thunderbird12 Microcontroller, similar to the Freescale 68HC12.

I'm currently working on a project to monitor and control the level of water. Everything is working fine except for the input ports which have floating pins and they are randomly reading low and high. I did some research here and found that pull-up or pull-down resistors are the solution, but my set up is different.

There are 5 "sensors" that feed into the input ports. Each sensor is connected with 2 wires; one wire goes into the pin, and the other into VCC, then both are inserted into the container with both ends exposed. When the water level goes up, it touches both ends and completes the circuit and setting the input to 1.

The problem I have is that the input pins still read High even if the wires are not connected yet. What can I do do prevent this high impedance? I can't ground the wires or set them to 1, because the latter is supposed to happen only when the circuit is completed (when water touches them).

Any help would be appreciated, thank you!


texts: Constant current circuitry tolerance dependency

texts:
I have the below given circuitry. The circuit provides ( 12 - 3.3 = 8.7 V) 8.7 V / R3 of current.

My specific question:
What is the effect of PNP transistor on the variation of current?

Until now I have following cases:

more current case: R1 max, R2 min, R3 min
min current case: R1 min, R2 max, R3 max
supply voltage variation.

Thank you in advance.

Edit: the output is taken across capacitor. The load is not shown which can vary between 1k and 10k.


texts: What do these numbers tell about the Litz wire parameters?


texts:
Is the stepper motor DC or AC motor?
Is the stepper motor DC or AC  motor ?


texts: 462 MHz UHF Narrow band FM (FRS) Receiver IC

texts:
Anyone know of an IC I can use to receive signals from FRS/GPRS radios (462 MHz) FM? Most of the stuff I can find are either transceivers (which I don't need to transmit) - or different frequencies altogether.

I'm a strictly digital guy - so going a bit outside my comfort zone.


texts:
Attenuation describes the weakening of the signal as it travels from the transmitter to the receiver. However, this textbook describes a concept called "rapid signal attenuation" as a way to allow frequencies to to be reused in closer distances.

How does rapid signal attenuation help reuse frequencies? What does it do to help us reuse frequencies without interference.


texts:
What's the difference and trade-offs between a h-bridge motor controller and a mechanical speed controller for controlling a brushed motor in an RC car?

I have a cheap RC car that I'm trying to retrofit with an Arduino to convert it into a semi-autonomous robot. The car comes with a cheap mechanical speed controller, which seems to be essentially a rotary potentiometer mounted on top of a servo. The controller is also wired into an enormous resistor housed in an aluminium casing. It's motor is a brushed RS-540SH, which the specs say has a stall current of 42A, which I'm guessing is why it has such large resistors.

I could easily wire the mechanical speed controller's servo into an Arduino, but would there be any benefit to using a h-bridge motor controller instead? Based on what I know about each, the h-bridge benefits would be:

completely solid-state, no slow servo or unreliable potentiometer involved
ability to electronically brake the motor

while the benefits of the mechanical controller would be:

it's already there and installed, so I don't need to do anything
only uses a single DIO pin on the Arduino (vs 3 with a h-bridge)
completely isolates the motor from interfering with all other onboard electronics

Am I missing anything?

I have a L298N based h-bridge on-hand that's rated for well over the motor's maximum voltage, but it can only handle at most 2A, which is much less than the motor's 42A stall current. Would that be safe to use, or would I be at risk of burning it out my h-bridge?


texts:
I'm looking at an equation for average power in a signal

$$
p_{avg} = \frac{1}{R} v_{rms}^2
$$

and wondering why it isn't

$$
p_{avg} = \frac{1}{R} |v|_{avg}^2
$$


texts: Will an electric heater coil stop drawing power when the surrounding temp is the same as the coil's temp?

texts:
I am trying to figure out if I can melt Aluminum cans using a heater coil from a toaster oven.

I've already used q=mc∆T and q=m*(Latent heat of fusion) to figure out how much energy is required to melt a mass m of aluminum, considering no heat loss to surroundings.

What I'm having a hard time with is that I know the coil needs to be at least 660°C in order to melt the aluminum. So, for example if at full draw the coil's temperature is only 500°C, once the surroundings reach 500°C, what happens? Obviously the aluminum isn't going to melt, but does the coil just stop drawing current since it isn't able to transfer the energy?

Thanks.


texts: Can I use an ATtiny84 as SPI slave and i2c master in the same application

texts:
I'm designing a board using the ATtiny84A which uses a USI (Universal Serial Interface), and as such there is no dedicated I2C and SPI peripheral.

I have gotten I2C to work and tested it by communicating with a 24AA02UID EEPROM.

I have gotten Slave SPI to work and have tested it by returning requested data to a master.

My question is: if the ATtiny has no control over if/when the master decides to start an SPI transaction, is it possible to use these same USI pins to query the EEPROM over i2c?

I'm guessing that allowing the external SPI master to use the i2c pins that are attached to the EEPROM willy-nilly is going to cause strange data to appear on the EEPROM if/when the master happens to send a byte corresponding to the i2c address of the EEPROM chip, followed by other random data.

Or, am I worrying too much?  I was hoping that the SPI signals would be disregarded by the EEPROM due to improper i2c protocol formatting.

The problem of the external SPI master taking control of the lines during a i2c communication sequence is troubling, however.

Is the best solution to use a tristate buffer that my ATtiny84a can toggle to cut off the external SPI master from the lines in question whenever it wants to read/write to the EEPROM?

EDIT:

It would seem that the cheapest and easiest and most awesomest solution is to simply use a different ATtiny chip.  I think I will go with the ATtiny88 which has a dedicated TWI and SPI port (on separate pins):


texts: PWM (Pulse Width Modulation) vs DAC (Digital Analog Convertor)

texts:
I am working on a project where I take over the control of a Nintendo 3DS Touch Screen.
The touch screen is a 4 pin system.

I have it all wired up and working, however I cannot get the screen to simulate the click anywhere outside of the 1,1 coordinate.

I am using an Arduino Mega2560 which does NOT have a real DAC. I did try adding a simple low pass filter to the circuit but saw no difference. (low pass is 0.1uf capacitor with 100 ohm resistor).

I am using 2 PWM pins for X+ and Y+ input and 1 Analog pin for sensing Y+.

The documentation here: (https://github.com/dekuNukem/3xtDS/blob/master/overview.pdf)
Code here: (https://github.com/dekuNukem/3xtDS/blob/master/tp3ds.cpp)

Page 7 of the documentation shows how the timing works. In the example they are using a Teensy 3.1 with real DAC "since the touch screen requires really fast response".

Is my issue not having a real DAC?
Maybe my low pass filter is wrong?


texts:
Is it possible to experiment with chip antennas on a breadboard? Any circuits available to let me do that?

I am looking at this chip antenna, but any other is ok.


texts: Why is it called General Purpose Processor

texts:
I need some help to understand the name "general prupose processor". Through my search I read that a GPP is a:

General-Purpose Microprocessors (Hardware....)
General-Purpose Macroprocessors (a computer program, Preprocessor?)

So I think that the name should say, it is used generally everywhere (Hardware and Software).
Am I right ? By the way, is a PC CPU also a GPP ?


texts: Doesn't using resistors serial to LEDs all the time waste a lot of energy?

texts:
I was wondering for a long time why in schemes which use LEDs for lighting it's very common to put a resistor to go with the LED, and finally it seems like the answer in this question explains why. (It's the easiest way to control the current through he LED to prevent LED from burning up.)

But still, isn't this a big problem? Don't those resistors waste a lot of power and isn't there really any other practical solution?

Is there a reasonable calculation that could provide some numbers to show just how much power is lost to heat from resistors in a typical lighting application? It seems according to the answers that the power loss is likely so small that it doesn't matter. How can one show this using the real numbers?


texts: How do the Dflipflops in the SAR Logic work?

texts:
D-flipflop with set and reset can only work when set=1=reset , and Q value depend on D & clock,but as the SAR logic circuit shown below , we can find set and reset aren't equal to 1 in the same time

So i am curious that how the D-flipflop works in SAR logic to let the SAR logic output become like

D9=1,D8=0,...D0=0

D9=0,D8=1,D7=0,....D0=0

D9=0,D8=0,D7=1,D6=0,.....D0=0

and become D9=0,D8=0,D7=0,D6=0,.....D1=0,D0=1 in the end


texts: Autoreset circuit for arduino - how I think it works

texts: HI I wanted to ask the resistor and capacitor combination within the black circle, it forms an rc constant right? Am I correct in assuming when the chip is powered up, the capacitor is charged up.  The capacitor is discharged when the reset line i spuled low, thereby toggling the DTR pin on ftdi chip?  Wouldn't the voltage applied to the capacitor also affect how fast it charges?


texts: PIC24/PIC16 power consumption during reset

texts: I am working on low power application that has long Vdd rise time. I have external power supervisor that control PIC24/PIC16 MCU reset pin. It holds MCLR pin low during Vdd stabilization period and pull it up once it's stable. The problem I am seeing is that MCU consume ~1 mA power while pulled low. This is quite high number for my application given that MCU consume only 30uA while operating normally. I checked both PIC16F527 and PIC24F08 and they consume 1mA while MCLR pulled low. Anyone has any idea where this power goes to and how to reduce that?


texts: Heat sink installation in pcb production

texts: If a design calls for a heat sink, such as on a TO-220 package, is it normal for an assembly shop to install it during production, or is that something that generally needs to be added on afterwards by the company using the PCB in their product? I would rather have an assembly shop do it, but am wondering if it is standard practice for them.


texts: Multimeter reports voltage but no power?

texts:
I have an Insteon FilterLinc, which is an electrical line filter. It doesn't work. When I connect a lamp to the "filtered" outlet, I get no power. So I stuck multimeter probes into the filtered outlet and it shows voltage, but I am not able to power a lamp or anything from it. I thought it might be the fuse, but I tested both sides of the fuse for continuity and it said there was connection...but I suppose it could be getting a connection from the other way. I'm not sure. What could be happening?

Here is all the information and schematics I could find on the device:

Overview of the internals

Schematic

Many thanks in advance!


texts: Is there a way to generate a mss file from the exported SDK XML file at command-line? At the moment, I still have to open xsdk, generate a new hello world project to create the mss file. But I would like to generate the mss file with makefiles.


texts:
I'm planning to make an ATMEGA328P development board.
I'm new to electronics. Schematic is shown in the image.

Please let me know it is correct or not, and please let me know if any changes or suggestions required.
Please check the LM7805 part also, and also let me know if anything should be taken care of during PCB design (planning through hole?)


texts: Can I solder 5V USB to a tablet battery connector?

texts: Dad asked me to solder a cable to the broken microUSB connector, but it's totally broken and it's really hard to solder it that way, so I want to solder a cable directly to the battery connector and completely remove the battery from the tablet since the battery won't be in use. Will the circuit take those 5V from the USB or should I find like a 4V power supply?


texts: Proper magnetics usage in midspan Power over Ethernet applications

texts: Assuming I would build a midspan PoE Injector that has a Data and a Data+PoE Connector and is supposed to inject power into the Data+PoE Connector, how would I have to use the magnetics in this case? All the schematics I find are using an Ethernet Phy, for example this one from maxim where Tx Data and Rx Data are supposed to connect to an Ethernet Phy Chip. Can I just connect the other Ethernet Connector to it? Or do I have to use magnetics again and then I can connect another Ethernet connector to it? Or do I need to use a complete Phy/Switch IC in between?


texts: What is the impedance of a Microchip PIC I/O Port configured as input when Vpin > Vdd?

texts:
I'm using a PIC18F1320, and it is powered with VDD=4V.
There is an external power signal, with a higher value than VDD.
The external signal is connected to the RB5 I/O port through a voltage divider:

All internal pull-up resistors are disabled.
Port is set as input via TRISBbits.RB5 = 1;

Under those circumstances, I expected the node P to be around 6.95V. But instead I found it to be at 5.6V.

This means that node P is leaking almost 35mA but:

The node P is also connected to a MOSFET gate, whose leakage current is, according to specifications, 2uA.
According to PIC18F1320 specifications, the leakage current of I/O ports configured as inputs is 1uA. But it also specifies that the test condition is "VDD < VPIN < VSS", which I'm not meeting.

My question is:

What is the impedance of the input port when the input voltage is slightly over VDD?

simulate this circuit – Schematic created using CircuitLab


texts:
I'm a beginner in EE, so maybe the following question seems obvious to you. I have to design a circuit that gets a number from 0 to 9 via a decimal keyboard, and then show the corresponding number on a 5x5 grid of LEDs. But it's not an ordinary one because it should show the numbers in Farsi (Persian). (I've attached the figures)

Now my question is how to start to design such circuit?
I really appreciate any help you can provide.

Farsi numbers on our grid:


texts:
I am working on a rectifier design.  For that I am analyzing the formula for capacitor selection.  I came across a video reference.

Io: average output current
Vo: Average output voltage
Vc: capacitor voltage
Im: peak current
α:duration of peak current
π: half cycle duration
Vr: ripple voltage
Vm1,Vm2:capacitor peak voltage

I understood that for capacitor selection the formula is:
c=(π-α)/π * Io/2fVr
I don't understood how Vm2=Vm1 * Cosα.


texts: Consecutive PWM signals with different prescaler settings

texts:
My ATtiny85 circuit generates signals like this one on PB1 (OC0B) using fast PWM (preamble, 16 bit data, stop pulse):

I have trouble with the leftmost longer pulse. At the moment i use simple _delay_us statements to generate it, but it sometimes introduces glitches later near the end of the PWM (orange and yellow) parts.

It seemed smart to switch to using timers for this part but I can't get it to work correctly.
This is my code:

const uint8_t JVC_MUTE = 0x71;
const uint8_t JVC_ADDRESS = 0xF1;

void setupPWM () {
//enables fast pwm, non inverting,TOP=OCR0A, prescaler 8
TCCR0A = (1<<WGM01)| (1<<WGM00)|(1<<COM0B1);
TCCR0B = (1<<WGM02)|( 1<<CS01);
}

void stopPWM () {
TCCR0A = 0;
}

/*emits a long preamble pulse
*/
void preamble(){
//enables fast pwm, non inverting, prescaler 64
TCCR0A = (1<<WGM01)| (1<<WGM00)|(1<<COM0B1);
TCCR0B = (1<<WGM02)|( 1<<CS01)|(1<<CS00);
TCNT0=0;
OCR0A=255;
OCR0B=80;
do ; while ((TIFR & 1<<OCF0B) == 0);
TIFR = 1<<OCF0B;
TCCR0A = 0;
}

/*emits 16 bit of data using fast PWM
code:16 bit data value to be send (address + command)
*/
void sendCode (uint16_t code) {
TCNT0=0;

    //padding instructions 1
OCR0A=0;
OCR0B=0;
do ; while ((TIFR & 1<<OCF0B) == 0);
TIFR = 1<<OCF0B;
    //padding instructions 2
OCR0A=0;
OCR0B=0;
    //waits while polling the OCF0B bit signaling a compare match with OCR0B
do ; while ((TIFR & 1<<OCF0B) == 0);
TIFR = 1<<OCF0B;

            //loops through each bit in the 'code' variable
            //and emits a long or short pulse depending on value
    for (uint16_t Bit=0x8000;Bit;Bit=Bit>>1){
            //if 1
        if (code & Bit) {
        OCR0A=255;
        OCR0B=80;
    }
            //if 0
    else {
        OCR0A=130;
        OCR0B=80;
    };
    do ; while ((TIFR & 1<<OCF0B) == 0);
    TIFR = 1<<OCF0B;
}
//emits a short pulse signaling the end of the transmission
OCR0A=130;
OCR0B=80;
do ; while ((TIFR & 1<<OCF0B) == 0);
TIFR = 1<<OCF0B;

}

/*
*emits a transmission (preamble pulse, 16 bit of data + end pulse)
*/
void transmit(uint8_t address,uint8_t code){
preamble();
setupPWM();//PWM settings in TCCR0A and TCCR0B
sendCode((JVC_ADDRESS<<8)+JVC_MUTE);
stopPWM();//disables PWM (TCCR0A=0)
}

There are two issues:

This code will generate the preamble pulse the first time, followed
by glitched data, and then only the glitchy data when called
consecutively.
It needs the padding instructions I added in sendCode(),
otherwise the 2 first bits of the transmission are always cut.

edit: the actual data part (orange and yellow parts), as well as the stop pulse at the end work fine when the call to preamble() is commented out. The only issue is with the preamble() part.

I'd appreciate any help, especially with point 1.


texts: My teacher said a BJT phototransistor doesn't have a base

texts:
But I find it to be absolutely incorrect. How can a BJT transistor even work without a base? Shouldn't a transistor without base be just a semiconductor (PP, NN)? Does there exist some special NASA-army-grade experimental BJT transistor without a base?

So who is right, me or the teacher?


texts: Low Quiescent LDO vs. Buck Converter: Which is better for low power applications?

texts:
I'm stuck between choosing to use either a buck converter or a LDO voltage regulator for my heated glove project. The voltage regulator's function in question will be to power the microcontroller. What I am having trouble deciding on is which is better for low power applications. Low power as in powering a microcontroller that draws only a few uA of current. So in any case, which would be better for my project: a buck converter or a low quiescent LDO? Or does it not matter in this case.

Voltage Regulator: LM2936MPX-5.0/NOPB

Voltage Regulator Datasheet

Buck Converter: LMR14203XMK/NOPB

Buck Converter Datasheet


texts: What should the input voltage be for a L7805CV voltage regulator?

texts: I've been looking through the datasheet and see the maximum input voltage rating, but nowhere do I see a minimum input voltage rating. Is that information in there and I'm just missing it? What's the minimum input voltage that can be used with this voltage regulator?


texts: Designing a circuit with a "short-lived" switch with 555 IC

texts:
i am very new to electrical engineering and designing circuits and there is a particular project that i am working on that involves using a switch and a 555IC timer.

So basically my desired output logic is as follows (Note: I am using 2 different LED, green and red and an infrared sensor that acts as a switch)

  1) Using an infrared switch, when a object is nearby, it closes the switch which starts the 555 timer. (Green LED lights up)

  2) 555 timer counts down 5 seconds which triggers the 2nd 555 timer which then causes the red LED to light up.

  3) Green LED turns off and 2nd 555 timer counts down 10 seconds and then RED LED switches off and the circuit resets. (where both green and red LEDs are off)

(For this circuit diagram please ignore Timer #1 and #2)

However, my circuit only works if the "start" is closed then opened immediately (i.e i close the switch and then open again). If i allow the switch to be permanently shorted, the green LED will be lighted and it does not trigger the 555 timer.

Hence, I am wondering if there is a certain kind of modification i can make to the infrared sensor that acts like a "button" that can close the switch and then open it immediately to trigger the 555 timer even if the object is still near the infrared sensor.


texts: Simultaneous wireless information and power transfer using MOSFETs for modulation

texts:
I have found an interesting simultaneous wireless information and power transfer concept where two MOSFETs are used as switches to switch two other resonant capacitors. Because of the switching in the secondary circuit, current amplitude changes can be noticed in the primary circuit. I believe this modulation method is called BASK (Binary Amplitude Shift Keying). Back telemetry is what I am interested in.
What I understand so far is that when the extra capacitors, that are added parallel to the LC circuit, are switched, they will change the resonant frequency of the secondary side, therefore, the current amplitude of the primary side will change.
I tried simulating this circuit and I came up with two questions:

What could be the second MOSFET for (Figure 1)?
I do not see any difference in the current amplitude of the primary side after removing it.

Why the amplitude decreases rather than increases when MOSFET is switched (Figure 2)?
The only thing I came up with is that perhaps depletion instead of enhancement MOSFETs are used in the offered concept, but also then I am not sure why it would be better in this way if that is the case.

Any ideas/answers would be much appreciated! Thank you.

Figure 1. Principle of data transmission from receiver to transmitter.

Figure 2. Results of data transmission from receiver to transmitter.


texts: How can control voltage and current in Dc motor with PWM?

texts: Principle of dc motor, voltage is proportional with torque and current is proportional with speed. In PWM method, we change duty cycle and it changes voltage. I would like to know how do we control current? I believe that, If I control voltage and current, I can arrange my torque and speed so I can control dc motor more effectively. Probabaly, I am missing somewhere. Thanks for your attention. I’m looking forward to your reply.


texts: How do you implement the following function using nothing but 2:1 MUX?

texts:
I am having difficulties understanding how to implement boolean functions, particularly given that I may only use 2:1 muxes and the variable D as a residual variable.

The function is as follows:
$$
F(A, B, C, D, E) = \sum ( 6, 7, 12, 13, 14, 15, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31)
$$

I have created the truth table and, using a Karnaugh map, I have minimized the function to this:
$$
F(A, B, C, D, E) = AB + BC + CD \bar{E} + CDE
$$

I also managed to design a 16:1 MUX with A, B, C and E as selector and D as a residual variable.

I understand how a multiplexer works and I am fully capable of deriving a truth table from an existing implementation but I just simply do not understand how to take the truth table, Karnaugh map and the minimized SOP function and implement the function using only 2:1 MUX and D as a residual variable.

I am not necessarily asking for the straight up answer, although it would be nice to see. I am more interested in an explanation, an algorithm or really anything that can help me come up with the implementation myself.

I want to be able to visualize the connection between the function and the implementation, not just learn how to implement it by heart without understanding why it is the way it is.

Thank you for your time!

Edit: While I understood the accepted answer and it is the correct answer, I was then required to use just the following inputs for the data lines of my 2:1 muxes: logic 0, logic 1 and the variable D. The variables A, B, C should only be used as selector lines.

I created the V-K Map for F(A, B, C, D) = AB + BC + CD and I then used that map to derive a V-K map for F(A, B, C) as can be seen below.

Edit: for the map on the right the value for ABC = 000 should be 0, not 1. A mistake I made when I copied over the table from my notebook into excel.

Afterwards I created the following mux implementation:

The mux design was taken from an electronics book. The implementation, although not terribly efficient, works. I calculated the output of the muxes using the M(X, Y, Z) = XZ' + YZ formula and the output of the rightmost mux is:

$$
MUX7 = AB\bar{C} + D\bar{B}C + BC
$$

Using yet another Karnaugh map, the above simplifies to AB + BC + CD which is the function I needed to implement.

The design of the MUXes itself is borrowed from an electronics book. In the book, the data inputs of the leftmost level of MUXes were numbered as can be seen in my diagram and the labels represent the decimal equivalent of the F(A, B, C) V-K map cells. If you look at, for example, the cell 101 (binary for 5) then the value in that cell is the input for the correspondingly labeled MUX input in the implementation, in this case 'D'.

Can anyone chime in on why are the data input lines labeled in that particular order (0, 4, 2, 6, 1, 5, 3, 7)?


texts: What is the best way to estimate the power consumption of an Atmega328p microcontroller?

texts:
I'm currently working with a barebone Atemga328p microcontroller implemented within a battery powered design. I've realized I'm pretty clueless on how microcontrollers are rated on power consumption.

Referring to the data sheet containing information on the Atmega328p (http://www.atmel.com/images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf), it states that the power consumption of a 1Mhz, 1.8V, 25C operating mode consumes 0.2 mAs of current. I have several questions regarding this number:

Because these microcontrollers can operate at 8Mhz and 16Mhz, is the power consumption a linear function of frequency? i.e. does operating at 8Mhz consume 0.2mA * 8 = 1.6 mA of current?
What is the relationship between voltage and the power consumption? I understand that DC power is defined by W = VI, however, if I were to operate at 3.3V, wouldn't I pull less current? I'm not sure if that is a correct assumption however.
I assume that the listed power output also excludes any additional power that the chip is sourcing to I/O (i.e. supplying 10mA to an LED would increase the total amount of current going into the micro controller). However, do certain operations within the microcontroller cause it to consume more power? I'm specifically interested in the case of implementing serial communications like SPI. Assuming I'm trying to use SPI with no slave device attached (thus no way to lose external power), would the microcontroller still use more power?

I appreciate any help that will be provided!


texts: LVDS signal distortion w.r.t switching power supply

texts:
We are using DC-DC switching regulators on board (switching freq. of regulators are ~540KHz). There is periodic noise in power/gnd at 540Khz. If we change the switching freq. of regulator, the periodic noise changes accordingly.

We observe there is issue with LVDS signal (125Mhz) w.r.t to this switching noise of regulator. Attached are screen shots of my board cicruit (125Mhz OSC and LVDS buffer) and scope measurement. The LVDS signal is captured at buffer input. This is a multi-layer board with adequate layer/return path on board.

In my other designs, there exists DC-DC switching noise, but there is no distortion of LVDS signals.

How do I find where the distortion is coming from?


texts: How do some instrumentation amplifiers handle such wide common-mode input voltages?

texts:
In a previous question, I asked about the detailed construction of in-amps. Now, I'm curious about a feature that some of them have that I'd like to know how they achieve:

I used an INA286 in a recent project for current monitoring. It worked perfectly according to its datasheet specifications, but I'm left wondering how they managed to make it not only survive, but function with inputs well above or below the power rails.

To pull out the important parts from the datasheet, this in-amp is powered by a single-ended supply as low as 2.7V, but can function with input common-mode voltages of as much as 80 volts, fully 77V above the positive rail, or as low as -14V, far below the negative rail.

I can see in the block diagram provided in the datasheet some sort of switching magic, but I don't follow how it works, or how the input switches are driven considering the high voltage required.

The block diagram, along with the abysmal bandwidth characteristic of isolation amplifiers, makes me think that this is essentially an "isolation amplifier lite edition", using capacitive isolation, but any further detail than that I can't seem to work out.

How does this device (and similar ones, for that matter) manage to handle such voltages? How exactly does that array of switches work?

(As an aside, this question was originally going to be about how the output offset feature works, but it turns out that's actually quite simple to understand just by looking at the block diagram.)


texts: What's the best bootloader for an embedded Linux board?

texts: I'm designing an embedded Linux board for use as a web-based controller. It will be based around an Atmel AT91SAM9G20, which uses an ARM926EJ-S core. Anyone have particularly good or bad experiences with bootloaders? More broadly, how should I go about building/choosing a Linux distribution for this board?


texts:
I'm going to use an LM2596.

My maximum input will be 40V to a fixed output 5V 3A.

I've read in the datasheet that for Cin you need 1.5x for an electrolytic capacitor. So 40V x 1.5 will be some 60V. I've seen design and images from google of DC-DC Buck Converters featuring LM2596. They seem not to use 60+ V for Cin but can handle upto 40V input. What is going on here?

I've seen some schematic of that also only using 50V. Link.


texts: Variations in pulses generated and read by a uC

texts:
I have a 2 uC's(LPC1778 and a PIC), that perform 2 separate functions. The PIC generates pulses that are coded,where each bit of the code has a pulse duration of 1ms and a complete code is 8 bits long(8ms). The pulses generated by the PIC,travel through a relay(having front and back contacts) and are fed to the LPC1778 as inputs.

At the LPC1778 end,I'm sampling the input pins every 200uS(using a timer interrupt) and capturing the pin state for 32ms(in the timer ISR), before processing whether a valid pulse is available or not. Once a 32ms sample is captured, I take the majority of every 5 samples to determine what the actual bit value of code is. If the code is present in any 8ms duration of the 32ms captured,its fine.

This logic(in my understanding) may work fine as long as the period for each code remains 1ms.

What my doubt is, what are the possibilities that the time period of a pulse can vary? I understand that as long as my software generates 1ms output from a pin(PIC),the input at a pin(LPC1778) also must be 1ms because this is not a wave of high frequency and also the time period of each code is known beforehand.

What else considerations must be kept in mind to ensure that I read the code rightly?

What are the possibilities that this symmetrical pattern turns to an unsymmetrical one?

  Update:

Im not using it like UART where data can vary and hence timing is important. I know before hand what data should always be on that pin and hence am merely checking for that 8ms value in a 32ms sample window.I need not always keep checking for it.

void Read_FCBC(void)
{
    static U8 bSampleNo1=0;/*1st 200us*/
    static U8 bSampleNo2=0;/*2nd 200us*/
    static U8 bSampleNo3=0;/*3rd 200us*/
    static U8 bAllDone=0;
    static U8 bBufferCtrl=1;
    static U8 bBufferCtrl1=0;
    static U8 bBufferCtrl2=0;

    if(bBufferCtrl)
    {
        dwFC1[bSampleNo1]=dw1Port1;/*200us*/
        dwBC1[bSampleNo1]=dw1Port1;
        bSampleNo1++;
    }

    if(bBufferCtrl1)
    {
        dwFC2[bSampleNo2]=dw2Port1;/*captured after delay of 200us wrt to sample 1*/
        dwBC2[bSampleNo2]=dw2Port1;
        bSampleNo2++;
    }

    if(bBufferCtrl2)
    {
        dwFC3[bSampleNo3]=dw3Port1;/*captured after delay of 400us wrt to sample 1*/
        dwBC3[bSampleNo3]=dw3Port1;
        bSampleNo3++;
    }

    bAllDone++;

    if(bAllDone == 1)
    {
        bBufferCtrl1=1;
    }

    if(bAllDone == 2)
    {
        bBufferCtrl2=1;
    }

    if(bSampleNo1==160)
    {
        bBufferCtrl=0;
    }

    if(bSampleNo2==160)
    {
        bBufferCtrl1=0;
    }

    if(bSampleNo3==160)
    {
        bBufferCtrl2=0;
    }

    if((bSampleNo1==160) && (bSampleNo2==160) && (bSampleNo3==160))
    {
        bMeasureDone=0xFF;
        bSampleNo1=0;
        bSampleNo2=0;
        bSampleNo3=0;
        bAllDone=0;
        bBufferCtrl=1;
    }
}

The sample code for the process in ISR.
Note:I have 16 FC's and 16 BC's connected to a port of the uC and hence i have to process in main(). If any 2 buffers agree with each other il use the best of 2oo3 dwFCX and dwBCX


texts: Controlling the power supply of a bluetooth module via GPIO and a transistor

texts:
I want to be able to turn a Bluetooth module on and off via a GPIO pin of a microcontroller. My first approach to realize this with a transistor is shown below. Is this approach correct? If not, how can it be corrected?

Thank you in advance.

simulate this circuit – Schematic created using CircuitLab


texts: How the azimuth of the time base is synchronized with the azimuth of the rotating antenna?

texts:
How the early radars could know the angle of a basic radar rotating antenna?
How the  direction of the time base on radar screen is synchronized with the direction of the radar rotating antenna?


texts: I don't know how to start formulating equations or finding equations for this circuit, I have to prove this by mathematical equation. My adviser told me by charge conservation but I don't know how to. Below is the pumping circuit and I have to prove mathematically the observation I acquired.


texts: It appears that I need two main() functions

texts:
I am putting together a simple bootloader for the atmega8, mostly using code examples form libc's documentation. The bootloader is supposed to be located in the bootloader section of the flash. An application at the lower address needs to call the bootloader.

makefile:

LDFLAGS   += -Wl,--section-start=.text=$(BOOTLOAD)
LDFLAGS   += -Wl,--section-start=.test=0

test.c:

__attribute__ ((section (".test"))) int main(int argc, char **argv)
{
    usart_init();

    char msg[] = "Loading bootloader in 3 seconds.";
    send_block(sizeof(msg), msg);
    _delay_ms(3000);

    typedef void (* fn_ptr_t) (void);
    fn_ptr_t my_ptr = (void *)0x1800;
    my_ptr();
}

But I wouldn't be able to link bootloader.o and test.o into a single .hex file, because main() is duplicated.

Where should actually main() be located? And how would the other program (because, logically, those are two separate programs - application and bootloader) run?

Once more, the idea is that a small application 'test' is installed at flash address 0, together with the bootloader in the higher flash. On power-up, the application jumps to the bootloader, the user uploads his actual application, which in turn must take care to call the bootloader at appropriate times.

Actually, the very document that I link under my question is described how what I describe cannot be called a bootloader. Here is my use case. This is a small home-brew application - I doubt I will ever distribute the device to anyone. For my PCB, I can either add an ISP header (5 additional messy wires) or program the device via the same channel that I use for debugging - serial connection. I don't even have a jtag and am debugging entirely via printf() calls. This being said, if the need arises someday, it should be easy to call the well tested "bootloader" in some other way


texts:
I have started learning transistors few weeks ago and I hit a roadblock (again). I have been following this tutorial on Sparkfun -https://learn.sparkfun.com/tutorials/transistors

Now I have moved to building an Astable Multivibrator using transistor. But I couldn't figure out the logic on how the transistor switches itself ON and OFF over and over again since as far as I can see both the base of transistors have been biased with 0.6v as soon as the power is turned ON via R2 and R3 resistors.

This will make both the transistor to be in saturation mode and transistor will turn ON. Am pretty confused with this circuit diagram.

1) Can you help me to understand figure out the logic behind this circuit?

2) How one transistor remain in cut off as stated in explanation when both the transistors are biased to 0.6v which is sufficient for a transistor to turn ON?

Any help will be much appreciated, thanks in advance.


texts: Is my schematic of the TPS54240 buck converter correct?

texts:
I am currently working on a small project, where I have to reduce the voltage from 3 LiIon batteries that are chained together in series to ~3.3V in order to power a microcontroller. At first I was using the MP1584 chip, however a few days before I wanted to order the finished PCB the product was labeled as 'Discontinued'. For this reason I searched for other similar chips and found the TPS54240 chip. After reading this datasheet I created a schematic. However I'm not completely sure whether or not I did everything right, since this is more or less the first time I created one.
Could anyone be so kind and verify that everything is fine? It would really help me a ton! I would also appreciate tips on how I could improve my schematic.
This is the schematic in question:


texts: LED Driver with relatively high capacitance on PWM input causes PWM signal to be laggy

texts:
I am using three Meanwell LDD-600L LED drivers (datasheet) to control brightness/color of a 50 Watts (total) RGB LED. This driver has a PWM input which I draw low with a PC817 opto isolator. Everything works fine in principle, but there is a little flaw:

When the internal phototransistor of the PC817 turns on, its output voltage changes to low lightning fast (500ns). When I turn the PC817 off, I have to use a voltage divider acting on the 30 V supply voltage in order to get around the 5V specified PWM voltage. This actually causes PWM input voltage to rise with a capacitor charge curve. The time constant of the exponential curve is 10us, so my conclusion is that the driver has an input capacitance of about 450 pF (given the 22k resistor from the voltage divider).

Since I want to control the driver with 16 bit PWM at ~305 Hz (i.e. a counter frequency of 20 MHz), the smallest pulse width that can be set inside the controller is 50ns. Of course I will not even get the electrical pulse width  close to this (turning the phototransistor off already takes 500 ns), but being limited by the 10 us is a little too lousy for my taste.

Is there any other possible (economic) solution for a lower impedance pull-up of the PWM input capacitance than with a voltage divider?

Of course I don't want to use smaller resistors because they already get noticeably warm (+10 degrees) and I want the circuit to have as high efficiency as possible. The datasheet of the driver also specifies a maximum of 8V on the PWM input (if my interpretation is right), so pulling up directly to 30 V is probably not an option.

By the way: the whole circuit is built on a breadboard. I have not checked yet if the capacitance comes from the breadbord. I don't hope so.-

Edit: Tony's solution of connecting the digital IO's to the PWM with a resistor directly and dropping the optos actually works. Seems I have been a little to cautious with respect to EMI cause by the 5V/30V interface.


texts:
I am sending a pulse to the expansion pin of an FPGA board which I am monitoring using an oscilloscope.
Why is the oscilloscope reading the pulse in the attached photo? Why it is not a pure square pulse?


texts: Effect of battery internal resistance on its energy efficiency

texts:
I am trying to calculate Li-ion/LiPo battery's energy efficiency based on its internal resistance (as far as I see from scientific papers, the battery's internal resistance rises with its ageing, meaning that the efficiency must decrease).

Discharging: I use the most basic equivalent circuit and load:

If I assume that the current is constant (the way they describe it here), then I get:

ef = (Vopen-Ir)/Vopen (probably I should integrate this by time)

(I have reduced the current and the charging time in both parts of the fraction).

By the same method, the charging efficiency will be: V/(V+Ir)

Therefore if we want to calculate the round-trip efficiency (output power/input power), it will be the multiplication of the two, giving (V-Ir)/(V+Ir)

Am I doing this right? Does it mean that for every charging/discharging current, the efficiency is going to be different?
I guess there are other factor affecting the energy efficiency, although I haven't quite found any formulas. How significant are they in comparison to internal resistance?


texts: Smoke came out of my transistor, but it still works. Why?

texts:
So I was playing around with some transistors to make amplifiers of type C and D. I turned on the voltage and immediatly saw smoke coming out of my transistor. Turned off the voltage and that was that. But I checked the transistor with my voltage meter, and every value was still correct. I tried to use it again (with the mistake in my circuit fixed) and it worked flawlessly.

So, what burned? What could have made the smoke that would not break the transistor if it did?


texts: Allowing different inputs without needing to alter gain every time; a situation for a pre-amp?

texts:
The goal
I am attempting to make a small diy bookshelf speaker system using 2 16ohm, 25 watt speakers and a 2x25 watt class d amplifier board. If it matters, the amplifier board is a class d amplifier.

The Problem
Using an rca to 3.5mm aux cable with the amplifier board, I receive a variance of voltage levels across the speaker terminals and volume level ranges (while playing a sine wave of 165khz) between different inputs. As a result I had to alter the gain levels for each input. If I kept a high gain level and didn't adjust it, some inputs would produce a little distortion and noise while others would produce a crazy amount of distortion and noise. Here are a couple of scenarios I've done.

Plugging the aux into my phone, the voltage levels across the speaker terminals are quite low to begin with (when playing a sine wave of 165kz). The volume is also too quiet. As a result I increase the gain setting to medium which results in an adequate performance in terms of volume.
Plugging the aux into my computer, the volume levels are adequate with only the low gain setting.

Why I think this is (so I can learn from this if I'm wrong)
Does this have to do with the level of voltage the input device is creating? For instance does the computer sound card produce a higher voltage output from the start, and therefore less gain (or input sensitivity) is needed to reach the level I want. By the same line of thinking, then the phone is producing a lower voltage level output, which results in me needing to increase the gain setting on the board.

What I'm hoping to be able to do
At this stage in my understanding, I don't know if there's a way to make the gain settings on the board more accessible so it can be changed on the fly later, when the board is in a case. The amplifier board is the AA-AB32165 from sure-electronics with two switches for gain settings. However, ideally I think it would be best that all inputs were leveled out to a "base" voltage level before getting to the amp so that the gain would never need to be set on the main amplifier. Adding to this ideal might be a way for the gain setting to be automatically altered according to the input level (if the input level is what is causing the difference in volume that I described earlier).

Thank you for your help and patience.


texts: Mathematical approch to measuring current, voltage and resistance of mixed series and parallel

texts:
If there is a circuit like the one below, where all resistors are 1k ohm, how does one determine the currents? The voltage sources are all 10 volts.

The problem I am having is that I do not know if the top voltage source takes the zero resistance path in the middle or if the bottom one does.

NOTE: This is not a homework question.


texts: Derivation of \$Z_{och}\$ & \$ Z_{sch} \$ for a symmetrical lattice two port network

texts:
I am trying to derive the open circuit impedance of half circuit [i.e \$Z_{och}\$ ] and short circuit impedance of half circuit [i.e \$Z_{sch}\$ ] of symmetric lattice two port network (which is shown below in the diagram) is given as:
$$Z_{och}= Z_2$$
$$Z_{sch}= Z_1$$

simulate this circuit – Schematic created using CircuitLab

My Approach:
In order to derive \$ Z_{och} \$ & \$  Z_{sch} \$ , we must divide the given two port network into two equal parts as stated by Bartlett's Bisection Theorem

so,for \$ Z_{sch} \$ :

simulate this circuit

where  red  line representing the shorted line to find short circuit half circuit impedance

Now taking \$ 11'\$ port
we get: $$Z_{sch}= \frac{Z_1}{2} + \frac{Z_1}{2}=Z_1$$
Thus,we derived for \$ Z_{sch} \$

Similarly,for \$ Z_{och} \$

simulate this circuit
Now taking \$ 11'\$ port
we get, \$ Z_{och}= \infty \quad [ \because \$ we don't get any closed path from 1 to 1']

,but we know \$ Z_{och} = Z_2\$ ; so did i missed any concept? , please help anyone...


texts: How should I used two MLX90614 sensor on one Arudino Uno given that the sensor has a fixed I2C bus adress?

texts: I have an arduino uno and want to use a non MLX90614. I plan to used more than one sensor on the same Arduino but I don't know how to use two MLX90614 on the same I2C bus.


texts:
I'm building an AC Dimmer based on this circuit (linked) and am considering using a Vector board instead of making a PCB. Does anyone foresee any issues with this? Particularly regarding 120v channeling through jumpers?

On a previous post @supercat suggested spacing out the 120v area to avoid arcs (which i'll do).

http://wiki.dxarts.washington.edu/groups/general/wiki/4dd69/AC_Dimmer_Circuit.html


texts: I am trying to determine the arrival of signals from 3 separate beacons to point x. I have found the distances from x to each beacon as well the propagating wave speed but I do not know how to determine the arrival time. I calculated the propagation delay, but I am unsure if this would be the answer. These are radio beacons. It is for a application and assignment.


texts:
Are Eco-Halogen bulbs a distinct type of light-bulb, or are they just halogen light-bulbs marketed as being eco-friendly?

I recently shattered the outer glass envelope on an Energizer-brand Eco-Halogen light-bulb, and I'm wondering if there's any need for a special clean-up, or if it's alright just to pick up the shards and throw them out, as one would do with a normal Halogen light-bulb.


texts: Finding small signal resistance for MOSFET

texts: I need to find the small signal parameter \$r_{D1}\$. I understand I must draw the small signal equivalent first, but I do not know where to label this resistance, or what exactly it is equal to. Also is \$v_{dd}\$ labeled correctly?


texts: Charge-pump capacitor power dissipation in voltage converters

texts:
Here
https://www.maximintegrated.com/en/app-notes/index.mvp/id/725
and here
https://www.analog.com/media/en/technical-documentation/data-sheets/ADP3603.pdf
The same calculation for the power dissipation given by the pump capacitor in a switching capacitor voltage regulator is made.
What I don't understand, is how a lossless component becomes a lossy component. It is said that the equivalent resistance is not just something that gives you the same RMS current, but it also models the power loss given by switching the capacitor.
It might be the power lost in the ESR or in the Ron of the switches, I thought at first, but these losses are already took into account by other factors explained in other parts of the documents.
So, what other effect does the factor \$ I_{load}*f*C_{pump} \$ really take into account?


texts: Can vacuum be used to store flowing electrons?

texts: Since electricity can flow through vacuum can it also be used to store electricity? Though it wont remain a vacuum in strictest form.


texts: USB-MIDI Interface with STM32F4 Discovery?

texts:
I've got an STM32F4 Discovery Board and I'd like to use/configure it as an USBMIDI device but this standard device class is not (fully) supported by the USB libraries supplied by ST.
Any hint? Any similiar project on STM32F4 mcus?

thanks :)


texts: Impedance matching for push-pull RF amplifier

texts:
I am working on the output matching network of a commercial push-pull class AB amplifier based on LDMOS BLF188. The output matching network consists of a 1:4 transformer and a Toroid with 8 turns The secondary of the transformer will be connected to a 50-ohm load/antenna. The matching network works comparatively well up to 70 MHz. I am trying to modify the network to work up to 600 MHz.As of my understanding is the core material is the restricting factor to work at the desired frequency range. I would appreciate any suggestion regarding how can I achieve good output matching up to 600 MHz. Is there an alternative way to design the output matching network with lumped elements for the push-pull configuration?
Thanks in advance.


texts: How do I interface a positioning sensor with SSI interface with an OMRON safety PLC with only RS485 interface? I understand both are serial, but would I loose resolution if I interface it?


texts:
Is there any easy easy way to play tones on a piezo buzzer with the Arduino other than the built in tone() method? I only need to call it a couple of times, but I notice that when I use it there is an extra 1256 bytes added to the output size! I realize that on a normal Arduino this would't be a whole lot out of the 16KB available, but I'm trying to do this on the ATTinyX5 series. I'm currently using a t45 but would like to be able to use the t25 if at all possible and that extra 1256 bytes puts me well over the 2048 byte limit.

Thoughts?


texts:
I had an old 6V SLA battery laying around, so I thought that it would be a great exercise to design a Battery Management circuit for it. Is the following circuit, based on the LM393, sufficiently good for managing a 6V 4Ah SLA battery? What can be improved?
Thanks in advance!
DC Input: 12
Battery Datasheet: LONG WP4-6B
MOSFET Datasheet: FQP13N06L
Orange LED indicates that the battery is being charged, and the green one is used as an On/Off indicator.


texts: Issues due to sudden load disconnection/connection

texts: I am  working on a circuit (schematic enclosed) which is being powered by a high discharge LiSOCl2 battery. A TPS61232 based 5V booster powers two loads: LOAD1 is directly connected to the 5V bus whereas LOAD2 is isolated using a TPS22917 switch. LOAD2 is a heavy load compared to LOAD1 and could consume current upto 1 A (unlike LOAD1 which has a nominal current consumption of 50 mA). When LOAD2 is switched OFF/ON by TPS22917, could it create some noise over the 5V bus that could interfere with LOAD1 or the booster (even though the switch has adjustable fall time and adjustable turn ON time features)?


texts: What is the difference between a T-Carrier and a Digital Signal?

texts:
If you take a look at a digital transmission hierarchy for a telephone network or some data provider, you can see the terms T1, T2, T3 (Tx) and DS0, DS1, DS3 (DSx) used interchangeably.

Is there any difference between these? The only difference that I see is the that Tx describes the multiplexer.


texts: I need to design a bandpass filter by cascading passive high pass filter and passive low pass filter

texts:
I have a low pass filter with 3db cut off frequency of 200Hz and a high pass passive filter with 3db cut off frequency of 2kHz.

I need to design a cascaded band pass filter which will isolate signals for each range.
The low-frequency components (20 to 150 Hz) will control Blue LED lights, the mid-frequency components (200 Hz to 2 kHz) will control Green LED lights, and the high-frequency components (2.5 kHz to 20 kHz) will control Red LED lights.

My transfer function for cascaded band pass filter is as below
$$
        H(j\omega)= \frac{sR_2C_2}
               {1+sR_2C_2+sR_1C_1+s^2R_1R_2C_1C_2}
$$
where \$s=j\omega\$ . In order to isolate the signals, my design will have to be low pass-band pass-high pass filter. Is it correct? I would like to know how to determine lower and upper cut off frequency. Is it 200Hz and 2kHz?


texts: How to properly couple an audio (headphones) signal from a big/unknown system (worried about short circuits and ground loops)

texts:
I want to make a cockpit voice recorder for small GA planes.
Typically the headphones of such aircraft are stereo, e.g. left is coming from the radio (ATC), and right is the in-cabin intercom.
I want to record both channels.
My device will be powered from the aircraft's 12- or 24- volt power, so it will share grounds with the aircraft's systems.
Being a big/unknown system, I'm worried whether the headphones' return signal is also the same GND. It's tempting to assume it is and connect it to my circuit's GND, but if it's not, then I'll be creating a short. Even if it's the same, I'll be creating a ground loop.
I'm not sure what to do about it. The best I can think of is to introduce an isolation transformer for the audio, like that:

simulate this circuit – Schematic created using CircuitLab
Is this enough to ensure the audio will come in clean and undistorted, and the ground loops/shorts avoided?
The other solution is to use an isolated DC-DC converter.
Realistically, of course, the circuit will be more complicated than this, as I won't be replacing the headphones; I'll be just tapping into their signal (a T-shaped joint). I'm not sure how the audio system in the plane will feel about driving two circuits instead of just one, but I guess it would be fine.
EDIT
Of course, I know adding this kind of modifications to a crucial aircraft system is very dangerous, and we'll of course do thorough ground tests before flying with that. Part of the reason to ask the question is the fact there's no room for error, and I want to design the system properly upfront.


texts:
I am having this microcontroller - S32K142 64 pins 5V core voltage.
I am using the this J LINK 20 pin JTAG Debugger. Using JLINK Flash Lite software tool in Windows PC to program the microcontroller by connected the debugger through USB port of the PC
JTAG User Manual
I just want to verify, theorectically, the the Vih,Vil,Voh & Voh levels between the Microcontroller JTAG pins and the JTAG debugger output and input pins.
Can someone tell me how to proceed with the calculation. USB 2.0 Type A to type B cable is used to interface the PC to the debugger.
Please tell me how to evaluate the voltage levels in this scenario where the PC sends data to the debugger in differential format and the debugger gives the single ended data to the JTAG debugger pins. What would be the voltage levels and their tolerances in the debugger to the JTAG Microcontroller lines ?


texts: What battery size/type should I use (and wiring tips for LEDs?)

texts:
My son and I are designing a 3D printed body for his pinewood derby car.

We want to add some colored LED lights. I found some lights that I think will work well, from a mechanical fit and looks perspective.  I need a battery that will power the lights for about 3 hours.

Weight is a concern, but shouldn't be a problem.  The car can only weigh 5oz maximum.  Tungsten weights are typically added because you want the car as close to 5oz without going over.  Ideally the weight is compact and distributed properly.  So I can possibly use the battery as weight, but I'd like to keep it as light as possible because I can use tungsten strategically to distribute the weight better.

The LEDs I'm looking at have a forward voltage of 3.0-3.6v and a current of 20mA.

I need to have 6 of them.  So if I'm not mistaken (and I might be) I would need 360mAh of battery (20mA x 6LED x 3hours = 360mAh).  It appears I could use a coin type battery for this.  I see some coin batteries at 1000mAh capacity for 3.6v.

Does this seem like a possible solution?  I'm assuming I could wire the LEDs parallel to the battery and would not need any resistors at 3.6v.

I'm open to any ideas and considering a rechargeable battery. If there is an off the shelf charging PCB (I can make an inline charger unit or integrate a small PCB into the body.)

Not asking for battery weight analysis, etc.  We are in preliminary design and just want to figure out what is practical/possible.


texts: Lighting up LEDS via I2C Bus of a NeoTrellis 4x4 RGB Led Matrix

texts:
Many attempts to write to an i2c slave to make rgb leds light up have failed.

The hardware in question is found at:
https://learn.adafruit.com/adafruit-neotrellis

There is an arduino library and a python library, but its hard to find out what i2c register does what.

My attempt, in python, is as follows:

i2c.writeto(0x2E, bytes([0x0E,0x01,0x01]), stop=True) # pin = 1 (as it is PORT A Pin 1 ??
i2c.writeto(0x2E, bytes([0x0E,0x02,0x00,0x00]), stop=True) # speed = 400khz  ?
i2c.writeto(0x2E, bytes([0x0E,0x03,0x06,0x06]), stop=True) # buff length?
i2c.writeto(0x2E, bytes([0x0E,0x04, 0x00, i, 0xff,0xff,0xff]), stop=True) # buff?
i2c.writeto(0x2E, bytes([0x0E,0x05,0x01]), stop=True) # show

The slave address is correct, and I get a response. I got my register constants from the following c-header file:
https://adafruit.github.io/Adafruit_Seesaw/html/_adafruit__seesaw_8h.html

I got my info from the following document on page 30 / 38

https://cdn-learn.adafruit.com/downloads/pdf/adafruit-seesaw-atsamd09-breakout.pdf

Here is the log of the commands from a logic analysor

What can I do to get the leds to light up? I've used i2cdump without success, is there some brute force method to try out all combinations? What suggests do you have?

EDIT I realized that SPEED is supposed to be 8 bit not 16 bit but thats not really an issue.


texts:
How do I implement the the function in Pspice?

\$V_s(t)=1.5u(t)-3u(t-.01)+1.5u(t-.02)\$

I know to use the VPULSE source but it has only two voltages as parameters but I need 3.


texts: NTC based voltage divider relative error

texts:
I'm making an analysis of the error introduced by two different resistors in a voltage divider (and taking the voltage out from the middle of two series resistors).

I'm using this for an NTC reading, which is part of the divider. I know that the maximum error is the sum of the relative errors of the resistors present in the divider. What I don't know, is how to demonstrate this in an expression so that if the divider is made by 10 resistors and not just 2, I can still demonstrate easily the maximum error. So obtaining a graph like this: http://www.electronicproducts.com/Passive_Components/Resistors_and_Potentiometers/Resistive_voltage_dividers.aspx. I know that this could be a dummy question.

Moreover, the NTCs are providing an absolute error in °K which is related to the B factor and the ambient temperature resistance relative errors. Something like this http://product.tdk.com/en/techjournal/tfl/sensor_actuator/NTCG2/images/001e_p1_gla.gif.
Should this error be added to the error that I will find from the voltage divider? The advantage, however, is that this error can be offset by calculating it and storing it in a Look-up table, since seems to depend only by the NTC itself and the ambient temperature.


texts:
I'm trying to figure out how to implement an auto range by changing the resistors values for R2 and R3 with a MCU. First I was thinking of using a mux like the ADG5208BCPZ, but I think I might fry the chip depending on the input voltage (like 100v). I am considering on making a mux using relays, but I'd like to try a more compact option. Can someone explain to me how add this functionality to my circuit?

I have designed a board with an AD7794 with inputs to read analog signals, but each differential pair had a set range (+-0-1.17V, 2x +-0-100V, 0-5A, 0-100kOhm (they all have input protection)) and I used the ADC's gain to have a pseudo auto range. But there are some things I want to improve, like adding an instrumentation amp between the signal and the ADC and an actual range select.

simulate this circuit – Schematic created using CircuitLab


texts:
This is in continuation to my earlier post here:

Wifi on Nano v3.0 ATmega328P-20AU Board

What if I got a USB hub and connected a wifi USB dongle. Will that provide wifi functionality?


texts: Automotive circuit works but with lots of heat. Is there a better way?

texts:
The Problem

I have a vehicle that is ‘smart’ enough to detect when a trailer is attached. When a trailer is attached it changes ABS and vehicle stability control parameters, turns off the reversing sensors and checks for bulb failures in the trailer circuit. However, all this only works with trailers that have traditional incandescent light globes. Trailers fitted with LED lights are not detected. The vehicle appears to use a number of parameters to detect the trailer connection and bulbs. My vehicle only uses these parameters on the indicator (left and right turn signal circuits).

Continuity in the trailer circuit – obviously a lack of continuity would indicate a failed bulb
A constant low voltage pulse – The vehicle also uses a very rapid 5V ‘pulse’ to check ‘circuit load.’ With enough load a trailer is ‘detected’ and ABS, stability control etc is altered. This pulse does not stop once a trailer is ‘detected.’ This pulse is very fast but is still enough to light the LED trailer lights briefly, making them appear to flicker/flash rapidly.
Circuit load at 12V – the vehicle also appears to test circuit load when the 12V signal is sent to the turn indicators. Through testing 1.5A of current draw appears to be the minimum I can get away with at 12V

My Solution
I created a simple circuit that used a resistor and relay to provide the right load and prevent the rapid 5V pulse lighting the LED trailer lights (see schematic – I turned it into a little module that plugs in between the vehicle and the trailer). The module I made works perfectly but with one side effect – heat (and lots of it). My circuit is repeated for both left and right turn signals.

My Question
Remembering that the vehicle turn signal ‘flashes’ on and off during operation is there a smarter way to design this circuit that will:

Provide continuity
Prevent a 5V pulse illuminating the trailer LEDs
Provide the correct ‘circuit load’ so the trailer is ‘detected’
Achieve these with low (or no) heat

Bonus

Be robust enough to handle higher current if the circuit is accidentally used between the vehicle and a trailer fitted with incandescent lights

I have been wondering whether the right combination of capacitors and small resistors could provide the right combination of 5V pulse suppression and circuit load since the turn signals flash on and off during operation (e.g.: could I use a slow charging capacitor to load the circuit while the indicator lamp is on and fully discharge the stored energy when the lamp turns off but before it is on again?).

I want to install my module inside my vehicle with a switch for operation when a trailer is attached. Commercial modules are available but they all warn that they cannot be used inside a vehicle because they get very hot. My current design gets much to hot to use inside the vehicle.

I’m open to any and all suggestions. Thanks.


texts:
I'm having trouble understanding maximum power point tracking. How can I track the Maximum Power point?
How do I consider the effects of load on Voltage and Current while power point tracking?

Thanks for your help.


texts: Would this circuit work? NPN & PNP transistors ~in parallel:

texts:
Want to make a thing to test for both NPN and PNP transistors (using RPi GPIO power) and have sketched a diagram. Can you use both NPN and PNP resistors in parallel like this? Could this circuit fulfill my dream? Just need someone to tell me I know nothing, and this won't work :/ Would appreciate any advice, thanks.

RANTING FOOTNOTE (Bonus Round): I want something like this that gives a positive output for whether the transistor is NPN or PNP rather than a simple test that just tests for one and doesn't light up if it's an alternate transistor because what if the LED doesn't light up because it's a faulty circuit? and I don't want to have to make two of these. Though, come to think of it you could add an extra LED that always lights if the circuit works possibly, and only test for NPN for example?


texts: What resistor for uneven amount of LEDs in series, in parallel

texts:
I have an IR LED array which is powered by 12VDC. There are 10 chains wired in parallel. Each chain has 9 IR LEDs wired in series with a 10ohm 1/4 watt resistor. I also have 2 more chains wired in parallel, however these only have 6 LEDs.

simulate this circuit – Schematic created using CircuitLab

I've used this tool to try and figure out an answer, but want to be sure I'm using the correct values: http://led.linear1.org/led.wiz
It does suggest using a 1 Ohm 1/4 watt resistor for the chains of 9, however I only have 10 Ohm as my minimum.

The LEDs have a forward voltage of 1.5V and a current draw of 20mA (to the best of my knowledge).

I want to calculate the correct resistance value to use for these shorter chains.


texts:
Is there a way that I could add a switch to a DIY guitar pedal that I'm building which would enable me to cut a bit of bass? I checked the web and all I can find are actual mods to the guitar itself. If anyone knows how this can be achieved, can they let me know (as easy to understand, please)

Any help that you can offer would be greatly appreciated! :D


texts: How do you prevent a speaker from interfering with an array of buttons that use a voltage ladder?

texts:
Short story

I have a PCB with 3 buttons on it, each button connected in series with a different value resistor forming a voltage ladder (schematic below). On the same PCB, I also have connected a speaker. The negative terminal of the speaker is connected to the ground plane of the PCB and then the positive terminal is connected to a pin on the PCB.

This entire PCB is actually the handheld microphone of a CB radio and is connected to the main unit through a cable. The sensing of the analog voltage from the buttons is done by an IC on the PCB of the main unit, on the other end of the cable. The problem is that whenever audio is played back through this speaker (be it even static noise) it somehow messes up the buttons. If there is no audio, the buttons work correctly. If there is audio, buttons no longer respond.

Can anyone shed some light as to why / how the speaker interferes with the voltage ladder button array and how I can prevent this interference from happening and have the speaker play audio and have functional buttons at the same time?

Long story

I have a small CB radio transmitter / receiver that has a handheld microphone.
Originally, the microphone had 3 buttons (PTT, channel up and channel down) and, obviously, the actual mic. The speaker is placed inside the actual CB radio unit.

My issue is that the original speaker isn't loud enough to be heard, especially with the AC on. I noticed that the handheld microphone also had what seemed to look like a slot for a speaker, so I took it apart and, indeed, it had a slot to comfortably fit a 35mm diameter speaker. Maybe a different CB from the same line up came with a speaker in the handheld mic. So I thought why not take it apart and add a speaker so that I can hold the mic close to my ear so I can hear better.

I then began studying the circuitry inside the mic and this is what it looks like:

simulate this circuit – Schematic created using CircuitLab

Notice the Extra pin. That pin was not connected to anything on the PCB. The traces for that pin seem to lead to an extra slot for another resistor but the trace ends there and is not connected to anything.

I bought a 35mm speaker, glued it in place, soldered the positive terminal to the Extra pin on the PCB and the negative terminal to a free ground plane via on the PCB.

Finally, I opened up the main unit, traced the cable from the mic and I noticed that the extra pin on the mic was actually connected to the ground plane on the main board (when I was testing for continuity on the microphone PCB, the cable was unplugged from the board so I did not notice that the extra pin and the GND pin were connected). I desoldered the old speaker, then the cable connected to the extra pin and then I soldered the cable to the pin on the PCB that was connected to the positive terminal on the old speaker.

So now I have a new speaker whose negative terminal is connected to the ground plane on the mic PCB, positive terminal is connected to the extra pin, and finally the extra pin connected to the speaker+ pin on the main board.


texts: Quality factor limit for 2nd order RC passive band-pass filter

texts:
simulate this circuit – Schematic created using CircuitLab

I'm designing a 2nd Order passive RC band-pass filter and found that the quality factor is given by:

\$Q=\frac{\sqrt{C_1C_2R_1R_2}}{C_1R_1+C_2R_1+C_2R_2}\$

When i make Q = (value > ~0.5) and solve for \$C_1\$, for example, Wolfram Mathematica always give me complex or negative answers. So, my question is: are there any limits for Q factor in passive circuits or I just done something wrong?


texts: How can a flip flop alternate between two clocks, turning one off and the other on and repeating?

texts:
I am just experimenting with flip flops and am pretty confused about alternating between two clocks. Right, so I want a pulse to be sent to a flip flop first after 18 seconds and then after 2 seconds and then again after 18 seconds.

For this purpose, I have made two 555 timer ICs which generate 18s and 2s pulses respectively. What I have been struggling to do is to, after the 18s timer IC generates a pulse, activate the 2s timer IC and deactivate the 18s timer IC and after the 2s timer IC generates the pulse, I would like to deactivate it and activate the 18s timer IC.

What I want? I want the flip flop to get a pulse after 18seconds, then after 2 seconds, then after 18 seconds and then 2 seconds and so on.

Any help would be greatly appreciated.


texts: How to drive 3 wire fan (PC fan) with AVR micro-controller?

texts:
I have a circuit already built. A 3-wire fan which a wire is connected to 12V, a wire is ground, and a wire is connected to a pin of an AVR microcontroller. How can I drive this fan and control its speed?

On the fan is written Brushless DC fan and it is like PC fan.


texts:
It seems like there's something missing. I can't figure out how the rows are spaced relative to each other.

The pitch is 1.257mm. The distance between the centers of 17 of them is 20.112 -- that doesn't really add information. What about the 22.578? It seems to be measured from some arbitrary point within the pad to the same point on the opposing pad. The B diagram doesn't show what that point is. It looks like it might align with the right side of the smaller pad in A. If so, that would mean the pad in B could be considered split into a rectangle of length 1.5 (with the rounded 0.4 bit tacked on the end), and the distance between the rectangles (ignoring the rounded part) is 22.578. That spaces opposing rows, and adjacent rows are placed by centering. But this doesn't seem to fit on a grid -- 22.578/1.257 = madness.

Am I missing anything here? (And why would someone design something like this?)

The module itself looks like this:


texts: I have an unstable power supply voltage between 4.925v to 5.212 DC. How to get a precision stable 4.01v output?


texts: High level vs low level motor control - acceleration and velocity profiles

texts:
I was wondering how are motor control loops normally run?

Lets say we have an autonomous car and a Model Predictive Controller defines a velocity and acceleration profile to get to the correct location.

Is this profile then fed into a lower level motor controller which actually adjusts PWM to the coils? Is this a lower level high-speed control loop a simple PID controller or something more advanced? How does it work?

I think the sampling requirements would be too high to have a MPC directly control the PWM of the motor controller and in addition it wouldn't be able to adjust quick enough to keep the more working approximately correctly.


texts: Using FPGA to interface with a camera via 1394/firewire

texts:
Hey guys I was referred here from another site and was hoping that someone could help me out.

Some Background Information:

I'm a 4th year EE student at Georgia Tech.  A research team with the AE department came around to some of our classes and asked for help with their project for some of their more electronic stuff.  I signed up and ended up on the FPGA team which has deteriorated to myself and one other guy, so we're really busy.  My current task is to set up a camera to take and store pictures using the FPGA & DSP on this board.

I'm stuck using firewire due to the limitations of the camera and the restrictions on the number of pins that has been allocated to me, so in the last month or so I've been trying to build a link + host layer for a firewire interface with this thing arbitrating for me.  I also have to use system verilog.  Anyways, I've never used the language before and am having a hard time trying to create one from scratch.  The firewire interface seems super complex and I've basically been told "hurry up" by the guys in charge of the project.

Originally I had planned to use this project from opencores.com but it's missing files and I gave up trying to repair it since I don't really know the language all that well, but it looks like I'm probably going to need to either figure out how to fix it or find something else that will work or else I won't be finished in time.

In the top level file it includes a file called fw_link_defines.vh, which I don't have and doesn't seem to be anywhere else on the internet.  It looks like it defines(?) three things, if that's what the ` is actually doing in statements like "pkt_type = `SELF_ID_PKT;", which wouldn't be too hard to fix, but there's also some weird thing called phy_ctrl which I thought was a structure or something but after looking on the internet it appears to be an "instantiation".  I can't figure out what the heck that actually does.  I've looked at a few tutorials but can't seem to find any good ones on them, all I've found is large tutorials with one paragraph that says "this is an instantiation, they are a real pain to work with" and don't really explain much.

(Start here for TL;DR)

Basically what I'm asking is that if anyone knows any other open FPGA projects that use firewire to talk to a device, or if anyone knows a good source to learn how to use instantiations.  I've been having a real hard time with this and would be very grateful for any help you could give.  Thanks guys.


texts:
In a high voltage application (30-40V) am looking to drive a high side MOSFET which is sometimes required to be some for considerable amount of time (hours or days). [Edit] It is shown in the block diagram below.

If I've understood correctly a bootstrap driver for a NMOS won't work in this case, right? Are there any other ways for driving high side NMOS which would require at times to be permanently on?

What about PMOS driver? When switching off it needs to connect to the supply voltage but for turning off its gate needs to be supplied around 10V below the supply voltage since connecting to GND will exceed the Vgs limit.
Any idea how to do this? Any commercially available IC?
Thanks a lot!

Edit: The circuit shown below works for switching a high side PMOS, albeit with some power loss and not at high frequency. If anyone knows any way to achieve higher frequency (100kHz), please let me know.


texts: Version control systems for hardware projects?

texts: What are some of the good versioning systems for hardware projects? Is there equivalents of Google Code, CVS and SVN? Are such version control systems suitable for hardware projects involving PCB files, schematics..(even firmware code)?


texts: Current flow between 2 circuits without common ground

texts:
I made a clock circuit with a 555 timer ic, then I measured the wavelength of the square wave generated using my Raspberry Pi.
At first I connected the ground of the RPi to the ground of the circuit. To measure the wavelength, And it worked fine. But then I removed the pin connecting the grounds and tried to measure and IT WORKED!
The python(V-3.5) code is:

import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)

while True:
    if GPIO.input(18) == GPIO.HIGH:
        print('detected')
GPIO.cleanup()

I am baffled by this because the raspberry pi is connected to the phone adapter which is plugged in in the mains, and the circuit is connected to a power bank.
Circuit-

It is the exact replica of this: https://youtu.be/SmQ5K7UQPMM (video that shows how it is put together)

Also if this question is very noob I am sorry but I am still in high school.


texts: Smart power switch works fine on a bench but fails to disengage the intended load on location

texts:
I'm using the Infineon BTS117 smart low side switch to drive a DC-DC power regulator in my car. Here's the schematic of the switch board:

simulate this circuit – Schematic created using CircuitLab

I don't think all the stuff around BTS117 is relevant to the issue, but then, I'm not an electrical engineer so I thought I'd better lay everything out.

I was testing the device in the car a few days ago and it was working properly, but I couldn't finish the work because one of the input leads was missing. So I took the device home and soldered the lead (just a small piece of wire). Next morning I put it back in the car, but it was no longer working. It wouldn't disengage the load with both inputs floating. As soon as I connect the positive terminal, the load (which, I remind you, is a power supply) would power up. The said PSU is able to work with as low as 4V input according to its specs.
I can't recall for sure (it was 2 days ago), but I believe I did try grounding the gate of BTS117 to the ground, and it made no effect.

I took the switch board home and tested it with a 12V 5W light bulb for a load. It again worked perfectly. Connected a milliammeter in series with the load and measured 0 mA with inputs floating at the same 12V across the load (and hence the switch).
Also tried measuring the channel resistance with inputs floating and power supply disconnected. My DMM has the upper limit of 2 MOhm and that wasn't enough for it to sense any conductance.

Any idea what can possibly be going wrong when I put the switch in the car? Why does it conduct when it should be off?

Update: I have once more experienced the faulty behavior, and this time the switch got considerably warm, i. e. it didn't turn on all the way and had decent voltage drop across it. I have disassembled everything and reassembled back again half an hour later; the problem went away and has not repeated since.


texts: What is inductance of common household appliances

texts: I am building a diy inverter and I need to calculate required DC bus link capacitors capacitance. But to do this I need to know the load inductance. I did not find any information about how many Henries are in common appliances - for example fan or a phone charger.


texts: Low cost battery backup circuit for GSM Modem

texts:
I am trying to build a schematic for a GPS tracker. The main target of the schematic is LOW COST. I have a problem with designing the power section. For a good, stable battery management and power path management there are ICs from TI, Microchip and other vendors. But those are costly and I am unable to use them in this schematic. The circuit will operate at 4V and the during bursts, the GSM module eats a max current of 1.8A. For this one, I have chosen LM2596 as the regulator and TP4056 as lithium charger. Now I need a cheaper way for power path. I have seen this schematic in one of the stackexchange's post. Can someone please tell me (with his/her practical experience), will be the switching fast enough so that my GSM module does not lack power and thus reboot? Also if anyone can give me a clue for a cheap SMD mosfet for this schematic.

So I am using LM2596 (in place of AP1117) and TP4056 (in place of MAX1555) for schematic below.

Or if anyone can suggest any other cheap alternate way for the power path switching, I am OK with that as well.


texts:
Consider the schematics below, the switching frequency is 250KHz, So, The cross over frequency be 250/5 = 50KHz. My ADC is able to sample at 1MS/s which is good as from the SNR perspective.Now, the doubts are below

For ADC selection-sampling rate the switching frequency should be considered while determining the sampling rate or the Cross over frequency ?
for the buffer used the Bandwidth should be 2 to 5 times the cross over frequency or the switching frequency?
In case i want to use current shunt amplifier for current sensing, How to select from the Bandwidth point of view ?

In general i wanted to understand how the Opamp parameter be looked at for converter design - unity gain BW, 3db bandwidth etc, used in control loop ?

simulate this circuit – Schematic created using CircuitLab


texts: The difference between algorithmic state machine (ASM) and state transition graph

texts: I have a very basic question. In what ways an algorithmic state machine (ASM) is different from a state transition graph (STG). Can someone take a very basic example (such as a binary counter) to explain what problems in a state diagram does an ASM solve. For example, somewhere on the internet I read that ASMs can describe finite state machines (FSM) with very large number of inputs, but I am unable to construct an example of this situation. Can anyone highlight the problems in STGs that ASMs solves by giving an example of an FSM?


texts: Can I use this circuit to control model trains with?

texts:
I am currently researching and developing several arduino/attiny projects for model railway applications.
One of the projects is a method to 'catch' an analog train and gently slow it down using a single transistor in combination with a low Frequency PWM signal (20Hz - 100Hz).
Several of these modules together can realize a shuttle service
The following circuit can do precisely that.

(N.B. I forgot to draw a line from the upper power rail to the upper brake section's rail)
How it is supposed to work? A train running under 12VDC is moving from the main track to the braking section. The transistor Q5 is on 100% dutycycly at this point. As soon as the locomotive is fully on the the braking section, the train's current will flow through Rshunt, creating a small voltage. This voltage is measured by an attiny chip so the chip can know when there is a train arriving.
As soon as a train is detected, the dutycycle will slowly decrease to 0%. This will stop the train and render it powerless. If you than flip switch SW2, you revert the voltage and train will jump in the direction to where it came from. The attiny itself will become powerless.
This method with a single transistor is shortcircuit proof when the maintrack and brake section are electronically physically connected by a train. Using an H bridge on the braking section, would cause short circuit problems.
Theoretically I can duplicate and mirror this entire circuit with the intention of also gently accelerating the train. Though this is possible I would be using relative many components. I would be using 2 attiny chips for one section of tracks.
So preferably I want to use a similar circuit as below.

The circuit would do the same as the first circuit. It waits for a train until a voltage is detected on Rshunt3 than it turns down the dutcycle of Q4 untill the train stops.
Here comes the difference. When the voltage is flipped (and I make the attiny aware of this via an input which is not present on the schematic) than the attiny will increase the dutycycle of the other transistor (which probably can be on the same output) from 0% to 100%. This should gently accelerate the train to 100% before it reaches the main track again.
I am not sure if this circuit will actually work. And that is where this post is about.
In the second schematic, the attiny ground pin is not directly connected to the rails anymore. Instead the attiny ground is connected through one of the diodes of the bridge rectifier to the 0V rail.
So my questions:

Will the transistors (to be replaced by N channel MOSFETs) conduct and do what I described?

Will the current measurement still work? Answered in comments: No, these lines will blow up the atting by putting 12V directly to the input pins

Are the other problems I am not foreseeing? point 2

And depending on the answers to the above three questions. Can I make this work? And if so, how can I make it work?

EDIT:
Looking at answers I believe one thing is not entirely clear. The +/- lines (the top and the bottems lines) can only be toggled via SW2. So the voltage is either 12V <> 0V or 0V <> 12V. The bridge rectifier always makes this 12V-0V and the LM7805 will always supply 5V to the attiny even though it has no common ground with the 12V supply.


texts:
I'm trying to figure out the true output of the individual LEDs on this panel:

https://www.amazon.co.uk/gp/product/B01M10RZ98/ref=oh_aui_search_detailpage?ie=UTF8&psc=1

It's a 96 LED infrared array with 12V power

I have emailed the manufacturer and they sent this: "the output of one bulb is 0.36W (12V*30mA=0.36W)"

I'm not very experienced but that seems incorrect. Most infrared LEDs I see are between 1-5V, and somewhere around 25mW of output.


texts: 4 bit adder(SN74LS283N) not working properly

texts:
simulate this circuit – Schematic created using CircuitLab

Hey guys

I've been trying to use a 4bit adder IC, but there are 2 main problems I've found which prevent me from using it:

If power is connected to the VCC pin of the IC, and GND is not connected, then every single output pin gives an output, without any connected inputs
Also, no outputs work when I plug GND into GND and so on, even when I connect inputs in with pull-down resistors.

This schematic is only using the first bit of the adder as a test, yet literally nothing turns on.
I know that 10k resistors may be too much, however, they have worked perfectly with other ICs i've used

Heres the datasheet:
  https://pdf1.alldatasheet.com/datasheet-pdf/view/5700/MOTOROLA/SN74LS283N.html

Thanks for the help guys

PS
I'm not good at creating circuit diagrams so try to forgive anything that doesn't make sense