texts: How to buffer an ATMEGA for millisecond-level power interruption without strange behavior?

texts:
I have an ATMEGA328p-pu arduino with an LED + shift-register strip circuit attached over SPI.  When it turns on, it increases a variable in EEPROM to advance the display mode.

We have the brownout detector set to level 1 (2.7V).
There is a 1500 uf capacitor attached in parallel to the power leads to, hopefully, keep the arduino from changing modes on a physical impact, since the battery terminals can disconnect slightly for a millisecond (?) or so.
There is a diode on the cap's positive lead to prevent the cap from discharging into the LEDs, so it only buffers the arduino.
There is also a 1000 ohm resistor in parallel across the cap to drain it since it was holding a voltage, which we assume was behind a problem where the chip wasn't lighting up the LED circuit sometimes on boot.
The arduino pro mini and strip are rated at 5v, but we routinely run them at 3.7V so they can be powered with a single Li-Ion cell.

Sometimes after sitting for 10 or 15 seconds, the circuit won't light up.  Sometimes after disconnecting the battery and reconnecting it several times in a row, it will then light up.

Could anybody recommend a better way to provide a power buffer to the ATMEGA (but not to the LED strip)? Are we doing it correctly for the most part?

Diagram (sorry if it's messy, I can have my friend redo it in Illustrator if it's unclear, just might take a few hours):


texts: Why does the capacitor takes the high-frequency current at the output of a dc-dc converter?

texts:
Lets assume that delta IL = 3A

if the switching frequency es 10khz, the capacitive reactance will be Xc = 0.0397 ohm, it makes sense to asume that the current ripple will go to the capacitor, since it has a much lower impedance.

simulate this circuit – Schematic created using CircuitLab

But if we change the capacitor value from 400uF to 400nF now Xc = 39.78.

For the 5ohmresistor that will be around 2.6A which means an instant voltage change of 13.3V.

In that case, it would b more accurate to say that the capacitor has a too low capacitance to storage the energy or a too high impedance at that frequency?

Or are those numbers just wrong?


texts:
I had a bad plug-in transformer with a 3 wire output AC GRD  AC, with following specifications PRI 120V 60HZ 0.24A , SEC 12VAC 20VA, I could not find a 3 pin transformer with same specifications instead find one on Ebay with little different specifications of PRI 120V 60HZ 0.31A, SEC 12VAC 25VA, My question is can I use this one instead of original specifications of the damaged transformer ?
I would like to tell that the 3 wires goes to a Digital TIME TRACKER by FAST COMPANY. The timer gives a beeping sound at the end of the time set cycle


texts:
I was trying to understand the usage for the word "current limiting resistor." Taking an example of a simple LED with a resistor in series, the way I understand this is we are trying to limit the amount of current entering into the LED.
I'll start with two situation.
Situation 1. LED connected to a bench power supply. The power supply is tuned at 3V at current output set to 2A. If I connect an LED to this power supply where Vf for led is 3V the LED draws the rated current and doesn't consume 2A.
Situation 2. The power supply is at 5V and the max output current is set to 2A. Connecting an LED directly would burn because the Vs is more than Vf hence more current will flow through the LED burning it. Whereas as soon as I add resistor in series we are dropping the voltage and hence by that limiting the current.
So with this understanding can we say that the current limiting resistor is not only current limiting but voltage dropping resistor? Therefore we can say that the resistor is primarily there to reduce the voltage fed to the LED and the current required by the circuit is the amount of total resistance i.e Series resistance and normal operation of LED resistance.


texts: Size of a non-plated throughole (NPTH) for a spacer

texts:
I am designing a PCB. For spacer, I would like to use this part:
http://www.keyelco.com/product-pdf.cfm?p=4805

The diameter of this spacer is 0.25 inches.
What should be the size of hole on the PCB? should I use the same dia 0.25 inches for the NPTH holes?


texts:
I am currently cloning the STM32F103C8T6 (blue pill) into a new board. The the bill of material of my new board is exactly same (because I just simply cloned it), only the shape of the board is different.

My first thought, because I cloned the board, I might easily program the board using ST-Link v2 like I have done with the blue pill. however, when I was trying to program it (with simple blinky LED program) using ST-Link v2, the code (seems like) failed to upload from my PC to the new board and somehow the new board also was not detected by my PC.

I checked the electrical wiring and I found no error. Do you have any idea where my mistake is? Is there any initial procedure that I missed?

this is my schematic. in this schematic, i add two sensor and microSD slot.

and this is my pcb layout


texts: What properties can be changed to maximize a p-n diodes effectiveness at higher temperatures?

texts:
So the reverse bias breakdown voltage of a diode gets smaller as temperature increases.
What can be done to change that?

Can the concentration of dopants of the p or n layers be changed to make this happen?

Will the resistance of the loop that the diode is in affect the breakdown voltage?

What other factors can affect the breakdown voltage?


texts: PWM switch open loop gain plot buck topology

texts:
Open loop gain understanding, without using PWM switch and with using PWM switch model
Vramp =1V , Vin =5V, Modulator gain = Vin / Vramp = 5 , Fsw = 300Khz, Vout = 1.8V

Above image without PWM switch model. I got required behavior of loop gain.
I am assuming I should get the same using PWM Switch model (Filter load, and compensation are not changed). So I tried using it without adding modulator gain (Not required).
But the behavior of the loop gain was similar, but gain and phase values was not as measured in previous test case.

What am I missing here? Is my overall loop gain measurement correct in both cases?


texts: How do I momentarily ground a 3.3V signal (with a pull-up resistor) when power is first applied?

texts:
I need to momentarily ground a 3.3V signal that has a pull-up resistor on it when power is first applied.

This is feasible using a microcontroller or a push-button, but is there a "passive" way to accomplish this? I am looking to ground it on the order of 10's msec.


texts: what if the two wires of a single twisted pair are different in length?

texts: For example, one wire of a twisted pair is longer than the other wire (imbalance starts from the middle of the twisted pair, everything is balanced before the middle point). What problems will it cause?


texts: Simulation discrepancy in Qucs with 2N3904 transistor

texts:
I've been testing out a few circuit simulation applications and ran into an unusual issue with Qucs and the 2N3904 transistor. For a simple NPN transistor circuit with load resistor \$R_L\$, base resistor \$R_B\$, and pull-down resistor \$R_P\$, I'm seeing an inflection in the collector-to-emitter voltage \$V_{CE}\$ as I sweep \$R_B\$ through a range of values. It also reads much higher than it should, starting out around 0.4 V and increasing to nearly 5 V. In the screenshot below, you can see how \$V_{CE}\$ rises sharply and \$I_C\$ begins to decline when \$R_B\$ is around 4 kOhm.

When I simulate the same circuit in LTSpice, the results are more typical: \$V_{CE}\$ is less than 0.2 V while in saturation and there's a nice flat \$I_C\$ curve around 120 mA or so, which correlates to the supply voltage and load resistor.

I'm thinking there must be an incorrect parameter in the 2N3904 component in Qucs that is throwing things off. I've tried to compare the parameters between the different software packages, but haven't had much luck (some of the data sheets don't even have all of those parameters listed). Interestingly, if I try to substitute a 2N2222, the inflection is gone, but I think \$V_{CE}\$ is still too high since the transistor should be in saturation.

Am I doing something wrong, or is my Qucs configured incorrectly? I'm trying to evaluate a variety of simulation packages and I really like Qucs, but I want to be sure the simulation results are going to be accurate going forward. Thanks for the help.


texts: How do those 3.5mm stereo to mono adapters work?

texts:
I have one of those 3.5mm Female Mini-phone mono to Mini-phone stereo which I was hoping to use for connecting the output of an MP3 player (stereo) to a pillow speaker (mono).

But then it occurred to me that I may be causing damage to the output circuit of my beloved MP3 player and so I went and measured the resistance between the two end-conductors on that adapter (when nothing is plugged in). Sure enough, the two are shorted together!

This may probably work fine when this adapter is used for input (e.g. mono mic to stereo mic input), but the other way around (e.g. stereo headphone output to a mono pillow speaker) seems to me dangerous, not to mention that it seems that the right & left signals are not really combined but rather interfering with each other.

What really happens when you short the 2 stereo outputs together? Will this work like a "mixer", combining the signals so that you hear both channels together?

If so, why?

If not, and this is indeed dangerous to the output circuit, why don't this product come with a warning "not to be used on output jacks"?


texts: Do the power ratings on the nameplate of an AC motor indicate electrical or mechanical power?

texts:
A 6 pole 3-phase AC induction motor is delta-connected and has the following rated values on its nameplate:

Frequency: 50 Hz
Power: 22 kW   30 hp
RPM: 970
\$\cos \phi\$ (power factor): 0.80
Primer voltage (\$V_{\text{line}}\$): 380 V
Primer current (\$I_{\text{line}}\$): 47 A

Since the total power of a 3-phase AC induction motor when delta-connected is

$$ P_t = \sqrt{3} \cdot V_{\text{line}} \cdot I_{\text{line}} \cdot \cos \phi $$

I calculate the electrical power as

$$ P_t = 24.75 \;\mathrm{kW} $$

but on the nameplate there are two powers, written as 22 kW and 30 hp (30 hp is 22.37 kW); are they the same thing?

Why am I calculating the power \$P_t\$ differently? Are the power ratings on the nameplate mechanical power or electrical power?


texts: Low power LiPo cell ADC with an nMOS switch and a resistor or capacitor divider circuit?

texts:
This is my first question on this platform and am looking for advice on doing a very low power LiPo battery measurement for a wearable device. My current circuit looks like this: (See image below)

Previously, I have implemented resistor dividers of 10Mohm resistors (for MCU that can take only a max. of 3.7V as ADC input which doesn't work with a fully charged 4.2 V LiPo cell), but I didn't like the idea of them continuously draining the battery. So I am adding an nMOS which will be turned on by MCU only when it needs to measure (like every 60s or 60 min). The on resistance on nMOS can be calibrated in the MCU firmware.

However, I am considering further using a low ESR 2.2uF capacitor divider instead of resistor divider here, to minimize current consumed even further when nMOS is ON. Will capacitor divider provide similar ADC results (considering the charge time constant doesn't factor in if I wait 1 second to measure ADC). I couldn't find a similar circuit online and was wondering maybe its so because of a reason. Can you guys advice, suggest or provide feedback on using C vs R divider network for this particular idea?

Any suggestion would be appreciated here.

Thanks!
RQ

Edit:

Based on suggestions from @DKNguyen and @BruceAbbott, I have edited my circuit below, realizing only nMOS won't work in either high or low sides. This is because, as @DKNguyen mentioned, that the source of nMOS is floating for nMOS to initially turn ON (Vgs > 0), on the lower side, the ADC pin will pull current directly from the battery (which is why I was using switch in the first place). The new circuit follows the same example solution highlighted by @stevenvh in the following link: Measure Lithium ion battery voltage (thus remaining capacity)

I am using 0.01% resistors for higher accuracy, using enhancement type MOS to minimize energy consumption when they are OFF when not in use. Also, thinking at this point, the cost of this setup and size almost equal, if not more, than cheap and small battery fuel gauges they have out there like MAX17301 which is only $3.63/unit and 1.7mm x 2.5mm only which I am seriously considering at this point. But its always great to learn more about basics.

Now my question remains, can we still use capacitor divider instead of resistor divider in the new circuit to minimize current consumption even further?


texts: Help deriving a 2-port representation of an RC filter circuit?

texts:
I have the circuit below. Its a basic RC filter circuit with source impedance 50Ω from a signal generator, and load impedance 1MΩ||20pF from an oscilloscope at the output. The input voltage V2 is a 10kHz sine wave with 10V amplitude.

I need to derive a two port representation of this circuit, but I don't really know how.

I am aware of the equations that relate V1, V2, I1 and I2 using Z or Y matrix parameters. I'm aware of how this circuit could be written as a voltage divider using impedances. What I don't understand is how to incorporate the source and load impedances, as well as both capacitors. I know that 1/(jωRC) gives the impedance of the capacitors but I don't understand how to make that into a real number.

I have input, output, gain and phase data at a range of frequencies. I believe I may need to use this somehow? I'm just not sure how.

Can anyone provide any insight, even if its just to point me in the right direction.


texts: How memory is stored in memories like SD Card, USB flash drive, etc. that the data stays even if removed to the device?

texts:
This latches ( Gated Latch, SR Latch, and Flip Flops) can only store memory IF there is electric current flowing, but everything will go OFF if no current.

I wonder how memory is stored in memories like SD Card, USB flash drive, etc. that the data stays even if removed to the device (that conducts electricity)?


texts: When a processor has a given frequency, what is the order of magnitude of the typical transition frequency of the internal transistors that make it?

texts:
The transition frequency (or cut-off frequency) of a transistor represents the cut off frequency, so that above it, the behaviour is not normal (the impedance diverges).

A processor is made of a huge number of transistors. When a processor is working at a given frequency, let's say for example 3 GHz, what is the typical transition frequency of the transistors that make this processor. Is it the same ? 10 times higher ? 100 times ?

This corresponds to the generic question :
When a computer processor has a given frequency, what is the order of magnitude of the typical transition frequency of the internal transistors that make it ?


texts: Why does my ALU design delay outputting the results for two clock cycles since input of valid data?

texts:
Hello EE StackExchange!

I have been trying to design a simple 8-bit CPU for several months now. However, I am experiencing a problem: The ALU outputs the result of the operation two clock cycles after it has been presented with valid data. Why is this happening, and, most importantly, is there a way I can rectify this behavior? The FPGA architecture I am simulating against is Spartan 3, and the ALU is written in verilog.

The code follows:

module alu  (input [7:0] a,b,
             input [3:0] opcode,
             input clk, reset,
             output reg [7:0] y,
             output reg cout);
        /* Decode the instruction */
        always @(posedge clk)
        if(reset == 1)
        begin
                y <= 8'b0;
                cout <= 0;
        end
        else if(reset == 0)
        begin
                case (opcode)
                        4'h00 /* OR */:   y <= a | b;
                        4'h01 /* AND */:   y <= a & b;
                        4'h02 /* NOTA */:   y <= ~a;
                        4'h03 /* XOR */:   y <= a ^ b;
                        4'h04 /* ADD */:   y <= a - b;
                        4'h05 /* SUB */:   y <= a - b;
                endcase
        end
endmodule //alu


texts: Why use more than one contact in VLSI layout?

texts: I saw the following layout in one of the standard cell library provided to us by the University. In the layout, the yellow color diffusion layer is connected to blue color horizontal M1 metal layer using contacts. What is the use of the vertical metals which again connect the same diffusion with these metals? I mean why two contacts are used?


texts: HDMI (TMDS) output with Digilent Atlys - examples do not compile with ISE 14.7

texts:
I'm working on XAPP495 on Digilent Atlys board with ISE 14.7
I want to  run and test "vct_demo" coming with the XAP 495. I tried to compile it  (with ISE  14.7) and failed because of the following errors:

ERROR:PhysDesignRules:2502 - Issue with pin connections and/or configuration on
   block::.  BUFIO2 has an invalid setting of DIVIDE
   by 2. This setting is not supported. For more information please see Answer
   Record 56113.

ERROR:Pack:1642 - Errors in physical DRC.

I simply imported all the *.v files as well as the corresponding *.ucf

Can this here be a simple version issue? - Is it a matter of error level which is stricter than in former versions?

Any help is appreciated.

Thanks


texts:
I have a wire that I believe is an 18 gauge stranded wire that needs to be lengthened. Unfortunately I only have 12 gauge wire and a 20-22 gauge single-stranded wire. Would it be possible to use either of those to lengthen the 18 gauge wire or should I just go buy some 18 gauge wire? Please note that the reason I haven't already bought 18 gauge wire is because I was trying to use what I have around the house, however I understand that what I have might not work in which case I will just go buy some.
Thank you for your help!


texts: I am trying to make 3bit counter with an arbitrary sequence but it gets stuck in a loop (Proteus8)

texts:
I am trying to make counter for these numbers 1-7-0-2-0-4-0-1-0. But for some reason on my project it gets stuck and loops on 2 digits 0-7.

This is homework, and I only can use JK flip-flpos and logic gates.


texts: Brushless motor controlled via current source math model

texts:
I'd like to model a brushless motor's (BLDC) dynamic response using Matlab. I'm controlling the motor by an Elesctonic Speed Controller (ESC). I'd like to derive a transfer function of such a circuit with shaft's angular speed being its output (as here) and with current being its input. I'm powering the whole plant using a constant 11.1V battery source.

In the picture above, one could write equations for the electrical part of the model as:

\$ L \frac{di}{dt} + Ri = V - K \dot{\theta} \$ (1)

with K being the back-emf constant and the mechanical part can be modeled as (Newton's second law):

\$ J \ddot{\theta} + b \dot{\theta} = Ki \$. (2)

It's easy to connect those two equations and derive a transfer function \$ \frac{\dot{\theta}}{V} \$. I'm also expecting it must be possible to derive a transfer function of the form \$ \frac{\dot{\theta}}{i} \$. I imagine I could solve my problem by substituting \$ V \$ for \$ i \$ in equation (2) - I just don't know how.


texts: Can capacitors be replaced with higher capacitance ones?

texts:
I have a bad capacitor on this LCD power board. I have rev 2.6, and I noticed there is a rev 2.8 board that looks like it didn't get skimped on in parts. Can I install capacitors in my rev 2.6 board as they are used in the 2.8?

My board:

  9 x 470μF,
  1 x 100μF,
  1 x 22μF,
  1 x 10μF

Here's the rev 2.8:

  6 x 1000μF,
  4 x 470μF,
  1 x 100μF,
  1 x 22μF
  1 x 10μF

The differences are circled in blue. My board seems to use lower rated capacitors, is missing one, and the microchip looks slightly different. The pictures are of the entire boards.


texts: How do I detect / retrieve the silicon revision of a dsPIC?

texts:
Before starting on my project, I need to familiarize myself with any possible silicon errors in my dspic.

I saw this for PIC micros, but it doesn't apply to the dsPIC33F that I'm using.

I found a post somewhere (that I can no longer find for some reason) that says I can use MPLAB X to get the silicon revision.  It said to go to the Dashboard, and then click the refresh button on the left side.  I did that, and then right-clicked the project and chose "Copy to Output".  The problem is that the silicon revision is not in the output, shown below:

dspic33f_spi
Device
dsPIC33FJ64MC802
Checksum: 0x03AC
Compiler Toolchain
XC16 (v1.11) [C:\Program Files (x86)\Microchip\xc16\v1.11\bin]
Memory
RAM 17714 (0x4532) bytes
RAM Used: 0.0%
RAM Used: 0 (0x0) Free: 17714 (0x4532)
RAM Reserved: Production Image
Flash 22016 (0x5600) words
Flash Used: 0.0%
Flash Used: 0 (0x0) Free: 22016 (0x5600)
Flash Reserved: Production Image
Debug Resources
Program BP Used: 0  Free: 2
Data BP Used: 0  Free: 2
Data Capture BP: No Support
Unlimited BP (S/W): No Support
Debug Tool
 PICkit3

Other Project Info
RAM Reserved Memory
Production Image
Flash Reserved Memory
Production Image

Control Points.

System Properties
MPLAB X IDE v1.85 - dspic33f_spi : default
os.name : Windows 7
os.arch : amd64
os.version : 6.1
sun.arch.data.model : 64
java.version : 1.7.0_17
java.vm.version : 23.7-b01
java.runtime.version : 1.7.0_17-b02
java.specification.version : 1.7
netbeans.user : C:\Users\dave\AppData\Roaming\.mplab_ide\dev\v1.85
netbeans.projects.dir : C:\Users\dave\MPLABXProjects
netbeans.home : C:\Program Files (x86)\Microchip\MPLABX\mplab_ide\platform
java.io.tmpdir : C:\Users\dave\AppData\Local\Temp\
user.home : C:\Users\dave
user.country : US
user.language : en
sun.jnu.encoding : Cp1252
file.encoding : Cp1252
file.separator : \

Can anyone provide a way to get the information I need?  The date code is 1243EWT, which IIRC means that it was manufactured on the 43rd week of 2012.


texts:
Here's perhaps a strange question...
I have a situation where I need both continuous rotation as well as incremental position control with hold capability. The approach that would work quite well would be to have a dual axis stepper motor between the AC motor and the load and have it disconnected (relays not just at the controller) while the AC motor is driving the load in a continuous fashion and then when I need to move it incrementally, turn off the AC motor, toggle the relays and use the stepper to do its thing...
But I'm concerned that something would go badly after a while. The way I see it, if not powered, the stepper would just act as some kind of 4 phase generator, but considering that steppers usually run on low voltage & high currents, I am concerned that the voltages generated might be dangerously high or that the stepper is not designed for something like this.

Is it possible to drive a stepper motor like this for longer periods of time without damaging it? Anyone got any information about something like this?
I was originally thinking of using a clutch, but the only way I could mount this is with the stepper between the AC motor and the load, not stepper behind AC motor. I would equally like to avoid gears if at all possible...
The reason I cannot use the stepper in a continuous mode to drive the load is that I need a high HP motor for the continuous rotation and only a fairly low torque and low speed for the stepper part of the motion.
I also don't think that I could use an encoder to then convert the AC motor to some kind of servo...

Anyone got some ideas on this?

Thanks in advance
Joe


texts: How can I get 3.7V 100mA from the 220V phase line?

texts:
Possible Duplicate:
  Transformless power supply without ground

If I have access only to the 220V phase line, and I would like to charge a 3.7V battery, is it possible, without null line?

For example:

220V
------------------ 3.7 charger --------------
Source                                      |
                                          light
                                            |
                                        Null line


texts: How do I offset flashing of IR remote in Arduino?

texts:
I am working in Arduino on a mini pro. I have an old MP3 remote which transmits infrared at about 38Khz. I have a program written that when my infrared sensor is picking up on a signal from the remote it tells a relay pin to be low and to make the relay pin high if it does not pick up on a signal from the remote. The loop is constantly running and checking so "if (receiving) pin -> low" and "if (not receiving) pin -> high." My problem is that the MP3 remote doesn't send a constant signal. It constantly flickers on and off, which causes the relay to flicker on and off when it should stay off.

I am trying to figure out how long to set a delay to perfectly offset the flickering of the signal from the remote. If I cannot offset the flickering are there any other solutions to use the IR on the same wavelength without flickering?

All help is very welcome and I am open to ideas and suggestions!!!!

This is the code I already have but it has taken a while and I am not very confident with Arduino code.

#include <boarddefs.h>
#include <ir_Lego_PF_BitStreamEncoder.h>
#include <IRremote.h>
#include <IRremoteInt.h>

int RECV_PIN = 11;
int OUTPUT_PIN = 4;

IRrecv irrecv(RECV_PIN);
decode_results results;

void setup()
{
 pinMode(OUTPUT_PIN, OUTPUT);
 pinMode(13, OUTPUT);
 irrecv.enableIRIn(); // Start the receiver
}

int on = 0;
unsigned long last = millis();

void loop() {
  if (digitalRead(RECV_PIN) == LOW) {
   digitalWrite(OUTPUT_PIN, LOW);
 }
 else if (digitalRead(RECV_PIN) == HIGH){
  digitalWrite(OUTPUT_PIN, HIGH);
 }
irrecv.resume(); // Receive the next value
}


texts:
I have a question about setting the parameters of PID controller if they are given in range between 0.1% and 100%.

I have a device with the PID controller and P, I and D shares can be set separately in a range from above. I want to make the setting process automatic. But in all algorithms about PID controllers I read the gain, reset and derivative are not given in percentage.

How can I calculate gain, reset and derivative from this parameters? What is the best strategy to automate my device if I use all parameters in percent directly? Any answers and links are appreciated.

With best regards,
mikhail14


texts: I have uploaded an image of the circuit I want to solve. The problem requires solution using Superposition theorem and then verification of the solution using Thevnin's theorem. Using all that I have learnt, I got 16 amps using superposition however I got 4.8 amps using Thevnin's theorem. Please let me know where's the mistake.


texts: How to instantiate a FIFO on an iCE40 FPGA?

texts:
The Memory Usage Guide for the Lattice iCE40 FPGAs implies that the embedded block RAM can be configured in various ways, including as a FIFO, but it gives no details about how to do this.

Is there another document which describes this, or do they mean that a FIFO could be made using an EBR?


texts: On-off controller open loop or close loop?

texts: Are all On-off controllers used for close loop control systems or can also be used for open loop control systems?


texts: Restoration/mod of mid-1960s PP 2xEl844 4x6AT6 guitar amp, voltage, hum problems. Similar to Fender 5F10 schematic

texts:
Is this the right place to find solutions to the above problems?
I'm trying to make this amp usable, but after some rebuilding and reconfiguring, I still have a hum problem and what seems to be odd voltages.
The current configuration is 2 inputs (one with a treble peaking tweak added,) 4x6AT6 preamp tubes, volume and treble/bass controls after V2, variable NFB added on cathode of V3, V4 cathodyne phase inverter, EL844s V5 and V6 cathode biased, 5Y3GT rect.
I have changed all capacitors with close to same values, added 510 ohm/5W screen resistors.
B+ is 370V on power plates (recommended 250), 320 on screens; and preamp plates V1-4 measure 123,87, 112, 174 (recommended 100V).
How can I tame the voltages and clean up the output?
The heaters are 5.05V and 6.54. There is a filament CT but no secondary HV CT on the transformer.


texts:
I'm trying to solve a design issue regarding a USB device under development. The unit is quite similar to the TS-80P in that it implements Power Delivery and the main function is heating. We require both 9V and 5V operation using PD, USB-C current (1.5 or 3A) and the legacy USB BC DCP/CDP detection (1.5A). The heating stage is a simple FET-switched ohmic load. We perform a slow (30Hz) PWM and utilize reduced slew-rate switching to minimize HF emission.

What are the di/dt limits on VBUS sinking? I was unable to find this specified, apart from the current spikes during suspend in 2.0 spec (picture). Or is USB EMC governed simply by EMI measurements during certification?

My colleagues tell me that it would be "OK" to exceed the current capability of the port short-term (say 2A peak PWM on a 1.5A source). Although this solution might work on most sources (given a high-enough frequency), this seems unacceptable to me; we don't incorporate a stepdown. We're not planning on certifying the device. Could such a solution even be considered for a USB-compliant device?

Thank you for consideration.


texts: Solenoid stays on when output turned off

texts:
I have a power supply with 12V running into a the common on my PLC. Output 0 on the PLC is wired into a solenoid. The negative on the solenoid runs into the ground on the power supply completing the circuit.

When I power up the PLC and the the external power supply all outputs on the PLC are off and the solenoid is off. When I activate Output 0, my solenoid clicks on as expected. However, when I turn Output 0 back off, the solenoid stays on. The solenoid only turns off if I physically remove the ground wire.

edit:

The diagram below gives some insight. Power supply wired to Pin 17. Output 0 (pin 10) wired to solenoid. Solenoid is wired back to ground on the power supply.

If I give the command to turn output 0 on, the solenoid comes on. If I give the command to turn output 0 off, the solenoid stays on.

Link to my cheapo solenoid. http://www.amazon.com/gp/product/B008IG7SWQ/ref=oh_details_o04_s00_i01?ie=UTF8&psc=1


texts: Need help with current pulse input to an analog circuit

texts:
I have been struggling to solve an issue about signal conditioning an instrument with an analog circuit. First I would like to explain the instrument very briefly:

There is a windmeter which is outputting current pulses proportional to its rotation/windspeed. Here is its datasheet:
http://www.synchrodan.hu/letoltes/kriwan/kulsoerzekelok/szel/N292_INT10K_69000248_e.pdf

As you can see in the second page there is a speed-freq. plot. I would like to mention that I only need up to max 1000Hz output(less than 20m/s).

Output of this sensor is current pulse.

Here is the signal output details from the data-sheet:

What it says is, the output frequency of the pulses varies proportional with rotation/wind speed; but the ON time of the pulse remains same around 100us+/-20us. I confirmed it by wiring a 600 Ohm shunt resistor as shown in the wring diagram(I used 24VDC to power) in the datasheet. And observed the output via an oscilloscope.

The output was a pulse train with the pulses jumping from 2.5V to 7.5V. This is because the current pulse is not zero when the pulse is in OFF time. For example at 1000Hz output the pulse train(with a 500 Ohm shunt) will look like:

**So far so good. Up to this was only to introduce the instrument.

**Now the issue was, since the ON time of the pulses were very short and my sampling rate cannot be more than 4000Hz; I was having troubles when sampling these. I don't want to go in details about these. Shortly ON time had to be increased, there is no other option in my case.

Anyway I implemented an analog circuitry using a comparator and a 555 timer.

  The circuit increases the ON time of the pulses without changing their
  frequency.

The simulation works very well and I also tried with a function generator as an input. Here are the results:

Simulation results:

(please left-click to enlarge the picture)

And below I recorded a short video with a 0 to 5V pulse input where I change the duty cycle of the input. As you see, I change the ON time of the input pulse but the output's ON time is longer and its frequency remains the same:

https://www.youtube.com/watch?v=CkZ7nlaaDGU&feature=youtu.be

The problem

This circuit works with simulation(I mimic the current pulse in LTSpice) and the function generator(unfortunately in this case there is no DC offset in the input, I still could not learn how add DC offset if the function generator doesn't have that option).

Long time ago this also worked when the input was the windmeter but I dont remember if it was by chance. But now I'm trying with the windmeter I dont get any signal output just noise. The wind meter output is working I checked several times. Circuit is also working with the function generator. But the circuit doesn't function when I hook up the "current pulse" through a 560 Ohm resistor(so it becomes a voltage pulse input which is from around 2.5 to 7.5V). I use 12V for rails of the opamps and the windmeter uses 24V power suplly.

What could be the problem here? I have spent many hours and no luck..


texts: Calculate time energy is stored in capacitor

texts:
I have this problem:

I've calculated A) to be 8 nJ, and my Vc(0) = 4 V and Vc(∞) = 0 V. I tried using the wc(t) = 1/2CVc^2 formula to calculate the time when the energy of the capacitor is 1 nJ. However I failed. How should I think when trying to calculate the time?


texts: propagation delay (low -> high / high-> low)

texts:
i build a 2x2 bit multiplier circuit where i take a number (a1a0) and multiply it by (b1b0) .
and im asked to calculate the time propagation from high to low , and from low to high for every input to every output . for example :

Tp(HL):
a0 -> q0 = ?

a1 -> q0 = ?

b0 -> q0 = ?

b1 -> q0 = ?

Tp(LH):
a0 -> q0 = ?

a1 -> q0 = ?

b0 -> q0 = ?

b1 -> q0 = ?

and so on and on for every output .

I'm having problem figuring out the time because there more than one possibilities for inputs. and for the output to change from low to high for example , the inputs have to be related in a way to guarantee that the output changes from 0 to 1 . but at the same time there are more than one possibility for different inputs .
so how can i calculate the time ?


texts: I am using Microchip TC77 temperature sensor with a battery application. I would like to know if it is worth to turn it on and off let's say every second. Or is there some kind of overhead from the powerup process?


texts: Toroidal Transformer High Current Output

texts: Can a 28-0-28 amplifier toroidal transformer like this be practically used as a high current supply at low voltages? I plan to put a couple of turns of 4 gauge wire through the centre. I want to use the power supply for heating metals to red-hot temperatures fairly quickly, so the current output has to be pretty high. I would use the stock primary.


texts:
I've written this code for a counter but I don't know why it doesn't work. Actually the    output remains at zero and when I change load to 0, output changes to unknown.
Would you please help me to find the error?

module behav_counter( d, clk, clear, load, up_down, qd);

 input   [7:0] d;
 input   clk;
 input   clear;
 input   load;
 input   up_down;
 output  [7:0] qd;

 reg     [7:0] cnt;

always @ (posedge clk or negedge clear)

if (!clear)
    cnt = 8'h00;
else if (load)
    cnt = d;
else if (up_down)
    cnt = cnt + 1;
else
    cnt = cnt - 1;

assign qd = cnt;

endmodule

 module test_b;

 reg d,clk,clear,load,up_down;
 wire qd;

 behav_counter bc( d, clk, clear, load, up_down, qd);
 initial
     begin
       clear = 0;
       clk = 0;
   #15 clear = 1;
      repeat (400)
    #5 clk = ~clk;
 end
 initial
    begin
     up_down=1;
     load=1;
     d=8'h00;
     #23
     load=0;
     #100
     load=1;

     end
   endmodule


texts:
I have a 28VDC, high current supply (constant voltage) that is required to charge an emergency power supply.

These EPS internals are rated at 15 amps max input current, however, it’s stipulated that I must regulate at 10 amps.

Issue is my power supply can supply 80+ amps nominal (as it charges multiple units). I’m thinking of a 10 amp limiting circuit using a mosfet and op amp for feedback?

Please advise me on anything - I’m still a student.


texts: Is it possible to test capacitors on a logic board?

texts:
First, I would like to know if it is possible to test a capacitor while it is soldered to a logic board, or does it have to be unsoldered first?

Second, is it possible to do so with a multimeter?

Third, can such an LCR meter be used to test capacitors on a logic board?

Boards like these ones. The top one is the display logic board and the bottom one is the power supply:


texts: Effect of time on a node with a capacitor

texts:
I have the next problem: Determine \$v_{0}\$ for \$t>0\$ where \$v_{s} = 20mV\$ in the next op amp circuit:

I proceed as follows:

At \$t<0\$:

\$v_{s}\$ is unplugged and the rest of circuit is dead. \$va=v_{0}=0V\$
At \$t>0\$:

\$v_{s}\$ is plugged in and \$va=v_{s}=20mV\$. Here is my question: Is \$va\$ changing with time? I have understood voltages among two input op amp  pins are the same. I guess \$va=20mV\$ (independent time) because \$v_{s}\$ isn't changing.

Please, clarify what is happening with \$va\$ over the time and assuming an ideal opamp.


texts: Use of coupling capacitors in transistor biasing

texts:
I'm trying to use oscillator circuit to switch on the MOSFET and using coupling capacitors to isolate the DC biasing.
Below is my circuit and graph

I'm not able to understand the DC biasing here. Getting output around 20V. Need help to understand the circuit.


texts: Understanding the VI output characteristic of NPN transistor in the saturation region

texts:
I have trouble in understanding the VI graph of the output current (collector current \$I_C\$) in the NPN transistor. More precisely the common base one (this is the first type of transistor I came accross and I don't know if it really makes any difference).
From my understanding the equation \$I_C = \beta_F I_B\$ in only valid in forward active region but not in saturation region. Now the NPN transistor is in saturation region when both the base-emitter and the base-collector regions are forward biased. This means that \$V_{BE} > 0\$ and \$V_{BC} > 0\$. The link between the 3 voltages should be \$V_{CE} = V_{BE} - V_{BC}\$

Since the current are assumed to be all exiting the node, \$I_C\$ is assumed to go from left to right so the voltage arrow go in the opposite direction. The picture above is related to a reverse bias of the p-n region (forward active mode). In that case \$V_{BC}\$ should be negative because as seen in the picture the negative side of the voltage generator is "under the tip" of the voltage arrow.
So here a first question arise:
Are these equations valid ? On what regions can they be used ?
Let's assume that the answer is "yes". I known that \$V_{BE}\$ can be assumed constant and around 0.7 V because this voltage is enough to reduce the depletion region on the n-p side and generate enough \$I_B\$ current. Now what about \$V_{BC}\$ ? According to the formula above \$V_{CE} = V_{BE} - V_{BC}\$ which lend to \$V_{BC} = V_{BE} - V_{CE}\$
The graph of the VI characteristic of the output current looks like this:

However I can't figure out why the current is creating this "S" shape and why the current form a knee just after the saturation region. The only thing that comes in my mind is the graph of the VI characteristic of a generic PN-junction:

However this doesn't fit well with the formula when I try to see the V in the graph as \$V_{BC}\$.
What am I missing ? Is there a formula to explain this shape of the VI characteristic of the NPN transistor ?


texts: Layout of doubled SW pin on buck converter IC

texts:
I'm working on a PCB for the MP2617. That IC integrates a buck converter and has two physical SW pins sandwiching the VIN pin, as shown in my tentative layout below. No other pins on the IC are doubled. So I'm wondering if the doubled SW pin is to increase the current capacity or just to provide more layout options. I should note that the device will be operating at the top end of its input voltage and step-down ratio capability (14 V to 3.6 V), and 2/3 of its output current rating of 3 A. The estimated inductor peak current is 2.5 A

can I safely leave one of them unconnected?
should I connect them together by a 10 mil trace inside the IC footprint (replacing the existing ground trace), even though it will come very close to the small signal pins on the right hand side, and the 10 mil trace will have little current capacity?
should I connect them together by a trace and two vias on the left of the IC, at the cost of reducing the width of the PGND and VIN traces?

The datasheet is mute on that matter.


texts: Raspberry Pi and Touch / Pressure Sensor

texts: I have to create simple device for a promotion campaign. I should react when someone seats on the chair, so I need advice on choosing the right sensor. Should it be pressure sensor and what kind is better for Raspberry Pi?


texts: Is it possible to build OpAmp circuit with "anisotropic" gain?

texts: I was curious if it is possible to make OpAmp circuit with gain that is dependent on sign of dv/dt (k1 for rising voltage, k2 for falling)?


texts: Why we dont consider the complements of other inputs in encoder equations?

texts:
Consider the below diagram of the 8:3 encoder from this page.

Above,

  n0 = I1 + I3 + I5 + I7
  n1 = I2 + I3 + I6 + I7
  n2 = I4 + I5 + I6 + I7

I was guessing why we dont consider complements corresponding to zeroes in the truth table in the image. This will lead to equations something like this:

  n0 = I0'I1 I2'I3'I4'I5'I6'I7' + I0'I1'I2'I3 I4'I5'I6'I7' + I0'I1'I2'I3'I4'I5 I6'I7' + I0'I1'I2'I3'I4'I5'I6'I7


texts: How unsafe is it to use a 10 amp fuse with a trace designed for 4 amps?

texts:
Obviously I am a hobbyist and yes I am messing with mains. I do understand the danger which is why I'm asking this question.
I originally wanted to make a PCB that can handle 10 amps but I couldn't fit the traces on the board. I used this calculator and came up with 3.6mm.

I can only fit a 1mm trace, though, which comes out to 4 amps. I had designed this PCB to handle 10 amps but the 1mm traces can only handle 4 amps. Can I keep the 10 amp fuse or do I have to switch it out with a 4 amp fuse?


texts: How often does static kill computer components? In the past? Now? What's the difference?

texts:
Full disclosure: I'm a computer engineer and a software dev. I'm not an electronic engineer.

If this question has already been answered, please link to it, I've done cursory searches on Google and SE and not got anywhere. Please don't flame me.

Back when I started working on computers in 1995 the advice was 'wear a static wristband and never touch components outside your static grounded mat'. I was then introduced to the 'IBM method' which was: 'touch 2 hands to a grounded bare metal case'.

Since then I have worked in a computer seller (1999) that shipped 50+ units a day and no-one in that place used static protection. We had many failures due to foreign objects (screws) that were under the motherboard, but never a component death due to static.

Since then I have built computers and worked on computers (personal and work) without even employing the 'IBM method'; I have literally opened computers that weren't grounded and pushed components into them. They work fine afterwards.

I understand that the plural of anecdote is not data, hence asking this. My question is about retail products; that which is bought by the consumer. Not test products in the electronic industry but the CPUs, the RAM, the PCI cards we buy every day.

My question, boiled down; has there been a change in component design (component meaning; motherboard, CPU, RAM, plugin card, etc) over the years that makes the old advice obsolete? Are more modern components more immune to static? Or is the 'static death' of components a rare but costly occurrence?


texts: Charge one battery completely from another Raspberry Pi (Zero)

texts:
I am trying to build a system where I have a hub with a battery and a small robot with a battery. Both batteries are 4S Li-Po batteries.
In the system, I want to wire up the hub's Raspberry Pi Zero (could be normal Pi if impossible with Zero) and battery such that it keeps the robot's battery full as it tries to drain from idle power draw. I know that you can essentially just plug together two batteries and they will equalize but I want to keep one battery fully charged, which will lead to an imbalance, so I'll need a circuit of some kind.
I am a novice at all things circuit design, so any advice at all on how this could be achieved would be useful. I've heard stuff about buck-boost converters, but I'm unsure how they would fit into such a circuit.
I'm not even particularly looking to build an entire circuit myself, I'd rather use pre-built boards to do most of the work.


texts: How should I probe when measuring output impedance? Why do I get inconsistent readings?

texts:
I am trying to measure the output impedance of a commercial headphone amplifier, but the results seem to change depending on how I probe it. When I plug a 1m cable into the device and the other end into an adapter to a terminal block on a breadboard, I get 5.5Ω, when I use a shorter cable I get 4.4Ω. The results also change depending on where I'm measuring the voltage on the breadboard.
This is what the breadboard looks like:

I'm connecting the terminal block to the amplifier, playing a 1kHz sine wave and measuring the voltage with and without that resistor across (I put the resistor into a terminal block because I have to unplug it many times), then calculating the impedance as Z=R*((V1/V2)-1). My measurements seem to be pretty good, I even did all the uncertainty propagation maths and it ends up being around ±0.6Ω, after doing 30 measurements at different voltages (also tried a few with different resistances and frequencies just to see what's up). The only problem is that I got a different, but equally accurate value when repeating everything the next day (including building a new setup with slightly different cables and connectors), and it's outside of the previous day's measurement's error bars.....
Am I not accounting for some other source of impedance? The cable, or the connectors maybe? What am I missing, and what's the proper probing technique for a measurement like this?
Update:
I have now opened it up and I'm measuring directly on the PCB:

The result is closer to my second attempt (seems to be a bit lower even, but I only did a couple of measurements). I still don't have a lot of confidence that I'm measuring the impedance correctly, but at least now I understand that I have underestimated the effect of the series resistance on the voltage under load.


texts:
Can I implement a FM Radio Rx on the the Spartan 3E kit?

Starting Problems I am facing-

How do I interface the Antenna with the Spartan 3E kit?
Implementing the A/D converter.


texts:
I found this simple circuit and I set it up with BCM-9767P, LM386N and tried to write out the values I get. The problem is that the values seem to be constant and don't change with the environment sound level. I think I followed everything on the circuit, even changed the microphone resistor according to its database.
How can I make it work?


texts: Making an echo sketch using SoftwareSerial and Bluetooth

texts:
In order to test my Arduino UNO + Sparkfun Bluetooth Mate Gold I've written this little sketch;

#include <SoftwareSerial.h>

SoftwareSerial softwareSerial(8, 9);

void setup() {
  softwareSerial.begin(115200);
  softwareSerial.println("Bluetooth Ready.");
  softwareSerial.println("Waiting...");

 delay(1000);
}

void loop() {
  int readByte;

  int bytes[10];

  int i = 0;
  boolean readSomething = false;

  softwareSerial.listen();

  long l = millis();
  while (millis() - l < 1000) {
    while (softwareSerial.available() > 0) {
      readByte = softwareSerial.read();
      bytes[i] = readByte;
      i++;

      readSomething = true;
    }
  }

  if (readSomething == true) {
    delay(20);
    readSomething = false;
    for (int c = 0; c < i; c++) {
      softwareSerial.print(bytes[c]);
      softwareSerial.println(" ");
      bytes[c] = 0;
    }

    i = 0;
  }
}

Now I'll connect through bluetooth via a terminal and send a string to Arduino, which will be written back.

If I send a string of '11111' for example, I would like something consistent back - the problem is that I get something that is not consistent!


texts: Connector housing identification: Grow R307 Fingerprint Module

texts: I'm trying to find the connector for the image shown below. It's from the R307 Fingerprint Module that can be found here. Any help will be appreciated.


texts:
let's consider a coaxial cable of length L and see what happens at port 1 when port 2 is left open. Let's consider what is written on these slides:

1) I do not understand the reason of this graph. In fact I thought that the absolute value of input reflection coefficient should be always equal to 1 (or 0 in dB) since for a transmission line we have total reflection if at the end it is left open. Why is there this curve that decreases with frequency?

2) Now let's consider the following slide:

It is written that in resonance the absolute value of the input reflection coefficient shows a periodic dependence of frequency. I do not understand:

what is exactly the resonance condition
why is the curve oscillating
why is the curve different from that seen in 1) and in general from |ᴦ|dB = 0

Reference Link


texts:
I am working on Ti's EK-TM4C1294XL which is basically a Arm Cortex M4 evaluation board. I was going through I2C bus of the same and have the following question regarding the I2C bus.

I understand I2C support multi master multi slave configuration. So when we want to send data from a particular master to a particular slave we write first the slave address on the bus from that master and after receiving the Ack transmits the data to that slave.

So in the same situation i want to receive data from a particular slave to a particular master but can the slave start the communication? Like suppose slave is a ADC and once the conversion is done send the converted data to a particular master. Is this possible in I2C?


texts: What type of transformer would be required to boost a voltage signal by 2?

texts:
In books, everything is theoretical and if you want to boost your signal up by 2, you get a 1:2 transformer. Great. However, in the real world, there are different types of transformers which I think are better suited for certain applications. I noticed this when I went to go search for a 1:2 transformer on digikey.

I have two questions, one for immediate use, and the other a more general and I think, useful question.

I have a 6Khz sinusoidal signal, that I want to feed into a 1:2 transformer. Can any 1:2 transformer (pulse, audio, signal, coupled inductors) work ,so long as the frequency response is within my band of interest ? Would a pulse transformer with a 1:2 turns ratio be a problem ?
For the different types of transformers, what general applications are they better suited for and why cannot the other types be used ? For instance, a pulse transformer is better suited for digital communication because [reasons], but you cannot use a power transformer because [reasons].


texts: Help designing a voltage ramping circuit

texts:
I'm trying to design a circuit that starts at 0 Vrms and ramps up to 3.4 Vrms sine wive over five(ish) cycles, then stay at 3.4 Vrms until it's turned off. It doesn't need to ramp back down, however. The period of each cycle is 500 us (2 kHz signal). The load impedance is 200 ohms.

I've looked at the following site (http://www.edn.com/design/analog/4314544/Integrator-ramps-up-down-holds-output-level#id1676356-67-a) and while it looks close, it's using a straight DC signal while mine is alternating and I'm not sure how frequency will effect the output. Any design help or tips or further reading is greatly appreciated.


texts:
I am trying to design a component in Altium that has different orderable variants.

For example, my component takes the orderable code XYZ-AAA where AAA corresponds to a parameter like operating temperature.

If my component has two orderable variants, AAA and BAA, is there a way of creating them in Altium elegantly without having to resort to making multiple symbols?

Is a DbLib the only way of doing this?


texts:
I'm interested in having two or more cameras precisely synchronized for machine vision purposes. All the global shutter cameras I've seen basically have two modes: free-running, with a maximum frame rate of X FPS, and triggered, with a maximum triggering rate of X/2 FPS.

This is a frustrating limitation. Shouldn't it be possible keep two free running cameras very closely synchronized using an external feedback controller? Each camera could pulse a pin letting you know when it's capturing a frame, and as long as there was a scheme for introducing a very slight delay into one or the other of them, you could nudge them together, similar to how the NTP daemon nudges a computer's clock.

Does anything like this exist? Is there a camera sensor or module out there which has the necessary rate control capability necessary for it?

Thanks for any thoughts or input.


texts:
I am trying to understand dynamic range for ADCs and am a bit confused. I have seen two definitions (the second of which I don't fully undertand)...

The logarithmic ratio in decibels of the maximum to minimum output voltage based on bit depth. For an ADC with a voltage range of 0V to 5V and resolution of 16 bits the smallest output voltage would be \$5/2^{16}= 0.000076V\$.  Thus the dynamic range would be \$20*log(5/0.000076)=96 db\$

The ratio of the amplitude of the loudest possible undistorted signal to the noise floor where the noise floor is the quantization error in the most basic case. Wiki states the following... \$20*log(2^N/1)\$ where N is the bit depth.

I understand that these both yield the same result but I am a bit confused about where the 1 comes from in the quotient of the second formula.  If the \$2^N\$ denotes the total amount of discrete steps that the voltage range is split into for the quantization process I would think that the quantization error (and thus noise floor due to it) would be at most 1/2 of a step (not 1), considering that samples are rounded to the closest discrete step and the greatest offset from any sampled value would be at most 1/2 of the step amount.  Any clarification or insight would be greatly appreciated. Thanks!


texts: Relays for Logic - Current and debouncing?

texts:
Im just doing a little project for fun using relays to build logic circuits, and just have a few "thinking outloud" type questions...

1) Any contacts that can make a loop back to the power supply would need a resistor on that path, otherwise when the contacts connect its effectively shorting out the power supply?

2) How much of a problem if any would contact bouncing be when wanting to use relays for logic. Even at "slow" speeds would this be a problem.


texts: Implementing 3 variable boolean function od 2-1 multiplexers

texts:
Recently i've been given a task from my lecturer to implement  \$f=\sum(1, 3, 4, 5, 7)\$ on "2-bit multiplexers". That's it. I assume he meant 2:1 MUX.

I've came up with following k-map...

+------+---+---+
| AB/C | 0 | 1 |
+------+---+---+
| 00   | 0 | 1 |
| 01   | 0 | 1 |
| 11   | 0 | 1 |
| 10   | 1 | 1 |
+------+---+---+

\$A\overline B + C\$

... and following 2 schematics:

1)

2)

Since the execrise's desscription consists plural multiplexers- is the second example OK? And if the description would mention using only one MUX- is the first example OK?


texts:
I'm building a 3 phase digital PLL and implementing it on a microcontroller. I included a schematic of the SRF-PLL principle that I use.

The abc->dq0 transform is done so that the q component for a 3 phase balanced sine function is 0. Therefore, when the loop is locked, the q component should be 0.

\begin{align*}
\begin{bmatrix} V_{d} \\ V_{q} \\ V_{0} \end{bmatrix}
   & = 2/3\begin{bmatrix} sin(\theta) & -cos(\theta) & 0 \\ cos(\theta) & sin(\theta) & 0 \\ 0 & 0 & 1\end{bmatrix}
       \
       \begin{bmatrix} 1 & -1/2 & -1/2 \\ 0 & \sqrt{3}/2 & -\sqrt{3}/2 \\ \sqrt{2}/2 & \sqrt{2}/2 & \sqrt{2}/2 \end{bmatrix} \
\begin{bmatrix} V_{a} \\ V_{b}  \\ V_{c} \end{bmatrix} \\
   &
\end{align*}

On the microcontroller environment, the PLL locks and the right frequency is found but very slight oscillations can be observed (ok fine). However, after "some time" the oscillations get their frequency divided by 2 and their amplitude is multiplied by 2. This is a phenomenon that occurs over a minute or two.

I really can't explain what is happening and could really need some help.

PS: I had this occur in MATLAB at some point too, I got rid of it but I don't know how anymore.


texts: How to bring a transformer's secondary impedance to the primary side with k < 1?

texts:
I know that when I have a transformer with a coupling coefficient of 1, I can use the formula Z' = Z × (N₁ / N₂)². How could I calculate this impedance with a coupling coefficient of 0.2? Also, is the impedance of the secondary coil part of Z?
I'm not sure if that's important, but my exact application is a Tesla coil. Air-cored, 4 MHz, varying load. Thanks in advance.


texts:
I'm trying to generate PAL tv signals using a PIC24FJ64GB002 using a similar method to the circuit described half way down this page. The only difference is that my circuit needs to run at 3v instead of 5v due to using a PIC24 so I've recalculated the necessary resistor values and the closest ones I can find seem to be 220 and 470 ohms.

I'm connecting to the TV input via a scart lead connecting the video signal to pins 17 and 20 on the diagram on this page.

But I get no picture at all on the TV. It might as well not be connected.

I'm thinking one of three things could be wrong :-

My timing is out. I've posted the diagram at the end of this post showing the timing on the two pins for my test and as far as I can tell I'm generating the correct sync timing and the other signal is just some stripes for testing. How accurate does the timing need to be? I'm using the timer interrupt on the PIC to start each line 64uS apart.
I'm using the wrong resistors to mix the signal. Can someone check if I calculated the correct values to use at 3volts? How accurate do the voltage levels need to be? I chose the closest standard values, is this accurate enough?
I'm connecting to the wrong inputs on my scart lead? Everything I've read shows this as being correct though...

I am generating what I believe to be the correct frame sync pulses too. Although again, everything I've read seems to indicate that even if I get this wrong I should see something and as every line is the same loss of vertical sync shouldn't matter for this test?

Anyway, any input and suggestions would be welcome.

Signal timing http://this.domain.name/wp-content/uploads/2010/06/tv.png

Edit and additional question

If I want to use RGB signals on a scart it looks like I need to have 3 connections for R, G, B and one for the sync on the composite video pin. And then each one has it's own separate GND connection... Is there any reason I can't just connect those 4 together?


texts: What's the difference between 1N4004 diode and 1N4007?

texts: I have a circuit with multiple diodes, and I was wondering if I could use a 1N4004 diode instead of 1N4007


texts:
I designed a control circuit for a camera system. Most of the circuit works but except for a 5V regulator that outputs Vin-1V approximately. I checked 2 different ones on 2 different boards and both did the same thing. I have a bunch of them that I bought at the same time so it might be a batch problem but I'm not sure how to check that. Vin is usually between 12V and 15V.

Here is a picture of the regulator circuit:

I'm at a loss as to what to check at this point so anything would help. And if I need to add anything else, let me know

ps: Here is the datasheet for the regulator:
TI REG104 Datasheet

edit: here is a picture of the whole schematic, maybe that might help. Sorry if my design is badly laid out.


texts: Cleaning a computer CPU - Do gauze pads with polyester in them cause ESD?

texts:
Do gauze pads, the type used for scrapes or burns, cause ESD if they have a mix of polyester in them?

What if the polyester mix gauze pads have rubbing alcohol on them too?

They don't have any lint that comes off of them, thus making them seem like they'd work for computer electronics cleaning.  (I'm currently looking for a way to get thermal paste off of a cpu.)

Thank you.


texts: Using capacitors for radio communication

texts:
I am using a NRF24L01+ 2.4Ghz radio transmitter to talk between Arduinos.

I was having issues with them frequently cutting out for short periods of times.

I noticed that when I added 100uF capacitors to the power pins of the NRF, I had almost no packet drops.

I added 100uF tantalum capacitors to my circuit board design, but when I plugged in the NRFs, I was still getting the same issue as before (albeit slightly better.)

When I soldered the capacitor onto the leads manually, I was using an aluminum electrolytic capacitor.

The NRF is connected to its own dedicated 3.3V LDO regulator that can supply 500ma of current, so power is not an issue.

I heard that these NRFs are incredibly sensitive to voltage noise, so adding capacitors is good for them.

But my suspicion right now is that for this case, aluminum electrolytic capacitors are better for this purpose than tantalum (and cheaper.) Am I right in this assumption?

Also, if I am trying to get the smoothest voltage to the NRF, what is the best capacitor setup?

Should I do one big 100 uF aluminum electrolytic, or should I do a 100uF aluminum and a 0.1 uF ceramic capacitor in parallel?


texts: When I checking the hot terminal in the socket, multimeter shows the current through me?

texts:
I set my multimeter in AC voltage measurement, connected + wire of multimeter to the hot terminal of the electrical socket, and take - wire in my hand. Now it measures the voltage. This procedure checks is the terminal "hot". Multimeter shows 0,1 V.

I am wondering, what if it shows the current trough me(socket's AC 220 V divided by my ~2200 Omhs) if touch the terminal of the electrical socket, i.e., in this case 0,1 A(which is a killing value)?

It seems people didn't understand what did I mean. It's my fault. Clearly:

I use Multimeter, that switched to voltmeter mode. Below you can see the "circuit". I know what voltmeter measures, but I noticed, that the value it shows is pretty similar to current value through me, in case of no voltmeter, i.e. no additional huge resistance, i.e. only resistance of my body.


texts: I'm a complete amateur, I've probably gotten a million things wrong with this already. I'm using an SN74HC109 dual j-k" flip-flop chip. I'm trying to toggle the led (forgot to add a resistor in the diagram, ah, also forgot to add a line from 5V to Vcc.) with a momentary switch. When the circuit is powered, the led turns on but does not toggle when the momentary switch is pressed and released.


texts:
simulate this circuit – Schematic created using CircuitLab

I see diodes arranged like D1 and D2 sometimes used to prevent nuisance tripping of a power supply's internal overvoltage protection circuitry (crowbar type) if the power op amp is driving something like a motor. I'm wondering how these diodes would interact with the opamp output overvoltage protection added by D3 and D4. Ordinarily a voltage spike above ~15V would forward-bias D3 and the power supply would absorb it. But D1 would be blocking this path, making the overvoltage protection of D3 ineffective? Is this the correct interpretation?
Additionally, don't some IC's/microcontrollers use an OVP method like D3/D4 on their inputs? Would the diodes D1/D2 make the entire IC's input protections ineffective?

This seems to me that a better solution would be TVS diodes in place of D1 and D2. (Second schematic below)

simulate this circuit


texts:
I need the Profinet I/O Controller. Do you know any controller ?

I have a profinet slave device which is send some profinet packet. I need the profinet master or configuration program to make understandable.

How can I do this?


texts:
I'm looking for the topology and transfer function of a non-inverting type 2 and 3 compensators (PID controller). they are used in CC and CV feedback control in charging/Discharging circuits of batteries. I did not find documents that can help me to design them. Could you please help me find somthing important about designing  these compensators ??
Here is descriptif circuit of this kind of compensators


texts:
I got a PT27312 current sensor (datasheet), I wonder if I can use it to measure currents up to 100A AC/DC.

I couldn't find any specifications in respect of the current measurement range.
I only know I have to calculate a burden resistor for it.

I'd be grateful for any help.


texts: BZY97C47 zener diode datasheet questions

texts:
The BZY97C47 data sheet (I found no direct PDF link) confuses me on several points.

I fail to find straight forward information about the maximum allowed forward current from the data sheet.

Also, what is the parameter "Admis. Zener Current" supposed to mean?

And I am confused that additionally to the "zener voltage" (45-50V) there is a "reverse voltage" (25V) specified. Is that supposed the be the breakdown boundary where leakage current starts to increase?


texts: Maximum voltage allowed in trigger pin of 555 bistable

texts:
I want to measure the frequency of a bicycle hub generator, consisting of a variable AC voltage output. Nominally, the RMS voltage is 6V, but with no load attached the voltage peaks can be tens of volts.

My plan is to use a 555 in bi-stable mode, attaching its output to an Arduino interrupt to count its "rising" event. What I need to know is if I need to, and how to protect the TRIGGER pin from over-voltage. Most probably the 555 will be powered from the Arduino (Vcc = 5V).

So the question is:

  What is the maximum (positive and negative) allowed voltage on the TRIGGER pin of a NE555? How should I typically protect this pin if external circuit is expected to go over the voltage limit?

I took a look at the datasheet, but I'm afraid my current knowledge is not enough to interpret it.


texts: Given a shift register- Create a circuit to check whether 4 first bits are equal to the last 4

texts:
I hope this is the place to ask such a question.

Given a shift register- within 8 clock pulses 8 bits will enter this register, I need to make a circuit with this register, and other 3 flip-flops such that its exit line would be 1 if the first 4 bits are equal to the last 4.

This is an example of possible solution.

My question for you is: How come that only at the end of the 8th pulse a value would go out to the "equal" line? (or that in this solution- successes consider as output of "1111"?)


texts: CSMA/CA - What happens if a faulty WiFi station does not silence itself when an RTS/CTS is received?

texts:
In a WiFi network, assume a WiFi station does not silence itself for an RTS/CTS reception from other stations and it keeps on transmitting. I have few questions related to this scenario,
1.Will that affect the whole network?
2.How this kind of an issue is handled?
3.CSMA/CA is applicable only for the connected stations or all WiFi stations in the vicinty of the stations and APs?


texts: Considering Loading in analysis and design

texts:
What are the conditions under which loading can or cannot be ignored? I would like to be able to design a circuit in segments and then connect these segments together to create a circuit that performs all the operations of the individual circuits.
To my understanding, loading refers to the condition when the first stages output voltage is reduced when it is driving the second stage, as compared with the output voltage if the second stage were not present. How can this be accounted for in ones analysis or design?


texts: ohmic state vs saturation state drain-source resistance of a MOSFET

texts: If we look at datasheet here we usually see the on drain-source resistance is measured by applying a specific GATE-SOURCE voltage and a specific D-S voltage which will generate a specific current (20A in this case), of course these testing values are such that the MOSFET is at its ohmic region with respect to the  prespecified GATE-SOURCE voltage mentioned in data sheet. Now the question is as mentioned in the data sheet at 10V the R_DS (ON) is 3.0 milliohms, does it mean at this 10V GATE-SOURCE voltage if we take the MOSFET get out of ohmic region and and make it saturated by applying sufficient DS voltage can we say even in this saturation state now the drain-source resistance is still 3.0milliohms? if no, is there any way or formula so that we can determine the saturated state ds resistance at a specific GATE voltage? Text books says they usually consider it as a short, but I think that is not precise.


texts:
I was promised a current gain of roughly a thousand. We had an experiment involving this circuit to measure the input base current and output emitter current:

(That base resistor is a 50k ohm potentiometer.)

However we just kept getting a beta of 1.84. Very disappointing, no matter how we adjusted the potentiometer.

I tried measuring the beta current directly (instead of measuring the resistor base voltage and figuring it out from there) and found the beta to be 33.23. Unimpressive.

I understand the BJT has its own internal resistance that might have affected my readings. However, if that's the case, how can I be sure that it can deliver what it advertises, if it can't boost emitter current to a thousand times the base current?

I also would want to mention that it had a base emitter voltage of roughly 0.5V instead of something close to 1.4V. Is it possible that we used a defective BJT?


texts: AVR "OUT" function. addressing port without constant

texts:
I am currently writing some assembly code that needs to address different I/O ports at certain times in my code. For example, at one point I may want to address PORTD4, and at another point I may want to address PORTB6. The solution that I have come up with is the following...
;Get the port number
ldi xl, lo8(port)
ldi xh, hi8(port)
ld r18, x

;Figure out which port "section" is being used, use the flags here
sbic flags, B_flag
rjmp B_port_one_on
rjmp D_port_one_on

B_port_one_on:
    out PORTB, r18
    rjmp one_delay
D_port_one_on:
    out PORTD, r18
one_delay:

This solution is okay, but I'm trying to come up with something faster. The timing in my project is crucial and although this does work, I want to give myself a little bit more elbow room. One "solution" that I want to try to implement is instead of using a sbic function and then using rjmp, I want to see if I can store the I/O port location in a register or in a byte of RAM. Then what I want to do is load that location and then use the out function to load both the port letter and number from those registers/bytes of information. As you can see, I have already done so with the port number. Now I need some way of loading the I/O address via a register or byte of memory. I have tried setting it as a register and used the X registers to load the port address, but both have come back with errors. Is what I want to do even possible or am I just going to have to deal with what I've got? (The MCU that I am using is the ATTINY4313 @20Mhz)


texts:
My task is to decide RD and RS in this circuit:

The properties of the N-JFET are Up = -3.5V and IDSS = 10mA. The criteria here is that the operating point should give UDS = 7V and ID = 5 mA.

With UGS = -RsID and the relation between ID and IDSS, I get Rs = 1195Ω or 205Ω. I choose 205Ω, as it's the only option within the bounds of Up. US = RSID = 1V.

Knowing that UDS = 7V, I use KVL to find RD. Now I get (12V-7V-1V)/5mA = 795Ω.

My simulation is giving me ID = 4.29mA and UDS = 5.71V with these resistances, but the only parameter I can change for the N-JFET is UP(not the IDSS). This is making me believe that there might be an error in my calculations. Have I done it correctly, or is there something I missed?


texts: Looking for a simple way to inject a signal on 60Hz Mains line

texts:
Okay, so I'd like to be able to inject a really simple signal on top of the 60Hz AC Mains.  It doesn't have to contain any data per se, just a simple signal to trigger a receiver on the same subcircuit.

I'm imagining the simplest way to do this is to create a high frequency pulse on the line that the receiver could detect with a simple bandpass filter.  Essentially I would like to be able to trigger a relay remotely by sending this pulse.

I think I could make the receiver side, I'm just not sure about how to actually inject the signal.

Any advice would be much appreciated!


texts: LSM303DLHC low-power and high precision modes

texts:
The LSM303DLHC is a 3-axis accelerometer + 3-axis magnetometer chip from ST. The datasheet is a bit light on details however. I'm trying to work out

what is different about the low-power mode and how much power does it save, and
what is the high precision mode?

The only info I can glean from the datasheet is on page 15:

LSM303DLHC provides two different acceleration operating modes, respectively reported as “normal mode” and “low-power mode”. While normal mode guarantees high resolution, low-power mode reduces further the current consumption.

followed by a table with the following info:

Low-power mode - BW(Hz) = ODR/2, Turn on time = 1ms
Normal mode - BW(Hz) = ODR/9, Turn on time = 7/ODR

ODR means output data rate, and I assume BW means bandwidth, but bandwidth of what? The term bandwidth or BW doesn't appear in the rest of the datasheet. In the electrical characteristic there is no info on the low-power mode consumption.
Can anyone shed some light on this?


texts:
I don't have familiarity with FPGAs and I haven't used VHDL for 21 years, so starting from scratch.

I am wondering if the following is possible/sensible.

FPGA running n "small" independent microcontroller cores, e.g. 8-bit AVR
each core has access to it's own CAN controller block
each core has access to two I/O signals
each core executes from external flash (divided up? shared? not sure...)
each core has it's own JTAG interface.
all cores share the same reset and clock inputs

I notice that on opencores.org there are some AVR implementations, but I am unsure how to work out how many I could squeeze onto a single FPGA.

The aim here is to create a compact setup for testing the same firmware running on many CAN nodes at the same time. Currently we connect together lots of off-the-shelf eval boards.

Thanks!


texts: Need to control fan speed at extremely low level

texts: The application is to vent an electric BBQ smoker. I'll be moving to an apartment and have a serious pulled pork & pastrami addiction. I tried computer fans and 4" in-duct fan with different controllers. Controllers go from zero to about 40% then variable from 40% to 100%. The speed I'll need would be approx. the speed of smoke coming out of the smoker. To fast and wood chips would burn too quickly and temp control would be difficult. Too slow and smoke will back into the apartment. Ducting would go from the smoker thru the ductwork and fan and exit thru the existing kitchen vent. I'm open to any fan and any control device. Would even consider devising a temp control for the fan. Thank you in advance.


texts: Sallen Key Lowpass Filter stops rolling off in simulation

texts:
I unfortunately have no pictures of my spice simulation since it's on a different computer, but I am attempting to create a Sallen Key lowpass filter with fc~=555Hz. I used the lowpass filter design on wikipedia's page on the topology with R1=2.26k, R2=16.5k, C1=0.1uF, and C2=0.022uF. This is the circuit:

The cutoff frequency seems correct, and begins to roll off at 40db/decade but the circuit stops rolling off at around 18kHz and rises at 20db/decade to 1.2Mhz.
From my understanding the circuit should continue to roll off into oblivion as the transfer function has no finite zeroes, so I'm not sure why I'm getting this result.
Any help would be appreciated.


texts: Detection of simultaneous edges of two asynchronous clocks

texts:
This question was initially asked at StackOverflow as a Verilog question, but, eventually, it became more hardware than software discussion.

The question: how simultaneous (positive) edges of two asynchronous clocks might be detected in digital circuit.

The original question did not contain any information about how much time "simultaneous" is, therefore your suggestions and thoughts on this are also welcome. For clarity, let's define "simultaneous" as 0.5 or 0.25 times the period of the slower clock.

One of the proposed solution uses non-standard flip-flop configurations described in the following patents: US6320442 B1, US5793236 A, US5327019 A. Is this approach 100% safe, or there is still chance of overlooking the event in question (due to internal metastability, or any other reason)?

Is there a standard approach in dealing with this kind of tasks?

EDIT:

There were few solutions suggested, but none showed explicitly how exactly the information about the occurrence of simultaneous edges may be (reliably) fed into digital logic. Please note that (essentially) this is the question, and any solution which do not address this subject is incomplete.


texts: Find the exponential Fourier coefficients

texts: I am confused as to what the periodic function, Vin, is! I know the slope is 2/pi, but what about the vertical line? I am also unsure about its relation to Vo.


texts: how to drive 5x5 IR LEDs with 100 mA, using Arduino

texts:
I am trying to do my first Arduino project, and I would like to drive a 5x5 matrix of IR leds. I would only like to have one switched on at a time.

I understand that in an array I can do it with 5 lines for anodes and 5 lines for cathodes. My problem is that I cannot supply 100 mA with an Arduino.

What would be the easiest way for me to supply 100 mA for these leds? I think they don't need current limiting, if I could drive them with 1.35 V voltage, it would work perfectly. I've measured a couple of my LEDs and they used exactly 100 mA at 1.35V.

I know that I can use a transistor for supplying a higher current power source, but I don't understand that how could I do it with a 5x5 LED matrix. How many transistors do I need? 5 or 10? And if I need 10 transistors, then I understand the 5 which supply 1.35 V, but what are the other 5 doing? How can a transistor supply 0 V?

Or, as an ugly trick, I was thinking about using a Mega, and for each line, using 3 pins in parallel. I mean one pin has a current limit of 40 mA, so 3 pins would be enough for 100 mA. That way I wouldn't need to care about an other power source, and transistors. I could just run the whole thing from USB. All I would need would be 5 resistors. Is that a good option?

Or, as an alternative, I was thinking about using Rainbowduino in itself. It has current limiting, and in theory I could possibly run the whole thing from 5V USB. But it seems really complicated to just control 5x5 LEDs. I don't understand the whole idea about source driving the anode and current driving the cathode! Isn't it a circuit, I mean we either set the source, or the current? And why does the anode has 500 mA current limit, while the cathode has 120 mA? So while it looks good on paper, I think I'm really not on a level to understand how it works.

All I would need is to control 5x5 LEDs, where each of them would require 100 mA @ 1.35 V. What would be the best way you’d recommend me doing it?


texts: can you please help me to identify this smd component marked M 412 727a?

texts: Hi please help me identify this smd component marked M 412 727a thanx


texts: Why does an inductor behave as a capacitor at high frequencies?

texts:
In truth, I've only been told this anecdotally by an instructor, but can someone explain the physics at play?

I have been told that if an inductor is driven at a high enough frequency, it will begin to behave as an capacitor, but I cannot figure out why.


texts: How to change the circuit to adapt to a new power triangle

texts:
I've been given a single-phase load represented by the power triangle in Fig.1, powered by 200[V] (rms) at an angular frequency of \$w=400\frac{[rad]}{[s]}\$. I would like to rephase the load such that the new power triangle is represented in Fig.2.

How can I find the capacitance of the capacitor in parallel with the load?


texts: MSP430: how to let the timer ISR interrupt the Serial RX ISR?

texts:
I am working on a MSP430 connected to the PC via serial. The MSP430 also communicates with some other boards using a bit-banged serial interface. I'm using the timer peripheral to bit bang the serial, and I'm using the UART to talk to the PC.

When commands arrive from the PC, the USCIAB0RX_VECTOR interrupt gets executed, and while it's running, it blocks other interrupts. However, some times my serial RX routine takes a little while, which delays the timer interrupt and throws off the bit-bang interface.

In the serial RX ISR, I would like to allow the timer interrupt to still be serviced, but I would like to prevent the serial RX from interrupting itself (which shouldn't be able to happen for my specific application, but I would like to protect against this just in case)

Should I simply manually mask the serial RX interrupt in the top of the serial ISR, and then enable global interrupts?
Do I also need to unmask the serial RX interrupt at the end?
Do I need to manually clear any interrupt request flags?
After the timer ISR returns, will the serial ISR continue, and then return to the main loop?
Are there any potential race conditions I need to consider?
Is there a better solution?
Is there an article about interrupting and interrupt? (i've already read about nested interrupts in the users guide)


texts:
I have this LED Driver - A80604
I need to generate 30V for my LED Driver String for generating 300mA.
In a previous question, I received an answer that I need to fix the current using the LED Driver to 300mA and the output voltage will take care of itself.
My question 1 - So, in that case, I want to understand whether this is a synchronous boost LED Driver circuit ? I am asking because what should I connect to the GATE and GDRV pins to?
My question 2 - What would be the voltage at the pins LED1-LED4 ? Would there be 0V after all the forward voltages of the LED or would there be some residual voltage after the forward voltages of the LEDs?


texts: How to detect a partial discharge in a noisy signal?

texts:
I am working on a competition where we are required to detect partial discharges in given signals. Each signal represents a measurement of some power-line voltage.

I know that partial discharges appear as bursts of pulses at the peaks of the sinusoidal wave, but the given signals have a lot of noise. For example, these are two signals that are labeled to not have a partial discharge:

And these are two signals that are labeled to have a partial discharge:

I couldn't spot a pattern that distinguishes signals with partial discharge from other signals.

I used wavelet transform and a Butterworth filter on the signals to cancel some noise and to remove the sinusoidal shape so for example, the first signal above (which has no partial discharge) becomes like this:

and the last signal (which has partial discharge) becomes as below:

But I still can't find a pattern.

My question is: how to spot partial discharge in noisy signals like the given signals? Is there a signal-processing operation or calculation (e.g.: filter) that makes it easier to spot partial discharges?


texts:
Will I be able to accuratley generate a 2MHz square wave using the AD9833 (pdf data sheet) ? I know that as you approach the clock frequency on a DDS you get distorted output signals. I was just wondering whether this is a little to close and if anyone has any experiance with this?

I want to achieve a square wave at 2Mhz, I'd like it at around 3-5Vpp. I'm happy to use other signal generators, I'm not set on the AD9833 and I've been looking at the AD9850 but putting the sinewave through the comparator seems a very roundabout way of getting a square wave out...

Any help would be much appreciated.


texts: Using an Arduino to Emulate a CD4021 Shift Register for Controlling an NES

texts:
This is probably a silly thing to do when I could wait for my CD4021s (74HC165Ns) to arrive and save myself the hassle but I feel as though this can be done and I'm simply missing something. I've pored over all of the documentation I can find on the web about the NES's controller protocol and how to emulate an 8-bit parallel-in, serial-out shift register but I just can't seem to get it to work correctly. I'm using interrupts on the latch and clock signals from the NES and pumping out the bits using port manipulation so it's a bit ugly. This is also my first time writing anything similar. I may just be getting the timing wrong.

Can anyone tell me what I might be doing wrong? Here's some documentation on the NES protocol: http://www.mit.edu/~tarvizo/nes-controller.html, and the SNES protocol: http://www.repairfaq.org/REPAIR/F_SNES.html (more detailed but slightly different - not sure which to trust).

Here's my code as it is now:

#include <Arduino.h>

#define plPin PIND
#define latchPin 2
#define latchShift 2
#define dataPort PORTB
#define dataPin 8
#define dataShift 0
#define dataMask (B00000001 << dataShift)

byte origButtons = B11111111; // Set each bit low (0) to push button.
volatile byte buttons;
volatile byte bit_num = 0;

void setup() {
  pinMode(dataPin, OUTPUT);
  pinMode(latchPin, INPUT);
  dataPort = (dataPort & ~dataMask) | (B00000000 << dataShift);
  attachInterrupt(0, latch, CHANGE);
  attachInterrupt(1, pulse, RISING);
  delay(1);
}

void loop() {

}

void latch() {
  // Check the state of the latch pin to see if we're rising (1) or falling (0).
  if ((plPin & (1 << latchShift)) != 0) {
    // Start pulled high.
    dataPort = (dataPort & ~dataMask) | (B00000001 << dataShift);
  } else {
    // Pull low if A button is pressed at fall of latch pulse.
    dataPort = (dataPort & ~dataMask) | ((buttons >> bit_num) & B00000001) << dataShift;
    bit_num++;
  }
}

void pulse() {
  // On the rising edge of the clock pulse, check for the state of the next button.
  // If the button is pressed, pull (or stay) low. Otherwise, pull high.
  //
  // Bit Math
  // --------------
  // Example values:
  // dataPort: 11111111
  // buttons: 11001100 (1 = HIGH/not pressed - 0 = LOW/pressed)
  // bit_num: 3
  // Reverse the dataMask (result: 11111011).
  // AND that result to the current value of dataPort (result: 11111011).
  // Shift buttons to the right by bit_num (result: 00011001).
  // AND 00000001 to that result so the least significant digit is the value of the current button (result: 00000001).
  // Shift that result by the data pin's position (result: 00000100).
  // OR that with the result from ANDing the reverse of the data mask and the current value of dataPort - see 4 lines up (result: 11111111).
  // Final result: button 3 not pressed.
  if (bit_num == 7) {
    // On the last pulse in a sequence, spit out the last button, wait until it has been sampled by the CPU, and reset the pin to the default low.
    dataPort = (dataPort & ~dataMask) | ((buttons >> bit_num) & B00000001) << dataShift;
    delayMicroseconds(12);
    dataPort = (dataPort & ~dataMask) | (B00000000 << dataShift);
    bit_num = 0;
  } else {
    // Otherwise, just spit out the current button and increment the offset.
    dataPort = (dataPort & ~dataMask) | ((buttons >> bit_num) & B00000001) << dataShift;
    bit_num++;
  }
}


texts: What is the transfer function of a transformer?

texts:
Consider transformer as a black box. We give arbitrary input voltage \$x(t)\$, what is the output \$y(t)\$?

Naive thoughts: if \$x(t)\$ is a sin-wave, \$y(t)\$ is a sin wave also, with the same frequency, but maybe different amplitude. Every signal can be decomposed into Fourier series of sin-waves. It's seems reasonable to suppose transformer is a linear device (provides superposition), so we have \$y(t)=kx(t)\$, \$k=\operatorname{const}\$. That's wrong, because transformer can't pass DC voltage. What is the mistake here?


texts: Can I combine the power of 2 solar panels with 12V dc barrel jacks?

texts:
I have two solar panels that both output to a 12V DC barrel jacks.
I want to feed them into a power bank that has a female jack.
Is there some way to feed the power of both panels to the input?
Would it suffice to use a barrel plug splitter with 2 female jacks?


texts: How do i turn multiple usb ports off based on multiple sensors

texts: I'm looking for a way to turn a usb port on an off from an Arduino, I'm looking at purchasing something like this and somehow using a pressure or light sensor to turn the usb port on and off. I was thinking that I could use a transistor or relay to turn the usb port on and off, however, I may need to have many sensors ( maybe 20 ) that turn USB ports on and off, and the Arduino pins would fill up pretty quick. Perhaps there is such thing as a serial or i2c transistor? that way they could all be on a bus of some sort.


texts:
I have a 5.1 dvd player. The volume of subwoofer is high even after setting low in remote. Is it possible to lower volume by adding resistor between dvd player and woofer output line. If so how much resistance is needed. I want to lower volume to half

Subwoofer ( 95w 3ohm)
Amplifier (dvd player) (95w 3ohm)

It's a 5.1 dvd player samsung hte330k
It has 6 output ports for four speakers and 1 woofer

the specs are here (https://i.stack.imgur.com/1DLPC.png)


texts: Unstable speed with A4964 BLDC controller

texts:
I am using an Allegro A4964 for controlling a BLDC micromotor. I have tuned the PID and all available parameters according to the documents available from Allegro.

Problem: In the control modes I have tried (open and closed speed loop) the resulting speed is varying more than I would want. I read a variation of +/- 50rpm, and I also hear this on the motor while running. The lower the RPM, the more pronounced the effect.

I'm suspecting something with the BEMF detection, but I've already tried tuning the available parameters extensively (window size, sample count, filter time), without any improvement.

I'm using Si4804 MOSFETs in M1-M3.

Any ideas what I could do to improve the accuracy?

// General config
configSenseMaxThresh(THRESH_100MV);
configCurrentLimit(1800, 100); //
configSpeedFlags(DCC_DISABLED, DECEL_1);
configSpeed(SpeedControlRes::RES_0_4HZ, 0, 820);
configSpeedAccel(500, 31);
configStopOnFail(ENABLED);
configVLRvoltage(VLR_3_3V);
configGateDrive(DRIVE_11V);
configOperatingMode(SPI_ONLY);
configWakeMode(WAKE_PWM);
configPWMSense(PWM_DIRECT);
configCurrentLimitEnable(ENABLED);
configMotorMode(CLOSED_LOOP_SPEED);
configDriveMode(SINUSOIDAL);
configOvermodulation(OVM_100P);

// PWM
configPWM(PHASE3, ALIGN_CENTRE, 50000); // hz
configDither(DITHER_1600NS, DWELL_1MS, 10); // 0 steps = dither disabled
configBridge(GAIN_20, 600); // gain, dead time ns

// Gate
configGateCurrent(CUR_TURN_OFF, 0, 0); // drive turn-off current1, current2: mA, 0=switching
configGateCurrent(CUR_TURN_ON,  0, 0); // drive turn-on  current1, current2: mA, 0=switching
configGateSlew(0, 0); // ns

// Current Limiting
configCurrentLimit(1000, 100); // blank time ns, scale %

// VDS
configVDSOvervoltage(1550); // mv
configVDS(DEBOUNCE, 3150); // ns

// Startup
configStartupAlign(100, 3); // hold time ms, duty cycle percent
configStartupMotor(COAST_OFF, DESYNC_RESTART_OFF, 750, RAMP_0P);
configWindmill(DISABLED, 7, 50); // freq hz, duty cycle percent

// Ramping
const int rampStopHzx10 = freqx10 > 325 ? 325 : freqx10;
configRamp(15, 3,  rampStopHzx10, 3); // start freqx10 hz, duty, end freqx10, duty
configRampStep(10, STF_2HZ); // step time ms, step freq

configPhaseAdvance(ADV_AUTO, ADV_GAIN_4, 0); // mode, gain, degrees*10

// BEMF
configBEMFDetectWindow(560);    // degrees*100
configBEMF(SPC_6, BEMFFilterTime::BF_10MS); // samplecount, filtertime

// Commutation control
configCommSteadyPow2(0, 0);     // P, I (pow2)
configCommTransientPow2(0, 0);  // P, I (pow2)


texts:
My apologies, I'm not really sure how to phrase this question. I'm a little confused about what is the advantage of having a separate circuit controlling a module vs connecting the module directly to a master device. For instance, I want to control a nRF24 transceiver module, I have an Arduino microcontroller and a Raspberry Pi.

Is it better to have the Arduino control the transceiver and then have the Raspberry Pi communicate with the Arduino, or just connect the transceiver directly to the Raspberry Pi? What are the advantages of each method? I've seen both method used on the internet but no one really explained why they used one over the other.


texts: Read the state of a 12v illuminated switch from an Arduino Uno

texts:
I've got an Arduino Uno, and I want it to be able to read the state of a 12v "Illuminated Switch" in a way that allows the switch to properly illuminate.  I have an external 12v, 1.5A power supply that I can use to light up the switch.  The switch is listed as SPST, but has three connectors on it, due to the built-in LED and resistor.  The three connections are POWER, ACC, and GND, and the first two short when the switch is closed.

The Arduino has a digital input mode called INPUT_PULLUP that enables a built-in 20k pullup resistor on a digital input line.  A typical non-illuminating switch would simply short the pin to ground, and the software can then read HIGH for open and LOW for closed.

This is my idea for reading the 12v switch using an NPN transistor, but I'm not an EE and I'm not sure where the resistors go or what strength they should be.  The NPN transistor I have handy is a 2N222A (Vceo 40, Ic 600, power dissapation 625 mW), but I'm open to swapping that with something else.  The resistors I'm less sure of.  I think there should be R1 between ACC and the base, because there's +12v flowing there when the switch is closed.  And I also think I need a pull-down resistor R2 on the base.  Am I on the right track here, and if so, what resistance should R1 and R2 be?

The illuminated switch is a Radio Shack 275-0010, if you need more detail on that.  I'm looking for an answer that will show a reliable, minimal way to read the state of this particular switch on the Arduino, including the correct values for any resistors needed on the circuit.  Thanks!


texts: 75kva three phase 208v delta to three phase 208v y transformer wiring/results?

texts:
I recently purchased a used 75kva 208v delta to 208v Y transformer and have some concerns about some strange results.  We would like to use this transformer to create separate (isolated) service between audio and lighting systems.

I wired up the ground and then wired the H1, H2 and H3 terminals to the three hots coming out of my buildings 3 phase 208v service. I disregarded the neutral as its not used in delta.  I didn't think the phase order would matter, but I tripped the breakers when I turned it on.  After swapping phases the transformer came to life with a lovely buzz like they always do.

I took out my meter and got some strange results.  I was happy with my 3 hot to hot results (between 208v-210v) and hot to neutral results (between 121v-122v), but For some reason I have 7 volts between ground and neutral.  I also got strange results between hots and ground.  X1 reads 110volts while X2 and X3 both read between 120-122volts.  I could bond the ground and neutral, but it kind of defeats the purpose of why I bought the transformer.

Lastly, I metered the current draw with no load. Black phase (H3)reads 14.32amps, red phase (H1) reads 11.08amps and blue (H2) reads 9.47amps.  I would think they would all be the same.

In summary, I've never hooked up a transformer before so I don't know if the results I got are to be expected.  Seems like something is wrong on the H1/X1 phase.  Kinda feel like I was sold a lemon.  Thoughts?


texts: How are the passband filters in SDRs able to select such a wide range of frequencies?

texts:
I was wondering how do SDRs adjust their passband for a such a wide range of frequencies?

The normal RF chain is, passband RF filter -> Mixer -> IF or baseband

Some SDRs can select their passband from being centered at 100khz to being centered at 3Ghz(with their IF or baseband range 20Mhz).

Does the SDR consist of hundreds of selectable RF bandpass filters or has someone come up with an adjustable one?


texts: How much computing power is required for a GPS Device/Station That Uses L1 and L2C Frequency to Calculate For Ionospheric Delay-Interference?

texts:
I’ve been trying to find GPS chips or devices that receive L1 and L2C and from a quick google search they seem to be very professional equipment, very bulky with huge antennas.

This makes me wonder how much power do they need, does it really take that much effort to calculate for the ionospheric interference?

At what rate would the GPS need to receive from 1Hz to 50Hz to calculate for the ionospheric delay that the use of L2C is so limited in 2018, even the Chinese phone got second frequency, L5, which is useless as it’s not even deployed yet, but second frequency nonetheless, on a pocket device.

Yet the most we get is L1 + SBAS + maybe pointless DGPS that works if we have a ground station nearby which helps guide ships with cm precision. This setup is BadElf Surveyor. Instead of adding L2C they added Glonass which doesn’t do anything for accuracy..


texts: Why boost converter burns with large output capacitor?

texts:
In this circuit, the boost converter burns each time at start up and SW becomes connected to GND.

Then I just removed 10V , 220uF tantalum capacitor at the output and the problem solved.

In the datasheet of TPS61022 it said about minimum required output capacitor but it didn't say anything about maximum allowed output capacitor.

Why a large output capacitor causes the converter burn? Is it normal?

Is there any way to prevent it?