texts: What type of problem occurs when paralleing two MOSFETS with the same frequency and Phase?

texts:
While using two transistors in parallel for the high current ratings. What type of problem does occur and what are the possible remedies?
Does placing inductor in source of both transistors is also a remedy? If yes then why?


texts: What's the best way to protect a board from corrosion in a hot/moist environment?

texts:
Some of my projects need to live outside for long periods.  Sometimes, moisture gets into the enclosures.  That means that a circuit board might be sitting around in contact with water for hours on end at upwards of 100F.

I've noticed that solder joints can start to corrode, and recently moisture made it under the solder mask on a board and actually ate through one of the traces, breaking the circuit.  I know the ideal answer is to make a perfectly sealed enclosure, but I'd like to toughen the boards up a bit as a second level of defense.

Can anyone suggest some tips and tricks for making PCBs more corrosion resistant?  Does scrubbing off excess flux help?  What about spray acrylic sealant?  Special solder?


texts:
I  have 3 buttons connected to  PIN1, PIN3, PIN5  of PORTA  of an XMEGA. If pushed they deliver a falling edge.
I'm try to generate interrupt using those buttons, I started with one, here is what I have done:

void buttonINT(){
    // PORTA
    PORTA.PIN1CTRL = PORT_OPC_PULLUP_gc | PORT_ISC_FALLING_gc;
    PORTA.INT0MASK = PIN1_bm;
    PORTA.INTCTRL = PORT_INT0LVL0_bm;
    PMIC.CTRL = PMIC_LOLVLEN_bm;
    sei();
    }
ISR(PORTA_INT0_vect){
    printf(" INTERRUPT \n");
}

in the main I call buttonINT() once , but I get the message  all time printed?

Any idea what I'm doing wrong here?


texts: Is it safe to use surge protector with 12vDC mobile power inverter?

texts: Is it safe to use a surge protector which is plugged into a 12VDC mobile power inverter? Or will it damage the surge protector (or the inverter)?


texts:
I have a question that in motor driving application, by using power MOSFET, it must be in saturation region, is this right?
And for IGBT, in which region it must be to act as a switching device?


texts:
I'm an electrical/electronic technician, I'm good with analog electrical stuff & electronics, but when it comes to microcontrollers, programming & uA, stuff start to sound Chinese to me (no offence to anyone here).

I've been wanting to get into the whole microcontrollers world for a while now, but every time I make a decision on which board to pick, I read about other "better" or newer ones, or ones with higher capabilities.

Right now I've limited my options to mbed or the Teensy 3, both being 32 Bit ARM-based boards, yet with different development environments.

I've read several article on this website & others suggesting that one should start with an Arduino Uno, but I don't want to start with that, since I don't live in a place where it's easy or cheap for me to get a new board, I need something that's gonna take me a while to outgrow, if I ever do since it's only a hobby.

Any suggestions? Do you think I should also look at AVR32 boards or other boards instead?


texts: Input / output behaviour of dynamic latch

texts:
I'm studying this dynamic latch and I wonder why, when the switch closes the second time, in doesn't go up to high as well.
When I consider only the switch and out, then everything makes sense. At least, when I ignore the inverse function of the latch..
However, in short: How do in and out behave, respectively, why, when the switch is closed the second time?


texts:
I'm attempting to create an electrostatic painting process for small plastic parts. The material is ABS and is about 4 inches by 6 inches by 1 inch high. I'm somewhat familiar with electrostatic painting of metal objects, but I am dismissive, perhaps uneducatedly so, of the necessity of the objects to be metallic.

To help the matter, I will be using a painting system that allows the paint droplets to be extremely small -- an airbrush.

I'm hypothesizing that I can connect the negative side of a high-voltage low-current source to the tip of the airbrush, through which the paint flows, while I connect the positive side of the high-voltage source to the plastic part to be painted and mist the paint over the highly-contoured part as it is attracted to the surface.

Will this work?


texts:
I'm about to create surface mountable module with at least 65 castellated mounting holes but I am wondering about few things:

Is there a minimum size for a castellated hole?
Is there a minimum spacing between two castellated holes?
Is it possible to make a PCB with castellated holes on all sides?

Is anyone familiar with this type of PCB?


texts:
I'd like to decode some IR signals from a TV remote control. I scavenged a 3 pin IR receiver from some old junk and hooked it up.

From what I've read about RC-5, I was expecting to see a start bit indicating the bit time, which I could synchronize to. But, I'm seeing lots of transitions per bit time.

Is this a sign that I'm mixing 38kHz and 56kHz devices? Or am I expecting the wrong thing?

Edit:

I was concerned that the weirdness I was seeing was the IR receiver being odd. So, I wired up a plain old 2 pin IR LED receiver to compare (bottom trace). With the LED, I see the 32kHz carrier wave and the modulated signal, the "smart" receiver filters out the carrier perfectly leaving just the pulse widths.

Ladyada tutorial explained it all.


texts: Why is the sign of diffusion current densities as given below?

texts:
The diffusion current density due to diffusion of electrons is given by:
Jn=(e)(Dn)(dn/dx)
The diffusion current density due to diffusion of holes is given by:
Jp=-(e)(Dp)(dp/dx)

I understand that for a semiconductor, Electron diffusion current density and hole diffusion current density are opposite to each other.So they will have the opposite sign. But why is electron diffusion current positive and hole diffusion current negative?(despite the fact that electron charge is -ve and hole charge is +ve)


texts: Why do OOK transmissions have bandwidth?

texts: With on-off keying, you have a single carrier wave at a constant frequency transmitting its presence or absence. Now I understand that the crystal will not be perfect so you will have some minimal shift over time in the carrier frequency, but assuming the crystal was perfect you would have zero bandwidth because the frequency doesn't change. But datasheets say that the bandwidth is linked to the data rate somehow, what is that equation and what is using up all that extra spectrum if you don't change the frequency?


texts:
I am making a nixie clock and wanting to use 2 neon lamps in parallel for each colon. However in my test circuit I can only get one to strike at a time.

The supply voltage is 170Vdc in order to power the nixies elsewhere in the circuit. The two x 10k resistors acting as a voltage divider should provide 85V for each lamp, and the 4K7 resistors should limit the current to an appropriate level once the lamp reach their maintaining voltage (measured at around 72V). However whenever I power up this circuit only one will strike - usually the first though if I disconnect that the other will light up.

What am I doing wrong?


texts: How can I build a versatile high voltage translator with an output in the negative and positive range?

texts:
Looking for advice on how to build an adjustable voltage translator. Input is standard 1V8 logic, but output HIGH is in a selectable range of +3 to -3V, while output LOW is way down in a selectable range of -15 to -21V.

Cannot find any any off-the-shelf solutions to this. Input frequency range on order of 100k square, output needs to drive upwards of 100pF. Opamps are likely to be unstable at this voltage and cap load. Ideas on types of circuits that can be used here?

EDIT

Output side IO levels are supplies that can be set on-the-fly during operation, so the level translator needs output compliance in the shown ranges. They don't track, they are individually setable. Fast enough slew needed to reliably operate at 100k given the output swing.


texts: What chip to convert 0-5V from sensor to pwm 0-100%

texts:
I need your recommendation guys.
Requirements:

static frequency of about 0.1-1Mhz,
input: voltage of 0-5V,
output: PWM with duty ratio of 0-100%, standalone chip - no
additional active
components required (internal clock etc)
low cost preferably

I was looking in some shops but couldn't find anything. What I could find were A/D chips without regular output instead it had special interface I2C or other. Also I found U/f converters but I want static frequency with variable duty cycle.

Thanks.


texts: Impact of Transformer Ratio to Performance of Transformer

texts:
Based on my initial calculation, the primary inductance of my transformer will be around Lp = 351uH. This 351uH is designed with switching frequency of 55kHz for AC-DC flyback converter (DCM). By using LT SPICE, I will get result as below:

Primary inductance, Lp = 351uH
Switching frequency, fsw = 55kHz
Primary peak current, Ipri pk = 2.30A
Primary RMS current, Ipri rms = 0.91A
Secondary peak current, Isec pk = 8.58A
Secondary RMS current, Isec rms = 3.42A

From the initial Lp, I calculate minimum number of primary turns using below equation:

From above, I will get Np = ~ 24 turns (assume Bmax = 0.3T, Ae = 0.000120)

From Np = 24 turns, I calculate the secondary winding using below equation (assume Vout = 24V, Vdiode = 1V, Vr = 90V)

From that, I will get Nsec = ~ 7 turns

Therefore Npri = 24 turns, Nsec = 7 turns.

Then suddenly I found this document AN-4193 Design Guideline for Flyback Travel Adapter using FAN602 and it stated that:

Based on that document, I checked Np for both during (a) primary peak & (b) during transient/fault condition. By that I will get different number of turns with the same turns ratio as below:

By using equation 14, Np will be ~ 24 turns, Ns will be ~ 7 turns, Nsp=0.2916
By using equation 15, Np will be ~ 30 turns, Ns will be ~ 9 turns, Nsp=0.3000

Remark

For equation 15, I'm using Bmax = 0.41T & IDS LIM = 4.09A (IDS LIM is based on current limit setting 0.9V/0.22 = 4.09A)
My transformer has an air gap ~ 0.247mm

My question:

As you can see above, both transformer A & B will have same turn ratio with different number of turns between primary & secondary. Will this impact the transformer performance? (ex. saturation level, peak current)?
As you can see, my secondary peak current is 8.58A & secondary RMS current is 3.42A. Will this secondary RMS current 3.42A is able to go up until 8.58A without saturation? If not, what parameter should I improve?
If this power supply is suddenly loaded with 3.7A for short duration, can this transformer handle it without saturation (same question as #2)
Can problem #2 & #3 be improve by changing topology from normal flyback DCM (fixed frequency) to quasi-resonant flyback (frequency change based on output load)?

Thanks.


texts: Latching switch to single pulse circuit? (monostable multivibrator with 555?)

texts:
I am looking at using a latching switch (SPDT) to momentarily connect two pins. This is for a power button for a raspberry pi, so to power the machine from a hold state you have to momentarily short pins 5 and 6. Then to power the machine down I will switch it back to the other switch state and send a signal to a GPIO executing a shutdown script. I have done some research and found that the monostable multivibrator with 555 (one shot switch) might do the trick but a lot of the literature shows the trigger as a negative pulse? I will be latching the switch to 5v but only require a momentary switch, I was considering using an xor and flip flop but it seems like a lot of hassle.

Can anyone recommend another way or help me to understand if the monostable multivibrator will work for the application?


texts: Understanding equation for the quality factor of an RLC circuit?

texts:
In my textbook for a course on Circuit Analysis I came across an equation for the quality-factor of an RLC circuit. However, I don't quite understand their reasoning. The explanation that follows is a summary of what they provide me with:

The quality factor can be defined using the impedance of either the inductor or the capacitor:

$$Q = \frac{X_{C}}{R} = \frac{X_{L}}{R}$$

Multiplying by \$I\$ on the top and bottom of the equation gives the corresponding voltage across the associated component. Therefore, \$Q\$ may also be defined as:

$$Q = \frac{V_{C}}{V_{R}} = \frac{V_{L}}{V_{R}}$$

Since at response \$V_{R}\$ is equal to the supply voltage, it follows that:

$$ Q = \frac{V_{L}}{V} = \frac{V_{C}}{V}$$

Finally, combining this last equation with that of the angular velocity at resonance:

$$ \omega_{0} = \frac{1}{\sqrt{LC}}$$

gives the following expression for a series RLC circuit:

$$ Q = \frac{1}{R} \cdot \sqrt{\frac{L}{C}} $$

My attempt to derive their equation was to substitute the definition of the angular velocity at resonance (because they said they used it to derive the last equation) with the first equation as follows:

$$Q = \frac{X_{C}}{R} = \frac{1}{R} \cdot \frac{X_{C}}{1} = \frac{1}{R} \cdot \frac{(\frac{1}{j\omega C})}{1} = \frac{1}{R} \cdot \frac{1}{j\omega C} = \frac{1}{R} \cdot \frac{1}{jC(\frac{1}{\sqrt{LC}})} = \frac{1}{R} \cdot \frac{\sqrt{LC}}{jC} $$

However I haven't been able to get rid of the imaginary component, and I don't see how they made the steps to the final equation they derived. Could anyone perhaps explain how this was derived?


texts: How to convert this into a down counter?

texts:
I have been learning counters and am able to design an asynchronous UP counter with JK flip flops in Multisim, however I am unable to convert it to an asynchronous DOWN counter.

My UP counter counts properly 0-1-2-3-0-1-2-3, however my DOWN counter counts 0-2-1-3-0-2-1-3.
I want it to count 3-2-1-0-3-2-1-0.
How should I fix my DOWN counter?

My UP counter

My DOWN counter


texts: Logic level conversion between ESP32 and house alarm control panel

texts:
I am trying to connect to my home alarm panel via it's built in serial port. It is made by Paradox and there is a GitHub project that I want to use to integrate the alarm into a smart home setup such as OpenHab or HomeAssistant.
Some things I've learnt/discovered:

The alarm panel's serial port uses 5V TTL for it's serial interface
The serial port's power and GND is connected to the panel's AUX rail, which is at 12V.
The ESP can survive 12V input, but the onboard regulator gets very hot.
The ESP needs 3.3V for it's serial ports.

The ESP32 I'm using is a NodeMCU32-S clone (link to the actual supplier I used).
My initial solution
From the same supplier as above, I got an LM2596 voltage regulator breakout board, and a logic level converter that I plan to use to take care of all the level and voltage conversions.
My Problem
My power source is the 12v rail from the alarm panel - I would like the whole thing to be self contained. I need to convert this 12v to 5v for the serial on the alarm panel's side, and I need a 3.3v source for the ESP32 side of things.
My question

Can I use the LM2596 to bring down the 12v to 5V and then power both the HV side of the level converter, and the ESP32 with it?
Can I then use the ESP32's onboard regulator to further bring that 5V down to 3.3V, that I can then use on the LV input of the level converter?

I'm asking before I do anything because the alarm panel is expensive and important for my home security. I don't want to do something that might destroy it.
My electronics fu is extremely limited, and I learn as I go along.
Proposed circuit
See below my suggested circuit for this idea:

Your assistance and expertise will be greatly appreciated!


texts:
[edited]

I'm DC analysing a cascode configuration of BJT and my teacher do the KVL of the circuit like the Black arrow in the picture. But I don't understand why the KVL straight from the node to the ground, I've thought that KVL must apply to the loop only or is there anything I didn't understand here?

picture 1 is problem and 2 is how my teacher solve the DC analysis of this cascode series of BJT

picture 1 is problem and 2 is how my teacher solve the DC analysis of this cascode series of BJT


texts: How to conceptualize electric loading in a motor

texts:
I'm struggling to understand the concept of "electric loading" or "current density" in a real motor.

Soong explains how a sheet of conductors in a magnetic field generate force on that sheet which I've illustrated in Fig 1. You can re-arrange terms and define an "electric loading" factor (J in my illustration, A in Soong's paper) which has units Amps/Length. This is very clear to me.

If you wrap the the sheet as a tube, you can model the torque generated by a motor. This time, the force has a moment-arm of the radius (D/2), and the field/wire are interacting along the lateral surface area of the tube, as illustrated in Fig 2. In this case, electric loading would be defined as J = total conductor current / circumference [Amps/Length]. Also very clear.

I don't understand how electric loading contributes to torque if you arrange the conductors around slots like in a real motor as illustrated top-down in Fig. 3. Then, it seems like only the conductors at edge of the slot are contributing to torque production. Therefore, the conductors inside are useless which I know is not true. How do you define electric loading in this arrangement?

Since each slot's conductors are all contributing to generate one slot's magnetic field, do you visualize all a slot's conductors as acting at the circumference and compute the current density as:

  J = number of loops/slot * number of slots * current in each loop /
  circumference [Amps/length]

???

Fig 1: Force on wire

Fig 2: Torque on motor

Fig 3: Motor cross-section


texts:
I was hoping someone with experience with these types of 555 timer circuits would look this over and just see if I made any basic fundamental mistakes.

I did a ton of research and believe I used all of the appropriate calculations and looked closely at all of the relevant data sheets.

I used this equation to determine timing of the 555 in a monostable configuration: Time Out Delay (secs) = 1.1 * R1 * C1, and came up with around 620 seconds (t in seconds = 12000000 * .000047).

I mainly wanted to verify that I am understanding the operation of the trigger and reset circuits properly.

The basic desired operation is such (Reed switch will open when the magnet is removed (tail gate opened).):

-When either the push button or reed switch is opened (trigger voltage goes low) the relay will supply power to the cargo lights for approximately 10 minutes.

-If I want the light to come on again while the gate and reed switch are open I just press the button and I will get another approximately ten minutes of light.

-I can also press the button with the gate and switch closed and get approximately ten minutes of light.

-Any time the gate and reed switch are closed with the light on, it will turn off. [EDIT - the more I think about it the more I do not believe this to be true. I'm thinking the light will stay on for ten  minutes after the tailgate and reed switch are opened whether you close them or not? But, perhaps a quick push of the button after closing the gate and reed switch would shut the light off by resetting the timer? Or perhaps I would need to add a second (ON) push button between the reset pin and ground to manually turn the light off?]

I hope I made the desired operation clear enough!

I recently received some very useful help from some members on another project and am waiting for the parts to come in the mail to prototype that and wanted to get started on designing my next one.

(BTW - All components are named using manufacturer part numbers if anyone needs to look at a data sheet)

Thanks!

simulate this circuit – Schematic created using CircuitLab

(I did try to perform a search, assuming this is not an uncommon circuit type, but found nothing. Perhaps I am just not yet familiar enough with navigating this site?)

(I also had a hard time choosing appropriate tags, my apologies if I made an error there as well.)

EDITED FOR RESPONSE:
I made the changes I believe you were recommending. My concern now is that there will be constant draw from the power source and steady heat generation from current flowing through the resistor to ground. Am I incorrect?

simulate this circuit

UGGHHH...
The more I look at it the more I think I may have to use two push buttons. I really wanted to only have one, but I can't figure out how to use a single momentary to toggle the state of the timer. I was misunderstanding the operation of the reset pin on the 555. I initially thought that driving the reset pin low would drive the output back high if it was low, after doing more research it appears that I was wrong. If I am understanding it properly now, all the reset pin does is to drive the output low if it is currently high. If my current understanding is correct, all I can think of is to have two push buttons; a black one in series with the reed to turn the light on manually and a red one on the reset to shut the light off manually before the timer has run it's course. I also added some protection diodes that my research lead me to believe were needed when driving an inductive load such as a relay coil with a 555IC. Am I on the right track now? Is there some way I'm not seeing to toggle the sate of the circuit manually with a single push button and still have the automatic operation via the reed switch? I'm not seeing any way to have the circuit automatically shut off when the reed switch closes before the timer has run it's course either. But, that's not such a big deal if I have a manual off button. It would be nice, but not needed...
Anyway, here is the new circuit:

simulate this circuit


texts: What is the mechanism for capacitor explosion?

texts: Capacitors (electrolytics, specifically) explode if you put reverse voltage or excessive voltage to them. How does this happen? Aren't electrolytics just two metal films with a seperator and doused in some electrolyte? What is the mechanism behind this explosion?


texts: Is the speed of electrical signals always constant within a CPU?

texts:
Microprocessors rely on assumptions about how long it takes for electrical signals to propagate through combinational logic circuits. As far as I understand from reading "Modern processor design", correct functioning seems to require that the signals neither take too long nor too short to arrive at their destination. I know that electrical signals travel roughly at the speed of light.

This made me wonder: is the signal time within a cpu constant? Or does it depend on e.g. the temperature of the cpu or some other variable? It seems to me that this would introduce necessary complications in the design.


texts: Im building a DMX controller that uses RJ45. (Controller as in lights are connected to it) I will obviously have 2 RJ45 jacks for daisy-chaining. What I was wondering is, I've seen that multiple universes can be carried over RJ45. Should I connect the unused pins of the 2 jacks together so if there is a second universe on the cables it will be passed on to the next controller, or should I just let those extra pins floating? Thanks!


texts: Can anti-static tweezers replace wrist straps?

texts: I need to solder ESD-sensitive components. Can I get rid of my ESD wrist strap if my tweezers are anti-static?


texts:
Essentially, what I need to do is vary the output voltage of a battery between say 2V - 5V. This is to mimic the voltage output properties of a solar panel under different sunlight intensities.

The battery being used is a solar charger power bank;
http://www.amazon.co.uk/MAOZUA-15000mAh-Charger-Portable-Flashlight/dp/B011R3Q0AC

So far I have tried to use a potentiometer to do this, but the resulting output went up in smoke. The measured resistance of the circuit that will be driven by the battery is 1.3kOhms.

Is there a better way of varying the batteries voltage manually? Or the most ideal solution would be to have the output voltage slowly cycle between 2V and 5V automatically. Is this feasible?


texts: What is the effect of a varying Vcc on the output pin of an IC?

texts: I'm designing a circuit with this transceiver. But I was wondering what the effect would be of an voltage source without a bypass capacitor, so with a possible varying Vcc. Would this affect the voltage at the output pin?


texts:
I am trying to use timer1 interrupt on PIC18F26K83. I use Micro C as compiler. So I set my timer for 30 ms and after that 30 ms, it is supposed to enter an interrupt and light the LED. But it never lights up the LED (never enters the interrupt/interrupt never occurs). The code is:

#define led LATA.RA2
void Clk_8Mhz(){
    //8 MHz clock
    //  OSCCON1 REGISTER
    NOSC2_BIT=1;
    NOSC1_BIT=1;
    NOSC0_BIT=0;//HF INTERNAL OSC
    //OSCFRQ REGISTER HFINTOSC FREQ. SELECTION
    OSCCON1 =0b01100000; //HFINTOSC, Divider =1;
    FRQ3_BIT=0;
    FRQ2_BIT=0;
    FRQ1_BIT=1;
    FRQ0_BIT=1;    // 0011 :8MHz     //0100 = 16 Mhz
}

//Timer1
//Prescaler 1:1; TMR1 Preload = 5536; Actual Interrupt Time : 30 ms

void InitTimer1(){
    T1CON      = 0x01;
    TMR1IF_bit = 0;
    TMR1H      = 0x15;
    TMR1L      = 0xA0;
    TMR1IE_bit = 1;
    INTCON     = 0xC0;
}

void main (){
    TRISA.B2=0;
    led=0;
    clk_8Mhz();
    InitTimer1();
    while(1){
        delay_ms(10);
    }
}

void Interrupt(){
    if (TMR1IF_bit){
        TMR1IF_bit = 0;
        TMR1H      = 0x15;
        TMR1L      = 0xA0;
        led        = 1;
    }
}

What could be the cause of this interrupt never occurring?


texts: esp8266 throwing random symbols when powered and not responding to AT commands

texts:
I am trying to use ESP8266(ESP01) by interfacing it with Arduino using USB power.
I followed the given tutorial.

When I disconnect and reconnect ESP with Arduino it throws random symbols on the serial monitor and after doesn't responds to the AT commands. When I again disconnect and reconnect again some random symbols are thrown on the serial monitor.

I tried different baud rates but the result is same. I also noticed that at some baud rates it is not giving the random symbols. Also, my ESP doesn't have an updated firmware and I am using AMS1117 power module to step down 5V and using it as an input for ESP.

Any suggestions for this problem?


texts:
A technician said: Its better to use a solid cables for homes (not stranded cables).

I did not use any calculations but I think that stranded cables are better due to skin effect. We use 220V / 50Hz.

Is 50Hz too low frequency so that we can consider it as DC and "skin effect" has a very small effect at that frequency?

Is there any factors other than "skin effect" so that he recommends solid cables?

I'm speaking about cable that have 10 mm sq at most. And length is less than 20 m.

Thank you,


texts:
I'm trying to use the LT3048-5 to get a steady 5V output from a battery that outputs 4.2->3.0V

I connected together the following setup from the datasheet:

But what I'm getting when I input 4.2V is ~3.7V (Normally 0.5V less than the input for typical input voltages). The LDOOUT value and the BSTOUT have the same value with this input voltage, however, if I turn up the voltage to ~6V I actually get a regulated 5V output (~6V BSTOUT).

I'm confused, shouldn't I be seeing ~6.1V at the BSTOUT pin boosted from a proper input voltage and then a steady 5V at the LDOOUT pin?

And there's a part of the datasheet which seems strange to me (http://cds.linear.com/docs/en/datasheet/3048fa.pdf):
under Electrical Characteristics, BSTOUT-VIN Regulation Voltage: there is a condition that LDOUT < VIN
That seems contradictory to the idea of a boosting regulator to me


texts: What type of motor is this? (photo included)

texts: I want to make this motor work, but I can't understand what type this is. I supplied 5V DC to the terminals, but it just kept buzzing and the coils were energized. It also had some kind of circuit, but it was not connected to any of the terminals. What do you guys think?


texts:
I have a 50-ohm source which is the output from a photodetector, and I'm using a digitizer card which has 50-ohm inputs, reducing the signal voltage by a factor of 2.

The information I care about is encoded in the voltage amplitude. So, does this voltage reduction affect the final SNR negatively?

And if it does indeed affect the SNR negatively, what can I do to obtain maximal voltage transfer? Should I use a voltage follower?


texts: SMPS Transformer - Secondary voltage rating

texts:
I am designing isolated flyback converter with input voltage range 40VDC-110VDC, 5V/6A output. I am struggling with finding appropriate transformer since each and every one I found have lower primary voltage rating or lower secondary current rating.

My taught was to connect the transformers in series in order do get higher input range, but then my output voltage doubles accordingly.

If using i.e. http://katalog.we-online.de/pbs/datasheet/750311797.pdf could I get 5V output using regulation loop?

Thank you! :)


texts: Value of resistance used to calculate the MOSFET transductance

texts:
What value of resistance is used to calculate the MOSFET transductance in the formula below? $$A_v=\dfrac{v_o}{v_i} = -g_m R$$

This is the circuit in question.

I am confused on which resistance to use (R1, R2, RD). Some help would be appreciated. Thanks.


texts:
In "WAGO" PLC datasheet of Analogue and digital  I/O's modules  what does the following measns :

1- Isolation: 500 V system/supply for analogue i/o module

2- Isolation: 500 V system/field for digital i/o module

And how can i know the type of isolation (channel to channel or channel to earth )


texts: Resistance calculation with specific load

texts:
I saw this and it is completely different from my question
Resistance calculation

My question is below.
I know that Ohms law is E=IR
but I don't know how to use this in a real circuit.

if I have 12 volt battery 24 amps capacity of battery.
and I want to start a device which required 0.5 amps and 5 volts.
how will i calculate the resistance to reduce the voltage.
why amps are necessary here as I know that resistance reduce voltage so it should be
required Voltage = E/R
so why we always need amps calculation and how will we calculate it in this case?


texts: Converting Eurorack's -5/5 V to Raspberry Pi's 0/3.3 V

texts:
I would like to convert the voltages from my Eurorack Modular Synthesizer to the voltages accepted at the GPIO pins of a Raspberry Pi 3 Model B Computer and vice-versa.

Unfortunately I have no clue about electronics, yet i  know that the Eurorack-system works with voltages from -5 to 5V and the GPIO pins accept 0 to 3.3V.

The Raspberry Pi runs on 5V DC (1A), in case this is or relevance.

I'd be gracious for any help.


texts: Limit current through Force Sensing Resistor

texts:
I am using an ICL7660 chip to provide a negative reference supply to an inverting op-amp set up for a Force Sensing Resistor (FSR).

The minimum resistance of the FSR is about 1kohm, this means that for an output voltage of 5V from the ICL7660, the maximum current through the FSR will be 5mA. However, according to the specs the maximum current permitted is 1mA/cm^2. For the FSR I am using, this means the maximum current permitted should be 246microA. How should I go about limiting the current? Thanks.


texts: Question on the relation between Transformer's primary and secondary coil current

texts:
Suppose I have a 12-0-12 1Amp step down transformer. The primary coil is connected to 220V AC. How is the current flow in primary coil impacted in following 3 scenarios:

When no load connected to secondary
When 250mA is drawn from secondary
When 500mA is drawn from secondary.

If the primary coil's current flow remains unchanged regardless of the amount of current drawn from  secondary, which form of energy does the primary coil's current gets converter on no secondary load condition?

And if the current flow in primary varies, which principle of physics basically drives the factor - how much current should flow in the primary coil, for a given amount of load on secondary coil?


texts: What should I do to unused input parts/features (analog and digital input pins, and power pins) of a video scaler chip?

texts:
I am working on a video scaler chip which has multiple inputs (i.e HDMI, DP, VGA) but I only want to use the VGA input. (Choosing another chip with only one input is not an option).

The friendly datasheet did not mention any instruction on what to do with unused pins, so I tried searching the internet and the forums, below are the items I got. (If I got them right)

Digital pins - tie to Vdd/Gnd with pull-up or pulldown
Analog pins - tie to DC potential

And based on my search, the configuration (where to pull) for the lowest power consumption will vary per IC.

I was about to just pull down the DP and HDMI receiver pins (analog) to mimic a DP/HDMI port that is not connected to any source (standby). But then I realized there are these receiver VDD and VSS pins that I do not know what to do. DP, HDMI (as well as VGA) each have their own VDD and VSS pins (e.g. DP_VSS, DP_VDD). The datasheet mentions in the pin list tables that XX_VSS* 'must' be connected to ground, XX_VDD 'must' be bypassed with cap to ground. (XX - DP/HDMI/VGA) I assumed the 'must' is mentioned in the datasheet so that the DP or HDMI receiver would work. (But I will not use them)

I was thinking, since they apparently have independent VDD and VSS for each receiver type (DP,HDMI,VGA), each receiver pin type is powered by independent XX_VSS and XX_VDD. So, If I leave the power pins of an unused feature floating, no power will be given to receiver pins of that feature, and that feature will be totally shutoff, hence, I might not need to pullup/pulldown the pins. Note though that the chip itself has its core and ring VDD and VSS.

If I will not use DP and/or HDMI, is it safe to leave their power pins floating? And if I would leave their power pins floating, is it safe to leave the analog receiver pins floating as well?

Or should I connect the power pins and then pulldown(or up) the analog input pins?

Which configuration would have the lowest power consumption (in general)?

I tried contacting the website for this chip, but they can't give technical support anymore because this is already a legacy chip. I am working on an STDP60XX.

(P.S. I am new to the stackexchange, if I've missed some rules, please let me know and I'll edit my question immediately. Thanks)


texts: How can 50MHz noise impact WIFI sensitivity?

texts:
From the Murata website (http://www.murata.com/en-us/products/emc/emifil/casestudy/solution/wlan,) it mentions "it is the higher harmonic waves of the CLK signal (50 MHz) transmitted to the Wi-Fi module that creates the problem."

How can 50MHz harmonics affect 2.4GHz?

They are very far apart.


texts:
I'm at the stage where I'm moving a project off of a breadboard and on to proto board but I'm unsure if I should tie all of the grounds together. Is there any reason I shouldn't?

It's basically 3 modules (3.3V GPS, 5V-3.3V level shifter with two grounds and a 5V SD data logger) run by a Arduino Nano and powered by a 9V battery. Can all of the grounds be on the same rail as the 9V minus terminal?


texts: Will four wires work for crystal radio coil?

texts:
I'm attempting to build a crystal radio,

and I have an old telphone cable with four copper wires, similar to the one pictured.

I would like to use it to build the coil for the set, and I was wondering if it would be possible to use all four wires rather than stripping the entire thing to get one.


texts:
I have 70VDC 30mA source
I need to control optoisolators to generate 70V AC signal
I can use TLP222g-2 dual isolators. to build the h bridge
I have a single PWM channel from my MCU.
Is it possible to use inverting logic CMOS (CMOS NOT) ic to inverter PWM signal and apply to the isolator control inputs which should be switched of as in h bridge configuration?
which inverting CMOS ic would be perfect for this?
Jasen is what you said?


texts:
The voltage mode have several advantages, and I am confused 1.) and 2.)
1.)A large-amplitude ramp waveform provides good noise margin for a stable modulation process.
2.)A low-impedance power output provides better cross-regulation for multiple output supplies.
The peak current mode have some disadvantage, and I am confused 3.)
3.)With the control loop forcing a current drive,load regulation is worse and coupled inductors are required to get acceptable cross-regulation with multiple outputs.
I don't know what is this, can someone tell me in detail


texts: When is the Length of this std_logic_vector defined?

texts:
I can't understand how does this code compile, since MySignal is not initialized with a length:

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity MyModule is
  port(Clock: in std_logic; MySignal: in std_logic_vector);
end MyModule;
architecture MyArch of MyModule is
begin
  MyProc: process (Clock)
    subtype MySubtype is natural range (MySignal'Length) downto 0;
    variable MyVar: std_logic_vector(MySubtype);
    begin
      if Clock'Event and Clock='1'  then
        MyVar := MySignal;
      elsif Clock'Event and Clock='0' then
        MyVar := MySignal + MySignal;
      end if;
  end process;
end;

The circuit is a simplified example, my concern is that Length is being used without having a std_logic_vector(this_number downto this_number) declaration.


texts:
I tried to program specific STM ultra-low power series (STM32L011D4-tssop14).
JLink programmer doesn't support this type of STM32 MCUs.
so I tried to program this MCU by STLINK-V2 (SW mode). to do this I am doing the following works:

1- connect all wire which needed for this task (GND-VCC-SWDIO-SWCLK)

2- select "option for target..." in Keil
3- going to debug tab and select "ST-link debugger"

4- going to setting => as I know in "SW Device" section I should see the device information but I have an error " NO target Connected ".

that's weird for me when I connect RST pin of MCU to ground "SW Device" section showed device information.
in this way, if I push F8 (Load in Keil) error appears "Core is held in reset"

it's reasonable when I force MCU to reset ( connect RST pin to GND) the program process shouldn't work ( "Core is held in reset" ) but if I don't do that programmer cant connect to the micro ("NO target Connected")

I don't know how should I Program this MCU...


texts: How to prevent inrush current for a 14 Kw motor controller powered by DC source ~50-60v.


texts: how does bi-directional differential signalling work?

texts:
I've always thought that differential signalling was a single-sender, single-receiver, one direction architecture.

However, I've come across an SDRAM chip where DQS strobes are differential and bidirectional:

How exactly does this work? Particularly line arbitration - is a high-z state used to determine if the line is free? what about the active low line? Is line arbitration even possible? On second thought, I don't even think it's possible to do arbitration on the lines, there would need to be some kind of decided-beforehand timing so that arbitration isn't necessary?

How does termination work? I'm inclined to think the same resistors on both ends won't work? And neither will no resistors? Does the resistance on either end have to be switched in or out dynamically depending on who is driving?

EDIT: Extra questions/clarifications:

How prevalent is this kind of interface?  Is it specific to SDRAM (or this specific chip?) or does it occur regularly in other scenarios? I'm particularly looking for some kind of hardware interface standard, if one exists, rather than trying to extract the interface info from my sdram datasheet (unless of course this is device/manufacturer specific).


texts: Buck converter with op-amp, inductor issues when load changes

texts:
I'm looking at the designs for a simple buck converter which has the P mosfet, inductor, capacitor and reverse based diode. Instead of PWM, I'm trying out to use an op-amp to switch the P mosfet but one thing that I notice is that if the load changes from low resistance to high resistance then the inductor spikes the voltage on the load to double what it is until it can re-stablise. (This is all in simulation)

Is this happening because I'm using the op-amp? How does using PWM affect the inductor in such a way that if the load would change from say 10 ohms to 100 ohms that the inductor won't spike the voltage? Perhaps PWM / fast switching keeps the inductor with such a low charge that when the load changes, the inductor doesn't have nearly enough voltage to do anything?

Cheers.


texts: Is there a downside of using PCB printed USB connector?

texts:
Typical USB Type A receptacle is as shown in this image from Molex  48037-1000, which can be mounted on PCB.

I have seen some products with USB connectors printed directly on the PCB edge like this UMFT201XB:

Is there a downside to using PCB printed USB connectors? Does losing shield affect ESD performance, durability, certification? Does it make difference if I am using this connector in laptop USB port vs DC wall adapter?


texts: Using frequency-compensated resistive divider as digital level-shifter

texts:
We have all seen the "frequency-compensated resistive divider" circuit in, for example, 10X oscilloscope probes:

simulate this circuit – Schematic created using CircuitLab

Has anyone tried such a circuit as a unidirectional digital level-shifter?

I am working on some asynchronous 5-volt legacy memory systems, with the aim of replacing static asynchronous DRAM and SRAM modules with new modules using DDR SDRAM chips. This requires a fast clock for the SDRAM and to synchronize the incoming asynchronous control signals to the fast clock domain. The timing for this kind of system must be very tight. Our designs currently use buffers to level-shift the incoming 5V control signals to 3.3V, where they are input into an FPGA, which synchronizes them to the SDRAM clock domain and issues the proper SDRAM commands to perform the access requested.

I am desiring to shave off another 3 nanoseconds or so from the worst-case timing path by replacing some level-shifting buffers with a resistive divider circuit like I show above, but intentionally overcompensated and with Schottky clamps:

simulate this circuit

Has anyone applied this technique before? What potential "gotchas" exist? I am aware of the various level-shifting FET switches, but I don't feel that they justify their (fairly high) cost if this circuit is workable.


texts:
I'm planning to use an Arduino ADC to sample radio signals from a DirecTV dish before passing them on to my computer. Before I can do that, I'd have to find coaxial connectors that can allow my Arduino (which has analog-in pins) to read this data. (I'm quite aware that the signal itself would require a square-law detector to be read.)

I have a strong suspicion that I wouldn't need a coaxial connector at all; I've contemplated just stripping the coaxial cable altogether. Does the central conductor just carry the voltage of the signal, and would it be okay for regular use if I stripped it?

Thanks in advance!


texts: How do I run an arduino and a dc motor on a single battery pack?

texts:
I have an Arduino and a bunch of components, among which, a dc motor (actually an aquarium pump) and a heater. These are connected via a relay module, so that the Arduino can switch on the motor or the heating element by tripping the relay. The circuit is laid out as follows:

As you can see, a battery pack supplies 6v to the Vin pin of the Arduino and to all the components.

However, the Arduino became unreliable as soon as the motor was switched on. I understand this has something to do with noise the motor introduces to the circuit. Figuring I could isolate both the motor and the heater completely from the rest of the circuit, I added a second battery pack and connected the heater and the motor to it via the relays:

This works! However, now I need two battery packs (and essentially double the batteries) to make this circuit work. How can I make this work using only a single battery pack that powers both the Arduino and all the components, but without the motor introducing "noise" (or rather, whatever the specific problem in that setup is)?

Edit: a diagram showing what I think is the situation where turning on the motor causes the Arduino to behave unexpectedly, followed by a diagram of the situation in which this doesn't happen but the motor requires a second, isolated power source:


texts:
Given the following circuit with \$\beta=80\$, \$V_{BE(on)}=0.7V\$, \$V_A=\infty\$, for an input signal \$V_s=18cos(\omega t) mV\$, I would like to calculate the power dissipated in the transistor.

I began by calculating the thevenin equivalent voltage and resistance in order to solve for the base current as follows:

\$R_{thev} = \frac{R_1 R_2}{R_1+R_2} = \frac{30k\Omega \times 125k\Omega}{30k\Omega + 125k\Omega} = 24.194k\Omega\$

\$V_{thev} = V_{cc} \frac{R_2}{R_1+R_2} = 2.32V\$

The base current can be solved for by writing a KVL equation around the base-emitter loop and substituting \$I_e=(\beta+1)I_b\$:

\$-V_{thev} + R_{thev}I_b + V_{BE(on)} + R_eIe  = 0\$

\$-V_{thev} + R_{thev}I_b + V_{BE(on)} + R_eIb(1+\beta)  = 0\$

and solving for \$I_b\$:

\$I_b = \frac{V_{thev}-V_{BE(on)}}{R_{thev} + (1+\beta)R_e} = 25.1\mu A\$

Then \$I_c = \beta I_b = (80)(2.006 \mu A) = 2.01mA \$

The collector-emitter voltage can be solved for by writing the equation around the collector emitter loop:

\$V_{CE} = V_{cc} - R_c I_c - R_e I_e = 6.973 V\$

The power dissipated in the transistor is given by

\$PQ = I_{CQ}V_{CEQ}-\frac{1}{2}I^2_cR_c\$

And presumably, the power dissipated in the load is given by

\$PL = \frac{1}{2}I^2_cR_L\$

First I will need to solve \$I_c\$

I write te expression as:

\$I_c = \beta(\frac{R_{thev}}{R_{thev} + R_{ib}})(\frac{V_s}{R_{is}})\$

In the expression above \$R_{ib}\$ is the internal resistance of the transistor in the small signal model given by:

\$R_{ib} = r_\pi + (1+\beta)R_e\$ with \$r_\pi = \frac{V_T}{I_b}\$

\$R_{is} = Rs + R_i\$ (in this case no source resistance was indicated so it is just \$R_i\$)

And \$R_i = R_{thev}||R_{ib}\$

Therefore substituting the above expressions into \$I_c\$

\$I_c = \beta(\frac{R_{thev}}{R_{thev} + r_\pi + (1+\beta)R_e })(\frac{V_s}{R_{thev}||R_{ib}})\$

\$ = (80)(\frac{24194}{24194+40513})(\frac{V_s}{15148}) = 1.974\times 10^{-3} V_s\$

From this I calculate the power dissipated in the transistor to be

\$PQ = I_{CQ}V_{CEQ}-\frac{1}{2}I^2_cR_c = (2.01mA)(6.973V) - 0.5(1.974\times 10^{-3} \times 0.018)^2(2000) = 13.98mW\$

However the textbook answer gives \$13.0mW\$ rather. Where am I going wrong?


texts:
Often reference voltages are generated using normal LED/diode, not zener.
A reference from simple resistor divider will not provide any regulation of input voltage, a zener will provide regulation and a cleaner reference... so how does the LED/diode reference work and why is it used instead of those?


texts:
I want to use this battery for my Arduino Uno:

http://www.ebay.com/itm/7-4-V-30C-5200mAH-2S-Lipo-Li-Po-Lipoly-Battery-for-RC-Car-Boat-/261351067166?pt=Radio_Control_Parts_Accessories&hash=item3cd9bcce1e

The on board voltage regulator says L117-S50.
The writings is alomst wiped out, but through a quick internet search, I think this is the one:

https://www.sparkfun.com/products/595

Now, the minimum voltage the arduino operates at is 7V. While the batteries are at 7.4V.
Therefore; after some time of usage, the votage might drop below 7V which might cause issues.

I want to ask is there anyway to overcome this issue without having to buy a higher voltage battery.

Is there a certain module or electronics device that can boost up the voltage to a certain range.


texts:
I'm doing a project, where I have to decode an mp3 audio stream which I receive from a web server, with a pic32 over Ethernet. My doubt is:

What if the server sends more data than the pic can handle? I mean, Can I control the amount of packets that the server send me? Because if I there is only one device connected to the web, the server will send all the mp3 song at without wait, and the pic memory will be not enough.

How can I solve this problem?


texts: Solid-state relay realized with bipolar transistor

texts:
I'm searching information about SSR realized with bipolar transistor. Basically I need something like tutorial how they are constructed, how they work, what elements they contain etc... I searched in google but I wasn't very lucky with the results. If anybody give me some source of information I will be very grateful.
Note: With bipolar transistor not with MOS transistor.

My background:
Familiar with Electrical technique(not sure about the name things like Om law, kirchhoff law etc..)
Familiar with building elements in electronics(transistors, capacitors etc..)
Familiar with analog circuits learning digital circuits at the moment.
Familiar with analysing different schematics.


texts:
I need to design a controlling mechanism for heating a nichrome wire of  15 cm (to be specific 36 gauge NiCr wire ).

These are the following constraints

1)The Power source is 5volts from USB in PC.

2)The temperature range of nichrome wire should be between 30 to 60  deg Celcius.

Once the wire heats up to this temperature the power supply should be reduced and if temperature reduces it should heat up and maintain the prescribed temperature.

So i decided to use a basic rapid prototyping board - Arduino to control the supply to the wire via PWM output.

Since the current output from the GPIO pins of Arduino is in few mA ,i should use a driver circuit for heating the wire .

So here are my doubts

1) How to calculate the amount of current required to heat up the NiCr wire to 30 deg C with 5V usb supply.

2) Am thinking to use a mosfet to supply to the wire ,such that i will connect the pwm output directly form aurdino to gate of the mosfet .Is that feasible for these specifications ? Or i should use any other driver IC's

3)To control the pwm output ,i need to measure the current temperature of the NiCr wire and feed it into the ADC of arduino ,and based on the feedback i have to control the pwm output to the driver.

4) To measure the current temperature of NiCr wire ,i cannot use any temperature sensors or thermostats .I have to measure the resistance across the wire and relate it to the temperature.Here am struck with !

How to relate or create a lookup table to determine the temperature of NiCr wire based on the resistance of the wire.


texts:
In an AC supply which is not earth grounded, I see a small amount of current flowing to ground from both wires of the supply (live wire has higher) even though the circuit is incomplete.

It is due to capacitive coupling? Can anyone explain it?

And why do I get more current from the live wire to ground than the neutral to ground even though neither are grounded?

Here is a photo for context.


texts:
I have SRD-05VDC-SL-C relay that I got for my ATMEGA and I noticed that it says on the relay:

   10A 250V/AC 10A 125VAC
   10A 30VDC   10A  20/DC

Then I was reading this article and found this line:

  Output:
  Connect a load, DC 30V/10A，AC 250V/10A

This is where I get lost, as far as I understood these are maximum ratings, but what does the relay output AC 220V or DV 30V?

Basically I want to power 9A 20V DC LED panel. In order to do this I still will need AC to DC converter and transform the 220v to 20v, correct? Thanks!


texts: tube amplifier build power supply design

texts:
Hello Im just starting to work with valves but have a question on the power supply side. The question is the amplifier I am building needs 300 VDC. As I understand voltage after bridge rectifiers across the smoothing capacitor increases.
The transformer I have is 660 volts AC center tapped 120 milliamps.

The amp requires a single ended power supply. The multi meter shows 330 volts AC no load. but where I bought the transformer it says 290 volts ac and it could power the tubes Iam using. But the real question is will that voltage come down under load on the AC side and the DC side.

Im not sure if 330 ac is to much for the tubes. So what I was wondering if I needed something as low as 250 Volts AC. Then that would go up after rectifier and capacitor.

The bottom line is what ac voltage do I need to convert to dc 300 v. Is it the same or is the ac part lower ?

Also what would be the best way to wire the center taped output to get the most current out of the transformer because I only need one x 300 volts supply.
The diodes I am using for rectification are 1n4007.

Im confused with this RMS and peak power. I know peak is higher and do the caps need to be at the peak voltage. The caps are rated at 450 volts The tubes Iam using are 6v6s and there will be 2 of those to make a stereo amp. There is also 2 x 6j5s which are driver tubes. A total of 4 valves will be used. The SE output transformer is 5000 ohms so Iam not sure if there is enough current. Would a larger capacitor and choke compensate the current demand at peak power?

sorry if this is long but any help would be much apreciated.

Thanks


texts: Constant current source with bypass option

texts:
I need a current limiter for a project that I am working on. I understand that I can use a device like the LM317 in constant current mode, but how would I add a bypass circuit so that my microcontroller can decide whether or not to limit the current to 250mA? The circuit needs to run with supplies ranging from 10-24V.
Along the same lines, is there a better option than the LM317 for generating a constant current source?


texts:
First off, I am really confused whether this question should be on this site or stack overflow. Please go easy if this is not the good choice.
I am going through the tutorial to make a simple HID device with the help of Arduino through a tutorial on inscrutable. The maker creates a 8 byte buffer. Then he stores the key-code for (a,s,w,d) into the second byte of the keyboard buffer. Out of curiosity, I started searching what is stored in the remaining bytes. I still have not found what I am exactly searching for. Any links for this would be helpful.
I found this video on youtube where it is mentioned that the first byte is used as modifier byte, 2nd byte is reserved and remaining 6 bytes are used for key presses. 6 bytes = 48 bits and there are 2^48 possible combinations. And I have less that 200 keys in my laptop keyboard. What is the point behind this? I am missing something here but what exactly?
Thank you!!!


texts: What is the maximum possible current that can mains supply can deliver?

texts:
This question has been bugging me for a while. I know that theoretically its like - infinity to + infinity and it depends on the load that is connected to the mains supply plus the load at which the fuse/circuit breaker can handle max.

Lets take an example.Assume that I bypass the power meter and everything and directly connect to the pole utility. Will my current ability increase as I connect a bigger cable to draw more and more current? What will be the max current is possible to be drawn?Is it limited by the max current capability of the utility transformer?

Also what could be the max current at the source of generation of electricity(lets take an example of the generator at nuclear power plant, its not infinite anyway as it could handle only a particular amount of current )?Thanks in advance everyone. Cheers :)


texts: Light Barrier Sensor - clocked or non-clocked light?

texts:
I was looking for a sensor, then I caught this:

https://www.di-soric.com/pt/OGU-031-P3K-TSSL-44413.html

In the specs - emitted light section, it says the emitted light is "Red, Clocked", with a switching frequency of 4000 Hz. What I understand from this is the emitted light (and the output) is on and off 4000 times per second.

What kind of an advantage can it have against a continuous light? It definitely would have a simpler circuit (no clock source required).


texts:
We have developed a prototype of a PID-regulated Buck converter made around the AVR XMega. 6-17V at the input, 5-10 on the output, 15A current limit, 500kHz PWM switching. The issue is, how to make the overcurrent protection work.

First we have tried using the ZXCT1107 accompanied with a 1mR sense resistor and a 10k at the output, making the output voltage \$V_{Out} = 0.04*I\$ according to datasheet's \$4mA/V\$ value of transconductance. An RC network was also created on the differential input, as the datasheet says. The output would then be fed into the on-chip Analog Comparator.

This turned out not to work at all when the converter was in operation. The RMS of the output signal would stay at zero. So I though, 'yeah the AVR's leaking too much current!'. Wrong, disconnecting the XMega didn't help. When we tried bypassing all the switching circuits and forcing nice and sweet DC through the sense resistor, it worked a treat. Exactly what I suspected. The switching caused couple of Volts high transients to be induced all around the device, making it inoperable. Increasing the RC constant at the input didn't help.

Second option was not to measure the output current, but rather predict it. This was not my idea, but I adopted it since it would solve the problem while eliminating several components. It relies on the fact that the Duty Cycle increases as the output current goes up. This is true, but the following plot proved that it is only viable when Vout/Vin ratio is high enough. Not the way to go. (5V output; 7V-red, 12V, 17V-yellow input)

The last option, being probably the most expensive, would hopefully solve our issues. A dedicated differential amplifier across the sensing resistor. But since I am not an analog guy, I turn to you.

Is it even possible to make a differential amp work with such small voltages, like 15mV or less?
Is there any chance that it will ignore our beloved transients, while only passing the low-end frequencies?
Is using a regular opamp a bad solution because - as I heard - normal opamps have high input offset voltages?

Thanks everyone in advance, any answers will be welcome.


texts: Switching A Li-Ion Battery with a Mosfet

texts:
I'm having a hard time grasping the concept of using a mosfet as a relay.
I don't have a schematic yet because I can't figure out what the circuit needs to be.

Here's what I'm trying to do:

I have (3) 18650 Li-Ion Batteries and (1) TP4056 charging module. I need the batteries to be connected in series when they're actively powering the load. Then I need to disconnect the load from the batteries and charge them via the TP4056 which they need to be in parallel for. Or I can use 3 individual chargers for each individual battery. Would the Mosfet go between each battery and the TP4056?

Any help, ideas or suggestions would be appreciated!


texts: In depletion MOSFETs, what is the drain current value when \$V_{GS}\$ is zero?

texts:
When \$V_{GS}\$ is very negative \$I_D=0\$, whereas it conducts a little current when \$V_{GS}\$ is a little negative.

What is the value of \$I_D\$ when \$V_{GS}=0\$?


texts: How does the voltage at the R4(1) point become 3.78V?

texts:
How to calculate the voltage between R4 & R3? I got that due to the two 10k resistors there's a voltage divider happening which causes the point between R1 & R2 to be at 2.5V. But then doesn't the voltage across the two 100k resistors become: (Assuming that the source is 5V)
5-2.5 = 2.5V ?
And then the voltage between R4 & R3 become:
1.25V
according to voltage divider equation?
What am I getting wrong here?


texts: Some questions regarding input stage of audio signals to the pre-amplifier

texts:
I'm very new to audio circuits but for the sake of curiosity I want to simulate an approximate version of a circuit of an audio input along with a smartphone pre-amp stage in LTspice. I will have five short questions here since they are all related. But before I want to explain where I am at the moment.

I read some articles and questions including this site and found the following nice pre-amplifier:

Regarding the above topology and from some readings if I'm not wrong I came to the following conclusions:

-The audio port is AC coupled(DC will get blocked and one cannot directly measure DC voltage) and bandwidth is set for the frequency range of a human ear 20Hz to 20kHz.

-The audio signals are in mV levels. If one will apply voltage signal to the mic input it is better to use a diode to limit the input signal to the audio port.

-To use with a single supply the signal is level shifted by a constant bias voltage. In the above schematic R1 and R2 sets that bias, so the audio voltage oscillates/vibrates around that reference DC voltage.

Now after these basic information and following the above pre-amp topology, I want to draw an approximate circuit for a smartphone preamplifier.

Smartphones have TRRS jack. Normally I guess when plugged in, the smartphone's electret microphone's positive end is connected to the mic input of the TRRS jack and the other end is connected to the ground. So when one speaks the electret mic's mechanical movement creates some mV level audio vibrations around the bias DC point of the opamp.

Question:

So imagine the following are given:

-The input impedance of the mic input of the smartphone is 1k.

-The DC blocking capacitor is set for a cut off freq.: 20Hz.

This is my attempt to model an approximate pre-amp:

This time instead of a elect mic a mV level signal is applied direct to the mic input. Imagine the output impedance of the signal generator is zero.

1-) In this case I removed R5 of the previous circuit. I dont know what is the purpose of that(?).

2-) If the input impedance is given as 1k, does that mean R2=1k or like in my circuit R1//R2 = 1k? And how would the output impedance of signal generator or the circuit of the input signal would effect this? Im asking because if the input impedance of the mic input is 1k, what should be the output impedance of the signal input?

3-) How could be the blocking capacitor selected. R1//R2 = 1k and I found for an fc at 5Hz the C1=10u. Is that correct? How would you size it?

4-) The output to the ADC is still swinging from positive to negative. But isn't it still problem for a single supply system? How will ADC take care of negative voltages?

5-) Some smartphone applications show the dB level of the mic audio input. How do they calculate that in relation to the input mV level voltage signal. Lets say the input is 10mV peak to peak. How is that converted to dB in audio engineering? Whats the reference?

Edit:
Regarding the second question:

Imagine I have a 1V amplitude i.e. 2V pk-pk 500Hz sinusoidal signal. And my aim is to replicate/scale it as a 500Hz 20mV pk-pk i.e. 10mV sinusoidal audio signal and send upon the bias point input of the pre-amp.

So if I was naive I would think I need a 99k 1k voltage divider as follows:

And when plugged in it would look like this:

But as I figured out following the answers, now the input impedance will be:

(R3//R4)+(R1//R2) = 2k instead of 1k.

What is the new input impedance here?

So I will now have 10mV pk-pk instead of 20mV pk-pk right?

*This wouldn't affect things if I only send binary input to the mic.
But if it were any signal wouldn't this affect the filter's cut off freq. besides the attenuation?
Does that mean the output impedance of the audio signal generator should be zero. Should one use a buffer for that?


texts:
I'd like to wake up my AVR whenever any button on the keypad is pressed. I am using Keypad.h library and simple 4x4 keypad made of buttons connected straight to AVR digital pins. Keypad itself works perfect.

One question is: Why are there pull-ups connected to rows/cols in some schemes? When it works without them...

For waking AVR up I found that simple attaching 4-input AND to kepyad columns would solve the problem. Before sleep, AVR should set all columns to OUTPUT (HIGH) and then attach interrupt on INPUT INT1 (pin 1) when LOW.
So AND inputs are all HIGH till any button is pressed, then it sets LOW on AND output, so INT1 is triggered.
But then I saw Keypad.h library source:

 void Keypad::scanKeys() {
 // Re-intialize the row pins. Allows sharing these pins with other hardware.
for (byte r=0; r<sizeKpd.rows; r++) {
    pin_mode(rowPins[r],INPUT_PULLUP);
}

// bitMap stores ALL the keys that are being pressed.
for (byte c=0; c<sizeKpd.columns; c++) {
    pin_mode(columnPins[c],OUTPUT);
    pin_write(columnPins[c], LOW);  // Begin column pulse output.
    for (byte r=0; r<sizeKpd.rows; r++) {
        bitWrite(bitMap[r], c, !pin_read(rowPins[r]));  // keypress is active low so invert to high.
    }
    // Set pin to high impedance input. Effectively ends column pulse.
    pin_write(columnPins[c],HIGH);
    pin_mode(columnPins[c],INPUT);
}}

I don't get why are columns set as INPUTS at the end? Could this be skipped?
If so, I'll change it to OUTPUT and connect all columns to 74HCT21 inputs and attach output to INT1 pin.

Are there any additional parts needed to connect the 74HCT21? Or it can be connected straight to the 3.3 V regulated power source like this?

Thank you very much!


texts: Why do battery/power supply supply voltages drop under a load?

texts: Why is it when you connect a battery to a heavy load does the voltage coming out of the supply drop?


texts:
I have a decoder circuit that includes TW9900 video decoder. The decoder doesn't work properly. There is a matching and AC coupling circuit on analog inputs of the decoder. To finding the problem, i scoped the analog signals on PCB. Why i see a negative offset signal at the input of coupling capacitor? Does it normal? Is there any problem that anybody can see?

Yellow one shows input of AC coupling capacitor.
Blue one shows output of AC coupling capacitor.

Note: Input of coupling also means of output of the camera.

EDIT1
Zoomed figure of decoder input(after AC coupling)

Camera output directly, not connected to PCB


texts: Adding a second Y axis to an LTSpice plot

texts: I am new to using LTSpice and am coming over from using Cadence.  In Cadence you can add a second Y axis.  Plot-> Add Y Axis is the probe pane in Cadence.  Is there a way to do this in LTSpice?


texts: Can't get WS2812B LED strip working with PC power supply

texts:
I am an absolute beginner in both electronics and LEDs.
I would like to power my WS2812B LED strip (5m, 300 LEDs) with an old PC power supply.
The power supply has 600W so more than enough power.
To trick the power supply into thinking it is connected to a mother board, I cutt the green wire from the 20 pin connector and connected it with a black wire.
After that I cut a red and a black wire and measured the voltage using a multimeter.
I got 5V so everything works as expected.
But if I connect it to the LED strip nothing happens. I expected some kind of reaction from the LEDs.
What I am missing here?


texts: Can the equivalent impedance be solved without Delta to Wye transformation?


texts:
Can I know the sensitivity of a power frequency measurement unit?
I can not find it in the specifications sheet.
I do have, though, the accuracy of the unit (10 mHz)
Thanks in advance!!

Update : I am going to reformulate the question ,
I have a requirement in a project I am working on of a certain sensitivity in a frequency meter. I am trying to reach some providers but in none of their datasheet the sensitivity is explicitly mentioned.  On the other hand, accuracy is.
My question then is ? Having an accuracy of 10 mHz implies to have a sensitivity of at least 10 mHz?
Thanks again :)


texts: Controlling 3V3 relay from 2V8 (VL53L1X) GPIO output with PNP transistor

texts:
I need high side switch for 3V relay (exactly RM40-3021-85-1003 with 45ohm coil -> need ~65mA). I have multiple VL53L1X (ST's ToF distance sensor, 2V8 logic levels) connected with theirs OC GPIO outputs ("INT") to one common wire. Normally the common wire high (2V8) all the time, but when any of the sensors trigger (something comes closer than distance limit) - the common wire logic level goes from 2V8 down to 0V (VL53L1X open collector outputs are active low, so, this is why I can't use low side switch).
Is it possible to solve this by only one PNP? (+resistor+flyback) And not using aditional NPN as suggested in question here...
The GPIO output of the sensor has level 2V8 (as sensor is powered by 2V8 LDO on PCB, can't be changed to 3V3 in this situation). But the 3V relay (emitor of PNP) is powered by 3V3 source (no 2V8, nor 5V supply possible). Its only 0,5V difference, is it secure to do it simply like this circuit:

or by adding a diode to base to prevent "highside switch fail"?
Please can you also give me exact values of all parts (resistors, PNP number, diode 1N4148?) as I need something very reliable for many years of lifetime and yet simple (I thought the more parts the more to fail during time), as I'm good in ESP and PIC (SW+HW), but not that good in bipolar transistor simulation...
(The result device must be very secure to stop moving parts before a human may be hurt. It's HW backup solution if the SW stop fails.)
Thanks.


texts: Xilinx ZYNQ/ARTIX7 Invert Clock without inducing skew

texts:
For HDL design I'm currently developing for a zynq SoC, I need to invert a clock signal because of a swapped differential pair on board level.

Using "NOT" to invert adds a LUT in the path and as such introduces skew of at least 500ps between the inverted one and the original one (which is also put on an other differential output. And this is too much in our case.

Is there a way to invert a clock signal so that the skew between the original and the inverted copy is minimal?

I have found a possible solution using the ODDR primitive but this seems more like a workaround than a solution.

Thanks in advance.


texts: Which are the correct pins for this footprint?

texts:
I'm creating a footprint for M140T01-AE0507A micro switch. The datasheet does not mention which symbol pins correspond to the device pins. I guess pin 1 is COM, but I don't know what the other two represent.

Can someone help me out?


texts: I want to simulate my PV system of 750 watts with 2* 100Ah batteries. My load is a pedestal fan and a refrigerator. I am confused as to how I can model a pedestal fan and refrigerator on Proteus/ Multisim/Simulink. As far as I have searched, I can represent fan by an AC motor, but are there any specifications I can use? I searched a lot about the fridge. Still clueless about that.  Need guidance.


texts: Applying load when testing battery voltage

texts:
Why do we need to apply a load to a battery, when testing its voltage?

I've been testing battery capacity so far using a multimeter and just connecting the probes to the positive and negative side of the battery, which seems not to be correct.

But, why is this? Why do we need to test batteries with a load and why can't we just simply check voltage with no load?


texts: Why is there a sudden change in current between \$t=0^{-}\$ and \$t=0^{+}\$ when an active inductor is connected in series with a relaxed inductor?

texts:
For the above question I drew the corresponding Laplace transform diagram, as follows (didn't draw the switch since it basically open circuit after \$t=0\$):

simulate this circuit – Schematic created using CircuitLab

For the inductor on the upper right, note that I plugged in the value of \$i(0^{-})\$ that is, \$3A\$, as that was the current that was flowing through it when the switch was closed for a long time (as \$\frac{12 V}{4\Omega}=3A\$).

The loop equation thus turns out to be:

$$\frac{12}{s}-4I(s)-2sI(s)+6-sI(s)-4I(s)=0$$
$$\implies I(s)=\frac{12+6s}{8s+3s^2}$$

Which on Inverse Laplace transform gives me the actual loop current in time domain as \$i(t)=\frac{3}{2}+\frac{1}{2}e^{-8t/3}\$.

Clearly, \$i(0^{+}) = \lim_{t\to 0^{+}}i(t)=\frac{3}{2}+\frac{1}{2}=2\$. Thus, \$i(0^{+})\$ is quite different from \$i(0^{-})\$, which is \$3\$ (in amperes).

Why is there a sudden jump in current between \$t=0^{-}\$ and \$t=0^{+}\$ ?


texts: What do the arrows in transistor symbols point to (and from)?

texts:
Transistor symbols are often drawn with arrows pointing in one direction or the other, depending on type, like in the following symbols:

But what is the arrow actually pointing at? And from where are they pointing? Is it the same principle behind it in each symbol and if so, why do they sometimes point FROM the transistor and sometimes TO it?
And why do the arrows point from different origins (sometimes base, emitter, gate, source etc) in different types?
Is there any general principle behind how the arrows are directed?


texts: How does the call stack operated during an interrupt on AVR?

texts:
(Specific to the Arduino Uno...)

What happens to the stack when an interrupt occurs on an AVR microcontroller and I call a function? Does the compiler inline the code? Does it cache the stack somewhere and then reset the stack pointer? Does it have a secondary stack for interrupts only?

As I understand, the vector for the interrupt is a direct GOTO command in assembly. Also, I don't think that the microcontroller would automatically mess with the stack, so it's probably left alone. However, that still doesn't explain how functions work during an ISR.


texts: Plausable deniablity / steganography in radio transmission

texts:
Normally in a wartime scenario etc. strict radio silence is observed to prevent the enemy from evesdropping on your transmissions.

Encryption solves a part of the problem. Now the enemy cannot decipher your messages but can still know that you are transmitting.

I am wondering is there a way (say) by using a already noisy or crowded channel to transmit without any lay observer not being able to tell that you are transmitting unless he happens to know some secret about the way you are transmitting (e.g. timing info, hopping info etc.)

In essence something like Steganography but over a radio channel. e.g. Something like what TrueCrypt etc. can do on a hard drive's hidden partition. Except the person who knows the data exists there everyone would think on examination that the underlying bits are random.


texts: Understanding a power source's internal resistance?

texts:
I have a mechanical system that requires a certain amount of electrical power. Now, when I calculated everything I did not include the internal resistance.

For example:

I calculated that the mechanical system will  require exactly 100W of electrical power. Do I have to add more power to account for the losses due to the internal resistance of the power source?

I understand there are forms of resistance, of the circuit, of the mechanical system itself but what about the internal resistance? And it's affect on the power conversion?

If my system requires for example, 10A @ 10V, would I need to supply more power due to the internal resistance, a friend of mine pointed out that a lot of power is lost due to the internal resistance, and honestly I'm confused as to how.


texts: Can anyone help to give any clues about identifying this part? It is from a Chinese guitar pedal and appears to be at the beginning of the input chain, so I would suspect perhaps some kind of op amp, but might be wrong. None of the markings seem to match any prefixes in the SMT codebook, etc. but I just wondered if it might happen to mean anything to someone with more experience.


texts: What's correct way to toggle a single bit and a whole register in microchip C programming?

texts:
I'm trying to write a code where when a push button is pressed, a whole PORT is toggled.
So I got a push button at PORT E in pin 0, and 8 leds on PORTD, I also got a debugging led on PORT E pin 1.
void main() {

     // Interrupt flags, enable global and external interrupt
     INTCON = 0x90;
     TRISE.F0 = 1;
     TRISE.F1 = 0;
     TRISD= 0x00;

     do {
        if (PORTE.F0 == 1) {
           Delay_ms(100);
           if (PORTE.F0 == 1) {
              LATD ^= 1;
              Delay_ms(1000);
             }
          }
          PORTE.F1 ^= 1;
          Delay_ms(1000);
     } while(1);

}

The problem is that neither thing happens, on push button press is not toggling port D and pin 1 on PORT E isn't blinking as it should.
Just in case I got a 18F4550 microcontroller with 20 Mhz oscillator, coding in C with mikroC IDE's compiler, I let the IDE set up all configuration bits. What have I got wrong?
Simple test.
void main() {
  TRISD=0;
  LATD = 0xFF;
  while(1){
    LATD=~LATD;
    Delay_ms(1000)
  }
}

this makes the leds blink each second.
Update.
I changed the LATD toggling statement to LATD ^= 0xFF; as one answer suggests. But this made it not working. So I'm thinking that definitely the issue about the button push detection statements.
This is how setup bits are set:


texts:
What is this component marked with DB3? It is from an inductor from a tube light.

I don't think it is a diode, as it has no bands.

What is this?

Note: Picture is from internet. I have an almost identical ballast to this one, and it has the DB3 in that location.


texts: Can I build a camera that is sensitive at 2.4GHz?

texts: I want to build a camera obscura as an art project that produces photos of WiFi signals. The idea for now is to build a 125cm x 125cm x 125cm Faraday cage (using fine copper mesh) with a centered hole (diameter of 12.5cm) and 20 x 20 disc shaped copper plates as sensors at the back. Would this work at all? Would diffraction at the hole completely destroy the picture? Are there any conceivable alternative approaches? Thanks.


texts: Will the ADC work with resistive inputs in LPC1796

texts:
I'm working with LPC1796 and I have to do data acquisition for my project somebody told me that LPC1796 microcontroller won't work with resistive inputs.

What is a resistive input?

Is there any way to work with the same microcontroller on resistive inputs?


texts:
I am powering raspberry Pi using GPIO no 2, 4, and GND as recommended. The Pi only shows RED constantly ON led and does not boot. However, if I connect the USB power source it boots up. The power supply designed is strict 5V and max 3A.
Furthermore, once the Pi is all booted up and the USB is removed it keeps working fine and even reboots perfectly. Only when I remove the battery and connect again it does not turn on as if it was shut down.
Any hints on where to look?


texts: The relationship between power, heat and efficiency

texts:
I've been thinking about this conundrum.

Given we use joules to move a metal block over a surface, we do work.

So imagine a motor, that spins and pulls a string, moving said metal block over one meter toward itself.

We supply it with 1 volt, 1 amp and it needs 5 seconds of time to do the work of pulling the block for 1 meter.

Given volts are J/C and amps are C/s, we can say volts are how much work, certain amount of electrons will do, over time. And volts * amps are work over time or J/s.

So, 1 V × 1 A × 5 s = 5 Ws = 5 J

Now the question is:

How much energy of 5 J was used to move the block, and what amount was spent on heating up the wires?

Am I right to think, that since 99% of resistance is taken by the motor, it leads to firstly meaning 1% of all energy spend goes to heating up the wires, and secondly (imagining a 80% efficiency motor) ~80% of those 5 joules are spend on moving the  block and ~20% of those 5 J are heating up the motor's insides?

In retrospect, we can ponder about how much energy gets spent on friction between the block and it's supporting surface, but I digress.

Your input on this, is greatly appreciated. Thank you.


texts:
I want to create an H-bridge using MOSFETS (IRL620SPBF). I am trying to run a 6V motor which requires max current of 1.2A . The transistors Q111 and Q112 provide level conversion as the 'signal' comes from a Dev board at 3.3V. The DAC signal comes from the Dev board (0 - 3.3V). For prototyping purposes I created an oscillator from 555 timer to act in place of the DAC signal. The frequency ranges from 0 to 1.7KHz. The circuit works but I noticed a few drawbacks. Firstly, the mosfet Q1 gets really hot. These mosfets are rated at 5.2A, 200V which is well within my range. I do not understand why only Q1 gets hot and not Q4. Doesn't the current going through Q1 also goes through Q4 or is there something wrong with the circuit design or is it to do with the switching of the mosfet? I have provided the h-bridge circuit below:

Any comments and suggestions are welcome

EDITED

New development. Just noticed that when the motor is disconnected from the circuit and the power is connected, mosfet Q3 gets hot. Is this magic?

EDIT 18 March 2014 - Discussion

I took out mosfets Q1 and Q3 and directly connected them to 6V and sending PWM signals to FETS Q2 and Q4. I noticed that the fets get a little warm when driven the motor at full load but they do not get hot at all. When I was using the 4 FET h-bridge I noticed that the top fets would get really hot which was due to improper biasing (the fets weren't switching on fully). The new design is a great improvement. Now I am choosing an N-channel mosfet with much lower Rds(on) compared to the one I am using at the moment which will be STB80NF55L-06T4. Hope that would not consume too much power and dissipate heat. Thank you all


texts: PWM strategy for motor with variable load

texts:
I have a Raspberry Pi and PWM motor controller driving a DAGU chassis with tracks. The driven wheels each have their own 8-pole encoder on them, and I count a rising or falling edge as a 'tick'. So there are 22.5 degrees/tick. The motors are geared 48:1.

The tracks and wheels give uneven load to the motor every full rotation. In other words, over the course of a full rotation the motor (or your hand) will find the tracks easier to turn at some points, and harder at others. This is due to the wheels/treads being a bit out of round.

This results in my PWM loop oscillating as well. I'm not sure how to "tune" this out though. First thought is to calculate the error over a longer period of time, but then the motors take forever to get up to speed.

Is there a general strategy for this, or should I just use something like:

if motor is stopped
  use fast PWM rate
otherwise if motor has been moving for a while
  use a slower rate

Apologies if this is the incorrect SE site. I wasn't sure if here or SO would be correct.

Main Loop:

    #define MOTOR_TICK_DELAY    1000000000LL //1000ms
    motorA.target = 1.5;
    motorB.target = 1.5;

    debug("Standby off.\n");
    bcm2835_gpio_set(STBY);

    struct timespec time;
    uint64_t cTime = 0, lTime = 0, refreshTime = 0, lTimeA = 0, lTimeB = 0;
    int timeCount = 0;

    clock_gettime(CLOCK_MONOTONIC_RAW, &time);
    lTime = time.tv_sec * MOTOR_TICK_DELAY + time.tv_nsec;

    while (quit == 0)
    {
        clock_gettime(CLOCK_MONOTONIC_RAW, &time);
        cTime = time.tv_sec * MOTOR_TICK_DELAY + time.tv_nsec;
        refreshTime = cTime - lTime;

        motorUpdate(&motorA, &cTime, &lTimeA);
        motorUpdate(&motorB, &cTime, &lTimeB);

        if (refreshTime > REFRESH_SPEED)
        {//Refresh the ncurses output}
    }

Motor PWM calculation method:

void motorUpdate(struct Motor* motor, uint64_t* cTime, uint64_t* lTime)
{
    if (encoderTick(motor->encoderPin)) ++motor->encoderCount;

    uint64_t dt = (uint64_t)(*cTime) - (uint64_t)(*lTime);

    if (dt > MOTOR_TICK_DELAY)
    {
        //debug("ctime: %llu\n", *cTime);
        //debug("ltime: %llu\n", *lTime);
        //debug("diff: %llu\n", dt);

        //actual speed = tick count / (dt in ???seconds)
        motor->actual = (float)motor->encoderCount / (dt / 100000000LL);
        motor->encoderCount = 0; //TODO need rolling average
        *lTime = *cTime; //reset motor last tick time

        //calculate raw PWM
        motor->lastError = motor->error;
        motor->error = (motor->target - motor->actual);
        motor->dError = motor->error - motor->lastError;
        motor->iError += motor->error;
        motor->pwm = (motor->error * 75 + motor->iError * 120 + motor->dError * 5);
        //motor->pwm = (motor->error * 50 + motor->iError * 100 + motor->dError * 10); //pretty smooth, takes a while
        //motor->pwm = (motor->error * 60 + motor->iError * 120 + motor->dError * 10); //a bit jerky, but doesn't overshoot

        //clamp PWM
        if (motor->pwm > PWM_RANGE) motor->pwm = PWM_RANGE;
        else if (motor->pwm < 0) motor->pwm = 0;

        //set PWM
        bcm2835_pwm_set_data(motor->pwmChannel, motor->pwm);
    }
}

Full code is also available here: https://github.com/nearwood/rpi-drd/blob/master/controller/src/controller.c


texts: I have a Xilinx CPLD design that I'm not using all of the pins in, however, I have reserved some for future use and bonded them out to a microcontroller.  I am defining my pinout in a constraint (UCF) file.  I want to set all the unused and unconnected pins to GND, but I want to set all the unused pins connected to the microcontroller to PULLUP (for fear that the microcontroller accidentally drives one of those pins high, giving a dead short to GND).  I know how to set the default setting of all unused pins to either GND or PULLUP.  I need to know how to set the output termination state of the pins if they differ from the global setting for unused pins (as the do in case of the pins connected to the microcontroller).  I tried adding a line to the constraints file for them, but ISE warns me and then optimizes them out as they are not connected to any logic internally, and (according to the software) not needed.  Is there a way I can set certain unused pins to a specific state that is not the globally prescribed state by using the constraints file?  Another method (I'd prefer the UCF file as that means I don't have to add manufacturer-specific VHDL attributes to my code)?


texts: Electric Power Systems for a qudrocoper base on 30amp Speed Controller and NX-4008-620 - NX-4008-620kv Brushless motor

texts:
I'm in mood to put together my own quadrocopter. Just before I ordered parts wanted to some experts to tell me if configuration if compatible enough. Or maybe you have better suggestions for this motors? Actually i'm not shure about battery. Will it handle this 4 motors?
So I put in my cart:

ZIPPY Flightmax 4000mAh 3S1P 20C

Capacity: 4000mAh
Voltage: 3S1P / 3 Cell / 11.1v
Discharge: 20C Constant / 30C Burst
Weight: 306g (including wire, plug & shrink wrap)
Dimensions: 146x51x22mm
Balance Plug: JST-XH

NX-4008-620kv Brushless Quadcopter Motor

 Kv: 620rpm/v
    Turns: 16T
    Resistance: 0.129Rm
    Idle Current: 0.8A
    Can size: 45mm
    Can Length: 14mm
    Shaft: 3mm (Includes Prop saver mount for GWS style props)
    Suggested ESC: 30A
    Rated Watts: 180W
    Weight: 79g
    Cell count: 3~4S Lipoly

TURNIGY Plush 30amp Speed Controller

Cont Current: 30A
Burst Current: 40A
BEC Mode: Linear
BEC : 5v / 2A
Lipo Cells: 2-4
NiMH : 5-12
Weight: 25g
Size: 45x24x11mm


texts: How to reconnect wire in this solar panel connector (automotive)

texts: I need to reinsert this wire into the connector but I don't see any way to get the old wire out and insert a new wire or fasten it. Is anyone familiar with this connector?


texts:
I'm reading an old military electronics manual and there is a chapter on transformers which has some confusing information.

There is a schematic of a step-up transformer similar to this:

simulate this circuit – Schematic created using CircuitLab

So it's basically just a transformer with an AC voltage on the primary and a load resistor on the secondary.

The text associated with this picture is lengthy but at the end there this paragraph:

(The text is not in English and the translation is mine. Some liberty is taken in translation but it is perfectly accurate)

  "As the secondary side of the transformer (one with the load resistor) has a higher number of turns around the core, this is classified as a step-up transfomer. This means that if we divide the number of turns on the secondary by the number of turn on the primary, we get the ratio of voltages across the windings. Also, to conserve energy, the current in the secondary is stepped down with respect to the current in the primary by the ratio of turns to make the power (product of current and voltage) equal in both sides of the transformer. Therefore, the current on the secondary is easy to calculate as the ratio of the secondary current to the primary current is always the same ratio as the ratio of the number of turns."

This last line in bold is what noticed. Shouldn't it be "the maximum current that the secondary side can output is equal to the ratio of the turns". Surely the real current on the secondary side is dependent on the resistor?

A little thought experiment: I have 5 volts and 1 amp on the primary. This means that the power is 5 watts and so the power on the secondary has 5 watts as maximum value. If the secondary has 10 times more turns, the voltage across the secondary coil (and therefore across the load resistor) is now 50 volts. Now I apply Ohm's law: Divide the voltage (50 volts) by the resistance (1000 ohms) to get 50 / 1000 = 0.05 or 50 milliamps of current flowing across the load. The maximum possible current across the load would be 100 milliamps (the voltage is multiplied by 10, so maximum current is the current on the primary divided by 10 to keep the product of voltage and current the same as it is on the primary side). The calculated 50 milliamps is less than the maximum 100 milliamps to everything is fine.

But the text seems to somehow imply that the transformer forces the maximum amount of current across the load always, regardless of the resistance of the load! Clearly this makes no sense, as then we would have 50 volts and 100 milliamps across the resistor, and this would contradict Ohm's law (dividing 50 volts by 100 milliamps to get the "resistance" gives 500 ohms, which is not the value of the resistor).

The text is associated with the picture that has a resistor on the secondary. But surely the text is written with a transformer in mind that has perhaps a short circuit on the secondary. Is this a mistake by the author or is there something deep that I have misunderstood about transformers?


texts: What's the best power injection method for addressable LED RGB Strips?

texts:
I'm currently working on an outdoor LED Strip lighting project, and as I'm not particularly experienced with electronics, I wanted to confirm whether my current plan/components have any issues that I should be aware of before I purchase the components.
Components
LED Strips
Transformer/Power Supply
WIFI Controller
Diagram (Apologies for how crude it is)

Firstly, I was wondering if the LED Strips linked above would need to be powered on both ends of the 5m strip, or if powering just one end of the strip would be adequate.
Assuming they only need one connection per strip, would running three 2-Core cables from the power supply work (one for the WIFI Controller, & two for each set of two LED Strips, as shown in the diagram), splitting at the points where they connect to the LED Strips, or would I need to run a separate cable for each connection (for a total of five cables)?
Sorry if that's not explained very well, let me know if you need further clarification.


texts:
Does anyone know the formula to calculate the Vgs of a JFET used as a variable resistor?
Say, I have a Vds of 24v and I require a current of 20mA (just arbitrary values) I would need a 1.2k resistance, how would I calculate the Vgs to get that resistance value?


texts: Selecting an inductor based on schematic

texts:
I am trying to integrate a Waveshare e-paper display into my design using their published schematic:

It calls for a 68uH iron core inductor, L1.  After searching DigiKey for 68uH iron/ferrite core inductors, limiting it to active SMD parts, of the most popular sizes 1210/1812, I'm still left with 136 choices.  The datasheet says the max power consumption is 40mW which doesn't screen out any of the inductors.

Can someone help this mechanical engineer understand what the inductor's function in this circuit is and how to further narrow down the list by choosing DC Resistance, Q, frequency, etc.? I've never specified an inductor before...


texts: How does a logic gate behave with an input changing faster than its propagation delay?

texts:
I am attempting to create a simple logic circuit simulator. I am having a hard time figuring out how does a logic gate behave with an input changing faster than its propagation delay.

When attempting to connect a high frequency clock to an invertor logic gate with a 1 second delay in a simulator, the output stayed the same for 1 second and then started following the pattern of the clock.

It seems as if the output was a following function: output(t) = NOT(input(t - delay)). Is this true? If so, why? Also, how would this work with different rise and fall delays?


texts:
I'm a new user of switching regulator.
It's not clear for me to understand how to choose one or another switching regulator
I also try to figure out, what're the parameters in datasheet, which characterize the interference generated by the component and also the maximum of interference, that the component could undergo.
I have to find a switching accept 12V and generate 18V


texts: PIC24 Timer 2/3 Interrupt Flag does not gets set

texts:
I am working with a PIC24FJ1024.

I want to test Timer 2/3 (32 bit timer), by writing a C code, where I toggle a pin (PORTAbits.RA7) every second.

That is part of the code:

while(!IFS0bits.T2IF);
LATAbits.LATA7 = ~LATAbits.LATA7;
IFS0bits.T2IF = 0;

When I compile and download it onto my Development Tool (Explorer 16/32), I don't see my Pin (which is connected to an LED) Toggle.

I debug program, and it turns out that IFS0bits.T2IF doesn't get set, the program just sits on while(!IFS0bits.T2IF)

Can someone explain to me why this happens?

Thank you in advance.

EDIT:
The Code

#include <xc.h>

#pragma config FWDTEN = OFF
#pragma config FNOSC = FRC //8MHz
#pragma config ICS = PGD2

void Timer23_Init (void)
{
    /*
     Initialize T2 & 3
     from FRC
     * 1 second
     * on and off

     */

    T2CONbits.T32 = 1;//32 bit timer

    T2CONbits.TSIDL = 0;//continues through Idle Mode
    T2CONbits.TGATE = 0;//no TGATE Operationss
    T2CONbits.TCS = 0;//internal CLK SRC
    T2CONbits.TECS = 0x00;

    T2CONbits.TCKPS = 3;//1:256
    /*
      PRESCALAR = 256
     * t = 1 sec = 1000 ms = 1,000,000 us
     * Fosc = 8MHz Fosc/2 = 4MHz Tcy = 0.25 us
     *
     * t = N*PRE*Tcy
     * N = t/(PRE*Tcy) = 1,000,000/(256*0.25) = 15,625
     * PR2 = 15625 (0x3D09)
     */

    TMR2 = 0x00000000;
    PR2 = 15625;

    TRISAbits.TRISA7 = 0;//output
    ANSAbits.ANSA7 = 0;//Digital
    LATAbits.LATA7 = 0;

    T2CONbits.TON = 1;
}

int main (void)
{

    Timer23_Init ();

    while(1)
    {
        IFS0bits.T2IF = 0;

        while(!IFS0bits.T2IF);
        LATAbits.LATA7 = ~LATAbits.LATA7;
        IFS0bits.T2IF = 0;
    }

    return 0;
}


texts: How does a multiphase DC chopper circuit work?

texts:
This is a buffer capacitor and multiphase chopping in Traction applications.
The solid black rectangles are inductors, the right rectangle is the R-L load and the solid black triangles are representing the GTO's.

The circuit is supposed to be a multiphase chopper.
I spent an awful amount of time to figure the working of this circuit out, but so far no results.

I even tried to simulate the circuit, but couldn't make it work. Here is my simulation.

P.S I don't have any GTO in my simulation program, and I can't import them, so I used a Darlington of n-channel MOSFET and PNP BJT to mimic the IGBT, or any other gate turn of regulator switch.

Source: Electrical Machines and Drives by Jan Melkebeek.


texts: Is the charging time of a battery relative?

texts:
Can the charging time of a battery depend from one day or another?
I.e.: if I start charging my phone at a certain battery level, while shut down, will it always take the exact amount of time to reach a other certain level or can this change from day to day (and if so: how much?)?
Thanks for the enlightenment :)


texts:
I tried different search keywords combinations, but I couldn’t find a datasheet, nor a hint of what this IC could be. Maybe someone who’s familiar with it could give me a clue.
The IC is on a board that was part of the control panel of a home theater. The options were volume up and down, surround 2.1 or 5.1 and mute. The brand was National Star, as far as I can recall. Thanks in advance.


texts:
I'm trying to understand how the channels for the RFM69W is created, if there is more than one. The manual specify "channelized operation", and I find channel bandwidths and that at 16 tap channel filter is used(3.4.6). There is also values for suppression levels of other channels (2.4.4). What I don't find is a description of how the channels are created out.

That the channels have different bands is what makes most sense to me, but I can't see how I can find the frequency from the channel number. Initially I also thought that the NetworkID(Sync word, 5.5.2) was related to channels, but now I think that is based on the package data. I also can't find anything describing how to change channels. [Update, see below]

Background: I'm using LowPowerLabs RFM69 library with monteinos and are investigating if I can use the RFM69W to intercept packages from my outside thermometer, similar to this.

Edit: Via this post I discovered that the library have a setFrequency method, so that may mean that channels are made manually by specifying center frequency and bandwith.


texts: What to observe if unknown coefficients exist?

texts:
I need to observe the solution of the following differential equation on oscilloscope
\$(\frac{dy}{dt})^2 - 2(\frac{dy}{dt})-3y= 5cos(2t)\$

This circuit is probably equal to the above equation, I double checked.

How do I determine \$C_{1}\$ and \$C_{2}\$ for the below solution?

\$y= y_{h} + y_{p}= C_{1}e^{-t} + C_{2}e^{3t}- \frac{7}{13}cos(2t) - \frac{4}{13}sin(2t)  \$

Normally, \$y(0)\$ and \$y'(0)\$ are given... but this time I don't know what should I observe?

Edit: Sorry for the mess in the topic. I didn't know what the best exponential  values to choose which provide us to observe that this kind of nonhomogeneus second order differential equation is correct.


texts: What's the difference between setting SysTick Interrupt in NVIC and using it as an exception?

texts:
I'm using an STM32F303 MCU and I've noticed that the SysTick can be set up to cause an exception, which seems to mentioned quite often in various User Guides. This way, it will have a priority level higher than regular Interrupts.

On the other hand, it seems to be possible to set up Systick as an interrupt in NVIC as well. It has its own interrupt request number and it seems it can be set to pending state. Because the NVIC interrupts have programable priority levels, we could also set it up this way as well.

I'm not really sure what's the difference between these two approaches using the SysTick.