texts:
I am newbie to Hardware Security. While studying Side Channel Attack, I realized that power consumption profile of electronic control unit is a key to encrypt what  algorithm runs on it. I thought implementing same algorithm with different approach may change power consumption profile.

For example:

Task is to blink a led every 1 second.
First approach is to configure GPIO and make it happen with delay.
Second approach is configuring a TIMER that gives logic 1 per second.

But I don't have tools to test this phenomenon. So I would like to take some ideas if it may work or don't.


texts: Is there a reason for the shape surge arrests have?

texts:
Why do surge arrest typically looks like this ?

I found one of the reason is to prevent ingress of water by using slippery rubber material but it does not explain the reason for the shape of the surge arrest.


texts:
I am simulating flyback dc-dc converter  in multisim software tool ..

I want to know the difference betweem  primary inductance and magnetising inductance , also secondary leakage inductance?


texts: How should I alter my PISO shift register circuit so that it works with 3.3v instead of 5v?

texts:
I've followed this Arduino guide to build a circuit using a CD4021BE PISO shift register, and 10k pulldown resistors. It works perfectly fine with the Arduino's 5v supply.

I then attempted to use this circuit with my Raspberry Pi's GPIO, which only supplies 3.3v, and I was getting very unreliable readings from the data pin. Increasing the clock delay to 1ms improved it a bit, but it's still very unreliable. (Some bits read high every few seconds, when everything should be low.)

I assume that running a CD4021BE shift register at 3.3v requires a different value for the pulldown resistors, so which value would you recommend? I have seen this answer to a similar question about pullup/pulldown resistors, but would like to know if there is any 'rule of thumb' for pulldown resistors in a 3.3v circuit. I would guess that a 5k resistor should solve the problem, but I wanted to get some advice before buying resistors and desoldering the existing ones.


texts: Reduce the impact of gaussian noise on DTMF decoder

texts:
I have a Matlab code to decode digits from a given DTMF audio file (wav format). Considering the input signal to be in the form of x(n)+αv(n) where x(n) is the noise-free signal (i.e. the given DTMF audio file), v(n) is white Gaussian noise and α is a constant controlling how much noise is added, following is the block diagram of my code:

My decoder algorithm is working fairly well but I have been asked to propose ideas to improve my algorithm further. How can I reduce the noise impact? I was thinking to feed my input signal into another block (shown in RED color below) before sending it to decoder.

But I don't know how to achieve that. Can anyone help on this please?

(Please note that I don't own any of Matlab toolboxes installed on my machine. So any suggestion should be implementable with native Matlab commands)

If the decoding algorithm is needed for answering this question, I have posted a copy of it here.


texts:
I'm trying to find a way to convert a bipolar signal from a load cell (Futek) to an input for a differential ADC on a TIVA microcontroller(TI TM4C123GH6PM). The load cell's amplifier outputs a bipolar (-2.67 V to 2.67 V) for a 500 lb range in tension and compression.

This setup uses decoupling capacitors (0.47 μF) to eliminate high frequency noise within the system. The noise is extremely low and I get very accurate readings, but the problem is that the GNDs of the microcontroller and float without reference to each other. I tried to do it this way so that microcontroller would never see a negative voltage, but treat the amplifier GND as a data input.

The problem is that now because I've dereferenced the GNDs of the two systems, there is no way to make sure that the two GNDs don't float away. I recognize that there needs to be another way to use a bipolar signal for a differential input, can someone help me?


texts: Analysis of two D flip-flop designs based on D latches

texts:
I am trying to create D flip-flops with D latches. Below are 2 possible ones. (Note that they are both rising-edge triggered.)

I tried to analyze their behaviors at the clock edges.
For D flip-flop 1,

At the rising edge, because the clock needs to go through one more NOT gate to reach the master1 latch, so I think the master1 latch will become opaque a little bit later than slave1 become transparent. That is, both D latches can be transparent at the clock "rise" for a short moment. As long as the D1 remain stable around the rising edge, the D will propagate all the way to Q1 as soon as slave1 becomes transparent.

At the falling edge, for the same reason, master1 latch will become transparent a little bit later than slave1 latch becomes opaque. Q1 will be held by slave1. So D1 won't affect Q1.

For D flip-flop 2,

At the rising edge, master2 becomes opaque a little bit earlier than slave2 becomes transparent due to the NOT gate. This is still OK for N2 to propagate to Q2 once slave2 becomes transparent.

But at the falling edge, master2 becomes transparent a little bit earlier than slave2 becomes opaque because the CLK signal reaches master2 sooner than slave2. So it's possible that master2 turns transparent while slave2 also  remains transparent. That is, both D latches can be transparent at the clock "fall" for a short moment. Thus Q2 may be contaminated by D2, which is not OK because slave2 fails to hold the Q2.

So the D flip-flop design 2 is bad.
Is my analysis correct?  It seems the critical part is for the slave D latch to respond to the clock faster than the master D latch.. But I don't know yet how to quantify/specify this constraint. Most timing analysis I glanced so far focus on the rising edge. But I think the falling edge is also relevant.
ADD 1 - 9:27 AM 1/19/2021
I am digging into some materials about sequential circuit timing analysis. Will come back with some more info.


texts: dc to dc converter bypass capacitor consideration

texts: I using a TI buck regulator (LM21212) to power a bunch of components on my board at a certain voltage. When calculating stability, do I need to take into account all the decoupling capacitors (e.g. 0.1 uF and 0.01 uF) that I have placed next to all the components that is powered by the regulator?


texts: Identifying a signal in logic analyzer pulse train

texts:
I'm working with an unknown RS-485 signal, possibly RS-422 with a Saleae logic analyzer. I can identify the command and response sequence but can't figure out what this "pulse train" is there for, 0xFF sequence after the 0x3F. It seems to be periodic with two different pulse widths. The pulse widths don't seem to match the pulse width of a bit.

Here is a close up of the "pulse train".


texts:
Datasheets:

Will post below since I can't post more than two links.

LED circuit schematic:

Photodiode circuit schematic:

Details:

The resistor value for the LED circuit (top right) is 24 ohms rated at 5W.
The resistor value for the photodiode circuit is 33 ohms.
The op amp is an LM358.

Problem:

I've hooked up these schematics to an Arduino uno and have been pulsing the LED at a frequency of 10 kHz. For some reason, the photodiode isn't reacting when I point the LED towards it. I've tried several different resistor values and can't get the photodiode to react, unfortunately. I've read several different threads and haven't found the information I need. I can post the code, if needed, but I doubt that's the culprit considering I've tried the same code on a different photodiode.


texts: Is A4988 and DRV8825 Current Limit Setting RMS or Peak?

texts:
I'm trying to aggregate information on config settings and current limit calculations for all the popular "StepStick" style motor drivers. However, I've noticed that while the older type (A4988 & DRV8825) just have a Vref = I / 2 style calculation, the new Trinamic TMC2xxx line of drivers all have calculations for both RMS and Peak current.

So, this leaves me with two main questions:

If my stepper motor data sheet says "Rated Current: 1.4A", do I need to calculate for the TMC drivers the Vref for RMS or Peak?
For the older drivers (A4988 & DRV8825) is it limiting the RMS or Peak current?


texts: Why does an oscilloscope show a different voltage from a signal generator?

texts:
I have a Rigol DS1052E oscilloscope and a Rigol DG1022 function generator. I have just changed the oscilloscope fan for a silent one, as I found, as is commonly reported, that the original fan noise was very irritating. That seems successful and is the only modification I have made to the oscilloscope.

Testing the oscilloscope as a check, I connected the signal generator to it with a plain BNC cable (both ends BNC), and set the signal generator to a 5 volt peak-to+peak 1 kHz sine wave, and the voltage was confirmed by a digital voltmeter showing 3.67 or so V RMS. However, the oscilloscope shows 10 V p/p, and this also happens for a 100 kHz sine wave. Testing other amplitudes, it is not always precisely two to one, but it is round about that ratio.

Why does the oscilloscope show twice the voltage as the signal generator? I hope it is something trivial that I have overlooked, and desperately not an "undocumented hardware modification", as we used to say in the lab when we dropped something and it no longer worked.

Well I need not have panicked. @Sephro has the solution. Thank you to him especially, and to the others for the helpful comments. I would have also accepted @alex forencich's version if I was allowed to. I was beginning to approach that answer myself, since I discovered that inserting a 50 ohm parallel load on the output of the sig. gen. cured the problem, I have done as @Seph suggested and set the sig. gen. output to "High Z" and that, too, makes the voltages shown coincide.

So, my extended explanation, from the answers given, is:

I see now that, to generate 5 V across a 50 ohm load, with its internal resistance also 50 ohms, the sig. gen. actually generates 10 V of which, because the two 50 ohms in series act as a voltage divider, only 5 V appears at the output terminals, and that is the value that is displayed on the sig. gen. panel. If a high impedance load such as an oscilloscope is attached, then the voltage divider is distorted, with a very small drop across the sig. gen.'s internal 50 ohms, and very nearly all across the 'scope input. The sig. gen. does not "know" this and still gives the same display as for the 50 ohm load. As @Seph says, there is a "High Z" setting for the DG1022 sig. gen. that (in effect?) replaces the internal impedance with a high impedance to match the load, so the voltage divider effect is restored.


texts: Why is the series resistor getting hot in this LED driving circuit?

texts:
I am trying to create the circuit below but then the resistor is getting too hot. I think is has something to do with my power source 15V, 8A. My resistor is 51 ohms, 1/4W. Any comment please... Should I increase resistance or wattage to prevent resistor from getting very hot.

simulate this circuit – Schematic created using CircuitLab

Thanks.


texts: How do microstrips actually represent lumped components?

texts:
I'm having trouble understand intutively how microstrips repersent lumped element components.

All we are told is that, high impedance sections on a microstrip line repersent inductors and low-impedance repersent capacitors. How though? How does this flat piece of conductive material with a dielectric below it actually repersent a capacitor/inductor.


texts: what wattage 10 ohm resistor needed for 330mA at 3.3v?

texts:
I'm pretty new to all this.  Please forgive me if this is an obvious question.

I am working with an ESP8266 module. They generally have a max operating current draw of somewhere around 250 mA.  I have noticed that under certain conditions it can seize up, and starts drawing current at an unusually high rate.

I am operating this off a steady 3.3v DC supply, so I was thinking of using a resistor to limit the current going into the module when this happens, but would like for someone to double check my math here.

At 3.3v a 10 ohm resistor should cap me well within my safe range at 330 mA, correct?  Going further with the math, 330 mA at 3.3v would be just over a watt of power.  So would I need a resistor rated for over a Watt?


texts: Can someone explain how these work ? I want to make my own ultrasonic bath, but I can't find any useful specs. Do I need some specific circuit to run them or it's just 'plug and play' ?


texts: Increase the ramp up stepper motor performance

texts:
I'm driving a NEMA34 bipolar stepper motor with the following specifications:

Holding torque 5.9 Nm
Step angle 1.8°
Resistance / phase 0.33±10% Ω
Inductance / phase 3.00±20% mH
Max load axial 65 N
Max load radial 200 N

https://www.igus.com/info/drive-technology-nema-34-ca

It is being driven by a DM860 leadshine with an output current of 1.0 - 7.2A , and an input voltage of 24 - 80 VDC (http://www.sah.co.rs/media/sah/techdocs/dm860h_manual.pdf). I have the driver configured with 24V power supply,PNP signals control signal conector and using a microstep of 4 (800 pulses / rev). I tried to create a code with ramp up and ramp down by following this example (joan answer) https://raspberrypi.stackexchange.com/questions/26216/how-to-generate-smooth-frequency-ramp

This is an example of my code:

import time

import pigpio

def working(longLoop):
    START_DELAY=500
    FINAL_DELAY=155

    GPIO=20
    dirrection = 21

    pi = pigpio.pi()

    pi.set_mode(GPIO, pigpio.OUTPUT)

    pi.wave_clear()

    pi.write(dirrection,1)
    # build initial ramp

    wf=[]

    for delay in range(START_DELAY, FINAL_DELAY, -1):
       wf.append(pigpio.pulse(1<<GPIO, 0,       delay))
       wf.append(pigpio.pulse(0,       1<<GPIO, delay))

    pi.wave_add_generic(wf)

    # add lots of pulses at final rate to give timing lee-way

    wf=[]

    # add after existing pulses

    offset = pi.wave_get_micros()

    print("ramp is {} micros".format(offset))

    wf.append(pigpio.pulse(0, 0, offset))

    for i in range(100):
       wf.append(pigpio.pulse(1<<GPIO, 0,       FINAL_DELAY))
       wf.append(pigpio.pulse(0,       1<<GPIO, FINAL_DELAY))

    pi.wave_add_generic(wf)

    wid1 = pi.wave_create()

    # short waveform to repeat final speed

    wf=[]

    wf.append(pigpio.pulse(1<<GPIO, 0,       FINAL_DELAY))
    wf.append(pigpio.pulse(0,       1<<GPIO, FINAL_DELAY))

    pi.wave_add_generic(wf)

    wid0 = pi.wave_create()

    #ramp down

    wf=[]

    for delay in range(FINAL_DELAY,START_DELAY):
       wf.append(pigpio.pulse(1<<GPIO, 0,       delay))
       wf.append(pigpio.pulse(0,       1<<GPIO, delay))

    pi.wave_add_generic(wf)

    wid2 = pi.wave_create()

    # send ramp, stop when final rate reached

    pi.wave_send_once(wid1)

    time.sleep(float(offset)/1000000.0) # make sure it's a float

    pi.wave_send_repeat(wid0)

    time.sleep(longLoop)

    pi.wave_send_once(wid2)

    pi.wave_tx_stop()

    pi.stop()

working(1)

The problem is, with my code, the stepper motor cannot move around 2000 rpm (my stepper motor moves lower than 2000 rpm). If I set the FINAL_DELAY lower than 155 the stepper motor would be lose the step motion and starts to vibrate. So what's the problem in my code? Thank you!

so this is my switch setup

SW1 = on
SW2 = on
SW3 = on


texts: How to take into account dropout voltage of a buck converter to find minimum input voltage required?

texts: In DC/DC buck converters datasheet dropout voltage vs output current is given like the graph seen below. To find the worst case minimum input voltage, lets say at 3.3V output and 1A output current, to this converter i would look at the 105C line and see there will be a 1.5V dropout. Therefore if the minimum input voltage for proper operation is 5V than i have to provide a minimun of 6.5V for proper operation at the highest temperature condition. Am interpreting this correctly?


texts: How to use a parametric value within PULSE voltage source in LTSpice?

texts:
I would like to use a parametric symbol for the period value of the PULSE component in LTSpice but so far I have been unsuccessful.
currently my source is:

PULSE(-15 15 0 0.1e-6 0.1e-6 0.4e-6 1e-6)

And I would like to for example change number '6' into a parameter, so then I could change that parameter if I wanted to. I tried the following but it did not work:

.PARAM f=6
PULSE(-15 15 0 0.1e-{f} 0.1e-{f} 0.4e-{f} 1e-{f})

Any solution or workaround is appreciated.


texts: Measuring the minimum voltage square wave

texts:
I would like to measure if an 1 kHz square wave signal ±12V 10-80% duty-cycle has a minimum voltage of -11V at Vm.

simulate this circuit – Schematic created using CircuitLab

So I would like to measure if Vm is <= -11V and if so then I would like to have a +5V signal to use in a micro controller. I was thinking about a comparator but then you just get an 1 kHz signal instead of a solid output.


texts: How many DS18B20 temperature sensors can I connect to one bus arduino?

texts:
How many temperature sensors can I connect to one bus without losing accuracy.Can I use for example 50 sensors to one bus? Should I change the resistor when I connect too many sensors? Here is the manual http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

//  This Arduino sketch reads DS18B20 "1-Wire" digital
//  temperature sensors.
//  Copyright (c) 2010 Mark McComb, hacktronics LLC
//  License: http://www.opensource.org/licenses/mit-license.php (Go crazy)
//  Tutorial:
//  http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html

#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into pin 3 on the Arduino
#define ONE_WIRE_BUS 3

// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

// Assign the unique addresses of your 1-Wire temp sensors.
// See the tutorial on how to obtain these addresses:
// http://www.hacktronics.com/Tutorials/arduino-1-wire-address-finder.html

DeviceAddress insideThermometer = { 0x28, 0x94, 0xE2, 0xDF, 0x02, 0x00, 0x00, 0xFE };
DeviceAddress outsideThermometer = { 0x28, 0x6B, 0xDF, 0xDF, 0x02, 0x00, 0x00, 0xC0 };
DeviceAddress dogHouseThermometer = { 0x28, 0x59, 0xBE, 0xDF, 0x02, 0x00, 0x00, 0x9F };

void setup(void)
{
  // start serial port
  Serial.begin(9600);
  // Start up the library
  sensors.begin();
  // set the resolution to 10 bit (good enough?)
  sensors.setResolution(insideThermometer, 10);
  sensors.setResolution(outsideThermometer, 10);
  sensors.setResolution(dogHouseThermometer, 10);
}

void printTemperature(DeviceAddress deviceAddress)
{
  float tempC = sensors.getTempC(deviceAddress);
  if (tempC == -127.00) {
    Serial.print("Error getting temperature");
  } else {
    Serial.print("C: ");
    Serial.print(tempC);
    Serial.print(" F: ");
    Serial.print(DallasTemperature::toFahrenheit(tempC));
  }
}

void loop(void)
{
  delay(2000);
  Serial.print("Getting temperatures...\n\r");
  sensors.requestTemperatures();

  Serial.print("Inside temperature is: ");
  printTemperature(insideThermometer);
  Serial.print("\n\r");
  Serial.print("Outside temperature is: ");
  printTemperature(outsideThermometer);
  Serial.print("\n\r");
  Serial.print("Dog House temperature is: ");
  printTemperature(dogHouseThermometer);
  Serial.print("\n\r\n\r");
}


texts: Difference between `gcc` and `gcc-msp430`

texts:
What is the difference between using gcc versus using gcc-msp430? When I run man gcc, there are msp430 options that I can set using -mmcu=. However, whenever I run gcc to compile a code for the msp430, I get the following error:

$ gcc -Os -Wall -g -mmcu=msp430g2553 -c main.c
gcc: error: unrecognized command line option ‘-mmcu=msp430g2553’
make: *** [Makefile:11: main.o] Error 1

What is wrong here? I'm on Fedora Linux if that makes a difference.


texts:
Apart from moving each sheet out of my Altium Project and generating a BOM for each of them, is there a way to generate a separate BOM for each Schematic Page in my Altium Project? Or alternatively, to group the BOM into a separate section for each sheet on one BOM?

I would like to know what value each of the logical units (separate Sheets) contributes to the total BOM Cost, e.g. Power Supply Sheet cost = $4.00, MCU Page = $5.00 etc.


texts: Is it possible to protect a headphone socket from contact wear while allowing for repeated removal/insertion of headhones?

texts:
I have an electronic home organ. I want to play music out loud some of the time, but at night to use headphones so as not to disturb people. The headphone socket works fine, and I could do this just by inserting the headphones whenever I want to use them and removing them when not.
However, I think this will eventually wear out the contact on not just the headphones (which I can replace) but on the socket itself.  I tried putting in the socket a male to female converter jack, which I can then plug the headphones into and remove without any friction on the main organ socket.
The problem with this, however, is that when the converter jack it is in the socket the organ "thinks" it should be playing through the headphones and so does not play through its main speakers.
Does anyone know of any device or workaround that could help?


texts: How to deal with signal polarity relative to USB-RS485 converters?

texts:
I have two USB-RS485 converters. One with skrew connectors that are electrically isolated from the USB (ADAM-4561) and one wire-end version from FTDI chip.
I want to connect them together to send messages between two laptops (to test a serial communication protocol) but due to ambiguity regarding signal labelling, I measured the signals, and found an issue regarding polarity.

The upper figure shows the result when using the converter from FTDI chip and the lower figure shows the result when using the ADAM-4561.

The ADAM-4561 signals are inverted as expected.

The FTDI-chip signals are also inverted when the line is active, i.e. following the first bit of the communication, but when looking at the waveform prior to the point where the lines become active, then the signals are at the same level.

Is this an indication that the FTDI-chip converter is not functioning properly ?

If I connect the ADAM-4561's A,B,GND to the FTDI-chip cable's A,B,GND, then could the difference in polarity in one of the signal pairs (when the line is quited) be harmful for equipment ?


texts: Why CMOS turns on when input voltage is zero?

texts:
When the input voltage is high, Q1 is off and Q2 is on. In this case, the shorted Q2 pulls the output voltage down to ground. On the other hand, when the input voltage is low, Q1 is on and Q2 is off.
Now, the shorted Q1 pulls the output voltage up to VDD.

BUT I read that in CMOS, the high is +VDD and the low is 0. How does Q1 turns on when input voltage is zero(won't it only turn on when Vin is negative) ?


texts: Detect "real" overcurrent/short-circuits vs. current peaks

texts:
We have a MOSFET that drives a load. The load has a sense resistor in its current path and its  voltage is used to trigger a circuit that can disconnect the load if we detect an over current condition.
But it wasn't that easy. Many kinds of loads generate large pulses when connected (input capacitors, etc), so temporal overcurrents can actually trigger the latch, so we fed that current sense voltage into a capacitor. It looks like this:

The issue is that higher currents will kill the MOSFET (and other existing circuitry) exponentially faster, while higher voltages (from the current sense) will change the capacitor less than linearly faster.
If we tweak the value for a reasonable current/time to trigger the latch, a higher current will take too long, while tuning for a high current will overshoot at lower currents.

We have been thinking about using a thermistor instead of a capacitor (right response curve) but they all seem to be too slow for our case (at 200A we have about 40us to shut off). Now there's an idea of using an integrator op-amp to measure current*time...
Does any of that make sense? Is there a industry standard practice for this sort of case? This can't really be this complicated, it feels like it should be a common issue... can it? Isn't it? :)

Our issue is not about the components (whether the op-amp will be able to drive the MOSFET at X Amps), it is about triggering in 'this is too high too long' rather than on 'high current but short and okay' situations. I've removed the device names accordingly :)


texts:
Can I ask why digital BJTs (pre-biased) BJTs are called digital?
There is almost no source that describes why this product is so named.


texts:
I purchased a number of 50W 5B10C high power leds. Link at end.
These need at least 25V to turn on and I am using a setup with a 21V LIPO battery and a 150W boost converter stepping this up to 30V. I fully expect the battery and boost converter to be able to deliver 150W if short circuited.
Having no constant current driver, I took a chance on blinking one of the leds by connecting it directly to the 30V, and it worked fine, as expected for very short blinks.
Eventually I extended the duration, and in the end I just kept power on, and the led did not burn out, or even get overly hot.
The question here, since I am apparently missing something, is how I am getting away with this? Assuming the boost converter is actually able to deliver 150W, as per data sheet, would it not be expected that the led burned out in short order, driven as directly as this?
edit:
In the end, it probably comes down to a balance of internal battery resistance and resistance in the led, so with the right voltage, it can reach a balance.. by  luck.
https://www.ebay.com/itm/Xmas-SMD-LED-Driver-Chip-Bulbs-Waterproof-High-Power-Supply-10W-20W-30W-50W-100W/113172342934?ssPageName=STRK%3AMEBIDX%3AIT&var=413476810397&_trksid=p2060353.m2749.l2649


texts: How do I control a DC motor with a MOSFET transistor?

texts:
I want to control it with the PIC16F877A PWM pins and this PIC pin connected to MOSFET with an opto-coupler (PC817)

C1 is a 10uF electrolytic capacitor, and the motor is rated for 12V DC.

Can I use another MOSFET like the IRF3205?


texts:
Can someone recommend a good op amp that can run on a potentially noisy 6.3V tube amp heater supply?

So desired / required characteristics are:

Single supply < 6.3V (although I think the 6.3V is RMS so the real voltage might be more like 8.9V)
Very good PSRR
Low noise (so preferrably bipolar and not something like "LinCMOS")
Unity gain stable
Decent power necessary to drive possibly long cable

I want to create a rack mount unit with a bunch of tube preamps and I need to buffer the output using probably a simple inverting op amp stage with a very large Ri / Rf ratio (like 1M / 10k) to step down the ~230Vpp of the vacuum tube anode to ~2.3Vpp on the op amp output.


texts: Assistance on BJT Transistor Amplifier Design

texts:
Building a BJT amplifier with transistors, 15 V Vcc, Ro<20k, Ri>100k and a current from power < 5mA, the Avo is about 50 and a peak to peak of 10 V with +/- 5V peak.

I tried simulating a Ce into a CC multistage amplifier to get a high input resistance, a moderate gain, and a low output resistance, but however, I could not attain the frequency bandwidth.


texts:
So I'm still very new to electronics but I would like to make a 100 LED Lamp for fun. I got my hands on a few 18650 batteries yesterday so I decided to do this project. I thought it through but I am not sure I have it right, here is my idea: I take two 18650 batteries, they both have 4,2V and output 5,6A. If I put them in parallel I have 4,2V and 11,2A, right? I measured my LEDs, they draw about 100mA each, that means I shouldn't have any problems powering 100 of them with the two batteries in parallel. Now my idea was to take 10 LEDs and put them in sequence and have these 10 sequences in parallel, would that work? Also I need a way to charge the Batteries later on and some sort of voltage cutoff so the batteries don't break. But I will worry about those things once I understood the basics.
Thanks in advance :)


texts: creating a circuit using half/full adder

texts:
My brother got this at school I cant help him with, I am thankfull for any help/advices

On a street there are 2 traffic lights - one for people and one for cars.

Both traffic lights have a button for switching.

1) Traffic lights can only show "green" and "red"

2) If the cars are green, the pedestrians have red

3) one of the two buttons is pressed, the traffic lights change the state

Draw a circuit.

What I tried (not correct and kinda without any sense I guess):

EDIT:

Our final solution (not sure if correct or not - using 1 button to switch only)


texts:
I'm in the process of building a bench top power supply, based on an ATX PSU.
I have nearly finished the build and have a unit which can supply +3.3 V, +5 V, +12 V and a variable voltage between +0.8 V and +30 V. I am going to add a female USB socket but would also like to use the -12 V which comes from the PSU.
Ideally I would like to be able to adjust the negative voltage between 0 and -12 V, but I cannot find anywhere which describes how to go about it.
Obviously, if it was a positive voltage I could use a buck converter, but I can't find one which deals with negative voltage.
Does anyone know if they exist.?
If they don't exist, are there other options I could try?
Many thanks for any help/advice given.


texts: Transimpedance Amplifier and Photodiode for BFSK

texts:
I am working on my first transimpedence amplifier circuit and am having some trouble. I have am looking to reconstruct a BFSK signal modulated on an LED. The BFSK signal uses a 50kHz sine wave at 80mA to represent a '1' and a 30kHz sine wave at 10mA to represent a '0'. The signal has a data rate of 4.8kHz maximum. I am using a TSTA7100 for my LED. The photodiode I am attempting to use is the PC50-7-TO8.

I have constructed my transimpedence amplifier circuit according to this Texas Instruments video. I would ideally like my output to range from 0V to 5V. I have roughly estimated that my photodiode's input current at a maximum would be 10uA.

The circuit I currently have connected is shown below:

simulate this circuit – Schematic created using CircuitLab

The issue I am having is that there is no measurable signal being recreated on the Op Amp's output from the transmitted LED BFSK signal. In fact, instead, I see odd waveforms that I believe are caused by the +5V switching power supply. I get the same waveform whether the LED is on or off. The output (node V_out) is shown below:

My questions are what is wrong with this circuit causing the op amp not to recreate the photodiode's signal? Also, is there any advice on how I could improve the received signal quality?

I am still a novice with op amps so this has already been quite a learning experience. Thank you in advanced for your help.


texts:
I build simple RPM meter (works fine), but i wish to try use it in harsh environment, so the question is how to properly protect optocouplers input from overvoltage/ESD? In the circuit two optoisolators with a common anode are used, and the cathodes are connected to the collectors of the output transistors of the sensors. In the circuit two optoisolators with a common anode are used, and the cathodes are connected to the collectors of the output transistors of the sensors. I do not have information about the protection applied in the sensors (Parker speed sensors).

Would it then be sufficient to apply "classic" scheme with one TVS between the anode and the cathode of each input (for suppressing overvoltages between the anode and cathode and additional protection against reverse polarity)?
Or it would be better to suppress both the anode and cathode lines (relative to ground) with two TVS'es to GND?

Sorry for bad English...


texts: In what situation should I keep the Brown-out Detection feature OFF on a microcontroller?

texts:
When the power supply on a microcontroller falls under a certain threshold, a brown-out conditions occurs and RAM memory may get corrupted. Provided that every power down sequence of the circuit can mean a potential brown-out condition, I always enable the Brown-out Detection Reset mechanism when working with microcontrollers.

I was wondering if there are any situations in which it is not recommended to enable the Brown-out Reset feature?


texts:
Today I installed a couple of light bulbs with my friend. The two wires coming from the ceiling we connected to the lamps using connection strips.

On close examination we noticed that one of the wires had a small crack in it - it was maybe one quarter or a third through the diameter of the wire, I cannot say for sure. My friend, who has a lot more experience in electrical installation than I do, said that such a wire is a fire hazard because the crack means the wire has a smaller diameter in that spot than intended and therefore higher resistance and it therefore dissipates power and could get hotter than expected when powered on.

This sounded strange to me but I didn't argue him at the spot because I wasn't sure myself. Now that I think about it I can't say I agree with him: Even if there is a crack across the diameter of the wire, wouldn't this simply mean that there is extra resistance along the length of the wire as a whole (seen from the "root" of the wires in the electrical system) and just mean there is less current flowing in the lamp?

So which one of us is right? Does such a crack introduce a fire hazard or not, and why?


texts:
I have a brushless DC Motor that i am considering buying from hobbyking.com with 2100Kv (RPM/v) i am trying to follow the equation on Wikipedia's motor constants page i have included the equation here but i am having difficulty understanding whether i am using the calculation correctly.

My calculation is 60/(2 x π x 2100) = 0.00454 Nm/A and this should be the value of Kt described above, also because Kt = Ke my back EMF constant will also be 0.00454?

Can anyone help me understand if this is correct?


texts:
I wanted to mathematically find the voltage on all capacitors in a Marx generator circuit.  I thought that each capacitor would be charged like its own RC charging circuit.  I came up with these formulas for this 3 stage charging Marx generator circuit

But the graph of my equations (shown below) does not match the simulation (show above).  (Note that I couldn't get the sec/div to match that of the simulation, so one may looked stretched out more).  That note considered though, when I added more capacitors to the Marx generator, my equations got even less accurate.

I need help finding the equations representing the voltage across the capacitors in a Marx generator.  Thanks!


texts: Adding hysteresis to MOSFET used as a switch

texts:
I have a low-voltage detection circuit which I use to trigger one of two LEDs (green, and red) that is powered off of a +9V battery cell. As the battery discharges, its output voltage decreases, until when it finally hits the 6.9V level. When the battery provides an output voltage greater than 6.9V, the green LED is turned on, and currently flows from the source to the drain of the PMOS, Q4. If the voltage falls below 6.9V, the green LED is turned off, the red LED is turned on, and the output of Q4 is turned off.

However, as another commenter mentioned in a separate question on part of this circuit, I should implement hysteresis in some form or another so that I don't have the circuit alternating between the two LEDs at the cutoff point due to the average load of the circuit changing when in the "green" mode of operation. What is the most straightforward way to approach this?

Do I have a comparator feeding into the gate of the PMOS? Since my voltage rail is expected to change, I can't really use a voltage divider across Vcc and Gnd for reference. My intent is to have the circuit stay in the "red" region (ie: cutting off Q4) if it enters that region, with some noise tolerance for when the circuit is first turned on.

Thank you.

Edit

I simulated the circuit by Asmyldof below using a 100R resistor for the load, and a pair of AC power supplies with a shared 6V offset, and 0.5V amplitude each (60Hz and 120Hz frequency sinusoids), and the simulation below it. This appears to just offset the output signal with respect to the input supply power. Is this actually hysteresis, or is my simulation just terrible? Thanks!

Modified Circuit

Circuit Simulation - Light Blue:Power Rail, Orange:Output/Load Voltage


texts: How can I guarantee 50 ohm impedance on PCB trace?

texts:
I have a question. Imagine that I need to have a 50 ohms impedance in a PCB trace. For simple cases it's just applying the formula found all over the internet or use one of the online calculators

While looking for this information online I came across an article where a guy created a low cost electric field probe and a low cost magnetic field probe and then proceeded to perform tests on different configurations of microstrips on a dual layer board. His goal was just that, measure magnetic field and electric field with a near-field probe, with a low cost set up, so that small companies can perform their own tests before spending lots of money certifying the end product.

The configurations were as follows:

L-shape: One side all ground, not corroded. The other side just had
a line trace in the shape of an L.
H-shape: One side all ground, not corroded. The other side had
traces forming an H, and the middle of the H had a line going to the
edge of the board (the other traces, parallel with this one didn't
go to the edge of the board).
Radius-shape: This one was one sided.ç It was connected to the edge
of the board on one side, it made a loop and the end connector was
just beside the entry point.

It was necessary for the measures that the impedance on those lines were 50ohms. I honestly can't see how he calculated the impedance for those odd shapes, and I can't find any material on the web concerning how he was able to assure 50ohms on those lines.

Can someone point me in the right direction?

EDIT:

Did he just add termination resistors in specific places? Maybe in the H-shaped one he simply added 4 200 ohms resistors one each of the "legs" of the H? Does this guarantee 50 ohms? Then how did he do it to the radius-shaped one?

EDIT2:

Original article: Analysis of Electromagnetic Emission from PCB by using a Near-Field Probe


texts:
Interesting observation today; I set up a series stack of 4 cheap electrolytic capacitors (10V 220u) and after about 5 mins of applying 30V the lower most cap had settled at -300mV. The other three were at different positive voltages with the sum total being 30V.

Can anyone please explain why this cap went negative? I understand that different capacitances will lead to different equilibrium voltages but not why one would go negative.

Thanks in advance.


texts: DC gearhead motor broken - too much heat on terminals while soldering?

texts:
I am building a line-following robot using two of these motors:

Motors

I had everything on the breadboard and it worked fine - including both motors.
Then I built the circuit, soldered wires to the motor terminals, added molex connectors, and one motor doesn't work.  I switched the motors in the circuit - same one works, same one doesn't.  I stripped off the heatshrink tubing, and connected the bad motor directly to a battery with alligator clips - it still doesn't work.

I am still learning to solder - could I have applied too much heat and melted something important inside my motor?  Is there a way to find out?

Moving forward, is it a good idea to solder directly to motor terminals?  Should I have used a heatsink clip?

Thanks,
Matt


texts: Deriving the transfer function of a notch filter from schemtic

texts:
I cam across this schematic for a notch filter online. It was part of lab session at a University. Currently, I am trying to design a circuit and I need to use a notch filter out the 60 Hz frequency. The description in the image suggests it is exactly what I need.

However, I am not really an electrical engineer and although I brushed up on my understanding of transfer functions through op amps, this is still quite challenging for me.

Would be great if someone could help derive the transfer function and help me get values for C2 and Rg1. Some explanation of how you solved it would be amazing. Many thanks


texts: In the specification for the step-up booster is max. output current limit 2 A (or any other value based on the specific booster). Does this limit apply for the whole range of supported voltage or for the lowest voltage?


texts: How can I make this five-wire, 12V motor work?

texts:
I've been working on a project on my free time that requires a motor. I've been using a 6v motor (which has a positive and a negative wire). However, I found a mechanism in this bidet that I thought would be really useful for my project. I ripped it all apart, but I ran into a more complicated motor (12V, manufactured by Elensys, says "SP BN2A" and "16831" on top). This motor has five wires (red,black,orange,yellow,brownish).

I want to integrate it into my system, but I have no idea how to hook it up to my power. I've tried googling the documentation and nothing shows up, and trying all the possible wire combinations with a 9V battery to test whether it works (which I thought would be enough to make it move, albeit slowly).

How do I make it move and do what I want it to? If possible, could someone also explain how I could hook it up to my Raspberry Pi without frying it?


texts: Using a capacitor for instantaneous power?

texts: Would a capacitor be useful for an instantaneous power? If I am switching between two AC power sources while a load is connected. The switching time is 2/60 s. Could a sufficient sized capacitor be used to keep the load powered?


texts:
I am building a DAC, and right now I am designing the power supply. I would like to have a feedback about the correctness of my calculations before I order a custom made transformer.
I need to power the following things:

Tube stage plate voltage: 240V and 40mA circa
Tube filaments: 6.3V / 1.5A
DAC: 2x3.3v and a total of 400mA
PIC microprocessor + LEDs and OLEd display: 3.3V for circa 300mA

For the tube stage power supply I am going to use this design (taken from this project):

For the DAC and the PIC I'll use low noise LDOs.

I would like to use a single toroidal transformer with three secondary wirings:

Tube plates: 200Vrms / 100mA (200V*1.41 - 2V bridge - 15% main tolerance)
Tube Filaments: 9Vrms / 3A (9V*1.41 - 15% main tolerance - 2V bridge - 1.25 regulator )
DAC, PIC, LEDs and display: 5Vrms / 1.5A (5V*1.41 - 15% main tolerance - 2V bridge - 0.8 regulator)

Have I estimated right? Is it ok to use a single trafo, or should I use multiple?


texts: Use battery to drive main circuit or load battery and cut-off main circuit depending on power source

texts:
Please excuse my beginner's question. Having read about electronics and logics basics and specific power-related questions, I've not found anything that would explain to me how to realize the following scenario.
I have a main circuit with an Attiny13, a few LEDs and FETs turning motors on or off. This circuit is powered by a 3.7V LiPo battery connected to Vin and GND.
I have a USB charging board that I can connect my LiPo battery to. I would like to use that. But I don't want to always unplug the LiPo from my board, but instead have the charger connect via a cable to it.
I am not looking for a parallel loading-and-running circuit. I am searching for an exclusive automatic switch acting like the following:
If there is power on my board's charging connector, cut off the main circuit and let the power only flow to my battery.
If there is no power on my board's charging connector, connect the main circuit and let the power flow from my battery through the circuit.

Since this is a small-sized PCB project, a ready IC would be great, but a few discrete components will do either. If you could explain to me, how to connect it and what to be careful with, that'd be nice.
Side question: Is it true that I should put decoupling capacitors between Vin and GND of my MCU, Vin and GND of my battery and between anode, cathode of every of my current drawing components (like LEDs)?


texts: How to obtain the (estimate) equivalent gate count for a FPGA design?

texts:
I understand that gate count is not a measure for FPGA designs as it is in ASIC world. However, I have to compare the structural efficiency of two designs, one in FPGA and the other one in ASIC, by comparing their equivalent circuit area or gate count. For ASIC it is straightforward to obtain the gate count, however for FPGA, is there any approximation by which I can get the equivalent gate count for a design with the following specs?

FPGA: Xilinx XC3S1200E-4FG320

MULTs: 3(18x18) FFs:511 LUTs:611 Slices:521 Taps/bits: 10/16


texts:
In a 3.7V 2000mAH Li-ion 18650 battery, does it mean that the battery can deliver upto 2A for 1hr depending on the load...Or it will deliver like a constant current source which will deliver 2A for 1hr.?

Can somebody clarify on this?


texts: Are these two Arduino Pro Micros jumpered correctly?

texts:
I picked up a couple of cheap Pro Micro's off eBay a while back. Both are blue, and have no brand identifier on them (ie, Adafruit, Sparkfun, etc.).  The ebay ad. directly copies the text from SparkFun's Pro Micro - 5V/16MHz product page, where I got the schematic.

My challenge here is that I couldn't seem to get them to be identified by the IDE, so I'm trying to figure out just which they are.  I know they are Pro Micro, but still not sure about the 3.3V vs. 5V part.

Here's a summary of what I know...

The product description says 5V
The boards are marked "V11"
The voltage regulator on the board is a mic5219 labeled LG50 (which is 5v)
The spot on the back where one can mark "5V" or "3.3V" on the circuit is not marked
The schematic states for the jumper "Closed for 5V version"
The J1 jumper is NOT bridged, which would imply it's configured for 3.3V (?)
The main chip is an ATMEL MEGA32U4.

So there's the quandry.  5V regulator, but J1 not bridged as for 3.3V?  3.3V?

Here are some photos...

Any suggestions on how I can precisely identify the boards or at least know if they in fact are 5V but should have J1 bridged?  It seems based on the voltage regulator that it's 5V, but then J1 should be bridged if this was the case.


texts: Using two 12V batteries in series with both a 12V and 24V output

texts: I have a tornado shelter that I have wired for both 120V AC and 12V DC. All of the lighting is via 12V DC while the AC is used for recharging the batteries and running a 1500 VA UPS system that will power a small TV and radio. The UPS system normally uses two 12V SLA batteries in series. To increase the run time of the UPS I want to use auto batteries instead of the SLA batteries. In order to cut down on the cost of batteries I want to use only two auto batteries instead of three.  One 100AH battery used for the main lighting and a 50AH battery in series with the 100AH battery to provide the 24 volts for the UPS system. The UPS system will only use the two batteries when the AC is out which is normally rare. Do you see any problems with this setup providing I install a diode in the UPS battery feed to prevent the UPS from recharging the batteries and use separate smart chargers constantly connected and recharging (as long as AC is available) each individual battery? I feel I have overlooked something but I can't seem to put my finger on it.


texts: Transmitting a video stream through a microcontroller

texts:
I'm working a a project that currently works well but this year we want to expand it by collecting data from it, independent of its current functions.  We have set up an iPad App to control an Arduino through Bluetooth.  The next step is transmitting video through Bluetooth to the iPad.

With this question I would like to focus on how a microcontroller can send a video stream through Bluetooth.  I can't seem to find any way to even start this project.

How do you interface the camera with the microcontroller?

How do you then send that stream over Bluetooth?


texts: Short circuit in Peavey Valve King VK212

texts:
This is a follow up question from:
Guitar amplifier repair: burnt fuse, capacitor, what else?
I continue to work on the same case. In another module I've found a short to ground where the red dot is:

What I did so far:

Removed and checked C212, C210, C213, C211, C216 -> caps seem fine, short still in there with all of them gone.
Checked D208 -> is fine.
If any of the power tubes is removed -> no short.
As soon as all are in -> short in the red dot point.

Can the tubes be causing this short? How to test it? Optically they look fine.
I have to add that before assembling I have switched the amp on and the tubes all seemed to glow normally. It was simply complete silence on the output.


texts: What sensor should I use to determine if my project is moving?

texts:
I don't care how much it's moving, how fast or in what direction, I just want my Arduino-based project to know if it is moving or not (so I can shut off high-current drain LEDs when my bike is stationary to save my battery.)

Do I want an accelerometer, gyroscope or some other kind of sensor?


texts: I know the good old-fashioned way of shining a remote at a camera to see if it picks up infrared, but I'd like to know if there's any code that does it for you. That'd be much more professional.


texts:
I'm on this problem:

And I'm trying to use KCL to find Vth, my approach is:

Am I on the right path regarding KCL?

Thanks in advance!


texts: Designing a 74LS461 (8 Bit Preload Up Counter w/ Tri-State Output) in CMOS 16F873 PIC

texts:
Morning All,
I've kind of designed myself into a corner using 5 74HC461 into a DMA transfer function. I used these chips initially as they offloaded alot of the mundane address HSB-LSB latching overhead from the 87c52 only to find the HC/HCT version of this chip was never released.
The PCB art is done ready for making, software is done, yada yada so I'm trying not to have a drastic redesign slap in the face. What surprises me is there are no CMOS 8 BIT UP COUNTERS WITH PRELOAD AND TRISTATE OUTPUTS's. So I'm looking at a 24pin skinny PIC doing the job. Or its daughter board time. The PCB doesn't have room for 74c161s so a redesign of the board requires use of the existing real estate. Now,can the ports of the pic be put into a high impedance mode like on the 8051's? A(sudo tristate)


texts: LED Strip Controller - Can someone check over my schematic?

texts:
This is my first time designing a circuit with any kind of computer program, and before I ordered all the components and PCBs I just wanted to make sure I wasn't making any rookie mistakes since the whole circuit is made up from datasheet examples and answered questions on forums. I've gone over it myself a couple times, but since I haven't done this before I don't know what I'm looking for mistake-wise.

My major concern is that the boost circuit on the left side isn't going to work, but I'm also worried that I don't have the right connections on the MOSFETs or the ICSP header.


texts: Passing user parameters into a custom PSpice model

texts:
I am building my own simulation parts in Orcad 16.6:
I can build a schematic and take the generated netlist to use as a stand-alone component, but I want to be able to change parameters inside the model. How do you pass parameters from capture to pspice?

As an example, a voltage source has a parameter that sets the voltage.
A resistor has value, tolerance and other parameters, depending where you take the part from.

So, can anyone help me with the proper syntax and maybe other tips?


texts: Will it be fine to consume 0.0058 mA from a LiPo cell after its lowest discharge voltage of 3V has been reached?

texts:
I intend to connect a 240mAh 1S 3.7v 25C LiPo Battery with a 5V Step-Up Regulator to the Arduino pro mini v5 VCC pin bypassing the linear voltage regulator.

But the battery datasheet says "Never discharge Li‐Po battery below the Lowest Discharge Voltage 3v per cell"

and the voltage regulator data says "takes an input voltage from 2.7 V to 11.8 V and increases or decreases the voltage to a fixed 5 V output'

Thus the Voltage regulator will discharge the battery to 2.7V causing irreversible damage which will deteriorate the battery performance and cycle life.

If I disable the Arduino on-board power LED and since I am bypassing the Linear regulator in sleep mode the current consumption will be 0.0058 mA, so if I use the SparkFun LiPo Fuel Gaugeprogram and program the Arduino to enter sleep mode at 3V will this be good enough to protect the LiPo battery?

http://www.overlander.co.uk/lipo-batteries-240mah-1s-3-7v-25c-sport-hubsan-x4-mini-quadcopter-type.html

https://www.coolcomponents.co.uk/5v-step-up-step-down-voltage-regulator-s7v8f5.html


texts: My team and I are going on a software development competition in 1 week. We will demonstrate the software on multiple laptops, but we have only one projector. So we need to be quickly able to switch between VGA inputs to the projector. And we need to have 3 inputs and 1 output. We know the basics of electronics, making PCBs... (our school has a electrical/computer technician course) All we need is the schematic. But we have not been able to find one. A 2-in 1-out would do too. We could just cascade two of those in a row. If you could help us we would be very thankful.


texts: Can I put an electrolytic motor start capacitor on DC permanently?

texts: Can I use an electrolytic non-polar motor start (to be clear: not a motor run but a motor start, not MKP but electrolytic) capacitor across DC permanently without any damage? If no why ? If yes can I use tha VAC label limit as maximum DC voltage?


texts: Access NEON coprocessor from programmable logic in Zynq

texts:
For the past few days I've been thinking about the neon coprocessor in the Zynq SoC and I have a question, is it possible to send instructions to the neon from the PL side of the SoC?

Imagine I have an application with lots of mathematical operations, and I've used up all the DSP slices in the programmable logic. I guess I could offload some operations to the PS, or find a way to share DSP slices between operations (a few cycles for each). I started thinking that maybe I could offload it to the  PS and the PS would send it to the neon coprocessor, which would keep on doing what it has to do and when the data is ready it would send it back to the PL (probably not how the neon coprocessor works, but it's just for example).

As it's possible to see, my next thought was to find out if I could maybe send instructions to the neon coprocessor from the PL side of things. It would be really helpful if it's possible but I haven't found any documentation stating if this is possible, and I've also not been able to find someone that has tried to experiment whit this.

You could probably say that if I have an application that cannot be properly fulfilled wit the available 220 DSP slices, then I should get another one that tends to my needs. But this thought came to me in the shower and it is completely hypothetical. There's no such application that demands so many calcuations (well ... there are, but not any applications that I want to develop).

So, does anybody know if this is possible?


texts: What's the correct sequence to start thinking about a BJT circuit

texts:
A very basic circuit as shown below, the 1V step voltage is applied @ +1V @ t=0.

Edit:
Unfortunately the entire question was asked based on a wrong assumption, that is: "Vbe only controls the upper limit of Ic, not the actual amount of Ic, the actual amount of Ic depends on how much the outer circuit can supply"  The misconception came from my effort to apply band gap model to explain BJT's circuit behavior and it is not successful so far.

However many knowledgeable people mentioned many BJT transient behaviors and those answers are very informative.

the sequence of events are best described in the accepted answer


texts: How to calculate a resistor needed for an LED

texts:
I am building a backlit button box for my PC and the controller has 2x 5 V power supplies on it from the USB. I am using 7 of these LEDs and the power specs are at the botton of this post. The controller website doesn't specify the amp output of the controller so I simply don't know.

For blue, white it is 3V, 20mA, forward voltage is 3-3.2V

Edit: reyann zero delay USB encoder


texts: How can I add a digital pulse generator to a simple LED circuit?

texts:
I have a digital pulse generator in the lab (http://www.thinksrs.com/products/DG535.htm). I want to control a simple LED circuit (battery, resistance and diode) using this digital pulse generator.

I have the socket for the pulse generator, so I can connect the pulse generator to the circuit. I just do not know how to add this socket to the circuit. Where should I connect the two legs of the socket in the circuit?

Thank you.


texts: Implement AND gate multiple ways (positive & negative logic)

texts:
Could somebody explain to me how how negative and positive logic works? If I have an AND gate the truth table will be

x y z
0 0 0
0 1 0
1 0 0
1 1 1

If I wanted to implement an AND gate another way, I know i can use De'Morgans law and convert it to an OR gate while inverting all the inputs/outputs. How does this work with a NAND gate? If i invert all the inputs/outputs I would get something that isn't the truth table as an AND gate

x y z
0 0 1
0 1 0
1 0 0
1 1 0

edit: Would the NAND gate use negative logic for output and positive logic for it's input to implement it as a AND gate?


texts: I have a charger that charge Ni-MH batteries that i use primarily for an 6V electric screwdriver and i want to make a charging dock for for it. the following diagram illustrate basic wiring plan that i have in mind and i wonder if theres anything wrong with it or better ways of doing it?


texts: Transimpedance vs. Non-Inverting Amp for high sensitivity application

texts:
In simple analysis, these two circuits give the same result ... i.e. producing 1V output for a 10pA input.  Is there any advantage of one over the other in practice?

I am measuring currents in the high femtoAmp / low picoAmp range from a source that is hard to fully isolate.  There is no appreciable difference in linearity treating the signal as a current source vs measuring voltage across the big resistor.  I have tried the transimpedance configuration and it works, but noise and random leakages cause a lot of problems.  I have not tried the non-inverting amplifier configuration.  Frequency response is not important as I will low-pass filter it down to about 2Hz cutoff anyway. The application is for measuring concentration of ions in the air, so the sensing elements can be shielded roughly, but ultimately are big and are exposed.

The Lmp7721 has -/+3fA typical bias and it's imput impedance is very high, so I think it acts pretty close to an ideal op-amp for these purposes.


texts: Add OpAmp subcircuit spice model to Altium

texts:
I want to add SPICE OpAmp model of Analog devices by .cir extension containing .SUBCKT information to Altium.
I have it's schematic but I don't know how to add it's simulation file to it.
I have double clicked on it then add simulation file, general, SPICE subcircuit, but after that I don't know what must I do.
Although I have found that I can use LTspice for my simulation, but i want to learn it, because I think it can be helpfull for me and other.


texts: Can you help me improve this circuit design?

texts:
I'm a electronic noobie and for a school project I need to design a circuit that will then be connected to a micro controller. The aim of the project is to build a sniffer to decode a particular protocol. So the circuit will have to convert DC voltage values to logical values that the micro-controller will then read to decode and print the frames flowing through the bus, on a terminal for example. So I began by creating a circuit that will be able to convert the voltage values of the protocol into logical values:

Forward frames : 15V for high level and 4V for low level
Backward frames : 4V for high level and 2V for low level

4V being the idle state. The circuit I designed look like this

The Vcc supply of the micro controller is 2.8V. I decided to use 2 pins for Rx, one for the Forward frames (ADR_COMM on the schematic) and one for the backward  frames (ADR_REP). According to the simulation on LTspice, ADR_COMM is high when voltage is 15V and low otherwise, and ADR_REP is high when voltage is 4V and low otherwise so I get what I want.

Initially I used a zener diode with a breakdown voltage of 3V instead of the R6 resistor to prevent the 2V from turning on the U1 photo coupler but the current dropped to 1 mA (instead of 40mA) when using it. So my first question is why ?

Also I would like to know if there is anyway of improving this circuit, any good practice that I should know about or tips ?.

Thanks in advance.


texts: Will this water level indicator circuit work for my project?

texts:
I have only rudimentary knowledge of electronics so I ask for your forbearance.

There are many water level indicator circuits, of the type shown below, listed online and demonstrated on YouTube.

The circuit clearly works when demonstrated with a bucket of water or a plastic bottle but my question is, is it a practical solution for a 5,000 litre tank?

I have taken note of the learned comments regarding corrosion and that gold contacts would be the best for this kind of circuit, etc. My intention is to use a series of stainless steel screws arrayed along the outside of a PVC tube, with the wires kept dry inside the pipe and only the stainless screws making contact with the water.

As for corrosion, would pulling the probes out of the water every now and then and cleaning them make this a bit more viable?

Am I correct in assuming that the current going through a few litres in a bucket, is not the same as current going through a lot more water, especially if the tank, which is 1.8 metres high, is full?

Should it be viable, what modifications would one need to make to the circuit? Up the voltage perhaps?

Thanks in advance for any and all comments and advice.

Regards

Edit: -

Thank you to all for the very comprehensive answers. You have convinced me that the project is likely to create more problems than I will be able to deal with at my level of knowledge. It is also a reminder that when something seems to be too good to be true, it usually is not true.

I think I may attempt an electro-mechanical solution consisting of floating magnets and reed switches. I will have questions, so there is bound to be a new post on that subject in the not too distant future.

As a matter of interest, partially in response to Phil C's answer: All other conditions being ideal, if locating a single negative electrode at the bottom of the tank would possibly be too a long path with increased resistance in such a big volume of water, would there be any advantage if one placed a second tube running parallel to the pipe with the sensors, with a negative electrode directly opposite and within a few centimetres of each sensor? Would the current follow the shortest path?

Just curious.

Thanks again to everybody

Regards


texts:
I am doing a sound amplifier using LTspice and I would like to know if someone know why my gate driver output has spikes only when it is connected to the half-bridge circuit.

The INP terminal is receiving a sine PWM signal from a comparator on the high-side driver and an inverted one on the low-side driver.
High-side driver output (without connecting it to a half-bridge):

High-side driver output (with a half bridge connected to it):

Those spikes are also happening on the low-side driver. Btw, it is not affecting the entire circuit, but I would like to know how to make those spikes disappear.
Any suggestions?


texts:
http://www.carotron.com/articles/current-sensing-circuit/

http://ww1.microchip.com/downloads/en/appnotes/01332b.pdf

https://www.arrow.com/en/research-and-events/articles/how-to-maximize-low-side-sensing-performance

All the above article and many other articles says that in low side current sensing, if there is any short circuit is there between power supply and ground, it goes undetected. Can anyone explain me how it is detected in high side current sensing.


texts: why we need power plane in PCB design, suppose  i have 6 different supply rails like 1.2v,1.8v, 2.5v, 3.3v and 5v and 12v supply then how much power plane do i need , and how can arrange  them Layer stack up


texts: What's the correct form of this CRC algorithm

texts:
We are working on communication between AVR and a Crous PTZ.

We found its protocol and now we can turn it on and so.

We have problem with its CRC. This is Crous protocol doc (Got it here), at end of it, CRC algorithm is described (see image below), but seems it's wrong because the counter parameter will never be 8 but it is checked to see if it is 8 or not.

Our coder has wrote the following code for that algorithm , but returned CRC is not the same as the CRC returned by Crous device.

#include <stdint.h>

unsigned int crc_chk(unsigned char dta, unsigned char length)
{
  int16_t j;
  uint16_t a,b,c;
  uint16_t reg_crc=0x0000;
  for( c = 0; c < length; c++ )
  {
    a = reg_crc / 256;
    a ^= test_crc[dta];
    dta++;
    a *= 256;
    b = reg_crc&0xff;
    reg_crc = a | b;
    for( j = 0; j < 8; j++ )
    {
      if ( reg_crc & 0x8000 )
        reg_crc = ( reg_crc * 2 ) ^ 0X8005; /* LSB(b0)=1 */
      else
        reg_crc = reg_crc * 2;
    }
  }
  return reg_crc; // the value that sent back to the CRC register finally
}

He found true CRC in device respond, for example , In this device respond

01 BF 15 0F 94 95 96 97 9F 9E A2 A0 98 99 72 6B 6A 88 89 64 62 63 65 66 03 2D AC

and according to page 45 of The protocol Doc, CRC of

0F 94 95 96 97 9F 9E A2 A0 98 99 72 6B 6A 88 89 64 62 63 65 66

it should be 2DAC, 03 shows end of data, and 15 is size of data that when we calculate it in decimal, will be 21 that you see we have 21 bytes too.

What is the correct form of this algorithm?


texts:
Circuit operation of this circuit is when Switch is turn on as shown below , Q4 and Q3 turn . When the switch is turn downward , Q1 and Q2 turn on.

Does the circuit I created follow the circuit operation that I have come up?


texts: Charge settings for hybrid battery module

texts:
I am currently overhauling and replacing worn battery modules for my Toyota hybrid vehicle. I have purchased a SkyRC q400 smart charger to charge all the six cell Nimh modules before I assemble them back into the 200v battery. They are each rated at 6500mha with a voltage of 7.2 (1.2v per cell).
Could somebody tell me the best charge current setting please and also if it is best to discharge the battery first before i do my first set of charges? What is the best discharge rate as well?
Thanks


texts: BJT Differential amplifier. Tail Resistance. Input Resistance

texts:
Here is the schematic of the BJT diff amplifier, I wanted to solve (design). The task is from the book "Art of Electronics".

Exercise 2.18. Verify that these expressions are correct. Then design
a differential amplifier to run from ±5V supply rails, with Gdiff = 25
and Rout = 10k. As usual, put the collector’s quiescent point at half
of VCC.

Where "these expressions" are the differential gain, common mode gain and CMRR.

I did pretty much all of it, but there are 2 questions I still have regarding this circuit.
1) In the book it says that the condition for resistance is R1>>Re + re, where re = kbT/qIc, due to circuit stability and as one can see CMRR is proportional to R1. I also saw that in a lot schematics a current source drawn at the bottom, since ideal current source has infinitie resistance. Are there any drawbacks, namely are we losing something by making R1 -> infinity?
2) Input impedance.
For the same circuit, but a bit different resistor values,

there is an explanation in the book about input impedance that goes
like this:

From the formulas just derived, this amplifier has a
differential gain of 10 and a common-mode gain of 0.55. Omitting the
1.0k resistors raises the differential gain to 50, but drops the (differential) > input impedance from about 250k to about 50k.

How did they get these values?
Usually ß = 100 was assumed in the book. From previous chapters for the common emitter amplifier, the input impedance is ß(Re + re) with and ß(re) without emitter resistor. Here Ic=0.1mA (transistor collector is biased at 0.5Vcc), so re = 250 Ohm. This gives us input impedance of 25 kOhm without and 125kOhm with emitter resistor, which is half the values they get. Why is that so?
3) Why R1 is not in the input impedance formulas, although it is in series with emitter resistors with respect to ground?


texts:
when using MCP1630V to design a buck converter in voltage mode control, is it preferabale to get sawtooth generator from the drive output pin or from the oscillator input pin?

From the timing diagram of this component page 14/26 of the datasheet, I think the sawtooth generator should be fed from the drive output

Please confime it to me


texts:
I have an heatsink extruded, with this data:

It is extruded and is quite long (10cm) with 4.9°K/W. I had a similar heatsink but cutted to be square rather than rectangular, therefore with a side of 1.5cm and a thermal resistance of 25°C/W.

With these considerations, I thought that cutting it in half and putting the two pieces in a parallel geometry could be the same, if the hotspot which is a square of around 4cm is still covered. I'd like to know if it can work.


texts: Purpose of capacitor in op amp feedback loop of power supply comparator

texts:
I've been analyzing the schematic for an old commercial linear power supply, the Farnell LT30/2 (schematic).  The schematic contains a couple of examples of an op amp arrangement that seems very popular in power supply regulation circuits.

The op amp has a diode at the output and can only sink current.  I understand that the op amp is essentially a comparator and the diode is there to reduce the drive to the pass transistors.  In this case, the op amp (1/2 of IC2) is comparing the output of the Howland current source (0 - 1mA) across R12 (33k) to the output voltage at +O/P.

What I don't understand is the purpose of R16 and C4.

I'll make a stab at it and say it's to reduce the effect of spikes on the output.  My rationale is that the time constant of R12 and C4 is quite high.  If the output suddenly spiked, the leading edge of the spike would be slowed to allow the op amp to catch up.  That's what I'm thinking, but I have no idea if this is true or not.


texts: Efficacy of more lines of power on legacy ribbon connector with limitations

texts:
A conundrum.  I've been asked if I can add more current capacity and less voltage drop to a legacy connector, but I have limitations.  For the legacy products to work on this same connector it needs to keep the 10pin pinout order the same. This allows a 14pin ribbon cable to simply cut off it's unused pins for those products. But they'd like new products that might draw more current. It's a modular system, so there are unknowns about how much current each module needs. Some modules will draw around 30mA per 3.3v, 5v, +15v, and -15v as were used with this connector. But some modules draw up to 110mA. (For power hungry ones that draw 200mA, there is a beefier power option.) The ribbon cable in question is about 12 inches long and it's 1mm pitch 28AWG (with a 2mm IDC connector on each each end.)
I'd like to consider a whole new pinout, but since this pinout already parallels the power signals in this order -15v Ground +15v +5 +3.3v in that order, perhaps another 4 pins of -15v +15v +5 +3.3v in that order will work OK. I'd rather intersperse ground between signals but they want to only go to 14pins if possible. Should I bother? Perhaps they can simply double up on the connectors for certain modules. The only issue if done that way is that the Clock and Data lines end up with more "stubs" or parallel connections and so more potential for reflections (unless we cut those signal off those secondary cables.)  Plus using two power connectors seems a little odd.  Schematically it's like this. (P.S. Yes it's got a digital ground for +3.3v and 5v, and an analog ground for audio and +/-15v.)


texts:
I need to use a PAN1780 board for a research project, but there exists no breakout board (only huge evaluation boards), so I somehow need to design my own breakout board and solder the chip on it. does anyone have an idea, how I can solder this chip on a PCB board? Or is there a company which could manufacture the PCB and also solder the chip on it?
Here are the dimensions of the board:
PAN1780 Dimensions


texts: In microcontroller (AVR), the interrupt vector take address $0000 to $003A so the program is start after that address?

texts:
I'm studying microcontroller using Atmel 8-bit microcontroller datasheet, According to the datasheet, there's 3 types of internal memory in microcontroller

Flash memory = program memory
SRAM: 32 general purpose register as well as I/O register is located here
EEPROM

So, when program counter (PC) fetchs instruction, it will fetch from flash memory where the program (instructions) is stored, starting from $0000 but then when I read interrupt chapter (ATmega 2560) , it says that interrupt vectors is stored at $0000 to $003A in program memory then does it mean when the microcontroller starts, PC will go through the interrupt vector list first and then instructions later?

Moreover, the interrupt is enabled by instruction which come after $003A so when the PC start from $0000 to $003A, microcontroller do nothing because at that time, intteruption haven't enabled yet?

I'm currently use two datasheet, Atmel ATmega 2560 and ATmega 16A


texts: Photodiode showing triangle waves instead of square? (re: need op amp?)

texts:
I'm trying to visualize an infrared signal using a IR receiver diode but my oscilloscope is showing triangle waves instead of square for the carrier frequency:

One of the guys at EEVblog said I need an op-amp because the signal is too fast (38 kHz) but I'm still learning electronics and haven't used any op-amps before.

Can anybody let me know what I need or point me in the right direction?

(I already have a proper 38 kHz IR receiver with demodulation, etc, but I'm trying to visualize the signal for learning purposes using a "simple" photodiode).

EDIT: Some other questions/answers also seem to indicate I need an op-amp with a sufficient slew rate?

EDIT2: Here is my schematic per request:  (I'm probing across the resistor)


texts: Can/will the Qi charging system damage LF (125-133kHz) RFID tags?

texts: In the Qi standard, frequency is listed as 80-300kHz for the higher power application which is within the target(resonance?) frequency of LF RFID tags. So power transmission should be quite high for the tags. Will this damage the tags or can they just ignore the induced current?


texts: How to avoid a MCU to run constantly when a superheterodyne radio receiver is receiving nothing, and possibly enter in deep sleep?

texts:
TL;DR: How to avoid an ATtiny to run constantly when the radio receiver is receiving nothing, and possibly enter in deep sleep mode? Configuration:

ATtiny45 (on breadboard)
SRX882 Superheterodyne Receiver: SRX882 datasheet
Manchester encoding, Manchester library Github

Context: I have now a working transmitter design based on an ATtiny45, a push button, a superheterodyne radio transmitter, and batteries. By using "pin change interrupts",  I can make the ATtiny "deep sleep" until the button is pushed. When this happens, the ATtiny awakens and a few bytes are sent via radio with Manchester coding (using this Manchester library). Because of the deep sleep, the consumption is ~ 0.2 uA when nothing happens. So the batteries could theoritically last for years!

Now I'm designing the receiver part, with a code like this:

#include "Manchester.h"

void setup() {
    pinMode(3, INPUT);
    man.setupReceive(3, MAN_1200);
    man.beginReceive();
}

void loop()
{
    if (man.receiveComplete())
    {
        uint8_t m = man.getMessage();
        man.beginReceive();
        if (m == 222)
        {
            // do something
        }
    }
}

In order to reduce the power consumption, I was thinking about deep sleep and pin change interrupts too, but I don't think it will work here because a radio receiver will have very often noise like 0100010010111010010 until a real byte, Manchester-encoded, arrives...

Question: are there tricks to make a radio receiver code which uses very few power (and possibly sleep until a byte arrives)?


texts:
Why is the armature control method not employed above the rated speed in DC shunt motors?

And similarily why is the field control method not employed below the rated speed ?

I was trying to think the reason. What I thought was

If field flux is kept constant, Speed is proportional to armature voltage.
So, is preferred for below rated speed.
And in above rated case if used, voltage will be higher which is avoided.

If armature voltage is kept constant, Speed is inversely proportional to field flux.
So, is preferred for above rated speed.
And in below rated case if used, field flux will be higher(ie high field current) which is avoided.

Is my explanation ok. Please verify it.


texts:
I have an IC that requires a chargepump (L6470 dSPIN), and I need to build a circuit that requires 8 of them. Is is possible to combine the 8 charge pumps into one (1) unit to reduce the cost the circuit (part count an PCB routing)?

This IC seems to have internal circuitry that works with the flying capacitors to produce the required input voltage.

For more info see the datasheet on page 18.


texts: Using an Op-amp buffer to Power Amplifier unit

texts:
I have an old amplifier unit that runs on A.C and I'm trying to make it a battery powered amp
I understand that the A.C voltage get rectified to 15+/15- D.C with a common ground so I used a 36v li-ion battery pack and  the following circut to get a virtual ground

the circuit works but when it's connected to the amp power rails the virtual ground voltage drops to 0.8 V , is it because of capacitive load instability ? is there any solutions ?

Note : I'm using a LM324N Opamp I.C and the unit uses a NJM4558 DUAL OPERATIONAL AMPLIFIER I.C


texts: Why is a high-Q circuit difficult to match?

texts:
People in the microwave/RF field constantly talk about how it is "difficult" to match a high-Q circuit (ie. a CS amp with very little gate resistance and no degeneration). Why is that?

The problem is made slightly more confusing for me by the multiple quality factor definitions. If I consider the fractional bandwidth definition, it kind of makes sense that a circuit having a very narrow bandwidth would be more adversely affected by the addition of any parasitics. Thus tuning a matching network to resonate at such a narrow frequency might prove tricky. Am I going in the right direction with this?


texts: I got the picture from my prof's notes, and I don't quite understand why there can be two different currents at the given node. If there are only two currents shouldn't the currents' values be the same


texts:
I have a PTR5518 module which has nRF51822 SoC. I also have nRF51 SDK and STM32F discovery board (which has debugger with SWD and SCLK pins). I have sample codes as well.
I need help as how can I get my code (which is in .c) to compile and into PTR5518. I am stuck here for over few weeks now and am really losing hope. Being new to ARM any help or steps would be really lifesaving.

Details of module I have


texts: Will temp variable in always_comb create latch

texts:
I have following code snippet where a temp variable is used to count number of 1s in an array:

   // count the number 1s in array
   logic [5:0] count_v; //temp
   always_comb begin
      count_v = arr[0];
      if (valid) begin
         for (int i=1; i<=31; i++) begin
            count_v = arr[i] + count_v;
         end
      end
      final_count = count_v;
   end

Will this logic create a latch for count_v ? Is synthesis tool smart enough to properly synthesize this logic? I am struggling to find any coding recommendation for these kind of scenarios.

Another example:

logic temp; // temp variable
always_comb begin
   temp = 0;
   for (int i=0; i<64; i++) begin
      if (i>=start && i<start+3) begin
         out_data[temp*8 +: 8] = in_data[i*8 +: 8];
         temp = temp + 1'b1;
      end
   end
end

Above example is related to bit slicing where the input is 64Bytes and the output is less than 64Bytes (3Bytes for example, starting from byte# start). I know that there are better ways to code this but I still want to know how the synthesis tool will interpret the design here.


texts: How to find on circuit why it is burning

texts:
I have done a similar design in tinkercad but I don't understand why it is not working..it is burning

and the second picture is the design from a youtube video that it is working properly. I have done something wrong but I can't find it..I re-design it from youtube to the tikercad


texts:
Consider a simple two stage CMOS operational amplifier. When it's designed for given specification and is being used as an Op-amp block, doesn't its bias gets disturbed when any arbitrary voltage is applied to inputs by the user?

Say if one of the terminals is grounded, wouldn't the differential amplifier inside be off?


texts: Unstable Feedback in Opamp+MOSFET circuit for Voltage Controlled Current Source

texts:
I'm attempting to build a 1 Amp LASER driver that can be pulsed (at ~10kHz) and gives control over current with a voltage (from a DAC, for example). I'd like to scale it up to 10 Amp pulses eventually. I tried this common circuit below on a breadboard, but the feedback is unstable. Arrows indicate what should be (apprixmately) happening, which I confirmed on simulations.

I'm using a 500 mOhm 10 W resistor to simulate LAESR diode on resistance, and a 1 Ohm sense resistor.

Here is what happens at the opamp output:

And here is what happens at the inverting node (voltage across sense resistor):

I tried changing around the values but things only get worse. I thought the opamp was too wideband so I increased compensation cap C3. Feedback becomes stable when I make it 4.7uF (yes, 4.7uF), but pulsing Vctrl makes rise and fall times ~1s. Value of R3 doesn't seem to matter as long as it's there.

This is the opamp I'm using (MCP6022, not 602), and this is the FET I'm using (IRLI3705N). Is the opamp too wideband for this application? Its correcting too quickly and overshoots? Am I stuck at the "knee" on the FET's I-V curve so a little bit of gate voltage changes current exponentially? Is my Vcc not large enough? Is this even the right VCCS solution for a 10 A pulsed load?


texts: Why is current going towards the voltage source in this circuit?

texts: You can see that Is was labeled as going towards the voltage source when doing KCL at node a. Can someone tell me why? Is it not supposed to go into the node?


texts: Does matching impedance connectors matter in non-RF signals? Why?

texts:
I am designing a PCB which communicates with an encoder over RS422 at 2Mbps (15ns rise time typical in the MAX490's datasheet), and I am currently selecting the connectors. I have found 120Ohm twisted cables online, but I have not found any connectors fit for purpose.
Does that mean the connectors don't matter over such small distances? If so, how come there are no reflections from the impedance change?
Bonus question: does that mean I can pretty much use any connector (for example screw terminals) as long as I use a 120Ohm twisted cable, and solder a 120Ohm termination resistor across the sensor's receiver pins and across the transmitter pins past the connectors on the PCB?


texts:
On my continuing odyssey to analyze real-life circuits as a way to expand my knowledge, I'm studying this Heathkit Curve Tracer:

IT-1121 Curve Tracer Schematic

There are a couple of features about the sweep section power supply I don't fully understand.  Here's a snippet of the area of interest:

and here's my (very simplified) re-interpretation of the entire sweep section, to make it easier to digest:

My questions are:

1) Ignoring the high voltage full wave rectifier for now, why does the author tie the bridge rectifier return to the secondary centre tap?

2) What is the purpose of the adjustable low-pass "loop compensation" section highlighted above?  How does it work?

Note: I've just realized having laid all this out, that the loop compensation low-pass IS a point of return for the bridge, since it shares a ground point with other parts of the circuit.  So, are there two paths back?  At any rate, they're both tied back to the C.T., which is confusing to me.

Also, I've noticed from my own analysis, that tying the return to the tap in this way drives more current through each half of the secondary winding on each half cycle.  This increases the voltage out of the bridge (possibly as a consequence of a bigger current through the reduced reactance of the half-winding??)


texts:
Assuming a typical NMC or NCA cell that you want to charge to 4.2V/cell. Is there any long-term affect at having a slow charge rate?
I believe for Lead Acid C/10 is typically the minimum but can you go even lower with Li-Ion?


texts: Ground Fault Question Regarding a 3 Phase Circuit

texts:
I'm needing to design a 3 phase ground fault detection system for a 480V system. It will need to be able to trip when there's ground fault current >1A.

I have done some reading and it sounds like there are two main methods. The first is to have one large current transformer (CT) and run all 3 phases through it and look for current in the loop.

The other method is to use 3 small CTs and monitor each individual phase. The output of these 3 CTs are then connected in parallel and then this loop is monitored for a current.

In either case if there is current in the monitored loop it indicates a ground fault.

Here's a picture of the two schemes:

I need to go with the second scheme with the smaller transformers.

I was thinking of monitoring the current loop using an Allegro ACS714 (SENSOR CURRENT 5A 5V 180 ~ 190 mV/A -40°C ~ 85°C) 620-1258-2-ND (or similar) and monitor it's output voltage with a microprocessor. This ground fault isn't for safety but just to protect the equipment and flag maintenance. I only need to trip when there's about 1A of current that's unaccounted for - although if I could trip at a lower current it wouldn't necessarily be a bad thing.

Initially for the CTs I've been looking at the CR8400 Series from CR Magnetics - Specifically the CF8420 as the size of the hole will allow larger wires. However, could I get away with using the CR8420-1000 (as that has a maximum current of 50A) instead of ther CR8420-1000-G? I know the 2nd one is rated specifically for ground fault but it's only rated to 20A (and perhaps I'm missing something) but isn't a current transformer a current transformer?

I'm also looking for any comments/suggestions of other things I should be on the lookout for as I haven't worked with ground fault detection much.


texts:
I have written the following SPI initialization code for SPI1 on my STM32F030C8 micro-controller.

Here is the function which initializes SPI1:

void fnSPI_Init()
{
SPI_InitTypeDef SPI1_Config;
GPIO_InitTypeDef GPIO_InitStructure;

RCC_APB1PeriphClockCmd(RCC_APB2Periph_SPI1, ENABLE);
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA | RCC_AHBPeriph_GPIOB, ENABLE);

/*****************MOSI, MISO SCLK GPIO Config********************/
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_3;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
GPIO_Init(GPIOB, &GPIO_InitStructure);

GPIO_PinAFConfig(GPIOB,GPIO_PinSource3,GPIO_AF_0);
GPIO_PinAFConfig(GPIOB,GPIO_PinSource4,GPIO_AF_0);
GPIO_PinAFConfig(GPIOB,GPIO_PinSource5,GPIO_AF_0);

/******************Chip Select GPIO Config**********************/
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_15;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_SetBits(GPIOA,GPIO_Pin_15);
/******************SPI1 Config for RC522************************/
SPI1_Config.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
SPI1_Config.SPI_Mode = SPI_Mode_Master;
SPI1_Config.SPI_DataSize = SPI_DataSize_8b;
SPI1_Config.SPI_CPOL = SPI_CPOL_Low;
SPI1_Config.SPI_CPHA = SPI_CPHA_1Edge;
SPI1_Config.SPI_NSS = SPI_NSS_Hard;
SPI1_Config.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_2;
SPI1_Config.SPI_FirstBit = SPI_FirstBit_MSB;
SPI1_Config.SPI_CRCPolynomial = 7;

SPI_Init(SPI1 , &SPI1_Config);
SPI_SSOutputCmd(SPI1, ENABLE);
SPI_Cmd(SPI1 , ENABLE);
}

Here as per the data sheet I'm using PB3, PB4 and PB5 in the alternate function 0 mode.

Main function:

int main(void)
{
 /*!< At this stage the microcontroller clock setting is already configured,
   this is done through SystemInit() function which is called from startup
   file (startup_stm32f0xx.s) before to branch to application main.
   To reconfigure the default setting of SystemInit() function, refer to
   system_stm32f0xx.c file
 */

 fnSPI_Init();
 while (1)
 {
    fnSPI_Send_data(0x2A);
    Delay(100000);  // This is running proper as intended
 }
}

The function body for fnSPI_Send_data() is as follows:

void fnSPI_Send_data(uint8_t addr)
{
GPIO_ResetBits(GPIOA,GPIO_Pin_15);   // Chip select low
printf("\n\r Send spi data");

SPI_SendData8(SPI1,addr);   // standard perip lib fn for stm32f0xx

printf("\n\r Data sent");
GPIO_SetBits(GPIOA,GPIO_Pin_15);    // Chip select high
}

Function body for the SPI_SendData8() function:

void SPI_SendData8(SPI_TypeDef* SPIx, uint8_t Data)
{
uint32_t spixbase = 0x00;

/* Check the parameters */
assert_param(IS_SPI_ALL_PERIPH(SPIx));

spixbase = (uint32_t)SPIx;
spixbase += 0x0C;

*(__IO uint8_t *) spixbase = Data;
}

Now the observed behavior is that the GPIO voltage levels are switching between high and low on the chip select pin, which is verified using the DSO. This means that the SPI_SendData8() function is getting executed. Also the printf() function verifies that the code is not getting stuck at any part.

But when I monitor the SCK or MOSI pins, the DSO shows there are no pulses.
So my question is: Is my initialization of SPI correct? Do I need to change any other register values or anything?

According to this code, there should be data on the MOSI line.

Please help me on this one.

Update:

Changed fnSPI_Send_data() function to check the contents of the flags.

void fnSPI_Send_data(uint8_t addr)
{
GPIO_ResetBits(GPIOA,GPIO_Pin_15);
printf("\n\r Check if FIFO empty");
while (SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_TXE) == RESET);

printf("\n\r FIFO empty");
SPI_SendData8(SPI1,addr);    // FIFO has space to accept data

while (SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_BSY) == SET);

printf("\n\r Data sent");
GPIO_SetBits(GPIOA,GPIO_Pin_15);
}

Output observed is that the code is getting stuck at the first while() loop which checks if the FIFO is empty enough to accept the data. How can the FIFO have data on initialization?


texts:
I have a question, I want to measure a distance from an object of unknown shape and material, and I want to measure it under different angles, I want to measure a distance to just one specific point of object and accuracy has to be good.

Can someone please point me to right direction?


texts: Does the Microchip USB-CDC driver buffer its output?

texts:
I am trying to communicate between a computer and a PIC32 using the CDC device driver from Microchip application libraries. I am having an issue, where if I output a few sentences using putrsUSBUSART() I receive nothing. However if I append that with a loop that spams for example "test\r\n", I eventually receive them (and at least some of the sentences I wanted to see).

I am using minicom on a Linux box as my terminal program. If the CDC driver should not do that, I'll have to look at the host driver / terminal program next.


texts:
I need a microcontroller that would send statuses of it's input pins (around 5 of them, they can be 0 or 1) to a PC over wifi.

I thought of using arduino, but I don't know what would I need to make it able to send data over wifi? Some wifi module? And would that be a good combination?

This is a part of a device which is going to be on the hand, so it needs to be small and battery powered. (It should send statuses of it's pins at speed of around 15 times a second, and I'll need it to have one output pin set to 1, so I could send that signal to input pins) And since arduino is a bit bigger in size than I would like and it's made for much more advanced stuff I'm not sure if it would be the best choice.

So can anyone tell me what kind of microcontroller do I need and how to use wifi with it?

(I have some experience with arduino, but not with using wifi or other form of remote communication with electronics. If something about the question is unclear please ask in the comments. Thanks)


texts: Sensors - How to convert 4-20mA output to temperature and pressure values?

texts:
I'm dealing for the first time with two sensors, of pressure and temperature. Both have output of 4-20mA, then I'm using a 47 ohms 1% to convert to voltage. When flows 20mA, 20mA * 47 ohms = 940mV, and my ADC has a positive reference of 1V.
My doubt is about how to convert the mA value (or voltage on the resistor) to temperature (degrees) and pressure values (psi). I just didn't found documentation about that on both manufacturer's webpage.
Do they have linear relationship? For example for the temperature sensor, 4mA would mean 0°F, 20mA would mean 400°F and 12mA would mean 200°F?
These are the sensors:
TEMPERATURE SENSOR: OMEGA OS136A-1-MA Range is from -18 to 202°C (0 a 400°F).
PRESSURE SENSOR: KELLER PA-21Y Its body show "range of 0 to 200 psi".
Regards.


texts: Relay not switching correctly, controlled from ATtiny85, output to motor

texts:
I have an ATtiny85 switching an NPN transistor, which will in turn switch on a relay that will run a motor. Everything is run off a 3.7V 18650 Li-Ion battery, but I have since moved over to a variable power supply with same problem:

Without the motor, the relay switches fine, ATtiny85 will switch the relay on for one second, and then off for one second, and repeat, and the oscilloscope (connected to relay output and GND) and clicks are showing correct behaviour for the relay.

When I connect the motor, the relay still clicks, but the oscilloscope is showing zero voltage. Seems like relay tries to switch, but doesn't. I connected an LED to Pin0 of the ATtiny85, and it flashes instead of staying on for one second and going off for 2 second.

Seems to me that the problem could be:

The ATtiny85 is resetting because not enough current going through. This doesn't make sense because I've switched over to a bench power supply and same thing happens, voltage is still the same.
Some sort of feedback from the motor? The motor runs fine if I connect it directly to battery so I don't think power is an issue.

Some additional information:

Relay switches on for 1 second then off for 1 second. I am not doing PWM, but just have this on/off behaviour for testing.
This is the motor: 3V-12V water pump motor
Power supply is set at 3.9V with 2A current available. Increasing it to something like 5V still doesn't work.

EDIT: Although the answers all helped me figure out my problem, I chose the one that helped me the most. Found that it wasn't back-emf or your standard type of decoupling required. The motor was dropping the voltage down hard and no capacitor was going to fix it (already had these in place), although these are common issues.

More findings here


texts: Using transistors to switch 12v from a 3.3v signal

texts:
I'm a pretty accomplished programmer, but working directly with electricity is giving me the fits.

I'm trying to replicate a design that switches a 12v/300ma solenoid based on a GPIO signal from a Raspberry Pi.  The design suggests a TIP120 "darlington" transistor to accomplish this task, but no way that I hook it up seems to actuate the solenoid.

I've actually removed the RPi from the design and am trying to just jump wires to practice.

simulate this circuit – Schematic created using CircuitLab

I read somewhere about an issue with the TIP120 where there is too much voltage loss resulting in the case where the solenoid doesn't have enough juice to fire.

I read that I should try replacing the TIP120 MOSFET NDP6020, so I gave that a shot, but the solenoid is triggering even when there's no source signal!

I believe that it's quite possible that I'm an idiot, so I actually set up a dummy circuit using 3.3v LEDs.  Using those LEDs, I was able to get the TIP120 to work (kinda - the voltage loss was evident in the brightness of the LED), but not the NDP6020.

And yes, I tried with multiple units, in case one was DOA or I accidentally burnt it out.

What have I missed?  I'm stumped.


texts: What is the simple meaning of TE10 waveguide

texts: What does this numeral 10 represents and why do we have TE10 TE11 and then TE20. Where are the rest?


texts: Circuit Cellar-Issue 210- has this question "Which connection(s) to a decoupling capacitor should be shortest?why?" in its "Test your EQ section". I couldn't understand what they meant 'Which connection(s)'. Can somebody  explain this?


texts: Can a generator have the coil oriented around the rotational axis?

texts:
I see a lot of examples of simple science fair generators with the coil axis perpendicular to the rotational axis of the magnets. I have made one with the coil wrapped around the axis of rotation, but I cannot detect any output. (I wrapped a piece of PVC pipe with enameled wire and ran the axis of the magnets through the center of the pipe supported by a bearing salvaged from a hard drive.)

I'm not sure which of the following issues could be causing my failure:

Not having the right LED (I have tried the LED in both directions)
Not having enough wraps in my coil (I didn't count but used all the wire on the spool)
Having the orientation wrong

Please advise.


texts: 24-pad, 0.5mm pitch: better to use QFN or BGA?

texts:
For a certain TI component, I'm choosing between these two packages, both of which are 24-pad and 0.5mm pitch:

QFN: http://www.ti.com/lit/ml/mpqf167b/mpqf167b.pdf (4 x 4 mm)
BGA: http://www.ti.com/lit/ml/mpbg520/mpbg520.pdf (3 x 3 mm)

Some considerations:

BGA is cheaper for a PCBA house to assemble, correct?
If I use 3 mil microvias (on a 6-8 layer board) to route out BGA components, how many rows/cols does a 0.5mm BGA have to be before the routing gets annoying?

Any advice appreciated!