texts: Help with possible errors on LM306 datasheet circuit diagram

texts: Not sure if this diagram has some errors like missing nodes at wire crossing. There is an obvious one at a T-intersection but also I circled in red a couple other locations where nodes might be missing. One is below R9 because no output comes off the collector of Q8. The other is between R13 and R14 because it's strange (to me) that they are separate with nothing connecting to them in between. The circuit still does not work, so if anyone sees any other problems please let me know. Thanks.


texts: How does opamp open-loop gain affect closed-loop gain in a circuit?

texts:
The gain of an opamp circuit is basically $$A_v=-\frac{R_f}{R_i}$$

But how come the gain of the opamp itself does not appear in the equation? How is the opamp amplifying anything in the circuit? What is the opamp doing in the circuit if it does not appear in the formula?


texts: Separating a PORT into in/out and getting random nums?

texts:
Using ATMega1284

I want to generate a random number from 0-7 (maybe more range). This is the main concern. As long as it "feels" random its fine. And it could resolve the rest of my issues... anyways

My approach?
I could seed a number off of the ADC port (PORTA in ATMega1284).
This causes me to clear up PORTA for the ADC. But I still need to get another 8 outputs connected.

PORTA has ADC (1/8 pins used)
PORTB is full (8/8 pins used)
PORTC is full (8/8 pins used)
PORTD has USART on (2/8 pins used)

I still need 8 pins for output and each port is doing its thing. So could I split PORTA and PORTD so I could connect 8 more pins? how would I do this when I have UART and ADC enabled?

OR

If someone could provide an internal/better way of getting a random number. It could solve the issue entirely


texts: Is it possible to melt soft metals with household current?

texts: I'm an electronics enthusiast with an interest in welding. Just out of curiosity, I was playing around with the voltage in my house (using proper safety techniques) and I started wondering if the arc from the AC in a standard wall socket could melt some metals, like lead or copper, if non-combustible electrodes were used to strike the arc.


texts: MIMO suitability for CP-OFDM and DFT-OFDM

texts: Is CP-OFDM more suitable for MIMO than DFT-OFDM? In both schemes orthogonal subcarriers are modulated directly by symbols and by the DFT of these symbols respectively, so I was wondering if MIMO transmission/reception would favor any one of them, and if yes, why?


texts: High-side switch Vs Complete mosfet push-pull configuration to drive an inductive load

texts:
In my application, a microcontroller with 5V logic needs to drive two 12V DC fans in voltage. The microcontroller will use a PWM drive signal with a carrier frequency of 32 kHZ. For several reasons, I want to drive the fans with constant voltage sources, ie no unfiltered PWM should reach the fans.
The fans draw a maximum of 0.3A per fan, which gives 3.6W at maximum power.
I need to evaluate two kinds of designs:
The first one, which is a complete mosfet based push-pull configuration with an LC filter to linearize the PWM.
The second one, which is a simpler high side switch, directly driven from the microcontroller, with an LC filter at the output.
I am aware that the first option is more efficient, but due to cost/complexity I would prefer the second option if viable.
What are the benefits/drawbacks of one configuration over the other?

First Option uses an LM27222 driver and a dual mosfet IC:

Second option uses an ISP452 (I should go for a faster-response IC):


texts:
The design I am working on is having peripheral connector with +5V power in it providing the voltage to the would-be connected device. There's relatively a long way inside the design from the ATX power supply to the connector, with edge connector involved in between.

I am thinking about building some kind of simple protection from the shortage or overcurrent. The ATX PSU can provide enormous amperage, thus it could be a reality that something happening after the peripheral connector will fry the power lines on the way from the ATX power supply.

I know about several ways:

fuse. It will blow on overcurrent, and will need to be replaced. For the design, it is not a big issue as it is assumed that owner is able to maintain/repair it;
polyfuse (MF-MSMF020 or MF-R020). A kind of multi-fuse, while being convenient has several drawbacks. It seems its "protection time" is larger than of fuse; it heats so that there must be no parts around damaged by the heat (e.g. plastics), and if too much stressed, can eventually increase the resistance, as well as having higher initial resistance than fuse;
some electronic protection circuit.

I want to be as simple as possible; and it is ok if fuse is blown and needs to be replaced on the overcurrent event which would be considered as exception rather than a rule.

Thus the answer may be obvious - use 250 mA fuse, ideally socketed. Maybe like this on the Symbios SCSI card.

I can not find part number for such fuse.

And is there any other better way/device to achieve the protection from the external overload?


texts: Innitially turn off device with relay, Arduino and IR remote

texts:
I am suing this code to control relays with Arduino and remote.  This code is working fine for my requirements.
Only problem is that when electricity goes and come after some time all appliance turned ON automatically but I want initially all appliances turn OFF and it only turn on ON when remote key pressed.

#include <IRremoteInt.h>

int receiver = 11; // Signal Pin of IR receiver to Arduino Digital Pin 11

IRrecv irrecv(receiver);     // create instance of 'irrecv'
decode_results results;      // create instance of 'decode_results'

void setup()
{
  Serial.begin(9600);
  Serial.println("IR Receiver Button Decode");
  irrecv.enableIRIn(); // Start the receiver
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);

}

void loop()
{
  if (irrecv.decode(&results)) // have we received an IR signal?

  {
    translateIR();
    irrecv.resume(); // receive the next value
  }
}/* --(end main loop )-- */

/*-----( Function )-----*/
void translateIR() // takes action based on IR code received
// describing Remote IR codes
{

  switch (results.value)
  {
    case 0xE0E020DF:
      static int m = HIGH;
      m = !m;
      digitalWrite(8, m);
      break;

    case 0xE0E0609F:
      static int n = HIGH;
      n = !n;
      digitalWrite(9, n);
      break;

    case 0xE0E0A05F:
      static int op = HIGH;
      op = !op;
      digitalWrite(10, op);
      break;

    case 0xE0E010EF:
      static int p = LOW;
      p = !p;
      digitalWrite(4, p);
      break;

    case 0xE0E0906F:
      static int q = LOW;
      q = !q;
      digitalWrite(5, q);
      break;

    case 0xE0E040BF:
    static int v = HIGH;
    v = !v;
    digitalWrite(8, v);
    digitalWrite(4, v);
    digitalWrite(5, v);
    digitalWrite(9, v);
    digitalWrite(10, v);

  }// End Case

  delay(500); // to not get immediate repeat

}```


texts: Is there any real time clock (RTC) which provides time resolution in microseconds?

texts: I've been searching for high precision RTCs on Google but almost all RTCs like DS12C887, DS1307 provide time resolution in seconds which is ok for general use. Are there any RTC ICs which can provide finer resolution like in milliseconds and microseconds?


texts: Cannot get code to run on prototype board STM32F303x

texts:
... but it runs on Discovery F3 board (exact same MCU). BOOT0=Lo, NRST=Hi
The logfile generated when I try to upload code is as follows:

Thu Apr 23, 2015 09:56:23: Loaded macro file: C:\Program Files\IAR
Systems\Embedded Workbench 7.0\arm\config\debugger\ST\STM32F3xx.dmac
Thu Apr 23, 2015 09:56:23: Loaded macro file: C:\Program Files\IAR
Systems\Embedded Workbench
7.0\arm\config\flashloader\ST\FlashSTM32F3xx.mac  Thu Apr 23, 2015 09:56:25: ST-Link firmware too old  Thu Apr 23, 2015 09:56:25:
Connected to ST-Link/V2  Firmware V2.J16.S4 (Probe no: 2798FD0D)  Thu
Apr 23, 2015 09:56:25:
Selecting SWD as current target interface.  Thu
Apr 23, 2015 09:56:25:
Thu Apr 23, 2015 09:56:25: Initial reset was performed  Thu Apr 23,
2015 09:56:25:
Hardware watchdog  Thu Apr 23, 2015 09:56:25:
(15.29 Kbytes/sec)  Thu Apr 23, 2015 09:56:25:
C:\Program Files\IAR Systems\Embedded Workbench
7.0\arm\config\flashloader\ST\FlashSTM32F3xxRAM32K.out  Thu Apr 23, 2015 09:56:25:
file: C:\Program Files\IAR Systems\Embedded Workbench
7.0\arm\config\flashloader\ST\FlashSTM32F3xx.mac  Thu Apr 23, 2015 09:56:27:
to flash memory.Hardware reset with strategy 0 was performed-I- execUserFlashInit!  Thu Apr 23, 2015 09:56:25:
-I-736 bytes downloadedLoaded debugee:Target reset  Thu Apr 23, 2015
09:56:27:
C:\Users\dbruere\Documents\SoS\Debug\Exe\SoS.outUnloaded macroDownloaded


texts:
I recently started learning electronics on my own due to interest in audio effects because I play guitar so:

I thought I'd start out with distortion pedals, they seemed the simplest to begin with.

The schematic below is from a clone of the famous Boss OD-1 overdrive pedal.
I am getting a hold of the thing and starting to understand how it works but I've gotten quite stuck now, I can't find what the function is of a capacitor running into a resistor that goes to ground, as is the case of C3 and R5 here, just can't find it anywhere.

Any help on understanding this is really appreciated.

Greets, Nook


texts: Advantages of using a Powdered iron core for an Inductor

texts:
I was suggested to use an iron core for an inductor. I found that it has low permeabilty and good stability, but how does that make it a good material for the core. And is there a way to figure out the saturation condition for it?

The one i am using is: http://www.micrometals.com/pcparts/torcore5.html  - T-130 - 52


texts: Can somebody please explain how Kirchhoff’s law works in an RLC circuit with DC


texts: Using 3.3V or 2.5V for ADC and powering Op Amp from 3.3V or 5V

texts:
So the idea is that AIN1 accepts a 0-5 V signal which is protected against short circuits to 30 V.

I also want to connect a thermistor between GND and AIN1 with no external components (resistor and power supply) so I have the left hand side of the circuit which provides a 5V reference voltage. The FDv304Ps switch between the 4k02 and 560R provide better resolution across a wide temp range.

At the moment AIN1 is protected with a SMBJ5.0A

AIN1B is the output then connects to an ADC on an STM32F

This was my first idea:

Please ignore the lack of ground symbol, it's because I have multiple analog grounds and multiple different symbols would get confusing.

AINB is the output.

But after doing some research I found the following problems:

When using a thermistor it would be very hard to scale due to having one voltage divider (the thermistor and TR1/2) feeding another (R122&125).

The SMBJ5.0 will introduce an error into the voltage divider but I think I can overcome this by using an SMBJ13A which has a much lower leakage current.

Is it best to add a voltage follower op amp between AIN1 and R122 or just to use a SMBJ13A instead of the SMBJ5.0A?
This question is only relevant if I do use the second Op Amp. I will need to power the first op amp (IC11B) with 5V so I can accept the 5V input or if a MOSFET is activated without a thermistor connected. This will mean powering the second (IC11A) with 5V. Will this affect the output AIN1B or will it still have a maximum of around 2.5V? I now know that the output will not be affected by the power supply to the OA
At the moment the resistors are set to allow a max of 2.5V and I am using a precision 2.5V reference to supply the Vref+ pin of the STM32F. This was done on a recommendation but I'm unsure why. Should I leave it like it is or use 17k & 33k resistors and a 3v3 reference? What are the benefits of both options?

Thermistor values are vague at best but one would have the following values:

20 °C  2.1 - 2.9kΩ
50 °C  0.68 - 1.00kΩ
90 °C  0.236 - 0.260kΩ

Temp range would be -5 to 100 °C.

I'm more concerned if the actual circuit will work reliably, be protected against shorts to up to 30 V and be able to read the full 0-5V analog input.

Update based on comments and Dorian's brilliant answer:

The thermistor will be connected between AIN1 and an external ground with a current capacity greater than any nearby live so the ground side of the thermistor connection can be considered fully protected. I am only after protecting the analog input (AIN1).

When not using a thermistor the FETs will be turned off and a sensor with an analog output of 0-5V will be connected to the analog input. A typical sensor will be a 3-wire automotive pressure sensor, with 5V, Ground and the Output signal. 5V is already protected and the ground is the same as above.

I am no longer worried about scaling as the sensors will need to be reverse-engineered and I'll have to use look up tables etc.

So will this circuit work as intended and be protected from permanent shorts of up to 30V?

What other way can I achieve this?

As above what is the benefit of setting a max output and reference voltage of 2.5V rather than using 17k & 33k resistors and using a reference voltage of 3.3V? What would you do and why?


texts: Deriving the formula of oscillation frequency for the Phase Shift Oscillator

texts:
My aim is to find the oscillation frequency of a Phase Shift Oscillator.

I start by finding transfer function of the cascaded RC network.

$$
V_o(s) = \dfrac{\dfrac{1}{C_3s}}{R_3+\dfrac{1}{C_3s}} V_2(s) = \dfrac{1}{1+R_3C_3s} V_2(s).
$$

Similarly,

$$
V_2(s) = \dfrac{1}{1+R_2C_2s} V_1(s) \quad\text{and}\quad V_1(s) = \dfrac{1}{1+R_1C_1s} V_i(s).
$$

Then the transfer function is:

$$
\begin{array}{lcl}
H(s) = \dfrac{V_o(s)}{V_i(s)} &=& \dfrac{1}{(1+R_1C_1s)(1+R_2C_2s)(1+R_3C_3s)} \\
&=& \dfrac{1}{R_1R_2R_3C_1C_2C_3s^3 + \dots} \cdots \\
&& \dfrac{}{(R_1R_2C_1C_2 + R_2R_3C_2C_3 + R_1R_3C_1C_3)s^2 + \dots} \cdots \\
&& \dfrac{}{(R_1C_1 + R_2C_2 + R_3C_3)s + 1}
\end{array}
$$

So the frequency response is:

$$
\begin{array}{lcl}
H(j\omega) &=& \dfrac{1}{j\omega \left[ (R_1C_1 + R_2C_2 + R_3C_3) - R_1R_2R_3C_1C_2C_3\omega^2 \right] + \dots} \cdots \\
&& \dfrac{}{\left[ 1 - (R_1R_2C_1C_2 + R_2R_3C_2C_3 + R_1R_3C_1C_3)\omega^2 \right]}
\end{array}
$$

Now, we are looking for a special \$\omega\$ value, \$\omega_0\$, for which the argument of \$H(wj)\$ will be \$\pm180^o\$. Clearly, it happens when

$$ R_1C_1 + R_2C_2 + R_3C_3 = R_1R_2R_3C_1C_2C_3\omega^2 \Big|_{\omega=\omega_0}. $$

Hence we find the oscillation frequency as

$$
\begin{array}{rcl}
\omega_0 &=& \sqrt{\dfrac{R_1C_1 + R_2C_2 + R_3C_3}{R_1R_2R_3C_1C_2C_3}} \\
\text{f}_0 &=& \dfrac{1}{2\pi} \sqrt{\dfrac{R_1C_1 + R_2C_2 + R_3C_3}{R_1R_2R_3C_1C_2C_3}}
\end{array}.
$$

When \$\quad R_1=R_2=R_3=R\quad\$ and \$\quad C_1=C_2=C_3=C\quad\$:

$$ \text{f}_0 = \dfrac{\sqrt{3}}{2 \pi RC} $$

However, according to all online articles including Wikipedia, the formula for the oscillation frequency is

$$ \text{f}_0 = \dfrac{1}{2 \pi RC \sqrt{6}}. $$

I did an experiment with the exact circuit I attached above with \$R=1k\Omega\$, \$C=100nF\$, \$R_i=1k\Omega\$ and \$R_f=33k\Omega\$ by using TL084 opamp. I observed the oscillation period as 7.4ms.

According to the formula I derived above, it should have been

$$ \tau_0 = 2 \pi (1k\Omega) (100nF) / \sqrt{3} = 362.76 \text{ns}. $$

And according to the other's formula, it should have been

$$ \tau_0 = 2 \pi (1k\Omega) (100nF) \sqrt{6} = 1.539 \text{ms}. $$

Finally, my questions are:

Why is the formula I found above is different than the other's formula? Where did I make the mistake? Did using a an extra opamp for buffer affect it?
Why does the period of my oscillator differ so much from what the both formula say?


texts:
I'm creating a motor driver for a BLDC motor. I was wondering how we can calculate or choose what capacitance we need for our purposes.

We're using the motor driver for a chain drive /transmission system. We pull around 20A and supplying our driver with 36V. Im not sure what other info is needed, but thanks!


texts: AL5802 LED-Driver works on the breadbord, but not on its (seemingly functionally identical) PCB

texts:
TL;DR:
I'm working on a project that incorporates (besides other things) two AL5802 linear LED-drivers in parallel. Unfortunately, I felt balsy and had my complete PCB made in China before testing the circuit on a breadboard. Murphy’s law struck and the LED-drivers don't work on the PCB. When trying them out on a breadboard using adaptor-PCBs, they oddly do work perfectly.

Disclaimer: The connection between EN and GND was an error and I fixed it by bending that pin away. I am also very certain that the other components on the PCB don't interfere with the LEDs.

Detailed description:
I have been working on a project for several months now. The most recent addition to my endeavor were two AL5802 linear LED-Drivers. Previously, whenever I was trying new components, I asked my buddy to route a few adaptor boards so I could plug them directly into my breadboard.

With all the other components working together nicely, I decided to expand the functionality of my project by adding said driver ICs, which would then drive multiple LEDs. Unfortunately, I got balsy and instead of having adaptor-PCBs done and playing around on the breadboard first, I added them to my finished Eagle-Board straight away and sent it off to Elecrow to be produced.

After they arrived and me having soldered all the components onto it, everything worked except for the LEDs... Measuring the voltage of the out-Pin showed 0V and the current supplied to the LEDs was (obviously) 0mA.

To make troubleshooting easier, I got adaptor boards routed. Oddly enough, they worked perfectly on my breadboard. When comparing the schematics of the adaptor-boards with the ones I had made at Elecrow, they seem functionally identical.

Question: What on earth have I messed up on my Elecrow-PCB? Is it an error in my layout or have I failed at soldering (I currently don’t have a proper magnifying glass and the lighting conditions in my electronics space are terrible).

Images:

1 - Partial schematic of my Elecrow-Board:

2 - Partial board view of my Elecrow-Board:

3 - Schematic of my Adaptor-Board:

4 - Photo of the Breadboard-Setup using my Adaptor-Board (I deadbugged the 2nd chip onto a different board):


texts:
I'm trying to manually* configure a USART on a Nucleo F401RE to transmit over the USB virtual COM port, which means using USART2 on PA2 (TX) and PA3 (RX). Not only am I not receiving any characters, but the TX pin is never high, which I believe it should be when idle.

Here's what I've done:

PLL is running at 84MHz (confirmed using MCO), and the APB1 prescaler is set to /2:

RCC_CFGR =
    (2 << RCC_CFGR_SW_BIT) // Use PLL as clock source
    | (0b100 << RCC_CFGR_PPRE1_BIT) // Prescale APB1 clock /2
;

GPIOA peripheral clock is enabled:

// Enable GPIOA peripheral clock
RCC_AHB1ENR = RCC_AHB1ENR_GPIOAEN;

Then the USART configuration:

GPIOA_MODER |= 0b1010 << 4; // PA2, PA3 to AF
GPIOA_OSPEEDR |= 0b1111 << 4; // PA2, PA3 to high speed
GPIOA_AFRL |= (7 << 8) | (7 << 12); // Set PA2, PA3 to AF7 (USART2)
RCC_APB1ENR |= RCC_APB1ENR_USART2EN; // Enable peripheral clock for USART2

// Baud rate 115k2 with SYSCLK 84MHz (BRR = 45.5625)
USART2_BRR = (45 << 4) | 9;

USART2_CR1 = USART_CR1_UE | USART_CR1_TE;

I believe at this point, TX should be high, but it isn't. I send with:

while ((USART2_SR & USART_SR_TXE) == 0);
USART2_DR = c;

Turning on the LED within the while shows that the transmit buffer is initially filled. Turning it on after the while shows that it successfully empties. Using TC instead of TXE shows it is considered successfully transmitted.

What have I missed?

All the code is here: https://github.com/danellis/zeptos/tree/usart-fail

* Please don't try to persuade me to use CMSIS or mbed; it's a learning exercise.


texts:
I know this is strictly not an electrical engineering problem, but I think it's where it has a best chance of being answered.

I'm using a MOXA IOLogik (it's a Ethernet Micro RTU Controller) to monitor and control some security systems with digital IO and I want to modify a IOLokig internal register via TCP to send some commands to the controller from a server.

Anyone knows how to do this? how should the structure of the TCP message be?

UPDATE: It uses the modbus protocol for communication.

Thanks a lot


texts: Opamp Vos trimming in a single supply circuit

texts:
I have a need to trim the Vos of an op-amp (LT1006) running in a single-supply circuit (12.6V). From what I found so far the proper way to do this would be by using some bias voltage connected to both inputs rather than using ground as an input which would only work correctly in a dual supply circuit.

Here's the constraint: the op-amp will already be soldered to the final PCB at this point and I can't easily lift the inputs off the ground to perform the trim using an offset voltage.

I can however quite easily temporarily provide an external negative supply (-12.6V) to operate the op-amp in bipolar mode during the trimming process (and use grounded inputs).

My question is: would my Vos trimming still be correct if I subsequently operate the opamp with a single supply?

Any suggestions to perform trimming in a different way?

More information:
The circuit is simply a low-side current sense amplifier using a single supply. Trimming would be performed by shorting Rs and trimming output to equal GND.

simulate this circuit – Schematic created using CircuitLab


texts: NTC thermistor series/parallel resistor calculation for MCP73833 linear Li-Ion charger

texts:
I am using MCP73833 which has the following datasheet
https://ww1.microchip.com/downloads/en/DeviceDoc/22005a.pdf

Internal diagram as follows:

They says that "An internal 50 μA current source provides the bias for
most common 10 kΩ negative-temperature coefficient
thermistors (NTC). The MCP73833/4 compares the
voltage at the THERM pin to factory set thersholds of
1.20V and 0.25V, typically"

Now the formulas shows that

For example, by utilizing a 10 kΩ at 25C NTC thermistor with a sensitivity index, β, of 3892, the charge temperature range can be set to 0C - 50C by placing a 1.54 kΩ resistor in series (RT1), and a 69.8 kΩ resistor in parallel (RT2) with the thermistor as depicted in Figure 6-1.

Now I just can't figure out how to properly calculate the resistors required series/parallel with NTC for desired window set, a more generic way based on RHOT and RCOLD (ie. for other range)

The best I came up with and I am stuck. Appreciate a little help.

1           1           1
----    =  ------ + --------
24-RT1      RT2       rcold

1           1           1
----    =  ------ + --------
5-RT1      RT2       rhot


texts: Do I need a regulator with a standard 5V wall adapter?

texts:
I'm about to start my second PIC based project using a PIC16F688, and I have an old cell phone charger (Pantech 5V output). Should I use a regulator (or verify if the adapter is regulated)?

NOTE:
I'm not sure what scenarios warrant the use of a regulator, and which scenarios do not. I'm using the microcontroller to interface with an LCD - so I'm also not sure how sensitive I should expect it to be to 'dirty' power.


texts:
I ordered this electronics project kit which consists of a small PCB. You have to solder the components onto the board.

The components are:

Two 510 ohm resistors (green, brown, brown)
Two 33k ohm resistors (orange, orange, orange)
Two transistors
Two electrolytic capacitors
Two LEDs
Power leads red to VCC and black to ground.

After assembling the circuit here is my result. The two LEDs light up.

The booklet does not state what the circuit is supposed to do.

Is two lit up LEDs all that the circuit is supposed to produce?

What would the schematic look for like this circuit?


texts: Raspberry Pi DC motor control with position feedback

texts:
I'm interested in controlling a DC motor using a Raspberry Pi and I want to know the approximate position of the motor.
I have seen multiple ESC for sale but most don't appear to provide any feedback, they are at best open loop with the Pi providing the targeted speed and the controller doing its best to keep up.
I'm interested in both brushed and brushless solutions but for my immediate application it would be brushed.
What are some solution? Can the PI handle sampling an encoder directly? I did come across one controller but its price was well outside my range.
Thanks


texts: Where would Iceo flow through and would it cause thermal runaway?

texts:
I was reading this page about thermal run away.

And it mentions:

  Due to increase in the temperature of collector junction, Ico will
  increase, Vbe will decrease.

But for Ico to increase Ic and Ie, the Ico has to flow through the base-emitter junction and eventually to ground. This would amplify Ico (aka Icbo) and create Iceo = (1+beta) * Icbo.

But all these would happen if R2 would not exist. I mean the above circuit is not the same circuit here.

Since there is R2 which provides a path to ground, would Ico still flow through base-emitter junction or flow through R2 to ground? Because, to me if it flows through R2 it wouldn't cause thermal runaway. (?)


texts:
I'm looking to implement a watchdog circuit. Tried the standard "missing pulse detector" schematic such as one from http://www.falstad.com/circuit/e-555missing.html - and it works well when the input stuck to high.

However if input stuck to low (for example my application crashes at the exact moment when I'm resetting the watchdog pin), this circuit fails to detect missing pulse. This could be seen in the same schematic with logic replaced by AND.

Is there a reasonably simple schematic which can truly detect a missing pulse, no matter whether input got stuck on high or low? I know there's always MAX6814 or TPL5010 would work, but their price tag isn't attractive (10x-3x of attiny which can do the same).

What I want is basically:

INPUT: 010101010101     OUTPUT: 1111111111
INPUT: 010100000000     OUTPUT: 1111110000
INPUT: 010111111111     OUTPUT: 1111110000


texts:
I need help identifying the checksum algorithm in the following packets please.

So, packets format is:

sd ?? dd dd dd ??

where

s = start nibble
d = data (binary coded decimal)
? = unknown - possibly checksum

Here are five packets (number being transmitted in brackets) and the actual packet sent on the wire in hex on the right.

(1112694):  f1 f7 11 26 94 74

(5432432):  f5 7c 43 24 32 a2

(6430116):  f6 dc 43 01 16 48

(3254817):  f3 d8 25 48 17 e9

(0042863):  f0 ce 04 28 63 b2

I've tried XOR and summing but they dont seem to work.  The packets are transmitted using UART.

any help appreciated!


texts: Why are two different forms for 1st order transfer functions often presented?

texts:
In my notes from a controls course, we derived the transfer function for a first order system, and it was given as $$\frac{1}{1+sT}$$

However, the notes also state that
$$\frac{K}{1+sT}$$

Is the general transfer function for 1st order systems. I am very confused on how they can both represent the same system. I initially thought I had misunderstood the first equation and that it was a transfer function for a particular solution, but this http://ece.gmu.edu/~gbeale/ece_421/xmpl-421-1st-order-01.pdf set of notes and What is the significance of the standard form of 1st and 2nd order transfer functions? this question suggest that it fact a general transfer function.

The question in the second link actually asks why sometimes one is given instead of the other, but I would like to know how it is possible for two transfer functions to be equivalent when they differ by a factor of K.  Where am I going wrong? Thanks in advance.


texts: If the output of a D type flip-flop appears immediately on the clock edge, how can the previous output be used?

texts:
The way I understand it, the input value (D) of a D type flip-flop appears immediately on the output (Q) of a D type flip when triggered by a positive clock edge. If this is the case, then how can the value before the clock edge be used as an input to another clocked flip-flop? According to this model, there's no particular value at all right at the edge of the clock.

Of course, flip-flops do work so it's my model of understanding which is wrong. So can anyone elaborate this a bit more?


texts: Strain gauge installation tester vs. insulation tester

texts:
An insulation tester (or a Megaohmtester) costs in the range of 500-1k USD and can measure up to G-Ohm and more in resistance. Even a big brand tester like Fluke 1587 costs under 1k. Not saying they are cheap, until I was blown away looking into some instrumentations recommended by strain gauge manufacturer such as this Strain Gauge Installation Tester - priced at a whopping USD2933! It's heavy, bulky, with no digital read out, limited in range (only ~20MOhm), but costing 3-4 times more.
What makes this strain gauge tester so expensive? I don't see any advantage of that over a wide selection of insulation testers available in the market unless someone prefer mechanical/analog display or big mechanical buttons for whatever reasons. Perhaps I'm wrong and someone can help elaborate on their difference and when to use which.


texts:
I am trying to design a boost converter which converts 100mV to 5V. 100mV is the minimum I get from my DC motor which I used as a generator and max is around 1V.

I tried searching for the IC's which does this but didn't find any. I found some IC's whose minimum operating voltage was around 500mV but I need 100mV. So I was thinking of using a DC transformer to amplify the 100mV. Is it possible to do this? Or is there already available IC's which does this?


texts: How do I choose the correct op amp to amplify a high frequency sine wave (>500kHz)

texts:
I am working with ultrasonic transducers (12mm diameter, 500kHz).  With my present physical setup, the transmitter is excited with a 3.3V p-p sine wave.  The receiver is showing a nice clean sine wave with around 20mV  p-p.

I want to amplify this output signal to around 10x the amplitude (~200mV) or greater. I have investigated op amps for this purpose, and have learned that op amps have "slew rates" and "bandwidths".  I could not find any clear reference material on how to choose the correct op amp parameters for my specific application.

Can anyone provide some pointers on this?


texts: How can I separate/isolate two parallel circuits running on the same battery?

texts:
I am mixing audio tones from two 555s.

simulate this circuit – Schematic created using CircuitLab

The basic circuit is working fine so I have not shown all the little capacitors and resistors, etc.

I want to control the volume of 555 #1 only.

That is, I want to be able to set 555 #1 to 0 volume but still hear 555 #2.

I tried using a potentiometer as shown in the diagram. But if I set it to 0 resistance, all the current goes to ground and I cannot hear 555 #2.

I also tried using a large 256K  pot at the output of 555 #1. This reduced the volume but the sound was still just audible.

Is there some way to isolate the two branches?

Is there some method with transistors?

Do I have to use two separate power sources?

What other options are there?


texts:
Can anyone explain the connection of the voltage divider in this image, why it's connected to A0?
I put a red circle on the section that i don't understand.


texts: How to properly assemble a flyback transformer?

texts:
I have generated a transformer assembly project online for my flyback transformer.

The Diagram:

The Winding instructions:

How do I connect the Primary First coil and the Primary second coil to obtain the correct electrical diagram?


texts: Unable to set transfer function on Matlab Simulink

texts:
I am trying to design a P controller for which I need a transfer function.  I am unable to set a second order equation in the denominator.
When I do, it shows num(s)/den(s) written inside the transfer function block, while when I write any first order equation in denominator, the same transfer function appears written inside the box exactly.


texts:
I use a L293D to drive a 7.4V (280mA/phase) stepper motor.
I rotate the small motor 1 rev per DAY.
The L293D is hot all the time even though the motor turns only once per day.
I saw there are “Enable” pins, and I keep them high all the time.

If I set the Enable pins LOW most of the day, will this reduce the heat I feel on the chip?


texts: Read temperature sensor from microcontroller to Android application (via microUSB)

texts:
I'm working on a concept for a project, and I'm having difficulty determining whether this application is possible.

I will have some misc. microcontroller with an attached temperature sensor, and that microcontroller will be connected to an Android device via Micro USB. Is it possible to read that sensor and display results on the Android application, or are there hardware limitations to this?

Having the microcontroller send data to a server is not an option, as one of the main purposes of the project is for the Android device to handle most of the work and the microcontroller will not have network capabilities.


texts:
I'm trying to measure the reverse leakage current of some diodes with the method proposed HERE - the diode is connected in reverse bias to 5V through 1 megaohm and voltage is measured across the resistor, the current is calculated from the voltage. However I need to do this as accurately as I can, and as I understand the input impedance of the measurement device will distort my results greatly because it is close to the resistor's value. Instead of a voltmeter I'm using an oscilloscope (1M input impedance, 10x attenuation probe). My questions:

How would one compensate the change in measured voltage due to the voltmeter input impedance?
Is there any difference to doing this while using an oscilloscope?

If I'm doing something wrong here it would be nice to know as well. Any input is greatly appreciated!

EDIT: As I suspected, the way to go here is to consider the voltmeter/oscilloscope to be a resistor in parallel of the load to be measured - as Andy suggested. You should also check EM Fields' answer for measuring methods. HERE'S a well written paper about the effect of measurement device input impedance on your circuit.


texts:
How to given power for nRF8002 chip?Pin 1-4 used for supplying power,but i didn't know the how power is given(1.9 - 3.6 V).nRF8002 development kit is the only solution for configuring this soc?

Data sheet for nRF8002 soc

Thanks for your valuable comments in advance.


texts: Difference between Micro-Operations in RISC and CISC processors

texts:
I've read that the modern Intel processors use the CISC instructions on the top, which are converted into RISC-like simpler instructions in the form of Micro-Operations at the back-end.

So if Intel micro-ops are RISC-like simple hardware level controls, then what do the ARM Micro-Operations do?

Because ARM instructions are already quite RISC-like, what would their Micro-Operations form look like?


texts: Modifying an old phone to draw less power?

texts:
I have a phone that I would like to install in my car as a GPS tracker, using the following guide: http://gizmodo.com/5691724/how-to-track-your-vehicle-on-the-cheap

I'd like to keep it hardwired to the car if possible.  The requirements:

The phone needs to stay on at all times
The phone needs to be drawing minimal power from the battery
The phone needs to have the screen and keypad removed to reduce its size

Would removing unnecessary hardware reduce the power draw of the phone?  What can I do to minimize the chance of killing my battery with this thing?


texts: How can I add Board Shape to output job in Altium Designer?

texts:
When I want to add board shape to final output in output job, I draw board shape on a useless layer and then I add that layer to output job.

Is it possible to add board shape automatically in Altium Designer?


texts:
I am asking if the battery needs a specific amount of current to charge and I tried to charge it throw a charging circuit (which is designed for the battery), will it limit the current so it will be suitble for the battery ?.
example : lets say that I have a battery that need to charge on 1 amp, if I connect 2 amps to the charging circuit, will it provide only the needing 1 amp ?
also, what will will happen to the 1 amp that gets reduced by the charging circuit ?.


texts:
So I am trying to make a basic FSM in verilog to turn on 3 different LEDs. I've looked at examples and other people's work, but I can't understand why mine wont work. Maybe someone can help me spot a bug in my code I can't see.

module blink( input rst, output reg [2:0] leds, output LED);

OSCH #("2.08") osc_int (                    //"2.03" specifies the operating frequency, 2.03 MHz. Other clock frequencies can be found in the MachX02's documentation
        .STDBY(1'b0),                           //Specifies active state
        .OSC(clk),                              //Outputs clock signal to 'clk' net
        .SEDSTDBY());
wire clk_slow;              //this will be the slower clock wire

reg [21:0] cnt;                     //these two lines use the fast clock to increment a 21 bit register
always @(posedge clk) cnt <= cnt+1;

assign clk_slow = cnt[21];      //this is high whenever the 21st bit of the fast clock register is true, thus slowing the clock to about 1 Hz
assign LED = clk_slow ;         //status LED so I know my clock is working

reg [1:0] state;
reg [1:0] state_n;

    parameter S0 = 2'b00;           //state paramenters
    parameter S1 = 2'b01;
    parameter S2 = 2'b10;

always @ (posedge clk_slow or posedge rst)  //state changer
begin
    if(!rst)
        state <= S0;
    else
        state <= state_n;

end

always @ (*)        //changes next state
begin
    case(state)
        S0: state_n = S1;
        S1: state_n = S2;
        S2: state_n = S0;
        default state_n = S0;
    endcase
end

always @ (*)        //decides what leds to light based on state
begin
    if (state == S0)
        leds = 3'b001;
    else if(state == S1)
        leds = 3'b010;
    else if(state == S2)
        leds = 3'b100;
end

endmodule

I'm not quite sure why it isn't working. The status LED I have hooked up is blinking at 1 Hz, which is correct. My other 3 LEDs seem to be stuck in State 0... or something. When I hit the reset button, it sometimes changes my LEDs to state 1, but I think that has to do with clock overlap. Any help is appreciated.

I am using a Lattice Diamond FPGA to program this. I am using the onboard clock to generate the initial clock, and I am using on board LEDs. My reset button is external and active low.


texts: Conversion Process From Single-Ended to a Differential Filter

texts:
I have a single ended filter which is quite similar to the one on the following picture;

My question is how to convert from single ended to a differential filter. Especially the inductors and capacitors which are going to the ground?
Should one multiply or divide its values? or ?

Thanks/


texts: Vehicle tracking and direction processing

texts:
Im trying to find a good way for tracking vehicles. Its like counting all the vehicles (cars, motor cycle or any vehicles)through a point on the road. Also it needs to count like how many in total and in each direction. It should work well in Nights or in Rain or deosnt matter what ever the condition.

If we go for camera way, its having limitations in extreme darkness (IRs can helpful in some extend) or when a strong light into the lens. So thats just be OK for some demo purpose and not a foolproof solution.

IR transmitter arrays and receiver placed at 4-5 meters above the road at some arches or some sort of things can track. But then the same issue if a strong light and external IR interference. Also Im a very beginner in electronics. So with my very little knowledge I dont think IR is OK or it will work for 5-6 meters.

Next way I got into my mind microwave doppler radar (like HB100). But it can only detect movement at some area. Its not giving any direction or location specific info.

When googling I found another way implemented at some locations like pressure sensor arrays been setup on the road as two lines and based on some analysis it can track. But its not sounds to be a perfect solution.

So I thought about laser (Laser Distance Measure Module) but I have  a little worry about its response time and will it work perfectly for the situation.

So any ideas highly appreciated.


texts: Are all USB "audio adapters" DAC's? Can USB ports be used for analog output?

texts:
Kind of a weird question..

Background:
My motherboard has started producing weird static(buzzing) noises on the audio output(3.5mm jack), it's not noticeable when using headphones, but on speakers it gets quite annoying, and it gets louder as I start 3d games. This is not a problem at all if I output the sound via HDMI, to my TV and then my speakers, so I figured it should be a problem with interference after the DAC on the motherboard. In an attempt to fix this without changing motherboard I thought I could try an external DAC through USB. I tried the simple USB-3.5mm jack adapter that came with my headphones and the noise is still there. This confused me slightly as I though USB was all digital, and the adapter should have it's own DAC.

Actual questions:
Can USB ports output analog audio to these small adapters?
Or do all USB to jack adapters have a DAC?
Is my DAC/Adapter outputting noise because there is noise on the USB power supply from the motherboard?
Would a new bigger DAC with it's own power supply fix this?

I tried looking at the USB 2.0 Specification but couldnt really find anything to help me there. This is my first question on StackExchange, and I don't know if this is the right section.


texts:
I'm trying to find the smallest possible primary cell (preferably lithium). I've come up with the CR927, which is still a little bit big, and the CG-320, which is unfortunately a bit too long. It's for an ultra low power RTC backup, so only needs ~5mah. It would be great if the biggest dimension was 5mm, but its OK if it's up to 10mm as long as the other dimensions are <5mm.  Does anyone have any suggestions on batteries, or where to find them? I've tried looking but there doesn't really seem to be a big battery list. Failing that, how easy is it to get custom battery samples?

Edit: The operating voltage is 1.5-3.6V, but small enough batteries can be stacked.


texts: How does an AND gate behave in this situation?

texts:
I'm a beginner and I want to know how a logic gate circuit works:

Will the led turn on just when I press the 2 switches? Or I'm doing something wrong?


texts: How I can manage my voltage and current requirement for my loads

texts:
I have a battery power source of rated 25.9 V, rated capacity is 10Ah
I want pure 24VDC and enough current for the following loads

3 motors each of the operating voltage is 24V and nominal current is 2.5A (using TI motor driver DRV8871)
6 Sensors each of them work on 12-30V and the max current consumption is 35mA
Encoder which works on 5V and max current consumption is 57mA
I will also use RCOM isolated DC supply which converts 24V into 5V which will power my microcontroller board CC1350 Launchpad

My main concern is how I can convert battery voltage to 24V at enough current to power these


texts: Using Python to simulate an LTspice netlist

texts:
I am new to Python, and I want to simulate LTspice circuits automatically using Python.

I added the library ltspice and scripted a fair amount in order for Python to automatically generate an LTspice netlist I want.

The problem I am facing is that I don't know what command I should use to simulate the netlist in LTspice using Python so I can plot the output voltages and currents.

Looking forward to your suggestions.


texts: Voltage divider in parallel with DC motor driven by H-Bridge: can someone explain me this circuit?

texts:
I have a battery powered device with a PCB wich control a small DC motor (3V).
With a little bit of "reverse engineering" I darw this schematic:

So there's an 8-bit IC (STM8L052C6) that drive the motor via H-Bridge (the transistor have DH and EH printed and some other unreadable chars... the device is chinese).

Can you explain me what is the R10-R11-C1 section?

The device is capable to 'understand' when motor reach two endpoints but without endstops, so can it be a sort of current sensing circuit to detect stall current?


texts: Control of large number of analog devices

texts:
For research that I work on we have photonic chips that have 100-200 analog devices on board. I wish to control these devices at a rate of ~-1 MHz from an fpga.

Some require a current source and others a voltage source. As a solution to this I was wondering using the LVDS pins on an FPGA and PWMing the signal. If it’s attached to a current source we can directly drive it. If it’s attached to a voltage source we can drive a capacitor with the lvds signal.

I was wondering what people thought about this approach.


texts:
A.S. The question A question on pull up resistors answers only a part of my question as already mentioned in "EDIT" made shortly after this question was asked & answers here (below) are much detailed, in-context & easy to understand. Definitely not a duplicate; marking as duplicate for 2-3 points

I am reading a book on Arduino & I just do not understand the concept of push-up resistor, following is a quote from the book:

  Why do we need the resistor R1? R1 guarantees that the Arduino’s digital input pin 7 is connected to a constant voltage of +5V whenever the push button is not pressed. If the push button is pressed, the signal on pin 7 drops to ground (GND), at the same time the Arduino’s +5V power is connected to GND, we avoid a shorted circuit by limiting the current that can flow from +5V to GND with a resistor (1 - 10 KΩ). Also, if there was no connection from pin 7 to +5V at all, the input pin would be “floating” whenever the pushbutton is not pressed. This means that it is connected neither to GND nor to +5V,  picking up electrostatic noise leading to a false triggering of the input.

Another book called it Arduino's pull-up resistance because it pulls current towards 5V, which confuses me even more - how can a resistor increase voltage, shouldn't the voltage drop?

  Edit - thanks to @Golaž for pointing to helpful material at  A question on pull up resistors, in comments (this edit was inserted on Mar 30 at ~6).

So, what is this whole concept? And which term push-up/pull-up is correct?

Also, with reference to that circuit above -

What is floating pin?
How does R1 avoid a shorted circuit? Why does it count as short cicuit & not closed circuit. After all GND is a sink.
Is a short circuit serious problem at mere 5V

I have already read:

What are the mechanisms at work in a pull-up or pull-down resistor circuits with a push-buttons and a GPIO?
Push-pull/open drain; pull-up/pull-down

But I still don't quite grasp it.


texts:
I have 24 Leds on a MAX7219 that I'm connecting to my Fez Panda 2. The Leds should pull around
160ma which I don't want to supply directly off the Fez 5V pin. It should handle it but I have other things pulling from the controller as well. The AC adapter I have is a switched 9V 2amp.

I have an extra L7805CV voltage regulator lying around so I was thinking I could split the Power cable, then power both the Fez Panda and the L7805CV with the same AC adapter. I could then use the L7805CV to power the LED matrix. This should save me from having to incorporate another 5V AC adapter. I take it I would have to tie the grounds together after the regulators as well?

Does this sound like a workable design, or is there a better alternative?

Thanks!


texts: Grounded AC-DC power supply, what connects to earth ground?

texts:
In an AC-DC power supply, how is earth ground typically used?

Take a common PC power supply as an example, does the earth ground connect to the metal chassis? Does it connect to the DC ground on the outputs? What about ground loops?


texts: Where can I buy a 4 terminal P-Channel Enhancement MOSFET?

texts:
I have a simulation working with a 4 terminal MOSFET. I'm looking for experimentally verifying my circuit but I cannot find the P-Channel Enhancement MOSFET with a separate body connection to order online. The body is not connected to source but it is tied to VDD in my case, hence I would need to access the body terminal of the MOSFET.
Also, I know that PSpice has the IC and component part numbers. I could not find a 4 terminal MOSFET in there as well.
Thank you in advance!


texts: Filtering process value (PV) or controller output (CO)?

texts:
In the case of a noisy process value, what are the pros and cons of filtering the process value (PV) versus filtering the controller output (CO) or maybe both?
Filtering PV changes the process model and affects PID constants. I was told that ISA standard recommend not filtering the process value in a PID but I didn't find proof of it. By filtering PV you already have all in (constants for a given first order filter applied).
Thanks


texts: How do I realize the function using only 4:1 MUX and Inverters?

texts:
$$\begin{array}{ccccc}
\hline \boldsymbol{a} & \boldsymbol{b} & \boldsymbol{c} & \boldsymbol{d} & \boldsymbol{f}(\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{c}, \boldsymbol{d}) \\
\hline 0 & 0 & 0 & 0 & 0 \\
\hline 0 & 0 & 0 & 1 & 0 \\
\hline 0 & 0 & 1 & 0 & 0 \\
\hline 0 & 0 & 1 & 1 & 0 \\
\hline 0 & 1 & 0 & 0 & 0 \\
\hline 0 & 1 & 0 & 1 & 0 \\
\hline 0 & 1 & 1 & 0 & 1 \\
\hline 0 & 1 & 1 & 1 & 1 \\
\hline 1 & 0 & 0 & 0 & 1 \\
\hline 1 & 0 & 0 & 1 & 1 \\
\hline 1 & 0 & 1 & 0 & 0 \\
\hline 1 & 0 & 1 & 1 & 0 \\
\hline 1 & 1 & 0 & 0 & 1 \\
\hline 1 & 1 & 0 & 1 & 0 \\
\hline 1 & 1 & 1 & 0 & 1 \\
\hline 1 & 1 & 1 & 1 & 0 \\
\hline
\end{array}$$

This is my function and I want to realize a circuit using only

1x 4:1 MUX
infinite Inverters

Any suggestions or advice?


texts:
How do I trigger a fans function after a setpoint temperature is reached? I want to avoid using a PID Controller, and my heating element will be external of the circuit. Once the fan cools the thermister back to regulation, it should turn off.
I have a fan that operates at 24VDC(full speed).
Thanks a lot


texts: How to protect my sensitive electronics from noise induced by AC power line?

texts:
I have a circuit that will be placed in somewhat close proximity to 220 VAC mains power. The mains power lines are bundled together of around 20 pairs (live and neutral) those 20 pairs should total up to around 50A max. My circuit will be reading the current consumption of those lines using a non-invasive current transformers which will then be read by my circuit. The circuit uses precision components which can be sensitive to voltage induced by those power lines.

How do you recommend to protect my circuit from those noise?

My first idea is to shield it with a Faraday cage, but making my own Faraday cage seems to be inelegant, I was thinking to somehow hide it. I thought if I place it in one of those small metal control boxes such as these:

Do these control boxes protect from outside noise? Most Faraday cages I see are in mesh form factor but it should work the same way as these boxes, right?


texts: Problem understending interrupt handling example in The Zynq Book

texts:
Sorry for basic question but I'm coming to embedded/fpga (as a hobby) from 'big' computers and I have trouble understanding example code from Zynq Book:

void BTN_Intr_Handler(void *InstancePtr)
{
    // Disable GPIO interrupts
    XGpio_InterruptDisable(&BTNInst, BTN_INT);
    // Ignore additional button presses
    if ((XGpio_InterruptGetStatus(&BTNInst) & BTN_INT) !=
            BTN_INT) {
            return;
        }
    btn_value = XGpio_DiscreteRead(&BTNInst, 1);
    // Increment counter based on button value

    led_data = led_data + btn_value;

    XGpio_DiscreteWrite(&LEDInst, 1, led_data);
    (void)XGpio_InterruptClear(&BTNInst, BTN_INT);
    // Enable GPIO interrupts
    XGpio_InterruptEnable(&BTNInst, BTN_INT);
}

I would expect that for such simple code it would be just top half. However top half would execute just in IRQ mode with interrupts disabled so there is no need for disabling interrupts. OTOH if we are in bottom half there is race between button interrupt and disabling interrupts - unless we use it as a mutex for led_data.
In similar way why if GetStatus returns we don't re-enable interrupts?


texts:
We are supposed to find \$i_o\$. Looking at the 25-V voltage source and the \$5k\Omega\$ resistor,  the current is \$i_x=\frac{25}{5\times10^{-3}}=5mA\$ because the voltage across both inputs of the op-amp are equal (ideal) and zero because the positive terminal is connected to the ground. Using node votlage equations at node \$V_1\$ and \$V_0\$,
$$\frac{0-v_1}{50\times10^{3}} +\frac{0-v_1}{10\times10^{3}} = \frac{v_1-v_0}{40\times10^{3}}$$

Knowing \$i_x\$ allows us to determine \$V_1\$ which is \$50\times10^{3} \times 5\times10^{-3}=250V\$ Is it \$-250\$V?

Solving for \$v_0\$ I got \$-550V\$. Using KCL at node \$v_0\$, \$i_0=i_1+i_2=23/600 A\$

But, for some reason, the answer is wrong. Am I missing something? Did I do something wrong somewhere?


texts:
Scheme and source code I use:

http://wiki.amperka.ru/робототехника:подключение-мотора-через-транзистор

Checked this scheme on arduino Leonardo - it works. It even works with 5V from usb - no additional power required.

But when I try to do the same scheme with R1 D1 or NodeMCU - it doesn't want to work. It seems I have tried everything except of changing of scheme - pins, apps...

Could you explain what am doing wrong? Is it occurs because of boards based on esp8266?

P.S. Added "servo" tag because I don't need it but the same situation occurs with servos.


texts: Circuit yields a peculiar contradiction between KCL, KVL and Faraday's law

texts:
I don't know if this particular circuit/loop is covered in another question but I stumbled upon a video where a peculiar consequence occurs for the following circuit:

For the above circuit loop according to Faraday's law of induction one can write:

EMF = -dΦ/dt

And from the basic electric circuit theory for the current one can also write:

I = EMF/(R1+R2)

But since the same current passes through the resistors(KCL), something peculiar happens here.

Imagine the magnetic flux Φ starts increasing with a constant slope(which means EMF=-dΦ/dt is a constant); and during this time if we observe the voltage V1 across R1 by a scope between the point A and B, according to the logic the voltage across the points A and B would be current times the resistance which is I×1k Volt.

On the other hand,  if we observe the voltage V2 across R2 by another scope between the point A and B, according to the logic the voltage across the points A and B would be again current times the resistance which is I×100k Volt with reverse polarity because of the reverse current direction.

Which yields: |V1| ≠ |V2| which are measured between the same points A and B at the same time.

How could this contradiction be explained?

Edit:

An MIT physics professor demonstrates that the Faraday's law does not hold in this situation and most interestingly he shows by an experiment in the video the voltages measured across the same nodes are different. In this video recording from 38:36 to the end he goes through all of these. But I have also encountered some other sources that his experiment is wrong. I also wonder if we experiment this, what would we observe? How can this be modelled as a lumped circuit(maybe using a current source)?

Edit 2:

I guess the below circuit can be equivalent to what the professor says(?):

simulate this circuit – Schematic created using CircuitLab

Only in this case what he makes sense.. Observer 1 and Observer 2 will observe very different voltages across the same nodes A and B at the same time. I couldn't find another model to make it fit this into his explanation. Like a current source which also is a short as component(because in real there is no current source both two node A above are the same points physically in this case).


texts: What DC motor controller will work for a small toy train?

texts:
I'm thinking about modifying a battery-powered toy train to use a higher voltage battery so the toy can go faster. Like this:
https://youtu.be/qK-IVIllOBY?t=30

The 9V battery has a nice form factor for this application. Easier than putting 2-4 AAAs or AAs in there. But putting a 9V there is damaging for a motor/gearing setup designed for 1.5V (stock battery is a single C cell). To improve this, I'm wondering if it's practical to add a knob-style controller so that the voltage can be varied from 1.5V to 9V (or maybe 6V max). If it is indeed practical, I have a couple questions:

What is a good, small prebuilt controller that will work for these voltages? Something like this but smaller and made to work for 1.5V to 9V instead of 6V-12V.
What will current draw be when running the toy at 1.5V compared to using a stock 1.5V battery? From what I can read at Wikipedia, a C cell has far more capacity than a 9V (8000mAH vs 550mAH), so I would expect battery life to be drastically reduced.

If there's a better way to accomplish my goal, I'm happy to hear about it!


texts:
In the small signal model of a MOSFET, the current from the drain to the source (for an n channel MOSFET) is a function of the gate to source voltage only.

But, if a positive voltage was not applied at the drain, the current wouldn't flow in the first place.

So, why is the drain to source voltage not considered?


texts: Connect two devices on the same board throught I2C or SPI

texts:
I'm new to electronics and a want to set up a PCB with a bluetooth (NRF52832) adapter and an accelerometer ADXL313. In each case, for I2C and SPI, how would be the connections and which pins should I connect exactly?
I know that for some people this is simple but is not my case, thanks beforehand! Simple lines telling me which pins to connect will help.


texts: MCU to switch single coil latching relay not working (attempting array with common gnd)

texts:
I have several single coil latching relays, (low rep points so not hyperlinking), mouser.com/ds/2/212/KEM_R7002_EC2_EE2-540906.pdf (EC2-5SNU).

I am trying to control them by an MCU; connected directly they work fine, but I am iffy about keeping it this way so I'm trying to power them through a darlington pair array: ti.com/lit/ds/symlink/ulq2004a.pdf (ULN2003).

Using the non-latching type, these work fine through the ULN2003, but attempting to interface the code below with the latching type isn't going so well and i can't figure out why:

int right = 12;
int left = 10;

void setup() {
  pinMode(right, OUTPUT);
  pinMode(left, OUTPUT);
}

void loop() {
  digitalWrite(right, HIGH);  //reset
  digitalWrite(left, LOW);
  delay(2000);
  digitalWrite(right, LOW); //set
  digitalWrite(left, HIGH);
  delay(2000);
}

I have four connected with a common pin, but to simplify i've tried and failed to have the code above work on a single relay, as shown below:

Measuring the voltages out of the MCU show the correct levels, keeping in mind the ULN2003 acts an inverter, so i've set the boolean logic accordingly.

The voltages at the output of the ULN seem to stick at 0.6V, I've tried a bunch of permutations, including having one pin (on the common pin setup) connected directly to the MCU.

Does anyone have any ideas?


texts: What causes a switch to reach the end of its lifetime?

texts:
I am building a relay to measure the lifetimes of switches for different contact materials.

Almost every switch on the market will include information about it's lifetime (typically given in switching cycles). I think it is common for switches to last around 1 million cycles before they stop performing well.

This is where my uncertainty arises. What exactly affects the switches performance and how can I measure it?

For soft contact materials such as gold, the material will deform over time creating microscopic valleys and cracks. This would result in a higher switch impedance, correct?

So could I simply measure the initial impedance of a switch (given contact material a), then measure it once more and record the change in impedance after running the switch for 1 million cycles. Repeat the process for every material I want to test and which ever has the least percent difference would be the winner?


texts:
I'm learning about RFID and am trying to figure out what the data rates are for the different types of RFID technologies.

I've learned that there are three different frequencies tags and readers operate on:

LF - 125-134 kHz
HF - 13.56 MHz
UHF - 850-960 MHz

There are also a number of different modulation schemes used, such as:

PSK
FSK
ASK

I'm thinking the data rates are dependent mostly upon the frequency being used (LF, HF, or UHF), but does the modulation scheme also play a factor in the data rate?

How would one go about determining the data rates (such as in bits per second) for the different types of RFID?


texts:
I have a magnetometer which I am using for orientation purposes. What i would like to know is how to calculate the total error when finding the magnitude of the magnetic field vector. So I know each individual axis is accurate to within +-10nT, but how does this propagate to the total magnetic field.

The magnitude of the magnetic field vector is \$ \sqrt{B_x^2+B_y^2+B_z^2} \$, so initially i thought the error would be \$ \sqrt{dB_x^2+dB_y^2+dB_z^2}\$ where \$dB_x\$ is the error on x axis, \$dB_y\$ on y axis and \$dB_z\$ on Z axis. Is this correct?

Thanks for your help.


texts: Passive circuit to generate a pulse when a door opens/closes?

texts:
I've searched a bit here, for example https://electronics.stackexchange.com/search?q=pulse+switch, but I haven't quite found what I'm looking for.

Here's the actual problem: I want to send a signal to a server, wirelessly, every time a door is closed (it would be fine to send on open and close, but all I need is on close). I'm open to other solutions, but my current approach (using materials I already have) is to use the Amazon dash button hack (https://medium.com/@edwardbenson/how-i-hacked-amazon-s-5-wifi-button-to-track-baby-data-794214b0bdd8 for example), along with a reed switch. This means I need the dash button to be momentarily pressed when the door state changes - that is, if the door open/closed state is represented as a 0/1 signal, I want a circuit that generates a short pulse when that signal goes high.

I know this can be done with an XOR gate and RC, I think I can do it with three NAND gates, and I'm sure there are a few other simple powered circuits that can do this. The problem is the dash button runs on a single 1.5V battery, so I'd like to do it either passively, or with a power draw that does not significantly effect the battery life. It seems to me that using CMOS logic to do this would work, but 1) I'm not sure how well it would work at 1.5V, and 2) I'm wondering if I'm missing a simpler or better solution. So...

The question I'm trying to ask: What is the simplest/cheapest/lowest-power way to generate a short pulse, in response to a door changing state from open to closed? Ideally, passively, with a reed switch.

The question that might be better answered: What is the simplest/cheapest/lowest-power way to send a boolean signal, wirelessly, to a web server in response to an edge in the door state?


texts: RF "Clock" - repeatable pulse for multiple receivers from master

texts:
I need to wirelessly (not optically, due to the distances and 3D volumes involved) transmit a "sync" pulse train from some master transmitter (the "time keeper") to be received by basically any number (lets say 50, to put an upper bound on it) of devices within 100m.

The idea is that the devices that receive this all have a common sync they can share for using as a reference time. Measurements will be taken and reported as relative times to their best knowledge of the master clock's most recent rising edge.

The system will be deployed in a factory environment, but there will be Wifi and the occasional large electric motor/servo/magnetic interference in the area.

I have a requirement for approximately 100 nanoseconds of phase noise/jitter from the receiver to the master. Latency isn't an issue as long as it's deterministic and repeatable to a similar 100ns magnitude.
What is the lowest latency and highest repeatability/deterministic-timing RF device, technique, or protocol available that will allow a master to transmit a  uni-directional "sync pulse" at 60Hz with ~100ns TX->RX jitter?

I have looked at a few options, and done some research on the matter. I've read some questions on here, such as this one Low latency rf link answered by @Andy aka and I had a look at the Radiometrix RF modules, which seem like a simple and possibly effective solution to my problem.

The next thing I looked at was the ANT Protocol, which according to the information on this Digikey article 6 years ago the ANT protocol allows almost zero latency on the TX/RX pipeline, due to the receiver always listening. If the pipeline from master TX to the ANT device is streamlined enough, the latency and repeatability should be in the couple of microseconds region. Does this sound right? Has anyone used ANT protocol for this purpose before? I am considering trying out the ANT capabilities of the NRF52832

I also saw that Texas Instruments has something called the CC1121 - "High Performance Low Power RF Transceiver" which appears to have extremely fast wake-up time, and only needs 4 bits worth of preamble. This means I could effectively transmit 1 byte, with the last few bits just being a 0x01. However, in "4.13 Wake-up and Timing" on the specs sheet, it still has values in the hundreds of microseconds for going from IDLE to TX. I'd have to test for repeatable Idle->TX transition jitter, in basically any of the above devices/protocols.

As a last resort, I could try for a custom made RF "spike" generator, and design my own receivers to be matched/tuned to it. I'm sure this is illegal, and is not really a useful option (or is it? would I have to get it certified? I guess it would immediately fail EMC emissions standards!).

The RF transmitted "clock" could be PLL-locked (in software) to filter out jitter (which is why latency isn't much of an issue now), and I could calibrate out any constant phase delays due to TX->RX delay and speed of light) in order to create an "estimator" of the original master clock at the instant in time that it's sent. Are there any techniques I should know about for dealing with this problem?


texts:
Is there a way to reduce the current of a circuit?

For example, I have this circuit:

and I want to reduce the total current so it can last longer in a 12V battery.


texts: Realize if(0) condition in analog circuit ?

texts:
I have a question that I think is really noob-like and I'm dead sure there's a pretty simple answer, but I couldn't figure it out myself and didn't really know what to put into google, so here we go.

I have a RC Circuit that has a square wave input voltage going from 0 to e.g. 3 Volt.   I need to pass the voltage across the capacitor to another circuit ONLY IF the input voltage currently is zero.

So basically, what I need is:
if (V_in==0) passVoltage();

in analogue hardware.

My thoughts so far:
- Comparator: Compare input_voltage to ground? but then, if this gives me a "true" statement, what to do? I can't use it to like, flip a switch, can I ?
- P-Mosfet: Don't really think this is what I'm looking for as it alters the signal, doesnt it?
  Maybe a combination of comparator and mosfet?


texts:
I'm bit stuck and at the end of my knowledge. I'm building a light stick that is controlled by a teensy micro controller and using programable rgb led's. (ws2812)  the led's run at 5volt and need quite a few amps.  I'm looking at approx 8 amps if all 288 are on at full brightness and white.  testing g was done with it plugged into USB on laptop and a few led's selected and low brightness and all was good. I planned to use a ubec to convert 7.2 - 11.1 input from lipo's to 5v.  Issue was the led's started acting odd. I moved the data cable away from the power to the leds and it was a lot better so there is some interference in the power upsetting the data signal but only when using the ubec.  I tried a different one I had and same issue but different effects.
Iknow the ubec is basically a switching psu but how do I clean it. I'm using the ubec as it's the only device I can find that can give high current output.  Found loads of buck converters on eBay but 2-3 amp is the max.  Im open to other ideas if anyone has them.  Did think.of a linear psu but current was again the issue and now also heat.
Thanks in advance
Lee


texts: Would this parallel LED lamp upset the working of the flywheel diode?

texts:
I'm using a solenoid with a fly-back diode 1N001 and a mechanical switch as in the below diagram:

Now I want to add this 24V indicator lamp in parallel with the solenoid as shown above to indicate the status of the valve.

My concern is would this lamp have an upsetting effect to the purpose/workings of the diode? If the lamp was pure resistive, I wouldn't ask this question but the lamp looks like made of LED.


texts: Confusing quartz crystal impedance graphs

texts:
I thought that at the series resonant frequency of a piezoelectric oscillator the impedance of the crystal would be the lowest, and at the parallel resonant frequency the impedance would be the highest. This picture would suggest so:

Clearly at series resonance, the impedance spikes low, and at parallel resonance the impedance spikes high.

But then there are other kind of graphs:

In the first one, apparently positive y-axis indicates inductive reactance, and negative y-axis indicates capacitive reactance. I get the series resonant point: It is the one with the smallest absolute value. But why is the parallel resonant point at somewhere between 0 and the tip of the spike? Shouldn't it be at the tip where the impedance is the highest? And what is "antiresonance"?

The second picture I find equally confusing. It again seems to plot the absolute value of the impedance. Here the series and parallel points are the lowest and highest, as I would expect, but only in the center region! Clearly if we go to the left, the curve goes up again, indicating there is a frequency for which the impedance of the crystal is higher. And likewise, if we go to the right, it would seem there is a point with a lower impedance. So why aren't the resonant points somewhere on the higher and lower frequencies? Or is there something I've completely misunderstood about resonance?

Here is a picture of a crystal oscillator in both series and parallel mode:

On the left, there is an oscillator with the crystal in series mode. The output of the amplifier is connected to the input through the crystal. As the series mode crystal has the smallest impedance at the series frequency, this is the frequency that is filtered from noise by the crystal and fed back to the amplifier input, and therefore the oscillator oscillates at this frequency. This is how I would imagine it to work, but according to the graphs, there should be other frequencies (higher) that can pass the crystal easier. So why doesn't the oscillator oscillate at these frequencies? The same question applies for the parallel oscillator, except this time the impedance is highest for the desired frequency, and it is therefore the one being fed into the amp, with the other frequencies being directed to ground as the impedance is very low for these frequencies.


texts: Why use JK Flip Flops in syncronous/asyncronous binary counters rather than D flip flops?

texts:
Everywhere I encounter either asyncronous (ripple counter) binary counters or syncronous ones, the application uses JK flip flops with the J and K inputs tied together, such as described here:

From my understanding this reduces the functionality of the JK flip flop to that of a D type flip flop, so why not just use D-type flip flops? I've seen SIPO shift registers constructed form D type flip flops and not JK ones, so I'm a little confused why this seems to be convention.


texts: Does inductive back-EMF create significant radiated emissions on long load wires?

texts: So, lets say you have a mechanical switch connecting an AC (mains) source to a small inductive load (say, a single speed ceiling fan) via a long wire (1000' of NM).  When the switch is turned off, how much of the energy from the motor's back-EMF gets radiated, and what would a spectrum analyzer plot of this radiation look like were you to do this in an EMC test site?


texts: I am looking to import machinery (CNCs, extruders, presses etc.) from China to use in my own factory for a specialized production in the USA. Machines are produced by smaller shops in China without certification. Can I just import and use the machines in my own factory? What do I need to do to bring them up to code for use in US?


texts:
I would like to be able to program and update the PIC18F4550 through USB. The PIC18F4550 already has USB, so, I don't need a USB to serial converter.
On the microchip forum, I found this reference about  bootloader:

Microchip AN851: PIC16F/18F bootloader via serial: https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en012031

But, it seems that was made to be a serial bootloader and not a bootloader to works through the PIC18F4550's USB.
There are other non official bootloaders on the web, but I don't know if they will do the job. I would like that, once I have programmed the bootloader via ISCP, the subsequently programming be made through USB only.

Can the PIC18F4550 be updated through its USB? If it is, how difficult it will be?


texts: Should analogue multivibrator and comparator pullup circuit have separate supplies?

texts:
I have managed to produce a design within the falstad circuit simulator for an analogue "LED chaser" using an analogue multivibrator and 3 comparators inspecting the voltage of one side of the multivibrator.

Once I had completed it I decided to link all the circuitry to one supply (the pullups for the comparators were originally fed by a separate 5v supply) thinking this would alter the output waveform; it didn't (to my knowledge).

If I were to make this circuit in real life would there be any disadvantage to using a single supply? Please excuse this if it is a fundamental/beginner sort of question I am not academically trained in electronics

The circuit link is here (cannot produce schematic from simulator)


texts: Planning an amplifier using a transistor

texts:
I want to plan design an amplifier of tension voltage using a transistor:

but I don't know how I can choose the values of \$R_1\$, \$R_2\$, \$R_3\$, \$R_4\$, \$C_1\$ and \$C_2\$..

I want to obtain a gain of 3, and I want \$Z_{in}=15k\Omega\$ and \$Z_{out}=3k\Omega\$. Could you help me? I've just started to study this subject.


texts: ngspice ltvspice netlist compatibility problems

texts:
This is my netlist

 .title KiCad schematic
 V1 Net-_R1-Pad1_ 0 5V
 R1 Net-_R1-Pad1_ Net-_R1-Pad2_ 100k
 X1 0 Net-_R1-Pad2_ LM385BZ-1.2

.SUBCKT LM385BZ-1.2 A K
*
* TWO-TERMINAL VOLTAGE REFERENCE
*
DFWD A K DF
GREV A K VALUE={LIMIT(20.00E-3*(EXP(V(A,K)/5.682E3)-1),-10M,0)}
RZ A 1 .102
GZ 2 1 VALUE={LIMIT(EXP(V(2,1)/198.0E-6),0,20.00E-3)}
EBV K 2 3 0 1
RBV 3 0 1.237E3 TC=1.139E-6 -346.8E-9
IBV 0 3 DC 1M
*
.MODEL DF D(IS=39.12E-15 RS=12.18 IKF=0 N=.9983 XTI=3)
.ENDS LM385BZ-1.2

.OP
.END

Ltspice simulates this netlist very well.
but when i launch ngspice -b it shows this strange results.

    Node                                  Voltage
    ----                                  -------
    ----    -------
    x1.3                             1.237000e+00
    x1.gz_int1                       0.000000e+00
    x1.2                             2.003763e+03
    x1.1                             0.000000e+00
    x1.grev_int1                     2.000000e-02
    net-_r1-pad2_                    2.005000e+03
    net-_r1-pad1_                    5.000000e+00


texts:
I assembled a tube amplifier.According to the specified scheme (Old Russian radio "Record 66").

1.What is the function of capacitors C9 and C8 ?

2.What will change the capacity of these parts? Will the sound be changed ?

3.I made this amplifier for an electric guitar. What would you recommend for its modification?


texts: what is the difference between rated power and power rating?

texts: Very appreciated if anyone can explain the difference between rated power and power rating. I used to see both of them in electronic magazine.


texts: capacitors burn at discharge due to low current-limiting resistor; how come they don’t burn at charging, when there is no current-limiting resistor?

texts:
I apologize if the question is superfluous or already answered.

This is what I know: the charging of a capacitor from a dc source happens instantaneously. Since there is no series resistor to limit the current, then what actually prevents the current to become infinite and burn the capacitor at charging time?

On the opposite is the discharging. If a charged capacitor is shorted, it will burn. Otherwise said, the discharge can not happen as fast as the charging; why the capacitor can charge instantaneously but it can not discharge as fast?

What limits the charging current effectively preventing the burning of a capacitor, in the absence of any current-limiting resistor?


texts:
I am designing a 18V to 24V boost converter with a solar panel as its input and a variable resistor at the load side for taking measurements. The boost converter will be doing the Maximum Power Point Tracking (MPPT) for the panel. However I am confused about one thing - how will I keep the output constant at around 24 V regardless of the irradiation falling on the panel?

Also is it possible to do MPPT AND keep the output of the converter constant using just a single boost converter?

The solar panel has the following specifications:
Pmax = 50 Watts,
Vmp = 18.68 V,
Imp = 2.77 A,
Voc = 22.53 V,
Isc = 2.97 A


texts: Trouble on understanding ALU 2-bit design

texts:
I'm new to this site and I'm pretty "noobish" to electrical engineering coming from a software engineering background I was hoping someone could help me understand this design a bit. I've highlighted two part of the diagram that obviously aren't gates.

I'd like some help understanding what it is and how it could be implemented with gates if possible or if needed.


texts: Does current drive voltage in a transistor?

texts:
I have this circuit, but I want to know how much voltage will be dropped between base and emitter of the transistor, and how much over the 1k resistor on the left.

Since a transistor does not have a fixed resistance, I guess I calculate the current using ohm law on the resistor? So if the source is 10v and the resistor is 1K, then this is 0.01 amps.

Then I calculate the voltage between base and emitter using the graph from the datasheet of the transistor?

So I have the check the Y axis first and cross reference on the x axis?

Then any "left over" voltage is on the resistor?


texts: Please help me understand how this cmos mirror adder works

texts: I can understand the left adder circuit but the right one has both the nmos and pmos network exactly same. I have learnt that the pmos and nmos are dual networks of each other. How does one arrive at the right hand circuit schematic in that case?


texts:
I'm testing a LED setup, I have a bench PSU going to Traco 5V buck converter that feeds 10 LEDs (SK6812). When I power the bench PSU on, before it hits 12V, the first LED in the strip flashes for a milisecond and then the strip loads its default "color".
Pardon my lack of knowledge, but this might be inrush or something? My goal is to hook this up to 12V battery so I would like to solve this problem and have a smooth on-power without this first led flashing on power.
The specs of my buck converter are attached - you can see it has Remote option, but I can't google it out what the remote terminal on the converter does and how to use it, is this a feature I should use in my case? Please help :)


texts: Clock Pulse from Audio Signal (Laptop Headphone Jack)

texts:
Been fiddling with some circuits on breadboard to get a stable clock pulse from an audio signal via a laptops headphone jack.

Reason 1: Other precision sig gennies are out of the budget right now
Reason 2: Got this laptop with all the sig gen software but no way to output it as a 5V clock source.

Frequency range: 10hz to 3000hz.

Tried various voltage amplifier configurations with a single transistor (2N3904) approach. So far none of them are working. Output should be a flashing LED.

How can I get TTL signals from my sound card?


texts: Designing/Predicting Output from Permanent Magnet Motorcycle Stators

texts:
I'm hoping you can help me. I've long been into motorcycles, and have restored and customized many different bikes. While building custom motorcycles, I often add electrical accessories, and use high output stators (if available) to keep up with the increased electrical load. I've hand-wound many stators myself to increase output, and have a good feel for how changing wire gauge, number of turns, and delta/wye connection type (for 3 phase stators) will affect output vs. motor RPM.  However, I often have to build multiple prototypes to get the correct configuration.

What I would like to be able to do is learn how to predict the output from a particular stator winding configuration, by either doing the math, or simulating using computer software. I've looked at FEMM, a free magnetics software package, though I have not learned how to use it yet. Any other free options?

For those of you unfamiliar with motorcycle charging systems, they are fairly simple. I have a feeling many of you are familiar with AC electric motors, which are similar. A quick crash course in the components below, I'll be using a 2006-2009 Suzuki GSX-R600 as an example for the parts:

Most modern motorcycle engines use a permanent magnet flywheel mounted on the end of the crankshaft, spinning at engine RPM. Here is an example:

It has embedded fixed magnets, alternating North/South poles along the inside edge of its OD, spaced evenly with the poles on the stator.

The stator is then mounted centered inside the flywheel, allowing the flywheel to rotate around it. Here is an example:

The stator cores are made up of thin stamped laminations, riveted together to form the stack. Most modern motorcycle stators use a three-phase winding configuration.

The most common variables to change or increase output are the wire gauge, number of turns per pole, and connection type (Delta/Wye for 3-phase stators).

What I would love some help with, is how can I measure the fixed factors (magnet strength of the flywheel, size/material of the stator core), and then calculate or simulate the variable factors (wire gauge, number of turns per pole, connection type, etc) to come up with an accurate new winding configuration. I would prefer to do the work up front on the computer rather than building multiple prototypes to test.

Thank you so much in advance for any help, insite, and info!


texts:
I'm reading Art of Electronics, and in the section Transistor Current Source, they mention "The base voltage can be provided a number of ways. A voltage divider is OK as long as it is stiff enough. As before, the criterion is that its impedance should be much less than the DC impedance looking into the base (Beta*R_emitter)"

Why is this ?

simulate this circuit – Schematic created using CircuitLab


texts: How to convert a range of 0.5 to 4.5V for a range of 0~3.3V? ACS712 20A current sensor

texts:
The exact part number is ACS712ELCTR-20A.

Considering it is supplied at exactly 5V, it's output will present 2.5V when there's no current flow on its main pins. Output offset = VCC/2.
As its sensitivity is 100mV/A:
When instantaneous current is 20A on a given direction flow (-), its output will present 2.5V (offset) - 20x100mV => 0.5V. When the instantaneous current is 20A on the oposite direction flow (+), its output will present 2.5V (offset) + 20x100mV => 4.5V.

Is there any way to convert this range (0.5~4.5V) to a range of 0~3.3V just by using a single (or a max of 2) OpAmp ports? When input = 0.5V, output = 0V. When input = 4.5V, output = 3.3V. When Vin < 0.5V, Vout = 0, when Vin > 4.5V, Vout = 3.3V

I already simulated the circuit described below, but it would require a good PCB area. I'm looking for a simplier circuit which would require less area. It would be great if that 'simplier circuit' doesn't require the use of a negative power supply.

ACS712 output (0.5~4.5) -> OPAMP1 [2.5V voltage subtractor] -> OPAMP2 [amplifier] -> OPAMP3 [precision full wave rectifier] -> OPAMP4 [voltage buffer] -> 10 bit ADC 1Msample max, GND and 3.3V references, of a MCU. I can't change the ADC references to 5V/GND. Max Vref+ is 3.3V.

OPAMP1 and OPAMP2 is an IC supplied with +5V and -5V. OPAMP3 and OPAMP4 is an IC supplied with +5V and GND. This is the only signal read by the ADC in the whole circuit. I can add a second ADC channel to read ACS712 supply voltage by using 2 resistors of 1% also.

Regards.

EDIT:

I'll try to use ACSxxx sensors for 2 applications.

Some months ago I produced some PCB prototypes and included some circuits for tests on the same panel. I have a circuit (schematic below) for possible tests related to the question of this topic. I didn't had enough time to test it yet.

The circuit below is for application 1. This is a future application... Here I just need to estimate the AC current consumption of the load (AD/DC switched supplies or smartphone chargers for example), without precision. Using a 8-bit MCU which can do 16MIPS, if possible using little processing in firmware. For this project I'll use a 5A sensor (ACS712). Sensor and MCU are supplied at 5V. ADC ref = 5V/GND. The sensor should withstand an AC supply of up to 250VAC and have an electrically isolated output.

Application 2: The current application. Here the MCU needs to be able to know if there's or not current flowing through the load (inductive) and maybe (not required) detect some possible over-currents on it. The project uses a 32-bit MCU which can do 40MIPS. Currently, MCU is supplied with 3.3V and sensor ACS-712-20A supplied with 5V. At sensor output I'm using a 5.6K/10K divisor, which is read by the MCU and I do the job in firmware.
After some answers on the topic, I see that I can try other ACSxxx sensors instead of ACS-712-20A, one which could be supplied with 3.3V. The sensor should withstand an AC supply of up to 250VAC and have an electrically isolated output also.
The circuit is minimal in this application. I just wanted to check what could be done in terms of hardware.


texts:
I need to protect my GPIO from Electrostatic discharge as my inputs are coming from outside.I am using LPC2132 Micro controller which uses +3.3V Supply.Bidirectional ESD diodes that I have seen so far has maximum clamping voltage 0f 7V. Since the micro controller does not withstand more than Vdd+0.3V,I am confused how to protect the micro controller.Is there any way to protect from Electrostatic discharge other than TVS diodes

Attached the screenshot

Added the circuit to protect the Output of Microcontroller


texts: Why are FPGAs used so often for HDMI video projects?

texts:
If you look through hdmi projects on a site like hackaday, you'll find that just about every one of them involves an FPGA. I don't think I have seen any DIY project with HDMI output that hasn't used an FPGA.

But why? As far as I can tell, FPGAs are expensive, around $70-$100. Compare that to a Raspberry Pi for $35, that can do way more complex things, and output HDMI. Why isn't an ARM used? Or an even cheaper microcontroller?

In the case of upgrading the video on old game systems, the logic shouldn't be any more complicated a cheap microcontroller can handle, but I keep seeing HDMI as an impossible hurdle only tackled by FPGAs.


texts: Integrating USB Camera on TI Hercules Evaluation Kit (ARM Cortex R4)

texts:
I am using a TI Hercules Evaluation Kit, which can act as a USB Host.

Here's the link  [http://www.ti.com/tool/tmdxrm48hdk]. It is a ARM Cortex R4 with 8 MB of SDRAM.

I want to use a Logitech Webcam (specifically the Logitech C200 Webcam). It is UVC compliant, so the UVC driver code for this can be found inside Linux source code.

I want some help on porting this driver code to my Evaluation Kit.

Is it feasible or am I aiming too high?


texts:
I'm designing a PCB based on an ATxmega microcontroller (max. 3.6v tolerant). I plan to connect a range of external 3.3v devices. However, I do have a few 5v devices that I want to connect.

There are many designs and ICs for 3.3v <-> 5v bidirectional level convertors already out there. But here's the caveat: I want to allow both 3.3v and 5v voltages on the same pin. So, if the connected device is 5v, the level convertor will kick in and convert the voltage to 3.3v. If the device is already 3.3v, the level convertor does not convert the voltage.

For example, if a 5v device was connected, the circuit would look like this:

|------------|         |----------------------------|
| 5v device  | <-----> | 5v <-> 3.3v level convert. | <-----> ATxmega pin
|------------|         |----------------------------|

If a 3.3v device was connected, the circuit would be connected directly:

|-------------|
| 3.3v device | <-----> ATxmega pin
|-------------|

What circuit will bypass the level convertor when the voltage is already 3.3v, and convert the voltage when a 5v device is connected?

In other words, can I design an automatic-ranging 3.3v<-->3.3v/5v level convertor (without jumpers)?


texts: Is it possible to confine radio frequency signal?

texts:
I would like to build a confined enclosure(like a 50cm cube box) to limit and perform RFID scanning only within the box, not interfered by the RFID tags laying outside the box.

My intention is to be able to do a quick scan(stock take) on everything that is placed in the box, thus, the scanning distance of the RFID tags should cover the entire interior volumetric space of the box while the RFID reader will be placed in the box.

What is the material that I should use for the interior/exterior wall of the box? Any experience or advise in constructing such a box is also greatly appreciated too.


texts: SPI: MOSI not dropping LOW for receiving device

texts:
I hope this question is not a repeat of others on this stack exchange concerning SPI. I've been searching for at least an hour and have not found the same problem/answer.

SCENARIO

My friends and I are attempting to get an OLED and rotary encoder working together using our own personal board. Right now, we just want the position on the encoder to show up on the OLED.

An absolute position rotary encoder is hooked up with a development board using the ATmega2560 chip. The 2560 is talking to the encoder with these SPI settings:

Master Mode (SPI Mode 3)

Phase: 1
Polarity: 1

SPI Prescaler at f_OSC / 128 (current CPU Freq = 16MHz)

OLED: Adafruit SSD1306, 1.3" 128x64

Encoder: iC-MU Absolute Position - iC-MU Position Encoder Datasheet

I have the current program set to read from one of the encoder's internal EEPROM registers every second. Although I'm not yet certain about addressing the EEPROM accurately, the problem I would like to address is different.

PROBLEM

I wasn't getting a response from the encoder, so I hooked up an oscilloscope and checked all four SPI lines, as seen below. For some reason, the MOSI line never drops below ~3.50V. The receiving device would still consider this a HIGH signal.

I have tried tapping into the OLED SPI connections since the display itself works with SPI. Nothing new happened. I've double-checked that I still have a working board, constantly reconnecting the OLED and disconnecting the encoder. The board definitely still works.

What might be the problem with the SPI? Is there a specific name for this problem?


texts:
I want to feed Audio input (music played in my phone or laptop) to Arduino using an AUX cable(3.5 mm).

I know that we need to offset and amplify the signals as the Arduino takes input from 0 to 5v and the signals are very small.

I really searched all over the internet but couldn't find any step by step or basic stuff.

Please help !!

P.S. - I am not very mature in the field of electronics.

Thanks


texts:
I have a capacitor C which changes with time. Now I want to measure the varying capacitance as a voltage function, so I need to design a circuit for that. My motivation around the problem is that, I want to apply a constant voltage to the capacitor always, so if I have a change in capacitance, I will have a change in the current of the circuit.

Q=CV, so for constant voltages dQ/dt=VdC/dt; so if I take that current and pass it through a current to voltage changer and then pass it through an integrator, I might get my output voltage as a linear function of capacitance, so I have set up the following circuit for the same.

simulate this circuit – Schematic created using CircuitLab

My only apprehension is that since the output impedance of op-amps are very low, hence my initial voltage follower circuit might sink my information current completely and I might be left with no current to process in the 2nd and third stages. Am I being logical here or am I being mislead somewhere, if I am correct in my assumption, please give me some suggestions to work around the process or suggest a different circuit which I might find useful.


texts: XMega External Real Time Oscillator Capacitor Values

texts:
In application note AVR1012 (XMEGA A Schematic Checklist) Atmel states the following:

  The Low-frequency Crystal Oscillator provides an internal load
  capacitance of typical
  8.0 pF. Crystals with recommended 8.0 pF load capacitance can be without external capacitors as shown in Figure 4-3.
  Crystals specifying load capacitance (CL) higher than 8.0 pF, require
  external capacitors applied as described in Figure 4-4.

Whereas Figure 4-4 shows a crystal with two 22pF capacitors and the following note:

  [The capacitor] values are given only as a typical example. Please refer to the
  crystal datasheet to determine the capacitor value

Now what do i do, if i want to use a oscillator with a load capacitance let's say 12,5pF? Would i use two external 4,5pF Caps in addition (That's atleast what i would assume from reading application note AVR042 (Hardware Design Recommendations)?


texts: Why does lightning hit a plane when it's not grounded?

texts:
The title is the question. Is it something to do with batteries on a plane? I’ve tried Google but all the listings are “what happens when lightning hits a plane”

So why does it happen I want to know?

Thanks


texts: Is it possible for lightning strike to travel up ground / earth pin on a mains outlet?

texts:
I live in a country that follows the UK mains specification, where there are 3 pins on a wall outlet with the topmost pin being earth/ground. Now, is it possible that during a lightning strike, extra voltage from the lightning travels up the earth or ground wire to the mains outlet and to any equipment connected to the mains?

I am asking because, during numerous occasions, with my desktop computer plugged in (not switched on), during a severe lightning strike, I can hear and see a spark somewhere on the casing of the computer, although no damage is suffered. I am wondering might this be the result of lightning voltage travelling upwards through the earth / ground wire to my computer thus causing this phenomenon? Or are there any other explanations such as extra electromagnetic effect during a strike, etc.?


texts: Why change microcontroller's PWM frequency?

texts:
What are exactly the pros/cons of changing the PWM frequency?

I don't think I need to change any PWM frequency at this very moment - but since I don't know the benefits of doing it, how can I really know if it's useful for me?

I'd like a general answer (which I and other people reading this post can apply in different situations), but if someone wants some data to answer, here are those of the project I'm working on at the moment:

ATmega328 microcnotroller @16Mhz (it stands alone, it's not in an Arduino board)
4 independent small brushed motors, each with a propeller (propeller's diameter: around 6 cm), on pins 3,5,6,11, controlled by a BUK9840-55 trasnsistor (datasheet)
a simple RF receiver is placed nearby and needs to receive a 433MHz
signal (the RF comminication is quite slow (500bits/sec), and doesn't
need to be very reliable).

EDIT: how does the PWM speed influence the RF communication?


texts: Problem with SPI Communication between Arduino/Atmega328P and Raspberry Pi

texts:
I have an Atmega328P chip (being used as an Arduino) that I would like to connect to a Raspberry Pi via SPI.

I originally had an Atmega328P running on 3.3V using its own internal 8MHz crystal  instead of an external 16MHz crystal. The Atmega was powered from the Raspberry Pi's 3.3v pin. I could directly connect MISO/MOSI/SCLK/CE0 pins between the two devices and I successfully used the Pi as SPI master and the Atmega as SPI slave.

Now I want to use an Atmega328 at 5V powered from external DC (LM317, etc) using an external 16MHz crystal. Obviously, the 5V Atmega pins can't talk to the 3.3V Pi pins so I got a Bi-Directional Logic Level Convertor (https://www.sparkfun.com/products/12009). This is my current schematic:

My SPI code no longer works and I'm not quite sure why. Is this the correct way to hook up 5V Atmega and 3.3V Pi for SPI communication? Am I missing any connections?

UPDATE: I ended up trying out I2C communication and it worked right away, so I think I'm going to switch to that. I only needed low speed communication between the Atmega and Pi so it suits my needs. Someday I'll have to try out some of the suggestions below.


texts: Can I use two separate charge controllers (wind and solar) to charge my battery bank?

texts:
I currently have a 400 watt solar panel array in series with a Epever 24 volt charge controller connected to two twelve volt battery bank in series (24v) with a 24 volt split inverter.

I'm planning to incorporate a 24 volt 400 watt wind turbine to this same battery bank and it comes with its own charge controller.

Can I connect both charge controllers to the same battery bank?


texts: Why this current sensing resistor called "Wirewound"?

texts: I'm finding a current sensing resistor recently. I find Vishay's SR series, in it's datasheet, it tilted "Wirewound Resistor...". Is this type of current shunt really a wirewound type, but not a solid metal internal?