texts:
Based on this article:
https://hackaday.com/2017/04/04/the-shocking-truth-about-transformerless-power-supplies/

I have some rf wireless plug outless which use transformerless power supply.

I would like to build in an ESP32 (3.3v) in it. I don't know currently what output the transformerless powersupply in these produce but I seen some 24V relays so I have to check.

My questions are:

1, Regardless that it is not safe to connect an ESP32 through the mains as the article explains, is the output of a TPS fine grain enough to power an ESP?

2, In the article it states: "excess current is shunted to ground when the load draws less than the 25 milliamps", an ESP32 power consumption is between 100-250 mA (using wifi) why does it matter how much my load drains?
For example let's assume that this circuit I wan't to modify would output 3.3V to the board, would I still need to modify it if my load is different?

3, Is there some online calculator for TPSes where I can put in my load value and desired voltages and it will calculate what cap and resistor(s) will I need?

Thanks


texts: Explain how this CCTV video balun actually works?

texts:
I am trying to reverse engineer this video balun. It is meant to convert a 100~120 balanced video signal on twisted pair to a 75ohm unbalanced signal. I've removed it from it's housing, but normally there are a pair of screw terminals on the skinny end and a BNC connector on the fat end (square pads are positive):

It has a trifilar winding composed of L1a, L1b, & L1c on a toroidal core. All three windings are the same (~30 turns). I have no data on the core itself, but I would assume we are getting proper transformer action. There is a 4V bidirectional zener diode in parallel with the balanced input and a parallel RC circuit in series with two of the windings. I am familiar with Ruthroff and Guanella baluns, but I am having a bit of a time understanding how this one works. I've reverse-engineered the PCB to get the following schematic (note the dots on the windings):

I know that the zener is just there for transient protection and is not part of the actual balun circuitry. I suspect that the RC circuit is there to provide gain that increases with frequency (impedance drops from 1k at DC to 256 ohms at 6MHz), and perhaps does a dirty 100ohm to 75ohm conversion via loss?

Any concise explanation of the way the coils achieve the balun operation and the role of the RC circuit would be greatly appreciated. These devices are ubiquitous in the CCTV industry and I've never been able to suss out how they work in a way that satisfies me...

Thanks!

EDIT: in an earlier version I erroneously stated that the current in each winding would be the same due to proper transformer action. This clearly is not the case; I'm not sure why my mind assumed that...


texts: TIP120 LED strip dimming with flickering problem + questions delay

texts:
I need some help with my Arduino program.
Let me introduce the hardware and the goal.

There is two white LED strip each one of them are controlled by TIP120 transistor.

There is an potentiometer to set-up manually the full brightness value of the fade effect.

So, when The PIR sensor detect an human the first LED stip fade effect to the maximum brightness thanks to the potentiometer value read before. The second one has its fade-in effect just after the first LED strip.
The LED strips are on for 6 seconds after power on and each are extinguished with fadeout effect.
Problem:
When the first LED strip finish to fade-out it stays slightly on. How to fix this?
Video to show the problem:
https://imgur.com/a/Uf3pZbC
Moreover I noticed below the value 100 for fade-in/fade-out, the LED strips flickering slightly, how to fix that?
Delay question:
-As you can see there is an little delay for the second LED strip power. How to remove this delay and power it directly when the first LED strip have finish his fadein?

I would like to know, how to start the second LED strip at the same time like the first one but with a difference of a second than the first.

If you have any suggestion to improve my code you are welcome!
The code:
int PIR = 4;              // the pin that the sensor is atteched to
int TR = 3;               // the pin that the TIP 120 Base is atteched to for the first led strip
int TRB = 5;              // the pin that the TIP 120 Base is atteched to for the second led strip
int ledDelay = 5000;          //time to wait untill light switch off
int pwm;

void setup() {
  pinMode(PIR, INPUT);    // initialize sensor as an input
  pinMode(TR, OUTPUT);    // initialize TIP 120 as an output
  pinMode(TRB, OUTPUT);   // initialize TIP 120 as an output
  Serial.begin(9600);     // initialize serial
}

void loop(){
      pwm = analogRead (A7);
      pwm = map(pwm, 0, 1023, 0, 255);
     Serial.println(pwm);
  if (digitalRead(PIR) == HIGH) { // check if the sensor is HIGH
     Serial.println("Motion detected!");
  for(int fadeValue = 0 ; fadeValue <= pwm; fadeValue +=5) {

    // sets the value (range from 0 to 255):
    analogWrite(TR, fadeValue);
    // wait for 60 milliseconds to see the dimming effect
    delay(60);  // turn LED ON
    }

 delay(100);
     ///

  for(int fadeValue = 0 ; fadeValue <= pwm; fadeValue +=5) {

    // sets the value (range from 0 to 255):
    analogWrite(TRB, fadeValue);
    // wait for 60 milliseconds to see the dimming effect
    delay(60);
    }
  delay(100);

    ///
        delay(ledDelay); //time to wait untill light switch off
    for(int fadeValue = pwm ; fadeValue >= 0; fadeValue -=5) {
    // sets the value (range from 0 to 255):
    analogWrite(TR, fadeValue);
    // wait for 60 milliseconds to see the dimming effect
    delay(60);
            }
    for(int fadeValue = pwm ; fadeValue >= 0; fadeValue -=5) {
    // sets the value (range from 0 to 255):
    analogWrite(TRB, fadeValue);
    // wait for 60 milliseconds to see the dimming effect
    delay(60);
            }
            }

  else {
    digitalWrite(TR, LOW);       // turn LED 1 OFF
    digitalWrite(TRB, LOW);       // turn LED 2 OFF
    Serial.println("Motion stopped!");
    delay(100);                   // delay 100 milliseconds
  }
}

Picture of schematic

Note :

The led strip I used are 5V 3528 warm white not rgb
Power supply of led strip is a step down converter on 12V battery(setting on 5V 2A).


texts: What causes a fuse to blow, the current or the power?

texts:
Fuses and circuit breakers are often specified at a certain current they will 'blow'.
Increasing the current will also increase the power.
So if a fuse is rated for 12V DC and 20 A, this would be equal to 240 watts. If a different voltage is supplied, will this change the current at which the fuse will break? Does the fuse technically 'blow' at 240 watts?
If 6V DC was applied to this example fuse, 240 watts in this condition would be 40 A when the fuse would 'blow'. Am I correct? Or does the fuse always 'blow' at 20 A, regardless of the voltage?


texts: Ohm's law doesn't seem to be working for this electric motor

texts:
I'm a beginner in this field so please forgive me if I'm confusing with my question.

There is a component that I can't understand with Ohm's law which is a washing machine drain pump. Washing machine drain pumps from most manufacturers have similar specifications. Their winding resistance is usually between 10-20 Ω and it operates under 120 VAC.

However the specifications written on the label are quite different.
120 VAC, 1.1 A, and 80 W.

The actual current draw, 0.9 A, is close to the specification value which is 1.1 A.

I really don't understand that according to Ohm's law the resistance value calculated per the specification should be (R = U/I) 133.33 Ω where U is 120 V and I is 1.1 A.

But why is the winding giving me 14.8 Ω?

Shouldn't it draw 8.11 A as I = U / R = 120 V / 14.8 Ω = 8.11 A?


texts: How to implement a multiple precision integer multiplier using digital circuits?

texts:
Many cores and GPU can do multiple-precision multiply for example: one 16 bit multiplier = two 8 bit multiplier = four 4 bit multiplier.
I have implement such a multiplier by manipulating the partial product based on radix-4 booth encoder and 5-3 compressor and CLA, but the area is much bigger than writing 3 * directly,
c = mode ? a*b : {a[H]*b[H], a[L]*b[L]};

Is there any trick or paper to optimize the area of my design?


texts:
So, I know that when you're talking about something like a circuit that includes a battery, a circuit LOOKS like a loop, but that's merely because of the fact that the power supply is physically close to the output.

However, this doesn't have to be the case, right? Batteries are just self-contained because it's convenient, but you could drain a power source by connecting it to ANY positively charged endpoint, if I understand this right.

Are circuits therefore considered loops just because it's convenient to think of it that way? As a river cannot flow in a circle, neither can electricity because it would work out to a net zero potential thus meaning no movement!


texts: Does 2g/3g rf receive circuit path work for 4g if they are in the same band?

texts:
I am wondering that if the rf receive path for gsm/wcdma can be used to receive lte fdd signals? provided that gsm/wcdma/lte are in the same band e.g. band8 downlink frequency 925-960mhz, and the transreceiver support all these bands.

Signals from antenna pass switch/lna/filter to transceiver, along the way all the process units are related to physical frequency rather than logical network protocol, so I think it should work for whatever network built on the same frequency band. So I can use gsm saw filters/baluns for the same band lte receive path?

Please correct me if Im wrong, thank you very much.

Update:

Specifically, I want to use fdd band8 downlink analog path(from asm to transceiver), to receive wcdma/gsm band8 signals, is this possible and practical?


texts: How reliable is using couplers to extend Ethernet cables?

texts:
I want to obtain one 90 meters of Ethernet CAT6 cable(with RJ45 connectors) by using three 30 meters of CAT6 cables with RJ45 connectors. The only option I could find is to use three such couplers.

Would using such extenders/couplers cause any performance or noise issues?


texts: Is a normally high switch the same as a normally closed switch?

texts:
I'm very much an amateur when it comes to electronics so apologies for the stupid question. I have a switch that is normally high (5V) and then when i hit the mechanical button it drops to 1V. I need to configure my CNC firmware for this. So are these normally open or normally closed switches?

To me this would be a normally closed as with a normally open switch you wouldn't have a voltage when the mechanical button is not pressed, but the spec page for my switch says it is normally open so I am confused.

Thanks in advance!


texts: How to design a Design a 32 x 4 memory using two 16 x 4 RAM chips

texts: I have this task to "Design a 32 x 4 memory using two 16 x 4 chips". But on Google I can't find what a 16 x 4 RAM is. I know the basics of latch, flip-flops, TTL, CMOS etc. But I can't put this together. Where do I start?


texts:
I need some help to fully understand how this circuit works (credits to Audio Design Guide):

simulate this circuit – Schematic created using CircuitLab
My doubts are in the operation of the MOSFET. I tried to gather some information from my books and online, and the summary of what I know about it is:

R2, R3, R1, C1, R5, D1 and M1 work as something called a "capacitance multiplier"
The above mentioned components work as a ripple filter
The B+ Out voltage is determined by the R2 - R3 voltage divider.
B+ Out takes circa 110 seconds to reach its maximum

From my understanding the ripple is minimized by the R1 - C1 lowpass.
What I don't understand is what the MOSFET does, how it operates. Can you give me a hint?


texts:
I am trying to read input from an optical rotary encoder that changes its state 360 times per rotation. My code currently reads the state from an arduino digital pin as fast as possible and counts when the state changes. This works while the motor spins slowly, but it misses a lot when the motor speeds up.

How can I detect changes in the state more accurately? Can I get an IC that would do this?

void setup() {
  pinMode(12, INPUT);
  Serial.begin(9600);
}

int count;
int last;
void loop() {
  int b = digitalRead(12);
  if (b != last){
    count++;
    Serial.println(count);
  }
  last = b;
}


texts: High frequency blinking LEDs and sensor for that

texts:
I want to make LEDs blink rapidly. (more than 1000 blinks/sec., faster is better)

First, I am curious that the common off-the-shelf LEDs have a capability of blinking with such a high frequency.

Datasheet of LEDs that currently I'm using is here. I have no idea which information I should see for my purpose. Or you could suggest me other products.

Second, is there a sensor (photoresistor, etc...) that have such a good time resolution for sensing rapidly blinking LEDs.

My candidates are two, CdS cell photoresistor and Light sensitive Voltage generator. Again, which information I have to look into?

p.s. I'm asking these questions since I want to build a visible light communication systems. I have succeeded in making LEDs blink 32 times per second. But beyond that, I cannot figure out whether it works or not with bare eyes.


texts: A path for capacitor's charging, and another for discharging it

texts:
I've been lately reading about capacitors, but all the formulae needs of resistance to work. However, there might be cases where resistors aren't present on the charge or discharge paths. Consider the following circuit:

Initiallly, both Q1 and Q2 are closed, and the capacitor C1 is discharged.

Then Q2 opens (the capacitor is charged through the diode D1) and then closes.

Q1 opens, the capacitor discharges through it and R1 to ground.

What I want to is calculate the time needed for C1 to charge and discharge, so that I can adjust it to my needs.

I think I'm doing the discharge part right (not sure because of the presence of Q1 there, though).

So my question is, can somebody solve both parts for me on the above circuit so I can get to know how it's done? An explanation would also be useful (i.e.: what resistance value to use when charging in cases like these, as the is no resistor?, does Q1 presence actually matters when calculating discharge times?).

Edit:

Thanks a lot guys. I just drew that circuit on a moment, as I'm myself done a mess with all the capacitor theory and I didn't even express myself properly (with closed I meant: non-conducting, and with open I meant: conducting).

This time I'll put the original image, as I should have done in first place:

This is a basic discrete half-bridge driver for blcd motors (nmos-based), and what I'm trying is to calculate minimum and maximum on-off times that 10uF capacitor could provide, to then, change it according to my needs, if at all needed.

As some of you said and I guessed, the transistor shows some resistance from collector to emitter while coducting, that's ok.

But I'm still not understanding what resistance should I use in the formulae when calculating the charging part if there's no resistor present (npn conducting, low side nmos conducting enough time for the capacitor to charge up, to then let the npn have a rest so the capacitor discharges on to the nmos gate through the resistor, turning it on).

Perhaps it's just a dumb question, I even got a bit stressed looking on the internet for an explanation/tutorial of a capacitor charging/discharging  without a resistor, in the hope of getting to understand all this (though I know a resistor is needed in a real circuit to limit the current).

All I can see from the second circuit posted is that the capacitor charges up quicker than it discharges, but can't do the maths because on the charging path there's no resistor, but the diode, so in cases like this, should I use some small value or what?


texts: How can I start PIC Microcontroller Programming on Mac OS X. Can I use an Arduino connected to my Mac has a programmer? Or do I need to buy specific programmer board and serial adapters?


texts: Handle simultaneous charge/discharge with a BMS

texts:
I am building a series of 13s LiPo battery packs, each with a BMS with B- P- and C-. They are to be charged with a regulated source from a PV array. I know this likely depends on the specific BMS, but is it a good idea to charge the batteries from the positive terminal through to C- whilst current is being drawn through P-?
It's a 13s pack, so 48v nominal, and I'm using these BMS boards. The C- is the return path for charge current, other end goes directly to the battery + terminal.
https://www.ebay.co.uk/itm/13S-35A-48V-BMS-PCB-PCM-10S-16A-36V-Lithium-Battery-Balance-Protection-Board/273903859351?ssPageName=STRK%3AMEBIDX%3AIT&var=573754221165


texts: I need to design a constant current driver for a filament LED bulb. The input is 230VAC and the output should be 120VDC, 20mA (constant current) for 4 filaments arranged in series-parallel structure. Can somebody please help me to find a simple transistor-based solution or some small linear circuit with low BOM cost.


texts: What is the precise definition of forward and reverse bias for a P-N junction?

texts:
I have always thought that for a P-N junction, forward-biased simply means that \$ V_{PN} > 0 \$ and reverse biased means that \$ V_{PN} < 0 \$.

However, in this article about NPN BJTs, there is the following sentence (emphasis by me):

  Vbe < 0.7V(emitter-base junction is not forward biased)

So it defines forward bias of a P-N junction as \$ V_{PN} > V_{th} \$, where \$ V_{th} \$ is the threshold voltage for the junction to conduct.

So which one is the correct definition of forward-bias? When I see an expression like: "Base-emitter is forward biased" should I understand:

\$ V_{BE} > 0 \$

Or

\$ V_{BE} > V_{th} \$


texts: Does boosting circuit requires a switch for not draining the current? Is there any anoter alternative for this case?

texts:
Iam using 134n3p module to boost the voltage from 3.7v to 5v and using that 5v to light up SMD LEDs.
I removed the 5V USB hub and connected the 5V and GND pins to my LED circuit.
When I am connecting the battery to B+ and B- pins of the module, it is taking around 19mA (calculated) and my battery is getting drained very fastly (Im using 350mAh Lipo battery). So, a switch needs to be used in between to stop thr draining.
So, instead of using a switch between battery and B+ pin, is there a way we can make the current 0mA?
Can we use MOSFET as a auto switch? what would be the schematic in that case?
The link below is the 134n3p module.
http://www.centiot.com/134n3p-5v-step-module-lithium-battery-charging-protection-board-boost-converter-led-indicator-diy-power-bank.
I am planning to make custom PCB so that I can put my LED circuit and 134n3p module together on same PCB.
Been searching in the internet, but I couldn't the IC which they are using in the circuit.
It would be helpful for me if I can get the schematic of the module.


texts: Cleaning procedure for electronic tools and equipment?

texts:
I recently had to work from an old building which was in poor repair in order to get access to three phase power.

I stripped down the room etc. so that there was a bare concrete floor but still after working there I feel some of my equipment needs a good clean to remove any trace elements that may have got on it.  It may sound daft but having worked in clean rooms, etc., cleanliness is very important to me.

Can anyone recommend a good cleaning method for my equipment (solder station, oscilloscope, wire cutters, tweezers, etc.)?


texts: Measure current of multiple loads with one sensor?

texts:
I have been doing some research for my project which requires to measure power consumption of 8 different loads. For that I plan to measure current in each line and multiply that with the voltage of single phase (220v).

I've been searching and have not been able to find a cheap current sensor. Sensors like ACS712 are available but for about $3 for one which means $24 for 8. That's way to expensive for my project.

So I was wondering, is there a way to use one current sensor, such as ACS712, to measure current in 8 loads (working on the same phase).

I am using arduino for the project.

Thank you.


texts: Directly wire inverter to switches/lights/etc

texts:
I have a 12V deep cycle marine battery that is charged by a 20W solar panel. This works well. However I would like to use the battery to run two 120V 170mA 15W LED lights in a shed. So as I understand it, that means I need to connect an inverter to the battery to change the current from DC to AC. My issue is that I can only find inverters meant for cars which have wires (or alligator clips) to connect to the battery (fine) but then only output power to a receptacle. Something like this.

To connect this inverter to the light and a switch, I need wires. Since I can't seem to find an inverter that has output terminals I am wondering if plugging in a extension cord then cutting it to getting wires is advisable.

Am I understanding this wrong? Don't I need wires to power those lights. By my calculations I should be able to power those two lights easily. However I am very confused as to why I can't easily find an inverter that uses outputs wires. Are my terms incorrect? Does a lack of this product indicate my thinking in flawed?

Thanks in advance.


texts: What happens when you put two rectifiers in series to get DC from a stepper motor?

texts:
For a project a stepper motor is used as a generator because of the decent amount of power at low RPM. Now have found that one rectifier is sufficient when placing the coils in series. First however, a rectifier was used for each phase. The RPM was regulated to the input of the stepper generator without load and the following was found:

AC out (single phase): 12.7 V
DC out (single phase): 13.8 V (with a double bridge rectifier 1000V, 15A)
DC out (two phase)   : 15.9 V (with two double bridge rectifiers in series)
DC out (two phase)   : 20.1 V (with phases in series and a single bridge rectifier)

Everything makes sense considered the voltage drop across the rectifiers diodes except when putting the rectifiers in series. Why is this not close to the 20.1 V?


texts:
I want to connect a Pixhawk 4 (It's a flight controller) to a Raspberry Pi 3. Therefor I purchased this FTDI USB adapter. Its pinout is the following:
1   DTR
2   RX
3   TX
4   VCC
5   CTS
6   GND

The Pixhawk has a output Port called TELEM 2, which is supposed to be used for this purpose as described here. Its pins are the following:
1   +5V
2   Tx
3   Rx
4   CTS
5   RTS
6   GND

All the pinx fit together except for the Pixhawk's RTS pin and the breakoutboard's DTR. So I was wondering, if I can just connect the breakoutboard's DTR to the Pixhawk's CTS?
The breakout board also has an actual RTS pin, but there is no header soldered onto that pin and I don't have a header nor a soldering iron available here.
EDIT:
As it was pointed out to me by @justme that it depends on how the software handles the handshakes, I would like to add, that the software that is most important to me in this context is the Open Source project MAVSDK. In the github repository in the file src/core/serial_connection.cpp I found the following lines of code:
if (_flow_control) {
    dcb.fOutxCtsFlow = TRUE;
    dcb.fDtrControl = DTR_CONTROL_HANDSHAKE;
    dcb.fRtsControl = RTS_CONTROL_HANDSHAKE;
} else {
    dcb.fDtrControl = DTR_CONTROL_DISABLE;
    dcb.fRtsControl = RTS_CONTROL_DISABLE;
}

So I guess in this case the Handshake can be deactivated by setting _flow_control to false.
What do I need to look for in the source code, if I want to know, if my Pin connections will "not work at all, or it works poorly, or it just works"?


texts:
I have tried to use my Open bench logic sniffer to capture data from a VGA output.

I'm pretty sure I understand how the waveform should look, but I not getting consistent data. It feels very shaky to be honest.

I heard somewhere that you must have a sampling rate that is 10x the signal frequency to have enough resolution, so 640x480 VGA is clocked at 25 MHz and OLS has a maximum sampling rate of 200 MHz. Could that explain the situation?

Can anyone

A) recommend something a step-up from OLS and

B) weigh in on the issue. Are my conclusions right or are there operational problems from my side with the hardware/software at hand ?


texts: What is this component called (Plastic housing with screws for connecting wires)?

texts: This is part of a PIR sensor circuit. The component in question is the black array where wires can be fastened. I tried searching the web, but for lack of any tangible keywords, I came up empty handed.


texts: Electric motors with both stater and rotor as electromagnets

texts: I am totally new to the Electrical area. I wanted to do a project on Electric car which needs an Electric motor which is highly powerful and efficient. Are there any motors which have both stater and rotor as electromagnets without the brushes?. Thanks in Advance.


texts: Pseudorandom bit generator: analogue circuit for microcontroller digital input

texts:
I want the most cost effective way for a basic pseudorandom number generator in a microcontroller. I will use the PIC16F54 which has extremely limited resources. I am thinking about using noise with simple analogue circuitry to generate random 1's and 0's at one of its digital inputs. The degree of randomness is not critical. However, the level of EMI noise that the circuit will be subjected to is unknown, besides the fact that it will be in a residential setting with little or no shielding.

Are there any particularly simple low-cost circuits that could be used? Or should I simply focus on some basic algorithms? (There will be one random seed generator: a push switch, after which the algorithm could do its thing. I should probably ask on Stack Overflow for some simple algorithms).


texts: Understanding Buck Converters and Solar Panels

texts:
I have a solar panel rated at 5V 80mA and want to increase the output current significantly higher to around 500mA and decrease the voltage to either 3V or minimum of 2.7V, how can I go about this?
I understand physics, but I need to know can a buck converter increase current this high from a step down of 2V?
I am trying to power a Module that needs 2.6-3.6V and a minimum of 400mA to turn on. But then I only need an average of 50mAh to stay on during the day.
The solar Panel below:
https://store.sundancesolar.com/5-0v-80ma-solar-cell/
Also I have been thinking about using a Supercapacitor because I only need 500mA for 1 second to startup my module. And then an average less than of 5mAh to keep it on.


texts: What kind of chip can a person download sound from PC into

texts: What kind of chip or device can you use to download 1 minute of music or sound from your PC into it and this same chip or device will sound what you downloaded into it when connected to a small micro controller?


texts: How to ON/OFF two fans with 3-state rocker switch?

texts:
I have a 3-state switch, It has 3 pins. It can have 3 state as you can see in the picture below. when it's off (i.e on O) the middle pin is not connected to anything! When it's on I, the middle pin is connected to I and when it's on II the middle pin is connected to II. Easy, Right?!

Now, I have two 5 volt DC fans and a 5 volt battery. I wanted to build a connection between these four elements that when the switch is on O, both fans are off. When it's on I, one fan is on and when it's on II, both fans will be on. I wanted to avoid using any other logical elements like gates or diodes, etc...

simulate this circuit – Schematic created using CircuitLab

All I want to have is just one switch, two DC fans and one DC battery. I couldn't figure it out how to do it, so I'm asking here! :)

If there is no way of doing it, is there a way to build it with minimum extra required elements?


texts: How to Debouce Six Buttons on One Analog Pin With Arduino

texts:
I'm using analog pin 5 on Arduino to detect presses from 6 push-buttons. On the picture top-right button is number 1 and then from right to left they go as 2, 3, 4, 5, 6. Program should print 0 when none of the buttons is pressed and if one of them is presses, it should print its position as I mentioned before. Currently the problem is that if I press say second button, it will (instead only once) sometimes print 2 a couple of times. I guess it is because of the "noise" when button is pressed and that it should be debounced, but I don't know how to debounce analog pin.

My code:

int old_button = 0;
int button;
int pressed_button;
int z;

void setup () {
  Serial.begin(9600);
  pinMode(A5, INPUT);
}

void loop () {
  z = analogRead(5);
  if (z > 1021) button = 0;
  else if (z > 511 && z < 514) button = 1;
  else if (z > 680 && z < 684) button = 2;
  else if (z > 766 && z < 770) button = 3;
  else if (z > 817 && z < 822) button = 4;
  else if (z > 851 && z < 856) button = 5;
  else if (z > 875 && z < 880) button = 6;
  else button = 0;

  if (old_button == button) {
    old_button = button;
    pressed_button = 0;
  }

  else {
    old_button = button;
    pressed_button = button;
  }
  Serial.println(pressed_button);
}

Circuit (2200 ohm resistors):


texts: How to fight static charge/constant electromagnetic on Arduino (attachInterrupt)

texts:
I have short wires with button attached to pin 2 and ground. However, even without touching anything, the led is toggled many times a minute. Due to that (I guess) it is reacting to my button press very very randomly. It looks like the constant charge on the wires are interfering the actual button press and acting like antenna. I've tried different Arduino UNO boards, same results, so the board is not faulty.

int pin = 9;
volatile boolean state = LOW;

void setup()
{
  attachInterrupt(0, blink, CHANGE);
  pinMode(pin, OUTPUT);
}

void loop()
{
  digitalWrite(pin, state);

  delay(1000);// for debug purposes
}

void blink()
{
  if (state ==LOW)
  {
    state=HIGH;
  }
  else
  {
    state=LOW;
  }

}

Will appreciate if anyone can recommend hardware solution to this.


texts: Creating a State Diagram and State Table with known output

texts:
I've been given a word problem, and I must make a state diagram followed by a state table.

The problem reads
Design a circuit that has two inputs, clk and X and produces output O. X may change every clock cycle and the change happens at the falling edge. The circuit samples the input at every rising clock. O = 1 if the last values of X over the last three cycles were 101.

Here is the diagram I made

I lost points on it, and my professor said it is supposed to look like this

I don't quite understand this. I get that from S3, if X = 1, it goes back to S1, because when X is 1, we have made progress towards 101. However, why does S2 go to S3 when X is 0 and not 1? And why does S3 cycle back to S2 at 0?


texts:
I need to implement a pull-down resistor for a project, but I am unsure of what resistor to buy. My circuit deals with 5v inputs. Essentially, I am trying to make this: keypad scanner.

Here is a store where I can choose from 1/4, 1/2, 1W, etc resistors:Creatron Inc.

Which one would be the best?

Also, in the circuit in the link above, I am unsure if there needs to be a VCC. I assume the input pins C0, C1, C2 are enough, but please correct me if I am wrong.


texts: In order to display the temperature in three integral and one fractional digits using the LCD over the range of the temperature sensor and updating the display data five times per second, what critical data should I obtain? I have a successive approximation ADC and the e clock of the MCU is 24 MHz. I have used a scaling circuit to connect the sensor to MCU. The sensor has a 10 mv/C voltage slope between its output voltage and temperature. I do not know how to calculate the temperature from the vout that I see.


texts: PV cell output calculation, when a charging limiter is involved

texts:
I need to the charging rate of a battery connected to a 20w PV panel. Due to the regulator on the board though the maximum rate the battery can be charge at is 1A, 12V , due to how this is setup, calculating the battery output of the panel using the peak hours method doesn't work, is there a formula I can use for calculation of this, or is it better to use the peak hours method and just use a percentage of that.

I have the Insolation/Irradiance, sun hours and latitude. Also questioning whether irradiance or isolation is better to use in calculations

EDIT: Regulator maintains a constant charging voltage, therefore when voltage is under 12v the battery doesn't charge at all. is there a way to calculate area under the power curve for this situation?


texts: Loud hum and buzz... I think I know why but I don't know how to solve

texts:
First, read this other question of mine. I have modified the amplifier, as suggested by τεκ to run on the full rail.

This is the modified circuit.

Notice how the amplifier ground is tied to -5 and the power to 5, meaning that it is powered by the 12 VDC coming from the external adapter... see schematics.

After turning the device on, I hear a hum and buzz sound that is bigger than the sound. What I did was this: after the capacitors C25 and C26, I have changed all 0V references to -Vcc (C21, C22, C23), pins 4, 5, 9, 12 and 13 of TEA2025, C27 and C28. But this is my problems:

the final output, jack U2 0V. If I change that to -Vcc, this jack's ground will be 6V lower compared to the input jacks' grounds that are on the virtual 0. I don't think this is good.
The potentiometers are grounded to 0V. I think this should stay at 0V right? because everything before C25 and C26 are between -5 and +5 and those caps are insulating this part of the circuit and the amplifier part, right? Or should I connect the potentiometers to -5V?


texts: Barkhausen Criteria. Is unity loop gain required?

texts: Does the barkhausen criteria requires the magnitude of the loop gain AB for a oscillator exactly to be unity or can a value greater than that will be fine. What will be the consequences if the value is greater than 1.


texts: How to find out if electrical outlet ground is working?

texts:
Just want to make sure my outlet's ground is working. How to do that?

UPDATE: My main aim is to test resistance of anti-static wrist strap, but since I know it works by testing it with multimeter, I now want to be sure wall socket's ground works as well. This is why I asked this question.

Maybe I can test wall socket's ground with a multimeter?


texts: What is a pin header with a wall on one side called?

texts:
What do we call a Pin header that has wall of one side to ensure you don't connect it wrong(Male side) and on female side there is a slot opening for the wall so it sits and fits perfectly?
Sorry I don't have a picture, I have just seen it but don't know what the name is hence can't find to buy.

The one in this pic for SPI and RS232.


texts: Can a tin layer on a PCB cause battery corrosion?

texts:
We have developped a PCB with a battery holder.

As you can see the copper is covered by a tin layer. On older versions of our PCB it had a gold-plated layer.

Now on our recent boards we experienced that there was 'gunk' around the batteries. Is it corrosion or leakage? I'm no expert on chemical precesses.

We never saw it happen on the gold-plated PCBs. Could it be that this is caused by the tin layer?


texts: What are standard design rules for a Flex Printed Circuit (FPC)?

texts:
For an FPC made out of Kapton (polyimide), what are the:

min trace width
min trace-trace separation
min distance from a trace to the edge of the FPC
min drill hole diameter
min distance from a drill hole to the edge of the FPC
min distance from a drill hole to a trace

I'm looking for the "lowest common denominator" that any competent fab should be able to handle. Thanks!


texts: Should I really divide the ground plane into analog and digital parts?

texts:
I am about to design my first PCB as part of my graduation project.
Of course, as the first step, I try to learn as much as possible. A part of the research I found this 3 part article, that suggests that it is not neccessary and in some cases is even harmful to split the ground plane into analog and digital part, which contradicts what I had learned from the prof. I also read all threads on this site that are concerned with the ground planes/pours. Although majority concur with the article, there are still some opinions that advocate split ground plane. eg

https://electronics.stackexchange.com/a/18255/123162
https://electronics.stackexchange.com/a/103694/123162

As a PCB design novice, I find it confusing and hard to decide who is right and which approach to take. So, should I divide the ground plane into analog and digital parts? I mean physical division, either with a PCB cut or having separate polygons for DGND and AGND (either not connected, or connected in one point)

Perhaps to enable you to make a recommendation, that is tailored to my prospective PCB, I tell you about it.

The PCB will be designed in the free version of Eagle=> 2 layers

The PCB is for testing and precise measurement (current & voltage) of lithium batteries. The board is to be controled from Raspberry Pi over digital interface (GPIO/SPI (40 kHz)). There will be 3 data converters on board (AD5684R, MAX5318, AD7175-2),and connectors for a prebuilt RTC module on the digital side. Analog power  comes from external regulated power supply over onboard LT3042 voltage regulator (5.49 V). Additionally there is LT6655B 5 V voltage reference. Analogue part is essentially a DC circuit, the only really HF is internal 16 MHz master clock of the ADC.

Digital 3.3 V (mainly for powering of the digital interfaces) will be sourced from Raspberry PI. Thus, there will be 2 ground connection: external power supply and to digital interface of Raspberry Pi.

In this connection another question: referring to Figure 3, how do I make sure that return currents from the digital interfaces flow to the right ground connection (remember I have 2 of them)?

Additional concern: could the power distribution curcuit disturb sensitive measurements? I was going separate them  by routing power on the bottom layer, but that is no longer a good idea in case of monolithic ground plane

And while I am still at asking: Assuming more or less monolithic ground plane on the bottom and signal/component layer on top, what is the best way to connect the negative side of bypass capacitors to the ground plane?


texts:
I bought one of these, and forgot to get the connector.
http://www.sparkfun.com/commerce/categories.php?c=139

Now I need to buy a hall effect sensor and was thinking/looking at mouser, Does anyone know the partnumber of a cable/connector similar to this:

OR how I would go about figuring out said connector p/n at other places too?


texts: Setting up an external clock source on an ATmega8

texts:
I am attempting to set up V-USB on my ATmega8-16PU (datasheet), and could use some help hooking up an external crystal clock source to it. I have tried to understand the datasheet to the best of my ability, and have drawn a few conclusions which I would appreciate if someone could verify and critique. For reference, I will be using a 16 MHz or 20 MHz crystal, which I also need help deciding between.

Here is my plan so far, based on my understanding:

Attach my external crystal (two pin one), to the XTAL1 and XTAL2 pins of the IC
Use two 22pF ceramic capacitors
Based on Table 2 of Page 26, CKSEL3..0 has to be 1111-1010
CKOPT will be unprogrammed (based on the description at the top of page 27) because I don't need a large output swing, not am I driving anything else with the crystal
CKSEL3..1 has to be 101, 110, or 111 because my crystal is greater than 1 MHz
CKSEL0 has to be set to 1, and SUT1..0 to 11 (based on table 5 on page 28) because I want to allow the maximum start up time to play it safe

Right, so I have taken these notes, and don't know where to go from here. For example:

What are all these things (CKSEL3..1, CKSEL3..0, etc.), and how do I know which value to choose for CKSEL3..0 and CKSEL3..1 if I am given an array of options to choose from?
What do I need to change, and how do I set the fuse bits to enable these settings? I am using avrdude to program my microcontroller.
Do I need to use a watchdog? If I do, it doesn't seem like there are any settings to enable or disable it (bottom of page 26), or is it always enabled?

Thanks, everybody. Sorry about all these questions, I am very new to all of this, but am determined to learn.


texts: estimate SNR improvement due to filter bandwidth of low pass filter

texts:
I facing a problem in GSM simulation. I am having a perfect GMSK modulated (I can assume that GMSK filter is 200kHz or 270 kHz band limited) signal in Tx path adding AWGN of 6dB SNR (Noise 6dB below Signal). I am passing this through a baseband filter at receiver of 160 kHz. I am ok with the signal distortion due to stricter LP filter then signal bw but I want to estimate SNR at output of the filter.

Shouldn't I get an improvement of 10*log10(270000) - 10*log10(160000) in dB.
Even if yes, what are the steps to reproduce and check the estimate the same feeding some known GMSK signal


texts: Circuit for choosing one power supply from several of them

texts:
I have a load and four different voltage sources. I want to change the voltage on the load by using four different enable signal as seen in the schematic below. Note that, all of the "Enable" signals are active low, and only one of the enables can be logic-low at the same time.

simulate this circuit – Schematic created using CircuitLab

I designed the reusable "Switching Circuit" block as seen below.

simulate this circuit

The working principle is like this:

When the Enable signal is 0V,
M1 conducts. At first, M2 might not conduct, but its body diode will conduct and make the Vout voltage positive. Then, the gate of M2 will be more negative with respect to its source. Therefore, M2 will conduct. The power applied to Vin will be transferred to Vout.

When the Enable signal is 5V,
Since the voltage at Vin will be equal to or less than 5V, M1 will have a non-negative Vgs voltage, and thus, it will not conduct. But, remember that the outputs of all the "Switching Circuit"s are connected together. So, if another "Switching Circuit" conducts and the voltage it is conducting has a value higher than this "Switching Circuit"s Vin voltage, the body diode of M1 will let it pass backwards and will cause a disaster to happen. For preventing this situation, we are using the M2 mosfet. When Enable is 5V, the Vgs of M2 will be positive, and M2 will not conduct. Vout port will be seen in Hi-Z state.

I found this similar question. It is about choosing between only two supplies. Similar to Bitrex's answer there, I can remove (i.e.; not solder) the mosfet M2 from the circuit which is switching the highest voltage. This is the only improvement I can see. Is there anything wrong with this design? Is it going to work as intended? Please make suggestions to improve this design.


texts:
I want to run a 300W heating element in a water bath, but I'd like to make sure that it isn't turned on by mistake when it's out of water, so I thought of connecting it to a controller and a sensor, though I'm not quite sure about the best way to sense this.

I thought of two options:

Detect water with an open circuit - I'm a bit worried about electrolytic corrosion though. Is this actually an issue?
Detect the temperature with a thermocouple attached to the heating element. This has the difficulty of attaching a thermistor without it melting.

What would you suggest?


texts:
I'm using serial communication to display the the data to my 4x20 lcd display. When I filled up all the lines of course I need to clear it. I've search over the net and found something like
    Serial.write(27);       // ESC command
    Serial.print("[2J");    // clear screen command
    Serial.write(27);
    Serial.print("[H");     // cursor to home command
But it doesn't work. I also found a solution like Serial.println(); but that solution(cheat as they called it) will only work on serial monitor. So is there any possible solution to clear the display or delete a single character from it?


texts:
I hope you can help in relation to my KCL question which asks that I find the currents in i1, i2, i3 and is.

I'll also need to calculate the power dissipated by the resistors in the circuit and confirm that the power dissipated by the resistors is the same as the power supplied by the power source.

I have done some calculations below but I'm not sure if I'm doing this correctly.

$$I1 = 20       I= V/R       = 0.25A       = 1.25W$$

$$I2 = 40       I= V/R       = 0.125A     = 0.625W$$

$$I3 = 80       I= V/R       = 0.0625A    = 0.3125W$$

$$Is = 10       I= V/R        = 0.5A        = 2.5W$$

Power dissipation = I(amps) x V

Thanks.


texts: Is it possible to pass a (voltage-based/amplitude modulated) digital data signal using just one wire?

texts:
This isnt a naive question - I hope!
In virtually every situation where a signal is sent by wire, it uses (at leasst) two wires - one for some kind of reference voltage, and (at least) one for the data. The signal is amplitude moderated - the difference between the signal wire(s) and reference wire voltages being above, below or between certain voltages.
Naively, if two floating-voltage devices are connected by a single wire, effectively this fixes their relative voltage, and amplitude modulation wont work. They share a common ground or similar. So naively, reading a voltage on one wire can't be done - a voltage has to be between two potentials.
But potential takes time to build, and time to dissipate. It's not ideal and square.
Therefore, is there any effect (impedance? lead/lag/timing behaviours? other?) such that a circuit could receive a single wire from a floating device, and still determine if the voltage at the other end has changed up or down, or by how much, simply by (for example):

observing the transient effects as charge equalises at the junction with the wire, and potential settles at a new level; or by
comparing the voltage between the incoming wire and some well grounded point internally that can be taken as a reference voltage for the purposes of observing transient behaviours at the wire input? (So it can be treated as "more static in nature" or because it leads/lags the wire potential in behaviour)
Observing the potential rise and fall at two points a few MM apart on the conductor, at or near the junction, if the junction was designed to create a measurable lag over some short distance.

Has this been used in any practical form?
CLARIFICATION: To be clear, I'm thinking of pure basic charge-flow-based effects, transient behaviours, and other measurables, within the recipient PCB and its circuitry, or similar.  Not radiated effects (electromagnetic radiation), surface-wave effects along the wire, or conversion to and from a field outside the conductors/components. (At least I think that's what I mean!)


texts: Have I got a dodgy batch of TMP36 sensors

texts:
I bought some TMP36 sensors from Amazon.co.uk for a small project (ESP8266 NodeMCU temp sensors) and have struggled to get sensible output from them

I have tried reading them from A0 on the ESP8266 and reading isolated from the ESP using my DMM.  Vs is 3.3v

Output mV readings in both cases are similar.

At room temp = ~800mV (implies 30C - my office is nearer 20)

In iced water = never less than 650mv (implies 15C - it's probably 2-3C)

In how water = never more than 1090mv (implies 59C - it's probably 70-80C)

I've tried all 5 sensors I bought and they are all the same to within about 10mV.

I've tried on the breadboard with the ESP, and on a separate board to prevent heat leak through the board.  Also tried with a short 100mm flying lead (no-twist)

I have tried with and without a cap (103 as it's all I have here) across the gnd/Vs and inline resistor on the output.  All make no difference.

Am I missing something?
What else could I try?
Could I just have a duff batch of sensors being flogged off via Amazon?

Appreciate any suggestions before I go an source some new sensors.


texts: (Antenna impedance matching) How to find the load impedance

texts:
I'm working on a project that requires impedance matching and I'm going to match a 50 Ω antenna to a RF amplifier SST12LP22. However, I'm not sure how can I get the impedance of the amplifier from the datasheet in order for me to design the matching circuit, or I will need to measure it?

Datasheet:
https://docs-apac.rs-online.com/webdocs/135d/0900766b8135d29f.pdf


texts: Connecting the following structure of multipliers and adders in an elegant way in verilog

texts:
I am attempting to write a synthesizable verilog (or Systemverilog) module. I also want to make the modul parameterizable, which has presented a problem when trying to connect the following structure of multipliers and adders:

The problem with this is the following. If I want to make it parameterizable, I don't know how to connect it in verilog. So to be more specific. I want to know which verilog construct to use to achieve this interconnections in a elegant manner.
I have tried with the code bellow, but I get:
"Single value range is not allowed in packed dimension".

The code bellow is Systemverilog:

module vector_multiply #(parameter  N = 8, parameter M = 3)(
    input   clk,
    input   ce,
    input   rst,
    input   [N-1:0] a [M-1:0],
    input   [N-1:0] b [M-1:0],
    output reg [N-1:0] res // result of vector dot product
    );

 localparam ADDER_DEPTH = $clog2(M);
 wire [N-1:0] w [1<<ADDER_DEPTH][ADDER_DEPTH+1]; // multiplier/adder interconnect wires
 reg [N-1:0] mult_res [M-1:0];
 genvar i,j;

// MULT_MACRO: Multiply Function implemented in a DSP48E
//             Artix-7
// Xilinx HDL Language Template, version 2018.2

for (i = 0; i < M; i = i + 1)
begin
    MULT_MACRO #(
    .DEVICE("7SERIES"), // Target Device: "7SERIES"
    .LATENCY(3),        // Desired clock cycle latency, 0-4
    .WIDTH_A(N),        // Multiplier A-input bus width, 1-25
    .WIDTH_B(N),        // Multiplier B-input bus width, 1-18
    .WIDTH_P(N)
) MULT_MACRO_inst (
   .P(mult_res[i]),     // Multiplier output bus, width determined by WIDTH_P parameter
   .A(a[i]),     // Multiplier input A bus, width determined by WIDTH_A parameter
   .B(b[i]),     // Multiplier input B bus, width determined by WIDTH_B parameter
   .CE(ce),   // 1-bit active high input clock enable
   .CLK(clk), // 1-bit positive edge clock input
   .RST(rst)  // 1-bit input active high reset
    );
end

for (i = 0; i < M; i = i + 1) begin
    w[0][i] = multi_res[i];
end

// If there is a odd number of elements in a vector (multiplications) then, add one so that all adders have a defined input
if ((M % 2) == 1) begin
    w[0][M] = 0;
end

// The multiplicated results need to be adder (dot product).
for (i = 0; i > ADDER_DEPTH; i = i + 1) begin : layer_loop
   for (j = 0; j < (1<<(i-1)); j = j + 2) begin : inner_loop
      full_adder_Nb #(N) FA_Nb(w[i][j], w[i][j+1], w[i+1][j/2],0);
   end : inner_loop
end :layer_loop

endmodule

In this semi akward atempt I get errors in the following lines:
    -  w[0][i] = multi_res[i];
    -  w[0][M] = 0;

Again I am looking for either suggestions how to fix this code, or some better way to write it.

NOTE: N is the number of bits a number has, M is the number of elements in a vector (the pic bellow is for M = 4).


texts: 2.8V to 5V conversion not working as it should. Why?

texts:
I'm using an arduino Leonardo clone (SS Micro) who works on 5V logic only, but has also a 3.3V output for powering devices.

I'm interfacing it with a breakout board TOF sensor, the VL6180. This board has 2.8V logic, but has level shifting on the SCL and SDA lines, so it can be powered from 5V from Arduino, and connected directly to SCL and SDA pins on arduino, because it converts the I2C signals from Arduino 5V logic  to 2.8V logic (on the VL6180) and back from it's 2.8V to Arduino 5V.

The problem I have is that there's an interrupt pin on this breakout board, GPIO1, that can be programmed to generate output interrupts, but this pin is not level shifted. So it outputs 2.8V or 0V. And it's internally pulled high, so when an interrupt is generated it goes low (0V). When idle it's high (2.8).

As this Leonardo clone I have has 3.3V output just for powering devices (not logic levels), I used this 3.3V output with a voltage divider circuit (2 resistors) to achieve 2.8V. So I connected this 2.8V line, from the voltage divider, to a level shifting breakout board on the low side, the 5V from Arduino on the High side. And I connected the GPIO output from the sensor (at 2.8V) to a low side channel on the level shifter board, and an Arduino digital input pin (at 5V) to the same channel, but on the high side of the level shifter.

So it would convert the 2.8V signal from the sensor to arduino input pin, at 5V.

But it doesn't work. The sensor generates the interrupt. I can confirm (using a multimeter) that when the interrupt is triggered on the sensor it's GPIO1 pin goes from 2.8V to 0V. But in the 4 channel level shifter breakout board, the 5V on the other side remains unaltered. It's always 5V. I tried changing between the 4 channels on the level shifter and still no change on the high side (5V never goes to 0 volts)

I tried connecting instead the 3.3V out pin from the Arduino directly on the low side of the level shifter, without the voltage divider circuit, but it didn't work either.

There is a 2.8V source somewhere in this sensor breakout board, but in my board there's no soldering pad to a 2.8V line, and unfortunately my sensor is already mounted inside a casing with silicone all around it, so I can't remove it to try to find a track where I could use it's own 2.8V voltage.

So.. My guess is that using only this voltage divider isn't enough for providing a 2.8V reliable source for powering the level shifter and to make it work correctly.

What should I do to achieve a realiable 2.8V source so I can use it to make this level shifter work correctly?

My enclosure is really small, so too many extra components or extra boards wouldn't fit inside.


texts: Correct methods to do source transformation

texts:
What are the conditions to check before doing a successful source transformation without any errors. Is this example correct--
The source transformed-


texts: Can USB-C cable/port become corrupted and only transmit partial power/data? Or would it stop working completely if broken?

texts: I plugged my usb-c cable into my device pretty roughly and felt/heard something crumple, and I'm thinking I may have damaged it. Everything seems to be working fine though, but I'm worried that its charging/data might be diminished. Or if it was damaged would it just not work altogether?


texts: I know the operation of the diode but I still can't understand how it works

texts:
I can not explain my question concisely as I am beginner and I have difficulties with chemical and mathematical terms, so I will discuss my logic from the beginning foolishly.

What I understand about potential difference

The basic electronic says a source voltage is the result of a potential difference between its poles.
With that I understand that a battery of 1.5V has a positive terminal with 1.5 volt charge and a negative terminal to 0 volts of charge.
The nature of the material excess electrons on the negative pole tend to go for the positive pole until they neutralize. When this happens the battery will have 0.75V at each pole and the potential difference will be 0v. Correct? I am not sure.

What I understand about diode

A diode is a semiconductor electronic component divided into two poles, one negative and one positive so with a potential difference between them; It is separated by a resistive layer between the poles.
When a diode is connected to battery directly (negative diode with negative source) etc, free electrons on the negative side of the battery repel the electrons free from the negative side of the diode to destroy the resistive layer and the current flow through the circuit.

What I can not understand

Let's say I have a source with 0 volts in its negative pole and a diode with -7 volts in its negative pole. Logically, the electrons on the negative side of the diode should go to the negative side of the source and thereby increase the depletion layer in the diode even when polarized directly to the source.

Another example ... let's say I have a diode with upside potential of 5V connected to the positive side of the battery that has 20 volts potential. In this scenario, why the electrons of the diode will not meet positive side of the supply to the increasing depletion layer?

I think it got a little confusing but I hope someone understands me and can help me.


texts: Capacitor in series and parallel to diagnose APC Smart UPS 1000VA

texts:
Brother having APC Smart UPS 1000VA and I noticing high pitched buzzing noise coming from UPS: I think it from power filter capacitor - tall one you see on LHS of picture:

(Picture all sourcing from http://www.elektroda.pl/rtvforum/topic843513.html, as brother not allow me open UPS)

I say this because UPS model 2003 and I know when electrolytic caps age, sometime their electrolyte dry, and hence making pitched buzzing noise?

Am I correct, or there be possibility transformer itself making high pitched buzzing noise (unlikely as noise intermittent and goes away for few seconds now and then)
That cap is 2700uF, 40V and I having hard time finding this cap locally. But I have 2200uF, 35V caps - so I thinking:
Connect two 2200uF, 35V caps in series to get theoretical 1100uF, 70V caps: calculation correct?
Connect two theoretical 1100uF, 70V caps in parallel to get theoretical 2200uF, 70V cap: calculation correct?
I guessing that tall cap 2700uF, 40V is power supply filter likely, so replacing it with theoretical 2200uF, 70V cap for confirming suspicion not bad?
I also have ESR meter: what value bad cap vs good cap read to confirming suspicion?
What other component possible make such high pitched buzzing noise from UPS? (UPS out of warranty since last 5 years and now obsolete model also, so APC not interested with feeedback)


texts: Binary Addition 1+1 vs Boolean Operator 1 +1

texts: Why is it that when you add two binary numbers such that 1 + 1 = 10, but when you apply the Boolean operator 1 + 1 = 1?


texts:
Is there anyone familiar with the SATA interface compliance?
I'm curious about the testing method.

For TX test, there are PHY/TSG/OOB test items.
And, there are BIST-L and BIST-TSA mode defined in SATA spec.

What mode should be used when testing TX? and how?

The other question is for RX test.

Should we set the controller to BIST-L mode when testing RX?
Use the data generated from JBERT, and loopback it to JBERT?


texts: What is a reference frequency for electrical length?

texts:
There is an option for the transmission lines in ADS which says "Reference Frequency for Electrical Length"

What is that supposed to be? In the transmission line equations, I don't know of any reference frequency. Is it \$\beta\$ or is it \$l\$?


texts: Calculation of a voltage in a single mesh circuit

texts:
simulate this circuit – Schematic created using CircuitLab

Why is \$v_{R_2}=(v_1-v_2)\frac{R_2}{R_1+R_2}\$ ?

Could anybody show me this formula, please?

\$(v_1-v_2)\$ is the voltage across \$R_1\$, which is divided between \$R_1\$ and \$R_2\$. I can't fully understand myself this last sentence.

EDIT:

I also tried to solve it this way:

The starting circuit is equivalent to this:

simulate this circuit

which is equivalent to this:

simulate this circuit

Thus the current on \$R_2\$ is \$(\frac{v_1}{R_1}+\frac{v_2}{R_2})\frac{R_1}{R_1+R_2}\$ and the voltage \$v_{R_2}=R_2\cdot (\frac{v_1}{R_1}+\frac{v_2}{R_2})\frac{R_1}{R_1+R_2}=v_1 \frac{R_2}{R_1+R_2}+ v_2 \frac{R_1}{R_1+R_2}\$

What's wrong here?


texts:
I'm working on this project for University. We are generating visuals by sending audio signals from the computer to an old tv. Left channel to TV's Vertical, right channel to TV's horizontal. We send simple sound waves (generated in PureData), example, 400hz to the left channel and 200hz to the right channel. And also some FMs.

We are getting this kind of visuals:

http://youtu.be/gc67zXuBw9A

http://youtu.be/7Uqq8SJhm9o?t=1m29s

The thing is that we want to have this in a larger scale, and I thought of making a video wall, the same signal splitted into 9 (or 8 or whatever) TVs.

I have no idea on how to make this, any ideas??

Thanks!


texts: What is the significance of 8 bits in the context of an ADC0808?

texts:
ADC0808 is an 8 bit analog to digital converter. What is the significance of 8 bit? What does it represent?

Which capability of IC does it represent?


texts:
I'm very confused right now. The device has two channels which each can be CAN or CAN FD.

Can I send a CAN message to its CAN-FD channel?


texts: How to get audio from a sensor for an Arduino

texts: I am working on an Arduino project that requires recording sound that is playing and flashing LED strips to go with whatever is playing in the air.  Currently I am using a sensor called the KY-038 but I am unsure how to get audio from it or if it is even possible to get actual audio from it instead of just volume.  Basically what I want is some help getting the correct sensor and a guide or some directions on how I can turn the data from the sensor into something that I interpret on an Arduino.


texts:
Can anyone identify this component?  It came from a small night-light, which plugged into a wall outlet (US 120 v ac).  There were no resistors, nor was there any rectifier.  It lights up when plugged in, and it claims to consume 0.05w.
It is shown with a pencil for scale, and it made of some kind of thin film.


texts: Why do ICs need a specific power down sequence?

texts:
When powering down a board, for ICs that have multiple supply voltage rails, why do they need a specific power down sequence?

Typically in complex motherboards, there is a CPLD doing the job of this power down sequencing.

Why don't we just pull power off everything at once?


texts: Non-intrusive measurement of current and voltage

texts:
Sorry if this question is too basic for this forum... I'm an interested amateur but far from a professional. I'd really appreciate information from someone more informed than myself.

Hypothetical challenge:  Assume I have several UK mains electricity (~240v ~50Hz AC) insulated cables and have access only to the insulated exterior of the cable.

Can I (hopefully accurately) determine the direction and magnitude of power flow?  Please assume that it is unacceptable to strip the insulation, or break the circuit, to insert traditional test equipment.

Added: How accurate an answer can I expect to achieve, given the constraints?


texts:
I built a RF circuit powered by a 12v 500mA wall outlet.  The RF circuit draws currently around 100mA.  I would like use this power supply to also power the microcontroller that will ultimately control this RF circuit (rather than running two different wall warts to the project).  Here is my problem...I'm struggling to figure out the proper way of connecting the microcontroller to the circuit, while not pushing too much current through the RF circuit.

I'm using a LM7805 regular to regulate the 12v down to a manageable 5v for the microcontroller.  Where do I add this to the circuit without pushing too much current through either the MC or the RF circuit?

Here are some examples of ways i thought would work...

Option 1

Option 2


texts:
I have a somewhat complicated Schematics design. Is there a program which could convert my design into truth tables?
If there is no such program, how can I represent the D flip-flops of the following design in a truth table?


texts: How much buffer room is required for a varistor?

texts:
I am working on a circuit board design that uses a fuse resistor for protecting from short circuits and a varistor to protect from over voltage. The board is a simple power supply of only a few watts.

If I have a 275V varistor, what should I be looking for as the maximum voltage handling of the components protected by the varistor? I am not looking to use components with less than 275V handling, but want to know if I would need a 300V , 325V, etc. capable part behind the MOV for example. I have not been able to get a good feeling for the allowances that are required.

Thanks,

Jason


texts:
I am using an ATMEGA328p to measure the frequency of a 50% duty cycle square wave in the range 2khz to 15khz. The square wave is being generated by a good quality Function Generator and I can see on the scope that the output is stable.

For the purpose of raising this question I have simplified my code to

#define SERIAL_OUTPUT

#define led 12

volatile boolean FREQint = false;
volatile unsigned int FREQcount = 0;
volatile unsigned int FREQovfcount = 0;
volatile unsigned int temp_TCNT2 = 0;
volatile unsigned int temp_FREQovfcount = 0;

int FREQprescaler = 1;

int FREQdivider[6] = {
  0, 1, 8, 64, 256, 1024
};

#define FREQ_input_pin 8 // PCINT0

//////////////////////////////////////////////////

ISR(TIMER2_OVF_vect) {
  FREQovfcount++;
  //digitalWrite(led, !digitalRead(led));
}
//////////////////////////////////////

ISR(PCINT0_vect)
{
  if ((PINB & 0x01) == 0) { // falling edge
    //digitalWrite(led, !digitalRead(led));

    // take quick snapshot
    temp_TCNT2 = TCNT2;
    TCNT2 = 0; // reset timer
    temp_FREQovfcount = FREQovfcount;
    FREQovfcount = 0; // clear overflow counter

    // if just missed an overflow
    if (TIFR2 & bit (TOV2)) {
      TIFR2 = bit (TOV2);  //clear pending interrupts
      if (temp_TCNT2 <= 40) {
        temp_FREQovfcount++;
        //digitalWrite(led, !digitalRead(led));
      }
    }
    FREQcount = (temp_TCNT2 + temp_FREQovfcount * 256);
    //digitalWrite(led, !digitalRead(led));
    FREQint = true;
  }
}

//////////////////////////////////////////////////

void setup()   {

#ifdef SERIAL_OUTPUT
  Serial.begin(115200);
  while (!Serial) {
    ;
  }
#endif

  pinMode(led, OUTPUT);

  cli();//stop interrupts while setting up the timers
  TIMSK2 = 0; // turn off Timer
  TCCR2A = 0x00; // normal mode
  TCNT2 = 0; // clear timer
  TCCR2B = FREQprescaler;
  pinMode(FREQ_input_pin, INPUT);
  // set interrupt on change
  PCICR |= 0b00000001;    // turn on port B
  PCMSK0 |= 0b00000001;   // PCINT8  pin D8
  TIMSK2 = bit(TOIE2);// enabled global and timer overflow interrupt;
  sei();//allow interrupts

}

//////////////////////////////////////////////////////////////////////////////

void loop()
{
#ifdef SERIAL_OUTPUT

  if (FREQint) {
    byte oldSREG = SREG;   // remember if interrupts are on or off
    cli();   // turn interrupts off
    unsigned int tempcount = FREQcount;
    SREG = oldSREG;    // turn interrupts back on

    Serial.print(" Freq ");
    Serial.print(16000000.0 / FREQdivider[FREQprescaler] / tempcount);
    Serial.print(" Hz");
    Serial.print(" Count ");
    Serial.print(tempcount);
    //Serial.print(" TCNT2 ");
    //Serial.print(temp_TCNT2);
    //Serial.print(" OVF ");
    //Serial.print(temp_FREQovfcount);
    Serial.println();
    FREQint = false;
  }
#endif
}

This code is similar to a number of examples on the net eg www.gammon.com.au/timers

My issue is that the FREQcount value varies much more than I expected. The extent of the variation is also sensitive to the frequency of the square wave being measured.

For example

Freq 9750.15 Hz Count 1641
 Freq 9621.17 Hz Count 1663
 Freq 9632.75 Hz Count 1661
 Freq 9632.75 Hz Count 1661
 Freq 9227.22 Hz Count 1734
 Freq 10302.64 Hz Count 1553
 Freq 9638.55 Hz Count 1660
 Freq 9732.36 Hz Count 1644
 Freq 9638.55 Hz Count 1660
 Freq 9632.75 Hz Count 1661
 Freq 9638.55 Hz Count 1660
 Freq 9638.55 Hz Count 1660
 Freq 11228.07 Hz Count 1425
 Freq 9744.21 Hz Count 1642
 Freq 9632.75 Hz Count 1661
 Freq 9638.55 Hz Count 1660
 Freq 9632.75 Hz Count 1661
 Freq 9227.22 Hz Count 1734
 Freq 9950.25 Hz Count 1608
 Freq 9638.55 Hz Count 1660
 Freq 9632.75 Hz Count 1661
 Freq 9638.55 Hz Count 1660

The actual frequency should be 9.543khz.

I can certainly understand why there will be some variation

BUT why are there count values of 1425 and 1734 which are well outside the average?

I could understand the count may be bigger if there were other interrupts but why the lower value?

Can anyone explain why this might be happening please?


texts: Frequency limitations of analog prototyping

texts: At what frequency do breadboards become a bad idea for analog prototyping? I am considering using vector boards and soldering parts directly to the circuit board.  Thanks


texts: High current Synchronous Buck Converter, MOSFET or IGBT?

texts:
I am supposed to design a synchronous buck converter (to be driven by micro controller control signals for switching purpose). The input Voltage range is 10V-15V, and output voltage range is 4V-5V but with high current i.e around 200 A (supposing i have a power supply capable of providing me such high current). Also efficiency of this buck converter is not an issue in my case (it can be low). Whereas the purpose of buck converter design is to route power in both directions (from i/p to o/p (buck) and from o/p to i/p (boost)).

I have read online that it is better to use transistor package modules instead of using discrete transistors and diodes. I also went through MOSFETs, BJTs and IGBTs.

For handling a high current at the output of my synchronous buck converter, i need the switching device (MOSFET, BJT or IGBT) to be of that currnet rating. Now what i have found so far is that MOSFETs (or MOSFET/buck modules with MOSFETs) with such high current ratings are not available. For eg  Which led me to search on IGBT modules, which are available for high current ratings. for eg This Link gives a number of different IGBT modules which are available.

Now my question is, that am i right assuming the fact that i cannot find such MOSFET modules with high current ratings and i will have to look for IGBT modules ? If i am, then what kind of IGBT module would be suitable for me to design a synchronous buck converter ? While going through These different  modules, i found This type to be the most appropriate, looking at its transistors arrangement inside the module. If  i am right, would i be able to design a synchronous buck converter (capable of both current polarities) using one of these module ?

And if i am wrong, can anyone recommend me MOSFET modules for buck converters with such high current ratings, because i couldn't find one.

Thankyou.


texts: Programmer for Sanyo LC87F5NC8A Microcontroller

texts: I want to hack my Samsung DVD player. But the IC used it a Sanyo LC87F5NC8A. I don't have a programmer that can dump or program this UC. Any advice ??


texts:
I am quite new to the science behind electronics (long time software guy), but here is my issue.

I have an Arduino UNO and an Ethernet shield attached to it, all powered by a 7.5VDC wall wart, rated at 1000mA. A multimeter shows that the wall wart is actually outputting around 10.6VDC, why is this?

When the unit is powered on, it immediately begins to heat up (near the power plug, is this called the voltage regulator?), eventually getting to the point of almost burning me.

Is this related to current being pumped into the Arduino? How can I fix it?


texts: Calculating resistor values for N3904 transistor

texts:
I'm using an N3904 as a not gate to trigger a 555.

What resistors do I need? I don't know how to
For R_I I want to:

limit current to the 555,
limit current when the transistor is on,
not drop too much voltage which would cause the 555 to be triggered.

The transistor will take 200mA then what about 12/0.2 = 60Ω. But then what voltage value will be the 555 trigger pin?
The datasheet contains four values for h_fe which appear to be for different I_c values (am I reading it right?) all of which are much smaller than 200mA. So is my 200mA above too big?
But if I reduce this current then I increase the resistance and if I go too far then I trigger the 555, right?
The values of h_fe range from 30 to 300. If I guess 30 then 12 / (0.2 / 30)) = 1,800Ω for R_S.
Anywhere near?


texts: Connector requirement for PCB thickness of 2mm

texts:
We have a requirement to design PCB with thickness 2mm. As we are exploring for connectors, most of them are recommended for PCB thickness of 1.6mm. I have selected Throughhole Molex connector for JTAG interface with part number 878311411. As per the website this connector is recommended for PCB with 1.6mm thickness. But the tail lenght of connector is 3.5mm. So can i use this connector for my PCB which has thickness of 2mm.
[


texts:
I'm trying to build a project on automatic liquid dispenser using the ATmega328P. I've made the circuit. Before making the  PCB I've few issues to be solved.

I'm powering the board using a 12V, 5A adapter. I have a 7805 regulator at the input side. I'm planning to run a small submersible 5V pump (5V,200mA) which is also connected to the same regulator. Is that OK?

The entire board will consume around 150mA of power during idle. During pump actuation it will consume 600mA and the regulator will take 1A of load.  Will it be ok during starting of the motor? (Inrush current, I'm using 5A supply. Pump motor actuation is discontinuous say 15 sec for a minute, heating of the regulator is not an issue I've calculated in detail.)

I've chosen the filtering capacitors for regulator based on internet search. Is that it OK? Please suggest.

I've made a common ground and planning to put ground plane. Will it be ok during motor and relay actuation?

Any other suggestion will be helpful.


texts: Why is it that the bandwidth of a patch antenna decreases with it's size?

texts:
I typically use a larger (25 mm) patch antenna in GPS/GLONASS receiver circuits. As you probably know, L1 bands for GPS and GLONASS are separated by roughly 25 MHz.

For applications where I want to be able to view both satellite systems, I'll typically have the antenna tuned for about 1590 MHz which is roughly in between the two L1 center frequencies.

This becomes more tricky with smaller sized antennas. From conversations with my antenna supplier, they recommend I stick with the  broadband, linear antenna (chip antenna) vs. a smaller, circularly polarized patch (rectangular micro-strip) antenna because the Bandwidth drops off greatly as you go smaller in size.

But why?

I would like to explain this to my boss in layman's terms but be able to back it up with some antenna theory or some formula which describes the relationship between gain, size, and bandwidth.


texts: Storing liquid soldering flux long-term. Is it light sensitive?

texts:
Is soldering flux known to be light sensitive?
I got a big jug but the big jug it arrived in is deformed and doesn't look like it's going to hold so I am going to transfer it over to some bottles for long term storage (I don't use that much and so it's going to last a loooonnnggg time). But I was wondering if it was light sensitive or whether I need to use opaque bottles.


texts: N-Channel Enhancement Mode MOSFET Switching Speed

texts:
I need a fast (100kHz) switching on-off LED driven with a constant current.
With an OpAmp (TL082) and a p-channel SIPMOS (BSS84P) I get a fixed current source. I then placed a n-channel enhancement mode MOSFET (BSS123) and drive the gate with the output of a controller. To limit the current, I have a 100E resistor (R3) in front of the gate. Please see the appended schematic.

What I see is that the BSS123 switches far too slow. While the signal at the gate switches very fast (fall time is approx. 150ns), the voltages measured at D1 rises in approx. 100us (see picture below). I thought that R2 influences the speed, but it has no impact at all, I see the 100us with 50E and 200E. The BSS123 has a low input capacitance of 60pF maximum, and the switching delays as of the datasheet are a few ns.

What is also strange for me is that the voltage rises linear.

Probably I am missing an important point. Thanks!


texts: Transmitting .mp4,.bin,.txt files with on off keying OOK (optical communication)

texts:
How do you implement OOK to transmit mp4 files etc.

For instance i have LED and a video file to transmit. How do you take the video convert it to binary, send it via the LED recieve it via the photodiode and convert it back to mp4.

I believe i understand the big picture as to how its done...but the details on how to actually implment it... im not sure where to find. Any help would be greatly appreciated!


texts:
I know that a transmission line is essentially two wires with some series resistance and inductance and some parallel capacitance - when there is a change in the voltage between them at a point the charge in the capacitance moves and thus a current is flowing in opposite directions in both wires.

In the case that a transmission line is terminated with an open circuit - the voltage and current waveform are reflected back when they reach the termination point.

But what happens if one wire is longer than the other? - I assume that the voltage and current reflect at the point at which the short wire ends, and the voltage and current in the extra section of long line never sees any change - is that right?

EDIT:

To add some information, these are long wires I'm talking about - roughly 1KM in total. I'm looking at the effect of having open circuits at different points and how this changes the voltage and current on both wires and on both sides of the break.

The signal propagating down the wire is of the order 10s of MHz


texts:
Any reasonable priced (sub 20$/100) ways to directly measure indoors velocities between around 0.1 and 15m/s?

Its main purpose would be to reduce speed drift for a 9DOF device (acc/gyro,magnetometer), so I believe only 1D will do.

Now since it's for indoor use, a GPS won't help. I assume this could be done measuring RF/ultrasonic doppler shift, but I don't know how this is measured, nor have I found dedicated chips to do it.


texts: Effective use of output signal of a watchdog timer

texts:
Subsequent to my previous question regarding watchdog timers, I am interested in deciding the RESULT of such a watchdog:

Assume I add a generic external watchdog timer to my circuit. If not toggled by my microcontroller within the watchdog timeout period, the watchdog will assert a Reset pin LOW for a few-millisecond period, then deasserts the signal.

Now, with this watchdog output signal, I have two options:

Option A: I could apply it to the Reset pin of microcontroller
Option B: I could connect it to the Enable-pin of my Voltage regulator which, in this case, thus resets the power for my entire circuit

My question: Are there any possible concerns with Option B? I have never seen a watchdog timer / reset-IC connected to a regulator in this fashion, whether in a watchdog timer datasheet or elsewhere. However, I find it desirable because that way, I would be able to "restart" all parts/ICs on my board, instead of just the microcontroller.


texts: Arduino Uno reading analog 24v DC signal

texts:
Disclaimer: Please be gentle - I'm a newbie with electronics.

Overview

I have a proprietary 24v DC analog sensor signal that I'm trying to interface with using a Arduino based microcontroller. The sensor is has only two connections which is used both for power and signalling.

Approach

I've searched various posts and sites regarding conversion of the 0-24v analog signal to the range 0-5v the ADC on the Arduino Uno (actually Freetronics Eleven with ATmega328P) can interpret.

From what I've pieced together:

The ADC is a 10bit for 0-5v so I have roughly 4.88mV per step (total of 1023 steps). The resolution is good enough for my needs.
I can use a simple voltage divider circuit to "scale down" to 0 - 5v range.
I should choose my resistor values not only to achieve the desired divided voltage, but also to suit the impedance of the ADC. I'm still lost with the whole impedance thing so I'm still unsure about whether to use R1 and R2 sized as say 4.7Kohm and 1.2Kohm or larger by an order of magnitude or two.
Voltage buffer / op-amp: I seen references to including this as part of the circuit, but again my ignorance only makes me dangerous at this point. I'm not certain why this is useful or what it achieves, but I think it seems to help address the mismatch of impedance from the 24v signal and that of the ADC? But I could be wrong.

One particular question that I have is about the fact that the ADC and the 24v sensor signal that I'm trying to interface is that they have different power sources, and apparently this is an issue because they don't share the same GND. Out of my depth, so some insight would be useful. The Arduino is running at 5v DC.

I realise SE prefers Q&A type of posts, but to me the above is context that fits together for the larger circuit - at least that's what I think.

I would really appreciate it if those with more understanding and knowledge could offer their insights and assert my thoughts above and even elaborate on it to further my understanding and clear up some of my misunderstandings.

Many thanks!


texts: I am looking at a 3-pad SMD EMI filter chip (see photo) which is marked on the top with "222J". I am familiar with reading the markings on top of resistors and capacitors, but am not sure how to interpret the markings on a EMI/RFI filter.


texts: Lithium Ion and Lead Acid battery in series

texts:
I have a 12v trolling motor (55 lb) that is rated for 50 amps. At speed I only pull < 30 amps in my inflatable boat. I know that increasing the voltage will make the prop spin faster, which will draw more amps, but also make me go faster, which is the goal.

Is it possible/safe/feasible to connect my 12v lead-acid battery in series with a 3.7v Lithium-Ion bundle (of reasonably similar C) for a 15.7 (nominal) volt setup? I have already done some hand-wavy calculations and think I will hit my amp limit (though I should probably stay around 45 to be safe) at ~14.5v, so I will use a PWM (which I already have installed) to limit my amperage... I.E., dont worry about the other factors involved;

I just want to know, is there some fundamental reason such a setup would not work?

I have already considered using step-up/boost converters to increase the voltage, but with the amperage required I would need either an expensive one or many less expensive ones, and I rather spend that money/use that space on more battery power because of the added Watt-hrs they bring onboard.

Cheers,
Bryan


texts:
Is there any technique to identify the terminals of mosfets or test them whether they are working fine with the help of multimeters only, just like BJTs which can be easily tested using multimeters.
Another query is in a chip mosfet why drain has more dedicated pins? I mean in a PMOS chip with total 6 pins, 4 pins are dedicated to drain and 1 each to source and gate.


texts: In a Ce transistor, why does an increase in voltage between (collector and emitter) affects voltage between (collector and base) but not Voltage between (base and emitter)?


texts: Why emitter follower is so noisy and distorted in large signal?

texts:
I have a signal around 20 V peak-peak. I want to feed it into an emitter follower BJT and I have no experience in working with such large signals.

The BJT is well in bias point ( I tested the emitter DC voltage= 15 v with VCC=30V) , the result is awfully noisy and distorted. I included photo of input signal and the output. The frequency can be read on lower left corner of the photos and first issue is a voltage drop.

The second issue is the flat bottom of the output as if it is not well in bias point but it is well biased. I thought about the VCC but a VCC=30v should well handle a 21.2v signal ( at leats I think so).

For testing the bias point, I replaced the base resistor with a potentiometer . By turning the Pot, no better result found.

I tried many BJTs like 2N2219, BC108, BC109A , all the same result ( best result was with 2N2219). All are with moderate speed and transition frequency around 120-300MHz.

The frequency is not a main concern here as I tried  many frequencies between 1Hz - 50MHz. Surprisingly the noise was far less in higher frequencies !!!

The design is not a complicated one, just a simple emitter follower (there is a typo, VCC is 30V ).

I put a photo of the input signal ( voltage can be read at left lower corner of the oscope screen and freq in the middle) and a photo of the result:

EDITION: by reducing the input signal amplitude to 10vpp, everything goes well in low frequencies (<10MHz) but distortion gets worse in high frequencies. This may mean that the problem is with large signal size and I may need a faster BJT. How should I handle large signals?

1-Schematic ( VCC is 30 volts ) :

2-Input signal 21.2v 1MHz:

Output:


texts:
I am working on a project from University which includes a ROV. I am trying to come up with an easy way to create a Distance Sensing system, which doesn't require a lot of work. something very simple that can measure up to 20 cm, with a fair resolution.

I have looked into ultrasonic but apparently it doesn't work well in water + the waterproofing is a hassle, also Infrared is not ideal either. I purchased a fish finder so I can use the Transducer but that has a lot of obstacles too, i.e creating filters.

Any easy way that I can hack a fish finder, or create a simple sensing unit using a MCU and a sensor?


texts: Why does the frequency of an oscillator changes with the time duration of .TRAN command?

texts:
I have simulated an oscillator circuit using OTA in SPICE. It is a self starting oscillator.

However, the frequency of oscillation does not change with the bias current but changes with the duration specified in the .TRAN command. Eg - .TRAN 20ms and .TRAN 50ms will give oscillations of different frequencies.


texts:
I wish to use SPI on a pin that it seems by default is not SPI, however I believe is remappable to SCL.
I am using a PIC32MZ2048EFH144 with Harmony. I have made the following assumptions:

Pin 6 Can be remapped to SDO
Pin 14 Can be remapped to SCK

I am attempting to confirm that this is the case, and so far I have.

Looked at the datasheet and found that both pins are RPn pins (page 9)

6 - EBIA6/AN22/RPC1/PMA6/RC1
14 - AN14/C1IND/RPG6/SCK2/RG6

At the bottom of that page is states:

Note 1: The RPn pins can be used by remappable peripherals. See Table 1 for the available peripherals and Section 12.4 “Peripheral Pin
Select (PPS)” for restrictions

Where section 12.4.2 Discusses that SPI is a remappable peripheral, as I believed, and can be remapped onto any pin with an "RP" designation
I wanted to give my thought process before asking my questions as I am new to Microchip development and therefore would like to know:

Are my assumptions correct, and can I go forward with the thought of remapping the pins to SPI
is there specific advice on remapping SPI pins that I should be aware of?


texts: is there a calculation for no load current on BLDC motor?

texts:
I am calculating various values for a range of motors. However, I need to find the no load current of a motor or io to allow me to calculate other values, based on the information I have below for a sample motor can this be done?

Kv (RPM/v):   2100    kv
Power (Watts):    2100    W
Max Current (Amps):   140 A
Max Voltage (Volts):  15  V
Resistance (Ohms):    0.007   Ω
Poles:    4
Weight (Grams):   329 g


texts: Avoiding ground loops with common-ground DAQ

texts:
I am looking to acquire data from several sensors on a machine, each of which are part of a control system featuring several grounds linked at a single central point. I need each sensor's signal at the point of measurement compared to its own ground at that point, while avoiding ground loop issues caused by the common ground in the DAQ.

The sensors operate on a 5 V supply and generate an analog output between 0-5 V, with an output from DC to 20 kHz. I would like the DAQ to log the sensor signals, while isolating grounds, with an accuracy of 0.2 %.

What component or circuit exists that performs this function?


texts: Multimeter seems to be giving incorrect mA reading

texts: I'm measuring the current drawn from the negative battery terminal of my car battery.  I am not sure if the correct reading is 0.16 A or 1.6 mA. I tested with my multimeter on both 10 A and mA settings and posting pics you can see below:


texts: What is the difference between Input signal and input voltage?

texts: In our oscillator chapter in barkhausen criterion I have read if MvAv=1 then it will create undamped oscillations even without any input signal. It added that" then only if we put small input voltage it will create oscillations". I found the two words contradictory. They seem to cancel each other. My question is if you say there is no need of any input signal why need input voltage?? What's the difference between them?


texts:
I'm looking to simulate click of a button (short circuit) on Android phone.

I plan to use Arduino pro micro (5v) to trigger "the click".

What kind of transistor should I use?  Maybe there is some example scheme?

Thanks!


texts: How to turn on an LED when voltage drops to low?

texts:
I have an old vehicle from the 70's and it has a gauge for oil pressure. I want to add a 12v LED to the dash that will light up when the oil pressure is too low.

The installed sensor on the engine is restive to ground. The resistance changes as the oil pressure changes (more pressure = less resistance), thus changing the reading on the dash gauge. I want my warning light to be connected to this same sensor.

Note, although vehicle is 12 V, it has a factory "constant voltage unit" that provides the gauges with 5 V. I will be replacing this with a simple 5 V regulator (eg LM7805). So gauge circuit will be... +12v----LM7805----Gauge----Sensor----Ground. The circuit for the LED indicator would connect between the gauge and sensor.

In the past, I've been able to accomplish this with an Arduino and some code, but don't want to use an MCU in this application. However, I can't seem to figure out how to do this with a simple discreet component design.

Thanks!


texts: H-Brdige MOSFETs getting hot despite no load

texts:
I'm building a 600v H-Bridge using IPZA60R060 MOSFETs together with isolated gate drivers UCC21520. I designed the PCB layout to be as tight as possible and thought I'd done a good job routing the gate drive signals. I've got a weird problem that I can't work out.

With NO load attached the MOSFETs are pulling a small current from the DC bus (about 20-30mA per half bridge). This only occurs when applying the 30KHz PWM signal from a STM32F407. With low bus voltages it doesn't matter much but I want this H-Bridge to operate at up to 450volts. At 75volts they're consuming about 2Watts and get hot. Weirdly, the current seems to stay 20-30mA regardless of the bus voltage.
I've tried:

Increasing the deadtime both via hardware (resistor from DT pin of UCC21520) and via software. Nothing
Removing the diode discharge resistor so the gate is charged and discharged via a 4.7R resistor - Nope
Increasing this gate resistor to 10R then to 22R - No benefit
Reducing the switching frequency from 42KHz to 20KHz did slightly reduce the current draw (30 -> 20mA)

I don't know what else to consider. The gate drive supply is provided by a separate 3S LiPo at 12v. Is it a layout problem or something to do with the separated kelvin gate/source pins? The circuit is no good to go to 450volts at the moment and I'm pulling my hair out!


texts: Can I replace TIP127 with TIP122 power transistor?

texts: I have faulty PCB for hoverboard. A TIP127 has failed. I don't have the same. The one I have to replace it with is TIP122. Would there be any problem with this?


texts: PCB Panelization tool/SW and adding test connections

texts:
I prepared 4 different PCB layouts on Eagle CAD and generated Gerber files. As I can see Eagle CAD doesn't have any option to panelization.

Is there any free tool/program that can allow me to panelize different layouts in the same panel (A4 size)?

Furthermore, I will like to have test connections through breakout tabs to the side of the panel. Do I need to draw it on the panelization SW or how?


texts:
The following is an example of a Logic-And gate using two spst switches:

What is the most common schematic to show a logic-and gate (without the symbol itself)? I have come across various schematics showing input nodes A and B (with nothing connected to it), but I'm not sure how those would be shown in a schematic to simulate the on/off states of those inputs. Additionally, how does one usually show that a logic gate's output is either in the On or Off position, or is this usually not done in a schematic (I've used an LED below but this is more to show myself that the and-operation is working correctly).


texts: How to prove boolean algebra rules without truth table?

texts:
In boolean algebra I found the rules like the redundancy theorem and de morgan's law, a little unintuitive.

Although the truth table shows it all, I wonder if the rules were made by experimenting like this in the first place, and if not, how do I prove such rules without using the truth table?


texts: What is the densest part of an integrated circuit?

texts:
Also, which part of an integrated circuit has been affected by Moore's law most?

Is it the memory (caches, embedded memory, etc.)?

Or is it the logic (execution units, control units, etc.)?

Or something else?

Ideally with numbers/percentages.


texts:
Currently I am working on a project with a stm32f302c8t6 mcu which I monitor an analog signal. I generate a tone using dac when the signal exceeds a certain treshold. My problem is that as soon as I generate the audio the analog signal path
is interferred by the audio signal. The audio is output with a buzzer. At first I thought that the current drawn by the buzzer might be the reason.

simulate this circuit – Schematic created using CircuitLab

The dac output is a 440 Hz sinewave.
I tried a seperate power supply with a dedicated 3.3v regulator for the audio section with a combination of several bypass capacitors with no success. Any recommendation will be highly appreciated.


texts: Signal propagation when observing integrated circuits

texts:
Consider this image:

...
   It says "4-digit serial shift register, based on D-type latches" (please correct me if this is not a valid terminology). Clearly, I can't understand a property of D-latch to hold back an input signal for 1 CLK cycle. Is it correct assumption that we should observe signal propagation starting from N-th (4th in this case) latch and going left until 1st one?
I mean, if we look from left to right, the register does not really shift, on the first high CLK, it just fills up with all "1"s.
UPDATE:
Basically, an essence of my question is  - what goes first: D(k)->Q(k), or Q(k-1)->D(k)?


texts:
I would like to remove the buzzer on an Intel mainboard, and replace it with an LED with a resistor. Is there a standard voltage that I can assume that comes to the two ends of the buzzer?
Why was a buzzer used in the design of computer mainboards instead of an LED?

Update: My buzzer is labeled HYCOM HY-05, datasheet here.


texts:
My software appears to be working as expected, but the BSY flag is not clearing in the SPI register.

Background:

I am trying to get SPI working with DMA on the STM32. After figuring out that the DMA is picky about which channel you use for which peripheral, I got things working as expected. I read somewhere that it's important to ensure the SPI BuSY flag is cleared before starting another transfer. I am examining the registers using the ST/LINK v2 and for whatever reason, the SPI BSY flag is remaining set and if I have an IF statement in my code to confirm that it's cleared before continuing, the code hangs. I'm aware of the "Heisenbug" of observing the SPI_SR/DR registers with a debugger.

At first I tried using full duplex with SPI and the two DMA channels with the pins connected together and a TX and RX array. After the transfer, the RX array is a perfect copy of the TX array. Thinking that the issue may have been an expected clock-edge missing, I disconnected the two pins and set the SPI to TX only and commented out all of the RX DMA and SPI code. The issue persists.

Two things to note are that the BUSY flag is often the only thing set in the SR register. However, if I disabled the check for the BUSY flag and start the DMA transfer again, upon subsequent calls to the interrupt service routine, the RXNE and TXE buffers seem to arbitrarily change between 1 and 0, with the expected state of them both being empty being more common and the SPI_DR seems to sometimes get an arbitrary value. I don't see the overrun flag set.

Why doesn't the BUSY flag get cleared?


texts: Design a Li-Po battery charger with small solar panel and charger controller with embedded MPPT

texts:
I'm designing a small solar charger with these characteristics:

SOLAR PANEL

Voc = 5,65 V
Vmp = 4,25 V (Voc -25% approx.)
Isc = 250 mA

IC CHARGER CONTROLLER

STMicroelectronics SPV1040 High efficiency solar battery charger with embedded MPPT

BATTERY

Type Li-Po (Model LP804367, FULLWAT)
Nominal Voltage 3.7 V
Nominal Capacity 2400 mAh
Standard Charge Current 480 mA
Max Charge Current 4800 mA
Charge cut-off Voltage 4.20+/-0.05 V
Discharge cut-off Voltage 2.75 V

I used the ST Electronics eDesignSuite tool and THIS is the schematic of the design calculated with this tool

QUESTIONS

When I have entered the characteristics of the solar panel in the eDesignSuite tool, I have introduced as open circuit voltage the value Voc = 5.2 V which is the maximum input voltage allowed by the IC SPV1040T. However, the Voc value of the solar panel used is 5.65 V, so I thought of using a zener diode in parallel with the capacitor Cin to not exceed this the maximum voltage allowed at the IC input (5.2 V).

Is this correct or is there a better solution than using a zener diode to clamp the input voltage?
Could the zener diode decrease to the efficiency of the MPPT algorithm?
If using a diode zener is a feasible solution, could this zener diode be used? (1SMA5918BT3G)