texts: Pulling voltage on a "pull-up" input down to match voltage of voltage output from another device

texts:
I have a large lithium (LiFePO4) battery pack composed of 16 cells in series. It is monitored by a BMS (Battery Management System) which is interfaced to a battery charger (Victron Quattro).

The BMS and Battery Charger are from different manufacturers but both include "industry standard" ways of interfacing with each other via analog inputs/outputs.

As the BMS monitors the battery it offers an output pin where the BMS sets the voltage on this pin between 0 volts and 5 volts to indicate the maximum acceptable rate of charge current (amps) into the battery:

0.0 volts = Max charge of 0 amps
1.0 volts = Max charge of 14 amps
2.5 volts = Max charge of 35 amps
...etc... up to:
5.0 volts = Max charge of 70 amps

(Actual amperages adjustable, this is what I have it configured for)

The battery charger conveniently (or so I thought) also has an "input" that, according to their marketing material, can read a voltage and adjust the chargers output current based on the voltage read on the input pin. It does this in a linear fashion and I have it configured to match the BMS:

0 volts = 0 amps, 5 volts = 70 amps, linear relationship in between.

Here's where it gets tricky: Once I actually got my hands on the charger I discovered that the "input" pin is held high with an internal 10 Kohm pull-up to 5v. The expectation is that a user would connect a potentiometer between the input pin and ground and use that to adjust the resistance and "pull down" the voltage on the input pin to control the voltage and thus the rate of charge current from the charger.

So I'm left with trying to figure out how I can build a (Hopefully simple) circuit that will pull the input pin on the charger "down" to match the voltage of the output pin on the BMS unit.

The challenge I've faced trying to research this is that every thing I find referring to anything related to pull-up resistors is for digital logic (IE: On or off). However this particular piece of equipment is using it for an analog input. The few analog resources I found were for reading the amperages of input signals rather than the voltages.

The other area I tried to research was voltage regulation. But everything related to voltage regulation focuses on the wrong side of the equation: Regulating the output from the regulator rather than regulating the current to pull down the input to a specific voltage.

I've also tried to research using a simple transistor for this. However I haven't been able to find anything that shows a transistor being used in this way though logically it seems to me it might work.

I've already reached out to the battery charger manufacturer (Victron Energy) and asked if it's possible to disable the internal pull-up to 5v on this pin. They say it's not possible.

In Summary: Is there a relatively easy way to pull the voltage on a 5v pulled-high input pin down to match the voltage of another source?


texts: Mosfet Motor Drive amplifying duty cycle of PWM

texts:
I am receiving PWM signal at 7.8V from a given controller, with which we need to control the speed of a DC motor at 18 V. I implemented the following circuit for this.

However, the output to motor signal (blue) is not following the original PWM (yellow)  and duty cycle is increased by 50%. What could be the culprit. I dont think it is the awkward taper off on the downleg of the input signal .

What could be a remedy?

How about this solution?

How to reduce MOSFET turn-off delay


texts: How to name what this resistor is doing?

texts:
I have a basic circuit that uses a photoresistor powered by a five volt source. I had made this project to show my son about various sensors and had used a circuit I had found online. It looks something like this:

simulate this circuit – Schematic created using CircuitLab

The only way I could explain this, is that the resistor would provide a safe path to ground so that current would not flow in to and hurt the analog sensor (leaving just "voltage" to read from the photoresistor).

I am not sure its point is to protect it. I've looked at examples of pullup/pulldown resistors, however that seems to be for preventing a logic input from "floating". It appears that it would not do so in this circuit as it is a continuous variable voltage supply.

How do I name its purpose?


texts: Do number of reflections depend on frequency?

texts: Consider there is a transmitter at A and receiver at B and transmitter is transmitting radio waves. Further there are obstacles of different sizes in between A and B. Now if we increase the frequency of operation will there be more reflections in B. This assumption comes form the fact that for smaller frequencies some obstacles may not reflect to B.


texts: PID - Integrator Anti Windup limit values

texts:
I'm implementing a PID controller in software.
Using P+D only doesn't bring me close enough to my set-point so I decided to also use an Integrator with Anti-Windup.

Question:
In my Anti-Windup code - how do I decide on the upper and lower limits of the integrator ?


texts: What's oscillatory instability in the delay differential equations?

texts:
Does DDE’s stability depend on forcing term and ODE’s stability does not depend?If yes, then is frequency analysis of stability applicable only to DDE and not ODE?

In control systems, we study frequency analysis of stability and i want to have an intuitive understanding. I understand Bounded Input, Bounded Output(BIBO).But,  How does one go from BIBO to frequency methods? My conjecture is that frequency methods of stability makes sense only in DDE, not ODE. Am I right?


texts: differential amplifier mismatch of transistor values

texts: I am studying differential amplifiers and I am confused that when mismatch occurs in gm or RC in BJTs or gm and RD in mosfets, in book it carries out calculations as if the transistors are matched. When Rc's are not equal, there is no even splitting of emitter currents and different Ic values come up and things change a lot, but the book treats these cases as if Ic's are equal. I am confused. Did not I understand the book well or is this the way?


texts: Replacement capacitor type for microphonic ceramic cap

texts: I have a guitar effects pedal that has become microphonic, meaning if you tap the enclosure the sound can be heard in the amplifier. I've traced the issue to a single ceramic capacitor on the board. The cap value is 0.01uF and I'd like to replace it. The pedal isn't expensive so I'm not too worried about damaging it by attempting a repair. The problem is that it's a tiny SMD component, I think a 0603 package. Should I replace it with a different type of capacitor or is it a fluke that this ceramic one is defective?


texts: ACM2012-900-2P filter can be used on USB 3.0 lines of a Type-C connector?

texts: I have doubts that this CMF is recommended for USB3.0 due to his bandwidth. I am afraid it will filter the USB signal. Can someone explain better the SCCC21 and SDS21 characteristics from here? https://product.tdk.com/en/search/emc/emc/cmf_cmc/info?part_no=ACM2012-900-2P-T002


texts: two independent zones from central heating unit

texts:
I have a central heating unit (a pellet stove) for a two floor house. I'd like to control it independently from two thermostats.
The stove at the moment is controlled by a single thermostat input and it turns on and off a circulator pump with an internal logic board. Circulator can be on both depending on thermostat input and on internal conditions, in particular if the heater overheats to dissipate some heat by sending water into the radiators.
Now I'd like to add two electro-valves. In the simplest scenario they would be controlled by two independent thermostats that go in OR into the thermostat input of the heater logic board. This way though I lose the safety mechanism. With valves closed the heater cannot dissipate.
Logic would be roughly like this:

each valve opens if their zone thermostat is on
one or both valves must open if both the thermostats are off and the circulator is on
both thermostats in parallel go to the heater input

I believe I need some relay logic but I'm not an engineer and I'm a bit out of my comfort zone. Would you please validate my reasoning?
Let's give some names:
A zone A thermostat
B zone B thermostat
C circulator output from the heater
V electro-valve
T thermostat input to the heater

I'd say that I should have a truth table like:
A B C  V1 V2 T
0 0 0  0  0  0
0 0 1  1  1  0
0 1 0  0  1  1
0 1 1  0  1  1
1 0 0  1  0  1
1 0 1  1  0  1
1 1 0  1  1  1
1 1 1  1  1  1

That should lead to:
T = A or B
V1 = A or ((A nor B) and C)
V2 = B or ((B nor A) and C)

Which simplified should be:
T = A or B
V1 = A or (not B and C)
V2 = B or (not A and C)

Now my problem, assuming my reasoning is correct. How do I turn this into a ladder diagram and more importantly connection schematic? what kind of relays do I need? (everything is on 230V AC, if it matters)
UPDATE:
Here's a tentative ladder diagram, as I said it's not my field so it probably sucks :-D


texts: What is the difference between CPU transistors and generic ones?

texts:
Recently I had to build a h-bridge driver for my project, wireless power transmission. I learnt that I needed to have dead-time in my PWM signal given to IR2110, which doesn't have any dead-time control function. As my model only requires below 200kHZ, I had to code the arduino uno which I used to generate the pwm signal, to have dead-time. My brain got stuck in a question, what is the difference between the generic mosfets and the mosfets/transistors used inside the processor? As modern CPU clock is nearly 5GHz while a normal CPU can have a clock of around 3Ghz. So how does they do it?

How do they reduce the turn-off delay in CPU? How do the mosfets inside a CPU switches so fast while a generic mosfet like IRFZ44N have a turn off delay time of 44ns according to the datasheet?

Thanks.


texts: Having trouble in designing mosfet source follower with current mirror

texts:
I know small signal voltage gain is 0.9V/V, and
I know the equation of transconductance in pi-model

$$A_v = \frac{r_o || R_L}{1/g_m + (r_o || R_L)}$$
But in this problem there is no connected \$ R_L \$ so I'm confusing how to find \$ g_m \$ value.
When I success to find out \$ g_m \$, I can also find out \$ (W/L)_{Q3} \$.
Second trouble is I can't sure how can I give current value \$ I_{BIAS} \$ going through Q2.
I know \$ V_{GS} \$ on the current source part is 0.8V, and
$$ \frac{I_{REF}}{I_{BIAS}} = \frac{(W/L)_{Q1}}{(W/L)_{Q2}} $$
How can I guess \$ I_{BIAS} \$?


texts: Can SPI and I2C be implemented using GPIO pins?

texts:
Can SPI and I2C be implemented using digital GPIO pins? I.e. can the SDA and SCK pins of I2C and the MISO, MOSI, SCK, and SS pins of SPI be emulated by setting GPIO pins as input and output accordingly?

For example in the case of an Arduino/Atmega328p, certain pins have been dedicated for SPI and I2C use. Can the other digital GPIO pins perform the same function?1 Is there something fundamentally different in how they behave? Maybe an internal register or something to collect the incoming serial data?

In the diagram, one can see that the SPI pins are shared with digital GPIO pins. Inside the Atmega328p die, are the two distinct elements/submodules with something like a buffer determining which will drive the pin? Or are they the same thing...

1 For the SCK emulation, assume that somehow you are able to pass the clock pulse to a GPIO pin set in output mode.

Note: The Arduino is just an example. I am asking in a general sense.


texts: Solar Panel Simulation Circuit working, LT-SPICE

texts:
I am here again with the same circuit but this time with no errors thankfully. circuit is working but i can not understand the working of circuit. I am not getting why in the single cell's schematic , there is voltage source being used after the load resistor? Isn't load there enough? As there is short circuit current there which is cause by direct sun's illumination. Please if anyone can explain the working of cell as well as panel. Also i have the panel that has 7 cells in series and each cell's Isc=538m and maximum voltage of 2.33 Volts. so where should i modify the circuit with these or where should i put these as in panel's schematic there is parameter for Isc=1nA and in cell's schematic there is source current of 5A which is also being sweeped further..
P.S this is not my model ,i followed a youtube video.

1: https://i.stack.imgur.com/deOjv.png

2: https://i.stack.imgur.com/Wozxg.png

3: https://i.stack.imgur.com/B8YxJ.png


texts: Can I drive a high-side N-channel MOSFET with NPN transistor and extra battery? (H-bridge)

texts:
I read discussions about only using N-channel MOSFETS in h-bridge circuits. I often see things like optoisolators listed. Example: driving high-side N-channel MOSFETs in H-Bridge

But why can't I just use a common transistor like 2N3904 to control extra voltage to my high-side N-channel MOSFET? Please excuse my crude drawing:

I tested one half of the H-bridge with LEDs as my load. It worked except there was a mysterious clicking noise every time the MOSFETs switch. The right side of the drawing is incomplete. The extra battery is to raise the voltage for the high-side MOSFET gates. Is there anything critically wrong with this design? I may be very confused.
Datasheets:
https://www.mouser.com/datasheet/2/196/irlb8748pbf-1227971.pdf
https://www.mouser.com/datasheet/2/308/2N3904-1118515.pdf


texts: I need help identifying DC/DC converter AH4V55V5S-1W

texts: I need some help identifying the component in the picture above. It is a step-up DC/DC converter. Input is approximately 5V from USB converted to +/- 6.8V. It is used in Micsig’s differential probe. Google search for “AH4V55V5S-1W” only refers me to eevblog. I looked at websites such as RS and mouser and could not find anything similar. Usual output voltages are 5V, 9V, 12V.


texts: Is there any reason not to use stereo speaker cable?

texts:
I'm making a talkbox for which I need three connections to my guitar amplifier:

earth
amplified signal
connection back to internal speaker of the amplifier (Vox AC15).

(see diagram)

For the connection between amp and talkbox I would preferably have just one cable with two mono jacks (TS) at the amp and at the other end, a stereo jack (TRS) to plug into the talkbox. In this way the three connections mentioned earlier are all bundled into one cable. The cable I'm thinking of would be similar to this, but suitable for a speaker level:

I can't actually find on the internet and have never heard of stereo speaker cable . Does such a thing exist? Is there any electrical or safety reason why stereo cable is not apparently available?

Generally you would only connect one speaker to one output, not two to the same output jack. Is this the reason?

I could alternatively use two speaker cables but it would be tidier/more convenient to use a cable with three cores.


texts:
Will a TP4056 (the ones with mini USB and no battery protection) charge a 08570 battery safely?

From what I can tell the battery does have built in battery protection but I cannot find much information about it.

The battery is 3.7v and falls within the parameters to be used, but I'm not sure if it will work safely with this specific battery.


texts: Replace 3.7V flat tablet battery with a 18650 cell

texts:
I am building a device using cheap Chinese tablet. One of the problems I have is weak built-in battery. I'd like to replace it with a few 18650 cells.

As far as I know, 18650 cell can be charged up 4V but tablet's source voltage from the built-in battery should not exceed 3.7V +/- 5%.

So, my questions are following:
1) is it true that built-in battery's voltage should not exceed 3.7V +/- 5%?
1.1) if yes, then what are my best options to always have stable 3.7V from 18650 cells?
2) will my tablet's built-in charger manage to charge 3-4 18650 cells connected in parallel?

Thx for your help in advance!


texts:
In the picture below, I have a power resistor, which is powered either from 12VDC or 24VAC from the rest circuit, as well as another component, which is inserted on the one cable leading to the resistor.

My questions are:

What does each number mean on the power resistor marking?

What could the other component be?

Edit: This is a cctv camera and the power resistor is used to make sure, through heating, that the glass in front of the lens does not become foggy.


texts: Electrical current characteristics through conductor

texts:
This is a strange theoretical question, and I won't even begin to try to explain what train of thought has led me to ask the EEs...

When electricity travels through a conductor, let's use the obvious example of a wire, does the current saturate the entirety of the conductor's cross section equally?  Would it make a difference whether it was AC or DC?


texts: XC8 Compiler array of struct initialization problem

texts:
I'm using MPLAB X IDE with XC8 compiler and I would like to create a menu system to a GLCD module, but I'm having trouble initializing my MainMenuItemsList[] array. I'm not getting error on compliling but if I'm debugging the project, I can see that only the first item is initialized. What can be the cause?

Here is the relevant code fragment:

typedef struct menuitem
{
  char ItemName[10];
  void (*handler)(void);
  struct menu *ChildSubMenu;
}MenuItem;

typedef struct menu
{
  char MenuName[10];
  char NumberItems;
  //struct menu *ParentMenu;
  MenuItem *Items[12];
}Menu;

MenuItem MainMenuItemsList[12] = {  {"SubMenu1", NULL, NULL},
                                    {"SubMenu2", NULL, NULL},
                                    {"SubMenu3", NULL, NULL},
                                    {"SubMenu4", NULL, NULL},
                                    {"SubMenu5", NULL, NULL},
                                    {"SubMenu6", NULL, NULL},
                                    {"SubMenu7", NULL, NULL},
                                    {"SubMenu8", NULL, NULL},
                                    {"SubMenu9", NULL, NULL},
                                    {"SubMenu10", NULL, NULL},
                                    {"SubMenu11", NULL, NULL},
                                    {"SubMenu11", NULL, NULL}
                                };

Menu MainMenu = {"MainMenu",12,&MainMenuItemsList};


texts: Attiny 45 use reset pin as analog input?

texts:
So after debugging for 6h+ I am stuck at that the reset pin of my attiny 45 needs to differentiate between two voltage levels. (5v and 3.7v) Ive seen in the datasheet that this pin has an adc. So it should be able to read an analog value, right? Atleast as long as it is not pulled to gnd. I am using an Arduino Uno as an isp to program the chip.
The essential question I have,  which pin number has the reset pin in arduino code? As it seems th hang on this point. I thought it is five. But it doesnt seem to work. (I may be worng on this part because my debugging seemd to loose quality over time.) Ive also found, that one may need to put the chip in high voltage programming mode, which I wont like to do.


texts: Controlling an LCD device using serial I2C module

texts:
I purchased an LCD/I2C driver pair and have been trying to get the thing to initialize. I am able to communicate with the I2C driver without issue, but getting the correct initialization sequence has proven to be a real pain.

This is the module and LCD I have: LCD and Driver

The LCD is shown as type 2004A and has J204A etched on the back.

I have read that this particular driver makes use of the LCD 4-bit mode and has the following physical connections to the LCD module (from the link above).

From the schematic, you can derive that:

P0: RS

P1: RW

P2: CS

P3: BL

P4: D4

P5: D5

P6: D6

P7: D7

Considering that data frames are sent (neglecting the ACK, start, and stop) MSB, I would presume that the MSB of the byte shifted into this device is represented at its output as P7 (I could not directly find this in the datasheet, but after a bit of testing it appears true).

Now, with all that aside and after successfully addressing (and receiving an ACK bit) from the I2C driver, one must initialize the LCD module in 4 bit mode and set other parameters - this is where I am completely stuck.

I have written the following init sequence that simply does not work:

void lcdInit(void){
_delay_ms(20);

//D7 D6 D5 D4 BL CS RW RS
// x  x  x  x  1  1  0  0 = XC (hex)
    i2c_write(0x2C); _delay_us(4200);
    i2c_write(0x8C); _delay_us(4200); //0x28

    i2c_write(0x2C); _delay_us(120);
    i2c_write(0x8C); _delay_us(120);  //0x28

    i2c_write(0x2C); _delay_us(50);   //0x28
    i2c_write(0x8C); _delay_us(50);   //4 bit mode, N=1(2lines), F=0(5x8)

    i2c_write(0x0C); _delay_us(50);   //0x06
    i2c_write(0x6C); _delay_us(50);   //I/D=1(increment), S=0(display shift off)

    i2c_write(0x0C); _delay_us(50);   //0x0C
    i2c_write(0xCC); _delay_us(50);   //Display on, cursor off, blink off

    i2c_write(0x0C); _delay_us(1700);  //clear display
    i2c_write(0x1C); _delay_us(1700);  //0x01
}

I know that each byte sent has the correct format (i.e.  0 0 1 DL N F X X ), but nothing was said regarding the ordering of such statements.

This sequence seemed most logical:

Funtion Set (4-bit)

Entry Mode  (shifting, etc)

Commands (state variables)

Any ideas?


texts: When dividing in Polar form 31.2/5.74 becomes 5.44. The angle for 31. 2 is 0. So when it comes to solving imaginary number 12. 8 why is the  - 12.8 degrees?


texts: Any programmable devices available for more modern languages?

texts:
Pardon my naïveté, but it seems like most programmable devices (FPGAs, PLCs, PICs, etc.) are programmable using the C or C++ languages, or a variant of one of these. Are there any devices out there that use something like D, Mozilla Rust, or Google Go? I realize that the latter two, especially, are immature languages; but surely someone, somewhere has released an experimental product.

Does anyone have any suggestions?


texts: Why are capacitors used when obtaining dual power supply from a single power supply and how to know the values?

texts: What happens if we only use 2 resistors in the figure. Why do we use capacitor if we have a DC source already? And whats the easy way to calculate capacitor capacitance for given R and Vin?


texts: Bit of a strange question, but what is it? My physics teacher said it was kind of like a "push" that pushes electrons around the circuit. Can I have a more complex explanation? Any help is much appreciated.


texts: Virtual GND resistor dividor vs zener diode

texts:
I was having a discussion with someone about using a virtual gnd for an opamp circuit.  One way to provide the VCC/2 voltage is with a voltage divider made of two precision resistors (and a capacitor for stability).   Another suggestion was to use a resistor and a zener to set it.

Which method is better, or if that's not a valid question what are the merits of each method.  I would think with resistors of tight tolerance I could approach the accuracy of the zener method.  Also I'd think the zener method would mean if my VCC dipped, or I was on a battery that the voltage would not stay at VCC/2 but rather the zener voltage.

I couldn't think of any pros for the zener column.


texts:
I have a circuit with a single momentary on switch that causes a solenoid to change position. I need to be able to see which position the solenoid is in. I've looked at the circuits for motor control LEDs on and off and I don't think that that will work for me.

I need the LEDs to indicate both states of the solenoid. One LED (green) = ON when the solenoid is on (red is off), and the other LED (red) = ON to indicate when the solenoid is off (green is off). I can't get this with a single LED because the off state would not be indicated.

I can't change the switch to a double throw switch I have to use the single pole single throw momentary switch. I can get back 12V indicating the solenoid is on or off from the live terminal. I can't use a relay in the space I have, I would like a diode biased solution if possible. I have 12 volts at the Led position which is remote from the solenoid.


texts: Power System Design for BLDC control - why not use a DC/DC convertor?

texts:
So I have experienced the usage of a BLDC motor to spin a propeller. The electrical design ensured the bus voltage was such as to bring the motor to a good operating regime given the Kv, etc. However, when the propeller is required to spin slower (or when the torque required to spin it at a certain RPM decreases, maybe due to less dense air, for example), PWM is used to "throttle" the voltage and change the torque-speed curves.
I have a couple questions about the system design:

Why worry about the voltage for the rest of the system? Why not just use a DC-DC convertor just before the motor unit? Similarly, why not use a DC-DC convertor instead of PWM control, and have a steady voltage of the average voltage instead of a duty-cycle of voltage to get the right average?

An addendum to that question is: on the flip side, why not just have a much higher bus voltage than required (if possible to provide), and then use PWM to achieve any desired voltage below bus? What's the point of "getting the supply voltage right" on the bus? Wouldn't this decrease i2r losses and decrease cable weight? Additionally, wouldn't this mean the range of operation is much higher for the motor, with no worries of running out of available voltage should we want to go higher?


texts: I don't know the name of the following 4-pin connector

texts:
I want to replace an SMD connector on the following PCB, but I do not know how to search for it, in order to buy it.

I have attached a photo from the male connector, it might help. Can you name it?


texts: 50Hz hum on oscilloscope probe only when using clip

texts:
Background:

I was just trying to track down some noise in a gadget I built.

There's a DC signal that represents the level of ambient RF, and I am interested in very small changes in that level.  These work out to changes of less than 100µVolts in the DC signal.

Right now I'm trying to be certain where the noise I see actually is coming from - whether it is in response to the ambient RF, or whether it (or some of it) is produced by my circuit.

Now for the actual question:

While making measurements, I switched from holding the probe to using a clip to hold the probe in place.

When I clipped the probe in place, the scope started showing a 50Hz hum at about 300µVolts peak to peak.  What's more, the level is sensitive to where I stand.  If I move closer the hum gets weaker.  The further away I am, the stronger the hum.

I took the clip out and laid the probe in place to measure the signal I was looking at, and the hum went away.  The signal was just like when I was holding the probe, with no hum (or at least so little hum that it got lost in the real noise I was trying to track.)

Why would using the clip cause the probe to become so sensitive to 50Hz hum?

I can obviously get around the problem just by carefully placing the probe or holding the probe while making measurements, but I can't undestand why the clip makes such a difference at such a low frequency.  If this were RF then this kind of thing wouldn't surprise me, but why is the clip such a problem at 50Hz?

Here are some pictures of my setup:

No hum, probe carefully laid out to make contact with the point I'm trying to measure:

That's about 150µVolts of noise, but the hum is lost in the noise.

Same setup, same point being measured, but using a clip:

That's about 300 to 400µVolts of hum.  It gets worse when I get further away.

Probe and the clip that is causing me problems:

That's Testec C3000 from Conrad.  I know they are cheap, but I'm not using them on RF.  Most of what I do is low frequency stuff (my scope is only good up to 15MHz, or less than 1MHz when using the 100µV per centimeter range.)

I measured the resistance from the clip to the bnc end of the probe. It is the same as from the probe tip to the bnc. Its about 400 Ohms.

I don't think it is a ground loop.  I wouldn't expect a ground loop to care whether the probe is clipped into the circuit or just carefully balanced to make contact.

Another point against a ground loop is that I disconnected all power to the circuit (power supplies unplugged from board and outlet) and disconnected the antenna (well, LNB) from the board.  The only ground connection was to the scope.  The hum still shows up.

Based on the answer from Tony Stewart, I made a few experiments based just on length of the unshielded loop.

I found that a piece of wire the same length as the clip barrel causes about the same amount of hum to be measured.  A much longer wire caused way lots more hum.

I wouldn't have thought it would be that noticeable at 50Hz, but it seems that a simple loop of wire can readily pick up 50Hz hum.

Experiments:
Circuit powered off and all external connections removed.  Only the scope probe and ground are connected.  I changed the range to 500µVolts per centimeter.

No wire, just the probe:

Short wire and probe, wire about as long as the clip:

Long wire, about twice as long as the clip:

So, the hum is stronger with a longer loop.

I really didn't expect that much of difference at 50Hz.

It wasn't the clip, it was just the longer length of unshielded wire.


texts: Why does this circuit produce a static noise?

texts:
I was just designing this Common emitter transistor amplifier this morning.

simulate this circuit – Schematic created using CircuitLab

I have removed the input in the circuit intentionally. Here are a few words about the circuit:

I constructed initially with only one transistor (BC107) and tested by giving audio signal as input. The output from the 8 ohm speaker was pretty much distorted, which I think was due to impedance mismatch.
In order to overcome the distortion, I added a second stage using second transistor (2N3904). The second stage is a buffer circuit (Common collector mode) and it has been directly coupled to the first stage. I've tried the direct coupling because I studied it in my recent classes and want to test it practically.

Now, when I switched on the battery to give supply voltage, and connected the speaker at the output side, (without applying any input signal on the input side) I got a high frequency, audible static noise from the speaker like this:

https://www.youtube.com/watch?v=XoiHXIwbtnc

When I changed the capacitor and tried out with values of 4.7uF, 10uF, 22uF and 100 uF, I found the frequency to be decreasing with increase in capacitance. I measured the sound frequency using an app in my cell phone (approximate frequency).

Now here are my questions: Why does this circuit produce such a noise? Can this circuit be further simplified in order to produce the same output. Also I've got the idea of developing this circuit as a musical instrument by adding several capacitor at the output so that, when I short the speaker to a capacitor manually it would produce a sound and then when I short it to another capacitor, it would produce a sound of another frequency. Given that I have the knowledge of the frequency of various musical notes, How do I calculate the capacitor values theoretically? Please provide a formula.


texts: Connecting AND Gate Chip to an Integrated Circuit

texts:
I am trying to teach myself how to make integrated circuits and I'm having trouble integrating an AND gate into the circuit though.

I took a picture of it. The voltage running across the power rails is 4.7 V (the chip is TTL logic, I figured it would be enough). The gate is an AND gate 2 input 1 output (7408).

My question is why, with both DIP switches turned off, is that LED shinning?? It seems that the current doesn't run through the 'AND' circuitry but through the VCC and out through the supposed to be 'output of the inputs A and B'. If the connections are wrong what's the proper way to integrate the gate into IC?

Original

Yellow- Path current is supposed to follow

Red- Path current apparently takes -.-


texts: ATmega328P presumably dead after probable SPI short circuit

texts:
I am trying to use an ATmega328P to interface an SPI device (RFM95W radio module). This worked pretty well (I could measure the correct signals on SCK, MISO, MOSI and CS), but after some programming cycles (to test new versions of the firmware), avrdude complained about a
verification error, first mismatch at byte 0xyz
0xfoo != 0xbar

I encountered this error the next few times I frantically tried to flash the code (only the hexadecimal values changed randomly), and indeed, the error did vanish, but another one occurred. Now there was a device signature mismatch, and even adding the -F parameter or completely disconnecting the RFM95W couldn't convince avrdude to flash the code. The only thing that changed was the reported device signature; it seemed completely random. After some more tries, I gave up on the chip, removed it from the breadboard while leaving everything else in place and used an other ATmega328P I had lying around. Et voila: everything worked completely fine again without changing any settings in avrdude or altering the wiring. After that, I reconnected the RFM95W and still everything worked like a charm. But a few cycles later, the same problems occurred as with the previous chip, so I also gave up on that chip.
The only theory I can come up with is that there must have been some sort of short circuit, since both the programmer and the RFM95W use SPI to talk to the ATmega. This seems very likely, as the programmer resets the microcontroller before programming and emitting any SPI signals, so the ATmega should no longer act as a SPI master and stop talking on MOSI, SCK and CS, but the radio module keeps transmitting on MISO. Maybe they are just crosstalking, which leads to the programmer believing it has to flash with different parameters than actually required and doing so kills the chip.
Now, what I would like to know is:

whether there is a chance of reviving the ATmegas, and

how I can prevent this from happening in the future so that I don't kill a third ATmega.


texts: relationship between modulation index and carrier-suppressed condition in fm

texts:
What is the relationship between modulation index and carrier-suppressed condition in FM.

What should the modulation index be when the carrier is suppressed in FM?


texts:
I'm thinking of making a RaspberryPi solar powered smart "green house", with LED lights, water pumps and a few sensors. I would like to point out the "green house" would be about 6ftx2ftx2ft - more of a tool shed. I also live in the UK so sunny days aren't guaranteed. Can somebody please help me work out the correct solar panels and battery I might need?

My main concern is the LED lights I will be using.  They come with a 12v 5A power supply.  Am I right in saying they would use 60w?

According to another post on here a 12v 40ah car battery would power a 50w water pump for 9.6hours.  Using the same maths this means I should be able to power the lights for 8 hours, correct?

My question is: What size solar panel would I need?

Is it as obvious as a 60W panel?

There is also the amount of power the Rpi would use and the small 3v water pumps I've bought, these will only be used once every day or so for a short period of time.

Any help would be appreciated.


texts: How does the feedback work in this linear power supply?

texts:
How does the feedback loop in this circuit work?

Image source

I am unfamiliar with this configuration.
It seems to have positive feedback.


texts: How do I shield a card like Visa payWave and MasterCard PayPass to block its communication?

texts:
This is basically a replication of this question on Personal Finance SE. Suppose there's a wireless smart card like Visa payWave or MasterCard PayPass or MIFARE Ultralight. The owner wants to temporarily shield it so that it's totally impossible for a malicious third party to make the card confirm a transaction.

Will wrapping it into tinfoil be enough? How much shielding is needed to shield such card?


texts:
We're trying to send some informations above SPI. So we've coded a few lines of code for that purpose. But in the picture you can see, sometime data cannot be retrieved accurately. The original data we want to send is 0x1111 but as you see the SPI CLOCK part, sometimes the computer doesn't see the final "rising edge" situation. As a result of that problem, the data retrieved as 0x1118 .  In
theoretically, we could not understand the cause of the problem and therefore could not intervene in the code. What may cause this problem?

For send the data;

mibSpiInit();
while(1){
mibSpiSetData(mibSpiREGx, SpiGroupNo, transmitBuffer);
mibSpiTransfer(mibSpiREGx, SpiGroupNo);
while(!(mibSpiIsTransferCompleted(mibSpiREGx,SpiGroupNo);
}

has been used in TMS570.


texts: How does this BJT affect the circuit? If it does, how should I simulate on Circuitlab to see the effect?

texts:
I am trying to understand how NPN Q23 in the picture below affects the operation of the left circuit.

If it doesn't then what we get is the circuit on the right with the only transistor now being Q30.

After reading this thread I would say Q23 will be in reverse active mode of operation operating with lower β and therefore it does affect the operation of the circuit on the left.

My questions are:

1) What is it that actually happens by placing Q23 on the circuit? Is there more current passing through R1 because the resistance of Q23//Q22 is smaller?

2) If I am to simulate the circuit (on Circuitlab or Multisim) what simulation setting (DC sweep, time domain) and input parameters would you suggest so that I can see a clear difference between the left and the right circuit?

EDIT:

Thank you for the comments. This is a made up question, I am interested in the effect Q23 will have on the ADC voltage across R1 given that V2 is constant DC source. I simply want to establish that Q23 and Q22 will have the same constant base current and see what happens from there..

EDIT#2

The question could very well be about the effect of Q23 being the only BJT in the left circuit. In that case what simulation would you run to compare the circuits on the left and right?


texts: Can a tank circuit store energy for a simple AC system?

texts: If you take the circuit below, with the switch closed, assuming the Tank circuit is tuned to resonate at the same frequency as the source, then I would expect the tank to become charged, and the impedance to skyrocket, such that the AC power supply simply drives the AC pump as usual. (The pump is just a solenoid shuttling back and forwards and some valves). If the switch is now opened, what happens? Would the energy stored in the tank discharge gradually as an AC current that could keep the pump working for a short time, as a capacitor might in a DC circuit? Or will it simply bounce around in the tank until it runs out of steam, or go through the pump once as a DC pulse and stop? (or anything else?).


texts:
I've got an air-button operated, 4 position relay unit, designed to safely operate the pump and air blower on a hot tub with multiple presses of an air switch mounted in the deck. Good unit, but it has some limitations, not the least of which is the cost.

I would like to design a circuit that can control 4 possible outputs, and that selects them in order with a push of a button. One press, circuit one is on, second press, circuit 2 on, 1 off, and so forth.

Any help out there? I have a feeling there is a simple relay configuration out there if I just ask the right question, or look in the right place.


texts:
I need to incorporate two types of cameras (2x connected by a long wire + 7x connected near the Xavier). For such lengths, I had to use a Serializer-Deserializer (SerDer) to make the camera wires more than 4m long.
For the camera, we are left with 3 options:

GMSL Gigabit Multimedia Serial Link Cameras
FPD-Link III Cameras
PoE GigE (Power over Ethernet) Cameras, and
MIPI CSI2 Cameras (very unusual). (Mobile Industry Processor Interface - Camera Serial Interface 2)

To avoid the cost behind the first 3, I resort to the 4th and unusual choice. I know that CSI cameras are not for such distance connections. But I saw that Thine had solutions for that. I can't find a way to interface its bare-silicon (or ICs without any interfacing circuit) to the Xavier.
Is there a way to interface such (or any other) SerDes with the Xavier ?
And/Or
Is there any alternate low-cost solution to get my Cameras wired at such distance > 4m ?


texts: Choosing best bus and protocol for ~128 clients over the wire

texts:
I am up to design system with ~128 MCUs communicating to one MCU master. Communication will be bidirectional. Data will be mostly sensor reads, but I plan to use the bus also as communication method for custom bootloader to reprogram client if needed. Distance between clients will be ~10-15cm (~3.90-5.90 inch). MCUs will communicate through wires.

Right now I am reaserching which bus and which protocol should be used with such requirements. My first thought was I2C with 10-bit addressing, but I'm afraid that number of clients would exceed maximum capacitance of I2C bus.

What bus and what protocol would be suitable for this kind of system?
If the answer is I2C, what is the method to make sure bus parameters will match with specification? (I've heard about I2C buffers, would they help?)


texts:
when designing PCB with altium, we have created a power plane but under the configuration of signal plane so we could divided the plane for different voltage we have.
We have some vis that go to top layer of the pcb to power some components.
In the power plane I was wondering if it would be better to keep power connection as trace/track or if it is better to have them under the form of surface plane made with polygon ?
What are your opinion about it ? Is there any advantages / drawbacks having traces instead of plane or vice versa ?


texts: Does isolated power supplies current draw from one to another if both GNDs are connected to same circuit?

texts:
Circuit 1 is powered by (SMPS no 1) = 5V to 8V 700mA isolated dc to dc step up SMPS
Circuit 2 is powered by (SMPS no 2) = 5V to 50V 200mA isolated dc to dc step up SMPS
application - both power supplies used for two separate circuits, but circuit's GNDs are connected together,
(50 isolated-SMPS GND and 8V isolated-SMPS GND are connected)
can current from 50V SMPS draw into 8V SMPS ?
or
can current from 50V circuit draw into 8V circuit due to voltage difference?
I need to avoid current draw from one power supply to the other while gnds of each power supply is connected together. does isolated power supplies avoid current draw from one to other?


texts:
I am looking for a way to measure the pressure on a push button when it is pressed. I intend to save it in flash of a microcontroller.

Please let me know if you know any device which could be useful.

Thanks,


texts:
So, I have a wall-wart power supply giving regulated 12v 500mA to a 2.1mm Jack.

I'm using this to power a 12v 160mA fan, and an Arduino Pro Mini (at 5V). I understand that the Mini's regulators to drop from 12 to 5 will produce a lot of waste heat (which I'd rather avoid, as am keen to minimise the system's power consumption).

What I was planning was for something like:

Wall Wart (12v, 500mA) ------------------------> Relay -> Fan
                \ (1) -> Arduino Pro Mini @5V -> /

Would it be more power efficient to put a switching regulator at point (1) in the diagram (with its surrounding components, or as an integrated circuit) and supply power to the mini's VCC input?

Also, I'm not sure how to search for an integrated circuit switching regulator (if such exist) as this might be a neater solution than self soldering a whole support circuit?


texts: Please help me understand how to add AC power to my DC device

texts:
I have a device that runs off of three D batteries. I would like to be able to add a power cord so that I can plug it into the wall and run it off of that instead. I would also like to still be able to automatically run it off the batteries on the off chance that the power goes out or I need to move it, but that is secondary and not as important. What would I need to get to do this?

In my case, the device has an input of "DC4.5V 500mA" and the cord that I am planning on using is from an old phone charger and it has an output of "5.1V ⎓ 0.7A".

I would imagine that if I just wanted to power it from the cord, I could just cut the wires from the battery case and solder the red to red and the black to the black. But, because the cord outputs 5.1V, would that short out the 4.5V input? If I put in a resistor, could that prevent it from happening? How many ohms would it need to be?

That would still not help me with the lesser issue of the power going out. How could I wire it so that I would still have the batteries but not run off the batteries until needed. I think I would need a logic gate, but I don't know enough to know what to use and then how I would need to wire it up.

Any advice for a novice would be greatly appreciated.


texts: How do I construct a SPICE model from a data-sheet?

texts:
This may not be the ideal forum for the question; please migrate if a forum is better suited for the question.

I'm looking at a component for which my attempts at locating a SPICE model online were fruitless. There are, however, datasheets of the component available for online reference. The SPICE model for a component probably draws upon the content of the datasheet for it...

So, how does one construct a SPICE model when the data-sheet is available for reference?
I'm looking at LTSpice


texts: Is a valid USB VID/PID necessary for strictly embedded use of the Bus?

texts:
So the system of USB VID/PIDs as far as I understand it is to avoid conflicts between devices and the USB-IF is handling the distribution of these IDs and wants a fee if you need a VID and a corresponding PID block.

Now how is the situation looking if you have an enclosed device where systems within that device talk via USB but the device itself does not expose a USB port or advertise USB compliance or the use of USB in any way, it is just used for internal communication like you would use SPI or I2C.

Do I still need a VID/PID from the USB-IF?
If yes is it allowed to then just use the prototype VID 6666?

The USB Host device in this system is running Linux. So a driver is in use, the end user just can't plug in any more USB devices to this host. I have the ability to chose the VID for every device connected to avoid any conflict.


texts: How to remove/desolder very minute smd chips safely?

texts: This is the component I'm trying to remove: BU48xx voltage detector VSOF package (attached pic)


texts: Does a FIFO data buffer need to have the data be registered?

texts: I'm trying to implement a 64 bit FIFO Data Buffer in Verilog.  My design allows for data to be written at 4 bytes or 1 byte at a time, and I'm simply using two multiplexers with control signals for determining which mode it is writing to a memory array.  Before the data is written to the memory array, does it need to be passed into a register or can it just be directly inputted into the memory array at wherever the write point is currently?


texts:
I am designing a LED setup with 3 leds and a 9V battery. Nothing more
I got the following specs from the seller. How much resistance do I need if I want them to shine as bright as possible without blowing up?
5mm 940nm IR Infrared Emitter LED
Diameter: 5mm
Wavelength: 940nm
Color: Transparent
Maximum Power: 70MW
Maximum Forward Current: 30MA
Maximum Forward Voltage: 5V
Maximum Pulse Current Peak: 75MA
Welding Temperature / Time: 240/ ≤ 5S°C / S


texts: Initial conditions in multi-state Tesla Coil circuit

texts:
Half a year ago I posted this quesion about a Tesla Coil resonant circuit which got an amazing answer that helped me understand the resonant frenquency of such circuit.

Now I've returned to that problem and I want to know what happens in the following scenario. I will not post the values of the components since I just want a theoretical answer to understand better this kind of circuits, but I can say that the relation
$$L_1C_1=L_2C_2$$
is fulfilled. The circuit is shown below:

The capacitor C1 is the only one charged. It releases its energy and the circuit starts resonating. The voltage across C2 has the following form:

which can be translated in the mathematical expression:
$$137898 \cdot (\cos(978300t) − \cos(1081600t))$$

Now, the switch Sw1 opens and Sw2 closes at the same time. Then, the circuit that (I think) results is:

My questions are:

Would the value of Vmax at Figure 3 be determined by the value of vSw2(t) at the instant when switch Sw2 closes and Sw1 opens?
Is it true that, as one of the coupled inductors is in an open-circuit, given that Sw1 is open, the initial conditions at inductor L2 are 0? In other words, is the circuit that I've drawn in Figure 3 accurate?
Since there are no resistive elements at circuit from Figure 1, mathematically it seems correct that the equation of the voltage vSw2(t) has only cosines, but in reality the voltage would converge to 0 due to the internal resistances of the components, right?


texts:
For my microcontrollers class, I am using an advanced 8-bit microprocessor, the PIC18F4550. I am trying to program it with a PICkit 3.

I have used the device datasheet and the PICkit 3 datasheet to connect the pins. Here is the device datasheet and PICkit 3 datasheet (not enough reputation to post images yet).

From these datasheets, I have connected the following pins:

| PICkit pin | 4550 pin  |
|:----------:|:---------:|
| 1          | 1         |
| 2          | 11, 32    |
| 3          | GND       |
| 4          | 40        |
| 5          | 39        |
| 6          |unconnected|

Then I simply plug it into my computer, via USB, and the programming fails (with both the 'power this device from PICkit?' option checked and unchecked). The output I get is below:

PICkit 3 detected
Connecting to PICkit 3...
Firmware Suite Version..... 01.28.40
Fireware type.............. PIC18F
PICkit 3 Connected
PK3Err0045: You must connect a target device to use PICkit 3.
Target Device ID (00000000) does not match expected Device ID (000001200)

Programming...
The following memory regions failed to program correctly.
Program memory
Address 000000000 Expected Value: 000000016 Received Value: 0000000000
Programming Failed

Where is my error? Is my device fried (as some forums suggest) or are my pins connected to the wrong thing? My guess is the latter.

Schematic with connections:


texts: longest time a circuit can sit in developer

texts:
When I made my first attempt at a board, I realized after I used too concentrated of a developer solution and most of the traces came off. This time I'm going paranoid and I put in about 1 cup of water to maybe 3 tablespoons of developer (but I didn't use a spoon to measure). My question is, whats the maximum amount of time one should leave a board sitting in developer? I want to use this time as a factor to gauge how much developer I should pour in.

I'm using the standard positive developer from MG chemicals. Also, I use blacklight as my exposure source.


texts: Developing a compiler and linker for embedded systems

texts: Does anyone know some good resources (textbooks, papers, tools, etc) for developing a custom compiler and linker for a specific microcontroller?


texts: Can hot swappable power supplies be used in series to provide increased voltage?

texts:
I am new to power supplies, and I realize there are a lot of questions around already asking about using atx computer power supplies in series. My understanding is that they can indeed be used in series as long as they are identical models with matching transformers.

My question is about "hot swappable" power supplies used for computer servers. These 12v supplies are designed to be swapped in and out while a computer is still running. I am wondering if these can also be used in series, or if there is circuitry preventing over-voltage.

My application will be for tinkering and educational work - I plan on driving various dc motors as well as a making arcs for electrical discharge machining (up to 120V DC).

I have pasted an image below of one particular model, and although I couldnt find a datasheet for this particular model, I found this brochure here


texts: In our lab we have a large fan on an instrument which works fine on a linear power supply but on a switching power supply the supply crowbar even when it's current limit is well above the operating current. I suspect a large inrush current. The linear PS has a similar current limit. How can I prevent the crowbar?


texts:
Given the following schema (I'm using isis proteus)

Vin's amplitude is higher than the max and min supply voltages (+/-10V), which gives this graph:

(Blue: Vin, Yellow: Vout)

When Vin is greater than +Vcc, Vout goes to +Vsat, which is expected;
When Vin is lower than -Vcc, Vout goes to +Vsat: Shouldn't it stay in -Vsat??

I tried it in real life and it gives the same result. Why?


texts:
I have seen this circuit a few times. It takes a common 3 pin LDO, and adds a PNP transistor between VIN and VOUT, to increase the amount of current it can provide at the regulated voltage. It is present in the On Semi LM7805 datasheet.

At this time I'm looking at the Holtek 7133, a 30mA 3.3V fixed LDO. It also has the same circuit.

With VIN at 5V and Tr1 a common 2n3906 100mA PNP transistor, how would I calculate R1? How much does this change the quiescent current of 5 microamps? What's the minimum VIN required for this to work with this PNP (The LDO only needs a 0.2V drop out at max).

And what is the new maximum current in this configuration? Since R1 limits VIN, I'm assuming that all the load current goes through the PNP, so in this case 100mA, not the LDO's + the PNP's 30mA + 100mA.


texts: How to design, build and test synchronous sequential circuits using D-Flip Flops?

texts:
I want to design, build and test synchronous sequential circuits by using D-Flip Flops.

I know how to analyze state diagrams but I don't now how to obtain a state diagram using just outputs.

P.S. : This is a school project for my logic lab class. I don't want a full answer but any help would be appreciated. I really couldn't understand how to start. Thanks in advance.

Use D flip-flops to design the circuit specified by the state diagram of following figure. The output of the circuit is Zi , that is the output of the circuit. (Black dots represent binary 1)


texts: KiCAD eeschem library part connecting pins together

texts:
I'm building a schematic library part for an Arduino prototype shield. Although it's a schematic part, I want it to look like the board as much as possible.

This board has two long lines of through holes that are connected to 5V and GND respectively. I can't figure out a good way to (A) create a long connnector or (B) create a bunch of pins that are all connected together or (C) make a wire.

The picture below shows my part so far with 5V and GND drawn as polylines. Is there a better way to do this?

I recognize that this may be a nonstandard way of using Library parts and EEschem. I'm using EEschem to make a wiring diagram. I suppose once I drop the part into my schematic, I can fake the 5V and GND lines with wires, but if there is a way to do it in the library part, that would be preferred.

Edit:

The solution I'm going with for now is to use the symbol as drawn above and trace over the 5V and GND polylines with a wire after I drop the symbol on the schematic. This symbol is part of a much larger wiring diagram and tools like Fritzing are really not appropriate. Dropping symbols on top of other symbols is not recommended, but I'm going to do it anyway. It works and is the best compromise for making a wiring diagram for which an Arduino prototyping boards is a small part. Editing is a little inconvenient because EEschem is always asking me which component I mean to be editing. But this is manageable.


texts: What is the relation between Op-Amp input current and input impedance?

texts:
How should I interpret these specs? They can't both be correct all the time, right? Looking at for example the CA3140 opamp.
the Zin (input impedance) is 1.5T Ohm, yet the input current is 10pA.
Solving this for voltage (Ohm's law, 1,5e12 * 10e-12) gives 15 volt, so at that input voltage, both these specs are correct.

But what happens when you give the opamp 100mV at its input?
Do I calculate the input current according to the Zin or do I assume
that it's 10pA?

Assuming the opamp draws 10pA, the input impedance is now R = U / I = 0,1 / 10e-12 = 1e10 Ohm instead of 1.5e12.


texts: How to create measurement points on a PCB for MIPI lane diagnostics?

texts:
I am looking for ways to test specifically MIPI DSI lane signal strength (because I am kind of pushing the envelope on the trace length and width), and am happy to add test points to the PCB design. I really appreciated all the tips in the original question, "How to create measurement points on a PCB for diagnostics?", and the additional information on "How to measure/show MIPI-DSI 4 lane signals on DSO/oscilloscope"?

However, I am concerned about adding any components, even a zero resistor, to the MIPI traces as it might slow the high-speed signal. For example, I noticed that this document had the following warning on the last page, which almost justified my caution (except I don't think they were talking about zero resistors).

"Do not place additional components, such as resistors, electrostatic discharge (ESD) diodes, capacitors, or common-mode chokes on the MIPI CSI-2 traces."

Further, in my search I am also noticing that most MIPI signal strength testing is software-based, and conducted through the processor.

So my main question is: What is the best way to add test points to the PCB to make sure that all of the MIPI traces are functioning?

My secondary question is: Does anyone even add test points to MIPI lanes on the PCB, or is all signal strength testing only conducted via software run through the processor these days?


texts: quartz tuning fork and its series and parallel resonances

texts:
Based on the explanation here, I understand that if you electrically drive a tuning fork, you would first see a peak (resonance) and dip (antiresonance).

I just tested the frequency response of a tuning fork, which was designed with 10pF load capacitance in mind.  I excited the tuning fork with and without a 10pF capacitor.  I noticed the frequency position of the resonance did not change but the frequency position of the antiresonance increased, as would be expected from the wikipedia page linked above.

My question is the following:  why do companies make the quartz tuning forks such that the tuning fork has antiresonance frequency of 32768Hz with the appropriate value of load capacitance?

Antiresonance shows up as a slight asymmetry in your amplitude plot, as can been seen in the black curve in the image below (B). Why wouldn't they design it such that the peak (resonance, marked as A in the image) is at the frequency of 32768Hz?

The resonance is definitely more pronounced than the asymmetry (antiresonance).  Plus, it has the benefit of the frequency not changing due to load capacitance.

P.S. I just added screenshots of the plot of my actual measurement. You can see that the amplitude peaks at its series resonant frequency (also note the slight asymmetry)

Also note the dip of the parallel resonant frequency on log scale, and note the circuit diagram added.


texts: Copper overlapping via and when to use thermal relief (Eagle PCB Design)

texts:
I have created a copper track which runs around the signal pin from an SMA connector (as shown in the image).

The problem I seem to encounter now is that from the polygon fill, the copper pour overlaps the via completely (but is shown in a light red color). Is this allowed or will it cover the hole?

I would like the copper from the via (green part) to connect with the copper from the track so that I can solder directly onto the track at the base without a 'bridge' of solder.

I attempted to put a tRestrict circle around the via, but the DRC spits out an error. Alternatively, ticking Thermals runs thin copper through the centre of the hole, so am not convinced about that option either.

One other thing - is it okay if the ground plane on the bottom runs to the edges of the board (with no spacing)?

Regards, Billy.

Images of my problem:


texts: How does corona ring help against corona discharge?

texts:
Corona discharge is flow of current from the electrode to the outer air. Corona discharge happens (among other) in high-voltage power lines.

One way to reduce corona discharge in this case is using so-called corona rings - that's just a ring made of thick metal rod that is positioned orthogonal to the wire so that the wire passes through the ring. The ring is mounted to the power line post and earthed.

How does this help? I'd expect that instead of "wire-to-air" current flow a "wire-to-ring" current flow would start and it would be just the same. Why does using the corona ring suppress corona discharge?


texts:
I am using an 100 pin TFP401APZP IC ,in the data sheet it says that there is a provision for thermal pad also the IC has exposed metal at the bottom area.

Why do we need thermal pads ? is it ok if we don't use thermal pads ?


texts: Drawn current from a two and single supply Class B power amplifier

texts: I was reading a section from a book that talks about class B amplifier. I don't quite understand what the author meant by the highlighted part. Can someone help me picture what the author is trying to convey? I know what full-wave and rectified signals are but I can't quite connect it to what the book is saying.


texts: Off the shelf external ESD protection for USB port

texts:
I'm looking for an off-the-shelf external ESD protection for USB port. I live in dry climate and I zap my keyboard or mouse quite often when I forget to touch grounded surface first. I already killed one KVM switch this way and I would like to protect the replacement from early death. Quick google search yielded no useful results. My plan B is to use a cheap USB hub as ESD protection or weakest link, but I would prefer an in-line gadget specifically designed for this job.

EDIT

As expected, my question was found off-topic. If you analyse it carefully, you will find that I'm asking primarily about existence of a useful but rare electronic device. Try finding it yourself without reading my answer and it will become obvious to you. I'm not necessarily seeking a brand or place to purchase recommendation. I always hoped that StackExchange editors would comprehend border line scenarios like this one better than a deep neural network, which is itching to take over their duties.


texts: Am I correct in this example? For example, I have data a data stream like this 101100011100...11001001 .... .  Let say a symbol is 64 bits. I will use 16 qam-ofdm. For this, I separate a symbol to 16 subsymbols (means each is 4 bits) and It converted serial to parallel. Then each parallel item is my ofdm symbol mapped as to qam. Then I take IFFT this ofdm symbols and then I add cp and then parallel to serial and then DA then transmit the signal. So I need to 16 subcarriers and I transmit only one symbol (64bits) with 16 subcarriers. Am I right?


texts: Using a zener diode to limit current to an IC for various input voltages

texts:
I'm designing a board based on TI's DRV110 solenoid driver. The datasheet explain that:

  "The DRV110 is able to regulate \$V_{IN}\$ voltage from a higher external supply voltage, \$V_S\$, by an internal bypass regulator that replicates the function of an ideal Zener diode. This requires that the supply current is sufficiently limited by an external resistor between \$V_S\$ and the \$V_{IN}\$ pin."

\$V_{IN}\$ is effectively always regulated to \$15\mathrm{V}\$. The DRV110 can sink between \$1\$ and \$3\mathrm{mA}\$, but also requires enough current to drive other connected components. In my design, this \$I_\mathrm{aux} = 1.5\mathrm{mA}\$ just to drive a MOSFET and resistor network.

The datasheet recommends that for a \$V_S\$ (source voltage) of \$24V_\mathrm{DC}\$, we add a series resistor (\$R_s\$) of \$9\mathrm{k}\Omega\$ between \$V_S\$ and \$V_{IN}\$. This makes sense to me. At \$24\mathrm{V}\$ source, the device has to regulate down to \$15\mathrm{V}\$, a drop of \$9\mathrm{V}\$. We now are able to drop the \$9\mathrm{V}\$ over the resistor, and at \$9\mathrm{k}\Omega\$, the current through the internal zener is \$1\mathrm{mA}\$.

This wouldn't deliver enough current if I need \$I_\mathrm{aux}\$ though, correct?  We would need \$3.6\mathrm{k}\Omega\$ instead so we would have a total of \$2.5\mathrm{mA}\$.
Am I also limited to some voltage here, higher than \$24\mathrm{V}\$ but not necessarily the full \$48\mathrm{V}\$ that the device can accept? At \$48\mathrm{V}\$ we drop \$33\mathrm{V}\$ down to \$15\mathrm{V}\$, and that \$33\mathrm{V}/9\mathrm{k}\Omega = 3.66\mathrm{mA}\$ which is too much for the DRV110 to sink.

Things get weird, though, because the DRV110 has a wide input range (\$V_S\$ from 6 to \$48\mathrm{V_{DC}}\$) and I believe in the reference design they tried to add an external regulator for a more robust design. Below is the reference design's notes plus the schematic. Note that in the reference design, the \$I_\mathrm{aux}\$  was higher so the required current is more like \$9\mathrm{mA}\$:

  "In the reference design, \$R_S = R_1 + R_2\$, and the minimum input voltage = \$19.4\mathrm{V}\$. Therefore,
  $$R_S = \frac{19.4 – 15}{ 1 + 0.11 + 8} = 480 \Omega.$$

  The Zener diode \$D_1\$ clamps the voltage to \$20V\$ using the series resistor \$R_1\$. At a rated input voltage of \$24\mathrm{V_{DC}}\$, the Zener diode \$D_1\$ regulates the voltage to \$20\mathrm{V}\$. Then the drop across \$R_1\$ is \$4\mathrm{V}\$ and across \$R_2\$ is \$5\mathrm{V}\$. This drop ensures that \$R_1\$ takes most of the loads due to an increase in input voltage.

  The above design values at the rated input voltage of \$24\mathrm{V_{DC}}\$ gives the ratio \$R_2/R_1 = 5/4\$, leading to \$R_2 = 300\Omega\$ and \$R_1 = 178\Omega\$. These values ensure that with the increase in input voltage, the current sinking of the DRV110 remains constant."

simulate this circuit – Schematic created using CircuitLab

I just don't understand the above logic.

Wouldn't the current to the DRV110 always be
$$
\frac{(20-15)\mathrm{V}}{300\Omega} = 16.7\mathrm{mA},
$$
significantly more than the design called for?

Now say that the input voltage was lower (supposedly they designed this for as low as \$19.4\mathrm{V}\$). Let \$V_s = 21\mathrm{V_{DC}}\$.  The current through \$R_1\$ is \$(V_s - 20\mathrm{V})/ 178\Omega\$ which would be \$5.6 \mathrm{mA}\$ and this is less than the current through \$R_2\$ which is fixed at \$16.7\mathrm{mA}\$.

Here, would \$D_1\$ stop clamping to \$20\mathrm{V}\$ and the current would be based on the series resistance of \$R_1 + R_2\$?  In this scenario, that would be \$(21 - 15)\mathrm{V} / 478\Omega\$ which would be \$12.5\mathrm{mA}\$, again too high.

I think my understanding of the zener function and/or the IC current draw is flawed here. The network is supposed to be current limiting, so perhaps I need to stop thinking about it as determining the current draw? At this point I've been thinking about it too much and I'm not making any headway.

Thanks everyone!


texts: Why my Buck converter is undergoing smoke and fire

texts:
I am new to electrical. I am powering my router from 24V battery. But power requirement of router is 12V/1A. So I am using LM2596 buck converter.

The specification for this buck converter is as follows:

Input voltage: 4-40V

Output voltage: 1.2-37V

Scenario 1:

It worked fine for a day. Next day when I connect a battery output to buck converter input, input capacitor started to burst(No output is connected).
What might be the cause for this behaviour?

Scenario 2:

I bought another and tested it. The input which I provided is 24V and the output obtained is 12V. I connected the output to router. When I powered the router button on, voltage regulator emiited smoke and fired up.

What might be the cause for this behaviour?

What should I need to do to overcome this?


texts:
I'm currently working with the flyport from OpenPicus, it has 24FJ256GA106 PIC processor in it and I was looking for the best way to send information from the flyport to a server.

I want to know how can I send this data? In a packet form to the server? Does anyone know where I can find information on accomplishing this?

I already have previous experience with .Net programming and was hoping to have it pushed to a SQL server. However, getting the data sent would be enough information to get me started.


texts: How to make a Triple Pole Double Throw relay in Proteus?

texts:
I have been using been using Circuit Wizard for awhile now to make simple wiring diagrams, to test if they work and then have to redo then in Visio, to add images of components that are not included in Wizard. I have just now discovered Proteus, and apparently you can make working components. I just can't figure it out.
I need to make an animated 3PDT relay (I have never seen a PCB one but I am using an IDE DIN rail socket with relay) and an animated DPDT switch with Center Off (On-Off-On). Again I am making wiring diagrams with off board components. I know using this program might be overkill but if this can make devices then I'm good with that.
I have no images of what I have done since it would be just a DPDT relay that I have tried to "reverse engineer" but can't seen to find out how to edit such a small thing. I have searched how to make my own devices but all that brings up are way more advanced integrated circuits.


texts:
I couldn't really think of a good name for this topic, but basically Im looking for a good Tutorial/Schematic for kind of a "basic" Power Supply (To run Experiments off a breadboard). Typically they seem to use a 7805 5v regulator (coming from a 9V), a few capacitors, a diode (and some other components like a resettable fuse usually).

This would be a great thing I could put together then hook up (so I can use for basic learning/experiments). I found a few videos on youtube, but they were really sparse and didn't actually "show" the schematic in the end (nor explain why what goes where).

Anything with a Schematic or explanation would be great, the one components the better IMO since it'll give me a chance to get used to the actual components themselves.

edit: Something similar to this:
http://www.youtube.com/watch?v=FVMrA8C-GM0&feature=channel_video_title


texts: How do I control ten lightbulbs individually using one wire and processor?

texts:
Completely new at electrical engineering. My only degree is in Comp Sci.

I want to know that if I had something like a raspberry pi and a power source, how can I use them to turn on and off individual bulbs in a collection of ten without connecting a separate wire for each bulb? Rather, there would only be one connection from the computer that can split into different ones to control the bulbs.

With digital logic gates, you could perhaps use a decoder to input a signal from the pi and interpret to one of ten outputs.

But beyond that I don't really know where to start with this.

Edit: I apologize for being unclear. What I meant was that computer connection wouldn't require ten different physical wires from it to the bulbs, but the computer could choose which light bulb it can connect to with only one connection throughout the set up. The reasoning for this is that if you scale this up to 100 bulbs, how exactly can you connect hundred wires to a computer?


texts:
Could you tell me why do I see the crossed rectangle on the 3V3 pin?
The element that applies to 3V3_PSU and 3V3 pins is a jumper.
Do I need to worry about it?


texts:
I just bought some UV LEDs

I bought them for testing banknotes and identity papers. I read the documentation and saw some warnings about UV light in which the vendor advises not to look directly at the light and not to expose skin to the light.

Can I use these LEDs safely ?


texts: Help to clarify the meaning of a power supply's Voltage and Current rating

texts:
I've started building some homemade computer kits recently (like the Maximite and the Micromite Companion boards), and they have barrel jacks that accept a DC power supply that are easy to find, but come in a lots of varieties in terms of output voltage and output current.

One computer I built recently recommended a 7.5 V power supply (though anything from 5V to 9V was deemed acceptable) and an output current of 1 Amp (or at the very least 500 mA).

I have a ton of old DC power supplies that can plug into these systems, but none of them match exactly the designer's recommendations, and I'm not sure what's "safe" to use and what could potential damage the system or make it unreliable.

My main questions that I'm hoping to get help with here:

1.
If a DC power supply is rated 7.5 V, what difference does it make how much current it can deliver? I understand each component in the system draws some current from the power supply, and that's why the current is clearly labelled on the plug, but then what difference does it make if 1 amps comes from a 5 volt supply or a 12 V supply?

Is there any danger in plugging in a 12 V power supply that is rated at 2.5 amps into a system that is expecting a 7.5 V supply with 1 amps?

Clearly I'm a newb on this subject, so if my questions don't make sense let me know and I'll try to clarify.

Please note: I'm not asking for a recommended power supply for a specific project. What I'm really after is just some basic understanding in how voltage and current relate in a DC circuit. I've looked extensively online and of course there's a ton of information on this, but I'm still left confused on the topic and was just looking for some help here on this site.


texts: Why is it that true random number generators are not in every computer?

texts:
I understand that one of the fundamental pillars of the programmable computer, is that we should implement features with software rather than hardware, anytime it is possible & more efficient (or less efficient but to a degree that we can deal with); but I believe that random number generating should be an exception. There are many things that, in theory, are undermined by PRNGs (e.g., in 1949, Claude Shannon proved that any "unbreakable" encryption method must utilize TRNGs for key generation).

For some reason people like to say that TRNGs have longer generation times (https://www.random.org/randomness/) but that is wrong! Some TRNG architectures are only limited by sampling rate & the speed of their ADC (if they are still too slow then you can just run them in parallel). PRNGs are slower because they require computation steps. With TRNGs the "computation" is performed by the environment (at roughly the speed of light). The only thing PRNGs have going for them is that they are inherently more power efficient than TRNGs...

So my questions is, why did TRNG circuits never find their place in the standard computer architecture? From my perspective, every modern day computer should have a TRNG circuit & they should be used in place of PRNGs in most situations.


texts:
Often in power supply schematics they use two diodes at the inputs of opamps:

simulate this circuit – Schematic created using CircuitLab

What's the purpose of having two diodes at opamp inputs?


texts: Why is NAND gate preferred over NOR gate in industry?

texts:
I have read at numerous places that NAND gate is preferred over NOR gate in industry. The reasons given online say:

  NAND has lesser delay than Nor due to the NAND PMOS (size 2 and in parallel) when compared to NOR PMOS (size 4 in series).

According to my understanding delay would be the same. This is how I think it works:

Absolute delay (Dabs) = t(gh+p)
g=logical effort
h=electrical effort
p=parasitic delay
t=delay unit which is technology constant

For NAND and NOR gate (gh+p) comes out to be (Cout/3 + 2). Also t is same for both. Then delay should be the same right?


texts: Trouble reading a byte from external Flash via SPI

texts:
I am using a BMD-340 module based on the nRF52840 Microcontroller.

I am interfacing with AT25SF041 flash memory.

I am writing a byte to a specific address in Flash.

But when I try to read the memory location, On the debug window I only see "00".

Even when I erase a sector, I still see "00", when I should probably be seeing "FF".

I don't see any error messages on the debug window.

I can read the status registers and Device ID completely fine, so I suppose SPI read function is working.

Below is flash_mem.c

#include "flash_mem.h"
#include "nrf_drv_spi.h"
#include "nrf_gpio.h"

static const nrf_drv_spi_t m_spi_at = NRF_DRV_SPI_INSTANCE(0);

static uint32_t spi_config(void)
{
    uint32_t err_code;
    nrf_drv_spi_config_t config = NRF_DRV_SPI_DEFAULT_CONFIG;
    config.frequency = NRF_DRV_SPI_FREQ_1M;
    config.mode      = NRF_DRV_SPI_MODE_3;
    config.bit_order = NRF_DRV_SPI_BIT_ORDER_MSB_FIRST;
    config.mosi_pin  = AT_PIN_MOSI;
    config.miso_pin  = AT_PIN_MISO;
    config.sck_pin   = AT_PIN_SCK;
    config.ss_pin    = AT_PIN_CS;
    err_code = nrf_drv_spi_init(&m_spi_at, &config, NULL, NULL);
    if (err_code != NRF_SUCCESS)
    {
        // Initialization failed. Take recovery action.
    }
    nrf_gpio_cfg_output(AT_PIN_CS);
    nrf_gpio_pin_set(AT_PIN_CS);
    return err_code;
}

uint32_t at_init(void)
{
    return spi_config();
}

void at_read_rems(uint8_t * manufacturer_id, uint8_t * device_id)
{
    uint8_t spi_tx_cmd[] = {0x9F};
    uint8_t spi_rx_response[3];
    nrf_gpio_pin_clear(AT_PIN_CS);
    nrf_drv_spi_transfer(&m_spi_at, spi_tx_cmd, sizeof(spi_tx_cmd), spi_rx_response, sizeof(spi_rx_response));
    nrf_gpio_pin_set(AT_PIN_CS);
    *manufacturer_id = spi_rx_response[1];
    *device_id = spi_rx_response[2];
}

void at_write_enable(void)
{
    static uint8_t spi_tx_cmd[] = {CMD_WREN};
    nrf_gpio_pin_clear(AT_PIN_CS);
    nrf_drv_spi_transfer(&m_spi_at, spi_tx_cmd, sizeof(spi_tx_cmd), 0, 0);
    nrf_gpio_pin_set(AT_PIN_CS);
}

void at_program(uint32_t address, uint8_t * data_ptr, uint32_t data_length)
{
    uint8_t spi_tx_cmd[] = {CMD_PROGRAM, (address >> 16) & 0xFF, (address >> 8) & 0xFF, (address >> 0) & 0xFF};
    nrf_gpio_pin_clear(AT_PIN_CS);
    nrf_drv_spi_transfer(&m_spi_at, spi_tx_cmd, sizeof(spi_tx_cmd),NULL, NULL);
    while(data_length > 255)
    {
        nrf_drv_spi_transfer(&m_spi_at, data_ptr, 255, NULL, NULL);
        data_ptr += 255;
        data_length -= 255;
    }
    nrf_drv_spi_transfer(&m_spi_at, data_ptr, data_length, NULL, NULL);
    nrf_gpio_pin_set(AT_PIN_CS);
}

void at_read(uint32_t address, uint8_t * data_ptr, uint32_t data_length)
{
    uint8_t spi_tx_cmd[] = {CMD_READ, (address >> 16) & 0xFF, (address >> 8) & 0xFF, (address >> 0) & 0xFF};
    nrf_gpio_pin_clear(AT_PIN_CS);
    nrf_drv_spi_transfer(&m_spi_at, spi_tx_cmd, sizeof(spi_tx_cmd), NULL, NULL);
    while(data_length > 255)
    {
        nrf_drv_spi_transfer(&m_spi_at, 0, 0, data_ptr, 255);
        data_ptr += 255;
        data_length -= 255;
    }
    nrf_drv_spi_transfer(&m_spi_at, NULL, NULL , data_ptr, data_length);
    nrf_gpio_pin_set(AT_PIN_CS);
}

Below is part of main.c

int main(void)
{

    uint8_t status_register, man_id, dev_id;
    uint8_t data_buf = 0x23;
    uint32_t address = 0x01A8FF;
    uint8_t read_buf;
    at_init();
    at_write_enable();
    at_sector_erase(address);
     nrf_delay_ms(500);

     at_read(address, &read_buf, 1);
       NRF_LOG_INFO("Reading address %.8x: ", address);
       NRF_LOG_INFO("%.2X-" ,(int)read_buf);

       at_program(address, &data_buf, 1);

       at_read(address, &read_buf, 1);
       NRF_LOG_INFO("Reading address %.8x: ", address);
       NRF_LOG_INFO("%.2X-" ,(int)read_buf);
}

I don't have a logic analyzer to scope the signals yet.

Can someone help?
Thanks,


texts: bright LED on IO-Pin without additional transistor (PIC 12F)

texts:
I want to drive an 40 mA LED on a single I/O-Port:

I've forgot to draw the LED in the right version but i hope you get the idea. So my actual question:
Since my PIC 12F isn't able to drive currents above 20 mA I may use the right circuit for supplying that current. But by using voltage/current directly from my source it may also be possible to achive the same with fewer parts - at least i think it is...

So what's my error in reasoning? is it possible to use the left circuit without problems?

Thanks in advance.

EDIT:
Additional (maybe dumb) Question - what's wrong about the following:

I could manage to make a second port available...

2nd and Last Edit:

It's possible as mentioned here (german) - since I/O Ports are rare i may try using a FET anyway, thanks for all the answers


texts: Advantage or disadvantages of SMD over Through hole design in high frequencies?

texts:
I know this is an elementary question.

I know that SMD design has the advantage of smaller board size but I dont know which design works better in higher frequencies.


texts: Calculated result for inductance seems wrong?

texts:
I'm building an FM radio transmitter kit which includes an LC tank, where C is a tuner capacitor of ~30pF and the resonant frequency is ~100Mhz. The value of the PCB trace inductor, however, is not specified and I want to know what it is.

If I plug:
\$100000000=\dfrac{1}{2π\sqrt{L3\times10^{-11})}}\$

into an equation solver the result is apparently 52771500 Henries. That seems... a little off? Considering most of the FM transmitter examples I've looked at on the net are like, 0.5uH?

How do I work this out?


texts:
I know there are many videos (many of which I have watched) and many posts (many of which I have read) about voltage, but I feel like a few points are left out that should be explained.

What is voltage really doing? Is it making the current move faster by using more energy (measured in joules) to move one coulomb, so is it just making current faster, which is where the pressure analogy comes from?
What is electrical potential, and how does it tie in with voltage?
Do voltage dividers limit current? And if so, how do you find out how much current is per volt?
What happens when voltage is increased, does more current flow?

I bet that I am misunderstanding something so if you could also explain that, it would be greatly appreciated.

This is the last question I’m going to ask for a really long time, so I hop it sends voltage home for me...

Thanks in advance!


texts: SPI ATMEGA328P does not send back on MISO

texts:
I am using ATMega328P and programming in Atmel Studio 7 and I am trying to initialize the SPI. I initialize it and send some data, checked with the oscilloscope, the data is sending on MOSI line but I get nothing on MISO from the MFRC522 RFID sensor that is the slave.

I am working in master mode, this is the code:

void spi_masterinit()
{
    DDRB = 0xEF; //initializare port
    DDRB |= (1<<3)|(1<<5)|(1<<2); // MOSI , SCK OUTPUT ,SS
    SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0);//prescaler 16 , Master mode  , SPI enable
    DDRB &= ~(1<<4); //MISO INPUT
}

uint8_t  spi_mastertransmit( uint8_t data)
{
     SPDR = data; // loading data in buffer
     while(!(SPSR & (1<<SPIF)));  // wait for the flag SPIF to be 1
     return SPDR; // return data
}

This is the code for init and transmit and this is the main:

int main(void)
{
    uint8_t data = 0;
    _delay_ms(50);
    spi_masterinit();
    _delay_ms(1000);
    mfrc522_init();
    _delay_ms(50);

    while(1)
    {
         PORTB &= ~(1<<2); //cs active
         spi_mastertransmit(data++);
         PORTB |= (1<<2);
         _delay_ms(1000); //disable cs
    }
    return 0;
}


texts: I had a strange adventure today. I was repairing a mixer and plugged the connectors reverse when mounting it together. When i turned the power on it was behaving strange, and i started to smell fried electronics. I switched the power off, reversed the connector to proper position, turned on the mixer once again and... It smells so bad but it works. How come? Can fried op amps still work?


texts: Polygon pour on internal signal layer ALTIUM

texts:
I am working on a six layer PCB, the layers are Top layer, layer 1...layer4, Bottom layer. I am trying to create a polygon pour on any internal layers (for example layer 1). However when I try to pour it, I am not able to do so, Altium simply shows the outline of the polygon but does not fill it. Anyone know what I am missing? As a side note, All my polygon pours on Top and Bottom layers work perfectly fine.
I am using Pour Over all same net objects as the fill mode.
EDIT:
In Altium, I am unable to pour polygons on any internal layers (they do not fill), while polygons on the top and bottom layers fill just fine. This is what I get when I try to pour on any internal layer (layer isolation is enabled)

As you can see only the border is created.
Here are the settings I am using for reference as well.

If anyone knows the relevant setting to allow me to fill the polygon I would greatly appreciate it.


texts:
In the following circuit i want to find the output voltage Vo related to the input Voltage Vi. Diodes D1 and D2 are the same and have a 0,7V drop when they conduct. Op-amp is ideal too. For the zener diode we know that: $$Vzener=8,6V$$

Well, when our input is positive (Vi>0) , the output Vo is negative(Vo<0), so Zener diode conducts but both D1 and D2 are reversed biased,so the circuit works as an inverting operational amplifer with Gain=-Rf/Rin=-10K/1K=-10. So Vo=-10Vi.

I am a bit confused with the other case about the negative input(Vi<0). Then the output will be positive(Vi>0). Will this make the zener diode conduct in the opposite direction and D1,D2 forward biased as well, so that we have another path from the output to the inverting input?


texts: Impedance of an embedded microstrip with different sub- and superstrate

texts:
I have been trying to find a formula to calculate the impedance of an embedded microstrip where the substrate has a different dielectric constant to the superstrate (so the stack up is conducting plane - dielectric substrate - trace - dielectric superstrate) - with no luck so far.
Everyone only treats the case where substrate and superstrate are identical.
So my question is: is there such a formula and where can I find it?


texts:
I'm trying to read a value from a PIC18f45k20 ADC but I always get a zero. It has to be my config that is wrong but I can't see where. I've checked the data sheet and googled (lots of conflicting info though...).

Details

PIC18f45k20
16 Mhz crystal, PLL=4 so 64Mhz
Input on AN11/RB4
XC8
Reading input from a LDR acting as a voltage divider from +3.3V. (I've confirmed with a multi-meter that this generates voltages around 1.5v-3v depending on light levels)

What I've tried to ensure is

TRISB for RB4 is input
ANSEL for ANS11 is analogue
Channel 11 is selected
Using Vdd and Vss as references rather than external refs
Appropriate TAD and speed - I hope this is correct. Fosc/64, 20 TAD

I've checked the ADC checklist (data sheet 19.2.9) and as far as I can see everything is correct. I've also tried without using the XC8 ADC.h functions (i.e. just setting the bits) and I get exactly the same result.

Any ideas?

///////////////////////////////////////////////////////////////////////////////
#pragma config PBADEN = OFF     // PORTB A/D Enable bit (PORTB<4:0> pins are configured as digital I/O on Reset)
#pragma config LPT1OSC = OFF    // Low-Power Timer1 Oscillator Enable bit (Timer1 configured for higher power operation)
//more setting here...//////////////////////////////////////////////////////////////////////////////

#define _XTAL_FREQ  64000000
#define _CLOCK_FREQ 16000000 // xtal / 4

int main(int argc, char** argv)
{
    TRISA = 0b00000000;
    TRISB = 0b00010000;
    TRISC = 0b00000000;
    CM2CON0 = 0;
    CM2CON1 = 0;
    CVRCON = 0x0;

    ADCON0bits.CHS = 11;
    ANSELHbits.ANS11 = 1;

    ADCON1 = 0b00000000; // 00 = unimplemented, 0 = V- is Vss, 0 = V+ is Vdd, 0000 = unimplemented
    ADCON2 = 0b00111110; // 0 = left justified, 0 = unimplemented, 111 = 20 TAD, 110 = Fosc/64
    ADCON0 = 0b00101101; // 00 = unimplemented, 1011 = AN11, 0 = GO/DONE, 1 = ADON

    while(1)
    {
        ConvertADC();
        while(BusyADC())
        {
        }

        int r = ReadADC();

        delay(500);
    }

    return (EXIT_SUCCESS);
}

void delay( int ms )
{
    while( ms > 0 )
    {
        __delay_ms(1);
        --ms;
    }
}

EDIT- 2014/06/14: I can get the ADC to work on a PIC18f4550 without much trouble. The code is equivalent but I still cant get the 45k20 working.

ADC on AN0/RA0. Based on the example from http://www.pic18f.com/uncategorized/2010/07/06/tutorial-5-ad-conversion-in-c/

TRISA = 0b00000001;
TRISD = 0b00000000;

ADCON1 = 0b00001110;//VSS,VDD ref. AN0 analog only
ADCON0 = 0x00;//clear ADCON0 to select channel 0 (AN0)
ADCON2 = 0b00001000;//ADCON2 setup: Left justified, Tacq=2Tad, Tad=2*Tosc (or Fosc/2)
ADCON0bits.ADON = 0x01;//Enable A/D module

LATDbits.LATD0 = 1;

while(1)
{
    ADCON0bits.GO_DONE = 1;//Start A/D Conversion

    while(ADCON0bits.GO_DONE != 0);//Loop here until A/D conversion completes

    unsigned short r = ADRES;
    LATDbits.LD0 = r == last ? 0 : 1;
    last = r;

    delay(100);
}


texts: Does a DCM flyback always operate in CCM during startup?

texts:
In the flyback topology :
When dimensioned for fixed frequency discontinuous mode, to me it seems unavoidable that the converter will operate in CCM during startup since v=L*di/dt.
And since the output voltage is (almost) zero,
The slope —di/dt is very slow/low, so the current will not be zero before the switch turns on again.

The question:
Can this lead to problems?And what kind of?
Or is it not important since this only happens for a short time.


texts:
I am having problems with the calculation of magnetic forces.

I have two magnetic coils (500 mm diameter and 200 turns) with metal core.
They are facing each other with currents (70 A) flowing in opposite directions, resulting in opposite magnetic poles. The upper coil shoud lift off the other coil. I am trying to calculate the mass the upper coil could carry. The distance between the coils would be max. 7 mm.

I found the formula next to the picture. I took B=1,9T for the metal core in saturation.
I neglected the distance between the coils and as a result I got 282kN as force, which seems too much.

I would like to know if the whole idea is possible and if the calculation is correct.


texts: Will love to understand how the circuit works based on this schematics

texts: Just a pure understanding of the workability of this circuit. why 7 switches?


texts: How to measure the PWM current with a DMM

texts: I have a Fluke 87V, which is a True-RMS DMM, and I would like to measure the current in my circuit. I have 2 motors being driven by a PWM so I wonder if the DC current or the AC current measurement of the DMM will be do the job for the PWM current. Is it there a recommended way to measure this kind of "mixed signal" using a regular DMM as a Fluke 87V?


texts: Current noise as spectral density from given RMS noise

texts:
I want to know the current spectral density of a Keithley 6221 current source.

The datasheet above provides values in RMS for a given Bandwidth from \$10~\text{Hz} - \text{BW}\$, not clearly specifying the bandwidth \$\text {BW}\$. I am not exactly sure what Output Response Bandwidth (BW) into Short means, but figuring from the \$\text {BW}\$ in brackets I used it as bandwidth.
In a first approximation the RMS value can be calculated from the spectral density \$\text {SD}\$ by
$$X_{RMS}=SD\cdot\sqrt{\text{BW}}\cdot\sqrt{\text{ENBW}}~~~~~~~~~~~(1)$$
with the equivalent noise bandwidth \$\text {ENBW}\$ (rectangular approximation valid for high bandwidths).
Assuming the above values for the 100 mA range this yields
$$\frac{20e^{-6}\text{A}_{\text{RMS}}}{\sqrt{1e^6~\text{Hz}}\sqrt{\text{ENBW}}}=20\frac{\text{nA}}{\sqrt{\text{Hz}}},~~~~~~~~~~~(2)$$
which seems a lot to me. Note that a \$\text{ENBW}\$ anywhere from 1 (brick wall filter) to 1.57 (1 Pole) does not change the result significantly and can thus be neglected.

Is this the correct way to determine the spectral density?

I read through the thread Determining noise spectral density, which states that the spectral density cannot be calculated due to lack of information. If the bandwidth I used is correct, this is not the case here.

Sideinformation: I feed a 3 Ohm inductance with the current source and I can measure the voltage density over the inductance with a spectrum analyzer. I would like to get the calculation and the measurement into accordance. The voltage noise can be calculated from the current noise and the resistance, once the current noise is known.


texts:
Is it possible to get a constant voltage using piezoelectric crystal by giving mechanical stress?
If it so , can I charge a 5v battery using piezoelectric effect


texts: Replacing the top case on a UPS, danger of electromagnetism?

texts:
Hopefully this isn't a totally stupid question, but my knowledge in this area is non-existent.

I have a 10 year old UPS (it's an APC 3000W 2U rack mount, thus has two fairly big transformers inside) and it's developed the typical transformer hum that's become rather loud.

I've done a bit of reading (for example) but replacing or fixing the transformers doesn't seem possible.

However, I noticed while taking the system apart that with the top case removed, the hum/buzzing disappears completely. Then slowly moving the top case back down, without touching anything, the hum will start again, and get louder as the case gets closer. It maybe starts about an inch above.

What little understanding I have is that this will be caused by the magnetic field given off from the transformers? From the 50Hz AC? Or at least I hope it's a normal byproduct because that leads me onto my main question...

I was thinking of replacing the top cover of the UPS with Plexiglas. Is this a stupid idea? Ignore the fact it'll be structurally weaker, the UPS will be in a locked rack so I'm not worried about that. What I do want to know is whether the lack of top metal cover would have any disastrous effects for the rest of the equipment in the rack? If the top case can experience vibrations and is some way shielding the internals, would this effect just be transferred to the next item above it (like a server with hard drives...) if the top case is removed? I was under the impression transformers are supposed to keep everything contained, but my buzzing case seems to contradict that?

If you want any details/photos of anything mentioned here, I can provide.

Many thanks!


texts: Unexplained interrupt behavior in AVR ATMEGA324P Timer Counter ISR

texts:
I have an ATMEGA324P controlling a dual motor driver circuit. I'm using the 16-bit Timer Counter 1 in Phase and Frequency Correct mode to create (2) PWM outputs using the ICR1 as the TOP value and the OCR1A and OCR1B to generate the PWM signals on the output pins. The problem persists the same on OCR1A and OCR1B so I have disabled OCR1A to simplify troubleshooting.

The problem I am experiencing is when any other interrupts on the system fires , such as UART or PCINT, the PWM duty cycle will invert. For example if the duty cycle is set to 75% it will invert to 25% and flop back and forth as other interrupts fire making the output extremely erratic. The scope shots below show the desired output on top and the inverted on bottom. I've been able to trigger this inversion by UART RX ISR, Pin change interrupt ISR, and Timer Counter 0 and 2 Compare A & B ISR's. For example sending a character to the UART will cause it to invert.

Everything seems to work in my code (below) except for this issue. I have tried a new circuit board and it exhibited the exact same behavior which suggests it's not a hardware problem. What I think might be happening is the OCR1B interrupt is somehow triggered when the other interrupt fires causing an extra OCR1B toggle of the output pin. Once this happens it keeps working as it should, toggling the pin but in an inverted state. This is illustrated in the timing diagram below.

It's possible I have some error with my stack and the ISR address is being corrupted. The addresses I've tried are shown below with the X and the target address with the arrow. I appreciate any help.

#define SS_Hi()         PORTB |= _BV(4)
#define SS_Lo()         PORTB &= ~ _BV(4)
#define SS_IN()     (PINB&_BV(PINB4))

void init_TCNT1(void) {

    // setup timer counter 1

    // PWM, Phase Frequency Correct 8-bit. TOP = ICR1

    TCCR1A |= _BV(WGM11);
    TCCR1B |= _BV(WGM13);
    TCCR1B |= _BV(CS11);

    ICR1 = 40;

    TIMSK1 |= _BV(OCIE1A);
//  TIMSK1 |= _BV(OCIE1B);

    OCR1A = 10;
    OCR1B = 10;
    TCNT1 = 0;

}

ISR(TIMER1_COMPA_vect) {

    if ((EnA_1() != 0) && (EnB_1() != 0)) { // only if both enable pins are high

    // if (PWM_PIN_1() == 0) PWMIN_1_Hi(); else PWMIN_1_Lo();

    }
    else PWMIN_1_Lo();
} // End Timer 1 Compare A ISR

ISR(TIMER1_COMPB_vect) {
// ISR For Motor 2
    if (SS_IN() == 0) SS_Hi(); else SS_Lo();
} // End Timer 1 Compare B ISR


texts:
I was wondering if there was a time limit to the "persistence" of bits on a hard drive, a classical SATA for example.

If I'm correct, bits are written by a magnetizing head in some cells on the hard drive. Depending on the magnetization, It will be a 0 or a 1.

But my question is, for how long (possibly a very long time) will the bit keep its value?

Does this magnetization not loose his strength after a while (possibly from the other bits influences or simply external factors)? Is there some sort of battery that allows the re-magnetization of the "oldest" bits?


texts: Bootstrapping is a clever technique where you use feedback to increase the input impedance (mostly in an emitter follower). Why is it named "Bootstrapping"? Just curious.


texts: Amplitude modulation of unit step signal

texts: What will be the amplitude modulated signal, if the input is an unit step signal? You can take any carrier signal (though I would recommend sine wave) and take any carrier frequency because that is not of interest here as I want to know the shape of the net modulated signal.