texts: What is the purpose of CB radio ground plane?

texts: I've read a lot online, and have found seemingly contradictory ideas about the purpose. Supposedly the purpose of "ground plane [Totally separate concept from electrical ground?]" is to reflect the signals so the antenna appears twice its own height. Will metal mesh work for this? Could multiple sheets of metal be used, to make a larger ground plane area? I read here that you must [electrically I assume?] ground an artificial ground plane like that to the vehicle chassis / vehicle ground. Does this mean the ground plane is actually also electrically grounded? Could it be grounded to earth ground instead? Or a home outlet ground? I've also seen it mentioned that the "antenna must be grounded". I would assume this is through the [electrically grounded?] ground plane, however my antenna base has a rubber pad on the bottom, so I am guessing it doesn't ground through the ground plane. Do I have the right ideas here?


texts: Exercise based book to learn Verilog/vhdl?

texts: I was planning on learn an HDL (preferably verilog as I have to take a course in it in subsequent semesters). My initial plan was to first learn the syntax and then implement all the digital systems I studied in my digital electronics course using HDL. But just out of curiosity, is there a book which would combine teaching computer architecture with HDL implementation? I think that would be much more fun.


texts: Turn on LED with the opening of a switch

texts: Hi I’d like a circuit that turns on an LED when the switch opens. I’ve made this so far, but it’s drawing too much current in the “off mode” that it will just drain my battery. Any ideas? I’ve seen one with a mosfet, but I don’t have one of those, just transistors or a 555?


texts: Understanding ST L3GD20 Gyro datasheet's cut-off value

texts:
Table 21 on page 32 of the L3GD20 datasheet has a column named cut-off:

The data sheet doesn't explain what this is, and it doesn't even have a unit. Does anyone what it means?


texts: What is the purpose of switching both load and neutral lines of AC power as opposed to just switching the load wire?


texts:
(Question is completely revised after comments from AndyAka)

I want to connect about 15 devices (max) via RS485. However, unlike a normal RS485 cable where stubs/devices are tapped from, I want to connect all stubs together directly via DB9 connectors, so there is no (RS485) cable between the DB9 connectors. Of course internally inside each stub the two DB9 connectors needs to be connected. The distance between the DB9 connectors within each enclosure is max 3 inches. I want preferably high speed (about 1 mbps or faster).

How should I do the wiring of the 'RS485' line(s) within each enclosure (between each 2 DB9 connectors inside an enclosure serving as RS485 'main line')?
Should this be twisted paired cable (CAT5?) or can I get away with normal breadboard wire (since the length is not long, max 45", probably smaller).

simulate this circuit – Schematic created using CircuitLab

This means there will be no visible wires), all wires inside the enclosure, and the terminator are similar as used for DMX (except using DB9 connectors).


texts: Is a transfer function of a hole system BIBO and asymptotically stable, if the poles of the two sub systems shorten each other out?

texts:
I have the calculated the transfer function of system one $$
G_{1}(s) = \frac{-(s-2)}{(s+1)^2}
$$
and of system two
$$
G_{2}(s) = \frac{s+2}{s-2}
$$
Now I have to check if the hole system $$
G(s) = G_1(s)\cdot G_2(s)=\frac{-(s-2)}{(s+1)^2}\cdot \frac{(s+2)}{(s-2)} = \frac{-(s+2)}{(s+1)^2}
$$
is BIBO and asymptotically stable. The question is, if a pole is shorten out by the mutiplication with the other system, is it still BIBO and asymptotically stable? If I look at the hole system G(s) it is both, it has it poles with Re < 0 and the final value theorm is proofing a asymptotic stability.
But G2(s) is not asymptotically  or BIBO stable. Is G(s) still asymptotically and BIBO stable or can it not be it, because one sub system is not asymptotically/BIBO stable?


texts: Attempt to use 2n2222 as a switch, but it seems to work below 5v (all the way down to < 1v). Why?

texts:
Overview

I have the circuit drawn below and I'm expecting the circuit to only light the LED when 5v appears on the base.  I'm attempting to use the transistor as a switch so that only when an outside source voltage appears on its base then the secondary circuit will be turned on.

Questions

Does this circuit seem properly wired? (in basic theory)
If not, can you provide details about what needs to be changed?
Note: If my battery is backwards or something in the schematic that is just because I couldn't get it right on there.  In real life I have built this circuit and the LED does light.

It seems that the LED lights even when the 5v source is down to 1v and less.  Would you expect that to be true?

At how many volts on base of Q1 do you believe would it take for current to flow and LED to light?  What do you believe the lowest voltage that would activate the LED would be?

EDIT

I threw in the SW1 to show how I am testing the circuit.  Later that will be a pin from an Arduino board which will put 5v on that line.

simulate this circuit – Schematic created using CircuitLab

EDIT 2 (After some answers were posted)

I should also say that I got this idea for this circuit from the following schematic:

from : https://learn.sparkfun.com/tutorials/transistors/applications-i-switches

And I notice that mine has the 9v source and the sparkfun one has both at 5v and maybe this is where I've messed up the biasing.


texts: What on / off switch to use from a 2S Lipo to a Switching Regulator

texts:
Last time i used the Slide Switch for my application, everything worked well. The system has 2S (7.4v Lipo) Battery - Fuse - On/Off Switch - Switching Regulator - load ( Beaglebone + Wifi Module).

Now when i rechecked the website, i realized the switch is rated 12v 100mA. This is the scary part, although nothing got burnt or fried the last time, do i need to change the switch? can i use the same switch?

Is it better to use a rocker switch with a higher current specification and have it connected via a wire?


texts: What happens with the power grid if nobody uses electricity?

texts:
How much electricity does consume electric system by itself? Just to have an option at any moment to plug in anything at socket at home and turn it on. There are huge power plants to convert high voltage to much lower values (220/110V) and off-course they are with energy conversion efficiency < 100%.
What will happen if suddenly huge amount of power consumers just turn off EVERYTHING. (For example - Earth Hour, but not just the simple citizens turning off few lamps - completely everything, all huge factories, trains, traffic lights, street lights - total consumption blackout).
And the situation is - the electricity production is the same, but the only working unit is electrical system by itself - nothing plugged in, but it is functional.
Does the power grid something like huge heaters/huge engines - just to consume excess of the electricity power and keep system online without damaging?


texts: How to change LUFA default 8MHz crystal setting?

texts:
I have an Atmega32u4 micro controller with minimum hardware design. It has an embedded USB compatibility which can be enable/used with some software like LUFA.
Everything works fine (the computer detects the device as I defined in descriptor file and makefile) with 8MHz, setting in the makefile line 83:
F_CPU = 8000000

I also set the fuse bit settings of the microcontroller to use the internal 8MHz clock.
When I use a 16MHz crystal and set the low fuse bit to 111 (datasheet page 30) to use the 16MHz oscillation, and change the F_CPU line of the makefile to 16000000, the computer doesn't recognize the USB anymore.
I didn't disconnect from the microcontroller. I can change the setting back, so I assumed there is something that I should change in the code of LUFA. Is there anywhere else to modify the code to use 16MHz crystal?
PS:

The USB port is providing 5 volt power for the micro controller.
I am modifying the keyboard file of LUFA.
I tested the microcontroller with small blinking program and 16MHZ crystal, and it blinks, but no luck on LUFA.
I uploaded the Arduino Leonardo bootloader(which works fine with 16MHz) to the chip, and it works perfectly, but I don't like to use Arduino code.


texts:
As you see in the figure, programming the 8051 through serial port DB9 connector should be a fairly easy task
Connect the two pins of 8051 to max 232 and then to DB9

So the programming circuit of 8051 should contain no more than 1 chip,some power sources,crystals,capacitors and one connector port.
But when you search online for 8051 programmer circuit, they contain many chip like 89c2051 and whatnot.

Then why cant we program the 8051 using this simple circuit?

By 8051 i mean AT89S51/52.


texts:
So lets take your run of the mill SRAM, such as 23K256 from Microchip:
http://ww1.microchip.com/downloads/en/DeviceDoc/22100D.pdf

Do they mostly just use a generic 6T cell setup such as:
http://www.iis.ee.ethz.ch/~kgf/aries/FIG/fig5.4.gif

If not what do they typically use?

Also im not sure I completely understand the 6T cell setup, Like I get the general structure, and how it stores it using an inverter.....but which line are we reading from? The Bitline or NOTBitline?

Or is it we write to wordline to active the Cells, Send voltage to BIT/NOTBIT to over-write the new value. How do we write a value of 0?

And to read we just activate wordline, but don't send voltage to BIT/NOTBIT

is that correct or wayy off?

Also a side question: In the initial state, the inverters have no value....on either, so what would the value be when voltage is first applied? Since they are both technically sending out a 0? (sorry if that's a confusing question, it's hard to word it). I face the same thing with D-Flip Flops.....whats the initial value of them?


texts: How not to blow up a BLDC motor and its driver while code development

texts:
TL;DR how not to blow up a BLDC motor or its driver and the hard-earned money I have spent on this kit while developing a firmware from scratch?

Story: I have never done any motor stuff before, but I am quite good with microcontrollers. To give motors a shot of experience I got myself this kit for a fair price (sensorless BLDC motor):

I want to start from scratch and see if I can do as good as the original proprietary firmware (its only available in bin format). My question is:

Under which conditions the motor will get damaged (by a bad firmware) as I have heard that a badly placed debug point in code can release the magic smoke from the motor or driver. Or incorrect switching sequence of transitors, etc.

Can you please pinpoint the pitfalls that can lead to damage? So that me and future readers of this question can thank you!

Update (1) Suggest a lamp in series with supply power. Is this the case?


texts: In the case of audio, would it be accurate to think of a potentiometer as a fader between two inputs?

texts:
I kinda already asked the question in title, but I will reiterate —

In the case of audio, would it be accurate to think of a potentiometer with, for example, three lugs, as a fader between two inputs?

Please tell me why that's dumb or not dumb or something!


texts: What are the momentary switches in Dangerous Music Source?

texts:
I have a Dangerous Music Source. One of the momentary push buttons started to fail (I have to push it so hard to work that I'm afraid of breaking something else... I tried to re-solder it, but it seems to be an internal issue).
These buttons have an integrated LED (green in the case of my broken one). They have 4 pins to the circuit board, 2 rear ones for the contact, and 2 front ones for the led.
The space between the 2 front pins (LED) is 6mm.
The space between the 2 rear pins (contact) is 4.4mm.
The space between the row of 2 front pins and 2 rear pins is 5mm.
The width of the dark-gray plastic casing of the button is 7.5mm.
I am attaching 3 photos (downscaled to 1024 pixels wide) that show the button in details (I have removed the button cover and placed it on the board nearby).

Due to the Stack Exchange 2MB limit on image file size, the full resolution images are on my website here: https://florianbador.com/pub/dangerous-music-source-broken-switch/
What are these switches? Where can I find them?


texts: Mysterious ~1Hz oscillation in audio output

texts:
I'm trying to create a simple audio circuit that is able to output a sine wave at an audible frequency. I'm using an atmega328p for this because I'd like the frequency pattern to be programmable in software. It is working mostly correctly except for a mysterious ~1Hz oscillation on top of whatever frequency is being played, and I'd like to get rid of the ~1Hz noise. The code is pretty simple, just containing one interrupt to set the PWM value that is called about 30,000/s and there are no other interrupts or loop events. The circuit is simple as well containing the MCU, icsp header, reset pushbutton, audio jack and a low pass filter to get rid of high frequency noise. Here is a picture:

Originally I was using a breadboard but I found some suggestions that capacitative coupling in the breadboard could be causing this, so I moved it to the soldered protoboard above without success. Also, I've tried battery, wall and USB power with no success.

Any suggestions on things to try?
Could it be related to ground loops?

thanks.


texts:
I would like to design a device which measures acceleration, yaw, pitch and roll for motorsport/automotive application. I plan on using an analog accelerometer, to provide better bandwidth and low pass filtering control of the output voltage signals.

Where I am somewhat confused, is how to account for the installed orientation of the device. I.e. if the device is installed such that a 1G acceleration in the X axis (with respect to the car) is measured as a combination of accelerations across multiple axes with respect to the accelerometer (e.g. 0.3G X, 0.4G Y), what methodology would I employ to 'calibrate' the accelerometer output to produce an accurate measurement?


texts: Why is the LED attached to pin 10 on and how can I get it to turn off

texts:
Here is the schematic that I'm working with: http://www.circuitsonline.net/schakelingen/59/audio/led-vu-meter.html

The LED attached to pin 10 is always on. Is there anyway I could get this so that all 10 work as part of the VU-meter?


texts:
Can somebody explain the following schematic and how can I use this connector with a TRRS cable:
I can see pins 2 and 6 are connected but I don't understand why there are still 4 pins left instead of 3 (TRRS connectors have only 4 contacts, not 5).
I also don't understand why pins 4 and 5 point up.

This is the schematic for the PJ6026A.

Thank you.

UPDATE:
I think pins 1 and 3 point down because they are on one side of the connector, pins 4 and 5 point up because they are on the opposite side.


texts: Doing FFT of electroencephalogram signal at 200Hz - what window size to use?

texts:
I got a brainwave EEG(ElectroEncephaloGram) sensor that is continuously sending data over to my program at about 200 data points per second. Can someone suggest what window/bin size I should be using if I want to do a Fast Fourier Transform(FFT) of this signal?

I'm thinking of using the maximum - 1024 points, but that would mean that I need almost 5 seconds of data to update the readings. Is there some smaller size I can use for faster updates that would still be accurate?

Here's how my signal looks like (orange line, top):

Thank you!


texts: Switching Regulator[AP65211A] Issues: Higher Voltage then expected at minimal load, drops to 0 with small load

texts:
I normally just use linear regulators in my designs and this is why...

Switching Regulator in question: https://www.diodes.com/assets/Datasheets/AP65211A.pdf

Circuit:

Board Layout:

The problem I am having is under a 10K load the output is ~10V and is quite noisy(Sorry I will post scope images later if we can't solve this without it, and with a 47-ohm load it drops to 0.8V. I don't see what I could have done wrong. I have removed all other parts from the board except the regulator components.

DK part #s for all the parts used:

C6: 732-7526-1-ND
C7: 732-7494-1-ND
C8: 732-7539-1-ND
L1: 587-3143-1-ND
C9: 732-7539-1-ND
C10: 732-7511-1-ND
R2: RMCF0402JT100KCT-ND
R3: RMCF0402JT75K0CT-ND
R4: RC0402FR-0778K7L
R5: YAG2984CT-ND

Right now I am thinking its C8 needs to be bigger, or I have selected a very bad inductor?

Thanks,
Kyle


texts:
I need to switch a motor on and off by cutting it's battery connection and even though I could use a relay, I would rather to use a MOSFET, so things will be smaller and quieter.

The problem is, I am not sure about the best way to activate the MOSFET. It will be connected directly to he battery, so the load will be just after the MOSFET, which prompts me to use a P-Channel MOSFET...BUT the battery will be around 10V (7 cells of NiMH) and the MCU controlling the MOSFET will have a 5V signal, so the MCU won't be able to turn the MOSFET off, since 5V will still left the P-Channel MOSFET conducting.

The first thing that comes to my mind is to use a BJT to control the MOSFET and the MCU will control the BJT...but I wanted to ask in here first if there are other options out there, and ask for recommended circuits.

I am also concerned about flyback diodes, because since the motor is in a sealed box, there is no way I can place a diode in parallel with it to avoid voltage spikes around the MOSFET, so alternatives are most welcome (but please avoid saying "hey what about a relay", because this option I already know, and I am looking for new ones :D ).


texts:
I build an inverter to power some panels of EL paint (If you don't know what EL paint is check out this link). It puts out some very high voltage and I thought I'd check to see what amperage it is capable of delivering since the voltages it is operating at are rather dangerous (I measured 329v with my meter). Anyways, I tested the output amperage in several different ways. First I checked the amps on the high side while it was powering the EL panel and got ~874uA, pretty small. What really surprised me was that when there was no load present (direct short) my meter only measured 10.5mA, still pretty small. I would have thought that shorting the ends of the transformer through the meter would have caused bad things to happen, specifically white smoke and a melted transformer, but I experienced nothing of the sort.

I tested it with several different MOSFETs and also tried a small transistor (2N3904). The transistor actually caused it to supply less amperage so my thought is that it has something to do with the amount of current the MOSFETs and transistors are allowing to flow through them. My question is, why am I seeing such a small amount of amperage on the output of the transformer? Also, is this design safe since 10mA isn't fatal and the human body would provide some resistance lowing that number a bit more?

Datasheets:
Transformer
MOSFET
555 Timer


texts: How to determine phase shift for clock being generated for SDRAM connected to FPGA?

texts:
In the reference designs for a few FPGA development boards, I have observed that, there is always a PLL which generates two clocks at the same frequency but not in phase. One clock feeds to the SDRAM controller while the other "delayed" feeds the SDRAM_CLK which is output from the FPGA. I only know that the delayed clock is required since there is propagation delay between the FPGA and the SDRAM and the communication will not be synchronized between the two devices if this phase shifted does not exist. Is this the reason?

What is supposed to be the relationship between these two clocks and how does one determine how much phase difference is required for correct operation?


texts: How to put an external antenna on a wireless card

texts:
I have a USB wireless card and the listing said the following (If any use) "Mini 150Mbps USB WiFi Wireless Adapter Network LAN Card 802.11n/g/b 2.4GHz".

I am wondering how I could put an external Antenna (like the picture below) on this card or a similar one. Can I just solder leads to the Antenna and then to the board?

EDIT: I have looked inside of it, you can solder on to the internal contacts, My question is will the wire from the antenna to the new antenna still transfer the "signal" through it or do I need special wire.


texts: Difference between "cladding" and "traces" in PCBs?

texts:
I am kind of confused about, the difference between copper traces and copper cladding in PCBs.

Are they the same thing?

Is it necessary for a PCB to have them?


texts: Why is this voltage follower not working in Proteus?

texts:
I have a 4th order bandpass filter which needs to be biased using 1/2 Vcc. I am trying to achieve this using a voltage follower. The bandpass filter was constructed using Multiple feedback topology as shown:

On Proteus I get a 100kHz center frequency and a 4kHz band pass at a gain of 1 AV.

Using a +2.5V simulation goes as expected, and gives the desired response.

I designed two voltage followers using LM324, and tested these in a separate project. I get 2.5V output as expected.

On adding the voltage followers, and connecting just one output of the voltage follower to the second stage of the op-amp, simulation still takes place without errors, but the response is not correct, as I need to bias both stages.

On connecting both voltage followers, I get an error. I cant understand why.

Any suggestions why this is happening would be appreciated.


texts: Super simple: Convention for connecting batteries in series to load

texts:
Super simple question. I am new to electronics and have to connect 4 12V lead-acid batteries in series. Once I connect the negative terminals of each battery to the positive terminals of the others, can I treat the whole battery system as a 'single' battery? That is, when connecting this system to the load should I follow the standard convention to connect the positive terminal first, then connect the negative terminal?
The main reason I am asking is that I saw a more experienced person first connect the negative terminal of the battery to the negative bus, then continue to just arbitrarily make connections until finally, they connected the positive terminal of the series system to the load. It seemed like they were not following any sort of safety convention, but were quite confident about their approach.
I know this is fairly harmless, but working with batteries has always freaked me out a little bit. Any advice on this would be helpful!


texts: How to realize these transfer functions as a circuit?

texts:
While I am well aware of some of the technique about implementing transfer functions I wanted some input about how can i realize this transfer function with active filters (OpAmps are preferred):

1) $$
\frac{1} {(1-sT)}$$

it is unstable, it should be e^x (where x >0...unstable for step response input) Maybe can be pulled off with just a mosfet transistor?

2) Multiply the top equation by its complex conjugate

$$
\frac{(1+sT)} {(1+(sT)^2)}$$

What are some realizations of both of these Transfer functions?


texts: Latching control via active-high battery supply / regulator shutdown pin?

texts:
I'm looking to supply an MCU (3.3 V) from battery via voltage regulator: a pushbutton should enable the supply, the MCU then should keep the supply enabled until it wants to shut itself down. But the pushbutton should be dual-purpose, i.e. it should also work as a normal button readable by the MCU when it is powered.

I found STs STNS01 which integrates an LDO (3.1 V), a Lithium battery charger (4.2 V), and power path switches (supply or battery) and features a shutdown pin (active-high, but <4 V, with internal 500k pull-down) that disconnects the battery resulting in microamp quiescent current.

I don't get how the shutdown would be used without resorting to a voltage divider referenced to the battery voltage (~600 k pull-up on SD to 4.2 V should result in 1.6 V). For one, this would result in current (~ 4.3 uA), but also I can't think of a way to decouple the MCU/pushbutton from the battery voltage, i.e. when the regulator is shut down, the high-level on SD would cause currento to flow into the MCU supply via the protection diodes.

Using separate IO to control SD and read the pushbutton would be OK. Also, I'd think this could be done with a few transistors... but I don't see it :-/


texts: CADSOFT EAGLE libraries searching best practices

texts:
I just started to learn how to use EAGLE PCB software.

The device I wanted to draw as the first try containing two elements that are not in the libraries provided with Eagle out of the shelf: ATtiny861A and TDA5051A.

Most of the searches drives me to element14 site which is as I understand one of the most trusted for Eagle packages (as it is a main Asia Passific region CADSOFT seller). However NXP's library and Atmel library which I downloaded from element14 site does not contain those elements. There are ATtiny26 which is similar to ATtiny861A from the pinout and packaging point of view but I have nothing for TDA5051A.

I could expect that almost any component I can even imagine already was created by someone earlier. So I just have to find it in the right way to avoid extra job creating this element by my self and avoid some mistakes which I can make or someone can make.

So the questions are:

What is the best practice to find libraries for Eagle?
How can I be sure that the library I found is a good quality?


texts: What should I consider while designing a power supply for a device?

texts:
What should I consider while designing a power supply for a device ?

I need to design a power supply for an RF module, that need 3.3 V DC

All I know till now that I should take care about :The voltage in needs , the current & output impedance of my power supply ?

any more hints ?
any general notes about designing power supplies ?


texts: Using RF 433 MHz Transmitter in Basement

texts:
Electronics beginner here. I am making a robot controlled by Arduino that drives around in a basement car park with obstacles ---> like this. I need to transmit and receive radio signals from it constantly at up to a range of 50m.

Currently, I have looked into using the common RF 433 MHz to do so as it seems to be a very popular option. But I am afraid that due to the special environment its effectiveness will be affected.

How can I make RF 433Mhz work with my requirements?
Is there another RF that works better?
What about other options? Wifi? Bluetooth?


texts: Resistor noise equation gives infinite noise for an open circuit?

texts:
The thermal noise power from a resistor is
p = 4kTR
where:
k is the Boltzman constant,
T is temperature,
R is resistance.

Since an open circuit has infinite resistance, it would produce infinite noise--which, of course, is ridiculous. Where has my thinking gone astray? Does it have to do with the fact that any practical circuit has capacitance filtering the noise and also that to get that noise there must be some degree of impedance matching? That is, a very high resistance produces tons of noise, but is easily filtered by a tiny capacitance and is typically very mismatched impedance-wise.


texts: How to determine the correct polarity of the diode

texts:
I'm having trouble knowing when is the cathode negative or positive and vice verse ( I'm not talking about the symbol ) I'm saying, when do the polarities change? For example, look at these 2 pictures

That highlited diode oddly has a positive cathode, but normally the cathode is the one supposed to be negative, so I don't know when to decide the polarity of each diode.

In the following picture, what determines the polarity of the diodes and how can I understand it?


texts: How does the Intel 8086/88 know when to assert the IO/M signal?

texts:
Consider an Intel 8088 processor with a standard, parallel RAM and ROM implementation that also supports address/data bus access to various external peripherals like analog-to-digital converters (ADCs), UARTs, and more.

I'm having trouble designing a chip-select decoding scheme that I'm confident will work. Although I could use logic gates across all 20 address lines, the resulting PCB has significantly more traces and ICs, along with a greater potential of my design being incorrect. I'd like to utilize the IO/M pin to make my design easier to design and debug.

The 8086/88 datasheet describes the basic function of the IO/M pin but doesn't explain the underlying mechanism behind it. I understand that a logic low on the pin indicates a memory access and a logic high indicates I/O access, but I don't understand where the processor comes up with this information. The memory map I'm trying to work with has 2kB of address space reserved to address peripherals. Both ADC's require 8 bytes each to address individual analog inputs, and the UART needs a 1-byte placeholder.

0x00000 - 0x7FFFF : SRAM Chip 0 (512kB)
0x80000 - 0xDFFFF : SRAM Chip 1 (384kB)
------------------------------
0xE0000           : ADC 0  (8 Bytes)
0xE0008           : ADC 1  (8 Bytes)
0xE0010           : UART 0 (1 Byte)
------------------------------
0xE0800 - 0xFFFFF : Flash ROM (126kB)

Since memory maps can be arbitrary, how does the processor magically know when it's trying to access memory vs. I/O devices? By extension, how does the Intel 8088 know what to do with it's IO/M pin if I could easily swap the ordering of the above address space?


texts: How safely to send signal between logic and higher current pcb?

texts:
I'm designing a PCB with 4 FETs. These are driven in the same board by totem pole drivers, and their load are about 5A total. I am using PWM at 1000Hz.

The signal comes from a logic IC in another board. Is there a safe way to avoid loops and noise without using optocouplers?

The current scheme I am using is:

Logic board to Buffer PCB = 4 signal wires.
And each board has its own connection to the PSU. (GND and 12V)
The distance is going to be ~20cm max in what I think will be a noisy environment.


texts: How to make a HIGH pin on ESP8266 go LOW when device is turned off using a low side switch?

texts:
I ran into this issue while working with WeMos D1 Mini and Adafruit's timer board.

I had an N-channel MOSFET that was driven by the timer's DRIVE pin. When ESP was done doing its thing it would signal HIGH to TPL on the DONE pin which made the DRIVE go LOW and disable the MOSFET.

The issue is that DRIVE would never go HIGH again because ESP's pin stayed HIGH while the device was powered off and would continue to signal on DONE high enough not to let the timer enable DRIVE again. This ghost HIGH signal wasn't full 3.3V but just over 2V, which was still high enough to be interpreted as HIGH.

How can I make sure DONE is not getting a HIGH signal when the board is powered off using a low side switch?

Thank you.


texts: How does the addition of a bias-t circuit affect the impedance of a transmission line?

texts:
I've got a GPS circuit where the antenna is connected directly to the GPS receiver via a coplanar waveguide designed for an impedance of 50ohms. Unfortunately, I neglected to add the bias-t circuit that is used to provide power to the GPS antenna. Luckily, I was able to remedy this problem on the prototype by breaking the transmission line, soldering a 22pF cap across the gap and connecting the antenna side directly to a nearby 3.8V trace on the PCB. The GPS was able to get a fix in about 20s and happily tracked 9 satellites.

I now need to incorporate the capacitor and inductor of the bias-t into the circuit (Reference Design page 150) and I was wondering what considerations I need to make in order to ensure that the transmission line remains at 50ohms?


texts: Differences between a LM317AHVT and a LM317T

texts: Is there any practical difference between the LM317AHVT and LM317T vis-a-vis regulating a 900mA, 9-12V LED?


texts:
I am having trouble dealing with this exercise.  The data given is: \$U_G=110V, \: \omega=150rad/s, \: V_1=0V, \: V_2=5V, \: W=650W\$  Power factor =1.

Being the power factor equal to 1, I should be able to get the current intensity using the active power formula right? \$P= U_G \cdot I \cdot cos \varphi \$ so \$ \frac{650}{110}=I \$. As the total intensity is in phase with the voltage.

However I don't know how to proceed from there in order to find:
\$ R_1 , R_2, C,L\$


texts: Quartz crystals: ESR and how to calculate power dissipation (or drive level)

texts:
I am confused about something regarding the quartz crystals. More specifically I cannot understand the difference between the effective or equivalent series resistance (ESR or \$R_e\$), and the motional resistance (\$R_1\$).

Below is the typical equivalent circuit of a crystal (source is the AN-1260 App-Note from Analog).

There is also a formula giving the the equivalent resistance at a given load capacitance \$C_L\$: $$ESR = R_1 \cdot \left( 1+\frac{C_0}{C_L} \right)^2 $$

The way I understand it is that the ESR includes \$R_1\$ and also the resistive parts of \$L_1\$ and \$C_1\$. Is that true?

My confusion is actually related to how should I calculate the power dissipated in the crystal (drive level). I mean generally, we can say the power is equal to $$P = I^2 \cdot R$$ but which "R" should we put there? Is it the resistive losses, thus the motional resistance \$R_1\$ or the equivalent series resistance ESR?

I would personally use \$R_1\$ but there seems to be a confusion in the literature. So the application note I have linked before uses obviously \$R_1\$ and the same do other sources like the AN826 App-Note from Microchip or the AN3208 App-Note from NXP. But other sources use the ESR, like the SWRA495 application report from TI or the AN2867 App-Note from ST!

So, what is the correct resistance to use?!


texts: What would cause SRAM to have no errors when 5 of the bits are high?

texts:
We have a SRAM (8bit by 512k chip, 19bit address) connected to a XMOS micro-controller using a ribbon cable soldered on both sides.  The xmos micro controller is a startKit and the sram chip is a Allience memory chip we bought off mouser (part number 913-AS7C34096A-8TIN).  The SRAM chip is on a custom pcb board with breakouts for the pins.  I have a test routine that writes to every address and then reads back checking that the values return what was written.  There are three tests, one that writes the last 8 bytes of the address, one that writes all ones and one that rights all zeroes.  The errors appear to be random (meaning the bad data doesn't have a pattern).  However the addresses where the errors occur is not.  There are no errors ever when 5 specific pins are high on one of the boards, 4 on another, and 6 on the last two.  Each time the test is run a different number of errors occur but they range from 100-400 errors over the scope of the whole address range.

What might cause this?


texts: List of output currents in test conditions in CMOS buffer's datasheets

texts: in datasheets of commonly used CMOS buffers output low voltages are given at specific currents (100uA, 4mA, 8mA, 12mA, 16mA). 100uA current shows that the buffer has CMOS output driver, but i still wonder why manufacturer uses exactly this currents as test conditions? Does this refer to any standard? (I was trying to find answer in JEDEC standards, but still have no luck)


texts:
I have a digital IR-Sensor giving a low output while detecting something.
As I want to trigger something for a given time, I am looking for a circuit with an IC which can delay. As soon as the IR-Sensor pulls low, the IC shall output high for a certain time (around 1 second). Afterwards it shall pull low again. Then it shall stay low. If after the one second, the IR-sensor is still detecting something the delay IC should not output high, but wait until the IR-sensor stops detecting something:

Timing diagram for OP to edit.
         _____         _______   _______
Sensor        |_______|       |_|
               _____           _____
Output   _____| 1 s |_________| 1 s |___

I am currently using an Arduino to do this job, but i was hoping to make the Arduino obsolete and to have a circuit doing the job. Any suggestions? Power consumption shall be low as possible. So maybe 555 timers if possible not. Thanks


texts: Error in dsPIC33 Family Reference Manual Oscillator?

texts:
I'm using an external 20MHz (categorized as high-speed or HS range) resonator and using PLL, but I'm not able to clock the device up anywhere near the max cpu speed advertised.  How are you ever supposed to achieve 120MHz for F_SYS?

See section 7.7: Phase-Locked Loop, p.7-23:

Constraints:

0.8 MHz ≤ F_PLLI ≤ 8.0 MHz
120 MHz ≤ F_OSC ≤ 340 MHz
15 MHz ≤ F_SYS ≤ 120 MHz @ 125ºC

Equations:

\$F_{PLLI} = \dfrac{F_{IN}}{(PLLPRE + 2)}\$
\$F_{OSC} = F_{IN} \cdot \dfrac{(PLLDIV + 2)}{(PLLPRE + 2)}\$
\$F_{SYS} = F_{IN} \cdot \dfrac{(PLLDIV + 2)}{((PLLPRE + 2) \cdot 2 (PLLPOST + 2))}\$

If you can get to 340MHz, the highest you can go is if PLLPOST = 0: 340MHz / (2 * (0 + 2)) => 85MHz!


texts: The recommended input voltage for Arduino is 7-12V. Given that both 7V and 12V power supplies (AC-to-DC converters) are available, which voltage will be more suitable/practical? Could be in terms of factors like energy efficiency, costs, heat generation etc...


texts: How to get an old beer sign to work again?

texts: Has anyone tried to upgrade an old beer / cigarette sign before? I'm a total electronics noob, and I got my hands on one of these old Coors signs that has a 45x7 LED display board. The board has what appears to be 9 input pins, unsure of how they work. Am I stuck with junk, or is there a way to reverse engineer the inputs and build a new driver with an Arduino? Giving a 3.3V or 5V HIGH signal to any/all of the pins doesn't seem to light up the board. Wondering if I just need a higher voltage or something.


texts:
I want to design a power supply based on a line frequency transformer (50 Hz in my case), and provide a stabilized voltage (15 V) after the rectifier (a classic bridge rectifier with tank capacitor).
To create this stabilized voltage, I would like to use a buck converter such as the AP63200 from Diodes Inc.
I don't want to put a giant tank capacitor, so the ripple will reach up to 3 V (over a dozen of volts) at the input of the converter.
My questions :

is this ripple problematic for a DC/DC converter?
why Power supply rejection ration (PSRR) is never specified for DC/DC? Is this value meaningless?
why people always use LDO after a line frequency bridge rectifier?

Do you think it doesn't make sense to design a power supply using 50 Hz transformer, rectifier and buck? Should I better use a high frequency transformer like in most AC/DC supplies?
I would like to stay on a 50 Hz transformer for robustness against line transients, endurance and EMI concerns.
Thank you for all you what you can tell me about power supply designs based on line filter transformer!


texts:
I would like to solder micro USB connectors on my PCB, only for power (no data). I did that connection, but when I soldered it and connected the cable I could not have any power. Is my connection is ok? (the track coming from the right is the +5 V)

The component I used is this one: https://uk.rs-online.com/web/p/usb-connectors/7142353
I don't know if I should do something with the data pins, even if I'm not using them. And I don't know what's the purpose of "pins" 6 to 9.
The only thing I'm sure of is that the power is reaching the connector (I tested the potential between pin 5 and 1).
Thanks in advance for your help!
Please asked if I missed any crucial information.


texts: Why is there a copper winding isolated from the iron core of my transformer?

texts:
Here is a picture of a 1970's arc welding station.

There is a 9 inch bar of metal surrounded by 88 windings of 4mm copper, that used to be on the end of the secondary winding, which is made up of about 40 turns of 5mm copper.

What's it for?


texts:
I've built a laser power meter based on a photodiode (likely a ThorLabs FDS10X10), a simple op-amp circuit (op-amp is TLV2462, max 12V), and a microcontroller+screen:

Internally, I've built the following circuit:

simulate this circuit – Schematic created using CircuitLab

I'm not sure this is a reasonable circuit.  Here's what I was thinking coming up with it:

  The photodiode is reverse-biased for better sensitivity and linearity.  The voltage drop across R1 is linear with respect to the power hitting the photodiode.  To measure this voltage, I use an op amp, with potentiometer 2 causing negative feedback to reduce the op amp's ridiculous gain.First, pot 2 is set for maximum gain and pot 1 is tuned so that in complete darkness the voltage at E just drops to ground.  Then pot 2 is tuned to set the gain, and hence the range of brightnesses that can be measured.

However, the voltage at node E is not linear with respect to incoming light as I want and had expected it to be.

Example: In an otherwise-dark room, laser 1 produces an output of 0.678 (arbitrary units!) while laser 2 produces 2.198.  However, together they only produce a reading of 2.290 (while one would expect 0.678+2.198=2.876).  The op-amp is not saturated; I can produce a reading of ~18 with a much brighter source.

Question: what's going wrong with my circuit to cause this nonlinearity?  Is the equation easy to find (so that I might correct for it in software)?  Otherwise, if my circuit seems reasonable, which else might be going wrong?


texts: why is it bad if a coax cable (used for antenna cable) has multiple paths to ground?

texts:
I have an Internet modem/router device connected to a 20 foot LMR400 coaxial cable which uses N-to-N type connectors to connect to a 10 foot LMR400 cable, which is then connected into an omnidirectional antenna for cellular Internet reception. This is all on top of a very large metallic structure (a big metallic tower basically)

I've been told that I shouldn't let the N-type connectors touch any of the metal on the structure, as that creates a "ground loop" and additional paths to ground. I'm supposed to put rubber on the connectors or at least wrap them in electrical tape.

But I don't quite understand the electrical/physical reasons as to why the connectors should not touch any metal. Why does this cause a problem? I've read something about "reference" and "potential" being messed up by multiple paths to ground... could someone explain what people mean by that?


texts: MOSFET as bypass diodes in series of solar cells

texts:
I am building a small solar system of 5 solar cells in series (each about 5V 500mA in full load, total 25V 500mA) and want to maximize efficiency in case one cell is shaded.
Traditionally there are used bypass schottky diodes like this:

But since each solar cell has only 5V volts at full load, most diodes will make significant decrease of voltage (about 0,4V).
I saw examples of battery short circuit protection using P MOSFET as diode like this:

Is there any reason why I cant use this solution in solar cells aplication above? I have a lot of TPC8107 mosfets around. Voltage drop should be below 50 mV if I calculate right.
Only drawback I see the "mosfet diode" will stop working around treshold voltage (around 2V), but this is I think good. At 2V solar cell dont give any usable current at all.
What do you think? Is there any important drawback I missed?
I actually never seen a mosfet as diode connection in any applications yet and dont see any reason except the price...


texts:
Does anyone know if a NAND flash device (e.g. microSD) has to be continuously supplied with energy for its wear leveling algorithms work as designed? Or, if it doesn't matter if the device is (safely) removed from the host, or if the host (safely) shuts down?

EDIT: I'm am sorry for the unclear question, what I've meant to ask was if the SD's microcontroller has any means to "remember" the history of writes and reads after a (safe) shutdown. I mean, I know the answer would be obvious if the algorithms relied on data stored on volatile memory, but I know it is safe to assume that no volatile memory is present on these drives. So my question is,  if the data the wear-leveling algorithms rely on to perform as designed is present after a shutdown.

Again, I am so sorry for the confusion!


texts:
I'm trying to do a simple, low power, low cost power "switch" for a custom board (I know, it will be complicated).

The device will be powered by default by a coin cell battery (3V3 and lower) and can also be powered by USB (5V). I will use a boost converter (TPS61291) for the battery, it will allow a constant 3V3, with a bypass for sleep mode controlled by a MCU.

This is a part of the power rails I designed:

simulate this circuit – Schematic created using CircuitLab

The battery is protected by the schottky diode (some nA can flow into it, but it is accepted by the manufacturer)

If the VUSB is not present, the diode D2 will avoid reverse current in USB connector. D4 is protecting the LDO itself from the reverse current by bypassing it.

The boost bypass will be activated by the MCU when it is in active or when USB is plugged.

Do you think it will work correctly?


texts: Coupling the powerline communication modem for 3 phase line

texts:
i recently assigned for the Powerline Communication project for transmission up to 200MBps.the problem occurred when trying to find circuit for coupling between the modem and the powerline cable.is it just connecting the X2 class capacitor?or is there any special linear transformer for coupling purposes?

thanks....


texts: Looking for open source FPGA hardware and dev tools

texts:
Investigated FPGA boards but cannot find open-sourced board and vendor-neutral FPGA development tools:

The ORSoC manufacturer boasts open-sourcing on its website but I cannot really find strong evidence except webmastering OpenCores.org.
The duo: Xilinx advertises its products with "Open Source Hardware Innovation Contest for Mainland China Universities". Still their products are proprietary, poor support for *ix --. Similarly, Altera has a poor support for *ix, just check their OS support with Quartus or how to have your logic analyser in the synthetic step?
Group of small players -- let you point the best.

Is there some manufacturer strong with open-sourcing things such as hw and dev tools?


texts: Adding a Potentiometer to control the volume of a sub-woofer

texts:
I am adding a sub woofer into a room with 6 speakers (3 sets).  Each set of speakers is on an individual volume control wired back to a niles speaker hub. The speaker hub will be driven by an AudioSource AD508 8-channel multi-room digital power amplifier.  The speaker amp will get its line level signal from a Sonos Connect. (which I already have, and which does not have an output for a sub woofer.) . The sub-woofer has its own dedicated 300 watt amp which can take a speaker level input from the 8 channel speaker amp.

The AV cabinet is one floor below the room I am describing, so I need to be able to control the volume for the sub-woofer from the Sonos App as well as from the room with a hard wired volume control.(the way i can with the speakers)  I have teenage kids, so i need to be able to turn the volume down manually regardless of what they do intentionally or unintentionally when controlling the music from there mobile apps.

The cable run for the sub-woofer is direct from the AV cabinet to the subwoofer location.  This is done and cannot be modified.

I think I want to put a small potentiometer and knob directly above the sub-woofer sticking out through the gypsum board (drywall) for a very subtle but effective solution.

The sub woofer amp is 300 Watts.

Here are my questions:
Am I correct that a potentiometer can be wired to work as a volume control?
What is the spec for the potentiometer I need, given the 300 watt amp?
Where do I get it?
How do I wire it?

Is there a more elegant solution? (i do not want a wireless solution?)

Bonus Question:
The wire from AV cabinet to Sub-woofer is a 4 conductor wire.  Is there a way to take advantage of the extra wires to create a better solution?

Thanks in advance


texts: Cheap USB device for capturing state of ~64 sensors

texts:
I've been researching home security systems. Honeywell, GE, DSC, Napco - all seem expensive and behind the times.

I want private monitoring of my doors and windows, partitioned to floors of my home and the garage.  I figure I could even do without the wall-mounted control panel because I will always have my phone with me to arm or disarm and check status.

I can get a raspberry pi for $25 (at worst) to run the system and standard sensors which aren't so expensive.

The main problem for me then is interfacing with the sensors (wired).  I'm new to hardware so I think I should stick to an off-the-shelf USB device rather than try to build it, if possible.  I found at least one promising device but it's $100 for few ports and I don't even know that it will meet all the requirements alone.

I thought maybe a salvaged usb/midi keyboard would be a fairly generic solution in which I could brute-replace the keys with sensors.  But at $45+ for 25 key device, that's still kinda pricey and complicated.  Benefits are that all "keys" can be pressed at once, unlike on a qwerty keyboard and that switching from 25 "zones" to 61 "zones" and up is as simple as upgrading the salvaged keyboard to a longer model.

The door/window sensors are magnetic and I don't know if the new wire distances and power requirements can be driven by a keyboard's hardware without amps for each one.
I only need binary input on each channel.  Circuit closed or open?
For power considerations, I don't need to power all devices constantly, but rather scan them individually several times a second.
Ok, motion detectors and glass break sensors might be nice, if they work the same as the magnet sensors.  They need to be powered all the time.  Nice-to-have.
Since this is a security application, anything that can be done to avoid or mitigate sabotage by overloading the hub device from a sensor site seems smart.

Recommendations on how to get this done in a cheap device that is fluent with a standard computer interface?  Or is it very very easy to create a custom USB device that can perform this task?


texts: Why is my low pass filter attenuating everything so much?

texts:
I have a car stereo with low level outputs from an RCA connector. I wired one channel into a simple RC LPF, then into a TPA3116-based amplifier (this one), then to a single 4 ohm woofer.

Using a 100u or 47u capacitor (shown in picture), I can't hear anything at all, just static if I put my ear right up to the woofer. If I put in a 10u cap, I can faintly hear low notes and high notes, but I don't think the high frequencies are being filtered out, and it's ridiculously quiet everywhere. If I'm not mistaken, with R=8 and C=10u, I should notice frequencies above 2kHz being significantly quieter. If I remove the capacitor altogether, the woofer is significantly louder, so I know the amplifier is working properly. What gives?


texts: What is a good rule of thumb for practical minimum design duty cycle for a PWM DC motor controller?

texts: I am designing a drive that outputs an RPM of about ~350, with output torque of about ~10 mNm. I found a cheap motor that provides this torque (plus more for insurance), but the speed at rated voltage is much higher than I want. I calculated that a 30% duty cycle would give me the design torque and RPM I want. I am just concerned that I would be running the motor too slowly. I know that the microcontroller that sends the PWM signal has a limit on the minimum duty cycle I can apply, but I am wondering what, generally, is a good rule of thumb for practical minimum duty cycles applied to a motor (since if a motor moves too slowly, the friction, momentum, etc may change and it may not behave in the expected deterministic manner). To put it short, is 30% too low? Or should I be more concerned about the ratio between rated speed and design speed?


texts:
Sorry if this was asked before. I was unable to find such a question elsewhere in SE.

Why does space-wave communication (ie/ satellites) utilize different ground-station (GS1) broadcast and satellite (S)(re)broadcast frequencies? If "interference" is the answer, from where is it originating? Would it be GS1/receiving GS interference (sans S)? This would seem to imply that the broadcast signals are not ~straight-line. It would also seem to imply that the receiving GS would suffer the same problem from other (unmatched?) GS1s.

I was thinking that any slight ionospheric reflection (if any at these higher frequencies) of the GS1 signal received at GS, would be interfered with the S (re)broadcast.

Now, if the frequencies really must be different, then why is it usually written that f(GS1)>F(S). If rain attenuation is the answer, then how would this not affect (a) the GS1 signal, and (b) transmissions using higher frequencies (maybe none lower are available), then both GS1 and S signals will suffer.

Thanks!


texts: Can a Digital Signal Transceiver be made using AM?

texts:
I want to make a simple wireless thermometer using TMP36.
I've seen people making it using Xbee and some RF modules but I want to know if I can use a simple AM transceiver instead of specific RF modules.

My idea is to amplify signals from TMP36 (temperature sensor), send it to an AM transmitter, and use a ADC (i.e. from an Arduino) on the receiver side to convert the output of the AM receiver into a digital signals.

Can the same thing be done using FM or PM (Pulse Modulation)?


texts: Simultaneous sampling or doubled output rate with two LTC2400s

texts:
The quick version of my question is: How can I properly sync up two ADCs to a single source to sample it at the same time OR to double the sample rate? (The micro-controller would be able to use either mode.)

In the circuit below I'm using a pair of LTC2400 24-bit ADCs. I would assume that in order to properly sync them up I would need to provide an external signal to the FO pins. The datasheet uses 153.6 kHz but I'm planning on using 120kHz due to part availability.

The circuit shown is not the full circuit. The application is a specialized ultra low current meter.

Is my design the best way to accomplish this, or is their a more preferred method?

This would be my first design with a crystal oscillator not being used by a micro-controller. Is the implementation of that correct? Any further design recommendations?

VOP = input from analog front-end

SN74LVC1GU04DCKR pinout


texts: What's the purpose of the 1M resistor in this comparator circuit?

texts:
I find this circuit from ON Semiconductor's LM211 datasheet.

There is a 1M resistor from negative power rail to the 'reference' input. ON doesn't describe the circuit's function. I think it's a 'zero-crossing' detector, but why give it a small negative bias (about 1.5mV ?) ?


texts: Can eagle autoroute same signal on two layers?

texts:
I am trying to construct a PCB in Eagle v7.4.0 Light where some tracks are 220 V tracks. They are in a net class of its own.
Question is, can I tell eagle to mark these tracks/ratsnest lines to be automatically routed on both sides of a double-sided-pcb? (I want to use both sides for same signal, that way I can make the line thickness half of what it should be)


texts:
first of all, I searched enough, but did not get the simple answer...
What's the different between color ring & power Inductor...

Is it all about wattage?

Color rings are mainly 0.25W, Don't know the other one's watt...

I'm trying to remake a "DC boost" circuit with MT3608(B6289)...
Can I use a color ring Inductor Instead of this...?

Schematic:


texts: Soldering a thin spring steel wire to a PCB

texts:
Pretty noobish at electronics here. That said...

I want to attach a very thin 1080 spring steel/music wire (30 AWG or ~0.25mm) to a pcb with a thru hole, hopefully in an automated way. The choice of spring steel is for the mechanical properties.

It seems like soldering stainless steel is doable, see the below links. I think that applies to spring steel as well.

https://www.rcgroups.com/forums/showthread.php?35563-Soldering-Music-Wire-!-!-!
Stainless steel soldering
Soldering Nichrome wire to Stainless steel and steel to PCB

Though it looks like I'd need special acid (HCl) flux for this.

A few questions:

Does this seem doable?
Is acid flux necessary here? If yes, can that be done in a reflow oven or would this need to be done totally by hand?
I think I want the thru hole diameter to be as small as possible to roughly match the wire (Say 0.5mm), though I'm not super sure how small of a hole diameter I can get. Thoughts?
Is there any good way to automate this? I don't think I could do a pick and place type approach here, but is there a machine that could apply the right flux, put the wires in place, and then put the thing in a reflow oven?
If this is crazy and spring steel won't work, is there a better springy material?


texts: Explaining the date code of Nichicon electrolytic capacitors

texts: I want to know how to read the date code of Nichicon brand electrolytic capacitors. For example - I have the capacitor wit date code B1538. So it means it was manufactured at 2015 year and 38 week? And what the letter B means? The datasheet can be found here.


texts: How can I have different circuits relays based on a particular voltage input?

texts:
I want to build a circuit that is dependent on an input from a thermistor which is in a circuit that is a voltage divider.

Now if the thermistor is showing low temperature, then I want to increase my temperature supply voltage thus providing more temperature! But if the resistance of the thermistor is close to the correct value, I want to decrease the temperature supply or stop it!

Maybe nested relays but that does not really work, nested Schmitt trigger will only be more accurate but does not really deliver what I am looking for, maybe a certain OpAmp configuration but how?


texts: Which OpAmp supports voltage supply greater than + - 36V

texts:
I'm looking OpAmp which could be powered from dual power supply greater than  + - 36V.
Current transformer provides 36,9V. And LM358 on a single supply could work up to 36V. I'm looking something what could be work on dual supply up to 40V.
Any suggestions?
Thank you


texts:
In my testbench i set reset=1 and then reset=0 after 1 ns
In the simulation, err_count <= std_logic_vector(err_count_int); does not execute, does anyone know why?
reset_out <= '1'; is also executed

library IEEE;
use IEEE.Std_logic_1164.all;
use IEEE.Numeric_Std.all;

entity controller is
    port(
            enable : in std_logic:='0';
            reset: in std_logic:='0';
            clk : in std_logic;
            eds: in std_logic:='0';
            ecs: out std_logic:='0';
            reset_out: out std_logic:='0';
            en_pipeline: out std_logic:='0';
            err_count: out std_logic_vector(4 downto 0)
        );
end controller;

architecture beh of controller is

    signal err_count_int: unsigned(4 downto 0);
    signal increment: std_logic_vector(4 downto 0):= "00001";

begin
    process(reset) begin
        if reset = '1' then
            err_count_int <= to_unsigned (0, err_count_int'length);
            err_count <= std_logic_vector(err_count_int);
            reset_out <= '1';
        elsif reset = '0' then
            reset_out <= '0';
        end if;
    end process;

    -- process(clk) begin
        -- if enable = '1' and rising_edge(clk) then
            -- en_pipeline <= '1';
            -- err_count_int <= err_count_int + unsigned(increment);
            -- err_count <= std_logic_vector(err_count_int);
        -- elsif rising_edge(clk) AND eds = '1' then
            -- err_count_int <= err_count_int + 1;
            -- err_count <= std_logic_vector(err_count_int);
            -- ecs <= '1';
        -- end if;
    -- end process;

end beh;

```


texts:
I'm building an AC-Detection circuit. I want to detect when the AC power has failed ASAP so that I can react very quickly. (like 1-3ms should be enough time)
This was my first idea. It works in theory, but the zener power requirement of 10W is way too high.

I was hoping to use a 1/8w or 1/4w zener. When I increase the resistor to 1Mohm to reduce the current through the zener, the zener leaks most of the available current and the output voltage is miniscule :/

My 2nd idea, works.

It performed pretty well with my simulations.

The next step would be to feed the output voltage to a comparator that compares it against a reference voltage.
In order to do that, the opamp would need to be powered by a ground common to the bridge rectifier in this circuit.
The comparator would then turn on an opto-isolator.

It won't be possible to power the opto's LED using this circuit unless I reduce the resistor values and dramatically increase their power dissipation.
I think I'd prefer to make a capacitive power supply to power the comparator and opto.

Any thoughts?


texts: Explain in layman's terms Vgs and Vgs(th) of MOSFET's

texts:
I'm trying to understand \$V_{GS}\$ of MOSFET transistor. From what I understand \$V_{GS}\$ normally stands for voltage gate to source breakdown, but other than that I lack an understanding.  \$V_{GS(th)}\$ is the threshold voltage at which the mosfet will turn on, so I have some questions about the threshold voltage;

What happens if I go over the max threshold as told by the data sheet?
What happens if I'm under it?


texts: Chua's circuit producing unexpected waves?

texts:
I have built the Chua's circuit in the following diagram:

I then hook it to a soundcard oscilloscope. It produces the following wave:

Such waves doesn't change no matter how many times I repeated the experiment. It is in such form no matter how I adjust R. For large R, the frequency of the wave is larger. The wave suddenly disappears when R is decreased below something like 1.3k Ohms. What's wrong? Why is the wave like this?

I have repeated this several times, so I am sure it is not accidentally produced by poor connection. However, I use an ancient TL082 opamp...that's not ideal.

See here for simulations.


texts:
I've built a guitar amp with STA540, I'm trying to make it work now and I need some hints on how to continue debugging.

I'm getting no sound on the speaker, not even clicking, or anything.

I've tried putting a 1kHz sine wave to the input and connecting headphones to various parts of the circuit and it looks that the signal gets to the STA540 input, but there is nothing on the speaker output.

The schematic looks like this:

input coming from the left, Vcc is 12V
This is mostly copied from the datasheet example, only stby and in1 and in2 are grounded instead of being left as inputs (the 100 ohm resistors are left over from some experimenting).

Does anyone have any idea what I could try next to get this to play? I'm all out of inspiration :-)


texts: Thermal resistance of spring for cheap TO-92 heatsink

texts:
I am looking at using a MCP1700 LDO regulator in the TO-92 case style.

I was wondering about heat dissipation, and how to make a cheap-o heat sink for it, and had the brilliant idea of using a spring from my parts box. I found a spring that fits perfectly around the curved part of the case:

However, I'm not so good with the calculations involved: will this actually make any significant difference to heat dissipation?

Assuming some thermal paste around the case makes a pretty good thermal contact between the case and the spring.
Spring wire is 0.66mm diameter, with 6mm spiral diameter, and 15 wraps. To make things easy, I will assume the entire surface of the spring is in contact with air apart from the bottom 5 wraps, and so I get a surface area of about 390mm2 for the spring.

From the datasheet, θJA = 160°C/W and θJC = 66.3  °C/w
Is this enough information to calculate the new thermal resistance?


texts: Function of demultiplexers in Register File

texts:
What is the function of demultiplexers (DMX) in this Logisim diagram of a Register File design:

Also could you explain the meaning of:

dreg,sreg,treg

dsel,ssel,tsel

dwrite,swrite,twrite


texts: Post-synthesis simulation using Nangateopencelllibrary_pdkv1_3_v2010_12

texts:
I'm wondering if anyone has used the open-source Nangate library to do synthesis and post-synthesis simulation? I was trying to synthesis my processor and got the netlist verilog file from design compiler. Then I tried to simulate it using modelsim but it seems that my circuit was never initialized by reset. So I tried to instantiate the model DFFR_X1 directly check the simulation. Here is the testbench, DFFR_X1 is the flip flop module from the library:

And here is the simulation result, note the weird Stx signal when the circuit is being reset.

But at least output is right after reset. For my processor, outputs that are resetted by reset signal stay at Stx:

So I look into the library and find the module description for DFFR_X1 and I notices this:

where ng_xbuf is defined like this:

RN is the input reset signal, I don't understand why the library connect this input port to a output port? To compile my design and the library, I did:
vlog NangateOpenCellLibrary.v
vlog out.v (netlist verilog)
vsim -noglitch my_toplevel_module
and run the simulation the same way I did for RTL code which works perfectly fine. I also tried to let design compiler produce a sdf file and feed it to simulation but still didn't work. I'm really stuck here so please if you can give me any suggestion on what can be improve or other commands I can try. The full verilog library can be found here:
https://github.com/xiaoyi95/Nangate
Thanks a lot!


texts: How can I use an L298N driver with a 3.3v stepper motor?

texts:
so I'm starting to delve into stepper motors with arduino for a project I'm working on, which is proving interesting so far, with me first getting a motor far too small, and then also finding out that using a stepper motor is a blocking function, and not playing well with my code.

Anyhow, my concern is that all of the beefy nema 17 stepper motors are rated at 3v to 3.5v, the one I'm looking at rated for 3.35v for driving, however, all of the stepper motor drivers I can find capable of 1.5-2 amp loads have a 5 volt output.

I'm not sure if maybe there's just an obscure driver package that outputs a 3.5v signal or something along those lines, but I'm wondering what I need to do to use a 3.3 to 3.5v stepper motor with a 5v driver without burning it out, and likely drawing the full 1.5 or 2 amps that the driver can provide.

Perhaps just a diode with the right level of voltage drop in the correct orientations for each phase? I'll need to be able to move the stepper both directions though so I imagine that wouldn't work.

I did just find this post however that seems like it might actually be a non issue if I provide the stepper with a 5v or 5.5v supply.

Link to the motors I plan on using, likely the 48mm


texts: Calculating Phase/Time Delay induced by a 2-pole Bandpass filter? ie. Group Delay?

texts:
If you have a two-pole Butterworth bandpass filter described by a particular Q value (Q>0.5) and a resonant center frequency "f", is there any equation that will tell you the phase/time delay induced by this filter at "f"?

Thanks


texts:
I'm looking for a circuit that I can add to a universal Input board that will be able to handle a 5-24v input PNP or an NPN 0v signal that I can connect to my arduino.
I was considering using an optocoupler and then with the use of some jumpers, select what side is tied high or low and which side becomes the "input"
Perhaps there is a circuit I can use or a chip with this functionality?

Im thinking the MAX22191 chip might work for me. I can add some jumpers that would ground the chip and then use the "IN" signal as the field connector for PNP and if I need NPN, I would change the jumpers that would connect "IN" to 5v and use the ground connection as the field connector.


texts: 1500-6000V linear regulator (noise eater)

texts:
Is there any known approaches to regulate HV in the range of 1500-6000V in order to eat noise? Low-side regulation is a possibility.

The idea is to get ~100V higher voltage than needed, and then regulate it down with a linear regulator in order to achieve lower ripple noise. Supply current is 100µA-6mA, so this 100V regulation delta will dissipate not too much power.


texts: Designing a high intensity flash attachment for airsoft rifle

texts:
Dear readers of this community,

I've been looking into starting an electrical project and in my research I've often came across this community. Because none of the topics fully covered my question, I decided to ask a question of my own.

I play airsoft as a hobby (a team-based shooting game, similar to paintball) and many players (myself included) have a flashlight as attachment on their rifle. The thing is, this flashlight is mostly used to blind other players, instead of lighting your own path, so that got me thinking.

Would it be possible to create a capacitor-driven flash that would deliver more lumens in a fairly small/light package? I've looked into it myself and have considered the following options:

modifying a camera flash
a capacitor-driven LED
a capacitor-driven Xenon headlight (from a car)
a capacitor-driven flash bulb

The first option doesn't appear to be a good option, since most camera flashed don't deliver a lot of lumen or are either very pricey.

The other options would require a DIY circuit. I've been trying to design a circuit (in a program called Yenka, formerly Crocodile Physics) as I have some basic electrical knowledge (physics teacher), but not enough to confidently make the right choices.

I am therefore hoping some of you will be willing to share your wisdom on the matter. I am mainly curious as to which option seems best to you guys, and for some guidance for the circuit. One problem I've encountered is choosing a resistance for the charging circuit for the capacitor. A higher resistance results in a longer charge time and a lower charging current, but what is an acceptable current for a battery and a capacitor?

EDIT: Another thing I found regarding the LED: apparently they work better on a LED-driver. Is that a necessary component or would it work on a capacitor?

Thank you for your attention and your reply in advance!


texts: How does a fuse affect creepage reqirements?

texts:
I am designing a mains-powered device that has to comply with IEC 60079-15 (Non-incedive industrial eqipment). Creepage distances in this standard are inherited from IEC 60664, pollution degree 3. For \$230\,\mathrm{V}\$ AC it is \$4\,\mathrm{mm}\$ (assuming that the board is material class III). Especially at TO-220 transistors this is impossible to attain.

I have heard and seen in actual devices, that after fuse the creepage can be relaxed. On the Internet, some vague claims can be found (like this forum thread or this presentation(on page 39)), but no hard reference seems to exist.

Does it mean that devices can receive safety certificate if they pass laboratory testing, regardless of their construction?


texts: Can anyone explain how this circuit works?

texts: This is from an electric portable stove.


texts: Via fences for noise reduction of a chip antenna?

texts:
I'm working on a 4-layer PCB that has a wifi module and a chip antenna, the antenna is placed at the corner of the PCB and the copper beneath it is removed, I see that via fences are used on the breakout board of the same module, but the reference design doesn't say much about it, so I was wondering how they work ? how many via do I need ? their placement, sizes and the spaces between them ?

This is the breakout board

This is my current design

Edit:
This is the reference design for the module

Edit:

In addition to the references in the answer, I've also found a paper that mentions via fences in RF design, and has some evaluation of different layouts, High Density RF Loadboard Design section 4.3. Ground Via Shielding Evaluation

Also, I've calculated the spacing between the vias for 2.4GHz to be around 100mils.


texts: NTE 4050 buffer and current sourcing capability, datasheet reading woes

texts:
I am trying to construct an output that is switched on by the inputs to a buffer.  The buffer input, in the final design, will be sourced from an Arduino or Raspberry PI.  I needed the buffer because it provides more power/current source capacity than without.

I do not think the NTE 4050 buffer is providing much current and am not sure why?
There are a couple of items to note…
In the attached circuit, when R1 is deleted and the buffer output is left unconnected, the voltage, with respect to ground shows as 1.8 volts on the buffer output.

In the attached circuit, when R1 is switched to 22k, the voltage, with respect to ground, between R1 and the NTE4050 buffer, is maybe 1.7 volts.

In the attached circuit, when R1 is 1k, the voltage, with respect to ground, between R1 and the NTE4050 buffer, is close to .7 volts.
I am not sure why the R1/NPN transistor is overloading the buffer output so much and am not sure how to read the current source capacity from the datasheet?
I would figure that there should be a base->emitter voltage drop of .7 volts in the transistor.  If so, there should be a 1.1 Volt drop across R1. That should be 1 ma into base input of the transistor.  When I measure between R1 and the NTE4050 output, I see about .7 volts.   What is going on here?

The buffer is said to have high source and sink current capacity.  Once the transistor is switched on with minimal current, I wish to apply a load between GND and OUT in the schematic.
The primary problem relates to my understanding of the datasheet for the 4050 buffer and why it is not easily able to source a couple milliamps?

http://media.nkcelectronics.com/datasheet/s8050.pdf
http://www.nteinc.com/specs/4000to4099/pdf/nte4049_50B.pdf


texts: I don't know whether HD44780 LCD is correctly initialized in Proteus

texts:
I'm trying to control an HD44780-based LCD in Proteus with 4-bit interface. The problem is that the simulation log gives me a series of messages, which I think means that I'm not sending the commands for initialization correctly.

The initialization code for the LCD is the following:

void Inicia_LCD4(unsigned short dato)       /* Función para inicializar la*/
                                            /* pantalla LCD.                  */
{
    PORTD = 0;
    retardo_ms(16);

    E = 0;
    retardo_us(5);
    E = 1;
    PORTD = 0x60 | 0x04;
    retardo_us(5);
    E = 0;

    retardo_ms(10);

    E = 1;
    PORTD = 0x60 | 0x04;
    retardo_us(5);
    E = 0;

    retardo_us(100);

    E = 1;
    PORTD = 0x60 | 0x04;
    retardo_us(5);
    E = 0;

    retardo_us(100);

    E = 1;
    PORTD = 0x60 | 0x04;
    retardo_us(5);
    E = 0;

    retardo_us(100);

    E = 1;
    PORTD = 0x20 | 0x04;
    retardo_us(5);
    E = 0;

    retardo_us(100);

    E = 1;
    PORTD = 0x0c | 0x04;
    retardo_us(5);
    E = 0;

    retardo_us(100);

    E = 1;
    PORTD = 0x60 | 0x04;
    retardo_us(5);
    E = 0;

    retardo_us(100);

    E = 1;
    PORTD = 0x08 | 0x04;
    retardo_us(5);
    E = 0;

    retardo_us(100);

    E = 1;
    PORTD = 0x60 | 0x04;
    retardo_us(5);
    E = 0;

    retardo_us(100);

    E = 1;
    PORTD = 0x40 | 0x04;
    retardo_us(5);
    E = 0;

    retardo_us(100);

    E = 1;
    PORTD = 0x60 | 0x04;
    retardo_us(5);
    E = 0;

    retardo_us(100);

    E = 1;
    PORTD = 0x78 | 0x04;
    retardo_us(5);
    E = 0;
}

the simulation log result is the following:

        Initial delta set to 2.5e-05
[HD44780] Set Function: bits=8, lines=1, dots=7 [LCD1]
[HD44780] Set Function: bits=8, lines=1, dots=7 [LCD1]
[HD44780] Set Function: bits=8, lines=1, dots=7 [LCD1]
[HD44780] Set Function: bits=8, lines=1, dots=7 [LCD1]
[HD44780] Set Function: bits=4, lines=1, dots=7 [LCD1]
[HD44780] Set DDRAM ptr = 03 [LCD1]
[HD44780] Set DDRAM ptr = 03 [LCD1]
[HD44780] Cursor left [LCD1]

and the pin assignment on my simulation is the following:

And of course I'm trying to copy this format:

How can I solve this problem?


texts: Solving a linear system of equations from a mesh analysis in the s-Domain

texts:
Here is an exercise from my Textbook in which one is asked to find the mesh currents:

The first thing I did was find the s-Domain equivalent of the circuit:

Now, I can write the mesh equations from it:

From Mesh 1:
$$
\frac{6s\cos{13}+12\sin{13}}{s^2+4}= \frac{4000}{3s}\left(I_1-I_2\right)+2\left(I_1-I_3\right)$$

From Mesh 2:
$$
\frac{4000}{3s}\left(I_2-I_1\right)-10^{-3} +10^{-3}s\left(I_2-I_4\right)=-0.005\,I_1
$$

From Mesh 3:
$$
\frac{6s}{s^2+4}=2\left(I_1-I_3\right)+\frac{1000}{s}\left(I_4-I_3\right)
$$

From Mesh 4:
$$
\frac{1000}{s}\left(I_3-I_4\right)-10^{-3}+10^{-3}\left(I_2-I_4\right)=0
$$

Upon simplification, the linear system to be solved is the following:
$$
\begin{cases}
\frac{6s\cos{13}+12\sin{13}}{s^2+4} & =  \left(\frac{4000}{3s} + 2\right)\,I_1 - \frac{4000}{3s}\,I_2 -2\,I_3\\
10^{-3} &=  \left(\frac{-4000}{3s} + 0.005\right)\,I_1 +\left(\frac{4000}{3s} + 10^{-3}s\right)\,I_2 -10^{-3}s\,I_4\\
\frac{6s}{s^2 + 4} &= 2\,I_1 - \left(2+\frac{1000}{s}\right)\,I_3 + \frac{10^3}{s}\,I_4\\
10^{-3} &= 10^{-3}s\,I2 + \frac{1000}{s}\,I_3 -\left(\frac{10^3}{s}+10^{-3}s\right)\,I_4
\end{cases}
$$

  Now, I would like to ask if there is a method to solve the above system with MATLAB or a calculator because it seems pretty daunting to be done by hand.


texts: Question relative to pads for capacitors - high frequency

texts:
In the article
Compact sub nano second pulse generator using avalanche transistors, I read P. 874

Further, we used pads on a doublesided
0.062” FR-4 epoxy glass laminate pc-board for
capacitors C6-C8 instead of soldering on 3 ATC capacitors.
Since the pc-board dielectric has a low series inductance,
this improves the pulse rise time significantly. Previous
attempts to use pc-board capacitances for low values of
capacitors [5] have used complex construction techniques
such as dielectric wedges to accommodate the avalanche
transistors and their bias networks with the pc-board
capacitors. However, our design simply lays out the
capacitors as pc-board traces (Figure 3) that easily connect
to the transistors.

I would like to understand what are these "pads" and how this improve the rise time significantly ?


texts: Connecting a lower voltage load to a series of higher voltage batteries in halfway?

texts:
I have a battery supply source which is a series of lead acid batteries up to 72V.

I have a 48V motor system (few kilowatts) and peripherals to be installed on to this power source. Due to limitation of part supplies, space constraint and costing, I do not have converters and peripherals to do the conversion.

simulate this circuit – Schematic created using CircuitLab

My concern is that what the complications or problems will be for such arrangement?

Thanks in advance for advices!


texts: Is it safe to connect +3.3V and -12V to get 15.3V on an ATX PSU?

texts:
I have a Corsair VS350 Power Supply which has a 24-pin connector. Some pins supply +3.3V and one pin supplies -12V. I don't use this PSU in a computer but for other projects.

I basically need a voltage at about 15V to power a peltier. Since I can't just connect several voltages in series (as far as I understand) I had the idea to just use the +3.3V as input voltage and the -12V as output voltage instead of ground. Does that even make sense and is it save?


texts: DIT-MCO hardware with Rotary switch & Nixie Tubes?

texts:
I really needed some help. I can't for the life of me find any information pertaining to this hardware manufactured by the DIT-MCO Electronics Division. The most information I can glean is that It's a Type 45 switch and was made in Northlake Illinois and that it's attached to a rotary dial. Any information or applications for these pieces of hardware would be greatly appreciated!
One more bonus, my grandfather also gave me a Nixie Tube display and I have yet to test it out. I'm not sure any specifications or what equipment to use with it to make sure I don't blow it up (figuratively); any information on the tubes would also be appreciated. Thanks!

Here are pictures for the hardware!


texts:
I have a transmitter device which periodically sends CAN messages over the bus. I am using an esp32 microcontroller to receive these messages, using a transceiver in between.
When I start the transmitter device, I can read messages properly for about 10-15 seconds. The voltage between CAN_h and CAN_l is around 0 V at that time. However, after a certain period, the messages stop and the voltage goes to about 1.8 V between these two cables.
I can't figure out the issue. Can somebody please help me on this.
The bus resistance is 60 Ohms and transmission length is around 1 meter. It seems to me that the transmitter gets stuck in dominant state but I don't know how to clear this issue without restarting the device.


texts: Does CPU pipelining always imply a multicycle datapath?

texts:
I'm studying the MIPS CPU and I have a very basic question about the datapath.  Since the MIPS CPU uses a 5 stage pipeline, that means that the pipeline is using a multicycle datapath, correct?  If a CPU has instructions where the Cycles Per Instruction is greater than 1, the CPU is using a multicycle datapath.  Correct?

I guess I'm trying to understand if there's ever a case where you can have a pipelined CPU that's NOT using a multicycle datapath.  In my mind, pipelining always implies a multicycle datapath.  Is that the case?  Or are there exceptions?


texts: Having issues with attempting to draw the Bode Plot of a complex pole?

texts:
Here is the graph that I'm trying to achieve.

\$H(s) = \frac{1}{s^2 + 2s + 100}\$

\$H(s) = \frac{1}{100(\frac{s^2}{100} + \frac{2s}{100} + 1 )}\$

\$\zeta = 1\$ and \$\omega = 100\$ which indicates that if there is a peak, it should occur at \$10^2\$. Instead it occurs at \$10^1\$, what's going on? Also the rules over here http://lpsa.swarthmore.edu/Bode/BodeReviewRules.html indicate that the frequency would be 0dB until it hits \$\omega_0\$ which is also not the case. It is decreasing at a rate of 20dB/dec before it hits that point. What is going on?


texts: Simulation of an Operational Transconductance Amplifier in Orcad Capture

texts:
I wanted to simulate an OTA (Operational Transconductance Amplifier) by using a block G representing a controlled source (I have also put input and output resistances):

First question: how can I connect it to power supply (VDD, VSS)?

Now, in another schematic (which I have made root) I have created a hierarchical block which will represent the previous scheme in a compact way:

Now, If I try to simulate this I get the following warning:

So,

Second question: how can I tell the simulator that the template of the previous block is the initial schematic? I have found this guide and put the initial schematic in the voice "Implementation name" of the hierarchical block, but it shows this problem...


texts:
I only have a basic knowledge of electronics so I apologise if this is a stupid question.

I've created a NOT gate using a 2N2222 NPN transistor shown below:

When the switch is open, the LED is on and when it is closed the LED is off.

I understand that in parallel circuits all branches receive the same voltage, regardless of what is happening in other branches.

My issue is that the transistor and the LED + resistor are in parallel to each other. Hence, according to the parallel circuits rule, the LED should always receive the same voltage (and, as resistance is constant, the same current), and therefore be on, regardless of whether the transistor is conducting or not.

If that was the case the LED would be on whether or not the switch was closed or open and the NOT gate would not work.

Could you please explain why this is not the case?

I hope my question makes sense and thanks in advance.


texts: Surge protection for differential amplifier

texts:
How does one surge protect a differential amplifier circuit? Assuming the absolut maximum stresses on the amp IC input pins is Gnd-0.5V -> Vcc.

Clearly TVS alone are insufficient to clamp to Vcc. What is the usual solution for this? Say for a 1kA residual lightning protection assumption.


texts: When to change a PCB number and when to change the Revision?

texts: I want to know if there are any guidelines about when it's supposed to change the PCB's number (1.0 or 2.0) or it's revision (Rev A, Rev B).


texts: Voltage Divider Multiplier Value Too High?

texts: After constructing a voltage divider to reduce the voltage from my power supply (Output 10kV, 30mA) an oscilloscope probe was used in hopes of measuring the output voltage of the system. Due to the way this system functions a DMM could not be used due to the high pulses of voltage outputted by the power supply as the input voltage increases. That is why I thought it would be best to use an oscilloscope with a voltage divider to measure this voltage. In my case the voltage divider was configured where R1 = 64.1MΩ and R2 = 1.298MΩ (R1 was initially set at 23.00MΩ however my oscilloscope could not read the output voltage as high as was needed so the resistance of R1 was increased). After performing the calculations necessary to determine the amount the output voltage seen on the oscilloscope needs to be multiplied by, a multiplier of 52.15 is produced. I followed the math seen on this post (Measure high voltages with a multimeter) which resulted in this value however it seems to be too high. Did I simply calculate incorrectly or is the equation found there incorrect? (A high voltage probe is being used with an impedance of 40MΩ which has been taken into account when calculating the multiplier.)


texts: How does using memory with more bits allow you to reduce the address bus?

texts:
If you are using a CPU to address one 2MB memory module, then since 1MB = 220 and 2·220 = 221 = 2MB, you need 21 address lines.

If you use a 2MB 16-bit memory module instead, you can remove address line 0. Why is that?


texts: Why does this comparator exhibit non-binary behaviour?

texts:
I'm attempting to use the TLV3501 (Datasheet) with the following circuit.

Input at S_IN is around 2.5VDC (i.e. no waveform).

I'm expecting to see a sharp transition between rails on the output as RV1 is adjusted and the voltage at pin 2 transitions across 2.5V, like this:

Instead what I'm seeing is more like this:

I.e. I see the rail voltages at the extremities of RV1, and around the middle the output at pin 6 is more or less the same as at pin 3. If I apply a signal at S_IN I see that signal on the output.

Here is a photo of my circuit.

Can anybody tell me the reason for this non-binary behaviour, and what I would need to do to get the output response to resemble the first graph.
I understand that using a breadboard could cause capacitive coupling or oscillation but I would have expected that the comparator would give the expected output with only DC at the inputs. Or am I wrong?

Edit Scope output

Extremities of RV1 showing rail voltages

RV1 near the midpoint, showing around 2.5VDC out

With a 400hz sine wave I can get the comparator to swing to one rail or the other by tweaking RV1 but not a clean switch from rail to rail.

Edit Scope trace of top of C1, 20mV and 10uS / div. My scope actually shows the same trace (with less amplitude) with no power applied so I'm not sure how much of this is actual noise.

Scope trace of output, 20mv and 1uS / div. Looks like there is oscillation after all.


texts: Driving an infrared LED from a coin cell

texts:
I am designing a remote-control type IR transmitter that will be powered by a coin cell battery (i.e. CR2032) and commanded by a microcontroller.  The LED is pulsed at around 40kHz.  How can I ensure that the LED current will be consistent as the battery discharges?  Here are the problems I've encountered:

The CR2032 datasheet from Energizer shows the battery voltage starting at 3V and decreasing to about 1.8-2V.  (1.8V is also the minimum brown-out voltage of the micro I'm using, the attiny85v.)  If the LED has a maximum forward voltage of 1.5V, that means if I used just a resistor the voltage drop would go from 1.5-0.3V over the lifetime of the battery.  If I set the LED current at 15mA at the nominal 3V, the current will be just 3mA by the time the battery dies.
Trying a more advanced circuit, such as the simple BJT current limiter in the diagram below, works fine down until around 2.2-2.4V.  Rsense needs around 0.5V across it due to Q2's \$V_{BE}\$, and Q1's saturation voltage adds another couple tenths.  This is too much overhead, I need to reduce it to around 0.3V somehow.
Finally, I don't want to use a switching regulator for two reasons: I want to keep the part count low, and I don't want the switching frequency to interfere with the 40kHz modulation of the LED.

simulate this circuit – Schematic created using CircuitLab

Or, let me know if I'm overthinking this and a widely varying LED current is ok for a remote control.


texts: Interrupt handling in microcontrollers and FSM example

texts:
Initial question

I have a general question about the handling of interrupts in microcontrollers. I am using the MSP430, but I think the question may be extended to other uCs.
I would like to know whether is or not a good practice to enable/disable interrupts frequently along the code.
I mean, if I have a portion of code that is not going to be sensitive to interrupts (or even worse, must not listen to interrupts, for any reason), is it better to:

Disable the interrupts before and then re-enable them after the critical section.
Put a flag inside the respective ISR and (instead of disabling the interrupt), set the flag to false before the critical section and resetting it to true, just after. To prevent the code of the ISR from being executed.
Neither of the two, so suggestions are welcome!

Update: interrupts and state charts

I will provide a specific situation. Let us assume we want to implement a state chart, which is composed by 4 blocks:

Transitions/Effect.
Exit conditions.
Entry activity.
Do activity.

This is what a professor taught us at university. Probably, not the best way of doing it is by following this scheme:

while(true) {

  /* Transitions/Effects */
  //----------------------------------------------------------------------
  next_state = current_state;

  switch (current_state)
  {
    case STATE_A:
      if(EVENT1) {next_state = STATE_C}
      if(d == THRESHOLD) {next_state = STATE_D; a++}
      break;
    case STATE_B:
      // transitions and effects
      break;
    (...)
  }

  /* Exit activity -> only performed if I leave the state for a new one */
  //----------------------------------------------------------------------
  if (next_state != current_state)
  {
    switch(current_state)
    {
      case STATE_A:
        // Exit activity of STATE_A
        break;
      case STATE_B:
        // Exit activity of STATE_B
        break;
        (...)
    }
  }

  /* Entry activity -> only performed the 1st time I enter a state */
  //----------------------------------------------------------------------
  if (next_state != current_state)
  {
    switch(next_state)
    {
      case STATE_A:
        // Entry activity of STATE_A
        break;
      case STATE_B:
        // Entry activity of STATE_B
        break;
      (...)
    }
  }

  current_state = next_state;

  /* Do activity */
  //----------------------------------------------------------------------
  switch (current_state)
  {
    case STATE_A:
      // Do activity of STATE_A
      break;
    case STATE_B:
      // Do activity of STATE_B
      break;
    (...)
  }
}

Let us also assume that from, say STATE_A, I want to be sensitive to a interrupt coming from a set of buttons (with debouce system, etc. etc.). When someone presses one of these buttons, an interrupt is generated and the flag related to the input port is copied into a variable buttonPressed. If the debounce is set to 200 ms in some way (watchdog timer, timer, counter, ...) we are sure that buttonPressed cannot be updated with a new value before 200 ms.
This is what I am asking you (and myself :) of course)

Do I need to enable interrupt in the DO activity of STATE_A and disable before leaving?

/* Do activity */
//-------------------------------------
switch (current_state)
{
  case STATE_A:
    // Do activity of STATE_A
    Enable_ButtonsInterrupt(); // and clear flags before it
    // Do fancy stuff and ...
    // ... wait until a button is pressed (e.g. LPM3 of the MSP430)
    // Here I have my buttonPressed flag ready!
    Disable_ButtonsInterrupt();
    break;
  case STATE_B:
    // Do activity of STATE_B
    break;
  (...)
}

In a way that I am sure that the next time I execxute block 1 (transition/effects) at the next iteration I am sure that the conditions checked along the transitions are not coming from a subsequent interrupt that has overwritten the previous value of buttonPressed that I need (although it is impossible that this happens because 250 ms must elapse).


texts:
I'am working with HB100 doppler sensor and I tried to build the amplifier shown in the datasheet of HB100. This amplifier uses opamp LM324, I don't know why it doesn't work. The Vout of the circuit is always at 2.5V and the Vout of the first opamp is alway on a fixed value. I have attached the schematic and layout of my circuit, someone could help me? What I'am doing wrong? I understand that LM324 is not the best way to amplify the IF signal of HB100, but at least I should see a signal at the output!
Thanks.


texts: Essential difference between normal irda mode and low-power irda mode?

texts:
guys, I'm learning stm32f401x mcu. All I have is an rm0368 reference manual pdf file. No mcu chip right now. From the manual, I learnt that PSC instead of USART_BRR is used to generate baud rate in low-power irda mode. I'v also read the irda spec pdf file, but it didn't help (perhaps I just missed important things). So what's the essential difference between normal irda mode and low-power irda mode, from the point of view of usart circuitry? Does the term 'low-power' refer to the entire irda module in a finished product (due to weaker radiation power), or does it refer to the irda block inside the mcu chip (due to shutdown of certain sub-block under this mode) ? Thx.
---- a related question on pulse generation in low-power irda mode -------
In normal irda mode, we use USART_BRR to generate baud rate from PCLK. So the pulse width is basically 3 * (Tpclk * DIV_Mantissa), DIV_Mantissa is a 12-bit long number.
While in low-power irda mode, PSC[7:0] is used to generate irda low-power baud rate from PCLK. The manual says "Instead, the width of the pulse is 3 times the low-power baud rate which can be a minimum of 1.42MHz". I assume that in this mode, the pulse width we can obtain is 3 * (Tpclk * PSC), where PSC is an 8-bit long number.
How can I get a longer pulse with a smaller divisor?


texts:
I find the concept of phase lag and and lead quite confusing.

Suppose we have two voltages

\$V(\theta) = V_{max} \cdot \sin(\theta + 30^o)\$

and

\$V(\theta) = V_{max} \cdot \sin(\theta + 60^o)\$

If frequency and maximum voltages are same

then according to the definition

"The leading alternating quantity is one which reaches it maximum or zero value earlier than the other quantity."

\$V(\theta) = V_{max} \cdot \sin(\theta + 60^o)\$ is leading the \$V(\theta) = V_{max} \cdot \sin(\theta + 30^o)\$ by 30 degree.

But what if we compare

\$V(\theta) = V_{max} \cdot \sin(\theta + 89^o)\$ and \$V(\theta) = V_{max}\cdot \sin(\theta + 120^o)\$ ?

Then which one is leading ?

For example if \$ \theta\$ is 1 degree then \$V(\theta) = V_{max} \cdot \sin(1^o + 89^o) = V(\theta) = V_{max} \cdot \sin(90^o)\$

and \$V(\theta) = V_{max} \cdot \sin(1^o + 120^o)\$ is \$V(\theta) = V_{max} \cdot \sin(121^o)\$

so it means that  \$V_{max} \cdot \sin(\theta + 89^o)\$ is leading the  \$V_{max}\cdot \sin(\theta + 120^o)\$ because \$89^o\$ reaches its maximum value earlier than \$120^o\$ ?

While on the other had \$120^o\$ is greater than \$89^o\$ in phase. So what is the case ? Which one of them is leading ?


texts: Can I/O expanders be used to drive a Camera or LCD?

texts:
After searching around it seems that I/O expanders are used mostly to drive LEDs or buttons.
Could something more complicated like an LCD be driven without bit banging? I.e. are there typically libraries that do all the work?
Is this a typical use of I/O expanders?
An example I was thinking of was an ESP32 and OV2640 camera module with the pcf8575 I/O expander.


texts: So I'm using a Fluke i200s current clamp in combination with an  oscilloscope to measure the AC current. Normal current clamps have a current output, but this one has a voltage as output. Now my question is does this clamp has the same working principle as the others(like a transformer with one primary winding), and just measures the voltage instead of the current. Or does this clamp works differently, and how?


texts: How to fix oscillations in cable guard drive?

texts:
I am designing a guard drive for a coaxial cable, to drive its shield as a guard for low leakage measurements. After seeing some issues in the sim, I arrived at the following minimum circuit which reproduces the issue:

The lines from right to left show a source impedance variation from 100 ohm to 100 Mohm. The desired bandwidth is DC - 50kHz with a gain of ~0dB. The bandwidth can be lower for very large input impedance as they roll off sooner even with driven guard. But the amplification is a problem.
C1 is the inevitable capacitance between the signal and its guard. C2 is the inevitable capacitance between the guard and ground. These caps are inevitable because they represent what the cable and EMC caps/diodes would contribute. Individually, neither C1 nor C2 lead to oscillations when R1 is sufficient. However, when both are present, any value of R1 will lead to oscillations for some input impedances at some frequencies. I also tried more complex impedances instead of R1 but it didn't improve substantially.
So I am now puzzled. How are driven cable guards implemented in practise, to prevent oscillations?
EDIT:
The only remedy, I found so far is adding capacitance from the signal to ground (essentially adding to the Opamp input capacitance). However, in practise, adding ~1 nF of capacitance from signal to ground can also be a concerning source of leakage. And this also limits bandwidth, so I hope that there is a better solution.