texts:
I'm thinking about 1Mhz clock signal synchronised to external random pulses (eg. rising edge).

Before pulse event clock can be running or stopped.
After every pulse, it should run in same fixed phase relationship with a pulse to give low jitter relative timings.
Clock will be used to drive multiple ADC conversions. Idea is to have precisely same sampling points relative to pulse with minimal jitter.
Absolute timing values are not important they just need to be same after every new pulse.
Jitter less than 1ns would be nice.
Long term stability (>1 minute) is not very important.

What could be options? Maybe industry standard solution exist? MCU interrupt is not an option, because for example with 100Mhz MCU jitter cannot be less than 10ns and can also be worse for software reasons. And I whould not like to go to Ghz range MCU, MPU or FPGA. That whould be overkill for my application. Can RC oscillator be a choice? I thought about holding capacitor bypassed and releasing it after pulse so RC oscillator can continue from the same known state every time. But I worry, that it will not be accurate enougth, or can it? Is there some IC's that could be worth trying?

Edit: Best reprensentation is an oscilloscope. It triggers and samples waveform. On a good scope, with very low jitter triggering same input will give same picture. I'm doing same, there is trigger and signal (complex non periodic waveform). I want my samples to have as little noise as possible. At this moment I'm doing it with ISR, but MCU clock is not synchronised with trigger source, so I get noise because of jitter when sampling sloping signal. I can average, but then it reduces bandwidth. So I was thinking to do better.

<1ns jitter for 100 samples (clocks) after trigger would be goal.
Clock must run 100 cycles after trigger.
First clock edge can have delay maybe 1 to 3 clocks.
Frequency is not important, as long as it is same after every trigger. Long term drift (minutes) is ok.


texts: Speaker works with lm386 but not transistor

texts:
I'm working on wiring a tweeter. I had success with this when using a lm386. I just connected 9V power supply to pin 6 and inserted a high pass filter at led 5 with the tweeter wired in parallel.

LM386 Data Sheet

However I would like to use a transistor since this seems to be the only working component in the lm386 module.

I attempted a crude schematic below of my breadboard setup.(The tweeter has a 1uf capacitor between its positive and ground led, it's located at C3) I tested the transistor setup with an LED, so I know it's working. So I'm wondering why the tweeter tweets for the lm386 but not my transistor circuit?

simulate this circuit – Schematic created using CircuitLab

EDIT: I'm trying to create a water level detector using the transistor, like the one shown in this schematic.(credit MasterMind) Only mine has a tweeter instead of a a buzzer and doesn't include all the leds.

Here are some images of the tweeter in question. I removed it from an old tv:

8 ohms, 15 W
MAX 25 W
K.TONE

capacitor (1uf)

I got the speaker to emit a high pitched sound in this lm386 configuration.


texts:
I am trying to calculate the fundamental frequency (pitch) from autocorrelation method. Below is the figure of the signal I have.

The autocorrelation that I calculated by the following code in python is given in the picture below:

        N = len(kiri) #here kiri is the input signal shown in the above pic
        nlags=N/2
        r = np.zeros(nlags) #
        m=np.zeros(nlags)
        for lag in range(nlags):
            for nl in range(N - lag):
                r[lag] += kiri[nl] * kiri[nl + lag]

Now what I want to know is that, is the autocorrelation supposed to have zero crossings in all cases of input signals? if yes, then does that mean the abouve autocorrelation result is wrong ?

When I try to use the above autocorrelation results to calculate pitch using Mcleod Pitch Method, the NSDF function does not have zero crossings hence unable to calculate pitch. (link for reference of this method is in the comments)

Is this autocorrelation calculation method correct ? Or since the input signal itself is not exactly a periodic signal, the autocorrelation won't have zero crossings ?

Please help.


texts:
I wanted to build the following project to have a constant backup source when power outage occurs. I only know very basic electronics, but can solder simple things, willing to learn new things.

Hardware requirements:

Fibr Modem 12V, 1.5A
Wifi Router 12V, 2A

Idea:

Use 18650 Li-ion battery
A module to control 12V output
Battery can be charged using solar PV or direct DC 12V

At the moment, I know it can be done, but I am clueless on what else will I need.

Additional Questions:

How many 18650 do I need? considering one battery has 3.2V, multiplied by 4 then result is 12.8V. Is this correct?
Assuming 4 is needed to have 12V, I have two routers, how much more can I add? If I add more, it will be more than 12V right? How to manage it?
If I wanted it to last for 2hours, how many Ah is needed and how many batteries?
Do I need any module or battery-management-system (BMS) to control the 12V constant output?
Both has different Ampere, will this be a problem if I need to power them on one backup power source?
What do I need aside from the PV to power the 18650? I mean, do I need any BMS?

Hope someone can help shed some light.


texts: Designing 4th order Butterworth Multiple feedback bandpass filter

texts:
I'm trying to design a 4th order Butterworth bandpass filter using Multiple feedback topology. The design requirements I am trying to achieve for this filter are;
Q factor = 10, Av = 11, fc = 100kHz , BW = 10kHz.

In the book Op-amps for every one book pdf, I came across two design tables:

The First of the table correspond to my desired filter requirements with Q factor of 10 and filter coefficients values for the parameters a1, b1, α. And filter calculations are given as well.

The Second table shows different 4th order coefficients values for ai,bi,Qi and uses ki.

My questions are;

1) Why the two tables for 4th order Butterworth filter have different coefficients and Q factor values?

2) The coefficient parameters a1, b1, Q, α are the same as ai, bi, Qi, ki respectively?

3) Which is the appropriate table to use? If the second table is better for designing the filter. What are the calculations steps needed in using those coefficient parameters. Since no formulas are given in the book.


texts: MOSFET switching dissipated power calculation

texts:
I have a question regarding the calculation of a switching dissipated power of a MOSFET using only Vdd, Id, Vgs, Vth, Fsw and Qg as parameters.

Please tell me if the calculations are correct and/or the formula used.

$$Pd_{sw} = Vd * Id * 0.5 (tsw_{on} + tsw_{off}) * Fsw$$

where

$$tsw_{on} = Qg / Ig_{on} $$ and $$tsw_{off} = Qg / Ig_{off}  $$

For example, for a IXFK48N50Q transistor, Vdd 400V, Id 10A, Fsw 100kHz and using Rg of 10Ω, I get Ig_on 1.49A and Ig_off 0.51A resulting in tsw_on and tsw_off to be 98ns, respectively 288ns.
This results in a Pd_sw of almost 80W.

I used PSPICE models from manufacturer and the same parameters as above I only get about 30W of total dissipated power, this means included static.

What I am doing wrong?


texts: I have read that noises like thermal noises are due to high temperature causing random agitations in electrons etc.But one student was asking me that whether power is extracted from the DC source etc for generation of noise like thermal noise in circuits. I thought I will pose the question here.Do internal noise like thermal noise in a system extract power from the DC supply?


texts: Automatic Power Input Selection - Home Automation (mini)-Project

texts:
I live in a developing country where electricity is not available 24/7; however, to compensate for the power outage, I have 2 other incoming power lines from third-party generators.

The thing is, these generators aren't always on, and when they are, they're not necessarily simultaneous, however, at almost any given time, at least one of the 3 power lines is on, but I can only use one at a time.

Since I'm paying for all three, yet using only one, I thought it would be more efficient to use all hot lines in a predefined manner.
The existing electrical configuration in my house has 7 circuit breakers, each connected to a certain section of the house, so my plan is to have an Arduino choose the input line of each circuit breaker, thus distributing the loads between all available lines, automatically.

I designed a simple device to allow the Arduino to select the inputs:

Since I couldn't find a DP3T relay, I chose to cascade 2 DPDT relays to achieve the desired result.
V1, V2, and V3 are the power inputs.
IO_1 and IO_2 are digital outputs from the Arduino board (in fact I plan on connecting 2 shift registers in series, since I would need 14 - or more - pins)
Eventually, I would make 7 copies of this module to control each of the circuit breakers.

Depending on the state of IO_1 and IO_2, the Load would be connected to the +ve and -ve terminals of the selected power source.

The design seems viable on paper, however I'm not sure how this would apply in real life.

Are there any obvious flaws in the design that would require immediate modifications?
Are relays the way to go? Or do I need to consider other options to switch between lines?
(The relays would have to stay in the NO or NC positions for hours at a time, until the status of incoming lines changes: for example, if one line is already hot, and another line becomes hot, the Arduino would be programmed to redistribute the loads and power on other sections in the house).
What relay contact ratings should I go for? Most of my breakers are rated at 10A, but I assume those breakers are more robust than the contacts of a relay, so should I go for like 15A DPDT relays?
Follow-up question: Do I have to account for resistive and inductive loads, or is it safe to assume that the existing 10A breaker rating has already accounted for load impedance?

I hope I was clear enough in my inquiry, and I apologize for the lengthy post, but this is my first time designing a module to handle high currents.
I may have more questions regarding the implementation of this module (using a PCB, wires...?), but I guess I'd rather have the previous questions answered first.
Thank you.


texts: I'm having an issue with the lipo battery of a drone. When I normally plug it into the drone it won't power up the drone, but when I connect the battery to the balance charger even when the charger is not plugged into an outlet, the drone gets power. Is it a faulty battery? Faulty connections? Or something else?


texts: In a capacitive circuit the voltage lags current by 90 degrees. In an inductive circuit voltage leads current by 90 degrees. In a resistive circuit voltage and current are in phase. If we have a circuit with an AC voltage source, a capacitor, an inductor and a resistor, at what point does the phase change happen? Is it just at the particular component? If so is there 0 phase difference from one component to the next?


texts: Ground wire appears live despite not being connected on either end

texts:
I have decided to add another plug outlet near an existing blind outlet box. Unfortunately I've found that the existing one doesn't have ground since it's an old building, but that's a problem for another day.

After connecting the new outlet, the wiring was as follows:

socket L---L wire L---L house wiring
socket G---G wire G     no wire
socket N---N wire N---N house wiring

However, using a tester screwdriver, the ground appeared live. Assuming that it's likely the socket that's the issue, I disconnected the socket ground, however the wire still appeared to be live. There was no load connected to that particular socket when testing.

Additionally, disconnecting the wire and using an auto-ranging multimeter between ground and live did not show any connection.

Is it just inductance screwing with me? A bad wire (it's solid core if that changes anything)?

I'm well aware that ground should be there and connected, but at this point I'm just moving an existing device to the other side of the room and it will remain on the same circuit as it's been for years.


texts: Problem stacking accelerometer and SD card shields on Arduino UNO

texts:
I have an ADXL345 accelerometer on a Makershield stacked on top of a Seeed SD card shield. Both of those are stacked on an Arduino UNO R2.

I've got each working individually, but when stacked they share pin 12. The SD Card shield uses 12 for MISO of SPI and the ADXL345 uses it for SDO/Alt address.

I'm new to Arduino and have not stacked shields like this before. I'm not sure what the best course of action is here to get them both working, Ultimately, I want to log the data from the accelerometer to the SD card, but first things first!

I'd be grateful for any help. I've linked the data sheets for the ADXL345 and the SD shield above.


texts: Is there a minimum output current for voltage regulators?

texts: I need both 4.5V and 3.3V for a project, and my idea was to power it using a single battery and a voltage regulator. A regulator I found (MCP1700) has an output current of 200 mA, but I'm only going to pull 3-4 mA. Is that large difference a problem in any way? I couldn't find that information in the data sheet.


texts: LED resistance calculation for combined Series/Parallel Configurations

texts:
My son's fish-lava light LEDs burned out.  Here is the simplified version of the circuit (some components removed for clarity):

I've spent the last few days researching LED circuits. I realize that the circuit is not an ideal configuration and I see the reason it burned out.  Since I'm working with a fixed board, I was looking for a formula to calculate the resistance for the resistor on the left (between the sets of LEDs).

I found a similar question was asked a few months ago but the answer there is "don't do that".  Unfortunately, that's what I'd like to do only because it seems easier to replace a few 30c LEDs and resistors each time it burns out than to create a new board.  In addition, I'd really like to understand the theory even though the practical application isn't desirable.

How does one go about calculating the resistance for a single resistor protecting LEDs in a mixed series/parallel configuration?


texts: STM32F103CB Timer update interrupt not working

texts:
I am trying to setup the timer update interrupt of a stm32f103cb. My setup and interrupt code looks as following:

void TIM2_IRQHandler(void)
{
    GPIOB->BSRR = 1UL << 1; // turn on led, works if function is called manually
    TIM2->SR = ~1;
}

void setup(void)
{
    RCC->APB1ENR |= 1; // enable clock for TIM2

    TIM2->PSC = 71;
    TIM2->ARR = 0xFFFF;

    NVIC->ISER[0] |= TIM2_IRQn; //TIM2_IRQn == 28
    NVIC->IP[7] |= 2 << 4;

    TIM2->SR = 0;
    TIM2->CNT = 0;
    TIM2->DIER = 1; // enable update interrupt

    TIM2->CR1 = 1; // enable timer
}

From my understanding TIM2_IRQHandler should be called, everytime the timer updates, but that does not happen. Some things i know:

The rest of the programm runs fine, the interrupt is just never triggered
The timer is running
The update interrupt flag in TIM2->SR is getting set correctly, everytime the timer updates

Am i forgetting something in the setup or is the error somewhere else ?


texts: Do transistors naturally have resistance on base, collector, and emitter?

texts: I'm using a circuit simulation app called EveryCircuit, and for the npn transistor settings it has forward beta, reverse beta, base resistance, collector resistance, and emitter resistance. I'm a bit confused because I've only heard of alpha gain, beta gain, and voltage drop as parameters of a transistor. I'm assuming that forward and reverse beta are referring to the gain, but I'm not sure why they give settings for the resistance?


texts: What is the concept behind speed change in a constantly loaded DC series motor?

texts:
I have a problem regarding DC motors that I am trying to solve. I think that I might not understand the assumptions that are given. The question given is:

  A DC series motor is connected to a load. The torque varies as the square of the speed. With the diverter circuit open, the motor takes 20 A and runs at 500 rpm. Determine the motor current and speed when the diverter circuit resistance is made equal to the series field resistance. Neglect saturation and the voltage drops across the series field resistance, as well as the armature resistance.

My solution can be seen here: http://imgur.com/zOaHxfo.

I am not sure if I am simply misinterpreting the given assumptions (bolded above) or if they are nonsensical. For instance, if there is no voltage drop, doesn't that mean that there is no current, and no power is being supplied?

Intuitively, it seems to me that increasing the resistance in parallel with the series field resistance should increase the current and speed while decreasing the back (induced) EMF.

EDIT: It seems the correct answer is given by Bruce Abbott. The speed becomes 1000 rpm and the current becomes 160 A.


texts:
I am trying to amplify a 0.4Vpp audio signal to 1Vpp using
 OPA344 however my output is clipping around 0.5 volts even though my supply is 3.3v

Op-amp is in inverting configuration:

blue trace is input, yellow is output.

[UPDATE]
Fixed - However I'm considering putting the voltage divider on the output so changing the gain won't change the bias

Updated the schematic, this puts me at 1Vpp with a 500mv bias:


texts: efficiency calculation of dc-dc converter

texts:
I am designing a flyback converter circuit using the LT8302 flyback converter IC. Now, the efficiency of this chip is approx 85% as shown from the datasheet and the screenshot  -

The value of 85% is an approx. Ofcourse, it depends on the load current and such. Now, this IC has an internal MOSFET for the switching controlling. The Rds of the MOSFET is 80mOhms. Now, when it is said that the efficiency is 85%, I understand it means approx 85% of the input power is able to be transferred to the output.

But, does this also include the power dissipated in the MOSFET as well ? And the power transferred ,does this mean the power transferred to the primary of the transformer or to the secondary ?

Because, the flyback transformer can add/introduce its own inefficiencies, right ?


texts: Changing the LED in a circuit (to change its color)

texts:
I would like to change a LED in a circuit, in order to change its color.
The circuit is this one (LED on the right) :

First, can someone confirm that the "LED part" of the circuit "has a purpose" (I don't know how to say this), like explained in part 3 of this comment.

Then, is it possible to change the LED with one of a different color, without messing up the behavior of the circuit ?
I would like to put a purple one instead of the red one which is connected right now.

My intent was to remove the LED and measure the voltage "at its place", and use the value as the supply voltage to calculate a resistor value. That would lead me to add a resistor+LED in place of the current LED (or maybe just the new LED if the calculous gives me a resistor value of zero ?).

Or is it a bad idea and there is no other solution than to let the current LED in place ?

Thanks a lot to whoever can help me !


texts: What factor limits power supply output power?

texts:
Why is it many DC power supplies (for simpler systems that don't need amazingly clean power, for example) have a very low rates output power, e.g 12V 1A?

What makes a supply consisting of a 20:1 turn ratio transformer, full bridge rectifier and a capacitor not viable? Would that not, in theory, be able to deliver the full 2.4kW of a 240V wall socket (or thereabouts)


texts: Need Help identify ICs in battery protector PCB

texts:
Does anyone recognize these ICs? Manufacturer, model # etc. They are part of a lithium-ion battery protector.
Many thanks for your help

(I added the silkscreen, traces, and edited the pictures so it shows the IC numbers of other components) 3 and 4 appear in the same place but different boards


texts: Is this bit stuffing correct on CAN Bus?

texts:
I'm implementing a CAN Bus receiver in VHDL under 250 kbit/s, and a curious frame turned up. This is finishing the field of CRC, the last under the application of bit stuffing. And I have:

  ...011111000001

I don't know if that final 1-bit is the beginning of the CRC delimitter field or a bit stuffed to will be ignored.

Any ideas?

Thanks!


texts: Oscillocope interleave mode and repetitive mode

texts:
Could someone tell me what interleave mode and repetitive mode are in oscilloscope?

References would be good too.


texts:
How could a frequency be generated using one inductor and no capacitors? The waveform is unimportant. The active component could be transistors, logic gates (including schmitt triggers), or if necessary, op-amps. I would try to hack something together but I wonder if there are any elegant solutions that already exist. I have trawled the net and my books, and not found a thing. Thanks

Edit 1: Circuit 1 below is along the lines of the circuit suggested by Andy aka and Wouter van Ooijen. (Since the 555 timer is basically a schmitt trigger).

Circuit 1 seems like it could work. Assume ideal 5v logic. On power up, assume the schmitt output is 0v, and current flowing through R and L will be zero. The inverter's input will receive 0v. so the output will go high straight away. Then, as current starts flowing through L1 and R1, out of the schmitt's (high) output, the inverter's input will slowly rise. So far so good. When the schmitt's input rises enough, its output drops to 0v. At this point, its input is held at 5v, and as the current through R and L starts to fall, the voltage at the schmitt's input starts to fall. The problem: at this point, although the output of the schmitt is zero volts, current is still being drawn from it. This is because the inductor is acting a bit like a battery; it assumes a voltage that will maintain the current that was previously flowing through it (and R1), which was 5v. So to the schmitt trigger, this is equivalent to connecting the output to a -5V power rail via R1. Would this blow the schmitt trigger? (TTL? CMOS? 555?)

simulate this circuit – Schematic created using CircuitLab


texts: Amplifier \$I_c\$, \$V_{ce}\$ operating range

texts:
In the 10th edition of Electronic Devices from Thomas L. Floyd Example 6-1 provides a way to find the AC model output signal operating range based on the following circuit. I'd like to ask for a clarification about the solution in the book:

simulate this circuit – Schematic created using CircuitLab

The provided solution to calculate the AC model \$I_{c(sat)}\$,\$V_{ce(cutoff)}\$ values given the DC model \$V_{CEQ}\$, \$I_{CQ}\$ operating point is:

  \$R_c = R_C || R_L\$
  \$I_{c(sat)} = V_{CEQ}/R_c + I_{CQ}\$
  \$V_{ce(cutoff)} = V_{CEQ} + I_{CQ}R_c\$

The formula for \$I_{c(sat)}\$ and \$V_{ce(cutoff)}\$ make sense to me considering that the maximum delta for \$I_c\$ above and below \$I_{CQ}\$ is \$V_{CEQ}/R_c\$.

However, I don't see how \$R_E\$ can be ignored without a bypass capacitor connected parallel with it. As I understand leaving \$R_E\$ unbypassed would make the \$I_c\$, \$V_{ce}\$ operating range smaller, which is not negligible in general (even if bypassing is the usual arrangement). Is this correct?

Is the effect of the unbypassed \$R_E\$ unimportant in the understanding of the given example?


texts:
I have two types of DC 12V CPU fans, type AFC0612DE (Delta Electronics) and TA350DC (Nidec).

Both types have PWM pins for speed control. I however do not have a controller.

I would like to set the speed of these fans to something other than the max speed while not having to build a PWM controller to control the speed.

My input power comes from a 220VAC - 12VDC ~2A transformer.

I have tried putting a 450 ohm resistor before the fan, this makes the fans not start at all.

Having two fans in the circuit either serially or in parallell also makes the fans not start at all.

My concern is the noise from the fans when they run at maximum speed, I could have two fans if that would work, only if they don't run at maximum speed.

Is it possible to modify any of the static input parameters to change the fan speed? I have some old VCR, PC parts that might contain the missing things, so tell me what I need and I'll see if I can find it.


texts: LEDs typically specify Peak Current as something like 100mA @ duty cycle = 10%, and a "Test Condition" (I_F, i.e. Continuous Current) current of, for example, 20mA. That's a 2-dimensional constraint though. Is there some rule that dictates how much current an LED can handle up to some higher duty cycle given the extremes? I've never seen a 2-D graph relating maximum current to PWM duty-cycle in any LED datasheet... for example this one.


texts:
I have to design Mealy machine for ring counter that can count up to 3 (0,1,2,3).

If the input is 1 it act as up counter and give 1 as output if current state (after input is given) value is odd.
If input is zero it act as down counter and give 1 as output if current state value is even.

Can anyone help me to draw finite state machines (Mealy) for this problem. Also I have doubt that can I have a Moore machine for this problem?


texts: Why would I get electrocuted if I touched a non-isolated power line with my feet on the ground?

texts:
AC is being produced at a power plant using, let's say, a giant dynamo. A coil is being rotated rapidly through a magnetic field thus generating AC current. This current is then regulated, transformed and sent through the power lines to my town.

Now, if I touched one of the lines while being on the ground, I'd get electrocuted and die. Why? The current flows from one side of the coil of the generator to the other side of the coil (I'm imagining a dynamo here), so why do I close a circuit if I touch the ground, a large (infinite?) resistance? I only touch one cable of the dynamo coil. Don't I need to also touch the other side of the generator for current to flow through me?

It would seem more logical if I only got electrocuted if I touched two cables on a power line, both leading to different sides of the dynamo at the power plant. It doesn't seem like I'm closing a circuit. And would this (electrocution) also happen if the line was transporting High Voltage DC?

What am I missing?


texts: Equivalent power BJT transistor 2sa758 and 2sc898 for Sansui au 6600 Amplifier

texts:
I am restoring my Sansui au6600, at the moment I am recapping it, however I will have to replace the two final power transistors for the left channel which I found out to be faulty.
The parts listed in the service manual for the two transistors are listed as
2sa758 and 2sc898. Below is the datasheet of both

However I did find not those two but instead there were two motorola mj15022 and mj15025 (both faulty) which I suspect to be counterfit not genuine , but I could be wrong. below is datasheet of the latter

As I am finding it difficoult here in Europe to find the two genuine 2sa758 and 2sc898 a local technician has got for sale two transistors that he does say that are equivalent and will work fine. The transistors are
2sa745a and 2sc1402. Could you please help me to understand wheather these two transistors are ok and if not how in real life will effect the proper functioning of the Sansui au660
Below is the datasheet of  the 2sa745a and 2sc1402

Thank you very much , your help is really appreciated


texts:
I have the clock stretching issue on my I2C line, attached is the below snapshot of it..

I have a Kinetis K64 board communicating to a MAX7304 port expander at 400 Khz.

Should I get the driver having the workaround, should the pull up resistor need to be changed or should I play around with capacitance? I need a hint why I am actually getting this clock stretching.

With all the reading, I have understood why it happens. I am trying to understand how to tackle it.

Any thought highly appreciated, thanks


texts: Why doesn't my 5050 led strip draw as much power as I expect?

texts:
I've been playing with a 5m long RGB LED strip, with 300x surface mount 5050 RGB LEDs, but can't understand why the strip isn't as bright or drawing as much power as I was expecting.

I've had a look at Arduino and 5A 12Volt driver, which appears to be talking about the same sort of product, but the answers there don't help me understand.

From the spec:

LED Light Source  5050 SMD LED
LED Beam Angle    120 Degree
LED Power         14.4W/Meter, 0.24W each LED
LED Quantity      60pcs LEDs/Meter
Working Voltage   DC 12V
Common Type       Anode

The reel however says something a little different:

Model:            5050-1M-60LED
Color:            W/RGB
Voltage:          DC-12V
Power:            72W/5M/5A

The IR controller is connected up via a 4 way ribbon cable, one wire for each colour and one for the 12v line. Each 5cm section contains three 6 pin RGB surface mount LEDs and three 1206 SMT (resistors?) labelled 151 (for Green & Blue I think) and one labelled 331.

The IR controller manual & case detail the following spec:

Output:           Three CMOS drain-open output
Connection mode:  common anode
Output current:   < 6A (on case)
                  < 2A each color (in manual)

So, I was expecting when I powered it up and set it to full brightness Red, Green or blue, for 2A to be drawn, and when I switch it to white, for 6A to be drawn.

That's not what I'm seeing though. At 11.95v I'm seeing each colour on it's own draw between 1 and 1.3A, while full brightness white only draws 2.2A, or substantially less than the three combined!

On a hunch, I cranked up the supply voltage to 14.4V (given the 72W/5A on the reel) and now I get much closer to what I expect, but the full brightness white is still drawing well below the 72W I was expecting. The full results were:

Red   (full brightness)    1.325A  11.95V  15W    2.000A  14.4V  29W
Green (full brightness)    1.021A  11.95V  12W    2.000A  14.4V  29W
Blue  (full brightness)    0.996A  11.95V  12W    1.978A  14.4V  28W
White (full brightness)    2.218A  11.95V  27W    3.961A  14.4V  57W

Is there something I'm misunderstanding about how these circuits should behave?

Is it likely to just be the IR controller limiting the current available to the LEDs, thus resulting in them being less bright and drawing less current?

Could I just hook the 12v supply directly to the LED strip without the LED controller to measure current and get a feel for brightness, or am I likely to burn out the LED strip without the 'proper' controller?

I haven't yet cracked open the IR control box, to look at what components it contains, but would be happy to do so if requested...

... Opening up the IR controller, the PCB is marked EC-LED-19A, so it is probably this product but that still doesn't give me a datasheet. The significant components seem to be an unlabelled 14pin IC (presumably a PIC), an FT24C02A serial eeprom, a 78L05 regulator and 3 more SMT caps and 68ohm SMT resistors. Each of the RGB channels have a 10k resistor, a 2k resistor and a 3 pin SMT package labelled WFAON, which I can't find a datasheet for.

It is possible that LED strips: 46% resistive losses? may be able to help answer this question more comprehensively.


texts: Controlling a 12v potentiometer with Arduino

texts:
I want to use an Arduino to control a motor I pulled from a treadmill. The treadmill came with an MC-60 controller. The treadmill used a potentiometer to control the motor speed. Here's a portion of a treadmill schematic I found that shows the potentiometer and the MC-60 controller:

Many sources cite the potentiometer for the MC-60 board as being 5K Ohms, but I measured 10K Ohms on my treadmill's potentiometer. Looking at the schematic, it looks like the MC-60's potentiometer uses 12V. The Arduino pins supply 5V.

What's the appropriate circuit from the Arduino to the H, W and L pins on the MC-60? I want to use the Arduino to control the speed (through a digital potentiometer, I'm assuming).

Note: Consider me a novice on electrical engineering. I use the cut and paste method of circuit creation. :-) I'm a professional software engineer so I can handle the programming end pretty well.


texts: Here, I can't understand the third step. Why they ignored other three terms \$(40000\sin\omega t\sin 3\omega t, 10000\sin 3\omega t\sin 5\omega t, 20000\sin 5\omega t\sin\omega t)?\$ Please help.


texts: Need circuit to toggle voltage between two paths

texts:
I need to create a circuit to allow me to toggle a source voltage from one path to another. I need to be able to toggle the path from the first path to the second while a second voltage is active, and go back to the first path when the second voltage is not active, such as in this diagram.

P.s. Please do not suggest using a switch, I can only toggle by using a second incoming voltage


texts:
I have this - Zener Diode - 12V Reverse Voltage
On the table 8, I can see the ranges for the 12V reverse voltage is between 11.4V and 12.7V for the "C" selection part. But this value if for 5mA of zener reverse current.
But, if we see the characteristics of zener diode, we see the below graph,

We can see there is a minimum reverse zener current to enter the breakdown and there is a maximum zener current (above which, the device will get damaged).
But the datasheet table 8 , provides the value for a reverse zener current of 5mA only. But they didn't mention whether it is the minimum or the maximum zener current.
Question 1 :
I just want to know what is the minimum required zener current for the 12V "C" zener part so as to enter into the breakdown region? Where is it mentioned in the datasheet?
Question 2 :
On table 8, what does the 5th column, Reverse Current (uA) and VR indicate?
Please provide help.


texts: dual pole ON OFF ON switch between 3 configurations

texts:
I'm designing a circuit (guitar effect) and have reached a point where I have to switch the signal path between 3 configurations involving a pair of diodes.

The circuit's 'out' path has the option of going:

Straight out (uninterrupted)
Through a pair of parallel diodes (symmetrical clipping diodes)
Via one end of the diode pair, with the other going to ground

I have a dual pole on-off-on switch that I would like to use if possible. The schematic currently looks like this:

Is it possible to switch between these three with a simple switch or will I have to use a rotary switch?

As requested, the three I would like to achieve:

CONFIG 1

CONFIG 2 (note diodes must be NC)

AND CONFIG 3


texts:
I have a 1200 foot long outdoor direct burial network cable running through an outdoor environment that ranges from dry to 6+ ft underwater depending on the year and season. (Currently it is a foot or two underwater.) Something has severed the wire. What is the best way to repair the break while retaining the ability for the cable to be submerged for months at a time.
The cable does have POE running through it via a Veracity Longspan pair if that changes anything.


texts: For zero crossing relays, does the switching at zero current only limit voltage spikes, or does it also reduce inrush current?


texts: Is there a way to connect a SIM module to a Gumstix? I've tried to find commercial solutions (add-on modules) that will do this but have not found any. Surely an addon providing mobile connectivity must exist?


texts:
I am using LM3524D IC configured like Figure 8:

I am supposed to get a 10V output with a 5V input using 20kHz Fosc. I am pretty sure about my connections and the values but I can't seem to reach the 10V output it only gives me 4.7V. I used TIP48 transistors and 1N4001 diodes. Do you have any ideas on how to troubleshoot this?


texts: Wireless phone chargers in a lab environment?

texts:
We are talking about devices that are designed to pump out quite a bit of power in the MHz. Admittedly the chips have comms protocols so they don't spew all the time, and the resonant circuits are very high Q, using the near field. However, might there be any problems in an electronics development lab?

How far do these fields extend in a measureable sense?


texts: At DC frequency, how long can wire be until signal attenuates almost completely?

texts:
Just got curious about this last night when I was wiring a couple of LEDs on my brother's long board.
For a simple DC circuit (Battery, resistor, LED), how long can I stretch the wire until the power gets almost completely dissipated in the wire?
I know it depends on the battery and wire and everything so for like a 9V battery and 22awg solid wire...

I'm just looking for a way to come up with a rough estimate.

What about at a low AC frequency?


texts: Compensation Capacitor and Resistor Values

texts:
I'm currently working on a Power Electronics project which I will convert 10-28V input DC voltage to 12V DC output voltage. I've deciced to use LM3481/3488 configured as SEPIC in my project. I've found which values to use such as Sense resistor, Feedback resistors, Frequency selecting resistor, Inductors and Capacitors etc.

Since I am a newbie in Power Electronics, What purpose do Compensation Capacitor and Resistor have and How should I choose values to them?


texts: what is the link between Intermodulation and SNDR

texts:
I have an input of two frequencies ,an it goes into a non liniar system  shown bellow which gives us intermodulations.
Generaly what i do for SNDR is taking the power of the amplitude of the signal and divide it by the sums of the powers of the intermodulations and noise.
But in this solution shown bellow they put some expression as a harmonic destortion which is the ratio between C3 coeff and signal coefficient C1
How it equals to the straight forward definition i described in the start?
Thanks.


texts:
So I've been working on getting UART access to the head unit in my car; I've got the schematics of the unit and found that TX3/RX3 on the Renesas SH7750 are presented externally - along with 3 "test bit" pins.
Pulling the test bits low in certain combinations enables certain modes (eval or debug).
I'm happy that I am in debug mode as the unit does output on UART in this mode whereas there is nothing at all in normal operation.
Some of this is documented in a workshop manual for another headunit from the same manufacturer - but also includes a "test box" which sits between the unit and the PC (herein potentially lies the problem)
It should output "Hitanykey" and then "xanavi>"
I however only got garbage output... I've been through the baud rates and no luck so have resorted to sticking a logic analyser on it.
Any pointers or suggestions would be greatly appreciated!
Sigrok save:
https://www.dropbox.com/s/td6kt2vsnfl450j/uart_test.pvs?dl=0


texts: Adjusting the offset of the output of a UA741CN opamp

texts:
I've the following schematic for a UA741CN when there is NO offset:

simulate this circuit – Schematic created using CircuitLab

Question: Why do we need the diode and the two resistors to create an ouput of the opamp without any offset (or a little one, due to not ideal components)?


texts: Maximum load resistor for a given single transistor circuit

texts:
Following parameters are given for the above circuit:

R1=8.2 kΩ, R2=5.6kΩ, RE=2.7kΩ, VEB=Uj=0.7V, Vcc=10V, β=200

The question asks the maximum load resistance RL for the transistor in active mode.

I solve the question in the following way:

The maximum load resistance RL for the transistor in active mode means to me the transistor is approaching to saturation at that point.

So for that point, I take Vce=0 and set Vy=Vx+0.7V.

Since Vx=Vcc*R2/(R1+R2)

Vy=Vcc*R2/(R1+R2) + 0.7V

Vy=10*(5.6/13.8) + 0.7V = 4.76V

Now since Vce=0V, and Ie=(Vcc-Vy)/Re = 1.94mA

Ic = Ie approximately so

RL = Vy/Ic = 4.76V/1.94mA = 2.45kΩ

So I calculate the maximum RL in active region as 2.45kΩ, whereas the answer is 2.1kΩ.

Is my calculation wrong?


texts:
I'm trying to interface with a device via async serial. Here is the power on requirement from the device datasheet:

  Power-On Reset Requirements
  When applying power to the DNT900, the /RESET Pin 39 and the RADIO_TXD Pin 31 must be initially
  held low. The /RESET pin must be held low until the power supply voltage reaches 3.3 volts for 100 ms,
  and then set high. The RADIO_TXD must be held low an additional 10 ms after the /RESET pin goes
  high. RADIO_TXD is weakly pulled down with a 100K ohm resistor to meet the power-on reset requirement, unless this line is driven high by an external signal.

The hardware serial on my arduino (pins 1 & 2) is pulling RX high, thus not meeting the power on requirement of the device. The device goes into bootloader mode and is unusable.

The one solution I have found is using SoftwareSerial, and commenting out two lines of code in the RX init routine:

void SoftwareSerial::setRX(uint8_t rx)
{
  pinMode(rx, INPUT);
  //if (!_inverse_logic)
  //  digitalWrite(rx, HIGH);  // pullup for normal logic!
  _receivePin = rx;
  _receiveBitMask = digitalPinToBitMask(rx);
  uint8_t port = digitalPinToPort(rx);
  _receivePortRegister = portInputRegister(port);
}

This seems to work, but is there a better way? Is there a solution in hardware instead of software? I'm looking for the most robust and reliable solution so that the device does not go into bootloader mode and cease functioning as expected.

Thanks.


texts:
I have a certain circuit and I want to see its ac performance when I send in certain noise as a signal. is there some option like noise source similar to sine etc signals in orcad....

I can make my noise file in excel an upload it as pwl signal, but i can run only transient analysis with it. I want to see the ac performance of my system.

I can generate noise by using some resistors at input, by this effects my later schematic.

is there a way to make a noise source other than these two options.....my frequency range is 100k to 220 Meg. and all my voltages would have a crest factor of 5.

to make it clear, i donot want to send noise by adding it to some kind of signal.instead i want to make noise as my signal.


texts:
In the Art of Electronics (Horowitz & Hill) the following circuit is given as a solution to reduce ripple current caused be variations in input voltage (pg. \$ 69 \$):

  "An alternative method uses a low-pass filter in the zener bias circuit
  (Fig. 2.13).  \$R\$ is chosen to provide sufficient zener current. Then \$C\$
  is chosen large enough so  that \$RC >> \dfrac{1}{f_{ripple}}\$. (In a variation of
  this circuit, the upper resistor is replaced  by a diode.)"

I don't understand the need for the upper resistor R. In order to minimize variations in input voltage, couldn't we just connect the capacitor directly from Vin to ground? Why do we need to make an LPF with R instead? Since it is mentioned that we could use a diode instead, is there really a point?


texts: Circuit diagram and components for Comfortron controller (Chevy, Oldsmobile, ...)

texts:
I am trying to help repair a Comfortron heating and cooling controller for a late 1960's Chevrolet Impala. The Comfortron is an early climate control system that uses a combined vacuum and electrical system to actuate flaps in the ducting and control the fan speed.

Here's the circuit as I've traced it. The Sensors input is connected to +12V through several NTC thermistors, and the Transducer Drive output drives what sounds like a thermo-electric vacuum valve that closes off (reduced vacuum) as the current through it increases; that vacuum signal controls the duct flaps and the fan speed.

The circuit is not complicated but there are a few mysteries. But I should note that Q2 is defunct so I am can't be sure it is a PNP - I don't see how the circuit would function with an NPN device. But it is in backwards, as the circuit shows. I understand that is done sometimes (eg to get low Vce(sat)) but can't work out why that would help in this case. So that is mystery number 1.

Mystery number 2 is the ID on Q2: 7286585. It is in a TO-3 case and has a Delco/GM brand on it and '6728' which I interpret as the year/week code. I can't find any useful hits on Google for that device ID but I'm not surprised - all the main components on the board have part numbers starting '7286' - two transistors and two resistors. Its as if the numbers were used specifically for this assembly.

Without a part number I will be guessing about a replacement, although judging by Delco's product lineup in the 1960s I would expect it to be a Germanium device.

Anyone care to offer an explanation for the reversed connection, or some interpretation of the part number?

Thanks :)


texts:
I read in a book that "Current always goes in the less resistance path". In a paralel circuit with 1k resistor to one side and 10k resistor to another side the current still goes in both sides. Why does the current goes to both sides? It should only go to the 1k resistor cause there is less resistance.

In the same paralel ciruit, if I add another wire in paralel to the ground all the current will go to the ground, proving that "Current always goes in the less resistance path". But why does this "law" only work when one of the wires is ground?


texts: Parasitic values of a laminated core inductor

texts:
How do I determine the parasitic values of an inductor? Since an inductor is made up of a series resistor with the inductor and a parasitic capacitor(parallel capacitor between turns and the core).
My challenge is how to determine the capacitor between turns, capacitor between the turn and the core.


texts: Making a simple 1 MIDI IN + 1 arduino MIDI OUT merger (MIDI THRU + TX)

texts:
From the Midi DIN spec schematics we can see MIDI THRU is just MIDI OUT directly at the end of a MIDI IN. Is it possible to just add a midi signal from the arduino TX ("FROM UART") to the midi thru (parallel to the MIDI IN) or do I need to get the MIDI IN signal in arduino and mix them digitally before sending to a regular out? Or is there another simple solution to merge the 2?

It is for a keyboard and a pedal (CC64) so notes won't be the same (if it is an issue).


texts:
In a NPN circuit, the BCE arrangement is as followed:

And for PNP:

This seems confusing for me and for some people. In a NPN transistor, current flows from the collector to the emitter, while in a PNP transistor, current flows from the emitter to the collector.

Why is the direction different for these complementary transistors? I always remembered that collector was where current is collected by the transistor and emits the current out of the emitter, but it doesn't work like that for the PNP transistor.

Is there a reason why it was named like this? Is there an easy way to remember that NPN goes from C to E while PNP goes from E to C?

This applies to FETs and MOSFETs as well.


texts:
I am trying to make my pic to send the value of the potentiometer (on PICKIT 1) through serial. At this step I am using an oscilloscope to see if it is doing well.

I wrote the code below, but nothing is changed on the scope screen when I move pot meter. Can you have a look please?

void delay_ms(uns16 millisec)
{
        char next=0;
        OPTION=2;
        TMR0=1;
        do {next+=125; while(TMR0!=next);}
        while(--millisec!=0);
}

void main()
 {
     char byte;
     int state = 1;
     uns16 y=255;
     TRISA=0b11000010; //RA1 is input
     ANSEL=0b00000001; //analogue input ANO
     CMCON0=7; //to switch off the comparator
     TRISC.4=1; //USART will automatically configure input-output.
     ADCON1=0b00010000; //Fosc/32
     ADCON0=0b00000001; //reference voltage VDD
     SPBRG=32; // the nearest int to achieve 9600 baud for 20MHZ
     BRG16 =0; //8 bit generator.
     BRGH=0; //recommended to be set to reduce baud rate error. clear is better.
     SYNC=0;// select asychronous
     SPEN=1;//serial port enable
     ADCON0=0;   //ANO selected
     ADFM=0;     //Left justified
     ADCON0.0=1; //Enable conversion
     TXEN=1; //Enable transmission
     //delay_ms(y); //wait while he's converting

    ADCON0.1=1;  //GO but turned on.

    while (1)
    {
    byte=ADRESH;
    TXREG=byte;
    delay_ms(100); //a short delay
    }
}


texts: What do these arrows on a pinout represent?

texts:
What do these arrows represent?
Is there any way to memorize it easily?


texts: Tie Arduino - ATMEGA328P reset pin directly to +5V?

texts:
I would like to know if it's okay to tie the reset pin on an ATMEGA328P directly to +5V without using a resistor to avoid random resets and lower part count. If it's not okay, can you explain why it's not good practice?

Thank you for your help.


texts: What shift register ICs am I looking for?

texts:
I'm designing a project that requires far more I/O than a typical microcontroller offers. No problem, right, just use shift registers and stuff. Wait nope, why am I having problems?

I'm planning on driving 24 outputs with one serial data line, a clock, and a chip select. 16 of the outputs are connected to LEDs and the remaining 8 are connected to a HD44780 LCD display. So what I thought of doing for the 16 LEDs was to connect them up to two 8 bit counters that feed the serial data bit through to the specific LED and then change to the next consecutive output when clocked -- like a demultiplexer, but serial. For the LCD, I need to actually hold onto the data and send it all out at once, so I need an 8-bit serial-parallel register and wait until 8 clocks pass to enable it.

Finding an IC which does the latter is easy -- 74HC595 seems to do it -- but for the LEDs, I can't seem to find a 7400 series chip that does what I want. All the ones I can find hold onto previous values and just shift them over, and the decoders I've found 1) don't have a data line - they're always true when selected and 2) require a binary word, not a clock. If it's not already clear, I want something that does what's on the left:

I swear I've used a chip that does what I'm thinking of before when driving an LED matrix, but I can't remember its number. Any help would be appreciated.


texts: How to convert voltage into digital signals?

texts:
How do I convert voltage into digital signals or pulses? For some reason I have to get voltage readings of the battery connected to the UPS of the computer systems.

For that purpose I am designing a device and computer program to monitor voltage and current readings.
Previously I designed an Ohm meter via a 555 timer. When R2 is change the timer generates relative (to the resistor) frequency of pulses and my program can easily detect the change in the value of resistor. So, Can I use 555 timer for my purpose since its equation for frequency has no variable for voltage and current?

Schematic of the circuit will be highly appreciated.


texts: What is the reason for a fuse next to a thermostat?

texts:
I'm repairing a heater that someone threw in the trash (this model):

It has an internal thermostat next to the heating wires, plus a thermal fuse.

What is the reason for a fuse in addition to the thermostat? It seems to me that the thermostat alone is sufficient protection against overheating, since the fan does not produce heat.


texts:
Looking for a clever solution (writing in Verilog)

Let’s say I have two 8 bit values, and each value has an 8 bit score, for a total of four inputs, and I want to combine the two values into one 8 bit value based on the scores. Hypothetically, the simplest way would be

((score1*value1)+(score2*value2))/(score1+score2)

However, it seems to me this is not “easily synthesizable” because of the division by values that are not powers of two.

Anyone have clever ideas to write a code that would serve this function that is synthesizable? I don’t have specific definition for this fusion in mind,  but it has to be synthesizable. I am also ok with less possibilities to fuse the values, meaning that I am ok with say, only 128 ways of fusing the values


texts: TO-220 voltage regulator, heatsink and mounts

texts:
I've received my heatsink and mounts for my voltage regulators. It's the first time for me. I'm not sure about the way to mount the regulator on the heatsink. Mainly a little film, not sure about the composition. Feels like plastic but it's really fragile and composed by multiple layers. after a google search I've found some posts talking about a kind of thermal paste replacement.

Here's what I have :

To mount it I've place the little film between the regulator and the heatsink.

Does it sound ok for you ? Do you have more information about that little film ? Should I mount it on the other side of the heatsink ?


texts: I wire up this schematic on my breadboard. I've verified that the 3V3 LDO is working.  Atmel Studio on my Windows machine can see the Atmel ICE.  The simple blink compiles fine too. However, I cannot upload / debug code.  Either the Atmel ICE or the ATSAMD11D14 is not responding.  Hints for a n00b? Thanks!


texts: Use of linear optocoupler to provide safety for analog input of BeagleBone Black

texts: I need to connect a thermocouple (output 0 to 10 V) to a BeagleBone Black. I have planned for a voltage divider circuit to do that as BeagleBone accepts only 1.8 V as its analog input. Do I need to provide an electrical isolation before the voltage divider circuit by integrating a linear optocoupler to ensure safety for the BeagleBone? Please suggest.


texts: Why would a bad PCI-E power line cause the 32-pin connector to fault? (computer power supply)

texts:
I have a power supply that went bad and recently I got a tester and tested it. The tester (a Thermaltake) has multiple connector ports. You plug in the 32-pin big connector at the bottom and then can optionally plug in up to three other connectors at a time (PCI-E, molex peripheral, SATA and 4/8 pin molex CPU).

I found that all the connectors on the power supply worked, except for one PCI-E connector (undoubtedly the one that had been connected to the video card).

The weird thing is that when the bad PCI-E connector was plugged in, the 32-pin connector would fault too. I would have expected just the bad connector to fault. Also, if I plug in other connectors, they all fault if the bad connector is plugged in, but they are all good if it is not.

I have seen switched power supply schematics, but have only a very basic understanding of how they work. Maybe somebody with switched power supply experience can explain why a single bad connector would cause all the other connectors to fail?


texts:
I design some plastic models, and I would like to include a small light (LED or similar). I am looking for a solution with a long battery lifetime. I'm not a electrical engineer but I read that, for example, 1 Red LED consumes around 20 mA, so with 2x AA batteries it lasts around 210 hours.

Does any solution exist for long life, e.g. for months? I don't need high brightness, it is only decoration for a diorama - for example, as a light in a small model of a house etc.

Thank you for any help.


texts: About Mahony filter for euler angles estimation

texts:
I have read some papers about mahony filter design..the filter corrects the error in gyroscope measurement using PI compensator....the error in gyro reading  is calculated using the gravity vector..the gravity vector has two components V and W..can any one define the V and W vectors..or give me their names?
The  following link enter link description hereshows in heading (sample filter 2complementary filter with cosine matrices after mahony) the two vectors vt and wt...i want to know what they are?... also the vt and wt are also shown in the following figure


texts:
How can the "input" be supplied with x volts, and the "output" be supplied with y volts? To my understanding, the input and output are connected to a power source, such as a battery - how can you have 0 volts on the wire going out and 2.9 on the wire coming in?

If we are manipulating the voltage to manipulate whether the transistor functions as an open switch or a closed switch, why have a transistor? We are the ones connecting and disconnecting the 3 V battery to manipulate the transistor's function as a switch - Why can't we just use a regular switch?

If you can provide any insight into the questions I have, I will greatly appreciate it. Thanks in advance.


texts: A signal noise analysis method question for a transducer

texts:
Let's say a transducer's desired signal is p(t), and the transducer's frequency of interest is 100Hz.
And let's assume we dont know the total signal x(t) which is the desired signal plus the noise and interference.

Sample the signal with a proper anti aliasing filter and call it x(t). So we only have x(t) as sampled data at first. Here is what I think:

Now to set the transducer voltage p(t) to a DC value, fix the transducer physically as for an offset measurement.

Now sample the the signal and see the FFT of x(t). If there is 50Hz in the spectrum call it m(t). And for the random/white noise call it n(t).

So we can define the total signal as:

x(t) = p(t) + m(t) + n(t)

*So now I take the average of the x(t) and call it p(t), because m(t) and n(t) averages are zero(?).

Now from the FFT find the power of m(t) call it Pm. Similarly power for x(t), p(t) and n(t) are Px, Pp and Pn.

So for SNR can we write?:

SNR = 10*log10[Pp/(Pm+Pn)]

1-) Do we need to do any windowing here to calculate Pm?

2-) How can Pm be calculated form the FFT of x(t)?


texts: Inverter ringing on high side : how to minimize it?

texts:
We're having some trouble with a small inverter motor design (24V / 20A).
We're seeing quite a lot of ringing on the high-side mosfets, we scope it with the negative of the oscilloscope on the phase output and the positive at the +VDC and here's what we see :

We're seeing spikes of over 8V over the VDC_bus and 7V below.
We're using a DRV832x for gate-driving and this is with the standard settings (1A sourcing, 2A sinking or is it the other way around?).
We tried to lower these gate current values all the way down to 20mA but it actually doesn't change much the ringing, only makes the switching slower and sometimes even drops some events, maybe an internal protection against switching too slow?

We don't see this behaviour on the low-side at all where all is fine and dandy.
The layout is done according to the rules with trace lengths being balanced (we're driving 2 MOSFET per switch) and the inductive loops / stray inductance minimized as much as possible so we're quite surprised to see this behaviour. The DC link is basically 220µF of MLCC which should give us some low ESR / ESL.
Any lead on how to minimize this? Could it be a measurement effect of us not scoping it correctly?


texts: What is an ESR zero in a power converter's output filter ? (#ExplainLikeI'm5)

texts:
I'm trying to understand this sentence (from this answer):

  So if your application has high ripple current and you don't need the
  ESR zero for stability then a low ESR cap will likely be the way to
  go.


texts: Is a resistor capacitor model of a battery a good approximation?

texts:
Batteries are known to have an amount of internal resistance that reduces their terminal voltage with current draw. However another property of batteries appears to be the gradual recovery of the terminal voltage when load is eliminated. It seems that the following is a good characterisation of a real battery. Is it used in electrical engineering? Is there a standard/accepted calibration technique for it?

simulate this circuit – Schematic created using CircuitLab


texts:
I would like to switch the output of a tens unit (one of those things that uses electricity for pain relief) to 8+ different outputs. I want to create an electro tactile device. The idea is to switch the output of each lead from the tens device to 8 different channels. The channels would output to points held against the skin. Much like an lcd screen, each pair of outputs from the two sets of 8 channels would address an individual electrotactile pixel. I would probably want to be switching at ~1000hz. I've been looking at analogue multiplexers and switches, but they all seem to be limited to vcc from the microcontroller side. The tens device has a max voltage output of 7.3Vrms and a max current of 13.6mArms. Max frequency output is 150hz.

Perhaps at the low settings I want to be using the tens unit I don't have to worry about the vcc limit (5v)? If I take this approach how do I connect the two devices togethor, is it enough to connect the grounds?


texts: I bought a MP2307 DC-DC converver from eBay. I would like to filter the output, but its has a problem

texts:
When I added a ferrite bead and a capacitor to the output to filter it, its get oscillating and doesn't work.

I don't know why? Can't filter the output?


texts: Y-Delta Transformation Voltage across resistor

texts:
In effort to solve for Vx, I would like to transform the Delta network (the 3 3 ohm resistors) to a Y network. My question is, where would Vx be read ?

Thanks,

Liam


texts:
I am trying to come up with a simple Battery Charger design, which utilizes PWM control. The use of high frequency PWM is to reduce the size of the Transformer that is to be used. Planning to use Transformer to provide the much required Galvanic Isolation between the AC input and the DC Charging output.

Specs of the Transformer are roughly:
Input: 0-220V
Output: 0-18-36-72 (only 1 tapping shown here).
Transformer primary is driven by a PWM power signal at approx 25KHz. This choice of frequency comes from an application note that the MCU manufacturer has provided. PWM generated from a PIC16F, and will be optically coupled to the MOSFET gate.
The values of C and R shown below are only indicative. Battery temperature is monitored separately and fed to the controller. Also, Battery presence etc are taken care of separately. Vsense is carried out during PWM-OFF cycles, while Isense is done during PWM-ON cycles.

I have few important questions:

Primary will already have DC, being switched. Do I still need a rectifier on the secondary? A polarity limiting diode shall be present anyways.
I plan to switch the primary, with a single MOSFET. What kind of MOSFET should be used and also how to connect it. I have used an N-Channel Enhancement type. Is this correct?
Some designs show an output L-C filter, with L in series and C in parallel to the Battery? Do I need something similar? If yes, Why?
The smoothening CAP that I have used on the primary side...what is a good approximation for its capacitance value?
What other precautions should be kept? I wish to know if there is something important lacking from this power schematic..something that I might have overlooked.

Please Note, I understand that this is by no means the complete schematic. It would be impossible to provide everything here. My basic question is about the feasibility of the power scheme, and if any additions MUST be done for a viable design. Would help a lot if you could point the glaring issues out.

All help/comments etc are highly welcomed.

simulate this circuit – Schematic created using CircuitLab


texts: Calculating life of portable power supply for icybreeze cooler

texts:
I recently purchased an IcyBreeze Portable Air Conditioner and Cooler for an upcoming camping trip. I want to run it on low for two nights, or about 16 hours. With this in mind, I purchased the following portable power source

The capacity is advertised as 42000 mAh.

The IcyBreeze page indicates the amp draw is 1.0 A on low.

This battery life calculator suggests I should get about 29.4 hours of battery life (using 42000 mAh capacity, 1000 mA draw, and the consumption rate of 0.7).

With a fully charged power source, I plugged the cooler in using the wall adapter, set it to low, and ran it until it stopped. I only got about 5 hours of battery life - far less than what I was expecting.

Clearly I am misunderstanding something about the battery life calculation. So I guess I have two questions:

How can I more accurately estimate battery life for this setup?
A little off topic, but the portable power source is still well within the return window, and I an open to alternative suggestions for how I might get 16 hours of battery life with a portable power source (non-generator).


texts: What is the purpose of the fenced-off area on this board?

texts: I saw a recent video on YouTube where the presenter describes a commercial micro-current measurement product. What purpose does this tinned fence serve? I'm guessing its for noise suppression but I'd like to know more. Is it grounded? Since the parts inside the fence interface with parts outside the fence, do they all go through a single entry point inside the area?


texts:
I'm trying to simulate two op-amps back-to-back (G=30 each) in LTSpice and work out if they will be stable.  If I look at the .ac analysis after the fist op-amp I have good phase margin (about 60 degrees). If I look at the phase-margin after the second op-amp my phase  is now -200 degrees - i.e. unstable

Do I have to consider the total phase from both opamps (which I think is what LTSpice is doing) or is only the phase around each op-amp important.  i.e to first order I can consider each op-amp independent? Is the number I should be looking at is -123 in the ratio and hence I should be fine.

Circuit and plots below:


texts: Why some circuits uses additional resistor with pot in dividers?

texts:
Are there any profits of using the first circuit for divider instead of the second one?

simulate this circuit – Schematic created using CircuitLab


texts: I am in need of some help with a project. I am trying to build a circuit that will turn on three LEDs randomly on a 1-5second cycle.  I have the basic when it comes to electronics, but get stuck on the random part.  I have started with a 555.


texts:
I have a sensor which constantly outputs serial data at very low voltages (in the milli-volt range), however I need to read this serial data using a PIC micro controller. How can i convert this data to logic level using basic components.

All solutions i have read so far are for bi-directional communication and require a specialized chip. For my purposes I simply require uni-directional communication, and would prefer used basic components available at any electronics stores.


texts: Calculating switching loss of diode - unknown Qrr

texts:
I would like to calculate a switching power loss of BY203-20S diode, in following conditions:

Vr = 1600 V,
fsw = 65 kHz

Switching loss of a diode is given by equation:

\$Psw = Vr*fsw*Qrr\$

We can substitute for the reverese recovery charge:

\$Qrr = (Trr*Irrm)/2\$

However, value of Qrr nor Irrm is given in the datasheet of BY203-20S, only value Trr = 300 ns is given.

If I choose arbitrary value of 1 A for Irrm, switching loss yields in huge value of about 15.6 W, which of course the tiny package can't handle.

Is there some way to estimate the Irrm or Qrr to calculate the switching loss more accurately?


texts: Atmega328 fast PWM (mode 15) on timer 1 not working

texts:
I cannot get PWM to work using mode 15 (a fast PWM) of timer 1. It's always giving me a high value of around 4.5V on PORTB2.

#include <avr/interrupt.h>
#define TIMER_OVERFLOW_COUNT  1

volatile int timerCount = 0;
ISR(TIMER1_COMPA_vect)
{
        ++timerCount;
}

int main(void)
{
        DDRB = DDRB | 1 << DDB2;
        TCCR1A = TCCR1A | 1 << COM1B1;
        TIMSK1 = TIMSK1 | 1 << OCIE1A;
        TCCR1A = TCCR1A | 1 << WGM10;
        TCCR1B = ((TCCR1B | 1 << WGM13) | 1 << WGM12) | 1 << WGM11;
        OCR1A = 62499;
        sei();
        TCCR1B = TCCR1B | 1 << CS12;
        while(1)
        {
        if( timerCount > TIMER_OVERFLOW_COUNT)
                {
                        OCR1B = 25000;
                        timerCount = 0;
                }
        }
        return 0;
}

However, I could get the similar mode (mode 7) of timer 0 to work fine.

#include <avr/interrupt.h>
#define TIMER_OVERFLOW_COUNT  125

volatile long int timerCount = 0;
ISR(TIMER0_COMPA_vect)
{
        ++timerCount;
}

int main(void)
{
        DDRD = DDRD | 1 << DDD5;
        TCCR0A = TCCR0A | 1 << COM0B1;
        TIMSK0 = TIMSK0 | 1 << OCIE0A;
        TCCR0A = (TCCR0A | 1 << WGM00) | 1 << WGM01;
        TCCR0B = TCCR0B | 1 << WGM02;
        OCR0A = 124;
        sei();
        TCCR0B = (TCCR0B | 1 << CS02) | 1 << CS00;
        while(1)
        {
        if(timerCount > TIMER_OVERFLOW_COUNT)
                {
                        OCR0B = 50;
                        timerCount = 0;
                }
        }
        return 0;
}

I cannot figure out what I am doing wrong in the earlier code.


texts: Inductive and resistive load current draw - PSU

texts:
Below schematic is a simplified version of a power supply:

simulate this circuit – Schematic created using CircuitLab

When the voltage is set to 12V and current limit is set to 100 mA and output is connected to a resistive load (10 ohm), the current pulled from the supply is exactly 100 mA. but when an inductive load is connected (brushless fan) it only pulls 75 mA from the supply.

Why inductive load draws less current when there's room for it to draw more? Is it because of it's inductive properties or I should look for the source of the problem in the circuit?


texts:
I am a beginner in electronics, till now i understand basics of electronics and worked upon 8085 & arduino only, now i want to enhance my practical skills by working upon some more microprocessor/microcontroller. Please suggest me the most helpful for the same and which one i must brought as there are a lot of options available in market.

Also if any kit or book is available for this purpose, suggest me that as well, i really want to try my hands on practical electronics now.

Thanks


texts: How can you measure low resistance accurately?

texts:
I got resistors having 1Ω and 0.1Ω. They will be used for measuring current incident to MCU. But when I tested the resistance by using my DMM, the value was fluctuated a lot and it was never what it should be. How can you measure resistance around 0.1Ω accurately?

I attached + - probe of the multimeter together and then it showed 0.5Ω on the screen. Also resistance of my alligator cable varied with the position I attached the probes. Does it mean that multimeter is not a good choice to measure such low resistance?

I'm using Fluke 177 digital multimeter.


texts: Positive vs negative, power vs ground, flow direction

texts:
I'm getting very confused about the inconsistency where some people say ground is always negative, and some say ground is always positive.
And some would say, electrons travel from the power source to the ground, but while some would say electrons travel from negative to positive. These two notions would be aligned and make sense if ground is positive, but not according to my Arduino instruction manual, since it's clearly drawn in pictures that the GND port of the circuit board links to the (-) column of the breadboard.
Moreover, according to physics, electrons flow from (-) to (+), so that sounds like anything coming from the (-) is acting as a power source? so which port in my Arduino does the power come from? the 5V port or the GND port? From my first impression, it's the 5V port that's supplying the power, since it's "5V." But is it one of those things where direction doesn't matter?
Just to make it easier for answering:

Is it true that ground can be positive and can be negative, just a matter of preference and there's no "always?" And if yes, is negative ground the more popular preference?

Does the energy come from ports like 5V? Or is it that labelled 5V doesn't mean that's where the power comes from?

Do electrons in my Arduino flow from (-)(connected to GND) to (+)(connected to 5V), or the opposite?

Feel free to elaborate if you think it would make it clearer.
EDIT:
By 'power' I really meant energy.


texts: My power professor has asked us to explain why DC resistance is always higher than AC resistance. Is it? In all of my researching on the internet, I keep getting that AC resistance is higher, thanks to the skin effect. Is it possible that DC resistance would be higher, or is my professor getting a little too advanced in age?


texts: Does anyone know how to build a push/pull oscillator or a similar square wave oscillator?


texts:
I am using to LTspice trying to find out the extremums output of the following circuit, the diode, op amp and pnp are the default components.
What I know at the moment is that \$V_{output}=\frac {R_{3A}+R_{3B}}{R_{3B}} {V_D}\$, but I don't know what determines the extremums of the output.
I also tried to search for examples of similar circuits, but mine is always different from the others in the following three points:

Use pnp instead of npn
Reference connected to the inverting input rather than the non-inverting input.
the direction the diode

I also hope to know what these differences affects the regulator briefly.


texts:
I am trying to interleave two similar but not identical pass-band (analog) signals (i.e., both have a center frequency of 15 MHz, and a bandwidth of 200 kHz) on a sample by sample basis. The idea is that once interleaved in the analog domain, my one-channel receiver will down-convert the interleaved signal to baseband, and will sample it at the desired rate. Then, I will be able to de-interleave the signal on a sample by sample basis in the digital domain to recover the two signals. Pictorially, what I am trying to achieve in the analog domain is depicted below:

Analog Domain

S1 (pass-band signal): + + + + + +
S2 (pass-band signal): o o o o o o
Interleaved (pass-band signal, to Receive Channel) : + o + o + o + o + o

The digital part is easy to realize, however, I have few issues with the analog part. What is the best way to interleave two similar pass-band (analog) signals such that when they are down-converted to baseband and sampled, they can be de-interleaved on a sample by sample basis as shown above?

I thought about one way to achieve this through using an RF switch with a switching speed twice the center frequency. Does that make sense? Are there better ways to realize this?

I'll appreciate any ideas.


texts:
I recently had one of my new rechargeable Lithium Ion products tested (RE pre-compliance scan) and I had a few frequencies (around 150 MHz) pop (7-10 dBuV/m) above the FCC and CISPR limits.

I'm not an expert at dealing with EMC/EMI problems by any means, but I am familiar with proper PCB layout/routing practices to minimize the chances of problems. I don't think the PCB is the problem. But lets see what you all think. I can provide images of the layout if needed.

I have done some probing using H and E near field probes and a StiCo 18" VHF antenna to try to pick up some of these harmonics. The fields do not seem very strong in the problem frequencies (+17-20 dBuV/m with the inductor inside the loop of my BeeHive 100C H field probe between 50-150 Mhz). This doesn't seem bad to me (but again, not an EMC expert).
The field does have a 500 kHz harmonic, which confirms it's coming from the switcher which runs at that frequency. There's nothing else on the board that generates noise. The measurement drops to zero when moving more than about an inch from the emissions source. I don't pickup anything with the smaller loop probes.
I see a (+5 dBuV) E field when probing the switcher and inductor directly.

I know it's very difficult to causally link near field measurements into far field results, but would it be safe to deduce from all of this, that i'm probably not radiating out from the PCB?
Is there some other way to confirm this?
It seems to me like the input wire is my problem. I do not have any other EMI filtering on the board other than ceramic bypass caps.

My next step is going to be to do a few more scans using a clip-on ferrite. If that works and gives me good margin, then i'll probably spec out a new AC/DC converter with the ferrite built in. I'm also looking at adding a proper EMI filter to the board, but I just don't think I have enough room on the PCB for those components, so the ferrite seems like my only option.

Some notes about the PCB design that I think may be pertinent;

PCB is small, 25mmx28mm, 6 layers with very short traces and
power/ground planes
PCB is contained within a grounded metal (aluminum) housing that is
open on only one end
12V input, 3V output, 2.5A output
Maxim integrated 500kHz switcher capable of 4A continuous output current
The regulator is very stable and running at 90% efficiency with clean/no
ringing switch node
Using a shielded 5x5mm Coilcraft inductor
The system uses a charging cradle base which has a long (1m) wire delivering
input power

Any input or suggestions would be appreciated.
Thanks


texts: Facing problems measureing Input offset voltage of opamp

texts:
I setup the following circuit to measure the input offset voltage of an opamp; in this case an 741C opamp. The circuit is the same as in one of the EEVBlog video (https://www.youtube.com/watch?v=YeNpd-sXaHk)

The datasheet (http://www.ti.com/lit/ds/symlink/lm741.pdf) states a typical value of 2mV and an maximum of 7mv. So if all goes correct, i should see an odd 200mV to 700mV in output. However I am reading -160mV there.

Now I have changed the values of R1 and R2 and here is my findings

  R1             R2            Voltage out             Calculated Vos
 100k            1k              -166mV             -166mV/101 = -1.6mV
 10k             1k              -16mV              -16mV/11 = -1.6mV
 10k             100             -166mV             -1.6mV

It seams that -1.6mV is getting amplified at the output. Then is this the input offset voltage? Why is it negative and am I doing anything wrong?

PS:

I have the circuit in breadboard.
I tried with more than one 741 IC.
I have placed 10uF caps at the opamp supply pins and ground. But the output gone even lower.
I have tried the first circuit with LM358 opamp as well. The voltage out then is around -0.04mV or -0.44\$\mu V\$ of input offset voltage, which is absurdly low. (Its datasheet says the offset voltage should be around 6mV)


texts: Can a RC 7.2V 1300mAh Ni-Mh Pack be replaced by 6xAA 1300mAh Ni-MH in holder?

texts: Can a RC 7.2V 1300mAh Ni-Mh Pack be replaced by 6xAA 1300mAh Ni-MH in holder ?


texts:
Here is the state space representation of the system.
$$\dot x=\begin{bmatrix}\dot x_1\\\dot x_2\end{bmatrix}=\begin{bmatrix}0&0\\1&0\end{bmatrix}\begin{bmatrix} x_1\\ x_2\end{bmatrix}+\begin{bmatrix}0\\1\end{bmatrix}u=Ax+Bu$$
From the eigen values we can see that there is a pole at the origin(s=0). The final question to the problem is if this pole is controllable using feedback.

Using feedback, in case I haven't translated correctly is when u has this form $$u=\begin{bmatrix}k_1&k_2\end{bmatrix}x+\begin{bmatrix}0\\1\end{bmatrix}u'$$
This will alter A in the following way $$A'=\begin{bmatrix}0&0\\k_1+1&k_2\end{bmatrix}$$ And for the eigen values $$sI-A'=\begin{bmatrix}s&0\\-k_1-1&s-k_2\end{bmatrix}\\det=s(s-k_2)$$

We can see that the s pole will always be there but how do I explain this? Do I have to say that the pole is uncontrollable or unobservable or simply that the top row of the A matrix won't change? The question gives many points and bearing in mind that I've already found A' in a previous question makes me think there is more to it.

I've read some stuff about the observability and the controllability of a system but not that much to realize if and which poles are unchangeable.
I think I can say that x1 is unobservable and uncontrollable because of the top 0 rows.

Update: Finding controllability matrix we see that the system is uncontrollable. Since we can see that k2 moves one pole is it adequate then to say that origin pole is unmovable since it's the only pole left to be uncontrollable?


texts:
This answer says it's IPC-7351, but I'm not seeing anything about land pattern dimensions in the table of contents.

I'm wanting to make footprints in Altium and I found the IPC Compliant Footprint Wizard, but I have to manually enter each of the dimensions and I don't know what to use.

Which IPC standard provides land pattern dimensions?


texts: EMI/Y-capacitor in inverter phase outputs?

texts:
Is it good or even used practice to filter out common-mode EMI in 3-phase industrial inverter (IGBT) phase outputs using phase-to-earth Y-capacitors? High du/dt might limit the lifetime of such capacitor, can ceramic y-capacitors handle this if film capacitors are in problems? 1000-3000V/us was mentioned in film capacitor's datasheet of for example TDK B81123. Any reason to use the caps in the phase outputs from the IGBT protection point of view (suppress voltage spikes or ESD)?

Wasn't able to find any literature related to the issue. Also DC-link could be tied to earth using Y-caps, not much of that either.


texts: How can there be electrons in the Fermi level?

texts:
The probability of electron occurring in fermi level is half. In case of intrinsic semiconductors the fermi level lies halfway between the valence band and conduction band i.e. in the band gap. How can electrons occur in the band gap?
Correct me if am wrong anywhere. Thanks for your replies!!


texts: How are sampling frequency of an ADC and switching speed of a multiplexer synchronized?

texts: In a typical multiplexed system if we set the sampling frequency twice, does that mean the multiplexer switch loops faster like two times? And what controls the speed of multiplexer? (By speed of the MUX I mean the speed of the pivot like switch shown under the Multiplexer diagram below):


texts: Difference between superscalar and multi-core?

texts:
I can´t seem to grasp this, what is the difference between superscalar and a multi-core processor?

I keep mixing them up, so some simple points on what they do would be great.


texts: Measuring a 2-pin active wheel speed sensor without having it connected to a vehicle

texts:
I'm trying to measure/test the square wave output of an active wheel speed sensor from a jeep wrangler for a project I'm working on. I do not have access to the actual vehicle just the sensor itself and so I was using a test rig with the tone ring attached to a lathe and bringing the sensor as close as possible to the teeth of the tone ring. At the moment I am having no luck in getting any type of signal from the sensor itself. I wasn't sure initially whether the sensor was active or passive so I tried first without applying power to the sensor and had the oscilloscope hooked up over the two pins of the sensor. No signal appeared so I assumed it must be an active sensor. I then did the same setup but this time connecting the positive pin of the sensor (I measured this on the vehicle before hand and saw it was at ~2V) to my power supply set at 2V and the other pin of the sensor to ground and then measuring over that. Again, no signal. I then read that sometimes these sensors modulate current instead of voltage so I attempted to add a shunt resistor and measure over that to no avail. I assume I am setting up my oscilloscope or power supply incorrectly since the secondary pin on the sensor is usually refereed to as the "signal pin" and not ground pin. I am almost certain the sensor I have isn't damaged as I have two of them and can't get a signal off of either.

My next train of thought was to incorporate the sensor into a wheatstone bridge and try to measure the signal that way. I haven't yet tried this but I figured I would post here first to see if anyone has a better idea of how to use these things or provide insight on how a vehicles ABS ECU does the measurement. I.e. Has anyone measured wheel speed with these outside of a vehicle? If so how did you do it?


texts:
Why is the silicon die temperature inside a semiconductor device referred to as "Junction" Temperature ?

Though this name may make sense for minority carrier devices where there is maximum power loss at the junction. But for majority carrier devices like MOS is makes less sense.


texts: Using Thevenin Theorem to solve for unknown values in BJT voltage divider circuit

texts:
Assuming this is a DC bias of a voltage-divider type BJT circuit:

V_CC = 10V
Beta value = Not Known
V_BE = 0.73V (Base-emitter voltage)

And the Thevenin circuit being:

How do I go about finding the base/collector/emitter currents without knowing the beta value? Can I assume the base resistance as Rth, and the base current to be Vth/Rth? If the latter were true, then I don't think it would be correct if I were to plug it in this equation (KVL across base and emitter to ground, Ibr = Ith = Vth/Rth):


texts: Can SSR outputs be considered dry contacts?

texts:
To save board space I want to replace relays with SSRs where possible. Most of the relays I use don't need to carry a lot of current and don't to switch high voltages. Mostly slow 24V digital signals to connect to other devices working at other potentials.
Classically relays are use for this, but SSRs would be a lot more convenient.
The question is: Can SSRs designed for DC voltages switch currents at arbitrary potentials (obviously < isolation voltage). There is really not much information about this.


texts: Light sensor connected to GPIO input of raspberry pi

texts:
I have created simple light dector. Schemea is below:

Real circuit on breadboard:

I have written code in python using GPIO library:

import signal
import sys
import RPi.GPIO as GPIO
import sqlite3
import datetime
INPUT_GPIO = 16
def save_light_event_in_db():
    try:
        conn = sqlite3.connect('/home/pi/databases/light_sensor.db')
        cur = conn.cursor()
        cur.execute('SELECT * from light_events')
        light_time = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
        message = "Wykryto świt!"
        sqlite_insert_with_param = """INSERT INTO light_events
                              (created_at, message)
                              VALUES (?, ?);"""
        data_tuple = (light_time, message)
        cur.execute(sqlite_insert_with_param, data_tuple)
        conn.commit()
    except Error as e:
            print(e)
    finally:
       if conn:
           conn.close()

def signal_handler(sig, frame):
    GPIO.cleanup()
    sys.exit(0)
def light_detection_callback(channel):
    print("Yeah, juz swita, wstawać!")
    save_light_event_in_db()

if __name__ == '__main__':
    GPIO.setmode(GPIO.BCM)
    GPIO.setup(INPUT_GPIO, GPIO.IN, pull_up_down=GPIO.PUD_UP)
    GPIO.add_event_detect(INPUT_GPIO, GPIO.FALLING,
            callback=light_detection_callback, bouncetime=1000)
    signal.signal(signal.SIGINT, signal_handler)
    signal.pause()

This circuit should detect event only when light has turned from night to dawn.  I have configured pull up resistor on board. On board I use: GL5539 photoresistor, which has light resistance in range 50-10k, dark resistance 5 mega ohm, 2N3906 PNP transistor.

The problem is, it records also events with  twilight.
I have checked voltage level on photoresistor and there is 2.63 V in daily light, but when I put my finger on photoresistor, then voltage is rising up to about 3.0 V(small than 0.7 V) and event is detected by input GPIO port. Why?
When I takee off my finger, then event is alos detect and that is correct. But first siutation shouldn't be detected.
I would be grateful for explanation, some advices.
Best regards


texts: VHDL functions with generic or "run time variable", synthesis issues

texts:
I have been thinking about functions in VHDL. If we have a function we could have both a function where we pass a "generic" (i.e. a fixed parameter known at compilation time) and a variable/signal (which contents is know at "execution" time).

So what i was considering were.. if in a function we pass as input a "generic parameter" and only such parameter it means that basically such function is an expression which result is deterministic, otherwise because the input could vary anytime.

How such situation affect a synthesis? Would the compiler synthesize a register with the expression evaluation result? or would it try to synthesize some extra logic too?

As instance suppose we have an entity (there will be some syntax error on purpose)

entity ent
 generic(n : unsigned);
 port(x : in unsigned; ...);
end entity;

architecture arch of ent is
  function my_f(i : unsigned) return unsigned is
    variable k : unsigned;
  begin
    -- something
    return k;
  end function;
begin
  --body
  -- end body
end architecture arch;

What is the difference (in terms of synthesis if there is) if do a call like

y <= my_f(n); -- i'm using a generic

instead of

y <= my_f(x); -- i'm using the input

The parameter n wouldn't change at run time, instead x (as stimulus) could change anytime. So would the synthesis tool synthesize all the necessary logic to manipulate n in the first case? or would it be smart and simply it would evaluate the function and will substitute the result in a possible assignement?

Hoping it's better now.


texts:
When we apply a sinusoidal voltage source as input to a peak detector circuit (assuming capacitor is initially discharge and ideal diode and ideal voltage source), the diode becomes in forward biased for first positive peak and charging of capicitor takes place until peak of the source voltage. But after that diode becomes reverse biased because capacitor voltage becomes higher than source voltage but I cannot understand how and why  capacitor voltage does not follow ideal voltage source all the time?
What's wrong in this theory as follows? A capacitor is connected parllel to an ideal voltage source when diode is in forward bias so capacitor voltage must follow ideal voltage source at all times to satisfy KVL condition?


texts: 16 bit breadboard computer SRAM Writing Issues

texts:
I'm currently working on the RAM of my 16 bit computer which consists of two AS6C6264 SRAM chips.
On each chip I have CE2 connected to 5V, CE# connected to ground, WE# connected to 5V through a pull-up resistor and a button that is connected to ground. To manually write to the RAM, I have two 8 pin dip switches that go through data selectors and into the inputs of the RAM. Whenever I push the button, WE# goes low and the data from the data selectors is written into the RAM.

For whatever reason, this works perfectly fine whenever there are 5 or less dip switches in the up position. Whenever there are more than 5 dip switches in the up position and I try writing to the RAM, it doesn't seem to write correctly to the RAM, and at a certain point, it just writes all 0's.

I have no idea what to even look for, I tried looking at some of the pins on an oscilloscope, but it hasn't really shown me much, other than that there is noise.

Thanks for any help or advice.


texts: Why are capacitor sizes rarely expressed in nanofarads?

texts:
Many capacitance values occurring in electronic circuits can be conveniently expressed in nanofarads, e.g. "a 10nF decoupling capacitor" .

However, the use of the term "nanofarads" or its abbreviation "nF" is often avoided and instead the numerically equivalent terms "10000pF" or "0.01μF" are used. The first term is three characters respectively two syllables longer while the latter is two characters respectively five syllables longer. This seems inconvenient, so there should be a reason for that.

Nanofarads are avoided by

distributors, e.g. Digikey, Mouser, Farnell, but not by RS;
manufacturers, e.g. AVX, Kemet, Wima, but not by Vishay;
and engineers, e.g. Robert Kollman from Texas instruments.

As an example reference, here is a screenshot from Digikey:

Interestingly, resistances and inductances are generally stated without avoiding a particular prefix.


texts: How does the Common Emitter amplifier ensure low distortion?

texts:
My understanding of a small-signal amplifier is very limited. From what i've understood from this article is that for a BJT in the CE configuration, it provides minimal distortion at the output, I also know that a proper biasing is required for the BJT to operate at a quiescent DC point such that there will be minimal distortions from the original input signal.
However, does this mean that I will need to configure a biasing such that the BJT will be operating at linear region so as to reduce the distortion from my small signal? If so, what exactly are these "distortions"? And why does the common-emitter mode prevent this while the common-collector does not?


texts: Altium - Interactive Routing Tool not locking to component pins

texts:
I am having a small but frustrating problem with Altium version 9.4. When I use the interactive routing tool on either the top or bottom layer the tool does not 'lock', indicated by the crosshair appearing, when hovered on the pin? but it instead automatically routes around the pin itself at all costs.

Is there any potential setting that I have changed that anyone knows of? I cannot find any help in their tutorials to change this. Below is a picture of the settings of my current interactive routing tool.


texts: can ct sensors share a common fixed reference point?

texts:
In a previous question, I asked how to amplify a CT sensor, essentially a small transformer that induces a voltage proportional to the current in the primary circuit. The solution has one leg attached to a voltage in the middle (2.5V for a 5V source):

op amp for CT sensor

Can I connect multiple CT circuits sharing the same base voltage or will that create a lot of noise and/or affect each other? In other words, if I want to create 8 of these, can I share the voltage divider among all 8 circuits?  Would making C1 larger help?  Further, if two CT sensors were observing circuits from different phases, would that be a problem?

My intuitive sense is that a 100uF capacitor and many CT sensors sharing the same base voltage should be more stable rather than less, is that wrong?


texts: a question about Phototransistor OPB608A

texts:
I use a phototransistor OPB608A in my system,shows as below.After capacitor C5, the voltage is 5.5V, that means it will give 5v supply to Pin 1 and Pin 3 of OPB608A, the resistors values are 7.5K and 150 Ω,respectively.However, when i use multimeter to measure at point A, it always shows 1.71 V no matter there is something or nothing in front of phototransistor. but when i use stabilized voltage supply to do the same test, the result will be normal---that means when i put a paper in front of phototransistor, the voltage will decrease to nearly 0V, if there is nothing, then it will be nearly 5V.
Someone can tell me why this happened?thank you so much.


texts: Measuring battery voltage via ADC or Vref

texts:
I have a setup that takes voltage samples of my car battery periodically, but I'm trying to simplify it.

Right now it's based on a buck converter taking 12v down to 3.7v to run an ATTiny, then a second connection to a voltage divider that's calibrated to scale 0-14v (max battery voltage I want to measure) to the ATTiny's ADC.

The issue is spikes occur on the battery which cause that voltage divider to supply the ADC with more than Vcc + 0.5v (the max the datasheet lists for any pin).

It works but my current setup depends on the internal clamp diodes to handle those voltage spikes on the ADC pin. I chose the resistance values on the voltage divider to limit the current across the diodes to ~1mA, but I understand that driving the pin out of spec as part of my design isn't a good idea (I got the idea after looking at a design from Atmel that seemed to be measuring mains voltage relying on those clamps).

I've found dozens of different circuits designed to clamp the voltage externally, but I was having trouble understanding which ones had the best characteristics for what I'm doing (my main focus is on measuring the 11v-13v range with .1v accuracy). Is there a specific design that'd be ideal for the range and sensitivity I want?

P.s. What'd I'd really like to do is to find a way to scale my 12v battery input to Vcc and use the internal voltage reference to infer the battery charge. That'd remove the need for the second input going to the ADC from my understanding, but I don't know how accurate that would be, and how I can get the battery input clean enough to power the ATTiny without also distorting the value I'd get for battery input


texts: Is it possible for an FPGA to "partially" configure?

texts:
I have a spartan 6 board that I designed and am having some configuration issues.  I'm using SPI flash to program the fpga (e.g. I use jtag to write the flash and the flash then writes the fpga).  The schematic I used for the configuration can be found on page 42 of UG380 from xilinx.  http://www.xilinx.com/support/documentation/user_guides/ug380.pdf

Most of the time I'm able to program the device without issue using either the jtag interface (directly programming the fpga) or the spi flash (indirectly programming the fpga) -- everything comes up as expected.  There are, however, instances where it seems as though the fpga doesn't configure properly despite the fact that the done pin goes high (I have an LED indicator on the pin and have monitored with a scope).  This manifests itself in a few different ways.  Among other things this board drives a VGA dac.  I wrote a test bench to drive color bars to a monitor.  75% of the time if I reset the board (hard pressing a button that drives program_b low) the color bars come on as expected.  25% of the time I get nothing out of the vga dac.  It seems as though some of the pins that drive the dac don't toggle (the 75% of the time everything works correctly they do toggle).  In addition to the dac I have a test led that I drive with the msb of a counter, which just divides the 100 MHz system clock so that it blinks ~twice a second.  That pin seems to come up without issue every time.

Given these observations I'm wondering if it's possible that sometimes the fpga isn't properly configured -- or perhaps is partially configured (e.g. the pin driving the led comes up without issue, the pins driving the dac don't).  The xilinx user guides indicate that the configuration routing is pretty sensitive -- in particular the configuration clock needs to be properly terminated.  I'm wondering if it's possible that the there's a layout issue, which causes the fpga to occasionally botch configuration.  I'm not super familiar with the way the configuration actually works (especially with regards to verification) -- it's always "just worked" on my previous boards, but it seems odd to me that the done pin goes high every time without a hitch, but I'm still seeing this behavior.


texts: S11 all on the outside of the Smith Chart

texts:
How should someone conclude what's going on on a TX line that has a Smith Chart that goes around and around the outside?
I've reworked a board and expected to see a curve pass close to (0,0), but what I saw was all the curves going around and around the outside.

The Log plot is pretty flat and the phase plots look like sawtooth waves.

Is this a bad solder joint that I'm not seeing that's causing this reactive action in the line?