texts:
My problem is easy to explain. I want to couple/add some Noise into 240V 50Hz. For this purpose, I have a Noise Generator which is triggered manually with a signal processed by a microcontroller.

I only have to couple that noise (high frequncy one) into those 240V. I found a PCB which consisted on a high pass filter, so I decided to see if this experiment could work. The idea is using the filter to couple the noise there, and also filtering the high voltage (50 Hz) in order to not to damage the Noise generator. (See the image below). There should be like 40dB of attenuation for the 240V 50Hz, so there is no problem with it I think.

The thing is that this doesn't work, and I dont know why. When I connect the filter, the Noise generator isn't able to get the expected V out, and, as a consequence of this, I dont get the results that I want. I have checked the maximum intensity that this generator is able to deliver (due to the low value of the resistor placed on the filter), and there is no problem with it.

So, is there anything that I am ignoring?
Thanks :)


texts: How to Find Time Constant of a BLDC Motor?

texts:
I've done this with DC motors by determining the inductance and then computing tao = L/R where L is the inductance of the coil and R is the resistance of the coil.

Is there a best-practice way to determining the electrical time constant of a BLDC motor?  How  should I go about measuring the inductance?

I'm interested in this because for DC motors I have been following the rule-of-thumb that your PWM frequency should be greater than or equal to one over the time constant of the motor to mitigate the torque ripple, etc.

Thanks in advance for any help you can offer.


texts: Replacing tip on Weller WHS40 soldering iron?

texts:
I've had Weller WHS 40 soldering station for some 20-ish years or so, used purely as hobbyist few times a year mostly for work on simple through-hole components. Lately, the (still original, never changed) tip has become damaged as pictured (it is standard "flat screwdriver" type, not some special U-shaped tip).

Base of the tip has diameter of 3.5mm, and I seem to have found them online for about 20 EUR for 3 pieces (which looks reasonable to me). However, the tip seems to be held in place by very small screw, which, as you can imagine, has become quite attached to the heater. I've tried to unscrew it with small screwdriver, but it doesn't budge and I'm reluctant to apply more force, as even this seems to damage it.

The question is, how to dislodge the screw safely so I can replace the tip; or if can't be done, how can I remove and replace it with something reasonable available? Is it worth it? The station have served me well, but if if it is not worth it, I'm open for suggestions.


texts:
I'm a beginner in Arduino. How do I wire the LED tactile button? Which of the pins of the LED tactile button is the anode and cathode of the LED and which are for the buttons?
Tactile button with LED


texts: Control DOIT ESP32 DevKit V1 using Blynk app

texts:
I'm a beginner and I'm working on a project to light an LED using DOIT ESP32 devkit v1. I want to turn on and off the LED using a phone app via wifi (using Blynk application). I'm using the following code on Arduino IDE (version 1.8.13):
#define BLYNK_PRINT Serial
#define LED 2

#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "...";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "...";
char pass[] = "...";

void setup() {
  pinMode(LED, OUTPUT);
  pinMode(LED, HIGH);
  Serial.begin(115200);

  delay(10);
  Serial.print("Connecting to ");
  Serial.println(ssid);

  WiFi.begin(ssid, pass);
  int wifi_ctr = 0;
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("WiFi connected");

  Blynk.begin("Your auth token key", ssid, pass);

}

void loop(){
    Blynk.run();
}

The connection to the wifi succeeded, But when I press the serial monitor button I get an error saying "Invalid auth token"

I don't understand what am I doing wrong, I've check the auth key few times, that's the right one. In the Blynk project I've chose ESP32 Dev Kit and in the Arduino IDE I chose DOIT ESP32 Dev Kit V1 along with port COM4 (I've made sure that's the right one).  I think the problem is that I'm not using Blynk right, What do I need to do?
Thank you.


texts: Safe Discharge Rate of Alkaline Batteries

texts:
I am working on a portable project. I need to pull 3,500mA average with 10,500mA peak at 3.6v-4.5v. I see that "D" Alkaline Batteries are rated for 1.2-1.5v and 12,000mAh. So I am looking at using a 3 "D" Alkaline Battery Pack to achieve the 3.6v-4.5v supply.

Question:
12,000mAh / 3,500mA = 3.43 hours is a reasonable amount for this project.

But, I have not been able to find anything on the maximum safe discharge rate of Alkaline Batteries. Is it possible and safe to pull 3,500mA average (and possibly 10,500mA at peak) from Alkaline Batteries?

If not, can I solve the problem by putting multiple battery packs in parallel?


texts: 0.5mm Pitch BGA Fanout - Reasonable Vias, Drills, Traces and Clearances

texts:
I'm pretty new to layout and using Altium.

I need to break out a 0.5mm pitch Spartan 6 BGA, I want to use "reasonable" vias, drills, traces, etc...  but I don't really know what that means now a days.

NXP, TI and a few others have decent guides that I've seen, but I'd like to get some stackexcahnge advice based on things people have used themselves.

I'd like to avoid blind/burried and microvias if possible.

Whats a reasonable set of DFM rules to use?  I can't snake the inner rows out past the outer balls without using a 3.5mil trace.

I've also been using a 6mil drill with a 8mil PTH, but I think its a little thin...

I know this is kind of a balancing act based on yields, cost, etc...  I'd like to get an idea of what you guys and gals think is "reasonable."  Any advice is appreciated.


texts:
I am measuring two DC biosignals but have only one input channel. I was wondering if some type of signaling or modular simple trick might be used to 'interleave' the signals while also digitizing them. For example, I might sample the first analog signal at 3600 Hz and sample the second at 3600 Hz as well, switching off between each source... Then what?

What I am really asking for is how to fit undersample (relatively) in order to output two signals in one channel


texts:
I want to implement a 3-header jumper setup in order to switch a microcontroller between two video modes on a PCB. I don't want to use just a standard switch as it doesn't seem appropriate for a change which will happen rarely if ever, so I wanted to go with a jumper instead such as this one.

However, I was wondering whether there exist any kind of nicer, locking jumpers which would require squeezing tabs or some such in order to remove and replace them.

If not, are there better solutions out there? Or should I stop mincing and just throw a tri-pole switch on there and call it a day?

Thank you!


texts: Bluetooth profiles - What is the hardware difference?

texts:
Do all bluetooth chips have the same hardware, or does the hardware that is part of the chip defined by the bluetooth profile that we choose to use?

Thanks!


texts:
Our LCD has 10 series white LEDs for backlight with total Vf of 15V and current of 40ma. The backlight circuit is designed with SC4509. As per the datasheet its recommended output voltage is 20V and  output current of 30ma. This translates to 20V * 30ma = 600mW. Our design also 15V * 40ma = 600mW.  So is it correct assumption that the IC can be used in this design since the total power remain with in the limit? or the output current has to be less than 30ma irrespective of the output voltage?  The max switch current limit of SC4509 is 500ma.

-bj


texts:
I was at Fry's yesterday, looking for some thin solder to use on an Adafruit kit with through-hole components.

Two of the solders I found were labeled RA Flux and No Clean, respectively. An engineer who was present said that with my use-case I should choose No Clean, as I wouldn't need to clean the board afterwards.

Can anyone clarify how one should select solder based on flux type?  I had always been under the impression that you just use some sort of (one size fits all?) rosin-core solder with for basic board work, so I was confused at the different flux labels.  I didn't think you had to clean your board (although I do know that after soldering yellow gunk can be left behind, and I suspect this is a flux by-product).  I also know that you should avoid solder with an acidic core for electronics work, as that is for pipes + household plumbing.

The wikipedia page for soldering classifies many of the different types of fluxes, most of which require cleaning:

R (non-activated)
RMA (mildly-activated)
RA (activated)
No Clean

Can someone explain why/how you should choose a flux type for a given application?  Most of the answers below answer "what."  I'd like to learn a bit of the theory.


texts: Matlab c2d(1/s) is different than z transform tables

texts:
c2d is used to convert a model from continuous to discrete time. The official doc states:

  sysd = c2d(sysc,Ts) discretizes the continuous-time dynamic system model sysc using zero-order hold on the inputs and a sample time of Ts.

Why is it that when I do:

>> c2d(1/s, 1)

I get:

ans =

    1
  -----
  z - 1

Sample time: 1 seconds
Discrete-time transfer function.

but according to Z-transform tables the z transform of 1/s is

ans =

    z
  -----
  z - 1

Why this discrepancy?


texts: Switch design for shorting the power control pins?

texts:
I have been struggling to design this switch for a while and I would appreciate any help.
Problem Background:
I'm designing a power system for a submersible, using the Mini-box OpenUPS battery management PCB. The connection diagram for OpenUPS as well as its link are shown as below:

The link: https://www.mini-box.com/OpenUPS
A 14.4V 4S 1800mAh Li-Po Battery will be attached to this board. But before we turning on this PCB, we have no direct access to the battery power. (Yes, I can re-direct the wire from the battery to somewhere else, but that will not be a good ideal for our design) The board can be turned on by shorting the two control pins at J8. The open circuit voltage across these two pins is about 14.4V; when the two pins are shorted, the current flowing through is around 135mA. The physical switch that mounted on the submersible is a High Pressure Waterproof Switch from Blue Robotics. A picture is shown below:

When the dial is turned all the way in, the circuit will be closed. For the sake of robustness, the dial is required to be turned all the way in when it is underwater. Before turning this PCB on, all pins except J8 remain at 0V.
Problem Statement:
The functionality for this switch we want will be as following:
Operation on the Switch: Prior putting the submersible underwater, the switch will remain closed first (closed circuit), we will loosen the dial for around 1s (open circuit), and then turn it all the way in (closed circuit).
Desired Response for Circuit: Two pins on J8 are disconnected when dial is turned in, then shorted when dial is loosened.
Attempted Solution: I have tried using a 2N3906 PNP transistor to control the circuit (14.4V power control pin serves as VCC, another pin as ground, then diagram is shown below), the schematic is shown below:

simulate this circuit – Schematic created using CircuitLab
However, I encountered the following problem: Initially, the PCB is off and the switch is open. There's somehow about 50uA \$I_{EC}\$ leakage, and that will not trigger the PCB to turn on. When switch is closed, there's around 134mA \$I_{EC}\$ and PCB is turned on. But when switch is open again, the 50uA \$I_{EC}\$ will remain the two pin shorted, and PCB will not function in this state. I experiment with it a little bit and found that even if there's 1uA, it is enough for these two pins to remain shorted after PCB is triggered.
I'm wondering how I should solve this problem or is there an alternative design for it?


texts: which voltage regulator to use for 12v 2A?

texts:
I have looked into using 12v linear voltage regulators, coming down from 16V, i need 2 amps and the regulator is only rated for 1.5A (7812 linear voltage regulator)
i am looking for a solution for getting 2A through the regulator.
my fan is 1.68A rated at 12V and i'd like a little more than that.

can a buck do it? Other linear voltage regulators rated for more amperage?

Thanks!


texts: Is the parasite mode of a DS18B20 less power consuming than the normal mode?

texts:
Description

I'm trying to make a few small temperature sensors for in our house and want to go for "low powered battery operation".

My current plan is to use esp-now in the esp8266, deepsleep between measurement and use a ds18b20 to measure temperature.

Initially I though to use the parasite mode of the ds18b20, as you can turn of the sensor when not used. However, depending on the accuracy (lets say 12bit) you need to wait 750ms (while keeping the pin high) before you can get the results. Looking at the data sheets, it seems this might be the wrong tradeoff? (750ms of a running esp8266 at 15mA)

Question

So, my question, would it be better to just connect the ds18b20 directly to power, as it's standby usage is max 1uA and deepsleep the esp8266 during the Tconv?

I plan to measure temperature once a minute.

Scenarios

Scenario 1 (parasite)

Wakeup esp8266 based on timer, send measure request to ds18b20
Modem sleep esp8266 for 750ms at 15mA (sadly it seems impossible to use a timer to wakeup from light sleep)
Get the measurement from the ds18b20
send it using ESP-now

Scenario 2 (normal)

Wakeup esp8266 based on timer, send measure request to ds18b20
Deep sleep 750ms at 20uA
Wake from deepsleep
Get the measurement from the ds18b20
send it using ESP-now

Differences

Except for the obvious difference of deepsleeping during the Tconv, I thought of the following differences:

in scenario 2 we add standby usage of 1uA for the ds18b20
in scenario 2 there might be some overhead in waking from deepsleep

Similarities

As both scenario's will include sending the measure request, getting result, sending it using ESP-now, I think that those aspects can be excluded from the question? (if you have a useful tip, be sure to leave a comment ;-) )

References

esp8266 energy usage

ds18b20 energy usage


texts: Will put a metallic plate behind an RFID antenna change the readings?

texts: I have an RFID antenna that has been delivered with a flat metallic plate glued to its back. I don't know much about this antenna it arrived without any documentation, it is square and can read tags in every orientation (not polarised). I am wondering whether I could remove it or if this might have been glued for a reason (insulation? amplification?). I guess in a more general sense my question is: does a metallic object behind an RFID antenna change the readings?


texts:
I'm trying to build the power supply described here.

R1: 1K8 1/4W Resistor
C1,C2: 4700µF  25V Electrolytic Capacitors
D1: Diode bridge  100 to 400V, 1.5 to 4A
D2: LED  Any type and color
SW1: SPST Mains switch
T1: 230V Primary, 30V Center-tapped or 15 + 15V Secondary, about 45 to 60VA or 1.5 to 2A, Mains transformer
PL1: Male Mains plug with cord

In fact, I already did it and it's working. The problem is that the output voltage is higher than the voltage supported by the IC (ne5534), that should be 22V (maximum).
After I built it, I measured +-24V. I would like to limit it to +-20V. How do I do this?
Searching the internet I found that I could use LM317/337 (since I need +/- output). Or I could use 78xx/79xx (it seems to have a 18 or a 24 version, but not a 20V). Or I could use a resistor. Or diodes (regular or zener).
I would like to use the resistor/diodes solution, since I have some spare/salvaged ones In hand.
If I calculated (V = I*R and P = I^2 * R) correctly, to use resistors, I should use  two 4R 4W (one for each output).
If I use standard silicon diodes, it will require a minimun of 6 (in series) for each (12 total).
The approach that I prefer is the use of a zener diode, but unfortunatelly (I'm a hobbyst) I dont know how to calculate it... My problem is with the current. How much power the diode/resistor should accept (considering 1A). I found many papers describing zener theory, but I didn't manage to solve it by myself... It seems that a 20V 1W zener diode would fit, but it will require the same 4R4W resistor to regulate the current...


texts:
We have developed a docking station product which charges multiple devices simultaneously, and currently ships with a 5V, 3A barrel jack adaptor. We are looking to move this over to USB power, and have recorded maximum current draw with a full complement of devices around 1.8A (quickly returning to 1.5A, which I understand is the minimum required for a USB Dedicated Charging Port).

The factory are telling me that if exceeding 1A it will not pass CE certification, but I can find no reference to this in any of the documentation I have read, so my question is:

Is the factory correct? If so, could anyone refer me to a standard which
states this?
Given the prevalence of USB supplies with 2A or greater rating,
would we be violating any rules by simply stating in the manual
that it must be connected to a supply which can provide 2A or
greater?

Thanks in advance.


texts: LTspice- Huge current spikes across MOSFETs in full-bridge inverter

texts:
I have designed a simple full bridge inverter in LTspice. The outputs for voltage and current are as expected however I have huge current spikes across the MOSFETs which I am using as switches and are controlled by PWM. Is there a reason for these spikes? Am I missing something from the circuit?

I have tried a number of different MOSFETs and diodes and increasing the resistance of the MOSFETs reduces the spikes but not by very much.

Here is the graphs I get from LTspice, Id(M1) is the current into mosfet 1 and Is(M1) is the current out, which you can see are far too high the other graphs show the current across the resistor and inductor of the load and the voltage out.

And here is my circuit

Thanks in advance


texts: Typically what range can an active powered type 5 NFC tag be written / read on iOS/Android

texts: does anyone know the answer to the above - I am struggling to find out the information. I know that a type 5 tag can be read from 1.5 metres away in ideal conditions, but what can I expect from a phone, in situations where the tag is powered (active) and situations where the tag is active. I know a lot of it will depend on various factors, but looking for a ballpark figure at this stage.


texts: Can I control an extractor fan with a ceiling fan controller

texts:
Help needed please on controlling a extractor fan...

I've design and having built a flush ceiling kitchen extractor fan.

I'm planning to use a Vent Axia ACM150 (50 Watt) inline fan

But trying to avoid having switches and knobs everwhere + Wow factor

So the idea (if any good) was to use a westinghouse Ceiling Fan remote control
THe spec says "Maximum Fan Amps 100" I would think they mean 100 watts :)
Will this idea work, or will I burn something out?

Cheers


texts: Why do (some?) old CR oscilloscopes have blue/green plastic in front of the CRT?

texts:
During restoration of an old oscilloscope, I found a blue/green plastic sheet in front of the CRT. This piece of plastic was heavily damaged and scratched, and clearly discolored due to exposure to light.

I realized then that most CR oscilloscopes I have used have such a blue/green cover, instead of the white background of the actual phosphor coating. What is the purpose of this? Is it just protection? Is there any harm in removing it (since I have no replacement).

The picture below shows the plastic with the bezel. The plastic can be removed and just the bezel placed back, giving a white background instead of the blue/green of the plastic in front of it.


texts: How step-up / step-down transformers work considering that you cannot create or destroy electrons?

texts: Transformers transform a high-current, low-voltage flow into a low-current, high voltage flow. But since current is dependent on the number of electrons and voltage is dependent on the energy each electron has, and you cannot turn energy into an electron or turn an electron into energy, how do the transformers create a higher current flow from a low current flow?


texts: What is SNM(Static Noise Margin) in SRAM?

texts: I have read multiple papers and articles about it but still, I am not able to understand fully. If you can explain me in layman terms I would be much happy. Thanks.


texts: Find the right adapter for 4 D batteries

texts: I bought an item that takes 4 D batteries or uses the adapter (sold separately). But they didn't have the adapter. Since I have kept a bunch of adapters from things that have been thrown away, I have a 6 v adapter rated for 150 mA. It's the amperage I am not sure about. The item has a small motor and I'm concerned that the 150 mA is not enough. Advice, suggestions? I know 4 rechargeables will work, but would prefer the adapter.


texts: ZiLOG Z80 Stack Pointer Location in Memory?

texts:
I am trying to design a board for a Z80 based computer, and am having trouble designing the memory map. I have found that the Program Counter defaults to address #0000, but I cannot find where the Stack Pointer defaults to. Is it also #0000? Am I just supposed to set it to whatever I want on startup?

Thank you.

Z80 Datasheet


texts:
I would like to ask you very lay question. I know that there are 3 phases wires on this electrical pole on this picture. But where is neutral wire? I want to have more clear in this question.

Thank you

EDIT:

I thought until now that neutral wire is needed as output always. And so wires which are going from electric power generator for example from water power plant can be just phases, no need neutral wire?


texts: How to generate PWM signal from PID calculations on FPGA

texts:
I am writing my own instructions for a FPGA processor that I have made and I have a question about how to best produce a PWM signal from a PID control loop. I am confused how I should use the PID output signal to change the PWM duty cycle. I will explain how I plan on doing this and you can let me know if I am on the right track. Let's assume these inputs are 8 bits in size for simplicity.
So I have an analog input that will be connected to the FPGA through an ADC chip for the user to set the speed setpoint. The actual speed is measured via another analog signal and is also connected to the FPGA through another ADC chip. This gives binary values for setpoint and actual speeds somewhere between 0 and 255.
From these binary values, I can calculate the speed setpoint and the actual speed setpoint in my measurement term, which is RPM in this case.
As I will only use PI control, I can calculate the error value, find the integral value and finally calculate the output signal which will be in RPM.
Now I have a PWM generator block which has a triangular like waveform (basically a free running counter). I plan on feeding my calculated PI output signal into this PWM generator block and comparing the values cyclically in my program. If the output signal is less than triangular waveform, PWM signal is high etc. As the comparison value of one of the signals is changed, this will produce a changing PWM signal.
(I know to cap the max PWM signal to whatever 100% when saturation occurs and to only change comparison value when counter is at max value to prevent false PWM signals).
Is there better ways to implement a PWM signal that is controlled via a PI control loop? I am interested to hear your thoughts?
Thanks guys


texts: Highly Distorted Output of Class B Power Amplifier

texts:
This is the circuit I made:

simulate this circuit – Schematic created using CircuitLab

This simple circuit incorporates differential stage - VA (Voltage-amplification) stage - OPS (Output Power Stage). Open loop gain is high, closed loop gain is approx. the value of 10. Miller effect of VA stage is compensated via Cc, which makes local feedback. Q4 is used for biasing of the OPS - when Vce = 2.4V, the current through Q6 and Q8 should be approx. 10 mA and the current through Q5 and Q7 should be approx. C1 is used for AC to bypass Q4 to be fed into base of Q7. 1 mA. Global NFB (Negative Feedback) is taken from the output and brought back to the non-inverting input of differential stage. I was first aiming for this amplifier to be loaded by 8 Ohm speaker but then changed my mind to 100 Ohm load, since there would be too high voltage gain drop (the current through last stage should be higher in my opinion).
The current through Q3 and Q4 is approx. 10 mA, while collector currents through Q1 and Q2 are approx. 1 mA

Unloaded amplifier behaves as expected, but loaded amplifier has great amount of distortion in between its output signal. I cannot figure it out what is so wrong with this amplifier to produce such high amounts of distortion on the output.

This is the signal of unloaded amplifier versus loaded amplifier (5V per division):

What is wrong here stays a mystery for me but maybe you can figure it out.

Here is a little proof for the circuit I just made:


texts: I want to design an adapter from USB to 4.3v and 70mA

texts:
How can I design an adapter between USB and 4.3v and 70mA.  Can I just connect a USB cable to my device that takes 4.3v and 70mA?

Is it likely to damage the device?  I'm looking for a better than 50% chance it will be fine. :)


texts: Ideas / Alternate solutions to trigger a switch

texts:
Thank you for reading my question, I hope to learn a new way to solve my problem. I don't expect anyone to design a cicuit etc as hopefully I can do that myself, just some pointers at possible components to consider.

I have a device that has a built in electronic timer, after a while an LED lights up and I have to press a button to continue using the device.

The button is just a normally open contact switch.

My first thought is to use an arduino and either directly from the LED or via an opto-isolator monitor the LED, when it lights up use the arduino to momentarily close the switch thus resetting the internal timer.

The circuit board itself has regulated 12v and 5v available but since it is mains powered I can power from pretty much anything.

Perhaps there are some other IC's or transistor etc I could use on some bread-board to trigger the switch instead of having an arduino.

I'm not very familiar with how to do this so any pointers at what to look at would be greatly appreciated.

Many thanks.


texts: How do industrial PSUs switch to 4-wire measurement?

texts:
Almost all high end PSUs provide a 4-wire voltage measurement at the load, How do they switch to 4-wire measurement?
Is it in software, reading another ADC channel or they use a relay? Can it be done without user choosing 4-wire measurement in the menu, just by connecting the wires it switch to 4-wire measurement automatically?


texts: How to get NAND gate with external spice-model working for simulation in kicad

texts:
I am trying to get some logic gates working in kicad-simulation following this
Tutorial.
I downloaded the 74HCng.lib as described in the above link, and set this library, and the appropriate model (74HC00) for my component in the spice-model-editor.
The spice-model consists of the following:
.param vcc=5 tripdt=6n
***********************************************************************************
* The 74HCXX gates
*
* 2-input NAND gate
* vcc 2 /4.5/5 /6
* tpd 25n/9n/7n/7n
* tr 19n/7n /  /6n
.SUBCKT 74HC00  in1 in2 out  NVCC NVGND  vcc1={vcc} tripdt1={tripdt}
.param td1={1e-9*(9-3-3)*4.0/(vcc1-0.5)}
.param Rout={60*4.0/(vcc1-0.5)} $ standard output driver
*Cin1 in1 0 3.5p
*Cin2 in2 0 3.5p
abridge2 [in1 in2] [din1 din2] adc_buff
.model adc_buff adc_bridge(in_low = {vcc1/2.0} in_high = {vcc1/2.0})
a6 [din1 din2] dout nand1
.model nand1 d_nand(rise_delay = {td1} fall_delay = {td1}
+ input_load = 0.5e-12)
abridge1 [dout] [out20] dac1
.model dac1 dac_bridge(out_low = 0.0 out_high = {vcc1} out_undef = {vcc1/2.0}
+ input_load = 5.0e-12 t_rise = {tripdt1}
+ t_fall = {tripdt1})
Rout out20 out {Rout}
.ends

Note that I only understand very little about spice..
Anyway, I connect the gate in the following, very basic circuit:
Note that the value "3" at the NAND-gate is just me trying to somehow get the right parameters for running a simulation (I don't really know what value is expected there - my first instinct is that a threshhold-voltage would make sense there - so i plugged in 3 for 3 Volts)

Then I annotate the schematic, open the simulator, plug in 10n time-step and 1u final time for the transient-settings, and try to run the simulation.
Unfortunately, kicad tells me:

Circuit: KiCad schematic
Too few parameters for subcircuit type "74hc00" (instance: xxu1)
Background thread stopped with timeout = 0
Error: there aren't any circuits loaded.

Okay, so it seems I am not providing enough parameters. But I don't know what parameters I am missing to provide, or where I have to provide them...
I hope that someone a bit more versed in spice and kicad might be able to point me into the right direction here.


texts: Finding op amp input and output range from datasheet

texts:
I have basic knowledge about op amps and am trying to build a non-inverting amplifier. I build the circuit below using \$V_{CC} = 12V\$ and a salvaged dual-package op amp (BA15218N) from an old radio, in order to test if they work correctly (desoldering them was not my best work).

But I noticed that \$V_{out}=V_{in}\$ was not always true.
With \$V_{in}\$ dropping below about \$1.4V\$, \$V_{out}\$ quickly increases until it reaches nearly \$V_{CC}\$ potential at \$V_{in} \approx 1.2V\$.

I found out, that operating these amplifiers near their supply voltage is generally not a good idea/possible, but nowhere was this extreme behaviour mentioned in any tutorial or datasheet. I also read the datasheet of this op amp multiple times to find the voltage range of the input and output pins, but to the best of my knowledge they seem to be missing.

Questions

Is any op amp working as intended when \$V_{in} \approx 1.2V\$, \$V_{out} \approx 12V\$ with gain \$G=1\$, or is my unit defective?
How can one determine the stable operating range of a specific op amp from the datasheet?

Thanks for your support.


texts:
Is it possible to program HEX file from STM32 to ATMega 328 ? I can think of some Serial communication, but I don't know whether is it possible to do on tiny STM32F0 series or it needs more powerful STM32.

It will probably be required boot loader support on ATMega chip for Serial programming.

Thanks.


texts: When I was trying to learn computer architecture the thing that helped me the most was making a toy 4-bit processor (through gate level design of every single thing). Now I want to learn about DSP processors and was wondering if there is a book which takes this approach to teaching DSP architectures.


texts: Fast charging ports under the hood - technical details behind the standards?

texts:
There are a few things I noticed and examined for two different fast charging standards:

MediaTek PumpExpress works without any data communications with the charger. Output 2 from my USB multimeter has no data connections, so I connected the cable to output 2 to disable data communications. The multimeter shows some varying power currents, so it is possible that the communication happens via power impulses. But it needs to go up by steps of 5V,7V,9V,12V.
Qualcomm FastCharge jumps to desired voltage (9V) two seconds after inserting, because it uses the USB dats ports as handshake gateway, which does accordingly not work, when being used with port 2 with handicapped data ports onthe USB multimeter. How can I do manual voltage requests? QuickCharge 3.0, unlike 2.0, has no fixed levels, but can freely deliver any voltage range supported by the charger.
For Qualcomm's wireless fast charging, the wireless charging plate itself communicaties to the USB charger through the cable. Probably, there is also some communication to the phone, but I am not quite sure.

What are the technical details behind the charging standards and how they work under the hood? Are they only software-based?

Are there documentated?
Can I safely just supply 7V or 9V using a laboratory power supply, without using any of these standards?If they are only software-based, does that mean that I can use Qualcomm's Quick Charging standard over MediaTek processors and ViceVersa?


texts: Can the same net-list file be used for ASIC design flow as well as FPGA design flow?

texts: I have mostly worked on front-end part and don't know much about back-end stuff. I have gone through the reading about the various abstraction levels of design flows of FPGAs and ASICs. I was wondering that is it possible that netlist generated out of same VHDL/Verilog source files for FPGA be used for ASIC design flow as well to carry forward further design developments. I know netlist gets generated after the synthesis stage which depends on synthesis tools of the particular company say Xilinx, ALTERA, Synopsys etc. (some back-end stuff which I'm not much aware of), but a netlist is nothing but a description of the connectivity of modules Right! providing nothing more than instances, nodes, and perhaps some attributes of the components involved. So, going back to the question "Can the same netlist be used for ASIC flow as well as FPGA design flow?"


texts: Battery charging from different USB modes

texts:
I am designing a USB based charger for a Li ion battery. Now, the charging could be from a simple USB connected to a PC (that sources about 500mAmps) or from a DCD USB charger adapter.

Now, I am using a detector IC to check if it is DCD or any simple USB (Detector IC).
This is followed by the charger IC. Now, this charger IC can supply about 2Amps. To configure this charger IC to give me higher ccurrent(greater than 500mAps) I connect the CHG_AL_N and CHG_DET to the M0 and M1 pins of the IC.

now, these pins can be used in conjunction with the BAT_GOODpin to work up the whole system. To supply to the BAT_GOOD, I was considering using a voltage dividor from the Battery voltage rail directly to the BAT_GOODpin.

Now,iyt will register it as a good battery if BAT_GOOD >=1.1 and a bad battery if < 0.5V.

A voltage divider wont suffice. How can I go ahead. Also, is my working of these 2 ICs correct please ?


texts: Methods of filtering noise caused by DC brush motors

texts:
I am looking for any information that would help me reduce the power rail noise and EMI of DC brush motors. I am building a robot that is powered by 2 x 250 W 24V DC motors.

Thank you in advance


texts: I am currently working with a 12 volt inverter to power EL tape. The tape is wired in various places in my vehicle, I have tested it in my car and I hear a high pitched noise on my radio when I try to use the Aux port on the radio so I know it is causing mild interference but will it cause and damage to the other aspects of the vehicle such as power steering or Dash display? If so how would I reduce or shield the components from the inverter


texts: A question about buffering and filtering a sensor output

texts:
I'm going to use a DC outputting 10k windvane and the manufacturer recommends it to use it with a buffer with some additional resistors.
This is the paper where they recommend how to condition the vane signal.

I want to power the vane with 5V so I decided use a rail-to-rail opamp LMC6482.
They recomemnd an RC low pass filter after 1k so I just added C1 1u to form a low pass filter with 160Hz cut off. I will also add caps for the power rail of the opamp. Here is how I want to implement the circuit:

Is my way of buffering and the opamp type is correct in my dcircuit diagram?
Is the cut off freq. good for this type of application.

Should I use an isolation amplifier as an opamp? I would like to isolate vane and the output. Can I use a HCPL-7800 ?


texts: How to keep a micro-controller ON when where is no electricity for some minutes?

texts:
I want to keep an DCcduino clone of arduino uno ON where there is no electricity for 5-10 minutes with a 9 volt battery. Is there any way to do it without ups because it costs too much?

Edit 1: I can't power all modules from arduino. I have 12V power supply and  12V 7ah lead acid battery backup (instead of 9V low capacitance) to power arduino and external modules. Will this design work safe? I added 2 diodes to make enough voltage drop. How to decrease the "leakage" and how to calculate it?


texts: Multi range current source based on Howland

texts:
I am working on a multi-range current source using APEX MP38 OpAmp to generate and force-in either 100mA or 2A into a mainly resistive load. I came across Howland Current Pump configuration and I hope that its going to work, but the preliminary simulation using LTSpice fails miserably.

The resistive load that I am dealing with changes its resistance greatly due to environment temperature and the temperature induced by the current. Using discrete current sources I have observed that at room temp (25°), the resistance of this load is 20Ω and at 180° its 60Ω.

Now I want to have a current source that can output 100mA or 2A using a switch. Something like:

The simulation with LTSpice is not promising:

So my question is, can you please let me know if MP38 is a good candidate for this task? What kind of opamp I should use as the voltage follower (U2). Any ideas about input/feedback resistor values and their wattage? let me know if there is some information missing!


texts: PIC24F16KA102 SPI problem with MCP795W10 RTCC chip

texts:
I have a problem making the MCP795W10 RTCC chip working with a PIC24F16KA102 MCU. I tried RTCC chip with an Arduino and there it works perfectly. Here's  is my SPI initialization code:

void configSpi() {
IFS0bits.SPI1IF = 0; //clear spif see datasheet
IEC0bits.SPI1IE = 1; //enable spi interru
 IPC2bits.SPI1IP = 0b100;
SPI1CON1bits.DISSCK = 0;
SPI1CON1bits.DISSDO = 0;
SPI1CON1bits.MODE16 = 0;
SPI1CON1bits.SSEN = 0;
SPI1CON1bits.SMP = 0;
SPI1CON1bits.MSTEN = 1;
SPI1CON1bits.CKP = 0;
SPI1CON1bits.CKE = 0;
SPI1CON1bits.SPRE = 0b110;
SPI1CON1bits.PPRE = 0b11;
SPI1STATbits.SISEL=0b101;
SPI1STATbits.SPIROV = 0;
SPI1STATbits.SPIEN = 1;
LATBbits.LATB12 = 1;}

To write to the RTCC chip I use the following function

void  writeSPI1( unsigned char data )
{SPI1BUF = data;    }

When I use this function MCU automatically goes to the SPI interrupt and in the interrupt I do this:

void __attribute__((interrupt, auto_psv)) _SPI1Interrupt(void) {

IFS0bits.SPI1IF = 0;  // clear this bit. This bit will be set when a new reading is recieved
LATBbits.LATB8=~ LATBbits.LATB8;

if (!SPI1STATbits.SPIROV)// no overflow, you may more than one byte,it will take last byte
{
        //My_Slave_Array = My_Slave_Array[spiCount++] + 1;  // loop with data + 1
    while (!SPI1STATbits.SPIRBF);
    spiBufR = SPI1BUF;
    //SPI1BUF = spiBufT;                // send back
}

}

The problem is that in the main code when I configure the config register (for example) and I want to read it back, but I get something wrong.

Main code:

int main(void) {
LATBbits.LATB2 = 0; //wake up xbee
 __C30_UART = 2;
configOscillator();
pinsetup();

//enableINT0IE(); //interrupt reed switch
//enableINT1IE(); //interrupt rtc
//enableINT2IE(); //interrupt btn config
//uart2Set();
configSpi();
//configxbee();

//getpanid();

//LATBbits.LATB2 = 1; //xbee in sleep
//setAlarmsec(10);
while(1){
    unsigned char i;
     LATBbits.LATB12 = 0; //begin spi
     writeSPI1(0x12);
     writeSPI1(0x08);
     writeSPI1(0x00);
     LATBbits.LATB12 = 1;
     __delay_ms(10);
     LATBbits.LATB12 = 0; //begin spi
     writeSPI1(0x13);
     writeSPI1(0x08);
     writeSPI1(0x00);
     i=spiBufR;
     LATBbits.LATB12 = 1;
     __delay_ms(10);}
return 0;

I tried a lot of stuff but none worked for me so far.
Thanks in advance.


texts: Battery terminal voltage as it relates to its proper functioning

texts:
I recall reading somewhere that the terminal voltage (open circuit) of a battery is not really a good measurement of whether or not that battery can perform its intended function. Is the terminal voltage an acceptable way to quickly ascertain a battery's status in general or does that depend on the type of battery?

I believe that the example given was an automobile battery. This type of battery has to be able to provide several hundred amps of cranking power in order to start the engine. Even if one measures around 12V at the terminals of the battery, it may still not be able to start the vehicle. Why is this so?


texts:
I'm using a sound calibrator (1kHz, 114dB SPL, GRAS Type 42AB).
When I got my data from my scope, the signal has 5mV. In spectrum mode, it is -50dB at the peak of 1kHz.

I'm using this preamp: GRAS Type 26CA, the attenuation is -0.25dB;
and this microphone: GRAS Type 40AE, the sensitivity is 62dB/20µP.

How can I convert my dB value -50dB to dB SPL?

The correct dB SPL value should be 114 from the calibrator.

Thanks in advance, sorry for my English by the way.

Edit : here is the datasheet
http://www.gras.dk/index.php/40ae.html       microphone
http://www.gras.dk/index.php/26ca.html       preamp


texts: PNP BJT as a 'switchable' flyback diode?

texts:
I have an automotive ignition coil which I'm using as an ignition source for a project I'm working on.

During normal operation, the primary coil current will be interrupted periodically to induce large counter-EMF spikes on the primary (just as it does in an automobile).  However, I would like to prevent this spike from occurring when powering-off.

The ignition circuit uses an IGBT on the 'low side' of the primary coil, so my original thought was to simply 'ramp off' the IGBT gate voltage using an RC circuit.  Unfortunately the transfer characteristics were just too steep and this did little to prevent the inductive spike (without resorting to prohibitively large values).

My next thought is to simply short the primary during power-off.  While other devices are perhaps better suited for this purpose, design constraints have narrowed my options to a PNP BJT.

I've created a (simplified) schematic to better illustrate my intentions:

Here, S1 (used in place of the aforementioned IGBT) will cycle the current through the coil on and off at anywhere from 2 to 200 Hz during normal operation .  Upon powering off, S2 (or, more likely, the IGBT and an NFET) will interrupt current through the primary coil while simultaneously pulling the base of the BJT low, allowing current to flow between the primary's terminals, 'bleeding off' the counter-EMF.

Is this a viable and robust approach?  I'm concerned about the BJT's ability to withstand the repetitive and profound dV/dt.  I'm looking for thousands of hours of continuous normal operation, so a robust design is a must.

Any advice or insight is, as always, very appreciated.


texts:
I am fairly new to electronics.
I am trying to control a single 1.5V encapsulated vibration motor with the DRV8870 motor driver without much success. The motor is connected to the circuit at CN1 with a 3.7V LiPo battery connected at CN2 as power source.
In researching how H-bridges work, even prior to coding, here are my suspicions:

Looking at the schematic (highlighted in pink,) I noticed that the DRV8870's IN1 pin is connected to GND as opposed to an I/O pin like IN2. Is this an issue?
Looking at the DRV8870 datasheet, I noticed that the operating voltage starts at 6.5V. Maybe the driver also isn't getting enough volts to even turn on.

Hoping someone with more experienced eyes can confirm my suspicions and/or offer guidance on altering the design/components to make this work.


texts: LM3915 questions about data sheet and operation

texts:
I am connecting the LM3915 to a PNP transistor to drive LEDs. I have it working in bar graph mode using one LED per output directly (no transistor).

On page 7 of the datasheet, it looks like pins 1,10-18 should put out a "0" when in the ON state. Connecting the PNP directly does not work.
Measuring the output of the LM3915, I get about 4V, when OFF and 3V when ON. I'm measuring using both DVM and O-scope.
I don't know how to drive the PNP with this output.

Qs:

1) Is my test result correct? If yes, where does it say this on datasheet? I see saturation voltage at 0.4V under output drivers (page 3, TI datasheet)

2) Page 3, electrical characteristics. What does Divider Resistance mean? I know what a voltage divider is, just what does it mean to do with this chip?

3) The threshold chart makes no sense to me. My range is 1.2V, I think (also don't know how to set this), but the threshold V chart (page 4) shows a range up to 10V.

Thanks


texts:
So I was trying to learn about what comparators do and I did. They compare 2 voltages and if the voltage at the V+ pin is bigger than the voltage at the V- pin they output 1 else they output 0.
Life has taught me all things must have a simple answer and it's true to some extent.
I found  some very complicated circuits of comparators on the Internet and I was wondering since for everything there is a simple solution then try to think of one.
Here is my idea:
The comparator is just a simple MOSFET where the output is connected to VCC and drain and the V+ pin is connected to the gate of the MOSFET and the source is connected to the source of the MOSFET.
When the difference between V+ and V- is greater than the threshold voltage of the MOSFET and V+ has bigger voltage than V- it turns on. Also the V+ and V- voltages must be less than the VCC voltage in order for the correct biasing inside the MOSFET.The comparator has some voltage range but it is still useful.
Will it work?


texts:
I'm new to digital circuits so I apologize if this is a stupid question.
I'm building a small circuit where a mcu is connected to a FT230X ic to enable the internal uart to communicate with a computer via a USB port. The FT230X ic has the flow control signals CTS and RTS but the uart on my MCU side does not. Can I leave these pins unconnected? The datasheet(https://eu.mouser.com/datasheet/2/163/DS_FT230X-5395.pdf) does not mention anything on how to handle pins when they are not used. In addition I don't want to use the CBUS. Can I also not connect them to anything?
Any help is appreciated!


texts:
I have very limited space in my project (0.75" x 1.5" x 1.25") to add a remote led light. Looking for a single unit self contained with the following parameters, so I can simply connect the input of the unit directly to the AC switch and output directly to the led wires: Anyone know of a unit that could do this? Or how to build one that would fit the allottedpace?

Convert 120/240 VAc 50/60Hz  to  5Vdc  0.45 amp ( single led requires 3.3V DC)

Thanks


texts:
What facilities does EAGLE CAD have for helping to do layout with matched length groups and differential pairs? Can you apply such a constraint in the auto-router? As a follow-on to this, what (other) free Electrical CAD tools support this type of feature?

Edit
If you don't believe any free CAD packages support this design feature, what are some low-cost options that do support it?


texts: Trouble understanding limiter circuit with diodes

texts:
I have a problem. I have this circuit:

I'm told that this is a limiter circuit. The question goes exactly like this:

"Assuming the diodes are silicon diodes (0.6V voltage drop needed in forward bias) what interval is this limiter circuit allowing \$v_o\$ to be in?

0 to 5,2V
-5,2V to 0,6V
-0,6V to 5,2V"

I actually think I am capable of answering this question, but I don't understand what \$v_o\$ is. There are no schematics other than the one above so I'm very confused on how to arrive at an answer.

I hope someone can clarify this for me or give me a hint on how to arrive at the answer.


texts: STM32f030C8 I2C EEPROM -no data received when read after a write

texts:
I am developing library for I2C eeprom at24c04 with stm32f030c8.
My read and write functions work but when i try to read immediately after a write to eeprom, the eeprom doest return any data. however i could immediately do a write consecutively. The problem occurs only when i read after a write statement. i tried enabling and disabling the I2C enable bit but problem still exist. Can anyone tell me whats the issue.

void main()
{
   Configure_GPIO_I2C2();
   Configure_I2C2_Master(0xA0,1);

    I2C_WriteByte(5,'k');
    charr= I2C_ReadByte(5);//the program get stuck here because no byte is
                            //received from eeprom
    UART_Send_String(1,&charr);

}

void I2C_WriteByte(uint8_t addr,uint8_t bytetowrite)
            {
                I2C2->ISR=0x01;
                I2C2_StartWrite(2);//start

                I2C2->TXDR = addr;//write addr
                while(!(I2C2->ISR & I2C_ISR_TXE));

                //I2C2_StartWrite(1);

                I2C2->TXDR = bytetowrite;
                while(!(I2C2->ISR & I2C_ISR_TXE));

                I2C2->CR2 |= I2C_CR2_STOP;//stop
                while(I2C2->CR2 & I2C_CR2_STOP);

            }

            uint8_t I2C_ReadByte(uint8_t byteToRead)
            {
                I2C2->ISR=0x01;
                I2C2_StartWrite(1);

                I2C2->TXDR = byteToRead;
                while(!(I2C2->ISR & I2C_ISR_TXE));

                I2C2_StartRead(1);
                while(!(I2C2->ISR & I2C_ISR_RXNE));
                UART_Send_String(1,"r strt");
                uint8_t recv_data=I2C2->RXDR;

                I2C2->CR2 |= I2C_CR2_STOP;
                while(I2C2->CR2 & I2C_CR2_STOP);

                return recv_data;

            }

            /////////////////////////////////////////////////////////
            /////////////////////////////////////////////////////////
            void Configure_GPIO_I2C2(void)
            {

                RCC->AHBENR |= RCC_AHBENR_GPIOFEN;
                GPIOF->MODER |= (2<<12) | (2<<14);
                GPIOF->OTYPER |= GPIO_OTYPER_OT_6 | GPIO_OTYPER_OT_7;

                GPIOF->OSPEEDR &=  ~(1<<12);
                GPIOF->OSPEEDR &=  ~(1<<14);

                GPIOF->PUPDR &= ~(1<<12);
                GPIOF->PUPDR &= ~(1<<12);
            }

        void Configure_I2C2_Master(uint8_t slave_addr,uint8_t no_of_bytes)
            {

                RCC->APB1ENR |= RCC_APB1ENR_I2C2EN;

                /* (1) Timing register value is computed with the AN4235 xls file,
                 fast Mode @400kHz with I2CCLK = 48MHz, rise time = 140ns, fall time = 40ns */
                I2C2->CR1 &= ~I2C_CR1_PE;
                I2C2->TIMINGR |= (uint32_t)0x00B01A4B; /* (1) */
                I2C2->CR2 |= (uint8_t)slave_addr;
                I2C2->CR2 |= no_of_bytes<<16;
                I2C2->CR1 |= I2C_CR1_PE;
                //NVIC_SetPriority(I2C2_IRQn, 0); /* (7) */
                //NVIC_EnableIRQ(I2C2_IRQn); /* (8) */
            }

    void I2C2_StartWrite(int bytesToWrite)
            {

                I2C2->CR2 &= ~I2C_CR2_RD_WRN;

                I2C2->CR2 |= bytesToWrite<<16;

                I2C2->CR2 |= I2C_CR2_START;
                while(I2C2->CR2 & I2C_CR2_START);
            }

            void I2C2_StartRead(int bytesToRead)
            {
            I2C2->CR2 |= I2C_CR2_RD_WRN;

                I2C2->CR2 |= bytesToRead<<16;

                I2C2->CR2 |= I2C_CR2_START;
                while(I2C2->CR2 & I2C_CR2_START);
            }


texts: Is there an ADC chip that reads only when triggered that can be synchronized with PWM?

texts:
I am currently using the ADS1015 as an external ADC for my infrared sensor with my Particle Electron microcontroller. I am using this external ADC so that my microcontroller can stay in sleep mode until it is triggered. Currently, my IR transistor takes readings from an IR LED that is constantly on. I would like drive my LED with PWM and have the external ADC only read on HIGH.

Is there an external ADC that can take readings based on a trigger so I can synchronize it with my LEDs PWM?


texts:
I'm currently using a pair of IPT015N10N5 FETs in half bridge configuration, to drive a motor. The FET gates are driven by a UCC27211A-Q1 High Side/Low Side driver. I'm thinking that this particular driver is inadequate to drive these FETs. For those who will ask, yes, I calculated out the bootstrap CAP value, and that is as follows:

The gate driver must switch the full VDS range in accordance with the MOSFET’s tR of 30ns. So the gate driver must achieve a dVDS/dt with a QGD of 211nC in 30ns requiring a peak current of 7.03A (Ipk = QGD/tR). On the nominal side, driving the nominal gate charge of 169nC in 30ns requires a peak current of 5.6A, which exceeds the driver’s max ability of driving the FET, which is 4Apk.

But if I roll with this just to see what comes out of it…

Q_CB= Q_G+(Dt_CYCI_B )=169nC+(0.95*31.25E^(-6)*0.0065A)=362nC

So the total charge is 362nC to be supplied by CB.

The max allowable ripple of ΔVCB is 5% of VDD so the bootstrap cap value should be:

C_B=Q_CB/〖∆V〗_CB =  0.000000362/(0.05*15)=603nF

The closest value for this cap is 600nF, or 680nF. The current value is 330nF, so doubling that cap gives 660nF. This value was chosen.

Solving for RB (bootstrap resistor):

R_B=  ((1-D_MAX )* t_CYC)/(5*C_B )=((1-.95)*0.00003125)/(5*0.00000066)=473mΩ

RB Can be a shunt as this value is negligible.

This has bumped the high side gate voltage 10V higher than the bus voltage. HOWEVER - I occasionally see it dip lower, around the max bus voltage. It's spastic and unpredictable... My motor hiccups all the time because of it.

With that being said, I need suggestions for a gate driver that can handle this FET... Any suggestions?

Link to Datasheets:

FET DATASHEET

CURRENT FET DRIVER

DESIGN REFERENCE for anyone who would like it.


texts: MOSFET logic gates: Putting the pieces together

texts:
So I got this problem.

And I know MOSFETs...Sort of.

So the area in red is a NAND gate and the area in blue is an Inverter...I think?
So I know what those two pieces are, now how do those connect? Let alone what the other MOSFETs function as. So as the title says I can't "Put the pieces together".

And I know you can't give answers to homework problems. So if you can please give me some breadcrumbs to how these pieces come together, it would be greatly appreciated.

EDIT:

I tried the suggestion in the comments and I got  0001.
I saw that C is always 1 so I can treat it as a straight wire (correct me if I'm wrong). I thought if D or E is one then the MOSFET without the label would treated as a wire and A,B or C would short circuit, I thought the only way is if D and E are both 0.
What am I doing wrong?

EDIT 2:

I am now getting 1001.


texts: SDRAM initialization issue (Freescale iMX31)

texts:
I'm trying to modify an existing init sequence (low level init of SDRAM) to accommodate a change in hardware configuration: an existing SDRAM on my iMX31 was replaced with a different size, otherwise same type/manufacturer/layout/pins/timings .. according to specs.

Brief setup scenario and error behavior:
I managed to get the board booting (the sequence is as such: execute bootloader from NAND, copy 'step2 bootloader' to RAM, execute 'step2 bootloader' from RAM). But I seem to have some settings wrong, since execution from RAM (after jump to to step2) fails consistently.

I did a large amount of in-depth test to identify wrong parameters, my results are these:
- single byte/word reads/writes work when executed from NAND or JTAG
- block-wise/burst writes seem to work when executed from NAND (JTAG also)
The interesting thing:
- after block-wise writes, I need multiple reads on any SDRAM address to read a correct byte/word(!)
- if I modify my column settings to ONLY use the higher (+1) amount of columns for "load mode" but not for precharge/refresh, then it works, but inconsistently (to my theory it works reliably for the lower address range, where the missing column doesn't matter).

To get an idea of my config: the settings from RAM are almost identical to the ones in this question. This is not surprising, since they are supplied by Freescale, beside RAM timings:
On Freescale iMX31, how can I translate SDRAM address to CPU address?
My original setting is identical (also 64MB SDRAM as in link), my new RAM is 128MB. All reference boards are supplied with either 64MB or 128MB, thus both values are supported by iMX31 and derivates.

The change I have to make (attention:assumption!) is only in the COLUMN configuration (it's one more column) of the RAM. The RAM is double in size, but otherwise the spec claims exact same timings etc..
Since it has only one more column (see link above, my precharge, refresh and load mode registers change from 0x92100000 to 0x92200000 for the new RAM - for example) nothing else is changed.

Question 1:
Does my assumption make sense, that if all timings and physical chip characteristics (affecting drive strength, timing and power consumptions) are similar, that a change of the column count might be "local" (not affecting other settings)? Interesting enough, I compared my settings with many other ones available online (U-Boot, Red-Boot with 128MB) and beside board specific settings, such as drive strength, I don't see differences.

Question 2:
My error behavior above (writes work, reads only partial) is probably unique to a certain invalid setting of the RAM. Is anyone able to give me an advise which setting to have a closer look at? Also it might be possible to set 'safe' parameters so that even with diminished performance, the system would allow me to narrow down the culprit.


texts: Can a via be placed in between the pads of a resistor?

texts: Can I place a via in between the pads of a resistor as shown in the image?


texts:
I'm using 0.2 W, 500 Ω potentiometer with 300mA safely (there is no heat or abnormal behavior).
But according to calculation, max current of this potentiometer is about 20mA. Is my calculation wrong?

$$P = VI = I^2 R$$
$$0.2W = I^2 500 \Omega$$
$$I = \sqrt{\frac{0.2W}{500\Omega}} = 0.02A$$

Edit:

I'm confused about power rating of potentiometer. It's max value is 500 Ω and power rating is 0.2 W, so max current is 20 mA. But when I use only part of the potentiometer, 20 mA limit can be applied? I'm using 3 Ω part with 300 mA.

Edit:

Entire circuit is like this:

simulate this circuit – Schematic created using CircuitLab

There are 40 set of R - LED - LED totally.
The current of each set is about 7 mA. (I measured voltage across the 100 Ω resistors and it's 0.7 V) And I measured current between P1 and 40 (R - LED - LED) s and it was about 280 mA. I used pot for brightness control.

Edit:

I used only 2 part of the pot. Is this not recommended? Why? (I'm just hobbyist and forgive me if this is too basic question)

This is test video: https://www.youtube.com/watch?v=Su1ZFqXYfIE
The voltage seen on the multimeter is the voltage across a 100 Ω resistor, as shown on the circuit diagram.


texts: Network Analysis for finding power delivered

texts: We need to find the power delivered by the 5V source in the above network. I usually apply superposition theorem when I need to find the power delivered by a source when there are many power sources in the same circuit. But here I am not able to understand how to approach.


texts: How do I gate a z0103ma triac using logic level output?

texts:
I'm trying to switch an el wire segment on and off by using a z0103ma triac. I have the AC current connected across pins 1 and 3, and when the gate is closed, the ac current is interrupted, but once I connect the gate to a digital output pin on my arduino, the gate is open and current flows, regardless of what voltage (0 or 5 volts) I put onto the gate.

Am I doing something wrong? What signal do I need to send to the gate to open and close the triac?


texts:
So, As I am studying I keeping finding confusions in my concept of Diodes. Sorry if the question is too noobish. So in plotting the Vout with respect to Iin, my manual says that using the constant voltage model, Vout  will be undefined in Iin<0. I don't understand why.
I believe calculating using the first branch(with diode D1 and resistor) gives us something for Vout, but D2 dictates that Vout should be equal to VDon(.8 v).Is it a paradox? I don't understand.

simulate this circuit – Schematic created using CircuitLab


texts: Reading Hennessy's book "Computer Organization and Design" it is mentioned "Register.Rd" and "Register.Rs" but what does it mean? The .Rd, .Rt and .Rs parts I can't understand, on page 365:


texts:
I'm working on the UART communication of PIC18F4520. I have tried simulating the code on ISIS proteus and then also checked the real time result. One thing I am quite confused about is that the characters I get from the two i.e. simulation and the experiment are not the same. I have no confirmation of this but still wondering if it is possible that for every other machine, ASCII characters are interpreted differently. Is this possible..?

void main(void)
{
    unsigned char r;
    TRISB=0;
    // configure USART
    OpenUSART( USART_TX_INT_OFF  &
         USART_RX_INT_OFF  &
         USART_ASYNCH_MODE &
         USART_EIGHT_BIT   &
         USART_CONT_RX     &
         USART_BRGH_HIGH,
         5 );
    r='y';
    while(1)
    {
        putcUSART(r);
        while (BusyUSART());
        r=ReadUSART();
        PORTB=r;
    }
    CloseUSART();
}

The output has been shown in this snapshot:


texts: Can an FPGA PLL lose lock if it is supplied with a stable input clock signal?

texts:
In an FPGA (Intel) design I have a PLL that is provided with a stable clock from a clock module on the PCB.  The design is as shown on the figure below.

The PLL has a lock indication.  After the FPGA is loaded, I have seen that the PLL gains lock in few milliseconds, and then has a stable clock output with high lock indication.

I have two questions:

Can the PLL lose the lock afterwards, so the design must be able to handle such loss-of-lock?
Are there any authoritative sources or documentation (like applications notes) that describe whether it is required to handle, or not handle, loss-of-lock in a simple design like the above?


texts:
Is there any way to make a switch that uses a 5V input to open a -5V or 10V connection? (so i can switch between making a line -5 and 10V).

Thanks in advance!


texts: Triangulation with Single Tone FM TX and Three RX using Phase Detection

texts:
I'm looking for some IC and frequency suggestions to accomplish the following task.

Modulate a tone onto a carrier and continuously broadcast this signal toward an array of three receiving antennas(ABC).  To then demodulate the tone from the carrier and generate a dc voltage through a phase comparison between each RX(AB, AC, BC).

I plan to pass these voltages through ADC's into my controller so that I can crunch the data and determine the relative location of the TX to the three RX's.

My fellow students and I are pretty solid on the programming side of things and we've each done well in our undergrad Communication Systems and RF Circuits classes but we're getting a bit lost in the actual realization of the circuit given the plethora of IC choices on the market.

Thank you for any help or suggestions.

P.S.  The RX's (ABC) will be arranged in a triangle each approximately one wavelength(of whichever freq. is decided upon) apart.  TX to RX range from .5 to 40meters.

P.S.S.  We're also open to reading suggestions either web-based or a book that get into actual component and circuit topology material.  We're full of theory but short on the real.


texts: Li-Ion Rechargeable 2032 Button 3.6V Cell and Arduino

texts:
I have designed a battery powered Arduino device. The on-off switch connects the battery to the circuit. When the user plug USB cable while the switch is on, the battery and the circuit directly get 5V. I decided to use a low loss diode to protect the battery from USB voltage, but it empties the battery very fast.
I know I can use pfet also. Is there any other idea? Connecting 5v directly to Li-Ion Rechargeable battery is dangerous?


texts: How to find collector resistor value in bjt differential amplifier

texts:
What value R2 may have in that schema? Anyway it will be loaded by pn-junction of Q5 and will have fixed voltage drop near 0.65V.

What value R2 must have if the current source is used instead R1? The current in that situation will be fixed and R2 will not influence to constant current through it.


texts: Why can I ignore the "imaginary" value from the gain of my system?

texts:
I’m in the final year of my education, and for the exam training I had to find the K (or max gain) value of the given system when the desired damping ration equals 0,7.

What i have done to addres the problem

I designed for my self a 6 step plan to calculate these kind of systems in general.

Calculate the transfer function
Draw the poles and zero's into a plot containing the unity circle
Determin the 'z' point of the gain for a given overshoot. (or when the system wil get unstable)
Take the denomerator of the transfer function and equal it to '0'
enter the found 'z' into this formula
calculate the gain (K)

To answer the question I first determined the transfer function

\$ \LARGE \frac{C(z)}{R(z)}=\frac{K(z+1)}{(z-1)(z-0.5)+K(z+1)}  \$

after which I draw the polar plot with unity circle  (in the picture "eenheidscirkel")

The question stated I had to find the damping ratio of 0,7 which was used to draw the following graph.

From which the "z" value was 0,719+0,215j. This Z value i enterd into the denomerator of my transferfunction equal to zero.
$$
(z-1)(z-0.5)+k(z+1)=0 \\
(0.719+0.215j-1) (0.719+0.215j-0.5)+k(0.719+0.215j+1)=0
$$

This function I rewrote to the final statement for K with the next steps

(-0.281+0.215j)(0.219+0.215j)+k(1.719+0.215j)=0

-0.062-0.060j+0.047j-0.046+k(1.719+0.215j)=0

-0.108-0.013j+k(1.719+0.215j)=0

k=(0.108+0.013j)/(1.719+0.215j)

And here my problem starts

My teacher states that have to devide the first part (ignoring the IM part) of the function to get my gain (K).

0.108/1.719 = 0.063

I could also use the second part for this.

0.013/0.215 = 0.061

Or the sum ignoring the J again

(0.108+0.013)/(1.719+0.215) = 0.063

resulting in K=0.063

This result is correct but I don't understand why.

Why can I ignore the imaginairy part of the final function.

With a complex devision I would expect atleast a K value of a+bj

I tryed this for the final step:

k=(0.108 +0.013j)/(1.719+0.215j)*(1.719-0.215j)/(1.719-0.215j)

k=(0.189-0.046j)/3

RE : k= 0.189/3 = 0.063

IM : k=0.046j/3 = 0.015j

what makes me think the result shoud be

k= 0.063-0.015j

I know this smells like a home work question and there systems that can calculate everything with the snap of a finger, im trying to understand why im allowed (if im allowed) to ignore the imaginary value of the gain of this system.


texts:
I'm using the MPLAB IDE X v1.41 with C18 compiler to pragram a PIC18F45K20. My objective is to retrieve image data from a completely built image sensor board and display on the computer using the MAX232 and serial to USB cable. The output data of the image sensor is in a digital form. However, there was an error in my program code which stopped me from further testing. Please help me identify the problem.

The error occurs in the putsUSART() line in void main(void)

The program code below was written by myself. Notice that it is only the main body of the program:

//----------------------------Global variable----------------------------
unsigned int input0, input1, input2, input3, input4, input5, input6, input7;

//----------------------------USART initialize----------------------------
void init_USART(void)
{
    OpenUSART ( USART_TX_INT_OFF    &
                USART_RX_INT_OFF    &
                USART_ASYNCH_MODE   &
                USART_EIGHT_BIT     &
                USART_CONT_RX       &
                USART_BRGH_HIGH,
                25                  );
}

//----------------------------Main program----------------------------
void main(void)
{
    TRISB = 1;                  //input PORT B
    init_USART();
    while(1)
    {
        input0 = PORTB;
        putsUSART("%d",input0);
    }
}


texts: can't connect to webserver through arduino

texts:
I've the following problem and I just can't figure out how to fix it. I'm currently working on a prototype for my thesis. For this prototype I need my Arduino to connect to the internet. I've a Arduino Uno and a Arduino Ethernet Shield.

The problem is that I can't connect to the webserver of my company where I'm currently following a internship.

The webserver has a different IP then the LAN that I'm working on. When I'm typing in my command window ipconfig /all I get the following information:

MAC address: 64-31-50-25-FE-C7

IPv4-address: 10.100.5.144

subnet mask: 255.255.248.0

gateway: 10.100.0.1

The IP address where the webserver is installed is: 10.100.0.40.

When I'm requesting a page with GET and I want to get the file index.html who is stored in my www folder of the webserver (see below), I get the 404 error.

\efocus02\www\evs\navid\navid.mirzaie.milani\webroot

This is the URL that I request: http://navid.mirzaie.milani.navid.efocus02.efocus.local/test.html

Is there someone who can help me how I can figure this issue, I would really, really appreciate it.


texts:
I have a home-made battery pack, and am wondering if it is safe to charge.

Background - I won a cheap chinese bike light and 4x18650 battery pack.
The battery pack was particularly nasty - I suspect it was 90% air.
I have since lost the battery pack when it fell off my bike.

It came with a US wall charger labelled as

Li-ion Charger
Input: 100-240V~ 50/60Hz 0.35A
Output: 8.4V =-=-= 1000 mAh

(that symbol is supposed to be a horizontal bar with three dashes below it.)

I have used two CR123A 3.6V batteries in series, and this runs the light part nicely.  They are "protected" ones, confirmed by the slightly longer length and the small vent holes around the positive terminal.  These were clipped into a battery holder, wires were soldered to tabs, and the whole thing was covered in heatshrink for water protection.

Questions The battery pack is literally batteries and wire.  Should there be anything else inside the battery pack, or does the "protected" part of the battery cover that?

Is this charger suitable to charge this battery pack?

I guess it will take 90-120 minutes to charge - is that reasonable based on 1000 mAh and 880 mAh capacity of each battery?

Edit - since asking, I connected the new pack to the charger and left it for 3 hours.  The charger's LED started as red, and then went green after about 150 mins, suggesting it sensed the chargedness of the pack and dropped to a lower power state.


texts: Calculation of the capacitor value across the base and emitter to avoid unexpected turn ON of transistor

texts:
There is a design recommendation to add a capacitor across the base and emitter of Q2 to avoid the unwanted/unexpected turn ON of Q2.
Calculation of new capacitor across Vbe:

My questions :

Can someone show me the current path and the voltage across the components when there is no capacitor across Vbe which will provide the unexpected turn ON of Q2 during high dV/dt at VBAT?

Please also show the current path and voltage across the components when there is capacitor added between base and emitter which will avoid the unexpected turn ON of Q2 during High dV/dt at VBAT?
Question 2 :
I am not able to understand the formula and how there are arriving at the value of the new capacitor which is taken to be 1nF. Can someone provide clear explanation of the formula?
If you cannot provide any answer related to the above circuit image and formula present in the question, I request you to provide your own simple circuit image explaining the current path and voltages in it with and without the base emitter capacitance and your formula for arriving at the base emitter capacitor value.
EDIT : In the above circuit image, the resistor R57 is 47k and 100mW (power rated) package. and R403 is 10k and 100mW (power package). There is no capacitor added across the base-emitter of the transistor. But there is a design recommendation for this circuit which recommends to add a capacitor across the base emitter of the transistor to avoid unexpected turn ON of the transistor during high dV/dt.
So, the formula attached above in the circuit asks to add a capacitor between the base emitter of the PNP transistor of a value of 1nF to avoid the unexpected turn ON of the transistor.
My question is, I just want to understand how the transistor turns ON during High dV/dt when there's NO capacitor across B-E junction of Q2 and when there's a capacitor of 1nF (which is recommended to add - coming based on the above formula) added to the base-emitter junction of Q2. Would like to know how the current flows and voltages across the components during both instances (with 1nF added and without 1nF)
Also, not sure what is the formula which is used above to arrive at 1nF. So, want to ask whether anyone has seen this type of formula to calculate the capacitor across B-E of the transistor. If you have not used this type of formulas, then how to arrive at the capacitor value.


texts: How to initiate Preset and Clear in a JK flip flop?

texts:
I want to use a JK flip flop in order to create a toggle output. It is clear that both J and K should be set to 1, as well as the Preset and Clear inputs.

In some schematics, a Monostable 555 followed by a NOT gate, appears to connect with the Clear.

I think that the Mono creates a pulse and after that it stops, so connected with a NOT gate, the output of the NOT gate should create a power "gap" and after that it should continue powering the Clear input.

It looks like a delay in inserted, in order to power up first the Preset input and second the Clear input.

If that is the case, it's OK, even though I can't understand the reason for that. Yet, I have created a simple toggle circuit without a time delay, thus both Preset and Clear are power simultaneously, and it seems to work fine.

Actually, I have created two circuit versions, with one and two flip flops, meaning one and two outputs, and both work fine.

Do I miss something there? The same question goes with the T flip flop as well.

Thank you.


texts: The number of cycles needed to execute the following loop in pipeline processor?

texts:
This question was asked in an objective paper; GATE CSE

Consider a 4 stage pipeline processor. The number of cycles needed by the
four instructions I1, I2, I3, I4 in stages S1, S2, S3, S4 is shown below:

What is the number of cycles needed to execute the following loop?

For (i=1 to 2){I1; I2; I3; I4;}

A) 16

B) 23

C) 28

D) 30

============================================================

The answer given is- 23

enter image description here

My doubt is- why in 6th cycle we are introducing I4 {S1} while I3 {S2} hasn't gone to next stage?

In this question if we take the above approach, we will get different answer, according to me, I4 {S1} will be introduced in 7th clock.

because- In pipeline execution, each stage produces output to a buffer and next stage takes it from there. So, unless the previous instruction(here I3) goes to the next stage, the current instruction(I4) cannot execute a given stage

P.S.- I have also posted this at cs.stackexchange, but no one have answered it. Please help!


texts: PCB design - how long should pads be made to hand solder half-vias

texts:
I have a module with tiny Castellations (Half-Vias) at 1.5mm pitch. They are 0.8mm wide and 0.6mm deep. I am designing a breakout board for this - intended for hand soldering (not paste + pick n place).

I've seen breakouts for other castellated devices and soldered some myself.

What I am not really sure about is how long to make those pads - to make it (relatively) easy to solder.


texts: PNP transistor with audio signal output on collector is used to drive opto-isolator. How does it work?

texts:
I have tried assembling the circuit but it doesn't work. Now I need to understand how it works in order to debug it. The part that confuses me is:

Channel 1 is a standard audio output from a smartphone or PC. I have read that LED D1 should flicker depending on a music. But is it even possible? I don't think so. It is always on because there is a constant electrical connection between LEDs' pins and power supply.

Now more difficult part of this circuit. I guess that Q1 is used to amplify the voltage of audio input in order to power optoisolators' infrared diode. Am I right? I have search through common transistor configurations and never seen even one configuration like this. I would like to know how does it work.


texts: How can I convert a PNP to NPN transistor?

texts:
I have a circuit which requires a PNP transistor.
I only have an NPN transistor.

Is there a way to convert one to the other given that they have the same characteristics (apart from the npn/pnp part?)

And for others after me... can the reverse also be done? e.g. how does one convert a PNP transistor to its NPN equivalent?


texts:
Labeled D53 on PCB board for diode, SOT-89 package with marking "43."
It's part of a pulse-generator section on a DC power supply, it's right by an opto-coupler.  This picture looks exactly like it, but I can't find any standard distributors in the U.S. I'm scared to throw something from Amazon.com on the board.
This Amazon link has a picture that looks exactly like the chip.


texts:
I have always managed to synthesis a 256 x 32 bits dual-port RAM (not true dual port RAM) in Xilinx ISE with just 1 x 18K BRAM.

The example code from here was used:

-- A parameterized, inferable, true dual-port, dual-clock block RAM in VHDL.

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity bram_tdp is
generic (
    DATA    : integer := 72;
    ADDR    : integer := 10
);
port (
    -- Port A
    a_clk   : in  std_logic;
    a_wr    : in  std_logic;
    a_addr  : in  std_logic_vector(ADDR-1 downto 0);
    a_din   : in  std_logic_vector(DATA-1 downto 0);
    a_dout  : out std_logic_vector(DATA-1 downto 0);

    -- Port B
    b_clk   : in  std_logic;
    b_wr    : in  std_logic;
    b_addr  : in  std_logic_vector(ADDR-1 downto 0);
    b_din   : in  std_logic_vector(DATA-1 downto 0);
    b_dout  : out std_logic_vector(DATA-1 downto 0)
);
end bram_tdp;

architecture rtl of bram_tdp is
    -- Shared memory
    type mem_type is array ( (2**ADDR)-1 downto 0 ) of std_logic_vector(DATA-1 downto 0);
    shared variable mem : mem_type;
begin

-- Port A
process(a_clk)
begin
    if(a_clk'event and a_clk='1') then
        if(a_wr='1') then
            mem(conv_integer(a_addr)) := a_din;
        end if;
        a_dout <= mem(conv_integer(a_addr));
    end if;
end process;

-- Port B
process(b_clk)
begin
    if(b_clk'event and b_clk='1') then
        if(b_wr='1') then
            mem(conv_integer(b_addr)) := b_din;
        end if;
        b_dout <= mem(conv_integer(b_addr));
    end if;
end process;

end rtl;

I have tried to do the same for Altera, however compiling gives me figures requiring 2 x M20K RAM.

Shouldn't it require only 1 x M20K ? How can I do that without resorting to other resources such as other MLAB?


texts:
So I'm currently working on a box which should dim my lights based on a touch surface on top of the box. To indicate the light brightness I want to place a ws2812b ledstrip under a layer of white epoxy on the top of the box. Because of aesthetic reasons I planning to have the touch sensitive part (maybe TTP223 sensors in a row?, I would like to avoid a classic touch screen because of the pain to make it work with the Arduino IDE) on top of the LEDs but without blocking the light of the LEDs.
To process the Input and dim my Philips Hue Lights I'm using a NodeMCU microcontroller.

Any ideas or recommendations regarding the touch surface? Will the TTP223 sensors detect the touch when it's covered with the led and an epoxy layer? Are there any other sensors that should do the trick?

Thanks in advance!


texts: Could an uninterruptible power supply for energy intensive appliances balance the power draw and help my breaker stop tripping?

texts:
Non-engineer here. Well, not the electrical kind.
About once a week the breaker to my office (read: gamer cave) trips.  I just noticed that our 70 inch TV, 2 x Echo Studios, etc. in the living room on the other side of the wall also go out. There's our problem: Two rooms, each with major entertainment systems are both tied to the same breaker.
I noticed that when I play computationally expensive games it seems to more often trigger the breaker as my GPU and CPU draw more power, so I wonder: Would some small uninterruptable power supplies between my power strips and the walls for the major power draw appliances potentially fix the issue?
The same way batteries in Satisfactory (simulation game) help my electrical grid not spike above maximum production, by being able to offer energy to spikes while drawing a more consistent amount from the wall.
Is there a certain type of power supply that would accomplish this, while others wouldn't?


texts: Should I be conservative about setting the output voltage of the CV phase of Li-Ion charging

texts:
Background

My application features a Li-Ion battery (NCR18650B) which I'm charging with the standard CC/CV method. Various constraints force me to use a generic buck converter (with current limiter) for the charging, instead of a more specialized IC. I have temperature monitoring and MCU control over the charging process.

I'm wondering what's the recommended approach to calculate the feedback resistors that set the buck converter's output voltage. This voltage should canonicaly be 4.20V ±0.05V, but I'm using 1% resistors, and another 1% variance comes from the feedback reference; in total, about 3% of uncertainity. For example, I can select resistors that give me 4.20V typically, but span a range 4.08..4.32 with all tolerances considered ("the simplistic approach"). I can instead design conservatively and select a divider that sets the voltage to 4.10V typically, with [3.98..4.22] variance, which is well within spec ("the conservative approach").

In the current PCB revision I've designed with the conservative approach and in the lab my devices consistently charge to about 4.05V OCV (I believe because the Vref is actually not uniformly distributed in the specified range, but skewed towards lower values). The bigger problem is in the actual usage scenarios, where the energy source is not a reliable wall-wart, but an intermittent source whose availability pattern is unpredictable. As it is "free to use", I want to optimize time-to-charge. Charging with voltage (typically) limited to 4.05 means the charging gets into the CV mode too soon, and the battery could rarely ever exceed 70% SoC.

Question

If the cells feature protection circuitry, which is the recommended, industry-standard way to select the CV charging voltage? The simplistic one (target 4.20 volts, don't care about tolerances) or the conservative (consider worst-possible tolerances, so your charging voltage could never exceed 4.20V)?


texts:
I am currently working on one embedded project in which I have one counter which will be active all the time.
If the power goes down then also I have to store last counter status and load it back in next startup. So that I was planning to use EEPROM in which I will continuously write my counter value.
But I have read somewhere that EEPROM has read/write endurance at about 100,000 and I will be updating that counter probably 120,000 per 24 hours.
So I am finding alternatives to accomplish this task.
please give me your suggestion for doing the same.


texts: Using a triac to switch audio signal for laser maze

texts:
So I'm building a laser maze for a science project for high schools, where we have lots of mirrors and the laser bounces around the room, when it hits the detector I want music from a source to switch on and off when the beam is broken. Since the audio signal will be analog, google told me I would need a triac to switch an AC signal.

Since the signal will have an amplitude of < 2V from the iPod, I want it to work for all voltages less than that, the signal doesn't have to be perfect, but I want it to be reasonable for all frequencies < 20 kHz for audio (see my schematic below, but even if it works for frequencies < 10 kHz I can still play some dubstep that will sound good for the kiddies).

simulate this circuit – Schematic created using CircuitLab

Firstly I have literally no experience with a triac, but reading online it says that both halves of the waveform will not fire simultaneously, is 'not simultaneously' still fine for audio purposes? If so, I bought this photodiode off ebay see the data sheet here, is the short circuit current out of the photodiode the relevent figure I should look at? Data sheet says 0.16 uA output current but the triacs gates I found on ebay were mostly 3-5mA to turn them on. Just checking that means I need to put an amp between the photodiode and the R2 resistor, then limit the current by selecting the correct value of R2 to be in the range of the 3mA triac.

It seems that would require a power supply when I would prefer to do it without a power adapter. But if I need that, would something like this photodiode and amp suffice? Output current is 15mA, then I could just put a resistor to get the value to 5mA or just buy a triac with a gate current of 15mA and it should be all fine and dandy right?

Anyway, just wanted to check what I was doing was okay before I buy all the components, since I don't have much experience with this sort of stuff.


texts: Is it possible to have multiple ISR routines for a single timer in micro controller?

texts:
I have doubt that micro controller will support multiple interrupt routines for a single timer.

For example, single timer which interrupts at 5ms, 10ms, 1s etc. In my design I am using 3 timers: one timer interrupts every 1ms for some status check, other two at 50ms and 1s.

I am curious to know about why can't I have controller which has more than one ISR and also, instead of interrupts at timer overflow, why can't it interrupt at its period match.


texts: Analog temperature sensor with 100mV per 1 degree Fahrenheit

texts:
My devices only measure analog precision to the nearest 100mV. Most temperature sensors I can find only do 10mV per degree precision. Currently I'm using the LM34.

Is there such a thing as an analog temperature sensor with 100mV per degree precision, or is there something I can stick on the end of the sensor to amplify its voltage x10?


texts: How can I remove 1.4MHz and 150kHz switching noise?

texts:
(Please excuse my English)

I have two types of DC-DC step-down(buck) converter modules, and the switching frequencies of the converter modules are 1.4MHz and 150kHz each.
The two converter modules supply 3.3V power to two sensitive sensor boards. I should remove the switching noises of the converter modules.

However I cannot modify the circuits of the converter modules. The converter module circuits are fixed on PCB. So I want to append some circuits to V-out(3.3V) of the converter modules.

What are the simplest circuits for my purpose?


texts: Problem in process corner simulation using CADENCE ADXL

texts:
My question is related to CADENCE software simulation.
I am doing a process corner simulation of a simple inverter using ADXL in CADENCE. But the problems are:
1_ When I run only the nominal corner it simulates successfully as shown in the figure.
2-But when I add worse power /worse speed corner scenario for CMOS then individually it runs, however when I combine different corners (e.g. nominal, wort power, and worst speed scenarios) then it not simulating and showing a pending option [attached]. Moreover in remarks, it shows the following message:
net /Vin selected but not highlighted
net /Vout selected but not highlighted
To make it simple, individual corner simulation runs successfully but it does not simulate in the case of combined process corners. And I would like to simulate all the corners simultaneously so that I can compare my simulation result under different scenarios.
Can anyone have faced a similar problem or suggest to me possible ways to solve it?
Thanks.


texts: Is it possible to use an optointerrupter as a optoisolator?

texts:
I currently can't buy an optoisolator, so I was wondering if I could wrap a optointerrupter in tape to shield it from light and use that as an optoisolator.
Is this possible?


texts:
I'm curious, Has anyone used this http://www.ti.com/lit/ds/symlink/tca6408a.pdf part? I just tracked back a sign error to the read values remaining active low after I set the inversion register on this input manager described in table 7. For now I can just exclude it from my design and fix it in software, but I'm curious what I'm doing wrong in case it causes problems in the future.

Here's the code I use to configure it.

//Constants for the input manager silicon
#define INPUTMANAGERADDR   0x21
//Register addresses
#define INPUTMANAGERINPUTPORTREG 0x00
#define INPUTMANAGEROUTPUTPORTREG 0x01
#define INPUTMANAGERPOLARITYINVREG 0x02
#define INPUTMANAGERCONFIGURATIONREG 0x03

//configuration Values
#define INPUTMANAGERPOLARITYINVVAL 0x00 //FIXME: I don't seem to work and I'm not sure why.
#define INPUTMANAGERCONFIGURATIONVAL 0x7F
#define INPUTMANAGEROUTPUTPORTLEDENMASK 0x80

I2C_setMode(EUSCI_B0_BASE, EUSCI_B_I2C_TRANSMIT_MODE);
MAP_I2C_setSlaveAddress(EUSCI_B0_BASE,INPUTMANAGERADDR);

if(I2C_masterSendMultiByteStartWithTimeout(EUSCI_B0_BASE,INPUTMANAGEROUTPUTPORTREG,1000)
 &&I2C_masterSendMultiByteNextWithTimeout(EUSCI_B0_BASE,INPUTMANAGEROUTPUTPORTLEDENMASK,1000)
 &&I2C_masterSendMultiByteNextWithTimeout(EUSCI_B0_BASE,INPUTMANAGERPOLARITYINVVAL,1000)
 &&I2C_masterSendMultiByteFinishWithTimeout(EUSCI_B0_BASE,INPUTMANAGERCONFIGURATIONVAL,1000))


texts: I was making a breadboard demo for a Microcontroller class. Basically my project is to make a score keeping device. I want to drive 4 seven segment displays using an atmega8. I read about charlie plexing and understand that it will enable me to drive all the 4 displays using a single port. I understood the theory but can't really figure out how to make the charlie plexing circuit on a bread board. Can anyone please help?


texts: I have a problem understanding the installation of surge arresters in C&I(Control and Instrumentation) protection. The attached picture says that SPDs(Surge Protection Devices) are installed in  the line path. what does it mean? what is the difference with SPD Installation for Power lines?


texts:
Question: The total power in a parallel circuit with four resistors of equal value is 570W. If one of the resistors becomes open circuited, what is the power dissipated by each of the remaining resistors?

My Attempt:

\$P_1 + P_2 + P_3 + P_4 = 570\$

\$P_1 + P_2 + P_3 + \frac{v^2}{R} = 570\$

Open circuit causes \$R-> \infty \$

\$P_1 + P_2 + P_3 + \frac{v^2}{\infty} = 570\$

\$P_1 + P_2 + P_3 + 0 = 570\$

\$3P = 570\$

\$P = 190\$

This is not the correct answer, so what am I doing wrong?


texts: Can we test output voltage and current of a 12V 30A DC switching power supply without any electric consumer (DC motor, LED strip, etc.)?


texts:
I have an induction motor which is fed by a three phase inverter. I am trying to use vector control with d-axis aligned with the rotor flux vector.
I have a load which increases its torque as the speed increases. I use a fixed value for direct component of current (Id) reference.

I start to test at low speed and everything goes fine, voltage amplitude increases with frequency and current is almost constant. But when I try greater speeds, at some point, the voltage amplitude reduces notoriously (instead of keep increasing), and quadrature component of current (Iq) also increases notoriously.

I also observed that Iq has a very low value before the problem occurs. Almost all current is contributed by Id.
Is this low value of Iq a normal thing? or should it be increasing with speed?
Is there some kind of relationship betbeen Id and Iq, that I should follow?
I suspect this is related to saturation. How can I avoid this?

UPDATE: I tested with a larger value of field generating current (which I call Id) and the problem reduces, but still happens at higher speeds.
So I believe may be is not saturation, but could it be like the motor looses its field?

is it normal that my controller tries keeps Iq at low values, even at high torque?

Thanks for your help.


texts: Can a 12V battery give you a shock or not?

texts:
I am reading a book called "Make: Electronics" and, on page 9, it says:

"Anyone who has dropped an adjustable wrench across the bare terminals of a car battery will tell you that short circuits can be dramatic at a "mere" 12 volts, if the battery is big enough"

They also show this image to exemplify the point above:

I have also watched this video, in which the guy touches both positive and negative parts of a 12V battery with his hand to see if he gets a shock, but, as you can see, nothing happens.

Having said that, I have 2 questions:

1) What does the size of the battery have to do with anything? The first statement says that short circuits can be "dramatic (...) if the battery is big enough". Why? For me the only difference between a small 12V battery and a big 12V battery is how long it can give you a shock for, but both would give you the same shock (ie, both would make the same current pass through your body).

2) Why didn't the guy in the video get a shock? He claimed that it is because the resistance of his hand is too high, which makes sense, but then why does the book quote (and its picture) make it look like you will for sure get a shock?


texts:
I'm designing a board on which I'll connect a microcontroller with the SIM900 module. The recommended circuit for powering on the module (from the manufacturer datasheet) is given below.

The module is powered on/down by setting the power key to low logical level. I guess that transistor should saturate in order to do that. But, last time I used transistors was long ago and now this circuit looks completely strange to me. So I have a few questions.

Will the transistor saturate if my microcontroller has 3.3v logic level? My guess is that it won't since 3.3v is higher than 3v for 0.3v, not 0.6v. But I'm not sure about that at all.
For what is the second resistor (47k) used? How are the resistor values calculated? I could probably figure it out for resistor 1, but would like to hear opinion of others. I still can't remember all of the equations I learned at high school.

EDIT:
Well, here is a part of my schematic.

On the right you can see that that the project will be battery powered. A typical li-po battery voltage is 3.7 v. On the board, there will be other devices (the screen) that will require 3.3v logic level. So I decided to wire the battery to a 3.3v voltage regulator, so it can power the mcu on the left. The SIM900 module is powered directly from the battery without any voltage regulators, as SIM900 can take up to 2A of current. The MCP73831T is there for battery charging, and the ch340g for serial communication with a computer. Hope this clarifies things a bit, and sorry for me not mentioning it earlier.


texts: I have a 12V and 20A LED switch,but I want to switch 24V DC with this switch.Is it possible to turn on the LED on the switch and also switch 24V DC?


texts: How to reduce inrush current for DC Motor in boom barrier gate application?

texts:
I'm using 24V 25W 100RPM DC geared motor for boom barrier gate application.So I added an overload protection for that circuit but whenever the motor starts the inrush current is produced and it triggers the overload protection circuit.How will I reduce the inrush current?
Some say about soft-start but that doesn't fit for my application.


texts: Data acquisition wiring - How to deal with extreme noise?

texts:
Hi all, I'm trying to build a portable data acquisition system to gather readings really close to high voltage powerlines. I was hoping to get some advice on how to achieve the best noise immunity.  Here's my current plan:

I have a sensor with 4 analog outputs and I was thinking of running 4 shielded twisted pair wires from the sensor to the DAQ running in differential input mode.  They all share the same ground so I was wondering if running 4 separate ground wires makes sense or if it's better to just run 1 ground and do everything single-ended and not use twisted pairs?  My thinking was that then each pair would pick up the same noise on its ground and reading wires and therefore would cancel the noise.  In addition, I will build a Faraday cage around the DAQ.  Does this seem like a good plan?

Here's the datasheets for the sensor and DAQ in case:
https://aerospace.honeywell.com/en/~/media/aerospace/files/datasheet/3-axismagneticsensorhybridhmc2003_ds.pdf

http://www.ni.com/pdf/manuals/378030c_02.pdf

Thanks!


texts: Can I run 12V camper van fridge whilst 'trickle charging' the battery in van?

texts:
I am running the following setup in my camper van and would like to know if there is a simple solution or device that would be effective in allowing me to run my 12V fridge whilst the leisure battery is being trickle charged from shore voltage. I recently got this van and realised the owner had removed the original charge controller and bodged a lot of the electrics.

Currently when the SPDT switch (Seen in pic above) is set to charge the battery from the charge controller, the voltage at the fridge is stable approx, 11.9V +-.2 volts. When I switch over to the trickle charger to charge the batteries (normally when its dark), the voltage is fluctuating between 8V-16V, and the fridge isn't turning on.

I'm assuming the fridge needs a stable 12v supply, and guess the trickle charger fluctuates according to battery state. With this in mind, is there a simple solution e.g. voltage regulator or a different charge controller, that I could use to stop the voltage fluctuating so I can charge the batteries and run the fridge at the same time?