texts:
Need to shift 3bytes each in RAM buffer to the next 3 RAM locations in a circular manner. The below code is ok, but is there any compact method to do it?

;cblock 40h
                L1,L2,L3
                L4,L5,L6
                L7,L8,L9
                L10,L11,L2
                L13,L14,L15
                L16,L17,L18
                L19,L20,L21
                ;
                L22,L23,L24
                L25,L26,L27
                L28,L29,L30
                L31,L32,L33
                L34,L35,L36
                L37,L38,L39
                L40,L41,L42
                endc

Shift_Buffer_3X_Up
                movf    L1,W
                movwf   Temp_L1
                movf    L2,W
                movwf   Temp_L2
                movf    L3,W
                movwf   Temp_L3
                movlw   L4
                movwf   FSR
                movlw   .13
                movwf   Rotate_Count
Shift_3X_Up_Loop    movf    INDF,W
                movwf   Red
                incf    FSR,F
                movf    INDF,W
                movwf   Green
                incf    FSR,F
                movf    INDF,W
                movwf   Blue
                movlw   .3
                subwf   FSR,F
                movf    Blue,W
                movwf   INDF
                decf    FSR,F
                movf    Green,W
                movwf   INDF
                decf    FSR,F
                movf    Red,W
                movwf   INDF
                movlw   .6
                addwf   FSR,F
                decfsz  Rotate_Count,F
                goto    Shift_3X_Up_Loop
                movf    Temp_L1,W
                movwf   L40
                movf    Temp_L2,W
                movwf   L41
                movf    Temp_L3,W
                movwf   L42
                return


texts: Is it a mistake in AD725 and other datasheets?

texts:
During my research of the RGB video and encoders I see two ways chip manufacturers/circuit designers treating the outputs (several examples below):

AD725 (Analog devices): capacitor then resistor

THS7314 (Texas Instruments): capacitor then resistor

CXA1645 (Sony): resistor then capacitor

THS7374 (Texas Instruments): resistor then capacitor

From the first glance the function of both configurations must be the same: connection is in series thus order must change nothing. But it seems this point of view is wrong.

Datasheets of CXA1645 and THS7374 state the following:

CXA1645:

  Use care when connecting an external resistor to the 75Ω driver output pin. A capacitance of several dozen picofarads at each pin may start oscillation.
  To prevent oscillation, design the pattern so that a 75Ω resistor is mounted near the pin.

THS7374:

  The stray capacitance appearing directly at the THS7374 output pins should be kept below 20-pF. The best way to ensure this limit is maintained is to place the 75-Ω series output resistor as close as possible to the output pin. If an output capacitor is used, as discussed in the next section, then it should be placed after the resistor.

Datasheet of the THS7314 does not mention these requirements.

Datasheet of AD725 states the following:

  The output amplitudes of the AD725 are double that required by the devices that it drives. This compensates for the halving of the signal levels by the required terminations. A 75 Ω series resistor is required close to each AD725 output, while 75 Ω to ground should terminate the far end of each line.

I am sorry, how I can place this resistor close to the output if there's huge electrolytic capacitor between the resistor and the pin?

Well, I would not be so much worried about the order and this uncertainty, but THS7314 states the following:

  The only requirement is to make sure the video line has proper termination in series with the output – typically 75-Ω. This helps isolate capacitive loading effects from the THS7314 output. Failure to isolate capacitive loads may result in instabilities with the output buffer potentially causing ringing or oscillations to appear.

Do I understand it properly that putting electrolytic capacitor to decouple outputs before series resistor is wrong design approach? And the order matters?

What is the correct approach/order of components, and why?


texts: What do these two omega's say about this filter?

texts:
I've got the filter that's given in the picture below, they calculate the pole and the zero of the transfer function but what do these two values for omega say, is it kind of a cut-off frequency? (kantelpunt is Dutch and if I translate it literally it means 'tipping point')

Notice that, for the omega:

$$|\text{s}_{\text{z}}|=\omega_{\text{z}}=4\cdot10^4\text{rad/s}$$
$$|\text{s}_{\text{p}}|=\omega_{\text{p}}=8\cdot10^3\text{rad/s}$$


texts: Anyone either read japanese or know about laying tracks for a micro SD card slot?

texts:
I'm trying to include a micro SD card slot in a project I'm working on and I'm having a little trouble with the datasheet.
Unfortunately I don't read japanese.

Just wondering what the text says in the 3 Shaded boxes on page 2:

https://www.molex.com/pdm_docs/sd/5031821852_sd.pdf

Can I run PCB tracks under the shaded region back to my processor?


texts: What's the motivation in using Verilog or VHDL over C?

texts:
I come from a programming background and have not messed around too much with hardware or firmware (at most a bit of electronics and Arduino).

What is the motivation in using hardware description languages (HDL) such as Verilog and VHDL over a programming language like C or Assembly language?

Is this a matter of choice?

I read that hardware, which has its firmware written in an HDL, has a clear advantage in running instructions in parallel. However, I was surprised to see discussions expressing doubts whether to write firmware in C or Assembly (how is Assembly appropriate if you don't necessarily have a CPU?) but I concluded it's also an option.

Therefore, I have a few questions (don't hesitate to explain anything):

Can a firmware really be written either in HDL or in a software programming language, or is it just another way to accomplish the same mission? I'd love to have some real-world examples. What constraints result from each option?
I know that a common use of firmware over software is in hardware accelerators (such as GPUs, network adapters, SSL accelerators, etc). As I understand it, this acceleration is not always necessary, but only recommended (for example, in the case of SSL and acceleration of complex algorithms). Can one choose between firmware and software in all cases? If not, I'd be happy to know the cases in which firmware is clearly and unequivocally appropriate.
I've read that the firmware is mostly burned on ROM or flash. How it is represented in there? In bits, like software? If so, what's the profound difference? Is it the availability of adapted circuits in the case of firmware?

I guess I made a mistake here and there in some assumptions, please forgive me. Thank you!


texts: Determining dimensions of Vivaldi antenna for 80-330 MHz operating frequency

texts:
I am new at designing antennas. I got tasked to determine the dimensions of Vivaldi antenna for the operating frequency range 80-330 MHz.
I have some doubts regarding antenna design:

If I say that I am designing an antenna for 80-330 MHz then I calculate center frequency i.e. 205 MHz then I calculate dimensions of antenna as a function of the wavelength of the center frequency (as in this case,) is this correct?
How can I determine the bandwidth after calculating dimensions at 205 MHz (center frequency?)

For my project I am following this prototype:

reference to both : this


texts: Voltmeter scaling resistor front-end and ADC calibration coefficients

texts:
I'm designing a voltmeter and current measurement system that forms part of a electronic load. Lets tackle the volt meter first.

I'm using a 16-BIT ADC (AD7708) and want to measure the following voltages see below, the ADC is pretty neat for DC applications and is used in the BK8500 instrument.

Here us what I want to achieve.

0.1V to 25V ( A resolution of 1mV with an accuracy of 0.05%)
0.1V to 120Vmax ( A resolution of 10mV with an accuracy of 0.05%)

I've written the painful driver code (based on the datasheet) that does all initialization start-up routines like zero calibration, internal DSP filtering, ADC gain and single ended operation mode. So far so good, it works, as I can measure good accuracy against my Fluke 87V from 1mV to 2.5V (ADC FSD)
Note: The ADC is using a external precession 2.5 Volt Reference (ADR421) and powered using a low noise power supply (DP832).
http://www.analog.com/media/en/technical-documentation/data-sheets/ADR420_421_423_425.pdf

Question 1

I'm confused as to how to design a scaling resistor front-end with a suitable gain amplifier for the 25V range and 120V range.
so far my attempts are failing, the resistor divider ratio I used to scale for 25V are 100uV per 1mV  for R1 = 18K and R2 = 2K (Where R1 and R2 presents a simple resistor divider)
Are there any good examples I can use as a guide for this sort of design?

Question 2

How does a design incorporate calibration coefficients, is there a standard design for this?
How much ADC coefficients are required to influence a measurement? Is it across the entire measurement range or only for low resolution readings.?


texts:
I just brought GPS module "Global-Top GMS-U1LP".
I want to setup it for its UART configuration.
In data-sheet there are 4 different ground but I am not able to trace which ground corresponds to which power input or for data.
Gms-u1lp dtatsheet
So with lot of doubt in mind I made following setup.

Is this configuration correct?

original setup according to data-sheet is as below:

Does anybody know how to setup this GPS receiver IC?


texts: What's the relationship between samples and bits?

texts:
I was talking to a friend today that I have a transmitter which is capable of sending 128 samples/second. Note that each sample is a voltage level represented by a floating point decimal. He then insisted that I call it a 7 bit system since 128 is 2^7.

What useful information can I possible get from representing the samples/second in number of bits? What can each bit physically represent?


texts: Leading edge blanking does not depends on primary leakage inductance?

texts:
Here are the following advices for designing the leading edge blanking of a flyback converter. There is also the schematic:

It tells us that there is reverse recovery current which occurs from the output rectifier diode, I suppose or from the snubber diode (which is not represented on the schematic). If they are considering the output reverse recovery current of the rectified diode I do no think that It will be high as in general the primary has a higher turn number than the secondary. (There is reverse recovery diode only in CCM mode, no?)

It does not mention about primary leakage inductance too? If the flyback works in CCM mode it should have an influence on the voltage spike, no? By contrast, it mentions about leakage source inductance.


texts: Combinational Logic Design, Truth table and K-Map question

texts:
This question is for logic computer designs, I hope it's okay to post it here. It's actually a very simple question I guess.

In this screenshot below, how did they implement the K-Map from the Truth Table? it's a bit confusing to me, if it was 1 output I would know where to place the 1's on the K-Map.

Note: I found this question on the internet.


texts: Why does a single RC network does not provide 90 degree phase shift?

texts: In an RC phase shift oscillator, we are using three RC network to produce 180 degree phase shift. Can't we use two RC network to produce a 180 degree phase shift?


texts:
I am designing a PCB that will have LoRa communication using the SX1272 , currently I am using the Reference Design for both 868 and 915MHz (image below).

But the BOM attached is missing components for C14, C19 and C20. I couldn't find the values for those components on any app notes or design references, also, I had access to a dev board for the SX1272 and I noticed that both the capacitors C19 and C20 are not mounted on it, so I'm assuming this should be impedance matching components and not needed for 50 Ohm antennas. Am I right to consider it?
As for the C14 I still could not find any reference to what value should it have or how can I calculate it based on my PCB design. Any help is appreciated.


texts: How to connect electric door bell connection to Node MCU

texts:
I have a electric door bell ( which is powered with Double AA batteries) , when the visitor presses it , it rings , plain simple .

I am thinking to remove the electric bell , and feed that input to ESP-8266 for digital input...

i want to understand what i would need to interface the input from button push to  ESP8266 pin


texts: Protecting a circuit from the effects of a capacitor's charging

texts:
During its first outing, I managed to burn out the (control circuitry) of two of the batteries connected to my LED jacket (see this, this and this question for context.) I thought I should have been well within spec for the total current I was drawing, so I'm now wondering if it wasn't the total, but just how quickly I was trying to draw it (the draw is quite "peaky".)

In order to mitigate this in the next iteration of my design, I was thinking I could put a few hefty (10,000µF?) capacitors  across my power bus. But I understand that they will draw a large amount of current themselves while charging. Can I prevent this by putting a resistor in series with each capacitor?

What resistor values would be appropriate if the voltage across the bus is 5V and I am using four 10,000µF capacitors? Or is there a better way to limit the current drawn by the capacitors on startup?


texts: PNP Transistor getting damaged frequently

texts:
I am working on below schematic:

+42VA is 42 V DC and +42VAO is also 42V DC when PNP Transistor Q1 is ON. When Q1 is ON, load on +42VAO is 10 mA max. OPTO used is P181.

But it is observed that Q1 (CXT3906) is getting damaged frequently.

I can see in datasheet that VCEO and VBEO max is 40V and VEBO is 5V. Is this main reason of Q1 failure?

Base is also connected to +42VA through R76(100K) and R77(100k), so for base maximum voltage which is the voltage I can check in datasheet?

Is there any reason for Q1 failure other than this OR how can I Improve it?
Thanks in advance.


texts: The Rules And Tricks Use To Find The Equivalent Resistance

texts:
To find the equivalent resistance we use different tricks and rules to simplify the circuits. But I have confused on the basics of using those techniques.
I breifly searched in google to find the common techniques which can use to simplify a complex circuit but I can't understand how do those techniques not differ the initial circuit.
A Common technique is folding the circuit on a vertical or horizontal line;
`

But what is the basic of folding it on that line?
What are the requirements for folding the circuit for simplify?  and
**
How is it not differ the initial circuit after folding on that line?

**
I expect a theoretical answer. If you can add an example and describe it. it will more beneficial.


texts: Calculating the acquisition time of a sample and hold circuit?

texts:
I've learning about analog to digital converters. I came to read about the acquisition time of sample and hold circuit. But it confuses me. Can anyone help me to learn how to calculate the acquisition time of a sample and hold circuit ?

simulate this circuit – Schematic created using CircuitLab

Let's say we have a 8 bit SAR,
Resistor value = R;
Capacitor value = C;

How do we calculate the acquisition time ?

(Do not bother about the Op-Amp)


texts:
I have two servos which take from 7V to 8V and I want to deliver this voltage from 12V batteries 4200 mAh.
I have tried using voltage divider but the result was so bad, I had 2V after applying the servo (load ).
What is the simplest way to deliver this amount of voltage without consuming a lot of current?
(I need a lot of solutions because sometimes I don't find the hardwares in my country.)


texts: why is parasitic inductance of secondary coil is ignored

texts: let's visualize a transformer. Transformers consist of 2 coils, primary and secondary coils and both these coils possess some parasitic inductance. When we try to do some impedance matching, we look at the effective resistance seen by the voltage source to which primary coil is connected. And we must take primary coil's parasitic inductance into account for better results but we dont do the same for parasitic inductance of secondary coil. I dont understand why. Can you explain?


texts: How to clean "no clean" flux with a 3L ultrasonic cleaner

texts:
I am doing some small batches of PCBs, like 100 each time, using solder wire with no clean flux core.

I am using this solder wire.  The datasheet recommends IPA and water at 60º.

Usually, I clean it with 99% IPA alcohol. I mean only that (no water,) I fill my small ultrasonic cleaner with alcohol, clean 90 seconds, then I use a toothbrush to clean a little, then again another 90 seconds

But now, I got a 3L ultrasonic cleaner. I like it because I can heat whatever is inside, but I dont know how to proceed.

I don't think that using 3L of 99% IPA will be a good idea. It is a waste of money (it is like 10 USD per liter for me), and it is very very volatile. So, I don't think I can keep it for a while in a room.

What do you suggest? Can I mix with some water? AFAIK, IPA will lose cleaning power with water fast.

If I use some distilled water, how much do you think I can use?

Do you think I can use some kind of detergent or something?

I know that there are products for this, but I checked in many places and, are forbidden to ship to Spain, or they are very expensive.


texts: What's the best shape and material for my Wi-Fi range booster dish?

texts:
I want my wireless LAN to be available in an apartment that is 459 feet (140 m) across. I'm thinking about putting a router (bridge) that has an omnidirectional antenna on the roof of my apartment, somehow reflecting the signal from the antenna (making it directional) and pointing it (AS ACCURATELY AS POSSIBLE) at a Wi-Fi USB stick put on the roof of the other apartment. The stick would obviously be connected with a computer below with a USB cable and have some sort of means of reflecting the radio signal as well.

I'm seriously thinking about using this http://www.garneczki.pl/media/img/products/kpbig_70cd79520389c4303cd639c80bf65f.jpg as a dish (yeah, I know, it's a ghetto project but I want it either cheap or not at all).

Is it worth a shot? Is the half-spherical shape a good choice (mind you, I want the beam narrowly focused)? Is my project doomed to a failure?

The diameter of the hi tech "dish" I'm planning on using is 7 inches (18 cm) and it's made of "stainless steel". Sorry if this is a stupid idea and I'm wasting your time. Just let me know why.

Thank you.


texts: Do dependent sources work in two directions?

texts:
For example if i have a voltage controlled voltage source and between the output terminals of the voltage controlled voltage source is an independent voltage source.

simulate this circuit – Schematic created using CircuitLab

Will the voltage source now work reserved? Putting 0.5V over R1? Or is there a very high current trough the wires of the right part due to the very small unmodelled resistor of the wire.


texts: Modification of Speaker-System to operate at 12VDC (Logitech Z903)

texts:
The aim of this modification is that the speaker system (Logitech Z903) is working with 12V input (don’t worry about the Amps).

The power supply of my Loudspeakers has an Input of 220-250VAC @50Hz 550mA
It transforms it to 45.5VDC, 12VDC and 5VDC.
My plan is to use a non-branded chinese boost-converter to reach the 45.5V (like this)
The only problem I face is that the original power-supply-PCB is connected to the main-PCB not only to share the power (1st picture).

The other connector (8-pin) has the following Pin-names printed on the board (values measured by using an oscilloscope - with connected 8-pin-cable):

TEMP3 (3rd picture 3.3VPeak, switch-off: 0V)
TEMP RET (same as above)
nPWR_OFF (5.4VDC, switch-off: 0V)
GND
PSSYNC2 (same as 2nd pic but 385kHz, switch-off: 0V)
PSSYNC1 (2nd picture 3.3VPeak, switch-off: 0V)
GND
+3.3V KEEP ALIVE (3.3VDC always)

If I just pitch-off the 8-pin connector - the voltage supplied to the main-board remains the same, but the system cannot be switched-on anymore.
Just wondering what I could do that the system runs without the 8-pin-cable connected to the original power-supply-pcb.

The “switch” is a button connected to the main-board.

Any hint is very much appreciated!


texts: Impact of reduction on Dynamic energy and dynamic power in microprocessors

texts:
A microprocessor has been designed to have a dynamic switch which reduces power consumption when the loading reduces. Assuming a reduction of 20% in voltage reduces clock frequency by 20%. Calculate the impact of this reduction on dynamic energy and power.
Help please


texts: I'm thinking of ideas for a school project and one of the better ones was to build a calculator from scratch using only wire and basic electrical components. I've seen very many marble, Lego, domino, etc calculators that involve AND, OR, NOT, etc logic gates, but I wanted to make one purely electrically. I've seen some say that this is a very difficult project, but I have a couple months and I'm intermediately experienced in electrical engineering and have 6 or 7 EE projects under my belt. My problem is that I can't find diagrams anywhere for basic logic gates, only transistors, which feels like cheating. Any and all help is appreciated. Thank you!


texts: Why can't all data be sent across 4 wires?

texts:
I am aware that USB uses a positive, negative and D+/- wires in order to transmit data. The twisted pair are used to negate the effects of interference and electronic noise.

I also understand that a cable needs to be thick enough to carry the necessary current, and connections need to be made properly so that high frequency signals are not reflected etc. Based on my limited knowledge I believe this is due to AC impedance being proportional to frequency.

However, presuming a high enough quality cable, and a fast enough chipset to handle the data, is there any reason why we cannot connect all common devices over such a 4-cable system? (Ignoring the user experience)? Could PCI-E and all other digital serial interfaces be replaced by a fast enough USB like system? If not, why?


texts: Small-signal analysis of inductor/capacitor

texts:
The small-signal model (SSM) of a resistor is obviously the same resistor. Here I got a problem with understanding what SSM of inductor and capacitor would look like. Here's my analysis and please correct my if you see something wrong in my analysis:

To find SSM of the inductor we develop our model and write small-signal voltage as follows:
\begin{eqnarray*}
v_L=L\ \frac{d i}{dt} \\
v_{SSM}= \frac{\partial v_L}{\partial i_L}.i_L\\
v_{SSM}=\frac {\partial (L\ \frac{di_L}{dt})}{\partial i_L}.i_L\\
v_{SSM}=\frac {\partial }{\partial i_L}(L\ \frac{di_L}{dt}).i_L=L\frac{d}{dt}(\frac {\partial i_L}{\partial i_L}).i_L\\
v_{SSM}=L \ \frac{d}{dt}(1).i_L=0
\end{eqnarray*}
So I infer that the SSM of the inductor is much the same as that of a voltage source, which is shorted out. Similarly for the SSM of the capacitor one can show, through the same kind of analysis, that
\begin{eqnarray*}
i_{SSM}=0,\
\end{eqnarray*}
which says that the SSM of a capacitor behaves like an open to our circuit model. Do you think that my analysis is wrong? Where is the bug in my reasoning?

Best


texts: What happens to the output if ADJ pin of a linear regulator is grounded?

texts:
I am trying to understand the output voltage of a circuit made using LT3014 LDO regulator.
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/3014fd.pdf
The circuit is pretty simple. Input is 28V, and ADJ pin is connected to GND, which is a little confusing. What will the output voltage be in such a case? On the output is a 7.5 Ohm load resistor through which it is connected to a pressure sensor.
While I am asking for this specific regulator here, I believe there is a fundamental thing that I am perhaps missing.
Could anyone please help?


texts: Bipolar Junction Transistor Base-Emitter voltage

texts: I've seen several datasheets for Bipolar Junction Transistors providing the value of the Base-Emitter voltage at saturation with values way above 0.6~0.7V (Example). What exactly does this entail? I had the notion that the voltage drop from base to emitter was similar to a forward biased diode, ~0.7V, independently of the Base-Emitter voltage.


texts:
I am driving a red LED with a forward voltage of approx. 2V as shown in the picture. The driving signal comes from a microcontroller with a logic HIGH of 1.8V. The LED is being sourced from an independent supply of 3.3V. The circuit works but there is something in my measurements that I cannot explain.

I measured 3 mA through the LED branch. I need more current through the LED (about 10 mA would be ideal). Then I reduced R1 in steps until I had about 10 ohms. Yet the current in the LED did not change much. Sometimes I measured about 8 mA at the beginning of the measurement which after some seconds ended up in 4 mA.

Why is this happening? I also reduced R2 but it seems to have no effect either.
How could I increase the LED using a control signal of 1.8V and powering the LED with 3.3V?


texts:
I need to deal with a peak load at 5VDC and about 11.25A but I'm not sure how to manage this.

I have 5 individual loads of 2.25A and small loads from an MCU and some LEDs all of which should fit into the 12A. Another requirement that I have is that power supply can be placed in a sealed enclosure so that it can be placed outside and not have water get in. I suppose an aluminum case might help with this.

I am not quite confident enough to build my own power supply. Dealing with mains is a bit scary. I've found some a RC car battery charger power supplies that will supply 14VDC @ 16A (Turnigy T-20Pro). They have fans in them which wouldn't do much being in a sealed enclosure. My though was that I could use simple 5V linear regulators for each of the 2.25A loads and another for the MCU and LEDs.

What alternatives do I have and/or what trouble am I going to run into?

UPDATE:
I wasn't explicit about the power source, sorry. It will be 120v 60Hz AC.

UPDATEv2:
Most of the load (5x2.25A=11.25A) will be outside the enclosure as the project is a LED Christmas light controller.


texts: Is it possible to have 16 simultaneous PWM outputs on a 64-pin STM32F4 device?

texts:
From the STM32F405xx/STM32F407xx datasheet, I read that (at least) TIM2, TIM3, TIM4, and TIM5 have output compare units that can be configured to produce PWM signals on 4 channels each. If one configured the timers like this:

TIM2: PA15/PB3/PB10/PB11
TIM3: PC6/PC7/PC8/PC9
TIM4: PB6/PB7/PB8/PB9
TIM5: PA0/PA1/PA2/PA3

One would achieve sixteen simultaneous PWM outputs, is that correct? Is there something I've overlooked? Is there some reason that this is not possible, or not advisable?


texts: STM32: I2C works only sometimes with Interrupts

texts:
I'm working on a little project where I need to read the HMC 5983 Sensor with I2C from a STM32F103RB Board.
When I tested the sensor with the Hal_I2C_Master_Transimt, everything worked fine. I could restart this program a thousand times, and it worked every time:
while (1) {

         Kompass_buffer[0] = 0x03;
         RET = HAL_I2C_Master_Transmit(&hi2c1, Kompass_ADDR, Kompass_buffer, 1, HAL_MAX_DELAY);
         if (RET != HAL_OK) {
         Error = I2C1->SR2;
         sprintf((char*) Serial_buffer, "Error Transmit %i \r\n", Error);
         HAL_UART_Transmit(&huart2, (uint8_t*) Serial_buffer, strlen((char*) Serial_buffer), 200);
         }
         RET = HAL_I2C_Master_Receive(&hi2c1, Kompass_ADDR, Kompass_buffer, 6, HAL_MAX_DELAY);
         if (RET != HAL_OK) {
         Error = I2C1->SR2;
         sprintf((char*) Serial_buffer, "Error Receiver %i \r\n", Error);
         HAL_UART_Transmit(&huart2, (uint8_t*) Serial_buffer, strlen((char*) Serial_buffer), 200);
         }
         Kompass_X = ((int16_t) Kompass_buffer[0]) << 8 | Kompass_buffer[1];
         Kompass_Z = ((int16_t) Kompass_buffer[2]) << 8 | Kompass_buffer[3];
         Kompass_Y = ((int16_t) Kompass_buffer[4]) << 8 | Kompass_buffer[5];
         Kompass_print();

         HAL_Delay(200);

But ass soon as I want to use I2C with Interrupt or DMA, the Output is sometimes 0 or 740, and I need to restart the program until it works.
I know about the busy flag problem with these boards, but why does it work without interrupts?
I modified the program so that it will print out the SR2 and SR1 Register (in binary) with the Output:
while (1) {
        Sr1 = I2C1->SR1;
        Sr2 = I2C1->SR2;
        X = Kompass_X;

        itoa(Sr1, Sr1_buf, 2);
        itoa(Sr2, Sr2_buf, 2);

        sprintf((char*) Serial_buffer, "X: %i  SR1: %s  SR2: %s \r\n", X, Sr1_buf, Sr2_buf);
        HAL_UART_Transmit(&huart2, (uint8_t*) Serial_buffer, strlen((char*) Serial_buffer), 200);

        HAL_Delay(500);
}
////Interrupts/////
void HAL_I2C_MasterTxCpltCallback(I2C_HandleTypeDef *hi2c) {
    RET = HAL_I2C_Master_Receive_DMA(&hi2c1, Kompass_ADDR, Kompass_buffer, 6);
}
void HAL_I2C_MasterRxCpltCallback(I2C_HandleTypeDef *hi2c) {
    Kompass_X = ((int16_t) Kompass_buffer[0]) << 8 | Kompass_buffer[1];
    Kompass_Z = ((int16_t) Kompass_buffer[2]) << 8 | Kompass_buffer[3];
    Kompass_Y = ((int16_t) Kompass_buffer[4]) << 8 | Kompass_buffer[5];
    Kompass_buffer[0] = 0x03;
    RET = HAL_I2C_Master_Transmit_DMA(&hi2c1, Kompass_ADDR, Kompass_buffer, 1);
}

Ant the Output was this when it worked:

And this when it didn't:

I hope someone can help me.
Best regards


texts: LTSpice: Silicon diode substitution improves Schottky clamp simulation

texts:
I'm simulating this circuit in LTSpice:

The input is a 1 Mhz square wave with 10 ns rise and fall times. Plotted are the input, output as well as transistor base voltage.

Now here is what happens if we replace the Schottky by a 1N4148 silicon diode model:

It is substantially nicer! The rise time is much more steep, leading to a nice flat top. Furthermore, the off voltage is closer to zero.  This niceness is also more robust against component changes.

If the simulation were realistic, why would we ever use Schottky clamps, so it can't be right.

What is wrong in the simulation?

Is it that this type of Schottky is not appropriate for the circuit (being a large-ish rectifier diode?) Or something else?

Update: Indeed, the issue with the rise time is simply that the Schottky model is a heavyweight. Scrolling through LTSpice's list of available Schottky diode models, I found one BAT48WJ.  The results with this diode look a lot more reasonable in terms of rise times:

Still, the question remains is the result with the 1N4148 realistic?


texts:
I understand binary code is stored in the ROM area of an MCU. Typically most MCUs have FLASH EEPROMS. Is this really the NAND type FLASH storage we find in most SSDs?

If not, what are the differences?


texts: Charge a 6S Li-ion pack with a boost converter

texts:
Hi fellow makers and engineers,

I'm trying to charge a 6S Li-ion battery pack (6 NCR18650B cells in series) using a rectified DC voltage of 16 Volts and boosting it to about 25.2V to charge the pack using a DC to DC converter stated HERE. Currently I'm getting a very low charging current to the pack (about 20mA) and I would like to understand why and how I could fix it so as to achieve a higher current. I know it is common practice to use some kind of PCM to protect the pack from over charging, etc., but I am trying to follow a simple approach to charging the pack and I'm monitoring my cells to disconnect power manually when max limits of cells are reached. Essentially I'm trying to achieve what is described in this lecture by battery university.

Is my approach correct or is a more sophisticated approach like a CC-CV algorithm crucial? Is the algorithm necessary to achieve a proper charging current for the pack? Any help is appreciated.


texts: How to deactivate Li-Ion battery charger

texts:
I have a USB device, which does have a Li-Ion internal battery in it. The device charges the battery when plugged into a socket.

However, I don't want that battery to be used at all, I do prefer that the device only works when the device is plugged into a power socket, and uses power supply to power itself.

Battery type is Li-Ion, fully charged around 4.2V, other specs unknown.

I already tried to replace the battery with jumper cable, thinking that if the battery charger wouldn't detect voltage drop, it would fool the device to stop charging. Nothing happened however, and the device didn't turn on with power cable on.

Also tried to run the device without the battery, didn't work.

Ideas how to replace the battery from the circuit?


texts:
I'm asking this here in the interest of figuring out why this happened, and how to fix it. Feel free to suggest different tags, or a different stack. That said...

The power went out the other day. No idea why. Anything sensitive  (smart TV, game console, computers) we on surge protectors, and they were all fine. However, the cheap coffee pot (has a clock, and a timed brewing) is now running fast. We set the clock this morning about 7am, and now its about 3 hours fast.

What about a power outage, possible surge, could cause a digital clock to start running fast? The coffee clock was perfect before the power loss.

If needed, there was a smart TV on, and a PS3 on when the power went out, as well as some lights and an alarm clock. The alarm clock is fine, it has no surge protector nor does the coffee clock.

Edit

I'm going to try "power cycling" the coffee pot. Unplug for an hour, and see if that helps. ... this is a weird problem I've never seen in commercial clocks before.

Edit 2
About to plug the coffee pot back in. I'll set the time correct now (about 2334), and will update in the morning if it's keeping correct time.

Final Edit
So I power cycled the coffee pot, and now it's keeping correct time. I'm not sure what happened to make it run fast, but now it's working fine.

I'm not sure if I should leave this question here, since on the one hand, there really isn't a real answer, yet on the other hand, the existing answers do still provide some interesting information.


texts: Rewriting PIC configuration bytes at runtime

texts:
My device is the dsPIC33EP64MC202.  I have a bootloader which loads a program in flash to run or erases and rewrites that program as directed by serial commands.  If possible, I would like to account for the possibility of changing the shared configuration bytes in the future, but it seems that might be impossible without a physical programmer.

From DS70618C (dsPIC33E/PIC24E Family Reference Manual), Section 30 (Device Configuration), 30.2.1.1:

  Erasing the last page of program memory will automatically enable code protection, which
  prevents further reads or writes to program memory. As a result, it is not recommended to
  perform a page erase on the last page of memory where the Configuration bits are stored.

Given that erasing the page with the configuration words triggers code protection, how do I change the configuration bytes in my bootloader?  I have tested erasing that page and writing new values to 0xAFF0 - 0xAFFA. Sure enough, only the original, unmodified values are there (before and after reset).


texts:
I posted a question earlier,

How to measure AC voltage without a voltage divider using microcontroller

and I got some very useful answers, one of those was to implement this for isolation

http://www.edn.com/design/test-and-measurement/4344950/Optocoupler-simplifies-power-line-monitoring

I am having trouble understanding the circuit in the link above, so I need a help.

I dont understand why is a 3.3V reference used here at both the isolated and non isolated side of the circuit? The 5V is for the opamp which I totally get but why 3.3V and also with what ratio should R1 be changed to cater 220VAC? How are the gain values calculated here?


texts: ZVS induction heater modules keep failing

texts:
I built several induction heaters based on the popular ZVS module available everywhere.

They all work fine with a 20mm coil diameter.

But the performance improve drastically with a 12mm coil diameter ; The problem is that the modules fail, but in a very peculiar way : When activated, 4 times out of 5, everything is OK, the control LED shines brightly, and the heated element gets to the desired temperature (around 220C) very rapidly. But 1 time out of 5, the LED seems to flicker very rapidly and faintly, and if the current is maintained, just as no heat is produced by the coil, one of the two MOSFET burns.

If, at that time (right when I see the LED flicker) the current is stopped, everything is fine, just press the switch again, and it works.

Note that I'm using heavy gauge wires and switches, just to eliminate those as a potential point of failure. I'm using 12V / 5A PSUs.

I tried shortening the coil wire to reduce the number of turns, but the problem persists.

How can I solve this problem, or turn around it? How can I at least make the ZVS module fail safely?


texts: Xilinx Line  has not enough elements for target  for the file with more than one line

texts:
I have a file each line of which includes two 9 bits inputs. Here is an example of this file:

input_vectors.txt:

001111000 001100000
001111000 001100000
001111000 001100000
001111000 001100000

I want to simply read the inputs of each line and assign them as the inputs to an adder. The signals input_a_fp and input_b_fp are connected to the inputs of the adder and I assign the inputs read from the file to these signals. When I declare just one line in the file above, everything is fine and the result of the adder is ok. But, for more than one line, I get the error:

  Line <read_line> has not enough elements for target <input_b>

I searched and found that this error can be fixed by adding the line: exit when endfile (file_input_vectors); before the read function and after the readline function. I have already added this line but the error appears again when the file includes more than one line.

The code for reading the file is as below:

process
    --variable declaration
    variable read_line : line;
    variable write_line: line;

variable input_a     : std_logic_vector(8 downto 0);
variable input_b     : std_logic_vector(8 downto 0);

variable space_char: character;

--process definition
begin
        if input_clk'event and input_clk = '1' then

         file_open(file_input_vectors, "input_vectors.txt",  read_mode);

         while (not endfile(file_input_vectors)) loop
                --read a line and its components --> input_a input_b
                readline(file_input_vectors, read_line);
                exit when endfile (file_input_vectors);

                read(read_line, input_a);
                read(read_line, space_char);
                read(read_line, input_b);

                input_a_fp <= input_a;
                input_b_fp <= input_b;

        end loop;

        file_close(file_input_vectors);

    end if;
end process;


texts:
I have a basic question concerning ultrasound A-scans. Such an A-scan might typically look as follows (source: https://img.medscapestatic.com/pi/meds/ckb/18/7418tn.jpg):

I understand that the x-axis is the time axis but I'm unsure about the y-axis. In the literature, I can find that the y-axis and the amplitudes of the signal represent the "intensity of reflected sound" but what's the unit of this intensity? Or to put it in other words: What would an amplitude value of, say, 0.2 actually mean?

Thank you very much.


texts: Levelshift distorts when freq is higher than 4kHz

texts:
I 'designed' this circuit to shift a level coming from an arduino to -5/+5v signal. It simulates well in EASYEDA.

I also built it on a breadboard with a symmetrical powersupply and signalgen giving me a sine signal of 5v (0 - 5v).

It all works well up until a 4kHz, but above this frequency the output becomes like a triangle (it obviously is distorted to a triangle.)
Taking the input back to a sine of eg. 3v makes it more of a sine again, but obviously the signal at output is also less than the wanted -5/+5v.

Why does the signal distort when its quicker than about 4kHz? I want it to be clean up to 16kHz.
Could someone shed some light on this for me please?

(the scope shows 2 and 10kHz sine, yellow is input, blue output)

UPDATE: replaced the LM358 with a TL072, works properly now.


texts:
I want to generate PWM/PPM signal with external supplied carrier e.g. for 'outphasing' AM transmitter (for educational purposes). Convetional methods of PWM generation implies that carier signal has some fixed frequency. Typically PWM/PPM modulator has a ramp voltage generator that is designed for some known frequency. As far as I can understand, changing the input frequency will result in change of amplitude for that ramp voltage thus changing the modulation index. So, changing carrier frequency in wide range is impossible without some reconfiguration of modulator.
Is there any 'classic' circuit for doing this job? The best thoughts I have is to add some kind of 'AGC' for ramp voltage or for modulation signal. There also some crazy digital I/Q stuff, but maybe there is a simple way?


texts: I need an output of 882.3 mV in the highlighted node. According to my calculations the output must be that with Vin=15, R1=17K and R2=1k. So there must be something wrong with how the circuit is wired. What I’m not doing right?


texts:
FM Crystal Radio

L -  4 turns #18 copper or silver wire, 12mm inside diameter, tapped at 2.5 turns

Ant - 7 inches of #18 bare copper wire

C1 - 18 pF ceramic capacitor

C2 - 50 pF air variable capacitor (? for 93.5MHz)

D - 1N34 diode or rock crystal

R - 150K resistor

How to tune simplest FM at 93.5MHz radio station by fixed value of C1 (18pF), C2? (any formula would very helpful so that I can tune to any radio station)
Can I use diode 1N4007 instead of 1N34?


texts:
I want to learn about the RSTP,STP supported network switches.
As I know, the BPDU frames have 802.3 Frame Structure.

For example switch have aa:bb:cc:dd:ee:00 base MAC address.
When I check the some BPDU frames on the port 2 of the Network Switches (3COM RSTP supported switches) with the Wireshark networkanalyse programs, BPDU have like this frame:
DA: 01:80:c1:00:00:00 (BPDU specific address)
SA: aa:bb:cc:dd:ee:02 ( Although switch MAC address is aa:bb:cc:dd:ee:00, than BPDU have port information end of the MAC address 00+02 = 02)
Besides that I know that, switches save the other device in ALU table ( Address Lookup Table) by looking Source Address (SA). So How are these things handled by RSTP switches?
If RSTP switch looks the Source Address any incomming frame, its ALU table have many MAC address with other device's port MAC address and other devices base MAC address. For example if there is another switch and it's baseMAC address is aa:bb:cc:dd:ee:02 , it will be problem in Network. How switches work to prevent this ? How does table saves, (or doesnt) frames like BPDU?
When I doing custom ethernet switch with http://ww1.microchip.com/downloads/en/DeviceDoc/KSZ8563R-Data-Sheet-DS00002418B.pdf I have a problem about this subjects


texts:
I am powering a 1m strip of these with a Spark Core (which is like a small web-enabled Arduino if you're not familiar with it). Right now everything is working swimmingly on my workbench, but I'm looking forward to when it is in the field, and I want to know if there's any way for the controller to detect the status of the strip? In particular, I would love to know if the strip is connected and working and ideally how many pixels are present. I'm expecting the answer to be no, but I'm no electrical engineer and maybe there's some magic I'm not aware of.

Also, what's a good primer on things I should be protecting against (the EE version of defensive programming, I guess)? The circuit is just the Spark Core, the NeoPixels, a protective resistor and a capacitor as described here (https://learn.adafruit.com/adafruit-neopixel-uberguide/best-practices). Currently it's powered by USB, but will eventually be powered by an adapter connected to mains.


texts: can I use DC battery cable rated at 600A to connect a 63A main AC breaker to a 40A RCCB in my distribution panel?

texts:
I've read that for low voltage (less than 400V) applications, that the main difference between DC and AC wire is basically in the (temperature) rating of the cable sheath. If this is true, then the heating of the wire should be proportional to the amount of current and its gauge/X-sectional area, right? It then follows that using a larger diameter wire.... in this case 6 gauge battery wire rated for 600A (peak cranking) should be able to be used to connect a 63A mains breaker with a 40A RCCB inside a distribution panel, no? My main motivation is cost. 6AWG/14mm AC cable is expensive esp if purchased in shorter lengths, which I would only need for wiring a DP. I have some spare battery cables so would very much like to use these as long as I don't risk burning down my house!

Would appreciate if somebody more qualified and experienced could help me with this questions.


texts: External MOSFET to SW pin of Boost converter IC

texts:
I am working on DC to DC boost converter with LM2733 IC
Vin-12V
Vut- 36V, 100mA
IC has max voltage 40V so when turing on power CI get damage due to spike at SW pin.
Can I add external MOSFET across SW pin of the IC?
I refer to attached schematic but not finding how to calcluate R1 res in series with G pin MOSFET.


texts:
Background

I have a NodeMCU and two LCD devices and an ADS1115 on one I2C bus. The LCD devices have I2C backpacks. The NodeMCU is on 5V USB power and internally operating at 3.3V. The other devices are on the second shared 5V power. Ground is shared.

The NodeMCU is using a logic level converter on SDA/SCL to talk to the rest of the I2C bus.

I have 10K Ohm resistors on SCL / SDA to pull up to VCC (the non-USB 5V supply).

Now I have set up a 2N2222 NPN transistor to interrupt or bridge the ground line of one of the LCD screens (LCD1). That turns on or off the LCD and that works.

What I noticed

Now what I noticed is that when I have LCD1 turned OFF using NPN, the backlight of the LCD1 sometimes flickers (once per second).

After some fiddling I found the flicker is related to I2C bus communication between NodeMCU and LCD2 or ADS1115. I just happened to have some I2C bus traffic to LCD2 once per second (to write the time) and some occasional traffic to the ADS1115, once every nine seconds. All those make the backlight of LCD1 flicker when it is turned off using NPN transistor.

I thought maybe this was due to current leaking through NPN transistor, but if I completely disconnect GND line on LCD1 the backlight still flickers. To state this clearly: LCD1 has VCC and SCL and SDA connected but not GND and the backlight is flickering.

So somehow the SCL / SDA cables going into LCD1 function as brief GND lines flickering the LCD backlight. I understand that SCL / SDA communication requires a device to pull the clock line down to GND so I assume at that point it is grounding the 5V power going into LCD1 causing a brief flicker on LCD1.

Questions

Is it expected that backlight of LCD (with I2C backpack) would leak current from VCC towards the SCL/SDA lines?
How do I work around this?

I have seen mention of 33 ohm resistor on SCL/SDA bus (in-line), but I doubt that would help except to slow down the flicker leak.

I have partial drawings, but nothing fully drawn out to show the above situation. I am still bread-boarding it out.

Attaching a very basic drawing done with Falstad, hopefully it helps to illustrate the basics:
diagram


texts: wiring multiple led flashlights to single power source

texts:
Last year we used cheap led flashlights to light our Halloween trail. They worked out well but, we bought a lot of batteries.

What I would like to do is hardwire these flashlights 30 ft apart and use one power source. It would be nice to go 500 to 1000 ft. Those distances may be crazy but I have no idea what is practical. So lets say 15 to 30 of these flashlights wired together.

The flashlights have 24 leds wired in parallel with one 22 ohm resister.

The main idea is to eliminate buying batteries. We hope to use these lights for several years.

So, is this possible, practical, or just crazy.

If it's possible and you need more info, just let me know

Thanks


texts: What resistance should I expect when testing capacitors?

texts:
I'm trying to troubleshoot why my TV isn't turning on and was advised that it might be an issue with a capacitor. There are no visible signs of bursting or leaking on any of them so I've started measuring the resistance using a multimeter, however I have no idea what I'm actually looking for.

Testing a 35V 2200µF capacitor shows a gradually increasing resistance that plateaus at around 730Ω.
Testing a 25V 2200µF capacitor shows a gradually increasing resistance that plateaus at around 4.1kΩ.
Testing a 35V 1000µF capacitor shows a gradually increasing resistance that plateaus at around 9.85kΩ.
Testing a 450WV 150µF capacitor shows a gradually increasing resistance that eventually exceeds the measurement capabilities of the multimeter (2MΩ).

Is there any way to calculate what the resistance should be for a given capacitor? Or what readings would indicate a problem with one?


texts: What is the cheapest sensor that can detect a wall regardless of color?

texts: I'm making a small toy that will use the sensor reading to avoid colliding with a wall. Before buying the sensors I want to confirm that can they detect green, pink, or white colored walls.


texts:
I'm working on an ADC design using the ADC12DL080, but I'm a little confused by the datasheet's recommendations for power planes.  The device has a 3.3v analog rail, a 3.3v digital rail (which apparently only powers "error correction"), and a 2.5-3.3V output driver rail that consumes a lot more power than the digital rail.  I'm powering the analog supply with a low noise 3.3v linear regulator.  I'm powering the output driver with the 3.3v Buck regulator output that also powers my MCU.  Both are bypassed as per recommendations.
The information I've found for the digital line is a little more conflicting.  The datasheet shows this:

It continues: "Positive digital supply pin. This pin should be connected to the same quiet +3.3V source as is VA and be bypassed to DGND with a 0.1 µF capacitor located near the power pins".  However, the recommended layout shows this:

That seems to show the digital line going away from the analog supply towards the digital side.  The datasheet for the related adc12l080 is even more confusing, since it also says to use the analog supply, but the recommended layout uses the digital supply. Conversely, this article on the adc12l080 says to use the analog supply for the digital pins (although the drawing it gives also does the opposite).
I interpreted that to mean that at very least using the analog supply for the digital pins was acceptable, although possibly (?) not required. Here are my power planes on a 4 layer board under the ADC chip:

I've extended the analog power plane right up to the edge of the top (digital output) pins and made it extend out to the digital supply pins and under their decoupling capacitor (between the digital power and digital ground pins).  I then ran the output driver power and ground pins to away from the analog plane. Everything has a single, unbroken ground plane.  The digital supply enters at the top of the board (near where the driver pins are heading), the analog supply at the bottom.
This looks ugly, but I'm not sure what a better solution would be unless I were to ignore the datasheet and use the digital supply for the digital pins.  Would it be safer to just run traces to the analog supply and not extend the analog plane?  I get the feeling there is an obvious answer here, but I'm new to mixed analog/digital layout and try to follow the datasheets as literally as possible.


texts: Are microprocessor pin current limits dependent on frequency?

texts:
I have blown a single pin on an Arduino Mega 2560. This is the 'step' pin of the Z axis on a 3D printer. The stepper driver is configured for 64 micro pulses per step (25600 per revolution).

The mechanical arrangement is T10 timing belt on 16 tooth pulley, approx 1000mm/minute  max travel speed, 200step/rev motor geared 12.5:1
This yields a maximum of about 33KHz micro stepping
(I have not been able to measure this frequency directly)

The 'Direction' and 'Enable' pins work fine. The stepper motor controller works fine when presented with a 3-5V square wave from another source.

The rest of the board is fully functional (heaters, other axes, end stops etc).
The fuses have not blown.

The pin is connected to ground via a 470 Ohm resistor and IL74 Opto Isolator. This is connected to the input of a standard industrial quality stepper driver that has similar inputs for Step, Direction and enable. This setup should draw 3-8mA from the pin, well within the 40mA spec. There could be a slightly higher surge (13-14mA) into the capacitance of the optoisolator input.

The Arduino power is derived from a PC power supply 12V rail. The power rails of the PC supply are loaded to 10% of their capacity by dummy loads, and supply at most 30% of their rated capacity.

The motor power is derived from a totally separate power supply, the earths are connected only at the mains wall plug.

The power supplies are plugged in to two wall sockets in a single box.

The circuit has been functioning correctly for 4-5 months with no irregularities.

The cable harness has been checked for shorts using a megger. It is under 1m long standard telephone UTP (unknown capacitance).

Since everything else seems to be in order, I am left wondering if the pin has blown due to overheating caused by 'high speed' switching at about 33KHz.

Is 33KHz considered 'high speed' in this setup?
Has anyone else experienced similar problems with this or other microprocessors ?
Is there a document detailing how to derate microprocessor pins based on their frequency of operation? I can find no mention of derating the Arduino pins in the manuals. Such documentation may exist. I can find no mention of speed / frequency derating of pin capabilities in answers to similar questions on Stack exchange.
Can I supply 40mA for long periods on a single pin at the maximum toggling frequency?
Do I need to consider heating due to switching speeds at this frequency?
Are there other causes I have not thought about that others have experienced?

For completeness

Arduino Mega 2560, Ramps 1.4,  600Watt PC Power supply,  120W 24V
power supply,  Industrial quality opto-isolated stepper controller(Z),  4
off A4988 drivers (X,Y,Extruder),  Marlin software


texts: How can I protect against shorts in low voltage AC ~16V

texts:
I'm looking for a method of protecting a circuit against shorting.

I would rather not use a regular fuse as I expect I will short the circuit (unintentionally) fairly often (probably once or twice each time I use it) and so I would end up getting through a lot of fuses.

I've looked online but all I seem to be able to find are breakers for din rails which are very high current.

I've seen some power supplies which have an LED which lights up if you short them and this is something I'd quite like to go for but I don't know how it was done.

What sort of thing should I be searching for?

EDIT:

Sorry, I was a bit short on details last night when I posted this.

The application is a model railway system.

My intention is to run 16V AC along all the rails and then have a controller board on each train engine with an mcu so that they can have sensors and be programmed.

The reason it could be shorted is because tools and such may be (accidentally) placed across the rails or whatever.

The under normal operation current is going to be anything up to maybe 5 amps.


texts:
I've been working on a project to interface ENC28J60 with an ATmega16A µC. For the sake of debugging I have built a board with UART capability so that I can view the register values of the Ethernet controller chip on my laptop.  I tried to establish communication with the ENC28J60 chip and my µC through SPI and was unable to get any sort of reading even though my code seemed to be correct as per the SPI commands listed in the ENC28J60 datasheet.

Now just to check my SPI code, I tried to establish communication b/w two ATmega16A µC as per this tutorial. But instead of displaying the received value on an LCD, I used UART to send the values to my laptop. But I made the following observations:

each time, the master shows a different received value even though the slave is sending a constant value of 0x11.
Transmission and reception happens only when I take my hand near the circuit and stops as soon as my hand is removed.

I googled about this a lot and found that SPI is highly susceptible to EMI. I took the following measures to reduce errors due to EMI.

I slowed down the SPI clock.
I've put a 470µF capacitor across the Vcc and GND to eliminate noise from the power supply.
I've reduced the wire length of MOSI,MISO and SCK.

What other measures can I take to get reliable and consistent communication over SPI?
And is my MAX232 IC causing a lot interference to my SPI signals?
And will using UART simultaneously with SPI affect the SPI reliability?


texts: How are plated through holes (PTH) made?

texts: I want to know how plated through holes (PTH) are made. Also, what chemicals are used in it and with what quantity?


texts:
I am trying to design a crane load (Weight) measuring unit using motor current measurement technique. For some reasons we can't use load cells here.

Part of schematic I have drawn here

An air core current transformer is used here to convert current into a measurable voltage. I have measured using a DSO 1.4Vrms at no load & 2.1Vrms at full load of crane capacity across 220 ohms resistor. Voltage waveform is sine wave. Points 2 & 3 haven't been tested yet.
A diode rectifier & a low pass filter will convert 50Hz AC into DC. Every crane will be calibrated using standard weights & ADC values will be stored in EEPROM of a micro-controller for ADC value to weight correlation. Linearity of filters & rectifiers won't hamper the accuracy.
A 10 bit ADC with 4.096v internal reference voltage will convert this dc into a value which will be converted into appropriate load (wight) using values stored in EEPROM during calibration in point 1.

I need help in designing a level shift amplifier with following points in mind.

Can convert 1.3v to 2.2v into 0 to 4.096v, non-inverting with minimum opamps (if possible, only 1).
Use of trim pots-resistors combination is required to make finer adjustments at site.
Only 5v VCC supply is available.
If possible, merge 2nd order 5 to 10Hz low pass filter with it. This will chop off AC ripples & provide smooth DC in proportion to CT output voltage.

Even if you have a different approach to crane load (weight) measurement, please share.

Thank you,


texts: Max and Min RC Oscillator Values and what their practical limiations

texts: In this sawtooth oscillator circuit below, I understand that the values of Rs2 and C1 detertmine the rate at which the output ramp charges. As long as this value is the same (220u), it should charge at the same rate. I have experimented with different values and found that simulating at Rs2 = 60K, C1 = 3.8nF, the output begins to have an error (this is the lowest RS2 can go). What would be the cause of this? In the other direction where RS2 is increases, RS2 = 1000kohm, C1 = 220pF there is still no error at all. However I imagine there is some limiting factor eventually to the minimum input current ?


texts:
Assume the easiest circuit with a voltage source U(t), a inductor L and a resistor R in series. The voltage source is function of time.

We can have a differential equation:
$$U=I'L+IR$$

But the thing is, we don't really know the direction of the derivative of I, then it can also be

$$U=-I'L+IR$$

But this two equations have different solutions (at least the homogenous part because the characteristic values are different)

So which one is correct?

It seems that when I do tasks I always just assume I' has the same sign as I. But actually this is not true?


texts:
I need to access sequentially 64 1-wire devices by indexing them, this because i need to know the exact position of those single devices (for example, the DS2401 on position 25 has 000xFFF456 serial).

I've seen the Maxim DS2482-800 that allows me to select up to 8 1-Wire devices...but the part pricing is too high.

Do you guys have some sort of alternative?


texts: How to calculate the modulation register for MSP430 UART?

texts:
I'm using a MSP430F5529 clocked at 1 MHz and want to use the UART at 9600 bauds. So far I did:

void UART_init(void) {
    UCA0CTL1 |= UCSWRST; // Reset the UART's state machine
    UCA0CTL0 |= UCMSB; // MSB first, 8n1 mode
    UCA0CTL1 |= UCSSEL_2; // SMCLK

    // 1 MHz/9600 baud = 104.666.
    // Rounding down to 104 = 9615 bauds

    UCA0BR0 = 104;
    UCA0BR1 = 0;

}

But now I don't understand how to choose the value of the modulation register (UCA1MCTL) so as to get as close to 9600 bauds as possible. The MSP430Fx5xx user's guide, at page 908, proposes to use UCBRS_1, but I don't understand how this value is reached.

How do I calculate this register?


texts: What is the relation between the 5 nanometer process and the end of Moore's Law?

texts:
The 5 nanometer process is expected (According to the Intel Roadmap) to be in 2020. In this Wikipedia article, in the first paragraph, they say that:

  5 nm was once assumed by some experts to be the end of Moore's law. Engineers have since exceeded this theoretical limit by creating 1 nanometer transistors.

Does that mean the number of transistors in an IC will double in less than what Moore specified in his law ? Or something else ?


texts: When are BJTs used in common base configuration?

texts: BJTs are mostly used in common emitter, sometimes common collector configuration. I rarely see common base. When would you use a BJT in common base? For instance, what parameters are different from common emitter?


texts: Instantaneous Transmission, Selective Response

texts:
I am building a system where I need to transfer the exact same data to tens of devices, but I need to get individual responses. I also need to limit the amount of pins required and have as fast as possible transmission.

My current idea is this: Use SPI to communicate to all slaves by tying all the slaves to the same SS channel. That way all slaves receive the same info at the same time. When it comes to receiving data, I would ask for data from each slave through I2C. This way I only have 6 pins to transmit at a rate of 10Mbps and receive data at 400kbps. Would this idea work or is there a better solution?

I need a fast master to slave transmit rate as the data needs to be realtime, whereas the data from the slaves can be a bit slower which is why I chose I2C.

Thoughts?

Extra Data:

Distance from Slave to Master will not exceed 2 Meters maximum. It will be usually much shorter from a distance of several inches.
Slaves Count Will not extend 25
Received Data from Slave to Master will vary. Could be 10 bytes at a time, or it could be 100 bytes at a time.
Transmitted Data to slaves needs to be quick at around 1Mbits to all at once. There is some flexibility.

Thanks!


texts: Would a person receive a shock/risk death if they completed two ends of a neutral wire?

texts:
I know this seems like a silly question but I'm trying to make sure I understand the neutral wire. So I know if someone touched a neutral wire (assuming everything is wired 100% correctly) carrying current, they would not receive a shock because they are at the same potential of the earth which the neutral is hooked up to. However, it is carrying current, which is what causes a shock/kills a person. So in a perfectly wired scenario, say a person grabs hold of the neutral wire exiting an appliance and also the neutral completing the circuit to the end of the source.
(Here is a picture of scenario, all values are completely arbitrary. The 1k resistor represents the appliance while the 1 Ohm resistor represents the person)

Even though this person remains at a single a potential, the current has no choice but to travel through them right? And since current is what kills people, this scenario could be deadly given enough amperage, correct?


texts: Where does electricity go after being used?

texts: For a very long time I have been wondering, where does electricity go after being used?  When I use my tablet it runs from a battery.  Where does the power go?


texts:
I was wondering what the intuition was behind widening PCB traces to minimize the inductance between a trace and its ground plane.
Many high speed design guides cite this without providing much of an explanation.
Shouldn't the loop area between a trace and its ground plane stay the same, despite a broadened trace?

Why does widening the above trace minimize inductance? Ignoring any requirements for current capability of the trace.


texts: Ground attached to negative terminal - where do the electrons come from?

texts:
My question pertains to this circuit:

Not considering conventional current direction, but rather considering actual electron flow: if the negative terminal is connected to the ground, where do the electrons from the other two grounds come from? The three grounds here are not connected to earth ground, so what is exactly happening for this circuit to function? Where do the electrons from the negative terminal actually go?


texts: All LEDs died yet rest of board fine; why?

texts:
I had a board with 3 LEDs, two driven by an AtXmega325e and one simply connected to the rails. The rails are 3.3V, the series resistors 70ohms.

simulate this circuit – Schematic created using CircuitLab

All LEDs stopped working at once, yet the rest of the board (OpAmps, ADC, UART) seemed completely functional. After replacing the LEDs, the new ones worked as intended again, so I must have damaged the LEDs themselves somehow. I am not sure whether they were oriented correctly, but they did not light up (as they normally do (albeit dimly) when measuring the diode drop) in either direction. The diode drop function of my multimeter measured the following (disconnected from the power supply):

forward   backward
1.7V      0.6V      driven by uC
1.6V      0.6V      driven by uC
0.5V      1.2V      power rails directly

The most confusing thing: After dismounting the LEDs they actually worked again. The two IO pins have been in all possible combinations (both on, etc.) but the LEDs never lit up. I lost the datasheet/name, but they are generic orange surface mount LEDs, with a max. current of 20mA (the names in the schematic are wrong). The solder joints looked completely fine, I also find it improbable that all three would be defective.

Do you have any idea what could cause this strange behaviour? How should I investigate this further?


texts: Converting earth signal to 5 V square wave

texts:
I am in the automotive industry. I am working on a little project, where the engine computer originally uses MOSFET to drive an earth to charge up an ignition coil, and by cutting the earth, it fires the spark into the cylinder.

I would like to turn this earth back into a 5 V square wave, so I can use different type of ignition coil, where the MOSFET is built into the ignition coil.

So basically, on the original connector, I have a power supply which can range between 12 V to 15 V generated by the car's alternator. I have a constant earth, and the 3rd pin is the earth signal to charge up the primary coil in the ignition coil.

All I need is a 5 V square wave reacting as fast as possible to the to the earth signal, and will tolerate the hovering voltage of the car's alternator. And the charge time for the ignition coil is generally between 2-5 ms.

I have the basic idea of using a voltage regulator and a PNP transistor to create the signal, I am just not sure of how to build the circuit safely for my application with resistors and capacitors.

Any help would be appreciated.


texts: Minimum current draw of AC to DC converter at no load

texts:
I wanted to know if there is a minimum current draw on the AC to DC converters from the AC source when it is connected to an input voltage of 120V (60Hz), when no load is connected at the output of the converter ? Is this current draw constant ?

For example, if we consider this converter from progressive dynamics,
http://www.progressivedyn.com/power_converters_9100.html

If we consider the PD 9180, would there be any current draw from the AC source for this converter ?


texts: Component manufacturing and placement accuracy/precision

texts:
I am involved in a community project where I need to employ computer vision on common smartphone models (Samsung Galaxy S 5/6/7, iPhones etc.). Doing that involves calibrating the phone's camera for computer vision. People will be using their phones within the project and I wonder whether I may be able to calibrate the camera on given phone models myself and only supply calibration data to the users so they wont have to bother with a camera calibration themselves. The camera's focus will be fixed (probably to infinity).

I think the problem goes back to the smartphone's camera manufacturing precision - if it is good enough, a "pre-calibration" may be possible. The sensor placement within PCB and (autofocus) lens properties are probably in question here. Unfortunately I nave no experience with surface mount large-scale manufacturing process to judge on the precision. I guess the camera modules are probably supplied as a whole which I think could help to keep the precision (sensor and lens are enclosed in a single device which is then places on phone's motherboard?).

EDIT: Simply said - should all the cameras of the exact given model be physically same (both dimensions and placement of lens vs sensor, also same lens distortion) than a single calibration (or say an average from 10 calibrations on 10 various phone pieces of that same model) should be enough for the rest of the crowd (1000s of users) using that model.


texts:
I have been working on my project to detect temperature values using LM35 temperature sensor using an Arduino UNO.  I have used this sensor serval times with no issues. But recently none of my LM35 are functioning properly with all codes I have tried. I am baffled with what has happened with them. My connections are also correct. I have tried to re-wire them but everything is in vain. Can anyone please help me.

And for another one of my temperature sensor it gives about 40 to 55 degree Celsius at room temperature of 26 C.

The connections are VCC to 5V, GND to GND and Signal to A0 pin of Arduino.

Codes I have tried.


texts:
I tried looking and I found that DS1040 capable to generate one shot 5ns but the component already obsoleted. Is that any replacement part for DS1040 or any others IC with same features?

Datasheet: http://pdfserv.maximintegrated.com/en/ds/DS1040.pdf


texts:
For this one eagle drawing, I am not seeing the via option for 1-16 layer. I can only put a via connecting layer 1-2 (see attached). If I try to change layer while routing from top to bottom, I get the layer "can't set via to layer 1 ".

I have not experienced this before. It has to something simple I am missing. Could you please let me what it is, if you do.

Thanks


texts: SIM800L AT+CSQ return 0,0 when SIM is inserted and 20~40 when I insert the sim

texts:
I have SIM800L module,

when I try AT+CSQ it returns 0,0

when I tried to remove the sim and try again it returns number, 0 (25,0)

and I cannot register to a network

so AT+CREG? returns 0,2

should I activate something or do another command before trying to do CSQ or either connect to a network..

when I try: AT+COPS=?

it lists all networks available, but cannot connect to any of them

thank you


texts: During DC restoration of a video signal how is the first sync pulse detected?

texts:
DC restoration of an AC coupled video signal can be performed by clamping to
some reference voltage, during the horizontal sync periods of the video. This
all seems fine in a running system, when the hsync is detected, clamp to the
reference for a short time and everything runs smoothly.

My question is: How is the first sync detected?

Without having DC restored the signal when the circuit starts operating, isn't
the ADC's output unreliable, hence the sync pulses can't be detected?

In fact, the input to the ADC may well be out of specification: Consider the
case of driving an
AD9200,
with a 1v peak to peak AC coupled video signal. The absolute minimum voltage of
the analog sense pin (relative to analog ground) in this chip is -0.3v, with an
unrestored video signal isn't it quite possible that a -0.5v is present on the
analog sense pin? This could be prevented by adding a diode to ground to
maintain a positive difference between ground and the analog sense pin; is this
commonly done?

For reference there exist ICs to perform sync detection, for example the
LM1881. Is it necessary to use
one of these ICs or equivalent circuitry to detect sync pulses prior to any
ADC, or can a more simple solution help with the clamp-bootstrapping?


texts: What are these SMD components with 3 leads?

texts:
Full resolution link is here

I am trying to repair a vacuum fluorescent display module by Futaba model code is M402SD07GS. It is seen that there is no energy on the display and Vcc and GND legs are short-circuited at "C1162" grid/anode driver.

When I look at the circuit to understand where the short circuit is, I am encountered these 3-lead components with very short codes on them.

Since I do not know what these components are, I cannot continue to understand where the short circuit is. I can not order because I do not know the product codes

When I look closely, the following is written on the components.

L G for Q1
332 for ZD1
D3  for D2
D3  for D3
113 for ZD2

Is there a way to figure out what this 3-legged component is?


texts: STM32F4xx - Can EXTI_GenerateSWInterrupt() Wake Up Processor from Stop Mode

texts:
As the title states, can the function EXTI_GenerateSWInterrupt() wake up the processor after it is put into a low-power mode using the PWR_EnterSTOPMode() function?  The documentation says that an EXTI interrupt can wake up the processor from Stop Mode, but I have not had any luck.  Here is how I am setting up the EXTI and NVIC:

EXTI_InitTypeDef EXTI_Init_Struct;
NVIC_InitTypeDef NVIC_InitStructure;

EXTI_Init_Struct.EXTI_Line = EXTI_Line0;
EXTI_Init_Struct.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_Init_Struct.EXTI_Trigger = EXTI_Trigger_Rising;
EXTI_Init_Struct.EXTI_LineCmd = ENABLE;

EXTI_Init(&EXTI_Init_Struct);

/*
some code
*/

NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQn;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);

/*
   more code
*/
static int power = 1;
static int stopMode = 0;
//main loop
while(1)
{
    if(power)
    {
        //this is just a test timer to shut down after 5 seconds
        if(ElapsedTimeLowRes(stopMode) >= FIVE_SECOND)
        {
            PWR_EnterSTOPMode(PWR_Regulator_LowPower , PWR_STOPEntry_WFI);
            power = 0;
        }
    }
    else
    {
        EXTI_GenerateSWInterrupt(EXTI_Line0);
        stopMode = 0;
        power = 1;
    }
}

Now, I would think that as soon as the EXTI_GenerateSWInterrupt function is called in this case, the processor would wake back up almost instantly since it is being called in the next iteration of the loop after being put into Stop Mode.  This is not the case however.  The processor remains in Stop Mode.  Any thoughts?

Note: This is just "test" code until I figure out how to wake-up the processor.  I know I could use an RTC timer to wake the processor up, but the processor could be asleep anywhere from a few seconds to over an hour.

Thanks in advance.


texts: SRAM vs DRAM against single-event upsets

texts:
SRAM basically stores a bit in a flip-flop made of a few transistors, while DRAM stores a bit in a capacitor driven by a single transistor.

Would this mean that SRAM is less likely to face single-event upsets because it would require more energy to cause a bit flip, hence more reliable?


texts: Circuit with sinusoidal voltage source - transient analysis

texts:
I've got this circuit(where u(t) should be calculated in t=3ms):

Where:e(t)=260*cos(wt+25), w=2400 s^-1, Ro=15 ohm, R1=40 ohm, L=12 mH, C=20uF, t1=3ms.

I've got huge problem to form equations (Laplace). All I know is that I should consider this circuit in t<=0 and t>0 so:
t>0 is:

And t<=0 is:

What should I do next?


texts: Voltage vs current vs resistance - did I understand them right?

texts:
I'm currently getting started to learn about electrical engineering, and I'm having some difficulty separating voltage from current.

I have seen a couple of times that a battery is compared to two water tanks, one filled with lots of water, and the other one empty. Between them is a hose that connects them.

Now there is some amount of water that flows through the hose in a given amount of time, e.g. 1 liter per minute. Is this equivalent to current? In other words: Is the amount of electrons that are "transferred" in a given amount of time measured in Ampere? Is this right? So, again in other words: Is current basically comparable to something such as kilometers or miles per hour, so is current the speed of the electricity?

As far as I understood voltage is the difference between the amount of water in the two tanks. So it's like the pressure. In the beginning, when one tank is full, and the other one is empty, the pressure is higher, than after some time, when some water has already flown. Does this mean that the voltage of a 9V battery is only 9V in the beginning of its lifetime, and gets less over time?

Now I wonder about their relationship: If the voltage is higher, it does not necessarily mean that the electrons flow faster, only that there is more pressure behind them to get over resistances. Right?

And, when we are now talking about resistance: A resistance is comparable to someone who steps onto the hose and lowers the amount of water that can flow. Transferred, does this mean that a resistance lowers the current, but not the voltage?

Sorry if all these questions seem to be dumb, but as I said, I'm really at the very beginnings, and I'm trying to get the concepts right.


texts:
I am working on a firmware project in which i have to do a crc16 check for flash integrity.

Controller: MSP430
IDE: IAR EW 5.40 (Linker Xlink)

The crc is calculated using IAR Xlink linker and kept at the end of the flash. Again crc is calculated at run time from the code and compared with the stored value in the flash to check integrity. However, we can only calculate crc on the code segment of the flash memory. It's size may change whenever we make some changes in the code. Can i automate this process which i am manually doing right now?

from the .xcl linker file:

// ---------------------------------------------------------
// CRC16 Essentials: -H for fill,-J for checksum calculation
// ---------------------------------------------------------

-HFF

-J2,crc16,,,CHECKSUM2,2=(CODE)5C00-FF7F;(CODE)10000-0x20A13

Here i need to change the end value of second code segment which is 0x20A13 right now. I get this value from the .map file, i.e on how much memory range my code is residing inside the flash. This is the 1st change i make.

Here i need to make 2nd change from code:

sum = fast_crc16(sum, 0x5C00, 0xFF7F-0x5C00+1);

  sum = fast_crc16(sum, 0x10000,0x20A13-0x10000+1);

  //Check the crc16 values
   if(sum != __checksum)
   {
    // Action to be taken if checksum doesn't match
   }

Please help automating this process!!


texts: connecting 1-Wire device powers off wemo d1 mini

texts:
I have a wemos D1 Mini (an ESP8266 chip) which I am trying to connect to a 1-Wire temperature sensor.

However when I plug it in the 5v or ground it seems to power off the device, this happens with or without the data pin connected (lights stop blinking, usb disconnects). When I try this on an uno everything works fine.

I'm guessing somehow the 1-Wire is drawing too much power but I'm not too sure how to fix it (or if it is fixable) as I'm not too experienced with electronics.

I have tried with bigger and smaller pull up resistors (1k, 20K) but neither seemed to work.


texts:
I keep frying resistors in the following optocoupler and triac snubber circuit, and I'm not sure whether to attribute this to bad design, or to faulty components.

There are no observable sparks at turn-on, but the 680-ohm resistor burns out within seconds.
I'm using 1/4W through-hole resistors.
The power triac gate triggers at <= 35mA.
The load is a ~50W fan that runs on mains power.

If my understanding is correct, the steady-state (ON) power dissipation of the 680-ohm resistor should be less than 0.1W.

If you agree that my design is reasonable, then what component do you suspect is faulty, and why?

I also tried the following circuit, but again, the 680-ohm resistor smoked when I put the optocoupler in the ON state:


texts: How to increase low voltages modified AC Sine wave up to 220 VAC with 0.25 Watt?

texts:
I am working on Multilevel Inverter and successfully achieved modified sine wave with 7 level, that is much better according to my requirement. But the problem is output AC voltages is too low which is 10-12 VAC. Every thing works fine. Output frequency is 50Hz and required modified sine wave are achieved.
How can I increase this low AC voltages to 180-220 VAC with 0.25 watt?
In Input side I connect 3 individual batteries with 12 Volt DC 1 Amp. Here is the circuit Diagram of my 7-level H-bridge inverter.

The output modified Sine wave of my result is here.


texts: Explaination on phasor diagram for RL circuit?

texts: This is the phasor diagram which I had drawn from the value of phase difference(deg) from MULTISIM. I'm a bit confuse here... shouldn't by theory, when inductance is increase, thus the degree for Vl also gets bigger? But from the data from MULTISIM, it shows the opposite.


texts: Decrease the datarate on BLE module for more range

texts:
I'm using a HM-10 BLE module with an Arduino for my project and I really need more range. I have read that on the new Bluetooth 5 spec you can decrease the datarate to get more range, is this possible to do on Bluetooth 4.0 as well?

I really need to get a stable connection about 5-6 meters but it's through concrete and some steel beams. I know this is far from ideal. My connection right now is unstable at +-90 RSSI and I'd only need to get it a little better.

If it's possible to use a Bluetooth 5 module for better range I would consider that as well but it seems that either way I'm still limited to the transmitting power of the iPad which I am going to connect to the HM-10.

  Datasheet for HM-10: https://drive.google.com/file/d/1XJQznN6fPFQqAoTVqZh06vhbJ7eF0VFu/view


texts: How to use a 24V input sensor (analog) on a microcontroller with 5V maximum input

texts:
I am working on a project for my internship. Now the boss asked if I can use an analog sensor with 24V on a microcontroller that has a maximum input 5V.
Does anyone know how I can convert the voltage to lower it? I have a Lopy 4 + expansion board 3.0 or an ESP32, Raspberry Pi 4 or an Arduino.
For the sensors: There are 9 to 12 sensors to be installed. Specific datasheet I have yet to get.
Update: My boss said also that another microcontroller with one of the programming languages is also possible if it can take 24V (analog) input. We already have an STG-650 Barth, but it does not contain one of the programming languages.


texts: Interface Piezoelectric wafer buzzer with microcontroller

texts:
Can piezo-buzzer be interfaced with MCU same as normal 5V continuous buzzer?

I am talking about the flat thinnest buzzer like this.

We need to feed PWM to this to create different tones right? If yes, do we need to provide PWM at audio frequency or any other resonant frequency?

I can't find any proper datasheet for such parts, so finding exact parameters are difficult.


texts:
Can anyone tell me how transil works and what its purpose is, because I can't find information?
Thank you!
What is the purpose of Z1 and Z2 and when they work? Input voltage is 230V AC
and the transil breakdown voltage is 15V.


texts: Nrf24l01 module works on breadboard but not on pcb

texts:
After using a breadboarded nrf24l01 for more than a year, I decided to shrink it and have it on a pcb using the wiring diagram exactly used in the breadboard. I am attaching the pictures of the first and second breadboarded versions.

Both are working up till today. The third is the pcb mounted one.
My problem is that the reception range of the pcb mounted nrf2eounted on a pcb. Why has this happened?

I am just a tinkerer, no electrical or electronic background at all.

I am using an arduino nano as the mcu.
both are performing well and give me around 10 meters which is all I need
really.

This is the first breadboard version

But when I mounted same on a pcb,
the range dropped to less than a meter.

Why is there a difference in receiver performance?


texts:
I'm trying to analyze the Sparkfun Logic Level converter found here:

https://www.sparkfun.com/products/12009

A rough schematic is shown below:

simulate this circuit – Schematic created using CircuitLab

Now, I've looked at the application note mentioned on Sparkfun's page, and I understood most of it in regards to how it shifts levels, but I'm having trouble understanding the third part going from the high logic voltage to the lower logic voltage. I searched for some similar questions on the site, but teh answers that I found didn't seem to explain this part well.

My question is how does it shift the logic level from the high logic to the low logic? The app note says that when voltage on the high side, it utilizes the diode between the drain and substrate; at this point, the substrate (body) is at 3.3 V, so when the high input is 0 volts, the 'diode' conducts, dropping the voltage at the low port to 0, turning on the diode, further dropping the voltage. When the 'diode' conducts, why does it drop the source pin (connected to the body/substrate) down from 3.3 to 0? I would have thought that it stayed the same voltage at 3.3 V.


texts: How to turn on/off a converter using OpAmps

texts:
I am designing a controller board for turning a DC/DC Converter on when the voltage level is below 24, and turn it off when it's above 29.

With this circuitry I'll be turning it off above 29V. I can design similiar comparator to turn it on below 24V. What would be the best way of combining these circuitries? And how do I add hysteresis? Is it a feedback resistor to the OpAmp?


texts: In verilog, what effect does the not (!) operator have on high impedance and don't care conditions?

texts:
I'm writing some verilog and simulating it using modelsim.  I have a block that looks like this:

        if(wr_req & !cam_busy & !lookup_latched & !cam_match_found & !cam_match_found_d1) begin
           cam_we           <= 1;
           cam_wr_addr      <= wr_addr;
           cam_din          <= wr_cmp_data ;
           cam_data_mask    <= wr_cmp_dmask;
           wr_ack           <= 1;
           lut_wr_data      <= wr_data;
        end

lookup_latched is in high impedence. cam_match_found and cam_match_found_d1 are both in don't care states.

It seems to me like the statement should just ignore those signals.

The one issue I noticed was that the signals were being bitwise anded instead of logically anded (I didn't write the code).  Will this have an affect on the result? (I imagine it will)

Thanks!


texts: Power 14 red LED's and arduino from same source

texts:
I am new to the science behind electronics (software guy at heart) but I am working on a project where I need to power an Arduino and 14 standard 20 mA red LED's preferably from the same source.

I want to be able to control the LED's from the Arduino, nothing fancy, just fade them all on and off (together). I have a Darlington TIP120 on hand, will this be useful?


texts:
I am using an ATTINY13 for a toy application. It simply blinks LEDs in specific patterns. I decided to add a "speed control" using a potentiometer but the only pin I had left is the reset pin.

I've created a voltage divider and padded it with 330 ohm resistors, and things seem to work just fine on a breadboard.

After reading up a bit on using the reset pin for ADC, it seems that some people advise that you cannot program the AVR again. I haven't had this problem, but I am also not doing in-system programming.

The code I am using to enable ADC0 on pin 1 (PB5) is as follows:

DDRB = 0b00001000;
ADCSRA = 0b11100111;
ADMUX  = 0b00100000;

My question is: Why is this working? I would like to know a little bit more before proceeding with PCB manufacture. Is it just dumb luck so far?

I assume because reset never "sees" ground, the micro never resets spontaneously in circuit, but I'm unclear as to how I've managed to use the reset pin for ADC without disabling flash reprogramming.

Note: I currently am using a DIP-8 version of the chip in a socket, which I relocate to a programmer to change parameters. I will switch to a SOIC version for production.

Other: The 6-pin header connects to some Charlieplexed LED's


texts: How the voltage source and resistance got shorted out by the switch?

texts: In the following solved problem, it is written that voltage source and resistance have been shorted out by the switch. I am unable to understand this.


texts: I've just tried to repair my keyboard's usb cable as it has been damaged right where it goes into the keyboard. I've cut out the bad part of the cable and reconnected the wires. I've tried it and all is working well but I've used tape (lots of it :D). So it is possible that at some point the wires inside the USB cable will mix and my question is what is the possible damage due to that. For example is there a possibility of a short circuit damaging my motherboard? I've read somewhere that USB 2.0 and above needed to have short circuit protection as a standard, but I wanted to ask just to be sure. Thank you!


texts: Output resistance in a BJT differential amplifier

texts:
I have the following differential amplifier and I would like to find which is the output resistance of this circuit in the cases of differential input and common mode input.I know that the input resistance in the cases of differential input signals is Ridm = 2*rπ and for common mode signals is Ricm = rπ/2 + (β+1)R3.But for output resistance which is the relations?

Also Ι simulate this differential amplifier in Pspice.The results was Rout= 100kΩ when I set a common mode input and Rout= 200kΩ when I set a differential mode input.Hοwever, I can understand the reason for this result and how I can prove through theory.Can anyone help?


texts: How much lithium in lithium polymer batteries?

texts:
This document summarizes aircraft travel guidelines for batteries:

http://safetravel.dot.gov/documents/airline_passengers_and_batteries.pdf

It has two categories of lithium batteries:

8 grams or "equivalent lithium content" per battery
8-25 grams or "equivalent lithium content" per battery

Is there a formula or rule of thumb for determining the lithium content by weight of batteries?


texts:
Is there a way to make Altium Designer show design variants on "Editor" tab?

For example, if I define a new design variant, any components that I mark as not-fitted or alternate part are visible only in "Schematic" tab (sheet name is Schematic).

I've attached two images below where you can see what I'm talking about.
I've searched through Altium's design resources and couldn't find how to do this.

I would like to have DNP components always shown. Is there a way to do this?


texts: Circuit analysis with resistance and diode

texts:
We just started learning about diodes and now I want to find the currents \$I_1\$, \$I_2\$ and \$I_3\$ in this circuit.
We should assume that the amount of voltage the diodes recieve is 0,7V each and that they got no resistance.

I worked this through:

For I1 I got:  \begin{equation}I_1 =\frac{(U-2\cdot 0,7V)}{\frac{R_1\cdot R_2}{R_1 + R_2}}= 5,003\,mA\end{equation}

For I_3: \begin{equation}I_3 = \frac{U-2\cdot 0,7V}{R_1} = 2,268\,mA\end{equation}

And for I_2: \begin{equation}\frac{U-2\cdot 0,7V}{R_2} = 2,735\,mA\end{equation}

However, I am not sure if those values are correct.


texts: What are the methods to connect ac servo drive to the computer and control it in realtime?

texts: I want to control three AC servo motors with a computer or a microcontroller. I am confused about what kind of communication protocol should I be choosing for the servo drive. The input to the servo drive is a time dependent function of position or velocity.


texts: Is a non-isolated power supply a good/safe option for "inside the case" Arduino / ESP01 / ESP32 / whatever control using the appliance's PS?

texts:
I throw this highly important question, and refer you to my other threads in which I tackled this myself (learnt a WHOLE lot, and VERY important stuff indeed, could literally avoid you DYING from doing Arduino projects! ....)

(PS- many thanks to @ChrisStratton which pointed me out -as only good
teachers can- in the right direction, motivating me to dig deeper
into my original question and learn something about power supplies in
the process...)

First thread
Second -related- thread
Please also have a look at this (very good read, and very good practice advice given there, too!):
Link you really SHOULD visit if you plan on powering inside-appliance Arduino or general uC low-Voltage project from the same applicance's supply
I wish you to comment all that you can (and we need) in order to clarify this important question.
I now know a couple of very GOOD reasons why you should be aware of such concrete kind of uC project, but am also pretty sure a couple of very much knowledgeable folks out there can answer this to full details and logic.
Thanks for any insight in advance!


texts: How LC filter ripple becomes independent of load. Does it remain constant or it varies with the load? I know that capacitor filter has low ripple in low load, and with high load its ripple increases so it is used in low power supply, while inductor filter has low ripple in high load and at low load its ripple increases. Could you explain it with some formula?


texts:
Currently I am (non-engineer) trying to understand the origin of measured scattering parameters with a vector network analyzer and a 2 port system. The second port is terminated with a matched load to force a2=0. I am observing the amplitudes of |S11| and |S21| to verify the optimal matching, and to exclude standing waves.

Since

|S21|= b2/a1
|S11|= a1/b1

I expect that with a1=100% of incident wave nearly everything is transmitted ~100%  to the output port b2. So I would assume as best and maximum value for |S21| =1, rather smaller lets assume b2 being 80% |S21|= 80/100=0.8. This gives me a range from 1~0 for |S21|.  The closer the value is to 1, the better is my transmission.

Now lets observe |S11| in case of a perfect match there should not by any reflected wave, a perfect match is leading to b1~0. Which brings me to be best measurable value of ~100 for |S11|. Since nothing is ideal lets assume b1=10%. Which shows me that |S11| can take values from 100~0. The higher the value the better is my transmission line matched.

In case of a standing wave I expect my |S11| being very good compared to other frequencies, however if |S21| is showing a poor transmission at that frequency with a value <1, it indicates that a standing wave probably is existing.

Am I right with my estimations so far?

Can I see more out of the |S21| and |S11| measurement than standing waves?

In reality I measure negative values for both parameters. |S21| is nearly showing a flat line close to -1 and |S11| has an average value of -15dB with a dip going down to -30 dB @1.5 GHz.

If I argue the following is that correct?
I would like to say that this dip -30 dB @1.5 GHz is a very good matched frequency and not a standing wave, since I still see a |S21|-value ~-1 dB. A standing wave would show a value much "smaller" so something which is closer to "zero".

I am aware of the following conversion

Insertion loss = -20*Log|S21| in dB
Return loss    = -20*Log|S11| in dB

But I don't know what these formulas tell me.
With |S21|=0.1 it gives an insertion loss of 20. Does this mean that 20% are not transmitted to b2?

With |S11|=15 it gives a return loss of -23. Does this mean that 23% are reflected or that 77% are reflected?

Maybe I am completely wrong, thank you for taking a look! =)


texts: Charging 18650 Lipos with PCB and micro USB breakout board

texts:
I have a circuit with 2 18650 Lipos, which are connected to a 2s PCB Protection Board which has a p+ and p- connector for out- and input. My question is whether I can charge the two batteries by connecting the v+ and grnd pins of a simple micro USB breakout board to the p+ and p- pins? Are the 5V of the USB board enough to charge the two 7.4 V batteries?
Here's the PCB board on eBay:
https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.de%2Fulk%2Fitm%2F253581817900


texts:
I'm trying to understand how the electricity works in my house. I live in the US.  I know that at the transformer, the primary winding induces a current in the secondary winding.  The secondary winding is center tapped with a "neutral" line.  The neutral line is grounded to the Earth.  Here is the diagram:

Here are my questions:

1) When the circuit is closed, are hot 1 and neutral both "hot"? That is, are they both carrying a current of 120V that is alternating back and forth?

2) When the circuit is open, there is no current flowing.  So, what are the electrons in hot 1 doing?  Are they still oscillating back and forth?  In other words, when a conductor is "energized" but no current is flowing through it, how are the electrons behaving?

3) When the circuit is open, the neutral is not "energized" like hot 1.  Why not?  I know it has to do with it being grounded to the Earth, but I have not found an explanation of what is happenening at the level of the electron.  Are the electrons alternating back and forth in and out of the Earth instead of through the neutral wire?