texts:
Possible Duplicate:
  Choosing power supply, how to get the voltage and current ratings?

I have a 5V / 1A regulated supply. I'm thinking of using it to power a PCB which asks for 5V and 0.25A.

In this case, I am thinking the power supply could be too powerful and damage the board.... My best guess is to put a resistor in parallel with the load, so 3/4 of the current goes through the resistor, and the rest goes through the board.

Any ideas?


texts: Logism shows output as X, even though the gate is connected

texts:
Below is a basic not Gate using nandgate.

Not Sure why output is X, when I change it to Output properties to three state no, I can't modify circuit.

Some times, these issues go away when I restart logisim.

some more weird issues...

My Alu output shows E

I tracked down that to below highlighted Mux gate

When I drill down to that gate it shows x on output

When I tried to modify that, it gives this popup

when I click ok and try to change input, x in output will be gone.

All my subcircuits are fine individuallly, when combining them to make ALU, these kind of weird issues popup, when drilling down, we will see results like above.

Faced same issue with adder, but restarting logisim fixed the issue.

Any ideas or pointers ...?


texts: I have a coil array that, in its present configuration, is showing 4.5 volts on the bottom of the array when I move the VOM to the bottom about .5 meters away.  On top near the array, it registers 2 8 volts (3.5 going in), which makes more sense.  What is happening? I'm not changing any connections.  Please help.


texts: How to make an rf choke and tx rx coils?

texts: I am a tinkerer and trying to make a wireless charger in which I felt difficulty in making an RF choke coil of 8.6uH , 0.674uH & 1.235uH Can anyone please help me out?


texts:
I designed a simple circuit around LT3080 (positive linear regulator) and LT3015 (negative linear regulator).

LT3015 datasheet

I'm feeding them with +19V and -19V (input bypass caps not show)

the positive rail is fine, the problem is that the negative rail is not regulating at all, since I'm getting -19V on the output of the LT3015, not only when the PSU is floating, but also when I connect this PSU with the circuit I need to supply.

My hypothesis is that the supplied circuit is not providing enough load for the regulator.

But unfortunately I can't understand, reading the datasheet, if this is the case, and how could I fix that. Also I'm not aware of the mA needed by the supplied circuit, but since the -12V rail is only used by a TL074 opamp (that probably is now fried after the PSU supplied -19V), I guess I can at least understand the worst case.


texts:
I recently decided to add Bluetooth capabilities to a SNES controller using an HC-05 I had laying around. Unfortunately my knowledge of Bluetooth chips is very limited and I am having trouble finding any guides to help me out.

Most guides I do find are for connecting the board to an arduino. Do I only need a microcontroller for programming the chip, or will I need to get a small one to place in the controller?

Does anyone know of a good guide for a beginner looking to get into Bluetoothing devices?


texts: First schematics, DC-DC Converter question

texts:
I've made my first PCB design and I am unsure about a few things. This is a H-Bridge with a Attiny85. The Attiny85 will read a analog input on PB4 and adjust the PWM based on that. It is powered by a 14-18V Lio-io battery. I expect a load of max 180W.
My first question is if the DC-DC converter will work with a battery. Is there anything I need to pay attention to. I've just drawn the schematics based on the recommended design, which was for 12V IN and 5V OUT, will this also work for 14-18V IN since the IC supports that in general ?
If there is anything else that I did wrong I would like to hear that too, thank you.
Edit1: datasheet DC-DC converter https://datasheet.lcsc.com/szlcsc/1810121633_Analog-Devices-ADP2302ARDZ-5-0-R7_C76563.pdf
Edit2: based on the suggestions I've changed a few things, maybe it is better now


texts: Run an atmega328 only using an 16Mhz crystal without caps

texts: Can you run an ATmega328 only using an 16Mhz crystal, so without the capacitors?


texts: Considering power loss in a simple series connection due to cable

texts:
A friend and I are struggling on a simple electricity exercise:

A heater is connected to a \$U = 230V\$ power network over a copper cable. The cable has a cross-section of \$A = 1.5mm^{2}\$ and a length of \$l = 200m\$. The heater has a net voltage and net power of \$ U_{n} = 230V, P_{n} = 2200W \$.
Calculate the actual net power of the heater and the power loss due to the cable. Also calculate the total power which is drawn from the network. Put the net power and the loss power into relationship with the total power.

This is our way to our solution:
We considered the cable as a separate resistance which is connected to the heater in series. With the data of the cable and a specific conductivity of \$58.11\$ we get a resistance of \$2.29\Omega\$ for the cable.

The great question for us is how the heater behaves now that it won't get the voltage of \$230 V\$. It was not explained in the lecture how it behaves in such a case. We assume that it has a constant resistance. Assuming \$230 V\$ and taking the net power consumption of the heater we get a drawn current of \$\frac{2200W}{230V} = 9.57A\$. This yields a resistance of \$R_{Heater} = \frac{230V}{9.57A} = 24.03\Omega\$.

Hence the total resistance in the circuit is \$R_{total} = 24.03\Omega + 2.29\Omega = 26.32\Omega\$. With that we can calculate the total drawn current: \$I_{total} = \frac{230V}{26.32\Omega} = 8.74A\$

Calculating the voltages on the single components yields:
\$U_{Heater} = 24.03\Omega * 8.74A = 210.02V, U_{cable} = 20.01V\$

The actual power consumption of the heater thus is \$P_{Heater} = 210.02V * 8.74A = 1835.57W\$; and for the cable (power loss): \$P_{cable} = 20.01V * 8.74A = 174.93W\$ The total power consumption should then be: \$P_{total} = 2010,5W\$

The solution says we have a total power \$P_{total} = 1835.57W\$ which is exactly the power the heater uses in our solution. This was then divided in actual net power of around 1500 and power loss of around 335 (so they add up). This hints that we are not completely wrong but made a mistake somewhere in our thinking process. We were confused because we don't know how the heater behaves. Reverse Engineering the provided solution gave no clue on what could be wrong.

I hope someone can help us to solve this.

Thanks.


texts: How to test if the USB data lines are being passed to the port?

texts:
We have an white label manufactured Android tablet that snaps into a dock made by the same vendor.  A USB port on the tablet is replicated to the dock, which has a Type A port that we plug an RFID reader into.  The USB port on the dock is powered by the dock, not the tablet.

We are seeing conditions where the tablet is removed and replaced on the dock and the data connection to the dock’s port is not resumed.  If we plug the reader back in, it usually reconnects.

Is there a way where I can plug some board or device (something like this VBus breakout board?) between the dock and the reader and check the lines with a voltmeter?


texts:
I have a capacitor in the picofarad range. That capacitor will change slightly ±5 picofarad. How can I detect that change?

I used two parallel plates (about 5cm gap) that gives 18pF.


texts: How to monitor voltage and charge status in USB battery pack

texts:
What's the easiest, least intrusive way to monitor voltage, charging status, and remaining charge of a USB battery pack?

Battery packs and charging circuits for mobile projects can be complicated and expensive to design. Meanwhile, there are a ton of relatively cheap, small, high capacity Lipo battery packs with a convenient USB jack for charging and discharging. Unfortunately, they're designed for consumer uses like recharging cell phones, and not for tinkering, so there's no formal interface for getting battery status.

If you wanted to wire one of these into a microcontroller or SBC so the system could report remaining charge, is the only option to break one open, hope you don't destroy it in the process, and hope the charging circuitry is hackable?

Possible solutions I've thought of are:

Using an ADC to directly read the voltage on the battery output, but this probably wouldn't work since the output from the battery is regulated at 5V. Even close to being dead, it'll probably still read 5V.
Wire a coulomb counter in series with the battery. This would probably be able to track total energy charged/discharged, but it wouldn't have a reference point, so it still wouldn't be able to tell you remaining charge. Also, on batteries with multiple jacks, you'd have to have a separate counter for each output you used.

Are there any other options?


texts:
I am reading about voltage mode and current mode from the book excerpt here.

There is one part about current mirror that I don't quite understand. Could anyone explain it more details?

A unity gain current mirror, shown in Figure 3.7, can have a dynamic range of more than seven decades.

Dynamic range of what?


texts:
I am a bit confused with Vgs meaning.
Vgs threshold should be <5V <40 mA because the Arduino cannot supply more.

In the datasheet it says that the Vgs is +-18V and the Vgs threshold 1-2.5V. Does it mean that if the gate voltage is ~4V, that the maximal source voltage is then (4+18) 22V?


texts: I was designing a dual H bridge board which uses some logic signals to drive 8 mosfets. Initially I was using 8 optocouplers per board which was really annoying to wire up. after a bit of searching, I found that I can use 4 channel optocouplers instead (I want to use the  CNY74-4H ). I was wondering if I could use one resistor to limit the current for all 4 channel leds, or if I should use 4 separate resistors(one per channel). I know with normal LEDs they can draw unbalanced current, but is it the same case with an optocoupler?


texts: Using a Mux to switch between reading and driving a wire

texts:
I have been doing some googling and cannot seem to come up with an answer for this. The way I understand a mux is that it is basically a 2 way switch. I understand it is mostly used to select inputs for a single output.

I am trying to implement a Verilog system in an FPGA that is able to drive a signal to a pin and also read the voltage level from that pin. Can I use a mux to switch between driving the signal and also reading from that same pin?

I will not be trying to read and drive the signal at the same time. The voltage level of that signal will basically determine if I intend to drive that pin.


texts: Which UART is used on the Explorer 16 development board with PIC32?

texts: I am trying to use "PIC32mz2048ech100" on "explorer16" to get "UART" communication. Can anyone let me know which uart channel(from 1 to 6)of PIC32 microcontroller is connected to explorer 16.


texts: how can i calculate the transfer function of this oscillator?

texts:
first of all i don't know what is the name of this oscillator,so please tell me its name.

second of all, how to calculate the transfer function for the feedback loop (A B)?

simulate this circuit – Schematic created using CircuitLab


texts:
Usually I don't care about algebra and just focus on the functionality. However, below circuit form appeared so many times in last few days in op amps that I thought of memorizing it by heart.

From my limited op amps study so far, it seems the entire op amp analysis boils down to figuring out the voltage at point \$\text{x}\$ shown in the diagram.

Working the equations using superposition gave a nice symmetry:
$$V(x) = \frac{V_1R_2 + V_2R_1}{R_1+R_2} = \frac{\left<V_1,V_2\right>\cdot \left<R_2,R_1\right>}{R_1+R_2}$$

If we think \$R_2, R_1\$ as weights, then \$V(x)\$ is the weighted average of \$V_1,V_2\$. It seems \$R_2\$ controls \$V_1\$ and \$R_1\$ controls \$V_2\$. This is beautiful and I'm dying to know if this symmetry has a nice physical explanation. Thanks!

simulate this circuit – Schematic created using CircuitLab

Few observations:

When \$V_1=V_2=V\$ above formula gives \$V(x) = V\$. This means the entire branch including \$R_1, R_2\$ and every other point float to voltage \$V\$. Doesn't matter what \$R_1, R_2\$ are. This is used in instrumentation amplifiers to amplify AC while perfectly grounding common mode.
\$x\$ will be virtual ground when the average value is \$0\$


texts:
I just got a brand new Nexus 4 phone and am a bit dissappointed that it doesn't support USB OTG. One reason is that is doesn't supply 5 V out of its USB port, as opposed to other Android devices I tested.*

Since I have an extra USB OTG cable lying around, I am thinking about modding it to supply the 5V from somewhere else (e.g. from a USB power supply adapter). How would I do that?

I think I should connect Vcc from the power cable to Vcc from the child, and also  connect all the grounds together (so that host (the Nexus 4) and child have the same 0V potential, relative to which D+ and D- are measured). (Is that sufficient to pull host and power supply to the same potentials? What potential do I end up with anyways? I find that a bit confusing.)
Do I connect the host Vcc with the power supply+child Vcc, or do I leave it dangling? It seems there is no power on it anyway, so I can regard it as not connected (in USB mode).
Is there anything special I have to do with the Sense, D+, or D- pins, or can I leave them connected as they are?

Sorry if this is a stupid question!

Here is a schematic of a regular USB (OTG) cables for reference:

From http://tech2.in.com/how-to/accessories/how-to-make-your-own-usb-otg-cable-for-an-android-smartphone/319982

*) There might be other problems related to its Slimport feature, though.


texts: Has anyone ever heard of an op amp oscillating after it saturates?

texts:
I have an OPA690 that works fine during normal operation, but weird things happen when it saturates.

After hitting the negative power rail (-5V), the amplifier produces a damped sine response (sine * negative exponential). It is a very small signal (mV) that takes lots of averaging to be able to see. It also takes a very long time to fade (milliseconds). The amplifier is setup to have a bandwidth of a few hundred MHz, so it is surprising to see something last milliseconds.

I can't provide much more information. I am just wondering if anyone has heard of something like this before.

I will delete this question if it is too vague and I do not get any responses.

Thanks.


texts: Netfilter (230VAC) without protective earth (PE)

texts:
I need to filter my mains input, but I don't have any protective earth (PE). Will a mainsfilter (schaffner for example) still be usefull?

I think so. I think the mains filter despite of not being connected to the PE will filter out some common mode noise. Differential noise is not filtered due to the absence of a low potential PE. Is this statement correct? Does this filter also help to reduce outgoing emission signals originating from components within the unit?

Thanks.


texts: How to assign a single output to different modules in Verilog?

texts:
I have designed a simple ALU using Floating Point IP Cores in Xilinx ISE. I have an adder, a subtractor, and a multiplier. The IP Core of addition does the subtraction too and we have only two modules of addition and multiplication.

Inputs and outputs for each module is as following:

Inputs: a, b, clk, ce

Outputs: result, overflow, underflow, invalid_op, rdy

I want to connect the outputs of the modules to the outputs of the top module ALU (e.g [8:0] result of ALU to the result outputs of the two modules). How can I do this?

Here is the code:

module ALU( a, b, select, clock,
            underflow, overflow, invalid_op, ready, result );

//inputs
input  clock;
input  [8:0] a;
input  [8:0] b;
input  [1:0] select;

//outputs
output underflow;
output overflow;
output invalid_op;
output ready;
output [8:0] result;

//registers
reg rdy;
reg [1:0] ce;

//wires
wire [8:0] b_input;

//for subtraction it makes the second input negative.
assign b_input = {select[0],b[7:0]};

//choose which block to be used
always @(posedge clock)
begin
    case(select)
        2'b 00:
            ce <= 2'b 01;
        2'b 01:
            ce <= 2'b 01;
        2'b 10:
            ce <= 2'b 10;
        2'b 11:
            ce <= 2'b xx;
        default:
            ce <= 2'b xx;
    endcase
end

FPAdd add_or_subtract_ipcore (
                                          .a(a), // input [8 : 0] a
                                          .b(b_input), // input [8 : 0] b
                                          .clk(clock), // input clk
                                          .ce(ce[0]), // input ce
                                          .result(result), // output [8 : 0] result
                                          .underflow(underflow), // output underflow
                                          .overflow(overflow), // output overflow
                                          .invalid_op(invalid_op), // output invalid_op
                                          .rdy(ready) // output rdy
                                        );

FPMult      multiply_ipcore  (
                                          .a(a), // input [8 : 0] a
                                          .b(b), // input [8 : 0] b
                                          .clk(clock), // input clk
                                          .ce(ce[1]), // input ce
                                          .result(result), // output [8 : 0] result
                                          .underflow(underflow), // output underflow
                                          .overflow(overflow), // output overflow
                                          .invalid_op(invalid_op), // output invalid_op
                                          .rdy(ready) // output rdy
                                        );

endmodule


texts:
I have been given a multi-feedback low pass filter and its transfer function but to get a better understanding I would like to know the process to get to the transfer function from the circuit.

Thank you in advance


texts: Choosing a crystal and load capacitors for micro controller

texts:
I'm trying to pick a crystal and load capacitor combination for the atmel UC3C series micro controller. The target CPU clock I'm shooting for is close to the max frequency of 66 MHz.

Here's the configuration I think would best achieve this goal:

A 11MHz crystal is attached between XIN0/XOUT0 with the appropriate load capacitors. Then use the PLL to multiply the frequency by 6. Use the PLL 66MHz as the cpu clock with no division.

Now here's where I have a few questions:

I've spec'd out a variety of 11MHz crystals. All of them have 50ppm frequency stability and 30ppm frequency tolerance. However, there are various ESR. According to this source the ESR represents roughly the bulk losses in the crystal so a lower ESR value would be the better choice. Correct?

Is there a significant difference between how I arrive at the CPU clock 66HMz frequency?

I have a few choices in addition to my original choice of a PLL multiplier of 6:

Multiply 11MHz by 12, then divide by 2 for a PLL output of 66MHz. No CPU clock divider.
Multiply 11MHz by 24 (multiplier = 12, divider = 0). CPU clock divider of 4.
Multiply 11MHz by 12, PLL divider = 1 for 132MHz PLL output. Use a CPU clock divider of 2.

All of these appear to be equally valid minus the level of code complexity to achieve each choice. Should I stick with my current "simplest is best" assumption, or do one of these other solutions create a better cpu clock?

All of the crystal I've found at 11MHz require either a load capacitance of 18pF or are in series. Is there any reason to choose one over the other? I can't tell anything different between the specs (same frequency tolerance/stability, same ESR, roughly same temperature range) Atmel's documentation only shows parallel crystal configurations.

If I do end up using a parallel configuration, how close should the load capacitors be to the specified load capacitance of the crystal?

Atmel's datasheet provides an equation for calculating the value of each load capacitor:

$$
C_{LEXT} = 2(C_L – C_i) – C_{PCB}
$$

C_i is provided in the datasheet as 1.7pF. I'm unsure how to calculate C_{PCB}, but I would imagine it is greater than 0. This means that C_LEXT is at most 32.6pF. There are some 30pF, 32pF, and 33pF 1% C0G capacitors. I would think that the 30pF capacitors are the best choice because they are still relatively cheap compared to the 32pF capacitors, and don't exceed the 32.6pF limit as the cheapest 33pF capacitors. Am I right in my assumptions and conclusions?

Finally, is this a good setup? Are there other frequency crystals I should consider researching?


texts: Reading voltage of an amplified thermopile

texts:
I'm trying to make a circuit for a physics experiment where I measure the voltage output from a thermopile.
Because the raw output voltage is in millivolts, I need to use an op-amp circuit to amplify the voltage. The circuit above should amplify it by a factor of 1000, as R1/R2 = 1000.
I connected a voltmeter between the output after R4 and the TP- pin to measure this amplified voltage, but it reads ~0V and doesn't change so I think I have the voltmeter wired to the wrong bits. I know the thermopile works, because I've measured it to output a few millivolts by itself.
I'm new to circuits and have been following diagrams to set this up. Would anyone be able to let me know where the voltmeter should actually be, or if the circuit is wrong?
Datasheets:

LM358
Thermopile


texts: How is a Multi-Bit Delta-Sigma Modulator used to toggle the modulus for a Fractional-N PLL?

texts:
I'm doing some reading about fractional-N PLL design, and a large part of this reading has been about Delta-Sigma Modulators, a method of producing a binary string to toggle the frequency divider modulus between M and M+1. I've seen the primary methods for high quality Delta-Sigma Modulators (beyond just a simple first order stage) is the MASH topology (Multi-stage noise shaping, not an acronym but it's what it means) and Multi-Bit modulators (or a combination of the two).
The way I visualize it, with a single bit as the output, the divider is either dividing the output frequency by M or M+1, corresponding to one of the two states this bit can have.
But how can multi-bit delta sigma modulators toggle the modulus? What circuitry is utilized? The textbooks and papers I've looked at do not exactly say how this output binary word is interpreted by the divider.


texts:
I have a 12VAC-controlled contactor (ESB 20-20, rated for 12V @50Hz), and a 220/12 transformer that I intend to connect to the contactor. Unfortunately, rather than 12V, the transformer outputs 14V (which is outside of the 85—110% range of allowed voltage). Which option should I employ?

Put a resistive voltage divider between the transformer and the contactor?
Use two opposite 12V Zener diodes to clip a half-wave each?
Return the transformer to the shop and try to find a more precise one?
Throw out both the transformer and the contactor, buy a DC-driven contactor and a stabilized power supply?
Stop caring, connect them as they are?

Edit: forgot to add, while 14V is the measure of an unloaded transformer, under the contactor load the transformer voltage drops an insignificant amount, to around 13.8V.


texts:
I have a power supply that says it is 24VAC output, but in reality is is giving a steady 29VAC of output. Is this normal? I am powering sprinkler solenoids that say 24VAC. So my question is how can I drop the voltage so I can supply 24VAC. I found some buck converters, but they seem to be DC only or AC input and output DC. I am assuming resistors might work, but an unsure of how to calculate for AC, and wondering if there is maybe a specific device that is made for this purpose?

I have done some work in DC, but AC is kinda new territory, so any help/explaination is much appreciated!


texts:
I have a 4.2W 12V electric water pump connected in series with a water float switch as a sump pump, powered by a 1A 12V DC power brick.

The switch has a maximum switching voltage rating of 100V.

Would it be sensible to protect the switch with back-to-back zener diodes to absorb the surge when it switches off, or would that be overkill?

If so, what voltage rating would be reasonable for the zener diodes? I was thinking somewhere above ~18V.


texts:
Tonight I debugged a weird issue with a simple IR LED/phototransistor circuit that I was meaning to integrate in a RPM sensor.

With the IR LED pointed towards the phototransistor, with a gap of 1-2cm between the two, I would cover either of them with my fingers and I would see no change on the scope (almost zero voltage across the phototransistor, meaning it was seeing the LED).

A piece of metal or plastic would block the light, also my fingers if I put on electrical tape on the fingertips. But not my bare fingers. I wrote that off to subsurface scattering.

However, I would also not see the voltage rise if I used a piece of cardboard, either black or white, which is very weird. Any idea what would be the cause?


texts:
I have seen designs for digital clock dividers, which can divide a clock frequency by 1.5, 2.5, etc.

But is it possible to create digital logic which divides a clock by 4/3?

For example, if I have a a 64MHz clock, can I generate a 48MHz clock from it?

For my particular application, I don't need 50% duty cycle.


texts: What is meant constant voltage control of h-bridge

texts:
I am using LV8075LP as the h-bridge to drive small 3V, 90mA coin vibration motor. I came across a few terms that I need to understand.

Constant voltage control
Output full drive

Also, can I use this particular h bridge to drive motors using PWM or is it just used for switching ON and OFF the motor at full speed?


texts:
The arduino reference states that you would use the following code to read the value from analog pin #5:

int val1 = analogRead(5);

However to read from digital pin #5, you would pass the same pin number to digitalRead:

int val2 = digitalRead(5);

Shouldn't you use analogRead(A5) instead of analogRead(5)?

If not, what does the following code do:

int val3 = analogRead(A5);


texts:
Following is my code

#include <avr/io.h>
#include <util/delay.h>

#define Delay_ms(x) _delay_ms(x)
#define RS   1       //PC0
#define RW   1       //PC1
#define EN   2       //PC2

void lcd_cmnd(unsigned char);
void lcd_data(unsigned char dta);

int main()
{
    DDRC=0xff;
    DDRD=0xff;
    lcd_cmnd(0x38);          //sets 8-bit interacing
    Delay_ms(1);

    lcd_cmnd(0x0e);           //display on
    Delay_ms(1);
    lcd_cmnd(0x08);           //display off
    Delay_ms(1);
    lcd_cmnd(0x01);        //clears screen
    Delay_ms(1);

    lcd_cmnd(0b00000000);
    lcd_cmnd(0x06); //Entry Mode, Increment cursor position, No display shift

    lcd_data('N');
    Delay_ms(250);

    lcd_data('a');
    Delay_ms(25);
    lcd_data('s');
    Delay_ms(25);
    lcd_data('i');
    Delay_ms(25);
    lcd_data('r');
    Delay_ms(25);
return 0;
}
void lcd_cmnd(unsigned char cmd)
{
    PORTD=cmd;
    PORTC=(0<<RS);                //command mode   PC0=RS(low)
    PORTC|=(0<<RW);                // read mode  PC1=RW
    PORTC=(1<<EN);                 // enable high   PC2=EN
    Delay_ms(1);
    PORTC=(0<<EN);                 //enable low
    Delay_ms(50);
}

void lcd_data(unsigned char dta)
{

    PORTC|=(0<<RW);              //PC1=RW (low)
    PORTC|=(1<<0);               //DATA mode   PC0=RS
    PORTD=dta;
    PORTC=(1<<EN);                //enable high   PC2=EN

    Delay_ms(1);
    PORTC=(0<<EN);                //enable low
    Delay_ms(50);
}

It executes well, the simulation in proteus runs but the cursor just blinks and nothing is displayed. I don't know why.

Following is other code which runs and displays on the LCD "Hello World!"

#include <avr/io.h>
#include <stdlib.h>
#include <util/delay.h>
#include <stdio.h>

//Define functions
//==========================================================
void io_init(void);                         //Initializes IO
void send_nibble(unsigned char __rs, unsigned char __data);

//==========================================================

int main (void)
{
    io_init();

   _delay_ms(15);
   send_nibble(0,0b0010);   //Set to 4 bit operation (note: 1 nibble operation)
   _delay_ms(5);

   send_nibble(0,0b0010);   //Function set, 4 bit
   send_nibble(0,0x08);     //display off, cursor off

   send_nibble(0,0b0000);
   send_nibble(0,0b1111);   //Display ON, Cursor On, Cursor Blinking

   send_nibble(0,0b0000);
   send_nibble(0,0b0001);   //Clear Display

   send_nibble(0,0b0000);
   send_nibble(0,0x06); //Entry Mode, Increment cursor position, No display shift

   send_nibble(1,0b0100);  //H
   send_nibble(1,0b1000);

   send_nibble(1,0b0110);  //e
   send_nibble(1,0b0101);

   send_nibble(1,0b0110);  //l
   send_nibble(1,0b1100);

   send_nibble(1,0b0110);  //l
   send_nibble(1,0b1100);

   send_nibble(1,0b0110);  //o
   send_nibble(1,0b1111);

   send_nibble(1,0b0010);  //Space
   send_nibble(1,0b0000);

   send_nibble(1,0b0101);  //w
   send_nibble(1,0b0111);

   send_nibble(1,0b0110);  //o
   send_nibble(1,0b1111);

   send_nibble(1,0b0111);  //r
   send_nibble(1,0b0010);

   send_nibble(1,0b0110);  //l
   send_nibble(1,0b1100);

   send_nibble(1,0b0110);  //d
   send_nibble(1,0b0100);

    return(0);
}

void io_init (void)
{
    /*
    PC 7: N/A
    PC 6: Reset
    PC 5: Enable
    PC 4: Register Select
    PC 3: Data 7
    PC 2: Data 6
    PC 1: Data 5
    PC 0: Data 4
    */

    DDRC = 0b00111111;  //63
}

void send_nibble(unsigned char __rs, unsigned char __data)
{
   PORTC = (__rs<<4) | __data | 0b00100000;      // Set RS &amp; Data. Set EN=High
   _delay_ms(1);
   PORTC = (__rs<<4) | __data;                   // Set RS &amp; Data. Set EN=Low
   _delay_ms(1);
}

I tried to proceed in the same order but in vain. I am stuck in learning the LCD programming for last 10 days.  Any healthy and effective help is appreciated in advance!


texts: How to wire a 3-way switch and a RF Relay to control Lights

texts:
I'm very new to this, and also I speak spanish, so please pardon my english and my electronic knowledge.
I'm trying to design the following proyect: Control my deck lights from an RF remote control relay and from a physical 3 way switch.
I'm thinking of something like this:

First, I would like to know if there's any suggestion to this configuration, but my biggest concern is regarding the time when the relay will stay energized and the light turned off by the switch, I'm afraid that there may be times where the relay can be left energized for weeks, and I don't know if they're design to work like this, or if it could be dangerous, since it'd be installed in a wooden shed. A situation like this:

Is there any suggestion to this configuration?
Or maybe something else that I can do to manage my objective?
Thanks a lot,


texts: Is there a potential earth leakage or is it something else?

texts:
I'm facing an issue in my house since last Christmas. When the lights or appliance with motor in any room are turned off/on the TV would go out and come back on in a short span (as if the power went out and came back in a second). I recently had some mishaps where my two older PCs PSU blew up. But I though tit was just the old PSUs had its end of life. Then recently my new under one month old PSU in new PC built just died.

So, I took my multimeter and checked the voltages first from a  220V kitchen outlet that is directly wired from the panel next room and it shows Phase-Phase=223V & both Phase-Ground=220V. Then I tried the other 110V outlets in the house and they all have Neutral-Phase 130V, Neutral-Ground=0.4V & Phase-Ground=49.2V. Next trying other 220V outlets also gave Phase-Phase=223V and both Phase - Grounds=49.2V. So, except for the 220V outlet directly from the breaker in the kitchen something is off. Anyone here can help me out with what could be the potential situation? Because of this pandemic situation I have held off calling an electrician until now.


texts: How to calculate poles of overdamped, 2nd order system if only given experimental data?

texts:
I have been looking about how to calculate poles if I have experimental result of a step response in Matlab that looks like an overdamped system.  So far I only found information (through internet or in textbooks) on how to calculate poles for underdamped systems but not for overdamped system.

For example, the results from recent experiment looks like something like this:

I am trying to compare the pole locations between those two.  I was able to find the poles for the underdamped system, but not for the overdamped system.

I know for the overdamped system the poles should be two real distinct poles and can be calculated if I know the damping ratio and natural frequency, which is:

$$p_{1,2}=(\zeta\pm\sqrt{\zeta^2-1})\omega_n$$

If this is case then how do I figure out the damping ratio and the natural frequency?


texts: Bidirectional (opto?) isolators for any protocol?

texts:
I would like to isolate digital serial communication between 2 circuits. I don't know much about the protocol between two circuits. It is not a common protocol such as SPI or I2C. Shortest pulses are 30μs and communication is bidirectional over a single channel/wire. I have found some such as Si860x series.
https://www.silabs.com/documents/public/data-sheets/Si860x.pdf

All of such isolators are labeled as I2C isolators. But my serial communication isn't I2C. I wonder if there are any isolators for general usage or if I can use it for my application?

Background: I am trying to power my DSLR camera without the battery (but with a constant power source). But the camera verifies the battery with some serial communication. I am trying to fool the camera's circuit in which I will let the battery communicate with the camera over an isolator, while the camera is powered with another power source. For this, I think, I need a bidirectional isolator.


texts:
The laptop has input: 18.5V, 2.7A
The UPS output is: 220V, 6.82A and also something about 1500AP
I have no idea how to work out how long I would be able to run the laptop off the UPS when the UPS is disconnected from the mains.


texts: How to compare two numbers (nets, variables, constants) in Verilog

texts: I am new to Verilog, and would like to learn how to compare two numbers. For example, let's compare a parameter or reg (say a) with the number 2 (2'b10). How this will be written in Verilog?


texts: Why decoupling capacitors used for power rails should be very close to the IC pins?

texts:
I read many experts here recommend the caps (usually 100nF ones) as close to the power and ground pins as possible. Why do they have to be soldered very near to the pins?

And I used the term decoupling capacitors. Is decoupling and bypass caps same thing in this context.


texts: Panning between two active audio signals

texts:
I want to have a circuit that pans between both my active pickups.
I have designed a simple summing opamp with a 50k center click potentiometer acting as a panner but even though it worked, when at the center position there was a considerable volume drop.
I tried with a 10k potentiometer and that did the trick but unfortunetly the potentiometer needs to be 50k as I can't find any other that is smaller in value, center click and has a bush long enough to go onboard on a bass guitar. All resistors used on that circuit were 10k.
I found this schematic that I am attaching and I was wandering, if I use the 50k potentiomter as a panner in R3, what kind of adjustment to the resistors should I make in order to get a smooth blend without losing too much volume at the center position?
I have also tried a summing opamp configuration with two volume pots coming from the preamps but at center position the volume was considerably louder than with each pickup by itself.


texts: Trying to calculate UTP and LTP of opamp circuit

texts:
I'm doing a practise test and one of the questions is asking me to find the upper trip point (UTP) and lower trip point (LTP) of the following circuit:

I'm not sure how to do it with a circuit of this configuration.
Could anybody tell me how I should go about it?


texts:
This is a power switch from a vacuum cleaner, specified as 8A / 250~, which I suspect contains a fuse that has blown. The plastic case has four "tongues" on the sides, but I can't figure out how to open the thing, or what tool I would need to release the fuse.

I tried to push a tongue "inwards" by applying force either on the upper and lower part, but that doesn't seem to work.

The box reads "NOVA KAN-J4" and beneath "T85 8(8)A/250V~".


texts: Why does this circuit give different values for different methods

texts:
Is there a rule that I am missing?

I need to find the resistance of this circuit:

I seem to get different values depending on which way I take the resistors. Is there any rule I am missing when analysing these types of circuits to find resistance?

One of my workings is this. But the correct answer is 11.

Thanks for your time.

Another futile attempt:


texts:
This question is referring to npn BJT CE:

If we look at base voltage vs. collector current plot we can see that at approximately 0.7V on base to emitter junction, the BJT starts rapidly conducting.

In a circuit DC BJT is biased so that quiescent point is in the middle of the load line (for class A amplifier).

Questions:

Does DC quiescent point represents reference point for the AC input signal?
If we want to normally amplify input signal (without distortions), does the input signal have to vary from 600mV to 750mV (approximately)?


texts: I know that the car cigarette adapter provides 12 V and around 10 A, while USB is ~6 V and x mA (I'm assuming it draws a small amount of current). How then does a car USB adapter work to recharge an iPhone? Some are so small, it's hard to imagine that there is a transformer inside there.


texts: BJT theory and practice - please help me understand

texts:
I've never built a circuit using BJTs before but I'm more inclined to go this route over FETs for this task.

I have 3x 12V 200mA (approx.) loads in a vehicle which I want to switch on with only a 12V 20mA (max.) signal. I also have a standard 12V car battery as a supply, which we can assume could give anything from 12-14V.

From what I've learnt so far this is my intended schematic

R3 = 12V 600mA load

Ideally I'd like to know what I could use for R1, R2, Q1, D1 and, I suppose, RY1 too.

From my research into transistor theory I should be using the NPN transistor in common-collector configuration. Assuming beta = 100 (approx.) I should have more than enough signal current to saturate my transistor for it to essentially work as a switch to my relay, which I assume at this stage will need 100mA (approx.) coil current.

What I am confused about is calculating resistor values based on the BE, BC and CE voltage (assuming a 0.7V drop on BE?) and if R2 is even needed at all (I guess to act as a voltage divider?)

Any guidance that can be offered here will be extremely appreciated.

Thanks in advance


texts: Is it feasible to design an audio amp with an adequate frequency response down to DC?

texts:
I am in need of an amplifier to drive two 20 W 4 Ohm speakers. They are used more like solenoid pushers than for audio generation. I have been looking into designing my own, but before sinking a lot of time into it I'd like to know if it's a waste of time.

The signal being amplified will be between 0.1 Hz and 1Hz.

So to reiterate the question, are there any fundamental problems with devising my own circuit to drive these two speakers at these low frequencies?


texts: How to calculate the time to empty a battery

texts:
I am a computer developer, excuse me if the question is basic.

If a consumer takes 1600 mA, how long will it take for it to empty a 12 Ah battery? Is it as simple as 12/1.6?


texts:
I have a ultra high bandwidth data stream (USB 2.0 Highspeed), on which I need to add an header for synchronization. This needs to be done, since the datastream needs to be transmitted wireless on a custom RF link.

I was thinking about using a very fast processor to do the data processing, basically add a header. Then output the data in parallel 16 or 32 bits at a time, to a external hardware shift register, driven by proper clock. In this way I would get a serial data stream of the data.

But is this the way to go?

I have trouble even finding parallel to serial (shift registers) that can operate at these speeds.


texts: Total Device vs Total Package Dissipation

texts:
For my design I need a bunch of 2222A transistors with each transistor dissipating at maximum ~500mW of power. The transistors come in single packages, dual packages, and quad packages. The datasheet has it listed as "Total Device dissipation" for the single at 300mW, "Total Device dissipation" for the double at 700mW, and "Total Device dissipation" for the quad at 1000mW.

Does "Total Device dissipation" refer to the individual transistor(s) in the package or to the entire package?

https://www.fairchildsemi.com/datasheets/FM/FMB2222A.pdf

Edit: None of the answers have really made me feel its confidently its one or the other so here's another way we could answer the question maybe more definitively.

TI has a document on understanding power dissipation:
http://www.ti.com/lit/an/slva462/slva462.pdf

The unit in question is \$P_D\$ on the data sheet. TI tells us that this value can be derived from the following equation. Maximum Power Dissipation \$P_{DMAX}\$ is defined as the following

\$P_{DMAX} = \frac{T_{JMAX}-T_A}{\theta_{JA}} \$

From the data sheet it gives maximum operating junction at \$T_{JMAX} = 150C\$
The ambient temperature will be room temperature which is \$T_A = 25C\$
The question now is what does the data sheet means by "Thermal Resistance" \$R_{\theta JA}\$?

For the single package it has "Thermal Resistance, Junction-to-Ambient" at \$R_{\theta JA} = 415C/W\$ which does equate to 300mW. So for the single package no doubt it has a dissipation of 300mW for the package and device

For the double it has "Thermal Resistance, Junction-To-Ambient" at \$R_{\theta JA} = 180C/W\$ which equates to ~700mW.

For the quad it has two different paramters. "Thermal Resistance, Junction-to-ambient, Effective 4 dies" \$R_{\theta JA} = 125C/W\$ which equates to 1000mW
and it has "Thermal Resistance, Junction-to-ambient, each die \$R_{\theta JA} = 250C/W\$ which equates to ~500mW

For the double package it almost seems as though thermal resistance refers to each individual transistor making each device have a consumption of 700mW and the whole package a consumption of 1400mW

For the quad package it seems like effective 4 dies means divide result by 4 so each transistor dissipates 250mW but then it says each die and results in 500mW.

So I am again still confused. Thoughts?


texts: IC to interface between digital switches (12V) and microprocessors (3.3V)

texts:
I am working on an automotive general purpose ECU where I need to interface 12V digital inputs with a µC (3.3V).

The PCB space is limited, so I am searching for a single IC as an interface between the digital inputs and the µC.

The IC shall have the following features:

input stage operating range that goes down to about 7V
integrated input stage protection circuits (Clamping Diodes, ...)
at least 4 inputs

I have found an almost perfect IC:
Infineon ISOFACE Input IC.
The problem with this IC is that its designed for the 24V industrial domain, the input stage (VBB) operating range is 15V...35V (15V is the undervoltage threshold).

Does something comparable as the ISOFACE chip exist for the automotive 12V domain?


texts: frequency meter using Adafruit Feather M0

texts:
I want to measure the frequency of the pwm signal I will be receiving at a certain I/O pin. The issue is, I could not find any library or code written for this board. I could find this library for arduino known as FreqMeasure Library:

https://www.pjrc.com/teensy/td_libs_FreqMeasure.html

The microcontroller used on this board is ATSAMD21 Cortex M0. Which means the register and the whole working is quite different from the arduino Atmegas.

Will I have to program from the ground up changing the register names in the original freqmeasure.h library to the ones for ATSAMD21 Cortex M0?

Or can please someone suggest any other way of doing this without having to understand this microcontroller at ground level. I am using Arduino IDE for programming the adafruit feather.


texts:
MICBias is the voltage required for microphone to power and record signal at full levels.

What will happen if we ground MICBias, is it means we are disabling microphone.


texts: Power and Ground Clamp Diodes in CMOS IO Buffer

texts:
I have usually seen Power & Ground Clamp diodes in CMOS structure as per attached figure. They are protection diodes. But I have few doubts :-

1.can someone explain in what situations they are actually working.
2.how are they protecting from high voltage.
3.What kind of diodes are used.
4.Are they present in other logic families as well?


texts: Is there a way to use constructive interference to create a specific sound in a specific location?

texts:
With 8 speakers, one in each corner, can a combination of waves be emitted that are silent from the sources but form a coherent emission somewhere between?

I mean that even if you walked around the room the sound of something, say a ball bouncing, would stay in the position that it sounds like its bouncing in relative to the walls and not because your position is being tracked and each speaker adjusts its volume accordingly, silencing as you approached and vice versa, but because the pressure changes in each speaker are beyond the 20 to 20k Hz range we hear until a combination of interference creates a wave that is formed at a controllable location and actually emits from there. An opposite to dead spots.

We have Phased arrays to steer sound without moving the array if we're not using the parametric array effect to 'beam' the sound but maybe some combination of these. Acoustic phase conjugations which can create a localized vibration or sound wall that could perhaps be enough of a non-linear medium  to scatter the ultrasonic propagation? There is Intermodulation, primarily considered a distortion but all combined this could be possible?


texts: Are three SPST switches required to convert two resistors from being in series to being parallel

texts:
It's straightforward to construct a part of a circuit that contains three resistors and two SPST switches where changing both switches converts the resistors from being in parallel with each other to being in series with each other.  I've played around trying to draw a circuit that has only two resistors and two SPST switches, but I can't seem to find a layout that would permit only two switches to convert two resistors from being in series to being in parallel.  Does it really require three SPST switches to convert the two resistors from being in parallel to being in series?

For three resistors, two SPST switches can convert them from parallel to series.  Assume: --R1--R2--R3--
S1 and S2 are the two switches
Solution: --s1--R1--S2--R2--S1--R3--s2--


texts:
First, I'm kinda new to this AVR world, please don't be too hard.

I'm running into a very simply problem. I'm trying to use the ATTiny85 inside the Arduino framework, but without the Arduino functions digitalRead or digitalWrite (too slow). I have no problem writing signal to pins (PORTB &= 0b00000001), But whatever I try, I'm not able to READ from the pin (PINB & 0b0000001).

However, this is not entirely true. whatever I try (PINB & 0b000001, PINB & 0b000010, PINB & 0b000100, I'm always value reading from the PIN 0 (physical pin 5). Does anyone have try to read the ATTiny pin without the Arduino function ?
I'm simply trying to do digital read here. (no analog)
Here a sample code which reproduce the problem.

  DDRB = 0b00001000; // set the LED pin as output.
  while (1)
  {

    if ( PINB & 0b00000010 != 0) // read the PIN to check if the button is pressed.
    {
      PORTB = 0b00000000; //Turn Off the LED when the button is pressed
    }
    else
    {
      PORTB = 0b00001000;  //Turn on one LED by default
    }
  }
}


texts: Getting started with Power Dissipation Problem

texts:
I'm studying my first semester of EE. We're only a few weeks through and I am stuck on a simple homework problem.
The details are:
Seven components are given. They include two voltage sources (4V
and 8V), two current sources (5A and 10A) and three resistors (3Ω, 6Ω and 9Ω).
The sources can produce a maximum of 500W. All elements have a maximum dissipation
rating of 1kW.

Each source can be re-used but not within the same circuit.
Each circuit can only use a maximum of 3 components

The fist question is
Design a circuit that will dissipate 80w from any voltage source.

My approach was to start with the 4v source and calculate the resistance required to dissipate 80w.

p = i2R
80w = 4v2*R
R=0.2Ω

Looking at the available parts I can't make 0.2Ω resistance.

In parallel I get:
3&6 = 1/((1/3)+(1/6)) = 2Ω
3&9 = 2.25Ω
6&9 = 3.6Ω

I'm obviously missing something with this question.

After some helpful replies I've realised that the current sources will provide 'any voltage' as stated in the question while maintaining a constant current for the circuit to dissipate the required 80w however I still can't get the numbers to agree.

If choosing the 5A supply I get:

80w = 5i2*R
80w/25i = R
Rreq. = 3.2Ω

If choosing the 10A supply I get:

80w = 10i2*R
80w/100i = R
Rreq. = 0.8Ω

From above I can't make this work using 2 resistors (only allowed 3 elements from the list).


texts:
My goal is to build something that simulates rapidity (50 to 1k Hz) pressing a key on a USB keyboard. My first inclination was drive a transistor from a 555 timer with the two keyboard matrix pins on the collector and emitter, unfortunately the potential between them is only 1.5dcv and the 2n3906 I have in my kit doesn't seem to work. Is this really a transistor problem or something else?

Also, I'm not looking for a keyboard emulator, I want something to test off the shelf keyboards. Any other ideas are welcome.

UPDATE/EDIT:

So I went out and got a NTE133, I was told it was the equiv to the BS138. The drain to source resistance was about 7Mohm and even when the 555 was off the signal from the keyboard went though. Did I get a dud? Schematic below 2hz, Picture below. I'm doing destructive testing on keyboards to measure timing, that's why I don't want to use the arduinos to simulate one.

simulate this circuit – Schematic created using CircuitLab


texts: Measuring resistance of a capacitor - unexpected results

texts:
I'm trying to measure the impedance (\$R_x\$) of C1 in the RC circuit shown below, but I'm getting some results I can't explain.

simulate this circuit – Schematic created using CircuitLab
Measurement:
On VM1 and VM2 I measure the voltage by consecutively taking a sample of \$10^4\$ points over 4 ms on each channel then I calculate the RMS.
(I'm using a multichannel DAQ card for output and input. I can't find the symbol, hence the analog VMs).
Using Ohm's law I calculate \$R_x\$:

\$R_x = R1 \frac{VM_2-VM_1}{VM_1}\$

The applied current is a sine curve of 0.5V where I varied the frequency between 1, 5, 10, 50 and 100 kHz. It is turned on for about 2-3 seconds during the consecutive reading of the two channels.

For each frequency I make 10 measurements and take the mean of those.

Expected:
I would expect the values to go like:
$$R_x=\frac{1}{2\pi f C}$$
where f is the frequency and C the capacity.
Fx at 1 kHz for a \$0.1 \mu F\$ capacitor I would get \$ 1591.59 \Omega \$.
But my measurement at that frequency is about \$ 500 \Omega \$

Measurements:
These are my measurements for different capacitors:

Why are my numbers this far of?

If I let something out please let me know and I will add it to the post.
Any tips, remarks or comments are appreciated.

Update
I've done the calculations again thanks for the helpful answers. It fits a lot better now:

There seems to be some increasing deviation though, is there an apparent reason for this?


texts: Hardware solution to fade LED on/off with digital output

texts:
I'd like to find a hardware-based solution to make LEDs fade from digital pins. i.e. instead of switching on/off, slowly fading (500ms) into/out of full brightness.
I can't imagine a small capacitor taking half a second to discharge...
Ideally it would be in a nice DIP16 package so I can get an array of fading LEDs.
Does my dream component exist?


texts: Profiling for FPGA requirements for a high-performance camera

texts:
I would like to know how to do the profiling of an image acquisition and storing pipeline on an FPGA based system, capturing images from a CMOS image sensor through LVDS interface, do some basic image processing and then storing the data onto two SSDs.

I'm talking about 100 fps, 11.94 MegaPixels, 16 bit per pixel, so the bandwidth is quite huge: it's not about the classic cameras we've used to.


texts:
Hello I am doing board layout in Altium but whenever I import changes from schematics Altium performs a redundant ECO where it just adds and deletes the same 39 components. For example:

1) I import changes from my schematic file and get an error that 39 components can't match:

2) For some reason it can't match component classes even tho the class names are the same...

3) So I match Components from sheet 7 with components from sheet 7 and components from sheet 8 with components from sheet 8:

4) Click continue to issue an ECO but all Altium does is remove those 39 components (and all their respective nets and footprints) and then just re-adds them without making any actual change to the board:

No changes on the board happen. What am I doing wrong?


texts:
I have vintage Heathkit H89 computer from late 1970's and early 1980's. It uses linear type power supply and used Sprague 673D series electrolytic capacitors; two 10,000uF @ 15WVDC for +8V circuit and one 4700uF @ 25WVDC for +18v circuit. Due to age as 4700uF capacitor blew out and ceased +18v. I struggled to find a replacement because Sprague sold the capacitor department to Vishay years ago. Vishay said that one have no direct replacement nowadays because the 673D series had higher ripple current rating as much higher than today capacitors that almost 65 percent lesser.

I am aware that if I replace with exact same value but ripple current will heat up inner core and then burn up and blow the seal quickly.

Have to seek a solution for above problem. If I can use multiple capacitors in parallel and put resistors series with capacitors. As much as like LED circuit that use limit current resistor so I wonder if it possible to use divide method with five 1000uF in parallel that would bring total of 5000uF as resistors will limit the current into the capacitor to protect from heat buildup.

As I believe the original capacitor can handle up to 11A current.

Have you any idea to save vintage computer and also I have several Heathkit equipments may need to replace aged capacitors.

Forward to hear from you....

Thank you very much,
Steven


texts: Could a vintage 9 transistor AM/FM implement a phase-locked loop of some form?

texts:
A side discussion around an answer to the question How many stations could one hear with an AM/FM radio in front of the ISS' cupola window? has arisen with regard to the possibility that a change in frequency of order 2.6 kHz would need someone to turn the knob of an FM broadcast receiver carefully to track it, or whether a rudimentary PLL or other circuit might have been able to allow reception.

The radio in question (shown below) had only 9 transistors, and covered both the AM and FM bands.

So there are really two parts to this question:

Could a 9 transistor AM/FM radio implement something that could be called a phase-locked loop?
Could a 9 transistor AM/FM radio provide good reception if the broadcast drifted by 2.6 kHz due to a doppler shift? (The receiver would be in low earth orbit, presumably intercepting a lobe or side-lobe of the transmitter.)


texts: Altium 365 - changing the default comment

texts:
Recently, our company decided to move to Altium 365 since we are starting a big project where multiple people will be working on a single project. We have a local library that is up to date and used trough the company.
For all our resistors and capacitors, the part comment is "=Value" so when placing the component we get this:

But, after migrating the library to the cloud, all the comments just got replaced with the Design Item ID, so we get this:

And I can't figure out how to change it. I looked at all the options available during the migration step, I tried to edit the components once they are in the library, but the Comment field just ist there to be edited. I tried to manually create part comment field, but Altium just puts out an error and states that its an "Reserved Parameter name".
I would like to keep all my Comment parameters from before the migration, but I would be happy if I just figured out how to change it for Resistors and Capacitors.


texts: Do capacitors provide ESD protection even if they are already charged?

texts:
I've read about ESD protection with capacitors and it seems that if one knows its limitations it could in some cases be a cheap alternative for or addition to designated ESD protection circuits.
The basic idea is that the charge of the ESD source (i.e. Human Body Model) will be shared across the source's capacitor and the "protective capacitor". The final voltage could then be estimated using simple calculations. ()
But what if the "protective capacitor" is already fully charged when the ESD event occurs? For example, let's say it is a charged input capacitor of a voltage regulator and a ESD event occurs at its input connector. Does it then still provide any protection?
Any clarification would be appreciated.


texts:
I got this question and wanted to know if my answer was right.

Q.92: Assuming that initially the PIC is addressing Page 0 in program memory; Which of the following snippets of code will jump to program location “PPS2” in Page 1?

a)
goto        PPS2
b)
movlw       b’00010000’
movwf       PCLATH
goto        PPS2
c)
BSF     PCLATH,4
BCF     PCLATH,3
goto        PPS2
d)
None of the above

Doing some research online I understand that PCLatch is a register in bank 1 that works in conjuction with pcl to form a 13 bit register due to the high volume of addresses that need to be viewed.

As a result I concluded (not entirely sure on this) that to jump to PPS2 in page 1 from page 0 I would simply run the goto command therefore solution A.

Am I right on this?


texts: How to measure the potential gradient between large capacitor plates?

texts:
I have built a capacitor for a biology experiment, but I need to measure the potential gradient between the plates. Mainly I am going to apply an AC current between the capacitor plates to have an oscillating electric field, but I would also like to be able to measure the potential gradient given a DC current/constant electric field.
I am wondering: How do I probe the potential gradient?
Obviously, I need to put a piece of metal in the air between the capacitors, but I am wondering how I would connect it.

Do I put a solenoid between the capacitor and measure the current?

Do I place a small metal plate, have it attached to true ground and measure the voltage?

Do I have the plate hovering between the capacitors connected to one of the capacitor plates, and measure the voltage?


texts: Is it possible to build a inverter that operates at a frequency set by an LC tank using ONLY that LC tank and transistors?

texts:
I was always dissatisfied with inverters because it seems like an LC tank and transistors would be all you need. However, after much time spent simulating and a few false positives experimenting, I am beginning to think it is flat out impossible. I have no way to prove it, but it seems that you need at least 4 passive components to create AC from DC. It seems as though it is often that there are a pair of passive components for each phase of the duty cycle.

Is this indeed the case?


texts: Calibrating a capacitive moisture sensor

texts: I am doing a project which require to build a moisture sensor to measure wood chip moisture content. I built the the cylinder and put all the capacitor plate around it and I was able to measure the capacitance of the wood chip. However, I do not know how to convert capacitance that i got to the moisture content. I did a lot of research online but they do not talk briefly about it. Is there any specific equation or way to convert capacitance to moisture content?


texts: Convert single-ended (analog) signal to LVDS

texts:
I am looking for recommendation of a converter/cable to convert a digital pulse to LVDS. Attachment is the schematic of the whole design.

Basically, my task is to measure the photon arrival time, which means to read the time different between a reference signal (REF) and a STOP signal. The REF signal is 3.3 V, 10ns pulse generated by Waveform Generator. The STOP signal is 3.3V pulse, 10 ns width, around 10MHz to 1GHz generated by a Single Photon Detector.
I am using a time-to-digital convert chip (GPX2 TDC) which accepts LVDS inputs, therefore, I need to convert my REF and STOP signals to LVDS signals to do the time measurement.
Just to clarify my design, the time measured is output from this TDC chip is sent by LVDS interface to Spartan 6 FPGA. I need to write VHDL code to read this time and output it to a PC.
Thank you.


texts: 5V DC power to recharge 3.7V LiPo and power a circuit at the same time

texts:
I am building a small (~200mm High) rotating LED light assembly using approx 30 RGB LEDs. I would like to make it as portable as possible so would like to power it with something like a rechargeable 3.7V LiPo battery, and use a boost converter to step up the voltage to 5V.
As even a 2000mAh LiPo battery will be drained within a small few hours, I will build the circuit to allow the connection of a 5V power supply. While powering the circuit, I would also like the power supply to recharge the battery - so everything stays working but the battery also recharges.
I have seen some threads which say to use two diodes on both the power supply and the battery supply voltage when you wish to have power options from both a battery and mains, but I couldn't find anything on recharging the battery when the DC power supply is connected. What other components do I require to achieve this? (e.g. battery charging PCB?)
As well as this, I am interested in anyone's thoughts on the best method of controlling power consumption of the LEDs with something like a 5V dimmer switch, so the LEDs can be turned on with low brightness. Is a dimmer switch the best option here for controlling the power consumption and lengthening the battery life at times when this is required?


texts: Why can electrolytes be used as an insulator?

texts:
Why can electrolytes be used as insulators? Is it because the ions are very stable atoms and will never ever gain, loss or share atoms with something else?

An example is the electrolyte battery:


texts:
Is it possible to perform .four THD analysis of an arbitrary expression in LTspice?

It works seamlessly with simple expressions like V(out) or I(Rload), but I would like to perform THD analysis on an expression like Ix(U1:VCC)+Ix(U1:VEE), which doesn't work (yields no output in the log) when I write

.tran 0 10m 0 1u
.four 1k 18 4 (Ix(U1:VCC)+Ix(U1:VEE))

Such an expression can easily be plotted, though.


texts:
As a part of my effort to build a pure sine inverter I made the following MOSFET H Bridge. This was connected to a load through a LC filter where PWM signals are given as in the diagram below.PWM frequency is 16kHz with Q1 & Q3 switching at 50Hz.

While testing after working for few minutes the fuse blew, Q1 and Q2 failed short circuiting Drain & Source.

For debugging I removed the Filter, connected a resistive load directly and reduced the supply voltage to 170V.

I checked the gate signals of individual MOSFETs. which seems fine. However I got the following waveform for Vds of Q2. There are few spikes reaching up to 380V when supply voltage is 170V. I guess that a supply voltage of 325V these spikes will be much larger damaging the MOSFETs.

What is the reason for these spikes?

Can they be minimized by a RC snubber?

If so how can i calculate values for R & C ?

Any help is much appreciated. Thanks in advance.

Update

Further zooming in i found that the spikes occur when the opposite MOSFET is turned on.
Following is the Vds of Q2(Yellow) and Vds of Q4(Cyan).
I further reduced supply voltage to 90V.


texts: Does anyone know which pins do what on the AR Parrots navigation board?


texts: Adding an anti-aliasing filter to op-amp before ADC

texts:
I am designing a circuit that is intended to capture audio samples from multiple channels for sound source localisation.

Each channel has the following 2 stage op-amp circuit, before going into a 13bit ADC:

I would like to be able to localise sound sources up to about 10KHz but the larger the bandwidth the better (I think the condenser mics can handle up to about 16KHz, not 100% sure)

The faster I sample the better the spatial resolution I can get. I am able to squeeze a sample rate of about 75KHz.

Question
Do I need to worry about anti-aliasing filters before the ADC? As I understand it aliasing only occurs when you operate below the Nyquist limit, so a theoretical maximum frequency component of 75KHz/2 would be my limit, which is much higher than I need.

If I don't need any anti-aliasing filters is there anything else I should be doing to remove unwanted noise on the output? When I look on a scope it seems to be OK but this is only with 1 channel built, I am worried when I add all five channels on the same board that they are going to interfere with each other.


texts:
The emitter follower bellow cannot follow the base voltage Vb after some point:

Vin input is DC sweeping from +10V down to -10V.

The output voltage Vout however stops following Vb at some particular voltage and settles as in the below plot:

Why is that happening?

edit:

Here is my latest understanding step by step fashion(let me know if it is wrong):

Starting the scanario while the transistor is on active region...

As long as the current flows from Vcc to both "Vee and GND" the emitter voltage follows the base voltage.

But decreasing the base voltage gradually will decrease the base current.

This will in turn will gradually decrease the "Ic = beta*Ib" (current passing through the tarnsistor down to -12V terminal and GND).

There is a moment where the base current approaches to zero so Ic approaches to zero.

At this point the transistor starts going to "cut-off region" i.e. stops passing any current.

At that moment the transistor starts shutting-off leaving almost no current through collector to emitter.

Now the current starts to flow from GND to -12 where Rload and Re forms a voltage divider.

The emitter voltage starts to settle to around -2V.

After this point lowering the base voltage even more negative than zero to -1.2V, will start to reverse bias the base-emitter junction.

This is beacuse the emitter voltage is settled to -2V and the transitor is off.

The emitter follower rules doesnt hold anymore.

If the load wouldn't be there the base voltage wouldnt be limited to -2V.


texts: What is the capacity of capacitors in this power supply circuit?

texts:
Imagine the following circuit with two capacitors and diodes acting as passive PFC.

My question is what is the capacity of these two capacitors? I mean compared to a circuit with just a single capacitor. Some people say they are in series so their capacity is halved, but I am unable to understand it.

As an example: Let's have 230 VAC, so we want to get approximately 316 VDC from AC-DC converter. We could use a single 400 V capacitor, let's say we take 10 uF. Without PFC. Now, if we use two capacitors instead, 200 V and 10 uF each, and connect them to this PFC circuit, the result will be just like having a single 5 uF capcitor? If this is truth I must be missing something, because I expect the capacitors are charged to 10 uF each and then discharged in parallel, so their capacity is actually added and only voltage is halved.

The reason why I ask this question here is that I read a review of one ATX power supply and the reviewer wrote that it contains a pair of input filtering capacitors in series, so their capacity is halved and it is insufficient. But as it was a passive PFC power supply, I expect this valley fill filter to be used there and I'd like to know whether the statement on halving the capacity is then correct.


texts: I am working on a receiver in which I would like to limit the RF power at input to -10dBm to -20dBm, the receiver is working for frequency 1GHz. I Have checked pin diode limiters and shottkey diode limiters, but they work for not more then 0dBm. Is there any way i can design a limiter for the required limiting range? Are any papers available on it?


texts: What is SPI Interrupt (SPIE) in SPI control register?

texts: I have been trying to understand SPI Interrupt i.e. what does it do and why is it used ? Reading about it on the web has not helped me. Can some one please explain it in a simple terms ?


texts: How to find differential equation satisfied by \$u_{R_{equivalent}}\$, \$u_{L_{equivalent}}\$ or \$u_{C_{equivalent}}\$ in complicated RLC circuits?

texts:
When i'm given simple RLC circuits i know how to find the expression for each voltage, for example the expression of \$u_R\$ the voltage between the borns of the resistor \$R\$, or the expression of \$u_C\$ the voltage between the borns of the capacitor \$C\$, or the expression of \$u_L\$ between the borns of the inductor \$L\$... it all starts by finding first the differential equation they satisfy usually using Kirchkov's law of currents. not only but also in complicated circuits like this one

http://sketchtoy.com/66481514 (someone please post image i can't do it (on ipad))

the basic idea is to find \$R_{equivalent}\$ and \$L_{equivalent}\$ and \$C_{equivalent}\$ and then to use same past technique, Kirchkov's law => differential equation => solution (expression desired). (what we would be searching then is an expression for the voltage between the borns of the equivalent resistor, and not each resistor)

but how to do when you have the resistors mixed up with capacitors in parallel and stuff like that ? (as below) how can we find the diff. equation satisfied by \$u_{R_{eq}}\$, \$u_{C_{eq}}\$, and \$u_{L_{eq}}\$,  in that case?

http://sketchtoy.com/66481556

Edit: I'm not looking in particular for the solution of these differential equations, just to find the differential equation itself.

(sorry for writing and links to images, using ipad to write is difficult)


texts: Digital filtering after analog to digital conversion (ADC)

texts:
I am making a PCB that receives a signal with a frequency band of 3-50 Hz and peaks of up to 10's of uV. I have implemented proper analog LP and HP (band-pass) filters and am using a 16-bit isolated ADC to send the data to a computer.
I am using Python to read the lines (derial communication) from the ADC (which is acting as a slave to my MCU.)  The system diagram would look something like this:

simulate this circuit – Schematic created using CircuitLab
When I get my data and do real-time FFT (since it is a non-stationary signal,) one obvious feature is a peak at 50 Hz (the mains has a frequency of 50 Hz in the UK,) and for that I can add a notch filter to reject the 50 Hz component, but that would mean extra cost and time to implement it.
I don't have much experience with digital filtering, but I was thinking, rather than implementing a hardware-based analog filter, is it possible to do the following procedure:

Perform the FFT.
Reject and suppress the 50 Hz component.
Convert the signal back into time domain.
Perform the analysis.

Will the time delay for this kind of filtering be just the number of machine cycles the computer goes thorugh to preform this task?
If this is plausible, is there anything that's wrong with just amplifying the signal and getting rid of the high frequency noises and spikes with a passive filter and performing all the mentioned filtering (notch, LP and HP) in the computer with Python or any other software methodology for that matter?
In terms of resolution, is it correct to assume that the final signal resolution under analysis is the multiplication of the resolution of the ADC by the digital filtering's resolution, since in my code values are saved as 32-bit floats?


texts:
I am building a 5 V PSU to charge my phone. I am using a 7805 regulator. When I connect to the phone the Android Charger Tester app reports a charge current of only 100 mA or less. This is confirmed by measuring the current with my multimeter connected in series with the +5V line. I am expecting much more. The phone's battery state indicator shows charging but not increasing battery level.

This is the diagram

Link: https://www.electronicshub.org/understanding-7805-ic-voltage-regulator/


texts: Using 22pF load caps with 16MHz crystal on atmega328p fails to work

texts:
I'm having a hard time figuring out why after attaching 22pF load caps to a 16 Mhz crystal on atmega328p my whole project (aka flashing leds) does not work. Once i remove the load caps everything works correctly (the leds flash faster ~), and avrdude detects the atmega. I'm using avrdude -P usb -c usbtiny -p m328p -U lfuse:w:0xE6:m to enable the crystal.

I'm following the atmega spec documentation (section 8.3).


texts: FatFs strange behavior when writing to text file

texts:
I wrote a small program with PIC32MX microcontroller that sends data to a txt file in the SD card, then reads the data back from the file and finally  compares the data before sending them with the data after sending them, from the txt file of the SD.

I do this, to check if the bytes are saved/retrieved correctly (or not) to/from the txt file created in the SD card.

Data consist of only two characters, 'G' and 'H' . First I write 500 Bytes of  'G's and then 500 Bytes of 'H's. repeatedly for 10 times and the total number of bytes in the txt file would be 10kB.

Also,  data in the txt file of the SD would appear like this: GGG...HHH...GGG...HHH... etc.
To write these data to the file I use the f_write() function

FRESULT f_write (
   FIL* fp,          /* [IN] Pointer to the file object structure */
   const void* buff, /* [IN] Pointer to the data to be written */
   UINT btw,         /* [IN] Number of bytes to write */
   UINT* bw          /* [OUT] Pointer to the variable to return number of bytes written */
);

And here lies the problem. When I set the Number of bytes to write, to 1000 bytes(500 'G's and 500 'H's, the result in the txt file is only GGGGG... with no'H's. When I double the number of bytes to write, from 1000 to 2000, only then GGG...HHHH...GGG...HHH sequence appears correctly.

And the question is, why is this happening. Normally the latter (correct) result should occur when I set the exact number of bytes to write, in the function (1000) and not by doubling it(2000)

Any idea why this happens?

Thank you for your time


texts: 0-5V signal output to start 230V DC circuit

texts:
I would like to ask you how to solve my case.
I need output from PC's paralel port (something between 0-5VDC and low current) to switch 230VAC circuit.
There is 24VDC/5A PLC power supply also, so I know that step from 24VDC to 230VAC (contactor or SSR), but Im completely lost how to safely make the rest.
I read in other topics i need to buffer that signal,but dont know how.
Its for homemade CNC, to start/stop 0,7kW milling machine.
Thanks!
Edit: CNC is plugged in socket and i want start/stop this socket by signal from PC.


texts:
I am trying to check how electric devices such as Sunroof could affect the remote key performance range (meter) for cars. I am thinking of measuring relative antenna gain of RF receiver of one test vehicle at various test condition with below method.

Disconnect and put off the RF receiver(RFR) in the car
Soldering shield wire at LNF Output pin of the RFR chip and connect the wire to spectrum analyzer. (Please refer to below measurement point.)
Put the RFR to the original location in the vehicle
Tx Signal is sent by pushing button of the original key fob for the car
Compare the RFR gain value [dBm] at different test condition.

Test site is widely open space.
Spectrum analyzer is in vehicle. One person send Tx by Key Fob outside the car. The other check the dBm gain in the car.
Test condition is to turn on and off radio, sunroof or blower electric devices.

#1 Measurement point: LNO pin 6 of Infineon RFR, TDA 5211

I add wire without disconnecting any of the RFR circuit to visibly check if the car operates Lock or Unlock function when the key fob sends Tx signal. I prefer vehicle level test, not component level. I know the gain measurement is not accurate because of other RFR elements, but i think that i could compare the gain value with different test condition. My goal is to find best test condition for relatively higher gain that leads to best remote key range(meter).

[#2 Measurement result]:

-69.3 dBm is measured even without key fob operation. Should I think it as base noise level? Please kindly review if my test approach has any problems.


texts: The L7805 got hot when connected to ATMega8?

texts:
I tried to make the blinking LED example, I took the power from L7805 directly to ATMega8 and the output of MCU is through pin 28 to 3mm LED and 390 Ohm resistor.
But when I ran the project, the L7805 got hot quickly. What did I do wrong?

simulate this circuit – Schematic created using CircuitLab


texts: How to switch on PixMob-like led bracelet?

texts:
I've a led bracelet, which was switched on and controlled by concert organizer (the bracelet called 'fanband' and according to the official site controlled either by special remote or by sound). I thought that this is PixMob bracelet, but it is not. See attached image to see what is inside.
I searched for CY-RF310, but found nothing.

The question I have is how to switch it on and control then?


texts: USB scope probe - request for comments and ideas

texts:
Idea:

Take one oscilloscope probe, and one USB cable.  Cut the BNC connector off the oscilloscope probe, and the USB B connector off the USB jack and splice them together.

Mount all the USB <--> analog circuitry inside the scope probe body and/or the USB A connector body.  It would essentially compete with all the other USB oscilloscopes out there, but it would be in a single cable design - no extra boxes, etc.

Is this a product you would like?
What are your minimum specifications for this type of product?
What are your ideal specifications for this type of product?
Would this be any more useful or desirable than the current USB oscilloscopes available?

My biggest concerns are:

Obtaining the speed necessary to be reasonably useful without requiring a lot of components
Synchronizing multiple probes into the computer (Getting nS accuracy without wiring the probes together seems problematic...)
Fitting it all into the form factor and power limitations of a USB port (ideally 100mA unpowered hub ~0.5W)
Keeping the assembled cost low

I'd appreciate feedback on any or all of the above (what you want vs how to implement it).  Ideally it'd be completely open source, but using very tiny surface mount parts it might not be easily assembled by hand.


texts: What is the recommended exposure time for presentisized positive photoresist board?

texts:
What is the recommended exposure time for presentisized positive photoresist board using UV light, fluorescent light, CFL bulb and (will it also work with LED light)?

How do we also determine if the resulting exposed board that failed is overexposed or underexposed like this?


texts: Which motor is slower than (and can be swapped with) a 28BYJ-48 stepper motor?

texts:
I have a DMX light that rotates a gobo using a 28BYJ-48 stepper motor. It has four DMX responsive settings: off, slow, medium, fast. However 'slow' is still about four times too fast for the effect I need.

To make it slower I'm considering replacing the 28BYJ-48, if possible, by just swapping it with another 5V stepper motor the same size that goes slower. Can you suggest an alternative motor?

I'm not able to alter the motherboard components or recode the firmware.
The 'standard DMX speeds' of the 28BYJ-48: slow is 1.83 rpm; medium is 2.09 rpm; fast is 2.44 rpm. I'd like anything slower, but I think .5 rpm would be ideal.
I've read reference to 're-gearing' stepper motors. If this would be a better alternative please advise why.
I haven't been able to slow the rotation with DMX software. I've sought advice on DMX forums about the software side and there doesn't seem to be a solution there. I've tried 100ms on/off iterations (the minimum time possible) through the software but this makes it jerky.


texts: How to do pulling up or down correctly when interfacing a microSD card?

texts:
I have seen people pulling up only the CS pin, so that when the microcontroller's pins are floating in the power-up, the microSD card is not corrupted.

Also, I have seen many people pulling up and down DI,DO and SCLK lines.

Some of the circuits that I've seen even connect pins 1 and 2 to Vdd/2 via a voltage divider that is formed between Vdd and Vss.

Which pins of the microSD card should be pulled up or high when interfacing a microcontroller with an embedded SPI interface and has the appropriate logic voltage levels?


texts: Cost Effective Alternative to IMS(Insulated Metal Substrate)

texts:
I am currently working on a project where we are trying to limit costs as much as possible and one of the results of this is trying to avoid using IMS(insulated metal substrate, in this case 0.125" aluminum instead of the typical FR4 in PCBs) in the power board design.  We currently use an IMS in a large portion of our designs, however this particular job is more competitive  and we are hoping to avoid the cost and slower procurement of the IMS.

The basic setup of the power board is a charge FET(s) and a discharge FET(s) as shown in the basic schematic below.  There is a fair bit of control circuitry for the FETs that is not shown, as it is both complex and proprietary, and shouldn't be relevant for the scope of this question.

simulate this circuit – Schematic created using CircuitLab

For this project the current requirements are 120A charge for 3 min, followed by 4A discharge for 90 min, and repeated continuously for the life of the battery.  The FETs we are planning on using are IPT015N.

The current design idea I am working with is a stamped copper bus bar with rounded square protrusions that fit in a slot in the FR4 allowing the drain tabs of the FETs to be soldered directly to the bar.  This has the benefit of allowing us to put both control and power circuitry on the same board, as well as being much easier to have manufactured and prototyped.

My questions:

Is this bus bar protrusion a reasonable approach to draw heat from the FETs in large-scale production?  While the testing indicates it is a viable option, it seems to be rather unique approach.
Are there any other alternatives to IMS that are cheaper and could be effective in this scenario?


texts: Filtering voltage spikes caused by slow SMPS output regulation

texts:
I have a 48V 50A SMPS driving a fairly erratic load. The load varies wildly between 1 and 10A and can suddenly drop from full load to low load. I don't have an oscilloscope at hand, so these are estimates.

The load is very tolerant and won't care much about voltage variations in either direction. The problem is that the over-voltage protection on the power supply is fairly aggressively tuned at around 54…56V. It trips pretty often. I believe this is because the output regulation can't quite keep up with the sudden drops in the load.

What can I do to remedy this issue? I have considered the following:

Add a resistive dummy load in parallel to help the regulation in case it struggles at low loads. How should I size it? 10A? 480W is a heck of a lot of power to dissipate in a resistor.
Add a capacitor across the power supply output. I have no idea what size it should be to have an effect, but my guess is huge.
Add a TVS diode across the power supply output. This was suggested here and indeed it seems ideal for filtering inductive spikes. But I'm not sure how well it plays in this case. Conveniently, there is a 51V part available though.

Is my diagnosis correct? What would you suggest to solve the problem?


texts: Connection between 2 STM32F103C8 using I2C

texts:
Hello I am new to STM32 and I am trying to learn I2C communication between 2 STM32F103C8 MCUs.  MCU1 acts as the master and MCU2 acts as the slave.  I am using CubeMX to configure the settings however I could not establish a link between the 2 MCUs.  What I wanted to happen is that once I toggle a button connected to MCU1, the LED controlled by MCU2 should be enabled.
Here's my code for the master MCU1:
        //Enable Button_LED1 and assign 0xFF data.  0x1F is the slave address
        if(HAL_GPIO_ReadPin(BUTTON_LED1_GPIO_Port, BUTTON_LED1_Pin))
        {
            Buffer_I2C[0] = 0xFF;
            HAL_I2C_Master_Transmit(&hi2c1, 0x1F, Buffer_I2C, 1, 10);
        }

        //Disable Button_LED1 and assign 0x00 data
        else
        {
            Buffer_I2C[0] = 0x00;
            HAL_I2C_Master_Transmit(&hi2c1, 0x1F, Buffer_I2C, 1, 10);
        }

Here's my code for the Slave MCU2:
    {
        HAL_I2C_Slave_Receive(&hi2c1, Buffer_I2C, 1, 10);
        uint8_t data = Buffer_I2C[0];
        switch(data)
        {
            case 0xFF:
            HAL_GPIO_WritePin(LED2_GPIO_Port, LED2_Pin, GPIO_PIN_SET);
            break;

            case 0x00:
            HAL_GPIO_WritePin(LED2_GPIO_Port, LED2_Pin, GPIO_PIN_RESET);
            break;

            default:
            break;
        }
    }

May I ask what is wrong with the code?  Thank you for your time.


texts:
I am confused about the Transformer dot polarity. I got design from ST's edesign Suite. Here is schematic for that :-

Now I need to order the design for transformer and the transformer design centre asking for dot polarity/Start-End point of pins. According to circuit, there are only 4 pins used on AC side and 2 pins on DC Side. The ST recommends EE-10 size Bobbin. Here is layout for that :-

What does 2 Pin in above figure donates? Is it start point or end point? Where to connect this pin in circuit?

I only need 6 pins for my circuit, but the layout for Transformer shows 10 Pins. I am also confused about the polarity.

The Transformer specs :-

Design Specs :-


texts: Revising CRC value after data adjustment

texts:
I have a 181 bytes data stream with 4 bytes CRC32 value at the end. The entire message length is 185 bytes.

The data stream is stored in the FPGA onchip memory and waiting to put into wire by TCP.

Before sending out the message, there are some 32 bits data in the data stream need to be modified resulting revising CRC value is needed.

The location of the new bit values are from 41st - 63rd bit (starting the 5th byte) from the LSB of the stream.

As the CRC is within the tcp message payload, the tcp header and ip checksum have to be revised as well.

Currently I have to build a pipeline module for re-calculating the CRC like this:

module crc32 (
input rst,
input clk,
input [255:0] in_data,
input crc_en,
output crc_out
);

It works but it need to spend 181 bytes / 256 bits ~= 6 cycles for revising the CRC value of a 181 bytes TCP message.

Although the CRC is located at the end of the business message, the tcp header checksum (which is more significant than the tcp payload) can be revised only when the new CRC value is calculated. That's the reason why it have to wait 6 cycles.

Is there any smart revising CRC algorithm so that I can use less number of cycles to revise the CRC of a modified data stream?

Ideas:

Is there any way to recalculate CRC based on the old CRC value? CRC(new) = revise(CRC(old))?
I learn from this paper that by patching the data stream to maintain the old CRC value.

CH5 : GETTING A CHOSEN CRC BY ALTERING A CHOSEN POSITION

It is interesting but it require to recalculate crc from n bit to m bit

where n = start bit location of modified field

m = start bit location of the patch field

which doesn't look good for saving clock cycles.


texts: Different phases on different components

texts:
Say I have a typical wiring in my room where in I have two computers (A and B).  A is a power hungry machine whereas B is simply a laptop.

Due to various reasons I decided to get a power board with 3 electrical phases in it.  So my main AC board where you plug in the computer power cable has 3 sockets each on different phases namely Red Yellow and Blue respectively.  This board is only available to the computer A.

I connect my laptop B to another AC board which runs on the Red phase.

Now if I connect my main pc A to draw power from AC socket with phase other than Red which is Yellow or Blue and let the laptop run on Red phase, my questions are as under.

I want to clarify here that both the systems need to be connected to each other using ethernet.

Would I blow my whole setup if I connect the two systems on different phases by connecting them using an ethernet cable?
Is this setup correct and will work or all devices in a network should be connected via a single phase.


texts: Dev Platform to talk to PMBus/SMBus/I²C Power Supplies

texts:
I am looking for a simple way to talk to PMBus power supplies (ie. get current information, turn power supply on or off, etc). This is normally integrated on computer main boards or server main boards.

Would anybody know any way that allows me to communicate with PMBus/SMBus from a computer or serial device etc, apart from creating something completely from scratch?


texts:
Currently I have a circuit on my breadboard but the problem is I have no idea how to paste this circuit on the zero PCB board. basically the circuit I created was using LDR, transistor, LED and a resistor to make sure the LED turns on only if the light was off. This was a sample circuit I designed on a breadboard:

However I have a problem, I do not know or have any knowledge on pasting a a series circuit on a zero PCB. I would appreciate how I can make this circuit on this bread board work on a Zero PCB. I know how to solder it on, but I just do not understand how I can align the components properly and the videos on youtube seem too difficult for me as a non engineer student.


texts: Why a ground loop a problem, not a ground plane(patch attena)?

texts:
The question is as the title says:

I see various material saying using a solid ground plane. Why would not that be a problem, since a solid ground plane could be a patch antenna?


texts: Suitable Replacement for a Dual Coil Latching Relay

texts:
After questioning about my broken thermostat there Debugging an old Thermostat: What component is this? (3 pins SMD IC), thanks to @JRE I could find that it was actually the relay on the board that was broken.
Now I'm looking for a replacement of this relay, but I didn't think it could be so difficult to find it... I need either to have a correct naming of this component so that I can find it, or a website + specific component to buy would be so much better.
I already checked mousers, digikey, rs etc but couldn't find a suitable replacement. The main reason is that I can't find one with the same pin out (I've got 3 input pins due to the dual coil, and also 3 output pins. The output pins are not aligned, also see picture below)

Here is the detail of the component (from my understanding, please also check the picture below):
Dual Coil Latching Relay, 3Vcc 21 Ohm coil, 8A 250Vac contacts, SPST (not sure this is the actual acronym because it's dual coil).

Update: What's wrong with the broken relay?

The relay "clicks" both ways (i.e. whatever coil I supply, the relay clicks), but only two of the three output poles are connected (i.e. one position doesn't work even if the relay clicks when it turns to that position).


texts: Best solder wire - Sn63Pb37 vs Sn60Pb40 vs ...?

texts:
Usually my circuits are full of very fine-pitch SMD components. I solder the prototypes manually, which takes a lot of time. Good tools and high-quality solder can speed up the process.

I prefer using leaded solder, as it flows better at relatively low temperatures. This way I can prevent my components from overheating. Leaded solder is not allowed for commercial products, but is okay for prototyping.

There are several types of leaded solder wire on the market. I'm trying to find out which one is "best". Let's define "best" as follows:

Low melting temperature (prevents overheating components).
Good wetting of pads and pins.
Preferably contains some flux, so one doesn't have to apply it all the time externally.
Very fine diameter for soldering small components (like LFCSP package, 0402 or even 0201 resistors, ...)
Price is no issue.

I have several questions:

1. Tin - Lead alloys
I read on Wikipedia that the Sn60Pb40 solder is very popular for electronics (I agree, I have used this one so far). Wikipedia also mentions that Sn63Pb37 is slightly more expensive but also gives slightly better joints.

What do you think about Sn60Pb40 vs Sn63Pb37? What is actually the difference?

2. Exotic alloys
But these are not the only solder alloys. More exotic combinations - containing tin + lead + silver and even with gold exist.

Will these exotic combinations change the properties?

3. Bismuth and Indium alloys
Some of you made me aware of Bismuth- and Indium- based alloys. I've dedicated a new question to cover them: Bismuth or Indium solder - what would you choose?

NOTE: I use a solder-smoke extractor.


texts: What is a BFM, what does it do in a simulation?

texts:
When we want to test a digital system and verify its working, we just write a testbench and put in some stimulus for a DUT. Basically this would invovle assigning a value to a signal followed by a wait statement followed by another signal assignment and a wait statement and so on, this is done until we have tried all possible inputs that we want after which the simulation reaches its end.

Now I have come across something called BFM and want to know where does it fit in the scenario. Are there different type of BFMs that exist for different type of tests as there are going to be (occasionally) dozens of signals on a DUT? What I expect that is that a BFM (which stands for bus functional model) contains instructions within it for stimulating the signals of DUT. Thus, in a testbench we shall simply instantiate the BFM and it's corresponding DUT and connect them. Nothing else needs to be done and the DUT shall be simulated without us having to write any lines for signal assignments or wait statements, is my understanding (guess) correct?


texts:
I have PIC16F628A that I am trying to have read from UART. Without interrupts, it reads the first 3 bytes fine but hits an OERR. To combat this, I thought an interrupt would be good and load any received bytes into a buffer variable that could be read in later (ring buffer of array type char). But the interrupt is not triggering and I've run out of ideas.

CMCON = 0x07;           //16F627/8 spcial function reg (RAx is port)
CCP1CON = 0b00000000;   //Capt/Comp/PWM off

OPTION_REG = 0b00000000;

T1CON = 0;
INTCON = 0;
PIR1 = 0;
GIE = 0;

PIE1 = 0;

BRGH = 1;   /* high baud rate */
SPBRG = 19200;  /* set the baud rate */

SYNC = 0; //Async
TXEN = 0; //Disable transmit
TXIE = 0; //Disable transmit interrupt
RCIE = 1; //Enable Receive interrupt
SPEN = 1; //Enable serial pins
CREN = 1; //Enable continuous receive
SREN = 0;
TX9  = ninebits?1:0;    /* 8- or 9-bit transmission */
RX9  = ninebits?1:0;    /* 8- or 9-bit reception */

PEIE = 1; //Enable external interrupt
GIE = 1; //Enable global interrupt

I have simplified my interrupt to turning on a light:

extern interrupt isr(void)
{
    RB5 = 1;
}

But it's not triggering. The project is reading a barcode scanner over serial and processing the barcode. Can anyone offer some assistance?

EDIT

Ok since you don't seem to understand. I'm going to post the actual routines:

void initialize()
{
    CMCON = 0x07;           //16F627/8 spcial function reg (RAx is port)
    CCP1CON = 0b00000000;   //Capt/Comp/PWM off

    OPTION_REG = 0b00000000;

    T1CON = 0;
    INTCON = 0;
    PIR1 = 0;
    GIE = 0;
    PEIE = 0;
    PIE1 = 0;

    sci_Init(BAUDRATE ,SCI_EIGHT);// Baud set and Bit set

    TMR0 = 1000;
    T0IE = 0;
    PEIE = 1; //Enable external interrupt
    GIE = 1; //Enable global interrupt

    //Set inputs to input
    SetButtons();

    //Set relays to output
    SetRelays();

    TRISB5 = 0;

    LEDStatus = 0;
}

unsigned char sci_Init(unsigned long int baud, unsigned char ninebits)
{
    int X;
    unsigned long tmp;

    /* calculate and set baud rate register */
    /* for asynchronous mode */
    tmp = 16UL * baud;
    X = (int)(FOSC/tmp) - 1;
    if((X>255) || (X<0))
    {
        tmp = 64UL * baud;
        X = (int)(FOSC/tmp) - 1;
        if((X>255) || (X<0))
        {
            return 1;   /* panic - baud rate unobtainable */
        }
        else
            BRGH = 0;   /* low baud rate */
    }
    else
        BRGH = 1;   /* high baud rate */
    SPBRG = X;  /* set the baud rate */

    SYNC = 0; //Async
    TXEN = 0; //Disable transmit
    TXIE = 0; //Disable transmit interrupt
    RCIE = 1; //Enable Receive interrupt
    SPEN = 1; //Enable serial pins
    CREN = 1; //Enable continuous receive
    SREN = 0;
    TX9  = ninebits?1:0;    /* 8- or 9-bit transmission */
    RX9  = ninebits?1:0;    /* 8- or 9-bit reception */

    rxBuffIndex = 0;
    rxBuffRead = 0;

    return 1;
}

void sci_LoadBuffer(void)
{
    rxBuffer[rxBuffIndex] = RCREG;

    rxBuffIndex = ++rxBuffIndex % MAXBUFFER;
}

unsigned char sci_ReadBuffer()
{
    unsigned char byte;

    do
    {
        byte = rxBuffer[rxBuffRead];
    }while( byte == 0 ); //Block until valid data

    rxBuffer[rxBuffRead] = 0;
    rxBuffRead = (++rxBuffRead) % MAXBUFFER;

    return byte;
}

void interrupt isr(void)
{
    if(RCIF) sci_LoadBuffer();
    LEDStatus = 1;
}

I know that's not EVERYTHING but that should be enough to diagnose why the interrupts aren't triggering. THAT'S ALL I NEED! Triggering the interrupts.

I'm using MPLab with Hi-Tech C Compiler. Which from the manual automatically saves state and restores it when entering/exiting the interrupt.