texts: Specific noise while using arduino ADC in free running mode

texts:
To make an oscilloscope in matlab environment, for data acquisition on arduino side, when inbuilt analogRead() is used, it's working fine, but with very low sampling rate, that aliasing is clearly observed. That too, non-uniform sampling. Thus listing out the drawbacks:

Very slow data rate, even if, sent with 115200 baudrate,
Aliasing
Non-uniform sampling

Thus, to overcome above, ADC in free running mode was used, with 16 as prescaling factor, thus 76.9KHz sampling rate (counting each ADC as 13 clock cycles). Thus, data is uniformly sampled now. Also it is quite fast, because of sampling, and is observed. The only problem now exists is, output has a specific noise. The data being sampled is 50Hz sinusoidal current waveform by current sensor ACS712. It overlays instantaneous current waveform over a bias of 2.5V. Thus, when signal is not present, a constant voltage of 2.5V is observed, thus, 512, because of mapping to 255 range.. 127. But in the case of free running mode, along with 127, 191, 63 only are observed. And it can also be seen that nearly 127 = 63*2, and 191 = 63*3. And when current waveform exists, it's highly distorted, but perceptible that it's not the previous signal of just 127, 191, 63. In the below plot, current is passed since 33.5sec.

I am unable to understand this observed structured noise. What may be the reason ? I have once read, last two MSB bits get noisy at this sampling rate, but then how would 127, jump to 191. Why is 63 getting added, subtracted at each instant ?
I understand the reason for non-uniform sampling now is because of Serial.print(), whose interrupts are obstructing the ADC interrupts, but don't understand the reason behind the noise observed.

Following is the code uploaded in arduino. Serial data is read from matlab by fread() function.

long t1=0,ts1=0,ts2=0;
int aval=0, val=0;

void setup() {

 TIMSK0 = 0x00;           // disable timer (causes anoying interrupts)
 DIDR0 = 0x3F;            // digital inputs disabled
 ADMUX = 0x40;            // measuring on ADC0, right adjust, AREF reference
 ADCSRA = 0xAC;           // AD-converter on, interrupt enabled, prescaler = 16
 ADCSRB = 0x00;           // AD channels MUX on, free running mode
 bitWrite(ADCSRA, 6, 1);  // Start the conversion by setting bit 6 (=ADSC) in ADCSRA
 sei();
 Serial.begin(115200);
 t1=millis();
 }

ISR(ADC_vect)
{
 aval = ADCL;
 aval += ADCH << 8;
}

void loop() {
val = map(aval, 0, 1023, 0, 255);
Serial.write(val);
delay(10);
}


texts:
A flyback diode is commonly use to eliminate sudden voltage spike when current drop across an inductive load. These kind of diode can be found close to relay, motor or sometime MOSFET.

simulate this circuit – Schematic created using CircuitLab

Flyback diodes are mandatory to protect the circuit, especially parts that are weak to voltage drop. First question here :

Does the flyback diode protect the circuit or the inductive load?

In some circuit I saw a zener diode, instead of a classic diode.

Why is it needed in this circuit?

The flyback diode aim to reduce the impact of voltage spike. One of the criteria may be the range of theses spikes. Last question :

Is there other criteria to choose the correct part?


texts:
I am trying to design a micro-controller power supply that can use three power sources with a particular order of priority. The sources are:

5V USB - overrides all other sources when available
12V DC - only on when micro-controller provides a 3.3V enable.
3.7V LiIon battery - charged from the other two when available

The current requirements of this system are less than 100mA @ 3.3V.

My concept, shown in the schematic, is to use power a 3.3V LDO regulator from 5V (if present) or the battery. The battery has a charge controller that is powered by 5V (this charging circuit is described in Microchip AN1149). The 5V can come from either USB or from another 12V rail via a buck regulator. The USB 5V must supersede the 12V supply and the microcontroller can also turn off the 12V source. I would like the buck regulator to power off when 12V source is not used.

I have attached a sketch of my circuit concept but I am unsure about the correct use of MOSFETs and Schottky diodes in this context. With the voltage regulators and charge controller in the system I am not sure how to simulate this.

Can anyone help me determine if this MOSFET configuration makes sense and what I need to do to bias them correctly for each operating state?


texts: Buck/boost to charge lithium battery from solar and alternator?

texts:
I have a 105Ah 12V Pb battery in my 4x4 for the fridge, it is charged by solar panel or the car's alternator through a DC-DC charger connected to both. The charger is however only for Pb batts and I would like to try lithium or LiPo batts due to their greater gravimetric energy density. The charger's max voltage (14.4V) however would damage a 3 cell LiPo (max 12.6V).

Can I use a buck or buck/boost DC-DC converter set at 12.6V to charge the LiPo battery from the 18V solar panel and/or from the 14V alternator of the car? (Assuming I get one that can handle the amperage).


texts:
First of all, I have searched the internet all day long, including here on stackexchange, and couldn't find a clear solution. Only ambiguous answers and dead links.

Let's start with what I have: my PC has a motherboard from 2007, with
an onboard parallel port. I bought a parallel port connector and
soldered a wire to pin 2 and 25 ( first data pin and ground). I've
put an appropriate resistor and an LED.
I started with the idea of using Processing first. After a bit of searching I found the PortIO library. I installed it and tried the blinking example. No success. The program seems to work( I inserted a print("Blink!"); after every delay and it displays the message), but the LED doesn't light up. I have to mention that, when I restart the computer, the LED briefly lights up. So the port is working, but I can't control it.
Then I moved to the idea of using C++. As I searched I found out that newer versions of Windows severely limit program access to hardware. Well, I found out about inpout32.dll, and downloaded it from this page(Binaries only - x86 & x64 DLLs and libs).
It seems the driver successfully installed, but I can't find out how to use the files. I use Visual Studio 2012, but I'm not really accustomed to working with external libraries and dlls. Where do I have to put the inpout32.dll, inpout32.h and inpout32.lib files and how do I link them?

And the biggest question is this: How do I actually use inpout32.dll? I can't find any example! It's either for Basic or C#, or even more frustrating, dead links!
For starters, I'd Like to simply turn on and off the LED. Then I can figure out more complicated projects.


texts:
Recently I had a discussion whether one could use RS-485 transceivers for a CAN-bus network in order to gain the flexibility to use the same hardware either in a CAN-environment or in half-duplex RS-485 network, albeit with different software.

simulate this circuit – Schematic created using CircuitLab

The idea is to use a RS-485 bus driver as usual when utilizing the board in RS-485 setup. That this the transmitter is enabled by DEN when one wants to transmit and the bits are presented at the D input as usual. Additional pull-up and pull-downs are provided to ensure valid bus-level upon open bus lines.

When in CAN-Mode, the D input is tied low (dominant) and the DEN input is used to present the bit stream when transmitting. When DEN=1 (driver enabled) the bus is driven low (dominant), otherwise the line remains recessive. This should then mimic the open-collector nature of the CAN bus since only one state is actively driven while the other is only passively pulled by the pull-up resistors.

The part I consider is the SN64HVD11 and the SN65HVD230 as reference for a 3V3 CAN transceiver.

The driver-enable timings of the SN64HVD11 are given as max. 55ns and the fall time is bounded at 30ns which is less than comparative figures of the "real" CAN driver.

Has someone tried this before? Are there issues I might miss completely?

Clarification: the whole system is intended for a small-scale unmanned vehicle control in the academic domain thus interoperability with 3rd-party components is not deemed important.


texts: Influential factors setting the operation point of a bipolar transistor?

texts: I do know why and where we should set the operation point of a transistor. We also learned calculations during lecture. However I do not know, what values do we change to set the Ib DC current. Are we changing the resistances in the system, or what else?


texts:
I am currently trying to design, in theory, a large wireless power spot beaming antenna for a satellite to transfer 200 MW at a wavelength of 116 mm. I was wondering how I could design it so that a ground station to receive the broadcast from 36,000 km away would be at max a few kilometers squared.
I am a bit confused about the equation below from Wikipedia's article covering Friis Transmission. If I wanted to collect all of my power transmitted, the equations seems a bit off.

How do you tell the Solid Angle generated by an antenna array?

$$
P_r = \frac{A_tA_r}{r^2\lambda^2}P_t
$$


texts: Use Raspberry Pi to power a low noise inverting amplifier with negative voltage input

texts:
I am looking to use a Raspberry Pi to power and read the current from a current-to-voltage converter. I am currently using two batteries to power the operational amplifier, as shown in the schematic below. Please ignore the potentiometer, it is an attempt at mimicking a sensor and is for illustrative purposes only. I would like to measure the current going through the sensor in just one direction.

However, I am finding that the 9V batteries I'm using to give the op-amp a negative voltage are running low pretty quickly, so I would like to power the op amp through the Raspberry Pi.

The sensor has a constant voltage input of 50 mV and a variation in output voltage from the op amp of 1 mV (even with the gain). The sensor is similar to a thermocouple or resistance temperature detector in terms of its small changes in current.

I am unsure if using a resistance divider or similar (as shown here: http://tangentsoft.net/elec/vgrounds.html) will wash out the signal. E.g. Voltage division with 2.5 V going into the op amp when I'm looking for mV changes.

Is there a way to redesign the circuit to operate from a single supply voltage source? Thanks!


texts: Touchscreen Performance (iPhone, iPad, Android, Nexus S, etc.)

texts:
Who makes the touch screens for the iPhone or Android devices? Specifically I'm wondering what the sampling rate is for dragging, etc. that gives these devices such smooth touch and drag performance.

Also is there a common standard of measurement for touch screen performance? How do you quantify a touch screens drag performance?


texts: All-Pass Filter that increases phase as frequency increases?

texts:
All the all-pass filters I've seen (both lead and lag versions) start at some phase and then lower the phase at some frequency. I need it to increase the phase instead, so instead of having a negative phase slope I'd have a positive one. I can't find a way of increasing phase starting at some frequency without also changing the magnitude. For example, a series 1k resistor with a 10uH inductor to ground will result in phase of 0 at DC, phase of +45 at 16 Hz, and phase of +90 at high frequencies. But it wreaks havoc on the magnitude.

Ultimately I'm looking for a circuit that maintains a flat magnitude profile while creating a phase bump in the desired frequency range (around 10 kHz). The closest thing I've found is a topology similar to a non-inverting amplifier, but with a capacitor in series with the bottom resistor. This produces a phase bump (good) but also boosts the amplitude (bad). The circuit can be found here, in the lead compensation section.


texts:
This might be a stupid question but, what limits the heat power output of a heating resistor? Is it the temperature that the material can handle, or does the electrical power itself cause a heater to fail?

I'm using polyimide heaters for a project, and I've seen different product descriptions specify power and voltages, but then datasheets only mention typical values and no specific. I can't seem to find answers to my question.

Since they're just resistors my feeling is, I can increase the voltage/power and as long as it stays in it's operating temperature it will be fine (at least until the voltage is so high it starts to spark?). Is that correct?


texts: Interference between speaker and vacuum tubes

texts:
I'm building my own guitar tube amp, and now I have a dilemma. The speaker magnet is so close to the preamp tubes that I'm worry about interference between both.

Should I be worried or that is not a problem at all?


texts:
For reference im using an AVR Atmega 328p, and the servo specs i'll be using says this:

Pulse Cycle: 20 ms (I assume this means the "period")
Pulse Width: 600-2400 µs

So from my understanding, using fast PWM and lets say a 1Mhz clock. I make the Width by setting 2 values. One when it reaches TOP-whatever width (lets pretend 1800 ms, I think people use ICR1 for this) and then the top (I think they usually use OCR1A here).

So the time between ICR1 and OCR1A (Which is the top) is where I turn the "Pin" to the Servo on correct? And then it turns off when OCR1A ends

IE: Turn on when it reaches ICR1, turn off when it reaches OCR1A. If I want a width of 1.8 ms i'd need to make that 1800 steps correct? Since 1800 "ticks" would be 1.8ms (If Im understanding my units correct)

The pulse cycle is where I get confused. That would just be the "TOP" value right? IE: if I need a 20ms pulse cycle. and every tick at 1MHz is 1/1000 of a milliseconds, so to do 20ms pulse cycle, ill need 20000 ticks. because every tick is 1/1000 of a ms

Am I thinking of this correctly? I think the "Ticks" with the CPU Frequency and then trying to get that figured out with cycles and widths is just sort of throwing me for a loop.


texts:
I don't know other software to plot the file and get results put into the report. Matlab hspice toolbox is good for small size files, but I am not sure it is fine with large size ones.

Can I plot the output file .tr0 with some software? Matlab or others? Is Matlab hspicetoolbox suitable for large size files?


texts: Understanding current transformer dimensioning, winding resistance and load resistance

texts:
I am looking at this current transformer.

What I am trying to understand is the following:

Can the burden/load resistor of a current transformer take an arbitrary value? What are the limits?
Does the secondary winding resistance have to be taken into account at some point?

In this answer to a similar question, the output voltage depends only on input current, turn ratio, and burden resistor.

I am assuming, this is a simplified formula. When will I breach its limits? Would it hold even if I substitute a 80ohm burden resistor for 1ohm or 100kOhm resistor and still get accurate answers?

How do I simulate a current transformer in LTspice to explore the behaviour further?


texts:
I generally can't understand the operation of an LC circuit that is I cannot visualize it. I have a few doubts regarding that, please explain me?

Operation:

Animated diagram showing the operation of a tuned circuit (LC circuit).The oscillations are slowed down; in an actual tuned circuit the charge oscillates back and forth tens of thousands to billions of times per second.

If a charged capacitor is connected across an inductor, current will start to flow through the inductor, building up a magnetic field around it and reducing the charge, and therefore the voltage, on the capacitor. Eventually all the charge on the capacitor will be gone and the voltage across it will reach zero. However, the current will continue unchanged in accordance with Faraday's law of induction, which requires that for the current to change in an inductor, a voltage must be applied to it (this is analogous to Newton's First Law for velocity, mass and force). No energy is required for this provided the current remains constant. However, as the current continues to flow, the capacitor will re-acquire charge of the opposite sign, and its terminal voltage will rise again with reversed polarity. This applies a voltage to the inductor which is now in opposition to its current, so the current now falls. Again this in accordance with Faraday's Law. The falling inductor current and rising capacitor voltage indicate a transfer of energy from the inductor to the capacitor. This is analogous to a moving mass colliding with a spring, and compressing it. When the magnetic field has completely dissipated the current will momentarily stop, and the charge will again be stored in the capacitor, with a polarity opposite to its original one. This will complete half a cycle of the oscillation. The process will then begin again in reverse, with the current flowing in the opposite direction through the inductor.
For more details visit http://en.wikipedia.org/wiki/LC_circuit where I found this stuff.

Doubts:-

At the beginning 5v appears across the inductor, after that instant current flowing must increase in the inductor, since the current flows through the inductor to the opposite plate of the capacitor the charges are neutralised. Eventually the voltage across the capacitor decreases, This must lead to decrease in voltage across the inductor also, which then causes the current to increase slowly inside an inductor and thus when the voltage is zero across the capacitor , current must be almost zero in the inductor.....But it is assumed that 5v appears across the inductor constantly no matter what is the voltage across the  capacitor. Why is it assumed so, due to this assumption we have charging and discharging across the capacitor??
Let that assumption be true (Consider),Then after the capacitor has reached zero volts, it is said that the current still flows, But where is the source of charge for it. Without charge how can current flow, i.e there is no source no electrons or positive ions for the current to flow, Doesn't this disobey the law of conservation of energy.
Can anyone please explain to me this circuit conceptually?


texts: Can anyone identify this rtc cmos battery conector please?

texts:
I'm trying to find the plug that fits into this socket. It's really, really small like 3.36mm x 4mm and the distance from pin to pin is like 1mm.

Is the socket for an RTC BIOS battery in a Up squared single board computer. I thought any RTC BIOS cable with a battery from eBay would do, but this is smaller than those. I got the UPsquare on eBay for a really good price but the battery attached to a cable that plugs there is missing.

Manufacturer is in Asia and would charge me almost US$50 for shipping it, half the cost of what I paid for the single board computer :(

As you can see in the pictures, the smallest plug I have(a plug of pretty small fan of a GPU) that is like 4.44mm wide won't fit in.

I tried searching, but didn't have any luck finding anything. I really hope someone can help. Thank you so much.


texts: What's the difference in fluorescent lamps?

texts:
The old tubular fluorescent lamps were 41 mm in diameter. New lamps are only 16 mm. Is there an electrical difference between the old and new?

(Image from a Philips ad)


texts: Simulation Models and Schematic Simulation Errors in Altium Designer 16.1

texts:
I am trying to use simulation of Altium for the first time and i established a simple circuit which was mentioned as "Circuit.jpg" however i have obtained some errors when i run the simulation. My first question is related to fix these errors and how i can put an ac source and make transient analysis on Altium Sİmulation.

My second question is about simulating models. In a schematic library, i tried to add a diode's simulation model. Firstly, i have downloaded a full list of spice models of Diodes Inc. and then i have saved this .txt file as a ".mdl" file as i metioned "diodes-spice-models.mdl" I have select as model name "DEFAULT_DI_B340A" from the browse list like"All_Diode_Models.jpg". My question is that this method is correct or should i copy my model and make a new model and add it to component like i mentioned "Single_Model_B340A.jpg". I also added the "B34AA.mdl" file. If you share your ideas and comments i will be happy because i really desire to work using Altium Simulation. Thank you so much.

These are the files and images of circuits;

1. http://www.diodes.com/spice/downloadall (This can be dowloaded as .txt and can be saved as .mdl)

2. This is the model of B340A obtained by the file above.

*SRC=B340;DI_B340;Diodes;Si;  40.0V  3.00A  5.00ns   Diodes Inc. Schottky
.MODEL DI_B340 D  ( IS=9.90n RS=14.0m BV=40.0 IBV=500u
+ CJO=464p  M=0.333 N=0.775 TT=7.20n )

3. Circuit.jpg

4. Single_Model_B340A.jpg

5. All_Diode_Models.jpg


texts: What are the differences between 3g and LTE? I understand the basics, speed and bandwidth etc, but I want to know how the improvements are achieved and where I can read up.


texts: LEDs with same current rating but different forward voltages

texts:
I have scoured the net for a direct answer but people always end up talking resistor because they don't have constant current.

I have a constant current power supply. LEDs are 700 mA and vary between 2.0 - 2.2 forward voltage to 3.2 - 3.4 Vf.

My question is:

If I run one 2.2 Vf LED in series with a 3.4 Vf led and have my power set at 700 mA then I would need to also supply 5.6 volts. Does running the different forward voltage matter? As long as only 700 mA is supplied I believe I could supply 5.6 to infinity volts without causing damage..?.?

Basically the inverse of conventional circuits with constant voltage and unlimited-ish current.

Thanks


texts: Applying Cramer's rule to find out the transfer function of the circuit

texts:
My circuit is

I have set of equations of the form

Now I just need a single expression for transfer function. i,e ratio of voltage across RL to voltage from AC power supply(in terms of RLC circuit elements).

[I1 is left loop mesh current, I2 is the right loop mesh current]

How can I achieve that? is Cramer's rule application is relevant here?

EDIT: The transfer function in S domain (for some value of circuit elements)

                        2.257e-05 s^3

  ------------------------------------------------------------

  7.039e-07 s^4 + 5.091e-05 s^3 + 0.001942 s^2 + 0.05085 s + 1


texts:
I have a bit of a challenge and was hoping to get some ideas.

I have a BMS board that is connected to some batteries, and part of that BMS has an MCU. There are two connectors in the design, a data connector, and the power connection. Here is a simplified diagram:

Externally I can easily detect if the data connection is missing because I am not able to communicate with the MCU. However, I'm having a harder time detecting if the power connection is plugged in because I am also providing power back to the battery under idle conditions to charge it (think of the battery as kind of a battery backup).

The data connector is used to supply the MCU with power from an external source (if there is no external connection, you don't need to talk to the MCU). I am hoping to have the MCU detect if the power connectors negative terminal (pack-) is not connected by some means of utilizing a path with the supply voltage that is coming in on the data connector (5v).

I just want to generate an output on ALERT via the MCU if the pack's power terminal is not connected.

Externally, the GND and Pack- would likely be tied together.

The BMS is based on this: http://www.ti.com/tool/TIDA-00792

If you have any high level ideas, i would greatly appreciate it!


texts: Can a Hartley Oscillator be built using Fixed Inductors?

texts:
I've been playing around with fundamental circuits (no professional EE background), and became interested in oscillators. I have been trying to build the Hartley oscillator as described here. The document states that "an Hartley Oscillator circuit can be made from [...] a pair of series connected coils [...]".

I had a couple of 22mH fixed inductors, which I hooked up on a breadboard with the other needed pieces. When I test the transistor amplifier independently, it seems to be working. However, there is no sign of oscillation in this circuit.

So my ignorant question is, can I use the fixed inductors indicated? I saw mention of the notion of 'mutual inductance', and I'm not sure you can get such with these discrete components.

Update

My friends and I started out by copying Oli's quick circuit, and were gratified to get a crisp sinusoid waveform. Thanks, Oli!

However, I clearly still have a long way to go, as when we attempted to change the frequency of the circuit we were mimicking, we got zero oscillation. And the original Hartley circuit remains stubborn.

I've bought a couple of used books and will be working through them with an eye to getting the original circuit (among others) working.


texts:
If brushless motor work in 22.2 volt , if I provide the ESC with 24 volt
Is there a problem ?
Thanks


texts:
I have issue where opamp output shifted  when I connect the chassis to Earth ground, I want to  know what is causing this and how to prevented. (main pcb never connect to earth ground just external power supply. PCB is connect to plate which connect to chassis)
Note: VGND or LDO voltage does not change when the opamp output change.
I was reading document from ti  mentioning maybe this is due to impedance mismatch or biasing issue, but I do not know how can I check for that. Some time opamp output goes to negative which I do not understand how (VGND-IinRF)

simulate this circuit – Schematic created using CircuitLab


texts: Alternatives to stacked iron plates for electric motor cores?

texts:
I took apart a brushless motor to find a core made of stacked iron plates. This material is rather dense and heavy for a motor made for aviation.
What lighter, less dense material can a motor core be made of?


texts: When calculating the voltage in an AC Circuit, I get a different angle from the correct answer

texts:
Problem

I'am trying to calculate v2 from the circuit below, but my answer, 9.81cos(1000t+166.64°) mV, has a different angle from the correct answer, 9.81cos(1000t-13.36°) mV.

My approach

I tried to solve it with node analysis doing the following steps.

Found the impedance for the two capacitors, -j1.67Ω and -j2, and for the inductor, j2Ω.
I stated my current convention, currents going out of the node will be positive and currents going into the node will be negative.
Then, using Kirchhoff's Current Law or LCK in spanish, I made an equation for each node.
Solved the system of equations using a calculator.
Changed v2 from polar coordinates to phasor.

Here's the process:


texts: IC design to amplify from microvolt to volt for making a comparator

texts:
I am developing an IC in CMOS technology which, among many other things, I need to compare one signal with another. I need a square wave signal above a limit to result in VDD, and signals below that limit to give GND.
The problem is that the square wave used is on the microvolt scale, and does not work well with the comparator project that I have. So I thought about performing an amplification of this signal before making the comparison, using a common source amplifier with active load, but unfortunately the circuit did not work as it should.
I wonder:

If there is a full schematic of a comparator circuit that can make comparisons on the microvolt scale?

OR

If there is a full schematic of an amplifier circuit that works for signals in the order of microvolt?

The noise level of my circuit is in the order of nanovolts, which means that noise is not a concern in the amplification process.
@EDIT As requested
The context of my problem is as follows:
I have a light sensor that is expected to pick up a square wave signal, indicating the presence or absence of light. This sensor also outputs a square wave of the order of microvolts, but with variable offset. This circuit has already been tested and I know it works very well.
The generated square wave will serve as a clock for other system signals. The signal phase does NOT matter here, and is manually adjusted later in the system. I just need that the clock necessarily comes from the light clock. So my original idea was to remove the offset and simply perform a comparison of this with GND, which did not work due to the type of comparator used.
My second attempt was to perform an amplification using a common source amplifier on the signal before the comparison, but that was also unsuccessful, as the signal was not properly amplified
That was the reason for the question posted.
The project specifications are:
180 nm technology
1.8V power supply
1MHz input square wave signal in the order of microvolts, with an offset in the order of 0.5 V (but which is not relevant and may vary slowly throughout the operation)
1MHz output from 0 to 1.8 where the phase does not matter in relation to the input as it will be manually adjusted at a later stage.
Noise level from my environment is in the order of nanoVolts (highly controlled environment and highly accurate components, including the power supply). I don't care a lot about the noise generated on output.
If necessary, I can generate reference signals to be used in a comparison in the order of 1mV or higher.
I have no concerns about either response time or jitter. In fact the most important thing in my project is just that I know at some point that there is a 1MHz square wave being received.
I think an input impedance of 10k is enough for my project
Initially I have no output resistance requirements. I will design the other stages according to this information.
I don't think there is any limitation to the type of component used. Any suggestions are welcome


texts:
I completely understand the working principle of light dependent resistor. But there is one thing I am bothered about:

Does the LDRs surface has to be equaly illuminated upon all its surface/upon all its photoresistive track? Or it doesn't really matter, if all of its photoresistive track is illuminated or only one part of the photoresistive track is illuminated?

or

Are the LDRs values the same, if it gets illuminated upon all of its photoresistive track or if it gets illuminated upon only one part of photoresistive track?


texts: What is the purpose of the cylindrical layered conical discs in power stations?

texts: You can see them everywhere. On towers of overhead lines, in power stations, converter stations, transformer stations, etc... Sometimes they are rubber, sometimes metallic, sometimes glass, sometimes porcelain. What is the purpose of these conical layered discs? Why do these things have this shape?


texts: Is it possible to calculate the total resistance of this circuit with series and parallel analysis?

texts:
If I have a circuit like the one below, is it possible to determine the total resistance with the usual series and parallel analysis? I have been staring at it for a while and cannot see how I might do it because of the resistors on the left and the right. Hints would be appreciated.

simulate this circuit – Schematic created using CircuitLab


texts: How to analyze the functionality of the LM399 in the Libbrecht-Hall current source circuit

texts:
Recently, I read one paper on Libbrecht-Hall-Style circuit. As shown in the following picture.
(arxiv, AIP journal)
I found that the circuit uses one LM399 as a voltage reference fed to the non-inverting input pin of Op amp(AD8671) to set the current of the circuit.

I refer to the datasheet of LM399, I found that the voltage across the Rset resistor would be 6.95V, and the voltage fed to the non-inverting pin of AD8671 could be adjusted by the value of Rset. But I do not know how to calculate the maximum current value that the circuit could deal with. It seems that the AD8671 works as a comparator, so how to maintain a stable current?

Could any one give some suggestion?
Any comments are highly appreciated.

Edit

According to Neil_UK's answer, I draw a simple circuit to see if I grasp the working principle of the circuit. In the picture, I use a zener diode to represent the LM399.

The different value of R7 and R8 would set the non-inverting voltage, so the inverting voltage would change correspondingly. Thus the voltage across the Rsense voltage change to maintain a balance.


texts: Need help on-parallel resonant circuit vs. bandpass filter!

texts:
These two types of circuits, parallel (LC) resonant and bandpass filter (i.e. some resistance connected with parallel resonant circuit in series). Please tell me when to use which one and what are the advantages of one over another?
Thanks in advance.


texts:
I have seen two parallel resistors used in series with LEDs in several LED bulbs.
Why are parallel resistors used instead of series one?


texts:
I am new to PCB design and am building a PCB circuit powered by a 2200mAH, 25C , 3S lipo battery, the maximum current that will be drawn from this would be 13 Amps.

I usually use the trace calculator to figure out the thickness of the trace. However, this is the first time i am working with current greater than 2 Amps. So, i just want to make sure i dont have to do something special, when designing a 2 layer pcb that has 13 amps of current running through its veins.


texts: How to find Thevenin equivalent of circuit?

texts:
I'm trying to find the Thevenin equivalent for this circuit. I'm confused how to do this, but my solution so far is:

Mesh 1: 0 = 2(I1) + 2(I0) - 2I0(volt source)
Mesh 2: = ?
Vth = Vab = I1 - I2
Rth = (2+4) * (2+4) / (2+4+2+4) = 3ohm

Is this in the right direction?


texts: Why does the datasheet for this FET show two / three VGS(off) values?

texts:
I am using a MMBFJ270 P-Channel JFET and if you look at the characteristic graphs it is saying that there are two values for VGS(off) and in one graph it quotes three different values... Why does it do this and what determines the value for the VGS(off)?

A couple of the graphs are below so you don't have to trawl through the datasheet.

In the datasheet it says in the characteristics table as well that the VGS(off) is 2.0V... I can only assume it depends on the IDS or VDS but I really have no idea...

Can anyone give me some pointers as to what value VGS(off) this FET will actually be or how I can work it out?


texts: arduino's pin number 7, isn't it dangerous without resistor?

texts:
I am reading a book called Getting started with Arduino.  In that book, I don't understand why there is no resistor between pin number 7 and the switch (see diagram:)

If there is no resistor between power source and ground, wouldn't it be prone to short-circuit and cause damage? Does pin 7 contain a built-in resistor or something?


texts: Confusion with the meaning of current regulation for this context

texts:
This is regarding powering an IEPE accelerometer.
Below shows a general schematic of the IEPE power scheme(taken from a website):

The site says:

  One of the first considerations, then, that an IEPE accelerometer user
  must make is whether their data acquisition system can supply
  sufficient constant current.

What is meant by constant current here? Is the accelerometer sinking that constant current or a regulator pushing a constant current?

Would any power supply with very high max current rating be sufficient or current must be limited?

My confusion here is that what is meant by current regulation here? Is it keeping the current constant all the time at a particular value or limiting the current?

There is another example below which uses something called a current regualting diode.

But these accelerometers have their sensitivity given in mV/g. Yet the value of the decoupling capacitor Co below seems up to the user. Would Co has no effect on the output?


texts: How to properly terminate this circuit (50ohm coaxial to oscilloscope)

texts:
I'm a bit confused how this type of circuit should be terminated. I have no experience with transmission lines, so I do not know where to put 50ohm resistor.

It's basically output from opamp, there will be BNC connector and I want to connect it to an oscilloscope.
Bandwidth would be 100MHz.

Is it necessary to put 50ohm resistance like this?
a)

Or the 50ohm resistor should be like this?
b)

Or there should even some termination at the "other end", between end of coaxial cable and input to oscilloscope?
c)

Or just put 50ohm termination on the "other side"?
d)

My feeling is that option c) is correct, but I'm really not sure.

UPDATE:
I have simulated those circuits in LTspice (it is able to simulate transmission lines).
It looks like this:

I have captured voltages at the ends of that transmission line and current going down to transmission line (actually current through R7). Voltage source sends 10V pulse.

a)

The pulse has 10V peak at the end (output from transmission line). But bounces back to the input of transmission line. There are 2 current peaks +100mA and -100mA.

b)

It looks like the output of transmission line sees many bounces (with 20V peaks). And the current peak is 200mA.

c)

Output sees 5V pulse. Current peaks at 100mA. No bounces.

d)

Output sees 10V pulse. Current peaks at 200mA. No bounces.

So it looks like a) is the best option (output sees 10V, and there is only 100mA current peak), but I don't know whether that bounced pulse back to the input of transmission line could cause some problems or not.


texts: Current sensor that works in 0nA-250nA range?

texts:
Is there any current sensor capable of sense very low current ranges from 0nA to 250nA?
I would need to sense the current produced by this photodiode: GVGR-S11SD (http://www.geni-uv.com/download/products/GVGR-S11SD.pdf) (http://www.roithner-laser.com/datasheets/pd/uv/gvgr-s11sd.pdf)
Maybe this requires an amp? (https://www.analog.com/media/en/technical-documentation/tech-articles/Optimizing-Precision-Photodiode-Sensor-Circuit-Design-MS-2624.pdf)


texts: Can 12V Batteries be made to act as a ±12V power source?

texts:
I am an undergraduate electrical engineering student, and as a final project for one of my classes I made a speaker system which could play music connected through a 3mm cable.  The system was powered by the power supply units we have in the lab.

The project is over now, but i still want to be able to use my speaker out of the lab.  It currently needs to be hooked up to 12V+, 12V- and ground in order to function. Is there any way I could use batteries, perhaps 12V batteries, as the power source to make this mobile?


texts: What wireless protocol can I use for my distributed sensors application?

texts:
Think I have sensors all around a car. In stead of physically wiring those sensors to a central computer, I want to add a battery to them and have them communicate wirelessly to my main control.

My question is what Wireless Protocol (for the Physical layer) can I pick?

Therefore my requirements are:

No Pairing should be needed. Sensors and controller come up and can discover all sensors and start getting data.
There could be multiple cars next to each other and the controller in each car should be hard paired to the sensor in its own system only.
What steps would be needed during initial installation to pair the sensors and the controller?

Update:
As pointed out, items #1 and #2 above seem contradictory. Here is what I can afford. During the initial installation of the system, The factory integrator can scan the sensor 'remote sensor boards' and add them to the controller boards non volatile and select type and location of sensors. So I can afford to do pairing in the beginning.
My question is - is Bluetooth a good choice for an application like this? or should i be looking at other protocols too? (I'm a hardware guy so trying to grasp the software stack abilities & requirements)


texts: How to calculate maximum gain that can be achieved by an op amp?

texts:
I am designing a differential amplifier for a Wheatstone bridge which have small voltage variations like 0uV to 20uV. so need to design an instrumentation amplifier. I do not know how to find the maximum gain that can be get from an opamp (I know how to calculate overall gain from resister values used). data acquisition frequency is not a huge matter in my application. 5Hz or 5 samples per second reading would be enough via an microelectronic.

UA741 how to find maximum gain that can be archive from this opamp(frequency at 5Hz)?


texts:
I recently started testing the UARTs on a RockpiE with the hardware v1.2 GPIO headers (https://wiki.radxa.com/RockpiE/hardware/gpio).
In the 'boot/uEnv.txt' file, I disabled the console on uart2 by removing the line 'rk3328-console-on-uart2', and enabled uart1 (https://wiki.radxa.com/Device-tree-overlays). I verified functionality by reading from a UART device connected to 3.3v, ground, and both UART2 and UART1 with minicom:
minicom -b 9600 -o -D /dev/ttyS1

minicom -b 9600 -o -D /dev/ttyS2

Happy with the way everything was working, I decided to start working on a serial message-finding algorithm. For me, the easiest way to try this seemed to be bridging the two UARTs so I could work from one device. I ran one jumper from UART2_TX to UART1_RX and another jumper from UART2_RX to UART1_TX. I tried to send data back and forth with minicom, but received no data.
Am I missing something in the UART protocol that is causing this not to work? I've verified both ports with an external device, and can't think of anything that would prohibit this from working.


texts: If I connect 10 3mm or 5mm blue LEDs to 3 AA battery power source, do I really need resistors?

texts: Looks like this is a good forum to ask this basic question. I would like to connect 10 LEDS 3mm blue lights together and the power source is 3 AA batteries. Do I really need a resistor?


texts: STM32 HAL UART receive timeout interrupt

texts:
I'm developing a software for the STM32l432KC (NUCLEO-L432KC) which uses 2 UARTS with DMA (RX DMA mode to DMA_CIRCULAR) using HAL.

My problem seems to be quite common: the UART buffer length is highly variable (from 12 to 256 characters).

I searched and found out that there is a Receiver timeout interrupt, but how may I implement a callback function to be invoked after an Receiver timeout event occurred?

Is there any sample project showing how to do this?

My RX Complete handler looks like this:

void HAL_UART_RxCpltCallback(UART_HandleTypeDef* huart) {
    static uint8_t lf_counter = 0;

    /* if line received from host */
    if (huart == &huart2) {
        uint8_t length=strlen((char*)tx_buffer_2_dma);

        for(int i=0; i<length; i++){
            push_fifo(&host_fifo, tx_buffer_2_dma[i]);
        }

        HAL_GPIO_TogglePin(LD3_GPIO_Port, LD3_Pin);
    }


texts: Solenoid Force Vs Amp-Turns in Saturation Region

texts:
I'm trying to understand solenoid behavior through the magnetic saturation region.

Most solenoid charts show a linear force vs current:

This doesn't seem to show any saturation. I assume that's because the currents on the chart are too low.

What happens when parts of the magnetic circuit start to become saturated?

Does the graph level off, or does the force continue to increase, but at a reduced rate?


texts: Is it a good idea to connect ethernet cable's shielding to PCB GND?

texts:
Background

My project is split over two PCBs for convenience.

The first PCB adapts an input signal and converts it to a low-voltage differential signal. There are 4 channels to be measured, so 4 differential pairs. Signals are 50 kHz, about 1Vrms.
Seemed best to use a regular ethernet cable to carry over those signals to the other PCB (the data acquisition board). The cable distance is 1.5—2 metre.

The RJ-45 receptacles I selected have metal outer casing, exposed as through-hole pins. So if I will, I can make the whole ethernet cable's shield be electrically connected to a copper pour on both PCBs, which surrounds the area around the connector on the PCB. I can also elect to connect this copper pour to analog ground.

Options

So I have a multitude of choices:

Don't connect the cable's shielding to the RJ-45 ends of the cable (or use plastic ends). This way the cable shield will be floating with respect to the signals it carries
Use metal ends and connect them to the cable's shielding, but do not solder the PCB's RJ-45 receptacle to the copper pour. This way the cable's shielding will be connected to the receptacles, but still electrically floating.
Solder to the copper pour (still electrically floating).
Connect the copper pours to the PCBs' analog ground - the shielding becomes ground potential.

The PCBs already use the same ground, as they are powered from a common DC source. Option 4 creates another ground path which I'm slightly worried about.

Question

I'm wondering which option is the best from signal integrity standpoint? I want to measure the differential voltages with a 12-bit ADCs, so signal interference and noise could be an issue, hence the question.


texts: Why is this a bad MOSFET/Driver for a Tesla Coil, what does one look for in a good one?

texts:
MOSFET: http://ixdev.ixys.com/DataSheet/99175.pdf

Driver: http://www.irf.com/product-info/datasheets/data/ir2183.pdf

What factors should one consider in selecting a good MOSFET/Driver combo, and why?

Why would my selection be wrong or bad in accordance with those factors if I'm operating at 150kHz, 170VDC, 3-4A.

(I think this is a more time-independent/communally useful rephrase of my old question)


texts: How to apply the Fourier Transform to this?

texts:
I have the equation \$5\cos(t)e^{-3t}u(t)\$ and the Fourier Transform of it is $$\frac{5(3+j\omega)}{(3+j\omega)^2 + 1}$$  I can't figure out how to arrive at this answer.

Using the FT pairs table, I have \$\cos(t)=\pi[\delta(\omega-1)+\delta(\omega+1)]\$ and $$e^{-3t}u(t)=\frac{1}{3+j\omega}$$

Using the property of multiplication I get: $$\frac{5}{2}\left(\frac{1}{3+j(w-1)}+\frac{1}{3+j(w+1)}\right)$$

I just can't figure out how we go from here to $$\frac{5(3+j\omega)}{(3+j\omega)^2 + 1}$$


texts:
What kind of transformer is this and how is it used?
I'm also confused about why there are only 3 wires. I don't see any other pins on it. Although on the opposite side, you use the number 4 on one side and RT on the other.


texts: How can I protect the amplifier behind a headphone jack when interfacing with external circuitry?

texts:
I am wanting to mess with the output of my guitar amp. Not actually opening it up, just taking the headphone-output and connecting it to a breadboard and such.

What form of protection, if any, should I use to keep from frying my amplifier (which cost $100) in the case of a short or other problem.

Are most amplifiers self-protecting? I'm unsure on how most commercial audio amplifiers work.

Note: My guitar amp is a 60W amplifier, but I of course won't be using it at full power


texts:
Recently I have noticed high freq. screeching noise coming out from my laptop's adaptor. I opened it up and found that it came from somewhere around a diode named egp10a. I checked it (unplugged) with a multimeter disoldering only one end and saw that it works fine (no reverse voltage leak detected).
Later, I wanted to power the board without soldering the cathode to the board to see if the noise really caused by this diode. As I plugged the adapter the fuse blew and gave that burning smell. I found another identical fuse and replaced it and soldered the diode completely back again. Hovewer the new fuse also blew.
As someone who is very keen on learning electronics I would like to know what would be the problem and what I did wrong. I would appreciate if you guys guide me through learning the basics of electronics or share a source where I can learn this stuff.
Update:
I have noticed a new component with a burn mark on it located near the FETs (?). I do not know how it's named.
This adapter is becoming my learning kit now I guess since I consider buying a new adapter.
Do you guys think that the SMD caps under the board close to the diode legs I removed would be the cause of the noise I mentioned before?
Edit & Update 2:

I have replaced components shown in the pictures with the equivalent once (I suppose(!))
***Used 11N60C3 instead of damaged STP11NM60AFP
With the new parts put together I get no output voltage at all. (Fuse don't blow anymore)
Do shorted caps might cause this?
Please refer to the picture below where I get 308v output. Is it normal? (standard for my country is 220v)

Note: The power supply's model is ADP-65YB B and rated as 19V @ 3,42A. (Would it be okay if I used 19V @ 4,74A which I already have lying around?


texts: Can Arduino be used in commercial products?

texts: Is it legal for me to sell a product that's built with an Arduino? I know that it's open source, but does that mean I can sell my product for profit, or only for use in prototyping?


texts:
I'm trying to build a toggle that turns a 4 bit counter on or off. Here's where I'm at so far:

As you can see, I'm using a single D flip flop. Ideally I want one switch to disable the chip, and another to re-enable it.

Im lost...


texts: Switchgear dielectric testing and impulse polarity

texts: What is difference between negative and positive polarity impulse test? Why Negative only done for internal dielectric strength and positive polarity impulse only for external dielectric strength? Impulse voltage test of gas insulated switch gears??


texts:
I'm poking around different LED drivers, and one of the things I'm trying to put together is a PWM-driven dimmer circuit that alternates two LEDs off a single PWM wave. I put together a version of this circuit:

with an Arduino providing the V2 PWM signal. My understanding of this circuit is:

When V2 is at 0, R3 pulls the gate of M2 down, turning it off. R2 pulls the gate of M4 up, turning it on, which should light D1. When V2 goes high, that turns M2 on, which pulls the gate of M4 low, turning D2 on and D1 off.

What actually happens is that D1 turns on and stays on. What am I missing?

EDIT

I updated the schematic as recommended:

simulate this circuit – Schematic created using CircuitLab

(note the corrected mosfet part number - FQP30N6L)

It works... somewhat. What I'm seeing now is that when V1 is at about 5V, the behavior is as expected - steady current consumption from my benchtop PSU, and alternating LEDs. When V1 gets to 9V (which is where it's supposed to be), D1 gets stuck on, and that's it. I assume the issue is with the properties of the mosfet I'm using, but I'm not sure where to look.


texts:
I built this Hartley oscillator (taken from the November 1990 edition of Popular Electronics) as part of an AM modulated signal generator project.  But, it steadfastly refused to oscillate.

I was careful about layout and built it on copper clad board, triple checking all connections and component values.  I even clocked the confusing reversal of drain and source.  Still nothing.

So, I modeled it in LTSpice and it doesn't oscillate there either, even after playing around with the values.  Is there something I'm missing here?  I'd still like to get this oscillating, since I've put some effort into its construction.

For parts I used an air blade variable cap (10 - 317pF) and an old RF transformer that I tuned to 255uH (to give me the low end of the MW band) on the primary (the tapped coil is about 7uH). I wound a new secondary to give me the 7uH I needed according to the 707VX spec (which has a 6:1 turns ratio).


texts:
I have breadboarded a simple differential amplifier:

http://www.ti.com/lit/ds/symlink/lm158-n.pdf

what I expect is that OUT=B-A but that only works when the voltage of
B is larger than A+0.6, i:e there seems to be an offset of about 0.6V on the output.
Since the output LM358 is supposed to be able to go to ground I can't figure out
where this offset is comming from. Any ideas?

Edit: VDD is 16V in my tests and if I tie A to ground, then OUT=B without the offset.


texts: I could not find the datasheet of this diode. I need an equivalent, could you help me?


texts: Verilog: Change a Certain Delay According to the Current Output

texts:
For Verilog 2005, when writing the test bench, is it possible to create a lookup table of delay values, and then assign a certain value in it to be the delay of some procedural block?

For example:

reg        clk;
reg  [9:0] delay [0:15]; //suppose delay[i] = 10'di;

always #delay[i]
begin
    clk <= ~clk;
end

and I somehow change i to read out a certain delay value.

Moreover, is it possible to make a lookup table of delays with floating point values?


texts: How to calculate thermal noise contributed by an LNA?

texts:
I've written a thermal noise simulation for a piece of equipment which produces the oscilloscope trace one would expect to see coming out of the instrument.
Now, I'd like to take into consideration contributions made by an Amplifier (LNA) which is part of the instrument.


texts: "Correct" way to attach cable to this specific kind of banana plug

texts:
I bought a set of banana plugs of the style shown here (with rough 3d model to clarify the shape of the terminal because shiny metal is hard to photograph!).

The site I got them from (here) didn't go into detail and there is no datasheet, plus I cannot find any links on the googles that match this exact shape of terminal.  It seems that there are many dozens of different types of 4mm banana plugs and this is a fairly rare breed.

My plan is to solder in some 14 AWG wire by first tinning the wire generously, inserting it into the hole at the end face of the terminal and then feeding more solder in through the hole in the side until the connection is full of solder.

Is that the correct way to install a wire into this kind of terminal?  I think it is but I have also seen terminals that are intended for solderless connection to the cable (eg. by lacing the strands through the various holes and thus creating gas-tight connections through interference fit and friction).

I'm going to be using these for 3.3 V, 5 V and 12 V power up to max 4 Amps each (it's an ATX desktop power supply project).  Edit: The PSU has overcurrent protection which kicks in at 150% rated current, and I'm going to put some 5A fuses in there too for good measure.

If this isn't the best way, could you please suggest a better method?

Also, if anyone could scare up a datasheet for this part that would be great, I'm drawing blanks at the moment.

EDIT:
Further to @Neil_UK's answer, I would suggest that 14 AWG is about the biggest cable size that this type of connector can comfortably accommodate.  My Weller WHS40 iron was struggling but it did manage to get the job done.  Tinning the wire very thoroughly first (without increasing the diameter of the conductor) and then inserting into the terminal, then flooding the aperture with enough solder to completely fill the void resulted in a very strong joint.

If you have a 200 Watt soldering gun and a bunch of flux, then you're good to go. :)

Edit: Here's the "datasheet" if it can be called that...


texts:
I measured an antenna with a VNA and differently to all other cases the SWR isn't low as expected.
Here are some screenshot showing this:

Similar situation, on the same antenna in the same measurement session is the one below:

For Z=45.3 and Xs 0.1 I expected SWR 1.10:1 and not 1.99:1

The point where SWR is the lowest is the one below:

My question is: isn't sufficient Z=50 and Xs=0 to get the lower SWR, so what's wrong?
What I need to modify to get the resonance then? Thanks


texts: Powering RGB LED's and using a PWM chip; series or parallel?

texts:
I'm working on a hobby project where I will be using an Arduino board and a TLC 5940 to control 5 different groups of RGB LED's. The number of LED's in any particular group will not necessarily match the number in another group i.e. there may be 20 in one group but 24 in another. I'm trying to figure out the best way to wire up these LED's. I'm probably going to have on the neighborhood of 50+ LED's total so using one TLC pin for each pin on the LED's is completely out of the question. If I can do it I would like to only use one TLC chip though that is not a requirement; I will start to run into space issues if I need to use more than 2 or 3 though. Ideally with 5 groups of LED's and 3 pins per group I could do it with only one TLC chip since they have 16 channels. I'm pretty new to electronics so I'm trying to figure out the best way to wire this up. They are all going to be powered from a hobby RC battery pack, probably from an RC helicopter or something.

My LED's want 30mA, 3.2v, and the TLC is a constant current driver so if it was just one LED I'd rig up the correct resistor to make it 30mA and go. But since I need to run a bunch of LED off of one pin I have a couple choices.

If I have a 20 LED group and run them parallel then I would need to set the TLC for 600mA correct? And if I run them all series I would need a 64 volt power source; is that correct?

So do I want to do those or some combination of series-parallel. Current RC battery backs like the ones I'm considering seem to be 7v or 11v.

As I said this is a hobby project so absolute stability is not an overwhelming concern. That in mind is the TLC enough of a current limiter for the application or will I want to be adding additional ones inside whatever circuit I work out? Like these LM317 chips: http://users.telenet.be/davshomepage/current-source.htm

Also am I correct in assuming that if one of my groups has 24 LED's and another has 20 I can have the second group mimic the first by adding in 4 resistors that drop 3.2v each? That way I could have both groups run off the same TLC chip since they would need the same current limit.

My guess is that I'll be best off running them all parallel and once I know exactly how many LED I will have I'll need to do the heat dissipation math for the TLC to figure out how many chips I need to spread it across. Is there a better way?

As I said I'm still new to electronics. Your patience and support is appreciated. If I'm missing any obvious considerations or am completely off in my understanding of how this works please let me know.


texts:
I want to test this IC and therefor I need to implement a LC tank with really small components. Is there a trick how to properly solder those parts together? Especially for prototyping, where I might have to exchange parts from time to time.

Can I solder them somehow on universal PCBs?

I don't know the technical term for those kind of small components:inductor, capacitor


texts: How do I move the center of a footprint in KiCAD?

texts:
I have a custom footprint in KiCAD format.

When I place the footprint on my PCB in the Pcbnew editor,
setting a coarse grid before I place it,
the footprint looks technically correct -- it has the right number of pads, and each pad has the right shape and position relative to the silkscreen and other pads in that footprint. (The center of each pad is on a 1.27 mm grid relative to the other pads in this part).

But the pads on this particular footprint currently don't line up with the alignment grid that everything else on the board is lined up with.

Is there a way to edit the footprint to nudge everything in that footprint a certain amount in X and Y,
so that the footprint still looks the same,
but when I place the footprint on my PCB,
the pads line up with the alignment grid the way I expect?

I suppose I could, in the Pcbnew editor, edit the position of each copy of this footprint and change its position on the PCB by the "right amount" in the X and Y direction to get each pad to line up properly.
But then every time I use this footprint I have to manually edit the position of that part.

I'm pretty sure it would be better to edit the footprint in the footprint editor and individually select each piece of silkscreen and each pad, and then for each one, edit its position to the new position.
From then on, every time I use the improved footprint, the pads will naturally line up with the grid.

Is there some way I can somehow select everything in the footprint editor and move the whole thing over in one operation?


texts:
I've cobbled together a diesel pump controller and timer from various bits and pieces and now I'm improving the design. The biggest issue is minimising battery use, because in the wet season the pump rarely starts so the battery is not charged, and cloudy conditions prevent solar charging.

The controller/timer is an Arduino with a relay switching the starter motor circuit and a servomotor that actuates the engine's pressure relief valve.

The trigger is a garage remote fob and a little circuit board containing a radio and a relay, all powered by 12V DC. The relay is connected via debounce to a digital input of the Arduino.

There is no requirement to operate the pump at night so there is no need for any part of the control system to have power. The objective of this question is to arrive at a simple circuit that disconnects both the remote relay radio and the Arduino from the pump's battery while it is dark.

Supply is 12VDC and the combined draw from the Arduino and the garage remote relay radio is between 80 and 100mA although the relay probably pulls more than that while it's actuating. So lets say 500mA peak, that's 6W peak, 1W continuous.

Using a photoresistor to bias a transistor is pretty common but usually this is a low current input sensor arrangement. Has anyone tried switching power like this and if so are there any gotchas I should know about while designing? The forward voltage drop over the MOSFET won't matter, I'm regulating it down to 3v3 and 6V anyway.

Would you suggest some other arrangement like a photodiode or a phototransistor?

This is your classic hobby nightlight.

My first thought is something like this but swapping the photoresistor and the fixed resistance (100K in the diagram).


texts:
I'm driving A4952 motor driver with about 25khz PWM signal, with a simple coil connected as a load between OUT1 and OUT2. VBB is variable, testing with 15V but changing it doesn't alter the results.

As long as it's running with the PWM signal, coil works fine, and the output signal from the driver looks pretty much like input, only amplified. What I'm doing at the input is changing the PWM duty cycle on inputs so that it gives roughly 50 Hz sine wave.

As soon as I try to put a filter capacitor above certain value between output and the ground, the driver goes into fault, and that's the issue that I have been unable to figure out.

The thing has LSS pin which is meant for current limiting resistor. Initially I had about 0.25 ohms there, but eventually I just tied it directly to the ground.

Any cap that I place between output pin and ground that's more than 100nf or so, will drive it into fault condition. So I placed a small inductor, about 3μH in series with output, and placed the cap after that, same story.

I've tried to turn off the other phase of PWM entirely, lower the PWM frequency, and a bunch of other things, no luck. The driver just goes to fault as soon as I try and filter the output. (LC filter, RC filter, load connected, load off, makes no difference.)

Any ideas why this might be happening? The datasheet is not super clear about how the LSS is internally wired either.


texts: Voltage divider bias (BJT) leads to a huge voltage drop across the collector resistor. Why?

texts:
I've already looked for similiar questions, but couldn't find any.
Basically, I'm new in electronic circuits analysis and, after following my professor's lecture and looking on the internet I found out that the following circuit (please note that the voltage source on the top is meant to "replace" a voltage line, as I have no idea of how to draw it)

simulate this circuit – Schematic created using CircuitLab

can be approximately solved, using Thévenin's equivalent, as

simulate this circuit

with $$ R_{th}=R_1∥R_2\approx 2.3k\Omega, V_{BB}=\frac{R_2}{R_1+R_2}V_s\approx 9.23V.$$

Hence, assuming FAR operating conditions (with voltage drop between the base and the emitter of about 0.7V), according to my computations,
$$ V_{BB}-I_BR_{th}-V_{BE}-I_ER_e=0\Rightarrow I_B=\frac{V_{BB}-V_{BE}}{R_{th}+(1+\beta)R_e}.$$

Let's further assume beta=100; then, $$I_B\approx 82\mu A, I_c\approx \beta I_B\approx 8.20 mA.$$ But, to me, this amount of current through a 2700 ohms resistor looks just insane, as it would bring about a 22V voltage drop across Rc, while the voltage source delivers only 12V. Moreover,
$$V_s-R_cI_c-V_{CE}-I_ER_e=0\Rightarrow V_{CE}=V_s-R_cI_c-I_ER_e\approx -18.42V,$$ which looks totally wrong to me. Where am I wrong?
Sorry if this may be a trivial question, but I've been trying for 3 days already and looking on the internet didn't help me at all.
Thanks in advance!


texts: Is it possible to use just a transistor as an RF amplifier?

texts:
Is it possible to use a transistor (such as the B1342 transistor) as an RF amplifier, no resistors, and no capacitors?
I'm trying to amplify the output signal from this schematic, and I don't have many parts:


texts: Power factor and Harmonics associated with Electric Vehicle charging

texts:
What is the power factor associated with (typical) DC fast chargers and onboard chargers in electrical vehicles? Also, how much is the harmonic content (especially triple-N harmonics) associated with these chargers? I actually want to understand the neutral sizing for a (purely) EV load and hence it would be helpful if somebody could also shed some light on any other related topic which I should consider for my study.

Image Source:http://inpel.ulsan.ac.kr/battery-charger-technologies-for-electric-vehicle/


texts:
I am wondering on how one could build a male RJ45 connector with PCB Mount. I searched and, as I expected, I did not found any existant connector like this. However, I found this interresting item :

The "core" of the RJ45 plug seems to be a PCB piece, and it looks inserted into an empty RJ45 connector.

Do somebody know how something like this could be designed ?

Have you ever heard about an existing male RJ45 connector with PCB Mount ?

Regarding the background of the problem, I design circuitry on Flexible PCB and I would like to  avoid using regular RJ45 cable to minimize the size of the design.


texts: Unity gain op-amp buffer, single supply - potential problems?

texts:
I need to precision buffer a DC (or slow changing) voltage of around 2.5V using an opamp in non-inverting unity gain mode and driven from a single supply using no resistors. Supply voltage is 5V. Is it enough just to wire it as described? Opamp chosen is OPA2188.

Potential problems I can see are PSU noise being introduced, which may mean special power supply decoupling. Any others?


texts: I've been trying, and failing, to find a USB RF tranceiver that I can program or that has an API I can use. Does anyone know if such a thing exists, or suggest how I could about creating one?


texts:
simulate this circuit – Schematic created using CircuitLab

LM317 requires 10mA load to maintain regulation. the simplest option is to add a resistor, with a 10 ohm resistor as a load I get 16mA at the output. I know heat is going to be a problem and it's not going to work.

The other option is to use TL431:

The problem is what happens if the input V+ get near 0V? is it going to stop drawing current because there's no voltage to operate?

I want to have an steady 10mA load for LM317 as datasheet suggested, but because it's a voltage regulator and the output of LM317 can go to 0V I don't know how to do it, need guidance please.


texts: Calculation of Vce from Ic-Vge Characteristic

texts:
We have found the Ic-Vge (collector current vs gate-emitter voltage) characteristic of an IGBT device as shown below at a high Vce (collector-emitter voltage) value (here 20V) from the datasheet (related to the IGBT device with the part number IFS75B12N3E4_B31).
However, I want to study on normal conditions where Vce is less than 4V.
Can we extend the Ic-Vge characteristic from such a high Vce voltage to a low one?


texts: Small Slope On Square Wave Generator Output

texts:
I have made a square wave generator using 555, however there is a small slope on the high level of the square wave as you can see below. How can i overcome and obtain a straight high level of signal? My aim was getting 16 kHz frequency and %50 duty cycle and measurement is so close to this values. My only problem is that small slope. Thank you so much.

This is my circuit;

This is my measurement:


texts: How to identify duplicate vs original FETs

texts:
I am really confused about this topic. Wheather it's ok to use duplicate MOSFETs or not.
Say for example my application requires to handle upto 20 amperes of motor current.

Is it ok to use 100A or even more ampere of duplicate or Chinese MOSFETs.
Or it's good to use only original MOSFET even with lower current specification.

Which one is better, and how can we identify whether a MOSFET is original or duplicate. Because duplicate MOSFETs will also work same like the original one, right?


texts: PIC10F200 OPTION Register constants not present in header files

texts:
I'm brand new to any microcontroller programming and am playing around with the PIC10F200. I'm using MPLAB X 5.45 with XC8 2.32 pic-as compiler and I saw that most of the registers have constants declared in the .inc file associated with this chip (STATUS, TMR0, OSCCAL, GPIO, etc). Is there any reason that the OPTION register doesn't have constants (like T0CS) declared in either the .inc file or the .h file for the PIC10F200?
Link to PIC10F200 datasheet. Table 5-2 shows the OPTION register bits.


texts: Fixed thermal Trip vs fixed magnetic trip current ratings

texts: I am looking into a series of 2 pole circuit breakers (Sprecher + schuh 's series KTU7 UL489 molded case circuit breakers) and they seems to have 2 ratings, a thermal trip rating and a magnetic trip rating. What is the difference between these two ratings? Is the magnetic trip rating the same as the instantaneous trip rating?


texts: What is the difference between a rupture and the neutral conductor not existing from the start in star three phased system?

texts:
I have a pretty basic question.

In three phased systems, I know that if the loads are equal, the neutal conductor has no role and can be removed, my question concerns unequal loads.

My question is, In case of the rupture of the neutral conductor, When calculating the new voltage in each load, we apply the formula \$ V_i=Vs_i-U_n \$ where \$U_n \$ has its own formula with \$ z_n\rightarrow +\infty \$, However, If the neutral conductor didn't exist from the start, I would consider each load in series with another load of the system and apply the voltage divider to calculate the actual voltages with the difference of two phases as my main voltage (Am I right ?).

My question is, What is the difference between it rupturing and it not existing from the start? I understand that, before the rupture, \$ U_n \$  existed while it didn't at all in the second situation, but in case of a rupture, why don't I consider them in series just like I did with the second situation, I know both situations are dangerous since they give wrong voltages and can be dangerous however, They don't give the same voltage values so they obviously aren't the same(?).

The problem may lie in my severe weakness in basic electrical concepts.


texts: How can a Live-Neutral transformer fault cause 2000 Ampere to flow?

texts:
In this critique of an ELV PSU design, it is suggested that a "Live-Neutral" fault could result in a fault current of thousands of amps.

It says:

  Fire – (d) the plastic had a UL94-HB rating ( which limited its use to a decorative enclosure); (e) the fuse rating would not protect the transformer from fire; (f) a glass fuse will have a typical maximum “breaking” current of only about 30 Amps. This means that a Live Neutral fault could create a fault current in excess of 2,000 Amps – causing the fuse to explode and create a plasma that would sustain the fault current – perhaps for several seconds.

I'm sceptical. Please could someone explain how this could be? I can't imagine any circumstance where such a 100 mA, 240 - 15 V transformer could produce such a current. And if there is a live-neutral fault, would the fuse not blow, as they say, at about 30 Amps (at the most)? I thought the mains wiring and associated resistances*, capacitances and inductances would limit a current surge such that the 1 A fuse would clear before exceeding 30 Amps. Isn't that, after all, what fuses are for? To repeat my question, how is the figure of 2000 Amps arrived at? Thanks

Edit: Such as the resistance of the fuse. 0.25 Ohms for an average 1A 250v fuse


texts: What is a reasonable isolation voltage for an optocoupler/digital isolator?

texts: I need to isolate an input from my processor. What is a reasonable isolation voltage to look for optocoupler/digital isolator? I've pretty much decided to go with an RF isolator at this point because they use much less power and are easier to implement that traditional optocouplers. Also - from what I've read, I need a DC/DC converter with isolation to make sure there is an isolated power/ground for the isolated side of the isolator. Does this sound right?


texts:
I am designing fast digital lines for the first time.
I want to change the PCIe connector of the CM4 IO board to mini PCIe.
I reviewed the AN307: Hardware Design Considerations for PCI ExpressTM and SGMII.
Pages 35 - 44 give the design and layout considerations.

What does the "via sites" in "Stitching vias (to GND) at all diff pair via sites" mean?
"Vertical and horizontal routing increases dielectric loss" - by "vertical and horizontal" do they mean "traces that go upwards/downwards and left/right?
There is no reference to PCB stackup. Doesn't it matter?
Are there other considerations I should take into account? (I'd appreciate a recommended app-note).


texts:
I am trying to determine a circuit that will produce an output (W, X, Y, Z) given an input (A, B) based on the following truth table:

What would be the simplest way to accomplish this? I was thinking about starting with a 2-4 decoder and add some digital gates, but would like to avoid too many parts. The point of this was to use 2 I/O pins instead of 4, but perhaps it is not worth it.

Thanks.


texts:
I am using this 10 W RGB LED, unfortunately DX does not provide a datasheet for it. I don't know how efficient these power LEDs are... so approximately how much applied power is converted into light and how much is dissipated as heat? Almost all 10W is dissipated or only small portion of it?

As there is no datasheet, I even cannot compute the required heat sink, so it seems I need basically to try :) Unfortunately I don't have any heat sinks at home, only one from old VGA card (which is 74 x 94 mm with 12mm high fins, but half of the surface has place for a fan, so no fins there). Do you think this is an overkill for my LED? I have no idea for how big heat sinks should I look. The LED itself is on a metal plate which is 14 x 22 mm, so the heat transfer from LED to heat sink should not be a problem.


texts: PIC16F887 I2C Master-Slave communication problem

texts:
I am trying to get 2 PIC16F887's communicate through I2C. I am aware that PIC16F887's are old but they are the only chips I have access to right now. I connected the SCL and SDA lines correctly and used 4.7k resistors as pull-up resistors. I am having trouble however getting the slave to receive the data correctly. The slave acknowladges the 7-bit address but gets stuck at the while(!BF); line. I am using PicKIT3 as the programmer and MPLAB X IDE v5.40 as my IDE. The compiler is XC8 v2.20. I am powering the chips from the PicKIT3 at 4.625V. Here is my code:
Master:
#pragma config FOSC = INTRC_NOCLKOUT
#pragma config WDTE = OFF
#pragma config PWRTE = OFF
#pragma config MCLRE = ON
#pragma config CP = OFF
#pragma config CPD = OFF
#pragma config BOREN = OFF
#pragma config IESO = OFF
#pragma config FCMEN = OFF
#pragma config LVP = OFF
#pragma config BOR4V = BOR21V
#pragma config WRT = OFF

#include <xc.h>

#define _XTAL_FREQ 4000000

void i2cWait() {
    while (R_nW || (SSPCON2 & 0x1F));
    return;
}

void main(void) {
    OSCCONbits.IRCF = 0b110;
    TRISC3 = 1; //RC3 (SCL) and RC4 (SDA) as inputs
    TRISC4 = 1;

    SSPCON = 0x28; //I2C Master mode, SDA and SCL pins enabled
    SSPCON2 = 0; //Default settings
    SSPADD = 99; //Calculated using Fosc/(4*speed) - 1 where speed is 10000
    SSPSTAT = 0; //Default settings

    while (1) {
            i2cWait();
            SEN = 1; //start condition
            i2cWait();
            SSPBUF = 0x4E; //7-bit address of slave device plus 0 for write
            i2cWait();
            SSPBUF = 0x55; // Some random data.
            i2cWait();
            PEN = 1; //stop condition
            __delay_ms(1000);
    }
}

Slave:
#pragma config FOSC = INTRC_NOCLKOUT
#pragma config WDTE = OFF
#pragma config PWRTE = OFF
#pragma config MCLRE = ON
#pragma config CP = OFF
#pragma config CPD = OFF
#pragma config BOREN = OFF
#pragma config IESO = OFF
#pragma config FCMEN = OFF
#pragma config LVP = OFF
#pragma config BOR4V = BOR21V
#pragma config WRT = OFF

#include <xc.h>

#define _XTAL_FREQ 4000000

short z;

void main(void) {
    OSCCONbits.IRCF = 0b110;
    TRISC3 = 1; //RC3 (SCL) and RC4 (SDA) as inputs
    TRISC4 = 1;
    SSPCON = 0x36; //I2C 7-bit Slave mode, clock released, SDA and SCL pins enabled
    SSPCON2 = 0x01; //Enable clock stretching for both slave transmit and slave receive
    SSPADD = 0x4E; //Slave address
    SSPSTAT = 0x80; //Slew rate control disabled since 10000 is used

    GIE = 1; //Enable all unmasked interrupts
    PEIE = 1; //Enable all peripheral interrupts
    SSPIF = 0; //Clear SSP interrupt flag
    SSPIE = 1; //Enable SSP interrupt
    TRISB = 0;

    while (1) {
    }
}

void interrupt i2c_slave_read() {
    if (SSPIF == 1) {
        SSPCONbits.CKP = 0;

        if ((SSPCONbits.SSPOV) || (SSPCONbits.WCOL)) //If overflow or collision
        {
            z = SSPBUF;
            SSPCONbits.SSPOV = 0;
            SSPCONbits.WCOL = 0;
            SSPCONbits.CKP = 1;
        }

        if (!SSPSTATbits.D_nA && !SSPSTATbits.R_nW) //If last byte was Address + Write
        {
            z = SSPBUF;
            while (!BF); // The Slave is getting stuck here.
            PORTD = SSPBUF;
            SSPCONbits.CKP = 1;
        } else if (!SSPSTATbits.D_nA && SSPSTATbits.R_nW) //If last byte was Address + Read
        {
            z = SSPBUF;
            BF = 0;
            SSPBUF = PORTB;
            SSPCONbits.CKP = 1;
            while (SSPSTATbits.BF);
        }
        SSPIF = 0;
    }
}
```


texts: Safety advice for best EMF detector and body shielding for UHF RFID reader

texts:
I've got a UHF RFID detector (860 to 960 MHz). I'm just getting into configuring the power output but I think I've been testing it at about 20dBM, I might want up to 30dBM. I'm concerned about my health when having it on beside me for extended periods as I test with it (I'm doing development on an embedded device connected to the reader).

I'd like advice on two things:

What to look for in an EMF detector that will help me gauge the strength of the radiation (I'd test it indoors/outdoors at various distances and angles). Links to products or terms to shop for would be awesome. I can buy from anywhere but I'm in Canada, FYI. If it's simple to build one with an Arduinio for example let me know and I can whip one up myself if there's a big cost advantage.
What to look for in body shielding. The two things that seem reasonably priced and the most practical are these coveralls and this tent. The tent seems like it would be ideal though as I could just put my desk in there and come and go as I need to, keeping the equipment outside.

Thank you!


texts: How to build a simple 12VDC-12VAC transformerless inverter using transistor

texts:
I am looking for a circuit diagram or an explanation on how to build a 12VDC-12VAC inverter circuit without using a transformer or an inductor of any kind.
I want this circuit to be as simple as possible, many thanks.
I will be stepping up the voltage through a multiplier system and hopefully will get some small ion jets.


texts:
Is there any practical way to use a SWD-based debugger such as those made by Segger to debug a program for the STM32LF1xx which uses low-power modes and sets the clock speed very slow?  The debugger seems to choke every time the chip is set to an energy-saving mode.  It's understandable that debugging won't work while the unit is in low-power mode, but unfortunately once the debugger chokes I can't figure any way to make it work again except to completely reset the CPU.  It's possible in some cases to mitigate the problem by using a conditional-compilation flag to disable the code that would put the chip into low-power mode, but this makes it very difficult to troubleshoot the code which puts the unit into and out of low-power modes.

Are there any tricks to allow the debugging tools to work usefully in such situations?


texts: Deducing the CAD program used to make a schematic

texts:
I've received a reference schematic from a company whose chips I'm interested in using. After studying it for a while and copying the schematic into the CAD program  I'm most familiar with, I have some questions about what some of the markings on the schematic indicate: Whatever program they're using does things differently from the ones I've used so far; netlabels and such seem as if they're being used slightly differently than I'm used to. I'm not sure my copy is a faithful copy, because of these differences.

What give-aways can you find in a schematic to figure out which program it was drawn in? Obviously, some programs add their names in the bottom-corner description box, but this one didn't. How can I deduce which program it is, so I can better figure out the mysterious parts of this reference design?


texts: Can I get the S21 parameter from a one-port open, short and load reading?

texts: I am currently working with a custom rectangular waveguide, which has one port abled to connect to a VNA,(call it port a) but the other side cannot, (its part of a bigger system but for now its only important to know that it cannot connect to a VNA & we'll call it port b.) I need to find the S21 parameter at port a, and I have a custom-made match, short, and open for port b. So the question is: Can I convert S11 to S21 if I have one-port S11 open, short, and load readings? Thank you very much.


texts: Source-Follower Large Signal Analysis as Level Shifter

texts:
I have a question about the MOS source-follower / common-drain stage. In particular, it's behaviour as a level shifter:

The book mentions the following:

I'm having some trouble figuring out how the drain current may increase by a factor of 2? The source-follower has a built-in source degeneration, right? I recall from the common-source stage with source degeneration that one advantage of it was that it 'softens' or 'linearises' the drain current varaition with Vin:

So surely, if Vin changes from 0.7V to 1V, Id should change by some factor times Vin since we essentially have negative feedback?
How come the benefit of the CS stage with source-degeneration (being robust against input DC level changes) does not appear here, even though we have a source resistor? The statement after the highlighted one is also not clear to me. It is like they are almost ignoring the fact that higher Vin -> higher Id > will bring the Vs(=Vout) up and so Vgs should be stable!
I fully understand the small-signal analysis of this circuit but I find that most other textbooks don't talk about the large-signal analysis of these circuits, Razavi is one of the only ones I found.
I would be very grateful if someone could explain the large-signal behaviour of the source-follower. I'm just getting very lost now.


texts: How capacitors connected in series are affecting the total capacitance of the network, since there is no actual flow of electricity due to dielectric?

texts:
Can someone explain how is it possible to calculate the value of caps connected in series?

I am not asking about the maths, I just try to understand how can such a network be created since there is the gap(open) of the circuit, because of the dielectric(insulator).

I can understand how the capacitance works in one capacitor because of the AC, in case of DC I know that the cap will charge and then if we short-circuit the legs of the capacitor, it will discharge.

But what about when we have 2 or more capacitors in series? In my understanding it will be used only the one plate of the first cap(the plate closer to -) and the other plate of the other cap(closer to the +) of the power supply.
How the in-between caps will affect the total capacitance since they are not even "connected" to anything due to the dielectrics of each one? I mean they are insulated if there is no current between them.

Any insights much appreciated! Please make it more visual, use some kind of analogy if possible :)


texts: Clamping Diodes - Any disadvantages form continuously clamp down?

texts:
I am looking at using Clamping diodes to protect my Raspberry Pi UART pins from over voltage. The ESD Diodes I am looking at using

My question is, is there any harm in them continuously clamping down the voltage?

Looking at the datasheet I could also tell if they had a life span before they stop clamping down


texts: Suggest some methods for measuring AC current

texts: I need to find a method of doing so without consuming much space in PCB like in the case of current transformers. The circuit must be able to measure upto 15A of AC current(RMS).


texts: Is there a standard stating how fast a fast fuse is, how slow a slow fuse is?

texts:
According to answers to this question there seem to be a standardized notation on fuses. For example F8AL250V means that it's a 8A fast fuse.

On the other hand there is answers this question stating the importance of checking the datasheet for specifications on when the fuse should blow.

Pulling these answers together appears to be contradicting. While F8AL250V says 8A fast fuse you seem to have to consult the datasheet to find out what that means (which makes the notation doesn't mean anything in particular). This would also be unfortunate since it would require an end user to consult datasheets (he's not likely to understand) instead of just insisting him to use the F8AL250V fuse.

Is there a standard of requirements on fast and slow fuses regarding time-current characteristics? What does the standard say about the time before the fuse blows for various over-currents?

My specific situation is that I'm considering a power supply (Velleman FPS1320M), the load may briefely draw more than 8A. The question is if a fast 8A fuse will be adequate. For example what amount of time can I expect the fuse to withstand 16A at a minimum (I don't have the number, but I think it's just needed to last for a minute or so) and how fast can I expect it to blow (according to the PS manual it has to blow within two hours). How fast can I expect it to blow at 20 or 22A (needs to blow within 30 respectively 1 minute).


texts: I'm using a 12 MHz ATtiny10 and I would like to generate a square wave on PB0 at 40 kHz. I think that I need CTC. What should be the values of TCCR0A, TCCR0B, OCR0A and OCR0B?


texts: Power Supply Design - Multiple Voltage Regulators

texts:
I'm trying design a benchtop DC power supply for powering small projects, breadboards, arduino, etc. This is a list of what I want from it:

Fixed voltage rails for 24V, 12V, 9V, 5V & 3.3V
Edit: Current requirements: 1A will be alright, 2A I'll be happy with and anywhere close to the full 3A on offer from from the laptop power brick I'm using (see below) will be great.
Variable voltage rail from ~0V to ~24V
Pulse width modulation on the variable rail
Voltmeter panel on the variable rail
Power on indicator LED
USB ports for charging USB devices
(Other stuff that's not related to this question such as selectable
methods for dealing with transient voltage spikes from using PWM to
power inductive loads, adjustable PWM frequency ranges, etc)

I will use a 240V AC to 24V DC laptop power brick capable of outputting 3A.

To produce the desired voltages, I intend to use a linear voltage regulator for each rail, each taking 24v input from the power brick. An overview of my intended setup is shown below.

The PWM circuit I'll be using will be powered from the 12V rail. The USB ports will come off the 5V rail. The power on indicator LED (not shown) will most likely come off the 3.3V rail.

Here are my questions:

I'm assuming the voltage regulators should be in parallel, each
taking the full 24V input, even though there will be a large
difference between input and output for a few of them (eg 24V to
3.3V). I thought about putting them in series so that the 12V output of the first regulator would feed the 9V regulator which would feed
the 5V regulator and so on, but the circuitry of each regulator
block in my diagram above would divide away some current, leaving me
with very little of the 3A max input for the lower voltage rails. Is
this correct? I'm also assuming that the larger reductions in
voltage necessary for the parallel arrangement as shown will produce
more heat than in series, but each regulator will have a nice fat
heatsink and the whole thing will be enclosed in something with at
least a fan or two and plenty of holes for ventilation.
The variable voltage rail will be controlled with a potentiometer
into a variable voltage regulator (LM350). Should I use different
fixed voltage regulators for my fixed voltage rails, or use an LM350
for each, and set their outputs with either fixed resistors or trim
pots?
As the laptop power brick I'm using outputs 24v already, shall I
wire that directly to an output terminal for my 24V rail, or should
I also put a voltage regulator in there? Ideally, there'd be no
point regulating 24v to 24v, but I'm not sure how reliable the
voltage is from a laptop power brick. I'm not even sure you can get
out of a regulator exactly what you put in - there must be some
voltage dropped along the way. If necessary, is there another way I
could ensure a constant 24v output?
I saw a tutorial somewhere a while ago where someone hooked up a
voltmeter to a psu, but the instructions mentioned using a 9v
battery and a relay to power the voltmeter rather than drawing power
directly from the internals of the PSU. Should I do this? There was
no reason given in the tutorial I read. As mentioned above, I was
going to draw power from the 12V rail.
Is there anything missing that could be considered essential to the
design of a power supply? Any kind of safety features? The LM350
appears to be rated for 3A and has inbuilt overcurrent protection.
I'll also be adding fuses to each rail. Will this be adequate in the
event of a short circuit within any external load (eg poorly wired
breadboard, etc)


texts: Transistor as a switch from point A to point B

texts:
[
Hello, I'm curious how I could replace the momentary switch with a transistor in this scenario. Would I connect the left side of of the button to the collector and pins 2 and 6 to the emitter, then use a control voltage on the base of said transistor to send the pulse? Haven't seen this configuration before so I'm assumng it wouldn't be possible to bias the transistor?
If not from a transistor, how could I replace the momentary switch in this circuit with something that could be triggering by a control voltage?


texts: Poor man's capacitance meter with range control

texts:
I'm interested in making a capacitance meter with on-hand parts. Rather than connecting a bare microcontroller I'm inclined on using my Arduino Mega, since it has a built-in power supply and USB transceiver.

I want to measure capacitance values in the 10pF-1μF range. It doesn't need to be terribly accurate or fast (but certainly sub-second). I'm not going to make an integrated display; it can simply write values to the terminal.

Option 1 is to use a simple comparator and measure the time it takes for the input to cross half of a full charge from a first-order RC, i.e. t = 0.693 τ. This is also described in https://electronics.stackexchange.com/a/64910/10008 . Since the Arduino Mega is a 16MHz device, using micros() will yield about 4μs resolution. For a worst-case 10pF capacitor, this means the discharge resistor should be at least 4μs/ln2/10pF = 577kΩ . Using 10MΩ would be able to detect sub-pF caps (in theory only) or allow a 10pF cap to charge in 69.3μs, for which the mega would measure 17 time increments. The problem is that for the other end, a 1μF cap would take 6.93s to charge. Thus, either the charging time is too high, or the resolution is too poor.

Option 2 is to use a variant of the above, but with a basic range switch. An HPF instead of LPF is used due to the convenience of having the discharge resistors controllable by N-channel MOSFETS instead of having to wire up transmission gates. A diode is needed to prevent the output from going temporarily negative when the input goes to zero.

simulate this circuit – Schematic created using CircuitLab

Option 3 is doing away with the comparator, and running the output of the RC circuit directly to an ADC input of the mega. This would require the selection of an appropriate resistor (probably again with the range circuit) to ensure that the cap charges slowly enough such that it does not greatly affect the stability of the ADC. The ADC apparently takes north of 100μs on these devices, so some substantive multiple of that would be considered a minimum time constant. It would run repetitive conversions, and either wait until the voltage crosses the halfway point or do some iterative approximation based on a lookup table for exponential values.

Yet another option is, rather than connecting the RC circuit as a first-order filter, connect it as a linear integrator using an opamp. However, I think the range switch would be more complex in this case, because the input resistor does not run to ground.

Questions:

Are there any faults in my reasoning?
Could I get away with the ADC method?
Are there any other simple methods I'm forgetting?


texts: I want to create a project which involves reading of values of pixels on e ink display. I know there are e ink with touchscreen inputs but I was wondering whether it is possible to use only an e ink display and strong magnet ( in a pen like structure) to alter the black and white at a particular pixel and then read whether the pixel holds a black or white value. Is this even possible? I tried to search on the internet but didn't find much.


texts: Controlling the frequency of AC used to energize an electromagnet

texts:
I am trying to build an electromagnetic pendulum which essentially has a pendulum arm with a permanent magnet at its end which is 'kicked' by an electromagnet placed at the mean position to drive the pendulum without letting it damp. Now I was wondering how I can change the frequency of the AC to correspondingly change the magnetic field strength and obtain different amplitudes doing so. I came across VFDs and this build http://blog.hardcore.lt/mic/archives/011040.html.

I am fairly new to electronics. I am more of a hobbyist. This seems way too complicated, at least for me and i can't help but feel whether I am overthinking this. I already have my reasons for not using a 555 timer and just DC pulses to energize the electromagnet so that won't do. In case VFD is the best way to do this, can I please implore any one of you to dumb this build down for me or give me a simpler way of doing it which I am guessing is possible since I am not really using this for an AC motor?


texts: 35W 6V, what wall wart max current needed

texts: If I have a load of 35W at 6V. (5.8A). How would I calculate the input-side current from a 230v UK mains supply?


texts: 3.3V/5V Linear Regulator Voltage to Ground Jumper

texts:
I received this 3.3V or 5V power supply.  It's neat because it fits on my breadboard and can provide two separate voltages (chosen using jumpers) on it's two outputs.  I originally thought that this was a Step-Down Converter, however, it's been pointed out to be a Linear Regulator.

Here, I have the left-hand side providing 5V, while the right-hand side provides 3.3V.  I've used my multimeter to verify it working from a 9V battery.

I am curious what the jumpers in the middle of the board will do.  There are two 5V->GND, and two 3.3V->GND.  I've made attempts to find information about this specific device, but I haven't found any identifying information, nor have I found any information about it online.

I'm afraid to use this for longer than looking at the voltage on either side because I am unsure the purpose of these jumpers, or if/when they should be bridged for safe/normal operation.

Any help identifying and understanding the purpose of these jumpers in the middle of this device would be greatly appreciated.


texts: How to be sure a SSR has not been damaged when its circuit breaker has tripped?

texts:
I've got a Crydom CKRD2420 SSR wired in series with a ABB S201-C6 circuit breaker, supplying power to a 1kW 240VAC heater. This is one of several identical lines, which are all supplied via a ABB S201-C16 circuit breaker.

The system worked great for a couple of months, but recently there was a short, and after hours of inactivity, as 0.1% of power was starting to flow, both the C6 and the C16 circuit breakers cut the power with a flash within a few seconds. This happened 2 or 3 times as I was trying to debug the system, and then the short became an open circuit (melted the heater).

The solid state relay works fine now that the load is fixed, but how can I be sure that it hasn't been weakened? I have read that the I²t of the relay must be higher than that of the breaker, but ABB's curves don't go any lower than 4000A unless I can't read the charts properly.