texts: Writing and Reading Hex Values to a Text file using FatFs

texts:
Currently i am working on STM32F479 Eval board. I have to collect data from sensor nodes and store it in a text file using FatFs. My sensor values are in Hexadecimal values. I am using STM32F4Cube HAL Library which includes FatFs. I am using f_write() function to pass these hex values to a text file. But it is storing as garbage values which is not as expected. When i use f_printf() it is working perfectly as expected (Hex values gets stored). But when reading again it shows some other values which is not the stored values. I have two questions.

What is the perfect way to store Hex values in a text file and read the same from a text file using FatFs?
Is there any other way like converting these hex values to char before passing it into a file and again reconverting after reading from a file?

My code:

uint8_t Buff[]; // Buffer to read data from Sensors

uint32_t byteswritten;

f_write(&MyFile,Buff,sizeof(Buff),(void*)byteswritten); //But writing some other values

for(i=0;i<sizeof(Buff);i++)
{
    f_printf(&MyFile,Buff[i]); //Writing properly But reading throws unexpected values
}


texts: Reduce Power of High frequency output signal (40khz)

texts:
I want to try and make the output power of the following driver board adjustable. At full power it runs at 100watt I. The board itself does not have an option to reduce the power output. The output voltage is 220v (I think), output frequency is 40khz (most likely pwm square wave).

Here is the driver circuit board I'd like to use: https://www.aliexpress.com/item/33001673042.html?spm=a2g0o.productlist.0.0.3d644912VCTYPe&algo_pvid=1c2f1089-3691-4e06-88a1-95689226a60f&algo_expid=1c2f1089-3691-4e06-88a1-95689226a60f-36&btsid=07fe0fa2-3398-48aa-a224-770f018b1ea3&ws_ab_test=searchweb0_0,searchweb201602_5,searchweb201603_52
Image:

I don't think it can be done by placing another pwm signal generator (/"dimmer) on either the input or output side. I'm quite sure it would mess up the output frequency of the driver board. Perhaps I could use a lot of triacs in series to get the desired voltage drop and in this way reduce the power but this is probably a bad way of doing it. Variable resistor is not an option I think due to the high power draw (approx 100w).

PS: I'd be using this driver/the high frequency transducer to try and build an ultrasonic cleaner.

Any suggestions on how to solve this problem will be greatly appreciated. Thank you very much!


texts: Charging three lead acid batteries in parallel with a single 14V charger

texts:
I need a 36V battery for a project of mine. Eventually I will buy a li-ion pack but now when prototyping and testing I don't want to spend a lot of money so I'm looking at cheap alternatives.

I'm considering making a 36V battery from 3 12V lead acid batteries. I found 9Ah ones that would cost me about $30 total but I don't also want to spend that much on a charger. I have a car battery charger for batteries up to 65Ah (6A max). I'm thinking if I put my 9Ah batteries in parallel that would draw around 3A I suppose which should be fine for the charger but I'm afraid if it's going to be able to maintain the proper CVCC modes because it wouldn't know it's charging 3 batteries and it most certainly wasn't designed for this.


texts: What is the purpose of this RF sweep oscillator circuit section

texts:
I'm on a (very) long and arduous journey to build a RF sweep generator for tuned circuit filters.  After much experimentation with free running LC oscillators, I conclude that for this application (and keeping things analogue), some form of AGC to control the amplitude is key.  This is the context that finds me reviewing circuit diagrams for the venerable Wavetek 1067 and I'm quite perplexed by what I find there.

Wavetek 1067 User Manual - Circuit diagram on pg.73

Here's an annotated snippet from the main sweep oscillator board:

I'm guessing that section B (Blue box) is the main sweep oscillator with L8 - L10 and varactors CR9 - CR11 forming the main tuning components.  L11 isn't coupled to anything (that I can see) and so forms a tapped inductor, where the centre tap is at the potential of either CR1/CR2 or CR3/CR4 (it isn't a fullwave bridge although it's drawn that way!)

So, it seems that CR1 to CR4 form a kind of amplitude limiting circuit (2 diode drops) whose DC bias is controlled by R6.  The signal is then coupled to L2 and here's where is falls off the cliff for me.  What exactly is the purpose of section A?  I can see that the signal exits through the centre tap of L3 to the rest of the circuit - but section A doesn't seem to go anywhere??

My guess (for what it's worth) is that the amplitude limiting circuit in section C produces a lot of harmonic content (I know this because I've tried this kind of clipping myself and the resulting sine wave is nasty) and section A is there to improve the wave shape.  But that's a wild guess.


texts:
I'm looking at a reference design from TI : 18-Bit, 1MSPS Data Acquisition Block (DAQ) Optimized for Lowest Distortion and Noise

On page 19, you'll find the following image.

It describes the circuit as having dual feedback, one for DC and one for HF, and gives te equivalent circuit for each type.

Why does the feedback resistor (Rf) look like a short at DC and look like an open at AC ?


texts:
I broke an rfid coil which is soldered to a chip. I want to build the coil as it will save me the pain of replacing the chip as it's not something you can find easily.

The coil itself was quite small. It's broken so I cannot measure it but I would guess the diameter of the insulator was about 1mm and the length of the antenna was about 5 mm. The wire thickness I measured about 0.02mm. Now I know this is a very small coil, but I need to create one which shouldn't be a problem as long as I get the right wire.

I cannot find online the relationship between the frequency and the inductance of the coil although I am assuming it is probably the frequency value used to calculate the impedance. The frequency I am aiming for is 433.92 MHz.

Who can point me in the right direction? I have found a tool to calculate the loops and type of wire based on the inductance value.


texts: Non-Inverting Tri-State buffer with transistors only possible?

texts:
I'm currently playing around with discrete transistor logic gates and now want to create a tri-state buffer.

The only circuit that I found that kind-of works is this one, but it inverts my input:

Putting an inverter in front of it, will cause the T2 to be open, and therefore connect the output to the ground, which is not really what I want for a tristate buffer.

Putting an inverter behind the gate will cause the output to be connected to ground via the inverter-gate. Also not what I want.

Is there a non-inverting tristate circuit which I can build with NPN/PNP BJT transistors only?


texts: The most efficient way to regulate unregulated 12V

texts:
I need to power a 12VDC device from an AGM battery, of which the voltage will vary from about 10.5 to 14.5V. The device's datasheet does not mention the tolerance on the supply voltage, I'll assume it is +/-10%.
I need the conversion to be extremely efficient, with an efficiency >= 0.9. The good thing is that the device should draw a constant power of 5W - perhaps this would allow some kind of tuning.
My current baseline is a non-isolated Buck-Boost converter from Tracopower, a TMDC 2412 or TSR. But its efficiency is only stated at 9V input voltage (0.91 and 0.94), and I suspect it is going to be below my requirement around 12V in.
Is there a particular technology, or a circuit add-on, which would yield the best efficiency for this particular application?


texts: Adaptor to use old AT&T / keytronic keyboard with DB9 connector?

texts:
I have an old keyboard (circa 1998) with a male DB9, and I'd like to use it on a modern PC with a female PS/2. The keyboard is AT&T branded, Comcode #405748401, FCC ID CIG8AVE03417 Keytronic corporation. I suspect, but I'm not certain, that the DB9 pinout is the same as an AT&T 6300: http://pinouts.ru/Inputs/KeyboardAtt6300_pinout.shtml. From that site I also found wiring pinouts for 5-pin DIN keyboard sockets and female PS/2 sockets, both of which seem compatible except the keyboard pinout shows +12VDC while the standard keyboard sockets show +5VDC.

Can anyone confirm the pinout for my keyboard? If it does match the 6300, can I just wire a DB9 to PS2 adapter and expect it to work? Am I likely to fry my motherboard if I get this wrong? This keyboard came from an old AT&T PC, and it's possible that the keyboard connector was proprietary or a serial port. I'd hate to damage either the keyboard or my new computer with a bad guess.


texts:
I am using the ltspice python package to extract the data from the .raw file as seen in this link. However, when I try to apply it to my raw file I get the following error:
*Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python37\lib\site-packages\ltspice\ltspice.py", line 98, in parse
    self.data_raw = np.reshape(np.array(self.data_raw), (self._point_num, self._variable_num + 1))
  File "<__array_function__ internals>", line 6, in reshape
  File "C:\Python37\lib\site-packages\numpy\core\fromnumeric.py", line 301, in reshape
    return _wrapfunc(a, 'reshape', newshape, order=order)
  File "C:\Python37\lib\site-packages\numpy\core\fromnumeric.py", line 61, in _wrapfunc
    return bound(*args, **kwds)
ValueError: cannot reshape array of size 0 into shape (1746,33)*

Any suggestions on how to solve the problem?


texts: 1.6v voltage reference with an input of 9 volt

texts: I am trying to find a voltage reference with an input of 9 volts. I was able to find two from maxim integrated but had a max input of 5v. I was trying to find a fixed 1.6 output but I wasn't able to find any. I am wondering if there is something specific I need to look for.


texts: Logic Level Converter not converting low logic level as expected?

texts:
I'm trying to convert 1.5V logic levels from a caliper data port to 3.3v to be able to read it with a microcontroller, using one of the sparkfun logic level converters. The product page mentions it can be used for 1.8V logic levels, so I was hoping 1.5V would work as well.

When I look at the waveform generated on the HV side, the high logic level is at the expected voltage, but the low logic level is much higher than expected, and I'm not sure why.

Interestingly, if I connect the LV side directly to the ground and 1.5V from the caliper's data port, the HV side shows 0V and 3.3V as expected

I have it hooked up like so. Note: the probe was actually connected to the CLK pin on both sides (LV2/HV2), not the data pin as shown. Although I got similar results when looking at the data signal.

And here are the traces from the LV side and the HV side.

(LV)

(HV)

I eventually got it working by using a rail-to-rail opamp instead, since I only need unidirectional conversion, but I'd like to understand why I was seeing unexpected results with this. And why connecting the LV side directly to ground produced different results than the low logic level from the clock/data pins.

My best guess is that maybe the clock/data pins from the caliper are unable to sink much current when in a low logic level state?


texts: li-ion battery managment system, cell protection difference?

texts: Could you help me to clear up what the battery management system/BMS adds to cell level protection, what is the difference? I assume that if I have many cells in series if I only have cell protection when the first cell reaches the desired voltage it shuts down the charge of the entire column, am I right about that?


texts: Calculating Currents and Voltages in and AC RL Circuit provided below

texts:
I am studying RL Circuits with AC sources. I am trying to solve this circuit

So far, I am only able to calculate the current iL through the inductor as for the other parts I can't grasp the concepts. It is not a homework question so please elaborate it.
My working so far:

And I intend to solve this circuit using time-domain analysis not by converting it to frequency-domain.

Thanks a bunch!


texts: I have this question suppose we tested the software at bench level and in production it works for some days, but If you find issues after let us say some months. Is it possible for bugs to come after many months? How to identify those test cases? Generally how to plan debugging for such cases? Any software tools which can help me? Any other suggestions? I am speaking about embedded systems for microcontrollers.


texts: Highly linear amplifier for tiny voltages

texts:
I have a tiny voltage which ranges between 0V to 0.05V (bandwidth of this signal is <100kHz) that I need to amplify to 0V to 3.3V. If I would like my final voltage to be distorted only upto 0.5%, what is the best circuit to accomplish this?

P.S. Yes, I have considered using an Op-amp, however, as far as I know, opamps are very non-linear in the lower and upper end output voltage (the output voltage starts to saturate?).

Edit 1:
I only have access to 0V and 3.3V.


texts: How would I power and control a Raspberry Pi and 12V DC window motor with the same battery?

texts: For a project, I need to use a Raspberry Pi 2 to control a 12V car window motor. To save space, I also need for them to use the same battery. The motor will need to work at a low speed but have a hight torque. From research, it seems I might need to use an h-bridge to slip the power and control the motor, and then a UBEC to lower the voltage for the Raspberry Pi. But I'm not sure if that is correct. What I also don't know is what type of battery to use and how to make sure I don't burn out any components. Would a low voltage and high current battery be best? And will an h-bridge be the correct component to handle a high current? And will all of this be able to connect together? I can give more information if needed.


texts: Max current for 5ns pulsed CW laser diode?

texts:
I'm looking to reduce the cost of a lidar system by replacing the DPSS laser with a blue pulsed laser diode (this is for an underwater project)

Is there a rule of thumb for the appropriate current to use to generate nanosecond pulses from a CW diode?

Particularly I am thinking of 1.6W 450nm diode being driven at 20kHz (so 0.01% duty cycle?)

Also, is what I am investigating at all practical?!


texts: Beagle bone black PRU program using DDR3 RAM

texts:
Could the beagle bone black receive input data from GPIO pins using PRU and then write it on the DDR3 RAM? It's known that you could use shared memory for this. But I wonder if it is also possible to use the 512MB DDR3 RAM.

(I assumed rev C)


texts:
In high current boost converter (6-14A input, 5A output), how to determine optimal switching time for the MOSFET gate, to get balance between power loss and switching noise?

I mean the time MOSFET changes the state. I have already designed and assembled PCB. It works on 400kHz. Now I can change MOSFET driver resistors and tune up the switching time. But I do not know what is acceptable.


texts: Power button behaving as OFF-(ON) momentary switch rather than latching- Troubleshooting

texts:
I have a device which doesn't turn on normally when you press the power button like it did before. You have to keep holding it down for it to remain on. As soon as you let go, it turns back off.

In troubleshooting so far I've ruled out some of the simpler things like power supply issues, button seating/placement, loose connectors, etc.

My device happens to be an Alesis DMLite drum machine, but I'm hoping this will have broader applications than just my specific situation. I've seen this happen with other devices before. I know this site isn't supposed to be about consumer electronics but I want to make this relevant by trying to learn more about how this circuit actually works.

So the buttons seem to be pretty simple. They are basically just pieces of rubber seated ontop of a few pads on the PCB.

Here is a picture of the front panel:

And the back of the buttons:

And some pictures of the boards (first one is where the buttons connect):

I followed the traces for the power button and one of them ended up connecting to R103, and R104 (both on lower terminal shown in the picture):

It's hard to find where the other end of the switch connects since the traces/vias aren't visible the whole way through. I was poking around with a continuity meter but haven't been able to find where it goes. But neither trace connects to ground.

On the back of that PCB it's a bit easier to trace the signal. Haven't been able to find a datasheet for the SOTs.

So this is what I've been able to trace out so far (lots of guesses esp. on pinout here). I've tried to put in some values based on rough in circuit measurements.

simulate this circuit – Schematic created using CircuitLab

I'm curious if this resembles a common circuit that one of you may recognize. I'm not familiar with this method of switching power. Can anyone shed some light on what this circuit might be doing and how it might malfunction and exhibit these symptoms?


texts: What can cause output voltage of DC-DC Switching regulator(AP6502) to drop when load is applied?

texts:
I am using a DC - DC switching regulator to provide a LOAD with regulated 5V. I have followed the reference ckt provided in the datasheet but when I upload a load greater than 1A the output voltage drops from 5V to 1.1V. And the feedback voltage drops from 0.927V to 0.221V. Below is the CKT.

When I disconnect the LOAD the voltage becomes stable and I get 5V. Please tell me where I am making the mistake.


texts: Adding a base resistor in a common emitter amplifier

texts: According to Wikipedia, a common emitter amplifier doesn't have big stability without an emitter resistor. When putting an emitter resistor gain is reduced. Why don't we put a base resistor in order not to lose any gain but stabilize the amplifier as well?


texts:
We were using this antenna 900-2600 at an out of town laboratory for RF measurements. The engineer at the laboratory told me that the antenna had a gain of 3dB, but if I calculate gain from the antenna factors in the datasheet I get about 6dBi.

I guess the plot on page 2 is return loss, but what is shown on page 3?


texts:
I am using synplify, and wrote a utility library for my project, that contains the following function:

function truncate(x: in std_logic_vector; constant length: in integer)
return std_logic_vector is
    variable result : std_logic_vector(length-1 downto 0);
begin
    result := x(length-1 downto 0);
    return result;
end function;

However Synplify gives the following error (line 197 is the one where I declare the result variable):

  @E:CD866 : utility.vhd(197) | Expression  is not a constant(static)
  expression

My questions are:

Why do I get the error? (I thought in synthesis the function is inlined and everything is fine)
How can I work arround it?  (I tried marking the length as const, but that did not work, besides it will screw up the later part.)
If the workarround is: just write it out, can i formulate result <= a(a'left downto a'right+cut) & truncate(unsigned(b)+2, cut); without using additional immediates? (I know that result <= a(a'left downto a'right+cut) & (b+2)(cut-1 downto 0); won't work without calculating cut-1 in an intermediate vector and then using a subset of that vector.)

Important NOTE:

My design contains a part were I combine two vectors somewhat similar to this (cutis an input signal, thus not constant):

result <= a(a'left downto a'right+cut) & truncate(b, cut);

While I have a feeling that this might be the source of the problem, I do not see why such a contraption should not be synthesizable (after all it is just several multiplexers and cut controls which ones take "bits" from a/brespectivley.

(The reason is i find truncate(x, y) more readable than x(y-1 downto 0), furthermore one could extend this function to work regardless of range direction and offest (e.g. a vector x only defined for a range k downto l where l>0.


texts: Why does collector current increase with base current in BJT?

texts: The base current in the BJT is due to the recombination of holes and electrons. To neutralize the p region an electron leaves the p region. If we take it the other way round, the larger the base current the greater is the recombination, so the collector current should reduce, but \$\beta  I_c/I_b\$ . \$I_c=\beta I_b\$, which shows that \$I_b\$ is directly proportional to \$I_c\$.


texts: Using optocouplers at the end of a twisted pair

texts:
I am designing a dumb "isolation box" that is to sit between a computer and medical data acquisition equipment. The purpose of this box is to inject power and to provide communications and digital signal isolation. The overall cable length that the digital signals (short pulses >10µs) will travel is 10m or less, but edge integrity is critical.

On the isolated side of the box I only have access to 48V DC, and would like to avoid adding another over-specified switching power supply just to power the digital interface (I already need one for the non-isolated side). I would like to get away with just "passive" optocouplers and a minimum of additional circuitry on the data acquisition equipment side, but I am concerned with proper termination of the 100Ω differential pair.

The receiving side seems simple enough as it would be a relatively high-current signal driving the optocoupler LED (and a balancing diode) that can use a 100Ω resistor on each end of the line.

simulate this circuit – Schematic created using CircuitLab

The transmitting side seems more problematic as any solution I can think of would imply a reduced signal level that would then require a level shifter or comparator on the other side (such as this one) which would then require a few more components to function and to add proper ESD protection.

simulate this circuit

Am I over-complicating this? Should I just byte the bullet and add the wasteful power supply and a couple of RS-422 transceivers at each end?


texts: How can there be voltage across resistors in series when circuit is open?

texts:
If you have a circuit containing 5 resistors, and one of them gets damaged such that current can't flow through it, I assumed no current would flow anywhere throughout the circuit, and that the voltage across each resistor would therefore also be zero. However, I watched a video where a string of Christmas lights (all in series) were failing to light up because of one broken bulb, and the user could detect voltage across each of the bulbs except the broken one.
Here is the video. Just watch from 17:15 to 18:10 to see the user find voltage in one of the bulbs (he previously found voltage in all the 'upstream' bulbs) and find no voltage in the next 'downstream' bulb.
What I Want To Know: Why is it not the case that having one resistor (light bulb in this case) break does not cause the voltage across all the other resistors in series to be zero?


texts: Layer stack up & thickness calculations for Metal-core PCB

texts:
I am designing a single layer metal core PCB for putting high brightness LEDs. Does anyone know how the layer stack up for such a PCB are common? How is the metal core thickness decided? I mean what are the heat calculations required? A White paper/Journol/ or an article will be very helpful.

I have a power dissipation of about 7-8 W & PCB area of 30cm x 6cm=180cm2.

Thanks!


texts:
I know it is possible to measure analog voltages with the ADC peripheral of advanced PIC microcontrollers. There is no peripheral to measure current though.

Is it possible to convert a current to a voltage so that I can measure that voltage with the ADC peripheral? Or are there ICs with serial or parallel output of a measured current? I'd rather have serial, with I2C or SPI.

I'll have to measure currents up to 200mA with fewer than 5mA deviation. The PIC I'm using is a PIC18F46K22, but that's probably no useful information.
I'll measure the currents of 5V / 3.3V chips connected to the PIC microcontroller (like LCD, RAM, other PIC, ...) so the current will go to ground. Also, a few tenths of a volt voltage drop is allowed.


texts: What component is the infinite volume knob?

texts: I am looking for the name of potentiometer like component which built in keyboards like Logitech G910, it sending just a plus and minus data I assume. Thanks


texts: De-rating / Re-rating criteria/theory for frequency in circuit breakers

texts:
I'm trying to spec a circuit breaker for a system that will be performing in the 3kHz range, and am not finding much info on how to calculate a new rating based on frequencies in this range (where everything is rated for 50/60Hz).

Voltage and current ratings should be 600VAC & 7A, respectively, FWIW.

Can anyone point me in the direction of some graphs or pages that give some guidelines on re-rating based on frequency?

Thanks.


texts: Stripping dry-film photoresist safely at home

texts:
I am trying my hand at dry-film photoresists. I am looking for any hints on how to strip it safely at home.

From what I can gather, stripping dry-film is generally done with 1-4% sodium hydroxide or potassium hydroxide solution.

Are there any alternatives for DIY that are safer to handle? Soaking is isopropanol and acetone left my dry film thoroughly unimpressed...


texts:
EDIT:

Question 1: what type of current will be created when passing magnets past a coil? AC or DC?

Question 2: What is the best way of storing the electricity generated with a contactless dynamo?

I'm working on a contactless dynamo project for my bicycle, (similar to this project: http://www.instructables.com/id/Contactless-dynamo-powering-bike-safety-lights/) except my concept includes being able to turn on/off the lights at will instead of them receiving power directly from the coil as shown on the link I just shared. I'm attaching some photos for reference.

I was successfully able to get a simple LED to flicker with 6 small neodymium magnets and one 12V ~80 Ohm coil. From what the internet and some friends have mentioned, I would need to convert the AC being induced by the magnets passing by the coil into a battery for a more complex bike lighting system.

My ideas for the bike lighting system are to power a front-facing headlight, a rear-facing brake light, increase luminescence of rear-facing brakelight when I apply pressure to handbrakes, a blinker system sensitive to turns and toggle-able with hand switches. Similar to how a lighting system would work on a scooter or motorcycle.

Any insights into this would be much appreciated!


texts:
I'm trying to think of the easiest/best way to steer a compass needle using a PCB. Specifically, placing a PCB of some kind under a compass (assume no shielding between the PCB and the compass) and electrically steering the needle in the direction I choose using a circuit on the board.

I feel like this is best achieved simply by conducting current on some sort of pattern-like trace on the board, but for some reason I'm having trouble visualizing the kind of pattern this would take, and how to calculate the current needed in a given pattern to produce a sufficient field to drive the needle.

Can anyone point me to the right idea with the kind of pattern/approach that would realize this sort of actuation and how I can calculate requisite current for the given solution/pattern?

Thanks!


texts: What are real use cases multiple verilog wire drivers ?

texts:
Currently, learning Verilog. I found out there are few net types that can have multiple drivers and the value on the net will differ according to the type of net if wire orwand or wor or others.

I grab this, but why on earth anyone would use that ??
What are real life use cases ?

Also I feel like wand and maybe wor are not synthesizeble, am I right ?


texts: Using Superposition Principle with Noise Sources

texts: What are the conditions that the noise sources have, so that I can apply superposition principle to analyse the circuit having multiple noise sources?


texts: How to change a predefined PWM frequency?

texts:
I have a controller which has predefined PWM frequency of 150 Hz. This output is used to control a motor. However, I want to use another PWM frequency, but I can not change the PWM frequency on my controller via the control software. Only the duty cycle is changable.

What is an easy and cheap way to be able to use a different PWM frequency?

My motor is a 9V DC motor.

My controller is called TXT and uses this firmware.


texts: Background LED indication in low power mode

texts:
I'm developing an STM32L4 device which most of its time sleeps in STOP2 mode, wakes up on interrupt, does some job (send data on radio) and sleeps again.

I'd like to add some indication with LEDs, but I don't want this indication to be intrusive. For rare blinks indicating that device is powered on I use LPTIM1 which works great. LED blinks on timer's output pin, device doesn't have to wake up etc. Now I want to blink another LED when interrupt on GPIO pin takes place. I tried to turn led on before doing main job and turn it off right before going to STOP2, but things happen so fast that blinks are barely visible. I want LED to be on for about 100ms. Adding delays isn't what I'd like to do because an interrupt from GPIO or radio may happen and adding some kind of critical sections just for blinking a LED sounds kind of strange.

The best idea I came so far is using analog delay with couple of MOSFETs (simulation tells it should be about 100ms pulse on LED whenever a much shorter pulse comes to diode), but may be there is a way to do it in software? May be there are some best practices of implementing 'background' indication on low power STM32 devices?

simulate this circuit – Schematic created using CircuitLab


texts: I'm in final step of a project an I need some advice about what heat evacuation profile should I use to place three fans for cooling, I have four alternatives as shown in the diagram but I don't know which will achieve the best performance in terms of cooling.


texts: How to choose upper cutoff frequency of an amplifier?

texts:
In Albert Malvino's Electronic Principle book, he gave an example how to compute the upper frequency of  a MOSFET amplifier:

The book chose 48MHz as the upper cutoff frequency which seems wrong to me since the gate bypass cutoff frequency is lower(only 2.2MHz). The book also shows the bode plot showing that 48Mhz is the upper cutoff:

The midpoint voltage gain is 22.2dB so the bode plot correctly shows the upper cutoff frequency which is at 19.2dB(minus 3dB of midpoint voltage gain 22.2dB).
I thought that in choosing the upper cutoff frequency, the lower frequency is the correct one since that is the time it will start to roll minus 20dB/decade and when 48MHz comes it will then start to roll minus 40db/decade.Why choose the higher frequency as the upper cutoff frequency?


texts: 'How/why' does a human act as a capacitor for a theremin?

texts:
I've read that a human plays a theremin by acting as a capacitor, or reducing the capacitance of the theremin.

What properties of a human make it act this way? Is there any way of reducing/negating the effect?

Are there any non-living things that would affect a theremin in the same way?

nb: I've already read this but it doesn't quite address what I'm looking for: How does a Theremin "antenna" work?


texts: Why have an inductor between 2 parallel capacitors? (LED driver)

texts: This is the driver for a LED Bulb. I don't understand why there is an inductor between the 2 capacitors C1 and C2? I understand that C1 and C2 are used to handle low frequency ripple and the noise. But what does the 3mH inductor do?


texts: What does the US power supply waveform look like?

texts: I know that we (typically) get 120 V AC in USA, but what does the waveform look like? Can anyone post a pic? How many phases are there, and what's the peak voltage?


texts:
I have an analog load cell with just 4 wires sticking out of it.

I want to be able to connect it to a computer via usb.
For that I am going to use the AVR micro controller and LUFA usb library.

My question is about connection of a load cell to a micro controller.

As far as I understand one needs to amplify the signal from a load cell with some amplifier and direct it to the analog input of the AVR controller. And then direct the digitised value to the computer.

But few times I saw people mentioning advanced chips that have an amplifier and analog-to-digital converter combined.

Are there any benefits of using such combined chips?
And if there are, how the digital output of such chips should be read with the AVR controller?


texts: MOSFET Gate-Source voltage in protection circuit

texts:
I'm creating board which is supposed to withstand OV/UV and reverse voltage. I've chosen LTC4365CTS8#TRMPBF(datasheet) IC to deal with this problem. In reference schematic for 24V input they are using dual N-ch mosfet that has max G-S voltage of 20V(SI9945 datasheet). What exactly does max G-S voltage mean and when is it applicable? Is this some kind of error in the datasheet or is my understanding of it incorrent?

thanks in advance


texts:
How do I find POS of \$F(X,Y,Z) = XY \oplus YZ \oplus 1\$?

Well I got to \$XY \oplus \overline Y \overline Z\$.

I remember I need to do something among the lines of \$XY(Z+\overline Z) \oplus (X + \overline X)\overline Y \overline Z\$.

Or maybe I thought about puting the function on a karnaugh map and finding the minterms of the SOP, and then the POS is trivial.

What's the best approach? how do I solve it?

Note: The solution started with \$F = (x + \overline y + \overline z)(\overline x + \overline y +z)\$. And then, it was quickly solved. but how did they get to it?


texts: Powering a 14v incandescent bulb with Raspberry Pi & Transistors

texts:
I am trying to drive 14V #73 incandescent wedge bulbs using a Raspberry PI and separate GPIO pins (which run at 3.3V), combined with transistors, to control them 100% electronically. I understand the concept and why I can't run lights off of the GPIO pins directly, and I have a 14V power supply ready to supply voltage to my lights.

I am trying to learn about transistors and how to incorporate them into my design, but I am having trouble figuring out the values for the resistors in the circuit, and I'm also unsure if I still need to utilize a resistor on the collector line since I am using an incandescent bulb and not an LED. Most/all questions asked in this vein are utilizing LEDs so I don't feel those questions accurately can help my project. The bulb is rated for 14V, but in theory, it can handle fluctuation (gets dimmer/brighter) unlike an LED. It also draws a lot more current, and has more resistance than an LED... because of all of that, can I disregard using a resistor in that line, or is it still a good idea? (I don't think I fully grasp the idea of current/resistance/short circuits)

What values do my resistors need to be in a circuit like this? How do I determine these?
Do I still need a resistor on the line for the bulb, despite it not being an LED?

Here is my circuit:


texts: Why no current in neutral wire_kids question

texts:
One school child asked me -

If current means flow of electrons, or entering to a bulb from one wire (Live) then going back through another wire, then why there is no current in the neutral wire, because electrons or charges is still flowing through it as part of going back?

I could not answer him, so kindly advise, what exactly the neutral line is, what is happening in neutral wire , why it is important for , why it has no electricity?
Kindly provide a simple answer (if possible some examples with water or other comparable things)


texts: Unintuitive terminal connection to ground

texts:
I'm reading the datasheet of an incremental encoder and seem to miss something.

Am I reading it right that Terminal-C is connected to GND, and if so why?
I thought I'm supposed to connect Terminal-C to a GPIO-pin of my MCU; should I connect the pin to the GND net since Terminal-C is also connected?

My circuit looks like this:


texts:
I have a question regarding lead high pass filter and lag low pass filter.

I do not quite understand the reasoning behind these two special case (when z=0) ?

Thanks!


texts: Does STM32CubeMX assist in creating STM32L0 firmware for communication with smartcards?

texts:
I need to create STM32L0 firmware for communication with a smartcard (ISO 7816). I will use Tx pin from USART2.

Is STM32CubeMX helpful for setting smartcard related stuff?


texts: Choosing a transistor for a low power application

texts:
simulate this circuit – Schematic created using CircuitLab

I have looked at a few guides, both on this forum and elsewhere, for choosing a transistor.  I know to look for things like HFe and the Collector-emitter voltage, but on the datasheets I am seeing multiple values and don't know which one to look at.  In my application I will have a comparator (powerd by 5v) connected to the base of the transistor.  The Emitter will be connected to GND and the emitter will be connected to the GND of a 1.5V vibration motor.  Based on those voltages, how should I go about looking for a transistor?  Also, here is an example of multiple HFE values.  For the future, how would I decipher which one to use for calculations?

Edit:  I have included a schematic.  "U2" is the HC-SR04 Distance Sensor and the Speaker is a 1.5V 50ma vibration motor.  That Op-amp and Comparator are the main point of contention.  The functionality I am looking for is it to compare the voltage coming from the Distance sensor to some reference voltage i can find later and if it is above that voltage, open up a gate that allows current to flow from the battery to the vibration motor.


texts: Selection parameters of a X & Y rated capacitors

texts:
In a capacitor drop supply, X rated capacitors are responsible for dropping the AC voltage across them. I've been looking at why only X rated capacitors are used. After spending some time searching the internet, I found that X rated capacitors are connected in series (line to line) with the circuit, while Y rated capacitors are connected in parallel (line to ground).

The X rated capacitor is designed for 250, 400, 600 VAC. The effective impedance (Z), rectance (X) and the mains frequency (50 – 60 Hz) are the important parameters to be considered while selecting the capacitor. The reactance (X) of the capacitor (C) in the mains frequency (f) can be calculated using the formula:

$$ X = \frac{1}{2 \pi fC} $$

So at 0.22uF the reactance will be \$14.4k\Omega\$. Now the effective impedance can be calculated by using

$$ Z = \sqrt{R + X} $$

Now this Z is responsible for the dropping of the high voltage. So just because of high reactance (is it X rated capacitor property? Correct me if I am wrong), is it used to drop the supply voltage? What happens if we add another capacitor in series except X rated? Does the other one also work as a X rated capacitor?


texts: Why is it called Wired-OR when it is functioning as Wired-NOR?

texts:
Inputs: Base of bjts
Output: black node

When at least one of the inputs is HIGH the output is LOW.
This is clearly NOR. Then why everyone calls it Wired-OR?


texts: 230V Light switch to control intensity and drive two bulbs

texts:
I'm looking a way to improve a lighting solution.
The idea :
to use a basic electrical switch already present in my room wall (with Line switched by the toggle switch + Neutral not switched) to control two lamp sources : one with low Lux and a given tint, a second one with high Lux and another tint.
Use case : when I firstly toggle the switch from Off to On : I want that the first lamp lights up.
When I quickly toggle the switch from Off to On both times : I want that the two lamps light up.
In another word : I want to design a circuit to detect two rising front.
I think about microcontroller circuit, or a basic flip/flop or shift register design.
But I wonder if someone as an idea ?
I guess such circuit already exists, because some light bulb includes that feature (with n on/off cycle to control the light intensity), but I can't find solution or idea.
Thanks for your support.


texts:
I'm designing a charger circuit. When the input (+5v) is available it should disable the booster regulator by setting Booster_en to low. I used a single P-ch MOSFET like below circuit. I added pull-down to the gate of FET for when there is no (+5v) it turns on the FET and Booster_en gets high. I found many examples that use a pull-up circuit on FET's gate and some of them use a Schottky diode before VCC. Do I need to use two resistors or there are simpler ways? How about the diode?

EDIT:
Here is the first version of circuit that the problem was on Booster_en that becomes floating when VUSB is off. On the other side, I want to fully isolate VBat when +5v (VUSB) exists. I also removed the Q4 transistor and connected R9 to ground. I think it is useless because when there is no VDD for charge it would turn off.


texts:
I've been playing with a GY521 breakout recently with the MPU6050 chip on it, though i've hit a bit of a problem that I can't quite work out

I know when I rotated the board I rotated ~90 degrees about the Y axis, and using the sensitivity numbers from the datasheet (131) and integrating i've managed to get something that looks believable from the gyroscope, but am having problems with the accelerometer.

From a number of sources, this being one of them, I've managed to get the three equations seen on here, however when I apply them to either the raw or scaled data (as they're scalers is shouldn't make a difference?) I get a set of data that varies from 0 to 90, but only on the X and Z axes, while nothing happens to the Y.

Updated to include code:

#include "I2Cdev.h"
#include "MPU6050.h"
#include "Wire.h"

MPU6050 accelgyro;

int16_t ax, ay, az, gx, gy, gz;

double timeStep, time, timePrev;
double arx, ary, arz, grx, gry, grz, gsx, gsy, gsz, rx, ry, rz;

int i;
double gyroScale = 131;

void setup() {

  Wire.begin();
  Serial.begin(9600);
  accelgyro.initialize();

  time = millis();

  i = 1;

}

void loop() {

  // set up time for integration
  timePrev = time;
  time = millis();
  timeStep = (time - timePrev) / 1000; // time-step in s

  // collect readings
  accelgyro.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);

  // apply gyro scale from datasheet
  gsx = gx/gyroScale;   gsy = gy/gyroScale;   gsz = gz/gyroScale;

  // calculate accelerometer angles
  arx = (180/3.141592) * atan(ax / sqrt(square(ay) + square(az)));
  ary = (180/3.141592) * atan(ay / sqrt(square(ax) + square(az)));
  arz = (180/3.141592) * atan(sqrt(square(ay) + square(ax)) / az);

  // set initial values equal to accel values
  if (i == 1) {
    grx = arx;
    gry = ary;
    grz = arz;
  }
  // integrate to find the gyro angle
  else{
    grx = grx + (timeStep * gsx);
    gry = gry + (timeStep * gsy);
    grz = grz + (timeStep * gsz);
  }

  // apply filter
  rx = (0.1 * arx) + (0.9 * grx);
  ry = (0.1 * ary) + (0.9 * gry);
  rz = (0.1 * arz) + (0.9 * grz);

  // print result
  Serial.print(i);   Serial.print("\t");
  Serial.print(timePrev);   Serial.print("\t");
  Serial.print(time);   Serial.print("\t");
  Serial.print(timeStep, 5);   Serial.print("\t\t");
  Serial.print(ax);   Serial.print("\t");
  Serial.print(ay);   Serial.print("\t");
  Serial.print(az);   Serial.print("\t\t");
  Serial.print(gx);   Serial.print("\t");
  Serial.print(gy);   Serial.print("\t");
  Serial.print(gz);   Serial.print("\t\t");
  Serial.print(arx);   Serial.print("\t");
  Serial.print(ary);   Serial.print("\t");
  Serial.print(arz);   Serial.print("\t\t");
  Serial.print(grx);   Serial.print("\t");
  Serial.print(gry);   Serial.print("\t");
  Serial.print(grz);   Serial.print("\t\t");
  Serial.print(rx);   Serial.print("\t");
  Serial.print(ry);   Serial.print("\t");
  Serial.println(rz);

  i = i + 1;
  delay(50);

}

Results:

Strikes me as a little odd, as I was expecting only a rotational change in Y.  Any suggestions?


texts: Given Vf across a LED, what is the current draw?

texts:
I have sourced some LEDs from everyone's favorite high-quality electronics marketplace, eBay.

I have a simplistic "datasheet" for the 7-segment LEDs that I purchased, which show a Vf of 3.8v across an array of LEDs. Does this give me enough information to know what current to drive these LEDs at or what a "safe" value would be? If not (and I am fairly certain it does not) what approach could I take to ensure I don't burn out my LEDs?


texts:
My old phone stopped working. We threw it around and beat it with rocks for 20 minutes until the back came off and revealed the battery. It was all swollen.
We started picking it with a stick until we punctured it. We googled what to do in this situation. One post wrote to put it in salt water and wait for it to discharge and then throw it in a regular battery dispose can that you find in supermarkets. I did what it said and placed it in an old jar with salt water. Bubbles started coming out from it and small black pieces crumbled to the bottom of the jar.
What should we do now?


texts:
I am currently reverse engineering a circuit which requires controlling of a magnetic field. For that, the circuit has a pair of D882 and B772 each. The PCB traces suggest that the transistors are arranged as shown in the picture below:

This arrangement does not make any sense at all for me. Wouldn't applying a voltage to any of the control signals result in current through both transistors rather than through the coils?


texts:
If I have the following code in C

A[1] = 2;

Where the starting address A[0] is $s0.

addi $t0, $s0, 1 #t0->A[0]
lw $t1, 0($t0) #t1->A[1]
addi $t1, $t1, 2

This is where I am a bit confused. Is it necessary to add:

sw $t1, 0($t1)

Or is the code fine as is? I think it is fine because, I am adding 2 to the contents of $t1, which is effectively, A[1] = 2.


texts: Need to identify faulty thermistor in order to find a like or better replacement

texts:
I have an ic with a poorly performing thermistor I'd like to replace with a more accurate, more sensitive component. The first step is finding out what thermistor I likely have or at least who made it. If it wasn't garbage, it ought to perform with very high accuracy in the temperature range 80°F - 110°F (+- .5° or better) and with reasonable accuracy from 60°F - 125°F (+- 2° or better). I am aware that the accuracy is really a matter of the chip interpreting the resistance value from the thermistor... but something has to be wrong with this particular thermistor since I have two, and only this one is about 10 degrees off.
It is a bright blue, dipped component on two copper leads about 3.5 cm long. The product it's in is a chicken egg incubator currently made by Georgia, US poultry equipment company GQF. Unfortunately, they appear to have decided to do things on the cheap. (The cheep?) Although touted as a high tech, reliable option this particular electronic incubator takes wildly inaccurate temperature readings. I have another which reads temperature accurately enough to hatch chicks... Photos attached.


texts:
Here is schematic that provides polarity inversion and switch off motor if it reaches one of its two end positions:

SW1 is On-Off-On DPDT switch with the center position Off. SW 2 and SW 3 are limit switches. Motor voltage and amperage are 12V and 2A (max.).
Is it possible to control motor remotely, instead of manual control using SW1? If yes, can you provide me schematic?
Thanks in advance


texts: What is the best way to solder a breakout board to a PCB or Protoboard

texts:
I am putting together a small project and I am thinking about how I am going to get it to the PCB stage. I am currently making use of a few breakout boards because they are easy to get and they seem to do a good job.

In the case of the TP4056 module would it be ok to just use the whole thing and mount it on my PCB rather than having to replicate the whole circuit on my PCB?

If that is ok then what would be the best way to solder it to the PCB so that it takes up as little space as possible. I don't really want to put header pins on it as this will make it stick up from the board a bit too much.

thanks
SOS


texts: Can all RX and TX chips be made compatible with each other?

texts:
I have quite a few Radio Controlled Toys, Some I have hacked so that they become autonomous.

This gave rise to a question:
 Can all Receiver (RX) and Transmitter (TX) chip be somehow made compatible with each other ? Say I have RX-2 and TX-2 chips. Can I use a remote from 1 toy to control the other. I read about RX/TX chips, they tend to have different frequencies, but if I can somehow get them to match their frequencies can I get them to work with each other? Is there anything else that I need to do?

All of that is quite a Mouthful so This is what I mean to ask:
Q.1) Is it possible to use RX / TX chips from two different toys together?
Q.2) If possible how can I do so?


texts: How can I protect veroboard from corrosion/ tarnishing?

texts:
All of my veroboard-copper-tracks gradually slowly becoming blackish, scratch-like marks, or sometimes brown-black patches.

Here's one from extreme (sorry for bad soldering, it is 7- 8 months old, when I was beginner).

Fig: Black patches, marked with arrow. Are they sort of copper tarnishing?

However all these blackened tracks are yet fully conductive. But would they create problem later-on?

I can prevent it by using a thin layer of solder, but is that okay? (since no-one around me do it on a veroboard).

Is there any other available alternatives in market? (like readymade PCBs use a green paint).

This board around same time, 5 or 6 months old.

A qute-recent un-used board from stock at home, approx. 3 or 4 months old. It was not like this when I bought from shop.

 Much new board. 1 or 2 month old. (btw it is a repetition of circuit of first one). Only a few little places showing any visible reaction.

Other than veroboards, here is a piece of stranded copper-wire, maybe approx an years old. It was kept in open air. the inner-portion (which has been split-out today), is normally shiny, but the terminal portions is blackish-brown, almost lustreless, and as brittle as as half-burnt hair.

Whereas those wires were kept inside a tight aluminium-box, are almost like new-one, and exposed-portions are just more deep-coloured and slightly less-shiny.

Once I also once saw, some pieces of stranded wires were kept inside a shaving-box (whose strands were used as fuse), accumulated green waxy rusts in places to places!!! (they were disposed, so could not be photographed)


texts: Convert multiple input levels into number

texts:
Current Setup
I have created a working circuit for water level detection, using LEDs. I have inserted a plastic rod into the water tank, and soldered wires at 7 levels. As the water rises, the circuit completes via each wire and the LED for that wire lights up on my circuit board / bread board. Something like this - link.

As the water level rises, each wire/line becomes a high i.e. has voltage/current on it and hence the LED on that line lights up. Hence, at level 3, the wires are (top level to low level) 0000111; at level 5 it is 0011111 and full level it is 1111111 and zero level is 0000000.

My requirement
I want to connect this to a set of 3.3V digital GPIOs.

Question
How do i connect this? Even if i can, is there a cleaner way to make just 1 or 2 connections by placing some sort of decoder/encoder in between?


texts: Why is series LC circuit not behaving as band pass filter?

texts:
I am trying to simulate LC circuit using external source that generates square wave of 503Hz of amplitude 2V as below:

Natural frequency of circuit above is 503Hz.So it must pass this much frequency.When I run the simulation of above circuit,capacitor gets damaged or shorted (don't know exactly) and it appears in circuit like :

and output becomes zero in oscilloscope.

But when I pass square wave of frequency 5kHz,sinusoid output is obtained.(as shown in image below)

Please guide me why such outputs are observed ? If it acts as band-pass filter,then it should pass simply frequency around natural frequency and same output as input i.e square wave should be observed.At higher frequencies (5kHz),output should simply be zero but why sinusoid ?

PS :

I read from wikipedia that series LC circuit acts as band-pass filter having zero impedence at natural frequency.
I am using Multisim 11.


texts: Noise problem using zener protection on precision analog inputs?

texts:
I have a circuit input that I need to measure down into the nanovolts, so it gets fed to a 24 bit ADC via some buffer amps. However, in order to protect the circuits from overload I am thinking of putting zener clamps across the unconditioned signal input lines. What, if any, noise problems might this cause?

Signals are low frequency (<1kHz) and voltages up to 15V


texts: How can I have one LED go on, when another goes off

texts:
I have a scenario where when one switched electrical path for example a tail light (LED #2) on a motorcycle is switched off, I want LED #1 to go on. When power is switched on to LED #2, then ground for LED #1 should be disconnected to shut the LED #1 off. So basically when the positive line for LED #2 becomes charged (turned on) I want to disconnect the ground or positive connection for LED #1 so it shuts off.

Thank you everyone for the help! Based on your feedback I think this diagram would work. LED #1 only turns on if LED #2 is off, correct?


texts:
I was doing a search on Digikey for some power entry connectors and noticed that many of the connectors are rated 10A by IEC standards and 15A by UL standards. Why is there such a large difference between the two standards, and if I plan on using this connector to draw potentially 15A from a North American wall socket, will I run into any trouble?

Picture provided for reference (current ratings on the right):


texts:
I need a way to automatically turn on/off mute (basically "emulate" pressing the mute key) in a car audio system when one signal changes it's logical state. Without MCU this could be done with edge detector circuit based on XOR gates, like this:

So adding some protection & rest, I've came up with the following circuit:

D1 & D2 are some protection TVS diodes, R4 limits current for TVS diode while it should pass more than enough current for U1. Gate A forms a sort of "filter" and gate B with R3/C1 basically sets delay.
As long as I place LED in series with R6 it works as intended - LED blinks for a while on input level change.
The issue is actually where it comes from the actual audio controls itself. As I was helping for a friend I wasn't aware of the audio controls for a while before I drew this schematic. Next it turns out to be analog control where resistance sets command:

Digging further for those systems, I've came with the following schematic for other audio system which seems to work on the similar principle:

So basically it seems to have a voltage divider formed which feeds the resulting voltage somewhere. I assume this could be some sort of ADC inside.
The question is - will it work with N-channel MOSFET? Because I don't know the internals of it's input. One thing I know for sure - that once the required button are pressed it connects +Vcc via measured resistance to an output. But I don't know what's the impendence of the input do I have to use P-channel MOSFET with inverted logic here? Any suggestions welcomed.
PS: Assuming +Vcc = +12V.


texts: Best way to connect 2 USB devices to a single port

texts:
I have a 4GB Thumb Drive that the plug broke off.  So I extracted the chip and hard wired it to an old cable to retrieve the data.  Now I'm thinking it might be a fun project.

I have a USB Gravis Eliminator Aftershock game controller that I use to play games, and there is tons of space inside.  I would like to wire the drive inside the controller and have them connect to a single usb port via the cable on the controller.  Does anyone know if I can just solder the wires to the drive pins or do I need some kind of splitter type circuit between them?


texts: Modelling catastrophic component failure

texts:
For most of the time in circuit simulation, the component models used are ideal and don't feature fail-states e.g. this answer here.

Have there been any projects that have attempted to model what a circuit might do in the case of catastrophic failure? For example, if a component explodes/melts?

I mainly ask because I find the idea humorous, but there are obviously real use-cases. If a component can be predicted to fail in a certain way then the effect on the rest of the circuit can be predicted as well. A fuse is an obvious case of this, but I am thinking more where the component is not designed to fail.


texts: Map arm movement (as plant) to lidar-measured distance (as setpoint) using PID

texts:
I am trying to control the arm of my setup such that its tip is at a particular distance from the surface. That's when its supposed to stop.

The actuator has no feedback, so I use a 1D LiDAR to measure the distance of the arm from the surface. Currently, I ask the actuator to keep lowering the arm until it has reached the desired distance (target_d for example), which is actually measured using the lidar. As the actuator is basically kind of bang-bang controller, I have only 2 options: ALL GAS or HAND BRAKES.
I am trying to use a PID to contol this. The issue is, the error is obtained as distance (in mm) and the input to the plant is time for which the actuator fires up. Can I have a PID or any alternate controller to achieve fast and accurate actuation without having to oscillate around the setpoint ?


texts: one-sided saturation with op-amp and RC high pass filter

texts:
I am working with a photodetecting circuit built as follow:

When I drive an LED ON and OFF, I get the following waveforms:

Blue indicates that the LED is turned on when a voltage is high and turned off when low.

Yellow shows brightness reading after RC high pass filter.

The lower envelope of the yellow line looks like a voltage discharging pattern of an RC circuit.

The problem is, however, the upper envelope seems like a saturated signal.

I can it more clearly by reducing the capacitance to 10 uF:

By reducing capacitance from 47 uF to 10 uF, a discharging pattern in the upper envelope after a short saturated duration can be seen.

But I am curious that

Why only the upper envelope is saturated? Why not for the lower envelope?
Why the upper envelope is saturated at nearly 200-300 mV, not around VCC+, 5 V?

For your information, both the upper and the lower envelopes are not saturated if I remove the RC HPF and see voltage readings:


texts:
I am starting a project that will end up as an RS232 wireless bridge (XBee radios) and have no idea where to find the chip I am in need of.

I'm currently in the testing phase without the radios to ensure that the MCU->RS232 will work properly but I ran into a problem.  Because I go from the Arduino 2560 -> MAX3232 -> RS232 device the signal is not being recognized by the end device.  After thinking about it I realized that the MAX3232 is the problem since it is inverting the signal before sending it to the end device.

My question is, if and where can I find an IC that will perform the proper level shifting needed (bi-directional) without inverting the signal?


texts:
I decided to take apart a cheap hot glue gun to see how easy it would be to replace the heating element to power it from battery instead of mains. I found the crystal heating element sandwiched between 2 metal plates, kept in compression against the heating block. However what I measured confirmed this to be an NTC element, not PTC as one would expect (resistance went up when it got colder, and lower when it got warmer). This heating element is directly across 120V mains when powered on, and I confirmed that after unplugging from mains, I quickly measured the resistance at ~380 ohms (suggesting ~38W load, but it was measuring about 11W when hot from my mains power meter). When it was cold, I was measuring 910 ohms, suggesting 15.8W, but it had a turn on power of 48W.

This is really bugging me, the only thing I could think of is it's having a reactive impedance that's a lot different than I'm measuring DC, like a ferrite bead which is lossy at high frequency but low resistance DC. Any ideas?


texts: Minimum number of turns on a transformer

texts:
I am trying to wind my own transformer for a power supply. How many turns do I need on my primary winding?

I know that the turn ratio determines the voltage ratio, but how do I determine the actual number of turns? I can imagine that for an air-core transformer, having many windings can help keep the flux from leaking. However, the more wire I use the more materially expensive and electrically inefficient it becomes.

If I'm using a toroidal core, can I get away with just one loop for the primary?

Thanks!


texts: How neutral wire is obtained in three phase systems?

texts: In India, we have only 3 transmission lines which are all live. But the domestic supply includes a neutral line along with that. How we can create a neutral in a transformer? Why don't we not need a neutral at the generating stations or power stations? Why only at houses we need that? Don't electricity need a way to go out also?


texts: To get rid of useless redundancy--do I realy need a voltage supervisor?

texts:
I am using a voltage supervisor from MAXIAM(MAX7634A). It monitors VCC_3V3 and VCC_-3V3(I use LM358 to make it a positive one).Power supply distribution is shown below:
VCC_3V3:

stm32f103
EMP570T144
some logic gates
some daughter board that use VCC_3V3
optocoupler
MAX3232
bipolar amplifier

VCC_-3V3:

bipolar amplifier

I use LM317 and LM337 to create VCC_3V3 and VCC_-3V3. LM358 is powered by the source of LM317 and LM337. so my circuit of MAX7634A is shown below:

I connect 'SUPERVISOR_RESET' to RST pin of STM32 and 'SUPERVISOR_WDO' 'SUPERVISOR_WDI' to IO of STM32. I jusr wonder whether this design is realy meaningful since STM32 has its own watchdog and brown-out check. Suppose that there is somthing wrong with VCC_-3V3, MAX7634A can only reset STM32! It is realy ridiculous. And what if LM317 and LM337 does not work correctly? MAX7634A still offers no hlep in this case.

Is is due to my wrong design using a voltage moniter? Can any experienced designer give me any suggestions to improve the whole reliability?


texts: Low voltage adjustable DC power supply (0.1 to 0.75V DC) @ 300 mA

texts:
I need to create an adjustable DC power supply that can output between 0.1 and 0.75V DC at 300 mA (possibly as little as 100 mA). My input voltage can be anything, including +/- rail.

Currently I am using an adjustable bench top power supply to supply this voltage, but I need to package this in a smaller enclosure. Once adjusted via trim pot the voltage won't change, and I do need as stable a DC source as possible (both temperature and voltage stability). Long story, but this DC power is being injected into an RF signal via a "Bias T" so an RF sin wave can be "converted" into a digital signal (-0.5V to 0.5V pk-pk becomes 0-1V and interpreted as PECL digital input. Ugly but it works!).

Anyway, all of the usual LDO / regulators / step down convertors appear to cease working at ~0.5 or 0.75V and I most likely need approximately 0.35V. Everything shares a common ground so I cannot use a floating ground for this application (i.e. 1V and 1.35V power supplies).

I am considering a unity op-amp where I set the input V+ using a trim pot. However, I can't seem to find an op-amp that provides enough mA (voltage following op-amps; I'm not familiar with current op-amps to know if that would work). Does anyone have any suggestions here? I'm somewhat at a loss.

Thanks!


texts:
The L805CV voltage regulator is capable of producing a consistent 5v 1.5A draw. I am creating a small raspberry pi case and have a 12v 3a power supply to accomplish the project. I am powering a 12v fan and a few other peripherals at 5v including the pi. I have 10uF capacitors for both inputs and outputs, however I ran into a problem fairly quickly. I researched very thoroughly that nearly any heat sink I looked at would overheat the device. Being in Texas you can assume a maximum ambient temperature of around 40*c. the heatsinks have a dissipation rate of 23*c/w and here's the datasheet for the regulator: https://www.sparkfun.com/datasheets/Components/LM7805.pdf.

Now that you have the information let me ask my question. I'm attempting to run the 12v supply into the 5v regulator at 1A. however this very quickly overshoots the allowed temperatures as this is 7 watts to dissipate. Would it be easier to get a 9v supply and just adjust the voltage upwards for the 12v fan or is there a way in order that 12v 1A can be pushed through this without overheating?

If I did choose to go with 9v what circuit would you recommend in order to bump up the voltage 3v for the fan? The fan is an Antec TriCool 120mm LED fan with a maximum current draw of 300mA at 12v. Thank you for your time.

This is not a repeat subject as I am doing low voltage conversions at a maximum of 7w whereas the other topic addresses 24v 2A down to 5v .1A. not only does this not address the fact that he is using a pathetic amount of current but it's obvious why it was overheating. this is asking for a solution it's not asking why it's happening. I'm simply asking how to fix it


texts: Calculating gain, input and output resistances of a current amplifier circuit

texts:
In the circuit below, I want to calculate the gain, $$\frac{I_{out}}{I_{in}}$$

as well as the input and output resistances. I wrote the node equations for the two nodes:

$$V_x (g_{ds}+G_D)-V_{gs}g_{ds}=-gV_{gs}$$
$$V_{gs}g_{ds}-V_x g_{ds}=gV_{gs}+I_{in}$$

The first one show that the two node voltages are proportional,

$$V_x = V_{gs} \left( \frac{g_{ds}-g}{g_{ds}+G_D} \right)$$

and the second one allows me to solve for the current:

$$I_{in}=V_x G_D$$

But looking at the resistor through which I_out flows, I have

$$I_{out}=V_x G_D$$

And therefore the gain is just 1.

Now to find the input resistance, I want to find the ratio $$\frac{V_{gs}}{I_{in}}$$

Expressing one voltage as a multiple of the other, I end up with $$R_{in}= R_D \frac{g_{ds}+G_D}{g_{ds}-g}$$

which is not the right answer (it should be R_D || r_ds). For the output resistance, am I supposed to disconnect the input current source and add one to the output node (that's the tiny bit thats protruding in the upper right corner)? That gives me R_D as the output resistance, which is consistent with the answer I have (the problem is from a past exam).

simulate this circuit – Schematic created using CircuitLab


texts: How to power a Real Time Clock with a 12V vehicle battery?

texts:
I have a real time clock that requires 2.5V to 3.6V, 35 microamps. I have a vehicle battery at a nominal 12V that could actually range from 10V to 15V for the sake of this question. What kind of circuit would I use to power the RTC? I'd like to maximize the efficiency so as to not put any more drain on the battery than necessary, and minimize parts count/cost.

Is a voltage regulator (maybe some sort of high efficiency one) the answer? Or can something simpler be done involving a voltage divider or zener diode or something?


texts: How does a dual-wattage (automotive) bulb work?

texts:
I have a motorcycle headlamp bulb on my desk here. I notice the bulb has a rating of "60/55W" and has three connectors instead of the usual two.

Evidently these correspond to the high/low beam setting respectively but how does it work in practice? Are there two separate filaments within the bulb - one 55W and one 60W - that can be turned on either individually or together?

Thanks.


texts: having distorted image in VGA with FPGA board

texts: I'm using spartan 3E-100 CP132 fpga board to display a basic plus image on a monitor. I have tried using 800x600 72 hz and 640x480 60 Hz but I always get a distorted vertical lines. Is it because the on board oscillator is silicon but not crystal so it's not precise enough? is there a way to avoid this? I've put the image I get


texts: I'm new to regulators and references and I'm trying to update this old circuit that uses an op-amp as a 2.5V voltage reference. The new circuit will possibly use LM4040, but I'm not sure if it needs to be isolated from the LM13700's inputs or if it can be used as is. Anybody have experience with this kind of set up?


texts:
Do you know the game called Buzzwire where the aim is to guide the grip mounted loop through the wire maze without touching the loop against the metal maze all the way to the end? is it possible to get the position of the "wand" along the metal maze at any given moment and also detect where a "touch" event happen?

Specific question: what method/system/strategy should I use to get the x coordinate position of the wand (see picture) along the wire at any given moment into an arduino device or similar?

The idea is to use the device as "game controller" and move a character on a screen based on how fast the player is moving the wand along the wire


texts:
What is a fan-in of a flip flop?

It is mentioned in the following context: "...primary inputs that are in the fan-in of each flip flop."


texts: EMWIN Keil LCD display shows half the screen completely!

texts:
I have written one project in Keil for STM32F103RE && ILI9325 2.8" TFT LCD,
So my problem is this, the GUI_SetBkColor(GUI_BLUE); Function only fill only half of LCD Screen like this:

as you can see the string is "www.keil.com" but it have been duplicated in lcd and uncleear to read, and only fill only half of LCD Screen hase been colored.

the defult lCD Pixels is 320x240 and i have setted that in my files,like this pic:

The could could be found here:

Source code via keil

  Update:

  with doubling the x&y Pixels (640x480) it became this kind:

So what do you think about that?!

Thanks a lot.


texts: Why can't you do a voltage divider for a transmission line?

texts:
When trying to solve a basic transmission line problem, I was making the mistake of using voltage divider across the input load. Why is this wrong?

What I mean is, assume there is a generator impedance Zg and a load ZL on a lossless transmission line. I can find the input impedance Zin at the generator, but to find the voltage across the load, I can't simply do

\$V_g\frac{Z_L}{Zg + Zin}\$.

Why is that wrong?

simulate this circuit – Schematic created using CircuitLab

Schematic isn't that good. Basically some impedance Zg and some impedance Zl on a transmission line.


texts: Guidelines for using an unenclosed power supply?

texts:
What are the basic guidelines for safely using a "bare" unenclosed power supply (random example)?

As a relative novice, my thoughts are:

Definitely need a separate enclosure
To avoid overheating, dont put it in a separate enclosure
Well, use a separate enclosure, but drill holes in it or something to allow ventilation
If it'll be used where there is water nearby (like a kitchen), definitely don't drill holes in the enclosure to lower the risk of splash damage
Maybe mount it somewhere hidden where it has plenty of air and no risk of water
Well now you have bare 120v AC connections, and someone will get shocked
Go to #1

For my project (overly complicated under cabinet lighting) I've decided that using multiple fully sealed power bricks will be the way to go. But I'm curious what the correct way to handle "bare" power supplies is.


texts: Should digital-to-analogue converter produce analogue signal?

texts:
Here is the question. (My inquiry is at the bottom of this page about the shape of the graph.)

The ADC (analogue-to-digital converter) samples the analogue signal at a frequency
of 5.0 kHz.
Each sample from the ADC is a four-bit digital number where the smallest bit represents
1.0 mV.
The first sample is taken at time zero.

The digital signal is transmitted and then converted to an analogue form by the DAC
(digital-to-analogue converter).
Using data from Fig. 12.2, draw, on the axes of Fig. 12.3, the output level of the
transmitted analogue signal for time zero to time 1.2 ms.

The graph shown below is the solution.

What I'm confused is why the shape of the graph is like a digital signal, which has a squared-shape graph, yet it should be an analogue signal since DAC converting digital into the analogue signal.


texts:
This is one weird bizarre thing which I noticed while I was in the electronics lab.

I had this Power Supply and a walkie talkie similar to this

I have not ventured in RF side yet.

The power supply was ON and unconnected to anything. It was reading 13V constant and no load current was taken. When I took the walkie talkie and turned ON (I don't know what frequency it was transmitting , but there was a display on the walkie talkie which read 63 - CH). When I took this walkie talkie near the power supply, I could see the voltage value changing from 13V to 19V to 9V and so on. It was randomly changing value.

I took a multimeter and measured the output voltage while the voltage was changing, I noticed that only the display LEDs on the power supply was changing as the multimeter measured 13.2V.

What could be the reason for this?

Sorry, as I could not provide more information regarding the frequency of the walkie talkie as I am not into RF. Just ventured into the LAB and found this bizarre thing.


texts:
I'm working on a Raspberry Compute Module 4 Carrier with an USB 3.0 Controller with High Speed signals. As I read here in other thread, I decided change polygons for power planes, but I have 2 doubts about them:
-What can I do with the white space? I have 4 split planes, Should I connect all the excess plane to GND or one of the power supplies?
-Other doubt, Can I route high speed signals over power split planes? I have read about not routing over ground split planes, but I'm not sure if I can do with power planes.
About differential pair impedance, the height of the trace is from their respective planes or from GND plane? I'm not sure from where I should to measure the height (my stack up have 4 layers).
Thank you so much!

Edit: Thank you so much for your answers. I have reorganized the PCB and avoid that the traces cross split planes. On Texas Instruments Forums I have received an answer that recommends to me doesn't route on power planes references, he advice to me change my design to 6 layers. Other mate here have told to me that route my signals in inner layers but Texas Instruments doesn't recommend route high speed signals on inner layers. Is the best option add more layers?


texts:
I'm trying to understand the transition frequency of a MOSFET.

The book defines it as the  frequency at which  the  small-signal current gain of the device drops to unity while the source and drain terminals are held at AC ground. What does it mean by unity?

Given this circuit:

I understand that:

$$ I_o = g_m V_{gs}$$

But the expression for the input current is confusing me

(The book ignores Cgb since it is too small):

$$ I_i = s(C_{gs}+C_{gd})V_{gs}$$

Where does the s come from? Why are the capacitors added then multiplied by the gate to source voltage?

The final expression is:
$$ f_t = \frac{g_m}{2\pi(C_{gs}+C_{gd})V_{gs}} $$


texts:
I have;  pin E to LED's positive pin
- negative pin of the LED is connected to a resistor and then ground.
 - If I then leave pin C open and apply power to pin B it will turn the LED on,

It is supposed to not turn the LED on because there is no power to pin C?

This is a problem because;
 I am trying to make an AND gate by connecting,
 - the E to the C pin of another.

I am supplying power using a Arduino.

What might be my problem?

I have tried using 5v power and 3.3v power to see if I am overpowering it.

EDIT:

Here is my circuit. I followed the suggestion and flipped the transistor and the LED still lit up when it should not have. Any other ideas?
I also read some other questions and I think that I should not be using PN2222A transistors but instead use a 2n7000 transistor. If that is the case would this work https://www.amazon.com/MCIGICM-2n7000-n-channel-transistor-assortment/dp/B07BKX255D/ref=sr_1_17_sspa?ie=UTF8&qid=1523501912&sr=8-17-spons&keywords=2n7000&psc=1?


texts: RS485 full duplex to Adapter with A and B ports

texts:
I need to configure a sensor (Thies 3D Sonic Anemometer, Manual: https://www.biral.com/wp-content/uploads/2015/01/4.383x.xx_.xxxUS3D.pdf) via my computer, it has RS485 full duplex and half-duplex capability.

From the wiring diagram I found that there are four pins available: TX+ (pin 5), TX- (pin 2), RX+ (pin 4), RX- (pin 1) for full duplex. For half-duplex pin 2 serves for TX-/RX- and pin 5 as TX+/RX+. Now I only have an RS485 Adapter, which has four ports labelled as A, B, Ground and +5V.

As far as I know, the sensor has last been operated in full duplex mode. Will I damage anything, if I hook pins 2 and 5 to my adapter (YF USB to RS485 adapter: https://www.play-zone.ch/de/yf-usb-zu-rs485-adapter.html)?

How do I know which pin to A and which to B on the adapter side?


texts: I am having a problem of designing pre-amplifier that responds to light pulses of 10 kHz. I have designed the one below but I don't understand the scenario in which the output voltage builds up to a very high level when the input pulses is about 1mV.


texts: Taking more than 2.1A from a two-port "2X 5V / 2.1 A" USB powerbank?

texts:
I just bought a powerbank for intending of using it to power a Rasberry Pi4b
But, it seems i did not do enough research regarding the requirements of the Pi model i have.
The powerbank is listed as "2X 5V / 2.1 A" (it's got two usb outputs). (while the Pi in question appears to need recommended ~3A)

5V DC via USB-C connector (minimum 3A*)

So, i'm thinking, rather than try to return it; I could either fashion a custom USB cable, out of- or similar to, the dual-(power)cords powering certain (older) external harddrives, having the Pi plugged into both of the USB outlets. Or, mod the powerbanks output, in the same way (removing one of the outputs)
But, i am a bit puzzled if i'm even reading "2X 5V / 2.1 A" correctly, as to mean those are two ports able of 2.1A each ? ..Or, if that is commonly the total given in such spec. listings ?
below is the powerbank specs from (Norwegian) manual if anyone's curious.


texts: When might a standard cell optimized for zero wireload capacitance be used?

texts:
Some standard cell libraries include cells optimized for zero wireload capacitance. When might these be used?

Are these used when the output drives a gate that's physically very close to the output? I would have thought that even then, the driving gate should be optimized for something higher than zero.


texts: How to choose wire size for an air conditioner?

texts:
There is a difference between my calculations and what electricians say. Am I missing something?

If I need to install a 3 horsepower air conditioner. Electricians always choose wires that are more than 4 sq mm. They say that air conditioners consume high current.

My calculations tell me that I can use 1.5 sq mm only. Am I right?

3 horsepower = 2237.1 watt

I = Power / voltage = 2237.1 / 220 = 10.16 Amps

According to the following table, I will choose 1.5 sq mm.
http://www.elsewedyelectric.com/BE/ImageFiles/SubProducts/Pdf/Single%20Core%20Cables%20with%20Solid%20or%20Stranded%20Copper%20Conductors%20&%20PVC%20Insulated%20450-750%20V.pdf

So, Why does electricians choose that thick cables?


texts: In a non-inverting op-amp, the negative feedback input (V1) is calculated by (R2/Rf+R2)*Vout because it is a potential divider. However, why do we calculate the voltage across R2 and not for example Rf (i.e Rf/(R2+Rf))?


texts: Circuit amplifying a position sensitive detector

texts:
I have a position sensitive detector (PSD), S3979, which outputs a small current. I'm trying to amplify this current so that it becomes measureable. The circuit below can amplify sinus waves using a function generator, but I doesn't appear to work for the PSD.

What's wrong, how can it be fixed?


texts: Does current flow stop when a capacitor is fully charged?

texts:
If I take a 1V battery and a 1 farad capacitor and a bulb and connect them in a circuit. Then will after the capacitor gets charged (not fully charged as that is impossible) will the bulb gradually stop glowing? Then what would happen if you change the battery and make it a 2V battery?

The question I want to ask is, that if there is a capacitor in any circuit, does current flow in the circuit stop once the capacitor is charged? Why or why not?


texts:
Can somebody please help me with this task:

Two equally large (r = 5 cm) volume charged non-conductive spheres are fixed so that their centers are a = 1 m away.
In the middle of the centerline between the spheres we put a charged ball (m = 1 g, the charge is \$ q = +1 \times 10^{-6} \; As \$).
We push the ball towards the left sphere with velocity of = 20 m/s.

How close to the left sphere ball gets (minimum separation between the ball and the left sphere)? (The charge density for the left sphere is \$ q / V = + 12 \times 10^{-3} \; As/m^{3} \$ , and for the right it is \$ \frac {q}{V} = +9.5 \times 10^{-3} \; As/m^{3} \$.

The gravitational force is neglected.

(Solution x = 16.2 cm From the left ball.)

I tried with equation : \$ 1 / 2 m\times v_2^2 = 1 / 2 m\times v_1^2+ e \times U \; \$
 But I dont know how to calculate voltage(U) between spheres...


texts: How can I find the cutoff-frequency in real experiment?

texts:
My Problem is that I can't figure out how to answer this question:

The component values in the previous measurements have been known and the cut-off frequency could be calculated. In real life, this is not always the case, as components may suffer considerable tolerances causing the cut-off frequency to diverge from its theoretical value. Assume a high-pass filter with unknown components is given and you are tasked to determine the cut-off frequency. Define methods to do so in a “real” lab scenario

I don't get any of this question. Even if there are tolerances, I can figure the output, can't I? Therefore I don't understand why I should find the method to determine cutoff-frequency.


texts: FEM: How to calculate impedance in stator circuit for loaded generator

texts:
I am modeling a synchronous generator and in the stator circuit consisting of 3 phases at the alternator output, I have resistances and inductances of the end windings. Thus I have a 3D approximation of my current 2D approximation.

Now I am considering a generator with load. S = 50 kVA or 50 kW with p.f.unity. We have the formula $$Z = \frac{V^2}{S}$$

But which V to use? It is only after doing the simulations of the FE model that I get the output voltage V at the stator terminals. It's a chicken and egg situation. If I want to add an impedance or resistance for my loaded generator, I need to know V but V is only computed afterwards in the FE simulation.

The approximation which I can have is to use a V which I get from a no-load simulation and then use this V in the formula \$Z= V^2/S\$ to obtain the impedance Z to put in the stator circuit next to the end winding resistances and inductances in order to simulate a loaded generator.

As you can see, this is confusing to me. Looking forward for your comments. Thanks.

If I consider the voltage regulation formula, then I do not know my \$V_{rated}\$.


texts:
I'll post my code below.
The problem is that the MSP's ISR_TRAP function (a function that handles ISRs that are not otherwise handled) is triggering and trapping me in its endless loop. This happens after P2.1's ISR has successfully triggered, and before the Timer B ISR does anything.
The problems is that TB0CCR4 (Timer B's Capture and Compare Register #4) should trigger an ISR when TB0R counts up to the value contained in it. That value is TB0R+delay, where delay is currently just a global variable at the top of the code. According to the debugger in CCS, the timer is counting up to and past the value stored in CCR4, but not triggering the interrupt.
If the program worked as intended, the MSP's onboard red led would turn on when the button is pressed for P2.1, and then off when the timer reaches the value stored in CCR4.
I can't figure out what's going on here, and any help would be much appreciated. Especially if the explanation can shed some light on what the timer is doing/not doing.
#include <msp430.h>

//GLOBALS
unsigned int delay = 0x00ff;

//Main
int main(void)
{
    WDTCTL = WDTPW | WDTHOLD;

    P8OUT &= ~0xff;
    P2OUT &= ~0xff;
    P1OUT &= ~BIT0;

    P2DIR &= ~BIT1;//input
    P2REN |= BIT1;//pullup
    P2OUT |= BIT1;//sit high

    P8DIR |= BIT4;//output
    P8OUT &= ~BIT4;//output low

    TB0CTL = TBSSEL__ACLK | ID__1 | MC__CONTINUOUS | TBCLR;//enable TB0R and choose its options
    TB0CCR4 = 0x0000;//Initialize TB0CCR4, just in case there's garbage in the register

    PM5CTL0 &= ~LOCKLPM5;

    __enable_interrupt();//enable interrupts

    P2IES |= BIT1;//falling edge interrupt on P2.1
    P2IFG &= ~0xff;//clear flags
    P2IE |= BIT1;//interrupts enabled on P2.1

    while(1){}//go forever

    return 0;
}

//INTERRUPTS
#pragma vector = PORT2_VECTOR    //interrupt vector for port 2
__interrupt void Port_2(void)    //interrupt function names can be anything
{
    switch(__even_in_range(P2IV,P2IV_P2IFG7))
    {
    case P2IV_NONE:   break;
    case P2IV_P2IFG0: break;

    case P2IV_P2IFG1:    //P2.1 vector
        P2IE &= ~BIT1;   //disable interrupts
        P2IFG &= ~0xff;

        TB0CCTL4 |= CCIE;   //enable timer interrupts
        TB0CCR4 = TB0R + delay;    //set next event

        P1DIR ^= BIT0;   //enable output
        P1OUT ^= BIT0;   //turn on onboard led
        break;

    case P2IV_P2IFG2: break;
    case P2IV_P2IFG3: break;
    case P2IV_P2IFG4: break;
    case P2IV_P2IFG5: break;
    case P2IV_P2IFG6: break;
    case P2IV_P2IFG7: break;
    default: break;
    }
}

#pragma vector = TIMER0_B0_VECTOR    //interrupt vector for timer B
__interrupt void T0B7_ISR(void)
{
    switch(__even_in_range(TB0IV,14))
        {
        case  0: break;
        case  2: break;
        case  4: break;
        case  6: break;
        case  8:                                 // ccr4

            P1OUT ^= BIT0;    //toggle onboard LED
            P2IE |= BIT1;    //re-enable interrupts after delay
            TB0CCTL4 &= ~CCIE;   //disable interrupts on CCR4

            break;
        case 10: break;
        case 12: break;
        case 14: break;
        default: break;
        }
}


texts: How to power a circuit of LEDs with maximum 5v

texts: I'm working on adding some LED's to some electric train engines that can have a variable power input up to 13V. I was hoping that under 5V, the power could go directly to the LED (with an inline resistor) for variable brightness, but limit the circuit to 5V as the input voltage increased beyond 5V so the maximum LED brightness could be achieved before maximum input voltage. I was thinking of using a 7805, but not sure how to get it to work below the dropout of ~7v. I'm fairly new to electronics, so any help is appreciated.


texts: Techniques for Filtering a Noisy Buck Converter

texts:
I have built a buck converter on the TS30011. Unfortunately, I am getting terrible noise on the output.

External Parts Used:

Inductor

Output Capacitors

I have been analyzing my design and have been getting awful results.

My low-frequency noise is not terrible, but I am being plagued by the high-frequency noise. I have noticed two immediate errors with my design.

1) I did not separate the analog ground and the power ground as it says in the datasheet. Apparently it is only supposed to be connected at a single point, but I did not do this.

2) I must add bypass capacitors at the input of the device as close as possible.

I am hoping that these two issues alone will make my device usable, but I am wondering if there are any other suggestions for removing high-frequency noise from a buck converter.

I saw that a capacitor multiplier circuit could be used to smooth out the signal. Is this a good way of adding additional filtering? Any other suggestions would be greatly appreciated!


texts: PSpice generates gray hair, not correct answers

texts:
I have an extremely simple circuit that involves a NMOS, three resistors, and a voltage source. The circuit and info are shown below. Please understand that I could probably analyze this circuit while driving on the interstate, at midnight, before I hit the next mile marker. I should also mention that this is Example problem 3.3 on page 147 of Microelectronics Circuit Analysis and Design: Fourth Edition. It's not homework, its curiosity.

Why does PSpice generate an answer that is 1 Volt higher than the expected VDS voltage and .5mA less than what it should be for the drain current? I assume PSpice is adding a default value model property that is not considered when the author of the book wrote the example. But that brings question two: If the author can write an example by supplying only two values and get the correct 'ideal' answer, why does PSpice &^%*(^ it up? I realize this circuit may never cure cancer, or land me on the moon. But what if I design a clock tree or buffer that is of some importance? 1 volt becomes important. I feel like I am constantly double checking PSpice results, frankly because I don't trust it.

UPDATE 2012-08-16
I get the correct results if I double the transconductance parameter (KP/Kn) from .1mA to .2mA. Any clue why?

Are there any suggestions?

Am I missing something?

Any constructive criticism would be much apprecitated.

Problem From Book

Calculate the drain current and Vds or a common source circuit with an n-channel enhancement-mode MOSFET. Find the power dissipated in the transistor. For the circuit shown assume R1=30kOhm, R2=20kOhm, RD=20kOhm, VDD=5V, Vtn=1V, and Kn=0.1 mA/V^2

Answer from Book

ID = .1mA, Vds = 3V, Vg = 2V

The Circuit

The Known MOSFET Parameters

Here is a link to PSPICE Model Parameters


texts: Are TVS diodes a good mechanism to reduce specific kinds of electrical noise?

texts:
This specific application relates to small racing quadcopters, which have their own design constraints, but hopefully it's applicable on a larger scale.

Certain brands of BLDC ESCs are very popular with racers because of their small size and high power handling capabilities, which they achieve by simply removing filtering components on the incoming power leads.  The most notable example is the LittleBee, which is actually known for blowing out video transmitters with its voltage spikes -- in excess of 50V.

As a physical layout, quadcopters usually have 1 ESC mounted directly on each arm, with all 4 sets of leads terminating on a common power distribution board in the center of the frame.  The power leads are generally 16AWG silicone wire, 2-4" long, and carry between 20-30A averaged at 17.4V or less, for 3-6 minutes.  The power distribution boards are generally simple 2oz boards with large power and ground planes and exposed pads for the leads to be soldered directly to.  Smaller sets of "accessory" pads are broken out as well for components like the video transmitter, but these are directly part of these large pours.

The current idea I have is 20V unidirectional TVS diodes reverse-biased across the 4 sets of solder pads for the ESCs, and a 25v 1000uF low-ESR cap soldered where the battery leads enter the board.  The idea is the large, single cap will help to smooth the rise/fall of the spikes, and the TVS diode will clamp anything above 25V before the video transmitter gear "sees" the spike.  These spikes happen on the order of hundreds or thousands per second, for the entire 3-6 minute flight.  I don't know if this will impact the TVS.

As both space and weight are at a premium in a racing quadcopter, are there any other additional components I can add, change, or modify to help reduce noise being fed from any ESC back into the overall system?


texts: Questions on this high frequency sawtooth generator

texts:
So I found this very basic sawtooth generator:

http://www.radiolocman.com/shem/schematics.html?di=143990

I have a few questions about it:

I understand that when the capacitor C_T charges fully to a high, the inverter goes low, thereby letting the C_T discharge through the D_2 diode. But after that where does it drain? Does the inverter, at it's output, open a drain to the ground? Is it exactly like a CMOS NOT gate, where the NMOS half drains to ground?

What can I do to make the discharge faster so I can make the negative edge more vertical? Though, I don't care much about the rising upward ramp, that does not have to be linear (could be an upside-down capacitor charging plot for all I care).

Just how much frequency can I squeeze out of this sawtooth generator, say, if I'm using a 74LVC1G14 with 2.2ns propagation delay? I was thinking of using 1nF-100pF for C_T and 10-100ohm ranges for R_T... Can I go for hundreds of MHz? Or Is the high charging current (for R_T being so low) too much for the C_T to charge at a consistent time? If so, I happen to have the easy option of using a V_CC = 2.5V and V_DD = 5V.


texts: Microstrip Patch antenna has improved impedance matching but no improvement on gain

texts:
I am trying to design and understand a 30mmx45mm patch antenna. The setup is below, but it is a 50mm long, 50ohm T.L. feeding the patch antenna on Rogers5870 circuit board. I am trying to do impedance matching with an open circuit stub. My issue is two-fold: i) when I have a really good impedance match, where my S11 parameter is very low, my gain does not increase and ii) the 3dpolar plot is not symmetric. The details are below and I have attached the simulation file
Case 1: No tuning stub--just patch antenna and transmission feed line
The electric field plot and the 3d polar gain plot showing asymmetry, here the gain is 5.8dB and the S11 parameter at 3.125GHz is -5dB. I deembeded the excitation by 50mm to the entrance of the patch antenna to estimate what the impedance was and Re(z)=89ohms and Im(z)=-75ohms

Case 2 included the tuning stub used for impedance matching
As before, the electric field plot and the 3d polar gain plot showing asymmetry, here the gain is 5.8dB and the S11 parameter at 3.125GHz is now -37dB. I deembeded the excitation by 50mm to the entrance of the patch antenna to estimate what the impedance was and Re(z)=52ohms and Im(z)=-.6ohms which means the impedance matching is working quite well. My question is, why is my gain not improving?


texts: How does physical damage affect the performance of photovoltaic cells?

texts:
I am working with an array of monocrystalline solar cells. The array consists of a number of modules, each containing several individual cells wired in series. Unfortunately, the encapsulation on the array is not particularly robust. Some of the cells have sustained physical damage ranging from superficial scratches to small blunt impacts that have crushed the semiconductor layers.

Can I expect that the cells will function at a reduced output, or will they be totally unusable? Is there any way I can mitigate the damage? I have been told that bypass diodes in parallel with each individual cell would allow current to flow around any damaged cells. Are there any other strategies I could use?


texts:
My Microprocessor teacher of 8085 gave an assignment to set all flags ! I have written this little program to set all except Sign, Please help me out

 MVI A,0FFH
 ANI 01H
 HLT


texts: Practical Approach for getting maximum Power from a DC motor

texts:
Theoretically, a DC Machine achieves its maximum Power when back emf is equal to half the applied voltage.

Why this condition is not realized in practice ?
What is the Practical Approach for getting maximum Power from DC machines ?


texts: Is this DIN connector suited for MIDI devices?

texts:
I'm having difficulties to find PCB mount "MIDI" connectors by a supplier like Farnell, no search with the keyword "MIDI" succeeds. I know a MIDI connector is a DIN5 connector, but there seems to be many variations of "DIN5".

For example, do you think that a product like this is suited for standard MIDI cables (for electronic music devices)?

The image looks ok but I wonder if the "angle" of each "line hole"/pin is not a little bit different than usual MIDI devices...

Here is the datasheet.

Here is a connector that I know working for MIDI, I wonder if the one I linked is similar.

Edit: The angle of the "linear holes" seems to be very different from one item to another. Why? By the way, why is it a "linear hole" and not just a round hole like all other connectors?

Linked to 5-pin DIN socket advertised as MIDI, not the same as on my MIDI gear but not a duplicate since here I have a more precise question about the angle of the linear holes (not present in the other question).


texts: 3.7 720mAh lipo thru TIP120 as a relay -- no current?

texts:
Trying to ignite an RC glow plug using an Arduino Nano and TIP120 as the relay per the typical circuit -- using a separate 3.7 lipo 720mAh w/o the circuit ignites the plug (actually its twice what the glow plug shd use but...not the issue). With the circuit there is a 3.7V read but the plug does not ignite.

I tried a 1M (and others) resistor inline and the same, the voltage drop measured correctly but no ignition. I presume current is hindered but consider me novice when understanding mA drops effecting this.

Is there a way to accomplish this or shd I use a mechanical relay (which I would prefer not to use per it's excess size)