texts: Parameters for voltage-controlled current source

texts:
I'm trying to implement the following circuit in a project:

(source: ecircuitcenter.com)
VCC coming in is 18v. The op-amp is supplied with 3.3v. There is a waveform voltage input from 0-2 v that can oscillate at up to 100hz, or not at all. I need to convert this into 0-2 mA, so I used 1K RSENSE. I obviously need constant current with a variable RL. I only know enough about electronics to be dangerous, but this seems like a fairly straightforward circuit, and I got it working on a simulator, so I tried prototyping it. When I hooked up my ammeter, it gave a range of 0.17-0.19 mA for an input of 0-2 v. I used an an LMC6482 and a 2N3904. When it didn't work, I switched the BJT with a MOSFET (2N7000G) and got the same result. I'm assuming that there are some parameters for the transistor that is causing the unexpected behavior. Am I on the right track?
Why is the circuit currently acting the way it is?
What should I do to get working as described? Thanks
UPDATE:
I scoped all inputs and outputs and there were no oscillations. In fact, touching my scope to the anode of the load resistor gave me the perfect waveform I was looking for. I then touched it to the anode of my multimeter and the same signal was there, yet my multimeter oscillated between 0.15-0.19 mA... does this mean my multimeter is shot? It was connected in series right before the load resistance.


texts: Multisim simulation of AVR fusebit doctor

texts:
I've found a very interesting fusebit doctor. This is a tool to repair the fuses of ATtinys.

Link: http://mdiy.pl/attiny-fusebit-hvsp-doctor/?lang=en

This is the original schematic:

I want to replace the +12V power circuit for a +5V power circuit.

First of all, I've simulated the +12V circuit:

And I don't why, I'm getting +4V, instead of +12V.

These AVR's are repaired with +12V in its reset pin.

Does anyone know why I'm not getting +12V ?


texts:
I have three DC shunt wound motors in series. Each motor has a coupling to a transmission. I am trying to work out (mathematically, as opposed to intuitively), what happens if the coupling was to drop in one motor (motor 2) resulting in no load on that motor.

Intuitively I know that that motor will speed up and eventually the centrifugal force will result in destruction of that motor if the supply isn't shut off in time.

The supply voltage is 600V so there is 200V across each DC motor.

When the coupling drops and there is no load, does the current result in excessive torque and accelerates the DC motor RPM?
As the motor RPM increases the back EMF increases resulting in a reduction in the current in the motor armature decreasing?
What is happening to the voltage across the motor? Increasing or decreasing? Is it P=VI, so current decreases due to back EMF so voltage across that motor increases? Where does the back EMF mathematically come into play?


texts: Practical Sizing Of Push Pull vs Active Clamp forward

texts:
I am looking to get some practical feedback regarding push pull design.

I am wanting to design an isolated DC to DC converter with the following requirements:

Vin: 18-36V
Vout: 5 V
Iout: 6 A
f_switching: 500kHz -> f_clock= 1Mhz (Must remained Synced)

I am wanting to make this design reasonably compact, because I will also want to meet MIL-STD-461 (usually big).

That being said, from the literature out there the push pull seems to be the  more compact option, yes this would be my first push pull design.

Pros:
 - quadrant 1 and 3 utilization for the BH curve
 - smaller input/output ripple current (usually easier to filter)
 - both FETS referenced to ground (Low loss NFETS)

Cons:
 - double the core losses ( from going -B to + B)
 - More Complex Transformer
 - Not as much support for Push pull applications,Most textbooks/reference material does not call out the push pull for less than 50W applications

As stated in Pressman's section 7.3.2.2 I could double the switching frequency, however, I am concerned about the 3x transformer losses as well as the increased EMI Emissions.

Note: For the push pull controller I am liking either  the LM25037 or the LTC3723; Either one of these converters may be used in current mode to combat flux imbalancing.

My question to the forum is whether of not going to a push pull over an active clamp forward is a good idea for a 30W application, with my considerations of space, EMI, and efficiency.

Thank you guys in advance!


texts: How to fix line to line spacing error in Allegro?

texts: I have a line to line spacing error in Allegro. I don't know how to fix it. If I make the width of the trace smaller, it gives me a line to width error. And I also don't understand Why I get this error. It doesn't look like the lines are touching, and I think they have enough clearance between them.


texts: Scaling analog sensor output (0.4V to 2.7V) to full dynamic of ADC (Vref 3.3V)

texts:
I have a question regarding the scaling of analog sensor output signal.

The goal is to connect a Sharp GP2Y0A02YK0F distance sensor to a Raspberry Pi 3 B.
The sensor can be run off the 5V rail of the Raspi. The output voltage differential is specified as:

And this example for a distance measuring is given:

Accordingly I expect my output from the sensor to be DC voltages between ~0.4V and ~2.75V. Each value being held for at least the duration of one measurement and for as long as the measured distance doesn't change at maximum.

As a ADC I plan to use a MCP3204 (12-Bit, 4 Ch., SPI), with the 3.3V rail of the Raspi as Vref and as single sided power supply.

To make use of the full dynamic of the ADC I would like to scale the output of the sensor and remove the offset before feeding it into the ADC.

For the scaling itself I think a non-inverting op-amp circuit should suffice. When leaving a little headroom I would go for Va=3.2/2.75=1.16.

What I don't know how to tackle is the 0.4V offset. If my signal was AC I would go for a simple high pass before the op-amp, but with the signal possibly being DC for longer periods of time, I am not sure what to do.


texts:
This figure is a crystal radio reciever and there is no active element involved in it.
LC filter is passive. Then how one can know that what output voltage LC circuit is offering to the diode and earphones?
Can the output voltage from LC circuit be found by using a multimeter/voltmeter or there is any other way to find the output voltage from LC circuit?


texts: How do I add a wireless hotspot to my project?

texts: I just read on the description of a YouTube vid that Parrot AR Drone creates its own wifi hotspot. How does it do that? Is it possible to do a similar thing for a UAV project I've been thinking about?


texts: What is the state of XMEGA programming from Linux?

texts: What are the hardware and software options for programming an XMEGA from Linux?


texts: Why are feedbacks connected to the negative terminal of op-amps? Example given

texts:
I ask this because when I do the nodal analysis for the OP amp in figure 3, I end up with the same results as the inverting amplifier, even though the inverting terminal in figure 3 is grounded. So why do we put so much emphasis on which terminal we are using, since we can obtain the same results by changing the position of the ground, source and feedback around?

Are there differences between the Op amp in figure 3 and the traditional inverting amplifier from figure 2? Why do we use one but not the other?

Lastly, I cannot grasp the reason why non - inverting amplifiers in figure 2 are not stabilizers like inverting amplifiers. Perhaps I am having trouble with the concept of stabilizing the signal. Does it mean that non - inverting amplifiers will saturate the signal? Well, non - inverting amplifiers may still not saturate signals depending on feedback according to figure 2, although the amplification will be grater than 1. Does amplification greater than 1 implies amplificating any noises considerably, and that's one of the reasons why non-inverting amplifiers are considered not to be stabilizers?

Thank you very much


texts: How can I use an inductor as an EMI sensor?

texts:
In the paper "Synthetic Sensors: Towards General-Purpose Sensing" by Gierad Laput, et. al, they use a 100 mH inductor as an EMI (electromagnetic interference) sensor. They have not provided much details on the board (shown below)

I was wondering what a circuit would look like which the inductor can be an ADC input to a microcontroller. Thanks for any ideas.


texts: Neglecting certain elements in deriving the current of a series RLC circuit

texts:
The current at resonance in a series RLC circuit is described in the bottom derivation, along with it being plugged into the formula for finding the voltage across the inductor in the circuitw:

I have two questions regarding this derivation.

Isn't the current at resonance supposed to include the phase shift φ? Why is it left out of the equation? Example: I*sin(ωt+φ)
When the equation for the current at resonance is plugged into the equation for finding the voltage across the inductor, why is the trigonometric part of the differentiated current equation neglected in the next step?


texts: Arduino controlling high voltage DC source, Opto-Isolator

texts:
I need to create a circuit that I can use an Arduino to control a 400~500 DC voltage source.
I am not used to opto-isolators, but I was thinking about using it to separate both systems. But I cant seem to find one that can handle 500V DC in the Vcc port.
My thought process(I am not sure how to create and opto-isolator, so assume the LED and transistor in the middle are the opto-isolator):
If you guys know a better way to completely separate both systems please give me your input.
BTW the current is very low, below 1mA.

simulate this circuit – Schematic created using CircuitLab


texts: Morse sender and receiver for line transmission

texts:
Looking for a DC circuit to be used for Morse transmission in scouts. Visible elements: one, preferably two, buzzers (or lamps, i.e. LEDs) and a button (station A), connected with no more than two wires to a bus with more similar stations (stations B). They work like this:

Pressing button on station A will light the lamp in all stations A and B
Not pressing any button will not light any lamp in any station

However, it should allow for an "infinite" number of units to be connected in parallel, i.e. each station has its own power source to amplify the incoming signal.

A possible solution could be as follows.

simulate this circuit – Schematic created using CircuitLab

Another proposal, by Loganf, was simplified to this. But how does he plan to have the three wires? What is the idea of having a MOSFET on the transmission side?

simulate this circuit


texts: I am using an ESP8285 to make my own wifi relay device. I am using an ULN2003A to drive the relays, I have the 5V relay coil voltage connected to COM and the other coil connected to the output of the ULN2003A. When I send a logic high to the input of the ULN2003A the output should go to logic low and turn on the relay but it is not going to a logic low. It only drops from about 4.98V to 4.18V which is not low enough to turn on the relays. I am not sure why it is not going to logic low when I give a logic high input. I have added the schematic I am using, I apologize if the pic is a little blurry.


texts:
I have PWM generator built on 74HC04BQ inverter. Pulse frequency is changed periodically by analog switch TS5A3153DCUR over 600 ms, frequency values are 44 kHz and 29 kHz. Binary ripple counter 74HC4020BQ divides this signal. The problem is the half of all boards has wrong output signal of counter. Output Q7 have to divide signal with 2^8 factor, and proper output frequency values should be 171 and 113 Hz. In fact, division factor could be 2^7 at one frequency, and 2^8 at another frequency, so values could be 171 and 226 Hz, 343 and 113 Hz, 343 and 226 Hz respectively.

I added a 10-kOhm resistor between invertor output and counter input on 3 boards, and the problem is not revealed more on these boards. I cannot make this modification on each board.

Having read the 74HC4020BQ datasheet I have not got understanding of an “input clamping current” parameter in table 4. In my opinion, wrong work appearing caused by high input current, but the current value measured by ampermeter is about 1 mA with power voltage 3.3V, and I think the counter input must have infinite resistance.

Please help me to get understanding of an “input clamping current” parameter, and why the problem can appear.


texts: How to increase the speed of a specific AC motor

texts:
Here are details of this project:  The motor  being used is a 2 phase Slo-Syn model SS400 (1/4 HP).  The motor has two 120V windings that are physically 90 degrees to one another.  It is operated by applying 120V signals 90 degrees out of phase.  Winding current is 1 amp and motor speed is 72 RPM @ 60 hz.  It is a synchronous motor with permanent magnet rotor.

The two 120 voltage sources come from 208 volt 3 phase power which comes into the building.  A 208V to 120V transformer is connected line to line that gives one output.  The second output which is 90 degrees out of phase is connected line to neutral. Line to neutral voltage is 120.  The 3 phase is Y connected configuration.

This motor is part of the positioning mechanism for a 5.5M parabolic dish antenna to be used for an EME radio setup.  We need the motor to run 2-3 times faster than it currently does so the applied frequency needs to be 120-180 Hz. This will be required for the antenna to 'track' the moon.  The problem with raising the frequency is that the reactance of the motor windings increase as the frequency is increased.  The result is lower winding current and thus lower torque.

An experiment using a variable frequency control (VFC) device was done.  These are often used for running 3 phase motors from a single phase source. The output of these devices is delta connected which means there is no neutral and everything must be connected line to line.  We needed the neutral connection to get the 90 degree phase shift so we tried using three 208V to 120V transformers.  The 208V sides were connected line to line to the VFC output and the 120V secondaries were connected in the Y configuration.  The VFC did not like this setup and would trip on overload and not operate the motor.

So the question is, how can we get 2-3 times more speed from this motor without losing too much torque.

Using a variable  frequency quasi sine wave source is being considered.  Also possibly using high power class D audio amplifiers and a step up transformer.

Understanding that the torque will indeed be a factor, we would still like to attempt to speed the motor up.  Changing to another motor and/or gear box would be difficult due to the mechanics of the dish assembly.  Ideas to electrically increase the frequency/motor would be helpful and worth a try.


texts: How do I write the supermesh equations in this circuit?

texts:
Example 3.11 from Fundamentals of Electric Circuits (5th ed.) by C. Alexander and M. Sadiku:

I'm trying to solve this circuit via mesh analysis in order to challenge myself but I'm splitting my head here. I'm not asking you to solve the whole circuit, I'd just like some help with the writing of the equations.

It says that I have to use PSpice but I'm trying to do it manually.

Please understand that I just want to understand the method by which the question can be solved, rather than getting the whole answer itself.


texts: Find the Thévenin equivalent circuit with the output terminals A and B

texts: Im not sure where to start with this question. I dont know what to do with the dependent source and im not sure what I can do with terminals A and B.


texts:
My question arose from my previous question about a wind direction measuring circuit.
Please have a look at the manual: http://www.fondriest.com/pdf/rm_young_05103_manual.pdf
And here is the figures about my questions:

In Figure A, the potentiometer is used to output voltage proportional to the wind vane rotation angle.

In Figure B, the potentiometer comes to an end at point 1 and causes a short between the lines WHT(wind excitation voltage) and GRN(wind direction signal). But in theory current flows from + to ground. Do you think there is a path for current to flow in Figure B?

In Figure C, it seems like the situation is safe. Although the lines GRN and BLK are shorted at point 2, there is no potential difference and no current flows. Is that right?

My real confusion is about D6 and D7 the transzorb diodes(zener clampers?). I couldn’t really figure out in which circumstances they function and what happens in the absence of them. Why do we really need them?

In the manual it states: “To prevent false readings, signal conditioning electronics should clamp the signal to excitation or reference level when this occurs.” Do you think one needs an extra circuitry at the output?


texts: Convert Digital and Analog values to dB SPL

texts:
I am trying to create a sound level meter. I want to use an analog MEMS microphone (INMP510) and a digital microphone with I2S output (SPH0645LM4H). The sensitivity of the INMP510 is -38 dBV and for SPH0645LM4H is -26 dBFS. I am using a PIC32MZ2048EFG100. The ADC module has 12 bits and the voltage for the ADC are 0 and 3.3 V.

I have read this post (How to convert Volts in dB SPL) but I can't find the specifications of the gain of the analog microphone, so I don't know if I am correctly calculating the dB SPL.

Also for the digital microphone, I have no idea how to convert the digital values to dB SPL.

Can somebody help me with mathematical formulas?

Thank you in advance


texts:
I want to make a laser hunt type game with my son using Nerf Guns. I can modify the Nerf bullet to put some sort of device on the top of the bullet (obviously something not too heavy). It would be easy enough to put a small magnet on the tip of the bullet.

I want to make a vest that can detect being hit by the Nerf bullet. It could contact with the magnet or some other device to detect that contact has been made.

Can anyone point me in the right direction of what devices can be used for this purpose?


texts: Using Logic-Analyzer to reverse-engineer ISM-band ASK/OOK encoding, possible?

texts:
Is it possible to use a Logic Analyzer (such as this one), to determine the waveform s.t. on the DATA out pin of an ISM-band ASK/OOK (315/433.92MHz) RF module, in turn to decode it's encoding scheme. I know for sure that it is not Manchester/NRZ. By 'waveform', I mean the highs/lows with the duration of every bit

Note that this questions is an extension of my other thread on choosing a DSO. While I might still go in for a DSO, but I really wanted to thoroughly understand the LA as an option for my purpose.

Now for the other (possibly dumb) question -- will a logic-analyzer work without a clock input ? Say in my case of decoding ASK/OOK encoded data, I have no way to retrieve the clock, as this is asynchronous operation.

Query extension (Nov 9, 2011):
My target RF encoder's encoded pattern uses 32 oscillation cycles to encode every bit. So for 9600baud, I have 307200 sample/sec. However, for better accuracy, it might be good to use 3x-5x that many no. of samples (does this concept apply for Logic Analyzers as well) ? If that is true, then for 5x sampling, I'd need 1536000 (~1.5Ms/s), on a single channel. Of course, this reasoning for (kind-of over-)sampling comes from the DSO world, but not sure if it applies for Logic-Analyzers as well ?


texts: Using a relay for retro clicky sound - how do I make it louder?

texts:
I'm building a battery operated retro device that I want to sound really clicky and old fashioned. I want to include the noisiest relay (sound noise not electric noise) possible in my project. Can anyone help me identify what characteristics are correlated with more noise? Actuation time? Release time? Weight? Amperage rating? or alterternatively recommend a relatively small relay that is known to be especially noisy? These relays are not intended for switching any loads. The usual google searches for relay and decibels or noise doesn't come up with anything useful.

I have considered using a turn signal but those devices are quite large.


texts: How having separate instruction and data memories helps in implementing a single cycle data-path for mips instruction set? i want to know why we can only use data-path element once in a cycle for making the data-path capable of executing any instruction in a single cycle?


texts:
I have a question in my text book that I do not quite understand. I was wondering if someone could please explain what the question means? Such as, what is a deskewed flip flop. How would one find the max frequency of the clock from the diagram?

Below is the question (8.83) with the corresponding diagram at the bottom:


texts: Function Generator, BNC T and Termination

texts:
I have a question regarding best practices for function generator to circuit/scope connection.

I recently had an issue chasing down excessive ringing on square wave signals coming from a function generator set to Hi-Impedance mode (output is 50 Ohms, setting only affects the reading). The connection at the generator was a BNC T-connector, with one side connected via 3ft of pomona coax to an oscilloscope with no termination (just the standard 1M input impedance), and the other end was connected to a 3ft pomona mini-grabber for circuit connection. According to "The Art of Electronics, 3rd. Ed." Appendix H.1.2 and H.2 on transmission lines, terminating the cable at the source (series/backtermination through the built-in 50 Ohm at generator output) should be enough to eliminate wave reflections, and terminating both ends is not required.

After contacting the manufacturer about the excessive ringing, they initially diagnosed this as a faulty generator, but were able to reproduce the same results on other generators with the same setup, so recommended not to use a BNC-T if I want to use HiZ mode, but to just probe the circuit input with a scope probe. I find the more permanent connection via T more convenient.

So is there some kind of best practices here that people follow to assure clean square waves from their generators to the DUT? Is it generally not a good idea to BNC-T the connection from generator to scope? And/or do both ends need to be terminated, contrary to the position of AoE (although it does mention it as a "just to be safe" measure)?

UPDATE: coming back to this after some time and hardware changes (no T-connectors, just single 50 Ohm coax):

Image 1) a 10MHz square wave using 50Ohm coax, terminated with a 50Ohm in-line BNC terminator and connected directly into the scope. The result is decent.

Image 2) same as 1, except using a 10M probe to measure the BNC output of the feedthrough resistor.

Image 3) same as 2, except with a short bnc-to-mini-grabber adaptor connected to the 50Ohm feedthrough resistor. Scope probe is connected to mini-grabber tips.

Image 4) same as 3, except 100kHz square wave instead of 10MHz.

Anytime the mini-grabber is connected, I get massive overshoot on square waves at any frequency, even with proper termination. What is the cause of this, and how do I remedy it to get a similar wave as shown in image 1 to appear at the input of my test circuits (without having a board made with a BNC connection)?


texts: In a non auto-ranging digital multimeter, what do the increasing numbers in the Ohm section represent?

texts: For my science fair project I am measuring the resistance of nichrome wires under different conditions. I am using an Innova 3300 digital multimeter to measure the resistance. Other websites have told me to move the pointer to the Ohms section. However, there are multiple numbers in that section. What number should I use and how does changing the number affect the results?


texts: Sallen-Key low pass filter cutoff frequency

texts:
How do I calculate the cutoff frequency and the gain of a second order sallen key low pass filter? For example if I want to have a cutoff 35KHz what would be the values of the two resistances and the two capacitors

Using R1=R2=4700 as it was suggested

As you can see with those values , I have succeeded in creating the low pass filter I want , but the cutoff frequency is very high (I needed 35kHz, the graph is voltage to frequency) . What should I change?


texts:
Our device is specified to have a display brightness of 500 cd/m² and it must not decay to less than 50% brightness in 50,000 hours. Now, I can't wait for 5.7 years for that test to finish.

I guess that this issue has been solved before. How is decay in brightness measured?

I know how to measure the brightness at a point in time, e.g. with a Gossen M504G.


texts: Can a system have constant phase response other than +/- 90 deg (and multiples)?

texts:
I have seen frequency responses where amplitude response is constant( pure delay) and where phase response is constant(pure integrator).

In an integrator the constant phase is -90 deg. In a pure gain block the constant phase is 0 deg. Can we have a system which has a constant phase of say -45 deg?

I tried to find such a simple system analytically and ended up with an expression of system function as $$ H(j\omega)=e^{-j\pi/4} $$ Can we have a such a system in real life?

Background: I am trying to understand the importance of phase and amplitude plots individually. For eg: In the frequency response of pure delay systems,  amplitude plot is constant and phase plot is a linear function of frequency.

Similarly how will the system behave if

1) the phase is constant(other than -90 deg) and amplitude plot is a linearly  decreasing function of frequency?

2)  the phase plot is constant (say -90 deg, -45 deg)) and amplitude plot is also constant


texts: Algorithm for simulating PWM through 595's

texts:
I am trying to get a sort of pwm effect in an led matrix controlled by shift registers. I don't need super fine control, so I'm only shooting for around 16 brightness levels.

For a 24 row matrix, going for 100Hz refresh, I need to drive rows at 2400Hz. To get 16 distinct brightness levels, I need 16 times that number, right? That means 38.4kHz, which shouldn't be out of range even for an arduino or similar.

That all makes pretty good sense to me, but what I am not sure of is the best way to control the various brightness levels. I will need a distinct 4 bit number for each bit in the array, and a counter that keeps track of 16 cycles.

If I am at brightness 7/16, I could just light it up for the first 7 cycles like so:

11111110000000000

Or I could try to space it out somehow like this:

10101010101010000

Will there be a visible difference between these two approaches? I am leaning now towards the first one for ease of implementation, but if the second (or some variation on it) has a nice algorithm for different values, then it might be worth looking into. Does it even matter? Is there a better way to acheive this kind of thing? I have looked into led matrix ic's, but they are pricey, and tricky to integrate with my 2 color matrix. 595's are cheap and simple.


texts: Charging a 12.6V 3SLiPo from 5V USB (Or similar) voltage?

texts:
So, I understand that a 3Cell LiPo battery can output 12.6V when fully charged and that the cells must remain balanced to guard against Fire/Explosions/and general bad stuff happening.

However, each cell can only store a maximum of 4.6V. These Cells are then connected in Series to produce the 12.6V.

Is it possible to Charge a 12.6V LiPo from a 5V (or 4.6V) supply using a circuit that resembles something like the one below:

I understand that the ground plane on the charging circuit would have to isolated from the ground plane of the battery.

The MicroController would just cycle through the 3 cells charging one of them at a time. Some feedback loop to 3 Analogue inputs on the same microcontroller could monitor the current voltage of each cell and ensure that more time in the cycle is provided to the cells that are lagging behind until they are again balanced.

Would this work?

Any thoughts and suggestions would be MUCH appreciated. If any circuits like these exist already it would also be super helpful if you could point me at them.


texts: Generating pseudo-random numbers with restricted hardware

texts:
I have a need to generate a 448-bit value that appears random, for use in a test circuit.
The "randomness" of the values is not overly important; the size of the generator hardware is. I am using an FPGA and I have a budget of ~32 logic elements (in Altera lingo, a LE is a LUT plus an FF).

One possible solution that comes to mind would be to make a 32-bit LFSR, and then use some logic functions/combinations of those bits to generate the 448-bit output.

Is there any other clever solution?

Edit: I'm adding some detail because some have pointed out that it is not possible to create a circuit with 448 output bits using only 32 logic elements.

The block I'll be feeding the "random" values does register all 448 bits at its input port. Though I can't touch the VHDL code of that block, the LUTs that feed those registers can be used for combinational logic by the synthesizer. So though it is true I can't create a circuit with 448 output bits using only 32 LUTs, this is not a problem in this particular case, because only the number of registers is a hard limit.


texts:
I am building a solution where I want my MCU to wake up based on a trigger generated by accelerometer after detecting an activity. There are a number of samples available for this and I am able to generate triggers with ease.

The challenge is with the use case where the trigger has to be generated with even a small activity. Basically using it for movement of a gate.

Because the acceleration generated is very less due to the gate movement, I am not able to define a threshold that would be adequate to detect such activity with reliability. If I lower it, I get a number of false positives and if I increase it, I miss the event altogether.

There are a few threads about how to reduce the noise level and I have tried them out.

I am using 3.3V input from Arduino Uno board. When checked with oscilloscope, I get a variance of about 150 MV in the voltage.
The board I am using is from SPARKFUN with ADXL 345
Threshold setting for activity detection is about 20 [scale of 0 and 255]
I have used both stream mode for FIFO
Have also played with min and max data rate levels with no effect
Using I2C interface. Though, I am not much concerned about reading the actual acceleration levels.

My queries are:

What could be the reason for this level of noise. Is it an inherent property of the adxl345 sensor
Is there any other mechanism to reduce the noise level?
Would you suggest any other accelerometer for this purpose? ADXL362 / BMA 180 or any other one?


texts:
I am using Altium 14.1.5

I made a change to a footprint in a non-integrated library and then wanted to update my PCB with the new footprint and it is not updating properly. I may be doing something wrong.

Here is the scenario: the part is on the bottom side (all silk, pads, etc). When I go to the Tools>Update PCB With Current Footprint and click ok with all the boxes checked

my footprint on the PCB rotates 180 degrees and the silk is now on the topside (pads and everything else stays on the bottom). However, when I look at the part information nothing has changed, not even the rotation.

Properties Before:

Properties After:

I erased some information due to confidentiality.

I am not sure why this is happening. Is it a bug that used to be in the in the older version of Altium?

I am adding a pic of the PcbLib footprint and the before and after of what I am trying to explain.

PcbLib:

PCB Before:

PCB After:


texts: Reading and IO port configured as a UART on a PIC16F916

texts:
Is it possible to read the input on a PIC (in this case a PIC16F916) when it is configured as UART RX?

RC7 is the RX pin on the PIC16F916, and I would like to be able to read the state of the pin while the UART is receiving data.


texts:
Here in this problem answer of V2 is 0 volt, but i am getting -2 V as answer because i think that -2 at non-inverting terminal will be reflect as -2 V at inverting terminal....
Is my understanding wrong?


texts: How to dampen a royer oscillating power circuit

texts:
I have a great open-source board for induction heating here from Fluxeon which uses a Royer oscillator. It does a pretty good job and I already had it delivering power up to 1.5kW. However I continue to get smoked IGBTs and main capacitors due to overvoltage.

simulate this circuit – Schematic created using CircuitLab

When I measure the drain-source voltage over M1 I get a voltage up to 1kV. I would like to lower it as much as 500V so the capacitor C1 and the IGBTs don't need to deal with such high voltages. I tried putting more load on R3 but this didn't bring the desired effect. The voltage lowered a bit but not nearly as much as I would need. I succeded putting a resistor in series with L4 but this also resulted in high losses on the resistor.

Maybe someone has got some experience and has a great idea dealing with this.


texts: Circuit design for bluetooth ESP32 in my truck

texts:
I've been working on this circuit for a few months now with lots of research. Looking for the gurus on here to analyze this board and give me some suggestions/corrections moving forward on parts/design.

Functionality desired:
1. Turn on ESP32 when either parking lights flash (this is done by the remote unlock/lock button)
2. Turn on ESP32 when ignition circuit is on (key in and on in truck)
3. ESP32 remains on for (x)mins after parking lights flash and ignition not yet on / ignition turned off after running truck
4. Bluetooth controls relays on truck to operate certain after market accessories, see offroad lights in circuit example
5. Power itself off during certain scenarios such as low voltage / ignition off x(mins)

Functionality of item 3 has been accomplished with the SR latch. The idea is to fuse tap the parking lights fuse and ignition circuit fuse (I've tested this on the truck with a multimeter and it works) and have it latch the SR Latch which will then activate the transistor and connect ground to the TL2575 power regulator which will then power on the ESP32.

Not shown in the circuit yet, but the idea was to also have the 2(12v) fuse tap lines off parking lights/ignition to run to 2 ESP32 pins via a resistor voltage divider (to get around 3.3v) that way the ESP32 can decide the power state of the truck and power itself off which brings me to functionality item 5. ESP32 will send a signal on GPIO 17 to the RESET pin on the SR latch chip via the 4N35 opto-isolator (to bring the voltage back up to 12v for the SR latch)

I do have this wired up completely and exactly as shown on the diagram on a breadboard. It works fine so far...sometimes I have ground issues when powering up the ESP32 but it seems to be a breadboard issue. I also have a basic app on ios/swift that connects via bluetooth and turns on the 12v offroad light relays on GPIO 21.

Questions:
1. Is this design crap?
2. Would you change/add/remove certain transistors, resistors, diodes, parts
3. Is there an easier/better way to accomplish desired functionality?
4. Anything else you have


texts: Help identifying 27" 2012 iMac internal plugs

texts:
I'm going to convert an old iMac into a 5k monitor, but I'd like to identify some plugs so I can have cables made rather than solder. I'm going to see if the cost (after prototype) is reasonable to order a bunch and offer a kit for sale. I apologize in advance for my ignorance of terminology.
For the power switch, it's 1mm OD tall and a bit over 2 mm(2.5mm?) OD wide.
For the power supply, it's made of three "barrels" or pins that are 2mm x 2mm OD.
And internal speakers are 1mm OD x 9mm OD with room for six pins.
If anyone can help with any of this, that would be fantastic. Thanks in advance!


texts:
If I apply an current source into the the cathode of a diode (current flow into cathode), what can possibly happen to the diode.

For the cuicuit below, when the FET is OFF, how does the battery current flow.
Will the current flow through the diode while it's in reverse region.


texts: Which material is considered non linear communication channel?

texts: Communication channels as far I have seen(Air and conductors) are modeled as Linear systems. Was wondering if there are mediums/materials that make the channel nonlinear? For example, if channel is through human body, how do I know if it's linear or not?


texts: Input voltage for LM4862 audio amplifier

texts:
I just started working on an embedded side project that requires me to pump .wav files through headphones.

My main microcontroller is a PIC32, and my audio amplifier is an LM4862. For the DAC conversion for the audio, I am using an MCP4921 (I know it is TOTALLY the wrong chip for audio, but I've already ordered them :(  )

If I replicate the "typical application" amplifier circuit in page 2 of the LM4862 datasheet, can I feed in a 0 - 3 V signal from the MCP4921 and get a reasonable volume from the LM4862? The capacitor between the audio input and the (-) input of the operational amplifier makes me uncomfortable.

Why is the capacitor there anyway? Why not put the audio input straight into the plus side of the opamp and ground the (-) side?

In my application circuit, one of the speaker inputs MUST be tied to ground. I have no way to tie it to vo1 or vo2 as per the "typical application" section of the LM4862 datasheet. How can I circumvent this? Can I just tie vo1 or vo2 low? (I don't think so). Can I leave one or the other disconnected? Should I choose a different amplifier for my application?

However, I think I will just use Ti's LM4881, which is similar to the LM4862.


texts: How important is it to put decoupling caps on the same side of the PCB?

texts:
How important is it to have decoupling capacitors on the same side of the PCB as the IC? I am desperately short of space in a design, and it would really help to put the caps on the bottom side.

I guess it can't be that bad, because BGAs seem to use this technique in designs that are much faster than mine (a 67MHz MCU).

But then questions such as Decoupling caps, PCB layout are full of scare stories about the vias adding inductance.


texts: Why is my RGB LED Strip only lighting green?

texts:
I am trying a project by Make Magazine which allows me to send color values from an android phone to an Arduino and light up the strip. I am having trouble because the strip is only lighting up green and changing colors only varies the green brightness. If I unplug the green output from the Arduino, then I get very dim red's. Here is the Arduino code from the website: http://trevorshp.com/creations/android_leds.ino.

Any input as to how I can fix this? Below is the Circuit Schematic that I was following:


texts: I am using an ESP8266 WiFi module in a circuit. The battery is 3.7V. Is it safe to give the ESP8266 (3.3V) directly without a voltage regulator?


texts:
I am building a class D Amplifier, I have to build my circuit but, overall in the circuit, My hex inverter is not working. when I am providing a digital PWM signal from the LM393 comparator to the HEX inverter (MC74HC04AN), it should invert the PWM signal, but when I am performing,0 volts is coming in the second pin (output of hex inverter).so when I powered the circuit, Mosfet driver Low input side input voltage is showing is zero.in the High input side,5 Volt is coming. but the low input side is not coming. I have changed my hex inverter but nothing has happened.
Operational Data:-
Is there any difference between MC74HC04A and SN74HC04?
Basic Testing of Hex inverter
I am posting another two pictures which are based on basic testing of Hex inverter.
in this experiment, a)- first, I provided square wave of 2.5 volts with 200 khz frequency, duty cycle 50% to the input of Hex inverter, and output was zero volts.
b)- after 1st method was not worked properly, I just thought hex inverter will work as digital input 0 to 5 volt. that's why I provided the same data as above written with 2.5 volts dc offset extra to see the results. when I performed I got these results. please see the below pictures(figure 6, figure 7).
# Class D Amplifier overall practical Data

TLC 555 timer generates triangle wave Approx and above 200khz with 2.14 volt.
LM3393 comparator using for comparing two signals, Audio signal( Sin wave - 1 Hz to 20 khz with voltage-2 volt(max)) and Triangular wave(2.14).(input voltage common-mode range reference taking consideration not more than 3.5 volt)
Hex inverter((MC74HC04AN) is used for inverting the PWM signal.
Ir2113 MOSFET driver is used for high-speed switching.
IrlZ44 n MOSFETs are using.

I am posting my practical data which is shown in real-time operations (oscilliscope).

Schematic Diagram of class D amplifier (Figure 1)
Triangle wave (TLC555 Timer). (I am posting two pictures for clarity)(Figure 2, figure 3)
LM393 comparator output (i am posting two pictures for clarity). (figure 4, 5)

Afterward, hex inverter is unable to work. the reason I don't know. please give me a valuable comment.

figure 1 -Class D amplifier schematic

Figure 2- Triangle Wave

Figure 3- Triangle wave

Figure 4- PWM Generated by Lm393 Comparator

PWM Generated by Lm393 Comparator

Basics Testing of Hex inverter using Function Generator

The output of Hex inverter when basics Test was performing


texts: ESP32/ESP8266 external programmer two way design question

texts:
When I design a PCB that has a ESP32/ESP8266, I usually integrate a USB-UART bridge in the design as well. However, I am now working on a board that will likely have more than just a few copies.
The USB-UART bridge isn't necessary in this particular application as we are unlikely to edit the code once it is uploaded. It adds up to part cost and my time soldering the boards together.
I want to use one of those cheap USB TTL boards to program the boards.
There is a slight inconvenience.
The standard ESP32 auto program circuit uses the "Request to Send" (RTS) line, and the FTDI programmer that I want to use doesn't have that as a standard output as seen below.

It has an RTS pin on the side, so I could butcher the board and make an adapter on a breadboard but I am very sure my superiors won't accept such a put together solution.
Is there a possible hardware solution I could implement on the main board that would allow me to use one of these FTDI boards to program the ESP32 automatically? Pressing a button isn't an acceptable solution either. It has to be a plug in solution.
If there isn't any then I will have to design a separate programmer board that fits the requirements.


texts: Are there any additonal complications or design considerations to be made when placing voltage regulators in parallel?

texts:
The LT3080 variable voltage regulator's datasheet shows a circuit design in which two regulators are placed in parallel to share the power load, resulting in double the maximum current capability of a single regulator. Essentially they just connect the outputs and inputs, and use the same control resistor.

The internal design of the regulator seems to be particularly ideal for this kind of application, due to the configuration of the output transistor, though I'm certainly no expert on this.

Are there any considerations I should make when setting up a supply in such a parallel configuration? Is it safe to assume that only regulators with explicit mention of this capability in the datasheet should be used in this way?


texts:
We're trying to build a rudimentary Balance Board using four force sensitive resistors and an Arduino unit, but are not sure how to wire up the circuit.

How do we connect the sensors to the Arduino?


texts: In Altium how do you increase the trace width from a Pour to GND Vias and Pads?

texts:
In my PCB layout I have a ground power connector and several pads where I would like thick traces to connect to the ground plane.

When I use the polygon pour feature, it will connect these with 4 traces. How do I increase this width? There is also an LED with an isolated thermal pad, which ideally would have no gap at all. The image below show what I mean.


texts: Is it correct to place the base to emitter resistor in a BJT circuit as follows?

texts:
This is a follow up Question to What is use of R41 (base to emitter) resistor in Transistor Relay Circuit?

My doubt is can we connect the resistor R41 between emitter of optocouler and GND?

The pulldown resistor is usually connected to one end of a switch.

and it would be more consistent to connect R41 (in original schematic) to the emitter of optocoupler (SWITCH).


texts: RFM only works if i touch power supply line

texts:
I have a small system with a ATtiny84 and an RFM12B module that transmits data.

The thing is it only transmits when i touch both GND and +VCC.. no matter what component it is on.

Do i need mere caps or what is the problem? i checked the voltage levels and everything which is fine! Is it because of capitance or what is the solution?

Here is a wiring diagram of the system.

And a picture


texts: i2c + 7 segement serial display + ATtiny85

texts:
I have a project that requires a 7 segment display and I was trying to get away with using the smallest micro controller possible.

Does anyone see any problems with connecting an ATtiny85 to a 7 segment display or have an experience with it?

https://www.sparkfun.com/tutorials/407


texts: Which diodes are used in a high amperage rectifying circuit? (4007 are 1A rated) and other components

texts:
I recently designed a power supply that was good for about 700mA power and used these diodes
https://www.diodes.com/assets/Datasheets/ds28002.pdf They are 4007 diodes. As I am checking the datasheets for my 5A power supply I'm noticing that they are good for up to 1A so I was wondering which diodes are commonly used with high amperage 50 Hz / 60 Hz power supplies? What other components can I expect to change with this change in amperage? Looking forward to your responses

EDIT: this is a standard 50Hz / 60Hz power supply .. buck converter becuase it's high amperage.
That is what i'm referrring to in this question, as replacement for 1N4007 diode.

I am also making a different 5A power supply.. which in this case requires Schottky diodes rated for high frequency and 3-4A, in a full bridge rectifier

thanks


texts: How to change the frequency of this sawtooth generator circuit?

texts:
I've found the circuit below in "The Art of Electronics" book.

This circuit generates sawtooth signal. This is some of what is written about it:

  By using a current source to charge the timing capacitor, you can make a ramp (or "sawtooth-wave") generator. Figure 5.35 shows how, using a simple pnp current source. The ramp charges to (2/3)Vcc, then discharges rapidly (through the 555's npn discharge transistor, pin 7) to (1/3)Vcc, beginning the ramp cycle anew. Note that the ramp waveform appears on the capacitor terminal and must be buffered with an op- amp since it is at high impedance.

I have simulated the circuit and it works well giving a sawtooth output between (1/3)Vcc and (2/3)Vcc.

I have two important questions about this circuit:

How to control the frequency of this circuit? What is the formula that can be used for this?
Is there a way to make the sawtooth signal starts from zero (or somewhere else) rather than (1/3)Vcc?


texts: How do I find the effective resistance of a Thevenin circuit if the points are in between resistors

texts:
I just started taking classes on circuit analysis. have a question regarding this Thevenin circuit. My end goal is to find the maximum power that can be obtained at A and B. I managed to find the potential difference across A and B, to be 10V, and current I, to be 2A, in the circuit using Kirchhoff’s voltage law. However I’m unable to resolve the resistors in a way that gives me the effective resistance across A and B and I’m not too sure how to move on from there to calculate the maximum power. Any advice would be greatly appreciated.
Edit: additional question, I was wondering in which direction would current flow when it passes the 6v cell. Based on my calculation, the resulting current flowing through the 4 ohm resistor is 1.5A


texts:
I apologize if this question is too vague, but I only have a basic knowledge of embedded systems and I know very little about bluetooth.
I am researching for a project in which I want to use a BM70 or BM71 module to act as a source using A2DP to stream audio to a bluetooth speaker. I want to use the BM70/71 in manual mode using a host MCU that controls the BM70/71 using UART. I've read the user manual for BM70/71 and I think I understand how I would discover and establish a connection with another bluetooth device. I've also read the A2DP spec and it seems like (though I'm not sure) I need to establish an L2CAP channel to send the A2DP messages between the devices.
I can't figure out how I can control the BM70/71 to establish the proper connection with the bluetooth speaker in order to send the A2DP commands.
I'm not looking for a complete answer, but just something to push me in the right direction, as I don't know what to search for at this point. I've searched for BM70/71 and L2CAP together but there seems to be nothing out there.
Thanks!


texts: Is this the correct way of calculating the typical propagation delay?

texts: Since it is typical propagation delay, and it is 74LS86, I will have to use the table on the typical Column with the 86 “2 levels” row right? And how do I get on from here? Correct me if I’m wrong please. I can’t seem to figure out how to calculate.. Thank you


texts: Modify PWM controlled 230v incandescent bulb dimmer circuit

texts:
I have a PWM output from one device (Arduino) and want to use that output to dim an incandescent 230V 60W light bulb.

I found this circuit online which does what I want it to do.

From the way I understand it, the bulb will light up with full brightness when the Arduino is turned off.

Now I would like to modify the circuit in two ways:

Power to the light bulb should be turned off completely when the Arduino is off. Note that I have not yet tried building the circuit, so I might misunderstand something here. Or does the optocoupler work differently from a TRIAC in that it will turn off when there is no voltage applied on the left side?
I would like to use 4 PWM signals to control 4 bulbs. Which parts of the circuit can I re-use?


texts: Finding Quartz Crystal Datasheets and Choosing resistors for Pierce Oscillators

texts:
I am trying to build a 2Hz oscillator using a CD4060 IC and a 32.768kHz quartz crystal for a digital clock project. The schematic below is from a hackersbench article. I've circled the part i'm interested in. I'm trying to find the optimal value for R1. A common bit of advice given is to consult the datasheet for the quartz crystal when selecting resistor and capacitor values etc etc..  I have not been able to find a data sheet for the crystal I have, nor have I been able to find a similar data sheet for any similar crystal.

This is the crystal I ordered off amazon

There is some information:

Features:
Type1:
Frequency: 32.768KHz, 12MHz
Body Size: 2 x 6mm / 0.08" x 0.24" (DL)
Type2:
Frequency: 32.768KHz, 8MHz, 16MHz
Body Size: 3 x 8mm / 0.12" x 0.31" (DL)
Load Capacitance: 12.5pF

Frequency Tolerance : ±20ppm
Mounting Type: DIP
Number of Pins: 2
Operating Temperature Range: -20℃~70℃
Material: Quartz; Color: Silver Tone

I could simply go with this schematic and hope for the best but i'd really like to understand what i'm doing before I solder things instead of just going by some internet article like an amatuer. I have no idea how he was able to calculate those resistors.

I was able to find this: http://www.ti.com/lit/an/szza043/szza043.pdf
Page 12 explains some of the workings of the oscillator, but doesn't go into much detail on actually calculating anything.

My biggest concern is the crystal breaking after prolonged use. I will be using a trimmer cap to adjust the actual frequency to be close to 2Hz.

This seems to be a pretty popular question on here, and it seems to be a pretty involved subject, probably beyond my junior level knowledge. The author of the article does not mention the specs of the crystal.

EDIT: I figured it out and will post my own answer once i test it. The only thing i still need to calculate is the parallel resistors to the crystal. Most sources say “somewhere between 1M and 15M” but i find that sketchy

Here’s what found in the meantime:

https://www.crystek.com/documents/appnotes/pierce-gateintroduction.pdf


texts:
I have a question about charging and balancing a 10-12 cell LIPO battery. I have been searching around for an all in one
solution chip but come up empty. I have also found out that there are almost no lipo charger chips that do more then 6 cells. So my question is this.

How do lipo chargers like this
do their balance charges. Do they use a lipo charger and lipo balancer chip in conjunction with each other? If so would a balancer like this
and a charger like this work?

My next question is why are there no high cell count chargers? The way I currently charge the battery is by
splitting it into two 5-cells then charging each seperately which works fine but doesn't seem like the best way to do it. I guess I could use 2 balancers and 2 chargers to charge the battery simultaneously.


texts: How can I calculate the voltage on the load in this circuit?

texts:
I've been try to solve this circuit for hours and have no idea on how to find the load voltage U_s.

I tried applying the Thevenin theorem to find the equivalent Thevenin voltage (using the voltage divider rule => E_Th = 6V) and also the Thevenin resistance (we take R_s and R in parallel and the result is going to be 5k (ohms)).
I don't know what to do next. Should I replace the diode with an open circuit because it is reverse biased? After that, is it okay if I say that the voltage on the cathode is V_C = E_0 = 3V, and compute the voltage on the anode using the voltage divider rule?


texts: Design an active bandpass filter to get 1.5MHz peak frequency and 300KHz band

texts:
I have this question in Linear Circuit Analysis course where I need to find the values of R1, R2, C1, C2, of the given bandpass filter circuit in order to get a peak frequency wp = 1.5 MHz and a bandwidth Bw = 300 kHz.

the first step is to find the transfer function of the circuit, to compare it to the general TF of the bandpass filter:

\$H(s) = \frac{Ks}{s^{2} + 2\sigma s +\omega p^{2}}\$  (1)

and this is what I get :

\$H(s) = \frac{\frac{-1}{C2R1} s}{S^{2} + (\frac{1}{R2C2} + \frac{1}{R1C1})s + \frac{1}{R1R2C1C2}}\$ (2)

by comparing the two functions, we get these 2 equations (Bw and wp) with 4 unknowns:

\$\frac{1}{R1C1} + \frac{1}{R2C2} = 6\pi \ast 10^{5}\$    (I)

\$ \frac{1}{R1R2C1C2} = 9\pi ^{2}\ast 10^{12}\$ (II).

I am allowed to assume 2 unknowns out of the four, so, I went with C1 = C2 = 1uF.

now I'm supposed to solve a system of 2 equations with 2 unknowns, but for some reason, it is not working with me; I tried solving for R1 in eq 2, and the substitute in eq 1 and I got a negative R2 resistance, what could be wrong?? is there another way to solve it that I am not aware of??

Edit 1: fixed the equation format.


texts: Is 4x7+dp LED segment display wired the same as 4x8 LED dot matrix?

texts:
I'm currently working on a project that need a 4x7+dp common cathode LED segments display.
I have found two drivers for it that I like.
#1 https://www.issi.com/WW/pdf/31FL3731.pdf
#2 https://ams.com/documents/20143/36005/AS1115_DS000206_1-00.pdf/e040d791-18f8-9f29-01f9-927bf6336bb7
Edit: Here is a link for the vintage 4x7+dp segment display:
https://www.keesvandersanden.nl/calculators/datasheets/HP_50827400.pdf
I was wondering if a dot matrix led display is actually wired the same as a standard 7 segment led display. As far as I can see they are but I can't really wrap my head around it. I'm asking because it influences whatever I actually have a choice between chip #1 and #2.
Side note: I know that some drivers have bdc/hex decoders build in but I don't need them. All I need is to turn select leds on or off as I'm doing the rendering on the MCU.
I also know that I could do without a driver and use resistors and FETs or IO expanders but i'm low on pins and have very limited board space.
I'm looking forward to your responses.


texts:
I work on a car structure precisely on a body in white which include parts in aluminium and some others in carbon fiber...

I wonder if there are any requirements for the location, number of ground point on a Body In White of a car or it depends of the equipment which i want to include in my car?

If yes, are there any differences between the ground points requirements for an aluminium Body in White and a carbon fiber ( cfrp ) Body In White ?

Because i know aluminium and crfp have different electrical caracteristic but i did not find any documents about the automotive applications which prove clearly those differences...


texts:
I have initialized the Micrium Rtos and there is no error when I compile the project but there is a OSTimeDly function in my code that is not working.

I should notify that when I give the first argument of this function ( related to number of ticks to specify the time delay ) the value of 0 , my task is working well but giving any other value to this argument (500 in my code) , stops the program .
Do I need to activate something else to enable using delay functions ??

Here is my code :

#include <GPIO_LPC17xx.h>
#include <app_cfg.h>
#include <os.h>
static          OS_TCB      AppTaskStartTCB;
static          CPU_STK     AppTaskStartStk[1000];
static          void            AppTaskStart(void *p_arg);

void SysTick_Handler(void)
{
OS_CPU_SysTickHandler();
}
int main(void)
{
    OS_ERR err;
    GPIO_SetDir(0,20,GPIO_DIR_OUTPUT);
    GPIO_PinWrite(0,20,1);
    OSInit(&err);
    if (err !=OS_ERR_NONE) {
        GPIO_PinWrite(0,20,0);
    }
    OSTaskCreate((OS_TCB        *)&AppTaskStartTCB,
                            (CPU_CHAR       *)"App Task Start",
                            (OS_TASK_PTR)AppTaskStart,
                            (void           *)0,
                            (OS_PRIO         )5,
                            (CPU_STK        *)&AppTaskStartStk[0],
                            (CPU_STK_SIZE)1000/10,
                            (CPU_STK_SIZE)1000,
                            (OS_MSG_QTY  )0,
                            (OS_TICK         )0,
                            (void             *)0,
                            (OS_OPT          )(OS_OPT_TASK_STK_CHK  |  OS_OPT_TASK_STK_CLR),
                            (OS_ERR         *)&err);

    if (err !=OS_ERR_NONE) {
        GPIO_PinWrite(0,20,0);
    }
    OSStart(&err);
    if(err !=OS_ERR_NONE){
        GPIO_PinWrite(0,20,0);
    }
}
static void AppTaskStart (void *p_arg)
{
    OS_ERR err;
    p_arg = p_arg;
    CPU_Init();
    cpu_freq = 100000000;
    cnts     = (cpu_freq / OSCfg_TickRate_Hz);
    OS_CPU_SysTickInit(cnts);
    SYSTICK_InternalInit(10);
    SYSTICK_IntCmd(ENABLE);
    SYSTICK_Cmd(ENABLE);
    GPIO_PinWrite(0,20,0);
    while(1)
    {
        OSTimeDly((CPU_INT16U   )   500,
                            (OS_OPT         )   OS_OPT_TIME_DLY,
                            (OS_ERR      *) &err);
        GPIO_PinWrite(0,20,1);
        OSTimeDly((CPU_INT16U   )   500,
                            (OS_OPT         )   OS_OPT_TIME_DLY,
                            (OS_ERR      *) &err);
        GPIO_PinWrite(0,20,0);
    }
}

Please help me to solve this problem.

My compiler is Keil.

Thanks in advance


texts:
I have a solar powered project which includes an Arduino Nano and a cellular module.
At the moment the Arduino is powered via the USB port and the cellular module is powered by a small 3.7V battery (to cope with the brief 2A spikes during data transmission.) I want to power both of these elements from the same 11.1V lithium-ion battery which I can keep topped up with a solar panel and a charge controller.
To do this, I’ll need to regulate the voltage from the battery down to two different voltage levels – 7-12V for the Arduino and 3.7-4V for the cellular module. The battery needs to be 11.1V as it will occasionally be used to directly power a solenoid.
A lot of people seem to opt for the LM2596 regulator, but it seems a bit overkill for this since the battery voltage will actually be between 8.25V and 12.6V. Regulating 8.25V down to 7V isn’t much of a drop and the LM2596 is designed for higher voltages I believe.
I’ve found some dual output step down converters, such as the TPS54395.
I’m wondering if anyone has any other suggestions which may be easier to implement?
I don’t mind SMT components either as I’m looking to fabricate a PCB for the project anyway. The device should also be able to supply at least 3A.


texts: Ideal Op-Amp circuit Output voltage expression

texts:
simulate this circuit – Schematic created using CircuitLab

Here I am trying to find or derive expressions for both Vo1 and Vo2 in terms of Vi1 and Vi2.
This is how I approach this. All resistors are the same. So I see that I can do KVL following I1 since there's no currents flowing into op amps.
So -Vi1 + I1xR + I1xR + Vo2 = 0 and this yields:
Vo2 = Vi1 - I1x(2R)

Vo1:
Because of virtual ground I concluded that Vi2 is seen mid-point between the two Rs at the output of op-amps. Consequently Vo1 = Vi2 - (I/2)xR.

Are my expressions for both Vo1 and Vo2 correct?


texts: How do I add a node to a point in a circuit in Quartus Prime?

texts:
I would like to be able to view not just the output of my circuit in simulation but also an interior node. You can see it in the below diagram. I named the connection "D2".

Do I have to connect that wire to an output in order to view its value in simulation, or is there another way to make it show up in the Node Finder so I can add it to a wave form?


texts: Why there are power supplies that have rs232 and USB interfaces?

texts:
Sometimes power supplies have USB and RS232 interfaces, what is the reason?
edit
In this video of eev blog, david jones was doing a teardown of one which has rs232 and usb interfaces..


texts: How to wire this relay (silkscreen in Chinese!)?

texts:
I have the following relay and am unsure of how to wire it since the silkscreen is in Chinese :-/ Datasheet.

I'm finding the datasheet difficult to interpret, but from playing around with my multimeter, I'm thinking the terminal on the right is NO, the middle is the input, and the left is NC. Is that right?


texts: Can anyone explain me how I can find gm from this schematic below (for a nmos transistor)when VGS=6V and VDS=6V?


texts: Why does a 2N2222A Darlington pair have 1/2 the hFE as a single one?

texts:
I set up a darlington pair out of 2 2N2222As, each with a DMM hFE of 300 or so, and the resulting hFE is 170.

I read on the Interwebs that a Darlington can multiply or add the hFEs of the individual transistors, but this isn't the case (at least with BJTs).

What is the real ballpark hFE calc for a NPN Darlington pair, then?


texts: Can someone explain how this circuit works? I have an idea but I dont know if its correct

texts:
What circuit does is turns the lights on sequentialy like on this gif.

What I think is happening is that the capacitor thats connected between ground and the output pin through that 4k7 res is slowly getting charged up each time the pulse goes low and the 555 sinks the current through the output pin. The cap is charging up from 0V to some voltage that can activate first transistor and then each time it gains 0.7V more volts its can over come two then three transistors and so on. What is confusing me is that why do they turn of completely? How does the cap empty to 0V fast?


texts: Why does WiFi have a shorter range than LTE?

texts:
It seems confusing that my phone receives -87 dbm LTE signal and shows a full 4 bars with the speeds of

UPLOAD: 20Mbps

DOWNLOAD:13.6Mbps

But my WiFi is showing 1 bar at -89 dbm and I get disconnected as soon as I move slightly away, and speeds are very low.
Why does this happen? It happens with all my phones.


texts:
The aim of the exercise is to design a ratio detector FM demodulator circuit.

UPDATE:
I changed the circuit:

This is my transient analysis in output:

I found the information about AC analysis and it would look like it:

But my result of AC analysis:

Is it good? It seems okay to me, but I cannot explain why.


texts: Need 3-axis wireless gyroscope/accelerometer.

texts:
So I would like to have a sensor that can detect rotation (around the vertical axis only is needed) and that detects motion (no specific direction, only be able to detect if the sensor is moving).
I would like it to be wireless and transmit the data to a Mac via bluetooth or whatever is the best.
I was looking at this one but was wondering how I could make it send the data and if it's suitable for what I'm trying to do (if it can measure rotation and motion). I can buy an arduino too if needed.
Thanks in advance!


texts:
It is common to see capacitors in parallel, with smaller and smaller capacitance, in order to reduce the parasitic ESR (and the equivalent series inductance).
This allows obtaining relatively big capacitances of very low ESR. But I've not seen in the literature that a similar, dual trick, is used for inductors: to connect in series inductors of smaller and smaller inductance (and hence, generally speaking, of smaller and smaller parasitic effects), with suitable shielding. I had a look at various inductor models, and if my understanding is correct, this would reduce enormously the parallel capacitance (probably the most annoying parasitic element), as well as the parasitic parallel resistance (magnetic losses). Of course, this would also somewhat increase the ESR of the inductance, but this is not a problem in general.

My question is: is this idea correct, and where is it dealt in the literature?


texts: As we know, there are many types of common mode filters that can be implemented. One of this type is a single element topology where this element can be a series impedance element (usually R or L or common mode choke ) and a shut impedance element (usually a capacitor). My question is regarding when these two types have a high effectivness . According to electromagnetic compatibility engineering book by Henry Ott, the series impedance element must be larger than the sum of the impedance of the load and the source to be effective and for the shunt impedance element, it must have an impedance that is lower than the parallel combination of the source and load impedances. So why these conditions will make each filter element effective?


texts:
1.In this circuit the R3, C1 and R6, C2 are said to act as low pass filters. The R3, C1 combo is easy to understand, however I don't get the R6, C2 configuration as they are parallel to each other, how can they act as a low pass filter? Also whats the function of D1?

2.The exit delay is achieved via C3,R7. The time constant RC determines the delay period, during which the gate input is held low. Does D2 act as some sort of protection?


texts:
With the following circuit, would the R2 resistor not change or affect the polarity in some negative way (no pun intended)?

In the image below I added the red box as well as the red text in an effort to try and understand what is happening when the R2 resistor attaches to the +4V lead.

Can someone please explain what it is doing assuming that everything on the circuit is correct?  Note: The positive lead is switched power, so it might be on or off at any given time.

Reference webpage:Power Control System for RPi Car PC


texts: Looking for circuit board material that can be dissolved

texts:
We are working on a product where the entire device needs to be dissolved in liquid after the device has operated and the device is no longer usable or desired.

This is a down-hole application.  The device body is either aluminum or magnesium.  There is a small lithium-ion battery plus a circuit board with some electronics.  There currently exists technology that can dissolve the aluminum body - a brine solution of about 5% Potassium Chloride (KCl) is circulated until the device is dissolved.

Our client would like to have the circuit board break down / dissolve as well.  The board is currently FR4 glass epoxy with traces on both top and bottom layers.  We will have a look to see if there is any chance that we can constrain the traces to the top-side layer only - this might allow us to use an aluminum circuit board.  However, I'm not hopeful this will be possible.

I'm looking for suggestions for either suitable PCB material OR techniques that might allow the board to be dissolved.

For example, we are considering using a much more fragile PCB material (paper-epoxy) and using a small explosive charge to shatter the board into much smaller pieces.  However, I'd like to learn about other techniques that might achieve our goal.

Note that is NOT a shopping question.  If someone can suggest a PCB material that would directly be suitable - that's awesome.  But I'm after other techniques that might achieve a similar outcome.

I'm aware that the individual components won't be dissolved by the brine solution.  However, the goal is to make the pieces small enough that they can be pumped without clogging the system - the pieces can be filtered out and discarded.

[Edit]

From the comments below:

1) Not military

2) PCB is currently about 1.5" x 1.0".  Was larger but we've been shrinking it.

3) Operate time from deployment to end of life is measured in hours.  I'm not the lead engineer on the project but I think there is sufficient battery capacity for about 24 hours of operation.

4) PCB is sealed inside a heavy-wall aluminum canister.  Circuit board is not exposed to any liquid during operational life.

5) Max temperature that we have been testing to is 100C.  Surprisingly, the particular Lipo battery that we are using is quite happy at that temperature.

6) The unit dissolving or breaking into smaller pieces is simply so that it doesn't cause obstruction when it has finished its job.  Nothing nefarious - just sort of "cleaning up after itself".


texts: Electric Analogy to Hydro-Electric Power Plant

texts: What is the right electric analogy for the system of power generation in hydro-electric power plants? I am especially curious in designing the surge tank with the symbols for electric components.


texts: Generate a 200kHz varying voltage signal

texts:
I have a 12V DC supply from just a normal household converter.
We have to  make a circuit which will output an 200kHz AC signal with a p2p voltage of 3-12 volts depending on a strain gauge. 3 being no load and 12 being complete failure.

We have been given 2 555 timer ICs but I really don't see where to start with this; anyone able to give me a push in the right direction with any part of this?


texts: Why don't phasors give the transient state?

texts: I don't understand why phasor analysis doesn't tell us anything about the transient state. At exactly what part of the analysis is the transient part "lost"?


texts:
I'm using this CT for current monitoring. It is a split-core current transformer. It just plugs around the phase load wire. I was using this with a breadboard circuit and it works fine. I'm doing a PCB now and I have decided to go for this, It's a vertical PCB mount current transformer. It's a through-hole component. Also, the phase wire is a copper trace.

Do you still have to pass the phase wire through the CT or just trace the phase wire to one of the terminals of the PCB mount CT? Any suggestions will be helpful.


texts: How to use Turnigy MultiStar ESC with generic microcontroller?

texts:
I just got the Turnigy Multistar 20 Amp Multi-rotor Brushless ESC 2-4S.

I have a motor and a battery hooked up to the ESC. On the three pin connector, I attached the brown ground wire to a ground pin, and yellow signal wire to a PWM-capable IO pin.
I'm trying to figure out how to send motor signals to the ESC, with no luck. I know that I need to send PWM output through the yellow signal wire, but I don't know the frequency or high time of the PWM signal. Also, I've read that certain ESC's have an arming procedure, and I'm not sure how that works.

How do I control my ESC from a generic output pin hooked up to a microcontroller?


texts:
I want to convert from binary to hexadecimal but I found a few problems with VHDL in Quartus II.

library ieee;
use ieee.std_logic_1164.all;

entity Hexadecimal is port

(
hexadecimal: in integer range 0 to 9;
binario: out std_logic_vector(3 downto 0)
);
end Hexadecimal;
architecture comportamiento of Hexadecimal is
begin
    process (hexadecimal)
    begin
        If hexadecimal = 0 then
            binario <= "0000";
        elsif hexadecimal = 1 then
            binario <= "0001";
        elsif hexadecimal = 2 then
            binario <= "0010";
        elsif hexadecimal = 3 then
            binario <= "0011";
        elsif hexadecimal = 4 then
            binario <= "0100";
        elsif hexadecimal = 5 then
            binario <= "0101";
        elsif hexadecimal = 6 then
            binario <= "0110";
        elsif hexadecimal = 7 then
            binario <= "0111";
        elsif hexadecimal = 8 then
            binario <= "1000";
        elsif hexadecimal = 9 then
            binario <= "1001";
        elsif hexadecimal = 'A' then
            binario <= "1010";
        elsif hexadecimal = 'B' then
            binario <= "1011";
        elsif hexadecimal = 'C' then
            binario <= "1100";
        elsif hexadecimal = 'D' then
            binario <= "1101";
        elsif hexadecimal = 'E' then
            binario <= "1110";
        else
            binario <= "1111";
        end if;
    end process;
end comportamiento;

But when I try to compile it, it throws this error:

Error (10327): VHDL error at Hexadecimal.vhd(33): can't determine definition of operator ""="" -- found 0 possible definitions

I came to this forum at last because I tried everything. I hope you guys know how to solve this.


texts:
I have a PID/heater setup I am driving with an arduino. I'm using the Opto 22 MP240D4 solid-state relay to switch about 1A 120V 60 Hz (resistive heater). It's not clear from the product sheet or the datasheet whether it is zero-cross turn-on, or not. Also, just a bit of context, the application is a very low mass heating element, so it is a bit unusual from the perspective of typical PID plants.

I want to minimize the granularity of the pulse width/density modulation so as to get the best performance out of the system.

Obviously, my absolute upper bound is 120 Hz since that's the number of zero crosses. But is there any harm (in terms of thermal fatigue, stresses to the chip, etc) to running it at high pulse speed?

Also, is there any advantage to either pulse-width or pulse-density modulation?


texts:
I'm performing an analysis of power consumption of CNN ( with the trtexec tool ) on Jetson TX2, varying the Host and Device frequencies.

In the past I have performed this power analysis through a multimeter,
in which I measured the current that flows from my lab power supply ( set at 19 Volts ) to the carrier board. Then through the Ohm law, I algebraically obtained the power consumption of the carrier board.
Finally I have subtracted from this consumption, the power consumed when the SoC is in idle.
For sure this is not an optimal methodology but I guess that it give an idea of the power consumption of the TX2 SoC.

Recently I'm trying to do the same, not with the multimeter, but through the INA3221 sensor inside the board.
I created a script that read the input power of the SoC rail: in_power1_input.

The problem is that this two results are very different: about 4 Watt with the multimeter and about 0.9 Watt with the sensor.
I am not an expert in electronics and power consumption of embedded systems, but I think that 0.9 Watt at the maximum GPU and CPU frequency is too low.

Maybe the SoC rail does not consider the GPU consumption? or the INA sensor does not capture something that in reality consumes power or something similar?

Thanks


texts:
I was looking at an amplifier schematic and saw a curious portion that I realized I wasn't sure what its purpose was.

simulate this circuit – Schematic created using CircuitLab

At first glance I thought I saw a low pass filter, but then I said wait no, those are in parallel. What's that capacitor doing there? Is it smoothing the audio source, acting as some kind of noise filter? Is there a name for this kind of device? Would any assumptions need to be made (like whether the audio source has a constant current, or constant voltage or neither) to determine the function of this device? I was operating under the assumption of direct current and audio was encoded as time varying voltages, but if that's not the case, would the circuit do anything different? I saw some things thrown around online like smoothing capacitor, so on an audio signal would it just smooth out sharp peaks? Would this be make it sound nicer, like how a sine wave sounds different than a square or triangle wave?

What would the difference be if I skipped that and connected the audio source directly to my NODE1 there?


texts:
I'm young user of Arduino IDE and with my new Olimexino-328 it's quite impossible to upload any sketch without stk500 sync error :

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "D:\Ard_Oli_Dev\arduino-1.04\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM2
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x00

I don't know what version of optiboot is installed.
If someone as an idea, I'll appreciate  Thanks.


texts: How does flux change polarity in full bridge SMPS transformer?

texts:
Take a full bridge switching circuit connected to the primary of a transformer.

Assume:

No load on secondary.
Voltage into full bridge is DC.
Duty cycle of switching is 50%.

At t = 0, full bridge connects voltage to primary, lets call it "positive".

Faraday's law says slope of flux will be opposite in magnitude, and flux will increase (negatively) linearly until half cycle is over and voltage flips. At that point, flux will increase (positively), and so on.

What I see here is that flux starts at 0, and reaches some negative peak, then heads back to zero. It never crosses into positive territory and never changes sign.

In typical full bridge SMPS design, how is flux made to be bipolar and actually change polarity?

I am assuming it is desirable and possibly required to make it do this in order to prevent flux walking and also because if current is to change polarity in secondary, flux must also change polarity.


texts: Proper convention for schematic component pin input/output arrows

texts:
In a schematic, if a designer chooses to use arrows on pins of a component, should they always point in the direction of current, or in the "perceived direction" of the signal? Or this a made-up designation with no real integrity?

I'm using Altium Designer and the pins on a component can be denoted as several specific types:

Input
I/O
Output
Open Collector
Passive
HiZ
Open Emittor
Power

I will use a connector as a specific example, however I'm interested in the use of pin arrows across devices.

Here is a connector with 8 pins of the type correlating to the list above. Observe the first three pins have arrows based on their pin type:

I'm wondering if there are specific standards/conventions for arrows on pins.

I have a 4 pin connector in my circuit. From the reference point of my circuit, the 4 signals are:

Power (12V+ from my circuit to connector, supply is from my circuit)
Ground (supply is from my circuit)
PWM "Out" (Device that plugs into connector has a pullup resistor and reads via GPIO, my circuit will periodically pull it to ground)
Tachometer "In" (Device that plugs into connector periodically pulls this to ground, my circuit as a pullup resistor and reads via GPIO)

Here is the system schematic of my setup:

Going back to the image of the hypothetical 8 pin connector, since the "Input" type shows an arrow going in to the connector, the type is clearly from the reference point of the component.

Using the connector as the reference point:

I assume I will want "Power" to be an input. That's easy, because
conventional current flow into the connector.
With Ground, current flows back out of the connector. So that must be an "output".
As for PWM "Out", it's an "input" to the connector, however current flows out. I still assume "input" is the proper type.
The tachometer is just the vise-versa of PWM "Out".

Are my assumptions correct?


texts: How do VHDL case statements scale when additional expressions are added?

texts:
I am using a case statement in VHDL where the expression is a 12 bit bus address and the output is a 32 bit data bus.

Here is my code:

process (iAPB_BUS_IN.pclk)
begin
  if rising_edge(iAPB_BUS_IN.pclk) then
    if (write_pulse = '1') then
      case bus_addr is
      when TX_CTRL    =>
          rd_data(31)             <= tx_enable;
          rd_data(30)             <= arb_suppress_mgmt;
          rd_data(29)             <= arb_suppress_2022;
          rd_data(28 downto 0)    <= (others => '0');

        when TX_STATUS    =>
          rd_data(31 downto QUEUE_NUMBER)   <= (others => '0');
          rd_data(QUEUE_NUMBER -1 downto 0) <= tx_que_avalb;

        when RX_CTRL    =>
          rd_data(31)                       <= rx_enable;
          rd_data(30)                       <= rx_allow_tcp;
          rd_data(29 downto 0)              <= (others => '0');
        --------------------------------------------------
        -- What happens if I add another expression below?
        --------------------------------------------------
        when RX_CTRL2    =>
          rd_data(31)                       <= rx_que;
          rd_data(30)                       <= rx_allow_udp;
          rd_data(29 downto 0)              <= (others => '0');
      end case;
    end if;
end process;

There are a few answers on here that give an example of synthesizing case statements, (like this one), but they do not give any detail about how many LUTs are used.

I would like to know how to judge how many additional LUTs will be added if I add another when statement.


texts: A recommended way to check a transistor is not burned, without burning other PCB parts

texts:
This might seem a basic questions but I am relatively new to circuit implementations and working with PCBs. I suspect that one of my transistors is  burned.
I am using 2N3904.

For example, is checking short circuit between base to emitter a good idea (should there be a short circuit between these two legs)?
I know the theoretic properties of a transistor, but giving it some current I, in the base and checking if the emitter current is (\beta times I), does not feel to me like a very good idea.


texts: Capacity Embedded in PCB for High-Sensitive Electrometer Legitimate?

texts:
For a highly-sensitive electrometer one needs not only high resistance but also a really small capacitance to achieve certain AC behavior e.g. stability of the opamp.

The figure below shows a typical example of a electrometer circuit with an opamp and can be extracted from this Analog Devices application note.

This is equal to the following circuit.

simulate this circuit – Schematic created using CircuitLab

The values given in the schematics plus the noise budget calculations I did, result in a output range (worst-case, \$T_A = 25°C\$) from \$320\, µ V\$ (noise floor) up to \$ 3.3 \, V\$ when a dual power supply (\$V_+=3.3 \, V\$ and \$V_-=-3.3 \, V\$) is used. According to simulation a \$3 dB\$ bandwidth of \$ 530.52 \, Hz\$ works well for a pulsing of the input signal with \$ 200 \, Hz\$. The idea is suppressing noise below this frequency as you mix your signal up from \$0 \, Hz\$ to a higher \$f_{IF}\$. The bandwidth of the system is mainly determined (or from a ideal POV only determined) by the feedback capacitor and can be calculated with

$$f_{3dB} = \frac{1}{R_f C_f 2 \pi}$$

So the capacitance needed is in the femtofarad range (\$30 \,fF\$). Now my question is if you have a feedback path (cf. picture), where you want to avoid coupling impedances (to somewhere outside of this low-current path) of any kind (you use all kind of fancy guarding techniques e.g. via fencing) would you say it is legitimate to use an embedded, self-made pcb cap? You know like basically two plates on TOP and BOTTOM.

I mean the calculations say, that for \$30 \, fF\$ you need two plates with an area of approx \$1.153 \, mm^2\$ when you use FR4 (\$\epsilon_r = 4.7\$) and a PCB with \$1.6 \, mm\$ thickness.

So you have

$$ C = \frac{\epsilon A}{d} $$

which can be rewritten as

$$ A = \frac{C d}{\epsilon} $$

If I got it correctly you can just draw two squares on the PCB on both sides, each of them has the following dimensions $$\sqrt{A} \cdot \sqrt{A}.$$

Conclusion: Can I use an embedded capacitance when working in the femtoampere (YES \$10^{-15}\$ A) range or am I missing out on something here? It is quite hard to get such small capacitances, which is the reason why a embedded capacitor shall be used.


texts: What is the advantage of P-Intrinsic-N photodiodes with respect to a single intrinsic semiconductor with a bias voltage?

texts:
P-I-N structures are an improvement from simpler PN photodiodes. You can get higher responsivity values with them since there is more area for light absorption.

But that made me think... why do you need the P and N doped semiconductors in the first place? For the built-in electric field? That can be compensated with an external bias voltage (Which is used anyway in P-I-N photodiodes).

Thanks a lot in advance.


texts: What should I do if my MCU output is higher voltage than the Max Gate V on my N Channel MOSFET?

texts:
The V(GS) Gate to Source Threshold Voltage for a MOSFET I would like to use is listed as Min 1.5, Typ 1.9, and Max 2.3V.  I am working with a Teensy3.1 that outputs 3V on the PWM pin.  Do I need to get this voltage in proper range for this MOSFET, and how should I do this?

The datasheet for the MOSFET can be found here: CSD18534KCS 60V.


texts: How to keep the bias current constant in class AB output stage?

texts:
I am working on a hobby project to build a small audio amplifier. Actually the idea behind the circuit is to build a 0.5W-1W audio amplifier that can be powered from a single 9V battery and have decent audio performance in terms of THD.
Keep in mind that I want it to be a discrete design and don't want to use any IC.

I have built and tested the following circuit with a pure sinusoid input 1KHz and a pure 8 ohm resistive load.

Here is what I found

The current in the driver stage (PNP) is between 6-7 mA. This seems to work best for 0.5W output. if reduced, the output distortion appears.
The output signal swing is almost 6V pk-pk before it starts to show any signs of distortion. This means that I am getting 0.5W output.
i have taken FFT of the output and tried to calculate THD with the above given working conditions, it is less than 1.5% at 1KHz. There are odd harmonics in the output at -60dB less than the fundamentamental freg.
It sounds very clean.

Here is my question:

The output bias current with no input and no load is approx 12-13mA. As soon as I connect my input sinusoid and resistive load, it shoots up. For a maximum 6 V pk-pk swing it goes up to 120mA. If the output swing is reduced, the DC current also reduces. I don't understand this behaviour. Should not the DC current be constant and not affected by signal and load variation?

Please help me understand this. its killing me. I would like to know if the way im testing the circuit and measuring the DC current is correct and what would be a typical value of bias current for such a circuit?

Thank you all very much in advance for your feedback.
Regards,VK


texts: Need help identify this varistor. Been trying to figure it out since 5 pm of yesterday. Cannot find anything on it. Any help is greatly appreciated.


texts: Changing GPIO pin configuration on the fly

texts:
I am using STM32F0 based ARM Cortex-M0 micro controller in my project. Because of lack of available pins, I need to use one pin as an ADC-input and as a GPIO-digital-out (not at the same time, but in the same application i.e. changing on the fly).

My question: Is it possible to change such configuration during run-time? Let's assume that I am operating my MUX in the right way (High-Z when needed).

Thanks


texts: Confusion over the power wires of USB (GND and +5v)

texts:
I'm converting a battery powered device to be powered off a USB connection. I think I have everything figured out except one thing.

I understand there is a GND wire inside the USB cable for power, and also the Vbus wire (I think Vbus is also called the +5v wire). I'm lead to believe one is like the positive wire, and the other is like the negative wire. If I just look at the two wires, I would think the Black one is the negative wire, so I would hook it to the negative terminal of the formally battery powered device (after doing proper connections with a resistor of course :) ). I would also think that the Red wire is the positive wire and hook it to the devices positive terminal. I would think all of that strictly based off colors and experience with other things like batteries and solar (maybe I was wrong then) .

However after doing research, the names of these two wires makes me think the opposite. The Black wire is actually Ground, which makes me think it's actually like the "return path" for the electricity (so positive). The Red wire is referred to as +5v, which makes the think that is where the "source" of electricity is coming from (so negative).

Which of these wires are the "source" (negative), and which is the "return" (positive) ? Thank You everyone!!

EDIT:
{
Thank You everyone for commenting and answering! All of your replies are helping a lot!!!
I guess I always try to think about electron flow, and how electrons flows from an area that is really negative to an area that is less negative. I always
thought a batteries negative terminal was the source, and the positive terminal was the return. To hear CURRENT flows from what we call and label the positive terminal is really shocking to me and made me take a step back, yet it makes a couple other things make sense.

I find it sad that the most fundamental and basic electrical principles and ideas can actually be quite confusing.
}


texts: Can I remap a car\bike ECU using CAN bus?

texts:
I am thinking to use something like this to connect an Arduino to a motorbike  engine control unit (ECU): Arduino CAN-Bus Shield with uSD Card Holder.

I never did something like this; using CAN bus, can I only read some diagnostic parameters in the ECU or can I also remap some ECU parameters?


texts: Confused with understanding a recommended signal conditioning interface

texts:
I will make an interface for a 10k wind-vane recommended in this document.
I will follow the recommendations but I don't understand the explanations of the document and I have at the end four short questions regarding the same interface which are confusing to me.

Here is the recommended way of interfacing the vane from the document:

I want to use 12V supply for the opamp buffer and around 8.5V(through a linear regulator) for the vane. So I wanted to simulate all these in LTspice where I mimic the potentiometer of the vane by varying R4 and R3 in the following circuit:

Here the plot of vane and buffer outputs for 10k range:

Below the zoomed plot of vane and buffer outputs when pot is around 1 ohm::

Finally the zoomed plot of vane and buffer outputs when pot is around 10k ohm:

If my drawing to LTspice is correct(?):

I have the following questions:

1-) The document says:

  Similarly, the 1 K ohm series resistor shown in the wiper lead
  prevents short circuits from causing over-current damage to the
  potentiometer. If the sensing circuit has an input impedance greater
  than 1 K, the additional resistor is not needed.

I don't understand what meant here. Totally lost. Can you give an example how can be a short circuit? The opamp has already huge input impedance why then they use 1k just after they claim the additional resistor is not needed if the sensing circuit as an input impedance greater than 1k?

2-) The document says:

  The 270 k Ohm pull-down resistor is desirable to make sure that the
  input reads North when the wiper is in the deadband, and is open
  circuited.

I can understand that 270k will pull down the input signal to the opamp when the wiper is floating. But why 270k? Why not 1Meg for less error?

3-) The document says:

  By adding 100 Ohm resistors between the excitation and the
  potentiometer, and between signal common and the potentiometer, the
  potentiometer range is reduced slightly to compensate for the sensor
  deadband.

I cannot picture what is meant here as well. Is it possible to explain this by a simple drawing? I don't get why potentiometer range is reduced and why the deadband is compensated.

4-) The document says:

  For most data acquisition systems, an amplifier is desirable to buffer
  the sensor signal from the any loading in the data acquisition system.

First of all the document adds resistors to overcome deadband issues and shorts ect. and this introduces error. But the same document suggests buffering. Most of data acquisition systems have at least 100Meg input impedances which would not cause loading. What can be the benefit of buffering here?


texts:
To my ignorance I used to think all big CRT scopes were analogue oscilloscopes.

But I found out that there are digital storage oscilloscopes which were built by using CRT screens as well.

Below is an example:

I have two questions:

How come text like a number can be displayed on a CRT? I can understand how a signal leaves traces on a phosphor screen through electron beam hits on the CRT screen by deflecting rays. But how is text displayed?
Why isn't there any FFT function for such old scopes which are DSOs with CRT screens?


texts:
There are a number of schematics I'm trying to interpret that have bridge rectifiers. In the components list, however, they're simply listed as "D1-D4 rectifier unit" without any specific values.

How do I interpret the specific rectifier parameters? Does it need to specifically MATCH the input voltage & amperage of the circuit? or does it just need to exceed it?

Is there any limit to how far the rectifier can exceed the circuit? For instance, I've got a schematic that's drawing 12V/2A. I have a rectifier on hand that's rated for 1000v/10a. If I were use that in my 12V/2A circuit, would anything blow up? I'm guessing not...

Then, if I wanted to make my own rectifier, how do I select the diodes? do I just select four matching diodes with the same parameters as I want the rectifier to have (e.g., 4 12v/4a diodes to make a 12v/4a rectifier)? or is there some other formula for choosing the parts of the rectifier?


texts:
I have a PC with no WiFi adapter. Is there a way to achieve such a setup where the ESP8266 is connected to the PC with a serial connection and the PC can connect to the internet using the WiFI of the ESP8266? In other words, using the ESP8266 as a WiFi proxy of the PC?
I know I how to have the ESP8266 access the net and do whatever, like open TCP connections, issue HTTP requests and everything, but I don't know how to tell it to just pass raw data to the serial connection. Is there a way to do that?
EDIT
I know that it is  a common setup to connect the ESP to a Arduino in order to provide the Arduino with network connectivity. How does it work there?


texts: Why do point contact diodes use wire whiskers?

texts:
I've recently been learning about the operating principles of various semiconductor devices, and I've run into difficulty regarding the point contact/metal-semiconductor diode. I can't find out why exactly diodes like these (and their precursors, crystal rectifiers) use a very narrow wire of tungsten/gold, and not just a 'chunk' of metal as in selenium rectifiers. I imagine it's something to do with the depth/size of the P-side and the depletion zone or the junction capacitance. But I've been unable to find any info. Any info/papers would be greatly appreciated.

Thanks!


texts: How can I programming TLE987 through LIN?

texts:
I am actually working with a TLE9879QXW40 for BLDC driving purpose and I have some problem with my j-link connection. Pending this problem, I want to try to connect to the microcontroller through the LIN protocol.
I know it's possible (the datasheet specify that we can access the NVM with the LIN) but when I do research on internet I just found this document but it's describe low-level:
https://www.infineon.com/dgdl/Infineon-TLE987xQX-Step-BootROM-UserManual-v01_03-EN.pdf?fileId=5546d4624e765da5014eab7b1cb35bd8
Could someone enlight about this subject ? (pardon my english)


texts: Am I interpreting this relay pin diagram correctly?

texts:
I'm using a relay for the first time and am unsure if I'm interpreting the pin diagram given in the datasheet correctly:

I know a SPDT relay should have five pins:

NO (normally open)
NC (normally closed)
COM (where the power comes in)
Two coil pins (applying voltage across these activates the relay)

Here's my guess at what pins are which:

1   - COM
2,5 - Coil pins
3   - NO
4   - NC

That makes sense to me, but since I've never used a relay before I would really like to double check!


texts: What type of relay should I use to trigger an apartment door buzzer?

texts:
I'm working on my first hardware project, an SMS web app that will submit (via Arduino) a signal to press the buzzer at my apartment building. As such, my vocabulary might be way off.

That said, I think I need a "relay" to close the circuit at the buzzer and unlock the door.

The project is almost done, except for this last piece. How can I figure out what part to buy? How do I test it so I don't mess up my Arduino? I have a starter's kit but I've never used a multimeter, for example.

Thanks!