texts: SATA Link layer Idle state primitive synchronization failure

texts:
I am currently working on interacting with SSD memory through a FPGA using SATA protocol. I am using a Xilinx KC705 evaluation board and SSD is from Samsung. I have connected the SSD device to the KC705 board through a FMC connector.
I have used Xilinx 7 Series GTX for the PHY layer. I am trying to work on the initialization part of the SATA protocol and that's where I am facing issues.

I have been able to do the OOB initialization with the SSD device. After that I have been able to negotiate the speed between host(FPGA) and device(SSD) at SATA II based on recognition of ALIGNp at the line rate specified. I am stuck at the "IDLE" state of the link layer state machine.

As per the SATA spec, the device link layer transmits SYNCp continuously to the host in IDLE state. What I am getting is that, I receive SYNCp for some period then I stop receiving as shown in Figure 1. Afterwards, I receive ALIGNp and SYNCp in random numbers as shown in Figure 2. I have captured the waveforms on chipscope.

Description of the signals captured on Chipscope :-

"currPrimitive" - The primitive that host link layer is sending presently.

"currState" - State of my state machine (not relevant)

"rxelecidle" - A value '0' denotes that the OOb initialization has been completed and the device is sending primitives.

"prim_align_det" - ALIGNp primitives obtained from device.

"prim_syn_det" - Syncp primitives obtained from device

Observations :-
As it can be seen in figure 1, I receive ALIGNp from device and after receiveing 100 ALIGNp, my link layer starts sending SYNCp. The device then starts sending SYNCp but after few numbers it stops and then in figure 2 you can see that the ALIGNp and SYNCp are received randomly, This behavior is confusing.

Hence my question is what could be the possible reasons for such behavior of the device. Here are few of my ideas :-

1) "Maybe the device lost synchronization with the host" - But how is this possible. After I receive around 100 ALIGNp(I have chosen to count upto 100 ALIGNp continuously for deciding on that the rx data is aligned), Host link layer sends ALIGNp untill it recognizes 100 SYNCp continuously from device. So I am assuming that My host is sending enough ALIGNp for the device PHY layer to synchronize (because the device itself is sending SYNCp at the hand-shaken line rate).

2) As per the SATA spec, after every 256 Dwords, two ALignp need to be send. I have a section of code that does the job. It counts and sends 2 ALIGNp. That is for every 256 Dwords, 254 are non-ALIGNp and 2 are ALIGNp. This is done while my link layer is in state "9" i.e. sending SYNCp. So, this should also not be an issue(maybe, not sure).

3) I have checked that the reference clock to my GTX is stable and similar to what I selected during IPcore generation.

I can't think of any other issues which might cause such behavior. Please share your views on what might be the possibilities. Also you can share your own experiences of SATA device behavior in it's idle state.


texts: Will a 12v 2000mAh battery overpower(and damage) a 1.2a DC motor?

texts:
Sorry if this is Electrical Engineering pre-school. I'm a software guy that hasn't taken a class involving voltages for 10+ years.

I'm working on an Arduino project that will have to be fairly mobile. I'm using a Nema-17 stepper motor that is rated at 12v 1.2a (link to specs). I'm looking for a suitable battery to power my motor for around an hour. I found a 12v 2000mAh battery (link to battery). This (according to my knowledge) means this battery should be able to power my 1.2a motor for around 1.6 hours.

My question is; will my motor only draw what it needs(assuming I don't short it) or will the battery pump too much power and fry my motor? Any help Would be great!


texts: Input coupling to Class AB amp with diode bias. One capacitor or two?

texts:
When AC coupling the input signal to a Class AB (Push-Pull / Complementary Pair) which is diode biased I see two different approaches:

Signal connected between biasing diodes with single decoupling capacitor:

Signal connected directly to each transistors base with separate capacitors:

What is the practical difference between these two approaches? Is one better than the other?

Here is an editable circuit showing the basic idea of the 2nd approach (NB: values are not that realistic):

simulate this circuit – Schematic created using CircuitLab

Here's another simulation of a the first circuit (courtesy of Tony Stewart).


texts: Looking for information about how well standard electronic components function when submerged in liquids, especially water

texts:
Tradition says that electricity and water do not mix well, but sooner or later some electronic components are going to come into contact with water. I noticed that datasheets don't mention anything about that for regular components so I'm looking for a source of information on that.

For example I noticed that some resistors with copper tin plated leads will release tin and copper when submerged in water and powered on (looks like electrolysis is taking place). I also noticed that some electric motors work just fine when submerged in water and that for example AA alkaline batteries don't seem to have any problems working under water. I also heard that some types of mineral oils can remove insulation from cables and that some people who used mineral oils to cool computers had problems with that.

Books are acceptable, but bonus points if the source if freely available on the Internet.


texts: Convert a voltage from 0-12V into a resistance from 0-264 ohm

texts:
I have a fuel sender that works on 12V and sends the reading to the engine. The engine wont start with it disconnected (hence the diode).
What I need is to copy the resistance of the fuel sender using the voltage output by the fuel sender to create an equivalent resistance value between 0 and 264 (or somewhere inbetween but 264 is the maximum)
I have looked into using a arduino to read the fuel sender signal with a voltage divider in between and a digital potentiometers but the digital pots have a minimum resistance of 1k which is far too high for this application.
I also tried using PWM to control the signal into the cerbo gx however it does not work.
I could not find a simple explaination of how to use a JFET as a voltage controlled resistor for a specific range if this is possible what is the recommended layout?
Is there a way to do this as per the diagram or otherwise without fitting another fuel sender in the tank?
Note: The Ameter is a guess at how the cerbo gx (fuel reader input) determines the resistance and outputs a number.


texts: How is LED backlight brightness adjusted?

texts:
I've noticed in a mobile phone when set to a low brightness the voltage output to the LEDs in the screen is 16v but when at full brightness it's around 20v

Now I've always been told current is what controls the brightness of an led, so it's got me a bit confused now.

Are the led strings always receiving full voltage let's say ~20v in this example and the same current, but the boost driver is pulsing differently depending on how bright you want the screen to be?


texts: Using PC audio to listen to electrical noise on power line?

texts:
I have done a bit of research on digital filtering and I was wondering if it would be possible to use the audio hardware of my computer tu listen to the electrical noise on my powerline ? If it is possible, does anyone have an idea of how to proceed ?

I was thinking I could maybe plug a cable linked to the house line into the microphone input channel of the computer. But I don't know how I would have to proceed to get it to work... I can imagine the computer not liking the 240V straight from the mains very much.

The reason why I'm interested in this is to be able to monitor the activity of some of the appliances around the house based on the conducted interference they cause on the house power line. From what I have read I expect the frequencies of the interferences to be around 40 to 80 kHz.


texts: Using a fruit or salt-water battery to power a motor

texts:
I´m trying to build a fruit or saltwater battery to power a motor.

From my 8 cell saltwater battery connected in series, I get a reading of 5V or so and 2-3A... but it won´t fire up my 5V DC motor. What am I missing? :)


texts: how to design a differential op-amp for sensing a ac current?

texts: I tried to design a simple electronic load, but I would like to amplify the the voltage across the sensing resistor with gain of 20. Then I can apply a sine wave reference to have a current between 0-5 A and control it based on the reference. I tried to do that based on the figure but it doesn't work. Someone told me that this structure for differential amplifier is for DC not for AC. can you help me to improve my design? I have an access to a limited range of op-amp in the lab. How can I use them for this purpose?


texts:
Design a length L=40 linear-phase FIR filter using frequency sampling design with an optimum approach. Use the transiton coefficient table given in Proakis and Manolakis.

My M is 39, how can I use this table for M=39?


texts: Round female pin header vs square female pin header

texts:
What are the main differences (except for the obvious, one is round one is square) between the round pin headers and the square ones?

Or differently asked: Why would someone choose round pin headers over the square ones (or the other way around)?

Round pin headers:

Square pin headers:


texts:
I apologize in advance if this is a more common sense question - I'm still learning some of the basics and using this project partially to just build my knowledge.

I've built this circuit with an input voltage of ~8V DC and a voltage across the capacitor of 251.7V. Parts used are...
IXFB110N60P3 MOSFET transistor - 600 Vds, 110 Ad
MSC050SDA070B Schottky Diode - 700 V, 50 A
DCP5P06100D200KS00 Capacitor - 1100 V, 100 uF
Clearly the circuit and all components work because of the successful voltage boost, but afterwards the MOSFET is shorted. I'm assuming that's due to the inductor sending current through after the power source is disconnected, but the large current rating is giving me some doubt. The capacitor still holds onto the voltage after power is disconnected, so I don't believe there is a current spike through the circuit due to that. I also make sure to discharge the capacitor after every use. What could be causing the MOSFET to short?
It should probably be noted that the only testing equipment I have access to is a standard multimeter. If additional information is required to answer, let me know but keep in mind that I am quite limited.
Thank you!
edit: forgot to include the inductor in my explanation. It is two inductors in parallel with one acting as a feedback coil for switching the MOSFET. Visually this looks like a coil around the original inductor.


texts: Constant current circuit with transistors/MOSFETs design comparison

texts:
There are a few designs out there for constant current devices, but most of them use a certain chip. I was looking for a way to build my own constant current supply from parts that I have available. The aim is to control a RGB LED with 10W (10-12V,350mA).

As I have next to none experience in electronics (last lecture ~7 years back), I wanted to run two different designs by you guys.

The first is one I have taken straight from here

And the second one I found was this one here. It is interesting as I have a Darlington driver around. I slightly modified the circuit in a way that R1 is not connected to the main power supply (compare Fig.6 in the linked document) but gets controlled by an Arduino PWM port.

Would this be possible or do I need more parts for the PWM support?

How do you think those two circuits compare?

Ps: The part numbers are just put in by CircuitLab, so please do not pay too much attention to them. I most definitely will use different parts and will consult their data sheets beforehand.

EDIT

After some time I have now actually built the circuit one (with the MOSFET). I also added a Low-pass filter to connected an audio signal. Together with an Arduino as a driver for the RGB LEDs the light pulsates to the beat of the music.

I built the constant current driver circuit from above three times
for R,G and B
The input is connected to three PWM pins of an Arduino
Based on a Tutorial by Jeremy Blum, I built a simple low-pass
filter with 2 op-amps, a few resistors and caps and a trim pot.
One can now connect audio which is split into a singal for the
speaker and an input for the op-amp. The op-amps amplify the signal
which then goes to an Arduino analog pin input
With some code running on the Arduino I can now trigger the light
based on the analog input
I added a voltage regulator (LM7809) to step down from 12V to 9V for
the Arduino. This is not really needed, but I had one and wanted to
try it :)

I had some fun building this and now want to put it into a lamp and do some more coding...


texts: I have an Operational Amplifier in Multisim 14 but i don't know how can i measure the Gain of this circuit. Is there any automatic way to do this?


texts: Excess minority carrier concentrations at the edges of the depletion layer

texts: In a pn juction how do the excess minority carrier concentrations at the edges of the depletion layer p'(xn ),n'(−xp ) depend on the forward-bias voltage? Are these the maximum concentrations of the minority electrons and holes, respectively.


texts: Why don't we worry about reverse recovery voltage and current of a diode in a simple circuit application?

texts:
When the diode goes into reverse recovery, why don't we worry about the power supply in that specific time since the current will be increased? Will it not damage the power supply or is it since it is happening so quick that realistically no damage occurs from that extra current needed to remove the negative charges?

For example, if a resistor was placed after the switch in the circuit above and that resistor is chosen could only handle for example 10A (theoretically). When the switch closes and the diode goes into reverse recovery, the current from the power supply now is 12.5 A. Hence 12.5A goes across the resistor. Is this ok since the reverse recovery time of a diode is extremely quick so realistically it has no effect on the components?

Basically when do we need to take into account the reverse recovery characteristics of a diode? Typically does it not affect the external components attached to the diode since that extra current needed only is occurring for an extremely short period of time?

When do we need to worry about the reverse recovery characteristics and what could that extra current potentially do to external components

Typically I have been told in simple circuit application to just choose a fast-acting diode that can withstand a high amount of voltage but I am confused for other components as potentially could they not be destroyed from extra current?


texts: Clarifications about charging a 9V battery?

texts:
I have a project in mind with Arduino but I wanted to use a battery to power all of it. I have to power a Wi-Fi module and a small servo/stepper for a short period of time, maybe a RTC circuit and a few leds/buttons.

It's something that I will use extensively, so changing battery everytime would be expensive and boring. For those reasons I want to implement a charging solution for my device.

To power it, I've discovered this 9V Li-ion battery (http://anrieff.net/batterytest/details/others/e3-LiIon-9V-en.html), which seems great. The writer claims:

  Protection circuit: This battery is not a "pure" 2-cell one; it has a protection circuit. It switches off the battery out of the way when the internal voltage drops below about 6.1V. There's an upper limit as well (or so they claim), but I haven't tested it, it should be around 8.5V.

Also

  Li-ion are charged at 8.4V (2 × 4.2V).

So, if I understand well, I need to charge it at 8.4V. My questions are:

I have one of those multi-voltage power supply, which can power 5V or 9V. Can I use a step-down circuit to transform 9V to 8.4V? Charging it with 5V will extend the charging time but charge it in the end?
1A (max) power supply will work well?
Do I need extra special measures, like some protection circuit I'm unaware of?.
How do I know when to stop charging?

Thank you


texts:
I am currently working on a high voltage supply for short (50-100ns), quick (<30ns rise time) pulses. The below circuit is my first rough draft for the power supply, I realized that by connecting the MOSFET driver up the way I have, I have de-isolated the HV voltage section of the circuit. My question is, would it be better to keep the HV section of the circuit isolated (main concern: safety) or reference it to the battery's negative terminal (as is below)?

I've been looking into options for pulse transformers to accomplish the isolation task for the low voltage section if I need to go that route, but I haven't been able to find many that are rated at 4KV isolation at the rise times I'm trying to achieve.

Assume that the elements of this circuit will never touch the ground at any point, aside from accidental contact, it should be floating at all times. The chassis the equipment is in is isolated from ground and is referenced to the battery's negative terminal.

Edit: Not shown, but there is a bridge rectifier and smoothing capacitor after the 4kv transformer.


texts:
So, I'm an absolute beginner at LTSpice(I just started today).
I want to know how to add the model of transistor(say model ZTX300 or BC108) to my schematic.
I can't find the model in the standard.bjt file. So is there any way how to use them in LTSpice?


texts:
I have a speaker switch which has been in continuous use since some time in the 1980s.  It a QED SSU4.  To my surprise, there are plenty of pictures on the net and even some for sale.  Even more surprising, is that the prices are similar to what I paid new decades ago.

It connects up to 4 pairs of stereo speakers to one amp output.  There are 4 nice rocker switches to turn each set off with no limitation e.g. all 4 off, all 4 on, and any other combination.  (*)

I am interested in how it achieves this claim: "At no time will the load presented to the amplifier fall to less than 1/2 of the speakers in use.  i.e. with 8 ohm speakers the minimum load will be 4 ohms which almost all amplifier are capable of driving."  So, it is not simply connecting all in parallel.  It is a passive unit (no power supply).

This seems to be true.  It spent most of its life connected to a NAD 3020B which claims to cope with 4 Ohm but not 2 Ohm.  At times, e.g. student parties, it was driven hard but never showed signs of failing.  Now it is connected to a SMSL SA-50 which also seems happy but it is not run so loud any more as I am no longer a student.

I don't want to open it up and look as I may damage it.  It is still doing an important job well.

I don't necessarily need to know how this specific switch is made but how could that function be achieved with 1980s technology?

(*) My maths says that is 16 combinations though the instructions claim only 15 and they are not omitting all off as all on and all off are explicitly listed.

Edit: further detail in response to comments.

Here is a link to a unit that looks just like mine.  The packaging seems slightly different: https://www.canuckaudiomart.com/details/649374943-qed-4way-speaker-switching-unit-model-ssu4/images/1624887/.

As mentioned in comments, some combination of parallel and serial connections is a possibility but you might expect this to cause a considerable change in volume as the switches were flicked.  There is a change but it is quite small.  Nothing is currently connected to output 2 but 1, 3, and 4 are in use.  No other set goes off at the wrong time as switch 2 is thrown.  This suggests that output 2 is never in series with another.


texts: How did old games from 8-bit era game consoles store music?

texts:
Some time ago I found that the audio of a game called Ninja Gaiden 1 (NES) is around 1 hour. This is excluding the sound effects like jump and hit e.t.c. Then I found that the entire game size is actually quite small and the sound data is not stored as actual sound samples. Rather, it is stored as "instructions to a sound chip". This makes the whole thing look mysterious to me.

How precisely was game music stored during the 8-bit console era that made it possible to store so much music without exceeding even 1MB of space in hardware??


texts: Resistance effects on LED when connected to battery

texts:
I have this doubt whether to go with theoretical method or practical.
Lets say I'm using a 3.7V battery 350mAh to light up a LED which has forward voltage of 3.3V (which means LED lights up if 3.5V is provided) and forward current of 30mA.
So it lasts 350mAh/30mA = 5.83 hours.
The remaining 0.2 volts is reduced using a resistor. So resistor required for LED would be,
(Battery voltage - LED voltage)/(Battery current) = (3.5 - 3.3)/(30mA) = 6.66 ohms
My question is, even though after connecting the resistor to the LED, the intensity of the LED is more than expected. So a higher resistance is preferred here to reduce the intensity of the LED. Suppose say at 50ohm, I have matched my required intensity of light.
But if I put a 50 ohm resistance over there, voltage at the LED reduces to a value where it is less than the forward voltage (3.5v, that is required). So there is a chance LED doesnt light up.
Is this the case or is there any solution for this?
A brief explaination would be very useful, since these minute details are much important everywhere


texts: Control (power on/off, monitor) a desktop PC with ESP8266?

texts:
I'm trying to

power on, power off my desktop PC
monitor my desktop PC

by connecting ESP8266 with the mainboard's F_PANEL.

This is what I know:

You can power on the mainboard by connecting PW- and PW+ (in the F_PANEL) for a brief time
ESP8266 will fry if connected with a 5v external source

This is what I imagined:

simulate this circuit – Schematic created using CircuitLab

Power on/off: Send a signal from GPIO13 to a transistor that will connect PW+ with PW-
Monitor: Read a signal from voltage divided PWR to GPIO14

Would the above idea work? Please guide me.


texts:
I am currently developing some electronic sensors for use in monitor food quality. This type of device requires running electrical cable though piles of food products. What type of electrical cables (or cable insulation materials) are considered food safe? and are there any standards which I should familiarize myself with?

Would standard CAT5 or CAT6 cable which is used in networking be safe to use in this application?


texts:
I am trying to simulate a 4-bit DAC circuit using a R-2R resistor ladder. I am using a 741 op-amp. I selected the R value as 10k and calculated the value of Rf using the equation given on this page - http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/dac.html
The values were calculated with a 5V input and I am trying to obtain -10V output for a digital input of 1111. The circuit I have is shown below.

DAC Circuit http://postimg.com/173000/dac-circuit-172789.jpg

The R values are 10K

2R - 20K

Feedback resistor - 21.33K

These are the values I keep getting:

0000 - 0V output

0001 - 1.33V output

0010 - 2V output

0011 - 2.66V output

0100 - 3.05V output

0101 - 3.88V output

and so on.

As you can see there is no linearity with the output voltages. Could someone tell me what I'm doing wrong?

Additional Link to Image if it doesn't show above - http://postimg.com/image/173000/dac-circuit-172789.jpg


texts:
I'm designing a circuit based on the MC34063A switching regulator to step up 3.7V to 8V.
The 3.7V for Vin comes from a 3.7V Li Ion battery and so I'm trying to calculate the battery life. I'm a bit confused on some of the parameters from the datasheet though. It states that Icc (supply current) is typically 2.5mA. This seems a bit too low to use as a value for the total current consumption. However, I've calculated that Ipk for my application (8V @ 200mA) will be around 1A. I know it's a switching regulator though and so the the waveform for the Ipk value looks more like a triangular waveform. Would an average of Ipk give a better indication of power consumption?
I'm just wondering if anyone would point me in the right direction with regards to calculating total power consumption so that I can calculate my battery life.


texts: Problems calculating torque for a motor opening a door

texts:
I want to make a device that can open a door from a cabinet. The door is about 4 meters wide and about 0.5 meters high. (if the width causes a problem I can split it in 1 meters section with one motor each, or keep it as one section with 1 motor on each side).

When the door is closed it is vertically. When the door opens, it is rotated upwards, meaning the door will be along the ceiling of the room.

For what I found out/read about it, I think a gear motor is the easiest/cheapest solution.

The door will be made of 4mm MDF wood, so reasonably light (I have to buy it), I assume it will be less than 5 kg (causing a pressure of 50N).

I have some questions:

I was thinking of using a gear motor (DC, around 12 V or so), and connecting the shaft directly to the door, meaning I need only a quarter of a rotation to open/close it. Is this realistic? I need low speed, like a door movement speed of 10 cm/s would be ok.
Can someone Check my torque calculation. For what I can find so far it is according to this website:
torque t = rF sin X = 0.5 (m) * 50 (N) * sin(90) = 25 N.m = 2.5 kg.m ... is this correct?
I'm intending to use a small microcontroller to check switches on each end to stop the motor (with a relay) when it is fully opened or closed. I assume this is a legitimate/normal construction?


texts: Connect to a serial output device with 12V power input with 5V USB-TO-UART

texts:
I have

DG600F coin acceptor with 12V power input and serial port output
CP2102 usb-uart bridge and FDTI TTL-232RG cabel as an alternative
A PC and Macbook as alternative

I need

to connect DG600F to PC by serial cable.

In the Support tips section (in the bottom) of the DG600F product page there is the following connection scheme:

So I've connected by the following scheme:

Red is 12V from power adapter. Connected straight to the device.
Orange is ground from power adapter. Connected to ground from CP2102.
Black is ground from CP2102. Connected to the device.
Yellow is RX from CP2102. Connected to the device.

The ground connection looks like this:

What do I expect?

I put an icon into DG600F. The red diode near RX line on CP2102 should light up. I should receive some bytes on my computer using a serial port terminal. (I use serialport-terminal from npm)

What happens

The RX diode lights up, when coin is inserted, but it lights up 5 times less brightly, then it should. It looks like it detects the signal, but it is too low. There is no input in the terminal at all.

What did I try?

I've tried to touch RX line with my finger. There is some random input in the terminal. So CP2102 works correctly.
In the original manual, they've used FDTI cable. So I've bought exactly the same, but the problem is the same: there is no input in the terminal. FDTI does not have any diodes, so I can not tell if it receives the signal.
I've connected DG600F to some cheap Chinese board I have, which outputs 12V to DG600F and connects to the computer through USB as an HID. Through it everything works: coin insert is detected and the board sends the signal to PC. So I can tell, that the device itself works correctly. But I need to work with DG600F directly from the PC, because I have another payment device, which requires the same installation scheme.
I've checked the output from 12V and ground on all connections with a multimeter. The device gets 12.26-12.27V.
I have tried to connect RX with TX on CP2102 connectors and send a signal from terminal. It returned back. This way I can know, that the chip itself is still working.

Any ideas?

I am a software developer, not a specialist in electronics. So what I want to understand: what can be done wrong in this simple scheme:

And why I get the signal, but the diode is very dim?


texts: Issue with display function in system verilog

texts:
I am new to system verilog and started off getting hands on by designing and simulating a simple Half-Adder. The design and testbench are compiled successfully and are giving the expected results. However,
with the $display function, I see that some unnecessary data is getting appended to one of the strings I am trying to merely print.
Following is the piece of the testbench I which does this :
initial
        begin
            $display("A\t\tB\t\t\tSum\t\t\tCarry",a,b,sum,carry);
            $monitor("%b\t\t%b\t\t\t%b\t\t\t%b",a,b,sum,carry);
        end

Which, gives the following result (since the results are ok, I am just mentioning the area where I have the problem and not the complete set of results) :
A       B           Sum         Carry0000

I am not able to figure out why the extra zeros are appended to the "Carry" string. Please explain what's gone wrong here.


texts: Modeling a Time to Digital Converter in Verilog-AMS

texts:
I'm trying to write a TDC model in Verilog AMS. I'm really new at the AMS part of Verilog.

The problem I'm running into is in assigning the final state of the TDC to the outputs. Below I present the code. I get "Expecting a scalar expression" on the line within the generate.

module TDC_model #(
parameter integer N_delays    = 50,
parameter Time_delay  = 20p,
parameter Vdd         = 1.8   // Positive power supply V
) (
input TDC_Start_i,
input TDC_Stop_i,
// input TDC_CLK_i,
input TDC_Rst_p_i,

output TDC_therm_o
);

electrical [N_delays - 1: 0] TDC_therm_o;
electrical TDC_Start_i, TDC_Stop_i, TDC_Rst_p_i;
integer i;
real vmid;

real delay_reg[0: N_delays - 1];
real delay_chain[0: N_delays - 1];

analog begin
//Initialize parameters
@(initial_step) begin
  vmid=(Vdd)/2.0;     // Midrail Voltage
  for(i=0; i< N_delays; i=i+1) begin
    delay_chain[i] = 0;
  end
end

//Delay chain delays propagates the signal
@(timer(0, Time_delay)) begin
for(i=1; i < N_delays; i=i+1) begin
  delay_chain[N_delays - i] = delay_chain[N_delays - i-1];
end

delay_chain[0] = V(TDC_Start_i); // Beginning of the delay chain
end

// At Stop threshold crossing, buffer the TDC status
@(cross(V(TDC_Stop_i) - vmid, +1)) begin
  for(i=0; i< N_delays; i=i+1) begin
    delay_reg[i] = (delay_chain[i] >= vmid);
  end
end

generate i (50 - 1, 0) begin
  V(TDC_therm_o) <+ transition(delay_reg[i],0 , 2p, 2p);
end

end
endmodule


texts: What are the practical reasons to use a voltage-follower?

texts: Could you give a particular example why is a voltage follower is used?


texts: Normalised Current Transfer Ratio of Opto-Coupler

texts:
My understanding is that the Current Transfer Ratio of an opto-coupler defines the relationship between the current flowing through the LED, and the maximum supply current of the output. e.g. "5ma through the LED means a maximum of 15ma can flow between the emitter and collector"

Some datasheets show illustrate this relationship using Normalised Current Transfer Ratio which I'm finding quite a bit harder to grasp.

The opto in question I'm using is the MCT62 (http://www.mouser.com/ds/2/149/MCT62-186891.pdf). I need around 50ma to supply the load on the opto's output.

What calculation do I need to use to determine the required resistor on the LED?

Also, how can I determine what resistor on the LED can deliver the most current?


texts:
I have 8 12V,20W bulbs and want to connect them in series. I cant seem to find a 12V,160W transformer for my 240V mains supply.
Is there another way like connecting in series+parallel connection to use them directly with 240V mains?
Any suggestion is welcome...


texts: Usage of the Mixer as a variable attenuator

texts:
In several user manuals for RF mixers (double-balanced), it is stated that the mixer can be used as a variable attenuator due to the fact that the RF-LO isolation is related to the amount of the DC current flowing through the IF port.

How does this work? Why is the LO-RF isolation related to the amount of DC current flowing through the IF port?


texts: What is the right way to float a home lab?

texts:
I just got myself some new toys for my lab at home like 30V DC power supply, KKmoon signal generator and a Rigol DS1052E. I want to float everything, because I don't want to spend any money on stuff like differential probes or isolation transformers.  I am doing 100% DC stuff and want to do some probing in my circuits.  My questions are:

What is the right way to float my home lab?
Do I float my three devices separately? For example, somehow removing the ground from the socket coming from the device?
Can I plug everything into a mains power strip and remove the ground of the mains power strip before plugging it into the wall?

Please let me know. Thanks.


texts: giving output bits of counter to logical gates in system generator

texts:
I have a counter block in  system generator which has a 3 bit output. The block is shown below:

As is apparent from the figure, it's output is represented by a single line not three. I need to give its output bits to logical gates such as AND, OR, etc. but I do not know how to access the output bits (as I said; the output is represented by a single line). Can anyone help me?


texts: What is the purpose of a tri-state pin in a Oscillator

texts:
I'm trying to interface this clock (32.768kHz Ceramic
Surface Mount Crystal Oscillator datasheet), but I'm confused as to what to do with the tri-state pin. What is it's purpose in the oscillator and should I care about it? Can I just leave it unconnected or pull it to ground?


texts: LT Spice and inductors parallel to AC voltage sources?

texts:
This is a circuit I designed in LT Spice. There is no transformer component in LT Spice so I specified L1 and L2 as magnetically coupled with K L1 L2 1 when I try to simulate I get an error that I have to add series resistance in order to run the simulation...

How do I avoid adding a useless resistor?


texts:
I am looking to activate a switch on a sensor platform I have, via a GPIO(3.3v) pin on a Raspberry PI. The board itself is powered by the Pi, via USB.
The problem is, I have very limited electronics experience, so I'm hoping someone can advise me.

The switch looks quite easy to bypass if I solder to the underside of the board. I was thinking of something like Using an NPN transistor, but would like some expert advice before I attempt anything.

One more thing, would you advise me to put some form of GPIO protection circuit into the design?

Edit
Testing the sensor board, it appears one of the pins on the switch is grounded, the other is to some pin on one of the IC's

Edit #2
Voltage across the switch is 5.07v when open, and ~500μA current when closed

simulate this circuit – Schematic created using CircuitLab


texts: How to limit regenerative braking charge current into 48 V DC Battery?

texts: I have a 48 V DC battery which supplies more or less constant current (70 A) to the motors. When the motion direction is reversed, the motors start working as generators and the battery is being charged with the current reaching around 30 A. How can I limit this charging (recuperating) current to a lower value?


texts: increase the maximum brightness for a laptop replacement screen

texts:
I would like to increment the maximum brightness for a laptop replacement screen such as this one

How difficult that could be? I haven't bought the screen yet so any hint about the type / model and the interface for the controller is welcome.
This is not going to be powered via a battery (so power consumption is not a problem), I am trying to build something that will be visible outdoors, from a normal computer reading distance.


texts:
simulate this circuit – Schematic created using CircuitLab

Will I cause any problems since Vg (4V) is greater than Vd (3.3V)?


texts: Can I replace a cel in a Li-Ion pack with a different cell?

texts:
My laptop battery is composed of 6 polymer cells in the constellation: 3 parallel pairs in series.

All cells are Coslight CA653495: 3.7V, 2,4Ah. I'm considering replacing one of the cells, which is puffed. It's puffed hard, not like it's puffed with gas(Hydrogen).

I haven't found the exact cell to buy, due to size constraints. But I've found one that fits. only that it's 2,5Ah.

How would changing this cell affect the overall performance of the battery?
Will this unbalance the battery?
Or will this just use up the new cell faster?

I know I can get a new battery, but I want to understand how cells work together, and learn.


texts:
Suppose we have an air gap problem like in the picture above. Now the induced MMF will clearly move the object in the negative x direction. It will do this because energy is maximized. Due to coenergy also being maximized so is inductance. This happens because relucantce is minimized.

I'm avoiding using equations here right now and I am trying to understand the mathematics I already know.

Now conceptually a system will always seek minimum energy for stability and the equilibrium points of even a simple system like this WILL occur at points of minimum energy.

However the air gap seems to defy stability. It is intrinsicly unstable because it if it were not for that block in the way the object would shoot off in the -x direction.

WHY does an air gap system seek to maximize its energy and inductance and minimize its reluctance? What's the real electromagnetic phenomenon occuring here?

I have a thought we can maybe build on:

My thought is that as the gap widens and the reluctance of the system decreases, the inductance increases and much like a two wires splitting this splitting will cause the EMF. Is a similar situation occuring here with the MMF? and why?


texts: Questions about an on-off control comparator circuit driving an SSR

texts:
I was doing on-off temperature control for around 40°C for an enclosed unit manually by switching on and off a 1100W heater(with a fan) with my hand. The accuracy is not very important roughly  40°C is fine. Now instead I want to automatize this on-off process. Basically 40°C corresponds to 8V output of the temperature transducer.

Here below is raw voltage output of the temperature transducer when it is heating and cooling around 40°C(sampled at 4kz):

Here is a close view of the raw data:

Now I tried the following comparator circuit where I set the threshold to 8V with a hysteresis of around 35mV, and fed the 4kHz above sampled input to the circuit as PWL.

Here the comparator triggers this zero crossing 25A SSR(D2425).

[Left click to enlarge the view]
(R5 is for input not to float when transducer is not connected)

Below shows the input as the sampled voltage from the transducer, the non-inverting input which shows the hysteresis level, and the heater current in order.

In the simulation the results look smooth, but if there is no fundamental problem with this circuit my questions are:

1.) Do I need R4 at the SSR input? In the data sheet input impedance for this D2425 is not given or clear(My ohmmeter doesn't show anything when measured at the input terminals):

2.) I don't want too much hysteresis not to effect the stability for the set temperature but too little is not good either if the noise exceeds hysteresis. Is the hysteresis level fine for this input or would an RC filter be needed?

Edit:

Regarding the comments some modification:

Edit 2:

The sensor is set to 0-10V output and I wondering how would floating input turns off heater for this circuit. Is connecting 1Meg to Vcc load the transfucer or damage it? Transducer output can be anything between 0 to 10V.


texts:
I've read that it is recommended to have 20 dB/Decade slope on the L(jw) magnitude plot of the Bode Diagram at gain crossover.  This seems to imply a slope of -1 in dimensionless terms.
However, what is the justification for this?  The reasoning for this always seems to be glossed over.
Also, in Astrom's text he claims the gain slope must be greater than -2 for stability.  I have a tuned up system that as a gain slope of -2.3 and is still stable.  Granted, it's barely stable, but there is phase margin left.
What is the justification for that statement of -2 for stability?  Is -2 a rough number?
Thanks for any feedback and help!


texts: How to position parts relative to each other in Kicad?

texts:
Is it possible to automatically position parts in Kicad, relative to each other?

I'm making a board that plugs into an Arduino Nano, and I'm finding it difficult to position the straight headers at the exact 17.76 mm span to match the space between Nano's pin rows. If necessary, I can do this manually, but is there any built-in tool where I can select two parts and tell it to space them by a specific amount along a specific axis?

Is it also possible to center a part relative to the "Edge.Cuts" layer? I'd like to center these headers, and again, using the mouse while looking at the coordinates is very tedious and error prone.


texts: 3 terminal regulator max input voltage with zener at adjust pin?

texts:
Quick question: If I stick a zener at the adjust pin of a 3 terminal linear voltage regulator, the allowable maximum input voltage will also increase by the breakdown voltage of the zener used... right? I'm not worried about noise and bad regulation due to the zener. The regulators I'm considering are the AMS1117-5.0 and maybe the LM7805 (although the 7805 will probably not pose a problem as the input limit is fairly high).

I need to get 120mA @ ~12V and only have the 5V regulators on hand (and a bunch of zeners). Input ripple varies from 13-16V. This is for running a 12V fan. Apparently, vregs are cheaper than transistors, and board space is limited.


texts: AXI Stream write and read not synchronized

texts:
Searching "hls axi dma" on this site gives a few related issues but none of which I can use to fully deduct a solution for my problem.
My code generates "random" output on IO1 and reads input on IO4.
To test my code, I short IO1 and IO4 and, I keep reading IO4, and whenever there is a signal in, I read what was on the output IO1. Ideally whenever IO4 has signal in, IO1 should also read signal out.
I tested it this way to see whether I was off by one and needed adjustements to code or if everything was working as intended.
This is my block design

And here is the code
typedef ap_axis<8,1,1,1> stream_type;
static ap_uint<32> lfsr = 51763;

ap_uint<4> ioctrl(bool run, hls::stream<stream_type> axis_in, hls::stream<stream_type> axis_out, ap_uint<14> &usr_gpio, volatile ap_uint<12> gpio_i, volatile ap_uint<2> gpio_o) {
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE s_axilite port=run
#pragma HLS INTERFACE s_axilite port=usr_gpio
#pragma HLS INTERFACE axis port=axis_in
#pragma HLS INTERFACE axis port=axis_out
#pragma HLS INTERFACE ap_none port=gpio_o
#pragma HLS INTERFACE ap_none port=gpio_i

    ap_uint<4> state = 0;

    if (run) {
        usr_gpio = (ap_uint<14>) gpio_i + ((ap_uint<14>) gpio_o << 12); // This was used for reading before AXI implementation

        bool b_32 = (lfsr & (1<<31)) >> 31;
        bool b_22 = lfsr & (1<<21) >> 21;
        bool b_2 = (lfsr & (1<<1)) >> 1;
        bool b_1 = (lfsr & (1<<0));

        bool new_bit = b_32 ^ b_22 ^ b_2 ^ b_1;
        lfsr = lfsr >> 1;
        lfsr = lfsr | (new_bit << 31);

        state = (ap_uint<4>) (lfsr.to_uint() & 1);

        if (state == 1) {
            state = 5; // 0101 = [IO 0, LED 0]
        } else if (state == 0) {
            state = 10; // 1010 = [IO 1, LED 1]
        }

        // AXI
        stream_type val_in = axis_in.read();
        stream_type val_out;

        // Here I check whether gpio input is detected
        ap_uint<14> bit_hit = (ap_uint<14>) gpio_i & (ap_uint<14>) 0x02;
        if (bit_hit == 0) {
            // I read gpio output and generate a val_out.data (should ideally always be 0x3)
            ap_uint<8> out_bit = (ap_uint<8>) gpio_o & (ap_uint<8>) 0x01;
            val_out.data = (1<<1) | out_bit;
        } else {
            // If nothing detected, set 0
            val_out.data = 0;
        }

        // As a slave to tutorials, I just copy over everything I don't understand.
        val_out.keep = val_in.keep;
        val_out.strb = val_in.strb;
        val_out.user = val_in.user;
        val_out.last = val_in.last;
        val_out.id = val_in.id;
        val_out.dest = val_in.dest;

        axis_out.write(val_out);

    } else {
        usr_gpio = 0;
    }

    // Set output
    return state;

}

Now, I allocate streams on PS, send and empty allocated stream to PL, which will initiate the output stream from PL, and I read output buffer on PS. These are some of values of the AXI stream I read from PS:
[0, 0, 0, 2, 2, 0, 3, 2, 2, 0, 0, 3, ...]
The 0's are fine I though, and the 3's. But what the hell are the 2's. 2 = b'10', that means I hit this line
val_out.data = (1<<1) | out_bit;

But how can gpio input be detected without anything being outputted.
Furthermore, bitstream is generated at 100MHz clock. If setting the clock to 250MHz (in PS from pynq.clocks), there are more 3's in the stream to PS, while setting lower frequencies.. say 25MHz, all 3's are gone and only 0's and 2's are read.
Theories:

I have misunderstand FPGA's chronological execution and this alignment is completely random!?
I should not set TLAST on every cycle, only when stream in buffer is finished. !?

Appendix :slight_smile:
This my AXI DMA setup


texts: Convolution with sinusoids using convolution theorem

texts: y(t)= h(t)*x(t)  where h(t) is a decaying exponential and x(t)= sin(5t) u(t). Find y(t) using convolution theorem. I'm confused about the sine wave. If i write sinusoid in exponential form then I get imaginary parts as well. can someone please help


texts:
While reading the book I got stuck in a line, which says:

  For a given value of supply voltage \$V_{CC}\$, the higher the value we use for \$V_{BB}\$, the lower will be the sum of voltage across \$R_C\$ and the collector base junction \$V_{CB}\$.

Now, my question is, if I increase \$V_{BB}\$, \$I_B\$ will increase, \$I_C=\beta\cdot I_B\$ will also increase. Then, voltage across \$R_C\$ will increase, which contradicts the book. What am I getting wrong here? And what is the correct solution?


texts:
I have an LCD interface for a Beaglebone Black that is failing EMC. The Pixel clock is 65 MHz and is failing there as well as 195 MHz. Here is what the schematic looks like:

The setup is 24 bits RGB that is converted to LVDS, which there are 4 lanes of data and the differential clock. I found the input LCD clock from the beaglebone to the LVDS transmitter was the worst, especially at 195 MHz. I greatly reduced the EMI by putting in a LC filter (BLM21BB201SN1D with a 22 pF Cap). Here is what it looked like before (195 MHz at center):

After:

The clock integrity was unaffected and this likely would be enough to pass. However, there is still a lot of ringing on the LVDS clock side and I would like to improve it. I tried putting in the same LC filter for the clock but it just impeded the clock too much. I was thinking of adding a common mode filter between the + and - clock but not sure that is the best way filter it. Any thoughts on how to do this would be appreciated.
Edit 1: Adding pictures of layout


texts: Why do the 9V batteries immediately deplete on connecting to this circuit?

texts:
My son put together this railroad flasher circuit on a breadboard.

He (and I) tried 3 brand-new 9V batteries. On connecting them to the circuit, the batteries immediately deplete/discharge (terminal voltage before connecting is ~9V, and after connecting to this circuit, is ~6V).

I've checked the breadboard wiring several times to see if it matches the circuit, and I could find nothing wrong. Only thing which I am unsure about is the electrolytic capacitor that is a 10uF one, rated at 50VDC. Could that be the problem ? The resistance values are all as per circuit (1/4W ones), and the LEDs are connected correctly. Anything wrong with the circuit ?

Edit:
Note that there was indeed a "short". Correct that, but still no fun, no railroad lights. Breadboard wiring picture -

Edit#2:

Thanks for highlighting several mistakes. Here's a Fritzing breadboard view. Hopefully right this time.


texts: Meandering traces necessary for 24-Bit parallel RGB LCD interface?

texts:
I am working on a project that interfaces an Atmel SAMA5D3 MCU with a LCD TFT display. The interface between both is 24-Bit parallel RGB with HSYNC and VSYNC signals. The resolution of the display is 800x480 pixels.

I understand that it is important that all signals and the clock come in at the same time. The way to make that sure is meandering the traces to get equal trace length. I don't have a lot of space (who has) and I am worried that my meanders are too small causing reflections and/or cross talk.

I am also wondering if it is necessary in my case. Trace length is around 50-60 mm. How much variance in trace length is allowed in my case? Perhaps it would be enough to just meander the few shortest traces?

I also have implemented an OV5640 CMOS camera (not in the picture). It's interface is 8-bit parallel. Trace length here is about 60mm. The clock rate is around 100 MHz as far as I know. It's a 5 Megapixel camera. Do I have to meander the traces in this case?

Thank you very much for your help!

Phillip

Update #1: I reworked my design and removed all meanders to get the trace lengths of my signals: The shortest trace is 35mm for LCD HSYNC and the longest trace is LCD_R2 (data bit) with 57.5mm.

Update #2: In order to learn high speed PCB design I read a document I found at Toradex which is very good in my opinion. On page 54 and page 66 the layout guidelines for 24 Bit RGB and Camera parallel interface are summarized like that: "[...] ￼Max skew between data signal and <100ps ≈15mm, depends on pixel clock, requirement can be relaxed for lower clock resolution display [...]". I don't get this en par with your answers. 100ps should allow for much larger trace variance than 15mm (as posted in the answers below)? The document can be found here: http://docs.toradex.com/101123-apalis-arm-carrier-board-design-guide.pdf.


texts:
I'm going to Africa this summer for a veterinary mission and need an egg incubator. Considering I will not have a steady supply of power I need to find an efficient way to power an incubator continuously off of a battery and solar power.

I need to run this incubator:
http://www.flemingoutdoors.com/little-giant--10200-circulated-air-incu.html

I found this battery/solar setup:
http://www.goalzero.com/shop/p/59/Sherpa-120-Explorer-Kit/1:1/

Though I don't think the setup  is going to be powerful enough to power it continuously, any suggestions?


texts:
I'm trying to use a generate statement to make a custom bit width version of my circuit. However, I need to increment N by 2 instead of 1. Is there a way to do this?

...
adders: for N in 1 to bits-1 generate
        mapping: RBNS port map(
            a => a(N downto N-1),
            b => b(N downto N-1),
            sum => result(N downto N-1),
            cout => carry(N),
            cin => carry(N-1)
        );
        end generate;
carry(0) <= '1'
...


texts: PI Controller with XLSEMI4016 Buck Converter, unstable VFB seen

texts:
I have the following circuit set up to control VOUT (labelled SENSE on my Excel test results).

Note that the node between REXT, POT, and R_B is called VFB. It goes to the FB pin of the XL4016 chip, which I didn't have on Proteus so I left it as a black box.

I am expecting to see:
1. When OFFSET < ERROR, positive integration, therefore PI controller goes high, VEXT increases.
2. When OFFSET > ERROR, negative integration, therefore PI controller goes low, VEXT decreases.
3. Regardless of the value of VEXT, VFB should stay at 1.25V*.

*This is explained by the datasheet for the XL4016 buck IC. The VFB pin is connected to a comparator with a reference value of 1.25V, which is how the buck converter works normally to maintain a constant output voltage.

However, I am not seeing these results. Instead, when I ramp up the REF signal to the error amplifier, I get the following:

Also, for some reason, the OFFSET and ERROR signals are matching each other. The ERROR comes from the error amplifier on the left, and follows the formula: ERROR = OFFSET + VOUT(LOW) - REF. This is fed into the + pin on the PI op amp and compared to the OFFSET signal which is sent to the - pin of the PI op amp. Since the two inputs are identical, I would expect the output of the PI controller (VEXT) to fluctuate about neutral, NOT ramp down.

So I have several questions.
1) Why is VFB not being maintained at 1.25V?
2) Why is the OFFSET responding to changing REF, and why does it match the ERROR signal?
3) Why is the VEXT (output of the PI), not reflecting the relationship of its inputs?

Overall, I am able to achieve VOUT control by varying the REF, so the overall objective is achieved, but I have no idea why my PI controller and the XL4016 are suddenly not working.

Note: they work just fine when the buck converter has no load attached, and no VOUT feedback to the system (I use a fake VOUT/SENSE input in those cases).


texts: Received waveform frequency is way too low than it was sent

texts:
I am using Quartus 12.1 sp1, vhdl and Altera Nios II programmed in C code for DE0-Nano Development. Basically, what I have is, data is sent from fpga vhdl block to NIos II system, Nios II system sends the data to serial port, Matlab access the serial port to real time plot the graph.

In my system, the rate the graph is plotted is much slower (11Hz) than the rate the processor speed (50MHZ). So I do some buffering and send the data for plotting afterwards.

I am buffering data received from fpga vhdl say 1000 sample points and save it in sdram... after saving these 1000 sample points, the C code will send data to uart so that Matlab can access these serial port data and plot the graph real time.

Please refer to this image:

My problem is, a complete cycle of sinewave obtained from fpga is with a frequency of 50Hz, so it should be having a period of 0.02 seconds instead of 0.16 minutes as I got now, I don't know what could be the problem? Forgive me, I am newbie to signal processing.. Thank you.

int max_sample = 1000; //number of sample points wanted

if (a_out_data==1) //check if it is the beginning of a sinusoidal waveform?
{

for(i=0;i<max_sample;i++)//start the process of buffering data
        {
vref_data = IORD_ALTERA_AVALON_PIO_DATA(vref_base); //read a single value of reference voltage from fpga
*(pSDRAM+i) =vref_data; //save this single value in a location of SDRAM specified in SDRAM_U1_BASE
        }
}

for(i2=0;i2<i;i2++) //start the process of sending data to uart for all data saved previously
    {
        data16=*(pSDRAM+i2); //access each value from SDRAM

        //send data to uart before increment i++
    }


texts: Accessing rows of an array using variable in Verilog

texts:
I have a module I'm writing in Verilog that effectively contains a 16 by 10 2D array. At a given point and "row", what I want is to have that data pushed to a net that can be read outside of the module, however, when I attempt to use a variable input to determine which row I want my synthesizer returns these errors:

Error (10734): Verilog HDL error at FontRom.v(12): ROW_NUM is not a constant

The error is pretty clear, but now I'm not sure how I can access different parts of the array if I'm not allowed to use a variable. Also, typically when I need to preload a reg with data I have a reset condition that does it, do I have to do the same thing in this case also? Below is my code. Thank you.

module FontRom(CLK, CHAR_IN, ROW_NUM, DATA_OUT);
   input    wire  [7:0]  CHAR_IN;
   input    wire  [3:0]  ROW_NUM;
   input    wire         CLK;
   output   reg   [0:9]  DATA_OUT;

   parameter   char       = 2'h48;
   parameter   font_value = 40'h000008120481204813FC81204812048120400000;

   reg [0:159] char_font  = font_value;

   always @(negedge CLK)
      if (CHAR_IN == char) begin
         DATA_OUT = char_font[2*ROW_NUM:2*ROW_NUM+10]; // +10 due to Big Endian
      end
      else begin
         DATA_OUT = 8'bZZ;
      end
endmodule


texts: How to safely dispose of a damaged lithium ion battery?

texts:
I replaced a lithium ion battery in a device and the old battery is swollen/bulging but no otherwise damaged.

My municipality (NYC) requires many retailers to accept batteries or devices containing them but I am concerned that none of them can safely handle a damaged battery. I asked one retailer if they would accept my damaged battery and they told me that they would simply throw it away (which is expressly prohibited by city law) because they have no way to safely store or handle damaged batteries.

I have read from various sources that immersing the battery in salt water for an extended period of time (ranging from 1 day to 2 weeks!) will discharge the battery and that lithium (ion?) batteries that have been completely discharged can be safely thrown away with household trash.

But then other sources claim that the salt water can corrode the contacts of the battery's cells sufficiently to prevent complete discharge, thus rendering the battery both not completely discharged (and thus capable of thermal conflagration) and not capable of being discharged by any means.

So how could I safely dispose of a damaged lithium ion battery myself?

The NYC Special Waste Drop-Off Sites seem like my best bet in terms of someone else safely disposing of the battery but the info about those sites on the city's websites are worryingly vague or silent about whether they accept damaged batteries.

I don't want to assume that any of the organizations or institutions that are legally required to accept batteries are capable of safely doing so for my damaged battery. Given that one retailer has already told me that they would (illegally) dispose of the damaged battery, I'd like to know how to safely dispose of the battery, or at least render it (mostly) inert, myself.

Here's a very related question:

batteries - Storing a possibly damaged Li-Ion battery

A bunch of example links:

Safe Disposal | 2BFly
No one wants my damaged lithium-ion battery | sqwabb
How would one dispose of a ruptured or exploded lithium ion battery? : electronics


texts: Which sensor should I use to recognize just humans? (not all of the obstacles)

texts: I would like to make a social distance meter and the device should only avoid from humans, not the obstacles. I'll use an ultrasonic sensor and a PIR sensor but I'm not sure it will be enough. Do I need to use a temperature sensor too? But not sure how I can implement the temperature sensor from social distancing approach. Do you know any specific sensor or method to detect only humans?


texts: How efficient are micro turbines in generating efficent energy?

texts: Would one large wind turbine be more efficient than many small wind turbines in theory?


texts: What does limit transferable power through a transformer?

texts:
Assume that there is a transformer as in the image above. The applied primary side voltage \$E_1\$ is always AC. We design the transformer so that the magnetizing flux \$\Phi_m\$ does not saturate the core. Any \$I_2\$ current that will be drawn by the load on the secondary side will generate \$\Phi_2\$ flux in the transformer core and \$I_1\$ current at the primary side. And this \$I_1\$ current will generate a \$\Phi_1\$ flux, which will be equal to \$\Phi_2\$ in both magnitude and phase, but in opposing directions. Therefore, \$\Phi_1\$ and \$\Phi_2\$ will cancel out each other, and the net flux in the core will always be \$\Phi_m\$ at most.

(This is what I know about working principle of transformers. Please correct me if I did any mistake.)

What limits the practical load current in a system like this? According to what I explained above, we can theoretically draw infinite current from the secondary side, because \$\Phi_1\$ and \$\Phi_2\$ will always cancel out each other and the core will never saturate or excessively heat up. I understand that the copper losses will be a limiting factor. But my question is rather about the magnetics of the system. So, please assume that the wires are perfect conductor, and the AC source is ideal.

What physical factor does limit the maximum transferable power through a transformer like this?


texts: DALI optical isolation of signal, but no power isolation?

texts:
The DALI standard suggests a separated power supply, because the DALI control lines are not galvanically isolated, so mains voltage may appear on the lines (and the standard suggests that DALI devices should tolerate this).

The most commonly-followed application note I see is this: https://www.mouser.de/applications/lighting-digitally-addressable/

It has optoisolators providing 3.7kV isolation, but it also directly powers the DALI lines.  In this situation, what's the point of the optoisolators?


texts: Parallel connection of old and new gel batteries

texts:
I have a battery system shown in the picture, 6 parallel branches of 4 batteries connected in series.
The first 3 consist of old batteries which are 2 years old, the fourth branch consists of 1.5-year batteries, and the last two branches are made up of new batteries. Each branch contains a battery balancers.
Can someone explain how batteries will work in this system if the charge/discharge cycle is 1 day? How batteries are charging (do they get full capacity)? What should I expect? Please give your recommendations. Thank you in advance for your answers.
PS I hope each answer will contain facts, because I already browsed the Internet, and got very confused. Everyone says the opposite things.
UPD1:

In the diagram above you can see the battery voltage and current.

This diagram shows the bus state.
Equipment that I use is Victron Quattro 10KVA, Victron smart MPPT 100A, Fronius symo 5 kW, diesel generator 7,5 kW. 24 PV panels 270W connected to Victron smart MPPT and 24 PV panels 265 W connected to Fronius symo.
UPD2:

This is a fully autonomous system not connected to the grid.


texts: Relay(or Alternative of relay) without pull-back feature

texts: Generally relay triggers when current passes through its coil. When current stops flowing, moving terminal of relay is pulled back into the default situation. I need relay, once triggered, to remain in that situation only regardless of the current. In short, I want the relay without spring. I am pretty sure that this kind of relay doesn't exist, but there must be a component which satisfies this requirements. I mostly work on Digital and FPGA side, so I don't have enough knowledge about Analog.If anyone can suggest me a component which fits here, it will be very helpful for me


texts:
I purchased a 5 Meter flexible waterproof Digital Addressable RGB LED strip from Lee's Electronic (A local electronics store). The strip uses LPD6803 (datasheet) and I have purchased a 6A 12v power supply.

Adafruit has a LPD6803 library on github. The library was designed for AdaFrute's 20mm Clear Digital RGB LED Pixels. Using the example code that came with library, I connected power supply and the Arduino UNO

Here is an image of the connector on the RGB LED strip. I connected the C1 (green) to Arduino pin 3 (clock). I connected the S1 (Red) to the Arduino pin 2 (data), and Gnd to the Arduino ground.

After I upload the sketch to the Arduino and connected the power. All the LEDs turn white. I played with the sketch a bit but I was unable to get it to do anything but ALL white.

After some googling I found an alternative libary FastSPI_LED that also supports this chip. Set up the example and had the same problem. All white.

Next looked in to the data sheet and found that this chip uses a 32 zero sequence at before it starts the sequence for the different colors. So I used ShiftOut on the arduino and shifted out 32 zeros followed by a sequence of other values. All white.

I'm not sure what to try next.
Suggestions, comments, thoughts?


texts: Can PWM safely be considered as effectively lowering voltage?

texts:
Specifically with LEDs which need constant current more than voltage. I'm using those 30V,  100 Watt LEDs (which strangly draw less than 1A) and due to using four 11V batteries in series to power them they need to be "dimmed' to 30 volts. My voltage regulators are only rated for 35V, so would a microcontroller's PWM with a MOSFET be a safe form of protecting the LEDs from would could otherwise be over voltage/current?

I don't know if flickering could be an issue, but it doesn't matter too much to me and I could research how to include capacitors and/or inductors to reduce it.


texts:
I'm planning to power the circuit from a micro usb charger rated 1.8A. The peak current for the circuit is 1.5A but if the charger is not providing enough current I can use PWM with e.g. a 50% duty cycle, then the average current should be 0.75A (half of 1.5A).

I suppose to average out the current so that to the supply it looks like a constant 0.75A I need a capacitor. Provided the PWM is at approx 1.5KHz with 320uS ON and 320uS OFF and the voltage is 5V what type and value of a capacitor should I use on the input (preferably a smaller size)?


texts: Soviet Russia components need identifying

texts: I have a KO D-8e Soviet engine which was made somewhere between the 60s and the 90s is USSR. I'm trying to bring it to life and need to find what are those 2 dead components in series. They have no markings on them, except a black dot at one end and my guesses are that they're either diodes or capacitors.


texts:
can I use a schmitt trigger to drive LED with USB data lines D+ and D-?
I use a USB2.0 Full speed.
Thank you,


texts: Sensor For Continuous Water Level Measurement

texts:
I am designing water level controller for water tank and want to show the water level in LED bar Graph

I know how to transmit data to MCU and show level to LED bar graph but my problem is to find the sensor for continuous level measurement i searched in google and find out that there are floating switch type device which track discrete level.
But that will not measure the continuous level of water and i also came across ultrasonic sensors that measure the level continuously

Is ultrasound sensors are reliable and efficient method?

My other question is what type of other sensor are available that can measure water level continuously and efficiently?


texts: Does anyone know of a way to control two sets of switches at once?

texts:
I would like to control the two switches in the picture at the same time.
So for example when the left switch is in position 1 the second switch is also in position 1.
Is a 2-pole rotary switch what I'm looking for?
Also sorry if the way I used the schematics for the switches doesn't make since.
Basically I want the switches to select between different resistor branches.


texts: Why does the 555 timer have a maximum frequency of 2MHz?

texts:
according to the website, the 555 timer has a maximum frequency of 2MHz. Why is it not less or more? What property of the timer makes the limit of the frequency?
Website:http://groups.ist.utl.pt/lee/SUBA/Suba_files/555/555ncsu.htm


texts: Is there any way of making this circuit simpler?

texts:
I had earlier asked a question, Will this circuit for quiz buzzers work?, in which I got a very good answer (The first one).

But I have some problem in that circuit and I am not able to make it properly.

The main problem is that in order to make that circuit, I need to set the resistor values very accurately. For example you can check it in this simulation. If the resistor values are not correct even by the difference of a few ohms, it will not work.

The second problem that I have is that this circuit is very complicated and it is difficult for me to get so many components. I have to make the circuit for 8 teams and so I will need lot of diodes. I don't have so many diodes.

So can you tell me some method to simplify this circuit?


texts: I have a few 12v LED lights that run off cigarette adapters. I wanted to be able to use my 18v drill batteries so I pulled the guts out of an old charger and added a cigarette socket. The lights work fine on 18v and are rated 12v-24v. My question is would adding a regulator to limit the voltage 12v give me longer battery life or just be wasted as heat?


texts: Can I PWM this electromagnet at audio frequencies?

texts:
The pictured electromagnet will be PWM'd at 12V / ~100-500Hz.

The goal of PWM-ing the electromagnet is to vibrate a metal bar in close proximity, whose fundamental frequency is the same as the PWM frequency.

This all looks OK in the simulator, but based on other questions and my limited knowledge it

Might not be possible due to the inductive load of the electromagnet
Might require a flyback diode
Might benefit from an H-bridge to reverse the electromagnet's polarity and double the amount that it "pushes" on the metal bar. (Edit: In this case I'd attach a permanent magnet to the bar as well, so that reversing the electromagnet pushes instead of pulls. Forgot to mention this initially)

The primary question is: How do I tell if this PWM'ing strategy will work? Hook it up and see if it gets hot? Can I measure the inductance in advance to figure it out via math™?

(I can split this up if mods prefer, but the basic level of what I'm asking makes me think that it might be best as-is.)


texts:
I built the following weight system using a  Load Cell and Hx711.

I am using an Arduino UNO and running the calibration sketch in HX711 library.
However, I noted one interesting behavior that you guys might have come across. My serial output from the Arduino IDE console is accurate in the beginning. Then, as time progresses it slowly starts to decrease. This is even further evidenced when I remove the object, and instead of converging to zero it goes to negative.
Would this indicate faulty load cell behavior, problem with the structure that holds it, the wiring, or just the nature of the sketch which is to simply calibrate? The reason for this question is that before I begin to write the code for this load cell application, I want to make sure it is accurate. Also, I attach a picture of my connection so we can discard this source of error and brainstorm.Thanks.


texts:
It is known that a generic harmonic electric field which propagages in free space has an elliptical polarization (if you want to read the proof, look at this, slides 72 - 99).

My question is: what about the polarization of E and H fields in a waveguide or a transmission line? I have always read about elliptical, circular and linear polarization for electromagnetic waves in free space, but I have never heard/found something referred to guided waves. So, I'll say that waves in waveguides are simply linearly polarized. But:

I do not know if this is true. I have never read also the sentence "Waves in waveguides have linear polarization".
I do not understand why we cannot have elliptical polarization in waveguides. As you may see from the slides is the consequence of the harmonic behaviour of E and H fields, which is described by the wave equations. In theory, it is true also for waveguides...


texts: How is BLE data converted to UUID (and how can i convert it back?)

texts:
I am developing a BLE Android application that can receive small messages from a beacon. As a test I am letting the beacon increment a counter and send this as a string (service_data=str(counter)).

I see that the data I am receiving is changing but I do not know how to interpret it. I hoped someone could help me out on this part.

The first message I get is:
mServiceData={00003031-0000-1000-8000-00805f9b34fb=[]}
which I assume is 10 (0x30 0x31)

This then starts counting up until
mServiceData={00003839-0000-1000-8000-00805f9b34fb=[]}
which I assume is 98 (0x38 0x39)

However, after this the ServiceData changes and starts using the array(?) at the end:
mServiceData={00003031-0000-1000-8000-00805f9b34fb=[48]}

Can someone explain how I can get the original string based on this ServiceData?


texts: Extremely low data rate transmission over long distance for attinys

texts:
For a lighting project I need to be able to trigger 20 units every couple of seconds independently which are daisy chained with 1-2 m space between each of them like so:

Control station ====== Unit 1 ====== Unit 2 ====== Unit 3 ....

Every unit has an ID and I need to be able to trigger it with a response time of <500ms, no other data needs to be transferred.

Every unit has an Attiny25V. Ideally, I would like to prevent adding ICs for communication. I can spare a maximum of 2 pins for communication on the Attinies.

How can I connect a few Attinies with a digital bus if they are spaced far apart?


texts:
I'm working on a board where I will need to mechanically enable/disable some functionality/portions of the hardware.  I would like to have the functionality of a DIP switch (see below) but it feels so 1980s.

It seems out of place next to all my ultra-miniature leadless package parts.  Has anyone come across anything more "modern" looking and that won't require me to use a fine-tipped pen to switch?

Additional Info

The switches are for an in-house test board (meant only for internal engineers)
I (the people paying me) would prefer it to cost as little as possible (so there is no time for me to implement any software solutions)
The switches will be infrequently changed from states (some only a few times in their life)
Size is a moderate concern.  If it is too big it will look awkward next to all my small parts (and possibly make my board top-heavy)


texts: Reducing variable voltage to a lower variable voltage in a dc circuit

texts:
I have a Lithium Ion battery pack which has an output voltage ranging from 42v to 58 volts.

I'd like to connect a voltage display to this so that I can view the batterys relative state of charge.

The voltage displays I've seen on ebay and such (which can be used to measure up to 100v) require a voltage of between 5v and 30v to power them.

Is it possible to connect a resistor in series with the voltage display to reduce the voltage from the battery to the voltage required by the display?

Thanks,

John


texts: DC Biasing a signal and what prevents the signal going to the power supply?

texts:
I have seen some schematics that deals with audio inputs, with this kind of circuit to DC bias a signal. The signal enters on the left side of C and gets out on the right side of C and goes to the amplifier.

But this is the problem. What prevents the signal going up R1 to the power supply and interfering on other parts of the circuit?

And if I have left and right channel I will have other pair of resistor for DC offset of the right channel and as R1 of both channels are connected to V+ and R2 of both channels are connected to ground, if a signal could go to the power supply it could reach the other channel.


texts: Meaning of symbol on LED screen price tag

texts:
I wanted to know the meaning of a particular globally-used standardized symbol printed on the price tag of every led screen.
Here is the symbol:


texts: I've been working on the electrics for my van and wondered if anyone could help me. I just accidentally touched some foil bubble wrap insulation to a piece of the van's metal work and it started the spark! This doesn't seem good to me. I disconnected my leisure battery and split charge relay but my multimeter is still reading that the van body has a voltage of 12.5v. Is this normal or have I done something wrong? Thanks in advance


texts: PIC12F675 - 2 input 2 output 'XOR' output

texts:
I am facing a peculiar problem or this is known to others which you can help educate me.

I'm running the below code on a PIC12F675, but the conditions never seem to work. Tried it on hardware, and also simulated the same in proteus, same result.

The problem - only one of the input toggles the output and not the other.
Example - In my code GP1 and GP2 are inputs. When GP1 toggles, GP2 doesnt. If i reverse the bits or connections, when GP2 toggles, GP1 doesnt.

I just have 4 lines of code with if and else if, but not sure where am i going wrong. Spent more than 12 hours to figure out and finally posting it here. Any suggestions / advise please?

// PIC12F675 Configuration Bit Settings

// 'C' source line config statements

// CONFIG
#pragma config FOSC = INTRCIO   // Oscillator Selection bits (INTOSC oscillator: I/O function on GP4/OSC2/CLKOUT pin, I/O function on GP5/OSC1/CLKIN)
#pragma config WDTE = OFF       // Watchdog Timer Enable bit (WDT disabled)
#pragma config PWRTE = OFF      // Power-Up Timer Enable bit (PWRT disabled)
#pragma config MCLRE = ON       // GP3/MCLR pin function select (GP3/MCLR pin function is MCLR)
#pragma config BOREN = OFF       // Brown-out Detect Enable bit (BOD enabled)
#pragma config CP = ON          // Code Protection bit (Program Memory code protection is enabled)
#pragma config CPD = ON         // Data Code Protection bit (Data memory code protection is enabled)

// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.
#define _XTAL_FREQ 4000000

#include <xc.h>

void main(void)
{
    ANSEL = 0x00; //disable analog inputs

    TRISIO1 = 1; //GP1 is input
    TRISIO2 = 1; //GP2 is input
    TRISIO4 = 0; //GP4 is output
    TRISIO5 = 0; //GP5 is output

    OPTION_REGbits.nGPPU = 0; //enable internal weak pull up resistors
    WPU1 = 1; //pull up enabled on GP1 INPUT
    WPU2 = 1; //pull up enabled on GP2 INPUT

    while(1)
    {
        if(GP1 == 0 && GP2 == 0) { GP4 = 1; GP5 = 1; } //if both the inputs are low, keep both the outputs high
        else if(GP1 == 0 && GP2 == 1) { GP4 = 1; GP5 = 0; } //if GP1 is low, keep GP5 low and GP4 high
        else if(GP1 == 1 && GP2 == 0) { GP4 = 0; GP5 = 1; } //if GP2 is low, keep GP4 low and GP5 high
        else if(GP1 == 1 && GP2 == 1) { GP4 = 1; GP5 = 1; } //if both the inputs are high, keep both the outputs high
        __delay_ms(100);
    }
}


texts: Unsure of how to find the equivalent resistance of the following circuit due to the input resistance of the LM386 amp

texts:
My questions:

How do i find the voltage across R3 for diagram 1? Do i have to take into account
the input impedance of the LM386 amp (The second amp in the circuit schematics) or can i ignore it and just use the
voltage divider rule (V=Vin*R/(R+C)), where Req is the equivalent
resistance of R2 and R3. If i can ignore it is the equivalent resistance just going to be R2 + R3.
Is the amp always going to have a 50 k ohm impedance or is it
going to change depending on the input voltage going through the amp?
For my high pass filter to remove the dc component, will my cutoff frequency change due to the input impedance of the lm386 amp or not significantly? I.e do i have to take this value into account when finding the cutoff?
For diagram 3, how would you find the equivalent resistances. Also so for the 1st circuit in diagram 3 is R3 parallel to R2, then in series to R1? Then for the second circuit in diagram 3, to find the equivalent resistance is it just in series so they add together?  Note R3 is connected to an amp in this case.


texts: Easiest way to send basic data from Android to ESP8266 through WiFi

texts:
I'm not really familiar with network protocols, but my application is very simple:

The ESP8266 is connected to the phone's WiFi hotspot (so they're both on the same network).
The phone sends 1 (as in 0x1) to the ESP8266 periodically (at ~4 Hz).
When the ESP8266 receives 1, it turns on an LED for a small period of time.

Would a simple HTTP request work well enough? Or are there other methods more suited for my application?


texts:
I'm trying to detect when 24vac is flowing between the "R" and "Y" terminals on my central air conditioner's thermostat using an Arduino Mega2560.

I know from the answers to earlier questions posted here that the MID400 would work well for this purpose... but when I searched for it on Amazon, it looks like it falls into the category of "niche chip that's only available from international sellers, with really long delivery times".

Are there any functionally-equivalent alternatives that might be easier to get quickly and cheaply, either in DIP or breakout-board form? Or is the MID400 a "one of a kind" chip that doesn't really have any nice direct equivalents?

Just to be clear, I don't need to measure the AMOUNT of voltage or current. I just need to be able to observe and detect WHEN 24vac is trickling between the R and Y terminals on the thermostat because a relay inside closed the circuit. The Arduino's logic level is 5v, but a solution that was equally capable of working with 3.3v i/o would be even better (in case I someday decide to replace the Mega2560 with an ESP32).

If it simplifies things, the thermostat circuit's ground/common is available as well.

I considered just trying to stick a relay with a 24vac coil between the thermostat's Y terminal, on the theory that the flowing current would energize the coil along the way to triggering "Y" on the air handler's control board itself, then detecting the state of the relay's contacts using the Arduino. The problem THERE is:

The thermostat (a Carrier Cor) is directly powered by the R and Common thermostat wires
Relay coils have nontrivial current draw
I'm not confident that the combination of the above two concerns wouldn't cause the thermostat to experience brownout & be prone to reboots, or cause  the air handler control board to unreliably detect the closure of R to Y.

For what it's worth, I also have a "clamp-around" SCT-013-010, but after ordering it, I got the distinct impression that there isn't nearly enough current flowing through the wire for that particular sensor to reliably distinguish it from "no current flowing at all".


texts:
I have a setup which communicates between PC(windows) and Atmega2560 using UART. On PC side I am using Pyserial. From the PC I am sending a paragraph of text byte-by-byte to Atmega2560.
The UART configuration is : 2400 baud rate;8 bit data;1 stop bit; No parity;
The pyserial code is as follows:

string = "some sample text"
 strobe = serial.Serial('com3',baudrate = 2400)
 for x in string:
    strobe.write(x)
    sleep(0.001)

I used an Oscilloscope to check the UART signal on the RX pin of the MCU, and observed that there was a gap of 15ms between two data frames.
My questions are :

Are the data frames in UART, transmitted successively, i.e. after a stop bit , the start bit of next frame begins?
If the answer to the above question is yes, then is the data transmission speed same as the baud rate?
In the data transmission(from PC to MCU), without the 1ms delay, the data is getting corrupted. Why is this happening?How can I transmit successfully without any delay?

Also I am sending data back from MCU to PC. When I probed the TX pin of the MCU using the Oscilloscope, there was negligible delay between data frames. I beleive that this is because I am using interrupts for transmitting on the MCU.

I am adding Atmega2560 Code here:

volatile uint16_t address;
volatile char incoming;
uint8_t in_buffer[2000];
void eeprom_write(uint16_t add,uint8_t val){
    while(((EECR)&(0x02)) != 0);//EEPE bit
    cli();
    EEAR = add;
    EEDR = val;
    EECR |= 0x04;//EEMPE
    EECR |= 0x02;//EEPE
    sei();
}
ISR(USART0_RX_vect){
    incoming = UDR0;
    in_buffer[address]=incoming;
    address++;
}
int main(void){
    /*initialization of uart*/
    address = 0;
    incoming = 1;
    while(incoming!='#'){}
    for(uint16_t i = 0 ;i<address;i++)
        eeprom_write(i,in_buffer[i]);
}

The termination of data is indicated by '#'.


texts: Fuse: why does it connect in parrallel with resistor?

texts:
I have a wire in normal condition runs 4A. The device I am using is auto-transformer, and its data sheet recommend to use fuse of 10A. So I went to buy the 10A fuse, and mount it onto a fuse holder. However, my friend recommend to insert a 150k ohm resistor connected in parrallel with the 10A fuse.

I don't know what he is talking about, is he doing this correctly? Why do we need a resistor? In normal condition, can we still use the fuse without the resistor? Because he doesn't seem to know what he is talking about. Please refer to the figure below.

The fuse holder  can be found here


texts:
Could anyone tell me how the noise current component in the red circle is calculated here?

I believe the superposition method is used here but I can't figure out how to get  the second component like that.

Thank you.


texts: When a signal has an interharmonic, is the signal periodic or non-periodic?

texts:
I have some questions regarding interharmonics. What I'm going to do is first ask just a few, and then as people answer them I would expand this post or create a new question.
Harmonics are sinusoids that have a frequency which is an integer multiple of the fundamental frequency of the original signal \$x(t)\$ they represent. Interharmonics (or inter-harmonics) are defined as sinusoids that have a frequency which isn't an integer multiple of the fundamental frequency of the signal \$x(t)\$. First question: in that definition of interharmonics, is it assumed the signal \$x(t)\$ is periodic, or not?¹
I mean, yes, we use Fourier series usually for periodic signal, but I haven't read a single text book on math, circuit analysis, electronics, or signals and systems where they talk about interharmonics. Fourier's theorem never talks about interharmonics. The only place I've seen a brief discussion on interharmonics is in textbooks about power quality and harmonics. So this makes me wonder whether interharmonics even make sense, or that's just a term invented without any mathematical proof. So, before I ask further questions, I'd like to know the answer to the first question above.
I have another question. As you know, there're various ways to represent a Fourier series. One is the trigonometric form, other is the amplitude-phase form, and the other is the complex exponential form. Writing the amplitudes (i.e. the maximum values or peak values) of the harmonics in terms of the RMS values, the amplitude-phase form is:
\$x(t) = X_0 + \sqrt{2} \displaystyle \sum_{n=1}^\infty X_{\text{rms,} n} \cos{(2 \pi n f_0 t + \theta_n)} \tag*{}\$
My second question is if when a signal has an interharmonic of frequency \$m f_0\$, where \$m\$ is a non-integer positive number, do we sum it to the previous expression as a new sinusoid \$\sqrt{2} X_{\text{rms,} m} \cos{(2 \pi m f_0 + \theta_m)}\$? If not, then how does the interharmonic analitically contribute to the signal \$x(t)\$?
Note ¹: Fourier series can be used to represent a periodic signal with an expression valid for all time \$t\$, or to represent a non-periodic signal in a time interval \$\Delta t\$.


texts:
What the numbers 1 and 2 mean next to Crystal oscillator in hardware schematics? I tried to search online and went through about 20 lists with component symbols, but non had the numbers nor description about them.

He's a picture.


texts:
Help appreciated identifying part and finding datasheet.

Top reads:

AMI 7838

S2114L2CC (might be a 5 not an S)

Bottom reads:

7835A1

1560

KOREA

18 pin ceramic DIP, gold plated? pins


texts: Contact a very small area (impedance matched)

texts:
In my current project, I want to apply a voltage to a capacitor (top electrode on a thin film heterostructure) very rapidly. Since capacitors have their own charging rate \$(\tau = R \cdot t = R \cdot \epsilon_r \cdot \epsilon_0 \cdot\frac{A}{d} )\$ and the only variable I can access is \$A\$, I need to keep the area as small as possible. In my case, I have 50 ohm impedance, \$ \epsilon_r \approx 200 \$ and the distance \$ d \$ between the electrodes is 100 nm. To achieve a reasonable time constant \$ \tau \$, the area of my nearly circularly shaped electrode should be less than \$30 \mu m^2\$.

In my special case, I want to probe the area of the electrode with a laser shortly after the application of the voltage pulse. Thus, I cannot contact the electrode in the middle or with a bigger wire. In my current plan, I design the shape of the electrode such that it is circular with a tail of 2x2 \$ \mu m \$ and I contact only the tail with a SPM tip as sketched in the picture. However, this is very demanding and I cannot think of an alternative way to contact this small area without violating the impedance match or increasing the total area of the electrode.

Is there anybody with experience in this who can help me? Since I am not an electrical engineer, I would be very grateful, if the answers are as detailed  as possible.


texts: LDO Regulator TPS737xx, connecting Enable to VIN and avoid damage when removing VIN

texts:
I'm designing a PCB that is powered by this solar charger using a 3.7V LiPo battery (maybe I'll have to move up to a 4.2 battery). I want to regulate that voltage to 3.3V for feeding a microcontroller and I've selected a TPS73633DBVT, this is a LDO voltage regulator with fixed 3.3V output and 75 to 200mV dropout voltage.

The datasheet says that I can connect the enable to vin if I don't need it but it also says that stuff could happen if I remove the battery from Vin, which is what I can't understand. It says:

  When shutdown capability is not required, EN can be connected to VIN. However, the pass gate may not be
  discharged using this configuration, and the pass transistor may be left on (enhanced) for a significant time after
  VIN has been removed. This scenario can result in reverse current flow (if the IN pin is low impedance) and faster
  ramp times upon power-up. In addition, for VIN ramp times slower than a few milliseconds, the output may
  overshoot upon power-up.

Could someone please explain me what this means and how can I avoid damage when  the battery is removed?


texts: Measuring AC output of variac with DC voltmeter

texts:
I have variac (Uin=230V, Uout=0-250V, Imax=5A), where I would like to measure voltage on output on a digital voltmeter.
Since I have problems finding digital AC voltmeter 0-300VAC (most of them measure only from ~70V up, but I would prefer form 0V up), I was thinking of measuring voltage with DC voltmeter (these are easy to find to measure 0-300VDC with external power supply of 5-12VDC).
What I would like to do is this:

Gretz is used because of DC voltmeter, where I used cap. to smooth the halfperiods into something more likely DC voltage, while resistor is there to discharge (and for faster changes).
Voltage divider is there to divide the voltage, for when it's 324V (230V*1.41) to show on DC voltmeter 230V DC.

Is this a correct way to solve the problem?


texts: Triggering the 555 timer for a short period

texts:
simulate this circuit – Schematic created using CircuitLab
This is the mechanism which was used in a 555 timer used in the mono-stable mode, it was designed so that even if the switch is closed for an extended period of time it is only momentarily triggered .
I was not able to figure out how exactly it works, and it does since I tried making a physical prototype of the same.
Also I was not able to find this type of trigger mechanism, can anybody let me know what it is called?


texts: How to design an AC current detection switch?

texts:
I am working on a home automation system and I need to detect if an appliance is getting power or not.
I need a AC current detection switch which can be mounted on a power line and send a DC voltage signal as output to a micro-controller whenever it detects an AC current in the line.
I did some searching and found Hall effect sensors which provided detection with isolation but since the magnetic field will fluctuate so will the output.  I need a Hall effect sensor which just gives a DC voltage when it detects a magnetic field from an AC current line and gives a DC output which could be fed to a comparator.
I am a newbie in electronics and work on DIY projects.
I have planned to design my own board to keep the cost low.
Appliances work on 230 VAC and 5 A max current.


texts: How to wire external power supply on stepper motor

texts:
I followed this tutorial to setup my stepper motor.

Now my stepper needs 12V and not 5V. So I was wondering how I can add an external power supply without destroying my pi.

I found this:

But it looks to me like the red wire from the pi is going nowhere.


texts: Capacitive sensor implemented on PCB - possible issues?

texts: I want to implement a capacitive sensor in my design. I'm thinking of doing this by adding two large(-ish) copper areas on my PCB design and using those as the capacitive plates. I would then bond the PCB to the project box with e.g. hot glue or some other method that eliminates the air gap. My issue is that on the same PCB circuit I have a crystal oscillator used to drive an RTC. Would the capacitive sensor/plates cause issues with the accuracy of the RTC? Obviously, the only way to really find out would be to test this, but does anyone know what the theory says about this?


texts: Identify key in a multiple keys, single lock system

texts:
I have a hobby / office project underway.

We want to issue a key to multiple users each with a different pin pattern. Upon turning the key we want to identify the key and thus the user.

My google fu has so far failed me, does anyone have any ideas for craftinig a solution or a product that could be repurposed?


texts:
I need to interface two high-voltage MOSFETs to a PIC microcontroller.  This normally easily done simply using a MOSFET or bipolar transistor as an inverter.  However, my added constraint is that the high-voltage MOSFETs must be held OFF while the controller is in reset or otherwise not capable of maintaining a logic 1 on the output pin.
I could easily add an appropriate pull-up resistor to the PIC pin but power consumption is also a concern.
My favorite level shifter is a simple cascode circuit as follows:

simulate this circuit – Schematic created using CircuitLab
Can anyone suggest anything less expensive in low to medium quantities (250 to 1000 pcs)?


texts: What's causing a master-slave JK flip flop to get 'stuck'?

texts:
I've built a JK master-slave flip flop according to the following schematic:

Putting it into Logicly I have the following diagram:

However, regardless of which switches I change, the final two NOR gates's outputs never changes. Here's a video showing this:  https://gyazo.com/a8982643c436c6b7084d9a3eca577f13 (with a working gated SR latch above).

Is there a certain properly of this circuit that the circuit-simulator isn't taking into account? Or is the schematic I've created incorrect? I thought creating the master-slave relationship would correct the previous JK-latch error I had.

Additionally, simulating D flipflop seems fine, so curious why the feedback in the JK might be so different.


texts: Pulse-powering heavy loads with a coin cell

texts:
Lithium coin cells are rated for fairly low standard current draws, on the order of 1 to 5 mA. Also, while they allow greater pulsed current draws (i.e., periodic bursts), this appears to be detrimental to cell capacity (and also can cause a drop in the voltage during the pulse).
I am bringing up this topic out of interest in applicability of coin cells for general use-cases (such as LEDs or more recently low-power wireless transmission), so I don't have a specific circuit in mind.
But imagine two scenarios, one a low-duty cycle and one a more demanding case:

Case A: Load draws 25 mA for 25 milliseconds once every 2.5 seconds.
Case B: Load draws 50 mA for 100 milliseconds once every 1 seconds.

I'm interested in an analysis of whether a capacitor-based reservoir can be applied to (and thus, whether it is wise to) run either of the pulse-draw cases above off a coin cell.
Note 1: In both cases, I'm considering a generic situation with Coin cell --> 3.3V Boost regulator --> LOAD [microcontroller + LEDs with series resistors + Wireless module + etc]. And the Cap/Supercap parallel to the load supply.
Note 2: I'm aware that one could use Li-ion/LiPo batteries but they have higher self-discharge (whether due to their chemistry or due to their protection circuitry), so they may not be ideal for, say, a wireless temperature logger that transmits once every hour.
Relevant documents: The following datasheets show various pieces of information, including pulse discharge characteristics, operating voltage vs. load, etc.:

Energizer CR2032 Datasheet
Panasonic CR2032 Datasheet
Sony CR2032 Datasheet
Maxell CR2032 Datasheet

In addition, the following documents discuss some empirical assessment / qualitative discussions about running somewhat large loads (with peak current draw on the order of tens of milliamps) using a coin cell:

TI App note: Coin cells and peak current draw

Nordic Semiconductor App note: High pulse drain impact on CR2032 coin cell battery capacity

Freescale App note: Low Power Considerations for ZigBee Applications Operated by Coin Cell Batteries

Jennic App note: Using Coin Cells in Wireless PANs


texts: Weather/environment sealed connectors, buttons? Sealing an LCD display at the edges?

texts:
Practical question: This controller will operate out in the field, at night, where dew (possibly rain too) is a reality. I need to run a few wires (up to 12 or so, maybe less) between controller and the main instrument, and the connector must be sealed against humidity, obviously. The amperage through those wires is tiny, maybe 0.1 A each, peak.

The 20x4 LCD needs to be sealed around the edge, so that humidity doesn't get inside the box.

There will be a few buttons, maybe 6 or so, on the controller, to drive the menu displayed on LCD, those need to be sealed too.

Finally, there's a DC input connector that will need some kind of rubber cap.

I've not decided yet on the box that will contain the controller. Plastic and aluminum are obvious but not exclusive choices. The total size should be about half the size of a DVD-writer unit for a PC. I'm mentioning material and size only because this may influence the choice of connectors and buttons, otherwise this is not a problem.

Any ideas how to approach this issue in a way that's reliable?


texts: How can I build my own over voltage protection circuit up to 480 VAC

texts:
I am rigging up a portable test panel, will be using a true-meter APM that will do up to 600 VAC or 600 VDC.  I would like to be able to use it to measure typical U.S. 120 VAC or 240 VAC and 480 VAC.  Looking for recommendations on how to build a simple economical circuit such that a fuse would blow if input voltage exceeds ~500 VAC or 500 VDC.

For 480 VAC, is that RMS so would peak voltage be 679 V and would that matter or make things more complicated in building a fuse-able circuit that would trip? The sole purpose being I'd rather blow a $1 fuse than my $70 volt meter.