texts: Resistor Selection to retain same brightness in LED PWM circuit

texts:
I am making a simple LED PWM brightness control circuit. I am using a relatively high power White CREE LED, N-channel Enhancement MOSFET BSS316N and Resistor R. The circuit is as shown below.

I am driving the Gate of the N-channel MOSFET with a 3.3V, 100KHz PWM from a microcontroller.

The CREE LED which I am using is rated for 1A and after testing it (With a 5V constant DC supply and resistor in series with the LED), I am happy with the brightness I got from the LED when the average current passing through it is around 350mA. So I want to drive this LED around this current rating(also because of thermal considerations for long life. 1/3rd max current rating).
So for a current of 350mA, 5V supply and 3.05V forward voltage of the LED, the current limiting resistor comes to around 6Ω(1W resistor).

Now when I wire up the PWM circuit as shown in the image above, with R1=6Ω and a 3.3V, 100KHz, 90% duty cycle signal at the gate and 5V DC supply, the average current measured(directly from the DC supply or reverse calculation from voltage across the current limiting resistor, R1) comes to around 60mA and not the 350mA I designed for. So the LED is dimmer than when it is driven at an average current of 350mA. I presume this is due to the PWM drive.

Now question is how should I mathematically calculate R1 for a particular average current and a particular duty cycle so that I get my desired brightness(when average current is 350mA).
I can practically keep changing R1 to lower values till I find the correct value, but shouldn't there be a better way?

So if I use a lower R1 value, Avg current will drop in case of PWM drive, but I am sure impulse current will be higher. Can this potentially damage the LED in the long run?(Switching Freq: 100KHz) or is it acceptable?

PS: I am not looking for a constant current driver circuit solution.


texts:
I'm trying to generate audio through a 3.5mm jack using an atmega644. I tried following this tutorial, but even with the sampling provided, I only get a high-pitched whine. I did a lot of reading in the datasheet and came up with this code:

#define F_CPU 1000000
#include <stdint.h>
#include <avr/io.h>
#include "pcm_sample.h"
#include <avr/interrupt.h>
#define SAMPLE_RATE 8000;

volatile uint16_t sample = 0;

ISR(TIMER1_OVF_vect) {
    if (sample >= pcm_length) {
        sample = 0;
    }
    OCR1A = pcm_samples[sample++];
}

void init(void) {
    DDRD = (1<<PD5); // OCR1A

    // Fast PWM Mode 14, TOP=ICR1(0x7D), toggle OC1A on compare match
    TCCR1A = (1<<COM1A1) |  (1<<WGM11);
    TCCR1B = (1<<CS10) | (1<<WGM12) | (1<<WGM13);
    TIMSK1 = (1<<TOIE1); // Interrupt on overflow
    // Timer ticks at 1us, samples every 125us, so overflow every 125us
    ICR1 = 0x7D; // Overflow at 125
    OCR1A = pcm_samples[0]; // Set initial duty
    sei();
}

int main(void) {
    init();
    while (1);
}

But then nothing comes out of the headphone jack. My first thought was that the interrupt isn't firing, but I'm pretty sure it's set up right. Any ideas?

EDIT: The WGM12 bit is in the TCCR1B register and timer 1 needs a clock source, as Bruce Abbot pointed out below. I've changed this in the code and now the interrupt fires, however it still doesn't play the sound. Instead I get a high pitched whine and occasionally broken by a thumping noise.

Also, I realized that the timing was probably off, so I've changed I did some maths and came up with the above (hopefully it's correct). It required I be able to set when Timer 1 overflowed, so I've change from using Mode 5 to Mode 14. After correcting some math mistakes, it is improving: fuzzy noise instead of a high-pitched whine.

The solution to this was a combination of the below answers and comments. The code above is working, although it's pretty low quality you can clearly hear "It's working" (for this application, I'm not bothered about the quality, but I assume to fix that you just need to look into a higher sample rate as Chris Stratton mentions below). Thanks to all those who helped.


texts: Push power assisted trolley with one finger

texts: I recently saw a demo. One man pushed a power-assisted trolley using only one finger. The trolley was loaded with ~40kg stuff and it started from standstill on a up-slope when the man pushed it using one finger and apparently without much effort and it could move up quite swiftly. I was told there was no force or proximity sensor to detect the finger, but solely depend the motor encoder and controller. I didn't understand how a trolley loaded with 40kg and pushed by a finger could cause any change in the motor's encoder. Did anyone ever worked on power assisted trolley or bike or something else before to understand how to realize it?


texts: Low pass filtering effect on accuracy of power measurement

texts:
I'm planning on measuring consumed power (for an e-bike) by sampling current and voltage with an ADC and digitally approximating the power based on the obtained values.

I need to pick a sampling rate for the ADC to measure the current.

Based on on the current waveform that I've measure with an oscilloscope I think 1 Msps should be enough but maybe I can get away with a lower sampling rate low pass filtering the current sense voltage before the ADC.

How will the low pass filtering down to 50 kHz and sampling at 100 kHz affect the measurement accuracy of the energy consumed over time if my target is accurate within +/-5%? (I'm not worried about instantaneous power.)

(The below was measured between the battery and controller across a wire shunt amplified with an op-amp from 0 to full throttle with no load. I am not sure if the measurement setup is correct.)


texts: Can an N-ch JFET switch be positive-common-source?

texts:
I'm considering switching options for an HF (3-15 MHz) tuner network. Pin diodes are interesting but their surrounding control circuitry is somewhat inconvenient, and they require relatively high power to run.

I'm reading on RF JFETs. Both generic JFET guides and specsheets for RF JFETs such as the J211 suggest that Vgs must be negative, which would require the addition of a negative power supply.

Can I get around this by connecting the N-channel JFET as I would a P-channel common-source MOSFET? Source to Vdd, gate to a TTL-level control line and drain down to a load. This would not require an additional negative power supply.

From dialogue it sounds like I need to move from this (please pretend the MOSFET is a JFET) :

To this:


texts: Microcontroller Bluetooth Multiple Connection Support

texts:
What exactly is the bottleneck that might prevent a bluetooth device from being able to pair to more than one peripheral device at a time? Is it the connection, antenna, protocol, etc?

I'm planning to use a Gumstix module that connects to a bluetooth antenna with a U.FL connection and I can't find any information on whether it supports multiple device pairing. I don't know enough about how to bluetooth actually works to try to determine this on my own based on the specifications. Any help is greatly appreciated, thanks.

edit: I originally said multiple pairing, but I'm actually requiring multiple connections I believe to get multiple RSSI signals at the same time. RSSI requires full connection and not just paired right?

For background information I need to use multiple pairing in order to do some type of positioning calculations with bluetooth beacons using RSSI parameters. This is the board I have to use: https://store.gumstix.com/verdex-pro-xm4-bt-com.html


texts:
Is it OK to have pull up or pull down resistors which aren't all the same value (if you're running low on components for example)?  I can't think of a reason it should affect simple logic circuits.

I'm mostly using 74HC series ICs but plan to experiment with some Z80-based projects.  Is there a possibility that things might start to act strangely at higher clock speeds of around 4MHz?


texts:
I am working on a tube based guitar amplifier, and found an interesting schematic online. There is an op-amp that has diodes across a resistor in the feedback path.

I understand what it makes the op-amp do, instantly skip over any value less then abs(0.5V). What I'm asking is if anyone knows why you would add this to a guitar amplifier to drive a tube.

I have also included a simulation of Switch SW101a, basically how much resistance to ground on the negative input terminal.

The only answer I could come up with is "sound" or it somehow helps correct for non-linear responses in the tube.


texts: High input impedance devices - induced noise sensitive

texts:
I am currently reading about   4-20mA current loops and the reason we use them .As stated there , using voltage to transmit signals we get voltage drops over long cables due to cable resistance. We can use high input impedance devices to circumvent signal loss , however these devices are sensitive to noise.
So my question is why high impedance input devices are sensitive to noise and low are not?
I have read other topics on this subject but none of this could explain it clearly.

Please give me some explanation.
Thank you in advance


texts:
I inherited a box of parts a hobbyist had left behind.  In the box was a WIDE variety of stuff.  I have identified most everything except three small (abt 15mm cube) modules. They are 3-pin and intended for PCB mount.  They are metal shielded except for a small opening.  I have three.  One slightly larger and two identical. The two smaller ones were in an unopened Jameco bag.  There are no markings or numbers except a single large digit.  There was nothing on the bag. Here is a photo .
Does anyone know what they are?


texts: How can electronics “short circuit” when you plug in cables

texts: I have recently been troubleshooting a component on a CNC machine. The device is connected via etherCAT to the machines controller. There is also a power cable that goes to the component. Basically the component is one electronic board that controls some gas valves. I have been told that the electronic board can be “short circuited” if I removed the cables and insert them again while the power is on. Is this true-if so-why?


texts:
I am using a meanwell RT125D power supply which has

230 V AC input and 3 O/P i.e. 5V, 12V and 24V.

While I used the supply, without any load, the behaviour of supply was not as I expected. The   LED in the supply was blinking at a interval of 1 second (as show in this representative video)and no where in the datasheet  can I find out the reason for such behaviour. In the video itself people have suggested to load both 5V and 12V. I tried that also, but the same behaviour continued.

Further, I found out some one has asked the similar question here. Although I have not tried adding resistance but that don't seems to be a proper way. Also I would like to as if I had missed any thing in datasheet (i.e. in the other electrical exchange, I found out that minimum current for RT125D for each of supply is 2 Amp, .4Amp and .1 Amp for 5, 12 and 24V).

Need help to resolve this.


texts: How is a signal physically routed in an FPGA?

texts:
I've looked at this similar question, but it does not provide the answer I'm looking for. The documents from Xilinx also confuse me and the diagram provided in the Implementation view of the Xilinx software does not cast much light on this question.

My interpretation of how routing is done inside an FPGA is like the following diagram:

When I say signals, I meant to say CLBs

At each intersection of the blue and orange wires, there is a switch that is set when the FPGA is programmed to connect the two wires, as illustrated in the picture by the "Connection Point" dot. Once a connection point is set the the entire length of the blue and orange wires will be active in the connection.

I don't think my interpretation is correct.


texts: Interfacing 24VDC output with 5V TTL input

texts:
I have a project which requires me to interface a 24VDC output module (PLC) with a rather outdated 5V TTL input module.

From the schematics of the old module I can draw the conclusion that it uses +5V as a reference for all the inputs and 0V to activate the input.

I found the following module: MICROOPTOMOS 12-28VDC/5VTTL which I can activate using a 24V signal and it outputs 5V TTL.

The schematic of the module is this:

My question is, how would I go about wiring the module in the way that it "pulls" to the ground the 5V TTL input in order to activate it?


texts:
I am required to design a class AB audio amplifier to deliver 10W to an 8Ω speaker as shown, but I don't know where to start. The bandwidth is to cover the range from 20Hz to 18kHz. Input voltage is 500mV rms.

Image source: Electronics Tutorials - Class AB Amplifier Driver Stage
This is what I have done so far
CALCULATIONS.

R_L = 8 Ω

P_AVG = 10W

Bandwidth from 20 Hz to 18 kHz

V_(0 peak) = √(2×10×8) = 12.65v

V_CC = V_(0 peak)×2+2 = 27.3V ≅ 28V

I_(0 peak) = V_(0 peak)/R_L = 12.65/8 = 1.58A

Each transistor current is given by:

I_(0 peak)/2 = 1.58/2 = 0.79A

Assuming β = 113

I_(B Q1) = I_(B Q2) = I_E/(β+1) = 0.79/114 = 6.93mA

Assuming I_D = 1A, then:

I_bias = 1mA+1mA+6.93mA+6.93mA = 15.86mA

Setting V_C = 14V, then:

R4 = (28V-14v-0.7v-0.7V)/15.86mA = 794.5Ω

Setting V_E = 1V

R_3+R_3^II = 1V/15.86mA = 63.05Ω

Input current is assumed to be 500mA
Q_3 gain is given by:

V_(O peak rms)/V_(in rms) =  √(8×10)/500mA = 17.88Ω

Setting Q_3 gain to 20:

R_3^II = ((28V-14V)/15.86mA)/20=44.14Ω
R_3=63.05-44.14 = 18.92Ω
I_B = I_C/β = 15.86mA/100 = 0.1586mA

Setting I_1 = 20 I_B:

I_B = 20×0.1586mA = 3.172mA
R_2 = 1.7V/3.172mA = 535Ω
R_1 = (28V-1.7V)/3.172mA = 8291Ω

Designing for C_1 and C_3:

r_e = 26mV/15.86mA = 1.64Ω
R_1 ||R_2 = 502.57Ω
R_3^II = 44.14Ω
R_th = 41.96Ω
C1 = C3= 1/(2×π×f_L×R_th) = 1/(2×π×20×44.14) = 189.65μF

Designing for C_2:

R_th = 69.6759Ω
C_2 = 10/(2×π×f_L×R_th) = 10/(2×π×20×69.6759) = 1142μF

When I simulate the circuit, the output voltage is quite small and the output power is much less than 10W.
What could be the issue?
The final circuit I came up with is shown.


texts: Driving an array of resistive loads on high side with as little parts as possible

texts:
I'm trying to switch an array of resistive loads at 12V as fast as possible using least amount of parts due to limited board space. I have tried to find sourcing darlington transistor pairs but they are either not able to provide at least 500mA per channel (simultaneously, so 3.5A sourcing in total) or not fast enough. I need the rise and fall time of the 12V swing to be at most 150 nS each way. The pulse length is around 1.5uS. I've tried looking for sourcing darlington pairs as well as nmos or pmos mosfet arrays that can switch fast enough but all I've found that will be suitable for my needs is individual fets. Does anyone know any alternative methods of switching resistive loads fast in a small smd package?

simulate this circuit – Schematic created using CircuitLab


texts:
I am just starting to use Altium to layout a PCB. I have made my own parts with 3D models. I have to large parts - one an LCD module, and the other a STM32F303RE Nucleo-64 dev board. I made an outline of them on the footprint, using the Top Overlay layer, so that I can know where the board will sit and I won't place anything beneath it that will interfere. The LCD and dev board will sit on top, using headers.

When I go to move the parts partly off the board (with all the pins still on the PCB, it automatically moves it back, entirely into the PCB area. Physically, there are only headers on the one side of the dev board and LCD module, the rest could hang over the PCB edge.

I have tried removing mechanical outlines, and changing the top overlay to dimensions layer, but it still won't let me place the part over the PCB edge.

If anyone can suggest a solution, thank you!


texts:
I am new to electronics and robotics, so I apologize if my question is dumb.

I am trying to run four motors with two L293D, and here is the configuration that I am thinking of:

DC Motor
This is the motor that I am using, but I am not sure how much voltage I need to provide to the motors via pin 8 of L293D. Do I just need to provide 3 - 6V? or do I need to consider other factors like how much current can the batteries handle?

Thanks in advance!


texts: I'm using this current sensor TLI4970-D050T4 located at the emitter leg of a power IGBT. This transistor is being switched at 10 kHz. How do I choose the convenient sampling frequency for the sensor? Is it trivial? For example, I'm sampling every 10 ms, so it's obvious I'm going to get a lot of instantaneous measurements which some of them will be zero when the transistor is off.


texts:
I want to design a nixie clock based on a high voltage shift register: the HV5530. I don't what to multiplex the tubes to avoid loss in brightness. My idea is to leave the anodes powered all the time and switch the cathodes by connecting them directly to the outputs of the HV5530. I will use a ribbon cable to connect the tube driver to the board that holds the tubes.

Should I worry about any inductive effects of the wires and the traces on the PCBs? Should I use some voltage clamps or will it work by simply connecting the cathodes directly to the chip?


texts:
I am trying to determine the battery I would need to power the following:

Jetson TX1 board whose website says that its power rating is 6.5-15W, 5.5-19.6V
The board powers a ZED camera with 5V/380mA rating
VLP-16 lidar with 8W typical and 9-18V operating voltage
Multisense camera 7W nominal power, 24-48V nominal voltage
8 port gigabit ethernet switch that is USB powered.

Considering that I need at least a voltage of 24V to power the multisense camera, I chose this battery 24V, 10Ah, 240Wh rating. Please let me know if this would work and other things I have to consider while choosing a battery that needs to last at least 3 hours. I require something very lightweight and compact that I can mount onto a mobile robot. I also require one battery to provide me with different voltage and current levels for the above devices, so what kind of a converter should I be looking for?


texts: TLE42744 outputs lower voltage than expected

texts:
I am an engineering student and have just finished designing a PCB containing an STM32F405 MCU, an LSM9DS1 Accelerometer/Gyroscope/Magnetometer and 7 connections for potentiometer reading. My power supply is 12V/~0.02A and to power these components i have used an LM340 (to convert to 5V needed for potentiometers) and a TLE42744DV33 (to convert to 3.3V for the rest of the devices). The LM works perfectly fine outputting 5.020V but the TLE is where I have a problem. It outputs ~2.4V fluctuating between 2.2V and 2.5V. When I look to my power supply I can see 12V but the current jumps to ~0.55A. Also after a while, the regulator begins to smoke. So far the problem is observed with two brand new components and everything is hand-soldered.
Also when checking 3V3 and GND in left electrolytic capacitor for short-circuit with the multimeter there was a single beep and not a constant one (which would indicate that those two networks are connected somewhere).

Schematics found below:

What could possibly be the problem ?


texts:
I was reading about power factor in electronic devices and I found charts showing that usually the power factor varies (usually decreases) with the load. So if you have a device that either works with 0% or 100% of load it's somehow easy to develop a power factor corrector (passive) but if your device varies the load from 0% to 100% it gets more complicated.

My question is: the device can be seen as a Z load. This Z (impedance) load is composed by a R (resistance) part with a X (reactance) part. So if my device varies the load by changing the relation between X and R (for example keeping same capacitors and inductors values but varying the resistance somehow), of course we then have a different final Z value so we have a different PF. But is it possible that in some cases the X varies like R so the resultant Z (and therefore the PF) remains the same for every load?

Furthermore, is it possible to map the device PF x Load curve and create a PFC that follows the same curve (even though if you change something in the device you have to do it again and considering simple devices where there's just a single dial to vary the load)?


texts: Building compliance requirements for IOT sensors

texts:
I want to install a differential pressure sensor, (datasheet), in a clients building and leave it running for a few months.

The sensor will be powered by a gateway, that will be approximately 50m away.

As you can see below, the sensor is contained in a plastic housing with metal legs.

Can I run a length of cable through the ceiling cavity to the device and leave it running for a few months unattended or are there any buildings regulations/ compliance laws to which I must adhere. i.e. from a legal perspective.

For example, does the sensor + gateway solution have to comply with the following:

EN 60950-1:2006 + A11:2009 + A12:2011 + A1:2010 + A2:2013
Information technology equipment - Safety - Part 1: General requirements

R&TTE Directive 1999/5/EC
DIRECTIVE 1999/5/EC OF THE EUROPEAN PARLIAMENT AND OF THE COUNCIL of 9 March 1999 on radio equipment and telecommunications terminal equipment and the mutual recognition of their conformity


texts: Recovering data from a saturated accelerometer

texts:
I have an ADXL345 accelerometer and mounted it to a hybrid rocket to launch. Unfortunately, I forgot to set the range from its default of +/-2g to +/-8g (we expected 6g during liftoff).

For +/-2g range, the datasheet lists an output resolution of 10 bits, and for +/-8g it lists a resolution of 12 bits.

I noticed this in the datasheet linked above, under the DATA_FORMAT register (0x31):

  The DATA_FORMAT register controls the presentation of data to Register 0x32 through register 0x37. All data, except that for the +/-16g range, must be clipped to avoid rollover. (emphasis mine)

Based on this statement and the functional block diagram (a 3-axis sensor is connected to "sense electronics", then connected to an ADC), I am hoping there is a way to resolve the correct data. The scale factors are listed on page 3 of the datasheet.

Is there a way I can resolve this data, at least to 1 or 2 significant figures? (For instance, I have a detection of 1.9414g - this should be around 6). I don't think the sensor saturated, merely the number in the data registers - and given the scale factors and some creative bit-shifting (it is not totally clear how they get from 10 to 12 bits when changing resolution), hopefully I can recover something useful from my data.


texts: Arduino-tiny Attiny45 PWM pins not working properly?

texts:
I am trying to use an Attiny45 as an Arduino such as here http://www.forkrobotics.com/2012/04/run-arduino-code-on-an-attiny/ using the Arduino-tiny cores. Now according to the diagram on the site pin D0, D1, D3 and D4 should have 8bit PWM capabilities but while testing with an LED only D4 works correctly, D3 goes completely on or completely off and D0 and D1 flicker while not completely on or off. I know the tutorial is for the Attiny85 but as far as I can determine the only differnce between it and the 45 should be RAM and flash storage. Also the 8bit is derived from the retailers website which states that there should in fact be 6 8-bit PWM channels https://za.rs-online.com/web/p/microcontrollers/6962614 Do any of you have any idea what could be causing this?

The code is just a version of Blink modified to switch between 100% and 50% duty cycle rather than on or off:

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.
 */

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 3;

// the setup routine runs once when you press reset:
void setup() {
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  //digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  analogWrite(led, 255);
  delay(1000);               // wait for a second
  //digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  analogWrite(led, 127);
  delay(1000);               // wait for a second
}


texts: 25AA320A EEPROM byte write and page write

texts:
I need to write data into my external EEPROM 25AA320A using Attiny2313. I know how to write one byte at a time. For example, spieeprom_write (200, 7); with 200 being the starting address on EEPROM, and 7 is the data i want to write into the EEPROM.

my questions are:
1. what is the next address that i can write to?
2. is 7 considered to be a byte?
3. how do i perform a page write? I know one page is 32 bytes for my EEPROM.

Thanks, it would be great if you can provide some examples.


texts:
How to set the width of all the traces together to the desired value before using autoroute option in Autodesk Eagle?

every time I use autoroute, the trace width is by default set to 0.0154mm. I have tried changing the value in design rules. However, I didn't find any luck. I am trying to set the value of trace width to 13mil and drill size to 24 mils. Can you please suggest the exact way to deal with it.


texts: Would a voltage divider work to lower the output voltage in this case for this open collector chip?

texts:
I want to interface the output Vo of this chip to a trigger input of a DAQ device. Here below is the chip which is open collector output so There will be a resistor between Vcc and Vo:

And the specs of the trigger input is:

So Vo will be coupled to the trigger input.

In my case the Vo is around 5.6 or 5.7V so exceeding 5.5V max trigger input a bit. Would a voltage divider using two resistors betwweb Vcc and Vo below like  820 Ohm and 6.8k work fine?:

I really don't want to use an extra buffer.

ı mean in my case Vcc is 5.7V. So is it better to use voltage divider at Vcc or between Bcc and Vo as in my second diagram.


texts: Induction heater - please identify device

texts: I am trying to identify this device. It is located on the cooling water input line of an induction heater. The grey insulated wire is too thin to carry much current, but it couples with another toroid with a single turn thick conductor as shown in the second picture. I have also added the only circuit diagram available ... for what it is worth.


texts: Small SMD components: are they really capable of withstanding high voltages?

texts:
You can easy find some SMD components which are pretty small for such a high voltage (500V @ 0805 package for example - crazy?!). 0805 case would have 1.3 mm distance between the contacts, so I doubt that this voltage would be normal under real world circumstances.

So my questions are:

Would you pick such component for your circuit? I'd better place two or even three components in series to make the voltage across 0805 case not more than 100-150 Volts or 150-200 for 1206. But this estimation based on my sensation (I never experienced any failures or never researched the limits)
Probably such components should be used inside sealed cases or under a layer of a good insulating varnish (which is rare for me)? This could explain their existence.
Do any of you guys have any experience with these components? What is the real-world V/mm limitation?


texts:
One cycle of a sine wave (such as the mains power voltage) consists of two half cycles (often called positive and negative in electronics).
Is there a (preferably one-word) term to refer to such a sine wave half cycle?
I have seen the term half sine wave, but it is hardly better. And besides, I believe this refers to all positive or all negative half cycles in aggregate, not to individual half cycles.
I am especially interested in this in regards to the mains power.


texts: Using transistors with different threshold voltages

texts:
I have an idea that requires switching based on one of three input voltages. The basic idea is to have three different circuit behaviours based on three different voltage inputs. I've been doing this successfully with comparators, but that takes  a lot of space. I'd like to do the same thing with discrete transistors or transistor arrays. Does this sound reasonable, or are the comparators actually the right solution?

It seems to me that if I had N and P transistors with one rather low voltage threshold and also had N and P transistors with a higher voltage threshold I could arrange them in various configurations to switch all sorts of ways as long as the voltage thresholds didn't overlap. However, in searching digikey, I couldn't find transistors with differing voltage thresholds clearly delineated. Are they all pretty much the same based on some physical fact of their manufacture or am I just looking for something really unusual?

Thanks much!


texts: How this equation of the voltage is attained?

texts:
I've may been asking the very easy question.

The each resistor has the same resistance(given by \$r\$).
The textbooks states the following.
\$V_{AB}=r\{i_1+i_2+i_3+(I-i_1)\}\$
How the above equation is attained?
Can anyone tell me some hint(s)? so that I can deduce it in my own.


texts: Modifying guitar amp to run on batteries, switching between center tapped transformer and batteries with only DPDT switch

texts:
My situation is as follows:

I'm trying to convert a small guitar amplifier to dual power. Mains and battery.
The power supply that comes in the guitar amp is a center tapped 120V to 14V supply. After doing some research online I found that I needed two 12V batteries connected in series with a center tap in order to make things work. I proceeded to wire this up by temporarily connecting the 3 wires from the batteries to where the power supply's 3 wires used to go and it worked fine. (I know it would probably be better if I bypassed the rectifier IC since I'm already 4V lower when running on the batteries, but it was nice being able to use the socket on the PCB where the original power supply connects)

The thing is I want to use a switch to alternate between the two power sources.
I guess if I stuck a 3PDT switch in there I'd be able to switch out all 3 wires from each source and connection would never exist between them, BUT the problem is that the perfect size replacement rocker switch only comes in a DPDT instead of a 3PDT, so this brings me to my question:

Can I connect the center tap of the mains power supply and the center tap of my batteries to the PCB at the same time and use the DPDT switch to just switch between the two remaining wires of each power source?

Basically the center tap from both the batteries and the power supply would go straight to the guitar amp's PCB and the DPDT would switch between the +14V -14V of the power supply in one position and the +12V -12V of the batteries in the other position. Is this ok? I've attached a diagram of what I mentioned. Thanks for your time guys]1


texts: Can a differential probe and regular coax wire be connected safely to only one channel of scope using a tee connector?

texts:
I would like to ask if I can connect a differential probe and a coax wire through a tee connector to 1 channel of an oscilloscope, in order to take different DC measurements.
The connection topology is shown in the image below. The idea is to avoid connecting different types of probes in an automated environment to the equipment when testing the different types of DUT. Both DUTs will never be connected at the same time when testing is being conducted.
I wanted to know if the differential probe can be damaged if DUT1 is active and is outputting a 30VDC signal which is being measured using a coax line. coax line is referenced to the chassis ground whereas the differential probe is required to measure 500VDC signal. The differential probe that I am using is a Rigol model RPD1025.


texts:
I'm a noob of electricity and circuits, so please keep that in mind. Devices have some IR binary codes to operate a function. For example, binary code of a TV for "volume up" is 0001 0111. What do these bits represent? I guess they represent conducting energy from battery to IR LED. What is the time gap between them? Is it specific for every devices?

To repeat, I'm just a noob. I'd be very happy if you explain this to me in a very simple way. Thanks.


texts: IGBT vs. Power MOSFET for switching applications. Where to draw the line?

texts:
For lower breakdown voltages, a power MOSFET is clearly the device to go for, in view of its higher efficiency, higher commutation speed and lower price.

Where should the line be drawn, upwards of which IGBTs take over as the preferable solution? What are the relevant decision criteria?


texts: Have 1 temp sensor send temperature readings to 2 seperate temp gauges

texts:
My old truck (fuel injected '92 Ford Ranger) has 2 temp sensors, located where the hot coolant leaves the engine.

One sensor goes to the ECU, which alters the amount of fuel which is delivered to the engine depending on the engine temperature.
The other sensor goes to the analog temp dial on the dashboard. The temperature dial has arbitrary low/med/high levels, so it is not very helpful if I want to know exactly how hot the coolant is when it leaves the engine.

I installed a digital temperature gauge in the cabin. I cut the wire leading to the dial gauge on the dashboard and connected it to the new digital gauge. The digital gauge now displays the temperature of the hot coolant.

This is where the question shifts over in the electrical realm.

I want to have both the old dial gauge AND the digital gauge running at the same time. But when I spliced the wire coming from the temp sensor and connected one wire to the dial gauge, and the other wire to the digital gauge, neither gauge displayed the correct temp.

It looks as if both the dial and digital gauge are displaying half the correct temperature. Eg: if the engine was running hot at 300 degrees, the dial would display medium, and the digital would display 150. They should be displaying hot and 300, respectively.

If I understand how the temperature sensor works, the resistance changes depending on how hot the sensor gets. Correct? In my case, this current is getting split to 2 separate gauges instead of one gauge.

So if I want to direct the current to 2 separate temperature gauges, I would need to double the volts/amps coming from the sensor, correct?
Is there an easy way to do this? Is there a way to "do" the opposite of resisting a current?

Parts

Temperature sensor
New digital temp gauge


texts:
This is my second question relating to this project. I am trying to make this project in the breadboard first, yet I am having trouble connecting all the resistors, and DIP switch connection with as few wires as possibl (I ran out when trying to recreate it.

If possible try to explain it in a visible example


texts: Connecting a single end stop to two circuits

texts:
I currently have a garage door opener that has its own controller. One of its inputs supports a mechanical end stop, so it can know when it's done opening.
I'm in the process of adding a very simple circuit (based on a Sonoff, en ESP8266) to be able to control the garage door opener using WiFi. As it's now, I'm triggering the manual "open button" using the relay in the sonoff. It works great, but I'd like to also connect the endstop, so my controller also knows when the door finished opening.
As I understand it, I can't directly plug both circuits to the same endstop, as they use different voltage sources. So my question is: How can I easily "mirror" the endstop, or isolate it somehow, so both circuits can use it?
(adding a secondary endstop is not an option right now, nor is it replacing the main garage door circuit).


texts:
I'm trying to find out the transfer curve (Vin Vs Vout) of the circuit given below.

I approached this way:

Is it the right curve?


texts: Creating a temperature-dependent solar cell in LTSpice (using varistors)

texts:
I'm currently working on my master thesis and therefore need to simulate a solar cell in LTSpice.

I've already modeled and simulated some examples with constant values. But for a more accurate model, I want to make the whole system temperature dependent since the solar cell will heat up from 15°C to roughly 70°C. The problem I'm facing is implementing the temperature dependency.

As far as I know, there is no way of using a temperature curve (just temp sweeps) for the simulation. The only way to get around this problem is using a voltage dependent current source (Iph) and varistors for the series and shunt resistor (Rs and Rsh). But when I'm using varistors instead of resistors, I get totally different results which are nothing like I'd expect them to be. I attached two plots showing the difference.

Figure 1: Expected solar cell results

Figure 2: Solar cell results with varistors

Do you have any ideas what I'm doing wrong with the varistors, or is there a better way to implement the temperature dependency?

The schematics are attached. If you have any questions, feel free to ask.
Thank you for the time and knowledge you are investing! I really appreciate it.

Figure 3: Schematics


texts: I am looking at the datasheet of the PMOS enhancement transistor MTP2955V from Motorola. I was wondering why they write VDS instead of VSD and VGS as if it where posivite in this graph. Is not the Source terminal at a higher potential than the Drain terminal and VGS<0 for a PMOS that is operating ?


texts: Op-amp and amplifying the voltage in negative range

texts:
I am using DAC to produce voltage from 0-4.096V which I feed into the op-amp. I am using ADA4522 which can be supplied with 55V at positive rail and gnd at negative rail. Using the non-inverting op-amp configuration, R1=12.43k & R2=1k, I do get extended range of 0 to 54-point-something volts at op-amp output. Happy with that! Picture is below. btw. are resistor values okay?

Now to the other one. I want to amplify the voltage from the DAC(0-4.096V again) to the 0 to -55V. I have planned to connect ground to the positive rail and -55V to the negative rail. I guessed I should use inverting op-amp topology. But that seems not to work. I must have some stupid, obvious mistake I can not see.

Available power supply on this actual project is +55V & -55V with common ground and 5V with common ground. Every result I have is from spice simulation, ada4522 spice model is downloaded from Analog website.

EDIT: Sorry for bad-drawn schematic. Here is better one, I hope. Now it is clean that I have available dual-supply of +-55V and there is 5V supply, too. Thanks to your comments, I have changed R1 on op-amp for positive output. That is OK now. But for negative output, still struggling. If I connect positive rail of that op-amp to the 5V, I am out of op-amp specs. Struggling how to fix that.

simulate this circuit – Schematic created using CircuitLab


texts: Is LNK304 not suitable to drive a 12V relay?

texts:
I am designing the 12V/120mA DC power supply using LNK304 IC. Using that operate the 12V relay. Initially it was working. After that  ON and OFF certain time. Suddenly Relay was not working. Then  find the problem  LNK304 was not work. So I changed the IC and got the output. So again drive the Relay again the same problem was arrive. 60W load  connected in the output. I had refer the 12v relay datasheet they mentioned the nominal current for coil is 30mA. Can anyone know the reason please tell me why LNK304 was damaged!

LNK304 datasheet here

.


texts: Cheapest way to do an IR re-transmitter (IR protocol agnostic, dumb device is good enough)

texts:
Looking out for ways to retransmit IR, bi-directionally, like this:

[IR TX-A]----->[IR RTR-1]------>[IR RTR-2]------>[IR RX-B]
[IR RX-A]<-----[        ]<------[        ]<------[IR TX-B]

My interest, is in the "IR RTR" device which can retransmit received IR data bidirectionally, s.a. to increase effective distance. While if it is specific to the IR protocol, it is fine, but if it cheaper / easier to behave in a protocol agnostic way, i.e. received signal is just amplified as-is and fed "dumbly" on the transmitter LED, without needing any transmitter, this is quite acceptable, unless of-course it might introduce significant noise, s.t. it becomes difficult / expensive to deal with on the other end.

If there are ready schematics for this, would be glad to be pointed to it.

BTW, I have nothing against a uC based approach, but I'm probably keeping that option as a backup, since my requirements in order of priority are:

Low cost - My target is a sub $5 BOM -- all components, PCB, battery holder etc. included, but except the enclosure.
Low power consumption - This is probably going to be the hardest part, given how power-hungry IR LEDs are. Maybe I am dreaming, but it'd be great to see this circuit run-off disposable batteries (like the A23 or PP9), for last for at least 6 months without a change.
Small size - I'd like to keep it no bigger than a box of Altoids.

Edit:
I do not need this to function as a universal remote control range extender, i.e. I am also quite happy if this little device of mine can act as a bidirectional signal repeater for a specific carrier frequency, modulation-type which might well be proprietary and chosen so as to avoid interference and effects of ambient noise.

Edit (#2):
Adding some more information about the comm. needs:

Throughput of 80-100bps is good enough, excluding the error-check/correction overhead
Communication is bursty but cannot be predicted. However communication during a burst is a repeated transmission of same information several times, s.t. if receiver can sleep/wakeup fast enough, it shouldn't miss information. Information is a 10 byte packet, that is sent upto 10 times, with/without acknowledgement.
The RX/TX IR-pair in each end-node, and the repeater need to be placed close together to make a compact pair, but I am hoping of avoiding interference between the pair by having some optical barrier between them, similar to double-barrel gun.
Typical distance between end-node and repeater, I hope to achieve, is 10-12feet.


texts: Is disabling time sensitive interrupts in C a bad idea?

texts:
I sometimes see code that disables interrupts, for example to perform a non-atomic read/write to a global variable used in an ISR. On AVR with gcc, this may look like:

ExpensiveOperation();
cli();
// Perform a non-atomic read/write
sei(); // Assume that it is acceptable to enable global interrupts here.

The cli and sei macros expand to asm volatile statements with memory barriers. The volatile keyword ensures that the cli/sei instructions are not optimized out, while the memory barriers ensure that if the non-atomic read/write is to a volatile variable, it will occur between the cli and sei instructions. However, this page suggests that nothing is preventing the compiler from putting ExpensiveOperation after the cli instruction.

Interrupts often require precise timing. If disabling interrupts in C risks having expensive operations run with interrupts disabled, should timing critical interrupts only be disabled in inline assembly (or should your program be rewritten to use only atomic reads/writes)?


texts: Will a 2.4GHz WiFI/Bluetooth antenna create noise in my sensitive EEG measurement circuit?

texts:
I'm designing a circuit for doing EEG measurements and I want it to be very compact. As a result, the WiFI+Bluetooth antenna (2.4GHz) will be sitting half an inch above the electrode inputs. Will this cause EMI issues? The raw EEG signals are very small (1-10uV).

I thought about adding a bypass capacitor (22pF) on each electrode input to pass 2.4GHz signals to ground, but I'm not sure if this is necessary (or if it would even work properly).


texts: My "audio oscilloscope" can't measure static/constant voltages but only changes

texts:
I don't have a oscilloscope (costs so much) so I decided to make a "audio oscilloscope"

It works great in many ways. When connecting a IR receiver module to the audio oscilloscope I can clearly see the (correct) signals when clicking a remote control.

However there is one very annoying problem. I ONLY manage to monitor CHANGES in voltage, but NOT continuous static/constant voltage. If the scope receives a constant voltage (for example connects it to a battery) then it will after a short, in lack of better terms, "recalibrate" or "get used to" the voltage and start to think of it as zero voltage.

In the example I first have the oscilloscope without and voltage. It correctly shows zero voltage.

Then I connect the oscilloscope to 5V (from USB) and correctly the scope shows positive voltage... for a very short while, and then it goes bananas and eventually "recalibrates"/"gets used to" the 5V and think that it is 0V (even though the 5 volts are still applied!!)

Does anyone know how to measure constant/static voltages correctly with an audio oscilloscope, or know why this "problem" exists? I assume that a real oscilloscope does not behave in this way.

Youtube video showing behavior


texts: For a STM32, can I use a quad SPI and SD card as a framebuffer for a LTDC LCD driver?

texts:
I'm using STM32F756

The SD card is 20 MHz and I know the performance would suck for an 800 x 480 display, but will the hardware do it? Or is RAM the only medium required?

I screwed up, have no external RAM and there's not enough internal RAM.


texts: How can we extract the frequency content of an audio signal given the histogram of beat energy versus beats per minutes?


texts: Pressure/barometric sensor for coke can stirling engine

texts:
I'm working with a friend to provide instrumentation for a coke-can Stirling engine he's building (the kind you can see on Youtube).

As part of this, we'd like to measure revolutions per second of the flywheel and the pressure on the balloon diagram. RPM of the flywheel is pretty easy to calculate with an optical encoder but I've no idea how to go about measuring pressure of the vessel.

I'm not sure if there are any sensors capable of detecting the presumably small changes in the pressure in the system. Similarly the flywheel is capable of reaching 900RPM +/- 1%, thus the "system frequency" would be about 900/60 = 15Hz so my sampling frequency would want to be at least 30Hz and probably well oversampled (100-200Hz?) so I can plot this over time.

In summary, can anyone recommend a sensor capable of detecting very slight changes in pressure at a rate of at least 30samples/second?


texts: Difference between MAX3430 and ADM483 for TTL-RS485 Converter

texts: I want to use TTL-RS485 Circuit as in the attachment. The circuit is working when I use ADM483 Transceiver for U1. It can provide communication. However the circuit is not working when I use MAX3430 for U1. I observe enable and tx signal is fine and same as in ADM483. but there is no communication. when I remove R3, it try to communicate but it cannot receive because receive enable is disabled. I mean it transmit but not receive. why does not the circuit work with MAX3430? why does it work with ADM483?


texts: Why should a planned power outage be expected to damage equipment?

texts:
There is a planned power outage in the San Francisco Bay Area in the upcoming days.

News media reports that the utility company (PG&E) says it expects that the "shutdown will damage some of its equipment and that restoration could take days".

My question is, why should such damage occur during a planned outage? Is this normal?


texts: find series and shunt components of matching network

texts:
hello there i am trying to solve this question. i have uploaded question and solution here.
correct answer is X1 = -j25 and X2 = j30.
can you tell me why am i wrong??
can you help me to solve this??

my solution is here


texts: RaspberryPi touch sensor using transistor

texts:
I built the following circuit. When I touch the rogue transistor base wire and GPIO is outputting, the LED lights up (still not quite sure why, so if someone could explain this, that'd be helpful, too.)

But now instead of the LED showing the state, I want to use a GPIO input to send it to the Pi. However when I replace base with GPIO.IN, the LED loses a lot of voltage, and thr GPIO only reads 0 (off). If you couldn't tell, I'm new to all this, so a bit more detail could prove helpful.


texts: Cosimulation Error on Advanced Design System

texts:
I want to use BLF2425M9LS140, Power LDMOS transistor, to do cosimulation on ADS. I have got transistor's PCB design from its site and have done required procedure but when I try to convert layout to schematic model then simulate it, I get following error:

I_0 is the name of the PCB layout and I cannot see the vendor simulation component:

What should I do?


texts: How is the current induced in this circuit?

texts:
Rectangle FBCE is the conducting wire. The circle is where magnetic field exists.The perimeter of the circle is NOT a conducting wire. R1,R2,...are different resistances.

If the magnetic field(B) is increased at a constant rate will there be a current produced ? If so, in which direction ?

According to Lenz's law, if an induced current flows, its direction is always such that it will oppose the change which produced it. Since the magnetic field is changing, I am almost sure there will be some kind of current flowing in the circuit which would oppose the increase in magnetic field. But I couldn't figure out how or in which direction should it flow, so as to effectively oppose the increasing magnetic field. I have considered the situation where Current flows through FBCE and that would somehow oppose the changing magnetic field. But, I don't think that's correct.

I also tried to observe the circuit in a simpler form wherein I put a cell in the part of the circuit where the emf is produced due to changing flux. It generally works great when the whole circuit is inside the zone where the field is changing. That approach isn't working here. Does anybody have an idea on how current should flow ?

Please answer the question if you are very sure about the answer you are giving. Having a wrong concept would be terrible for me at this point of time.


texts: "Usb breakouts" provide power, ground and signals in. Infrared receiver diodes need power, a ground and a signal out. Will the USB breakout transmit data out from the infrared diode if connected? If so, I'm guessing a program such as LIRC could receive the data, or is there some native Linux (or otherwise) software that listens to raw signals coming from a USB port?


texts:
I am trying to use the IGBT driver IR2184 to drive a H-bridge made of powerpack CM100DU-24F. Here is the circuit I built:

simulate this circuit – Schematic created using CircuitLab

a) How do you choose the value of the boostrap capacitor between Vs and Vb ? I measured only 2.5V across it, but I should get 12V. Am I right ?

b) Is there any requirement for the diode D1 ? I commute at 1Hz.

c) On the datasheet of the IR2184, it is recommended to put a capacitor between Vcc anc COM. What is its purpose ?

d) The voltage between gate and emitter of L1 is square, 1Hz, 12V. But the voltage between gate and emitter of H1 is 0V.

e) How do you choose the value of the gate resistor ?


texts: Understanding programmers for microcontrollers

texts:
I'm confused about the concept of a programmer for microcontrollers. Hoping someone can clarify.

When I use an Arduino, I can use another Arduino to program it via the SPI pins. I understand this to mean that the SPI pins behave as programming pins using a certain programming protocol when certain conditions that put the microcontroller into programming mode are met.  So, the programmer is nothing more than hardware that knows how to speak the programming protocol.

When I read about ARM processors, often I read that I need a Segger JLink. Otherwise I cannot program it. Development kits often have a Segger chip on the board. So, this is a programmer for ARM chips. If so, why can't an Arduino, or some other general purpose hardware, also speak the programming protocol for ARM?

Also, what is so special about programmers that it has to be hardware and cannot just be software as long as the microcontroller pins can be hooked up properly and the software can control those pins? If this really is the case, why are Segger products so expensive? What is their secret sauce that seems to give them some sort of monopoly?

If it's important to this discussion, the specific microcontroller I'm thinking about is the nRF51822 with an ARM Cortex M0.


texts:
Following this question, Visual example of NPN transistor, is the following a correct understanding of a PNP transistor?

To be honest, I have no idea why the top of the transistor (where the current flows into) is called the Collector for an NPN transistor and an Emitter for a PNP transistor. Why isn't it just called the same thing, if it's "where the conventional current flows in" ? That part seems incredibly confusing to me (aside from understanding the actual current flow in the two transistors).


texts: How to detect the duty cycle of a laser pointer

texts:
Our assignment is to design an analog parking lot access system. A laser pointer will represent the car, and an ID detector will check if the laser's duty cycle is 20%. I designed the circuit that will give the laser an input voltage in the square waveform with a duty cycle of 20%, and I was planning to design a detector that will detect the average energy of the laser, but since the laser will be a vehicle (which means it will be moving) the light energy that it will send to the detector will change with time, so the detector MUST check its duty cycle, not the average energy.

This is the circuit that will generate a square wave with a duty cycle of 20%

The components we are allowed to use are:
+/-25 V output of DC power supply, any types of resistors,
capacitors, inductors, diodes, LEDs, LDRs, op-amps, transistors

So, any ideas on how to make a circuit that will be activated with an input that has a duty cycle of 20%?

Update:

Just wanted to let you know, thanks to your answers I managed to design something that works perfectly!

The LDR detects the laser and causes the first Op-Amp into positive saturation with the same duty cycle as the incoming laser, then it's low-pass filtered (thanks to @transistor and @helloworld922) and since the duty cycle I'm looking for is 20% I compared this value to see if it's lower than 3 Volts and greater than 2 Volts, and then summed the outputs of the comparators to see if both comparators are in positive saturation. I think this one should do quite well.


texts: DIY Laser Tag, Safety and Modulation questions

texts:
So I'm trying to build a Laser Tag game for some friends, I was wondering a couple of things

Safety - I'm using 5mW red lasers from Aliexpress. I have no datasheet for the lasers, so I was wondering if there was any way for me to be sure that they're safe for use, even though a cursory google says it'll probably be fine. I plan on driving them with a uln2803/generic darlington pair driver and a 9V battery, along with an attiny/arduino/atmega8.
The other alternative would be to use IR and some sort of lens system, but that might be more expensive since I don't know where I'd be able to buy appropriate lenses.
Is there any way for me to modulate the laser output? I want it to be a team based game and to prevent team kills - I thought I'd modulate team specific codes, like how TV remotes work. Is this doable? I don't know much about modulation.


texts: Using Teensy 4.0's Serial, SerialUSB1 and SerialUSB2

texts:
I see that Teensy is capable of triple USB serial, Although I am not sure what that means. I assume that I can transmit data over one serial while using the other serials for control/command messaging?

How does this show up on windows, it still looks like one COM port
How do I see messages from SerialUSB1 and SerialUSB2? The print statements from both seems to go into void. Whereas the ones from Serial shows up on the serial monitor (From Arduino IDE)
Is there a good documentation that i could follow to understand parallel serial usage.
What are the designed use cases for all the new modes available on Teensy 4.0


texts: How do I find the open circuit voltage of this circuit?

texts: I'm trying to find the Thevenin equivalent of the following circuit, but am unsure of how to find the Thevenin voltage/open circuit voltage. Can I just find the voltage across the current source and the voltage across the 4k resistor and add them together to get the open circuit voltage?


texts: RSPi and dedicated expansion board to read real time data?

texts:
I am looking for guidance and advice on how to real-time read values from the diagnostic port of my motorbike (CAN-BUS), using a Raspberry Pi ZERO W and a dedicated expansion board, designed ad-hoc:
https://www.amazon.it/gp/product/B07PQJMFVP/ref=ppx_yo_dt_b_asin_title_o02_s01?ie=UTF8&psc=1

The final goal is to log data on an SD card, on board of the RSBPi.

Is real-time reading technically doable?
Has anyone else attempted that already?
I am completely new to this, so what are the crucial things I should consider and do to get at least a basic data streaming on the RSBPi?
What "fatal error" should I avoid? I am afraid to damage or corrupt the ECU of the bike, expensive and most importantly crucial for riding.

Thank you for dedicating your time to my question as well as for any input you might be willing to share.


texts: Using low-voltage halogen transformer for LED?

texts:
During a recent kitchen renovation, the electrician installed LED under-counter "pucks" and drove them with a 120VAC-to 12V, 40 kHz transformer labelled "low voltage halogen supply."  I'm fully aware that LEDs are happy operating at 40 kHz (one transformer blew & I have to replace it), but is there any reason to change the driving frequency?  Obviously, if I were to change, I'd stay above 100Hz or so to avoid any visual flicker, and there may be a complete death of commercial devices at other output frequencies.

FWIW, the 40kHz drivers cause two minor problems: AM radios nearby are not happy, and the fancy circuitry in my exhaust hood's lighting system tends to flicker (even though normally turned off) when the LEDs are on.  I'm guessing a low-frequency LED driver might mitigate these side effects.


texts: Is it generally OK to ignore the current in and out of a MCU pin when analyzing circuit external to the MCU?

texts:
From here, I see below illustration about the pull-up resistor.

And the article says:

With a pull-up resistor, the input pin will read a high state when the
button is not pressed. In other words, a small amount of current is
flowing between VCC and the input pin (not to ground), thus the input
pin reads close to VCC.

It gives me an impression that the current in and out of a MCU is so small that it can be ignored when analyzing the behavior of the circuit external to the MCU.
Such assumption may simplify things a bit. But is it OK?


texts:
I am studying a circuit which will charge a capacitor till using a voltage doubler till it reaches a specified voltage value. Then it will discharge through a resistor. An SPDT switch is realised for this function using 2 SPST switches. A behavioral source is used to control these switches. But the simulation is getting stuck when this switching is about to happen. Any idea why this is happening

Version 4
SHEET 1 2296 680
WIRE 400 -112 80 -112
WIRE 656 -96 640 -96
WIRE 400 -48 400 -112
WIRE 656 16 656 -96
WIRE 400 64 400 16
WIRE 400 64 320 64
WIRE 496 64 400 64
WIRE 512 64 496 64
WIRE 640 64 576 64
WIRE 768 64 720 64
WIRE 848 64 768 64
WIRE 1024 64 928 64
WIRE 320 80 320 64
WIRE 400 80 400 64
WIRE 1024 80 1024 64
WIRE 80 96 80 -112
WIRE 496 96 496 64
WIRE 768 128 768 64
WIRE 320 208 320 144
WIRE 400 208 400 144
WIRE 80 224 80 176
WIRE 1472 224 1472 192
WIRE 496 288 496 160
WIRE 768 288 768 192
WIRE 768 288 496 288
WIRE 1024 288 1024 160
FLAG 80 224 0
FLAG 400 208 0
FLAG 320 208 0
FLAG 1472 224 0
FLAG 1472 112 Vc1
FLAG 864 16 Vc1
FLAG 912 16 0
FLAG 768 64 Vout
FLAG 1360 192 0
FLAG 1360 112 Vdc
FLAG 1024 288 0
FLAG 768 288 0
FLAG 576 -96 Vc1
FLAG 704 16 0
SYMBOL voltage 80 80 R0
WINDOW 123 0 0 Left 0
WINDOW 39 24 124 Left 2
SYMATTR SpiceLine Rser=100
SYMATTR InstName V1
SYMATTR Value SINE(0 220 60)
SYMBOL cap 384 -48 R0
SYMATTR InstName C1
SYMATTR Value 30pF
SYMATTR SpiceLine Rser=0.1
SYMBOL diode 512 80 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D1
SYMBOL diode 512 160 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D2
SYMBOL cap 752 128 R0
SYMATTR InstName C3
SYMATTR Value 100n
SYMATTR SpiceLine Rser=2
SYMBOL cap 304 80 R0
SYMATTR InstName C4
SYMATTR Value 30pF
SYMATTR SpiceLine Rser=0.1
SYMBOL cap 384 80 R0
SYMATTR InstName C2
SYMATTR Value 30pF
SYMATTR SpiceLine Rser=0.1
SYMBOL res 1008 64 R0
SYMATTR InstName R1
SYMATTR Value 1Meg
SYMBOL bv 1472 96 R0
SYMATTR InstName B1
SYMATTR Value V=if(V(Vout)>V(Vdc),5,0)
SYMBOL voltage 1360 96 R0
SYMATTR InstName V2
SYMATTR Value 145V
SYMBOL sw 944 64 R90
SYMATTR InstName SW3
SYMATTR Value S3
SYMBOL sw 736 64 R90
SYMATTR InstName SW1
SYMATTR Value S3
SYMBOL Digital\\inv 576 -160 R0
SYMATTR InstName A1
SYMATTR Value2 Vhigh=5 Vlow=0
TEXT 48 248 Left 2 !.tran 300 startup uic
TEXT 592 392 Left 2 ;.step param C LIST 100n 1u 10u
TEXT 592 432 Left 2 ;.meas TRAN t9 FIND time WHEN V(Vout)=145 TD=0 FALL=1
TEXT 592 464 Left 2 !.model S3 SW(Ron=125 Roff=1000000G Vt=2.5 Vh=-1.5)


texts: what is the typical 64Vdc or 72Vdc Interface relay coil and contact resistance values at no load?

texts:
I would like to draft an ITP to check interface relays used to transmit signal to a SCADA by checking the coil & contact resistance and be able to put a pass/fail criteria say 20% above the typical coil and contact resistance values then replace and disregard the existing component to ensure reliability of the asset.
Appreciate if anyone can provide a typical values of coil and contact resistance for a 46 - 74 Vdc interface relays.


texts: What's this symbol (- capacitor with wire through the middle?)

texts: I've occasionally come across this symbol which appears to be a capacitor with a wire through the middle - but I've never seen it on anything where I could physically get a look at what component it corresponded to, and I've never seen it defined in a list of component symbols. Have a look at the first schematic here and look at the earth rail - you'll see what I mean. It's always puzzled me - can anyone shed any light?


texts: Logic Level Converter (3.3v  5.0v) returning HIGH for Low Volt. & High Volt. sides when nothing is plugged in. [Raspberry Pi]

texts:
The Goal

I have a Raspberry Pi that I'd like to control my treadmill with. The Pi's GPIO ports output 3.3v and the treadmill's motor control board only takes 5v signals. Because of that, I bought a bi-directional logic level converter.

The Problem

You can imagine how bad it would be if I hooked up my Pi to the treadmill, and off-the-bat, the treadmill is receiving a solid 5v to the speed wire. I want to avoid that.

I've hooked up the LV to 3.3v and HV to 5v and attached grounds on both sides of the logic level converter. Now, right off the bat, touching my multimeter to Ground + LV1 shows 3.3v. Worse, touching HV1 shows 5v (meaning the nightmare scenario would have happened if this was plugged in.)

I recorded a video of me touching different parts of the converter and saying the results.

Things I've gathered this far.

If the Raspberry Pi's GPIO is not explicitly programmed to output a HIGH or LOW signal, it becomes like an "antenna". I've learned luckily that setting a pin explicitly to LOW and plugging it into LV1 will output 0v on HV1. The problem is that the Pi takes time to boot and launch my program, so I fear if a restart were to occur, the treadmill would receive full 5v to speed for 30 seconds while it booted.

Extra details

For this project, I have four wires I'm connecting from my Pi to the Treadmill: Incline Up, Incline Down (both take a solid 5v signal to activate), Speed (PWM 5v signal), and a tachometer(?) wire (diagram said it could be used to track footsteps.) Of these 4 wires, 3 of them are outputs and 1 of them are inputs.

Any advice is appreciated, thank you for reading this far!


texts: Transceiver IC SN74LV245A at different voltage levels pull up resistor require for current improvement

texts:
I've gone through  datasheet of IC Page number 12 Figure 5 shows typical application of IC which is 5 to 3.3V compatibility.

In my design My sensor Output is 1.5V to  2.2V so we're planning to have 2V supply. Now for latching 8mA current from IC with input of 1.5V I want my Output to be 2V.

What I could understand from Recommended Operating Conditions from Page 6 Section 7.3 is High-level output current at 2V is -50uA please guide us whether having pullup resistor over here will work or is there any alternative part available or this.

Thanks


texts: Permittivity measurement using open-ended coaxial probe

texts:
I am trying to understand how the complex permittivity of liquids can be measured using an open-ended coaxial probe.
For this kind of measurement, we put a open-ended coaxial line into the liquid under test, and using a VNA, the reflection coefficient is determined and from this, the permittivity can be found.

The load impedance at the end of the coax is
$$Z = \frac{1}{j\,\omega\left( C_0\,\epsilon_r + C_f \right)} $$
where \$C_0\$ is the capacitance of the open-end of the coax probe, and \$C_f\$ is the fringing capacitance.
How is it possible to find \$C_0\$ and \$C_f\$ from the measurement of open, short and a known dielectric?
(I got this formula from here: https://stacks.cdc.gov/view/cdc/10047/cdc_10047_DS1.pdf)

A one-port measurement on a VNA has 3 error terms (directivity, tracking and match), so we need to perform 3 independent measurements for the calibration of the VNA. But in this case, we have two additional unknowns, \$C_0\$ and \$C_f\$. So one would expect it is required to perform at least 5 independent measurements for a calibration.

So I assume that the manufacturer of a dielectric measurement kit has a model of the coaxial probe which provides the values of \$C_0\$ and \$C_f\$. Is my assumption correct?


texts: I can't determine the value of diode zener

texts: I can't determine the value of this Zener diode. The marking is KD H2.


texts:
I'm building a MIDI IN to serial port RX cicruit (for Raspberry Pi, or Arduino, or anything else...) using a 6N138 optoisolator.
But I find many different circuits, I don't know why there are so different, and which one to choose:
Are these correct?

First, this one with a 470 Ohm and 1KOhm resistor

(source: electro-tech-online.com)

Another, with respectively 1KOhm and 3.3KOhm resistor

(source: dernulleffekt.de)

The official one on midi.org, with different resistor values, but not based on 6N138...

http://www.midi.org/images/midihw.gif
Last thing (maybe off topic here): If I want to connect to Raspberry Pi's GPIO's RX, should I use 3.3V for the optoisolator instead of 5V, to prevent breaked with GPIO's RX?


texts: 1000:5 current transformer: how to calculate burden resistor?

texts:
I want to calculate burden resistor for a 1000:5 current transformer. I want to output 5V variation. How do I calculate this burden resistor?

I using burden resister 220orm .this is out put .input primary 20A and out vmax 43.2 and freq 50.


texts: What would be the best way to connect to a 3x2 group of solder pads? I created my own 3x2 connector (pardon the poor soldering), but there must be a more off the shelf way? I haven't been able to find anything. Anybody have any ideas? Images below


texts: Communication between three atmega controller

texts:
I am using three micro controllers mainly for printing, ADC and one main controller for controlling all. Between these controllers only 2 pins are shared commonly. So, there is possibility that communication might be using 2 wire protocol (I2C protocol). How to check weather these pins are SCL and SDA?

I cant check with probing DSO because there is some problem with display so I cant touch any key ( its not getting sensed ). By default, these pins are at Logic High state.But, since display is not sensing, i am totally unaware about interfacing protocol between these controllers.

Is there any other way to check this? According to me,checking with DSO is not possible in my case.

Please suggest any other way for checking interconnection.

Thank you in advance.


texts: Noise in a non-inverting op-amp configuration

texts:
I came up with this circuit:

With this setup \$V_{in}\$ is the thermal noise associated with \$R_1\$. I've been trough some calculation and I obtained this expression for the apport of the thermal noises to the spectral density on the output:

\$N^2_T=4K_bTG(R_1+R) \$
Where \$G=1+\frac{R_3}{R_2}\$ and \$R=R_3 // R_2\$ (parallel).

And the apport given by the op-amp:

\$N^2_{amp}=(i_NR_1G)^2+(i_NR_3)^2+(e_NG)^2 \$

So the net spectral density is the: \$N=\sqrt{N^2_{amp}+N^2_T} \$

I was wandering if my calculations were correct.

Edit:

First column is the source and the spectral density of thermal noise, the second one is the Gain Configuration and Magnitude. (Invertente stands for Inverting in Italian)


texts:
I'm working on a distributed real-time application, where 4 MCUs (PIC18F45k22) are connected to a network. The real-time kernel FreeRTOS is running on each of the four PICs, and all MCUs exchange data in real-time through the network (bus), in order to accomplish their functions (sensing, regulation, control, display etc...).

The PICs that I use do not include a CAN module, and I cannot get an external one (or any other real-time communication protocol module). The only solution is to use I2C bus, which is not designed for real-time communication.

In order to improve my communication protocol, I'm trying to implement (in software) some algorithms that can manage message scheduling through the bus using I2C arbitration, and also implement error detection using CRC, and I really don't know where to start. I'm not even sure if this solution is valid for a real-time application.

Does anyone have an idea or advice? Is this solution valid? If so, how can I implement CRC (how to choose the appropriate polynomial)?


texts: Understanding what is meant by the magnitude of an Op-Amp's gain?

texts:
A particular problem I've been given shows two Op-Amps, which can be seen below:

I'm asked to compute the magnitude of the gain. Not being quite sure what this means, I decided I'd figure out the gain of Op-Amp (a) and then just use that as the "magnitude". Both op-amps supposedly produce an "equal" output signal - I chose A because it has no missing values

Computing the gain
Op-Amp (a) just looks like a simple op-amp to me. I can derive gain as follows:

\$I_{feedback} = \frac{V_{out} - V_{in}}{10000}\$
\$I_{input} = -I_{feedback} = -\frac{V_{out} - V_{in}}{10000}\$
\$\frac{V_{out} - V_{in}}{10000} = -\frac{V_{out} - V_{in}}{10000}\$, \$V_{out} - V_{in} = -V_{out} + V_{in}\$, \$2V_{out} - 2V_{in}\$, \$2V_{out} = 2V_{in}\$, \$\frac{V_{out}}{V_{in}} = 1\$

Magnitude of the gain
Here is where I find myself stuck. The gain isn't apparently the magnitude, and the correct answer has units Ohms. What could magnitude mean in this respect?

Why is this the case? Is their some special meaning to magnitude in this respect?

Edit
I'm adding a sensor mentioned before which may have been needed (I didn't think it was relevant to the question originally)


texts: UHF RFID: Why are read range (forward) and backscatter range curves different?

texts:
I have made two measurements with a UHF RFID tag (pic below)

My test setup consists of a reading device with a sensitivity of -70dBm and an antenna gain of 6dBi. I made a frequency sweep across 700 - 1200MHz bands, the device sends a query command (ISO 18000-6C/ISO 18000-63) at increasing power levels (power step = 0.1dBm up until 30dBm ERP) until the transponder responds. Path losses have been measured beforehand so after this frequency sweep, the read range and the backscatter range can be calculated (see figures below).

Now as far as I understood, the actual read range is limited by the lower value, in this case the actual read range would be the forward read range depicted in figure 1. I was able to verify this (with small differences in actual range) with a different reader setup.

What I do not understand is why the curves are fundamentally different. I would have expected them to be at least a little similar. There appear to be two resonance points in figure 1 while there is only one in figure 2.

Another point to consider is that plywood and the PVC plate seem to have a strong detrimental effect on the reading range even though the permitivity of those materials should be closer to 1.

Edit: There seems to be a smaller, rectangular loop on the tag, is one of the resonance points appearing because of that?

Edit#2: Read range forward and read range reverse (backscatter range) habe been calculated as follows (Path losses have been measured beforehand):

Power on tag (forward link)

Read range:

With: Pmax,EIRP = 3.28W

Effective backscatter power of tag when answering to a command:

Backscatter range:

with

Read range for DogBone NXP UCODE7 label:


texts:
I'm working on a project that needs a CIS sensor
All I can understand that this sensor output an analogue signal that I take on ADC & store the data & process on it .
I will use this ROHM module http://www.rohm.com/products/module/image_sensor_head/ .
Also after searching  I found a lot of chips for the analogue output processing like LM98714  , do I really need one of these or I can just use ATMEGA 8 ADC ??

Thanks in advance .

Please if you need any information mention me .


texts:
It seems that the world has decided that std_logic (and std_logic_vector) are the default way of representing bits in VHDL. The alternative would be std_ulogic, which is not resolved.

This surprises me because usually, you're not describing a bus, so you do you don't want multiple drivers and you don't need to resolve a signal. The advantage of std_ulogic would be that the compiler warns you early on if you have multiple drivers.

Question: is this just a cultural / historical thing, or are there still technical reasons to use std_logic?


texts: Is it ok if lead acid battery charge with too low current?

texts: I have a old dead lead acid battery with two cell and i refine it by adding distilled water. Before adding water battery's nominal voltage is 2.30V and when i connect it to 5V charger which have rating of 5V/1A battery shows charging voltage and current of 4.15V/135mA.Is this charger is too slow or its ok that voltage drops while charging?i think battery might chage beacause current flows !!!


texts:
I have a design project for my electrical engineering class where I'm designing a signal tracer akin to Tripplett's Fox and Hound series.

For a reference, I tested the output of a commercial tone generator to see what kind of signal I'd need to generate for it to be received by the handset and found a 40 VPP square wave(well above the 3V from the batteries) so I assumed there must be a transformer. I opened the case and identified a tiny little transformer, about a 1 cm cube.

I tested my own generator with a standard power transformer with a 1:10 ratio and it worked fine, but it's rather bulky for something that could be much smaller. Unfortunately, I'm not sure what I should be searching for.

SMPS transformers all appear to be rated for 40khz or more, and I'm only outputting 2khz. Is it just a custom wound thing? If not, what should I be looking for on digikey/mouser?

The picture isn't very good, but it only has 2 leads per winding, no taps.

I'm using 9v rather than 3v input, so I need about a 1:5 ratio...


texts: Adapter to plug home audio system speakers into computer

texts:
I'm wondering if there is an adapter I can use to plug two speakers that came with my home audio system into a laptop. My laptop has an auxiliary port (not sure what the technical name is) that I plug my headphones into so ideally I would like to use that for these speakers also. I wasn't sure how to title my searches when I researched this due to not knowing what the speaker extensions are even called, but I tend to assume there is an adapter for everything these days! The impedance is 8 (not sure if this matters). Ultimately, the stereo itself doesn't work, but the speakers do so I'm trying to figure out if they're worth salvaging.

The model of the system is Sony MHC-EC619iP. The speaker extensions have two adjoined "prongs" that plug into the back of the system under "Left" and "Right".


texts:
This is a non-inverting first order low pass filter.

The cut of frequency= 1591.5 Hz

The input frequency = 264.2 Hz

The input voltage = 1.5 Vp-p Sinewave

simulate this circuit – Schematic created using CircuitLab

According to this equation:

Af = 1+ R2 / R1

Af = 2

voltage gain Av at 264.2 Hz and 1.5 volt is 1.97 volts.

Output voltage = 1.5 * 1.97 = 2.95 volts.

I tried to measure thes values:

The output voltage is only 1.431 volts!! and a distortion happened to the wave form. Why does that happen?

Thank you very much,


texts: I want to make a adapter from a vehicles 24v to a 5v usb phone charger. Can I simply connect the wires from a cigaret lighter jack to a usb and add a resister in between (using a voltage divider)? If so does it matter how strong the resistors are (assuming the ratio is correct?


texts: Arduino Hangs when Connected to 220V Supply

texts:
Product Used - 12V 4 in 1 Relay Board (got it from eBay), Arduino Duemilanove, Ethernet Shield.

AIM - Control my Room Lights with Arduino. (Home Automation)

My Connection - Arduino is connected to ethernet shield as usual. Arduino is powerred with my Desktop PC. Relay Board is powerred with a 12V External supply and it's ground is connected to the GND Pin of Ethernet Shield.
Light Bulb is connected to 220V supply and Relay 1 (of relay board) is connected as a Switch of Light Bulb (Using NO and COM Pins)

Problem Description -
All my circuit is working fine. But,
When I turn ON/OFF just me Relay Board (With 220V supply connected) everything works fine. But when I connect a Light Bulb  running at 220V and try to control it with my Relay Board. It just turns ON once or twice, then my Arduino Hangs or Resets.

I have to turn off and restart my arduino to make it run back again.

Why is this Happening ?

I am using this Relay Board =>

Based on the image of the board and the described components the schematic should be like this

There is only a small ceramic cap that I see on the board image (lower right corner) but I'm not sure where it is connected.
Note that the schematic shows only one of the four relays but the circuit of the other three is identical to the one shown.


texts:
I need to develop mathematical equations (models) to represent the I-V characteristics of a Zener Diode, Signal Diode and Rectifier Diode. I have done research and I've only been able to come up with Shockley's diode equation which gives the I–V characteristic of an ideal diode.

What would the mathematical models for these three diodes be?

After additional research, it seems as though what I've been looking for are piecewise equations to model the diodes behaviours.

For example:

http://www.mathworks.com/help/physmod/elec/ref/diode.html

Any suggestions on what the equations would be?
Thanks!


texts: Suggestion for a GPS module with helical/omnidirectional antenna

texts:
I'm looking around for a decent GPS module for a project of mine. The Sparkfun GPS Buying Guide is nice, but focuses mostly on modules with patch antennae.

My project is a wrist- or upper-arm-mounted GPS logger. It will be displayless and log continually, and thus there can be no assumptions about the orientation of the device (as there probably could be if the user were to read a display). As far as I've understood, this means I should go for a helical antenna instead of a patch one for better omnidirectionality. Is this correct?

If so, does anyone have any recommendations for a decent (and decently priced) GPS module with a helical antenna? An antenna-less module with a third-party antenna is also possible, but I'd prefer a complete module. The last time I looked into this a few months ago, the most interesting device I found was the Falcom FSA03 based on the u-blox UBX-G5010. I also see there's a UBX-G6010 based FSA03-LP out now. Does anybody have any experience with these?

Edit: I've also been hearing about PCB loop antennae. Any experiences with those? From what I've understood, these are often used in cellphones...

I don't have very specific requirements, but the size should be small. I'm not looking for the tiniest of the tiny, but it shouldn't be bulky either - this is vague, I know, but I'm looking for something suited to a small wrist-mounted device. Low power consumption is important. And of course, the more reasonably priced, the better.

Thanks in advance for any recommendations!

Conclusion (in case anybody comes across this at a later point): I went for a u-blox LEA-6H module ($50 on eBay) and a Sarantel SL1300 antenna (€10 at Mirifica). I haven't had the time to try things out yet, but it seems to be exactly what I need.


texts: VHDL: Use a type, dependent on entity generics, for other entity ports/generics

texts:
I'm trying to design a memory emulation entity for simulation. To make it as versatile as possible,
it uses generics to define data and address widths. Additionally, one should be able to supply an
initialization memory image via a third generic:

entity memory is
    generic (
        DATA_WIDTH : positive;
        ADDR_WIDTH : positive;
        INIT_DATA  : image_t
    );
    port (
        [...]
    );
end memory;

Where image_t would look something like this:

type image_t is
    array(0 to (2 ** ADDR_WIDTH - 1)) of
    std_logic_vector(DATA_WIDTH-1 downto 0);

But where could I possibly define this type? Entities don't have an is ... begin block like
architectures that could be used. After reading another question on here,
I've pondered on using a generic package:

package memory_pkg is
    generic (
        DATA_WIDTH : positive;
        ADDR_WIDTH : positive
    );

    type image_t is
        array(0 to (2 ** ADDR_WIDTH - 1)) of
        std_logic_vector(DATA_WIDTH-1 downto 0);
end package;

This just moves the problem one level deeper though, because I can't find a way to instantiate
the package such that

it uses the entity generics (possible by instantiating it in the architecture head) AND
its contents are available in the entity declaration (possible by instantiating it on the file level, before the entity)

So it seems like a dead end. Is there any way (maybe using VHDL-2019) to do what I'm trying to accomplish?


texts: Can i replace op amp lna111 with amp lm324cd?

texts:
I'm pretty beginner here but I'm trying to implement this circular

The issue that I didn't find lm224  so i replaced it with lm324cd and I think it's not doing the same Electrical properties, this part taking charge of transmit electrical signals from over my head and transmit it to arduino, (Funny part) I can see electrical signal over my head, however I already done with this but it's seems that I've make some mistakes here, but I don't know really where.

This the full circular (I'm afraid that it's not helpful so feel free to ask any question)

This zoom on the electrods I put on my forehead.

And this for the signal electrods I put on my front head.

Edit:

As a sensor, the solid gel electrodes have high input impedance and low output impedance: what this essentially means is that current can easily pass through downstream to the rest of the circuit (low output impedance) but would have troubling passing upstream back to my temples (high input impedance). This prevents the user from being injured by any high currents or voltages in the rest of my circuit; in fact, many systems have something called a patient protection resistor for additional protection, just in case.
Many different electrode types exist. Most people suggest Ag/AgCl solid gel electrodes for use in EKG/EOG/etc applications. With this in mind, you need to look up the source resistance of these electrodes  and match it to the noise resistance (noise voltage in V/sqrt(Hz) divided by noise current in A/sqrt(Hz) --  of my op amps -- that is how i choose the correct instrumentation amp for my device. This is called noise matching, and explanations of why matching source resistance Rs to noise resistance Rn works can be found online like here. For my INA111 that I chose And i replaced with lm324cd, the Rn can be calculated using the noise voltage and noise current of the data sheet like:

A possible specific question:

Can I replace LNA11 amp with any other amp? if yes what should I change in my circular ?


texts:
Please read on..... this looks long but is entry level and easy

I have done many simple projects based on microcontrollers but have not considered power and required current(for circuit to work) calculations. But now as I was doing my another project i.e., "8051 microcontroller development board" on a perf board, I found that not all the functional blocks(16x2LCD, max232 for serial comn, ADC0848, relays, etc) can work at the same time with same power supply since the current required was not enough for all of them to work.

So to make them work I added additional supplies and they were working quite perfectly. But now I know I was missing some serious power and current calculations, I had to do before I solder them. These calculations are important when you are designing or making any commercial product and also to save world's energy.

So I decided to calculate the power in a simple 555 timer astable circuit. The astable 555 timer is as shown

Vcc=5V, R1=R2=1Kohm, C=0.1uF

To calculate the power consumed I could directly find it through the multimeter but I want to calculate the power theoretically from the manufacturer's datasheet info.

NE555 datasheet is here

What have I done?

We know that power is:

$$ P = IV = I^2 R = {V^2 \over R} $$

So

power at trigger pin = max voltage at trigger * max current at trigger
=2.2V(from the datasheet) x 2uA(from the datasheet) = 4.4μW
Output power = Max voltage time the current flowing through the load.
Let's say the output is connected to LED with a 1Kohm resistor
Maximum output voltage when high =3.3V(from the datasheet) and current = 4.3mA(say when LED is connected to the output).
So when the capacitor charges the output is high and when it discharges the output is low.
low voltage maximum output = 0.4V, so I will calculate the power at output for one time period and then multiply for any time I run the circuit.
power at reset pin : Here we assume that the reset pin is always connected to Vcc=5V so the maximum power = max voltage * max current
= 1V x 0.4mA = 0.4 mW
Power at control voltage = 0 since it is connected to a capacitor terminal whose other terminal is connected to ground.
I don't know how to calculate the power going into the Vcc pin. I know the functional block diagram and I dont think it's as simple as the voltage divider since the power has to be given to the opamp's, SR flip-flop etc.
Power dissipation in R1, R2 = (current through R1 or R2 squared) x (R1+R2)
while charging and discharging. Since the current through these resistors are varying, so I thought to calculate the average current through charging and discharging and then find the power dissipated in one time period and than sum the power dissipation for one second.
power at threshold pin would be negligble beacuse the max current flowing into threshold pin is 250nA(from the datasheet)
How to calculate the power at discharge pin

I would now like to ask

Are all my values taken from the datasheet right for calculations? Or did I take some wrong values?
Are my calculations right?
Assuming things are right with above question then how can I move further.. that is power calculations with microcontrollers etc.

Thanks in advance for spending your valuable time and bearing with me


texts: TL494 current limiting without current sense

texts:
Is it possible to limit the current without using current sense feedback in TL494??
The TL494 have two amplifier both of them sensed only voltage (12V_A & REF) from buck regulator and TL494 limit the current to 20A.
I could not see the current shunt or sensor not used for feedback.
I could not understand how the current limiting without current sense as a feedback?? This is used for battery charging application. input voltage 55VDC (P+ and P-).


texts: Electromagnetic pendulum (pulse movement)

texts:
I would like to make a cost effective (without using large circuit and micro controller and all) electromagnetic pendulum for my wooden clock (so the second wheel will move according to pendulum swings). So i found  a simple tutorial from this link (http://www.trainelectronics.com/Pendulum/article.htm). But unfortunately it's not swinging properly pulse wise. Can anyone figure out my problem like am I missing any components or need to increese battery power or coil turn something like that? Working solutions will get appreciated.

Note: I'm a beginner to electronics.
Here is my circuit details.

Battery - Duracell-2 (1.5 V)
Components used - As said in tutorial (You can see the circuit from tutorial link)
Coil - 500 turn (28 gauge)
Input voltage - 3V output voltage- 0.8 V (observed in multimeter)
Round neodymium magnet

Observed

The LED glows only when coil not connected to the circuit.

Expected Output

1. Swinging pendulum pulsewise
2. Blinking LED when magnet cross coil


texts: Append source code to flash image when programming an AVR

texts:
Is it possible for Arduino / ATmega / ATtiny when programming the device to attach the C source code at the end the machine code flash image? That way if I have the device, I can always retrieve the source code by reading flash memory.

Easiest way I can think of myself is some include-like statement at the end of the C-program that reads the source code from file and attaches it as data to the program. But I have no clue how to do that.


texts: Why double contact structure reduces resistance?

texts:
I am watching the video lecture here (at 58:11) and the professor explain why the double contact reduces the resistance by a factor of four. I watched it several times and din't get it. Could anyone explain more? To me the resistance of that wire section is R no matter it is driven by one or two sources.

Link: video here and lecture note here (page 34)


texts: How can I determine voltage and current limit of protoboard?

texts:
I have a project I want to wire up on a prototype board.  I know the peak voltage and current expected at each contact point.  But how can I tell whether the board can handle it?  If it can't then it will arc (too much voltage) or overheat (too much current) and ruin my work.

I haven't been able to find voltage or current ratings on any of these things.  But the spacing and cross-section of the plating varies significantly across designs, manufacturers, etc.  Here's what I have on hand:

Strip-board: I.e., perforated board with copper traces running across the rows of holes.  This is nice because I can use each row as a power bus and interconnect.  Except that I don't know how much current the traces can carry.  Does one commonly "proof" a strip-board by ramping current through a trace until it starts to heat, and then calculating the current capacity based on the heating rate?  (Another excuse to pull out the thermocouple!)  Or if I'm concerned should I just layer solder over the traces that are carrying significant current?  Or avoid these altogether?
Protoboard: Perforated board with solder pads around each hole.  Some are "through-plated" (meaning the conductive plating runs through each hole to the solder pad on the other side of the board).  I don't have to worry about current here because I'm making wire interconnects.  But I still have to worry about voltage: Those little solder pads are very close together, and at some voltage level the electricity will arc across them.  At what voltage level does one start to get concerned about arcing on this type of board?  Is there a reliable way to "proof" these boards for a particular voltage level?
Unplated perf-board: I.e., solid plastic with molded or drilled holes.  When in doubt I fall back on this: It has no conductors and everything is wired so I can ensure all conducting paths are sized, spaced, and insulated for the working voltage and current.  But, strangely, this is the most expensive board by unit area!  (Why?)


texts: Electrical Machines based on Electric Fields

texts:
Our teacher asked us this question during the lecture for Power Electromagnetics. We know that Electric Fields and Magnetic Fields are easily transformable into one another. And they are used greatly in various systems.

He asked us why is it that almost all the electric machines are still based on exchange of magnetic energy? Why isn't electric field used for power exchange and interaction through air gaps for a machine?


texts:
The 32-bit ARM SAM3X8E has 512KB ROM and 96KB of RAM onboard. This means that if I flash a binary to it that is, say, 400KB in size, and that consumes, say, 80KB RAM (max) at runtime, then that binary will "fit" on that MCU. However, I would not be able to flash an 800KB-sized binary onto the chip, nor would I be able to run a binary that consumes 1MB RAM at runtime. Makes sense.

Then there's the latest Raspberry Pi, sporting a 32-bit ARM A7 that has 1GB RAM on it (I couldn't find its ROM size). This has me wondering about what kind of voodoo and sorcery is at play with these ARM MCUs that are in the RPi:

Is the ARM A7 really that much more powerful (1GB vs 96KB?!?!) than the SAM3X8E?; or
Does the RPi have some kind of "supporting hardware" onboard that helps scale/extend the ARM A7 beyond its normal, KB-scale, capabilities?; or
Am I completely misunderstanding the A7's 1GB capability, and perhaps that 1GB is coming from a combination of the RPI's A& plus off-MCU memory, somewhere else on the board? In this case then I'm wondering what the RPi's MCU's ROM/RAM limits actually are, and why a SAM3X8E couldn't have been used instead.

Anyway I cut it, it just doesn't add up or make sense to me. How is one ARM product seemingly 10,000 times larger (memory capacity-wise) than another?!?


texts: How to Measure Power Consumption on Extremely Low Power Devices?

texts:
This might be old news in a half a decade or two but by today's means, I am referring to electronic prototypes and designs which would draw in a μA (uA) and even nA range of current.

Some recent MCUs, such as SAMD21 that I am using atm are armed with internal clocks such as ,always on, Ultra Low Power Internal 32kHz RC Oscillators which would draw only 125nA, and the whole microcontroller is capable of consuming only 6.2μA on STANDBY mode with a live RTC.

In these type of quiescent current and power consumption levels the smallest limitations in the internal machinery of bench measurement devices such as multimeters and oscilloscopes could add a fair bit of error to the overall measurement or even measure a flat out wrong value in situations like a different relay kicking in when changing the resolution from 6 to 8 decimal places accuracy on your multimeter.

What is the most precise method of measuring the overall quiescent current/power consumption for such applications?

Update:

As I mentioned in one of the replies, measuring low currents is hard but very possible, however, making conclusions on the integrated amount of current consumption to come up with numbers for the realistic over all power consumption is more what I had in mind.

I have bumped into some solutions such as wide range current to frequency converter, however the wide range in this application note is only limited to the max of 200uA and in my case, my max current can rise to milliamps when my radio is transmitting and could drop to as low as 3uA when the whole system goes to sleep.


texts: SQUID made of a Josephson Junction in parallel with two Josephson Junctions in series

texts:
Suppose I have a Josephson Junction (JJ) in parallel with two JJs in series.
If I have a voltage bias as in the diagram below.
First by flux quantization conditions I will get that $$ \varphi_1 - \varphi_2 - \varphi_3 = \frac{2\pi \Phi}{\Phi_0} $$ where $$\Phi_0$$ is the magnetic flux quantum and $$\varphi_i$$ is the gauge invariant phase difference for each JJ. By the second Josephson equation $$ \frac{d\varphi_i}{dt} = \frac{2e}{\hbar}V_{in} $$
By Kirchhoff's Current Law it must be that $$I(t) = I_1 + I_2$$ and so we get that $$I_1 = I_{c_1}\sin\varphi_1$$, $$I_2 = I_{c_2}\sin\varphi_2 = I_{c_3}\sin\varphi_3 $$. Suppose now I specify the bias voltage to be $$V_{in} = V_{DC} + V_{AC}\cos\omega t$$.
Then $$ \varphi_i= \frac{2eV_{DC}}{\hbar}t + \frac{2eV_{AC}}{\hbar \omega}\sin\omega t + \varphi_{i,0}$$.
Q1: How do I solve $$I_2= I_{c_2}\sin\varphi_2 = I_{c_3}\sin\varphi_3$$ and solve for $$I(t)$$ expression?
If I simplify the case to be that JJs 2 and 3 are identical then I get $$I_{c_2}=I_{c_3}$$ so then $$I_2 = I_{c_2}\sin\varphi_2=I_{c_2}\sin\varphi_3$$ which then implies that $$ \varphi_2 = \varphi_3 + 2\pi n \,\,\, (\star)$$ so it must be the case that $$\varphi_{2,0} - \varphi_{3,0} = 2\pi n, \,\, n \in \mathbb{Z}$$.
Q2: By substituting (*) in the flux quantization condition and getting the expression  $$ \varphi_3 = \frac{\varphi_1}{2} + \pi \left[ n -\frac{\Phi}{\Phi_0} \right],$$  can I then say that $$I(t) = I_{c_2}\sin\varphi_1 + I_{c_2}\sin\varphi_3 =I_{c_1}\sin\varphi_1 + I_{c_2}\sin\left( \frac{\varphi_1}{2} + \pi\left[ n - \frac{\Phi}{\Phi_0} \right] \right)$$ is the output current?
Q3: For the case of current bias, while the same flux quantization conditions and KCL, KVL hold but the voltage essentially is unknown I am not sure how to solve again the general case where $$I_{c_2} \neq I_{c_3}$$ and even in the simpler case $$I_{c_2} = I_{c_3}$$ I'm also not quite sure how to get to the governing ODE I(t).

Any help is appreciated, thanks!