texts: Function of the Third Pin Inside Laptop Barrel Connector

texts:
So I've been doing research on barrel pin connectors, and have been trying to apply this knowledge to understand laptop barrel connectors, specifically. My confusion relates to the function of the third pin that is recessed within the "tip" of the connector.

To give some context, I am using my laptop power connector as an example. It runs 2.1A of current at 19.5V. According to the markings on the adapter, the sleeve is positive, while the tip of the connector is negative. But there is an extra pin that is recessed within the tip. What is the function of this pin?

So far, what I have gathered is that there may be a few possibilities:

First, I have seen some diagrams which seem to suggest that some barrel connectors can use this third pin as a mechanism in a switch. So, would that mean that current only flows to the positive sleeve rather than being rerouted back to the ground when contact is made with that third pin? Could this be a sort of safety feature?

I have also seen some explanation in another post (What to do with third contact in DC barrel plug with only two input contacts) involving a DC barrel plug that mentioned the possibility that this third pin may involve some "swtich" behavior not on the end of the barrel connector itself, but instead on the end of the component which it has been "plugged into". As in, is it possible that contact with the third connector inside of the jack causes a switch behavior that rerouts current within the laptop to indicate that it is "plugged in."

Thank you for your help. Unfortunately, I have not been able to put together a clear understanding from what I have been able to find.


texts: I know how to export a STEP file in Altium, but is there a way to export the whole PCB, just as it is displayed in Altium's screen? I mean with the traces, vias, components, etc.


texts: Battery low voltage cut-off circuit driven by microcontroller

texts:
My board has a Li-ion battery with the capacity of 2200mAh and maximum voltage of 4.25V and minimum voltage of 3V . This means that the battery voltage shouldn't get lower than 3V. Microcontroller is powered through a low dropout 3.3v regulator.

The micro should be apprised of the lowness of the battery when the battery voltage is approaching 3V (0.2 volts higher than the minimum voltage for example) and then shut down itself to avoid battery discharge.

There is a charging circuit which is powered by 5V. When power is connected it  powers on the micro as well.

How to disconnect the microntroller from the battery and keep it disconnected until 5v power is back? Controller has voltage measurement built-in and can send a signal just before to go off.


texts:
I am building a CNC engraver/Router. I have a Chinese 12-48 VDC, 400 W PM spindle. The spindle speed is from 3000 RPM at 12 V input to 12000 RPM at 48 V. I want to drive the spindle with a MC-60 treadmill controller. The MC-60 has a max output of 95-100 VDC. I want to limit the output to 48 VDC, and thus the RPM to 12000. How can I do this? By adding a resistor to the output of the speed control potentiometer?

I am familiar with the MC-60, and have 2 currently in service running machines in my shop. One is a tabletop Mill, and one is a sand muller.
Many years ago, I was an avionics technician, but I've forgotten most of what I knew then...


texts:
Electronics noob here. I need to find a replacement part for a MAX407.

I am assembling this circuit and the shop I'm buying from doesn't have the MAX407 op amp in stock. Since I don't understand all that much about electronics I am looking for a part that I can use in it's place with as few adjustments as possible.

The circuit & the MAX407 specs.

Can anyone help me understand the key requirements I need to understand for a replacement part?

Thanks


texts: What does a power factor of a generator means?

texts:
When I was reading the nameplate of a small 5KVA generator, I found that the power factor is mentioned. It was 0.8 .

Is this the minimum power factor that the generator can handle? or Is it the power factor that the generator should work at?
I mean If I connected a load of 0.95 power factor. Is it better than a load of 0.8 power factor?
If I would like to design a capacitor that corrects power factor. Should I correct the power factor of the load to be 0.8 or 1 ?
Does the generator have an internal capacitor to correct power factor?
so that   when I connect a load of 0.8 power factor, The generator will see a power factor of 1.

Thank you very much,


texts: The two AVRs I'm using right now (ATmega1284P and ATtiny4313) are both powered by 4.96V. I'm measuring a voltage on their /RESET pins of 6.33 volts. Is that normal? Where is it coming from?


texts: Measuring the voltage between (positive/negative) terminals of PV system and ground

texts:
I tried to measure the voltage between positive/negative terminals of a PV system and ground while the inverter of the system is switched off, I found that the voltage decreases with time (the PV cells were discharging).

I know that this is because the PV cells are acting like capacitors.
So we need to disconnect the connection between any terminal and ground to recharge the cells.

Will the electrons run out if I keep connecting and disconnecting the terminals with the ground? This maybe happen because we have a limited number of electrons(phosphorous) in N-part and a limited number of holes(Boron) in P-part!

And what about the charging process for N and P parts, do we have any difference in speed of that process?


texts: Single AA cell depletion on series battery

texts:
I have a small embedded system that read some sensors every 10 minutes and uploads the data to a server every hour using a 3G module. I'm using 4 Energizer Lithium L91 AA cells in series to power the entire system.

The 3G module is connected to a buck converter that reduces the voltage from the 4 AA cells to 4V. The module runs 60 seconds every 1 hour and draws around 500mA during that time.

The sensors and the MCU that controls everything only use the lower 2 cells and run every 10 minutes for about 3 seconds and they draw around 50mA. The rest of the time the system is put to sleep to preserve battery.

I'm facing a problem with the batteries where one of them gets really discharged when all the others are almost new. I will explain this a little more. This is my setup:

             +----------+          +------------+         +-------------+        +-------------+
   +---------+     1    +----------+      2     +----+----+      3      +--------+      4      +--------+
             +----------+          +------------+    |    +-------------+        +-------------+
3G Module                                            |                                                 GND
                                                     |
                                                     +
                                               MCU and Sensors

I put 4 brand new Energizer Lithium cells the first time and everything works as expected. After around 7 days the system stops working because cell 1 is almost dead (around 0.8V or lower) but the other cells have around 1.4-1.5V. I proceed to replace the dead cell with a new one. The next day, cell 2 is dead, the same history, I replace it and the system starts working again. After around 5 days cell number 4 dies, it has 0V and when loaded it goes to around -2V which is explained here.

I didn't try to buy more cells to try again (they are not very common where I leave so I'm still waiting for the shipping to get some more).

The only explanation I can find is that I just got bad cells? I expect they don't discharge exactly the same because of manufacturing tolerances but this difference is huge!. This question is similar. We are in winter now so the worst case temperature at night is 0 degrees Celcius, humidity is around 60-80% and I don't have any component that may be heating one battery more than the others, everything is pretty low power. Also, the L91 batteries should be able to supply the current I demand with no problems at all.

Energizer is a reputable brand so this makes me wonder about the quality of the cells. Each cell says 12-2036 which I guess is the expiry date so they are far from being depleted due to self-discharge too.

I also thought about putting the 4 batteries in parallel and use a boost converter to get the desired current but in this case, if one cell dies it's even worse because the other cells will start charging the bad cell!

Am I missing something? Is this something common? This is planned to be a commercial product at some point but if I can't even get reliable batteries that's a big problem!

EDIT:

I just got another device that is basically the same but without the 3G connection, it just saves the sensors data in memory to be retrieved later. This one uses 2 Energizer Lithium L91 cells in series directly connected to the MCU and the sensors and the same happened, one of the cells is completely dead while the other is still fine. In this case, the power consumption is around 50mA every 10 minutes for about 3 seconds so I'm really starting to think I got a bad batch of batteries because even Alkaline batteries should be able to work with this currents.


texts: Importance of keeping the electricity network frequency stable

texts:
The frequency in the electricity network is kept in balance by primary and secondary control among others (see e. g. here). I read that frequencies below 47.5 Hertz are dangerous and can lead to destruction of generators due to resonance oscillations.

So concerning this, I'd like to know:

If frequencies below 47.5 Hertz can be dangerous for generators, does that mean generators can pass these frequencies (when starting) but they are not a secure operating point?
What else reasons are there why it is so important to keep the electricity network frequency stable? Is it all about the rotation frequency of electrical drives somehow?


texts: Peculiar behaviour of code displaying button presses using MSP430

texts:
I have created a simple program in MSP430 using Energia for counting the button presses from 0 up to 9 and displaying them in a Seven Segment Display.

The code including the definitions of the pins, the state of the pins (set as Input or Output) and the trivial displaying routine is omitted as it would be far too long. If there is any need for it tell me and I will edit my question.

The essential code is:

void loop()

{

 ButtonState=digitalRead(Button);

    if (ButtonState!=LastButtonState)
    {
        if (ButtonState==HIGH)
        {
            ButtonCounter++;
        }

    }

    LastButtonState=ButtonState;

   if(ButtonCounter==0)
   {

       Zero();
   }
   else if(ButtonCounter==1)
   {
       ...
   }

I couldn't make the display start from 0 at the beginning when I hadn't pressed the button but it was always beginning displaying 1 until I changed:

if (ButtonState==HIGH)

to

if (ButtonState==LOW)

And it is working perfectly! But it seems to me very weird.

Why is this happening? When I am not pressing the button isn't its state LOW? As it is beginning from 1 it means that its state when not pressed is HIGH. Shouldn't the correct be:

if (ButtonState==HIGH)

so to chech if the button is pressed and then increment the counter? With LOW as the comparison then it is checking when the button is not pressed, so why it works perfectly?

The schematic for the button can be found here.


texts: AVR studio 6.2 flash atxmega32e5 signature issue

texts:
I am trying to flash my AVR ATXMega32E5 with Atmel-ICE thanks to SPI.

The problem is that from AVR Studio Device Programming it can read the Target Voltage but not the Device Signature.

What it could be the reason? What is the SPI clock needed?
I tried with 100 kHz, 150 KHz, 1 MHz and 2 MHz but it is still not working.

Thank you in advance for your time and help!


texts:
I am using THN 15-1215N for generating 24V from 12V input. Since this module has a second output(Negative) can I connect this to the ground to obtain only a single output?

Edit:-
I am using the module for designing a board, for future purposes i have included few 0R resistor for trimming the output.


texts: Is it safe to use DC power that you got from main lines for basic circuits?

texts:
Context: I have a project I want to do (just a basic circuit, like breadboard and LEDs and switches), and I don't want it to run on battery because it's going to be a decoration that runs a lot of the time.
So I read online you can use a USB hub to convert from AC to DC, and then use a simple microUSB cable that you cut and took the black and red wires to get the power, and the particular USB hub I have puts out 5v 2A maximum, and my LEDs run on 3v (but that'll be solved with resistors and whatnot).

So my question is, how safe is it to actually use power gotten from the 120v main lines to use in circuitry? Is there any risk at all?


texts: High-speed clock line crossing under data lines

texts:
I'm interfacing an SDI video de-serializer with an HDMI transmitter. The de-serializer splits the video signal into 20 parallel lines and one clock line.

Because the digital video data is high speed (in the 100's of MHz), I'm working on matching the lengths of each of the 21 traces (20 data + 1 clock). Unfortunately, the clock pins are located on opposite sides of both chips, so I have no choice but to cross the clock trace under all of the data lines or route the clock around all of the data traces. In the image below, the blue clock trace is crossing beneath the 20 red data traces.

I'm new to high-speed layout considerations, but I know that routing the clock signal next to any of the data traces is a bad idea due to cross-talk. However, this will be a 4-layer board, so there will be a ground plane between the top layer and bottom layer. With the presence of the ground plane between the clock and data lines, is it acceptable to route the clock crossing underneath the data traces as shown in the image? Or is it best to route the clock around everything else?

Note: The traces have not be length-matched yet in this image.


texts:
I have a board with a sensitive analog amplifier. This amplifier is optical in nature and it has a gain of 6M times.

On the same board there is a Wifi module. Somehow when Wifi is transmitting I see noise on my analog circuit.

I am sure it is not common mode noise. The only sensible explanation is RF energy getting into my circuit and being amplified.

How do I approach this problem? Shielding is the only option I can think of which I don't like to pursue. What other options I may have?

UPDATE
After several tests, I conclude the issue is RF signal to be shifting DC on the amplifier.

I use the following topology in my circuit:

What are the precautions I should take apart from the shielding to minimize the RFI problems? Adding RFI capacitors on inputs, modifying ground etc. I welcome expert advice.


texts: If current leads the voltage in a load, it means the load is mostly capacitive and reactive power is negative. What I don't understand is that reactive power depends on sin(phase of voltage-phase of current) so if current is leading it means I have smaller value for phase of current and sin has a positive value. So how come we alway talk about negative reactive power for current leading loads?


texts: How to use the data CRC of SD cards in SPI mode?

texts:
I am interfacing an SD card through SPI using an AVR microcontroller (more specifically it is the Uzebox console).

I can successfully initialize the card with turning CRC check ON with CMD59 (so I have a proven working CRC7 algorithm), and can read sectors from it (dumping the data read by CMD17 gives correct results: I see what is on the card proper).

What I can't seem to get working is a CRC check for the data sectors using the CRC bytes received from the card.

I currently have three SDSC cards which I verified to behave in the following manner with my algorithm:

Two of the cards give the same value for both CRC bytes, neither corresponding the result of CRC-CCITT with either 0x0000 or 0xFFFF start value (tested with multiple sectors, the values change according to the data of the sector, but the two bytes are always the same).
The third card seems to have no CRC at all, providing 0x0000 on these bytes.

The SPI transmission code for those final bytes seem correct, I did some steps to verify that I indeed read what I want to including that I really do two SPI transactions for the two bytes.

Anyone have any idea what could be happening there? Or should I just forget about those CRC bytes? (maybe the cards just not implement them or do it incorrectly in SPI mode)


texts:
I am doing my mini project on atmel AT89C51 . But I face problems in power supply. Since to test my project,I created a power supply of 5V for the microcontroller, motor driver ic L293D, and two dc geared motor. The circuit is:

230V > transformer (230/8v) > 8vac > bridge rectifier circuit > 1000microfard capacitor 25v( parallel). > voltage regulator L7805 > 220 microfarad,63v(parallel)

And the out is taken across this capacitor. I dont know whether I could use a 63v cap for 5v needs. I do because it was only available.

When this supply is given to microcontroller Vcc , it is not responding. And when I checked this power supply using multimeter, I noted that this 5vdc power supply also contains 10vac!
I also checked this with a 9v dc battery, same here too.
WHY A DC SOURCE OR A BATTERY CONTAINS AC CONTENT???
Is this causing microcontroller problems?


texts:
I started designing the development board for STM32F427VIT6 of LQFP100 package. Its has multiple USART and UART pins.

The USART names in the datasheets are USART1, USART2, USART3, UART4, UART5, USART6 UART7 and UART8.

In pin out table pin PA0 and PA1 are UART4_TX and UART4_RX respectively. PC10 and PC11 are also UART4_TX and UART4_RX. Same case with USART and SPI pins. Different pins having the repeated names.

Please explain the reason and how to use these pins.


texts: Sinusoidal PWM running BLDC motor in open loop

texts:
I have started to wokr on the stabilization of a single axes gimbal using an Arduino and a BLDC sensorless motor.

I've read many example about this topic, but I have a question about the usage of the sinusoidal PWM applied to the inverter bridge which drives the BLDC motor.

For instance, consider the generation of the sinusoidal PWM as follows

sineSize = 1024;
sineScale = 32767;

int sinTable[1024];

for (int i = 0; i < sineSize ; i++)
{
    float x = i * (2*pi)/1024;
    sinTable[i] =  round(sin(x) * 32767);
}

I am using a simple (and dummy) P controller which gets the shaft orientation (roll angle) of the motor from an IMU as follows

setpoint = 0; // degrees

float error = setpoint + rollAngle;

Pout = Kp * error;

And I am calculating the values which should be applied to the PWM inputs of my inverter bridge (L6234 from ST) in order to stabilize the motor to the setpoint when the axis moves

// 180  : Maximum value which the IMU returns (+/- 180 angles)
// 1024 : Dimension of the sin(.) array
// 255  : Maximum value accepted from Arduino analogWrite(.,.)

int offset= round(Pout / 180 * 1024);

int pwm[3];

// Forcing offset into array range
offset = offset % 1024;

if (offset < 0)
    offset = 1024 + offset;

uint16_t pwr= 5 * power;

index = offset % 1024;

// Evaluating PWM value based on the sin(.) look up table values
pwm[0] = (sinTable[index]*pwr + (32767/2))/32767 + (255/2);

index = (offset + (1024/3)) % 1024;

// Evaluating PWM value based on the sin(.) look up table values
pwm[1] = (sinTable[index]*pwr + (32767/2))/32767 + (255/2);

index = (offset + ((2 * 1024) / 3)) % 1024;

// Evaluating PWM value based on the sin(.) look up table values
pwm[2] = (sinTable[index]*pwr + (32767/2))/32767 + (255/2);

The all the PWM are applied to the IN pins of my inverter bridge, in order to spin it.

There is a point I really don't understand, when pwr is high the BLDC motor takes currents like 0.8 A at 12 V. The BLDC motor used can be found here (http ://www.dys.hk/ProductShow.asp?ID=109), but there isn't a detailed datasheet.

(sinTable[index]*pwr + (32767/2))/32767 + (255/2)

What does sinTable[index] * pwr mean, in terms of power?
Could you explain the relation between the controller output and the index used in the sin(.) array? (I mean what is the logical relation between the Pout and the index used for choosing the discrete value of the PWM in the sinTable vector).

The code is base on a project which can be found on GitHub, namely EvvGC

Engine.c - pitchController(.) function
PWM.c - SetPWMFastTable(.) function


texts: How can we calculate transfer funtion of multistage bjt oscillator circuit

texts:
I have been working on a circuit consists of 2 stage CE and class B amplifier network oscillator circuit. For transfer function shall each stage be calculated separately if how? Additionally how can it be done in simulation?(transfer function, oscillator parameters etc.)

Thanks.


texts: Power source choice for sensitive applications. USB cleanup vs wall wart step down

texts:
When designing a board with a rather sensitive IC that runs on 5V and a goal of minimizing external components.

Does it make more sense to power everything from USB with thorough filtering, or rather accept the need for an "extra" part and use a higher Voltage wall wart and get an already quite clean source from a voltage regulator?


texts:
I am currently using 150R series resistors to limit the current to each segment in a 7 segment display. I picked 150R because all the online "led resistor calculators" suggest this value. The power supply is 5v/2.5A.

The datasheet for these displays (Kingbright SC52-11EWA) says the LED's have a forward voltage of 2.0 (2.5 max).

For testing, I've currently just got one segment wired up with a resistor. For some reason, after a few minutes the resistor gets quite warm/hot. The displays themselves do not heat up.

When I use a 330R resistor, it is still slightly warm but a tiny bit cooler than 150R. However, the display is then noticeably dimmer, especially when viewed during the day.

I've never had problems with resistors heating up when lighting LED's.

What am I doing wrong?
What value resistors should I be using?

I've attached a picture of the breadboard, if that's relevant (The display is much brighter than this, the flash just makes it look dim).


texts: How does flash filesystem wear leveling work?

texts:
I am trying to write a little filesystem on flash devices. There are some problems on understanding how the wear-leveling mechanism works. Here is an example of how wear-leveling do:

There is a file, named file.txt, and it's content is in some discontinuous blocks (block A, block B and block C). There must be some pointers in every block to point to where the next block is.

So when file.txt was changed, such as the content in block B is changed, we need to erase the block B, and write its new content to block B. But if we want to wear-level the blocks, then we maybe choose a new block D to save the new content of block B, but if we do so, the pointer in block A has to be updated to point to the new block D. So,

Every time block B is wear-leveled, we need to update block A too, am I right?
How to avoid updating block A every time block B's content is changed? Or maybe there are some mechanisms that do not need to update block A?
Can any one tell me more details about wear-leveling?


texts: Signal conditioner for a piezoresistive pressure sensor

texts:
I have an instrumentation amplifier which output voltage equation is given.The piezoresistive pressure sensor in Figure E3.12 consists of a bridge of four silicon strain gages of 4000 ohm and 1 mV maximal offset when supplied at 12 V. If the op amps are supplied at 0 V and 5 V, I need a pressure range from 0 psi to 100 psi to yield an output voltage from 0.5 V to
4 V. My question is, why should I add the factor Vb/12 when calculating for 4V?


texts: Resistive Circuit - Finding equivalent resistance and fixing special cases

texts:
I am trying to solve an exercise for SWI Prolog. An example circuit/resistive network, build with row- and parallel-resistances is given in the form of verb/3 verb(Node1, Resistance, Node2).
Network Illustration:
  --------100--------
 |                  |
 +A                C+--50--+D
 |                  |
  --200--B--300------

verb(a,200,b).
verb(a,100,c).
verb(b,300,c).
verb(c,50,d).

A predicate r_netz/3 shall be coded which returns the total/equivalent resistance of the Row-Parallel-Circuit.
e.g.
?- r_netz(a,b,R). R=133,333
The full code so far, with comments, can be seen here:
https://www.codepile.net/pile/AXBl4j3G (Thanks alot so far to ridgeworks from the SWI-Prolog board!!)
While the code works well for any network or combination of nodes, it struggles with a rather simple case. Directly connected nodes.
As mentioned, r_netz(a,b,R). should return R = 133,33, but instead returns R = 200.
Only A->B is considered (verb(a,200,b)., while there is another path:
A->C->B, which needs to be calculated as row resistance, and then again in parallel with
A->B
Row R1+R2 = R3
Parallel R1*R2/R1+R2
100+300 = 400,
400*200/400+200 = 133,33
I am running out of ideas how to fix this, without breaking the rest of the code.
Any suggestions would be welcome.
The code to copy: http://vpaste.net/P6sI6
Another example network that sadly shows another problem: http://vpaste.net/Dk1bY
    ?- r_netz(b,e,R).
    false.

I'm missing something.


texts: How to create USB toggle switch controled by GPIO

texts:
I have Raspberry Pi setup as NAS. The storage is external HDD powered through USB. I would like to encase this whole thing in some nice box and still be able to easily use the HDD, without disassembling the whole thing.

My idea is following:

The USB A would be connected to the external HDD and USB B would be just USB extension cord accessible from the outside. The box with question marks would be toggle switch controllable through GPIO header.

My idea how to wire the whole thing in the easiest way is sketched in following diagram (the switches represent USBs):

simulate this circuit – Schematic created using CircuitLab

I'm not sure if it's ok, just to switch the power rail between the two outlets.

So far I have following ideas how to implement that:

design transistor flip-flop toggle switch
use analog switch, something like CMOS-4066
use dedicated circuit like MAX1562 (this one is switch only, though)

Is my idea sensible? Do you know any ready made solution? Do you know how to solve this?


texts: What exactly is electric potential (what's wrong with my picture of it)?

texts:
In my book, the potential at a point is defined as the work done on a charge to take it from infinity to the point against the field whereas the gravitational potential of a ball is the work done on it to take it to a height against the gravitational field

But the problem with this is that according to this, the potential of an electron will only depend on its distance from positive terminal(clarification at the end). So if an electron passes through resistance its potential drop should not increase because it's like saying that if a ball while falling encounters a wall and breaks through it then the drop in its potential energy will be higher compared to the same distance (thickness of wall) traveled through air, which is wrong

But this is also wrong.  So what exactly is electric potential?
(clarification) I said that potential of an electron will only depend on its distance from positive terminal as, potential is the amount of potential energy stored in an electron because of force from holes(at positive terminal) comparing it to earth and ball will help so let's do it, here the holes are like earth that attract the ball(electron), and the potential energy is stored when we lift the ball to a height against gravitational attraction(recharging battery by taking electrons to negative terminal) now we can use the potential energy by letting the ball go and convert the potential energy into kinetic energy and we can use the kinetic energy to do some work (eg.letting the ball hit a box and make it move) we can also use potential energy stored in electrons to do work by letting the electrons flow ans using kinetic energy of moving electrons to do work but they are too small and move too slowly (few cm/second) to be useful that way, so we cleverly use relativity to make them do work how relativity makes magnets work (there is a problem in the video I will correct it below)
but the point is that electrons and holes only know how much far they are from each other (like ball's potential energy is only dependent on its distance from earth not on what is resistance of medium through which it is traveling) so how can potential energy of electrons depend on anything else like resistance of wire or something
Correction in video- probable question in mind after watching video will be that why when the positive charge (cat) is stationary, the moving negative charges don't contract and attract the positive charge(cat).
Answer to that question-When the cat is stationary, in its frame
the only things moving are the electrons
(and not the space between them). So the electrons get squished but the distance between its centers is the same, and the charge density remains the same.
However when the cat is moving everything moves except the electrons, in the cat frame. So the protons and the space between them contracts, effectively changing the charge density and creating an electric force in the cat frame, or a magnetic force in the stationary frame.


texts: 1 bit adder-subtractor circuit truth table

texts: today in class my teacher mentioned the truth table for an adder-subtractor circuit was the same as that of a full adder... I have been trying to understand and wrap my head around this fact but I simply can't. Would someone please explain it to me ??


texts: KiCad ERC (electrical rules checker) error. Why?

texts:
I recently got into PCB design with KiCad and am a beginner. I am trying to make a portable phone charger, but for some reason keep getting this error:

I'm assuming it is caused by the fact that I'm improperly using the two USB ports in order to charge/use as a portable device, but I'm not entirely sure. Any help would be greatly appreciated. Here is the schematic for reference:

Here are also the datasheets for the protection IC and charger:
Charger: http://ww1.microchip.com/downloads/en/DeviceDoc/20001984g.pdf
Protection IC: https://www.diodes.com/assets/Datasheets/AP9101C.pdf


texts: Identifying the logic gate needed for this problem

texts:
Problem:

4  Q20.   Sensors are used to monitor the pressure, volume, and temperature of a chemical solution stored in a vat.
The circuitry for each sensor produces a HIGH voltage when a specified maximum value is exceeded. An alarm requiring a LOW voltage input must be activated when either the pressure, temperature or volume is too high.
The vat sensor consists of a single logic gate whose inputs are connected to the pressure, temperature and volume sensors (one sensor per input), and whose output is connected to the alarm.
What type of logic gate is needed to implement the vat monitor?

The solution to this problem states that the required gate is a NAND gate. I found it to be a NOR gate.
My reasoning was that since any 1 (input) was cause for the alarm to activate (needed a LOW), a NOR gate was required. Clarification is needed.


texts: Op amp driving a LED oscillates, how to stabilize?

texts:
I have a simple LED driver circuit like this:

simulate this circuit – Schematic created using CircuitLab

The op-amp is OPA354
250-MHz,
Rail-to-Rail
I/O, CMOS
Operational
Amplifier supplied from a single +5V rail.  The LED is a 100mA, 1.4V forward voltage type.  The input is a 0.5V pulse from a signal generator.

What I see is that everything works more or less as expected, the LED current during a pulse is around 50mA, except that at the beginning of each pulse there is a distinct oscillation with a period of ~10ns (around 5-10 cycles are visible).  Somewhat more disturbingly, there is a bit of random noise on top of each pulse, maybe 50mV peak to peak, that comes and goes.

The LED has a decently large capacitance of some tens of pF.  I've read a lot about stabilizing op amps driving capacitive loads, but these would have the capacitive load where R1 is, not inside the feedback loop.

How do I stabilize the op-amp and prevent this kind of noise/oscillations?


texts: How to make an IR proximity sensor work in daylight?

texts:
I am trying to make a touchless water tap using an IR proximity detector.

I used a simple circuit:

It works well inside room but it doesn't work in daylight. It remains active in sunlight and if I reduce its sensitivity, its range also reduces too much.

I can use many IR transmitters to overcome this problem but this makes my circuit big and less power efficient.

I need a circuit in which the IR receiver can distinguish between the infrared coming from the transmitter or from the sun so, it won't get triggered by daylight?


texts: An idea for well-aligned component placement during PCB assembly

texts:
(Note: This question is in particular for low-volume self/manual assembly, i.e., without automatic pick and place machine).

Generally, stencils are used for well-aligned application of solder paste to a PCB.

Suppose you were to follow that stage with a second, similar stencil but this one for part placement, where the cutouts on this custom-made "part-stencil" are made to match the dimensions of your components.

Then one could place this part-stencil over the PCB, then use your vacuum-pickup or tweezers to quickly drop the components into these cutouts/slots/windows on the part-stencil thus making aligned placement easier and faster. Then you could lift the part-stencil, and move the PCB to reflow.

Could one make such a part-stencil approach work, or does it have any critical issues? Is it or some similar variant used?

For example, I see some issues such as the components being nudged when this part-stencil is removed, but if you play with the tolerances on the cutout slots, and set up this part-stencil slightly offset above the PCB, it might work (?)

(Above idea is inspired by a comment made by Scott under this blog post)


texts: Electrolytic Cap in parallel with ceramic for Decoupling

texts:
I wanted to ask if adding a high value electrolytic cap in addition to the ceramic decoupling capacitor in a circuit would make the filtering of high frequency worse. Because electrolytic caps are bad at high frequencies.
I wanted to ask in case i need to power this circuit from a linear supply (like a Transformer with rectifier) the high value electrolytic cap would be needed for filtering the lower frequencies.


texts: Absolute max voltage of Differential Signal

texts:
I am using IDT 85104 Buffer IC for clock distribution in my design. I need to give the clock output of this Buffer to a device @ 156.25 MHz. I have 2 doubts :-

1. In the parameter table of 85104, it is given that Absolute max output voltage is 1150 mV (with a Note - measurement taken from single ended waveform). What is the meaning of Absolute max output voltage of a diff signal and the Note??

2. I am providing this clock to an IC which says Max input voltage is 1V. What is the problem I am going to get here!!.

The clock output of 85104 is HCSL 0.7V.

Please tell me if I should provide additional information.

Datasheet of Input Device can be downloaded from here :-

http://www.idt.com/products/interface-connectivity/pci-express-solutions/pci-express-serial-rapidio-bridges/tsi721-rapidio-bridge


texts: Power Supply for 555 Timer LED Fade In/Out

texts:
I am a complete electronics newbro. I am looking at building a small circuit for a couple of home made modelling projects.

I am following http://www.instructables.com/id/ThrobbingFading-LED-with-555-Timer/step6/Lets-Solder/ which by my estimation has a great step by step to build a hardware driven fade in/out LED circuit.

My only question is what sort of power supply can I run this from? I am looking for as small as possible (but still readily available), I know I can run an LED off a traditional watch battery, would that also work here?

Sorry about the caveman terminology, again I am very new to this.


texts: How does a CD or DVD burner produce submicron lines separated by submicron distances?

texts:
What mechanism(s) are used to achieve repeatable submicron spacing between concentric tracks in a DVD, CD, or other optical writer? I want to understand the minimal set of hardware used to achieve this so that I can make a submicron plotter.  Theoretical knowledge is appreciated but any specific knowledge of particular components used in a particular design would be really helpful.  I think the answer to this question may be "it's hard, and it's proprietary", since this sort of hardware has been around so long, by now there should be so many open source projects.

Here is an SEM image from Ben Krasnow.  It is really amazing but how do they do it?

(1) Keeping track of rotations

Focusing and pulsing the laser to produce micron to submicron length features along a circumfrence needs very accurate control of the disk speed and laser pulse time (along with cheaply focusing the laser to a submicron spot).  I assume the speed control is a achieved using a rotary encoder and very stable PID control.  Sitting out at a 2" diameter, with a CD spinning at 1600 rev/min (26.6 rev/sec), you have a circumference of 2*pi*25.4*1000 microns.  That's moving a distance of ~4245171 microns per second,  4245 microns per millisecond, 4.2 microns per microsecond.  That means we need a pulse of ~0.24 microseconds for a 1 micron dash.
(a)  what kind of optics are used to produce the 1 micron spot size?
(b)  is a rotary encoder used to control the motor speed?
(c)  is it hard to produce microsecond laser pulses?

(2) Keeping track of radial distance

Incremental optical linear encoders with submicron accuracy are available from companies like Renishaw, but these are very expensive and to my knowledge are not found in CD/DVD burners.  (a) In theory a sufficiently geared stepper motor could produce submicron steps, but what is the limit, and can they really produce submicron motion?  (b) How is distance measured, and is it really measured?  (c) How are mis-steps of what I assume is a stepper motor kept track of?  To safely plot 1 micron separated lines, I assume that a step size of 100 nanometers or less is needed.  How do they achieve that?

(3) Control electronics?  Tricks?

My guess is that to produce such controlled motion and writing using such cheap and flimsy components there are algorithms and tricks used to correct for errors in motion. For example, for measuring the micrometer radial distances between tracks, a photo sensor might be used to measure the distance from a previously written laser-spot-size delimited feature of known width.  Maybe the scattered light falls off really fast in an inverse cube root, so you know quickly from the photosensor reading when to stop and draw a new line radially.


texts:
Got an issue with my lights and a dimmer. I got a room with 4 lights in it (6W LED panel lights) and a 60-600W dimmer. Somewhy, the lights from time to time flicker and the dimmer is buzzing all the time, which is quite annoying. Googling suggested that this is usually caused by overloading the dimmer, but with 4 x 6W lights, I'm not that sure that is the issue.

Saved some images to Imgur as well, maybe someone from you can help me with this issue. Bought the apartment which had these in (should've been brand new as well).

https://imgur.com/a/Fo3Do

Best regards


texts: The question is simple. I only ever seem to find a soldering-related hot air gun on a machine dubbed a “rework station” and the only reference I can find to using hot air to solder SMD components is on a few YouTube videos. Is a hot air gun on a soldering station really only designed for desoldering and some people tend to, I guess, “misuse” it for freshly soldering parts?


texts: Replacing 1.6 uF capacitor with a 2.0 uF one of the same style

texts:
I have a ceiling fan which uses a 1.6 uF capacitor. Now that the fan is not spinning, can I replace the capacitor with a 2.0 uF (same 450 vac) one which I have in hand?

I have several ceiling fans that no long work (either slow or not running at all). They look identical. I opened one and found a 2.0 uF capacitor in it. So, I bought several. I opened another fan and found it used a 1.6 uF capacitor. There are four other ceiling fans in the room that don't run at full speed. It is my guess that they all use 1.6 uF capacitor. Since I have more than 10 2.0 uF capacitors in hand, I wonder if I can use them to replace the failing capacitors.

The capacitor on the left is the one I intent to use to replace the one on the right, which is actually larger and heavier than the 2.0 uF one.


texts: Faster settling time for near DC pole low pass filter

texts:
I need to clean up the noise from a voltage reference and I wanted to use a simple RC low pass filter. In order to lower the pole position I have to use a big resistor and/or a big capacitor. As the voltage reference should not have much intrinsic noise, what are the drawbacks of speeding up the capacitor charging (and thus the settling time) using a switch to bypass the resistor? The main problem I see is that the voltage reference should not be loaded with too much current, so a buffering stage could be needed in the bypass branch.
As the time constant of the circuit will still be high, the circuit will act like a sample-and-hold for the last value of the noisy reference before opening the bypass switch, slowly converging to the low noise DC value, right?
A big capacitor will also reduce the thermal noise of the resistor, right?


texts: 3-phase system with 3 loads instead of 2?

texts:
Hello,

Most examples on the internet and in my text books contain 1 load with 1 source. I have yet to come across an example with 3 loads. Is there a way of combining the loads?


texts:
simulate this circuit – Schematic created using CircuitLab

This is the schematic of the circuit but tried to find the gain of this circuit, assuming 50 % of the Duty Cycle for the LO, and M2 working on the saturation region. But i don´t know how to proceed exactly after that. My attempt was define VRF = Vgs(1+gm2Ron1)


texts: Current problems with DC motor interacting with a H-Bridge IC

texts:
How do DC motors work in stall
I have been told (from my engineering project seminars at uni) that if your motor has a stall current of 5.6A, you should use a 5.8A fuse to cut it off after it begins to stall (but not cut out EVERY time, as it might just get bumped or some other temporary interruption occurs, so we don't blow a fuse every time).
Does the motor begin to stall and goes beyond the stall current after a brief period of time, blowing the fuse to cut it off (this doesn't seem right to me so I'm asking)?

The other thing I'm curious about it controlling the max current my motor can draw.
So I have an H-Bridge IC with a maximum rated current (to power the motor) of 5A. The motor has a stall current of 5.6A so can I use a series resistor to reduce the maximum current to 4.8A with a 5A fuse (using similar reasoning as in the previous paragraph)?


texts: Why these tutorials don't care about wires when using 10A with 5V to light up strip LEDS?

texts:
One popular project I want to do with my Arduino is to light up 150 LED Strip of 5 meters (WS2812B).

Here is my project:

So, I have a power supply of 5V 10A (ALITOVE 5V 10A AC to DC Power Supply). 10A because 150 LEDS of 60mA need 9A. But, 9A is a lot and I'm a bit scare to connect everything.

I pretty sure that my jumper wires will not like 9A. Here are my questions:

So why tutorials and guides (see links below) don't care about wires when using 10A with 5V to ligths up strip LEDS?
What kind of cables should I use to connect both the Arduino and the LEDS?
15 AWG seems big for that, no? I'm not even sure that 15 AWG will fit in the Arduino 5V pin.
Also, I think it may be a good practice to put a capacitor somewhere to protect the Arduino. But where?

Here are the tutorials, guides and people talking about a similar project:

How To Control WS2812B Individually Addressable LEDs using Arduino
External 5V 10A power supply to Arduino to power Neopixel
Controlling a WS2812 LED strand with NeoPixel or FastLED
Arduino RGB LED Strip using the APA102


texts: Why is there a LC filter in front of the DC/DC converter?

texts: I have to study this circuit. I understand that Graetz's bridge is there to convert the current to positive, but why is there a LC filter at the entrance of the converter?


texts: Is there a way to write a generic GPIO code for MSP430?

texts:
I'm currently working on an MSP430 board and I'm trying to create libraries for it so I can easily use them on my project. I'm starting with basic Digital I/O functions.

Say for example I need to set P1.0 ON. In that case, normally what I do is:

P1SEL &= (~BIT0);           // Set P1.0 SEL for GPIO
P1DIR |= BIT0;              // Set P1.0 as Output
P1OUT |= BIT0;              // Set P1.0 HIGH

But I need to write a function that will just take Port Num, Pin and Value and set the above registers. Something like this:

void setVal(int x, int y) {
    PxSEL &= (~BITy);
    PxDIR |= BITy;
    PxOUT |= BITy;
}

Where x is Port and Y is Pin. Is there a way I can implement such a function? OR has this been done before? If yes, please share the link for the same. I was thinking out maybe using a lookup table and selecting the Register via indexing. But I'm not sure if that's a good approach. Any help would be appreciated.

Thanks


texts: How are differential inputs setup in a differential amplifier?

texts:
I was struggling to understand what common mode voltage and CMRR is. I think eventually I understand what it is about. Before posing my new question I will briefly write about my drawing. On the left side in setup 1 varying v1 and v2 with respect to ground are applied as inputs of a differential amplifier. And at time "t" v1=5V and v2=1V. It means the amplifier will reject (5+1) / 2 = 3V common-mode voltage (at time t) and take the signals as +2V and -2V inputs (vd = 4V difference).

In setup 2 (kind of equivalent to setup 1) at time "t" v1'= +2V and v2'=-2V are applied as inputs of a differential amplifier. Similarly in this case vd = 4V potential difference between the inputs. But because in this case the common-mode voltage vcm=0 it looks like this measurement is more accurate because even it is non-ideal amplifier (having a common mode gain) it will not affect output voltage because vcm=0.

If I have a sensor like a strain gauge which setup is realistic in real life? In data acquisition systems when they use differential inputs instead of single inputs does that correspond to setup 2? Will v1 and v2 always at any time t be as such v1=-v2? I'm a bit confused relating to the real scenario.


texts: Controlling Servo motor with ATmega328p microcontroller

texts:
For a while, I've been working with Arduino, but about a month ago, I switched over to using solely the ATmega328-PU microcontroller. I use the Atmel Studio IDE. So far, I have successfully blinked an LED, used programs involving buttons/switches, and used the Fast PWM function to dim an LED. Currently, I am attempting to drive a servo motor using Fast PWM, but have had little success. I have not found any source codes that work for the specific needs of my microcontroller, and I don't really have the ability to change around all the parameters, as I am still learning.

The below is the code which I have developed. It does not work, but I was hoping that someone may be able to fix it up. The servo moves in one direction, but does not stop, and just ends up grinding the motor shaft gear, indicating this could be an issue with the wave length. An additional question: is there an equation to convert degree to PWM wavelength? Thanks!

Microcontroller specifics:

Model - ATmega328-PU
16,000,000 hz crystal
28 pins
Using 8 bit timer

Servo:

Servo model: Tower Pro SG90
Servo Frequency 50 hz (is this standard?)

Code:

#define F_CPU 16000000UL
#include <avr/io.h>
#include <util/delay.h>

int main(void)
{

    DDRD |= (1 << DDD6);
    // PD6 is now an output - corresponds to OCR0A

    TCCR0A |= (1 << COM0A1);
    // set non-inverting mode

    TCCR0A |= (1 << WGM01) | (1 << WGM00);
    // set fast PWM Mode

    ICR1 = 39999;

    OCR0A = ICR1 - 2000;
    // gives servo motor position

    TCCR0B |= (1 << CS01);
    // set prescaler to 8 and starts PWM

    while(1)
    {
    }
}


texts: Maintaining DC voltage with more batteries

texts:
I have a circuit which i am powering with two 1.5V AA batteries that dies at 2.6V volt as the battery discharges. Reading around, i realized that even though there is energy in the batteries, my circuit is unable to draw it.

Is there a circuit that can come between say four 1.5V AA cells totaling 6V and my core circuit that can somehow 'maintain' a near-3V supply?

How does one solve these problems in industry? Pardon my ignorance, i come from much higher in the stack. :)


texts: Reverse polarity protection for symmetrical input

texts:
I have a symmetrical voltage input I need to protect agains reverse polarity, and over-voltage.

Here is the reverse polarity protection I designed. Is it correct ? I can't find much information about symmetrical voltages circuitry…

For the over-voltage protection, I'm thinking about that: (with two 16V zener)

What do you think about that ? Did I miss something ?


texts: This is a general, hypothetical question concerning power dissipation and zener diodes. It's hypothetical in the sense that I don't have the question in front of me and I don't have any further information other than what follows. Say I have a DC source with a sinusoidal ripple, connected to a zener diode with a resistor; there's no load. What would be the average power dissipated in this circuit?


texts:
This is part of a problem of my past examination in Electric Machines. I don't know how to solve it yet.

A salient pole synchronous generator \$ (X_q < X_d) \$ has a connected load at rated voltage. If the synchronous generator, operating with a voltage regulation zero, and a voltage drop in the resistance of armor 0.05pu (when the magnitude of the armature current is minimal), determine:
a) Power factor load.
b) The load angle \$ \delta \$ of the synchronous generator.

I appreciate your help.


texts: Stepper motor stalls at low frequencies. Why?

texts:
I picked up a Howard Industries 1-19-4200 (5 wire) stepper and have been driving it on my testbench with a PIC18F2550 and L293D. I recently added a potentiometer to an analog pin of the PIC for speed control but have been running into serious problems trying to rotate at speeds above 120 rpm. The PIC and L293 will gladly generate signals into the kHz range and on the scope the waveforms are clean with no sagging or distortion on the supply phases to the motor. I'm also well underneath my regulator current limits. Above about 120 rpm though, the motor rumbles and just halts. It makes that characteristic synth sound at high frequencies, just no movement. I'm driving it with half stepping and I'm planning on going to microstepping once I fix this.

What am I doing wrong that the motor is stalling at such low speeds?

Edit: Also worth mentioning that my current consumption for the whole circuit drops from 400mA at low speeds to 300mA when stalled.


texts: Half-duplex Bit-Banged Port for 8051 microcontrollers too slow?

texts:
I was looking at: https://www.maximintegrated.com/en/app-notes/index.mvp/id/3524 and it claims that one can achieve over 2mbps on a 32Mhz clock when bit-banging with an 8051. That means 1mbps on 16Mhz. I'm using a clock greater than 16Mhz and feel I can only achieve a max of 19.2kbps.

I looked at their source code and it doesn't really help. I did borrow code snippets for I2C protocol for the 8051 but thats an overkill.

Because the two 8051s I'm dealing with run at the same clock speed and have the same capacitors connected to the crystal, theres a good chance I'd get this code to work. A safer approach I used in the past was to add extra check code (example: jnb clocktriggered,$ and jb clocktriggered,$) to make sure the byte was read, but that uses an additional 2 clock cycles per bit.

I apologize for the extra long code, but I deliberately repeated code instead of using loop control in order to save an additional 2 clock cycles.

I also considered using interrupts but each interrupt call wastes at least 4 clock cycles. 2 to jump to a new address and 2 to return from the interrupt address.

The microcontroller I'm trying to optimize this for is for an AT89C4051

So how can the people at Maxim get such a high speed (16000kbps+) and I cant? Is it because they jam features into their 8051 microcontroller that allows them to achieve such speeds?

;RUN=logic high starts data transfer
;DIN=Data input
;DOUT=Data output
;Worst case total cc (clock cycles): 39
;Crystal used: 22.1184Mhz
;Max UART speed = 22118400 / (39cc * 2 * 12) = 23.6K. Convert to standard = 19.2K

main:
jnb RI,nrcv      ;2cc
    mov R7,SBUF  ;1cc
nrcv:            ;3cc total receive from serial

jnb RUN,main     ;2cc
  jb RUN,$       ;2cc
  jnb IO,nosxmit ;2cc

nosrcv:          ;uC to serial
  CLR A ;had to add nops to align with receiver
  nop
  nop
  mov C,DIN
  RRC A
  nop
  mov C,DIN
  RRC A
  nop
  mov C,DIN
  RRC A
  nop
  mov C,DIN
  RRC A
  nop
  mov C,DIN
  RRC A
  nop
  mov C,DIN
  RRC A
  nop
  mov C,DIN
  RRC A
  nop
  mov C,DIN
  RRC A
  jnb TI,$ ;Trying to make it where program doesn't stall forever waiting for transmission
  CLR TI
  mov SBUF,A
ajmp main           ;36cc total transmit

nosxmit:              ;Serial to uC
  mov DOUT,C
  mov A,R7
  RRC A
  mov DOUT,C
  RRC A
  mov DOUT,C
  RRC A
  mov DOUT,C
  RRC A
  mov DOUT,C
  RRC A
  mov DOUT,C
  RRC A
  mov DOUT,C
  RRC A
  mov DOUT,C
  RRC A
  mov DOUT,C
ajmp main ;33cc total receive

update

This is my setup:

As you can see, for the main master (AT89S52) there is one UART which is used by the computer. I have 4 GPIO pins I can use with the AT89C4051. The UART on that micro is used by the HM-TRP wireless transceiver module.

I'm trying to make a game which requires each device in turn to connect with the server since the HM-TRP is half-duplex.

And why bother with older hardware? Its lower priced and I already learned how to use it and I already made PCB's for it.


texts: Charge a single AA battery in a double charger?

texts:
Most cheap AA battery chargers charge two batteries at a time. Many devices use 1 or 3 AA batteries, meaning it's difficult to make sure you've always got two compatible batteries in the charger.

My fairly limited understanding of chargers is that they trickle feed energy into the batteries until the voltage in the circuit increases to a threshold, indicating that the batteries are charged. So it seems to me that I could short one of the two battery holders, and put the battery in the other one, such that the battery charges twice as fast.

Is this possible? If so, how can I figure out if it will change too fast and damage the battery? If not, is there any reasonably reliable way of charging a handful of single AAs, given only a cheap double AA charger? (I would prefer not to damage the charger, but don't mind modifying it, if necessary). Also, most of these batteries are NiMH, but there are a couple of lithium batteries, and there might be a NiCad or two as well.


texts: Need faster analog mux. Use switches and summation amp?

texts: I need to alternately sample 64 channels at 20Ms/s. That's 50ns per channel. I used to have a slower version at 2Ms/s and there i used 1 ADC and a series of analog muxes. This time around, at ten times the speed, it seems I run into a limit as to how fast analog muxes tend to be able to switch. I've been searching for fast switching muxes for days now and can't find any. Maybe i'm looking in the wrong places (google, farnell, digi,..???)...please tell me if I am. I had this idea though. Switchers are plenty fast (a couple ns). Would it be possible to have a lot of switchers with only one of the parallel switchers turned on and have them connected to a summation amplifier so only the one signal would be summed and a sort of analog mux is obtained?


texts: STM32 F4 - ADC in Dual Mode Simultaneously

texts:
I am stuying the example from STM32 libraries (ADC_DualModeRegulSimu). I understand how the whole program works but I need some information and I have few questions about this code confronting to my project.

First of all, I need to convert 2 analog values simultaneously because I plan to compute a phase correlation (that's why I need the simultaneously conversion).
In the code, the converted value are put in a word of length 32 bits :
extern __IO uint16_t aADCDualConvertedValue[2];

I want to stock the first and second value (half-word) in two vector that I have defined. I first decided to create a while statement like this :

while(counter < Max && ADC_GetFlagStatus(ADC1, ADC_FLAG_EOC && ADC_GetFlagStatus(ADC2, ADC_FLAG_EOC)) {
    vector1[counter] = aADCDualConvertedValue[0];
    vector2[counter] = aADCDualConvertedValue[1];
    counter++;
}

But, this method seems to be unsafe because, we can't be certain that aADCDualConvertedValue[0] and aADCDualConvertedValue[1] are sampled at the same time owing to the number of cycles taken by while conditions.
So, what's the best way to stock the simultaneously data safely ?

Another problem, the conversion starts like this (after initializing the two ADC) :
    ADC_SoftwareStartConv(ADC1);
    ADC_SoftwareStartConv(ADC2);

Does-it mean that ADC2 starts to convert one cycle after ADC1, thus first both samples are not converted simultaneously ?

Thks.


texts: How to find gate delay for 4-bit look-ahead carry adder?

texts: How can I find Gate Delay for bit 1 of the sum by a 4-bit look-ahead carry adder?


texts: How to protect PC (ports) when connected camera may suffer vandalism?

texts:
Background

I have a USB webcam installed above my door that acts like a video intercom for my countryside house, but I'm worried somebody may try to cut the wires, disable it and damage the computer it's connected to while doing so. My neighbors there have much more expensive systems installed and some of them were recently victims or such vandalism.

The problem

I'd like to improve my current design so that the computer to which the webcam is connected wouldn't be damaged if the USB cable were to be tampered with.

The computer is a small cheap nettop (netbook) PC with 4 USB ports.

The asks

What are the failure modes that could be applied to the exposed camera that could propagate to the attached PC and damage it too?
Are there devices that allow protection of USB ports from short-circuiting?
Should I switch to another type of inexpensive camera instead?


texts:
Continuation from an earlier question: Current Consumption of CANbus (CANH and CANL)

I understand how to specify my power supply for multiple CAN transceivers but I am now wondering about the details for routing CANH and CANL lines on the actual PCB.

It seems to me like most of the supply current is being used by the RX/TX lines and not alot is used to drive the actual CANH/CANL lines - i wasn't able to find anything about the current draw of CANH/CANL in the datasheet of the transceiver I was looking to use. How do I find the current draw of the CANH/CANL lines so that I can calculate the appropriate trace thickness on the PCB ?
I sometimes see CAN referred to as having a characteristic impedance of 120 Ohms but others refer to it as having a differential impedance of 120 Ohms. How do I route CANH/CANL on my PCB? Should it be routed as a edge coupled microstrip with a differential impedance of 120 ohm - if so how is this differential impedance maintained during the twisted pair cabling since there is no reference plane?

I came across this similar question earlier but the answers seem to be that it was a non-issue. Not sure if this is still the case with a bus length of 1.5m and ~50 nodes.


texts: One resistor in series and two in parallel for LEDs

texts:
So I've read that using one resistor to limit current to two or more LED's in parallel is bad practice, so I wondered what about this kind of circuit:

Is this also bad practice?

Each LED has it's own current limiting resistor, but the current is being limited further by a resistor in series. Are there any differences compared to just having each LED connected in parallel directly to the voltage source with a 355Ω Resistor?

Also (just to double check I am doing my calculations right as I am still a student learning this stuff), assuming each LED has a forward voltage of 2V, is each LED drawing about 20mA here (7V across resistors, Rtotal = 355Ω so 7V / 355Ω = 0.0197 Amps)?


texts: The distance of the adjacent signal layer in PCB stackup

texts:
I saw in some PCB stack-up design, sometimes there are two adjacent signal layers, such as:

SIG

GND

SIG

SIG

PWR

SIG

I think there must some crosstalk between them, so how much should be enough of the distance between the two layers to minimize the crosstalk?


texts:
I do a lot of old radio repairs and I have always been told that the way to test a BJT transistor is to check its junctions which should work as diodes. But many times, I noticed that despite the working junctions, the transistor have a very weak or even no gain at all.

This very often happens with power transistors that have suffered from excessive heat. And it sometimes also happens with RF transistors located at the IF, mixer or local oscillator stages in radios. These transistors should never heat since they drive very small currents.

So, what are the exact reasons that make a transistor lose its gain? And what happens exactly at the junctions level?

Many thanks.


texts: How to measure and power an array of unknown RGB LEDs?

texts:
I have 5 of these plastic moldings that each have 2 RGB LEDs inside along with a microcontroller that rotates through the color spectrum for aesthetics. I want to bypass the microcontroller so that I can control the LEDs with my own supply.

I plan to use a 5v source to power them. I plan to wire them like below, except there would be 10 LEDs for each color instead of 2. To simplify my question, let's assume that I just wanted to power all LEDs at full brightness (white).

I've taken some measurements of these LEDs while they're operating (the color was white so they're all at full brightness at the time).

Here's what I measured from their current setup from the microcontroller:

Red: 2.0v drop, 16mA at full brightness. I calculated I would need a 19 ohm resistor (R1) to bring the voltage down to 2.0v.
Green: 2.85v drop, 11mA at full brightness. Calculated 20 ohm resistor (R2) needed.
Blue: 3.0v drop, 10mA at full brightness. Calculated 23 ohm resistor  (R3) needed.

Are these three resistors all I need to account for with this set up? Do the LEDs need to be current-limited, or is that already done with the resistors?


texts:
Why are reed switches made in glass tubes?

Reed switches sense magnetic fields, and glass is not the only material not affected by a magnetic field. They can use plastic for example. Why are most of them in glass?

This question came into my mind when one of them easily cracked and then broke. It could have been in a plastic tube; then it wouldn't have broken.

Also, plastic would be cheaper than glass, and easier to melt and form.


texts:
I have a "pompe a eau" inside a well of 40 meters length, the water pump doesn't stop if there is no more water in the well and that causes damage to it. So I tought of using  water level sensors just above the hole from where the water pump drains the water, so that when there is no more water I can turn off the circuit so that the water pump stops working.

I have a little knowledge of electronics(but good programming skill, I can program arduino or some other microcontroller without any problem).

So I have looked for water level sensors in eBay and I found this.

The problem is that the cable lenght is just 400mm, its too short for doing anything with and is this item capable of taking pressure because the "pompe a eau" is going to be 10-20 meters under the water.

Maybe this is not the right sensor for the job?


texts: Can one wire solar cells to a computer to model data?

texts:
I hope someone out there is able to answer this-

Is it possible to wire a few solar cells to a computer (using a USB) to analyze/model the data that's being acquired (i.e. voltage, amperage, etc.)

If so, how do I do this? I have absolutely no idea how, as I only have enough knowledge to wire the solar cell to a voltage regulator in order to charge a phone. Apologies if this is asking too much.

The end goal is to record/model the data of 3 2.5 watt solar cells among various weather conditions.

Thanks to anyone who can help.


texts: How to introduce parity error checking in a digital circuit?

texts:
I have designed a transmitter and receiver that sends data over a single bit serial line. The data includes an initial low bit, four data bits, a parity bit (depending on whether even or odd parity is used) and a stop bit.

The system runs on clock cycles and produces a DataReady = 1 when all the data bits have been received and is ready to be read.
How can I design functionality that will check whether the received parity matches the designated parity? I would also like the parity status to stay in its state until DataReady is high again.


texts: Can you please explain how BAT54C (D4A,D4B,D4A,D5B,D7,BAT54A) works in this circuit?

texts:
From right to left:

DC power supply of 9 V -0.8 A in fig (J5,J6)
small signal schottkey diode BAT54C (D5A,D5B), D5A only pins 1 and 3 are used, for D5B pin 2 and 3 are used
there is a capacitor c26
Voltage regulator HT7150
diode D4A and D4B (BAT54C)
diode D7 and BAT54A/SOT

Can you please tell me the working how those diode works and its output? I am talking about all diodes in the circuit. Also I am confused with the Voltage regulator - what is its value?


texts: For a BJT determine unity bandwidth gain and emitter base capacitance

texts:
For a BJT operated at Ic=1mA,determine fT and Cπ if Cµ=2pF and \$|h_{fe}|= 10\$ at 50 MHz. This question is from Sedra Smith 6th edition exrecise 3.54.

My problem here is that since neither \$β_o\$ and \$r_π\$  are given. How would I solve for it since
 \$h_{fe}= \frac{β_o}{1+s(Cπ+Cµ)r_π}\$


texts: POE power will not interfering on Data travelling on Ethernet , Whats the logic

texts:
I was design POE+ circuit , so I read lot of articles on

POE(power over Ethernet) IEEE802.af 15.4W on PSE side , For 10/100 base T can use Alternative A method where it use to deliverer power on data pair or can use Alternative B method where it use to deliverer power on data pair. And for 10/100/1000 base T it uses all four data pair to deliver the power.

Also

POE+(power over Ethernet) IEEE802.at 30W on PSE side , For 10/100 can use Alternative A method where it use to deliverer power on data pair or can use Alternative B method where it use to deliverer power on data pair.  And for 10/100/1000 base T it uses all four data pair to deliver the power.

And

UPOE/POE++ IEEE802.bt 60W on PSE side , For 10/100 and for 10/100/1000 base T it uses all four data pair to deliver the power.

I am little bit in need od some solid explanation what make to possible to deliver power on data pair and its not corrupting the data, since POE power voltage is 48V and data voltage is 3.3V. how two different level of voltage sharing the same line.

My understanding is Center tapped transformer play a key role here, and data is in differential mode and power will be in common mode. And power is on 0 Hz and data is on couple in Mhz. different frequency band.

but how , whats the logic, magic behind this.

I am thinking same concept can be used for RS485, CAN , USB or any differential line by using a Transformer. ( understand also need same type of PD at opposite end)


texts: Frequency spacing and the doppler effect

texts:
Suppose that I'm working on a system which needs to use a transceiver with an FM signal. If that system moves very fast (i.e. it is a satellite or whatever) in which the maximum doppler effect can be comparable with frequency spacing, do I need an higher spacing than the doppler? Or it is not related at all? Or the usefulness of simply changing the spacing is related only to achieve a better insulation between other frequencies, and/or obtain an higher SNR, and therefore nothing to do with the doppler?

Thank you, and sorry for the dummy question. :)


texts: I wanna build some DSP effects on, for example STM32F4 processor, with frequency 96 or 192 KHz. Are 16-bit converters (ADC and DAC) enough for that kind of operation? Can I hear a diffrence when choosing 16-bits or 24-bits?


texts: Will This Solenoid Driver Circuit Draw Any Current When Control Input is Disconnected?

texts:
I'm working on a battery powered circuit board to drive a small solenoid motor, simple TIP120 as a voltage controlled switch grounding one of the motor terminals. I'm wondering whether or not I need to include a power switch, or if I can just power off the board by leaving the control input unconnected.
My question is this: will the following circuit draw any current when the control input is unconnected (transistor is off, because voltage is 0 at base)?


texts: How many servos can I run on an ATtiny85?

texts:
This is my first time asking a question on this website, so please correct me if I'm doing something wrong...

I have been working on a small project which runs three Servo motors on an ATtiny85, using C on Code::Blocks on a Mac.

So far, I have accomplished to move two Servos using PWM on PB1 and PB4. PB1 is controlled by TCCR1 which is connected to OCR1A, and PB4 is controlled by GTCCR which connected to OCR1B. After reading the data sheet, I thought I could run one more on PB0, which is controlled by TCCR0A, but I cannot figure out which register to use to connect to servo (e.g. OCR1D).

So, my question is... Can I run three servos on an ATtiny85? If so, what is the register for the third servo?


texts: Noisy amplifier for HB100 doppler module

texts:
I'm working on a doppler radar based on the HB100 module. I want to sample the signal using a microcontroller and display the speed on a LCD. But I want to have the analog front-end working properly first.

I built the amplifier recommended in the Application note on a perfboard. Here's the application note :  https://www.limpkin.fr/public/HB100/HB100_Microwave_Sensor_Application_Note.pdf

Here's the schematic :

The problem is that the circuit outputs a 50 Hz hum while there's nothing moving in front of the module. As soon as there's something moving in front of the sensor, the hum disappears and the circuit behaves as it should. Here's a video that shows the signal on an oscilloscope :

https://youtu.be/c1USsrEioXg

I saw that the signal looks decent after the first amplifier. It has about 30 mVpp noise and a 3,5 Vpp signal when I'm moving my hand close to the module. After the second amplifier, the noise is about 1,8 Vpp  and the signal is about 3,5 Vpp.

What could be the source of the noise ? Is it because of the perfboard construction ?

Should I just remove the second amplifier ? Will this cause a massive loss of the radar's range ?

Any suggestions would be highly appreciated.

Thank you.


texts: Working on a design that requires a specific kind of physical switch

texts: The switch my design needs behaves like the picture below. The user would slide the switch to the right to activate it and the switch would return to the left automatically, I assume by some kind of spring-action. I'm having trouble actually finding a switch like this on Digikey or Mouser and I think I'm using the wrong keywords. Does anyone know the right keywords?


texts: protection circuit Lithium-ion batteries

texts:
I am designing a lithium-ion battery in my project but I am a little confused in regards to certain aspects of the protection circuit of lithium-ion batteries.I know about the different stages of charging a Li-Ion and you have to have a lithium charger IC to do the charging  safely for you. If I understand it correctly you need to protect the battery against overcharge, overdischarge and overcurrent(shortcircuit) situations.

The Li-Ion battery(single cell, 1200mAh) I selected has a protection circuit of its own but the shutdown voltage is somewhere around 2.4V to 2.7V and the overcharge voltage is around 4.2/4.3V. My confusion lies around this 2.4V to 2.7V, I understood you shouldnt let Li-Ion discharge below 3.0V. My battery supplier and another source I found are saying it is better the batteries protection circuit should not be activated and they suggested I should also build an "extra/second" protection circuit on my PCB with a higher voltage like 3.0V so this circuit switches of the load first instead of the protection of the battery.

I cant confirm this in any other sources which seems strange to me for such an important aspect if there were correct. So my question basically is what the right design practice is and how this is often done. I know Seiko is pretty big in over/under voltage protection ICs but I can also imagine circuit with supervisors or op-amps.

An other question I have is in regards to a NTC thermistor for Li_ion batteries.
(white or yellow wire in many batteries or packs)How important is this? When should I include this in my design? Because I sometimes see charger IC's with and without a connection for a thermistor.


texts: Control Loop Stability - Crossover frequency

texts:
I am testing the control loop stability of a DC-DC Converter.

One of the Pass-criteria of the DC-DC Converter states, "Cross over frequency should not be higher than 1/8th of switching frequency"

Which cross-over frequency is this referring to with respect to the DC-DC Converter Switching frequency and could you explain the concept behind the 1/8th factor?

Thanks.


texts: UART frame has 1 start bit, 8 bit payload data, 1 or 2 stop bits. Frame structure and baud rate is agreed by both transmitter and receiver for successful data transmission. Start bit is used to synchronize and tell receiver that frame is started. Why there is a need of stop bit per frame, since all data frame to be transmitted will always be 8 bits (frame will always end with 8 bits)?


texts: Hole Size Constraint Violation on DRC Check for custom mounting holes

texts:
It is about Altium designer. I am fairly new to that platform please bear with me.

I am at the stage finalizing PCB for manufacturing. Of course, I have to deal with couple of DRC errors and warnings. But, one of them is not that clear to me.

I have created a mounting hole library using Pad and drill size in 3.4mm diameter and hole size 5mm with plated option.

DRC is now complaining about the drill size can't be bigger than 2.54mm.
I can understand that, fine.

But, what would be the way to create this hole with plated option then?


texts:
I know that Leds in parallel with one resistor is bad.

I was wondering if this is still considered bad to do since all power is run through 1 resistor then split and run through other resistors before going to the led.
Only reason I ask / want to do this is i have a lot of leds that need power but don't have enough of the right resistors. I am looking to see if this is a safe alternative. Also the power going through R1 in this case will be well within the breakdown limit.
Thanks for any help.
Edit: In the example above D3 is pin 0 of one 7 segment display and D2 is pin 0 of another 7 segment display. The other pins will be the same setup as above.


texts:
I have no clue of the PCB where this component was.

The reference H400 60 and a logo that is unreadable are located in the top of the package.

I didn't found any datasheet or valuable information in google.
There's a metal holder and a small cylinder inside the part.

The small cilinder appears to be  made by two materials.
The inside material is condutive.
The outside material is isolant.
I can't measure any capacitance in the cylinder.
Thanks in advance.


texts: Why does increasing altitude (low air pressure) results in lower resistivity/ breakdown voltage?

texts:
I got this question because the creepage and clearance distances need to be adjusted for altitude. The higher the altitude, the higher the distances should be. It seems to me however that the contrary is true. What I mean is that we can tolerate lower distances because vacuum is a better isolator (if not the best) compared to air.

So, why does the overall medium resistivity/breakdown voltage decreases with altitude increase?


texts: Different materials for cathode and annode in the same DC supply?

texts:
I have just seen a diagram of the 787 Dreamliner's battery system. In it, the negative terminal is copper and the positive is aluminium.

In a DC system I understood that the current at the supply was equal to the current at the 'sink', i.e. the same amount of current must be passing through both terminals. Why, then are they made from different materials? The only reason I can think of is that it means they could make the copper terminal smaller due to it having less resistance, but I'm just guessing.


texts: Alternatives to relay/contactors in DC circuits

texts:
I wanted to switch a 60Vdc line to ON/OFF using a 60Vdc controlling signal for some kind of a feedback system (yes both are 60Vdc). Presently I have two options visible:

Solid State 60Vdc input relay
A dc/dc buck converter that changes my controlling signal to 12Vdc and then I use a normal     12Vdc coil relay or a solid state relay.

I wanted to know if there are any other methods I am not aware of. Also if not, then which of the above is better.

I am using this to remove the auto-restart feature in a battery protection module(PCM) by providing a feedback that isolates the PCM from the battery bank.

The job of the PCM currently is to cut off the load and charger under fault conditions like over voltage, over current, etc. It has an auto-restart feature which switches ON the load and charger after checking else shuts off again. I wanted to remove this auto-restart feature.

To restart the battery pack then, I will have to provide a voltage from external source or circuitry so that the relay connects and then checks if the system is fit to run or not. Thus the checking part would be in my hand and the battery would be isolated from all possible sources and sinks under fault condition.

P.S. I have added a rough sketch to help explain my case.


texts: RTOS and OS working side by side in cooperative work

texts:
I would like to use use a RTOS and OS side by side to implement a cooperative work.

The RTOS would perform time critical (real-time) task and the OS will perform the other non-critical functionalities such as user display, tcp/ip communication etc.

Can you recommend any framework or projects that is able to achieve this need ? It would be great if it is open source.

RTOS and OS would have some kind of communication mechanism. (mail box or shared memory)

If needed, the RTOS could run on a specific core and the OS on another core. (with dual core CPU)

A possible configuration could be:

Zephyr (RTOS) and Linux (OS).

FreeRTOS (RTOS) and Linux (OS).

As of now, I found this information:
http://www.evidence.eu.com/embedded-linux-osekvdx-erika-enterprise-dual-core-automotive-cpu-without-hypervisor.html

Is there anything else available ?


texts: Creating an oscillating circuit to sound an alarm using a speaker

texts:
I have been given the task to make a speaker sound an alarm. As part of a project at school.

I was given this circuit:

NAND gate SN74HCT00N
Resistor R28 100kΩ
Resistor R27 1kΩ
Capacitor C8 100nF
Polarized capacitor C7 10µF
Speaker ABS-209-RC (16C)

I am having difficulty getting a wave form out of this circuit and definitely not getting a frequency between 500Hz and 20kHz, as this speaker requires to make an audible sound.

We are using a 5V DC power supply. And need to obviously generate a wave out of this DC in order to make the alarm sound.

Any ideas?


texts: Is the difference in trace lengths why my RTC isnt working?

texts:
I am using the PCF8523TS RTC with a 32.768 kHz Crystal. I have tested the smaller package which worked fine with the Adafruit module, but I can't seem to get it to work with the TS package. I either get garbage values or my clock doesnt change at all, depending on what I set the STOP register to.

Does it have to do with faulty PCB layout on my part? Is it because I have slightly different trace lengths going to the crystal?

Also, I accidentally used a slightly larger footprint for my crystal, so two of the back NC pins are left without being soldered to the board. They dont connect to any pins, but is it important that those are connected to a pad for some reason?

Thanks!


texts:
I am repairing an Elo Touch monitor ET1515L which, happily, has dual mains and 12V inputs. It works when powered from 12V supply but struggles on mains. I see sets of capacitors for the PSU board advertised on eBay but that doesn't seem to be my problem.

The AC circuit is almost directly from the SG6841 datasheet schematic: http://www.sg.com.tw/semiGP/data/6841/IRO33.0001.B5_SG6841V2.1.pdf page 11.

On power-up the SMPS delivers about 12V to the low-voltage section of the board (same as DC input) but when I touch the power button to wake up the monitor I get a brief blink on the backlight and the DC voltage drops to about 10.5V. I've disconnected the backlight inverter board to no effect.

So, the control is switching; high-voltage DC capacitor voltage remains stable on switch-on; feedback seems to be working; the transformer has a single secondary winding which seems OK and the Schottky rectifier tests OK on both legs.

What can cause this symptom on this type of SMPS?


texts: I need Wifi/relay in parallel to push button

texts:
First time poster. I’m wondering if you can help. I am trying to make a dumb sauna controller (see pic) smart, so as to be able to turn on my sauna remotely. I am very much an amateur. So be kind.

To do this I have wired one of those sonoff relays in parallel to the push button switch that toggles in on/off. I use about 2 meters of flex heat proof  (link below) behind the sauna cladding to my Sonoff switch at ground level (where it’s cooler). The switch is connected directly in a NO setup with the Sonoff and works well. However, when the sauna heats to about 70 degrees the controller will turn off on its own. (Controller is higher up where it gets hot)  If I turn it on again, it will stay on but turn off again after around 10 minutes. If I disconnect the flex (at the controller) and so make it dumb again, it works as normal at high temps.
If I disconnect at the sonoff switch but leave the 2 meter of cable connected at controller it turns off by itself, just as it does when connected to the sonoff.  So I’ve ruled out the relay.
The controller gives 3VDC when I put a voltmeter on it at the controller button but after the cable span it’s only 2VDC. Just before it turns off it drops to 1VDC. However, the relay doesn’t close.

My suspicion is my length of cable and heat are combining in some way, or perhaps the type of cable, 2 meters is probably too much. I’ve reduced cable length as much as I can. Could it be that the controller, at high temps can not provide power to that length of cable? Any help or guidance very much appreciated.

Thanks for your time.

PsmGoods 32 Feet 22 Gauge Silicone Wire Super Flexible Silicone Rubber Wire Cable 22 AWG Silicone Wire 16 Feet Red/16 Feet Black (22 Gauge) https://www.amazon.co.uk/dp/B07428WN78/ref=cm_sw_r_cp_api_mWC8Bb7QJWDEK

Sonoff Smart Remote Control Wireless Switch Universal Module 4ch DC 5V 12V 32V Wifi Switch Timer Phone APP Remote Control Support Alexa Voice Control for Smart Home https://www.amazon.co.uk/dp/B07DS44LXJ/ref=cm_sw_r_cp_api_ISC8Bb1D5KN05


texts:
I want to write down the Fourier series for \$x(t)=1\$ for \$|t|\leq 1\$ and zero otherwise (which is expanded periodically to other intervals with this period of 1), and compare it graphically with \$x(t)\$, for different values for \$N\$, where \$x(t)=\sum_{-N}^{N} a_k e^{ j k\Omega_0 t}\$.

Here's the code I wrote, basically the interval should be between -2 and 2, but I get all the time an error, I hope someone can correct me or find a better way to do this.

n=linspace(-2,2,5);

x=abs(n)<=1;

y=symsum(exp(-1i*k*pi/4)*(sin(k*pi/4)/(k*pi))*exp(1i*k*pi*n/2),k,-1,1);

y2=symsum(exp(-1i*k*pi/4)*(sin(k*pi/4)/(k*pi))*exp(1i*k*pi*n/2),k,-3,3);

y3=symsum(exp(-1i*k*pi/4)*(sin(k*pi/4)/(k*pi))*exp(1i*k*pi*n/2),k,-7,7);

y4=symsum(exp(-1i*k*pi/4)*(sin(k*pi/4)/(k*pi))*exp(1i*k*pi*n/2),k,-19,19);

y5=symsum(exp(-1i*k*pi/4)*(sin(k*pi/4)/(k*pi))*exp(1i*k*pi*n/2),k,-79,79);

I get the following error:

??? Undefined function or variable 'k'. Error in ==> AS at 3 y=symsum(exp(-1i*k*pi/4)*(sin(k*pi/4)/(k*pi))*exp(1i*k*pi*n/2),k,-1,1);


texts:
If I want to use Kirchoff's Laws in a electrical circuit, I should assume that wavelength is greater than circuit dimensions. But this wavelength is from which wave?
I know that it is related with some maxwell equations like:

so which wave is this?


texts: I do not understand this sentence: "Resistor is used to stop loading the transistor"

texts:
In this circuit, resistor R4 (just before the transistor) is used to stop loading the transistor.
I do not understand the part "resistor used to stop loading the transistor".


texts: What is the methodology behind 555 timer design?

texts:
Small circuits in TTL and RTL we could do intuitively, without any methodology. But what about a complex circuit like 555 timer?
If it was designed using logic gates, it could be easily deduced by using boolean algebra, truth table, k-map, etc. These could be the methodology.
Not intuitive.
The 555 timer was designed with a complex transistor network and some passive components.
I know that transistor building blocks are just what was used to make logic gates, but what methodology used to design the 555 timer, or it was completely intuitive (no methodology?)


texts: Deriving the Impedance equation of a RLC circuit (with 2 Inductor)

texts:
simulate this circuit – Schematic created using CircuitLab

During this lockdown I had some time in hand and decided to learn more about impedance. So I gave myself a project, trying to create a impedance graph in excel base on a the schematic seen above. The passive components will be a variable.

To do that, I first need to derive the impedance equation for the schematic seen above. When I cross check it with a simulation tool and a proven graph, I could not get the graph to match. Hence, I believe I must have done something wrong. I had doubled, tripled checked and corrected all the mistakes.

I do not know where I went wrong. I am hoping if I can get a 2nd or 3rd eye to look to see where I might have gone wrong.

This is my first post here, I had done the search but to no avail of information I can obtain anymore.
Do let me know if I did violate any rules by posting this.

Edit: I have removed my derivation, as it is wrong and not working. This is to not confuse other readers as User Verbal Kint has provided a really good solution.


texts: Oscilloscope using laptop microphone input...is that possible?

texts:
Its possible to have an oscilloscope from the input of the sound card? I'm trying to log the states of a PIC32 pin (min: 0V, máx: 3.6).

Is it possible to put that value on a 3.5" jack and, on the pc, have access to the sound card input values?


texts: Output current capability of a waveform generator

texts:
I would like to drive a mosfet on and off with a waveform generator. Nevertheless I would like to estimate the time it takes for turning off and on the MOSFET. I did not find the output current capabilities of this device. I supposed the output current capabilites are low.  Here is the datasheet.
If someone has an idea of what are the output capabilities of a waveform generator it would be nice.


texts: What's the simplest way to generate a VGA signal for a totally white screen? Preferably with an AVR MCU

texts:
I'd like to make a simple board to plugin a LCD monitor and get a blank white screen. The idea is to use any monitor as a makeshift light table. I have a preference for 8-bit AVR micros since I have a couple laying around.

So what is the simplest way to generate a VGA signal for just a white screen?


texts: Probing a waveform with features that have orders of magnitude difference in times

texts:
I have a digital signal with the following characteristics:

High Level- +5V

Low Level- 0V

High Time- 1.3 uS

Low time- 2 Seconds

Both the high time and low times need to be have tight tolerances. I would also like to observe the jitter for both of them. What are the techniques available to probe the signal using an oscilloscope (I have a TDS 3034)?


texts:
I wonder if the Altera DE1 and DE2 have the same UART? I got access to both the DE1 and the DE2 and I see a similar question but the manual isn't specific which FPGA is applicable.

UART core Altera De2


texts: LM339 Incorrect Behaviour for Two Elements

texts:
I am designing a monitoring circuit for a battery powered device that is charged from a solar panel. The circuit uses an LM339 to indicate the input voltages via two dual colour LEDs, one for the battery voltage and one for the solar panel voltage. The LEDs will be red to indicate low voltage, orange (both LEDs on) to represent a mid range voltage, and green to show a high voltage. Each comparator input contains a potentiometer to allow for calibration and adjustment of the transition points as desired. See the schematic below.

After building and testing the circuit I have observed some very strange behaviour from the LM339. The two comparator elements being used for the solar panel monitoring (A & B) work fine and the transitions on the outputs occur at the correct points for the input voltages, however the comparators being used for the battery (C & D) do not change their outputs at the correct voltage.

The solar panel and battery resistor dividers are adjusted to produce 2.048V at their maximum expected voltage and the other trimpots are set arbitrarily for now. The input conditions for the output transition points for each comparator are summarised below. These are only rough measurements but it's pretty obvious that U1C and U1D aren't even close to being correct.

    U1A    U1B    U1C    U1D
V+  1.499  1.506  2.071  1.64
V-  1.506  1.501  1.909  1.775

I have tried powering the LM339 from 5V instead to get all of the inputs within the common mode range (Vcc - 1.5) but this made no significant difference. I also tried using an LMV339 which has a wider common mode voltage range (Vcc - 0.7V) and this is also exhibiting the same behaviour.

Why would two of the comparators in the LM339 exhibit this incorrect behaviour while the other two work fine, when all of them have identical input topologies?

Any help would be appreciated.

Edit:
As per the suggestions I have improved the ground connection and bypassing, decreased the resistors by about a factor of 10, and added 1µF caps on each of the taps. This has made no significant difference.

Here are my new test results for the point at which each comparator transitions.

    U1A    U1B    U1C    U1D
V+  1.163  1.159  2.084  1.646
V-  1.154  1.168  1.918  1.790


texts: Function of Inductor in-line with MCU Vdd

texts:
I've been examining a circuit and have come across something that I have not seen before. The system has a power regulator which outputs a 3V3 signal which is required for certain parts of the circuit. One such component is a \$\mu\$Controller (EFM32G...) which I am relatively familiar with. Now on the IOVDD and AVDD lines, there is an inductor in series with a 1\$\Omega\$ resistor coming from the 3V3 regulator (along with all typical decoupling caps [100nF] and some 'resevoir' caps [10\$\mu\$F]). Below gives a snippet of the circuit diagram.

simulate this circuit – Schematic created using CircuitLab

Can anyone tell me the purpose of L1 in this circuit?

I am sure it is for some filtering but cannot work it out myself.


texts:
What affects the speed of electrons in a resistor?

If two resistors are connected in series, they both have the same current ; same amount of electrons passing at a point per second.

Then if one resistor is a thin wire and one resistor is a large wire, do electrons travel faster in a thin wire or a large wire of same material and external conditions.

Is it affected by the electric field strength? So Voltage / Length of resistor.

^If it is, then currentxresistance / length = current x resistivity x length/(area x length) = current x resistivity /area .So thinner wires have a higher electric field strength hence electrons travel faster, is this true?

Thanks

note: it feels like the oppsoite of what you would think as it feels like electrons will have a easier time travelling through wires of large cross-sectional area.


texts:
I am working with PIC18F26K20 and MPLABX IDE. I wrote some code for configuring and running the PWM. However, The output I get is at 50 percent duty Cycle no matter what duty cycle I provide the application. Following is the code I have written. The description of what I have done is included in the comments:

# define TMR2Prescalar 2

// 1 - Disable the PWNM Pin
TRISCbits.RC1 = 1;

// 2 - Not used since I'm using CCP not ECCP

// 3 - Set PWNM Period by setting PR2
//The formula is as given in the datasheet of PIC18F26k20 on page 141
// PR2 = (Fosc/(4*PWM frequency* TMR2 Prescalar)) -1
PR2 = (_XTAL_FREQ)/(4* 1000 * TMR2Prescalar);

// 4 - Configure the CCP module for the PWM mode by loading the CCPxCON register with the appropriate values
CCP2CON = CCP2CON | 0x0F;

// 5 - Set the PWM duty cycle by loading the CCPRxL register and CCPx bits of the CCPxCON register
// According to the datasheet page 141,  CCPRxL:DCxB<1:0> = (PulseWidth * Fosc) / TMR2Prescalar
uint16_t bits = 0;
// 70 percent pulse width
bits = (70* _XTAL_FREQ)/ TMR2Prescalar;
//Loading values into appropriate registers
CCP2CONbits.DC2B0 = bits & 0x0001;
CCP2CONbits.DC2B1 = bits & 0x0002;
CCPR2L = bits >> 2;

// 6 - Configure and start Timer2:
// Clear the TMR2IF interrupt flag bit of the PIR1 register
PIR1bits.TMR1IF = 0;
// Set the Timer2 prescale value by loading the T2CKPS bits of the T2CON register
T2CONbits.T2CKPS = 0;

//Enable Timer2 by setting the TMR2ON bit of the T2CON register.
T2CONbits.TMR2ON = 1;

// Wait until Timer2 overflows (TMR2IF bit of the PIR1 register is set).
while (!PIR1bits.TMR2IF);

//Enable the CCPx pin output driver by clearing the associated TRIS bit.
TRISCbits.RC1 = 0;

I am using an internal oscillator. The code for configuring internal oscillator is given below:

void OSCILLATOR_Initialize(void)
{
    // SCS INTOSC; OSTS intosc; IRCF 8MHz_HFINTOSC/2; IDLEN disabled;
    OSCCON = 0x62;
    // INTSRC disabled; PLLEN disabled; TUN 0;
    OSCTUNE = 0x00;
    // Set the secondary oscillator
}

Can anyone tell me whats wrong with the above code?


texts:
I was told that the mass action law $$np = n_i^2$$
only applies to compensated semiconductors and intrinsic semiconductors, and it does not apply to n-type or p-type semiconductors. Is this true? I also heard the argument that the hole concentration decreases as the electron concentration increases in case of a n-type doping, therefore the mass action law is still applicable. I am not sure which is right, but I am sure I am missing something here.

When solving problems such as the one below

Source: Semiconductor physics and devices, Donald A. Neamen

I am not sure whether I can apply the mass action law or not. For example, could part (b) solved using the mass action law since the electron concentration is given?
$$p_o = n_i^2/n_o$$

Please help me understand when I can or cannot apply the mass action law.


texts: JK Flip-Flop as a frequency divider by 3 with a Duty cycle of 50%

texts:
I've been doing a little research into this but I cannot find anywhere on how to divide a frequency 3 by 3 using JK flip flops, only this:

http://www.falstad.com/circuit/e-divideby3.html

But it is a D Flipflop.

I know how to divide by 2, 4, 8..etc

But how do I go about building a circuit to divide by 3?


texts: Need help understanding a fairly vague solution to example problem (the topic is noise in CMOS circuits)

texts:
So I have the solution to the following example problem I am working on:

Now the issue is that I am trying to understand the solution I was given:

The thing is this solution is simply quite vague. Could someone possibly help me understand how the three terms present in the final answer were derived?


texts:
I need to send data from a camera recorder to a pc. The camera is about 1024/1000 pixels with 15 fps. Now the transmission distance should be at least 100 meters so I'm trying to use radio, but i found transmitters that can only send data with about 2Mbps(this). Do you think I can keep the camera feed live (without interruptions or delay)? Also regarding the link above. I think that part should be connected to a socket. Does it come with a socket? Or I need to order it too? (I worked only with parts that are connected directly to the board)

To clarify the situation: the sender is a device that has a camera and a radio transmitter, the video is going to be transmitted directly to a second device (a receiver) that will further process the raw image. I would use wifi but I need a very high range (1km,also wifi is not so effective if there are a lot of obstacles).The video must be received by the second device live (by live i mean that the video must be shown with no frame drop, everything must be smooth, I don't know a better way to explain this since english is not my native language) and with delay as low as possible. Are there other high speed, high range ways of communication I can use?


texts: Implementing a circuit on Printed circuit board

texts:
I have a circuit on my breadboard, which is not too sophisticated. The company i am working with want me to present it. If they want it on PCB i don't kn ow how to do it. It is too daunting to make by hand for me. I am not a technician.

Is there any companies that makes PCB for people who designed circuits?