texts: AC Dimmer circuit with MOC3021 & EL817 along with ESP8266 (NodeMCU)

texts:
Major two issues/question are here:

1) The challenge I am facing is, my interrupt is not working.

2) do I need to include a Heat Sink in this?

Hello, I am quite new to electronics and trying to build an AC Dimmer Circuit. Here is the schematics (First one of my life) I have draw to show the circuit how I connected.

And I am using a simple programming through Arduino IDE. Here is the reference you can check the code below.

void ICACHE_RAM_ATTR zero_cross_detect();

int triac_pin = 14;  // Digital output to TRIAC
int dimm_time = 8000;  // 8000 = 20% output power
bool zero_cross = 0;
void setup(void) {
  Serial.begin(9600);
  Serial.println("Power on...");
  pinMode(triac_pin, OUTPUT);
  digitalWrite(triac_pin, HIGH);
  delay(2000);
  digitalWrite(triac_pin, LOW);
  Serial.println("Power off...");
  delay(2000);
  Serial.println("Start dimming...");
  attachInterrupt(12, zero_cross_detect, CHANGE);

}

void loop() {
  if (zero_cross) {
    if (dimm_time < 9500) {
      delayMicroseconds(dimm_time);
      digitalWrite(triac_pin, HIGH);
      delayMicroseconds(200);
      digitalWrite(triac_pin, LOW);
    }
    zero_cross = 0;
  }

  if (dimm_time > 8800) {
    dimm_time = 9500;
  }
  if (dimm_time < 1000) {
    dimm_time = 1000;
  }

  if (Serial.available() > 1) {
    int getval = 10000 - (Serial.parseInt() * 100);
    if (getval >= 0 && getval <= 10000) {
      dimm_time = getval;
      Serial.print("Dimm to ");
      Serial.print(100 - (getval / 100));
      Serial.println(" %");
    } else {
      Serial.println("Wrong value!");
    }
  }
}

void zero_cross_detect() {  // If zero crossing is detected
  Serial.println("ZC");
  zero_cross = 1;
}

The challenge I am facing is, my interrupt is not working. I am using some wrong connection here? I have seen on YouTube and blogs lot of people are using 4N35 and even RoboDyn AC dimmer module uses 4N25. Can I use EL817 instead?

I am planning to do home fan speed control with this circuit.

One more question is, do I need to include a Heat Sink in this? And if yes. Then how do I calculate what size of heat sink should be used in this?

Thank you for help!


texts: wiring LED's in parallel - need series resistor?

texts:
I would like to confirm something I have inferred through my looking into LED wiring and also have a couple questions answered. For the sake of the examples below assume the source voltage is 5v; my LED's drop 3.2v and want 20mA.

I am going to be wiring some LED's in parallel to a pin on a TLC5940. The TLC is a constant current driver. If each LED wants 20mA and I'm going to wire 6 LED then I would set the TLC to have a constant current of 120mA.

I suspect that I also need to wire a resistor in series with each LED because LED's "effectively have no resistance" so to make sure the current balances evenly I need to throw a resistor in each parallel string. Is that correct?

A couple other questions; I'm still new to electronics so I think I still don't fully understand a couple basic concepts.

If I throw a resistor in series with each LED do I need to make the TLC draw more current to balance out the resistors; or do I just make sure that the resistor is smaller than 90ohms i.e. (5v - 3.2v) / .02A?

I set up a test where I had an Arduino board controlling the TLC chip and only one LED to a pin with the chip set to 20mA. The Arduino 5v pin was powering bot the TLC chip and the LED. The thing is my LED only wants 3.2v so there were 1.8v left over. So was my LED being over-driven with voltage, does that not matter so long as the current is correct, or does the TLC chip automatically sink any excess voltage while it does it's current limiting?


texts: Best way to handle switching supply minimum load

texts:
I am using a meanwell rid-85B switcher to power a legacy device that puts 3 kinds of load on the 24V supply.  at startup, 1A, and at steady state, 0.1A, occasionally 0A.   the specs on the supply want a minimum load of 0.3A on this supply, and 2A on the primary supply, which is 5V. my 5V load is 1A or 0A.

I can put a load resistor on each of the two supplies, 80 ohms for the 24V supply, and 2.5 ohms on the 5V, to guarantee these minimum loads to get good regulation.  that's 7.2 + 10 watts of waste heat I need to get rid of.

now for the question:  what would a simple circuit look like that could switch these resistors out when my real load is pulling enough current to keep the regulation in spec?  I'm thinking a relay, but can't figure how to make the current sense work.


texts: Feedback resistors not connected to boost regulator

texts: I was using a TPS65131 boost regulator and accidentally forgot to add feedback resistor R3. I noticed that my output negative voltage was -30 volts. I realised that there was no feedback and added the resistor R3. Now, I am not getting any negative output voltage at all. Is there any chance that if feedback resistor is not added, the IC can get damaged? The components are added as per the datasheet for +-15 volts.


texts:
I'm using stm32l100C6-A to communicate with gas gauge via I2C. My code tries to start I2C transfer, like this:

I2C1->CR1 |= I2C_CR1_START;
// waiting for EV5 - Master Mode Select
while( ! (I2C1->SR1 & I2C_FLAG_SB) );
<yadda..yadda..>

and sometimes it works, transfer is completed, all is well.
But some other times instead of full transfer on I2C lines I see this (SCL and SDA are in different scale):

As far as I can see - that's just a normal start condition. But I2C1->SR1 is zero, no bits are set, no matter how long I wait.

After that - making I2C reset via I2C1->CR1 |= I2C_CR1_SWRST; doesn't help, making full reinitialization of I2C doesn't help, resetting RCC for I2C doesn't help. Only full MCU reset helps.

Since full reset helps, the problem must be in the MCU but I couldn't find anything similar in the errata or internet.

I'm using I2C on 85kHz.

I have no idea what's going on and I don't like resetting MCU as a workaround. Any ideas?


texts: Does using a software delay() function have greater power consumption than using a System Timer interrupt?

texts:
I had a discussion with someone about using a software delay(), and how it just executes NOP commands for a specified number of clock cycles according to your delay, and thus is constantly running and consuming power. The alternative according to my reading is to use system timers. But, once these timers are enabled they also increment for the same number of clock periods so I would think the power consumption would be similar.

I wanted to know whether there is a difference in power usage between the two, keeping aside the fact that delay() blocks your program and stuff. Are there alternative delay methods that I'm unaware of as well that lead to better power consumption?

As there are too many variables to properly answer, I'll try and provide an example. The example task is to continuously display the number of seconds passed on a 7-segment LED display, wrapping back around to 0 once 60 seconds is reached. So I guess the goal would be to compare efficiency of a 1 second delay of using a function vs. SysTick IRQ


texts: How do passive boosters/repeaters (such as a HDMI 'booster') work?

texts: I have a HDMI device and I want to connect it to something very far away. I notice you can buy a HDMI booster to do this, but some of them are unpowered (they take no external power). How can a signal be boosted in this way without external power?


texts:
I want to charge 3x18650 batteries in series and for that, I want to use something like this to have a balanced charge.
Which power supply should I use to charge the system? It's hard to find a 12.6V power supply. Will a 12V supply work? And a 15V supply?


texts: How to determine current limiting resistor values for push pull amplifier driven by op amp?

texts:
I'm looking to increase the output current drive of a high voltage op amp using a push pull amplifier. The OPA454 datasheet includes an application circuit to do exactly this, and includes some current limiting resistors:

As noted, \$R_3 = 20\Omega\$ provides current limiting and allows the op amp to drive the output when \$|V_O| < 0.7\$V (i.e. both transistors are off). I understand that \$R_3\$ provides current limiting by stealing the op amp's output current from the transistor that is on. But how do I choose the value of \$R_3\$ to set the current limit to a particular value \$I_{\text{MAX}}\$ (e.g. \$2.5\$A)? \$I_{\text{MAX}}\$ doesn't have to be too exact, it just needs to be in the desired range (e.g. \$\pm 250\$mA).

Also, how do I choose the values of the emitter degeneration resistors \$R_4\$ and \$R_5\$? I know they are used to prevent thermal runaway by reducing \$V_{BE}\$ (and thus \$I_C\$), but I think they will also affect \$I_{\text{MAX}}\$ because they will affect the voltage across \$R_3\$.

The purpose of this circuit is to generate an adjustable output voltage from about \$0\$V to \$+100\$V with \$I_{\text{MAX}} \approx 2.5\$A. I've got dual but unbalanced supplies (not the \$\pm 50\$V shown) to support the output voltage range. Based on the suggested transistors in the above application circuit, I will probably use the MJ15003/MJ15004. Frequency response is not a huge concern since the output has milliseconds to transition.

I would guess that the relevant specs for determining the resistor values are the op amp max output current and transistor \$h_{\text{FE}}\$ (the former affects the maximum \$I_B\$, which is multiplied by \$h_{\text{FE}}\$ to set the maximum \$I_C\$), but is there anything else I need to take into account?

Alternatively, is there a better way to limit the output current for this push-pull amplifier?


texts: I am writing the on board accelerometer data to my SD card. I am using a STM32F407VG board. The data is being written and read. How can I measure or test the speed of reading and writing data to the SD card through STM32F407VG board?


texts: Trying to get readable value with Arduino/Thermistor setup

texts:
I'm trying to get a readable value from a thermistor. Right now it's printing 223.25 as my celsius value in my room. I know this is wrong. I'm using the thermistor model which is located HERE. The specific part number of my thermistor is called PANE102350 which you'll need when you look at the datasheet. It doesn't give very much information. I'm also trying to find the A, B and C coefficients but cannot find them on that datasheet. I believe my issue is with my code as my circuit is fairly simple. My code and circuit is shown below.

I have made the following changes to my code as Spehro Pefhany has indicated. I put in new values for A,B and C. I changed the Voltage equation as another person indicated. However now I'm getting a reading of 70 for celsius. Still doesn't seem right for room temperature. Here is another picture of the newly edited code. My circuit has stayed the same. I also did a Serial.print(adc_raw) and got a value of 108. I did a Serial.print(kelvin) also and got the value 344. I'm not for sure if these values are wrong but i'm assuming the kelvin one is because the celsius reading of 70 is wrong.


texts: Why is my circuit so incredibly sensitive to electric fluctuation?

texts:
I recently finished building a circuit showcased in a beginner’s electronics book. I have included the picture of my creation below because I think it may become relevant to the question.

At the beginning of the build process, the instructions specified to add a "smoothing" 100 microfarad capacitor to be placed right by where the power supply cables were connected to the board. I decided not to bother with that step because I was using a quality power supply so I didn’t think I needed that "smoothing" capacitor (big mistake).

It wasn’t long before I started experiencing weird and inexplicable odd circuit behavior and after a lot of troubleshooting and getting nowhere, it occurred to me to add the smoothing capacitor to the circuit. As soon as I added the capacitor to the circuit the problems went away, but I found myself wondering how is possible that such a capacitor mattered so much given that my circuits uses a measly 50 milliamps of total power and I have what I think is a reasonably good power supply (Rigol DP832).

To make matters more interesting, I decided to move the smoothing capacitor away from the center of the board off to one end of the board and to my surprise the problems began again. Why such a big difference just by placing the capacitor in a different place on the board?

I decided to add a beefier 8200 microfarad capacitor (that is 82 times bigger than the previous one) thinking that this would put an end to all my problems but to my surprise once again, that still did not fix the problem. I actually had to move the capacitor back to the center of the board to make things go back to normal.

That wasn't the only issue, even with the capacitor in "perfect placement", I tried to power a small mechanical relay by using the same power from the circuit and every time the relay triggered my circuit would “reboot”.

So the question is, are all circuits that sensitive to even the smallest change in electric fluctuation? Or is the problem due to my cheesy circuit prototyping skills and an inefficient breadboard?

The IC used in the circuit are:

NE555P (Precision Timers).
CD4026BE (CMOS Decade Counters/Dividers).


texts:
I want to select an output of 5 or 12 V with an isolated digital output control signal (Vcc 3.3V in the picture, 0 selects 5V, 1 selects 12V). Right now I have something like this:

Corrected version:

This works for one output, but when I replicate the circuit (sharing the 5 and 12 V between them), if I select, say, 5 V for one output and 12V for the rest, the 5V turn into 7V.

Should I add a diode somewhere to control backward current? Could the circuit be improved in some way? Maybe there is a better alternative? Mechanical relays are not an option and I'm far from being an expert.

Many thanks!


texts: Powering a 6-Pin DAC-08B035 LCD Inverter

texts:
i have an old LCD Panel(N141X6 -L01) from a Fujitsu Siemens laptop and an inverter(DAC-08B035) for it. Before connecting the whole thing to a raspberry pi(and buying the necessary controller board), I want to test the inverter(and the backlight of the display). The inverter has a 6-Pin connector with

white
grey
dark blue
blue
green
yellow

cables. I tried to figure them out myself, but I didnt find any documentation for this board nor anything useful. The white and the grey ones are doubled and there is a fuse(transparent thing with a thin copper wire in it) attached to them. They also have the widest road on the PCB. The dark blue one is going backwards under the connector and coming out there. The blue one goes up and the green and the yellow ones seem to be doubled, too.
I will be happy to hear your thoughts! Thanks!

EDIT: Updated the images


texts: How would I use the same component arrangement for each instance of a sheet symbol?

texts:
I'm designing a PCB using Altium. I am a beginner and I'm using sheet symbols to design 6 identical circuits.

Making a billion circuits with identical schematics is easy, but in order to make the PCB layout of each instance of the circuit also identical I have to repeatedly arrange the components in the exact same way manually.

Is there a way to avoid placing manually the components from each sheet symbol in an identical arrangement over and over?


texts: Heat-shrink tubing available as a roll like adhesive tape?

texts:
Many people who have used heat-shrink tubing have probably experienced this: you forgot to insert heat-shrink tubing before soldering, and now it's too late!

Indeed, once the soldering is done:

you can't pass thin tube because of the connectors on both ends (example with a Macbook charger connector):

you can only pass a large-diameter tube (because of the large connectors), but then the shrinking factor doesn't allow the heat-shrink tube to "fit" on the wire!

Question: is there something available as a roll like adhesive/electrical tape (so that you can wrap some around the middle of a cable without having to "pass" it around the large connectors on both ends of the cable, see for example this video) that would shrink with heat and be like traditional heat-shrink tubing at the end, i.e. a bit solidified/glued by heat?

TL;DR: is there a mix between heat-shrink tubing and adhesive tape?


texts:
I'm putting together a guitar pedal for splitting the signal to two different amps. One of the features I want to put in is a 'ground-lift'; isolating the signal to avoid ground loops between the two different loads.

The traditional way to do that is with the following simple method: a suitable transformer...

simulate this circuit – Schematic created using CircuitLab

However, I don't know how much I trust the transformer to not colour the signal, and I don't mind doing a bit of over-engineering to avoid using one.

I'm more trusting of op-amps and AC-coupling using series capacitors, so I figured the following might be a good workaround:

simulate this circuit

The load-side of the AC-coupling capacitor is biased by an supply isolated from the source and fed into a buffer.
Is there any reason this wouldn't work the way I think it would?


texts: What can cause a lab DC power supply to become an AC power supply?

texts:
The other day, at university we were mounting a circuit for test. When switched on, it didn't work (nothing surprising yet).

After looking for what was wrong for a while, I measured the DC power supply (configured for simmetric +- 10 V) with the oscilloscope between GND and the positive terminal (and also between GND and the negative terminal).

For both cases I got a 20 Vpp sinusoid at 50 Hz (line / utility / mains frequency). I measured the power supply disconnected from the rest of the citcuit with the same result.

Another scary thing is that the multimeter shown +10 V and -10 V (it should be 10/sqrt(2) V for both terminals).

The workaround was to move to another bench with another equipment and continue the exercise, but I'm curious about what can cause this effect.


texts:
This is a real odd thing I have here.

I picked up a PIC16F628 this morning to play with, and I am having a very strange issue with it.

I have written a very simple program which should light 2 LEDs in this sequence: (* = on, o = off)

RA0 RA1
 *   o
 *   *
 o   *
 o   o

But what actually happens is:

RA0 RA1
 *   o
 o   *
 o   o
 o   o

When RA1 turns on, RA0 turns off.

The exact same code run on an '84a works perfectly.  Snippet:

loop
    BSF     PORTA,0
    CALL    delay
    BSF     PORTA,1
    CALL    delay
    BCF     PORTA,0
    CALL    delay
    BCF     PORTA,1
    CALL    delay
    GOTO    loop

My only thoughts are that it has something to do with the comparators that share the pins (should be disabled by default) which I have tried manually disabling but it has had no effect.

Now, one more thing to add confusion...  If I send absolute values to PORTA (0x01, 0x03, 0x02, 0x00) it works correctly.  Why should the bitwise operations work so strangely?

Oh, and I don't have any issue at all working with PORTB - only PORTA.

Any clues or ideas? Because I have run out.


texts:
In my job, I frequently compile a rough rundown of the power consumption of simple industrial plants. Here, you always encounter a "synchronism" factor, besides how many motors of which power and which expexted run-time (min/h). The rest I understand, but how is synchronism defined and how do I find it?
Our EEs are notoriously hard to catch, so I ask here.


texts: how to connect two grove 6-axis accelerometers in the same i2c bus?

texts: I am using Grove 6-axis accelerometer and gyroscope based on LSM6DS3 chip. It is possible to have  two addresses (0x6A,0x6B) by setting the SDA line high or low as per LSM6DS3 datasheet but how to do that so that i can use two sensors at the same time in the same i2c bus?


texts: Help identifying component with top marking C3008

texts:
Need community help in order to identify component in the photo. Already searched on the Texas Instruments site, but couldn't find it. It's a 40 pin device.
It's a power management IC on a ps vita 2000. Chances are this has been a custom made ic?


texts: I would like to make a low-battery cut-off ciruit with a P-MOSFET. How can I modify this circuit to be good?

texts:
I would the following:

When the LM358 non-inverting pin voltage greater than 1.00V then the batteries are empty and the output go high. I would like to turn the P-MOSFET off, but its not nowrking now, because the LM358 can't go as high as the source of the mosfet.

How can I modify it, when the battery voltage drops below 10V, turn the P-MOSFET off?


texts: Is quality of VGA Horizontal and Vertical sync Pulse relevant to be able to display on sensitive projectors

texts:
I am currently trying to diagnose a VGA problem on hardware A. Hardware A has some trouble sending display to certain projectors (while it is able to send display on most LCD monitors).

Hardware B connects successfully on both projectors and monitors (Nvidia quadro 2000).

The question here is : could there be a link with the spikes I see on both horizontal and vertical sync pulses of Hardware A and the fact that Hardware A has more problems with certain projectors ? Hardware B seems to have a much clearer signal.

Also, does Horizontal and vertical sync pulse need to align (at both beginning and end of a vertical sync pulse). I see here that Hardware B aligns perfectly, but Hardware A shows a 800 nsec delay.

Vertical sync pulse and horizontal sync pulse - Hardware A

Vertical sync pulse and horizontal sync pulse - Hardware B


texts: Why currents in the circuit of BJT change like that?

texts: Why don't the currents in those two circuits change the same way when I change voltage of the voltage sources?


texts:
I need to sweep Tox parameter in ngspice (BSIM level-54), but I found that there is no such parameter as Tox. Instead I need to play with Toxe, Toxp and Toxm. I tried to control these in my code, but it gives error: no such parameter.

e.g.

Mp1 vout va vdd vdd pmos l={len} w={wpmos} toxe = {oxidelen}

Error on line 49 : mp1 vout va vdd vdd pmos l=     4.50000000000000059e-08   w=    2.50000000000000020e-06   toxe=    1.00000000000000002e-08
unknown parameter (toxe)

I have also gone through the previous post "Dependency of gate oxide thickness in leakage" in which the author had changed Toxe, Toxp and Toxm in the model card itself.

Is there any way by which I can sweep Tox directly from my code?


texts:
So I designed a PCB which consists of an atmega328 controlling a digital potentiometer (MCP4131) using SPI. I stupidly connected the pot's i/o to the MISO (master in, slave out) pin on the arduino instead of the MOSI (master out, slave in) pin. The SS and SCK pins are connected correctly. Needless to say, I haven't been able to make the pot behave as it should, because i can't get the arduino to talk to it.

I tried going into the Arduino SPI library and, in the function begin(), changing the line

pinMode(MOSI,OUTPUT);

to

pinMode(MISO,OUTPUT);

But, this doesn't do the trick. On my scope, I can see the bits being sent when the pot is hooked up properly (on my breadboard). If I could rip up the trace on my PCB and solder a jumper to the right pin on the arduino, that would be a fine workaround. But I'd rather be able to do it in software.

I don't have much experience with SPI. I'm currently researching it but haven't found anything useful on the web. Any thoughts on making the MISO pin switch to "MOSI"?


texts: How many unused inputs are there in a BCD adder?

texts:
My book provides this BCD adder with the truth table:

Since this is meant to add number in BCD there are combinations that aren't going to be used. My book asks to calculate how many of such combinations are there. I did:

$$[(6*9)*2+(6*6)*2]*2 = 360$$

6*9 is the valid ones times the invalid ones. 6*6 is the invalid ones. I multiply each of these by two because you can have them one way around or the other. Lastly I multiplied by 2 because the input carry can be either 1 or 0.  But my book says the solution is 312. What went wrong?


texts: How does the timing of the MPU9250 works?

texts:
I am using an MPU9250 in my project and I am struggling with the timing domains of the various sensors.
Let's say I have the magnetometer ticking at 100Hz, the Gyroscope at 32kHz and the accelerometer at 4kHz. And I want to read the samples on a 20MHz SPI bus.

1) are all those clocks somehow locked together or free running separately?

2) who is the INT pin ticking for? (if it ticks as the or of all the sampling clocks, how do I know who it ticked for?)

3) how do I relate each sample to its clock tick (I need this information for filtering)? I see a lot of examples on github that read the sample fifo for all the sensors at once as if they had the same clock (a 21 bytes read starting at register ACCEL_XOUT_H) , do they read more than one time the same value of the slowest sensors?


texts: How can we be sure that computers will never accidentally switch a 0 by a 1?

texts:
I've read a bit about the construction of a digital computer in Shocken/Nisan's: The Elements of Computing Systems. But this book says nothing about certain electrical aspects in computers, for example: It's often said that 0's and 1's are represented by voltage, if the voltage is in the interval [0, 0.9), then it is a 0. If the voltage is in the interval [0.9, 1.5), then it is a 1 (voltages may vary, I'm only giving an example).

But I never read what keeps electrical voltages "well-behaved" in a way that a 0 could never accidentally become a 1 due to electrical volatility[1] inside the computer. Perhaps it's possible for the voltage to be very near 0.9, then what is done to avoid it passing the threshold?

[1]: Supposing it exists.


texts:
I would like to have a N- Channel (Enhancement mode) MOSFET with wide range of Ohmic region for my project. It's like Vgs varies from 1V to 5V (Ohmic region), Vgs threshold should be >5V, Ids continuous current should be around 5A.
Type : Through hole. Can you please suggest any MOSFET which is suitable with above spec ?

Explanation : What exactly i need is :

I'm going to use this MOSFET as Low side switch to control the load current. So, I'm controlling the Vgs from (0-5V), While Ids continuous current 5A (max. operating current) Which means

When Vgs- 0V Ids - 0A,
     Vgs- 5V Ids - 5A,   This should be operate in ohmic region.

Vds is 24V.

Note :
1. Don't consider the R7 (i'm not using it) mentioned in image.

For schematic purpose i just using the Mosfet IRF2804. (Doesn't mean that i'm using this mosfet)


texts: 8x8 RGB LED PWM matrix with TLC5947 which IC to use on the cathode end?

texts:
I made a simple LED matrix with shift registers in both row and col(anode and cathode). Now I want to build a 8x8 RGB PWM matrix so that I can control the color of each LED in the matrix.

One thing I'm struggling with is which IC to use on the cathode end. Previously, I simply added another 74HC595 and simply set row(cathode) that I wanted to light up and set RCLK. I was hoping to use the same approach, but I'm not so sure with the PWM.

I also considered using another TLC5947 but I don't think it works as source current?

EDIT: the micro controller I'm using is atmega32u4 at 16Mhz


texts:
I am working on a hobby layout that will have LED lighting for some of the elements.  I would like to individually switch LEDs in series on/off.  I used ledcalc.com to generate the circuit diagram below.  I am stuck on if it is possible to switch one or more of the LEDs in a given series without affecting the LEDs that follow.

For example, Lamp 1 below has on/off switch while Lamp 2 and Lamp 3 are always on.

Lights would be common 5 mm LEDs if that matters.

simulate this circuit – Schematic created using CircuitLab


texts: What is the input current of the 74HC595?

texts:
I need to calculate the power consumption of my circuit, but I can't find any information about the input current of the 74HC595.

I drive the 74HC595 with the atmega8 on 5v, but what is the input resistance of the 74HC595?

The darlington uln2803 clearly states that it's input resistance is 2.7k therefore I can calculate its input current 5/2.7k. But there is no such information for the 74HC595. How do I calculate its input current?


texts: How is abstraction used in Analogue circuit design?

texts:
Digital circuit design is a domain in which we abstract a complex analogue transistor circuit as a logic gate, effectively abstracting away even the electrical nature of the device as we use boolean algebra to describe its behaviour. I am sure that when we design analogue circuits we must be following a similar approach but not abstract things to such a level.

I understand the concept of voltage and current sources and that they can be used with Resistors-Capacitors-Inductors to abstract the behaviour of a given electrical circuit and make it easier to comprehend how it behaves. In all these cases, depending of the problem, one does away with some amount of information which is less significant e.g parasitics can be ignored at low frequencies.

I can see analogue circuit design done using schematics containing BJTs and FETs and Resistors-Capacitors-Inductors. This would be bottom up design. I want to find a resource which does a "top-down" approach to analogue design. In other words, an analogue problem is desribed and a top-down approach is taken to solve it. First a block diagram is created and than one figures out what goes into those blocks.

I understand that his is an "open question" but really, I don't know where else to post it on this internet. Any article, book, website will be appreciated. If it gets taken down, well ....

Note: I know that OP-Amp is an example of abstraction in analogue circuit design but Op-Amp exists as an actual component within the circuit on the PCB.


texts: How to find the voltage at the circled node

texts:
I have this circuit. The voltage source is 4V and the current source is 2A with the 2ohm resistance.
I got the node voltage at the circled node to be +8V from a circuit simulator.

Can someone help me on how to arrive at that +8V on that node intuitively and mathematically please?


texts: What is the failure mode of flash memory? I've got some chips rated for 10,000 cycles - what happens after 10k cycles? Do the chips stop writing properly, do you get read errors, etc.? Does it also happen to EEPROMs?


texts:
I am designing an offline flyback converter using UC3844 pwm ic with output 5V/5A specification.
But initially with no-load, the supply voltage is swinging between 10-16v meaning it is switching on and off continuously that is happening because the auxiliary winding is not able to provide enough current at no-load. It works fine when on load as it is supposed to be. I have increased the no. of turns to have increased voltage but to no avail.

Current Transformer spec:
63 turns 30swg, 1strand(pri)
3 turns 22swg, 5 strand(sec)
16 turns 35 swg, 1strand (aux)

Current schematic:(Removed D9 zener and a resistor of 10 ohms introduced D8 diode path.

Another person having this problem, but no solution posted.
http://www.eevblog.com/forum/projects/uc3844-flyback-converter-startup-problem/
Any help would be appreciated.


texts:
Is that black material made of silicon?
What about the red, green, yellow material?
What about the blue material?


texts: What do I need to know to design an LED lamp

texts:
So I had an idea for an LED lamp. I've got some old flashlights that have older model CREE LEDs.

My idea is that I'd put the LEDs in parallel, alternating polarity so that for each phase of AC, half of the LEDs will be conducting.

The array of LEDs would be in series with a resistor and a fuse to drop voltage from 110 VRMS from the outlet to 3VRMS over the LEDs and prevent the LEDs from breaking if something catastrophic happens (and to compensate for my own failings.)

The LEDs have a 5V reverse voltage and a 3.3V forward voltage at 3A at 80 deg C, so I figure if I limit to 3 VRMS I should't hit the reverse voltage and make badness happen.

With this in mind ... I am only passingly familiar with anything more advanced than kirchov's and ohm's laws. I can't apply ohm's law to the diodes, so what do I need to know to figure out the resistor value for n parallel diode pairs (Or maybe n sets of 5 in series and put those in parallel)? or is it just a bad idea?


texts: Why are high-sampling-rate data acquisition boards so expensive?

texts:
An example would be the NI USB-6366.

My guess is that it's primarily due to the analog-to-digital converter (ADC) since it should be the component responsible for the high rate conversion, even though I don't know what are the specifics that make high-sampling-rate ADCs expensive (an info on that would be appreciated). Nonetheless, there are all the other considerations like: BNC connectors (for electromagnetic isolation), usb and ethernet connectors, memory, software, # of I/O, etc.

So is it equally the result of all these factors or is there one that stands out?


texts:
I'm routing a U.FL connector to a cellular module (Telit GE864).

According to this calculator a 1mm track with 0.16mm gaps should provide a 52Ω impedance path to an U.FL antenna connector.

A Sparkfun breakout board for a similar module uses an open space (~1 cm high) with a far wider trace (2.8mm). Both traces are approximately 6mm long.

Calculator:

Sparkfun:

Which of these connections is preferable?


texts: BJT gain.Width of base region vs collector current

texts:
We know that in active region Ic=beta(Ib),so it means that as Ib decreases the Ic should decrease proportionally,but the early effect states that as we increase Vce the width of the base region decreases hence less recombination ( less base current as less electrons travel into base ,for PNP) therefore the Ic increases..
Aren't these two concepts contradicting or am i missing something ?Explain for common emitter bias.
Please help me clear my doubts.Thanks in advance.


texts:
I have seen the different answer posted in internet.

Many people are saying glow of neon light on tester is due to stray capacitor formed by our body and ground. I am ok with that until I found out tester also works on DC. So I get confused there, if it is DC then i think the capacitor will not work but tester glows in both poles. So please help me understand here. If it is due to stray capacitor then how it works in DC?

TYPICAL "NEON TESTER":

Tested voltage is contacted with blade tip.
Finger is placed on metallic top cap.
Circuit is Voltage_in - tip_resistor - neon - YOU.
Neon lights if voltage present.


texts: Extent of ground plane beneath filtered DC converter?

texts:
I'm laying out the PCB for a small and simple power supply to feed some audio amplifiers.  It will feature a DC -DC converter module and I'd like to filter the output for 1) extra smoothness 2) learn about power supply filtering.  So I found this courtesy of TI:-

I'm using a TRACO converter rather than TI, but otherwise the circuit is the same.  The switching frequencies are similar.  They're both 2W - 3W power.  So a 100uH ferrite inductor looks like:-

If I were to have a ground plane on the backside of the PCB, do I back it off from the inductors (and converter)?  Consider that there will be inductors inside the converter.  That's three inductors.  Do I put three holes through my ground plane, or keep it solid?

I looked at one question that suggests keeping the ground plane solid, whilst the answer for this one suggests a hole.  I'm confused again.

Further confusion arises  from some cheepo converters I have from on-line.  You'll have probably seen one of these fairly ubiquitous thingies:-

These have a solid ground plane on the reverse side.  Is that just 'cos it's easy /simpler or are cutouts unwarranted?  Clarification would be most appreciated.


texts: Should ventless electrolytic capacitors be mounted upside down?

texts:
I read in this CDE application guide and this Nichicon application guide that if a screw terminal electrolytic capacitor is installed upside-down, the vent may not function properly and the electrolyte may leak out. Proper orientation is upright, or horizontal with the vent at the top of the capacitor.

Smaller electrolytic capacitors often do not have such a vent, instead having a scored top.

I don't see any reason to expect a problem in this case. Is there any restriction on the mounting orientation of this style of capacitor?


texts:
I have a measurement performed using GRAS 46AE microphone calibrated at 410mVrms at 114dB (250Hz).
I have a .wav file recorded and performed stft and obtained the magnitude. Now I would like to scale my signal and obtain my power spectra in dB SPL (the level I measured). How do I incorporate the scaling in the dB calculation?
Power = 10*log10((magnitude^2)/?)


texts:
I'm currently using a cubic fit formula I found online to derive the temperature of a PT100/385 RTD using resistance. The formula is -247.29 + 2.3992*R + 0.00063962 *R^2 + 0.0000010241 *R^3 where R is Ohms. Does anyone know where I could find a similar formula for a 39250 RTD? I've tried to find one online, but I have had no luck.

I need to use this instead of the standard Linear one because I need more accurate readings at high temperatures.


texts: When is an input signal considered small for BJT and JFET devices?

texts: I can't find a detailed answer to this question. What is the condition for a signal to be considered small, so that you have to use small signal modeling? Also how is this condition derived for both BJT and JFET.


texts: Adjustable CC/CV supply with voltage and current limiting having no output voltage at low voltage levels?

texts:
Im trying to create a power supply with an addjustable output between 0-12V or 0-3A (CV and CC adjustable). To make sure that the components don’t get damaged I'm trying to implement a protection for over current and voltage. When current higher then 3A appears the MAX4172 will act as a current sense amplifier and the MAX9038 as a comperator with a reference voltage (reference itself still needs some work, also I know it has an internal reference). Since the output here is 5V and I want to make it variable I used the two transistors to amplify it to the source voltage (or at least close to). This seems to work nicely as seen in the picture except that the MOSFET doesnt work at low voltages, google told me its the Vto value for the MOSFET that is causing the problem. The application that it will be used for might require a high current and low voltage (0.5V in some cases), but I would like to actually have that output voltage of course! Is there any way to make this possible or any suggestions for good P-channel MOSFETs for this case? (let’s say as low as ~0.3V is required)
Since the actual power supply has to be able to regulate current and voltage I also need overvoltage protection. I've seen crowbar circuits which seem to work but bring the voltage and current to 0 (from testing a while ago at least), is there a way to make this work just like my current limiting, by limiting the output voltage to 12V?
Also, since I normally don't do too much regarding power supplies is there any other obvious problem that I've missed with the circuit thats not gonna work realistically? (also sorry for the horrendous loooking simulation, finally got it working somehow and last time I moved stuff I broke it again :P)


texts: The data_out value is updating in the next clock edge which is supposed to update as soon as b is assigned, why?

texts:
module memory(data_out,address,data_in,write_enable,clk,cs,rst);
        output  [3:0] data_out;
        input [3:0] address;
        input [3:0] data_in;
        input write_enable;
        input clk;
        input cs;
        input rst;

    reg [3:0] data_out,b;
    reg [3:0] memory [0:15];
    reg [3:0] temp,a;

    always @(posedge clk or posedge rst) begin
       if(rst) begin
         temp<=4'b0000;
         data_out<=4'b0000;
       end
       else
       begin
         temp<=a;
         data_out<=b;
       end
       end

    always @(posedge clk)begin
       if(cs==1'b1) begin
            if (write_enable==1'b1) begin
                memory[address] <= data_in;
                a<=data_in;
             end
             else begin
               b<=memory[address];
             end
        end
    end

   endmodule


texts: Using 5 V adapter to power 12 V cordless phone

texts:
I am trying to power a 12 V 8 W cordless phone using a 5 V 1 A wall adapter.
I am using a step up DC/DC boost converter MT3608 for boosting output from 5 V to 12 V.

Theoretically it works - when I connect adapter to boost convertor input and setting potentiometer to 12 V by measuring output through multimeter - it shows 12 V.

But as soon as I connect the cordless the voltage drops to 2-3 V and cordless does not power on. So its not working on load.

I also have a 7.4 V li-ion cells which powers on the cordless fine - using the boost convertor.

My question is the DC coming from adapter different than DC coming from battery?

Also I noticed that the adapter indicator light is constant when charging a basic (non smartphone) phone battery but it pulsates when connected to step up convertor and cordless powered on. This made me more confused.

Please help me understand this behavior of adapter and what's wrong in what I am trying to do?


texts: Can an ac signal pass from ground( earth's surface) to the socket?

texts:
My house is supplied with 230 V, 50 Hz AC signal and the sockets are three hole ones where the right is for live, left is for neutral and the above hole for ground.

Now if I use a tester and put it in the live hole, the tester glows (of course I need to put my finger on the back side of it, because I act as low voltage)

Now my question is:

Does the AC signal flow backwards i.e from ground (earth surface) to the socket?

It looks silly but please clear my confusion.


texts: Electronic switches rated for 300A @ 12VDC

texts: I have a 250A alternator and I want to charge two 200A batteries. I intend to charge each battery in turn for 30 minutes using a timer, but I don't want to switch between the batteries using mechanical contacts rated at 300A. I'd rather switch them using electronic switches like MOSFET, FET, SCR, triacs or transistors. How can I switch the batteries using those devices?


texts: Can someone explain how this oscillator circuit works?

texts:
I've started learning about transistors and I've created this circuit. The circuit works, I'm just trying to understand how exactly it's working.

From what I can understand, the absence of current flowing through the PNP transistor's base will result in current flow from emitter to collector through the PNP transistor. The small amount of current present at the NPN transistor's base after passing the resistor will cause the PNP transistor to switch to the off state and the current will flow from collector to emitter.

What I don't understand is why the capacitor is used, what happens to the current when it gets to the junction between the PNP transistor's collector/the end of the diode/the capacitor and how the oscillations occur. Is it from very fast switching between the PNP transistor's on/off state and the NPN transistor's on/off state?


texts:
In the Synchronous Data Link Control (SDLC) protocol, the frame contains a "frame-check-sequence" (a CRC). The protocol contains a number of other implementation details, such as NRZI encoding, and zero-bit insertion when the data contains too many contiguous 1's (so the data is not mistaken for the end-frame flag).

Three people seem to have three different interpretations on how to implement this FCS algorithm, based on the documentation not being explicit:

One engineer says you must decode the NRZI encoding and discard the inserted-zero bits, and then the remaining bits will be pushed through a FCS algorithm.
Another engineer says you must decode the NRZI encoding, but keep the zero-inserted bits when pumping data into the FCS algorithm.
Another engineer says the FCS algorithm just inserts the raw data bits, not decoded and still containing inserted zero bits.

Could someone clarify which scenario is correct (or if none of them are, what is the correct sequence)? Or, if someone has an example waveform (raw logic levels as seen on the physical medium), that would help.


texts: Programming STM32 Black Pill with ST-LINK/V2 dongle

texts:
So I recently bought the STM32F103C8T6 "black pill" dev board along with the ST-LINK/V2 dongle (more probably a Chinese clone). After much struggling I figured out that I need to hold down the dev board's reset button for the dongle to detect the MCU but then when I connected the dongle to my STM32F429 Discovery board, it detected the F429 without having to hold down reset.

I know the connection process has a "Connect with reset" option where you connect a reset pin to the board and the dongle does the hard reset for you, but I monitored the pin and it doesn't do the reset (probably a Chinese flaw?).

It's not the end of the world, it's just weird that the 103 needs to be in reset to connect, but the 429 doesn't. The 103's SWD pins aren't assigned other functions so that's not the issue. Any insight would be greatly appreciated.

Why do I need to have the 103 in reset and not the 429?


texts: What happens to 2 INPUT_PULLUP linked together?

texts:
I have an Arduino project (attiny85) with an input pin configured as INPUT_PULLUP.

I've got an another Arduino a few meters far from the first one.

Both input pins are connected together to a button that will send a low signal when pressed.

What happens if the second project has also an input pull-up?


texts: I am working on a buck converter and I want to obtain the Bode diagrams of the open-loop circuit. The below circuit is what I made. However, the DC-gain is -96 dB while it should be very small around -6 dB according to the transfer function. So, am I missing something? Could you please help me out with this?


texts: MG996R that can rotate all the way around, but behaves like a normal servo

texts:
So I bought an MG996r online to replace a dead one in my robot dog, and I always test my new servos by hand and then by using sweep.
When testing this one by hand, I found that I could turn it all the way around - like the end stops were gone. It just kept turning and turning. The seller had said nothing about this, and I thought maybe they sent me a broken motor, or maybe this is how they make theirs, or maybe its a continuous motor.
However, when I loaded up sweep, it went back and forth like a regular servo. I even tested it with my robot dog’s code; no difference from a regular 180’ servo. It could even support my robot’s weight when powered on, so there’s definitely some form of position feedback.
I don’t think there is a gear train allowing it multiple turns, given that the motor works at the same speed as any other one.
How does this work? I thought the internal potentiometer limits the rotation.
Does this use a potentiometer that allows the wiper to cross from one end of the track to the other? Or maybe it uses hall effect sensors, rotary encoder, etc?
EDIT: This servo was $12, while most of my servos were $8 or below. Although, I do buy them in bulk, so that does drop their price. But still, it seems like a big difference.


texts: Maximum sensitivity of a wheatstone bridge

texts:
Four strain gages are placed on an elastic element in order to measure axial force and moment. Assume that element cross-section is square with area, A = h2 . The strain gages all have the same resistance Rg. The strain gages are all bonded to the centerline of each side and aligned to measure axial strain under load, P.
Only gages A and C are used to measure the axial load. The remaining gages B and D are used in combination with two dummy gages (resistance Rg) to measure My.
How should these gages be placed in a Wheatstone bridge to maximize the sensitivity of
the voltage output to My? Draw a sketch of the bridge.


texts: How can I simulate limits of active components?

texts:
I am using LTSpice to simulate an energy harvesting circuit, so I am very careful with small leakage currents and losses. This circuit is all discretes (Diodes and FETS) and passives. Is there any way to simulate the ranges of some of the parameters, like the gate threshold?

I am already familiar with the Pspice commands to set the temp, but Vgs has a range of 0.5 to 1.5V at 25C, and I would like to be able to see how the circuit functions across the full range. Failing that, I would like to see what Vgs is without doing a whole other test.

The components I am using are part of the default LTSpice library, so I am not sure if I can see the model.

Any advice?


texts: How to model a Electronic Proportional Control Valve

texts:
I am using a VSO LowPro Proportional control Valve (https://www.parker.com/Literature/Precision%20Fluidics/Miniature%20Proportional%20Valves/VSO%20LowPro.pdf) to regulate pressure into a closed actuator.

I am wanting to try and model this system in simulink but I am unsure on how to model this valve. I have done circuit modeling of electrical systems but not electrical mechanical systems and general you can get the transfer function from the response of the system. However could you use flow rate vs pressure to model the system?

Any help of this would be greatly appreciated.

Cheers


texts: Charge distribution on switched capacitors

texts:
Computing the voltage and charge of these capacitors in series and parallel, I come up with a situation in which I couldn't explain why the circuit is behaving as it is. The circuit is the following:

simulate this circuit – Schematic created using CircuitLab

Both switches SW1 and SW2 change their position at time \$t_1 = 1~ns\$.
Therefore, on the interval \$0 < t < (t_1 = 1~ns)\$, the capacitor \$C_1\$ is connected to the source \$I_1\$. At the end of this first interval:

$$V_1\left(t_1^-\right) = \frac{1}{C_1}\int_0^{t_1}{I_1 dt} = \frac{1}{1~pF}\int_0^{1~ns}{10^{-3}dt} = 1~V$$

and the charge at \$C_1\$ is \$Q|_{t_1^-} = 10^{-12}~C\$

Right after both switches SW1 and SW2 change the position and connect \$C_2\$ and \$C_3\$ to the circuit, the voltage at \$C_2\$ is negative and \$V_1\$ drops to \$0.5~V\$.

Making some numbers, I would have expected that the charge in \$C_1\$ would have been transfered to \$C_3\$, forcing a current from ground to \$V_1\$ node, and then charging negatively \$C_2\$. However, according to my calculations that would set \$V_{C_2}\left(t_1^+\right) = -0.333~V\$ since \$0.333\cdot10^{-12}~C\$ would have been transferred to \$C_3\$:
$$Q_{C_1} = Q|_{t_1^-}\frac{C_1}{C_1 + C_3} = 10^{-12} \frac{1~pF}{1~pF + 0.5~pF} = 0.666 \cdot 10^{-12}~C$$
$$Q_{C_2} = Q|_{t_1^-}\frac{C_3}{C_1 + C_3} = 10^{-12} \frac{0.5~pF}{1~pF + 0.5~pF} = 0.333 \cdot 10^{-12}~C$$

Obviously there is some mistake in all this reasoning. However, I can't spot it. Does anyone know what is exactly happening at \$t_1 = 1~ns\$ when both switches change the position and the charge at \$C_1\$ is redistributed, that would explain the values on the plot?


texts: Does the placement of the current arrow before or after a resistor make a difference?

texts: I feel like it should be obvious, but I've had a mental block about this because I don't remember it being explicitly said. I've seen it in text books where the current arrow (i1, i2, is, etc.) has been in front of the resistor and in other places it would be after the resistor. Does it make a difference when making further calculations?


texts: How do you calculate the power factor of a power supply?

texts: Is it possible to measure or calculate the power factor of a power supply without using expensive tools?  If so how?


texts: How can I become more accomplished at reading electronics schematics?

texts: I know what the individual electrical components do (RLC).  However, how can I learn to read schematics to determine what the circuit is doing?  I have seen some experienced engineers looking at schematics at a glance and figuring out what the circuit does.  How do I do this without having to simulate the circuit in PSpice?  Are there any tutorials or does this just come with experience?


texts: In EAGLE, why is the ground pour not connected to these SMD pads?

texts:
There are some SMD pads in my schematic that are connected to ground, but do not appear as connected on the board. Any help on how to solve this?

This happens for all pads except 12, which is also weirdly connected


texts: Trying to attach resistor to MacBook logic board (a1278, 820-3115-b)

texts:
On my logic board, I knocked off a loose resistor when I was replacing my battery. The resistor was r6700, which is located right at the edge of the board and its function is to detect headphones. So now when I plug in my headphones, it thinks I plugged in an optical cable.

I got a donor board, but unfortunately r6700 was removed along with the headphone jack. So I found a resistor r7832 which has the same rating as r6700 and I'm trying to reattach it to the board, but I'm having a lot of trouble getting the solder to stick onto the board.

I removed r7832 by dropping liquid flux (Kester) on the donor board and using a bit of tin solder with a drag tip. I managed to lift it off the board. I checked the schematics and matched the ground. I tried to attach the resistor to my actual board by first adding flux and solder and running through the pads, then placing the resistor on the pads and using a heat gun to ease it into position. Afterwards I try to add some solder to keep it in place, but whenever I try to solder the thing, it moves. I tried placing pressure on top, but I can't seem to get a good stable grip on it.

Any tips on how to keep it in place when soldering? Am I attaching it wrong? Or any other problems I should be aware of?


texts: What does this circuit do? Is it an infrared interface?

texts:
I have the following mystery circuit:

The "LED" is a placeholder. It is very likely not an LED as it has no flattened side to discriminate anode/cathode:

The transistor is labeled "1G s(underlined) 22(vertical)". I believe this is the BC847C.

The circuit it connected to an ATMEGA169A.

Any idea what this might be doing and how it works?


texts: Controlling the reactive current of an PMSM in an open loop setting

texts:
for my master thesis I'm investigating the EMI of a 3-phase inverter, wich drives a PMSM. The inverter's structure is the common 3-Phase DC/AC Voltage Source Inverter and it uses EPC2020 GaN transistors at 100 kHz switching frequency. For my investigations the system needs to be in a stationary state with exactly periodic currents and signals, hence no closed loop control is used.

Instead I only set the desired stator voltage and frequency and let the motor do its thing. For startup I slowly increase the stator frequency and at the same time increase the voltage my inverter produces to compensate for the higher back EMF at higher frequencies.

So far so good, although this method is not practical, it lets the motor run at my desired electrical frequency of 50Hz in an idle state, but the phase currents are concerningly high.

The system currently runs with a DC rail voltage of 20V. The DC current going in the inverter is peaking at about 5A. The phase current of the PMSM on the other hand is peaking at nearly 20A. Hence my conclusion the majority of this current is reactive current between the motor and my DC link cap. So now my real question: How do I reduce that reactive current? From my understanding of synchronous machines, the reactive current is not needed for torque built up and should be controlable through the ratio of stator voltage and induced back EMF. So if I adjust the absolute value of my stator voltage it should be possible to reduce the reactive current to a minimum, while still drawing the real current needed to drive the motor.

But that's unfortunately not what I experienced until now. If I increase the stator voltage, the reactive current gets bigger. If I reduce it, the current does reduce a bit, but before it gets reduced significantly, the motor stops, so somehow also the real current got reduced, what I find counterintuitive.

I plotted one phase current and the DC current for one whole period, you can take a look. They also don't look like I expected, but I have no explanation on why that is...

So I know this may be an unusual use case, but maybe there are some machine experts out there, who may guide me in the right direction ;)


texts: Clock signal becomes noisier at higher frequencies

texts:
I am sending the clock signal of a DE0-Nano FPGA to one of its GPIO pins. As I increase the frequency, the signal becomes more and more distorted. Is this an issue with the GPIO pins having small buffers? My scope has a bandwidth of 200MHz and my probes are also rated for 200MHz. What might be the reason for this?

Ultimately I want to modulate data on top of this clock signal.

1) Is there a way I can output a clean clock signal at a high frequency like 100MHz?

2) Can I modulate a clean square wave of data on top of this clock signal?

10kHz

100kHz

1MHz

10MHz

100MHz


texts: How would you design a clock in order to play triplets?

texts:
If you take a master clock (e.g. 1 Hz) it is easy to get the quarter notes (every pulse), the half notes (every two pulses), and the whole notes (every four pulses) to build a simple drum machine.

What would I need to do in order to create a steady stream of triplets1 from a master clock?

1 A triplet is when three notes of a type take up the same duration as two regular notes of the same type. E.g. three triplet quarter notes are the same 'length' as two quarter notes.


texts: Is there a faster alternative to the HT12E / HT12D IC?

texts:
I am looking for a quicker alternative to the HT12E encoder IC.

This IC lets you encode 8 bits of adresse and 4 bits of data. Once the bits are encoded, it outputs a frame containing all those bits like so:

My problem is that each frame is always sent 4 times. You then obtain this signal each time you want to communicate through the RF emitter :

The timing becomes a serious problem with the delay between two different set of four frames :

So, am I doing something wrong?
To reduce delays, I used the highest resistor value as told in the datasheet : 470kOhms for a frequency of ~7,75KHz (page 9).

If everything seems fine, could anyone advise me for another IC? I only need 2 or 3 adresse bits, and at least four data beats. It would be great if there wouldn't be more than 200ms between to different frames.

HT12E datasheet : https://www.farnell.com/datasheets/1899539.pdf

Thanks a lot in avance and good luck for those crazy times. And also sorry for my English.


texts: Connecting bandpass filter to comparator generating excess noise

texts:
I have a band pass filter with a center frequency of 100kHz, a bandwidth of 10kHz, and a gain close to 1. Input signal is 100mV-150mV peak to peak with frequencies varying from 80kHz to 120kHz. I am using an OPA355 op-amp.

Here is my circuit on Proteus software:

Here is the expected output,with an input voltage of 130mV:

I then use the output of this filter as the input to my comparator. The comparator works perfectly in simulation and when tested alone. I am using LM339:

As soon as I connect the two, the filter output immediately changes due to an added noise component. On close inspection, the amplitude of the filter output decreases and has visible noise spikes.

This messes up VTH, VTL and hysteresis settings of the comparator. Hence the expected output is not attained.

and at 1ms/D:

I noticed that:

If I remove the 2.5V from the potential divider from pin 4 of the
comparator, the band-pass filter output goes back to it's original
correct state.
if I remove the wire connecting the output of the filter to pin 5 of the  comparator, the bandpass filter output also goes back to normal.

I have tried, adding a decoupling capacitor across R1, changing resistors used for the voltage divider, using different LM339 comparators, and also using different channels of the comparator. None of these methods have worked. I am really stuck here, any suggestions on how to reduce/eliminate this noise would be appreciated.

How is noise being generated on the output of the bandpass filter, and not on the comparator output?

Please do let me know if I need to provide further information. I also have pictures of the (crude) setup on my breadboard if those would help identify a possible culprit. Thanks


texts: How to divide 24VAC to 24VDC for use with GPIO

texts:
I'm working on a project to gather metrics from my HVAC. I need to detect the presence or absence of 24vAC on two different wires (Y/yellow/cooler, W/white/heater) relative to common - either of which will be periodically pulled to 24vAC by a relay in the thermostat. I have a Raspberry Pi with a 4-channel ADC ready to measure power but it is limited to +/- 1v.
I gave up trying to draw a voltage divider that could divide both Y and W without leaking voltage to the other input channel. That is to say, the ADC would see a range of voltages depending on none/one/both Y and W being pulled high, and it got too complicated.
Now I'm exploring the use of a couple of reed relays (datasheet) which run at 24vDC to isolate the channels. I need to come up with a way to carefully lower the 24vAC voltage to trigger the 24vDC reed relays. I'm thinking a single resistor in series with the AC power source should suffice, given an appropriate rating. I don't want to blow the relay coil and this needs to safely run unattended.
I need help calculating the rating of the resistor.
I hypothesize that I can simply lower the voltage with a resistor and not have to rectify the power before sending it to the relay but perhaps I am over simplifying?


texts:
I have a power supply that is outputting ~300v and 350ma. the LED's in the backlighting are on 11 strips and there are 6 per strip. Can I calculate the voltage per led by dividing 66 LED's into 300v? That gives me a voltage of 4.54v per led. Would this be how much each LED is using?

I have a small DC power supply that goes up to around 15 volts, but it has an analog meter on the front of it with a needle and it is hard to tell what the exact voltage is. I have tried to power each individual LED and it looks like I get a voltage well above 3v (around 4.5v - 5v) and the led burns evenly and bright. Would it be safe to say that each LED is a 6v LED?

Any help sure would be appreciated.

EDIT: What I am trying to do is find the correct LED to replace some burnt out ones. I found the correct kind, 3030 cool white, but they come in 3v and 6v. What I plan on doing is just replacing all 66 LED's, because I have tried to replace a few and that just makes other original LED's burn out after a few days of semi-successful repair. I don't want to overload the power supply, but I also don't want to overload the LED's. Im leaning towards using 6v LED's though. Like I said earlier, any help is very much appreciated.


texts: How to choose a suitable transistor for switching

texts:
I am building a circuit that involves switching 1000 LEDs via IC drivers. Each IC output has 10 LEDs connected to it, and these are grouped together by their cathodes, in groups of 100, such that only one group is enabled at once.
To acheive this cathode switching, I use another IC output, and want to switch it via a transistor that can sink enough power comfortably. Allowing a maximum of 20mA per LED, I need an NPN transistor that can sink 2 amps of current. My circuit runs at 5 volts.

I'm not sure how to get about searching for an appropriate transistor, with so many available. Does anyone know of a parameterised search engine that would allow this?
I have come across a couple, but they were overly complicated for someone such as myself who has a relatively basic knowledge of electronics.

If there is no such thing, then a suggestion for my particular use case would also be appreciated. This transistor will be switched by an IC that can supply around 10mA.


texts:
I am trying to make some GameBoys use rechargeable LiPo batteries. I wanted to utilize a circuit that would allow me to play and charge at the same time and so I settled on the MCP73871.
https://ww1.microchip.com/downloads/en/DeviceDoc/MCP73871-Data-Sheet-20002090E.pdf
I purchased a circuit fabricated by diymore from eBay for about $2.80 a piece.
https://www.diymore.cc/products/mcp73871-usb-dc-solar-lipoly-lithium-lon-polymer-charger-3-7-4-2v-battery-module
Overview -
I have the consoles connected via the LOAD section of the circuit, the battery on the BAT section, and a USB C connector on the PWR section.
I am new to electronics and have a few questions -
The circuit comes with a 4700 microfarad electrolytic capacitor.  There is no way to fit this in any GameBoy model. According to the spec sheet it says 4.7 micro farad is plenty so I replaced it with a 4.7 microfarad tantalum capacitor which fit much better.
Is this replacement capacitor ok?
I purchased a 3.7v 4700mah LiPo battery for an original DMG GameBoy. Its quite overkill, but I thought it would be great to have a 60 hour battery life on the console.The board outputs 4.7 volts and this seems to be enough even though the system runs closer to 5 volts and might need more if I decide to use a backlight or IPS display.  I have the circuit hooked up and powering the system via LiPo battery. I get the "charge in progress" status LEDs when charging the console, but its only pulling about 20 milliamps tops when charging/playing.
The system plays fine, but seems to not charge at any realistic current rate. I thought it was supposed to be 200 milliamps at minimum and up to 1amp. I even tried draining the battery to around 3.8 volts and it still doesn't charge more than 20 milliamps.
What have I done wrong that is causing such a low charge current?
If I need to bump up the current to somewhere above 5v and below 6v is it ok to add a step-up converter after the MCP73871 ? I think it has a built-in converter and I could replace that, but is having 2 bad?
I have done a similar mod on a GameBoy Color. It runs on 2.5v normally on 2x AA batteries, but seems to be running fine on a similar configuration. I purchased a 3.7v 2500mah battery.  However it charges around the same rate 20 milliamp hours.
I am not sure why the circuit would ship with some kind of limitation where it only charges around 20 milliamps? What am I doing wrong? I get confused when I read the spec sheet and it seems by default charging should be at 200mah to 1 amp.
To measure milliamps I use a USB tester in between the supply and the circuit across the LOAD section.  When I try to use my current measuring multimeter I get some odd readings, LED errors, and the chip heats up quite a bit. What am I doing wrong to measure current?
UPDATE
I got a 30V 5A power supply and I've been doing some more investigating.
It looks like I can only pull 50mA when I read with my meter. This makes me think its stuck in preconditioning.  PROG has a 2KOhm resistor which should allow up to 500mA of charging current, but we don't seem to be getting there for some reason.  When I crank the voltage above 5V the current can get to 150mA but that's nowhere near the 500mA or 1000mA fast charging rate.


texts: Using logic gates with general purpose transistors, I want to display numbers on a 7-segment display depending on the 2 pushbutton input. If both buttons are not pressed, I want it to say 0. If 1 is pressed, I want it to say 1, if the other one is pressed, I want it to say 2, and if both are pressed, I want it to say 3. I know how to do this with separate LEDs, ( 4 Different  LEDS are lit depending on the switches inputs) ,but I am having troubles figuring this out for a 7-segment display because of the overlapping digits on. I may have done a terrible job explaining this, but any info is helpful.


texts: Impedance matching between rectifier and antenna?

texts:
I have a confusion about the impedance matching between the antenna and the RF-DC rectifier. The antenna(915MHz) was bought from the market and the datasheet says its impedance is 50ohm. However, I use a mini-Vector network analyzer to measure the impedance of the antenna, which is (42.4+22.5j)ohm. To reach maximum power transfer, the impedance of the source and the load should be the conjugate with each other (R+j=R-j).

My confusion is which impedance should I choose for matching (42.4+22.5j or 50ohm)?

Tuning the impedance matching is also difficult. First, I use ADS2017 to calculate the value of the L matching network. Then, I modify the capacitor and inductance around the calculated value. However, it hard to reach perfect matching. For example, the impedance of the antenna is 42.4+22.5j so I think the impedance of the rectifier should be tunned to 42.4-22.5j. If add a serial capacitor, the point should move counter-clockwise on the Z circular of the smith chart but in practice, the point just jumps to another position where it shouldn't be. Maybe it is because of the parasitic effect?

If the matching is well, the point of  Zs and ZL should be as shown in the picture, right?

How do you usually matching the impedance according to the smith chart? Is there any mistake in my operation?

www.ebyte.com/en/pdf-down.aspx?id=362   antenna datasheet

Many thanks


texts: Advice on electronic circuit design for an agricultural machine

texts:
I’m working on a project which is technically working well but I have some problems on the electronic circuit.
This project is my first professional project after I graduate university so I have no experience with things like this.
I designed an agricultural machine. There are 2 separate 12V DC motors in it. One of these motors draws 14 amperes instantaneously and the other draws around 8 amperes.
I used a car radiator brushed fan D  motor as I needed large torque. When I talked to the manufacturer, they told me that they tested these products themselves with 13 volts, so I drive the motors with the highest voltage of 13.5 volts at the moment (there is no overheating.) I will use 4s-15p lithium battery as the machine will be used for 2 -3 hours. The problem is, as you know with lithium batteries, a 4s connected battery gets 4.2 * 4 = 16 volts when fully charged. This is a voltage that the manufacturer does not recommend.
I am currently using a voltage regulator between the battery and the motor while performing the tests.
Is it right for me to continue like this? What would your advice be?
I use this DC motor as I cannot find another brushed DC motor that provides this torque.
This is an image of the DC motor and how I used it in a blower fan:


texts: I want to create a dimmer for high power LED light's i'm building for video work. I'm using CREE CXB3590 chips, which have run at 36V with a forward current of 3.6A. I am powering these through a 150W 12V power adapter, hookued up to a step up converter that has a separate pot for current and voltage regulation.  I want to create a dimmer for these lights, and I would like to do it as simply as possible. I have a box of assorted resistors and some 100K pots, so the question is, can I use these resistors and a 100K pot to dim my lights, and if so, how would I go about doing so? I don't know how the math works, but I can follow a schematic so I'd appreciate any help the community could offer. Thank you!


texts:
I thought I found a suitable diode for a project I am working on, it has the correct current and voltage ratings, but then I noticed the power rating and now I am lost.
The diode in question is the dual MMBD4448HT I like this because it is extremely small and I can use it to supply my circuit from two sources. The circuit in question has a maximum current of 400mA but a typical usage of around 250mA. Its input voltage is 10-30V so quite the range. So two supplies, diode-OR'ed into one circuit.
Will I exceed the power limit of 150mW at these voltages?
How do I calculate it myself?


texts: BJT differential amplifier output saturation

texts:
I'm making a long-tailed pair amplifier using a current mirror, the circuit has the following layout:

I simulated it on PSpice and it worked, you can see the bias here:

I tested it in the real world, on my breadboard, and it didn't work, BJTs saturated (Vc
is almost equal to +Vcc), again, you can see the bias here:

So, why this circuit doesn't work in the real world?

Thanks :)


texts: Electrical principle of row hammer glitch

texts:
There is a fairly new and exploitable bug happening in some DDR3 DRAMs called the "row hammer" in which it's possible to bit flip memory cells. I understand how the exploit works, but not the electrical problem that generates it. On Wikipedia and some other sources, it's mentioned that capacitors shouldn't be too close together because they interfere with each other. How is that? As far as I'm aware, a capacitor doesn't generate magnetic force such as the known problem of charges in magnetic disks. I thought maybe if they're too close a current can appear and make them act as if connected, but that's a shaky guess. Fact is I don't see the problem clearly.
Thanks in advance.


texts: problem with CPLD and 24C16 EEPROM interface

texts:
Can any one say if it is possible to implement this code in ATMEL 24C16 EEPROM device for write the data. While I am implementing this with CPLD xc9572 I/O Pin declared as sda, scl there won't have write operation its operating frequency is 132kHz  .voltage compatibility in CPLD is 3.3volt and EEPROM Datasheet describes it will operate from 2.7 volt to 5volt.

`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date:    12:13:36 01/29/2014
// Design Name:
// Module Name:    i2c_prorocol
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////

module i2c_protocol(clk,write,sda,scl_clock,scl);

input clk;
input write;
output scl;
output scl_clock;
inout sda;
//---------------------------------------------------------

reg [6:0] dev_addr_write         = 7'b1010000;
reg [7:0] word_address_write    = 8'b00000001;
reg     [7:0] data                       = 8'b01110101;

//---------------------------------------------------------

wire  scl;
wire  sda;
//wire  wr_rd_in;
//---------------------------------------------------------
reg     wr_rd=0;
reg     temp_reg=0;
reg     scl_out=1'b0;
reg     scl_out_ss=1'b0;
reg     sda1=1'b0;

reg     [8:0] state=0;
reg     [10:0] count=0;

reg     scl_clock=1'b0;
reg     slave_ack=1'bz;

//--------------------------------------------------------
//assign wr_rd_in =(wr_rd==1)?1'b0:1'bz;

//---------------------------------------------------------------------------------
always @ (posedge clk)
begin

    count <= count+1;
    if (count <=49)
      scl_clock<=0;

    if (count>=50)
      scl_clock<=1;

    if (count>=100)
     count<=0;

end

always@(posedge scl_clock )
begin
     if(write==0)
         temp_reg<=1;

      if(temp_reg==1)
      if(write==1)
      begin
             temp_reg<=0;
             wr_rd<=1;
      end

              if(wr_rd==1)
                        state<=state+1;

         case(state)

            7'd0:begin scl_out_ss<=1;sda1<=1;end
            7'd1: sda1<=0;
            7'd2: scl_out_ss<=0;

            7'd3: sda1<=dev_addr_write[6];
            7'd4: sda1<=dev_addr_write[5];
            7'd5: sda1<=dev_addr_write[4];
            7'd6: sda1<=dev_addr_write[3];
            7'd7: sda1<=dev_addr_write[2];
            7'd8: sda1<=dev_addr_write[1];
            7'd9: sda1<=dev_addr_write[0];
            7'd10: sda1<=0;
            7'd11: sda1<=slave_ack;

            7'd12: sda1<=word_address_write[7];
            7'd13: sda1<=word_address_write[6];
            7'd14: sda1<=word_address_write[5];
            7'd15: sda1<=word_address_write[4];
            7'd16: sda1<=word_address_write[3];
            7'd17: sda1<=word_address_write[2];
            7'd18: sda1<=word_address_write[1];
            7'd19: sda1<=word_address_write[0];
            7'd20: sda1<=slave_ack;

            7'd21: sda1<=data[7];
            7'd22: sda1<=data[6];
            7'd23: sda1<=data[5];
            7'd24: sda1<=data[4];
            7'd25: sda1<=data[3];
            7'd26: sda1<=data[2];
            7'd27: sda1<=data[1];
            7'd28: sda1<=data[0];
            7'd29: sda1<=slave_ack;

            7'd30:begin sda1<=0;scl_out_ss<=1;end
            7'd31:sda1<=1;
            7'd32:begin state<=0;wr_rd<=0;end
            endcase

end
assign scl=(state>=4 & (state<=29))? scl_clock:scl_out_ss;
assign sda=sda1;

endmodule


texts: Is there another way to think of/draw this simple diagram?

texts:
I'm not too familiar with this "not-fully-connected" type of diagram, and so understanding it is giving me some trouble. How do I approach determining the following circuit's characteristics (i.e. currents, voltage drops, etc.)?

My mind wants to just connect the grounded parts, trace them back to the back of V1 (Thereby assuming V1 is a battery, and treating V2 as a measure of the voltage across the resistor on the right and/or the diode. However, I'm not sure if it's that simple.

simulate this circuit – Schematic created using CircuitLab


texts: If I looped + and - terminals of a single AA 1.5 V, 2 Ah battery with a broad wire

texts:
If I looped + and - terminals of a single AA 1.5 V, 2 Ah battery with 1 meters of AWG 000 wire (2/10^4 ohms/meter),would there be a current of

V = IR,   I = 1.5*(10^4)/2 = 7500 Amps ?

If so, then would the battery die in 2*3600/7500 = 0.96 seconds and form such a strong magnetic field briefly?

If not, what prevents this from happening?


texts:
From what I've found on the internet, CPU clocks work with piezoelectric material to produce a very stable oscillating signal but those materials must change in shape or size to get a different frequency. So how does a CPU change frequency?
Do CPUs use some other kind of less stable clocks then fix them with a crystal oscillator or ...?

(I know very little about electronics, please stay simple, thanks)

Please note that I'm not asking how it is decided to change the frequency (like this question), I'm asking how the frequency change actually happens in the circuit.


texts: I'm building a Full-bridge inverter with input of up to 36V, Four IGBT are used for switching and embed micro controller for PWM. To drive IGBT I'm using four HCPL-3120 chips. After testing the circuit, I'm having an issue of very low output voltage somewhere around 1V irrespective of input voltage however I got something close to a sine wave. Also I want to know if it is necessary for opto-couplers to have isolated supplies.


texts: How do I know the maximum voltage that a capacitor releases?

texts:
From what I understand, a capacitor is used to store electric charge and when it is fully charged it can release electricity. When I looked at a capacitor, I found two pieces of information on it:

Capacitance (4n7)
Voltage Rating (1kV)

As I understand, the voltage rating on a capacitor is the maximum amount of voltage that a capacitor can safely be exposed to and can store. But what about when it is fully charged and released, how much voltage can it release? Does it equal the voltage rating?


texts: What makes a pull-up/down resistor strong or weak?

texts:
A "strong" pull (up/down) resistor would be one of a relatively low value, while a "weak" one would be of a relatively high value.

For example, a pull-down resistor would be used to keep an I/O pin low, but a button connected from that pin to VCC would bring it high when pressed, because more current flows from VCC to the pin than from the pin to GND.

In that situation, it seems any value of resistor could be used to keep the pin low, and a button press would always "override" it. What, then, would determine if the pull-down resistor is strong or weak?

Does "strong" vs "weak" only apply when one such resistor is being compared to other resistances in the circuit, such as an internal pull-down resistor?


texts: Digital circuit that squares a 4-bit input

texts: Many years ago, I found a digital circuit that squares a 4-bit input in an old textbook (perhaps 1970s or 1980s, possibly older).  (The figure below is not the original figure.  I think the figure below differs from the original in that it has been rotated 90 degrees.)  I do not have access to that textbook any more and I do not have additional details about the textbook.  Have you seen this circuit before?  If so, could you give me the name and author of the source?  I am using this figure in my teaching and I would like to properly cite the source.


texts: what does this symbol mean?(like a comparator,but there is another symbol in this triangle)

texts: What does the symbol mean?what is this comparator difference?what is its function?can anyone introduce it to me?


texts: ESP32. - selecting resistors for voltage divider

texts:
I'm using an ESP32 with a 12V battery and solar panel. I've created a voltage divider for 0-15v (3.3v input to MCU  at 15v at battery side).
For that I used a 100kOhm , and 300kOhm to get a 0.3 ratio.
For measuring purposes, result measured is close enough (0.1v error), but Battery-wise, selecting those resistors were a good choice ?
EDIT_1

MCU is powered using that 12v battery, using a buck converter.

12v battery is used, since it has  a much bigger capacity (7Ah).

Charge voltages can get up to 13.5-14.0v, I took 15v as a upper limit.

4. The reason for asking was NOT about what ratio is better (0.3 or 0.25) in voltage divider, but what is right for consuming less power due to that R selection, since it seems battery drainage is faster than I expected.


texts: How does audio get transmitted from my iPod to speakers?

texts:
I need some help understanding a simple concept. I understand that my iPod/any other audio device sends electrical signals to my speakers/headphones.

From my research so far, an analog signal is sent. Now what I need help understanding is that what is the analog component of the signal? In other words, is it the current that is varied and the voltage remains the same, or the other way around?

I haven't found a definite answer, but it seems to me that the current is what fluctuates, and voltage remains constant.

Under that assumption, would that mean that resistance also fluctuates as a direct result to balance the equation V=IR?

Sincerest thanks :)


texts: Can you use cat 5/6 ethernet cable to power devices?

texts:
I'm not interested in PoE, I don't need data transmission in this project
I'm interested only in the wires inside an ethernet cable

I want to wire several devices (ESP nodes) all over my house. I can't use batteries on all nodes, and since I've decided on a central power supply, I'll connect all notes on the supply.
My original idea is to have a power unit (24v 100W or more) in the center of the house and from the power unit, ethernet cables will send 24v to each room in the house. On each room there will be a step down converter to turn 24v to 3v, 5v or 12v, as the local nodes require.

Can I use the 4 pairs on the ethernet cable to supply power?
Can I use 6 wires to vcc and 2 to ground?
Can I supply different voltages on the same cable?


texts:
I know the definition of Hold-up time in SMPS, and how to calculate the bulk capacitor. But I am wondering if someone can explain me how we define the hold-up time (sometimes 10ms, sometimes 16ms,...)? is it based on a  standard?
and why we need the hold-up time? what happen if we dont have it


texts: Finger touch signal detection with microcontroller

texts:
I use darlington transistor for detection of touching. Finger or hand touch to BASE, only make about 0.8-0.9V voltage on the EMITTER side. How can i increase this voltage level to 3V for detecting touch event with a microcontroller? 0.8-0.9V is not adequate for digital inputs.
I've read sth. like TTP223B or AT42QT1012 on this forum. But i'm not sure, isn't there a way with transistors or simpler ways without utilizing an IC? (The method that i search must be robust at different conditions like that wet or dry finger)


texts: RFID/NFC transponder with current delivered via wire

texts:
I'm sure everybody here knows how RFID transponder works, reflecting radio waves and receiving them at the source.

I'm looking for the same concept, but instead of the input to the transponder being radio waves, I'd like to apply a current directly and have an antenna listening for it.

I'm seeing lots of very small RFID/NFC transponders, but can't seem to find wired equivalents. It is a transponder I am after yes? I'm looking for something about 10x10mm with a range of 1ft.

Thank you


texts:
I am trying to build a simple 32kHz crystal oscillator but I am seeing something strange. I am using a simple circuit in that the crystal is in feedback around a current starved inverter.

However, I am seeing something strange. The frequency of operation is correct but at edge of the clock, there a multiple transitions before it finally stays high (or low). I.e. the voltages are bouncing"


texts:
Radiation resistance of an antenna is defined as $$ R_R=\dfrac{P_R}{0.5I^2}  $$ where $$P_R$$ is total radiated power, and $$I$$ is the antenna input current.
Antenna's far field is given as $$ E = Iπ(a_θ+ja_Φ)f(θ,Φ)\dfrac{e^-jkr}{r} $$
where $$ f(θ,Φ) $$ is $$ f(θ,Φ)=[cos^2(θ)+1]$$
In this context, how one can find radiation resistance of an antenna whose far field is given above?


texts:
Can anybody tell me about DAD instruction in 8085. Is ALE high twice in
first machine cycle of  DAD instruction. Can anybody suggested me timing
diagram of DAD and HLT instruction.(Any other link)


texts: How to convert sine wave from an oscillator to TTL signal for microcontroller?

texts: I tried to measure inductance by using a colpitts oscillator to generate sine wave. It works. I need to convert the sine wave to 5V square wave to feed to a microprocessor. The sine wave is coupled with a capacitor 0.47uF to eliminate the signal offset. The signal after the capacitor is zero crossing sinewave. When the signal connected to a zero-crossing detection comparator, I got problem. The zero- crossing sine wave drifts to about 10mV above 0 V. The output of the comparator is flat no square wave, since the input signal always higher than 0V. How should I do to avoid the signal drift, to convert the sine wave to TTL.


texts: Using Analog Devices TMP36 temperature sensor with Arduino. Issue with Shutdown pin

texts:
I am using an arduino to measure ambient temperature by reading an analog voltage from an Analog Device TMP36 temperature sensor. http://www.analog.com/static/imported-files/data_sheets/TMP35_36_37.pdf

The TMP36 is powered by the regulated 5V pin from the arduino, TMP36 output goes to A0, and shutdown is tied to the 5V pin. There is a 100n cap on Vin. Everything works great in this setup.

However, if I tie shutdown to an arduino IO pin, such as 12, after configuring pin 12 as an output, and writing high, I get a temperature reading that is approximately 4 degrees C less than it should be.

AND if I tie the enable pin to an arduino pin that has been setup for input with internal pullups enabled, I get the correct temperature!

I tested the output voltage of the pin, and measured 5V.

I thought that the temperature might be affected by a colder wire, but this really doesn't make sense, since all my wires are at ambient air temp, and I can use the same wire to connect shutdown to the 5V regulated out, and a GPIO in quick succession, and see the temperature drop when connected to the GPIO, and rise immediately to ambient air temp when plugged directly into regulated 5V.

Does anyone know what the difference could be between tying "shutdown" to an output enabled pin VS regulated 5V?


texts: How to interface GSM with 8051 microcontroller to send SMS?

texts:
I am doing a project on SMS sending through GSM
using SIM 900 module and 8051.

My code is:

#include<reg51.h>
unsigned char *command = "AT";
unsigned char *echo = "ATE0";
unsigned char *msgConfig = "AT+CMGF=1";
unsigned char *number = "AT+CMGS=\"8283******\"";
unsigned char *message = "hello";
unsigned char *CTRLZ = 0x1A;
void serial_init(void);
void serial(unsigned char);
void puts(unsigned char *p );
void delay(void);

void main()
{
serial_init();
puts(command);
delay(); // delay of approx 1 sec
puts(echo);
delay();
puts(msgConfig);
delay();
puts(number);
delay();
puts(message);
delay();
puts(CTRLZ);
while(1);

}
void serial_init(void)
{

TMOD=0x20; //timer 1, mode 2(8-bit autoreload) to set baud rate
TH1=0xFD; //-3 to TH1 for 9600 baud rate
SCON=0x50; // 8 bit txion, 1 start 1 stop bit, REN enable for both txfr and rxve
TR1=1; // start timer
}

void puts(char *p)
{
char *temp = p; /*temp pointer so that the actual pointer is not displaced */
while(*temp != 0x00)
{
serial(*temp);
temp++;
}
}

void serial(unsigned char x)
{

SBUF=x;
while(TI==0);
TI=0;

}
void delay(void) // delay for approx 1 sec
{
int i;
TMOD=0x01; // timer 0 in mode 1
for(i=0;i<142;i++)
{
TL0=0x00; // starting value from 0
TH0=0x00;
TR0=1; // sart timer
while(TF0==0); // polling TF flag for high
TR0=0; // stop timer
TF0=0; // clear flag TF0

}
}

The problem here is that the SMS has not been not sent by the GSM module.

When I use the calling function by replacing the AT commands, then calling works
but SMS does not. I think I am wrong in sending AT commands for SMS.


texts: How important is self-resonant frequency for an inductor when used in a fast (~3MHz) buck SMPS?

texts:
I'm using the LM2734Z, a 3 MHz buck regulator. It's really fast which means it has a small inductor.

One of the things I'm wondering is how important is the self-resonant frequency of the inductor? I'm using it to step 4.8V to 20V down to 3.3V ±5%.

I found a 3.3µH 2A inductor (as recommended by the datasheet for 3.3V @ 1A, I'm rating the output to 400mA maximum) "SDR0604-3R3ML." Its self-resonant frequency is 60 MHz, which seems to be well clear of 3 MHz, but it is a multiple and I'm wondering if harmonics come into it?

Even if this case is okay, is there a rule of thumb for avoiding certain resonant frequencies (i.e. if they match?)


texts: What is causing this level shift in my wave?

texts:
Excuse the quality, sorry;

RED is GATE of Q2.
YELLOW is GATE of Q4.

5V INPUT AT ALL STAGES

What are possible reasons that my H-bridge has a little 'bump' at the turn-off of the high-side?

It's reflected on the Vin(bridge) too;

Circuit:

(also here )

I've added a new shiny ceramic capacitor to the Vbridge and GND connection, but no dice. Could it be that having a ground common to my H-bridge ground is bad?
Or perhaps the capacitor is refusing to discharge beneath 6V~ for a more obscure reason?

EDIT: It's driving a 15-20mH load, but the bump is present with no-load and resistive loads on the order of 1000R, 100R, 10R.

EDIT2: Also, I've noticed that if I put in above 17V to the bridge, the power supply I'm using just shuts itself down and I have to restart the circuit.

EDIT3: Here's a bunch of images of measurements I made.

Q2 DRAIN to GND

Q2 SOURCE to GND

Q1 SOURCE to GND

Q1 and Q2 GATE to GND (10V)

NEW WAVES

5V H-BRIDGE OUTPUT

10V OUTPUT

Q2 Gate/12V


texts: Using open collector output from fan sensor to opto-isolator for MCU GPIO

texts:
I have a cooling system that uses an external temperature sensor to turn on two HDF4020L-12HHB 12VDC fans and I need to use the locked rotor sensor outputs from the fans as inputs to a MCU (5V logic) to be able to detect when each fan fails. The problem is that when the fans are operating normally the sensor outputs are triggering making it difficult to distinguish between a locked rotor condition and normal operation.

The fan datasheet doesn't specify the type of sensor output but I am assuming it's an open collector output like most other fan alarm signals. I am also assuming that I will need to provide an external pull-up resistor.

Here is my updated circuit:

I built this circuit on a breadboard to test my design and I am having trouble interpreting the results. When the fans are switched on both sensor outputs drop to about half the supply voltage (6V) and, when either one of the fans are kept from spinning (locked rotor condition) the signal oscillates between 12V and GND. I don't have an oscilloscope to accurately measure the waveform on the fans sensor output but it appears to be oscillating at a 2/3 duty cycle where the signal is high for 2 seconds and low for 1 second.

The research I have found shows the sensor output going high and not oscillating except when using a "thermal speed controlled fan or a two-speed fan" which I am not using.

Output waveform from Sanyo Denki

Output Waveform from ADDA AD0412UB-C72GP(P) datasheet

Questions:

What is causing the fan sensor output to swing from 12V to GND? Answered in comments below.
Why is the output voltage approximately half of the supply voltage when the fan is operating normally and is there a way to pull this signal high or low to prevent unpredictable behavior on the MCU input pin?

EDIT:

I updated the circuit to fix a mistake that I made by trying to source current from the open collector output on the fan. The updated circuit now sinks current when the open collector of the fan is activated which turns on the optocoupler and causes a state change on the MCU GPIO pin.

I also changed the value of the series resistor on the input of both optocouplers from 1k to 2.4k in order to limit the current through the transistor on the fan. I measured this current and noticed that the open collector is sinking about 2.4mA of current through the optocoupler when the rotor is not locked and 0.0mA/5.0mA (0V/12V respectively, as described above) when the rotor is locked.

I believe this is what is causing a false negative signal on the MCU. My guess is that the internal circuitry of the fan is switching the transistor on and off rapidly creating an averaging effect that is not visible on a miltimeter. Is this a reasonable explanation for this phenomenon? How can I mitigate this effect?


texts: Using SMPS regulation output current below nominal Current

texts:
I have one Switching power supply with Regulated current output similar to this (used for LED's):

So my partner, is saing we could not use this SMPS as power supply for our microcontroler's because it could give us only constant current and do't working in less current of it's nominal current ( 300mA for example),

So dose it is correct?

I don't think so in this kind?


texts: Can I tune the output voltage of H-Bridge built by Simscape Library?

texts:
In Simscape I built the H-Bridge converter using N-Channel Mosfet. The gates are driven by a PWM signal that I mounted. I used PS-Simulink Converter to adapt Simulink and Simscape.
The signals that go in gates are ok, but in the output scope the wave form is strongly
attenuated. The waveform goes from -0.5V to 0.5V although the circuit is fed with 10V (I tried also up to 30V).
The values in the mosfet are the defaut ones.
I tried to change the components values randomly, resulting a very small improvement.
Moreover, right click on Mosfet >> Simscape >> Block choice, I tried also to change the door type.
The waveform is visible only when the load is disconnected.
I attach the images of the output waveform.
Can you help me?

H


texts: Here as the acceptors atom are greater than the donars atom so the it must be P type. but for the 2nd part i am confused whether the concentration should i take the original concentration of boron (\$2*10^{16}\$) OR its should be \$N_a -N_d\$=\$2*10^{16}-10^{16}=10^{16}\$.can anyone help me please?


texts:
I am very new to electronics and hardware.

I want to know how can i convert 9v to 5v and 3.3v using only resistors ?

Basically, this is what i am trying to do -
I want to supply power (3.3v) to an esp 12e.
And, i want to supply power (5v) to a soil moisture sensor.
(The soil moisture sensor will be connected to the esp module.)

But, i have only one 9v battery to supply power to both.

I want to do this using resisitors.
Is it possible ?
If yes, how ?

Thanks in advance.


texts: Could someone explain attached M-bus master circuit?

texts:
Could someone explain attached m-bus bjt circuit in details?
Is this a repeater of some sort?


texts: Changed fuses on ATtiny85, now Invalid Device Signature

texts:
I changed the clock fuse bits on my ATtiny85. Now I can't flash anything to it or even change the fuse back. I get the error:

avrdude.exe: Device signature = 0x000000
avrdude.exe: Yikes!  Invalid device signature.
             Double check connections and try again, or use -F to override
             this check.

The command line command I used to change the fuse initially was:

avrdude -p attiny85 -P com8     -c stk500v1    -b 19200 -U lfuse:w:0x62:m -U flash:w:main.hex

Now I understand that I set the clock fuse for an oscillating clock signal, not for a crystal. I read here that I can supply the necessary clock signal from an stk500. My Arduino UNO is functioning as programmer (and in the command line args, I actually tell avrdude that it's an stk500). How do I connect/configure UNO and ATtiny to supply the necessary clock signal?

EDIT

I'm not trying to use High Voltage Parallel Programming. I just want to supply the external clock signal which the AVR now expects in order to program it as normal.

I have a second Arduino, and I tried to send a 16MHz square wave to pin 2 (CLK1) of the ATtiny85, using the code on this page. However, when I tried to program the AVR with both Arduinos hooked up to it (both the clock and the programmer), I got the same error as before. Any idea what's wrong?


texts: Using unshielded RJ45 with shielded Cat6 in a server cabinet

texts:
I'm about to do cabling in a server rack that consists of two switches and forty 1U servers. Since every server has three ethernet cables attached we'll have around 120 cables in a single rack.

Is putting unshielded RJ45 connector on a shielded Cat6 ethernet cable a good idea? Since the RJ45 connectors are very close to the endpoints, does it really matter (EMI-wise)?
How important is grounding of that cable? Should I go extra mile and put RJ45 connectors with metal jackets that connect to the external metal shielding of Cat6 cable?

Thank you in advance.