texts: Choice of passive components for AD549/AD630 low-noise circuit?

texts:
I'm trying to reproduce an "ultra" low-noise amplifier circuit which calls for several precision amplifiers/modulators (AD549/LF356/AD630). The input source is a Hamamatsu S1223 photodiode capturing a faint optical signal which is oscillating at 1kHz. While the datasheets for these components have many useful suggestions, I do not see a clear recommendation as to what passive components should be used.

After reading this design reference, I'm thinking to settle on all NP0 capacitors and metal film resistors. However, I'd really appreciate if anyone with experience can comment on what the best choices are? (i.e. If some exotic "tantalum" or "mica" capacitor would make a big difference in noise, I'd love to know!)

The circuit is given below. The signal is amplified (AD549), then bandpass filtered (LF356), then frequency-locked (AD630), and finally low-pass filtered (LF356).

Thanks so much!


texts:
There are a few things I understand:

DRAM stores each bit of data to a tiny capacitor with some potential difference.
Unless the capacitor is connected to low voltage end, the potential difference should remain the same.

Why do we need to refresh the potential difference stored in the capacitor in DRAM?

OR

Why and how does the capacitor lose the charge in DRAM? (Are capacitors connected to low voltage ends?)

Shouldn't the capacitors pertain to the potential difference and DRAM should work like non-volatile memory because of this?

Update:

Also if you can answer the point raised by Harry Svensson in comments:

Why do the capacitors in DRAM need to be updated, yet the capacitors in the gates in analog FPGAs somehow retain their charge?


texts:
I have a 3D printer at home and looking to improve some parts.

The PSU on the printer has no labels so I'm  not certain what it's doing - but the 3D printer's spec. sheet says it's 600W peak and it definitely puts out 24Vdc - so I'm assuming the PSU is a [rather noisy!] 24V 25A PSU.

So, as it's noisy and it's in my living room (the wife loves it, honest...) I'm looking to a) quieten it down and b) tweak it to improve it.

I've looked at getting this so as to get rid of the noisy PSU and maintain the 600W capacity.

Currently there are 2x 24V 0.15A fans connected directly to the PSU output but I have also bought 2 of these 12V 0.06A silent fans - the reviews are decent and I think they look pretty good, for what it's worth. I've snipped the signal wires and considered just putting them in series but thinking now I'd rather step the PSU output down to 12V then supply them in parallel / independently.

I've bought 2x of these terminal rails which I'm thinking I'll hook up to the supply and return from the PSU then I can just tag the 24V loads from there (to tidy things up somewhat as it's a complete mess at the moment.)

The controller board (here) is 24V and is supplied directly from the PSU output - it supplies the stepper motors directly from itself. The controller also controls a heated bed via a solid state relay which is hooked up on the power side directly to the PSU output- I don't know the rating for the heated bed this but is the beefiest component of them all.

Possibly I'll get another terminal rail and make it +12V via this 5A 24-12Vdc converter (60W), fed from the +24V rail - then I could supply the fans directly from this and simply take the fan returns back to the -24V rail. I'm unsure if this would be OK to do or if I'd need to have another rail with -12V? I'm just hoping that I won't blow the fans (as I already did with my attempt at connecting a LED strip - see next)

I also currently have a LED strip fed directly from the PSU but looking to switch that out for Philips Hue Lightstrip so I can switch it off if I like (during long prints the printer just sits there lighting the room at night.) I bought the Philips Hue Lightstrip Plus, cut the connector off which connects to the wall socket/ transformer and crimped some terminal rings to it then connected it to the PSU, but when I switched the printer on I heard a "puff" from the small electronic box and can smell something has burned up inside it. I'm unsure what's gone wrong here - I assumed the output from the PSU would've been fine to connect straight to the little module, as the wall-socket/transformer is rated at 24V 0.83A (20W) and the PSU output is 24V.

I assume the current has smashed it - but wondering how I could limit this so if I have a +24V rail being fed from the PSU I could then supply the Philips Hue Lightstrip Plus from it?


texts: Center Tapped Transformer secondary winding direction

texts:
For a 12-0-12 Step Down Center Tapped Transformer, what should be the direction of the winding on secondary coils (One End - CT, CT - Other End)? Should they be in opposite direction? If it is 'same direction' would it have any relation with primary windings direction?
Note: the transformer will be used in reverse to step up voltage in a DC-AC Square Wave inverter where the CT will always receive +ve DC voltage.

Also, is there any change required in terms of winding direction, if used in a Full Bridge inverter?


texts: Current sensing on positive or negative end

texts: On a flying drone (hexacopter) I want to measure the current consumption using ACS758. This sensor uses Hall Effect and the load circuit is isolated. Sensor outputs analog voltage referenced to common ground (Batt-). I use MCU (STM32F405) with ADC, which is powered from a buck converter (22.2V to 3.3V). All electronics use same reference ground (Batt-). Frame is also grounded.


texts: Issue with dividing the voltage and feeding it to an differential amplifier

texts:
I have a ladder voltage divider which divides 70v into 7 different steps (10V each).

Output of this voltages is fed to a unity gain differential amplifier to get the difference voltage (70 - 60 = 10).

The problem is the resistor for differential amplifier are loading divided signals.

I want to use a high common mode voltage differential amplifier to accommodate 70v range

I tried looking for instrumentation amplifier but none are supporting common mode input range what I require

How to isolate the signal without using an high voltage buffer IC (these are costly)?


texts: Anyone an expert on mobile LCD displays?

texts:
Reason I ask is, I've noticed with water damaged iPhone 6 screens if the pins on the connectors of the screen itself have corroded and you fix them with cleaning and fresh solder or jumper wires 8 out of 10 times the screen will function fine.

However, the 6s screens seem to be SUPER sensitive. Any water damage to the phone even if it has no impact on the connectors of the screen itself or logic board around the connectors then only 1 every 10 will work again. The rest simply don't display an image ever again.

Only difference from the 6 and 6s screens is the 6s has touch ic/circuit part of the screen assembly itself where as the 6 has it on the logic board.

Both get the LCD controls and voltages from the logic boards. The 6s has a line called "LCM_Panic" on the logic board that the 6 does not (unless it was renamed something else that's not easily discernible) however not sure if this line has anything to do with the issue I've been seeing.

I'm trying to figure out why that is but of course there isn't any reference/schematics anywhere on the screens themselves.

Curious if anyone might have any insight and any clues to a work around.


texts: How to tell logic low and logic high from a datasheet?

texts:
I want to control the SHDN (shutdown) pin of a FAN5333B LED driver (datasheet) with a 3.3V device using PWM. I was planning to drive it with 5V on Vin. I see from the datasheet that logic high turns it on and that logic low turns it off, but I can't find anything about what is considered logic high and low.

I'm very new to reading datasheets; what should I be looking for? Is it just assumed knowledge?


texts: Connecting Ne555 chip's 7 discharge pin directly to supply

texts:
I'm building a adjustable frequently generator with ne555 timer .
But I don't want duty cycle to change with frequency so Can I connect the 7 discharge pin directly to supply and add a potentiometer to adjust charge and discharge times .
I think discharge pin can create short circuit and it will burn the chip ?

simulate this circuit – Schematic created using CircuitLab

Normally green wire is resistor but I want to remove the resistor and connect discharge pin directly to supply


texts:
The previous owner of my sailboat installed an electric DC motor and batteries. I cannot find any specifications on this motor besides what is on the plate on the motor housing.

The plate says:

Advanced DC Motors Inc.

Part No. AC4-4002
Volts DC- 72
Serial No. 138
Rating 2.940
57B loT

I would like to know horsepower, rpm range, and anything else about the motor. I have searched the internet for hours and once in a while find the motor part number but no other information is provided.


texts: Cannot transmit message (receiving is working, but without ack) on CAN bus (LPC2368)

texts:
I work with microcontroller LPC2368.

After initialisation of the CAN interface to normal mode (not listen-only mode), I can receive all messages, but the microcontroller cannot send an acknowledge with the error code in register CAN1ICR->ERRBIT = 0X19 (Acknowledge slot).

In the same way, the microcontroller can't send a message on the CAN bus with error CAN1ICR->ERRBIT = 0x03 (Start of frame). Why can the microcontroller receive all messages, but have problems when writing on the line?


texts:
The source follower amplifier circuit shown in following figure transistor parameters are Vth = 1.2 V, kn = 4 mA/V2, λ = 0.01 V-1. Assume that gm = 11.5 mA/V. Vdd = 12.

Design the values of R1, R2, Rs such that small signal voltage gain Av is equal to 6.54.

I tried solving it with the AC model of the MOSFET but I came up with a negative rs and if I proceed to find R1, R2 I lack equations to continue.


texts: Can a BJT base-collector junction be safely used as a diode?

texts:
In a (hobby) project I'm doing, I noticed that the diodes I needed were more expensive than the NPN transistors, which left me wondering if I could substitute the transistors for the diodes.

I'm aware the base-emitter junction can be used as a diode (usually tying base and collector for better properties), but this limits the reverse voltage to \$V_{EBO}\$ (typically about 6V), which is too low for my application. Therefore I'm interested in using the base-collector junction, like so:

simulate this circuit – Schematic created using CircuitLab

Researching this, I've found multiple claims that B-C can be used as a diode, but very little information on whether or not this is a good idea, and its properties. So in particular, I'm wondering:

Is it safe to use an NPN BJT in this configuration? Is this as robust as a dedicated diode?
Should I leave the emitter unconnected (A), or tie it to the base (B)? How does this affect the properties?
What would the resulting reverse breakdown voltage be? \$min(V_{CBO}, V_{CEO})\$?
What would the resulting forward voltage be? Can it come close to \$V_{CE(sat)}\$ (at similar currents)?
What forward current could the resulting diode support? Can it come close to \$I_C(max)\$?
How fast would the resulting diode be?

Application

I would appreciate general answers on using B-C as a diode, but for my particular application the diodes (transistors) would be used as a low-current, low-frequency full bridge rectifier. I'm looking to maximize \$V_R\$, and minimize \$V_F\$ at a current of about 10-20 mA. The transistor I had in mind is the MMBTA06WT1G.


texts: What chips can be used to design an Anti-Counterfeit /Authentication circuit?

texts:
I am an intern within the R&D branch of a company that designs tools that must operate with low noise at extremely high external temperatures (upwards of 175C). My boss asked that I look into finding a chip that would help prevent counterfeit tools from being connected to our power supply.

I'm looking for a chip that will check for a certain serial number or a "password" of sorts before allowing operation of the tool. In other words, the chip would expect to be given a correct response from the tool being attached to the power supply before allowing the tool to be operated.

I have found chips like the ATSHA204A (https://www.microchip.com/wwwproducts/en/ATsha204a), but I can't figure out how it should actually be connected to operate the way described above - I'm not even sure if this type of chip would be useful for what I have been tasked with.


texts: How do I calculate the equivalent RLC circuit values for a non-ideal capacitor?

texts:
The circuit below was constructed and the voltage across Cx measured with an oscilloscope. The measurement is shown below the circuit. The capacitor has a nominal capacitance of 22uF. The square wave from the signal generator has an amplitude of 10V and the rise and fall times of 10ns.

Determine an equivalent circuit for the capacitor with component values. The equivalent circuit for Cx is a series RCL circuit.

The values for R,C,L are : 0.1 Ohm, 22uF, 5nH respectively but I do not know how these values were attained, please help.

If the equivalent circuit was only an RC, I could calculate R using t=RC however, when the inductor is added I cannot calculate the values for R and L.


texts: Can I use 1 to 2 power adaptor to measure current with multimeter

texts: Can I use 1 to 2 power adaptor(like the one in the picture) to measure current with multimeter without removing wire sleeve by connecting device plug in one side and the multimeter in other?


texts: Why does this amplifier not work past a given Vcc?

texts:
This circuit works well enough in simulation, I've built it and I can't get the final stage to put more than around 16V across the load.

The last stage itself is performing like a voltage follower in that the voltage to this stage seems to cap off at around 17V, however when common emitter stages are in isolation they turn on and (almost) 28V can be switched.

Dropping the final stage's base resistor values actually worsens the problem - i'm stumped

The 300R simulates the AC equivalent load i'm working with, which is a piezo pump


texts:
I'd like to dim an ordinary 3-pin PC fan with a 3.3V-PWM at its 12V power supply pin. As I also need to measure the tachometer signal within a 3.3V logic level circuitry I'd like to switch the fan on the high side. Otherwise the tachometer signal will be pulled to 12V which is what I'd like to avoid.
Untill now I don't have any PMOS on my BOM, but I already use several NMOS. That's why I came up with the following circuit which seems to work as intended corresponding to my LTspice simulation. But I'm unsure if there might be any hidden disadvantages or complications that are not revealed by my simulation.

Is such a circuit ok?

The MOSET I'm going to use is the CSD17382 of TI.


texts: Phone jack schematic and datasheet meaning

texts:
I am making an Eagle Cad library for this part, and I want to make sure I am making my part correctly. On this datasheet, http://www.switchcraft.com/Drawings/35rapc2av_cd.pdf, I am assuming that:

"terminal" is the sleeve of the male phone jack connected to ground and corresponds to the big rectangle on the schematic
"shunt terminal" is connected to the male phone jack tip and corresponds to the triangle shape on the terminal
"tip spring" corresponds to the mini arrow connection on the schematic


texts: Line level detection using ADC from a passive summing box

texts:
I was looking for a way to detect a line-in device transmitting audio.
I got the idea to use ADC for this from this question:
How to detect line level audio signal?

I already have a 4-channel ADC (the ADS1015) on my board which uses only one channel to read from a resistor network. So, I still have three available, but is this a good idea?

Power

What should I expect line-level audio to be, worst case? Less than 5V, 10mA?

From what I understand from the datasheet, the ADS1015 is tolerant of analog voltages up to 5.5V, 10mA continuous/ 100mA momentary. But it seems not to be able to handle negative voltages:

https://cdn-shop.adafruit.com/datasheets/ads1015.pdf, page 20:

  Although the ADS1013/4/5 can read bipolar differential signals, they
  cannot accept negative voltages on either input. It may be helpful to
  think of the ADS1013/4/5 positive input as noninverting, and of the
  negative as inverting.

Now, I don't fully understand this. Will negative voltages damage the circuit? Or can't they be measured? In the latter case, for detection purposes, I guess it's ok to measure positive voltages only? In the first case, can we filter out the negative voltages?

Connection

I have a three channel passive summing box. Can I simply hook it up to the ADC from there (see schematic)? Or should I add filters, safety, and/or, ...?

Notes

The programmable gain is currently set to "2/3".
I read the values from a Python script, so I can be "smart" with the detection, for example filter out fluke spikes.
Any tips to make it robust (prevent false positives) and somewhat idiot proof (the Line-In is on my car's dashboard, who knows what stuff people plug in when i'm not looking)?


texts: Oscillator circuit using comparator and opamps

texts:
All opamps are ideal and Rx = 2R in the figure. The comparator is a nonlinear block which operates as follows: if its input Va < 0, its output is +1V. If Va > 0, its output is -1V. To simplify calculations, we can also assume the comparator output to be a square wave alternating between +1 and -1 at steady state.

How to find the amplitude of oscillation at Va and Vb? I have obtained the transfer function between Va and Vb, but I'm unable to get one between the comparator output and Va.
Also, what is the strength of the 3rd harmonic relative to the fundamental at Va and Vb? Using that result, how to find which of these outputs is “cleaner”?


texts: How to prove that \$I_3=Vi/R1\$ in a darlingtonpair circuit with opamp when \$\beta_2\to\infty\$?

texts:
I have the following circuit:

simulate this circuit – Schematic created using CircuitLab
How can I prove that \$I_3=Vi/R1\$ when \$\beta_2\to\infty\$?


texts: Why does putting the leads of an ammeter in a receptacle short the outlet?

texts:
An ammeter needs to be connected in series with a circuit to test current, which sticking the leads in an outlet does not do?
Also, there is no amperage to measure on an outlet with nothing plugged into the outlet to draw current, correct?
Why does attaching the leads to each hole of the outlet short the outlet and trip the breaker?

Any explanations would be appreciated! I'm trying to refresh myself on circuit theory, so feel free to be as technical as needed.


texts: Measuring sound frequencies using Raspberry Pi or Arduino

texts:
I am trying to stream sounds using a microphone and measure their frequencies I first thought I could use an Arduino but couldn't find a model suitable for this purpose.  I then realized that I can use a Raspberry Pi instead but I still don't know exactly how I can do it.  Any thoughts would be highly appreciated.
Added information from comments:
I'm actually new here and don't know much about the kind of details that I need to provide. But anyway thank you everyone for your interest. I am actually an electrical and electronic engineering student.
Yes I have heard of the Fourier transformation for sure.
I am a total beginner in practical applications, though.
What I am trying to do is stream human sounds and then measure their frequencies to then be able to send that data back to the Raspberry Pi and show those frequencies in the form of something.  I have not yet decided on the latter step, I'm just trying to find the best way possible.


texts: Concurrent assignment or output port connection should be a net type

texts:
For the following code,I get several errors:

1)Target <mem> of concurrent assignment or output port connection should be a net type.

2)in_d0_ is not a constant

How this issue can be solved?

module module_cell44( in_d0,in_d1,in_d2,in_d3,out_61,out_68,clk );
    parameter DATA_WIDTH = 16;
    parameter ADDR_WIDTH = 8;
    parameter ADDR_DEPTH = 1 << ADDR_WIDTH;

// Interfaces
input clk;

input [DATA_WIDTH - 1:0] in_d0,in_d1,in_d2,in_d3;
output [DATA_WIDTH - 1:0] out_61,out_68;
reg [DATA_WIDTH - 1:0] out_61,in_d0_,in_d1_;
//Cell`s memory array
reg [DATA_WIDTH - 1:0] mem[0:ADDR_DEPTH - 1];

// Procedural Assignments

always @ ( posedge clk )
begin
in_d0_ <= in_d0;
in_d1_ <= in_d1;
mem[in_d2]<=in_d3;
end

// Continues Assinmnents

 assign mem[in_d0_] = in_d1_;

endmodule


texts:
I am a physicist and I'm planning to demonstrate some simple classical mechanics experiments to a group of students. I'd wonder to know if there are any schematics and codes available for connecting a Hitachi H48C Tri-Axis accelerometer to a basic stamp. I've chosen these components simply because I'd like the students to do the experiments from the scratch and Basic Stamps look pretty easy to work with. Nevertheless, I couldn't find any schematics on their web pages.

Thanks


texts: RF PCB Design Basics - RF traces golden surroundings

texts:
In the answers to my previous question "RF Design Basics", there are explanations about the purpose of a golden ring around the PCB edge and around some parts (functional blocks) within the PCB.

However, I want to know: What is the purpose of the golden area surrounding the RF traces, like in the Lime Microsystems board below? I suppose it is, again, used as a shield, but does it have to be golden in this  case when it is not intended for shell mounting? Will the masked (painted) copper with the proper via stitching around do the same thing? And, is there some rule that defines the width of the surrounding area that have to be golden?


texts: M24LR16-E I2C EEPROM not detected during I2C scanning device

texts:
I am using the M24LR16-E EEPROM which is an I2C device:

http://www.st.com/content/ccc/resource/technical/document/datasheet/56/58/3c/91/80/a4/49/89/DM00031737.pdf/files/DM00031737.pdf/jcr:content/translations/en.DM00031737.pdf

I am using the Nordic nRF52 Development Board for the EEPROM to be intefaced to.

In Nordic's SDKv12, there is a sample application which uses TWI to scan for connected I2C devices with the microcontroller. Kindly see code snippet below for the scanning procedure.

When I run this, the M24LR16-E cannot be detected. However, when I connect a Bosch's Barometric Pressure Sensor (BMP180) to the I2C bus, both of them are detected and the correct device select codes are printed.

Why is this happening? The read and write functions that I wrote for the M24LR16-E are working, though. Does this have anything to do with timing issues?

Thank you in advance.

Scanning for I2C device procedure:

for (address = 1; address <= 127; address++)
{
   err_code = nrf_drv_twi_rx(&m_twi, //twi config structure
                             address, //device select code
                             &sample_data,sizeof(sample_data));
   if (err_code == NRF_SUCCESS)
   {
       detected_device = true;
       NRF_LOG_INFO("TWI device detected at address 0x%x.\r\n", address);
   }
   NRF_LOG_FLUSH();
}

if(!detected_device)
{
    NRF_LOG_INFO("No device was found.\r\n");
    NRF_LOG_FLUSH();
}

Also see image for the outputs (both EEPROM and pressure sensor connected to the I2C bus):


texts:
I just created a PCBA using the module MC60 and I have some problems:

I'm using a U.FL connector to connect a RF passive external antenna to the MC60, the U.FL should be on the same layer of the MC60? Also, it should be far from the SIM card holder and power source?
Since I have my U.FL connector close to the SIM card holder and on a different layer, every time a connect a external RF antenna the SIM card stops working, so I have tried to power it up without the RF antenna and it works. But also I'm able to connect to the GSM tower and send information, in the datasheet of the MC60 they don't say anything about a internal RF antenna, how is this possible?


texts: My question is regarding the two coils present in the circuit. Their turns ratio was given but I can't see where I can use that information. I did come up with a full set of linear equations which can be solved to yield the voltage U2, however that voltage will obviously depend on R,k, and the inductances L1,L2, and the mutual inductance M. Is there a way to use the given information and find M using N1/N2?


texts: How to re-magnetize a permenent magnet motor of small size (model railroad)?

texts:
I have several small DC motors where if I place an extra magnet to back-up the included magnet, the performance seems to improve significantly.

These motors are 30-40 years old & their performance is degraded. I've been told that it's possible to restore their performance by re-magnetizing the magnets.

How can this be done?


texts: Constant power supply with high-voltage "restrike"

texts:
I'm still playing with electrolytic chemical reactors.  After looking at the results from a constant-current circuit I'm realizing that what I really need is a constant power supply because, depending on the reactor conditions and setup, it can take something like 10kV to ionize a path through the reactor and just get current running, but then the impedance collapses and what I really want to study are the results from a constant amount of power through the reactor over time.

Now this sounds to me roughly like what the ballast for a fluorescent light does, with two minor variations:

I need peak voltage to reach an order of magnitude higher
I need it to be able to repeatedly "strike" a high voltage, because it appears that as the reactor operates the ionized channels can collapse and have to be reopened.

So if there's an off-the-shelf (OTS) constant power supply with a voltage peak in the kV range and output in the tens of watts that would be perfect.  If some OTS item could be readily adapted to provide those characteristics please point it out (along with suggestions for modifying it appropriately).

I suspect at the very least this is something for which standard SMPS ICs could be adapted, in which case I would appreciate suggestions of the best starting point for an applied schematic.  (Source can be either 120V AC mains or any voltage DC.)


texts: How to control cell balance FET with 5V logic?

texts:
I want to control FET to discharge battery cell with 5V logic from microcontroller with common grond with battery as shown.

simulate this circuit – Schematic created using CircuitLab
What is the proper to turn on/off the mosfet with difference source voltage?

simulate this circuit
This schematic above is my initial idea. it seem like when the bjt conduct, the gate voltage will be negative and not the same voltage for all cell. This might destroy MosFET if it connect with higher cell so I searching for better solution.
Note: this diagram came from TMS570


texts:
One of the most common optimizations used in modern processors is to keep the silicon as busy as possible. Cache units access memory for the processor so other circuitry isn't tied up for the dozens of clock cycles it takes to access memory. Branch predictors speculatively schedule instructions so that the processor does not have to wait for a branch to fully resolve to pipeline instructions after a branch. Instructions are executed out of order so that instructions that follow it aren't unnecessarily delayed. Anything that can be parallelized in a processor, is.

Except apparently the ALU.

As far as I'm aware, ALUs are integrated circuits that direct operations to one of several individual operation circuits based on the operation specified by an operation field. ALUs are combinatorial: if a processor sets the ALU to perform a operation, such as multiplication, then while the ALU runs that specific computation, other functionality within the ALU, such as addition, is inaccessible while the multiplication still runs. It would appear to me that a processor that had separate logic circuitry for each operation rather than an ALU could run both operations in parallel, yielding performance gains for code that heavily uses multiple arithmetic operations.

So why isn't this done?

(Or at least, why isn't it common or noteworthy enough to be written about in literature about computer architecture?)


texts:
I used a L7805 to power a Raspberry PI and it worked for about 10 seconds then started to smoke and die.
L7805 is rated for 1.5A and 35V DC input.  Power supply was 24V DC (was actually two plugin 12V DC 1A adapters wired in series) that was metering 30V DC without a load (will obviously drop close to 24V DC with a load).  24V DC is industrial controls standard.
I didn't put the caps on the input and output which I now see in the datasheets.  Would omitting these caps cause the meltdown?

Because the input is 24V DC and output is 5V DC there would be a lot of heat generated.  Would it be better to use a switching power circuit?  Datasheet says heatsink is needed for anything over 1A.  The PI uses less than 1A without any devices connected which I didn't have any connected.

What else could I do to make the 7805 more robust (other than adding the caps of course)?

Thanks


texts:
I am designing a simple device that incorporates an LCD display that requires a 3V operating voltage, but I can only use a single 1.5V battery in my design.

How can battery voltage be regulated without significant loss of efficiency? I need this to stay as compact as possible and have very little experience with this.


texts: Reflection coefficient at the load when reflection coefficient at the mid point of transmission line given

texts:
In the solution they have given like this

Here at the end they have calculated the angle that did't get why they have added it by \$2\pi/4\$.?

Can anyone help me Please?


texts: Buck Converting Voltage, to Switch Original Voltage

texts:
I'm learning electronics, so I want to sanity check this approach in case I'm missing something.

I have an arduino (at 5V) controlling power to a set of lights at 12V, via a mosfet. This is all fine, using a separate 5V and 12V power supply.

Is there anything to stop me using 12V for both in parallel, taking one of the parallel branches, passing it through a Buck converter to 5V, and supplying the Aruino, then using the other branch, raw 12V to power my lights, with the arduino switching the 12V via the mosfet.

I've plenty of available power in the 12V supply, but is that in-parallel structure what I need.

I feel like it is an obvious question, but I was unable to google it. Examples seem to use different power supplies for the control + switched circuit. Is my suggestion the way complex circuits use a single power supply for different voltages?


texts: Is it safe to use the 330K, 1206 pack as shown or to use 2x of 115k,1206 resistors in series? Input is 230v AC.


texts:
I have the following problem: according to my exercise text I have to calculate a signal in the frequency domain. I found out that I could use a the folding rule for time-discrete LTI systems and have to calculate:

$$Y(e^{j\omega}) = \int_0^{2\pi}{X(e^{j\alpha})*X(e^{j\alpha+\omega})\frac{d\alpha}{2\pi}}$$

$$X(e^{j\omega}) = \sqrt{2}\sum_{-\infty}^\infty rect(\frac{\omega + 2\pi k}{\pi/2})$$

The result should be \$1-\frac{|\omega|}{\pi}\$. But why?


texts: I am a beginner at electronics and recently, I was learning op-amps. I approached to making a battery full charge circuit using LM311. But the problem is, I do not know which pins of the LM311 are connected where. Anybody would prepare a simple circuit for breadboard? The circuit for the IC, not the op-amp.


texts: BLDC motor/PMSM parameters at reduced operating voltage

texts:
I was thinking about nameplate parameters of BLDC motors/PMSM and wondered what happens to those values if I operate the motor at a lower voltage as rated.

Are my following conclusions correct?

If one reduces the voltage to the half of the nameplate value, Mr. Ohm tells us that the starting current is also halved. So I expect the starting torque to be halved as well. The same can be expected for the pull-out torque.
If the voltage is halved I only can reach half of the rated speed without field weakening.
The maximum power output is quartered because the voltage and the current are halved or the maximum speed and torque are halved.

Thanks for your help.


texts: ADS1115 differential measurements - resolution limited to 12 bits instead of 16 bits

texts:
I am trying to read a differential voltage with an ADS1115 (https://www.amazon.fr/gp/product/B07RJT3GHC/) hooked up to a Teensy 4.1.
I am using Adafruit_ADS1015 library (https://github.com/adafruit/Adafruit_ADS1X15) which also supports ADS1115 (but it doesn't look like it was really developed for the latter).
I have two wires, respectively connected to the A0 and A1 inputs of the ADS1115.
I managed to read a voltage which becomes 0 when I short the two wires.
When I let them hanging, the raw values are comprised between  +/- 32,768 = +/- 2^15.
Yet, it looks like all the raw values are multiples of 16 = 2^4 (=3mV) as if my actual resolution was 12 bits and not 16.
How can I use the full 16 bits resolution?
I feel like it may have something to do with the sampling rate but I am not too sure.
Here is my code:
#include <Wire.h>
#include <Adafruit_ADS1015.h>

Adafruit_ADS1115 ads_0(0x48);

void setup(void)
{
  Serial.begin(9600);
  ads_0.begin();
  ads_0.setGain(GAIN_TWOTHIRDS);
}

void loop(void)
{
  int16_t v0;
  float multiplier = 0.1875;
  v0 = ads_0.readADC_Differential_0_1();

  Serial.print(v0); Serial.print(","); Serial.println(v0 * multiplier);

  delay(10);
}

And here are some typical values that I get in the serial.
384,72.00
352,66.00
64,12.00
464,87.00
80,15.00
-64,-12.00
96,18.00
304,57.00
416,78.00
16,3.00
-16,-3.00
160,30.00
496,93.00
64,12.00
-64,-12.00

Thanks a lot for your help!


texts: Behavior of power supply and DC motor for voltage/current combinations?

texts:
Are the below statements correct? Marked in Bold and Italic are my doubts!

Unregulated power supply (Battery?)

If supply current rating > motor current rating --> No problem since motor pulls only required amount of current from supply

If supply current rating < motor current rating --> Heats up or damages supply

If supply voltage > motor voltage --> Damages motor, since current increases more than motor current rating

If supply voltage < motor voltage --> Reduces motor performance (speed and torque both?)

Regulated power supply (Regulated bench power supply)

If supply current rating > motor current rating --> No problem since motor pulls only required amount of current from supply

If supply current rating < motor current rating --> Heats up or damages supply

If supply voltage > motor voltage --> No problem, since supply limits maximum current?

If supply voltage < motor voltage --> Reduces motor performance (affects only speed, since current will be regulated by supply and hence same torque?)


texts:
I am using an LM4875 as a pre-amp for an audio circuit. Schematic here. The intended function is to "condition" audio inputs from different sources so they have the same peak-to-peak voltage when passed to the power amps.

My understanding of the circuit is that it applies a variable inverting gain at AMP1 which is set by the DC volume control. Then it inverts it again with a gain of 1 at AMP2 and powers RL.

It has an input called HP Sense which can be used to turn AMP2 off if HP Sense is driven high. This allows the circuit to ignore RL and instead power headphones instead of a generic speaker.

If I do not plan to use this HP Sense function can I simply use the output of AMP2 and break the AMP1 output connection right after it's junction with AMP2 negative input? Basically, can I use Vo2 and leave Vo1 as a NC?


texts:
I'm having an issue with connecting the industrial pneumatic valve with 2 coils to relays.
EDIT: I have connected it like this in the scheme below. Coils are connected to NO port on the relay, controlled by an Arduino.
Coils are standard MS 22 24VDC 3W.
I have tried controlling one coil at a time, and it switched on and off as it should. Both of them.
But when I connected both coils as on the scheme, there were problems... After one coil was set off there was a clicking sound and it came back on and looped in this cycle.
I measured some voltage on the valve housing when that happened.
Don't really understand what is happening and I would like to get some help.
I have only one idea, to use 2 separate power supplies would that solve the problem? Is there anything else to do?
Rele spec


texts: Questions on some aspects of operational amplifiers

texts:
I am trying to learn the theory of operational amplifiers. I am using books like Millman, Halkias and Boylestead, but I found that these books do not actually tell the following aspects of those devices:

What exactly is an operational amplifier?
What was the idea behind its creation?
What exactly is an opamp composed of? (obviously, it isn't just a triangle which obeys whatsoever equations you write).

What is the simplest answer for those questions?


texts: Multiple 12V devices with one power supply

texts:
On my workbench, I have many 12V devices, each with a small wall wart power supply. I'd like to buy a single, larger, power supply, and build a simple parallel circuit to power them all. I don't want to damage anything. Is there any circuitry necessary, besides wiring? I'm wondering if I would need any type of isolation or noise reduction, and would the voltage fluctuate as I plug and unplug devices?

The devices here are:
4x RAID hard drive, wifi router, 2x fans, LED strip, 7" OLED monitor.  It's about 150W total.

I'm thinking of a power supply like a Meanwell GS-220A12.


texts: Weatherproofed Connector For Outdoor Valve

texts:
To connect an electronic outdoor DC solenoid valve to a timer, I am getting recommendations to use a silicone-filled wire nut OR solder and heat-shrink.  I understand that wire-nuts are simpler for those without a soldering iron, but will heat-shrink technically form a more weatherproof and reliable connection?

https://www.homedepot.com/p/DryConn-Small-Waterproof-Wire-Connectors-Aqua-Orange-20-Pack-62114/202889871


texts: I'm trying to understand pipelining on a 32 bit 5 cycle MIPS chip. If register writes were not performed in the first half of the cycle and reads in the second half, how many additional pipeline bubbles would be caused by data dependencies?


texts:
I find myself constantly trying to recycle old components in my new projects. Yesterday, I needed a demultiplexer so I just took it out from some old phone board...
Demultiplexers cost basically nothing and the one I took out is quite old. So my question is this:

Does it make sense to reuse old components the way I did or is it better to use new ones?


texts: Can a power surge have a different effect on a led driver when floating?

texts:
I have a LED driver which has 3 connections on the AC side , L,N and ground.
In the event of power surge, can there be a difference in effect if the GND connection of the LED driver is floating or not?

for example a led driver like the one below:

http://www.lifud.com/products_detail/productId=84.html

In situations where the enclosure is metal, the GND connection is connected  for safety measures.

But with a plastic enclosure, What is the use of the GND connection?


texts:
I have a question regarding using KCL / KVL to analyse the circuit below to find all currents and voltages.

My question is : When performing KCL at the top centered node, what way should I assume that Iz is flowing? Should I assume Iz is flowing with the arrow (out of the node) that is given in the question, or assume it goes into the node based on the voltage drop of -2V over the series resistor?

What is confusing me is when I work out my Iz current, I get a positive value flowing into the resistor, but that doesn't seem correct with a voltage drop of -2V?

I am happy to post my full solutions if anybody would be happy to check them?

Thanks for any replies.

Thanks for the great answers everyone.

Yeah I think my mistake was assuming they were pure resistors for some reason but now I see how I could actually get negative voltage drops over the 'black boxes'. I think that was what I was struggling with.

Anyway here my solutions for all unknown voltages and currents for the same circuit below:


texts: How to choose the correct resistor to change voltage?

texts:
I want to change voltage given by a little power supply that I have at home stuckd in my desk, to use it as power supply for a little DC motor.

This DC motor need an input of 3.6 volts and give me around 5.4 Watts (1500mAh).

So that power supply gives me an output of 7.62 Volts (measured with voltimeter) and 1500 mAh.

Using Ohms law "R=(V°-V¹)/I", where my itinial voltage is 7.62 and my desired voltage is 3.6, and my current required is the same 1500mAh, so my result is:

R = (7.62 Volts - 3.6 Volts) / 1.5 A = 2.62 Ohms

Then I picked a resistor of 2.6 Ω with 4 bands and 1% tolerance (red, blue, yellow, brown) and used it.

Well, I didn't test on my little motor because I don't want to waste it so I just tried to measure it using my voltimeter without link this to any led o motor and i didn't change voltage at the end. Also I was afraid to trash my motor because when I linked this resistor between positive and negative wires of my power supply it became very hot instantly.

Using this little resistor how can I test this without waste my motor and how do I know if this very resistor can handle this current?


texts: Does resistor choice for I2C with optical isolation depend on voltage or speed?

texts:
I am building two PCBs, one which will house an MCU, WiFi, GPS, and other sensitive stuff. The second one will interface with solar chargers, batteries, and 12VDC loads.

The two boards will connect by I2C running over a short cable (1m or less), and I plan to use optical isolation to protect the more sensitive board, and a P82B96 to buffer.

This application note from NXP is very helpful, but I'm not clear how to properly adapt for my purposes.

My I2C bus is biased at 3.3V, operating at 100 kHz. Thus I require some combination of these two example circuits:

5V bias at 100 kHz:

This diagram represents the speed I need, but since I'm changing from 5V to 3.3V, do I need to adjust the resistor values on the optoisolator? Also, is the choice of transistor affected by voltage?

3.3V bias at 400 kHz:

It seems the simplest solution would be to go with this example. Does the fact that I'll operate the bus at 100 instead of 400 kHz affect the choice of values for the resistors on the optoisolator?

The datasheet for the opotisolator shown (HCPL-060L) includes this figure:

Which seems to indicate that a higher output resistor (\$ R_L \$) will result in longer propagation delay / lower frequency. Does that mean that a higher value would be a better choice for my application?

In short, which of these two examples is the best starting point, and what values do I need to consider changing?


texts:
I have been using the BSS138 level converter circuit for a while now and today it struck me I get how the voltage is stepped up by the FET or the BSS138 when you are applying say 3.3 V on the LV side.

What happens in the FET to reverse that and make it bidirectional?


texts: joining up the USB outputs of a single phone charger to increase/amalgamate current capacity

texts:
Is there any problem with joining up the two USB outputs of a single 5V phone charger to increase/amalgamate the current capacity for several small varying loads?
I have this device:

https://www.amazon.co.uk/gp/product/B075L2QK6R (2 ports, each rated at 2.4A with a total device rating of 4.8A)


texts: Identifying this input feedback topology

texts: I'm confused between whether this is voltage or current mixing. I'm thinking it is current mixing since the input current is subtracted from the source current. But why cant it be voltage since Rb is connected in series with the input loop ?


texts:
#define POKE(addr, val) (*(volatile unsigned int *)(addr) = (val))
#define POKE_AND(addr, val) (*(volatile unsigned int *)(addr) &= (val))
#define POKE_OR(addr, val) (*(volatile unsigned int *)(addr) |= (val))

I dont understand what does it mean

POKE(addr, val) (*(volatile unsigned int *)(addr) = (val))
POKE_AND(addr, val) (*(volatile unsigned int *)(addr) &= (val))
POKE_OR(addr, val) (*(volatile unsigned int *)(addr) |= (val))

for example when i call function

ulVal  = PEEK(NETX_IO_CFG);

where NETX_IO_CFG

#define NETX_IO_CFG     0x00100004U


texts: How can an ISP program an AVR over SPI if there is no code on the device?

texts:
I am trying to understand how an ISP can write machine code into a microcontroller's memory.

In the case of AVR microcontrollers (such as the ATMega), you can use a special in-circuit programmer that will "engage" the target microcontroller over an SPI bus. (I am getting this information from this document)

What I'm wondering is this: if I had a fresh AVR with no prior programs written to it, how could it possibly "listen" to the SPI bus? Doesn't there need to be a program running?


texts: Advice for a Solar Charger and Battery Project

texts:
I am a high school robotics teacher (no formal engineering training) and I am taking a group of students to Kenya this summer to work with high school students there.  The organization we are travelling with has asked us to help out with a side project at a small rural village that has no electrical power grid.  They have said that most of the households have no lights in their homes but they all have cell phones.  The problem is that along the equator days and nights are essentially 12 hours each all year long.  This makes it difficult for students to study at night and for parents to work much after sunset.  In addition, only a few individuals have the ability to charge phones which means others must wait in line for charging.

The proposed solution is a solar system for individual homes.  I am trying to design something to test with the idea that the more we can purchase with the funds we have will mean we can help more families.  Here is what I have so far.

We are assuming that the system will have an LED light which needs 10.5 W and a USB port which needs 18W.  I have drawn up a simple schematic for everything but the USB.  I am not sure where the USB would go.  I am thinking between the LED and the battery.  I am also wondering if this product would work.

I am also trying to calculate battery requirements.  I have used the following formula to estimate storage capacity:

What am I missing with these estimates?  Once I have this figured out, how do I calculate the minimum power requirements for the solar panels?


texts:
this is my first post so please excuse me for incomplete or improper text.

I am developing an interface board to connect ‘Converter control unit’ to HIL system. For this purpose I need to level shift 25 channels from 24V to 3.3V . The problem is that I am not allowed to use optocouplers and implementing 25 voltage dividers is a troublesome task. Using a multiplexer is also out of option because we are using all the channels since its real-time simulation. So I was looking for 8-channel level shifting IC but couldn’t find any. Please suggest me the possible alternatives or other methods to get this working.

Thank you.


texts: Good solution for TPS54202 input filter design?

texts:
I trying to make tps54202 switch regulator for esp32-wroom which would pass EMC test.
 https://www.ti.com/tool/TIDA-00948
By reading guidelines of designing they say that to pass EMC test you need to add small filter L+C of 5uH and 10uF. However they dont provide this filter layout, schematic or BOM. I can figure out schematics and pcb layout, but not BOM for input filter, as there are many complicated formulas to calculate esr value, resistance, etc...
Anyone could reccomend me BOM for input filter?


texts: USB Full Speed 1.5K Pullup Resistor Placement

texts: I am designing a USB full speed board around the STM103XX MCU and was wondering how to physically position the 1.5K pullup resistor on D+. Should it be next to the MCU or close to the receptacle or what? Does it even make a difference? I have attached a snapshot of the layout below. Thank you.


texts:
I am building an RC airplane, for which I have also created a battery pack. What kind of charger do I need to power up the simple line-up of:
6 x AAA, 1.2v, 800mah per battery. (Everything is lined up in serie, non-parallel)
The batteries I have ordered are NiMH, I don't know if it matters.

What should I take into account with buying a charger? Help is very much appreciated!


texts:
Has anyone got an ideas about how these guys made this system?

http://www.youtube.com/watch?v=mlyVThcNRE4

I think they are using a 555 timer to power the laser at 1kHz. But then I don't know how they are using the bandpass filter and the solar cell.

I'm asking as I am involved with a similar project but I have no experience in electrical bandpass filters.


texts: How to reduce thermal resistor noise in filter circuit?

texts:
I'm taking some measurements from a bio-sensor (using an INA) that operates on the a few to \$100\ \mu V\$ scale. Because of 50/60 Hz EMI, I plan to apply a notch filter (NF) of the Twin-T or the Fliege type. However, both these filters are quite sensitive on the component values, so to obtain the Q I need, I'm to be obliged to use (at least) 1-2 resistors in the \$1-4 \ M\Omega\$ range.

The thermal noise for these, as given by:\$V_n = \sqrt{4 k_B T\ R\ \Delta f}\$, then become of the order of >1 μV, which is already at the lower range of my measurements.

Is there a way to reduce/cancel thermal noise without reducing R or T?
Does the noise depend on the type or material of the resistors used?
How does the thermal noise spectrum look at frequencies: 0-300 Hz?

UPDATE: 2019-05-15

An very interesting and related question is actually about how to increase this noise. See:

Generating thermal noise from a resistor
Opamp noise: When is a resistor in the signal path?

An interesting solution was proposing to just leave out the filter altogether and just use digital signal processing to do the filtering. However, I feel this goes against my philosophy of always reducing noise as close to the source as possible. In addition it would created bloated raw signal data, which would take more space to save, if needed.

UPDATE-2:

I'm not using a DRL. Because it would look something like this:

Photo credit: Wikipedia


texts: Play audio from raspberry pi through my car's disc changer

texts:
I'm interested in trying to buy a raspberry pi and create a small bluetooth / airplay type module that I can plug into my car somehow and get wireless audio streaming.

I don't necessarily care about getting steering wheel controls, I really only care about audio at this point, plus I know there are some solutions that I can purchase other parts with to get that done, those are a little too expensive for me right now an I just want to get something a little more simple to get me started with raspberry pi.

My first thought is to either tap the CD changer cable somehow to pipe the audio into the system or take the disc changer out all together and plug straight into the existing port.

I have been looking for a connector that would let me do the latter but I have not found anything so far so I'm thinking the first option may be the way to go here but I'm not really finding much on this subject either.

Are there any tutorials or write ups that talk about patching into an existing CD changer or something similar with raspberry pi or something of that sort that I can be pointed to. I'm sure if I see the basic workings of getting the audio in it's just a matter of my imagination going to town on getting my phone to connect to the raspberry pi (which seems easy enough given all the numerous tuts I have found on that subject).


texts: Use USB-C cable as multiples regular copper wires

texts:
Could it be possible to use a USB-C Cable to USB-C Cable with both end controlled by me, just for use as simple copper wires, without negotiation, etc... Because i would not be using the USB protocol.

I ask this question because i saw that a lot of usb-c cables have a chip inside them for negotiating, and a e-marker.
And also, are the ground cables connected together, and the vcc ones ? Because that would be problematic if we want to connect them independently

So do you think it would be possible with any usb-c cable, so including ones with a chip inside it ?


texts: Default value of W/L of nmos in LTSpice IV

texts: I am using LTSpice IV. I would like to know the default parameter values of nmos and pmos . We can pick a mosfet model in which other parameters are present(eg: IRLML2346 etc) but the valu of W/L is not given. Can anybody suggest me a way to know this.


texts: How to increase the power of the motor control controller?

texts:
There is an electric scooter, you need to increase the power by at least 10%, because with my light weight, it stops already when you raise 10 degrees. And I'm sure this is not the maximum that he is capable of. I enclose a photo of the motor, battery and controller. What are the options? I know how to solder a little.

Scooter Fitfiu Flying - made in Spain. Battery SAMSUNG 36V 4.4Ah.
Guys, I draw your attention to the fact that the question sounds HOW, but not "is it possible", and is it "safe". Thanks!


texts: Resistor or low impedance path between common ground point and mains earth?

texts:
A simple EPA (ESD Protected Area) consists of 3 things:

wrist strap
antistatic mat
common point ground

Wrist strap and antistatic mat both should grounded to the common point ground.
ANSI/ESD S6.1 recommends a non-resistor ground cord [...] to ground worksurfaces. However, the cord may have a 1 megohm resistor for
non ESD purposes.
You might think: just put a resistor between Common Ground and mains earth...
ANSI/ESD S6.1, section 6.4.2 recommends: The resistance [...] from the common point ground to the AC equipment ground shall not be greater than 1 ohm.
Both plans below don't follow ANSI/ESD S6.1, because i think the path between antistatic mat and mains earth should NOT be a low impedance path.
And if there should be a resistor between an dissipative surface (like an antistatic mat) and mains earth for user safety, then there should be a resistor between a conductive surface (unpainted inside of a PC case) and mains earth too.

In theory, is one plan more preferable over the other?

Plan A
Plan B The yellow marked resistors are inside the grounding plug.


texts: How to turn on LED with only a cathode pin

texts:
I'm looking at the datasheet for some TIL311 hexadecimal displays which I ordered (but have not yet arrived. (Actually they appear to be TIL311 clones, but should be compatible.))

According to the datasheet, the left and right decimal point LEDs have their cathodes exposed via pins 4 and 10. The anodes are not connected to a pin; I assume they are hardwired to Vcc within the IC.

I want to turn the decimal point ON when I have +5v on a certain wire.

Am I correct in thinking that the right way to do this would be to use a discrete transistor to allow current to flow from the cathode to ground when it (the transistor) turns on? If so, what's a good kind of transistor to use?

Or is there a simpler way that I haven't thought of?


texts:
I have to build a sensor network which communicates over a single RS485 bus. The network could have tens of nodes. The problem is that I have to control access to the shared bus and find a way to address each node, similar to TCP/IP. Each sensor (when it is triggered) can send data asynchronously to the server.

Is there a protocol available for a RS485 network? If so, is it free?
The protocol would be implemented in a microcontroller.

Can I use a controller with TCP/IP stack?

Has anybody designed such a network? I am curious if my approach is correct in order to know if it's OK to continue on this path or if I have to switch to a different techology.


texts:
Documentations indicates a maximum number of read/write of 100 000 cycles for some passive NFC tags (for ex NTAG215, NTAG216, ...)
Does this limitation apply if I only read the UID without any writes / other data reads ?


texts: How is this load able to perform any useful work other than heating?

texts:
Consider a voltage source with some internal resistance, in series with a load. It turns out that the voltage source produces a power equal to \$I^2R_\text{total}\$ (this can be seen by using P=IV and Ohm's law). So far so good.

However this power is also equal to the power dissipated in the whole circuit (I guess this is wrong but I don't see how). Indeed, the power source dissipates \$I^2R_\text{source}\$ while the load dissipates \$I^2R_\text{load}\$ because its impedance is \$R_\text{load}\$. This means there is no energy left for the load to do anything, as \$ R_\text{total}=R_\text{source}+R_\text{load}\$. Obviously this cannot be correct. For example it should be possible to charge up a capacitor if the load was a complicated circuit containing a capacitor. But from the above reasoning, there is no more energy than the one used as Joule heat both in the voltage source and in the load itself.

Can someone point me where the reasoning is wrong and why it is wrong?


texts: Missing Code - Different DNL definitions

texts:
According to IEEE Standard 1241-2010 for Terminology and
Test Methods for Analog-to-Digital Converters you have a missing code if the following inequation is true (page 44):

\$ DNL[k] \leq -0.9 \$

But according to the book: Analog-to-Digital Conversion by Pelgrom(Second Edition) you have got a missing code when DNL = -1.

From my point of understanding the second definition should be the right one because once a step has got twice the size of a normal LSB, a code is missing.

So here is my question:

Which one of these two definitions is the right one or are both valid?


texts:
In the case of galvanically isolated AC to DC converters, a controller IC is used to regulate the output voltage of the converter.

The feedback pin is fed a signal from an optoisolator driven by the voltage on the output side of the converter.

Does this optoisolator provide a binary or analog signal to the feedback pin? I am confused as to how the feedback pin senses the output voltage using an optoisolator.

The data sheet I was looking at https://www.fairchildsemi.com/datasheets/FS/FSCQ0765RT.pdf

Thank you


texts: Understanding resistance in open and short circuits

texts:
I am continuing to try to learn a little about Electronics and I came across the following problem for which I am not sure I completely understand the calculations.  In other parts of the book, they showed the calculations, but for this question they did not.

Image source:  pp. 69, Practical Electronics for Inventors (3rd Edition), Scherz and Monk, Tab Books, 2013

For the circuit 2.61a, my calculations were:

$$
I = \frac{12V}{\left( \frac{1}{\frac{1}{10} + \frac{1}{10} + \frac{1}{10}}\Omega + 0.2\Omega \right)} = 3.396
$$

For circuit 2.61b I used:

$$
I = \frac{12V}{\left( \frac{1}{\frac{1}{10} + \frac{1}{10} }\Omega + 0.2\Omega \right)} = 2.3
$$

But I can't figure out how the book arrived at 6A for circuit 2.61c.  What effect does the short circuit across the third resistor have on the parallel resistance?  Does it completely eliminate any resistance so that the equation becomes:

$$
I = \frac{12V}{2.0\Omega} = 6.0
$$

And what is the significance of \$\infty\$ on the third resistor in 2.61b?


texts: I think I haven't understood how the parasitic diode works in a n-type MOSFET with the bulk shorted to the source. What happens if Vds < 0 and Vgs > Vth?


texts:
The following circuit is a comparator, which compares input square signal at non-inverting pin with fixed reference voltage at inverting pin of integrated comparator circuit LM393 (\$R\$ is collector resistor since this comparator has open collector). If \$V_{IN}>V_{REF}\$ then \$V_{OUT}=V_{CC}\$. If \$V_{IN}<V_{REF}\$ then \$V_{OUT}=0V\$.

simulate this circuit – Schematic created using CircuitLab

As I built this circuit on breadboard I noticed that \$V_{IN}\$ has to differ at least few 100 mV in order for comparator to switch between \$V_{CC}\$ and 0V. However such behavior is undesired since input square signal's amplitude varies only few 10 mV between HIGH and LOW states. So I set \$V_{REF}\$ in the middle between two input voltage states, but comparator didn't change its output.

But shouldn't the comparator change its output even for slight voltage difference between two inputs? According to equation, which applies for differential structure amplifying devices such as comparator and operational amplifier, my statement is correct. This equation goes as follows:

$$ V_{OUT}=A_{OL}(V_+-V_-) $$
$$ V_{OUT}=A_{OL}(V_{REF}-V_{IN}) $$

Also, if I would design a simple differential structure amplifier with discrete components, which would most probably have much smaller open-loop gain and other deficiencies, a slight voltage difference between two inputs would result in much greater voltage difference at its output.

NOTE: I also tried replacing this integrated comparator circuit with operational amplifiers TL072 and LM358, where both of them indicate similar behavior.

Any ideas if this behavior is normal to all operational amplifiers and comparators? How else could I compare input signal, which varies only for few 10 mV if not this way?


texts: Low Entropy derivation of Transfer Functions with OP AMPS

texts:
I was recently low entropy equations of passive filters, and came across the Extra Element Theorem and all of its uses.

I was wondering if the there is something similar for OP AMP circuits/ Active Filter Circuits?


texts:
Short and simple - I want to understand the relationship between RPM (specifically on a motorcycle crankshaft) and AC stator current. In most motorcycles there is a magnetic field generated at the stator (of varying design) which I am hoping to prove generates a current that proportionally increases with the speed of rotation at the magnetic field (ie the crankshaft, as there is often a flywheel with magnets attached).

I have read this article:

What is the relation between the stator current and motor rpm for an AC motor?

But am still a little confused.


texts: A sensor for jaw/mouth movements in a mask

texts:
The mask I'm trying to build will display different lighting patterns. The overall goal is to synchronize these patterns with a musical/dance performance, so there were two options: either hard-code the sequence in the microcontroller or equip the mask with one or two sensors so the change of patterns can be triggered by the wearer.

I decided to "explore" the second  option first. Tracking jaw movements (how open the mouth is) and maybe the cheeks  (or lips) might make it follow the speech organically. Would a Flex sensor be a good idea  for  sensing (vertical) jaw movements? Note that it is supposed to be a  cloth  mask, so thats why I'd like to avoid making a hinge and equipping it with a potentiometer for precise angle tracking.

What could  I  do  about tracking the cheeck/lip movent? I need only a couple of states, nothing precise. A  strain  sensor, perhaps?

I hope I was able to convey my question, if not please let me know

EDIT: I apologize, but I omitted  the fact that it is supposed to be a portable, real-time system.


texts: Why a close conductor does not propagate electromagnetic signal

texts:
Here is the following video that i saw (really great video):

https://www.youtube.com/watch?v=ZaXm6wau-jc

Nevertheless, I do not understand why a close conductor (first part of the video) can not propagate a electromagnetic field when we applied on it a sinuisodal signal. Actually, I know that according to the ampere's law an alternating current in a wire induce a fluctuating magnetic field around the wire and vice versa. Finally, according to the Maxwell's equations, if we have a fluctuating magnetic field, we have an electric field, and if we have an electric field we have a magnetic field and so on, so why it doesn't propagate ???

Thank you very much !


texts: Lithium-ion batteries explosion risks and storage/usage rules

texts:
I've recently read several articles about Li-ion batteries and found that all of them lack of integrity. So I thought, it would be a good idea to make a post here to gather all the information found on the internet in one place, so users of modern gadgets can use it like a full-and-supplementable guide.
From what I've found.
1.Usage and charging:
 - It is free to charge the Li-ion battery whenever you want, as it has no memory-effect compared to Ni-MH ones.
 - It is a good practice to not let your device discharge to levels less than 20% and avoid deep discharges
 - Do not overcharge battery and don't charge it with very high currents. (If you use proper charging adapter, the electronics will do everything for you, so as user you have nothing to worry about here. It is also safe to charge your gadget designed to charge with 5V/1A using 5V/2A as well, because build-in electronics will cut the excessive currents, just be sure the voltage fits.)
 - When used on cold temperatures (below 5°C/41°F) battery will discharge in faster and charge in slower rates, so avoid this, if possible.
2.Explosions danger. Li-ion battery can explode in several cases:
 - Overheating. Avoid heavy usage on high temperatures
 - Physical damage. Avoid using damaged batteries.
 - Manufacturing defect. Nothing we can do here, unfortunately.
3.Storage rules
 - Best condition is to store Li-ion batteries at a charge level of about 40% in a dry cool place. They have a self-discharging effect, so in best case during long storage it is good practice to recharge them for that amount.

Now 3 of my questions:
1. Did I forget smth? Any additions will be much appreciated.
2. I rly wonder if a properly stored battery can explode by itself in certain circumstances?
3. Is it safe to store old deeply discharged batteries at home, or there is a risk of accidental explosion and they should be re-cycled as soon as possible.

p.s. sorry for the long post but I hope, I am doing good things now.


texts: Convert a 40 pin female 2.54mm pitch header to screw terminal blocks

texts:
I have the following board and I need to convert the 2 row 40 pin female header to screw terminal blocks. The pitch is 2.54 mm both horizontally and vertically. I've looked at ones such as this https://www.sparkfun.com/products/10571, but I was wondering if there was a 2 row solution somewhere out there?

I've been searching for a couple of days and any pointers would be helpful. Here's the board:


texts: measuring low-value capacitors with Arduino/Atmel

texts:
I recently bought a kit at Sparkfun to measure capacitors. (Which is actually this.)
It works well and accurately measures very tiny capacitors, but the firmware is not open source and I would like to incorporate its functionality into an Atmega168 that is doing a number of other things (but not displaying a readout on an LED, as this one does).  The kit uses an Atmega48.

I tried Chris Stratton's alpha of a possible open source replacement firmware:
http://github.com/cstratton/atmega_capmeter
but it seems to just hang with a display of 00.0P after briefly showing a display of "3210."
I'm curious if anyone knows the algorithm the jyetech kit uses;
it clearly isn't the one discussed here:
http://arduino.cc/en/Tutorial/CapacitanceMeter
because that technique fails for low value capacitors. (I tried it using large-value resistors, but it detected no capacitance with capacitors less than about 0.01 microfarad.)
I'm using this technique to measure changing levels of a diesel dielectric in a special capacitor designed to measure fuel levels, and for this to work I need a very accurate measurement of low-value capacitance.

I should mention that I've also tried to measure fuel levels with IR and Ultrasonic rangefinders, and they are too inaccurate for my application.


texts: Logic Level MOSFET Behaving Unexpectedly Driving PWM Signal to PSU

texts:
I am trying to control a MeanWell dimmable PSU with an Arduino. Since I do not want to exceed 60% of the output of the MeanWell, I want to use a 0 to 6V PWM signal. I figured a quick and dirty way to do this would be to use a logic-level MOSFET. As the title suggests, I ran into some unexpected behavior when probing my circuit with a multimeter. In the circuit diagram, all the COMM grounds are connected. Here are my observations:

The voltage between G and S on the MOSFET varied between 0 and 5V, as
expected.
The voltage between D and S varied between 0 and 0.1V. I was
expecting 0 to 6V.
The load across the MeanWell leads varied between 5.9 and 6V. Again,
I expected 0 to 6V.
When not using the MOSFET, and applying 0 to 5V PWM to control the
MeanWell PSU, it worked as expected. The MeanWell would output 50%
power to its load when the 5V PWM was applied at full duty cycle.

I have a feeling that, for whatever reason, the MOSFET is creating a 0.1V voltage drop on the 6V path instead of opening/closing the path. However, I don't know why. I thought the MOSFET would cycle between very high (almost open circuit) resistance and very low resistance based on the PWM input on the gate.

Am I doing something silly with this circuit? What gives?


texts: Input/output characteristics of opamp circuits involving diodes (fast peak detector and sine-to-block wave converter)

texts:
I have these relatively simple circuits of which I need to find the transfer functions. Both circuits involve the use of an OpAmp and a diode after the output of the OpAmp. As an input I have a regular sine wave.

Finding the input/output characteristics of a simple inverting amplifier or passive filter is easy, but I get stuck when trying to find the transfer functions for these circuits:

simulate this circuit – Schematic created using CircuitLab

The first circuit (with output \$V_{out1}\$) is a peak detector circuit. The capacitor holds the output voltage, while the resistor is there for slowly discharging the capacitor.
The second circuit (with output \$V_{out2}\$) is a 0 Volt comparator for turning the sine wave into a square wave. I put a diode after the output to only allow positive voltages. The resistor to ground is to reduce the output voltage.

My question is: How can I find the input/output characteristics of these circuits (\$V_{out1} = ... * V_{in}\$ and \$V_{out2} = ... * V_{in}\$)?


texts:
I want to create a backup system for my WiFi router (photo). I've purchased a solar panel (12V, 80W) and a battery (12V, 30Ah).  How long should my router last with a full battery?

Is it possible that with a 30Ah battery my router will last for 5 hours?


texts: Voltage regulation with a constant power

texts: I have a 12 V supply which has a 200 mA current. How can I get an output voltage of 5 V with an output current of 450 mA from the given supply so that the input and output powers are almost equal considering the conversion losses?


texts: Current transducer - understanding of turns ratio connection

texts:
I'm using a LEM LAH 25-NP current sensor and I don't understand the recommended PCB connections in the table from the datasheet. I understand the first one, but what is with the second and third? What are the input and output pins?

So if there is a trace, I split the trace and put the sensor between the two traces to measure the current. How do I connect the pins with the traces? For 2 primary turns, do I use pins 2,3,6 as IN and pins 4 and 5 as OUT?

And what is with 3 primary turns? Are the input pins 2,6 and the output pins 3,5?


texts: Use LMT86 temperature sensor with MCP3008 ADC

texts:
I'm currently working on a small project using LMT86 and MCP3008 as a temperature sensor for Raspberry Pi.
The schematic is very simple:

So a couple of questions that I have:

The MCP3008 datasheet, "6.4 Layout Considerations" mentioned that  The 3.3V power comes from the Raspberry Pi GPIO 3V3 pin. Is it necessary to use C1 to filter any potential noises? Or Raspberry Pi could guarantee that the 3V3 pin is noise-free?

The LMT86 datasheet, "8.4.3 Capacitive Loads" states that

Without any precautions, the LMT86 can drive a capacitive load less than or equal to 1100 pF as shown in Figure 11.

And since the MCP3008 sample capacitor is only 20pF (page4), it should be okay without using a resistor between the LMT86 OUT and MCP3008 CH0. Did I read it correctly?

Regarding C2, 9.2.1.1 Design Requirements said that

When the ADC charges the sampling cap, it requires instantaneous charge from the output of the analog source such as the LMT86 temperature sensor and many op amps. This requirement is easily accommodated by the addition of a capacitor, CFILTER.

And page3 said the "Analog Input Sample Time" is 1.5 clock, and page4 said the maximum "Clock Frequency" is 1.35MHz.  Using a formula found here: (R_on + R_out) * C_sample < 1 / resolution * T_sample, where:

R_on = 1000Ω (page4, "Switch Resistance"),
C_sample = 20pF (page4, "Sample Capacitor"),
resolution = 10bit,
T_sample = 1 / 1.35MHz (the actual SPI clock is only 0.1MHz with the adafruit_blinka driver),
Although I didn't find the correct number of R_out, by testing I knew that LMT86 OUT pin generally has about 1~2V in my use case, and the max output current is 7mA (page5), so I guess R_out is a couple of hundred to one kilo ohms. Take R_out = 1kΩ

then (R_on + R_out) * C_sample = (1000 + 1000) * 20e-12 = 4e-8, and 1 / 100 * T_sample = 0.1 * 1.35e-6 = 13.5e-8, so the formula holds even with the maximum clock frequency MCP3008 supports.
So my question is, does this mean C2 is unnecessary?
My tests showed that using or not using C2 yields the same result.


texts:
I am a musician and we are taking our show to the streets, away from wall sockets.  For this, we will be using a 300W inverter that I have lying around,  with a car battery of some size {?}

We have:

two AER C60 amps  60 W at 230V
a mixer that says it takes 23W at 230V, and
two 12V 300mA  (3,6 W each) wireless receivers that we use to run 2 voices, guitar and fiddle.

at 230 V  we have 2x 60 W=120  23W + 7,2 W = 150, 2W Maximum power. I am a layman, but surely the amps would not be taking 60W all the time?

My question is: What size of battery do I need to run this at half volume for 5 hours?

Thanks very much for your thoughts


texts:
I read statements like ‘An LED has a fixed voltage drop regardless of the current running through it’, but looking at the following examples (using arbitrary numbers), can someone confirm that the following are true/correct -

If I had a 12V battery, 500 Ohm resistor and an LED with a forward voltage of 2V, the current in the circuit would be 20mA ((12 – 2)/500). The current-voltage curve of an LED shows a small increase in current would equal a tiny increase in forwarding voltage, so for example if I wanted the current to be 40mA, the LED would have a tiny increase in voltage drop?
If I had a 3V battery, no resistor and an LED with a forwarding voltage of 2V, what happens? KVL states that the total voltage drop of the circuit must equal the power source. So in simplistic terms, does the battery just pump out as much current until the LED is forwarding 3V, and the current of the circuit is whatever the current-voltage curve of the LED says is at 3V?
If both of the above are true, then is the statement regarding LEDs having a fixed voltage drop, is it more correct to say that an LED has roughly a fixed voltage drop when a similar amount of current is running through it?
…and finally, and this may never happen or even be possible, for example a 20V battery and just an LED, apart from the LED disintegrating, would it ever be possible for the power supply to not be able to supply enough current so that the LED can reach a voltage drop of 20V, and therefore breaking KVL, what happens in that situation?

I am fairly new to this stuff, and not looking for a too technical explanation, but really just a confirmation of the above questions, and if they are wrong a simple explanation as to why that is.

Thanks.


texts: 74LS161 in program counter circuit jumps clock cycles

texts:
I have recently been working on an 8-bit computer (Ben Eater-YouTube) and I have run into a very significant problem. My program counter seems to not work. When pulsing through a command I see that it counts on both the rise and fall of the clock.

Is there a way to fix this or is this just a faulty IC?

The circuit is described in detail in the following video. Program counter build  Could this possibly be due to not enough current driving the control line? If so, how would this be fixed, with a buffer or something of the sorts?


texts: I'm interested in learning how antennas work and why they are required to be a particular length in order to receive/transmit. I've learned that the length is choose to be a quarter wavelength of the expected frequency. Is this a strict rule? What if the antenna is slightly shorter, or what if its any length longer than a quarter wavelength? Is there an easy way to visualize whats occurring when the length is longer/shorter than this? Oh, also this this requirement the same for both the receiver & transmitter? Do they need to be oriented/aligned (the receiver with respect to the transmitter)?


texts: Impedance Matching and Reflection Coefficient

texts:
Consider a real signal generator (Voltage Source Vs, output impedance Zs, reflection coefficient Γs) and a load Zl with reflection coefficient Γl.

I was told that we have maximum power transfer when there is the conjugate matching Zs = Zl*. But I read also that the power matching realizes when Γl = Γs*. What does it mean?

In circuits designing, is it important to satisfy the first or the second equation?


texts: Why do I read resistance on the continuity setting but not on the resistance setting?

texts:
Disclaimer: Newbe

A multimeter tutorial on Youtube said that to test my washing machine inlet valve solenoid for continuity I can use either the lowest ohms setting (200 on my DT830B) or the continuity setting. If I try the ohms setting the digital readout does not move from 1. If I try the continuity setting it goes to 12.2 on my original part but 12.02 on my new replacement part.

Why doesn't using the ohms setting work when the continuity setting does?


texts: Three phase converter - capacitor switching

texts:
I've started building a single to three phase converter. My research started with the likes of this paper. I've set a bank of 40uf/440v capacitors up and a potential relay. The relay is a Supco SUPR. That relay was ditched early on. Even though it was rated for a 5hp motor, and I'm using a 3hp, the contacts on the relay would often weld together and the starter caps weren't taken out of the circuit. The Supco got bad reviews about this. Also I found that the capacitors really should be switched as the load demands. I'd just gotten an old lathe, so two tools in the shop are three phase. And yes, I know a modern solution is to use a VFD. But that means I'd need one of these for each piece of machinery. I'd have to hack if it required a 3 phase input. And they are rather pricey. I would rather have an old school 3 phase bus that everything can run from.

I have searched and I can not find an application of switching capacitors with triacs for a phase converter. But it just makes sense to me to do so rather than using relays. So what I'm imagining from here is to switch each capacitor as demand requires. I've already done some testing with this mess. I still plan on keeping a 3hp motor without a load on the buss to aid in the rotary conversion so this is not just a capacitor converter.

And it looks very doable. When I started I mistakenly started using an MOC3010. I thought I had a zero crossing isolator on the shelf and didn't check the spec. That through me for a loop as I started switching capacitors with large potentials at the terminals. Well of course I destroyed a couple of triacs. Using a 2.7 ohm 25 watt surge resistor in series with the triac I was able to keep testing until the MOC3041 come in the mail. I have no experience working with high current, low frequency, phase shifting. Right now I know enough to be dangerous.

So, after that long winded introduction, my question. Using a microprocessor that can read voltages and switch triacs, what would be the most appropriate software method to keep phase and current demand as ideal as possible. Am I on the right track? I can do fine with the micro when I have an objective.

Lot of information on phase converters.

And it looks like this is what I'm trying to build.

Update:

The lathe, a Sheldon 15, has a two speed motor. 5hp@3600rpm and 2.5hp@1800rpm. The mill has a 2hp motor. The idler motor is 3hp. I've just recently upgraded the mill to LinuxCNC over ethernet. My main is 200 amp. I'll run from a 50 amp, that should be more than enough.

Update 2:
I know I could just buy a rotary phase converter over the counter. In fact, I already have it. All I would have to do is get a better potential relay to finish this off. I've run the lathe, both speeds, on what I have so far. In fact, I've started the idler by hand with the triac. What I'm looking for is a better mouse trap for me and others that would want to go there. Like I did this a couple of weeks ago.


texts: Clearance distance in a PCB with an insulated barrier

texts:
In the image shown below,
why is the distance marked with "??" not considered for clearance? Is there a slot under that barrier, or does the barrier pass through the PCB?


texts:
Motor that I took from electric fan doesn't turn, just makes buzzing noise. I had two fans, took motor from one and when I saw it doesn't work, I opened second one to check if I made something wrong. The moment I opened second one, it stopped working and now produces same buzzing noise.

What can be cause, capacitor from picture or something mechanical ?

Second motor I didn't open, just unscrewed marked screws (two are visible, and two more are on the other side), moved stator a little bit (1 cm) and put it back (that's why I think it can be something mechanical - maybe it needs good precision for creating magnetic field ?)

Opened motor is first one, to show what type it is.

First (disassembled one) and capacitor :

Second motor (mounted) :


texts: What connector is this on the Eachine E160 flight control board?

texts:
I'm trying to find the exact type of this 3-pin clippy connector - I need another one to connect the SBUS signal to the board:

Measures:

Pitch: ~1mm
Total width: ~6mm
Total height: ~3mm

I've been browsing the JST website and some types are close but not an exact match IMHO.


texts: Oscilloscope for SFP+ Host Board Compliance testing

texts:
What major criteria should I consider when buying an oscilloscope to test compliance for an SFP+ host board?
Examples would be helpful as well.

I am looking for a high-end product since this is for a company, but I'd like to know the minimum requirements as well.

(I have seen a lot of articles online but one way or another they lead to advertising a certain product. I would appreciate unbiased information to mainly understand the big picture of what I should look for.)

Updates:
This is to measure Total jitter, voltage range, Crosstalk rise/fall time, DDPWS(Data Dependent Pulse Width Shrinkage), Eye mask hit ratio
More info: 10GE Ethernet will be used. Transceiver max data rate is 10.3125 Gb/s with min rise time 34ps.
All measurements are for the electrical interface.


texts: Transimpedance amplifier transient voltage issue

texts:
We have below transimpedance amplifier, I have below issues, would like to know if this is even fixable or could be reduced:

When a large load turn on in main power supply of TLE2426 turns on cause output to change.(I have Dedicated LDO before TLE2426)
Due to 10uF feedback capacitor it take 20s to output recover to original state.

I would like to know how I can reduce spike or reduce spike duration without changing the 10uF, since if I reduce the capacitor the output will be noisy.

simulate this circuit – Schematic created using CircuitLab
Show spike due turning on the load

Zoom in on of spikes showing how long it take to settle

Layout
Please let me know if you need any other information. [u35:LTC1461, U7: TLE2426,U13: MCP6V01, U9: ADC]


texts: Need help calculating resistors for a modular model particle accelerator

texts:
I foolishly took on a complicated school project of making a model particle accelerator. The idea was to make it a modular system, as in each segment, or "accelerator module" would be independent so the final arrangement could be altered at any time.
The "particles" would be steel marbles and each segment would be made up of a photo-interrupter and a coil. The sensors would be placed before each coil, that way they would only be on for a short time while the marble was breaking the beam, providing the kinetic energy to get to the next stage, but not leaving the coil on so long the marble would start accelerating in the other direction
I have designed a rough circuit which by my logic should work, but for the life of me I cannot figure out how to calculate the resistors for the transistors or MOSFET. My goal was to keep it simple, not require a microcontroller, and for the segments to be independent of each other.
This is what I came up with;
The inductor represents the coil, it has a resistance of 0.6ohms and an inductance of 1200uH. Each coil will theoretically pull 40A at 24V.

Components (all sourced from Arrow.com):
-The LED and transistor on the far left represent the photo-interrupter, it is an EE-SX1070
-The NPN transistor is a BC337
-The PNP transistor is a BC327
-The N-Channel MOSFET is a SUP40010EL-GE3
Resistors:
-R2 Is to limit the current into the transistor and make sure Vbe will be greater than Vce
-R3 Is to limit the current through the base of the NPN transistor
-R4 Is only there as most examples online had an emitter resistor, it may not be required
-R5 Is to limit the current through the base of the PNP, and into the collector of the NPN
-R6 Is to stop the PNP's base from floating, it may need to be lower to ensure that the NPN has enough collector current
-R7 Is to limit the current into the PNP's emitter, however it might be slowing down the switching speed of the MOSFET
-R8 Is to discharge the MOSFET gate capacitance, thus decreasing turn off time
If I have overlooked anything, done anything wrong, the circuit is flawed or more details are required please let me know as this is my first post. Any and all advice is welcomed.


texts: Atomic operations using extended inline assembler of C32

texts:
I'm trying to write atomic code, in my example below I need to perform simple operation a ^= 1;

    static volatile int a = 0;

   //-- a ^= 1;
   __asm__ __volatile__( "xori    %0,     %0,     1"
         : "=r"(a)
         : "r"(a)
         );

Generated code is not atomic:

9D0014E8  8F828018   LW V0, -32744(GP)
9D0014EC  38420001   XORI V0, V0, 1
9D0014F0  AF828018   SW V0, -32744(GP)

As I see in docs, operations LL and SC provide atomic Read-Modify-Write sequence. How can I make compiler to generate code with LL, SC instead of LW, SW?
I tried to write such code myself:

  static volatile int a = 0;

  __asm__ __volatile__( "ll      $t1,     0(%0)": : "r"(a) );
  __asm__ __volatile__( "xori    $t1,     $t1,     1" );
  __asm__ __volatile__( "sc      $t1,     0(%0)": : "r"(a) );

But this is wrong, result is other than I need:

140:                       __asm__ __volatile__( "ll      $t1,     0(%0)": : "r"(a) );
9D001454  8F828018   LW V0, -32744(GP)    # WRONG! | I need for LL T1, -32744(GP) instead of
9D001458  C0490000   LL T1, 0(V0)         # WRONG! | these two LW, LL instructions
141:                       __asm__ __volatile__( "xori    $t1,     $t1,     1" );
9D00145C  39290001   XORI T1, T1, 1
142:                       __asm__ __volatile__( "sc      $t1,     0(%0)": : "r"(a) );
9D001460  8F828018   LW V0, -32744(GP)    # WRONG! | I need for SC T1, -32744(GP) instead of
9D001464  E0490000   SC T1, 0(V0)         # WRONG! | these two LW, SC instructions

How can I do that?


texts: How can I mount a DS18B20 tempreature sensor to a large heatsink?

texts:
I want to monitor the temperature of a large peltier element's heatsink to control a fan. I think I'm going to use a DS18B20.

The 3 pin TO-92 looks like it's plastic, so I'm already worried about low thermal conductivity.* However, how should I secure this to ensure that the chip has the best thermal conduction? Thermal paste crossed my mind, but it'd be pointless to add that with plastic unless  there is a big gap there.

I haven't picked out a heatsink yet, but there are plenty of them with a fairly large, flat surface that I could attach the sensor to if I needed. However, I can't glue it onto the heatsink because most glue doesn't conduct heat.

*They make thermally conductive plastics that can insulate (electronically), so the point about the plastic might be moot.


texts: How to receive data from RS-422 or RS-232 device in linux

texts: I'm very new in this linux device driver and communication things. If i have to connect this kind of devices with a computer, and receive the data, than how should i start it? should i create a device driver for this device? i am running xenomai patched linux in my system with some rootics framework like orocos and ros, and i would like to interface this range finder with my pc , which i will implement in seperate microcontroller or mini pc latter. But question is where should i start? i know little that i should make a linux device driver for it , but how should and where should i start?


texts:
Hei,

In relation to my other topic for the VBAT cutoff circuit, I have now gotten my hardware back to measure the functionality.

What I have encountered is that the switch-ON is as planned ~2.3V, the transistor kicks the RTC battery to the VBAT pin.

EDIT
This is the schematic I have implemented and made measurements on:
(3.3V is NOT present during the measurement, I only applied Battery voltage)

simulate this circuit – Schematic created using CircuitLab

BUT

When lowering battery voltage, the transistor switches off at 1.6V (around the voltage at which the STMF091 VBAT circuitry is still functional).

CH1 (Yellow) - PMOS Source aka battery voltage - changed on the power supply.

CH2 (Blue) - PMOS Drain, what the STM's VBAT sees.

But I can't figure out, how to fix it, so that the transistor also switches OFF at ~2.3V

I tried to find reasons for such behaviour, so I tried to simulate the capacative load and the switch ON-OFF for the VBAT circuitry (with the transistor model I use on my board).

EDIT
I added the capacative load and a switch to simulate the delay for the switch OFF and the behaviour of the VBAT switch for the 3Meg load.
The values there are gorssly experimental, just to get the values I see on the real measurement.

LINK to the LTSpice simulation file (sorry, couldn't find a way to upload files here, so added external link (can die soon))

Green - Varying source aka battery voltage

Blue - Drain

Red - Load, after the voltage controlled switch.

Cyan - Gate

Could it really be, that as the load current changes (no load, when turning the transistor ON; and there is still load, when trying to cut off the battery) the thresholds are different ?

Any ideas if it is because of that and how would I fix the issue?


texts: MPLABX v4.01 (Linux) cannot find PICKit3

texts:
I just bought a PICKit3 and Linux finds it:

$ lsusb
...

Bus 003 Device 081: ID 04d8:900a Microchip Technology, Inc. PICkit3

But MPLABX doesn't recognize it (see image, the SN-foldout is unavailable). I just re-installed v4.01 but the issue remains. I tried run MPLAB as root to see if it was a permission issue, but the error is for root as well.

I tried MPLABX under Windows, and it recognized the PICKit3 immediately. I am not, however, going to develop things under Windows.

Does the Linux-version of MPLABX require some special configuration? I am running 64-bit Debian 7.3 (according to /etc/debian_version).


texts: Pulse counting affected by oscilloscope probe

texts:
As shown in the block diagram below. I generate a 128KHz clock and a stream of known number of pulses in 10msec (the 10msec timer is implemented in the pulse counter by dividing the 128KHz by 1280) and send them to the pulse counter in the system under test.

The problem is that when I send say 1000 pulses in the 10msec, the counter doesn't count exactly 1000. I keep getting lower counts (982 ~ 998). When I just probe the 128KHz at the shown test point (or touch it with my finger!), the counted number decreases a lot reaching ~400 counts despite the probed 128KHz is clean and had no issues!

Any ideas what's happening here?!

Problem Solved!

The pull up resistor at the optocoupler output is 4K, so the max current from the optocoupler is ~1.2mA which is so small to drive the FPGA input. Replacing the resistor by 400 Ohms solved this issue and counting is now stable when i probe or touch with my finger!

Thank you all for your contribution.


texts:
I have calculated a transfer function for a specific system (a low pass filter):

$$H(j\omega)=\frac{1}{RCj\omega +1}$$

It seems to me that the standard way of plotting the frequency response of the filter is to use a Bode plot. Therefore I want to know how to do that in Matlab.

There is a function bodeplot in Matlab which for instance takes an argument calculated with tf, which in turn takes a numerator and denominator.

I don't actually understand how I should use those functions with my already calculated formula above. Have I already calculated some part which could be done with the above mentioned Matlab functions?

So, how do I make a Bode plot from my transfer function, in Matlab?

Here is my current Matlab plot, which plots the frequency response (but not with dB on the y-scale):

f = 0:100000;
R = 33e3;
C = 220e-12;

w = 2*pi*f;

H_w = 1./(R.*C.*j.*w+1);

xaxis = 0:100000;

figure;
semilogx(xaxis,abs(H_w));


texts:
I'm developing a device that operates with Bluetooth Low Energy (BLE). It has a connection loss problem, where it connects and stays on for a while, but most of the time it connects and then disconnects. There is no time to be able to transfer anything ...
The Bluetooth chip I'm using is RN4870_71 from Microchip. I'm trying to use the Microchip app to connect via Android with the BluetoothLE chip, but I've also tried using other apps with more features.

Has anyone seen this connection drop problem occur and know how to solve it?


texts: Most of the time RS-232 and UART come together in serial communication theories. Are they both the same? From my readings I concluded UART is a hardware form of the RS-232 protocol. Am I correct?


texts: Will it be safe to feed a 74VDC to a 56VDC Audio amplifier

texts:
I have a 400watt rms mono amp and the maximum VDC required by the amp is 56VDC at 7amps, so how much transformer's VAC do I need? If I use a transformer with 56VDC then there will be a voltage drop on load, so the amp will not get enough power and it will not make full power. I have a transformer 53VAC, but after rectifying it, I am getting 74VDC, will it be safe to feed the 74VC no load          to the amp.

Thank you. Regards.


texts: Can solar panel charging slow down the draining of phone battery?

texts:
I have made a solar panel charger, it consists of a 1.2 watt panel connected to a buck converter, then to the phone.

Now, when I connect it, it charges the phone and in the battery settings it shows it is charging as "plugged ac" and slow charging.

I wanted to test if it can slow down the discharge rate, so I came up with a test procedure where I:

Downloaded "battery drainer" app (which essentially turns on cpu stress, gps, vibrator, full brightness etc);
Measure the time it take for the phone to get to 90% from 100% with solar panel attached and without solar panel attached.

But the time it takes to discharge is almost the same. I am wondering what am I missing. Wouldn't the solar charging increase the discharge time?

When I measured the solar panel output it was 5 V and around 110 mA.

Thank you, any help will be appreciated.


texts: VHDL File IO, write to specific line number

texts:
Is there a VHDL function that can write data to a specific line of a text file, without modifying the other lines?

This is for simulation needs, of course.


texts:
I'm programming a pic18f24k50 using Timer0 to trigger an interrupt every 5ms. I'm handling USB interrupts too

Here is the code where I init the timer:

void TMR0_Initialize(void) {
// Set TMR0 to the options selected in the User Interface
TRISCbits.RC6 = 0;
// TMR0ON enabled; T0SE Increment_hi_lo; PSA not_assigned; T0CS FOSC/4; T08BIT 8-bit; T0PS 1:2;
T0CON = 0xD8;
//    T08BIT = 0;

// TMR0H 0;
TMR0H = 0x00;

// TMR0L 156;
TMR0L = 0x9C;

// Load TMR0 value to the 8-bit reload variable
timer0ReloadVal8bit = 156;

// Clear Interrupt flag before enabling the interrupt
INTCONbits.TMR0IF = 0;

// Enabling TMR0 interrupt.
INTCONbits.TMR0IE = 1;

// Start TMR0
TMR0_StartTimer();
}

I'm handling the interrupt here:

#if defined(__XC8)
void interrupt SYS_InterruptHigh(void)
{

if (INTCONbits.TMR0IE == 1 && INTCONbits.TMR0IF == 1) {

    T0CONbits.TMR0ON = 0; //Stop timer0
    // clear the TMR0 interrupt flag
    INTCONbits.TMR0IF = 0;

//        PORTCbits.RC6 = 1;
    LATCbits.LATC6 = 1;

    LED_VerticalSyncIter();

    LATCbits.LATC6 = 0;
//        PORTCbits.RC6 = 0;

    TMR0H = 0x00;
    // TMR0L 156;
    TMR0L = 0x9C;
    T0CONbits.TMR0ON = 1; //Start timer0

    //TMR0_ISR();

 }

#if defined(USB_INTERRUPT)
        USBDeviceTasks();
#endif
}
#endif

I'm using the RC6 pin to do a pulse every time the interrupt is triggered and I'm watching the signal with a logic analyzer. I'm gonna post two images, first one i have the usb connected:

The interrupt triggers twice every 5ms. Must be something related to USB interruptions, cause if I unplug the usb cable, I don't get these pairs of pulses. But don't know what is happening cause I'm checking the Timer0 interrupt flag and reseting it. So it shouldn't make the pulse if the interruption doesn't come from timer 0

Here is the image of what i get if I unplug the usb cable:

The interruption triggers, but sometimes the gap between pulses is 5ms, sometimes 10ms, etc...

I would like to get the pulses periodically every X ms. What I'm doing wrong?

Thank you.