texts: Are these H-Bridge circuits set up correctly?

texts:
I know I can use a driver chip to simplify this a lot, but I just want to make sure that I have the concept of H-Bridges down.

Here they are:

I have two motors, and each have 4 N-MOSFETs (https://www.sparkfun.com/products/10213). These N-MOSFETs will turn on with just 5v from the Arduino. I have added diodes for when the supply is cut off and the motor produces a voltage.

To move Motor 1 in one direction, I would write HIGH for Digital Pin 1 (D1) and Digital Pin 3 (D3), and so on.

Any feedback would be appreciated.


texts: How to get Ethernet cable into a small enclosure

texts:
I have a project with a Raspberry Pi in a small enclosure that is in a weather-protected outdoor location.  I currently have power and gpio signal cables entering the enclosure through grommeted holes, but need to add an Ethernet cable.
It will be connecting to an Ethernet over powerline adaptor, so it will not be required to support high data speeds.

I'm looking at a couple possible approaches:

purchase a crimper, cut the end off a patch cable and install a new end after passing through a grommet.   Advantage: neatest installation; disadvantage: purchase a tool that I may not need again.
cut the end off a patch cable and install an RJ45 jack, cram a short (6") patch cable into the enclosure.   Advantage: no new tools needed (I have a punchdown tool); disadvantage: may be tough to cram the patch cable into the box
cut a cable and solder it back together after passing through the grommet.  Advantage: no new tools; disadvantage: small wires tedious to solder.
Mechanical: cut a slot from the edge of the enclosure, slit the grommet and slide it and cable into the slot, then glue a patch to close off the slot.   Disadvantage: messy install

Am I missing anything else?  I originally considered soldering directly to the PCB, but the Pi uses a mag jack.


texts: Travel Photography 3.5V 3,6-4,8A LED Lamp powered by power bank

texts:
I travel a lot for my work as a photographer. For this I'm building a custom full spectrum lamp.

I have no issue running my build with a normal adjustable power supply from my studio.
To be able to adjust the brightness, I build the lamp with a switch to turn on additional led's. Which is why my amp changes from 3,6-4,8A.
Also there is a cooling fan which is meant to be for 5V but it works at 3,5V just fine.

However when traveling I use power banks for everything. So I would have liked to run my lamps off them as well.

Here is where I'm stuck:
I need a rather small and efficient way of transforming 5V into the desired 3.5V (led's work form 3,1 - 3,7V according to the manufacturer).
This has to work with power banks, which usually automatically adjust their output voltage to the device.

Thanks for your time.


texts: Boost 5V to 18V: charge pump + LDO or conventional boost converter?

texts:
I am trying to build a H-bridge driver using discrete parts. Now I have a problem regarding generating the 10+V gate voltage for the NMOSFETs I used.

The H-bridge and its controls is like this:

simulate this circuit – Schematic created using CircuitLab

My question is, how do I generate this +18V rail? DC-DC Boost converter, or charge pump to ~20V and LDO it down a bit?

Don't worry about my 5V rail, it is capable of 30+ amperes.


texts: ambiguous component values (ex. U01 U47 M47 etc.)

texts:
i'm having a hard time understanding components value when it's given in the following formate

U01
U47
M47
sometimes it's even worse like 4N7

i know that U for micro, M for mega, N for nano but i just can't seem to find a straight forward way to calculate it plus i've found conflicting answers so i thought it would be better to ask and know it correctly once and for all


texts: How to eliminate early effect in constant current source

texts:
When designing an differential amplifier it is important to have a precise constant current source (which I will abbreviate with CCS). It helps to keep out signal injections from the supply rails. A precise CCS has the main property of firstly the current (of course) and secondly the impedance, which ideally is infinite.
The thing about this is now that the impedance strongly depends on the Early voltage, which unfortunately is highly unknown for various transistor types and not mentioned in datasheets (nor is it easily derived from given specs). The impedance can be improved by adding a emitter resistor to the BJT but it still depends on Early voltage (Vaf). Is there a way to circumvent this dependency of the CCS from Vaf? We're talking about a very simple kind of current source as described here (first picture).

Furthermore, when looking into the spice model of the MPSA42/92 you find Vaf of 10V which looks way to little. Is that a true value? If it is, the MPSA would be quite useless as a transistor, since it would in essence resemble a normal resistor. See here. Therefore I believe the value in the model is just wrong.

How come that a very vital property of a transistor is so hard to find and so neglected? Furthermore Vaf is important for many parameters of a circuit, e.g. the gain of a transistor stage. Am I on a wrong track here and Vaf is not as important as I believe, or can it easily be ruled out (as is oftentimes possible for beta).

To make long story short: Is there a way to calculate the impedance of a CCS without knowing Vaf?

EDIT: As jippie propsed, I put my questions in a clearer manner here:

Is there a way to circumvent this dependency of the CCS from Vaf?
[...]10V which looks way to little. Is that a true value?
How come that a very vital property of a transistor is so hard to find and so neglected?
Is there a way to calculate the impedance of a CCS without knowing Vaf?


texts: Voltage error when connecting a zener diode

texts:
I am working on a project where i need to measure the battery voltage and send the measurement to a uC, which is powered by 3.3V.

The voltage divider is projected as shown before:

As input we have the battery voltage (4.2V maximum) and as output, our goal is to have 3.3V (maximum) that is read by the uC.

The problem is that when I connect the zener diode, as output voltage I have 1.55V instead of 3.3V, while if I connect only the resistance and capacitance I have 3.3V.

Does anyone know the cause of this?

The electrical characteristics of zener dioce are in the following picture:


texts: When does an electronic fly swatter consume power?

texts:
A description of the device from Wikipedia: "The circuit is composed of an electronic oscillator, a step-up transformer and a voltage multiplier, similar to the circuit in an electroshock weapon or stun gun, but with much lower power."

Here is an example of the device.

When does it consume power? When the button is pressed? Only when something discharges it (when a fly is killed)? Does holding down the button cause more power to be consumed?


texts: How do I choose what type of transistor to use?

texts:
I'm working on a project that will have an Arduino Nano 33 IoT controlling a MG996R Servo. The goal is to get the batteries to last as long as possible, as it will always be on, and will only rotate the servo 2-4 times per day. The Servo's signal pin can be controlled by the Arduino, but if the Servo's power pin is connected directly to power it will constantly draw power even when the it is not being used, so I want to use a transistor to cut off its connection to power and save the batteries. I also want the transistor to take as little power as possible between the collector and emitter pins so the servo can be at as close to full power as possible (I don't care about the base pin as long as it can be controlled by a 3.3 V PWM pin on the Arduino Nano).
How do I decide between BJT or FET transistors? And within those categories how do I determine which will be best for my project? If you can tell me which one, GREAT! But I'm really looking for resources so that in future projects I know the difference and can pick which transistor will be most efficient for my projects.

This isn't exactly how my project will look, but it is close and the best visual representation I could figure out how to make. My project will have 5 V input and an Arduino Nano instead of the Uno.


texts: Need help with reading schematics for the PC Engine console

texts:
Problem: console works with power supply, but doesn't turn on with external power to exp. port on the back (has two pins for Vin)
Could not find the proper pc engine manual, but tg16 should be similar. On the last page there is EXTPOW section. I just can't find how the contact "CN104 3" is connected.
Manual link:
http://archives.tg-16.com/MISC/TurboGrafx-16-Service-Manual.pdf


texts:
I was under the impression that electric current was caused exclusively by the flow of electrons moving through the wire.
However upon doing a little more research on electric current, it is said that charge carriers are often electrons moving through a wire. What other charge carriers are there besides electrons when applied to electric circuits?


texts: How does the resistivity of a ferromagnetic material change as the material is being magnetized (magnetic domains aligned)?


texts: Inrush current limiter resistor power dissipation calculation

texts:
Theoretically, I have read and understood that during the initial start-up of a circuit, the circuit will draw high current (known as inrush current), so as to charge the capacitors in its direct line to its input voltage value.

My questions :

But, without performing any sort of testing, is there a way to estimate the value of the inrush current, provided we have the capacitance values? Or only after testing, do we get to know the inrush current value for the circuit?
Suppose, we have figured out the inrush current. To limit the magnitude of the inrush current, we may employ a small value of resistor so as to not dissipate high power in the resistor during the standard operating conditions.
But how to calculate the peak power dissipation during the inrush condition?

Suppose, I have an inrush current of 2.5A from 0 to 5ms, and then the current decreases to my actual load current of 500mA, how to calculate the peak pulse power dissipation of the resistor during that 5ms.

Is it simply ((I^2 * R) * 5ms)? Or what is the formula for calculating the inrush power dissipation?


texts: Can the 0V reference output of a switching power supply be connected to the neutral conductor?

texts:
Like the title says, I would like to know if it is possible to connect the 0V reference output of any switching power supply to the neutral conductor. Here is an image of what the connection should look like:

What would happen if I place this connection? Is it safe? If that isn't such a good idea, is there another way to reference de 0V output to the neutral?

Regards.


texts: Can I measure the -3dB point of a wireless link with a lower frequency?

texts: What I want to do is measure the bandwidth of a wireless video transmitter. I know for a fact that this is going to be at least 8 MHz if not much more as it gives a good video image with an OSD which has a pixel clock exceeding 4 MHz. (I'm trying to repurpose the transmitter to send other analog data.) Since I have no access to a high frequency signal generator (10 MHz+) to directly verify the -3dB point, is it possible to measure, say, the -1dB point and derive the frequency of the -3dB point from this?


texts:
Recently I was trying to drive two motors with atmega328 and L293D motor driver IC. The power supply section is shown below

I used a 12V battery with high current driving capability.The motor was not connected but even the led blink doesn't work. I verified the circuit for hours. Then I connected a 9V battery with LOW current driving capability as input. This time everything was working properly.
Finally I used a 100uF capacitor at the input with my 12V battery and it works!

[note:The motor was disconnected all the time. I checked the output with an LED]

Can anyone explain what happened. How does it work with that 9V battery?


texts: How to calculate current and voltage to heat up a wire?

texts: I have a Cr20Ni80 nichrome wire having 1m length, 24 SWG and a resistance of 4.390 Ohm/m. I need to heat it up to 100 degree Celsius. How can I calculate the supply voltage and current for the purpose?


texts:
I was learning about GFCI and wanted to know if there was any easy way to create a simple circuit to detect when there is water.

What I would like to do is make a LED turn on if a component (whether it's a wire or anything else... however, not any expensive water sensors) in the circuit gets in contact with the water.

Here's what I'm imagining: if water leaks from somewhere, maybe some part or component of the circuit gets wet and fails (or one pathway becomes inactive), and so the current takes a different path, which leads to a LED turning on and staying on until it's manually reset.

Is there a simple way to do this? Thanks a lot!


texts:
I have never seen a relay depicted as below:
 from here (pdf)
Can someone explain what is going on for terminals 6, 7, and 8?


texts:
I would like to find currents and voltages at R1 and R2 resistors. I put sinus voltage at left , 12V for example with frequency at 50Hz. Each coil has the same number of turns N. Irons circuit have the same reluctance. I consider this exercice like a theoretical problem, no losses from copper, no losses from iron, etc.

I attempt to find all fluxes, currents and voltages. In the drawing, red arrow is the sum of flux in each iron. Magenta arrow is a voltage. Black arrow is a flux created by coil.

I used LTSpice and it's OK if I let for K3=K1²=K2² but current in primary is a sinusoidale shape WITH add a DC shape, so the primary consume energy and the secondary don't use it.

vV1 0 3 dc 0 ac 1 0
+      sin(0 {1200*1.414213562} 6000 0 0 0)
rR4 1 0 1e-012
rR3 5 0 1e-012
rR5 8 0 1e-012
K1 LL1 LL2 0.9
K2 LL2 LL3 0.9
K3 LL1 LL3 0.81
rR2 0 10 0.006
rR1 0 9 0.009
lL3 7 8 1
lL2 2 5 1
lL1 3 1 1
.ends

Look at current DC:


texts: How does this circuit automatically oscillate at the microblower's resonant frequency?

texts:
I'm in dire need of assistance with answering this question. I've exhaustively searched for hours only to find little. There's lots of answers here, but none that specifically answer this question.
The question is: How does this circuit both find and automatically resonate at the microblower's resonant frequency?

The closest answers I could find were in the patents of the driver circuit, and in this link (How to control the driving frequency when working with high power ultrasonic transducers).
I understand that the op-amp is a rail-to-rail one, and both Q1A and Q1B make up a BJT transistor in a half-bridge type circuit; but I don't understand what the RC circuit does as well.

I'm a complete newbie with these things, so a thorough explanation would be greatly appreciated please!


texts: PICDEM board and Linux connection through serial

texts:
TL;DR: I can open screen or putty session in terminal to the /dev/ttyUSB0, but characters transmitted are invisible.  What could be the possible issue ?

I have PICDEM board with PIC18F87J11 and PIC18F8722 microcontrollers, connecting the board through serial to USB cable to my Ubuntu Linux laptop. The code in the microcontroller is supposed to transmit any character typed on the keyboard back to the console. This works alright with Windows 7 computers and putty. With Ubuntu - there is connection established in screen or putty, but the output is invisible - only the cursor continuously moves upon each keypress  (which is the same behavior with Window 7).

Doing hexdump reveals the following:

skolodya@ubuntu:$ sudo hexdump -c /dev/ttyUSB0
[sudo] password for xieerqi:
0000000  \b  \b  \b  \b  \b  \b  \b  \b  \b  \b  \b  \b  \b  \b  \b  \b
*
0001900  \b  \b  \b  \b  \b  \b  \b  \b  \b  \b  \b  \b  \b  \b  \n  \n
0001910  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n

cat /dev/ttyUSB0 reveals that characters are there, except show up in the caret notation, ^H , ^E , like that.

The code on the microcontroller itself doesn't reveal any hints of issue. The char array rxBuffer receives its characters from RCREG1
like so rxBuffer[rxCount] = RCREG1 .

Additional Info(as requested):

Currently the code is spitting out "HelloWorld string" (TXREG1 = txStr[txCount]).

Output of hexdump -C  /dev/tty | head -n 10

skolodya@ubuntu:$ hexdump -C /dev/ttyUSB0 | head -n 10
00000000  0f 01 17 0f 09 0c 0a 08  15 0c 0c 0f 01 17 0f 09  |................|
00000010  0c 0a 08 15 0c 0c 0f 01  17 0f 09 0c 0a 0f 01 17  |................|
00000020  0f 09 0c 0a 08 15 0c 0c  0f 01 17 0f 09 0c 0a 08  |................|
00000030  15 0c 0c 0f 01 17 0f 09  0c 0a 0f 01 17 0f 09 0c  |................|
00000040  0a 08 15 0c 0c 0f 01 17  0f 09 0c 0a 08 15 0c 0c  |................|
00000050  0f 01 17 0f 09 0c 0a 0f  01 17 0f 09 0c 0a 08 15  |................|
00000060  0c 0c 0f 01 17 0f 09 0c  0a 08 15 0c 0c 0f 01 17  |................|
00000070  0f 09 0c 0a 0f 01 17 0f  09 0c 0a 08 15 0c 0c 0f  |................|
00000080  01 17 0f 09 0c 0a 08 15  0c 0c 0f 01 17 0f 09 0c  |................|
00000090  0a 0f 01 17 0f 09 0c 0a  08 15 0c 0c 0f 01 17 0f  |................|

The output of stty -aF /dev/ttyUSB0

skolodya@ubuntu:$ stty -aF /dev/ttyUSB0
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^H; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 100; time = 2;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

Update: Trying out different computer with Ubuntu 14.04 32 bit didn't work either , same result

Update 4/20:

I've placed very simple code into the main :

 while (1) {

        while (!PIR1bits.RC1IF);  //Wait for a byte
        sprintf(txStr,"%X",RCREG1);
        LCDWriteLine(txStr,0);
        continue;

It's supposed to show the hex value  of RCREG1 on LCD screen. For a letter typed on keyboard windows produces 61 as expected, but on Linux I get E1. Oddly enough, the last 4 bits are correct regardless of what I type. But for top 4 i get values usually from D to F. So for hex value 62 , I get E2.


texts: Why are motor capacitors huge in physical size even though their values are in uF range?

texts:
When I see some teardowns of single phase induction motors on the internet, I see their capacitors look like:

Why are they that big in size compared to other caps, even though their value is in the µF range?


texts: Laplace transform on simple low pass filter in Python

texts:
Looking at the first picture in the link, showing a simple graph of an with- and without bypass filter circuit voltage difference.

I wanted to recreate this chart:

I have coded the noise and created the graph of the noisy signal:

import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

v_in = np.random.uniform(-0.005,0.005,150)+5
v_out = 1/(1+1*0.1E-6*s)*v_in #this line is wrong, no such thing as '*s'

plt.plot(v_in)
plt.plot(v_out)
plt.axis([0, 150, 4.95, 5.05])
plt.title('Bypass capacitor')
plt.ylabel('Volts')
plt.xticks(v_in, " ")
plt.show()

Problem

Now the difficult part is that I want to solve this by having the parallel capacitor be represented as an RC low pass circuit with R = 1, and the corosponding transfer function of $$V_{out} = \dfrac{1}{1+RCs} \cdot V_{in}$$

I am confused with what to do with the 's'. I think a Laplace transform of the input would be needed.

I can work with impedances and AC-frequencirs, but a complex signal is new. A bit of theory behind the Laplace 's' variable followed by a simple demo partialy set up would be very much appriciated!


texts: I2C and ADC using PIC18F2458 with MikroC

texts:
I'm using the following USB Joystick with I2C for PIC18F2458 using MikroC.
Right now the USB works only if I disable the I2C.
Running USB + I2C, halts on I2C1_Start(); in the Debugger and even in Proteus simulation.
void main(void){

  ADCON1  = 0x07;

  HID_Enable(&readbuff,&writebuff);       // Enable HID communication
  TRISB.B0 = 0x0; // I2C SCL, Data
  TRISB.B1 = 0x0;

  //vl6180x_configure();
  I2C1_Init(100000);
  I2C1_Start();

  while(1){
  analogo();
  USB_Polling_Proc();

    writebuff[0]=usb[0];
    writebuff[1]=usb[1];        //EJE X
    writebuff[2]=usb[2];        //EJE Y
    writebuff[3]=0;
    writebuff[4]=0;                //    kk = HID_Read();

    HID_Write(&writebuff,5);

   }

}

Schematic:
also note that error
Spurious SCL transition detected at 0.001206s [$II2C DEBUGGER#0003]

Updated schematic


texts: Near-me area network embedded emitters with a Raspberry Pi server receiver

texts:
I am making a toy for 4-year old children with 10-20 pieces in wood, as in this picture with four wooden boards with names:

The goal is that each wooden board triggers a sound, such as "Hello" or "Goodbye", and triggers a different sound depending on the setting, e.g. "Hello" in English or in French.

I thought of embedding a sound module with a single push button and a 2-pole 3-way switch.

An easier and cheaper solution would be to include just a button with an emitter in the wooden boards, and let a server like a Raspberry Pi listen to the signal, discriminate between the pieces, and play the sound of the piece whose button was pressed, with one press for English and two rapid presses for French. I think infrared would work, but it would require the emitter to be aligned with the receiver; radio would solve directionality but the emitters are too big.

I am a newbie here: is that possible?


texts: Solving Schmitt trigger circuit using the superposition theorem

texts:
In order to solve a Schmitt trigger circuit implemented with an op-amp (or a comparator) connected in positive feedback, this wikipedia page uses the superposition theorem.

My question is : why can we use the superposition principle in this situation? Superposition is a property of linear system and this one is clearly nonlinear since positive feedback involves hysteresis and saturation...


texts:
Let's say I have a MOSFET already operating in saturation such that
 Vds > Vgs - Vth. Can I make it to operate in triode or linear region by simply varying the drain voltage such that now Vds < (Vgs - Vth) where Vth is the threshold voltage for MOSFET to switch on??


texts: Plotting open loop gain and GBP of an opamp in LTspice

texts:
How can I plot the "open loop gain" versus frequency of an opamp in LTspice?

And how can I plot the gain bandwidth product as well?

Is the following correct?:


texts: Prevent overcurrent while filter capacitor is charged

texts:
I have this circuit:

On start-up, the power supply experiences an overcurrent condition, because when the capacitor is charged, it looks like a short circuit as seen from the power supply. How can I prevent this?

Adding a current-limiting resistor before the capacitor is not suitable for me, because of the load-dependent voltage drop - the load, of course, will look smaller once the capacitor has charged at the maximum current of about 2 A. Maybe there is a simple circuit to temporarily enable a current-limiting resistor? Or another simple solution?

ADDED. I have these ideas. Please feel free to comment.


texts:
There is some informations that I couldn't find anywhere about CE compliance in order to design my project, so maybe you can help me :

1) I would like to use a buck switching power supply instead of a RCC for room and costs purposes.
Does the power supply supplying a radio module (ie 5V DC) need to be isolated from the main power supply line (ie 230V AC) from a CE compliance point of vue and failures risks ?

2) All product has to pass the EMI tests in order to be CE compilant, so what is the advantage to use a CE certified module compared to using a wireless MCU with integrated radio and designing an antenna from the ce compliance/test point of vue ?

3) I would like to use the CC2538 wireless MCU from TI using 6LOWPAN over the IEEE 802.15.4. I saw that none of them are certified (either CE or FCC).
Can I use the fact that this MCU is IEEE 802.15.4 compilant in order to reduce the number of tests I have to go through in order to prove the CE compliance ?

Thanks for your help


texts: How can we test the lifespan of electrical components?

texts:
We work with some electronic devices in our projects. We are at the stage where we need to create some test strategy to validate the lifespan (e.g. 1 to 5 years) of our devices for which we provide warranty.
We need to standardize this test strategy to provide documentation to our clients that we have our devices tested in our facility to support the given warranty period. This test strategy will focus on testing the electrical components (e.g., LCD, crystal oscillator, thermistor, LED, accelerometer, light sensor, etc.) we use in our devices, for their performance over the warranty period/lifespan.
We are thinking of creating some test strategy where we’ll degrade the performance of the electrical components we use by putting those in some extreme environment (temperature, high voltage, low humidity, etc.) for a certain period. The “time” for which the components will be inside the extreme environment will be a representation of an actual time duration. For example: one week will represent one year. This way, we are trying to achieve a testing duration of one month to reflect the wearout of the components over a 5/6 years of time.
Now my questions are:

Is our testing process correct? Is it going to be accurate to some extent (e.g., for some specific components)?
If we are not thinking to the right direction, can anyone suggest other ways of testing standard to validate the lifespan of electrical component provided that we cannot run the test for 5/6 year time?


texts:
I just want ask how the socket in the image is called?

I couldn't really find and the closer I could get is only Raspberry's module.


texts:
I am using a level-triggered interrupt. During the interrupt OCR1A increases and the servo moves. I want to save each value of OCR1A when the pin returns to its previous level. So far I have only been able to save one value, but I want to save all values of OCR1A whenever program stops calling the ISR.

// Program to use External (Hardware) Interrupts of AVR Microcontroller (ATmega16)
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>

volatile unsigned int temp=65;
void Wait()
{
    uint8_t i;
    for(i=0;i<50;i++)
    {
        _delay_loop_2(0);

    }

}

/***** Function To Initialize Ports*****/
void init_ports()
{
DDRA = 0xFF;
PORTA = 0x55;
OCR1A=temp;
}

/***** Function To Initialize Interrupts*****/
void init_interrupts()
{
cli();  //Disable Global Interrupts
GICR =(1<<INT0);    //Set Bit6 of GICR to unmask INT0 interrupt.
MCUCR =(0<<ISC00);  //Configuring MCUCR for Rising Edge interrupt for INT0
sei();  //Enable Global Interrupts
}

/***** Interrupt Service Routine For INT0*****/
ISR (INT0_vect)
{
PORTA=~PORTA;
OCR1A=OCR1A+1;
temp=OCR1A;
_delay_ms(100);
if(OCR1A==305)
{  OCR1A=65;
   _delay_ms(300);
}
}

/***** Main Function *****/
int main(void)
{
unsigned int i;
//Configure TIMER1
    TCCR1A|=(1<<COM1A1)|(1<<COM1B1)|(1<<WGM11);         //NON Inverted PWM
    TCCR1B|=(1<<WGM13)|(1<<WGM12)|(1<<CS11)|(1<<CS10);  //PRESCALER=64 MODE 14(FAST PWM)

    ICR1=2499;  //fPWM=50Hz (Period = 20ms Standard).

    DDRD|=(1<<PD4)|(1<<PD5);    //PWM Pins as Out
    OCR1A=65;
init_ports();
while(1)
{
init_interrupts();
for(i=65;i<=temp;i++)
{ OCR1A=i;
   _delay_ms(100);
   if(i==temp-1)
   {  OCR1A=65;
       Wait();

   }
}

}
}


texts: Count PWM Pulses fed into Stepper Motor FET Driver

texts:
I am trying to (accurately) count the number of pulses fed to a stepper motor driver TI DRV8711. This driver "converts" one rising edge, depending on the settings, to a full step or microstep. The MCU I am using to generate those PWM pulses is a Freescale MPC5602D. The pulse frequency is going to be less than 30kHz per stepper motor.

The application I am using this device for is position control with a stepper motor. This requires accurate knowledge of the steps taken (given the stepper motor does not stall).

How are those kind of drivers normally driven? Using a regular GPIO pin that is asserted in a timer interrupt routine or via PWM? I want to avoid cramming the main loop with asserting and deasserting a GPIO pin. (I have to control 5+ stepper motors simultaneously)

Counting the PWM pulses sent to the driver is trivial with a regular GPIO pin.

On the other hand, how is one going to approach the problem of accurately counting the number of PWM pulses? Is this done by feeding the PWM output back to the MCU and using a counter to count the rising edges? I guess I have to decrease the PWM frequency before I reach the desired number of pulses in order to disable the PWM before the last pulse and thus guaranteeing not to "overshoot" the setpoint.


texts: How to measure/display the delay of two cosine signals on the oscilloscope?

texts:
I am creating the two delayed cosine waves in picture 1 on MATLAB using the following script:

clear all
close all
%% Create sinusoidal Wave
fs = 44100;
t = 0:1/fs:2; T =10e-3;
signal = cos(2*pi*t*1/T);
%% Create shifted signal
Delay = 5e-3;
shifted_signal = cos(2*pi*(t-Delay)*1/T);
%% Output signals
soundsc([signal, shifted_signal],fs)

And then I am measuring the output signals on the oscilloscope by connecting my laptop speaker to a custom board and then to the oscilloscope.

This is what is displayed on the oscilloscope.

I don't understand why I cannot see the delay. Can someone explain to me how I can measure the delay on the oscilloscope or if there is a special set up for this? I read several articles in many websites but I haven't solved the problem. The oscilloscope I am using is a keysight infiniivision dsox3024 t


texts: I have a Sharp GP2D120 which is a distance sensor for the range 40mm-300mm. Reading the datasheet the output voltage should change from quite high to very low. I cannot get this change to happen. The most i can get the output voltage to move by is about 0.1V and its averaging about 0.3V at a distance of about 50-60mm. Has anyone got any ideas why this is happening?


texts:
Diode circuit using real model
What will be graph b/w Vo and Vi for 0


texts:
I have a small FM radio module I bought off eBay that runs off a few AA batteries, and have it essentially plugged right into a pair of PC speakers I have on all the time. To save battery power, I turn the module off with a power switch built into the battery box. The problem with this setup is that when the power to the module is turned off, there's nothing controlling the signals on the headphone patch cord anymore, so it suddenly gets 60Hz line hum on it.

Is there a way to use a couple of transistors from the signal lines to ground, and bias them off while the power's on, so that when the power is turned off they ground the lines?

Or would it be easier to just add 10K resistors between the signal lines and ground, so it doesn't have as much opportunity to pick up line hum?

To be clear, adding a triple-pole, double-throw switch is NOT an approach I'm willing to take in this instance, as it's rather overkill for this situation, given that I already have a mute switch between the radio and the speakers. I'd rather this was automatic instead of manual, you see.


texts: Sziklai pair and Darlington pair input impedence

texts:
If i remember correctly the input impedence of a BJT is r_pi=Vt/Ibq.
I've read that using those two configurations I get a much higher input impedence. Can someone please tell me why? Maybe some formulas to prove the fact would be appreciated.
Cheers


texts: Is it posible to use AM/FM antenna as GPS antenna?

texts:
Having installed a tablet (Nexus 7) in the car dashboard, the GPS receiving signal seems to be too weak (specially in places with lots of buildings/trees around). So I thought about opening the tablet and connect the built-in GPS antenna contact points in the SoC with the car built-in antenna.

However the GPS and AM/FM signal frequencies are different, so I guess the car antenna would be designed just for radio signals, making it not work with GPS.

In addition, the car antenna is located in the very top of the vehicle, so over 1 meter wire would be necessary to make a connection with the tablet, which makes me suppose I would need some kind of amplifier due to power loss in the wire

So, I wonder if that is possible and, if it would be effective


texts: Rationale for commonly occurring DC voltage magnitudes in electronics

texts: Is there some rationale behind the frequently occurring voltage magnitudes in circuitry and sensors, such as 3.3V, 5V, 12V, etc.


texts: Is it possible to charge Li-Ion Cells in series without a Balance Charger, by using slightly lower 4.1 V per cell charging rate

texts: I have read that it is strictly not recommended to charge Li-ion cell packs in series without using a balance charger. My question is, can a balance charger be avoided by keeping the total charging voltage slightly lower than the actual full charge level? For example, if for a 12.6 v Li-Ion Battery pack if we use a supply level of 12.5 V, can we hope nothing untoward may happen?


texts: Why Decibels are used to measure Signal to Noise Ratio?

texts:
We just started a communications course in college and we came across SN ratio. The following is an ambiguity I am facing which my professor is unable to resolve:

Signal to Noise Ratio is the ratio of signal power to the noise power. It is often expressed in decibels. But it is a ratio of two similar quantities, so it must not have a unit right? Why then do we use decibel?

If anybody could answer this question or provide links to resources which solve it, I would be very grateful.

PS: I tried Google and Wikipedia but I could not find anything specifically related to this.


texts: Calculate linear phase when given in decibel

texts:
The datasheet of the LT6230 shows the op amp's phase lag in decibels (page 14).

The datasheet does not give a formula to recalculate the angle in degrees, so can I just assume the following being the correct conversion?
$$
[\text{Phase}] = 10^{\frac{X_{\text{dB}}}{20}}
$$
I'm afraid, the numbers do not really check out: From 80dB to 0dB, the phase margin is 1000° which seems to be a bit high for an operational amplifier.


texts: Can I ground the negative DC bus of a variable frequency drive?

texts:
Suppose I have a typical VFD: rectifier, DC bus caps, inverter, feeding a motor.

In general it would not be advisable to tie the DC bus to earth ground, because the AC line may also be referenced to earth. Having two competing ground references in the same circuit can cause substantial issues. I suspect the rectifier diodes would fail rapidly, if a fuse didn't save them first.

But suppose I wanted to power the drive through the DC bus terminals. In this configuration, the AC terminals are left open, meaning there is no competing ground reference. The VFD and motor chassis are tied to earth, which can lead to common mode issues, but I don't see that they'd be any worse than running from an earth-referenced AC line.

In that configuration, would there be any problem with tying the negative DC bus to earth? Is it possible to make a general statement, or would it be installation- and equipment-dependent.


texts: CAN Bus on PCB traces instead of twisted pair cable - points to consider

texts:
In order to save cost on the system in one of my current projects (no cables) I would like to eliminate the CAN cable and add traces to the PCB (one pair from left to right to connect the connectors + 1 pair stub to the CAN Transceiver on each board).
As I have anyway a continues chain of PCBs connected by a connector with free Pins this seems fairly reasonable to do.
I'm planning to implement CAN with a fairly low speed (125kbits/sec).
Each PCB looks roughly like this:

The system is set up likes this and is about 50m long!

I've read a couple of other questions (e.g. here, here and here) and articles and application notes (such as this, this and this).
But am nowhere near to fully understand it.
I have a couple of questions for this:
First one is regarding the transmission line impedance.

The 120Ohm standard are differential impedance of or singled ended for each CAN_H and CAN_L?
how to reach 120Ohm impedance on a 4 layer board? (I use JLCPCB standard 4 layer stack-up, and with their calculator I don't reach 120Ohm for single ended and for differential I only get close with 3.5mil trace + 4mil spacing - which is close to their absolute minimum).
Can I / should I add extra components to the bus traces, to reach the 120Ohm?

Regarding shielding:

Despite the impedance topic, in the CAN specification a shielded twisted pair cable is recommended. Shall I in that case better route the CAN lines on one of the inner layers and shield it by a GND plane above, beside and below?

Regarding twisted pair:

Would it make sense to model the traces on the PCB similar to a twisted pair (e.g. something like this

Overall the questions can be summarized to:
Which trace width, spacing on which layer give me the best result for long CAN traces on a 4 Layer PCB and how do I shield it?


texts:
Relatively new to circuits, but I have found this good motor control circuit for a DC motor (I have 2 microswitches, each one reversing the direction of the motor), the only thing is I am having some trouble figuring out where I should place my speed control unit. This is the speed control unit I am using. It has a +/- battery input and a +/- motor output.

This is the circuit diagram I am using, the terminal block I am using is a DPDT relay with a socket base. I would've drawn a circuit for it, but to be honest I don't know what it would look like, but I feel like it would make it easier for me to understand where to put the speed control, so if someone wouldn't mind drawing the circuit for me it would be greatly appreciated, but not necessary.

simulate this circuit – Schematic created using CircuitLab

To see a full overview of what I am doing (minus the speed control) take a look at this link : http://cheesycam.com/cheesycam-diy-auto-reverse-polarity-motorized-video-slider-update/

I know that I cannot put the speed control in between the motor and the terminal base, because the speed control will not work when the polarity changes to reverse the direction. I also don't believe I can simply put the speed control in between the battery and the terminal base.

Anyone have any ideas? As usual any help is greatly appreciated!


texts: What do I do with the "shell stakes" on connectors?

texts:
I've seen a few connectors with "kinked shell stakes" (example). It's probably obvious but what are they for?

Are they somehow soldered to the board or do they wrap around it? Should I drill holes for them?

I'd appreciate any links with examples of this kind of connector soldered on to things. I can't quite picture it.


texts: I've got an issue that appears to be caused by damaged resistors that are either open circuited or of too low a value due to contamination.  The problem is that they're gigaohm resistors, so to a multimeter, they're always open-circuited.  How can I measure the resistance, or, at least, test the continuity?


texts:
We have an Arduino device that is using a sensor requiring ~12V. Are Step up devices safe? Are there any dangers in terms of current etc?

To elaborate; we plan to run the 5v supply from the arduino board through http://uk.rs-online.com/web/p/dc-dc-converters/0389287/ in order to power https://www.sparkfun.com/datasheets/Sensors/Proximity/SE-10.pdf as the 5v has proved insufficient. 9v batteries have worked so far, but haven't lasted long enough.

Will this work, and how might the circuit look?


texts: Can AVR ISP mkII programmer be used in Mac OS?

texts:
I'm trying to program an ATmega644A. It works fine from Linux, but when I try the same project with the same programmer, an Olimex AVR ISP mkII, I get the following error:

avrdude -p ATmega644 -c avrispmkII -P usb -b 115200 -F -U flash:w:build/controller.hex

avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00savrdude: usbdev_send(): wrote -34 out of 8 bytes, err = Result too large
avrdude: stk500_send_mk2(): failed to send command to serial port
make: *** [flash] Error 1

My AVR toolchain, including avrdude, comes from MacPorts, and I see libusb in /opt/local/lib too. I've tried as a normal user and as root (Linux requires root for USB access with libusb). What could the problem be?


texts: Mode toggling circuit using only transistors, resistors, and capacitors?

texts:
I’m trying to build a circuit that:

Does not draw power when in an idle state (when it’s not lighting up
an LED).
When the user momentarily presses a button, the circuit keeps an LED
on for either 1 second or for 10 seconds.
If the circuit is in “short duration mode”, it keeps the LED on for
1 second after a press.
If the circuit is in “long duration mode”, it keeps the LED on for
10 seconds after a press.
Initially, the circuit is in either “short duration mode” or “long
duration mode”.
If the button is held down for longer than 3 seconds, the circuit
toggles from one mode to another.

I believe requirement #1 rules out most microcontrollers, since they draw continous power. I also cannot use a microcontroller that shuts itself off after lighting up the LED by using EEPROM to store the mode persistently. (This is because I’m in a low voltage environment, and the available microcontrollers don’t have EEPROM).

Thus, I’m thinking this circuit can only be implemented with capacitors, resistors, and transistors.

There are also some non-requirements:

The LEDs can dim over time while they are on.
The exact durations I mentioned don’t matter- they are just for
illustrative purposes.
I'm not concerned about the exact parts and values in the circuit
right now, just the conceptual design.
It’s ok if the mode isn’t retained in “memory” truly persistently.
For example, if the mode is “stored” in a capacitor, and the
capacitor discharges very slowly on its own over time, that’s fine.

I’ve designed a circuit that implements most of the requirements except #6. It uses a toggle switch to store the mode. Requirement #6, holding down the button for a while to switch modes, seems like the tricky part here:

Any thoughts regarding this problem would be greatly appreciated. Also, please let me know if you think this is a path of madness, and this kind of circuit really needs a microcontroller to be feasible.

Thanks!


texts:
I've built a setup where I've placed a reed switch near the water meter in my house. Every 0.5 litre the switch gets triggered and my Raspberry Pi does the rest of the work.

My gas meter also outputs a magnetic field. So I've also placed a reed switch on it but it never gets triggered. I've tested with a magnet and the reed switch is not broken. I can "see" the magnetic field when gas flows through the meter and I keep my smartphone with an app to view the field near it.

The producer of the gas meter does sell a product to do the same thing I want to achieve so it should be possible. But why buy a ready made thing if I can do it much cheaper :).

Might I just need a more sensitive reed switch and if so how can I judge which one I need? The specifics of the switch which I'm using can be found here: http://www.produktinfo.conrad.com/datenblaetter/500000-524999/506957-da-01-en-REEDSENSOR_MS_313_3.pdf


texts: Is there any reason to use junction or Darlington transistors for power applications?

texts:
In quite a few Arduino examples, you see people using junction transistors to power a motor.  In this case, for example, he's using a Darlington transistor: http://www.instructables.com/id/Use-Arduino-with-TIP120-transistor-to-control-moto/

Is there any reason to use anything other than a MOSFET (unless you simply don't have one, and you do have another type?)  Is there any advantage to either junction or Darlington transistors for this application?


texts: why manual Chip select in SPI not functioning efr32fg14

texts:
Hello i am using efr32fg14 starter kit with manual shown bellow.
my CS in SPI is PC9 asshown in the diagram bellow.
When i tried to make it manual,I wrote GPIO PC9  be high before transmission then during transmission GPIO PC9 is low and after SPI commans i put GPIO PC9be high again.
In the SCOPE i get total zero.
The full code is attached bellow.
Where did i go wrong?
https://www.silabs.com/documents/public/user-guides/ug318-brd4257b-user-guide.pdf

#include "em_device.h"
#include "em_chip.h"
#include "em_cmu.h"
#include "em_gpio.h"
#include "em_usart.h"

#define TX_BUFFER_SIZE   4
#define RX_BUFFER_SIZE   TX_BUFFER_SIZE

uint8_t com1[TX_BUFFER_SIZE] = {0x03,0x0F,0xFF,0xF0};

uint8_t RxBuffer[RX_BUFFER_SIZE];

/**************************************************************************//**
 * @brief Initialize USART1
 *****************************************************************************/
void initUSART1 (void)
{
  CMU_ClockEnable(cmuClock_GPIO, true);
  CMU_ClockEnable(cmuClock_USART1, true);

  // Configure GPIO mode
  GPIO_PinModeSet(gpioPortC, 8, gpioModePushPull, 0); // US1_CLK is push pull
  GPIO_PinModeSet(gpioPortC, 9, gpioModePushPull, 1); // US1_CS is push pull
  GPIO_PinModeSet(gpioPortC, 6, gpioModePushPull, 1); // US1_TX (MOSI) is push pull
  GPIO_PinModeSet(gpioPortC, 7, gpioModeInput, 1);    // US1_RX (MISO) is input
 // GPIO_PinModeSet(gpioPortA, 0, gpioModePushPull, 1); //delay

  // Start with default config, then modify as necessary
  USART_InitSync_TypeDef config = USART_INITSYNC_DEFAULT;
  config.master       = true;            // master mode
  config.baudrate     = 1000000;         // CLK freq is 1 MHz
  config.autoCsEnable = false;            // CS pin controlled by hardware, not firmware
  config.clockMode    = usartClockMode1; // clock idle low, sample on rising/first edge
  config.msbf         = true;            // send MSB first
  config.enable       = usartDisable;    // Make sure to keep USART disabled until it's all set up
  USART_InitSync(USART1, &config);

  // Set USART pin locations
  USART1->ROUTELOC0 = (USART_ROUTELOC0_CLKLOC_LOC11) | // US1_CLK       on location 11 = PC8 per datasheet section 6.4 = EXP Header pin 8
                      (USART_ROUTELOC0_CSLOC_LOC11)  | // US1_CS        on location 11 = PC9 per datasheet section 6.4 = EXP Header pin 10
                      (USART_ROUTELOC0_TXLOC_LOC11)  | // US1_TX (MOSI) on location 11 = PC6 per datasheet section 6.4 = EXP Header pin 4
                      (USART_ROUTELOC0_RXLOC_LOC11);   // US1_RX (MISO) on location 11 = PC7 per datasheet section 6.4 = EXP Header pin 6

  // Enable USART pins
  USART1->ROUTEPEN = USART_ROUTEPEN_CLKPEN | USART_ROUTEPEN_CSPEN | USART_ROUTEPEN_TXPEN | USART_ROUTEPEN_RXPEN;

  // Enable USART1
  USART_Enable(USART1, usartEnable);
}

/**************************************************************************//**
 * @brief Main function
 *****************************************************************************/
int main(void)
{
  uint32_t i;

  // Initialize chip
  CHIP_Init();

  // Initialize USART1 as SPI slave
  initUSART1();
  GPIO_PinOutSet(gpioPortC,9);
  for(i=0;i<115;i++)//delay
          {
           GPIO_PinOutSet(gpioPortA,5);
           GPIO_PinOutClear(gpioPortA,5);
           }
  while(1)
  {
     GPIO_PinOutClear(gpioPortC,9);
            USART_SpiTransfer(USART1,com1[0]);
            USART_SpiTransfer(USART1,com1[1]);
            USART_SpiTransfer(USART1,com1[2]);
            USART_SpiTransfer(USART1,com1[3]);
          GPIO_PinOutSet(gpioPortC,9);
          for(i=0;i<115;i++)//delay
          {
           GPIO_PinOutSet(gpioPortA,5);
           GPIO_PinOutClear(gpioPortA,5);
           }
  }
}


texts: When connecting a JTAG, Serial, or Parallel between powered devices how is it that one of the devices doesn't get fried?

texts:
As I was programming a device's flash with a USB bus pirate, I was curious about how this was possible from an electrical perspective. The target device was powered from a separate power adapter than my computer.
In high school, I was always told that you shouldn't connect circuits together that have different power supplies. I was also told not to have two digital circuits trying to drive a bus line to different logic levels.
Even though I knew this, I didn't think twice when connecting:

two computers together with a serial cable
a computer with an Ethernet switch
a computer to a laser printer with a parallel cable
a laptop to a separate monitor with a USB-C cable

In the above cases, I suspected that there was some magic that solved this.
So, is there some simple and inexpensive magic for things like JTAG or device programming?
How did the devices in the above list achieve this?


texts: Avoiding echo/feedback on speaker-phones, how?

texts:
Even a $20 mobile phone with a speakerphone has no problems of feedback. While I understand that companies like Mediatek have use crazy volumes to bring down mobile chipset prices so low, but reading some articles I get the impression that the circuitry/electronics to suppress/remove feedback from such speaker-phone arrangements where speaker and mic are placed in very close proximity, is fairly complex (involve powerful DSP), involved and expensive. Am I missing something very basic here ? Are there some environmental constraints that are used, in case of mobile-phone to simplify the design of such circuitry and there-by, keep the costs low ?

I am approaching this from the study of an el-cheapo baby-monitor with 2-way "talk" feature, where, in the problem of feedback is terrible. I've tried several things s.a. replacing the electret microphone, speaker type of this device, to no avail. This audio codec used on this device is apparently an ALC one but much of the chip's surface is etched, but I do know that the processor is a Winbond ARM7. It had a shiny sticker on top which I managed to scratch-off to reveal the part number.


texts:
OBJECTIVE: A device that floats on the water's surface and measures the depth. If any changes occur in the depth, it sends a report to a remote receiver.
MY RESEARCH: I have considered the following sensors but they don't seem to be effective:

IR won't work because water absorbs red light.
Ultrasonic: I can't find one that works underwater.
I also read a thread: Underwater distance measurement/Sensing however, I don't know if I can implement that.

QUESTION:
What sensor can I use for this purpose?


texts: Why is it undesirable for current to flow back into a power source?

texts: I am building a simple power source OR-ing circuit using two Schottky diodes like the one below. Source 1 is a 3.7V lithium-ion battery and Source 2 is a 6V 1W solar cell. I can see that the two diodes make it such that the load is provided current from only one source at any time (ideally) and that current is prevented from flowing back into the inactive source. But say, one of the diodes is omitted. What are the consequences of current backflow?


texts: What is the application of the SMA connectors on the DE2 115 FPGA board

texts: The SMA connectors are expected to be used for clock IO. However, the board already has oscillator and the PLLs can be used to generate a variety of clock frequencies. Besides, for any daughter board connected to the extender socket or the HSMC interface, the clock signal can be sent via the connector itself. Why then would someone need to use these SMA connectors?


texts: Why can't I replace conventional batteries with rechargeable batteries everywhere?

texts:
In two cases, I experienced that a device does not work, or does not work correctly, with rechargable batteries, while one-way batteries do the job. Can that be, and if so, why?
The two experiences where:
A radio-controlled wall clock designed for I think one AA battery. The initialization failed -- no matter how long I waited, it always did a round-trip to 12:00, then ran to the correct time, then returned to 0, and remained there forever.
A bathroom scale designed to use four AA batteries. It simply does not work, as if there were no power source at all.
The batteries that worked in both cases were plain vanilla AA batteries. The recharchables I tried were of the various kinds I have in my household, for example, Ansmann2100 mAh NiMH AAs.
The charger I use is a Cellcon "Super 1 Hour Easy Bi-MH/Ni-Cd Battery Charger Model C-250". It has a nice LCD display indicating charging status, and progress, and I always waited until it say "Charged" for all four AAs I insert.
Of course, I tried brand-new, then older, but verified-to-work rechargeable AAs, but the result was always the same.


texts: Is it possible to use a dual rail power system to power op-amp which is designed for a single supply?

texts: I am designing an amplifier circuit using the LM386 amplifier. I am using the schematic below as a guide. I have access to 3 pins: +5V, virtualGND and -5V. Is it possible to power this amplifier using those pins? This amplifier only works with a single supply (not dual-rail apparently) so I'm wondering whether it would work with +5V as the supply voltage and replacing the ground in the circuit below with the virtual ground (which the audio input signal oscillates about). Thanks in advance, any help would be greatly appreciated.


texts: Is the difference between p-type and n-type solids simply the difference in the placement of the valence and conductive band in the solid. Otherwise I fail to understand, p-type means lots of holes and the electrons move towards the holes as the holes attract the electrons. n-type means lots of electrons and the electrons move towards the holes because they attract the holes? I am confused by this.


texts:
So I read about Stability/Negative Feedback in amplifiers here
https://www.allaboutcircuits.com/technical-articles/negative-feedback-part-4-introduction-to-stability/

I understand that an LTI feedback amplifier has a closed-loop gain of

I also understand that the Loop gain is defined to be AB and that for a loop gain magnitude less than one, there will some oscillations but these will die out as time goes on - thus being stable. Now, that contradicts with the equation up there.

If we set the Loop gain AB < 1 to something like AB = 0.5 and then consider at a 180 degree phase shift, which will mean that
$$G_{CL}=\frac{A}{1-(0.5)}=2A$$
Now that suggests to me that for a loop gain magnitude less than 1 (0.5 here) and at a phase shift of 180 degrees, the amplifier should be unstable as the oscillations would build up with a CL gain of 2A? That contradicts the previous intuition I had. How come the equation isn't matching up with what I thought?


texts:
https://ibb.co/JmBt71D

Here, i added a image of the circuit problem.
I wonder how to solve it.
Firstly, i found a equation with respect to KVL for the left side of the circuit: -36+24*I+12*I=0 and I=1A so, VΔ=12V
Secondly, the current of VCCS is causing trouble because it depends on VΔ but this is current source so, should i think it like behaving as DC 0.5VΔA=0.5*12A= 6A ?
After the comment of "The Photon" (thank you!) i have learned that we should think like there is no current flows on the wire that i0 is shown on. So, i0=0.
Lastly, for the right part of the question.
There is no independent source and there is only a VCCS= 6A(?). The resistors are parallel connected so, their voltages must be equal and the current 6A dissipated as 2A through 20ohm Resistor, 4A through 10ohm Resistor. Then, by the KCL, 6A+i1+i2=0; The values must be like this i1=-2A, i2=-4A.

VΔ= 12V , i1=-2A, i2=-4A, however, I am not sure about my results. Are my assumptions and thinking correct ? and, Can you please help me about checking calculations ?


texts: increasing the battery amps to fit a water pump

texts: I have a battery of 12V(yuasa YB3L-B), 0.036 Ampere, and a water pump(SEAFLO bilge pump), running on 12V, 1.8 Ampere. How can I increase the amps of the battery to fit with the pump?


texts: How to find Magnitude of transfer function

texts:
I am trying to read a paper by Butterworth on his filter.
There is a term called filter factor which is said to be the ratio between output emf by input emf.But i am not able to understand the mathematical expression.I want to know weather is it the transfer function as if i write the transfer function it comes out to be
$$ (1)/(SCR +s^2LC +1) $$

which does not match with his expression which is
$$ 1/( 1+ x^4)^{1/2}$$

I also presume that it can be the magnitude of transfer function.
In that case can you give me hint on how to go about the problem of finding the magnitude.

I am giving the link to the paper.
Its in the second page.
link


texts: I've never seen any explanation for why is the Collector current = Beta * Base current. Please if you know give me some derivation for it. No matter if it involves math or something higher level stuff.


texts: 3 phase line operating via 3 one phase relay

texts:
I want to operate a 3 phase 10Hp motor pump. I have a 3 phase electric line, but due to some requirements, I have to operate each line (A-B-C) in 3 phase using 1 phase relay separately.

My question is, can I operate each phase using single phase relay at same time (may be with fraction of delay because of relay are differ for each)?
Will this harm my pump?

Thanks in advance!


texts: What is the difference in VHDL between multiple architectures and multiple generate statements within one architecture?

texts:
Considering two cases:

Case 1:
A top file where, depending on a parameter P, I make use of the generate statements to instantiate one of two possible architectures (of the same entity).

(Two architectures with one solution each)

Case 2:
A top file where I instantiate one single entity E and pass it the parameter P.
Thisentity E has generate statements to generate one of the two possible solutions depending on the value of parameter P.

(Only one architecture with two different solutions)

Both cases seem to be equal but I wonder which one is more correct or what happens under the hood? How does the build tool take it?


texts: What will happen if the output from a NOT-gate injected- BACK to its OWN input?

texts:
Not-gate, if get a 0(Off) input, it gives an 1 (On) output. And if get a 1 (On) input, gives-back a 0(Off) output.

Now, if-I could bring the output back to the input of the not-gate, then what will happen? If the gate is getting a 1 input, it is giving a 0- output, and then if it is getting a 0 input, it is giving an 1 output.

The situation sounds-like a physical-model of a "self-contradiction" (self- false)  (like when fever-attacked kid-Bertrand Russel waiting to be april-fooled by his brother, taking preparation against all possible tricks,  Bertrand Russel's brother made Bertrand an april-fool by doing "no-april-fool" at all; and if Bertrand's brother uses any april-fool trick, Bertrand will Not be april-fooled, and if Bertrand's brother use no april fool that means Bertrand hasbeen april-fooled by-his brother).

Now, what will-be happen in case of the real hardware called a NOT gate?

I ASSUME the possibilities;

the gate will always remain as 0 (off)-output .
the gate will always remain as 1(on)-output .
The gate will be "PULSATING"; once it will 1 output; at the next-moment, after receiving that 1(on)-signal it will give-out a Zero (off) signal, and the cycle will run on and on. The frequency of this oscillation will depend on physical-characteristics of circuit component.
the circuit will be get-damaged ( due to some anomalous current, overheating, etc) and soon permanently stop working.

Will something happen within-these assumptions?

PS. I'm thinking about this-problem from my schooldays, but since yet I do-not know, how to assemble a not-gate in a circuit, from-where they could be bought, etc; I yet could-not test it experimentally.


texts: Is anyone producing discrete memristors?

texts:
Is anyone producing these that I as a hobbyist can play with in my circuits? If not, where can I go to find out how to make and measure the performance of one?

Edit:

I came upon this link featured in Make magazine abut making your own memristors, but I don't know how you would be able to measure them.


texts: Why don't I need a resistance when testing a light bulb circuit in a breadboard?

texts:
I'm making some simulations in Tinkercad and trying different circuits to turn on a light bulb.

Why does an LED need some resistance and a lightbulb does not?

I'm only using a breadboard and a 9V battery.


texts: Ultra-low power sound/audio sensor for LOUD noises

texts:
I'm searching for a sound/audio sensor with ultra-low power consumption to detect the presence of a really loud noise (100dB+). The controller runs on battery and there is no option for a different power supply.

For me as a non-expert there seem to be two major types of sensors:

Electret microphone (with potentiometer): Here I had a battery life of not more than a week. But the device works as intended due to the right sensitivity.
MEMS microphone: These do look like the real power savers but the byproduct seems to be some way too high sensitivity. I read about that Vesper VM1010 (https://vespermems.com/products/vm1010/) which looks like a perfect fit (if the noise threshold can be set high enough) with about 10us current but as a hobbyist I'm totally unable to do anything with PCB and I can not find any (cheap!) breakout boards.

The common use case for sound sensor seems to be the detection of (very) low noises and I have been searching for a while now to find my product. And yes I even considered to design my own PCB circuit but I have a lack of electronic knowledge and I just don't want to believe that there isn't any smart solution for simple people.

I really appreciate any help or suggestion you can give. Thanks a lot!


texts: Requirement of center tap in PoE applications

texts:
Why do we connect the power (48 V) and ground (return path for PoE power) on the center taps of transformer for PoE applications?

Can't it be directly connected to TD+ & TD- pins of the transformer? If it is legitimate, what is the difference between two topologies?


texts: Calculating Quiecent Collector current in an inductor coupled transistor

texts:
I have a class A power amplifier like the following circuit. I need to analyze the circuit to calculate \$I_c\$ proper values for \$R1, R2\$

simulate this circuit – Schematic created using CircuitLab

There is a solution to the Ic current like,
$$I_c = \frac{V_3}{R_4}$$

By drawing the equivalent DC analysis circuit, we're omitting the R4, but how can we include it in the Ic expression? Any hints?

----------- The answer I'm referring to -----------


texts: increasing torque of a sewing machine motor

texts: I have a very small table saw (Harbor Freight "Mighty Mite") that is rated at 0.9 amps and 1/12 hp with max RPM of 14000 (a sewing machine motor). I use a jewelers saw blade and cut a very small channel approx. 1/8 of an inch deep for guitar frets. It works fine on soft woods but will sometimes bog down on hard woods. If I replace it with a 1.5 amp sewing machine motor with a 9000 RPM would it increase the torque to more likely make the cuts on hard woods?


texts: Cannot initialize LPUART1 in STM32CubeIDE on b-l072z-lrwan1?

texts:
I was having a problem about initializing the LPUART1 on b-l072z-lrwan1 using the built-in CubeMX code generation in STM32CubeIDE.

The problem was when I started debugging, the code seemed to run fine until the execution reached MX_LPUART1_UART_Init(); The debugger kept prompting

  Target is not responding, retrying...
  Error! Failed to read target status

and then the debugger shut down.

My question is how to properly initialize the LPUART1? Does it require any extra work to do in order to use this peripheral?

--

Anyway here's my LPUART1 peripheral configuration

static void MX_LPUART1_UART_Init(void)
{

  /* USER CODE BEGIN LPUART1_Init 0 */

  /* USER CODE END LPUART1_Init 0 */

  /* USER CODE BEGIN LPUART1_Init 1 */

  /* USER CODE END LPUART1_Init 1 */
  hlpuart1.Instance = LPUART1;
  hlpuart1.Init.BaudRate = 9600;
  hlpuart1.Init.WordLength = UART_WORDLENGTH_8B;
  hlpuart1.Init.StopBits = UART_STOPBITS_1;
  hlpuart1.Init.Parity = UART_PARITY_NONE;
  hlpuart1.Init.Mode = UART_MODE_TX_RX;
  hlpuart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
  hlpuart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
  hlpuart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
  if (HAL_UART_Init(&hlpuart1) != HAL_OK)
  {
    Error_Handler();
  }
  /* USER CODE BEGIN LPUART1_Init 2 */

  /* USER CODE END LPUART1_Init 2 */

}

The MspInit Function

void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
  GPIO_InitTypeDef GPIO_InitStruct = {0};
  if(huart->Instance==LPUART1)
  {
  /* USER CODE BEGIN LPUART1_MspInit 0 */

  /* USER CODE END LPUART1_MspInit 0 */
    /* Peripheral clock enable */
    __HAL_RCC_LPUART1_CLK_ENABLE();

    __HAL_RCC_GPIOA_CLK_ENABLE();
    /**LPUART1 GPIO Configuration
    PA14     ------> LPUART1_TX
    PA13     ------> LPUART1_RX
    */
    GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_13;
    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
    GPIO_InitStruct.Pull = GPIO_NOPULL;
    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
    GPIO_InitStruct.Alternate = GPIO_AF6_LPUART1;
    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

  /* USER CODE BEGIN LPUART1_MspInit 1 */

  /* USER CODE END LPUART1_MspInit 1 */
  }
  else if(huart->Instance==USART2)
  {
  /* USER CODE BEGIN USART2_MspInit 0 */

  /* USER CODE END USART2_MspInit 0 */
    /* Peripheral clock enable */
    __HAL_RCC_USART2_CLK_ENABLE();

    __HAL_RCC_GPIOA_CLK_ENABLE();
    /**USART2 GPIO Configuration
    PA2     ------> USART2_TX
    PA3     ------> USART2_RX
    */
    GPIO_InitStruct.Pin = STLINK_RX_Pin|STLINK_TX_Pin;
    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
    GPIO_InitStruct.Pull = GPIO_NOPULL;
    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
    GPIO_InitStruct.Alternate = GPIO_AF4_USART2;
    HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

    /* USART2 interrupt Init */
    HAL_NVIC_SetPriority(USART2_IRQn, 0, 0);
    HAL_NVIC_EnableIRQ(USART2_IRQn);
  /* USER CODE BEGIN USART2_MspInit 1 */

  /* USER CODE END USART2_MspInit 1 */
  }

}


texts: What is the purpose of resistor to suppress EMI? Couldn't I just use a suppression capacitor alone between the coil of the relay or contactor? I have tried to use capacitor alone and it did reduce EMI in my project, but I'm just curious of the effect of adding resistor in series with it.


texts:
I'm making a device which requires a display, and the display I want is similar to what goes into remote control of air conditioners.
What are these kind of displays, and how do they have some special icons built into them? I know lcd modules available for arduino etc can be an alternative, but I like the look of ones in remote control.


texts:
I am highly interested in developing a project involving bluetooth 5.0 on a nordic device, namely the NRF52840. However the package of this device is beyond my capabilities/kit for soldering.

I have found a breakout board, BL654 Series, but again it uses under the package pins, which is not possible. I am struggling to find any breakout possibilities for a bluetooth 5.0 nordic board with 32+ GPIOs which can be hand soldered.

Does anyone know of any alternatives by nordic with this? or a method by which I could maybe integrate the above Laird solution or other solution?


texts: greetings fellow engineers, i came by to ask you for help, i'm building a circuit that needs to be as resistant to surges as possible. I did my research, and make to this circuit: as it is supply by 110v ac single phase, it can be influenced by surges in the line or the neutral, so i put gdt's to take care of the rapid spikes, MOV's in paralleo to smooth the big surges and a fuse to react agianst slow pikes in current, as in short circuits. So as shown in the image, i did this for phase to ground, neutral to ground and phase to neutral, as this circuit will operate in situations that big surges will occur. There for, i would like to know if this will work or if someone has a better idea.


texts: AVR Program doesn't start running sometimes

texts:
I've written a little watchdog firmware that runs on an ATtiny85. The idea of the firmware is to:

wait 10 seconds after power up and ignore signaling during that time
after that expects a signal to be pulled low no more frequently than once every 100ms and no less frequently than once every 65 seconds, and failing one of expectations it asserts a reset signal for 10us, and then resets itself resuming at step (1).

Obviously (and arguably gratuitously) I programmed this in Arduino using the ATtiny board description, which maps the pins like so:

My fuse settings are programmed as follows via AVRDude:

avrdude -p t85 -c dragon_isp -P usb -u -U efuse:w:0xff:m
avrdude -p t85 -c dragon_isp -P usb -u -U hfuse:w:0xdf:m
avrdude -p t85 -c dragon_isp -P usb -u -U lfuse:w:0xe2:m

These settings correspond to:

Internal RC Oscillator @ 8MHz, 6CK/14 CK + 64ms
Clock output on PORTB4 disabled
Do not divided clock by 8 internally
Brown-out detection disabled
Do not preserve EEPROM memoryy through the Chip Erase cycle
Watchdog Timer NOT always on
Serial program downloading (SPI) enabled
Debug Wire disabled
Reset enabled
Self programming disabled.

For the purposes of debugging, it outputs a 100ms pulse width 50% duty cycle square wave during that initial 10 second period, and a 200ms pulse width 50% duty cycle after the initial 10 second period.

For good measure, here's the schematic snippet that goes with this:

The vast majority of the time, the debug signal behaves as described. On very rare occasions though, I've observed a flat low signal on the debug output, no square wave. I've looked at the power and reset lines of the ATtiny85 on a scope in this condition, and there doesn't appear to be any indication of a stuck-in-reset or powered-down condition occurring.

How on earth, then, could my program fail to start up? Could it be because brownout detection is disabled? Should I set the Watchdog Timer always on fuse? I'd really like to understand how this could be happening occasionally.


texts: Connecting NPN proximity sensor to rpi3 using reed relay

texts:
I have an NPN LJ12A3-4-Z/BX proximity sensor that I want to use to detect water usage on a water meter that has a rotating iron disk.

To make sure I don't overpower the 3.3v GPIO inputs I want to use a reed relay SIP-1A05 to keep the 5v circuit separate. But connecting input pin 18 to the relay does not seem to work.

Do I also need to connect the ground? If so, where to? With a resistor to the relay also?

Thanks

Edit with updated circuit from accepted answer.


texts: Supplementing battery pack + buck converter to handle peak draw momentarily

texts:
I have a battery pack at ~9VDC wired to a buck converter which steps down the voltage to 5VDC to power an electronic device.
The problem is that it sometimes supplies enough current on the device start-up to prevent the voltage from dropping too low and at other times it does not.  Usually it does not, but the fact that it's fine sometimes makes me think I'm borderline on having enough power.
Is it possible to add a capacitor or other component somewhere into the layout in order to supply some additional current momentarily to get past the start-up peak draw at which point the current from the battery pack may be sufficient?
====EDIT Oct 15 2020====
For more details as requested:

Here is the buck converter www.amazon.com/gp/product/B00Q48BRFO/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
The battery pack is www.amazon.com/gp/product/B01N2INSBR/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 and I've tried with both freshly charged Eneloop batteries as well as brand new Energizer alkaline batteries.
I'm powering a Raspberry Pi 4 (I understand it draws decent amperage, but I intend to use it mostly idle if I can just overcome boot up)


texts: How to connect power to multiple pins on a microcontroller?

texts:
I'm creating board with basic MCU STM32F334K8T6.

STM32 have three VCC pins.

Each of them needs to be fed.

Two options:

Connect them to each other.
Connect all power lines at one point.

To use the second option, you must use the bottom layer. The bottom layer is used for the polygon. By adding a power line there, I will break the integrity of the polygon.

Tell me which option is better to choose?

1.

2.


texts: Are RS232 to RS422 converters reversible?

texts:
I'm trying to get a MCU with a db9 female serial out port (using RS422 protocol) to communicate with a CY8CKIT-050 PSoC® 5LP Development Kit (running a microcontroller).

The development board comes with a db9 female RS232 port and already has the necessary circuitry to process the serial signal (MAX3232CDR level shifter, software configurable UART).

The development kit also has a general SCB UART (also configurable) where I can simply specify pins on the microprocessor as the Rx, Tx, etc. However, I would need to measure the differential signals of the RS422 from the MCU, level shift to TTL voltage levels, etc.

Because the board already has RS232 functionality implemented, I thought it would be easier to use a RS422  (from the MCU) to RS232 (to the PSoC board) converter. However, almost all the converters I could find are RS232 to RS422. Are these reversible?

For instance, the CON-422-PIE datasheet specifies the male db9 end as the "RS232 end" and the female db9 end as the "RS422 end".

If not, does anyone know of good RS422 to RS232 converters?

edit: I want the male end to be RS422 and the female end to be RS232.


texts: MESI based MULTICORE cache coherent system - bug issue

texts:
For this particular architectural design, in general, what happens when there are parallel processor and snoop side requests? How is such a corner case handled?
We have the following information about the design :
-Arbiter - Least Recently Served algorithm based (only info I have) and controls system bus grants
-Cache Lv1 - maintains cache coherency using MESI protocol, and has pseudo-LRU block within
-Cache Lv2 - Shared L2 memory
-Memory - 100% hit, serves all requests from Lv2 cache
Write back and write allocate scheme followed


texts:
So, I have signal in the waveguide that is transmitted by two modes of radiation, for which the delay is for example \$\tau_1=6\,\text{ns},\, \tau_2=6.5\,\text{ns}\$, respectively. And the energy supplied to the receiver by each mode is the same.

My question is about calculating \$3\,\text{dB}\$ width of the bandwidth of the channel (containing the constant component - but I'm not sure what that means). I know I need to substract this two modes one from the other (with an absolute value):

\$ d=|6\,\text{ns}−6.5\,\text{ns}| \$

\$ d=0.5\,\text{ns}\$

And next I multiply my \$d\cdot2\$ and divide one by my result. So:

\$\frac1{2d}\$

Ant this gives me \$1\,\text{GHz}\$, and this is the perfectly correct answer!

But I don't know

why this formula works?
why we don't use the lambda formula for our waveguide frequency?
what does it mean that the channel was created in the basic band?


texts: communication between 2 arduino crash when external power supply is plugged

texts:
i have one arduino mega that communicates with one arduino leonardo.

the leonardo controls some motors (mega tell to the leonardo how many step to do... leonardo is a coprocessor for the motor in other words).

for testing i try to send the number 20 from the mega to the leonardo. i sent the number as a sequence of char, with 2 char of haeder so in this case i'm sending 'M>0020' as 6 char (6 byte). leonardo send the status (ready/busy) back to the master through the pin4 (this is to avoid the interrputs in Wire.h that can add delay in the motor code if the master require data to the slave).

communication seems ok, but if i plug power supply (12V) communication crashes. if i reset the mega the leonardo read 11049 (i haven't the board there, could be a different number, but it is always the same), the recives for 5/6 times the correct number 20, then communication crash, and mega crash.

i tried to unplug every motor-related stuff from leonardo, so i have only 4 wire:

common ground
sda
slc
the wire for the state (ready/busy) of the slave.

the problems occurs every time i plugged the power supply. sometimes it happens that the problem occurs even without 12v external power (so onlu usb cable that power leonardo) after some time (half an hour)

the 2 arduino boards are linked with a 8m cable (i've used the tester and the cable seems ok, it was a cable for a lan network).

any suggestion?


texts: How to incorporate EL wire into a standard circuit?

texts:
I am trying to integrate some EL wire into a standard circuit but having trouble - I have some standard copper wire with a main supply and want that to run into an inverter (as I need one) and then a number of EL wires so that I can identify where there are breaks in the circuit.

Does this sound possible and do you know if it has already been done?  I assume that the answer is yes...

I have built a prototype from some parts ordered online but not getting very far with it!


texts: Can I make pulsing light using AC as source, a diode and a LED?

texts:
I'm new to this branch of physics hence my stupid question.

I know that diodes are used to make current flow in only one way. If I connected an AC source to a diode and the diode to a small light bulb or led, would I get pulsing light? In theory, according to the graph of the current that the diode passes, the light should be pulsing on and off, shouldn't it?

I didn't try this yet because I don't have a transformer and I don't want to kill myself.


texts:
So I'm fairly new to electronics and I wanted to make a boost converter. I was trying to get 360 V from 9 V and ran my circuit through LTSpice and EveryCircuit but it didn't seem to work.

It's a typical boost converter setup and I just have the question - Can a charged inductor discharge current to a capacitor (connected via a diode so it doesn't oscillate)? And if so, is there a limit?

Q1 (transistor) is still to be decided and R5, R6, and C3 will depend on how fast I need to switch it, so any suggestions on that would also be really helpful.


texts: Toroid Inductor's Copper Thickness and Frequency Question

texts:
I made a few toroid inductors and i learned that the color coded toroid type (yellow white, yellow green etc.) has relation to frequency. Also a person told me that copper thickness has effect too.

By my tries, if wind same turns in same two toroids with different copper thicknesses they have exactly the same inductance. I do not know about freq. response.

1) Does the copper thickness have any effect on the frequency. If so how?

2)In addition to question 2 should i only consider copper thickness in the case of how many amps the inductor will handle.

3)How the toroid type affecting the frequency. If i have a toroid that has a freq range around 10MHz to 50MHz, can't i use it for filtering my dc power line spikes with LC filter in lower frequencies.


texts:
I have designed a Costas Loop for carrier synchronization in MATLAB, here is my code:

% Siraj Muhammad
% 25/3/2015
% BPSK Demodulator
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

load RRC.mat

fc = 0.0500001;
phase_offset = pi/7;

N = length(rf_signal);
bb = zeros(1, N);
bb_f = zeros(1, N);
I_f = zeros(1, N);
Q_f = zeros(1, N);
I_r = zeros(1, N);
Q_r = zeros(1, N);
error = zeros(1, N);
PhErr = zeros(1, N);
error_integral = zeros(1, N);

% Loop Filter Coefficients
C1 = 2^2;
C2 = 1/2^8;

for i = 2:N
    % Downconverting to Baseband
    bb(i) = rf_signal(i).*exp(j*2*pi*fc*i+j*phase_offset).*exp(-j*PhErr(i-1));

    % Filtering
    bb_f = filter(RRC, bb(1:i));
    I_f = real(bb_f);
    Q_f = imag(bb_f);

    % Slicing
    I_d = sign(I_f(i));
    Q_d = sign(Q_f(i));

    % Error
    error(i) = I_d.*Q_f(i);

    % Loop Filter
    error_integral(i) = error(i).*C1 + error_integral(i-1);
    PhErr(i) = (error(i).*C2 + error_integral(i))/2^5;
end

figure; subplot 321; plot(real(bb)); title('I Channel')
subplot 322; plot(imag(bb)); title('Q Channel')
subplot 323; plot(I_f); title('I Channel Filter')
subplot 324; plot(Q_f); title('Q Channel Filter')
subplot 325; plot(error); title('Phase Error');
subplot 326; plot(PhErr); title('Loop Filter');

rf_signal is generated in another MATLAB script that produces BPSK signal. Simulation in MATLAB shows good results, loop tracks phase and frequency and locks on them.

After I verified the design, I implemented it in VHDL using some Altera MegaCores. However, ModelSim simulation doesn't show the expected result. Loop seems to oscillate rather than locking, even though the loop is closed.

And this is the loop filter's output, you can see how it is oscillating.

I checked all signals widths and made sure that they do not overflow.
When I open the loop in MATLAB and ModelSim, I get the same loop filter output.

They are opposite because data is modulated with cosine in MATLAB and sine in ModelSim. Problem is when the loop is closed.

Any advice would be appreciated.


texts: Winding method for barrel wound secondary center-taped EE core

texts:
I'm designing a high-frequency transformer, EE type core, with one primary, and a center tapped secondary.

As the secondary current is relatively high and the window area is small, I will use copper foil.

So reading this paper, I plan winding the transformer this way to reduce flux leakage so provide a good mutual inductance.

(In the image above, just swap primary and secondary).

Question As the secondary have two windings (or one winding with a center tap), what should be the best method to wind it:

This will put half the secondary winding next to the center leg of the core, and the other half more far.

Interleaved: The start of the center-tapped secondary wound as two insulated foils, that is the two secondary taps interleaved.

Does the the far half winding will have a flux imbalance compared to the first half (so the rectifier will get two different power) or the primary winding on the outer will compensate for this? So, its worth interleaving the secondary taps?


texts: I understand that for a RL based circuit connected to an AC supply, the impedance for the inductor is jωL and also I need to find the net resistance of the load model which I have derived to be (R*jωL)/(R+jωL). However I do not know how to proceed.


texts: Can you get an electric shock from a UPS output? If yes then can it be fatal?

texts:
I have an UPS of 800 watts which means its output is about 800 watt.
I am installing a current leakage breaker to my main supply so that if I accidentally touch any things which produce current my breaker shut down the main supply.
I have also installed a UPS.
I want to know if the UPS power could be a fatal to any one.  If "yes," then should I also include it in my leakage breaker circuit?


texts: Triac(s) as SPDT switch in a DC environment

texts:
My target is to switch, from series to parallel and vice-versa, 4 car batteries (12V/100Ah each).

Until today I made use of some latching relays (change-over, pulse relays, name them as you prefer) to accomplish my needs and they are working flawlessy.

The latching relays ensure that no more power is wasted when they are switched (until you give the next, fast pulse to their coils).

Now I would try to do the same with solid state components so I want to go with the TRIACS.

The "particular" setup I have arised some doubts to me: in the charging phase I make use of a radiant charger which produces a very singular waveform made of many voltage peaks but almost no - or very few - amps; these voltage peaks reach easily 300-400 volts with a top frequency of 2 MHz when the batteries are low in voltage (discharged) and get stable to 300 KHz when the batteries are half charged (and up).

The batteries, charged this way, become "conditioned" and can easily withstand very high voltage peaks without "boiling" or warming up, since their first radiant charging process.

With this system, done thousands of times by me, I charge 4 batteries in series and, once fully charged, I switch them to a parallel connection then I discharge them through a load (with a powerful inverter, 5.5KW) until they get discharged, so I start the charging process again, in a loop.

Studying the TRIACS I've read that they are the best solid-state devices when working in the AC domain, but not as good in the DC domain.

In my specific scenario, two kind of "currents" would pass through the TRIACS: an high frequency pulsed DC, with many voltage peaks - low amps - and a continuos 12V, high amps, DC; like in the SPDT relays setup, the components involved are not the same ones: in a two batteries setup, for the sake of simplicity, a single switch is dedicated to the charging phase and two switches are dedicated to the discharge phase; look at the schematic:

simulate this circuit – Schematic created using CircuitLab

I have some BTA41-600B TRIACS and some MOC3063 TRIAC optocouplers to be used as drivers, which could be the correct setup to replace my latching relays?

Of course, the above TRIACS cannot withstand 100 amps... nor the 400 amps available when the 4x100Ah batteries are put in parallel, but I would like to understand the working principle and build a little prototype to see how a solid-state equivalent of my current latching-relays system could work.

Remember, my main doubt is: how do will behave a TRIAC when a pulsed DC will pass through it? Do it will remain "stable" (ON or OFF) accordingly to the applied signal to its base? And, at least, can they act exactly as the latching relays do, so, without consuming any power once the signal has been issued at their base?


texts: Generate audio driver hi current from MCU & DAC

texts: I am very very new to microcontroller use. I am looking for a way to generate 2 different VLF frequencies that alternate for set time periods that will be pushed into an audio amplifier device to power coils (equivalent of solenoids I think). Also, if using a microcontroller, the device needs to be very small as overall space is an extreme premium. Should I look for a PWM or a uC with an onboard DAC?


texts:
Hi, I'm trying to make spice simulation.
I have used PSPICE Lite edition, and I got to use this Lspice because of the limit of the PSPICE
(It has number limit to use component)
And I am trying to revise W or L size in LTspice, But it is hard to find it.
Can I adjust W or L size at the LTspice?


texts: Options for class D amp using Power over Ethernet

texts:
I'm putting together a design for a small amplifier that utilises power over Ethernet (PoE). The design specifications are:

10w to 30w (as long as >10w power isn't critical)
56v asymmetrical power (0v, +56v)
Stereo in 1 package
current available only 0.6a (due to PoE specs 802.3at)
high efficiency (hence class-D)
Audio quality not that critical (does not need to be audiophile)
small package with low BoM count
$5 - $8 per chip in medium volume
I2S input ideally but will take analogue instead

Spending time searching the usual suspects (TI, NXP etc.) seems its difficult to find higher voltage class D chips as they are typically meant for high power amps and also are higher cost or complex (eg. the TI TAS56xx range) with fairly low efficiency at lower power for class D. The simpler chips more suited to my application are all lower voltage, typically 24 - 36v. I'm also obviously constrained with current although a decent electro on the power supply with provide much higher 'peak music power'.

My questions:

1) Anyone know of any chip that may be suitable that I may have missed?

2) There are a couple of chips that are in this voltage range but require symmetrical power (+- 28v) however I'm not sure if they can be tricked into running on symmetrical power 0v, +56v) without running in bridge mode which turns them into mono amps. Any tips on how to do this (eg. TDA8922 is a candidate)

3) the Ti TAS56xx chips would be somewhat suitable (price and efficiency not great) if they could use a slightly higher voltage. 56v is within the absolute maximum voltage specification but obviously I'm nervous running them a little bit outside their recommended maximum voltage.

I'm considering using a buck regulator to drop the voltage however this adds complexity, size and lowers efficiency.

Any ideas greatly appreciated.


texts:
I'm sorry it may not be the right place to post this but i'm not familiar with CRTs and old electronics so... here's my question:

This crt made a loud noise so i opened it and found this when i tried to discharge it, and it seems that the anode has some treeing.
Does that mean that it suffered breakdown or something?


texts: Good IR LED for tracking with webcam at high speed from up to 50 feet

texts: I'm looking to do some motion tracking on a badminton shuttlecock with a hacked webcam(s) and an IR LED. I went to radioshack and got a few leds but it seems that if i don't point them right at the webcam, it doesn't see them very well if at all. I then noticed that the package said it had a "viewing angle" of 45deg. I'de like to get something that would be both brighter and have a higher "viewing angle". Does such a thing exist? If so where?


texts: Determine supply voltage for led from current limiting resistor

texts:
Everyone knows how to calculate the resistance of a current limiting resistor for a LED but is it possible to go the other way? (aka determine the supply voltage from the resistor's value)

I ask this because I am working on re-purposing ink jet printer parts for low cost 3D printers to be built in developing countries. Ink jet printers used to use stepper motors but recently have started using DC motors with optical quadrature encoders. In order to use the e-waste one must find the voltage at which the quadrature encoders are supposed to operate at. While the forward voltage of the LED isn't known, is it possible to determine a ballpark idea of what voltage should be used to power the LED in the quadrature encoder?


texts: MOSFET and clamp on I2C interface lines as level tranlastor

texts:
I'm trying to understand what's going on in this circuit:

I understand the master direction. I2C lines usually are pulled up by default, so when the line is high or idle, the GS voltage < 0.7V, which means the mosfet is off. With it off, the Drain is going to be pulled up thanks to the 5V and clamped.

Master drives low, GS > 4.5V, Mosfet on, Source pulls Drain down. All fine.

What I'm confused about: This is a bidirectional bus. The slave (right hand side) is also capable of pulling the data line low (sometimes the clock too). If the slave pulls what essentially is the drain of the mosfet down while the mosfet is off (since the master side is high) then the pulldown on the slave side won't be seen by the master? Or am I missing something here?

What's the advantage of this over a standard boring level translator IC?


texts: Are there generic generic repeaters for 433 MHz communication (such as for doorbells)?

texts:
I'm having a 433 MHz doorbell which is too far away from the receiver (too many walls in between). Sometimes it works but other times it doesn't.
I thought that there could be a 433 MHz repeater (just as WiFi repeaters) and I found some indeed:

https://www.amazon.com/Wireless-433Mhz-Signal-Amplifier-Repeater/dp/B07JNSHL8Q/
https://www.amazon.com/Wireless-Signal-Repeater-Amplifier-Install/dp/B07VNCFNS9/

However these say that they are built for alarms systems and I'm not able to tell whether they could work as general purpose repeaters? I guess it depends on whether the 433 MHz communication is standardized? Reasons that make be believe so are the there is a Sonoff RF Bridge (https://sonoff.tech/product/smart-home-security/rf-bridge/) which pretends to be a generic 433 MHz RF module.
Am I on the right path? I don't know if anybody has heard about a generic 433 MHz repeater?
UPDATE: Photo of the receiver unit

UPDATE: Photo of the sender unit


texts:
In SAW Filters we have a phenomenon called TTE, Triple Transit Echos. How does this phenomenon render
 inband ripples different than in a Chebyshev filter?

Am I also correct to assume that the amplitude ripples in both of these filters also indicate the necessity of existence of phase distortion? , i.e. it is impossible to have amplitude ripples with zero phase distortion in any of these two filters


texts: Transformer for variable output off-line boost flyback converter

texts:
I've built a flyback regulator that can produce 100-400V from mains, but -- due to limited off-the-shelf transformer options -- I'm pretty sure I'm not using the best transformer for the job (unless I got super lucky).

So, I'm wondering what I'm sacrificing by not using the best transformer. I'd also like to know more about how to choose the right one. (TAoE doesn't say much about this, although I've used its other advice for mains powered power supplies.)

A few more details:

I'm using this transformer because it has a 1:1 turn ratio (all the others I've found have more turns on the secondary), it's designed for 100kHz, and it can handle more current than the regulator.

I'm using this for the regulator. It only uses an optocoupler for feedback. A comparator drives the LED in the optocoupler by comparing the output of the converter (lowered via a voltage divider) to the output of a DAC. That allows me to set the output voltage in the range I mentioned.

I have a schematic, but it's really ugly. I can post it if it'd be useful.

Again, the regulator does work, but I'm wondering what I'm missing by using this transformer (limited output power? risk of spontaneous combustion?), and I'm looking for a general source for design information for flyback converters.


texts:
When I connect a cell with 100 Ω resistor. voltage across circuit is 1.4 V and current is 14 mA. That means total power of cell is 1.41 x 0.014 = around 20 mW. Right?

Now if I connect two cells in series with same 100 Ω resister the volts across are 2.83 V and current is 27.6 mA

If we multiply them we get around 78 mW.

What I don't understand is if one cell has around 20 mW of power how come two cells have 78 mW instead of double of 20 mW = 40 mW maybe?


texts: No-break (IPS) circuit analysis and improvement

texts:
I'm building a simple circuit that resembles a nobreak operation to power portable applications.

The working is simple: When a power supply (10-20V) V1 is connected it charges the 6V lead acid battery and provides power to the load (represented by R5). When power V1 is disconnected, the load gets power from B1.

R1 and R2 sets the output voltage of regulator to about 7.6V. Considering a voltage drop of 0.6V on D1, B1 gets 7V as its charging voltage.

D1 protects the regulator if V1 is disconnected.

Q1, R3 and R4 is a current limiting circuit. Using R4 = 1R gives about 600mA as current limit. When R4 is about 600mA, Q1 starts to conduct, dropping the voltage on the ADJ pin of U1 thereafter droping voltage on output pin of LM317, effectively limiting current flow.

Most of this circuit is based on the LM317 Texas Instuments Datasheet reference circuit (page 11).

Everything works like expected. Output voltage, current limit, the battery gets charged and provides power to the load when V1 is disconnected.

I'd like to add some protection to the circuit but don't know how to do it.

Question 1: How can I add a protection agains polarity reversal of B1?

When I tested this situation I measured a 25mA current flowing through B1, and some of these gets through R1, R2 and some through the ADJ pin of LM. Is there a simple way to now allow current flow in this situation?

Question 2: Do you have any recomendation to improve this circuit (besides replacing D1 to a Schottky type to get a lower voltage drop)?


texts: RS485 isolated circuit - forgot connections. Will this work?

texts:
below is my schematic for isolated RS485 section. FYI B0305XT-1WR2 is used for power isolation and ISO1500DBQ as transceiver.
As you can see I forgot to place GND & GND_RS485 connections at pins 2 & 15 respectively.
As per the TI datasheet's typical application circuit, they are connected to their respective GNDs.
I have checked my PCB also, tracks ended up just like the schematic.
So the question is -

Are the GND1 pins (2,8) & GND2 (9,15) are internally shorted? (I didn't find this info in datasheet) If yes, does my circuit work?

As of now, I've tried sending data from MCU to the transceiver. I cannot see any data on Serial terminal (connected D+,D- to USB-RS485 converter). Any help is appreciated.


texts: I have a HMC5883L and its pins are labeled SDA, SCL, DRDY, VIN, and GND. SO I am following this tutorial and it has a VCC pin but mine doesn't have it so I was wondering if VIN is the same as VCC because VIN looks the closest to VCC.


texts: What is i(t) from circuit with differential equation?

texts:
When t<0
Components in circuit are Jt = 4 A, R1 = R2 = 2 Ω, R3 = 4 Ω ja L = 10 H

At t=0 switch K will be closed and i need to figure out what iL(t) is when t=4

So i tried to figure out iL(t) with  differential equation.
First i combined R1 and R2 to get R12=1Ω
Then i transformed power supply from current to voltage Et=Jt*R12=J*1Ω =J
Then i combined R12 and R3 to get Rz=5Ω
Now i can create equation which is
$$E_t=L*\frac{di(t)}{dt}+R_ti(t)          $$
After adding constant i get
$$J_t=10*\frac{di(t)}{dt}+5i(t)          $$
First i found the roots
$$10r^t+5r=0 -> r=-\frac{1}{2}$$
So for homogeneous part i get $$y^h=C_1*(-\frac{1}{2})^t$$
And for nonhomogeneous part $$J_t=A$$
$$ \frac{dJ_t}{dt}=0 , \frac{d^2J_t}{dt^2}=0$$
So i get
$$  10*0+5=A->A=5  $$
For complete equation i get
$$ y(t)=C_1*(-\frac{1}{2})^t+5  $$
To figure out what is C1 i use t=0
$$ y(0)=C_1*(-\frac{1}{2})^0+5=4 ->C_1=-1  $$
And now for t=4 i get
$$ y(4)=-1*(-\frac{1}{2})^4+5=4.5   $$
I know this answer isn't correct but i don't know what went wrong
Also sorry if its little bit hard to read this, i'm new to this


texts:
Im working on an idea but am having a problem finding even a starting point for research.
The idea is to have images (video) sent over NFC to a NFC connected to FPGA (or something else could do?) and display those images to, let's say PSP TFT.

Any general ideas from where to start researching this ? Im not expecting a complete solution just a nudge in the right direction. Could this be done, what is the minimal (cheapest) board that could do this ? Ive seen PSP screens driven with fpga but they are all $40+ units. Any cheaper options ? Does it even need to be FPGA?

Thank you