texts: LEDs intermittently non-responsive to short multiplexed pulses after high reverse voltage?

texts:
Edit: added the schematic and an oscilloscope screenshot

I've a 24x16 grid of discrete through-hole red LEDs. The grid is in form of a grid of stripped wires about 50x75 cm in size with LEDs soldered on each intersection of the wires and the intersecting wires isolated from each other at the points of intersections.
The grid is driven by 16 PNP high side transistors for the 16 columns and 24 NPN low side transistors for the 24 rows, the transistors controlled by a LED driver chip.

The issue is that some LEDs would not light up sometimes or partially light up or flicker and this is not connected with particular rows or columns. I've checked the solder joints and I think they are fine.

Also when there's a LED that doesn't light up it starts to work after manually applying current to it using a 9V battery with a resistor and 2 wires and touching the LED with the wires so that it lights up. Touching such LED with a conductor or by hand also sometimes brigs it back to life. But the same LED stops glowing again later.

I've measured the waveform across the LEDs with an oscilloscope and there are short 1us or shorter negative pulses of about -20 V when the switching happens (this must be because of the long wiring of the LED grid itself and the wires connecting it to the driver board).

I've tried soldering a 100nF capacitor accross the leads of a LED that did reduce the negative spikes to 1V but it didn't help to remove this not lighting up effect so I'm not sure if this high negative pulses can be damaging these LEDs permanently or there's some other cause of this.

I also considered that possibly because each column of 16 LEDs has one high side driver the LEDs being connected in parallel can be causing this issue because of the slightly different forward voltages of the LEDs but a) the low side NPN transistors are in the constant current configuration with a resistor between emitter and ground b) a test with turning on one row at a time in turn so that there's only one LED turned on at any moment in time time shows the same problem.

Can these -20V short (1 uS) negative voltage spikes when applied to a LED cause such behavior so that a LED is permanently damaged but not destroyed completely so that it stops glowing intermittently?

Schematic (this shows one common + one row; there are total of 16 commons and 24 rows):

Oscilloscope screenshot (measured across LEDs on the same row; trace #1 (yellow) is a non-working LED, trace #2 is a working LED):


texts: Simulation difference between two similar OpAmps

texts:
I preface this with saying that at one time, many many years ago, I had taken some EE courses. I remember only a little.

I was simulating a simple non-inverting amplifier used in a DC setting as a refresher and I noticed that depending on which model OpAmp I used, I got very different simulator results.

I was comparing the two datasheets and I don't see a significant difference.

                           LM324         LF412
Parameter                Min / Max     Min / Max
Input Offset Voltage     ?   / 3mV     ?   / 3mV
Input Bias Current       ?   / 100nA   ?   / 200pA
Input Offset Current         / 30nA       / 100pA
Input Common Voltage     0   / V+-1.5V -11V/ 11V
Supply Current           ?   / 1.2mA       / 6.5mA
Output Source Current    20mA/ ?       ?   / ?

The LM324 and LF412 data sheets. I am using this summary as a refresher as to what all these terms mean.

The parameter that I'm not certain about is Input Common-Mode Voltage Range.

I believe, because of the "virtual short circuit approximation", that both inputs (V+, V-) are at roughly the same voltage most of the time. So I don't think this affects the simulation, but I'm not sure.

All the other parameters appear to be within range of each other (or are in the pA/nA range so I'm ignoring them).

This is the circuit I'm testing. It's attempting to amplify the Vin voltage by 1.4 such that when Vin is in the range 0,5V DC then Vout is 1.4x higher in the range 0,12V DC (I'm aware that I will never reach 12V exactly).

Here is the simulation using the LM324. This is the expected output:

Vmax is orange

Vout is blue

Vin (the V+ input) is yellow

Here is the simulation using the LF412. This seems very wrong:

Vmax is orange

Vout is blue

Vin (the V+ input) is purple

alsoVin (the V- input) is yellow


texts:
I am using an ARM M based development board (1) from TI. I wish to extend RAM (from default 256KB to 256 KB+ 8MB)by following the provided reference design (2).

The design uses an ISSI DRAM IS42S16320D (3) that comes in a Surface mount TSOP-54 package. Gerber files are provided in the reference design. Instead of getting a PCB manufactured, can I make use of any TSOP-54 to X adapter such that the IC goes onto a perf board and in turn connect this protoype perf board to my TI development board ?

I've come across TSOP-54 (II) to DIP-54 SMT Adapter but don't quite understand how it works.

If it worth the effort to use adapters to eventually use a TSOP-54 package IC on a perf board and will there be any problems with operation ?

Could any one suggest if this is a good way to proceed or just get a pcb manufactured ?

(1): http://www.ti.com/tool/dk-tm4c129x

(2): http://www.ti.com/tool/tidm-tm4c129xsdram

(3): http://www.mouser.in/ProductDetail/ISSI/IS42S16320D-7TL/?qs=Fza4peKjXe%2FI0m31MwCZFQ%3D%3D


texts: Do ultrasonic transducers generate sound because of current, voltage, or change in either of those?

texts:
I have been working on a pulse generator circuit which will be used to drive an ultrasonic probe. In the circuit below, the 50Ω resistor is modeling the probe.

I have researched the piezoelectric effect, but different sources explain it in different ways. Some have said that they are activated by current, and others have said they are activated by AC.

Since I am using DC voltage pulses to control the transducer, I am wondering if this will operate as I require. PSPICE outputs the following graph for the circuit shown above, measured from the node above 50Ω resistor.

Am I correct in thinking that the piezoelectric crystals in the probe would only generate ultrasound during the change in voltage? Or would there be some ultrasound emitted during the high of 220V as well?


texts: Why does connecting Positive directly to Ground cause problems?

texts:
So I am extremely confused at this point. From my understanding, connecting a 5v directly to Ground will causes problems, but why?

A 5v battery is asking for 5v and x amount of current, but yet it cant handle that amount of voltage and current it asked for.

Does all the voltage need to be used by the end of the circuit to prevent problems?


texts: I twisted a L200CV in Pentawatt package; what kind of damage can I expect?

texts: I was installing a heatsink which didn't quite fit and after installing it, I noticed that I've twisted the L200CV about 5° when looking from above the chip. What kind of damage, if any, can I expect?


texts: Can only the master initiate communication in SPI whereas in I2C the slave can also initiate the communication?

texts:
Is it possible for a slave to initiate communication in SPI?

I thought due to the chip select i.e. NSS feature only master can communicate the communication. However, in I2C, the slave can also initiate communication by changing the RW  flag in the i2c communication. Is this correct?


texts: Why are transistors difficult to use in special cases such as >100 MHz operation?

texts: I have heard on good authority that transistors are difficult to use in certain cases, such as >100 MHz operation.  Why is this?  Are there alternate devices which might be preferable?


texts: Sending audio data in chunks using visible light communication

texts:
I am currently working on a visible light communication project. I have seen similar projects made by other people, for example:

https://www.youtube.com/watch?v=iUR-IB1mS1g

https://www.youtube.com/watch?v=n0f7blVJIIg&t=29s

But they all have one thing in common, that is the system needs a continuous light source to operate. If the light source is moved away or a hand is blocking the light path, the photodiode on the receiving end cannot detect light and the communication stops. To come up with a solution, I want to send data in chunks  so that even if the light source is moved away during transmission, the audio can still be played for another 10~15 seconds.

Below is a block diagram that illustrates my very rough idea:

A headphone jack is connected to a smartphone to get the analog signal of the music
Signal is amplified and converted to digital signal and sends to a microcontroller
To send data in chunks, the data should be recorded and stored inside a buffer
The mcu modulates the LED to send the data. I am using OOK modulation (so for example if a data value is 100, the binary representation is 01100100, then the LED goes OFF-ON-ON-OFF-OFF-ON-OFF-OFF)
Sensor receives the data, data is amplified and stored inside a buffer of the receiving end's mcu
Use a DAC and play the audio

So my question is: Is this the most straightforward way to achieve what I want? Am I going in the right direction and is there anything that can be improved? I know this question is very broad since I didn't specify the size of the audio, the sampling rate, the desired quality of the sound, the speed of transmission... list can go on. I am only aiming to send a 10~15 seconds audio file for now and the quality isn't the main goal as long as its recognizable.

Any suggestion and advice is appreciated!


texts: Why exactly is connecting/disconnecting circuits with power on dangerous?

texts:
Long ago I was reading about USB design and don't get one thing.

One advantage of USB is that it has optron decoupling and this makes connection/disconnection of powered on devices safe. This implies that direct (no decoupling) connection (as in older interface ports design) is somehow unsafe.

I read somewhere that some transient processes can happen on connection/disconnection and damage the circuits when there's no decoupling but can't find a simple explanation of what exactly might happen.

What exactly happens on connection/disconnection of powered devices without decoupling? What's some simple example of how damage occurs?


texts: How to use 3.3V gate MOSFET to drive two loads with common ground?

texts: I have two gpio pins (3.3V logic high) to control an LED indicator (includes 2 LEDs and one common ground). The supply voltage to turn the LEDs on is +12V. Is it possible to simple drive (3.3V logic from uController) the common ground device with two seperate P MOSFETs? If not, what circuits sequence I should follow?


texts: Are there fewer firmware chips in a mobile device compared with a laptop or a desktop?

texts:
For a conventional laptop or desktop computer, there appear to be many firmware chips in which malware might hide:

internal drives
network card
graphics card
sound card
embedded controller
BIOS firmware chip
VDU firmware chip(s)
etc.

I was wondering whether it might be the case that mobile devices, in contrast, generally only have one firmware chip in which malware might hide. Does anyone know?
Background
I am looking at processes where all firmware chips are faithfully re-installed／re-imaged so as to get rid of all potential firmware malware.


texts: Delaying clock pulses without adding (much) extra circuitry (CMOS)

texts:
I have a counter (74HC193) counting up with Qn outputs being decoded by a demultiplexer (74HC138).  My clock pulses (CP) are no less than 100 microseconds long and the interval between them is always greater than that.  The counter counts on the rising edge of CP.  I disable the output of the demultiplexer when CP is high by directly tying CP to the not-enable input of the demux, to avoid random/spurious demux outputs from going true while the counter outputs are in transition.
This seems to work well enough however I am aware of the race condition between the counter outputs changing and the demux output being disabled quickly enough (by CP rising to high).  I want to ensure that a spurious output on the demux never happens, given that CP rising is also what causes counting.  The outputs from the demux are used sometimes to cause latches to latch and unlatch, and those devices (eg. 74HC74) respond to very narrow pulses, which entirely explains my worries.
I have read the Texas tome on slow or floating CMOS inputs, and datasheets describing propagation times and so forth and I am not finding myself competent enough to penetrate all that without going back to college.  It is important to me to not expand the number of packages in my circuit, if I can at all avoid it.  Adding a two-phase clock, for example, would be going too far.
My instinct is to just slow something down with a series resistor, either counting on the natural capacitance and high impedance of a CMOS input alone, or by adding some extra capacitance.  I only need enough of a delay to solve the potential problem described above.  Delaying the clock input to the counter seems the most likely route to me; but then I read the aforementioned tome from Texas and had a doubt.  An RC solution slows down the signal, and any delay is just a consequence of that.
I also thought of simply immunising the inputs of any latches with a similar RC solution, and that is something I would like to do anyway.
So any general wisdom on slowing down or delaying CMOS logic input signals will be greatly appreciated as well as any on this specific scenario.
I should add that for sure my circuit will suffer from excess lengths of connections, random idiosyncratic sloppy design features by yours truly, and lots of other bad things.  This is partly why I am looking for a little bit of an extra security blanket with this race condition thing.  I should also add that I don't anticipate counting frequencies much higher than, say, 10KHz.  (which is why I don't mind slowing some things down, if feasible)
I should also add that between CP and the clock input (CPu) there are already a couple of gate delays through separate packages (74HC04 and 74HC00), and there are a couple of spare inverters laying around that could be given a mission.


texts:
I mocked up the circuit that eliminates the popping sound heard when the mic button is pressed on a mic cable. However, the signal that the capacitor is attached to, the other terminal to R || Switch to GND, does not go low even when I hold the button down. Essentially, the mic is not muting.

I see, looking around online, that the values used are 100uF and 100Kohm. How do I size the components down? Is this circuit possible with 0.1uF, 150ohms?


texts: If unmatched impedence signal radiate EMI, will it be also more susceptible to EMI?

texts:
Recently I've read some documents about cables impedence that says that external EMI may create noise where there's an impedance mismatch.
In the case of PCBs, with signals that lay on a solid ground layer, how much I should worry about this EMI if I've a small impedance mismatch that doesn't harm my signal quality? Is it something that I should care or this applies only on cables?


texts:
Question:

Normally I find Karnaugh Map of an expression from its truth table, but can we have Logic operation on two Karnaugh Maps ?

Update:


texts: How to set output resistance of an amplifier to be 50k

texts:
I need to build an amplifier using BJTs / resistors / capacitors.

It should have specific parameters (up to 5% error), and I’ve reached them all except for the output resistance.

The parameters are as following:

Voltage gain: 35 dB
BW: 6 kHz - 600 kHz
Bode gain slopes:

+40 dB/dec before intermediate freq.
-20dB/dec afterwards.

Input resistance: 57 Ω
Output resistance: 50 kΩ  ( 2 decades before and after intermediary freqeuency.)

I built the amplifier using CB as follows:

But I didn’t manage to get the right output resistance. I tried to use another CC/CE at the output.

But I wasn’t able to give it 50k output resistance and work at DC.
(I can use only +-5 V power supplies, so the currents I get are too low.)

What am I doing wrong? Is it even possible to do it using the amplifier I already built, or do I need to start from scratch?


texts: Mini Skee Ball - Detecting a ping pong ball

texts:
Background

I really want to do something with my raspberry pi, so I thought of a game that's a mix between skee ball and beer pong.  Basically, the build is a mini skee ball board (about 20x24 inches) without the ramp.  The player would throw ping pong balls from a distance (like beer pong) and try to make it into the holes.  The board would be padded so the balls don't bounce off, but would slide into a hole and down a return ramp that's below the board.  I want the holes to sense the ping pong balls, but I don't know the best way of going about doing that (cheaply, too).

Solutions

This is where I need help.  Which way of sensing would be best? Have any other ideas? I thought of:

Distance/Proximity sensor.  When the balls go through a hole, they're sent along a path that makes them go through a "lane" of the exit.  The proximity sensor would read how far away it is (its "lane") and from that reading I would know which hole it went through.

Cons are that this one is a little complicated, as it requires me to tunnel the balls as they fall down the ramp. I also don't know how much room a sensor would need to detect distances straight in front of it. It would register the ball late, which is not preferred. However, the plus sides are that it requires only one sensor and it wouldn't be prone to shaking the table.

Force-sensitive sensor. Use an analog (converted to digital because raspi) force sensitive resistor under each hole to pick up when a ball hits the area and get which cup it went into.

Cons are that I would need multiple sensors and a D-A converter, the ball might be too light to register, and could be prone to shaking to acquire points.  Pros are that it's faster feedback and would be fairly simple to implement.

Capacitive touch.  I could by a cheap board (MPR121) that triggers on capacitive touch and somehow get the balls to trigger them.

Cons are that I don't know how to get the balls to trigger them (help pls, ping pong balls are light). Depending on the setup it could be complicated and/or prone to shaking. Pros are that it's cheap and would probably trigger quickly.

I can give more information if needed (crude drawings of plans, etc.) or any other information.  I really want to make this a reality so help if you can or input any ideas of your own!

Thanks!


texts: Clock Shape Changes with Two O-Scope Probes

texts:
I have a Max V CPLD development board which has a 10MHz oscillator onboard. I hooked up CH2 probe to the output pin and then wrote a small VHDL program that output the clock to an external pin. I hooked up the CH1 probe to this pin.

My first question is, why isn't the waveform square?

Secondly, notice how the waveform changes shape when I disconnect the 1st channel? Why is this? The o-scope is a 50MHz 1GS/s Rigol.

OK, here's a picture with the probe set at 1x (right) and 10x (left) - I connected the probe directly onto the oscillator. Only CH1 was connected and I also found a ground near the oscillator. I didn't solder a wire, like before, but held the ground clip on the ground pad. It was a crude way but gave better results than with a wire. I also found the oscillator - it's the ACHL-10.000MHZ-EK. The max. rise time seems to be 10ns.

I think the biggest difference was made by connecting to the ground pad directly. But I'm puzzled - why does a wire or the distance between the test-point and ground make so much of a difference?


texts: Is Brownout Reset Circuit a standard or optional safety feature in an MCU?

texts:
I've been using STM32 MCU's without paying attention to the BOR circuit:

Some datasheets indicate that the device has a built-in BOR circuit but some doesn't include such an information.

Is it always a MUST to have a BOR circuit? Is it a standard feature nowadays which might be covered by some other feature (such as Power On Reset) or is it an optional safety measure where we must implement by an external circuit if datasheet doesn't explicitly state the BOR circuit existence?


texts: Does the MOSFET gate have an absolute maximum gate voltage?

texts:
Considering this full bridge circuit , if the bus voltage is about 400 v, Do I need a higher voltage at the gate to turn the mosfet on (to make the gate voltage higher than the source voltage)?

The datasheet specifies the maximum gate source voltage at +-20 v , Does that mean that I maximum voltage at the gate would be 420 v (for example) ? or would that destroy the mosfet ? and can I use a lower voltage than 400 v to turn it on ?

I haven't found any absolute value for the gate voltage in the datasheet and I'm kinda lost.


texts: measure capacity of a battery after charged

texts:
I have two AAA rechargeable batteries that claim to have 550Mha capacity. My first question is, how can I measure the Mha and make sure the battery is fully charged?

Second question and related somehow to the previous one:
I have a charger that reads DC 1.4V -- 80 -100Ma x2 (AAA) so I think it provides 100Mah (my batteries would take about 6 hours to complete charge if I'm not mistaken.

Thank you,

Matias.


texts:
I read somewhere that each time the signal strength doubles, the gain in dB increases by 3.

So because it says each time it doubles, it has to start from somewhere, it means 0 db should have some strength? So if that's true then we should still have some strength even at -3dB, right?

So do we have any signal strength at all at 0 dB? If we are e.g. one feet away from antenna can we receive anything?
How does 2.4GHz (IEEE 802.11b) frequency and 5GHz (IEEE 802.11A) play any difference in this?
I know that when you work with lower frequencies like 2.4 you can carry the signal further, so how does that make difference?
How do you calculate your carrier strength in terms of distance by having two parameters of frequency and gain(dB), and I am talking about directional antennas?
Like this one on Amazon 5GHz and 23dBi, how far can laptops receive data with this? And how can you scheme the antenna propagation pattern?


texts:
Today my 8-year-old son comes home from school telling me he learned about lightning rods, and he says, "What if we could capture the electricity from lightning and use it to power stuff?"  I'm aware of the limitations of capturing actual lightning, but I thought an at-home experiment could be fun.  I'd like to help him create something at home that could generate a small electrical spark, and then something else that could capture the energy from that spark.  Problem is, I'm not an electrical engineer and don't know how to design either of these things.  There's a store here in town that sells things like circuit boards and capacitors, and I could borrow a soldering iron from work.  I think if I could just get a materials list of what I will need, I could figure it out from there.

Can anyone give me some direction for how to accomplish this?


texts: Are there any drawbacks to this oscillator frequency multiplier circuit?

texts:
I'm trying to make an upconverter from 65 MHz to UHF band using a mixer; I therefore need an oscillator frequency around 375 MHz to mix with the 65 MHz base signal. I'm also trying to vary the oscillator frequency such that I can vary the upconversion from a final frequency of 420 MHz to around 450 MHz.

I found an I2C controlled oscillator that varies from 2.3 - 170 MHz that I'm hoping to use.

My intention is to NAND the oscillator with itself, producing a square wave of the same frequency, and then filter out the third harmonic to produce 3x the base frequency. Little has been chosen in the way of specific NAND gate IC or filter passives, but I wanted to see if anyone foresaw drawbacks or difficulties with this setup. Basic notion is below.

simulate this circuit – Schematic created using CircuitLab

Thanks!


texts:
I am working on a project for a client that involves developing a reliability test fixture that will be used for stressing the end test device (DUT). The test fixture is a PCB which has linear power supplies and some relatively low speed communications busses (I2C, SPI, etc) and will be subjected to the same temperature and humidity stresses as the DUT. We're planning to suggest discarding the test fixture board as that would be more cost effective and the customer is ok with this.

As part of the deliverables, we'll have to provide documentation that gives an estimate of the reliability of the fixture, currently we're running a simple heat soak test as per the DUT test spec on some known good DUTs provided by the customer and we are exceeding that spec (300hrs at 70℃ and 85% RH)

Here are the questions I have:

Any pointers on how we could run more tests to gain further confidence on our test fixture design? we would like to explore the possibility of using the fixture for multiple test cycles?
What metrics can we use? would MTBF be a good measure?
Any suggestions for good references that could help me with understanding reliability for electronics better, I'm quite new to this domain and would like to learn more?


texts: Variable Bit shift within 1 Clock Cycle (Verilog)

texts:
I have a 64-bit register that I would like to right shift n times, with 0<=n<=64, implemented as such

always_ff
   data[63:0] <= (data >> n);

I was just wondering what this would result in during synthesis/implementation. In other words, what type of hardware would the compilers infer from this logic? In simulation, the block diagram was only showing >>, which wasn't very clear. Thanks.


texts: What is the I2C ACK, and how do I detect it?

texts:
I am writing an FPGA driver in Verilog for a temperature sensor (datasheet available here). The communication protocol is SMBus, a close cousin of I2C. Now reading the datasheet, I understand that the ACK signal is composed of two parts (see page 10, figure 5):

First, SDA is driven low on the 9th clock cycle
Then, SDA is "spiked" (driven high, then immediately driven low) between the 9th and 1st clock cycles

This seems to contradict this tutorial where it is claimed that an ACK is simply done by driving SDA low (no "spike" is mentioned).

Is this "spike" actually included in the ACK signal? If so, how should I detect the "spike"?


texts: How to network hundreds of sensors over a serial connection?

texts:
So I'm looking for a way to connect hundreds (300-400) sensors (like an accelerometer) together over a serial connection to a micro-controller. The sensors would transmit about 500kbps each.

I've been looking at I2C, SPI, and CAN, but none would have the speed requirements to deal with the large number of devices.

The other idea I had was to split up the devices. For example, I would connect every 10 to a controller via I2C, then have the controller communicate over a faster communication standard such as USB3.0.

Any help is appreciated.


texts: Is there a rule of thumb for choosing polygon width?

texts: I am currently using the same width as the smallest wire inside the polygon, is this too small?


texts: How can I find the capacitance value changes that will result in linear tuning steps in a parallel LC circuit?

texts:
I've found articles that derive the shape of a mechanical capacitor plate so as to achieve linear frequency tuning for linear dial rotation as in each degree of rotation shifts the frequency the same amount.

I'm looking for how to derive the capacitance values for a binary switched array of capacitors to acheve linear tuning.

000 = all off
001 = Ca
010 = Cb

011 = Cc and so on, so that the frequency delta between 001 and 010 and so on is equal per bit.

I will set a bulk capacitance value to establish the center frequency when half the tuning capacitance is switched in. The steps would then be Cbulk, Cbulk+Ca, Cbulk+Cb, Cbulk+Ca+Cb and so on.

I am starting to think this may not be possible..


texts: Multiple different grounds in one diagram

texts:
Assume I have multiple electronic circuits and I need to display them working together. Each of them has a common ground symbol. However, the different grounds of the different circuits are not necessarily connected together.

Here's a simple example:

simulate this circuit – Schematic created using CircuitLab

As you can see, these are basically 3 indenpendent circuits. Of course they could be connected to each other via that one ground symbol, but they needn't be. E.g. in my case, it would be totally fine to connect the circiuits like this:

simulate this circuit

That would not be allowed if the grounds were connected. I then had a short circuit.

I know there are different types of ground symbols used for different purposes. But that's not the case here.

How do I distinguish individual grounds of the same type (e.g. regular ground) in one diagram?


texts: Negative feedback capacitor in Op-Amp comparator circuit

texts:
This is a part of a circuit of a big device. I'm interesting why need for C1 capacitor? OA2 is a general purpose opamp. Power supply for the opamp is +15V/-15V, sorry for mistakes in the picture.

simulate this circuit – Schematic created using CircuitLab


texts: Equivalent compensator of pid controller?

texts: As we know that pi controller is equivalent to lag compensator and pd controller is equivalent to lead compensator, so what will be equivalent of lead-lag compensator?


texts: Accessing magnetometer results in MPU-9250

texts:
I am interfacing an MPU-9250 to an STM8S207 microcontroller.
The MPU-9250 is accessed via 400kHz I2C. I have no isses with getting measurement data from the temperature, gyro and accelerometer, but can not get the built-in AK8963 magnetometer measurement results.
I can read out the AK8963 device ID correctly, looks like the Fuse-ROM calibration values are correct, but when I program the 0x0A (CNTL1) mode register to 0x01 or 0x02 (single or 8Hz measurements), the DRDY flag never transitions to 1, and the CNTL1 register reads back 0x03, which is a reserved value.

Any ideas what I am missing?

The initialization sequence I'm using is below, after configure_imu() is called, reg 0x0A from the AK8963 reads back as 0x03.

void configure_imu()
{
u8 status, mag_mode, mag_sense[3];
i2c_write_byte(MPU_I2CAddress, 27,GYRO_FULL_SCALE_2000_DPS); // Configure gyroscope range
i2c_write_byte(MPU_I2CAddress, 28,ACC_FULL_SCALE_16_G); // Configure accelerometers range
i2c_write_byte(MPU_I2CAddress, 0x37,0x02); // Set bypass mode for external I2C master connection

i2c_write_byte(MPU_I2CAddress, 0x6B,0x01); // Clock source is PLLGYROZ
i2c_write_byte(MPU_I2CAddress, 0x19,0x04); // Set SMPLRT_DIV to 0x04; this gives a 200 Hz sample rate when using the DLPF
i2c_write_byte(MPU_I2CAddress, 0x1A,0x03); // 42 Hz LPF
i2c_write_byte(MPU_I2CAddress, 0x6A,0x01); // Disable master mode and clear all signal paths
//i2c_write_byte(MPU_I2CAddress, 0x37,0x32); // Interrupts pin stays high until cleared, cleared on any read, I2C bypass
//i2c_write_byte(MPU_I2CAddress, 0x38,0x01);                                        // Data ready interrupt enabled

status = i2c_read(MAG_I2CAddress, 0x00, I2C_rx_rd_ptr++, 1);
if (status==0) return;
i2c_write_byte(MAG_I2CAddress, 0x0B,0x01);  // Software Reset Magnetometer
Delay(10000);
i2c_write_byte(MAG_I2CAddress, 0x0B,0x00);  // Deassert Software Reset Magnetometer
Delay(10000);
do { status = i2c_read(MAG_I2CAddress, 0x0A, &mag_mode, 1); }
    while ((status==1) && (mag_mode>0));
i2c_write_byte(MAG_I2CAddress, 0x0A,0x0F);  // Enter Fuse-ROM mode
Delay(10000);
i2c_read(MAG_I2CAddress, 0x10, mag_sense, 3);   // Read the x-, y-, and z-axis calibration values
i2c_write_byte(MAG_I2CAddress, 0x0A,0x00);  // Enter power-down mode
Delay(10000);
i2c_write_byte(MAG_I2CAddress, 0x0A,0x02);       // Magnetometer to enter continuous 8Hz measurement mode

}

Thank you all for the comments! In the next version of the board I replaced the MPU-9250, however widespread it is, with a Bosch BMO055. It's little help if you are already committed to MPU9150/9250, but if board re-spin is still an option for you, I highly recommend the Bosch part. It has the Sensor Fusion engine built in, generating the acceleration / heading / quarternion information right outside the box without any MCU post-processing - which is actually what I needed.


texts: Is there any physical device called current source?

texts:
I have seen both current source and voltage source in many electrical circuits (in paper). When it comes real hardware battery can be considered as a voltage source. Then what is a current source ?

Edit : With reference to some answers and comments here I will try to make my question more clear.

Voltage source (battery) produce constant voltage (for near ideal condition). Current through the circuit only depend on the load resistance. Is there any such current source devices other than circuits which virtually behave like current source by using a voltage source ?


texts:
I have an atmega8-au microcontroller and analog inputs on ADC6 and ADC7

It is written in the datasheet that

  ADC7..6 serve as analog inputs to the A/D converter.
  These pins are powered from the analog supply and serve as 10-bit ADC channels.

However, the pins are not defined in the avr-libc 2.0.0-1 header files iom8.h or iom8a.h.


texts: Low LED brightness using Arduino Pro Mini (clone)

texts:
I just received my Arduino Pro Mini (clone) and wanted to test run it.
I hooked it up as in the figure below (the 9V voltage source is a DC adapter connected to the wall), and loaded it with the code below.
The program runs fine, and it does what I want it too, but for some reason the LED is very dim. What can I do to increase the brightness? Lowering the resistance only slightly improves it.

Code:
void setup() {
  pinMode(6, OUTPUT);
}

void loop() {
  digitalWrite(6, HIGH);
  delay(1000);
  digitalWrite(6, LOW);
  delay(1000);
}


texts: Changing push-pull transistors in brushless motor driver

texts:
I am fixing a brushless motor driver that has 6 MOSFET transistors, 2 transistors for each coil.

I have found that SW5 is burned so I changed it and everything now works well. However, I have heard many people working in repair shops that they prefer to change the whole set of transistors or to change some transistors even if they work well because they claim that even working transistors could have got deteriorated due to the burned transistor. Or to make sure that all the new transistors have the same characteristics so they will open and close simultaneously to get the right control signals for the motor.

My questions are:

Should I change only the burned transistor or not?
If I should change the other transistors as well, can I change only SW2 and SW4 since those are the ones that complete the circuit with SW5 and the motor coil? (Changing the whole set of transistors is not cost efficient, it could be better to change the whole driver.)
Is there anything else that I should pay attention to so I can guarantee that the customer doesn't get back to me with another fault?


texts: Understanding Electric Shock Box Circuit

texts:
I have just bought an Electric Shock Box Kit.

I am trying to understand how the circuit works, so by doing reverse engineering I obtain the next circuit:

I don't understand how is generated the high voltage. As far as I know, transformers only work with AC voltages. The box uses 4 AA Batteries of 1.5 V each one, so I have 6V DC powering the circuit, I think this is where the TIP41CG power transistor  comes, but I don't understand how to interpret it. Also, the manual only says "Transformer", but not what kind of transformer is .. How do I know that?


texts:
There are 2 groups of resistors that look like they might be parallel, but in between them that's making me question if they actually are. The circuit looks like this:

If they are considered parallel, how would I take into account the resistor in between them?


texts: Phase angle and transfer function for low pass RL circuit

texts:
I am trying to do some calculations for a low pass LR circuit. (V out is across inductor). My input waveform is a square wave which has a period equivalent to L/R. I am having trouble making sense of my answers - any help will be much appreciated.

I worked out the transfer function T out to be 1/(1+jwL/R) which substituting the period in resulted in T = 1/(1+j*2Pi). If I work out the magnitude of T by taking the modulus I end up with T = 1/(1+(2Pi)^2) = 0.157. I.e around 16% which seems a bit low?
The bit which has me really lost is the phase angle. Phi = atan(Im(T)/Re(T)) which ends up as Phi = atan(-2Pi). Now if I do this in radians I get =-1.41 radians which is -80 degrees. If I do atan(-360) degrees I get -90 degrees?

These both suggest that the frequency of Vin is already starting to be filtered out by circuit (Because of low |T| and maximum phase angle lag) however I think there should be a pole at R/L which is the frequency of Vin currently. If my understanding is correct the pole should be the point on the bode plot when the phase angle is half and is the corner frequency for the transfer function. This would have a loss of 3dB which is 1/Sqrt(2) which is more like |T| = 70 not 15.

I hope someone can make sense of my problem and show me the flaw in my logic.
Many thanks!


texts:
I would like to understand how a toy helicopter works, and modify it.

For that, I want to identify the microcontroller it uses, but I have no idea…

The only thing I have, is 54281 written on it.

Do you have any idea or advice on how to identify it ?


texts: Controlling an RGB LED color range from an analog temperature sensor (no Arduino, etc.)

texts:
I'd like to combine an analog temperature sensor with an RGB LED so that I get a range of colors based on temperature.  Low temperature blue, high temperature red, with color fade between them as the temperature changes.  For sensors, perhaps something like http://adafruit.com/products/165 for the temperature sensor, and http://www.sparkfun.com/products/105 for the LED.

It would be trivial to do this with an Arduino, but I'm trying to think of how to do this with some basic, low cost electronics - some way that I could make dozens of these and run them off something like a coin cell.  I'd like to spread them around in an environment and get a "light map" of temperatures when viewed in the dark.

I imagine doing something like this...

Analog temperature sensor output from 0.0v - 1.0v translates into the blue channel input going from 3.0v to 0.0v (bright blue to dark), no output on temperature voltage > 1.0v

Analog temperature sensor output from 0.75v - 1.75v  translates into red channel from 0.0v to 3.0v (dark to bright red), no output on temperature voltage < 0.75v.

The effect would be a bright blue light at the coldest temperature, that would eventually change to a bright red light at warmest.

Any thoughts on how this could be done in a low-cost/simple way?


texts: Best IDE for 32-bit microcontroller on Linux

texts:
I'm choosing a 32-bit microcontroller to implement a Kalman filter.

I am very attracted to the Atmel Studio 6 IDE. However, it only appears to run on Windows.

Could anyone suggest a good Linux IDE?

Otherwise, I think I'll go with Atmel Studio 6 IDE in a virtual machine.

Many thanks in advance,


texts:
USB IF has specified tests for devices with BC1.2 Ability.
I am checking their original literature on the matter but it's just too complicated for my understanding. is there any link on these tests or example somewhere that someone can help with?


texts: Methods for measuring cable path loss in RF Testing

texts:
I have been reading about various methods to perform a Cable Path Loss for RF Testing but not being a core RF person, I needed some insights on how it is done in Field or Lab. Here is my understanding so far:

Method1: Signal Generator + Power Meter
Generate about 0 dBm of power from the Signal Generator and measure the same on the Power Meter e.g. assuming 10 dB pads + cable loss 5 dB = -15 dBm (this the total cable path loss).

Method2: Network Analyzer
Connect the 2 ends of the paths to Port 1 & Port 2 of the Network Analyzer and measure the S21 parameter.

I kind of get the idea of Method 1 but do not understand the Method 2 much.


texts:
I have got a NFC key to enter in my room and i want to make a copy of this key in case of loss. I read the nfc tag key with my nexus 5 with Broadcom BCM20793M NFC controller. The phone reads the tag and retrivies all the infos but when i try to copy the tag it gives an "Error reading the tag" message. The tag is a  NXP MIFARE Classic. I read that it is not compatible with the newest chips so i wanna buy an Arduino NFC reader to read and copy the tag.

Might it works?

Below all the infos retrieved from the nfc key:


texts: Why does a synchronous motor run at synchronous speed if we reduce excitation to zero?

texts:
It is stated in the textbook I'm studying that if we reduce the excitation current after the rotor has reached synchronous speed , its speed will remain constant even if the excitation current becomes zero.

I know that the reason the rotor runs at synchronous speed is because the poles created by the excitation current are attracted to those of the stator. If we reduce the current to 0 though, there are no poles on the rotor to be attracted.

So how does the motor still run at synchronous speed?


texts:
I have one circuit ( Circuit A) , transistor used is BCP56-16T1G, R1 is fix load of 500 ohm. I am measuring output at VF1 , that comes to around 19 V, I simulate the same circuit , i found the Vf1 is actually come 19 V in simulation too.

And as per calculation too it should be come
24= 10KIb+Vbe+R1(Ic+Ib)
24= 10KIb+ 0.7+500(100*Ib+Ib)   ( since Ic=Hfe*Ib)
so finally Ib=385uA
so Ic= 100*385 = 38.5mA
Drop across R1 = (38.5+0.385)*500 ohm =19.442 Volt.

problem is I need VF1 to be near 24V. off course it will go above 23.3V. but i am getting only 19.4V, and r1 is fixed , so only thing i can change is base resistor. Transistor data sheet does not give max base current limit. but they give max collect current. so i can see max base current will be = 1A/Hfe= 1000mA/100= 10mA. So i try to reduce the base resistor to 10ohm , and I got VF1 near to 23.2V( which I desire circuit B).

So will this Ok to reduce base resistor to this much lower value , is it safe for transistor also.


texts: timestamp generator register location on Cortex-M4 (PSELCTRL CNTCR)

texts:
I am trying to find the location of the register where the timestamp generator can be enabled on a Cortex-M4 processor.

In the CoreSight SoC Technical Reference Manual on page 3-210 it is mentioned that the register (CNTCR) is in the PSELCTRL region (see image). However, I am not able to find the base memory address of this PSELCTRL region.

Can I find this address somewhere the ROM table that indicates the implemented debug components? But then how do I know which ID it is?

Or is it defined in some datasheet?

Thank you for any help.


texts: How does a "break" in the neutral wire enable it to reach the full line voltage?

texts:
The answer to Is the neutral wire considered safe? states:

  When everything is working correctly, it should be at most a few volts
  from ground. However, and this is the big gotcha, if there is a break
  in the neutral line between where you are and where it is connected
  back to ground, it can be driven to the full line voltage. Basically
  in that case you are connected to the hot line via any appliances that
  happen to be on in that part of the circuit. Those can easily pass the
  few mA it takes to kill you.

And something similar is stated in an answer to this question:

  A second problem with connecting the ground to the neutral happens if
  your neutral wire breaks between the outlet and your service entrance.
  If the neutral breaks, then plugged in devices will cause the neutral
  to approach the "hot" voltage. Given a ground to neutral connection,
  this will cause the chassis of your device to be at the "hot" voltage,
  which is very dangerous.

Can someone shed light on this behavior? Specifically, how a break/disconnect in the neutral wire can suddenly cause it to have full voltage?


texts: How can I mitigate risk of electric shock?

texts:
I want to start a new project and build a PC in an antique style radio. The back of it says "CAUTION RISK OF ELECTRIC SHOCK. DO NOT OPEN"

It's just a 120V 60Hz 8 watt radio, but this warning has me wondering how to discharge the thing safely. What part of the board does this warning pertain to? The transformer?


texts: The actual battery discharge time through LED?

texts:
Initially I used a 9 V 170 mAh battery for powering a 3 W LED which was rated 9 V and 333 mA. Calculating the power consumption of the battery based on how long the LED light will last came to around:

(9*.170) Watt hours/(9*.333) Watts = 0.51 hours.

LED Specs,

Battery specs : http://www.amazon.in/Duracell-Rechargeable-170-mAh-Batteries-Pack/dp/B0002FQXJK

However the LED lasted for more than one hour, infact it was glowing for more than 6 to 7 hours before it became appreciably dim.

I foresee this to be somewhat similar to this diagram below where the left hand side estimates the theoretical value at full discharge and the right hand side is the observed value of the run time of the LED. How do I find this observed run-time through calculations or datasheets?

How do I calculate this value before it becomes appreciably dim?


texts:
Note-This is not a homework problem,my question is different.I am currently confused understanding some basic behavior in a circuit.

Question-Why A is not 10 volts and B 0 volts?What stops Point A from having voltage 10v?


texts: How to run Small Brushed Motors for Quadcopter with bare Atmega328 microcontroller?

texts:
I am trying to make a Nano Quadcopter using my Atmega328 microcontroller powered by a 3.7v 600mAh Lipo battery. I am using very Small Brushed Motors. If I directly connect motors to PWM pin of Atmega328, it will fry up my Atmega.

My question is How can I connect motors to PWM pin of Atmega328 without frying up my Atmega?

I saw many similar articles but none could give me the solution.

The motors I am using are:
http://www.amazon.com/Hubsan-Mini-Quadcopter-Spare-Motor/dp/B00B3RO0GE


texts:
I am new to electronics and am trying to create a basic circuit that needs a 5V 3A output.  The input will be between 3.4V-4.8V and the current will be around 1-2A.  I've been looking around and I can't find an IC or anything that explains how to boost voltage and current in a circuit.  I'm wondering if anybody can help explain what I need to do to get my desired output or point me somewhere that can help me.

-Ben


texts: What better options are there than the LM1893 for powerline communications?

texts:
I'm looking to build a home automation system which uses the powerline to carry the data between nodes.

I have an old design based on a combination of LM1893, HC123 and 8748, but the slave board is just too big to fit inside a standard UK light switch backbox, so I'm thinking of trying to shrink the design. A PIC should be a suitable replacement for the 8748 and HC123, but I wonder if there is a better option for the powerline comms side than the existing LM1893.


texts: How to change the top directory in LTspice?

texts:
I installed LTspice in C:\Program Files, and when I go to "search components", the top directory is C:\Documents.

How can I change my top directory?


texts: Problems adding a component in Eagle CAD

texts:
I'm trying to draw a circuit diagram using Eagle CAD (v 6.5...), but one of the parts that I want to use isn't coming up in the component library. I know the diagram for the component is available since when I click "open" on the related library and browse to it it's there and I'm able to open and edit the part.
Does anyone have any advice as to why I can't browse to this part from "Add", and how to get the part?
It's an INA101HP (the part that's available is INA101_G, which has a close enough symbol for my purposes), which is in the Burr-Brown library (although if I expand the dropdown to look at the contents of the library the part isn't there....)


texts:
I'm not an electronics students, I was doing erasmus for my chance I got electronics education, I have a project to complete I've made 9 of 10 exercises but I'm unable to understand what this question asking me to do:

"Design a natural binary code code transcode (3bits) for the code +3 (excess3) (4bits). In the selected simulator (best is falstad) perform a working system."

Can someone explain to me what it means?


texts: Choose regulator for 12V to 5V with 3Amp

texts:
I need help on choosing type of regulator base below design requirements

Design Spec:

Input Voltage = 12V

Output Voltage = 5V

max Current = 3A

Power (12-5)*3 = 21W

EX: Without heat sink 60C/W (lm1084 )
So: 21W*60C/w = 1260C which is out of questions

So what is best option regulator with budget of under $3 (for Qty 1) and must be surface mount

Main concern is the heat generated by the regulator


texts:
My appplication require mosfets to switch between two power sources from adapter to batter source and battery to adapter source. There is a confusion in my mind relating to turn on / turn off time of mosfets. Turn on time of mosfets is significantly smaller then turn off time due to its physics. My questions is if a lower mosfer is not switched off and upper mosfet gets switched on then current might flow from first power source (adapter) to second source (battery) through lower mosfet.In this case circuit can malfunction, am i right. :)

Regards;


texts: Need help identifying an integrated circuit

texts:
Pulled from a large tube TV, this one is a real head scratcher. I think it's an RCA chip but all RCA chips I've see use a different part naming scheme (for example CAxxxx).

It's like the parts RCA A23 346-1, and the RCA A23 1101-01 but there's no record (I can find) that lists RCA making parts of this series.

Can anybody identify the IC from the picture below?


texts: I am new to stm8s series of microcontroller. I want to program stm8s003f3p6 via UART but there is no inbuilt bootloader in it. So is it possible to burn custom bootloader? How should I start? Is there any reference?


texts: MOSFETs or BJTs for using as switch for audio signals

texts:
I was wondering which component is better for using as voltage controlled switch for audio signals (e.g.  music signal from mp3 player). Should I use MOSFETs or BJTs? The max rail voltage is approximately 6 V?

I cannot use any components other than BF199 BJT, IRF3205 MOSFETs, or STP16NF06L MOSFETs. My audio signal is DC biased so it does not go into the negative region.

Edit: You stated that the transmission gate chip is made out of MOSFETs, so will MOSFETs be better for minimizing distortions?


texts: How to Design D flip flop using T flip flop?

texts:
I don't know how to convert flip flops to each other but i know with any flip flop you can make all other flip flops.Please help me to how design it with specific way and explain step by step.Are there a general way to designing this type circuit?

thanks for your help


texts: USART DMA misses the input string sequence

texts:
I configure my DMA in Normal mode. Here is my code:
void DMA1_Channel3_IRQHandler(void){ // USART3_RX
        unsigned char CheckSum[2];

        Var1=Var1+1;
        if(Var1>1000){Var1=0;}

        if(Buffer[0]==89 && Buffer[26]=='\n')
            {

        Var2=Var2+1;
        if(Var2>1000){Var2=0;}

            }
            DMA_ClearITPendingBit(DMA1_IT_TC3);
            DMA_ClearITPendingBit(DMA1_IT_TE3);
            DMA_Cmd(DMA1_Channel3, DISABLE);
            DMA_SetCurrDataCounter(DMA1_Channel3,sizeof(Buffer));

    }
void EXTI9_5_IRQHandler(void){

    if (EXTI_GetITStatus(EXTI_Line5) != RESET)
            {
                if(GPIO_ReadInputDataBit(GPIOA,GetPosition)==0 )
                    {
                            DMA_SetCurrDataCounter(DMA1_Channel3,sizeof(Buffer));
                            DMA_ClearITPendingBit(DMA1_IT_TC3);
                            DMA_ITConfig(DMA1_Channel3,DMA_IT_TE, ENABLE);
                            USART_ITConfig(USART3, USART_IT_ERR, ENABLE);
                            USART_DMACmd(USART3, USART_DMAReq_Rx, ENABLE);
                            DMA_Cmd(DMA1_Channel3, ENABLE);
                            GPIO_ResetBits(GPIOA,SendSignalPosition);
                    }
                else
                    {
                            GPIO_SetBits(GPIOA,SendSignalPosition);
                            DMA_Cmd(DMA1_Channel3, DISABLE);
                    }
                            EXTI_ClearITPendingBit(EXTI_Line5);
    }
}

Before each transmission, The transmitter change the PA.5 to low level , and if the receiver changes its SendSignalPosition pin(start DMA), the transmitter start transmitting and wait for 50us after all bytes being transferred.
This code works fine until I send some packages to the transmitter with DMA(TX) from the receiver. After sending some packages, the DMA looses the input sequence. I checked the variable Var1 and Var2 and I found out that Var1 is increasing ( the DMA is collecting the input bytes) but Var2 doesn't change after losing the input string sequence.
I need to know why this is happening while before each transsmison I disable/enable the DMA.


texts: Variation in output voltage of opamp over time

texts: When i assemble the attached circuit in breadboard and switch on the power supply, the desired output is obtained for the initial 10seconds after which the output doubles. What may be the reasons ?


texts: Old Sears Paint Sprayer In-line Switch Question

texts: I have an old Sears paint sprayer compressor my late father gave me.  It's model number 106.151210.  According to the data plate, its 115V, 7 amps.  It was sitting in the garage and one of my children or my spouse either ran over or stepped on the plastic in-line on/off toggle switch and crushed it beyond repair.  The switch was a Leviton 12A-125V switch that was original to the sprayer.  Up until the switch was destroyed, it worked great at pumping up bike tires, mower tires, etc. and I'd like to fix it since my dad gave it to me.  Replacing the switch doesn't seem too hard, but I am having a lot of difficulty finding an in-line toggle switch to replace it with that appears to be an equivalent switch.  Everything seems to either be a 3A or 6A 125V in-line switch.  Do they even make 12A-125V in-line toggle switches anymore, and if so, where can I get one?  I can't seem to find one online or at the big box stores.  As an alternative, would the 6A 125V work?


texts: Resolving Node Address Conflicts (Lin 2.X diagnostics)

texts:
Section 4.2.5 of the LIN 2.1 spec provides a system for assigning new NADs to slave nodes. The stated purpose is

  To resolve conflicting NADs in LIN clusters built using off-the-shelves slave nodes or reused slave nodes.

The assign NAD message takes the following form

|     NAD     | PCI  | SID  |  D1  |  D2  |  D3  |  D4  |    D5   |
| Initial NAD | 0x06 | 0xB0 | Supplier ID | Function ID | New NAD |

My question is this: A reused slave node will have the same initial NAD, supplier ID, and function ID (this is required by section 4.2.1). How does this message only address one slave node, instead of all the identical slave nodes with matching data?


texts: Will my square pad short if the pour isolation is too small?

texts:
How do I get the pour to isolate the pad and not the drill here? I'm assuming the square pad goes all the way through and will short my second layer (in teal). Am I correct?

update: Confirmed! I put a pour on the top layer and it isolated the pad.


texts: inverting amplifier with reference voltage

texts: I am trying to design an op amp with ref voltage of 1.5V and input given to inverting side is 2.5V. Rf = 20 ohm and Rin 10ohm. i want the output voltage to be 1.5V(that is the reference voltage. How can i proceed to get it. Please help


texts: How OPA333 withstand 400V bus without burning in this current sensing application?

texts:
I went through following  app note, where OPA333 is used in 400V bus current sensing application,
also i have seen current sensor which have term called common mode voltage, which is specify the max voltage that can be applied to sensor inputs (current amplifier).
OPA333 does not mentions anything like that,
I don't understand how OPA333 withstand 400V on its input terminals without burning up?


texts:
I would like to design a device with opamp LM324 operating at roughly >5V. The device has to manipulate a signal on +/2.5V (Vpp:5V, DC balanced).

If I want it to work without a split supply, can I use a 2.5V offset to bias the signal? (I understand that the Vdd of opamp should be at least 7V for fear of saturation).

Furthermore, is the diode necessary? In previous trials I found that when LM324 sinks current, output goes to saturation. Or did I just do something wrong?

ps forget about the pinouts number. I just randomly pick a opamp symbol.


texts: In field controlled dc motor, why does the armature current remain unchanged even if it is affected by field flux?

texts: Basically in a field controlled dc motor, the armature current is kept constant (via some constant voltage source) while the field current is varied which will vary the field flux and interacts with the armature of motor and produce rotation. But why does the armature current not change when flux interaction is there with the armature and voltages are  flowing around the motor. How does the armature current remain constant. Does the speed of rotor changes to bring the armature current back to the constant value?? What causes the armature current to not change from its constant value?


texts: How do i completely discharge a capacitors entire load in a fraction of a second?

texts: I'm trying to build a tesla coil, and it seems like the capacitors in tesla coils drop their entire load quickly. I tried researching, but i could only find how to safely discharge capacitors. I want to store up the electricity in the capacitor, and then release it all in a very short period of time. Could somebody tell me how I would wire it to do that?


texts: Help identifying tantalum capacitor without EIA capacitance markings

texts:
I purchased some Samsung PM953 NVMe SSDs from an eBay seller.

Unfortunately one of the SSDs has failed power loss protection capacitors and while functional, operates in a fail-safe mode at severely reduced performance barely faster than a traditional hard drive.

The markings on the tantalum capacitors do not appear to follow the standardized labeling for voltage/capacitance. Given that the SSD is from Samsung, I don't believe these are knockoff parts, maybe just a capacitor manufactured by Samsung themselves.

The top line on the capacitor is always 150, and the bottom line is either: C6O, C63, or C68.

The dimensions are (LxWxH): 7x4x3mm, which I think corresponds to an EIA 7343 package.

I measured with my multi-meter and it appears there is 12V across the capacitor. But my multimeter is RMS so I don't know if that's the true voltage or if there is a switching frequency at play here impacting my measurement.

I would appreciate it if someone could decipher what these markings mean so I can order replacement capacitors.


texts: Load sensor - to sense/track a ball movement

texts:
Wondering if anyone can give me some directional steer on a project I’m working on for Uni.
In short, My team are working on a project where we want to track the movement of a croquet ball from one shot location on a training mat to another location through the goal.
We’re thinking the best thing might be to use two load sensors that might be linked. The weight of the ball on sensor 1 would have the sensor in “ready” mode, once the ball is hit the sensor would Activate the second sensor which would detect when the balls weight is on it. The objective is to track a couple of things, the goal scored, the speed of the shot and maybe accuracy depending how big the sensor pad might be.
As you can probably tell I’ve pieced this together from some google searches. My main question is would two linked load sensors be the best thing for this? To allow me accurately track the croquet balls movement from one location to another on a fixed training mat?
Thanks for any answers in advance : )


texts: Where is electrostatic potential energy stored in a capacitor system?

texts:
We know,
$$U = \frac{ \epsilon_o}{2} \int_{\partial S} |E|^2 \mathrm{dV}$$
Now, suppose you have a capacitor system of the geometry as shown below,

I know energy is stored between plates of a capacitor, however I have recently came across questions related to an exam which I'm writing where I have to find the region which contains half the energy. For example one of the questions I encountered was being given a cylindrical capacitor, when the capacitor is fully charged, where the region of radius 'r' where half of the potential energy lies?
So, for this question I was confused because there could be many such cylindrical volumes which contains half of capacitors energies. The answer to questions involves finding the cylindrical volume having axis as axis of cylinder, but, how would one proof this is the only such cylindrical volume which contains half the energy?


texts:
simulate this circuit – Schematic created using CircuitLab

Original schematic

Could anyone offer some insight on how to solve this circuit? What I've been doing so far, is only producing a wrong answer... I've been getting that V_A =  15 (which is wrong). Also I think V+ is = 0 since the node below 3 ohm is grounded...
Any help on how to start solving this?


texts: How to add header file for PIC24F08KL401 in MPLAB on MAC

texts:
How can I add header file for PIC24F08KL401 in MPLAB X IDE on MAC?

I have found few tutorials how \ where to find these files ('PIC24F08KL401.h') for example on windows, but none on how to do it on MAC OS.


texts:
This question is related to who knows how to design a thermal management. I started learn to do this, at hobbyst level.

So, this is the assumption of the situation:
When someone design the thermal handling of an electronic component (let's say an average IC), briefly its starts from the max junction temperature and goes up to the ambient removing the kept heat from the initial temperature, due to the thermal resistance. Eventually, in order to achieve compatibility with a given ambient temperature, with an equation can devise the thermal resistance of the heatsink.

For example, Tj=130°C, Ta=30°C, P = 2.3W and the various thermal resistances from junction to ambien WITHOUT the heatsink one are in total 17°C/W.
At 30°C of Ta, I need an heatsink of ((Tj-Ta)/P)-17°C/W = 26.5°C/W.

Now, I need few clarifications (assuming what I said unitl now is roughly correct...).

Clarification 1: this design will not allow the system to be used in ambient which is higher than 30°C (using only convection). Correct?

Clarification 2: the temperature of the surface of heatsink should be higher than 30°C? Measurements were indicating an heatsink temperature higher than 45°C at Ta = 20°C, so I'm supposing the answer is yes. But how to calculate them a priori, to make the proper controls?


texts: Low voltage shutdown with regulator using microcontroller

texts:
I'm using a lithium polymer battery with an LDO regulator. I want the regulator to shut down when the battery voltage gets too low. I'd prefer to monitor the battery voltage using a microcontroller that's already in my circuit rather than adding a separate voltage supervisor or comparator to control the regulator's Enable pin.

The problem is that the microcontroller is powered by the regulator's output VDD, so before the regulator is enabled, the microcontroller is off and its GPIO pin can't control the Enable pin. The battery's on/off switch is an SPDT switch and not momentary. Is there a solution to this that would "cost less" than adding a voltage supervisor/comparator to control the regulator's enable pin? And not adding a momentary switch? I know this won't work:


texts:
I'm trying to build some of the above mic amps inside the dotted line labeled CASE. The MFG will not sale them to me.
Can anyone identify the part labeled M-4 AMP??? The schematic is a David Clark headset that plugs into a David Clark inter comm system.


texts:
is it in general possible to implement a frequency doubler completely on FPGA? I saw some implementations on google by delaying the input and XORing it with the original. But they also say that this method is not reliable, and we may not achieve a 50% duty cycle output. I do not want to compromise on duty cycle because i may need to use the doubler 3 times to achieve a x8 frequency

The input clock undergoes a +/- 5% jump in frequency (from 13.56 Mhz) every 30 us.

I tried using a DCM - while the input to the DCM jumps at an instant, the output from the DCM gradually drifts to the required frequency over a span of 20 us. This timing is unacceptable because we jump in frequency every 30 us and we cannot have drifting clock for 20 us of 30 us.

The input clock comes from an external DSP processor, using two DDS (Direct Digital Synthesis) blocks to generate the 13.56 Mhz signal on two ports. The DDS jumps the frequency of the 13.56Mhz every 30 us and also varies its phase from -45deg to +45deg, whilst the other varies phase in the opposite direction. These two 13.56 Mhz signals are enter the FPGA domain.

The FPGA produces 8x signals from these two inputs, totally 16 in number and varying in steps of 45 degrees wrt each other. Currently the FPGA uses a DCM and flip flops to do this. The 13.56 Mhz is fed to the DCM and 8x clock comes out of it. Both the input to the DCM and the output from the DCM are fed to a phase shifter module which shifts the input clock by the period of the 8x clock (45 degrees). All this works fine without frequency jumping but fails due to frequency jumps.


texts:
I'm trying to figure out the voltage of DDR_VREF below? I know it should be the half of 1.5V i.e. 0.75V but how? Can someone in detail explain each step to the arrival of the result of DDR_VREF?

I just know the basic calculation of electronic schemas. But I haven't seen a schema as below before. Thus, I don't know how to get the result of DDR_VREF


texts: Setting GPIO pin sate before initialization

texts:
I was going through ST Microelectronics code and found the following code

/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1, GPIO_PIN_RESET);

/*Configure GPIO pin : PA1 */
GPIO_InitStruct.Pin = GPIO_PIN_1;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

The pin 1 of port A is set to low before initializing the pin.

I was wondering if this method is allowed? Not specific to ST Microelectronics but any vendor offering similar solutions.

If method isn't allowed what will be the state of the GPIO pin?

I went through these questions but they don't answer my query this and this.


texts: DC operation for IRFZ44 mosfet, SOA curve, max current at 40V?

texts:
I have built an electronic load. At the time I did not understand the SOA curves. Now I find the IRFZ44 datasheet does not have the DC curve. Any idea what the max current might be at 30V and 40V so as not to cause damage? Otherwise, I may have to change it all to a 2N3055 (and make a mess).

The electronic load does work @ (badly smoothed) 40V DC 3A. (I have tested it only for few seconds at this power). However, I have tested it a lot at 15-25V and 1A. Seems to hold up well. I have a large heatsink with a fan on it. Case temp does not go over 40C.

(The IRFZ44N and IRF540 seem to be the only power mosfets readily available locally, so any pointers about the DC capability of either will do.)

Added on 2018 APR 13: Well, the mosfet died. So to answer my own question... The IRFZ44 will happily work at slightly more than 20V (maybe 23-24) at close to 2A (I tested numerous times at 1850mA). I tested today at 42.5V, and it died shortly after reaching 400mA (maybe upto 500mA, I'm not sure). It was not even warm, maybe only at 35C or so. So that's that. In hindsight, I should have added a couple of resisters upstream of the drain to lower the voltage across the mosfet. It should probably tolerate a lot if the Vds is limited to only about 10V.

This also means the SOA curves in the datasheet are probably not all correct. Extrapolating the points where the mosfet worked and did not work (the imaginary DC operation line) does not give me a line parallel to the other lines at difference pulse widths. So, they too may in reality be curving downwards much more at higher voltages (i.e. a curve instead of a straight line in the datasheet).

So there... my 30 cents worth of IRFZ44N...

Added on 2018 APR 15: Another mosfet died. This one failed with only 2.5-3.5V at about 2.4-2.5A. So that probably explains the missing dc line in the SOA curve. This mosfet will fail at above 2A at all voltages below 20V. The dc curve is a flat line at about 2A till 20V, and falls sharply after that to 400mA at 40V.


texts: What is the most common way ethernet ports experience harware failure?

texts: Modern electronics are incredibly reliable, however, I have had about 5 ethernet routers experience hardware failure on one or more ports on my home network.  Is this unusual, and if it is, what precautions can I take to avoid it.  If it is "common", is there a component in the system that is prone to failure?


texts:
I've been struggling to understand how filter capacitors specifically low pass filters achieve their output signal waveform. If I take the example from https://www.electronics-tutorials.ws/rc/rc_3.html:

The output waveform for the right side looks like a saw-tooth/triangualr type waveform. I'm confused why it doesn't look something like this though:

My confusion stems from the thought that measuring across the right side there its in parallel with the capacitor and if there is a high signal across the nodes going to the capacitor then how come we wouldn't see that on the measure points to the right of the capacitor?


texts: Please explain these RLC transient equations

texts:
simulate this circuit – Schematic created using CircuitLab

From my book

Assume the capacitor is charged to a voltage V0, and then at t = 0, the switch is closed.
\begin{gather*}
\frac{1}{C}\int Idt+IR+L\frac{dI}{dt} =0\\
\frac{d^{2} I}{dt^{2}} +\frac{R}{L}\frac{dI}{dt} +\frac{1}{LC} I=0\\
 \end{gather*}
select

\begin{gather*}
I=I_{0} e^{\alpha t}\\
\end{gather*}

substitute into the differential equation gives.
\begin{gather*}
\alpha ^{2} +\frac{R}{L} \alpha +\frac{1}{LC} =0\\
\alpha _{1} =-\frac{R}{2L} +\sqrt{\frac{R^{2}}{4L^{2}} -\frac{1}{LC}}\\
\alpha _{2} =-\frac{R}{2L} -\sqrt{\frac{R^{2}}{4L^{2}} -\frac{1}{LC}}\\
I=I_{1} e^{\alpha _{1} t} +I_{2} e^{\alpha _{2} t}\\
\end{gather*}
In this case
the constants can be evaluated from a knowledge of I(0) and dI/dt(0). Since the current in the inductor
was zero for t < 0, and since it cannot change abruptly, we know that:
\begin{gather*}
I( 0) =0\\
\end{gather*}

The initial voltage across the inductor is the same as across the capacitor, so that:

\begin{gather*}
I_{1} =-I_{2} =\frac{V_{0}}{( \alpha _{1} +\alpha _{2}) L}\\
\end{gather*}
The solution for the current in the series RLC circuit is thus:

\begin{gather*}
I=\frac{V_{0}}{( \alpha _{1} -\alpha _{2}) L}\left( e^{\alpha _{1} t} -e^{\alpha _{2} t}\right)\\\end{gather*}
Case 1: Overdamped
For R2 > 4L/C, the quantity under the square root is positive, and both values of α are negative with |
α2| > |α1|. The solution is the sum of a slowly decaying positive term and a more rapidly decaying
negative term of equal initial magnitude. An important limiting
case is the one in which R2 >> 4L/C. In that limit, the square root can be approximated as:

\begin{gather*}
\sqrt{\frac{R^{2}}{4L^{2}} -\frac{1}{LC}} =\frac{R}{2L}\sqrt{1-\frac{4L}{R^{2} C}} \approx \frac{R}{2L} -\frac{1}{RC}\\
\alpha _{1} =-\frac{1}{RC},
\alpha _{2} =-\frac{R}{L}\\
I\approx \frac{V_{0}}{R}\left( e^{\frac{-t}{RC}} -e^{\frac{-Rt}{L}}\right)
\end{gather*}

How does this equation  is estimated?

\begin{gather*}
\frac{R}{2L}\sqrt{1-\frac{4L}{R^{2} C}} \approx \frac{R}{2L} -\frac{1}{RC}\\
\end{gather*}
I think it should be right?
\begin{gather*}
\alpha _{2} =-\frac{R}{L} +\frac{1}{RC}\\
\end{gather*}

But if

\begin{gather*}
\alpha _{2} =-\frac{R}{L}\\
\end{gather*}

Current should be
\begin{gather*}
I\approx \frac{V_{0} RC}{-L+R^{2} C}\left( e^{\frac{-t}{RC}} -e^{\frac{-Rt}{L}}\right)\\\end{gather*}


texts: Is my LCD TV doing some sort of dithering?

texts:
I'm using a 32" 'LED' TV as a monitor (1920x1080 over HDMI). I've been noticing some annoying horizontal stripes where the source is displaying grey pixels.

It seems that what's happening is the TV is using multiple dots/sub-pixels vertically for each source pixel. And instead of having all the sub-pixels for a given source pixel at the same intensity, to produce dimmer pixels it switches off some of the sub-pixels, which I'm sure is fine for video, but is a bit ugly for text.

EDIT: new photo added, previous ones are below. In this new one, I've stitched a digital zoom of a gradient I generated to a photo of how that gradient is rendered on the TV (ignore the slight incline, that's my fault).

This time the photo is from an old Sony DSC-W70 in macro mode. You can clearly see the different sub-pixels' intensities changing at a different rate, and it's clearly a pattern rather than bad pixels...

In the previous images below, you can see bright sub-pixels in the middle of the dark text strokes.

Is this a standard technique for current displays? Is it because I have a TV and should really be using a proper monitor?

(Apologies for the photo quality - taken on an iPhone through a magnifying glass).


texts: USB to 3v converter to power a battery powered FM transmitter?

texts:
I have a SCOSCHE FM Transmitter which practically eats up 2xAAA batteries, I was thinking of using my TV's USB power for the transmitter. My search lead me to this 3 in 1 DC-DC USB 5V to 3.3V Step-Down Buck Module, now my questions are:

a). Will it be ok to power a 3V device with 3.3v? If yes, what other options do I have to get this done?

b). Since this is a FM transmitter are there any chances of static when this new power source is used?


texts: Measurement of current with hall effect sensor

texts:
I have a setup using 3 hall effect current sensors and my goal is to measure the DC current flowing through cables. The sensors are HSTS016L.
I attached a picture of the manual. The sensors have 4 pins GND, +5V, Vref and Vout.
The Vref are constant for all 3 sensors but they are not exactly the same values for all 3 (2499.7mV, 2509.7mV and 2507.2mV). The Vout decreases when the amount of current in the cable increases. So for example:
Sensor 1: @2,7A Vout is 2464,6mV and @5,5A is 2371,9mV
My first question is what should I be measuring? the voltage between Vout and the ground or the voltage between Vref and Vout?
The second question is how to determine the amount of current flowing in the cable? Is the only way by making reference measurements for each sensor?


texts: controlling SPI devices using the Arduino - different voltages

texts: My arduino board uses 5v to power the atmega chip. I was wondering is there any thing wrong with powering my atmega at 5v but say I power my MCP4922 dac at 3.3v does it matter? It just that I've seen schematics that use the same volts for all ic's


texts: How can we find the polarity of dc motor and why we connect motor with thick wire?

texts:
DC MOTOR
How can we find the polarity of dc motor before connection ? Why we connect thick wire with armature winding ? Internal winding wire diameter is very thin in compresion to external wire by which we connect supply to the motor. And alsi why we connect thin wire with field winding ?


texts: IGBT VCEsat maximum rating dependence on VGE

texts: Building an application with IGBTs up to 1000V and using IXGA20N120A3 rated at 1200V. However datasheet states that this rating is for a Vge = 0V. We are driving the IGBT with -12V during turn off to avoid self turn on and was wandering if the maximum VCE might be lower due to this negative Vge.


texts: SMD LED went out quickly after I soldered it

texts:
I soldered an SMD LED (that cost $55) to the board by setting the aluminum board on a kitchen skillet that was heating up. I did my best to control the heat. It usually takes only a minute of heat and the LED sinks down, and I pick it up out of the skillet immediately thereafter.

This time, unfortunately it took a few tries before I got it right. Upon testing my LED, at first it worked, but after only 5 minutes of testing, it was flickering and then finally stopped shining.

The datasheet says it can be reflow soldered up to 5 times, the max time for max soldering temp is around 50 seconds. I don't have a reflow soldering system. I don't think I went too over the soldering time, if I did go over at all.

Was it my solder job that caused this LED's demise? What can I do differently now that I've ordered another damn $55 LED?


texts:
I'm designing a computer using a Z80 processor (I know, not the same as the one the C64 used, it doesn't matter)

I found the following schematic showing part of the C64 circuit, and I'm particularly interested in the keyboard section on the right, attached to the MOS6525 chip. I understand in theory how keyboard like this work (i.e. scan the columns, and read each row to determine which keys are pressed.)

As I said, I understand this, but I'm confused onto how this is implemented in the software. Does the C64 constantly poll the keyboard? Because, I would've assumed there'd be some sort of secondary controller to do this scanning. How would the C64 have enough time to do other things such as running programs, if it's spending so much time polling the keyboard? (and also drawing the screen, and polling joysticks, for that matter?)

Is it all down to the kernel? Does the kernel say something like "poll the keyboard, then poll the joysticks, then run a couple instructions of a program, then repeat"?


texts: External pull down device required, How much?

texts:
In the datasheet for a MCU, it is mentioned that TM "Test Mode" pin require an external pull down device.

But there is no details: If I will put pull down resistor, what value should I choose then ?


texts: In terms of protection, how does this automotive power supply circuit look?

texts:
Preface

This is a power supply circuit I designed that will be part of a larger device.  The very basic intention is that it will take standard +12V automotive power and generate a 5V output and 3.3V output, all while protecting the device at large from the nasties that may be present in your run-of-the-mill automotive electrical system.  This is including, but not limited to:

reverse polarity
overcurrent
load dumps
fast transients (-/+200V)

For the sake of getting constructive feedback, I'll try and lay out why I designed the circuit as it's posted.  I've done some Googling and gotten some help from a professional EE so this is the culmination of all of that research and help.

Design

I started off with the LT1963 from Linear.  This is the basic linear voltage regulator I designed the whole power supply circuit around.  It's pretty straight-forward, supplies the current I want without needing to parallel or piggyback off of a transistor, etc etc.  I bench tested it, works good, moving on.

Next, I knew the 20V absolute max rating could be a little low considering some battery jump packs that auto emergency trucks have can be 24V.  Add to that the fact that you have load dumps and fast 200V transients that could be lurking in your electrical system... and it was a short jump to deciding I needed overvoltage protection.

I went with a two-pronged approach: I decided on using the LT4356 surge stopper IC from Linear and the SMDJ40CA TVS diode from Littelfuse.  The LT4356, in a nutshell, gives me configurable overvoltage protection, undervoltage protection and overcurrent protection by controlling a MOSFET to limit the voltage/current flow.  It was vetted by a user in this question and, as I understand it, was used in an emergency vehicle device.  Good enough for me!  As far as the TVS, after doing much reading on the aforementioned question, along with other sources... I decided on going with a ~48V clamping voltage and 5000W power handling rating.  Based on the aforementioned post, this seems like it should be a pretty good starting point.

From using the LT4356, I got overcurrent protection for free, but I decided to put in a PTC fuse because, well, maybe something in front of the load will draw too much.  Who knows.  Cheap insurance to me.  I also added a standard Schottky diode, rated for my given current usage, to establish reverse polarity protection.  I could have gone with back-to-back MOSFETs but decide it was too much complexity considering that the power loss it would avoid just manifests itself as more heat in the voltage regulators.

At this point, I had achieved undervoltage, overvoltage and overcurrent protection.  The TVS should be able to handle load dumps fairly well.  On recommendation from the EE I have been chatting with, I also put a 100pF ceramic cap across the power inputs at JP1 to help with the really fast spikes.

Circuit (click for large version)

My Question To You Fine Fellows

In a very basic "yeah, it's not bad/eh, it needs some work" way... how does this look to you guys?  I'm not designing a product for some other company with specifications and standards that it has to live up to.  I'm just designing this device for myself and I just want it to work good and not get fried if my car's electrical system is jumped or if there is a load dump or spike, etc.  Any constructive criticism on how to better achieve that is welcome, but please don't turn this into an academic debate on question asking or something if you can help it. :)


texts: What is the purpose of the capacitor in this transformer circuit?

texts:
I a audio DAC output stage I have seen the following circuit.
It's function is to convert an balanced signal to an unbalanced signal.
IN+ and IN- are differential outputs that are biased at 2.5V.

simulate this circuit – Schematic created using CircuitLab

What is, or could be the purpose of the capactitor C1 in this circuit?

Update:

If my assumptions are correct:

R1 sets the center tap to a defined level if IN+ and IN- are idle (at 2.5V).
C1 serves as a high-pass filter with a very low threshold frequency.

Does it make sense?


texts: What if we decrease/increase the resistance 3kohm to a higher/lower value? Can someone explain this behaviour to me in a very simple way?  Will the current then flow through the silicon diode?


texts: Switchable bleeder resistor for very high voltages

texts:
I've got a very large capacitor which is likely to be storing up to 5 kV. When it is turned off, I want to be able to discharge it using a bleeder resistor (or similar) so I don't risk injuring myself.
I want to reduce the losses due to the resistor while also discharging quickly. Obviously, these are conflicting requirements, as I'd need high R to reduce losses (due to less current flowing) but low R to discharge it quickly. To solve this problem, I was thinking of switching the circuit so the resistor can be connected and disconnected at will (by a microcontroller), however, it seems near impossible to get a solid state switching component that can operate at the voltage I need it to (for less than, say, $50). Is there any way to configure the circuit so that the switching element isn't affected by the high voltages. I could use a high voltage electromechanical relay, but I'm just not sure if that's the best option.
Another concern of mine is that while the bleeder resistor will be able to drop the voltage to 37% within τ=RC seconds, but it is going to take a while to actually drop down to a safe voltage (especially with a large resistor). Is there any way to reduce the resistance automatically as the voltage decreases? I was thinking of using a varistor, but the resistance of those increases as the voltage decreases. There will be a microcontroller managing the circuit, so it may be possible to control it that way if a controllable resistance (that can withstand 5 kV across it) exists. Is there any way to achieve this? In an ideal world, I'd also be able to automatically measure the voltage to determine if it is safe to touch, but I'm aware that it would be very difficult to do if the voltage is changing.


texts:
I'm currently working on a homework that does: the first press to the button at P1.1 opens the LED at P1.0, the second press to the same button blinks the LED and the third press closes the LED.
I wrote a code for that in Code Composer Studio but the microcontroller does not work properly. It does the opening, blinking, and closing operations but when the LED starts to blink, I have to press the button a few times to close the LED. I think that causes from bouncing (What I mean by bouncing is in the picture below) or the for loop that I wrote for blink operation.

I added a for loop (for (i=10000; i>0; i--))  to prevent that but that didn't work.
Here is my code:

int main(void) {
    WDTCTL = WDTPW | WDTHOLD;   // stop watchdog timer

    P1DIR |= 0x01;              // Configuring P1.0 as output
    P1DIR &= 0xFD;              // Configuring P1.1 as input

    P1REN |= 0x02;              // Enable resistor for P1.1
    P1OUT |= 0x02;              // Setting the resistor as Pull-Up and P1.0 as low
    P1OUT &= 0xFE;

    volatile unsigned int i;
    int j = 0;

    while(1) {

        for (i=10000; i>0; i--);                // Delay loop to avoid bouncing
        if ( (~P1IN & 0x02) && j==0 ) {         // Check if the button is pressed and j is 0 for validating it's the 1st press
            P1OUT ^= 0x01;                      // If the button is pressed, then toggle P1.0 (LED is ON)
            j = 1;                              // Change the value of "j" to "1"
        }

        for (i=10000; i>0; i--);                // Delay loop to avoid bouncing
        if ( (~P1IN & 0x02) && j==1) {          // Check if the button is pressed and j is 1 for validating it's the 2nd press
            while(1) {                          // Infinite loop to run the code below until break (3rd press)
                P1OUT ^= 0x01;                  // Toggle P1.0 (LED is blinking)
                for (i=45000; i>0; i--);        // Wait before closing or opening the LED
                if (~P1IN & 0x02) {             // If the button is pressed for the 3rd time, then break the loop
                    break;
                }
            }
            j = 2;                              // If the loop is broken, then change the value of "j" to "2"
        }

        for (i=10000; i>0; i--);                // Delay loop to avoid bouncing
        if ( (~P1IN & 0x02) && j==2) {          // Checking if the button is pressed and j is 2 for validating it's the 3rd press
            P1OUT ^= 0x01;                      // If the button is pressed, then toggle P1.0 (LED is OFF)
            j = 0;                              // Change the value of "j" to "0" for returning to the beginng of the main loop (1st press)
        }
    }
}

How can I fix this issue? My code covers all the thing that we learn until now. So I shouldn't use any codes, variables etc. apart from my code. Thanks in advance!


texts:
Can anyone point me to a tutorial for electronic noobs that
explains how to use op-amps and what I can do with them, besides
amplification?


texts: Passive POE 24V, how can it damage a non POE device

texts:
I read that active POE is safe, and that when performing the handshaking it can increase the voltage up to 10.1V. So I infer that generally Ethernet devices can handle 10V no problem. But what about 24V?
If one connects 24V passive PoE (pin 1&4 to +24V, pin 7&8 to gnd) to a non-PoE device, like a laptop, I have read that it could be damaged. As far as I understand ethernet is an isolated system, that use transformer couplings. If you put a DC voltage on the transformer nothing should happen.
How could a non POE device be damaged by a passive 24V POE device?


texts: Hot and neutral have similar voltage to ground - finding the problem

texts:
I have an APC battery backup and surge protector for my computer. It has a light, labeled "Building wiring fault." This light is on, and my computer will not start. I am unemployed and my landlord is useless, so I bought a multi-meter (Etekcity MSR-C600). Checking voltages at the outlet, I found the following:

Hot to neutral:      117.5
Hot to ground:        60.8
Neutral to ground:    55.9

I then checked the voltage several other outlets. All of them have the same hot to neutral voltage, but the hot to ground and neutral to ground vary considerably. For example, another socket had:

Hot to ground:         77.2
Neutral to ground:     36.5

Is this sufficient to tell me the most likely cause of the problem? I'm guessing that hot and neutral are cross-wired or shorted in some outlet. Is that probably correct? This circuit is rather overloaded, but it does not seem to me like that should cause the low hot to ground voltage and the high neutral to ground voltage that I observe, unless there is a partial short in some appliance.

All the outlets in my apartment are on a single circuit. How do I go about locating and identifying the actual wiring problem?


texts:
In response to the answers here: How much longer should we expect DIP (or DIL) Packaging to be around?

If DIPs are phasing out, how would one proto their boards quickly and cheaply? Does this mean we have to all start learning to build surface mount boards? Is there something I'm missing because that sounds like a lot of work for simple proof of concepts...


texts: How to calculate maximum input power on a speaker?

texts:
I got into this rabbit hole while trying to replace the speaker wire in my setup. I have speakers with 8 Ω of resistance (Rspeaker) and a maximum input power of 140 Watts, so I wanted wires that would not exceed 140W when considering their gauge and length (looking for 10-16 feet).
I found a table at this site: https://soundcertified.com/what-size-speaker-wire-guide/ which displays the maximum power in the system for the given length, gauge, and speaker resistance. Cool, right? I was able to estimate what I need from it, and for fun I decided to back-calculate the table so I could plug in the different lengths I was looking at and see what gauge would work.
I created the following spreadsheet which shows the given table from the website, a matching table based on the calculation I determined was used, and some various values. Spreadsheet to look at the expressions: https://1drv.ms/x/s!AqQjhMOX3aoJ-RN2iS2C_NCIKuKw?e=dVOrqG, image is attached for initial viewing.
Quick overview of the spreadsheet: the initial table uses feet for the length and gauge for the area. In my calculated table, since I had to use resistivity (Ω*m), I converted that to Ωmm, and all the distances to mm and area to mm^2. The table has four values, each corresponding to a length, for every resistance and area (Ohm and Gauge) pair. At the bottom is the value for the resistivity of copper, the equation for resistance in a wire, and the equation for power as a function of voltage and resistance. I also included the voltage from my system (assumed maximum since volume level will control it).
Figuring out the calculation: Because the values in the table are supposedly wattages, I decided to start with the equation for power using voltage (something I could easily assume and change) and resistance (known) versus current. The total resistance is the sum of the speaker resistance plus the wire resistance (a relatively negligible value) since they are in series (I did the parallel calculation for fun as well and it's an inverse relationship obviously). These wattage values, however, are completely different from anything in the table (~1700W for 8Ω, 20 gauge, and 120V), and the various values per length are very similar because wire resistance is negligible (a pretty obvious conclusion).
So what are the values in the table? After messing around a lot I stumbled upon the relationship: Rspeaker/Rwire. It's the ratio between the resistance of the speaker and the resistance of the wire, which is why the values vary so much considering the small Rwire values. But, this means the values in the table are dimensionless, and not wattages at all! A way to get that relationship is Pwire/Pspeaker (voltages cancel out), but I don't know why this would be done or why the ratio would be useful.
On top of that craziness, the table values and determined relationship are still on the correct order of magnitude for input power into the speaker, and supposedly they make sense (if I assume they're wattages, for my system, 16 gauge wire can be used for 16', and if I want shorter wires I should use 18 gauge to not exceed 140 "watts").
Questions: If the values are dimensionless, how are they supposedly useful for comparing wattage, or it it some fake relationship? If the power calculations that were ~1700W are accurate, why does my speaker have a max input of 140W? Is there a better or proper way of determining this for future reference?
Thank you!


texts:
Simple problem that I can't solve.

On this AC circuit, find the current read by ammeter \$ A_3 \$ (the one in series with the resistor) given that \$A_1\$ reads 4A and \$A_2\$ reads 3A, assuming every current is read by its RMS value.

There are no given values for resistor and capacitor, but the textbook answer gives that \$A_1\$ reads 2.65A Here's what I've tried :

Since we're in AC, I figured voltage lags in the capacitor, so current must lead by 90 degrees. I tried using Kirchhoff's law with phasors in mind to find \$I_3 = I_1 - I_2\$ which would give \$4e^{j0} - 3e^{j\frac\pi2} = 4 - 3j\$.

However, the magnitude of this phasor is \$5\$, which is greater than the magnitude of \$I_1\$, which is impossible, since there are no current source in branch 2.

What am I missing? Thank you


texts: Unknown limit switch on a commercial camera iris diaphragm

texts:
I am working on this spare iris of a Canon EF 24-105 mm lens for an hobby project.

The iris has 8 pins:

4 related to a micro-stepper motor;
4 linked to some sort of limit switch.

The limit switch is closed (or opened) by a small plastic clip passing in the middle of the sensor; no mechanical contact occurs.

Someone knows the working principle of this limit switch and how it can be wired to make it work?

EDIT

I dismounted the sensor by desoldering the ribbon cable and by exposing the internal component by the plastic cover. The sensor is composed by a single piece.

I took different angulations pictures: in the slot there is no sign of lenses or any other optical feature.


texts: Very high precision zero crossing detection

texts:
I have a setup that is equivalent to a guitar string with pickup, with signals of similar frequency range.  I have a simple zero crossing detector with a comparator and then just count the interval between low-to-high transitions using a microcontroller.  I got to wondering how accurately I could measure the frequency.  If I wanted to measure it to several decimal places with certainty, what changes should I make?  Is there a good resource on high precision zero crossing?

The output voltage from the coil is low (~3mV pp), so should I choose a comparator with lower input voltage offset?  Or would it make more sense to add a preamp stage?  How about propagation delay - if a comparator has delay of x for one transition, will it be x for every transition?


texts: What AT command should be sent to modem to get time?

texts:
I am using SIM800E. I want to know what AT command should be sent to the modem to get time?
This modem has a RTC. But I need to set it automatically through cell tower. The tower can send the time to the modem when requested using an AT command.  I have seen in many phones that the time is updated during hand-offs.

The manual does not have this information.


texts:
I want to I2C communication stm8s(slave) and arduino uno(master), but it does not work.

Arduino Uno(master) code:

void setup() {
  Wire.begin(); // join i2c bus (address optional for master)
}

void loop() {
  Wire.beginTransmission(0x30); // transmit to device #0x30
  Wire.write(0x15);              // sends one byte
  Wire.endTransmission();    // stop transmitting

  delay(500);
}

STM8 Slave Code with peripheral library: main.c

CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1);

I2C_DeInit();
I2C_Init(100000, SLAVE_ADDRESS, I2C_DUTYCYCLE_2, I2C_ACK_CURR, I2C_ADDMODE_7BIT, 16);

char veri_bas[1];

while (1)
{

I2C_GenerateSTART(ENABLE);

/* Disable Acknowledgement */
I2C_AcknowledgeConfig(I2C_ACK_NEXT);

/* Send STOP Condition */
I2C_GenerateSTOP(ENABLE);

uint8_t gelen = I2C_ReceiveData();
//uint8_t gelen = 0x15;
sprintf(veri_bas ,"%d" ,gelen);
sendstring(veri_bas);
}

STM8 - main.h:

#ifndef __MAIN_H
#define __MAIN_H

#define I2C_SPEED 100000
#define SLAVE_ADDRESS  0x30

#endif /* __MAIN_H */

Arduino sends data, i saw it on the ossiloscope. Pinout(SCL-SDA-GND) and I2C resistors are correct. Sendstring function is correct. But it does not work. Thank you!


texts: MPU9255: Unreliable AK8963 Communications

texts:
I'm currently trying to communicate with the InvenSense MPU9255 9-Axis IMU using the FreeIMU software on a Teensy3.2.
See comment below for link to FreeIMU code being used (don't have enough reputation).

I know that my setup is correct for the following reasons:

I can successfully communicate with the MPU6050 portion reliably.
I can successfully communicate with the AK8963 at startup, reading the correct address (72) as well as data.
I have double checked the FreeIMU code to ensure that it reads 7 bytes (as opposed to 6) when collecting data to prevent blocking.
Pin 1 is connected to VDDIO.
Added copious delays between each read/ write instruction.

Things I have tried to resolve the problem:

Turning it off and on again (time before failure ~instantaneous -> 10min)
Switching between different IMU's, wires, and processors.
Soft resetting the IMU after each read cycle (dies after 1 or 2 cycles).
Looking through forums (online, & InvenSense's Developers Corner).
Emailing InvenSense for further solutions.
Adding an additional 10uF capacitance between the power and ground lines. (No effect).
Scoping the Auxiliary I2C Clock and Data lines:


texts: Does a Wimshurst machine work fine with normal glass disks?

texts:
I want to build my own Wimshurst machine and I cannot find plexiglass disks.

However, in our town there is somebody that cuts normal glass circles–so I wonder if normal glass disks would replace plexiglass/plastic disks and will make a Wimshurst machine work fine.

Will it?