texts: Adding a const string identifier to at the start location of functions in C

texts:
I would like to add a const string identifier at the start locations of few functions. The reason is that I need to maintain a table of function pointers, the indexes of which are to be in a specific order. I need to verify that only the intended function pointers are placed at each index of the table. My idea is that if I place a known string identifier to the start of each function, it can be identified if the function pointers are misplaced in the table, by verifying what is present at the starting addresss of a function.

Eg.

void Foo()
{
   const char Foo_StringId[3] = "FOO";
   //Function code
}
void Bar()
{
   const char Bar_StringId[3] = "BAR";
   //Function code
}

FnPtr_t FnTable[2] = {&Foo,&Bar}; //Foo must be at index 0  and Bar at 1

void Check_FnTable()
{
    char* pFooId = (char*)FnTable[0];
    char* pBarId = (char*)FnTable[1];
    //if string pFooId is "FOO" and pBarId is "BAR", all good.
    //otherwise function pointers are misplaced
}

The problem is that I am not able to place a string identifier at the start of functions, it's simply being optimized by the compiler. I tried using volatile in vain and __attribute__((__used__)) doesn't seem to be supported by the compiler(DIAB 5.9.6 for PowerPC). How can this be achieved?

As side questions,

Would such an approach really place the string at the starting address of the function, so that the string can be accessed by casting the function pointer as char* ?
Is there a better way to solve this problem of misplaced function pointers in a table?

Update:  I need to perform the check because the function table is provided by a different binary executable(mostly from a different developer). I want to make sure that the table in the other binary is not messed up, probably because of a mistake from the developer, before using the table.


texts:
I was looking for a nice MCU for my next project and stumbled over the Atmel SAM C21 (ATSAMC21E18A-AUT). Unfortunately it seems to be not available, although there is a C21 evaluation board on sale.
Is the product still in "beta" phase and therefore not available or is it canceled / retired?


texts:
I have this 3.5" LCD with a ILI9488 COG driver IC, it supports both serial & parallel interfaces but using SPI I can only get very slow frame rates. The end application will be translating a propriety LCD communication bus so that it will display on the 3.5" LCD.

According to the datasheet, the ILI9488 supports 16 bit parallel interface (IM1 = 1, rest = 0) which is called DBI type B in the datasheet. It should be compatible with the 8080 bus.

Does anyone knows what is the startup sequence for using this type of interface? Second, during operation pixel information is sent to the LCD - and that is it? I am feeling there is more data missing but can't find it on the datasheet.


texts: I'm in the process of modifying a 360 power supply to power a 6 unit Motorola radio charger. I've got the +12v and the ground wired to live and ground on an NL-2 connector; and I've jumped the blue PS_ON lead to the +5v rail, as a few other mods have done. When I plug the supply in, I get power for an instant and then it shuts down. Nothing looks/smells fried, so I'm a little stumped. What am I doing wrong?


texts:
I am a solar power enthusiast but with almost zero knowledge in electronics. However, I have asked here and there and I managed to build a simple circuit board that should suppose to deliver me 5V in order to charge a phone through a USB port.

So I have the following system:

I read 12V from the solar panel and I can read the voltage along the red line between difference components, but once I connect the multimeter to the green terminal, I have 0V.

This is the part where knowledge kills me and I don't even know how to search for it, but shouldn't I read a voltage closer to 12V rather than 0V? Am I doing something wrong or do I need a resistance or a device that would close the system? But I was thinking that the multimeter has that inside, and that's why one can ready the voltage.

Bottom line, can anyone help me to understand why do I have 0V at the USB inlet? Is the circuit wrong?

EDIT:
Here is a circuit scheme (it's the first time I built something like this, so please let me know if I need to add more info):

simulate this circuit – Schematic created using CircuitLab

EDIT 2: As requested, please see the back of the board


texts:
I'm trying to understand a differential pressure sensing circuit that I have.
Have attached rough design sketch as well.
Sensor used is "10 INCH-D1-MV-MINI" by Allsensors. Output span is 20mV for 10" H2O differential pressure. This output is supplied to instrumentation amp "AD622" having gain set to 100 & REF voltage of +2.5V. Supply rails are +Vs = +15V & -Vs = -4V.
This output of op amp is fed to Channel 1 of ADC - AD7718 & Channel 2 of ADC is fed signal which is (op amp output divided by 5 )+`2V. ((ADC_AIN2 = OP-amp-out / 5)+2).
Now few doubts i have are,

Sensor output will be 0-20mV for full scale pressure. So, why is op amp AD622 supplied with -Vs = -4V. Why is it not connected to ground. There is REF voltage of 2.5V, which will give final op amp output as 2.5v to 4.5v. Is -4V supplied just in case high and low pressure ports are interchanged and sensor output goes from 0 to -20mV ? But, sensor datasheet does not mention span as +-20mV. Its only +20mV.
Channel 1 of ADC is fed directly from op amp output, that's understood. But, why is channel 2 provided divided output ? Will it give better resolution by reading divided output for particular pressure range?
ADC Vref =2.5V and AINCOM=2.5V and is operated in pseduo differential & bipolar mode ie AIN1 & AIN2 are refrenced to AINCOM. Does this mean that input seen by ADC at channel1 will be 2.5-2.5=0 to 4.5-2.5=2 ie 0 to 2V at AIN1. And at AIN2 (2.5-2.5=0V to 2.9-2.5V=0.9V)
If these voltages are correct, what is use of operating ADC in bipolar mode ? Output is not going to be -ve.


texts: What are the CPU activity steps for the fetch-decode-execute cycle

texts:
So in all the phases of the fetch-decode-execute cycle, it says that the "store" phase is used to store any resultant data from the execute phase. What are the CPU steps for that phase? I heard that it was the same steps for the fetch phase but you had to change some things so what are the things you need to change. Here's the fetch CPU activity steps:

1) Address in PC - MAR
2) MAR - Address Bus
3) read signal - control bus
4) Wait for memory
5) content of location in memory
memory - data bus
6) data bus - MDR
7) MDR - IR

The type of processor is an AVR microprocessor 2560 and the layout is Harvard architecture.


texts: Varistor transient overvoltage protection of generator

texts:
Using a varistor is a common practice in alternator excitation system. It is used with rotating rectifier diode. Is it used for transient overvoltage protection?

Is it protecting diode or rotor winding. How this overvoltage may occur?


texts:
From a 2019 specsheet for a i.e. Belden 1583A cable, I can read \$Z_0=100 \pm15 \Omega \$ for \$f=1 \text{MHz}\$, \$\text{VF}=0.7\$, \$\text{R}=93.8 \Omega/\text{km} \$, among maximum Delay, Attenuation, and others.

If I should obtain the lumped per meter R (already given), C and L parameters for a simple transmission line model, should it be correct to take?:

$$
VF=\frac{1}{c \sqrt{LC}}, \
Z_0 = \sqrt{\frac{L}{C}} \\
C=\frac 1c\frac{1}{\text{VF}}\frac{1}{Z_0} ,\
L=Z_0\frac 1c \frac{1}{\text{VF}}
$$

Is \$VF\$ in the specsheet ("Velocity Propagation Factor") indeed the Velocity Factor I am thinking?

The specified capacitances are the Non Mutual Capacitance \$C_{NM}\$ and the Maximum Unbalance Capacitance \$C_{MU}\$.

Anyway, what are the meaning of those last capacitances?


texts: Help recognizing components and parts of this radio telescope

texts:
I stumbled upon this video, where someone is showcasing a radio telescope that detects wifi frequencies and renders them as picture.
There are three parts, and the one above is just the 3rd part (last part):

First part
Second part
Last part (as posted above)

I watched those multiple times as I was curious about how to reproduce this (for educational purposes of course.)
I managed to understand most of it, and already know how the gears, antenna (coil part) and the dish work, as well as the motors and how to reproduce them.
However, I can't manage to figure out what part/components are used for the wiring between the part that detects the wifi frequencies, the coil on the antenna, the Arduino board and the computer where the rendering of the images is done (though I do understand the part of the code which does the rendering).
Any help and feedback is appreciated.


texts:
I've come into possession of a bunch of xenon flasher units of the type commonly mounted to burglar alarms and electric gates. I'm aiming to turn them into tiny strobes as part of a project I'm working on; this means increasing their flash rate from their current rate of ~1 flash per second to several flashes per second.

I've sketched out a rough schematic of what I think is going on inside the unit:

From what I understand, as C4 charges, the voltage across sidac Q2 increases to the point at which it opens and allows current to flow to T2, which produces the very high ignition voltage that ionises the gas in the tube and causes C2 to dump its stored energy through the bulb, producing the flash.

I have tried lowering the value of R3 and have found that I can get the flash rate a little faster, but once I get below 800kR it makes no difference. Lowering C4 makes a little difference, but below 47nF the bulb won't flash.

It seems that C2 takes around 0.5s to charge (I can hear it), and possibly this is limiting the number of times I can flash the bulb per second. I am drawing around 0.2A from a 12V bench supply capable of providing 2.5A, so there is more power available to play with.

Interested to know peoples thoughts on how to make it flash faster, and I welcome any corrections to my understanding of how things work - my electronics knowledge is flaky at best. Thanks, Tim.


texts: Does the switching frequency and ON/OFF time duration of LED affect the power consumption of LED?

texts:
I want to drive the electronics consisting a controller with different peripherals on its I/O pins, one of which is LED, with 3V coin cell battery supply.

I want to determine if its switching frequency and ON-OFF time of LED is varied, will that affect its power consumption.


texts: Can I use Highspeed Opamp as differential clock driver?

texts:
I want to use high speed Opamp LT1364 as +/- 15V clock driver of same voltage instead of typical CMOS / CCD clock drivers with lower voltage and slew rate.

CMRR : 90dB
PSRR : 100dB
Slew rate : 1kV/uS

Please help me with which other parameter shall I consider for choosing correct OpAmp


texts: Does fixed point number processing require ASIC hardware?

texts:
I've recently started diving deeper into DSP and have come across the term 'fixed point number'. The idea of a fixed point number is simple enough and makes since to me, however, I'm somewhat curious as to how fixed point operations are carried out.

Are fixed point operations carried out by processors with instructions to perform fixed point operations? Or is there usually a dedicated chip?

Thanks!


texts: Best communication scheme for a battery-powered Bluetooth LE display?

texts:
I have a battery-powered design that I am working on using a Nordic NRF52832. The device is intended to connect to a smart phone and upon receiving a particular message from the phone, flash some LEDs in appropriate response to that message.

Intended runtime between charges is intended to be 3 months and there is space for a 200mAh LiPo Cell internally.

My question is - what is the most power-efficient communication scheme to use here? For a device that needs to simply send information periodically, waking up and advertising (possibly with a scan request / response after, possibly to initiate a connection and push data over than before disconnecting) followed by long periods of sleep seems to be the general way things work. The onus is then on the smart phone to periodically scan for advertisements, putting the higher battery drain on a more readily recharged device.

My best guess at the moment would be to have the device wake up periodically, advertise for a period of time with the hope that in that time the smart phone scans, detects that advertisement, connects, sends data to my device and then closes the connection. My device can then act on this data and / or go back to sleep.

Alternatively, it seems that the smart phone could periodically advertise if it had any data to share, and my device could periodically wake up, scan, and if it received an advertisement with appropriate data (assuming we can fit our payload into an advertisement) then react appropriately before returning to sleep. If a scan request / scan response was included in this we could effectively acknowledge receipt of the payload, avoiding the phone sending superfluous packets.

There is also the consideration of operating in an environment where several people in the same area have a phone and a device and interference where data from one phone was interpreted by an incorrect device would be unwanted. How do I go about targeting the data at a single device with the lowest possible power burden?

Additionally, if any advice could be given as to a suitable resource for me to read where I could get a better understanding of general best practice around queries like this I would be most appreciative.


texts: Electrostatics - Homework: Relative permitivitty of spherical capacitor

texts:
I need help with the following problem:

Spherical capacitor with two linear and uniform dielectrics with relative permitivitty Ɛr1 and Ɛr2 is connected to constant voltage U. When second dielectric is removed, intensity of electric field by inner electrode is reduced by 1/3, and electric field by outer electrode is increased two times. a=1.5mm, b=6mm, c=12mm. Calculate Ɛr1 and Ɛr2.

In the first case (two dielectrics), Gauss law gives $$E_1^{(1)}=\frac{Q}{4\pi\epsilon_0\epsilon_{r1}r^2},a<r<b$$ $$E_2^{(1)}=\frac{Q}{4\pi\epsilon_0\epsilon_{r2}r^2},b<r<c$$
$$U^{(1)}=\int_a^b \frac{Q}{4\pi\epsilon_0\epsilon_{r1}r^2}\mathrm dr+ \int_b^c \frac{Q}{4\pi\epsilon_0\epsilon_{r2}r^2}\mathrm dr=\frac{Q}{4\pi\epsilon_0}\left(\frac{b-a}{\epsilon_{r1}ab}+\frac{c-b}{\epsilon_{r2}bc}\right)$$

In the second case (second dielectric is removed),
$$E_1^{(2)}=\frac{Q}{12\pi\epsilon_0\epsilon_{r1}r^2}$$
$$E_2^{(2)}=\frac{Q}{2\pi\epsilon_0r^2}$$
$$U^{(2)}=\frac{Q}{2\pi\epsilon_0}\left(\frac{b-a}{\epsilon_{r1}ab}+\frac{c-b}{bc}\right)$$

I don't know how to find Ɛr1 and Ɛr2.
Thanks for replies.


texts: What drives the advancement towards ever faster cellular network speeds?

texts:
I've always accepted that technology advances. Being born in the 90s, everything just becomes faster, smaller, cheaper and generally better if you wait a few years. This was most obvious with consumer electronics such as TVs, PCs and cellphones.

However, it occurs to me now that I know what drives most of this changes, except for one. Computers and cellphones get better and faster mainly because we are able to build smaller and more efficient transistors (I hear about twice the transistor count per unit of silicon area every two years).

The Internet got faster first with DSL which pushed the bandwidth of landline copper twisted pair to its maximum. When we ran out of usable spectrum inside the copper wire we turned to optic fiber, and it was a whole new game.

TL;DR: But, what is it that makes it possible for cellular networks to keep getting faster? I've had 2G, 3G and now LTE cellphones and the speed differences are astronomical, akin to the differences observed in household internet in the last decade.

Yet, LTE channels don't necessarily have a bigger bandwidth (in fact, I believe LTE uses less: 3G uses 5 MHz channels, whereas LTE can have smaller channels, from 1.4 to 20 MHz). Moreover, I've heard many times that LTE is more efficient in terms of bps per channel Hz (I would add 'citation needed' here, I'll be the first to admit that it at least sounds dubious).

So what is it? Just more spectrum? Better and smaller electronics? Or are we getting better at this in other ways? How so?


texts: 50MHz clock level shifting from 1.8V to 3.3V using IC

texts:
I have a 50MHz 2ppm TCXO that I need level shifting from 1.8V to 3.3V.
I looked for solutions here and decided to use a single IC solution rather than using a mosfets because I'm not confident enough to deal with EMI and noises from bad board layouts.
So I was looking for solutions through various vendors and the slew rate seems to be the most important factor to be. since the clocks are coming directly from the oscillator, propagation delay isn't a big problem.
But I couldn't find the slew rate specs. for the IC's that I found.
for example 2N7001T by TI fits my conditions, but what should I check to know that the slopes of the output clock is stiff as the input?
More easily put, how do I know if an IC can support 50MHz clock speed?

Edit
From the replies, I searched for buffer, driver ICs and found that on top of the level translation, Hysteresis is also important for the exact clock replication. So ended up with a Schmitt trigger buffer that had stability and short delay.
SN74LVC1G17


texts: How do i measure the output voltage of lm35 with digital voltmeter?

texts:
I know this is a very stupid question.

Lm35 has 3 pins: Vcc, Analog output voltage, Gnd.

Is it ok to measure between analog output voltage and gnd? Im asking because Vcc and Gnd is a dc.


texts: Low level details for serial communication between UART of a microcontroller and PC

texts:
I want to understand how exactly full duplex serial communication between UART of a microcontroler and PC com port actually happen ?  I have used applications where a single UART( single Rx, Tx pins) is used for sending data from a GUI and at the same time receive continuous  stream of data from PC and display on GUI ( refreshing it every 500 ms).   Is this really full duplex ?

I will really appreciate if someone can enlighten my how internally data flows from micro to PC and vice verse using single Rx and Tx pins.    I really want to understand how it actually work at hardware level.   (I am not looking for a sample code though)


texts: What causes a linear taper slide pot to develop dead spots?

texts:
new here and judging from the kinds of questions being asked mine is probably too simple.
But, I have an old turntable that doesn't seem to recognise the tap that is in the central position on the pitch controller and therefore wont allow me to change the speed correctly.
It works if I push the slider backwards ie -2% to -10% pitch, but if I move it forwards it doesnt recognise the movement until it gets to around plus 6% and then it speeds up instantly.
A replacement part is no longer available either from the manufacturer (Numark) or apparently aftermarket.
Can I apply a carbon based paint to the carbon tracks inside or are there any other methods of repair you can advise please?
Thanks Jim


texts: rms measured from STM32F407 is varying slow after changing input

texts: I am using STM32F407 microcontroller with Simulink. After taking the input samples through ADC i convert it to voltage and then measure the rms value using RMS block in DSP system toolbox. I have used running rms for rms computation. I am getting the measured rms value at the LCD but when i remove the input i.e. 0V, the LCD or even LEDs do not respond instantaneously rather the value starts decreasing and gets to zero in almost minutes i.e. 4-5 min from 115V. I want help to understand what is the reason for this slow response in rms computation and is there any solution for it?


texts: Recommendations on gate driver circuit to pass +/-230V AC?

texts: I am looking for recommendations on how i would implement a circuit to drive a mosfet that will pass  230V+/-  AC. I was thinking of using a gate drive transformer but i am unsure on how to approach this since the source of the FET is not a DC voltage but the +/-230V. It's a relay with a MOSFET plus the gate drive circuit. Any and all ideas will be appreciated.


texts: Attenuated Lower Envelope from Colpits Oscillator

texts:
Could someone explain to me why the output of this oscillator is the way it is?  With a DC input of 6V (no small signal), I get an oscillation between -2V and 7V, which was unexpected.  Is this due to the inductor?  Why is it uneven?

When I have the source modulate the amplitude of the oscillator (as shown in the picture), the envelope on top follows the source modulation, but the lower envelope is distorted.  Is this because of my biasing?  Also, I remember reading in my Communication Theory book that this gap between the envelopes can be decreased, which, if memory serves, would save power.  How would that be achieved?

Any help with any of these questions would be appreciated.


texts: Inserting an unused voltage source in LTspice messes up transient results

texts:
This took me three days to figure out. Consider this simple circuit in LTspice:

Looks pretty innocent. The output is a 1V sine wave, as expected. Going to View->FFT, setting number of data points to 5000, Start Time 50u, End Time 100us. No filtering. This is the output:

An output like this does not quite make sense for a sine wave output and/or a weakly nonlinear system in which the harmonic should fall gently.

Now delete V6 and re-run. Voila, the spectrum makes more sense.

LTspice does not allow for "commenting out" certain blocks and does not even remember the parameters. So if I switch between sin and pulse input, I always have to recreate and memorize the entire parameter set. Hence it makes sense to place all the sources on the schematic and just connect the one with which I am working right now.

I have the suspicion that it has to do with the discrete-time timesteps which are enfored by merely placing a pulse source.

My question is:

What did I do wrong?
How can this be avoided? In other words, how can I trust the output of a transient analysis?
Unfortunately LTspice seems so spartan: Are there any options to enfore a fixed sample step? Any options to resample the transient output such that it is suitable for a DFT?


texts: Running a long 120VAC line without a neutral

texts: Source is a home 120/240VAC with pole transformer.   I want to direct bury a 500 foot 120V line to run some battery chargers and dont need more than 10 amps.  Why cant I only run a single large conductor [4 awg gives a 3% drop] and pick up neutral and earth ground at the load end [where I already have a 8 ft ground rod for a generator that feeds an RV]   This would save me $$ on running a 2 or 3 conductor 4 awg, as they are harder to find.  I am an Electrical Engineer, so dont need any basic help,  just need help understanding the down sides to creating my own ground/return path reference 500 feet away from the source breaker panel/ transformer pole.


texts: Will the choice of prescaler and period while configuring a timer influence the MCU load and power consumption?

texts:
Let us say we want to configure a 16-bit timer to generate an interrupt every 1 second with a clock running at 8 MHz.

We can use several pair of values for the period and prescaler. Let us take the two extremes:

prescaler = 125 and period = 64000,
prescaler = 64000 and period = 125.

Is it better to take one of the two pair of values regarding the MCU load and power consumption?


texts: How does a solar PV inverter throttle the input power

texts:
I have a solar power system (SMA Sunny Boy with 2 strings of panels). When the battery is nearing full charge or the inverter maximum output is reached and excess solar power is available the system throttles the amount of power coming from the solar panels. Observing the panel string voltages and currents it appears that it does this by reducing the string voltages while allowing the currents to be whatever the panel strings can supply. Presumably the voltage measurement is taken after some component that regulates the voltage. What type of circuit would be used to do this?

This graph shows what happens when the power available from the panels exceeds the inverter's maximum capacity of 5kW.


texts: How to estimate the current driven by this uC board for this operation?

texts:
I want to power this uC board through its E5V power input pin as shown in below table:

The power source for the E5V pin will be the +5V Vcc pin of this FTDI converter. And in its datasheet the following specs are given:

I will interface the uC board only with the FTDI converter, meaning that I will not use any other pins of the uC board besides FTDI's RX TX Vcc and GND. In this case, how can we make assumption whether using the FTDI converter's Vcc to power the IC board is within the limits of safe operation?


texts: state space representation of system with a disturbance

texts:
my question is how you can convert the bloc diagram which have a disturbance input to a state space representation and how you can calculate the controllability matrix then

if you can give me any textbook that explains that i googled it a lot but i guess i dont have the right vocabulary because i couldn't find anything

the system of issue : Mx is the disturbance


texts: why would one use a current transformer with both live and neutral lines?

texts:
Could one use this to measure the phase difference if one had the voltage measurement?

I have looked at the below household power meter, and was baffled by (what seems to be) the current transformer to have both the neutral and live bus bars going through. Surely this would just cancel the magnetic field out?

here is some more information:

The power meter uses this mcu

current transformer:


texts:
I'm looking for footprint's dimmensions for the standar packages like 0402, 0603, 0805 etc.

I did a quick search on the google and I got many different results and I got confused.

Is there something very common to use both for resistors and MLCC capacitors.
I don't want the pads turn out too big or too small.


texts: Amount of output current needed by voltage regulator?

texts:
I am trying to choose a voltage regulator. One of the metrics I keep seeing is output current, e.g. "Output current up to 800 mA".

Does that mean the sum of current that the rest of my circuit draws, and is connected to the regulator supply, has be to < 800 mA? E.g. if I have (these are mostly made up):

MCU at 50 mA
sensor at 20 mA
LCD screen at 100 mA
bluetooth chip at 40 mA
memory module at 60 mA

Then my output current from the regulator, which is powering all these, has to be at least 270 mA (= 50 + 20 + 100 + 40 + 60)?


texts: What is the difference between these 2 ANDing circuits?

texts:
What is the difference between ANDing using series resistors and ANDing using diodes?
Is it dependent on the nature of signals X1 and X2( open drain, active low or pushpull)?


texts: Is start conversion and chip select the same? (ADCeh8b1)

texts:
I am trying to hook up an ADCeh8b1 to a Raspberry Pi 3 via SPI to convert some readings from an analog sensor. I've been changing around my code and my hardware connections for a few days now without much success.

Based on the manual for the adc (http://www.datasheetlib.com/datasheet/1004614/adc-eh8b1_datel.html) I assumed the start conversion pin is for CS. I cannot figure out what the end of conversion pin connects to: MOSI or CS?

Apart from that I only get readings of 255 from the ADC once the serial out is connected to the MISO pin and disconnecting the sensor does not seem to affect this reading.

Can anyone spot the issue?


texts: Is it safe to apply a voltage to a cup of water, and then use the water in that cup as a voltage source for other electronics?

texts:
From research it appears that water level detection circuits, such as the one I have included below as a diagram, work on the principle that when the water is high enough to submerge both the +ve and -ve terminal of a voltage source, a circuit is completed and the LED indicator comes on.

Suppose you wanted to run a 7-segment display powered by +9V that displays a message when the water level has risen high enough to complete the circuit. Would it be safe to stick the +ve and gnd rails you are using as a source for the display (or other electronics) in the water? Would the water deliver a stable enough voltage to drive the display, and should a significant voltage drop be expected?

Cheers


texts: Light coming from the room influencing TV

texts:
Inside the TV Remote we have a LED of infrared light which sends commands to the TV.
Isn't it influenced by the light of the room(if any?).I thought if an electron in the valence band absorbs a photon with energy greater than the band gap the electron goes to the conduction band and a phonon is emitted.
Photons of 'infrared light' have less energy than photons of 'visible light' so even if the LED doesn't emit anything the sensor in TV should still be 'activated'.What am I missing?


texts: When is a MOSFET more appropriate as a switch than a BJT?

texts:
In my experimentation, I've used only BJTs as switches (for turning on and off things like LEDs and such) for my MCU outputs. I've been repeatedly told, however, that N-channel enhancement-mode MOSFETs are a better choice for switches (see here and here, for examples), but I'm not sure I understand why. I do know that a MOSFET wastes no current on the gate, where a BJT's base does, but this is not an issue for me, as I'm not running on batteries. A MOSFET also requires no resistor in series with the gate, but generally DOES require a pull-down resistor so the gate doesn't float when the MCU is rebooted (right?). No reduction in parts count, then.
There doesn't seem to be a great surplus of logic-level MOSFETs that can switch the current that cheap BJTs can (~600-800mA for a 2N2222, for example), and the ones that do exist (TN0702, for example) are hard to find and significantly more expensive.
When is a MOSFET more appropriate than a BJT? Why am I continually being told that I should be using MOSFETs?


texts: Gain on an ADS1115 using differential input

texts:
I'm using an ADS1115 hooked up to a Raspberry Pi to detect a differential voltage of about 0.5V. VDD is connected to the Pi's 3.3V, GND to Pi Ground, SCL and SDA to their corresponding Pi pins. I then have an LED whose voltage across the pins reports how much light is falling on it, with the two pins hooked up to A0 and A1. Communication with the device is working fine and I'm able to read voltages and ADC values without a problem. However, since the 0.5V only takes up a portion of the full range of the ADC, I tried to increase the gain on the signal by setting the gain from 1 to 2, only to find that strangely the ADC values stayed roughly the same, while the reported voltage decreased by approximately a factor of 2.

I'm not super familiar with the ADS1115, but this seems to be anomalous behavior based on this explanation via Adafruit: https://learn.adafruit.com/adafruit-4-channel-adc-breakouts/python-circuitpython, where they mention that the voltage reading should be constant no matter the gain, while the ADC value should double when going from gain 1 to gain 2.

The wiring diagram looks as follows (apologies for the simple drawing):

Additionally, after testing I wired an adjustable DC power supply up to A0 and A1 in place of the LED, and set it to 0.95V. In that case, the noise is minimal and the gain function works as expected, doubling the gain doubles the read ADC value. However, when the LED is re-inserted into the system, the ADC value has substantially more noise and the gain again works anomalously, where the gain value has the effect of lowering the ADC value for the same input. I guess this must be because the LED is working quite differently than the power supply, possibly an issue with the LED's parasitic capacitance?

EDIT: Following Andy aka's advice, I rewired the circuit, connecting the cathode to 5V with a 100Ohm resistor in series, and the cathode to A0 and a 1MOhm resistor to ground. Using a single-ended read from A0 on the ADC, the gain works as expected, however there is a substantial and clearly periodic amount of noise on the line, which seems to be aliased despite making measurements at ~200Hz:

Since this noise signal is not present when simply measuring the power supply's voltage, I presume it must be caused by something within the LED. Obviously it could be overcome with time averaging or frequency filtering, but how could I eliminate rather than simply mitigate this noise?


texts: Why do I see a 20 Volts peak-to-peak sinudoidal signal @ 50 Hz on my ESD mat cover?

texts:
I accidentally touched the ESD mat cover on the my table with oscilloscope probe[voltage probe, 700MHz]. It is shown a pure sinusoidal signal with an amplitude of near 20Volt peak-to-peak @50Hz on the oscilloscope screen. I have checked my ESD mat ground connection, and ground connection looked proper. Why do I see this signal on the my grounded ESD mat? Is it possible that Grounding is not enough ?

Regards,


texts: What would happen if you accidentally casually put your apple watch on a wireless charger meant for phones or other higher power devices for hours?

texts: What would happen if you accidentally, casually (because they're supposed to be so convenient!) put your apple watch on a wireless charger meant for phones or other higher power devices for hours? Or rather, what are the general things to take note of regarding compatibility of such wireless chargers?


texts:
In the past I have occasionally repaired broken wires in various electronics around the home. However when trying to repair this cable for a Logitech USB headset, I discovered the wires are different from those I've come across in the past and also from those in the headphone repair videos I found on YouTube.

The headset has a mic and the wires appear to coiled around a thread and touching each other and not insulated with rubber.

How do I go about repairing these wires?


texts:
I have this question where they ask you:

  Find a table of ASCII codes on the internet and give the ASCII code for each of the following in both denary and hexadecimal:

  Uppercase R    Denary 82       hexadecimal 52
  Lowercase w    Denary 119    hexadecimal 77
  Carriage return

I answered the first two but not the last one please help.


texts: Measuring experimentally the poles parameters

texts:
I have the following Sallen & Key lowpass filter:
$$T(s)=\frac{\frac{1}{R_1R_2C_1C_2}}{s^2+(\frac{1}{C_1R_1}+\frac{1}{C_1R_2})s+\frac{1}{R_1R_2C_1C_2}}$$
The parameters values are
$$R_1=10 k\Omega$$
$$R_2=10 k\Omega$$
$$C_1=150 nF$$
$$C_2=1.65 nF$$
This allowed me to calculate the quality factor, the low-frequency gain, and the poles frequency.
$$T_0=1$$
$$Q_p=4.77$$
$$f_p=1011.66 Hz$$
My question now is: how can I experimentally determine this values using the oscilloscope? Is there any way to do it?


texts: Looking for documentation about power electronics

texts:
I'm looking documentation about this circuit. But I'm not able to find about it because I do not know the word associated to this circuit.

I would like to have a document which explains all the different steps in function of the time of the circuit.

Also, if you have a book to recommend me about power electronics, it would be a pleasure to hear its name.


texts: Cable Side and Physical Side of a PoE Magnetics

texts:
I am reading the datasheet of PoE Magnetics. I am not able to understand which side belongs to cable side and which belongs to ethernet controller.

Is it possible to use any of the side for ethernet controller?
I have read this documents and it says:

  The 8-core magnetic only has a transformer and a CMC. The CMC construction and purpose is the same
  as 12-core magnetics, but the CMC can be located on either the cable side or the PHY side of the
  transformer.
  Based on PMA compliance testing results when transformers have CMC on the PHY side, it is
  recommended that future designs avoid this magnetic configuration. The template test for PMA
  compliance has reduced margin in the PHY-side CMC location compared to the cable-side CMC.

It looks like Common mode choke should be facing the cable side (away from Ethernet controller). Is it correct statement?


texts:
I'm using a N channel gate driver with a bootstrap diode included, so I just need to add the capacitor. The FETs will be powered from a 3S lipo pack (12.6 to 9.0v)
so I was wondering if I need 30v rated caps (2 x 12.6= 25.2) or because the capacitor sits between drain and source, and not ground, so a 16V capacitor could be used instead. What about the capacitor type? does it make a difference if I used tantalum vs ceramics (all the parts are 1206 SMD if it matters)? What about the capacitance? 1uF? 10uF? Any specific calculations?


texts: My simple audio amplifier circuit does not work

texts:
In previous experiments I've made circuits to transfer sound from electret microphone to a powered speaker. Now I'm doing my first experience with an Op-Amp to make the sound louder and to be able to hear it in a headphone. The Op-Amp I'm using is LM358N. Here is my circuit:

I'm using the formula below, that I copied from the Internet for the non-inverting operation amplifier:

$$Gain = 1 + \frac{R2}{R1}$$

Given the resistor values of R1= 4.7 ohm , R2 = 150 ohm, my gain is about 32.9 times.

So here is the summary of information about my circuit:

V+ = 5v from USB
Capacitor : 0.1uF
R next to V+ : 4.7 Kohm
R1= 4.7 ohm
R2 = 150 ohm

But my speaker doesn't work when the op-amp IC is placed on the circuit. If the op-amp IC is inserted on it's socket, I can hear only "rett, rett" when I try to blow to the electret microphone. What is wrong here?


texts: Derive current through "charging" inductor formula

texts:
I don't know if it's just me but I can't find a single resource that derives a general equation for the current through an inductor. My text book just says "assume the equation if of the form ..." but I want to understand the assumption comes from and be able to construct and solve the differential equation if I ever forget the form.

If possible could someone derive the equation similar to the way this person derived the equation for a capacitor?

Deriving the formula from 'scratch' for charging a capacitor


texts: How can I control a servo motor with the PWM output of a microcontroller?

texts:
I wanted to control the direction of servo motor with a switch. I am using an Atmega32.  Outputs are PIND4 and PIND5 and the input is PINA3, but the two servo motors turn only in 1 direction.
 #ifndef F_CPU
 #define F_CPU 1000000UL
 #endif

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

int main(void)
{
DDRD= 0xFF ;
DDRA=0x00;
PORTA =0x00;
// FAST PWM
TCCR1A |= 1<<COM1A0 | 1<<COM1A1 | 1<<WGM11 |1<<COM1B0|1<<COM1B1 ;
TCCR1B= 1<<WGM12|1<<WGM13 ;
ICR1 = 19999 ;

TCCR1B |=1<<CS10 ;
while (1)
{
   if(PORTA==0x08) //if pina3 is 1
   {
    OCR1A = ICR1 -2000 ;   //turn servo 1
    _delay_ms(1000);

    OCR1B=ICR1-2000;    //turn servo 2
    _delay_ms(1000);
    }
    if(PORTA==0x00)// if pina3 is 0
    {
      OCR1A = ICR1 -900 ; //turn servo 1 in the other direction
      _delay_ms(1000);

      OCR1B=ICR1-900;     //turn servo 2 in the other direction
      _delay_ms(1000);

    }
}

return 0 ;

}


texts:
I am calculating a fuse and I'm having a bit of trouble. I have a 12v 2A power supply that I want to protect, so my first thought was to place a fast 250v 2.5A fuse in series so it should blow if a short circuit or overload happens. The thing is that testing it with a current limited power supply of 12V/3A and shorting it the fuse does not blow at all, it keeps working happily.

Doing some tests using each time smaller fuses I got it to blow with a 250v 0.1A, extremely lower than what it should be, anything higher does not blow at all.

According to Joules law what should matter is only amperage, as the fuse is in series with the circuit and the resistance is constant (p=I2*R).

If I calculate the total power disipation it's 36w (12v*3A) and if I calculate the fuse as if it dissipated power it should support 25w, so I tested a 0.2A fuse and it works as it should support 50w.

Thinking that there was something wrong with my set-up and calculations I used another power supply and created an extremely simple circuit with a 5ohm 1/2w resistor and a 250v/0.2A fuse. According to this setup the circuit should be powered with 1v to get to the maximum supported current, it should not blow but be very near to it.

Ok, I powered and everything was ok, it drew 200mA from the power supply and the fuse was ok. So, I wanted to blow it, I pushed up the voltage to 1.5v, that started to drew 300mA, the fuse didn't even noticed it... I pushed up the voltage more until it the resistor started to smoke, it was at 2~2.2v, 0.45A, nearly 1w, more than twice the fuse specs... The circuit is still running near me at 1.5v/300ma like a boss after 4 hours...

So, where am I wrong? What's happening here? Why the fuse is ignoring amperage and seems to be blowing up by the power dissipated by the circuit and not by amperage?

EDIT: I have extended the test, a 2.5Ohm resistor 1w, I got the fuse up to 1A and obviously the resistor started to smoke but the fuse still works... I reduced the voltage to 1.5v, the max supported by the resistor and the fuse is conducting 0.6A like a boss...

EDIT2: Here is a picture of the final circuit, which should blow the fuse but runs smooth as butter...

EDIT3: It was running 3 hours at 595mA with no change, I checked everything with an external multimeter and all was ok, also, I tested it with two power supplies...

Searching I have found a statement at wikipedia that says:

  Medium-voltage fuses rated for a few thousand volts are never used on low voltage circuits, because of their cost and because they cannot properly clear the circuit when operating at very low voltages.

So, it seems that a 250v fuse cannot be used with low voltages like I'm doing, but I can't find why...

On my final circuit I'm going to use a resettable fuse rated 16v 3A, that will for sure remove any trouble, but I really would like to know why this happens.


texts: Transistor based Voltage-Current Converter

texts:
For my last design question, Transistor current control with collector feedback, I want to add a NPN transistor between OpAmp and already shown transistor in common emitter mode. With new design, the base of output transistor (already included) will be driven by newly added NPN transistor as collector load.

My question is:
To design the values of RE and RC of newly added transistor, which factors do I need to consider ?

What I already know is only that the total resistance of new Transistor should be adjusted such that it's base current Ib does not exceed the output current limit of OpAmp----- Ic = 15 / R and Ib = Ic / hFE

Now how do I adjust this calculated current limiting resistance R between Collector and Emitter of a new transistor. As far as I know, Emitter Resistance is also feedback to input voltage.

The circuit operates in linear mode.

Thanks in Anticipation for your time and opinion.

simulate this circuit – Schematic created using CircuitLab


texts:
Came across some old Arcam speakers (cut open) and using the parts to build a bluetooth speaker box. Only problem is I can't figure out the wiring on the crossover/filter. The original speakers are pretty old so Google didn't help much.

Image of component side

Have a 2-channel audio amp board and trying to split the signal to one tweeter and one mid on each side.This is what I'm trying to achieve:

So question is: does anybody know what the cables are, and how can I cut/solder to achieve my goal?


texts: lets say we have a transformer, on the left side, it is 220 v and on the right side, it is 10 v. we know that power is conserved meaning power on left is equal to right (ignoring loss). I understand how voltage is stepped up or down (induced emf on the other side, if there are more coils, it will produced more emf and so it will stepped up, vice versa), but how does it actually make the current low or high (or adjust), to make the power still equal?


texts: DDR3 length-matching between signal groups

texts:
I currently dig into the design incorporating an application processor and one piece of DDR3 memory.
I already found out how the individual signal groups are formed and about the guidelines concerning trace length matching.

What I can not figure out without going quite deep :
1.)Why must the clock diffpair (and therefore the ADDR/CMD/CTRL groups) be longer than the DQ lines?

2.) Why isn't there a lower limit on the trace length of the DQ signals?
and

3.)Is the ODT sertting individual for each line or does the tuning process take one value for all the data lines?

Thanks a lot!


texts:
Does the applied voltage create a force on electrons to make them move? I have read that electric field is force per charge. Now, metals have free electrons, so applying a voltage will cause these electrons to accelerate. So voltage is analogous to force.

Am I guessing right?


texts: how to measure current of high voltage 150Hz pwm signal?

texts:
I have a step-up converter which produces 130V DC and 12mA max current

I generate 130V pulses using an optoisolator PWM duty vary between 10 to 50 (255 max) at 150Hz frequency,

but my load (resistive load - assume it is a potentiometer) resistance changes - some times it draws 1mA, sometimes it is  3mA,5mA,9mA,12mA as well

so I need to measure this current once it is connected to the load, from an Arduino

I could not find a proper solution (circuit) to measure current, how to measure this current from the PWM pulses?

edited

the booster is not isolated, a simple step-up booster converter based on booster controller external MOSFET switch, inductor etc...

I need to measure current referenced to the gnd


texts: How should I probe the primary side of a SMPS?

texts:
I need to probe the primary side of an SMPS in for repair. This side is not mains isolated, and could be hot/live, at around 330V.

My oscilloscope has only a 250Vpk input rating and can only reliably read up to about 100Vpk, so I would at least need a 1:10 probe. However, I don't feel happy connecting a £6 eBay probe to an expensive scope when magic smoke just loves to leak out. Is there a way to make it safer? I guess I could spend some more money on a high voltage probe, but that would cost me more than a new SMPS.

Also, I heard I should get an isolation transformer for the power supply so that I don't short anything out to earth. Is this a good idea? (The power supply is from a TV and does not use an earth pin.)


texts: Why sometimes some PCB designer add extra traces to connect two pin to each other?

texts:
I've checked a PCB board which has designed by very famous company and I saw something weird.They connected two pin to each other 2 times and from the top and the bottom of the board I am going to design the board by myself and I really don't understand what is the main reason which they use these method for connecting this two pins to the each other.
Beside of that I have to mention this board is Low flow current and 12 voltage input, in addition this board's utilized 20 mill thickness for these traces which I have mentioned about that.
(I have uploaded the picture of the PCB here and I have put green circle around the pins, I hope it be clear ).
Thank you very much for your time


texts: What diode to use in keyboard matrix PCB?

texts:
I'm making a project where I redesign my old calculators PCB, so I could read the button presses with an arduino. The general design is done, all that's left is to decide on which diode is going to be used. I'm working in EasyEDA, so I added the first default diode available when I made the schematic.

I'm new to electronics, so I have no idea how to choose. It should be available in LCSC store so I can order my PCB with the diodes already soldered.

What parameters should I look out for? How can I find the right diode for my project?

The default diode offered by EasyEDA: https://lcsc.com/product-detail/Diodes-General-Purpose_Foshan-Blue-Rocket-Elec-1N4007W_C328592.html

My design:


texts: Should I be concerned about using off-the-shelf inductors in high-voltage switching applications?

texts: I'm interested in building a SEPIC converter with an input range of up to 1200 VDC. Digikey lists a large number of inductors, which may be viable for my application. But I'm concerned about the voltage in question, and none of the inductors I've looked at have a voltage rating. Are there any particular concerns for using an off-the-shelf inductor in a switching converter at this voltage? Insulation breakdown? Winding style? Something I haven't thought of?


texts: Using inverter ic to make my circuit switch between USB and Battery power

texts: I am working on a project which will be powered by a single lithium ion cell that is boosted to 5V with a MCP1640 boost IC. It will sometimes be connected via usb, and I would like the circuit to automatically switch to usb power when it is plugged in. The MCP1640 has an active high enable pin, so I was thinking I could use the enable pin to switch the circuit from battery power to usb.  Would it work if I were to use a NOT inverter IC like (http://uk.rs-online.com/web/p/standard-logic-gates/7705351/) to put a low input signal into the MCP1640 enable pin when USB 5v is input into the inverter IC so that the boost IC is shut down when the usb is connected? Thanks in advance for any advice!


texts: Is the saturation current different for different base current in CE configuration of a transistor?

texts:
I've been reading my school textbook and found out that a Transistor can act in 3 different modes i.e. active mode, saturation mode and cut-off mode (let's just for now ignore the reverse-active mode). The cut-off mode is the mode when no current flows through the base if I am right (I am talking about the C-E config). The saturation mode is when all the current provided by the external cell flows through the Transistor.

So what actually is the active mode. Also is the value of saturation current different for different values of base current?


texts: Can electronics be damaged by plugging into a lighting dimmer circuit?

texts: So my stupid room is wired so all of the lower receptacles are driven from the electronic wall dimmer. Stupid me plugged in my brand spanking new brother laser printer into the lower receptacle. It was working fine, other than a bit of a buzz coming from its power supply. I didn't realize this until about a day later, after it finally hit me why my printer may be doing a self test every time i turn on the lights in my room. doh! I plugged the printer into the correct receptacle. It still works ok. Could its lifetime be shortened by this short stint of triac-supplied power? I imagine the printer of course has a switching power supply, which clearly was not fazed by the chopped up waveform. I imagine this is the same scenario as a PC power supply would see when connected to a standard UPS without a pure sine inverter. However I'm not sure about other parts of the laser that are not on the DC supply, such as the fuser, etc. I did run off a couple pages while it was plugged into the dimmer. Anyone care to weigh in on this?


texts: What will happen if I use a voltmeter instead of an oscilloscope in a Chua's circuit?

texts:
Suppose I use a voltmeter instead of an oscilloscope in chua's circuit. Voltmeters only measure the average voltage over a short time period.

Questions (please consider both DC and AC voltmeter, because I don't know which one should be used...):

So does the voltmeter show a "coordinate" of the centroid of the double scroll attractor(or any other pattern formed)(since it is an "average")
What voltmeter reading corresponds to the double scroll? If the double scroll is symmetric about the origin, should the voltmeter read zero? Will the voltmeter suddenly jump to zero or gradually declines to zero?
Practically is there any other difference between voltmeter and oscilloscope?


texts: Is the TMDS intended for long distance transmission?

texts:
The TMDS Transition-minimized differential signaling is similar to LVDS but not identical. I have a few questions about it:

Why does it use current mode logic instead of the ubiquitous voltage mode signal?
Is it intended for use on PCB for IC-IC transmission or across distances between systems via cables?
What was the limitation of LVDS that prompted creation of TMDS?


texts: SPICE model DC Sweep, triode region, factors other than Vto affecting knee slope (JFET or MOSFET)

texts:
In LTSpice, I'd like to 'soften' the 'knee' of the transition between triode and saturation curves. For a JFET, lowering Vto achieves this - but also affects the ratios of the VGS 'branch' voltages when plotting Id vs VDS.

It is possible to adjust Vto and B such that the saturation curves match measured characteristics, and various ways to get an initial estimate for Vto, Beta, Lamda and Rs from the curves exist.

Having done so, is there another significant parameter which allows 'knee softening' without affecting the ratios of the VGS 'branch' voltages?

The question here concerns modeling JFET & MOSFET devices.

However, I wonder if I am seeing a limitation of the modeling? I note that for "VDMOS" (not what I'm modeling) this link mentions -
"...independent fits to the saturation and linear regions of the output characteristics."


texts: STM32L476RGTx Nucleo Blink Code in Assembly[Newbie Ques]

texts:
__initial_sp    EQU 0x20000800
                PRESERVE8 ;8byte alignment of the stack (required by ARM)
                THUMB    ; will use THUMB2 instructions
                AREA    RESET, DATA, READONLY
__Vectors       DCD     __initial_sp              ; Top of Stack
                DCD     Reset_Handler             ; Reset Handler
                AREA    |.text|, CODE, READONLY
                ENTRY
Reset_Handler   PROC
                LDR r1, =0x4002144C         ;address of RCC_AHBENR register
                LDR r0, =0x1
                LDR r2, [r1]
                ORRS r2,r0,r2
                STR r2, [r1]

                LDR r1, =0x48000000         ;address of GPIOA_MODER register
                LDR r0, =0x400          ;configure PA5 as output
                LDR r2, [r1]
                ORRS r2,r0,r2
                STR r2, [r1]

                LDR r1, = 0x48000018            ;address of GPIOA_BSRR register
                LDR r0, =0x20           ;pin 5 on GPIOA set
                LDR r2, =0x200000       ;pin 5 on GPIOA clear
loop
                STR r0, [r1]
                STR r2, [r1]
                B  loop
                ENDP
                END

The code flashes onto the MCU(1 warning during compilation) but LED doesn't Blink.While debugging ORRS r2,r0,r2 in the GPIOA_MODER raises the Negative Flag in the PSR and the value is not loaded into GPIOA_MODER.The same happens with BSRR.

The LED is connected to PA5.


texts:
I'm asked to explain what the function of transistors Q1-Q2 and Q3-Q13 are.

So far i've been unable to figure it out. If you know what the functions are, please also tell my how you derived it.


texts: How is the 741 op-amp output protected when shorted to V+?

texts:
I have completed my answer to the question about the Widlar's limiting circuit but there is something unclear to me - how the transistor Q22 manages to limit the load current when the output is short-connected (in blue) to V+ or ground.

The usual explanation is that Q20 base current, entering Q17 and flowing through R11, increases sharply. As a result, the voltage drop across R11 increases as well, Q22 begins conducting and fixes Q16 base voltage.

But how is it possible somehow to change Q17 collector current while its base voltage is kept constant? Q17, like any BJT, behaves as a constant current source (sink here); so its collector current cannot be changed from the side of the collector... the voltage drop across R11 cannot be changed as well...

I have some explanation... but if it is true, I will not like this circuit solution so much... because it would not be valid in any case...


texts:
I came up with voltage levels of TTL logic.

I know that logic high is 2-5V for input and 2.5-5V for output.

But why there is an additional 0.5V rise in the logic HIGH of output. Is there any specific reason?


texts: Using the PS/2 port of the Papilio One FPGA from VHDL

texts:
I'm trying to receive data from a keyboard via the PS/2 port on the Papilio One Arcade Megawing. Eventually I'll want to implement this from scratch, but I thought I'd get some public code working first as a form of smoke-test.

The three sources I played with were

http://soclab.cn.nctu.edu.tw/course/FPGA102/ps2_ctrl.pdf
http://hamsterworks.co.nz/mediawiki/index.php/Papilio_Plus/PS2_Keyboard
https://github.com/thelonious/ps2_io/tree/master/keyboard_scan_code

I've modified each by changing the UCF file to

NET "Clk"      LOC="P89"  | IOSTANDARD = LVCMOS25 | PERIOD=31.25ns;
NET "Reset"    LOC="P67"  | IOSTANDARD=LVTTL | PULLDOWN;
NET "PS2_Clk"  LOC="P91"  | IOSTANDARD=LVTTL | DRIVE=8 | SLEW=FAST | PULLUP;
NET "PS2_Data" LOC="P92"  | IOSTANDARD=LVTTL | DRIVE=8 | SLEW=FAST | PULLUP;
NET "LED1"     LOC="P57"  | IOSTANDARD=LVTTL;
NET "LED2"     LOC="P53"  | IOSTANDARD=LVTTL;
NET "LED3"     LOC="P40"  | IOSTANDARD=LVTTL;

and I'm driving LED1 straight from PS2_Clk, LED2 from PS2_Data and LED3 from a register that should go from low to high (and stay high) when the first complete scancode is read.

The problem is, with all three implementations, what I get instead is

LED1 and LED2 are continuously on
LED3 never turns on

The keyboard I'm using is a Microsoft Natural Keyboard 4000 via a USB-to-PS/2 dongle. The function key lock LED on the keyboard lights up when I connect it to the Papilio so at least I know it's getting juice.

Full Xilinx ISE project dumps are available at http://forum.gadgetfactory.net/index.php?/topic/1917-ps2-ports-on-arcade-megawing/

@Leor mentioned below that the PS/2 port uses a clock frequency of 10 KHz. Does n't that mean that I should see a blinking LED (with about 1.6 second frequency) with the following code:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;

entity main is
    Port ( CLK : in  STD_LOGIC;
           PS2_CLK : in  STD_LOGIC;
           LED : out  STD_LOGIC);
end main;

architecture Behavioral of main is
signal counter: unsigned(13 downto 0) := (others => '0');
signal PS2_CLK_PREV : std_logic := '1';
signal LED_clamped : std_logic := '0';
begin
LED <= LED_clamped;
process(CLK) is
begin
  if rising_edge(CLK) then
    if not (PS2_CLK = PS2_CLK_PREV) then
      counter <= counter + 1;
    end if;

    if counter = 0 then
      LED_clamped <= not LED_clamped;
    end if;

    PS2_CLK_PREV <= PS2_CLK;
  end if;
end process;

end Behavioral;

Because if I try this, the LED is still continuously on.


texts: Differential equation of an OP AMP circuit with RC elements

texts:
I have to find the differential equation which describes the relation between input and output voltage for the circuit below. Per how the RC components are arranged, I simply can not find a differential equation only including \$V_\text{in}\$.
All I got so far is the differential equation including the current \$i\$:

$$\frac{dV_\text{out}}{dt} = \frac{dV_\text{in}}{dt} - \frac{di}{dt}(R_1+R_2) - i\left(\frac{1}{C_1} + \frac{1}{C_2}\right) $$

I also couldn't find any similar examples in literature or on the internet.
So my question is, am I overseeing something that lets me replace the current terms by \$V_\text{in}\$ terms or is it simply not possible to get such an equation for this circuit (that's what I'm starting to believe right now).


texts:
Making a LM1458 work as a Unity Gain buffer with an input of 0 to 12v output to a digital voltmeter.

When I connect this cct to the injector timer (voltage) & a Voltmeter to the output the voltage stays at about 2.0V until the input exceeds that. I tried to bias the input but it made little difference. I swapped ic's with the same result. The source resistance is about 190k, the Voltmeter input impedance is about 125k Ohms. The reason for the buffer is because the Voltmeter sinks the source voltage too much.
How do I get the input Sensitivity to start at least as low as 0.1V up to 12V, output to follow suit.?


texts:
In this Common Source CMOS amplifier, the current is set by PMOS (3), it's 2* Ibias  due to 1:2 mirror.
However NMOS (1) is also a current source with gate at Vi, why the current in the branch is not set by this?


texts: What are the implications of connecting lithium battery packs in series?

texts: I would like to connect 13S (48V nominal/~25Ah) lithium battery pack in series with a pack of 10 lithium cells (3.7V nominal/~30Ah) in order to get a 14S battery without tearing apart the original pack. I know it is not advised but since the original pack already has a BMS and since I would not charge them together, so I wonder if discharging them together would cause some serious problems? (e.g. heating/fire). If so, I would like to know what is the theoretical understanding behind this. Shouldn't it be alright as discharge rate would be within the max possible range of batteries?


texts:
I am designing a circuit that switches between 2 power supplies, controlled by a MCU. The circuit is the following.

This is for a simple supply line, so it will be duplicated for both PS.

As you can see, when the switch (uC) is tied to ground, NPN is open, and I have 23.9V in the gate of MOSFET, which closes the device (VGS > 2.4, http://www.onsemi.com/pub_link/Collateral/MGSF1N03LT1-D.PDF) allowing the current flow from the drain to the source and to the LOAD resistance, which represents the MCU and another circuits.

The U4 ammeter shows a 1.04A current, that flows through the MOSFET, so if I am right, the voltage dropped on the transistor is about 1.04xRds, and the Rds for this transistor is about 100 mohms. But the U3 voltmeter shows that 3.1V are dropped along the transistor, which appears to be a huge value.

Am I ignoring any point about the design? Is it about the simulator?

Thank you in advance.


texts: I have an Arduino with multiple sensors and want to know the total current/power consumption of the system

texts: I have 3 PIR sensors, a piezo buzzer, 3 simple LED's, the Arduino system, and 2 temp. sensors. I plan on using a 9 volt battery and implementing sleep mode during the running of the system. What methods can I use to figure out how much current is passing through the system and find the power consumption? Also, can you direct me to a site for a battery management system to determine how much potential the 9 volt battery would have at different stages?


texts:
(0.5V ---- 100R resistor --- diode --- gnd)

How do you figure out voltage drop on this diode? (Lets assume forward voltage of this diode is 0.7V)


texts:
Once the electrons pass through them, won’t they be decelerated again? I think it might have two reasons.

First, that the fluorescent screen is itself at a quite high potential. But that would cause the electrons to not move in a straight line after they pass through the deflection plates. However, in deriving deflection sensitivity (and other theory), we assume that the electrons move in a straight line after they pass through the plates. Also, if the screen is not an anode, where do the electron go after striking the screen?

Second, the velocity of electrons after coming through the accelerating anode is so high that they need a large distance to travel before sufficient deceleration. And the field due to screen is feeble as compared to the final electron speeds.

Please correct.


texts:
I am researching dc motors to replace the 25mm 6V 1/35 gear ratio dc motors that I have running on a mecanum wheeled chassis. The options I have found on sites like Pololu give the option of low power or high power dc motors and I do not understand the difference, nor do I wish to spend $80 dollars to order the wrong thing.

So, if anyone has any experience with driving (60mm) mecanum wheels or can help me out with general understanding of the difference in dc motors and their applications, I would greatly appreciate it.

EDIT:
Links for LP vs HP motors of the same gear ratio.
High Power vs Low Power


texts: Single symbol for split voltage source in LTspice

texts:
Below is how many people make a +/-15V split-supply in LTspice:

But this takes too much time each time to select 3 components GND and give them values one by one, etc.

So I was wondering if there is a way to copy this topology as a single symbol or create one in LTspice from scratch. The idea is to select a split-supply directly from its own symbol. Does anyone have experience with that? I saw some tutorials how to make symbols but they were about op-amps.


texts: Measuring voltages from different sources sharing Common ground that might differ slightly

texts:
I have a design with resistor dividers and low pass RC filters dropping down 0-32V to ADC range of 0-1.8V.  With multiple channels, I attempt to measure voltages from different voltage sources on a boat - battery voltage, voltage over the engine temperature sensor, voltage over the oil pressure sensor etc. All sources share common ground, but the problem on fibreglass boats is that all devices and grounded with a wire, not a chassis therefore it's easy to get ground level difference.  Prime example is when someone flushes the toilet, the voltage measure on the engine temperature sensor drops slightly down, thus the calibrated temperature value goes up (the higher voltage on the sensor represents lower temperature) and leads to triggering false alarms.
Here is my current solution:

simulate this circuit – Schematic created using CircuitLab

How do I resolve the issue? I have been thinking of the following new implementation:

simulate this circuit

where V1 is the ground connection of the measured voltage (0V)
and V2 is the positive Connection of the measured voltage (0 to +32VDC)
The Op Amps I have selected are NCV20074DTBR2G https://www.onsemi.com/pub/Collateral/NCS20071-D.PDF
I'm using 6 ADC channels of STM32 Wroom32U https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32d_esp32-wroom-32u_datasheet_en.pdf

The requirements I'm trying to meet are:

Measure 0-32V DC voltage of 6 to 8 independent channels and display the value 10per second on a separate gauges (my SW already does the display portion).
Resolution 0.05V
Avoid ground loop measuring issues. Tolerate about +/- 0.5V ground differences.
When wires on the input are reversed by mistake, do not cause short circuit (this is a potential problem with my current solution as it has ground connection on the one of the input connectors)
Ideally have an offset on the output of the op amp to avoid the non linear portion of the ADC (downfall of using cheap uC). On the Op Amp the input should be 0-32VDC and the output should be 0.15V to 1.8V in order to  compress the output and to use the almost linear portion of the ADC, otherwise my lower voltage measurement (below 5V) will be questionable and unfortunately this range is where the most sensor output voltages are.

I have some doubts of my new differential measurement solution as I'm not sure if using isolated PS for powering the ADC and the OpAmp and having floating ground with regards to the ground I'm measuring is or could be an issue.

What happens if the wires on the input are reversed and I feed
negative to the positive input of the Op Amp and vice a versa.
How do I protect the input for EMI and other transient Voltages?
do I add caps to ground on each input after the input resistors?

Thank you in advance for your time reading my post!
Cheers!


texts: Inductance value of an Isolation Transformer

texts:
There is a small isolation transformer 'L1' of 1:1 ratio as shown in the image. A 0-24V, 75kHz square wave is applied from push-pull mosfets stage at the 'V_SW' input of the circuit. I want to find out the approx inductance value of the isolation transformer using calculation. Is there some way to do this calculation?

New Edit:

I have found this transformer and it is actually not a transformer but a Common mode choke for EMI suppression filter. But in the above circuit it is used for isolation purpose as it is just 1:1 turns ratio.

My question is that this choke is available from 33 mH to 0.5 mH values. Should I use lower Inductance value or higher or some middle value? How will it effect the working of this circuit?

The exact part is found at this link:
http://www.mycoiltech.com/emi-suppression-filter-common-mode-choke-coil-uu9-for-ac-power-lines_p75.html


texts: Buck converter design for wide operating range

texts:
I am trying to use a non-synchronous buck converter with closed-loop voltage control for battery charging applications.

It needs to work in a wide operating range:

Input voltage from 12V to 25V
Output voltage from 3V to 8.5V
Output current from 0 to 2.5A

Usually buck converters are calculated for a single operating point.
How could I calculate the inductor and the input and output capacitors to optimize the efficiency of the converter in this wide range?

Maybe should I define a maximum value for the inductor ripple current?
I think it is useless to use a high value inductor, anyway for low output currents is not possible avoid working in discontinuous mode.


texts: Arduino gives a PWM output of 5V dc 4mA, the requirement of my project is 5V 200mA. how do I boost current from 4mA to 200mA by keeping voltage as 5V as the signal is a digital signal?


texts:
I am trying to calculate the current through the load resistor RL given some input voltage Vin at the top left terminal. I am also trying to find the maximum possible current through RL, and I know that R1=R4 and R2=R3.

I'll call the voltage at the + and - terminals of the op-amp V+ and V_ respectively. Also, I will call the voltage at the output of the op-amp Vo. Since no current will flow into the negative terminal of the op-amp, we have that the current through R1 and R4 are the same:

(Vin-V_)/R1=(V_-V0)/R4

and since R1=R4 we have Vo=2V_-Vin

Similarly, the current through R3 must sum to the current through R2 and the current through the load IL, so we have IL = I3-I2 and so

V+/RL = (Vo-V+)/R3-V+/R2

Then using the op-amp rules V+=V_ and we know R2=R3, this expression simplifies to V+ = -(RL/R3)*Vin, so the current through RL is IL = V+/RL = -Vin/R3. From here, I am unsure of what is meant by calculating the maximum current through RL. To me it seems that since the op-amp has a finite power supply, the maximum output voltage is Vo = 12volts. This would mean that the minimum input voltage is Vin = 2V_- 12volts, which leads to V+ = -(RL/R3)Vin = (RL/R3)(2V_-12volts). Rearranging leads to a maximum op-amp terminal voltage of

V+ = 12volts*RL/(2RL+R3)

and so the max current is IL = V+/RL= 12volts/(2RL+R3).

Is this analysis correct? I am not very comfortable with op-amps so I was hoping somebody could verify. One thing that is throwing me off is that the current through RL does not seem to depend on the actual resistance of the load. But on the other hand, the maximum current through RL does depend on the resistance of the load. Is somebody able to explain why this is or where I made a mistake?


texts: Fast Sensor Object Counting With Arduino

texts:
I need to count objects from 5-10 mm with using 2 sensors at arduino mega board. I have used photoelectric sensor but it's really very slow. I have to use delay(1000) commands after count an object because it's not ready to count a new item  before this period(i don't know this issue is related with sensor or with mega) . If i don't use this waiting period then it counts 2-3 items although only 1 item passes through sensor.

I need to count 2 or 3 items every second. Even i couldn't use 1 sensor properly and i need to use such 2 sensor at 1 mega board. What do ypu offer to me? Capacitive sensors are better and faster? Or is not Arduino enough fast for this project?

Here is my code : (I also use Ethernet Shield)

#include <Ethernet.h>
#include <SPI.h>

int sensorPin = A2;
int ledPin = 13;
int MachineID=2;
int sensorValue = 0;
int dummy=0;
unsigned long TimerB=0;
unsigned long LastTime=0;
unsigned long CurrentTime =0;
unsigned long ElapsedTime =0;
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xE0 };
byte ip[] = { 10, 10, 10, 113 };
byte server[] = { 10, 10, 10, 112 };
//byte server[] = { 10, 10, 10, 30 };
EthernetClient client;

void setup()
{
    Ethernet.begin(mac, ip);
    Serial.begin(9600);
    digitalWrite(ledPin, LOW);
    delay(1000);
    if (client.connect(server, 8080)) {
        Serial.println("connected");
        digitalWrite(ledPin, HIGH);
        LastTime = millis();
    } else {
        Serial.println("connection failed");
    }
}

void loop()
{
    dummy=0;
    dummy=SensorControl();
    if (dummy>0) {
       //Send data to SQL
    }
}

int SensorControl()
{
    sensorValue=0;
    sensorValue = analogRead(sensorPin);
    if (sensorValue>1020) {
        // Sometimes objects stays in front of sensor for a while.
        // So i have to wait until objects leave
        while (sensorValue>1020) {
            sensorValue = analogRead(sensorPin);
        }
        //Here i have to wait 1 seconds
        TimerB=millis();
        while (millis()-TimerB <= 1000) { }
        return MachineID;
    } else {
        return 0;
    }
}


texts: What is the Danger in Plugging an 4 Ohm Speaker into an 8 Ohm Amplifier?

texts:
I know it is a commonplace warning not to plug in a 4 ohm speaker to an amplifier rated for 8 ohms. I am wondering what is the actual danger that is presented by doing this in an electrical sense.

My understanding is that an amplifier changes the output voltage level in order to change the power going to the speaker. Power is determined by the formula P = V^2 / R. Therefore plugging in a 4 ohm speaker rather than an 8 ohm will essentially double the power being drawn at the output. It would therefore seem the danger is drawing more power than the speaker or the amplifier is rated for.

However, the other day upon plugging a 4 ohm 40W speaker into an 8 ohm amplifier to test this, it started smoking immediately even at the lowest volume setting. I'm not sure if this was just some kind of fluke or if there's another factor at work here, perhaps something to do with impedance. If there is please let me know, or otherwise help clarify my understanding. Thanks!


texts: LED wiring questions with 9v battery as power source

texts:
My son is working on a project in which he is using 36 total LEDs consisting of 7 different LED's. There are 6 different solid colored LEDs varying from 1.88v to 3.2v and one color changing that is around 3v - 3.5v. He is wiring the LEDs in series of 3 and wants to connect 4 series, for a total of 12 LEDs to one 9 volt battery which will be wired to a lighted switch. Ideally, I would like to experiment with him to find the best solutions, but we are on limited time, so I am hoping to get a few answers to help him along. I'm a novice with this stuff, so please let me know if I need to add any additional information.

Here is a rough overview of the layout for 4 of the series that have the biggest difference in voltage. There would be 2 other sets similar to this, but the voltages of the LED's would be closer to each other.

My questions are this.

The switch is a lighted toggle switch (I believe it's 12v). I know that it can be powered by a 9v as we have used it in other projects, but not like this. Will the power drain from the switch impact the LED's? If so, can multiple 9v batteries be wired into the switch in parallel and will that have any impact?
Will running different rated LED's in the same series have a negative impact? He is looking to put the lower voltage LED's in the front of the series. Will that hurt the higher voltage LED's that follow them? He is looking to wire  2 solid color LED's on the same series as one of the color changing LED's.
What can he expect as far as battery life with this setup? He only needs it to stay powered for 10 minutes max.
When running multiple series in parallel. Will he need a resistor on each series or is one resister between the end of all series and the power source sufficient?

Thanks for any help you can provide!


texts: Altium avoid DRC error coming from footprint that are not errors

texts:
This connector has a "placement pin" through its external pad. It leads to this design:

The fact that the pin hole is in the pad leads to a DRC error.
There's also a DRC error for the other hole, I suspect because it is inside the 3D Body.
Is there a way to disable those errors at the component level?
Thanks.


texts:
I'm designing a single layer Aluminum PCB and all components needs to be SMD/SMT. I'm looking for a common connector that will deliver DC power at 24V and up to 5A minimum (10A ideally). Right now, I'm looking for terminal block style connectors that is SMD/SMT but it seems every single one is through hole.

Is there even such a thing as a SMD terminal block? If not, is there any suggestions for other types of connectors I could look into?

Thanks,


texts: Looking for multi-channel event counter IC to verify switch operation

texts:
As part of a project, I'd like to test the correct operation of a set of SPST switch ICs (maybe 8 or 16 or so). Each device contains six independent switches, and they are controlled through an SPI bus. I plan to operate the switches at around 10 or 20 kHz. I'm thinking of using an inexpensive microcontroller (mabye an Arduino MEGA) to exercise the switches and count the number of times they're switching.

I think I could use the Arduino's 16-bit Timer/Counters, clocked externally by the switches under test, to count how many switch cycles are actually occurring. However, most MCUs have a limited number of timer/counter peripherals. The ATmega2560 in the Arduino MEGA has four 16-bit timers, for example (assuming I can use them all).

As I'm monitoring more than four switches (we could be looking at something like 50 individual switches to be monitored across 16 devices, say), I need another solution. This may be a shopping question, and I might just need the name of what I'm looking for, but are there multi-channel event counter ICs that can operate independently, with internal registers or memory to store the counts on each channel and perhaps raise an interrupt when some count is reached or they overflow? Thanks!


texts: PSpice models for BC547C, BC557C, BF245A, BC548C and BD135-16

texts:
I'm trying to make this circuit in OrCAD Capture CIS to simulate it in spice:

I found the resistors and capacitors in the ANALOG library. I also found all the transistors, except Q3, in the TRANSISTOR library but none of them has a SPICE model so i can't make simulations. What can i do?
I found some transistors in the EVAL library but it is not what i am looking for


texts: NPN - PNP Vbe Matched Pairs.. Can I use 2N3906 with 2SC945

texts:
I am trying to build the following exponential converter circuit from the Thomas Henry "Making Music with the 3080 OTA" document.

simulate this circuit – Schematic created using CircuitLab

I understand from his text that this circuit may be ok for VCAs and VCFs but isn't ideal for tuning VCOs unless you can find an NPN-PNP Matched pair, which is very difficult to do.  I'm not quite yet at the skill level to understand the matched pair expo converters using a differential amplifier setup of two matched PNP or NPN transistors, but I do understand this circuit and would like to see if I can use it for a simple VCO of about 4 octaves before I continue studying the more standard matched pair expo converters.

Question: Can I use two different kinds of NPN/PNPs to match, such as a 2N3906 and a 2SC945, or would the two transistors have to be complements of the same kind like the 2N3906-2N3904?  I managed to find a 2N3906 and 2SC945 who's Vbe deltas are just about 2mV. Can I use those in this circuit?


texts:
Now that I'm going to be using the PSoC 5 as my microcontroller of choice, I would like to learn Verilog so I can create my own peripherals for it.
I have spent some time searching the web for Verilog learning resources (especially ASIC World), and I feel I've learned quite a few things about it, however, I also feel that there's a big hole in my understanding. This is because there is something that none of the resources seem to teach.
Once I know the syntax, how do I go about designing a Verilog peripheral?
What I mean is, I'm still baffled by the designs people create in Verilog. E.G. Why did they do it that way, not the obviously much simpler way? For example, I came across this code:
task add;      // task definition
 input a, b;   // two input argument ports
 output c;     // one output argument port
 reg R;        // register declaration
 begin
   R = 1;
   if (a == b)
     c = 1 & R;
   else
     c = 0;
 end
endtask

There must be a good reason for the design, but it seems bizarre to me. I get the syntax, I see what it does, but I don't understand why. Is there some resource for learning to think in Verilog?


texts: In Fiber Optic Telephone line, how light signals are converted to the voice signals?

texts:
I have been learning how internet data travels in different kind of Broadband access.

In case of telephone broadband, voice signals travels through the telephone line. At the user premise, the modem coverts the voice signals into digital information. The Fiber Optic medium transfers light pulses. Now, here are few questions in my mind after learning that:

(1) If the telephone infrastructure is migrated from copper wires to the Fiber Optic cables, then how the data transmission will take place ? Because, the Fiber Optic medium transfers light pulses

(2) Will I need a different kind of MODEM if I migrate my internet connection from ADSL broadband to Fiber Optic access ?

(3) In case of Television cable internet, what kind of signals travels through the cable ? And what makes Cable internet faster than ADSL ?

Thanks in Advance !!!


texts: How Do You Prototype with QFP-Only Components?

texts:
I'm starting to design a circuit that includes a QFP-38 component. I'm accustomed to using DIP components and prototyping on a breadboard, but in this case I won't be able to acquire a DIP version of the component.

Is it normal practice for electrical engineers to have a PCB fabricated without prototyping? Or do you always acquire breakout boards for small components at first?

(In my case, I would just go ahead and order a QFP-38 to DIP adapter, but it will cost me $20 including shipping. It seems like I may as well just have a PCB made and hope for the best.)


texts: Compare optical Sensitivity of two sensors

texts: I have two different sensors. Both have 16-bits ADC, both operate at Vdd = 3V, but their dynamic range is different. One has dynamic range of 50M:1 with gain range of x8 and the other has 500k:1 with gain range of x140. How do I find how much more sensitive one sensor is over the other?


texts: Where to start building this wifi video streaming circuit?

texts: I am working on my own quadcopter and I would like to stream video from it to my computer. I know how to do it using Raspberry Pi and wifi dongle hooked to its usb port, but I don't want that solution because it's bulky and heavy. I need something like what ARDRone did with their ARDrone2.0 quadcopter ARDrone 2.0. They have an onboard microprocessor, 512MB RAM memory, tiny HD camera and a wifi module. All of it fits in a very compact space that is considerably smaller than that needed by Raspberry Pi. I've been searching online a lot trying to find out how to build these systems, but I couldn't find anything. Where do I need to start to learn how to build these custom systems without using Raspberry Pi, Arduinos, etc. Thanks!


texts: How can I reprogram a Megawin MPC89E52A?

texts:
I have a couple old gizmos that use the microcontroller Megawin MPC89E52A. I want to download the existing code, disassemble it, make my own changes and reprogram.

The datasheet seems pretty basic, but it does state that it's "fully compatible with industrial-standard 80C51 series microcontroller." The datasheet also states "8K bytes flash memory embedded for application program" which I believe means it can be reprogrammed based on the googling I've done so far.

There is a row of pins labeled R, T, I, G, and A which I traced to RXD, TXD, INT0, RESET, and EA. EA is described in the sheet as "EA must be kept at low to enable the device to fetch program code from external flash memory" which sounds promising.

I know nothing about 80C51 parts except that they are all over. I assume that there are lots of tools for them if I know where to look.

My questions:

do I have any chance of success with this particular part?
If I can't reprogram it, can I at least download the existing code and would it be difficult to find a pin-compatible replacement? it's a QFP-44
Assuming that reprogramming is possible, are the pins mentioned above the correct ones for this?
What software tools for programming?
Finally, what kind of a programmer do I need? Hopefully something usb is available, but I can make parallel or serial work.

Perhaps the most important question: Where's the best place to look for info on this?


texts: splicing ac adaptor cord which is positive and which is negative?

texts:
i lost my original asus router power adaptor. so i have a 12v power adaptor with a tip that fits my 19v asus wifi router, and i have a old 19v power adaptor that has a tip that is too small to fit my asus router. so my plan is to cut the tip off the 12v and splice it into the 19v power adaptor so that i have a 19v power adaptor that fits my asus router.

firstly i cut the 12v power adaptor tip with some wire left over but then i couldnt figure out which wire was + - or whatever. I did notice on the ac adaptor power cord that one was black and one had white/grey dashes on it so i broke open the power adaptor and i noticed the wire that had the just black sleeve seems to connect to the + on the board and the wire with the dashes on it connected to the other one. so i assume the black is postivie and the dashes one is negative/ground

when i cut the tip off of the 19v power adaptor, it was different. it had a wire in the middle and then had another wire all around kinda acting like a shield. so now i dont know out of these ones which is positive or negative. i cant crack open the 19v power adaptor and trace cuz i dont wanna end up breaking it.

so how does this work? is the shielding one negative and the middle one is positive? if so then i can just connect it to the other + and - and be good to go. or does it matter what the pin polarity is on the tip?

i attached some pics

any help would be appreciated.

here are pics

Pics of wires
https://imgur.com/a/5FHtbyS


texts: Charging Li-ion with BMS but no balancer connector

texts:
Is there a safe way of charging a 5S1P Li-ion pack with BMS but no balancer connection?
I have a IMAX B6 charger, but it only allows charging Li-ion with balancer connection.
Could I use the Pb charger on this, as it has a BMS to cater for any overcharging?


texts: How do I interpret an RGB LED max amperage given as a range e.g. 30mA-70mA?

texts:
I have some LED's I got in a mixed package and the RGB LEDs instead of a single max amperage just list a range.  One example is I have a common cathode RGB LED with ratings listed as 1.9-3.4v and 30mA-75mA.  I've been interpreting the V range as the lowest forward V of the red to the max Vf of the green and blue elements.

Should I assume that like with the Vf the red element likely has the lower 30mA rating while green and blue have the 75mA rating, or do I assume that 30mA is the lower end of the functional range of the all 3 elements and 75mA is the max?  Nothing burns out when running I run it briefly at 60mA to all colors and no issues.

Mostly I'm wondering what the standard practice is for interpreting these values when they are listed this way.

Thanks in advance.

Edit/New info
Based on a great link from anrieff I've tried playing around some with the bulb in question.  At below a total draw of 30mA the color balance of the bulb starts to shift from a cool white to the green.  This brings up another issue, since the draw at 30mA would be 10mA per color element, does that mean the upper 70mA limit should be treated as a total instead of an upper limit per color element.  i.e. ~23mA per color element for a total of 70mA instead of the 70mA per color I was originally thinking?


texts:
I have a Dewalt Metal cutting abrasive saw that tends to open a breaker on starting up. It draws 75A on startup tripping the magnetic part of the breaker and opening it.

This circuit is only to stop the breaker from opening during the inrush period when the saw blade is totally still. Once it is rotating inrush should be manageable and not as close to the breaker-open  current.

The mechanism would essentially be trigger saw -> wait a second for rotation -> close light switch and get full power.

Are there any drawbacks to this approach? I don't think it could damage the saw, but I could be wrong.

I use the saw occasionally and wouldn't be doing a huge amount of repetitive cuts, so I don't see ohmic heating being much of an issue.

simulate this circuit – Schematic created using CircuitLab


texts: LTC3649 step down controller (lab supply) add current limit feedback led?

texts:
On the 20th page LTC3649
 there is a good typical application picture. How can I add a led if the set current equal the actual current? It is possible? Thanks.


texts:
What type of metal are the tips of USB connectors/plugs typically made from? Aluminium?

I've noticed they will often, quite-easily, oxidise/rust/corrode.


texts:
In the C programming language, you can use printf to print out (for example) variables in the console window. I am using Vivado right now and programming with VHDL. I have some registers I want to read. Is there an easy way, like printf, to show me the data the registers are holding?
I don't want to use simulation, because the registers get written to from an external component.


texts:
A PCB made with KiCad has a configured clearance of 0.152 (6mil) but when I send it to JLC site I have this warning:
"Attention please, the minimum trace spacing is out of our capability, your order may be canceled"
And in the analysis detail it says:
"minimum trace spacing : 0.96 mil"
I made a DRC check and nothing was reported, I guess that if some track was dragged too close to another then I'd have an error, right?
Is it the manufacturers check that is not working? How can I make sure my KiCad PCB is ok?
Thanks in advance,
Pedro


texts: I am trying to use an external PA (MMZ09332B) for my transceiver IC, whose circuit with external components is shown below. I am struggling to understand the importance of the pin Pdc (pin 10). What does Pdc mean and what am I supposed to connect to this pin? I think Pdc is to make sure that proper biasing is applied to both the amplifiers in the PA. The datasheet for the PA says, power down voltage of 0V to 1 V (max) in bias on stage and power down voltage of 1.4 V to 2 V (max) in bias off stage. This is where I am finding it difficult about what to connect at the Pdc pin for the PA IC.


texts:
I'm new to circuits in general but have a basic understanding of it. However, it seems I can't wrap my head around the following issue:

(I'm using Tinkercad Circuits for trying out different approaches. All values come from the software's "multimeter".)

I have a very simple circuit, consisting of a power source, a transistor and a consumer. I want the transistor to output the same voltage as the input is. However, I don't know how.

The transistor logically consumes power itself. So having 12V in, the transistor has an output of about 10.8V.

Using a nMOS or pMOS didn't help either - at least in my approaches that is. I feel like I'm missing something very basic. Maybe something like a pull-up resistor?

How to make the output of a transistor the same as the input?

simulate this circuit – Schematic created using CircuitLab

Thanks!


texts:
I am trying to setup the SPI1 port on my PIC24HJ206GP256 micro. I have set the SPI1CON1 control register with 0x0020, the SPI1STAT control register with 0x8000 (i.e. turn on the SPIEN), and SPI1CON2 = 0.

At the moment a simple write to the SPI1BUF is implemented like this:

 void writeSPI1(char data){
     _SPI1IF = 0;             //set interrupt flag to zero
     SPI1BUF = data;          //write data to SPI1BUF
     while( _SPI1IF == 0);    //wait to flag to go high
 }

When the data is written, the SPI1IF should go high, but it never reaches this point so the program simply remains in the loop forever. So it seems no data will ever be clocked out of the SPI port through MOSI.

I have tried to make it work by setting TRISF = 0x0000, although I have read that the SPI port should take care of SPI pin configuration.

I am using a watch window to view the contents of the SPI1BUF.

I have tried with different settings within the control registers but have had no luck. Also have tried enabling the SPI1IF (IEC0: Interrupt Enable Control Register 0) and still the problem persists.

Are there any extra configurations I have forgotten, like some odd functionality of PORTF which takes precedence over the SPI port?


texts: I've designed a circuit that I've already had tested it on breadboard and it has worked fine. When I did it on a PCB a new issue has appeared. The voltage regulator (I'm currently using a 7805) gives right values at no load, but when I attach the Atmega328 on it the output voltage goes to 1V instead of 5V and input goes to 2.5V, instead of 12V at no load. I've already tried to change the capacitors. As specified on DS, after rectify it I put a 330nF on INPUT and another of 100nF on OUTPUT, both ceramics. Can someone, please, figure out what's going on?


texts:
I have a question about PCB copper planes with buck converters. For reference, I'm using the LM2673/LM2679. The parts are identical in layout, utilizing the DDPAK/TO-263-7 with the PCB tab being connected to the IC's ground pin (pin 4).

Initially, I'm laying out the device on a 2-layer board with the top plane consisting of signal traces only (so you have isolated copper planes on top alongside the traces), and the bottom plane being the ground. However, seeing as how the tab is connected to ground, it seemed more convenient if both planes were ground planes for both the SMT components as well as for thermal dissipation. If I were to use ground pours on both sides, what are some areas which are recommended to keep copper fills out?

EDIT: I found this TI thread that kind of delves into what I'm talking about. I'm using shielded inductors, and based on what it's saying, it seems to promote the idea of removing the top layer copper under the inductor (while keeping the bottom copper filled) in order to avoid EMI issues. So, even though my inductors are shielded, it seems to be better practice if I keep the area of the inductor free from copper. I was wondering if I should apply this practice to other components as well.

https://e2e.ti.com/support/power-management/f/196/t/538740?-DC-DC-Converter-Ground-plane-cut-below-power-inductor


texts: With IP-Cores without handshake protocol, how can I verify (VHDL assert?) their latency?

texts:
I'm using an IP-Core of Xilinx that was generated using the Vivado IDE's IP Catalog, specifically I'm using the Accumulator and the Multiplier IP Cores.

These cores have a latency configuration of 6 and 3 respectively and do not use a handshake protocol (ready-for-data, done, run signals). When I'm using the cores with a component instantiation, I need circuits to handle the latency delays.

How can I verify that the latency is actually 6 and 3 respectively? Imagine that the IP Core is updated and the latency is changed, or in my code, I have it backwards and assume latencies 3 and 6 respecively. I want to assert component'latency = 3, or something similar. What's the way this is done?


texts: Where is the circuit breaker connected in an electrical installation? Is it on the live line or on the neutral line of the generator? Why?


texts:
I have PCB from broken dishwasher and I would like to learn something from it. There are 6 smaller -  STMicroelectronics Z7S, 1A triacs and one bigger STM T4 3570. My guess is (cannot verify it now) that big one is used for Wash pump motor and smaller ones Lower wash arm valve, Drain pump, Salt valve, Water intake valve, Detergent door release.

At the bottom of PCB there are some LEDs connected to ULN2004AG - Darlington Array IC by their cathodes ( - ) . Other LEDs pines ( anodes(+) ) are short-circuited with small smd transistor  . Base of that transistor -> MCU and to make sense for me Collector of that transistor is connected to 5V.

But I have checked by multimetr and all of that 7 triac A1 (MT1) pin is short-circuited with this smd transistor to Collector. MT2s are board pinouts.

I have seen some schematic of triac connected to MCU but always Netural of ACmains was connected with ground of MCU

How that schematic ( 5V and Phase connected together ) can work without killing MCU and other DC parts?

[EDIT]

I have prepared some circuits :

"In this case, we choose to tie the MCU Vdd pin to the AC Mains HOT conductor."
Do we have to tie Vdd(5v) to ACMains HOT?
 We it can't be like that:


texts:
On my PCB, I have the Bluetooth module (ANNA-B112) on the top layer. Due to space constraints, I had to put some components on the Bottom layer of the PCB beneath the Bluetooth module. The main components are one LDO and a main BUCK.

I will be using a U.FL-R-SMT connector to connect an external antenna to the Bluetooth module.

Will there be any interference issues if I place component(bottom layer) beneath the Bluetooth module(top layer), even if I use an external antenna?

Please check the attached picture of my PCB layout.