texts: How to transfer data from/to the I2S controller through AXI DMA

texts:
I'm doing a sound analyzing project on the Zybo board and I'm having hard time using the AXI DMA for transferring data from the I2S controller to RAM. I'm using the I2S controller from the Digilent's github which is actually a modified Analog Devices IP - the codec on the board is Analog's SSM2603. The IP is supposed to support the AXI DMA mode as well as the PL330 DMA (from the processing system) and there's also the possibility of direct register access. The Zybo base system example uses the latter. The I2S IP uses a 8x24 FIFO for each channel and I know it works with direct register access.

I am trying to do the data transferring "properly" with a DMA and as there are no PL330 examples to be found (at least not bare metal, which is what I'm doing), I'm trying to use the AXI DMA. However I can only get a few samples to the RAM. I don't really know if there's a problem in the I2S controller or in my configuration of the DMA, so I'd first like to know if I understand how the DMA works.

I'm basing my code on the Xilinx' interrupt DMA example, so I think the initializations and similar are done correctly. What I'm unsure of is the following: I start the S2MM (Stream to Memory Mapped - I2S to RAM) transfer with the number of bytes to be transferred and expect the I2S controller to only output data when it has it. So if I want to transfer 5 seconds of audio, I start the transfer of

5 * 48000 (sampling frequency) * 2 (channels) bytes.

For now I then wait for the interrupt in which a flag is set, so that I know the transfer has finished. I expect this to last 5 seconds but instead it happens in a couple hundred ms (I don't have an o-scope) and only a few samples arrive.

So is my understanding correct? Has anyone ever used this I2S IP with DMA?


texts:
For the following circuit:

circuit image http://imagizer.imageshack.us/v2/640x480q90/674/aBkkRU.png

I'm solving for the Rth at node 2. In the solution guide, it shows that the Rth = (10k || 10k). I don't understand how this is so, by following the resistence equivalent rules, these two resistance should be in series.

I'd appreciation for the clarification.


texts: Is the Excitation Voltage of a load cell a strict specification?

texts:
When using load cells (or strain gages generically), is the Excitation Voltage spec provided as a strict minimum -- or is it just a recommendation which one can go below as long as one is OK with a smaller full-scale output?

The details:

I wish to use a certain standard load cell (full bridge), but in a portable application -- powered with a single cell Li-ion battery (3.5 V to 4.2 V).
The load cell spec simply states "Excitation: 10 Vdc (15V max)". (Full specs)
Instead of using a boost converter, if I were to just excite the load cell at 2.5 V for example, I'm curious if there will be any performance diminishment (aside from the full-scale output being 1/4 the magnitude).

In other words, is it more ideal for a battery-operated project (3-4V) to:

Option A: Use the 10V-recommended load cell at reduced excitation voltage (e.g., 2.5 V)
Option B: Or use a boost converter first and apply larger excitation voltage (> 10 V) ?


texts:
I'm struggling to get my head around assertion levels and how it relates to logic levels / functions.

For example.

Let's say we have 2 input signals, A and B

So A assertive high and A assertive low. If we had B bar/not , then in this case B assertive high and B assertive low.

The context its being used in is when designing MOSFET logic circuits. But what is even worse is in truth table and the headings are things such as "A assertive low" and "F assertive low" for example.

I know its vague but if I knew more I probably wouldn't be asking this.

Just would like to clear up assertion levels and how it relates to boolean logic if it does at all!


texts: Measuring battery life for Arduino device

texts:
I'm building a IoT thing based on Arduino. The thing will be powered by a 12V battery. The reason why I want to use a 12V battery is because I will also have motors on the thing.

I would like my thing to know how much battery it has left, so it can signal with a LED or similar when it starts to run out of battery and needs to be recharged.

The Arduino has a built in power regulator which accepts 5 to 12V as input, so that part is fine.

It also has analog inputs, and my idea is to use the analog input to measure the voltage of the battery. This assumes that as a battery starts to run out it will give a lower voltage than when it is fully charged. So my first question is, is this correct? If not, how can I tell when a battery starts to run out?

Anyway, the analog input can only accept input voltages between 0 and 5V. So I can't obviously connect the battery directly to this input, this would burn the Arduino. The idea I have is to use a voltage divider like this:

And choose R1 and R2 to be 1.5kΩ and 1kΩ. This should give an input to A0 of 4.8V if the battery gives 12V, and and input to A0 of 3.6V if the battery voltage goes down to 9V. It should be enough of a difference in voltage for the analog input to be able to measure it.

Well... That's what I thought anyway... Is this a good way of doing it? Is this the "standard" way to measure battery life, or are there other better methods?


texts: Is BLE 5 backwards compatible to BLE 4.x ? Can a phone with bluetooth 4.x talk with a device with BLE5

texts: I would like to develop a wearable with a BLE5 module. I wonder if this module would work with any BLE4 enabled mobile phone? I am aware with that it may not use the advantages of BLE5, but I don't want to develop something that will not be used for a while. I read a similar question for BLE4.1/BLE4.0 compatibility, and answer was yes. However I am not sure about major version number changes are also backward compatible. Do you have any experience with that?


texts:
I'm currently designing a small application with a bipolar power supply. As the circuit needs to be portable, I've included two Li-ion batteries in series with the midpoint grounded to generate the positive and negative supplies.

I need the batteries to be able to be recharged without removing them from the circuit, but I'm having trouble designing the circuit to charge them. Initially, I thought about adding a DC input followed by an OPAMP-based virtual ground driver to split the DC voltage into a positive and negative rail, and use each rail to charge each battery using some IC like the MAX1555, but this would only work for the positive battery.

Is this the best approach, or is there some other better way to accomplish this?

Edit: A 12V wall adapter will be used for the DC input. Also, the device will be connected to an Arduino board using a different power supply. The device will not draw the same current from both batteries.


texts:
I'm tring to integrate a SPI Slave in VHDL (opencores)
http://opencores.org/project,spi_master_slave
the idea is to interface a Microcontroller and an FPGA
I'm Using Quartus..

more info:

microcontroller diferent clock 50 MHz i think..
SPI clock frequency is 16Mhz
SPI VHDL core clock @ 100 Mhz
I've made an endurance test writing and reading some registers .. no errors with spi

the problem  :

when I try to integrate the VHDL SPI to the rest of my VHDL application (also 100mhz)... the circuit becomes a little "unstable"

some symptoms:

sometimes in some registers there are bits I didnt write by spi, making the vhdl application to act inexpectecly..
When adding signaltap probes , the behabior of the vhdl changes a little..

questions:

Do I need to use timequest for the SPI CORE , to add timeconstraingts to SPI input pins?
Do I have metastability ?


texts: Multiplexing Red and green dual led not being switched on properly

texts:
I am having problem getting this red and green led to switch on in its yellow color state. Red + green = yellow!! But it simply refused to do so. It's more like an annoyance than a real big deal problem to me, but It's also pretty interest if I can still able to fix it using software, which I am not sure if I could.

Here is the LED: (red 2v, green 3v)

Here is how it looks like. The green colored leds should be turning yellow, and when I stare close enough, I can actually see the red led being turned on, but not bright enough. Normally, one would assume that the red led will be brighter than the green led because red is lower voltage, but strangely, it's the opposite.

Here is the circuit!! It's huge, please open it in a new tab and zoom in to see the detail. Basically the left part of the led is the red led.

Here is the code that I use to run the leds. It's nothing fancy, just a simple old multiplexing.

  if(counter==0){
    PORTC &=~(1<<0);
    PORTD= ~(led[counter]);
    PORTB=1<<0;
    }

  if(counter>0 && counter<8){
    PORTB =0;
    PORTD= ~(led[counter]);
    PORTB=1<<counter;
    }

  if(counter==8){
    PORTB =0;
  PORTD= ~(led[counter]);
    PORTC |=1<<0;
    }

  counter++;
   if(counter>8) {
   counter=0;
   for( byte i=0; i<9; i++){
    led[i]=0;
    }

So, to make it clear, Q1, why no yellow? Q2, is it fixable using software? Q3, if so how? Q4, in case it's not fixable by software, what do I need to fix it in hardware. adding 12 resistors to red leds?

Update: Here I try to toggle the first dual led on and off, the last photo showing them switching on/off very fast, and clearly, it's not yellow.


texts: How to test synthesizability and time characteristics of an isolated Verilog module?

texts: How to test synthesizability and time characteristics of an isolated Verilog module which can have its own interface much wider than pins number of choosen FPGA?


texts: what relationships exists between the BER vs SNR graphs of QPSK and QAM modulation schemes on data throughput. which scheme does better?

texts: Using QAM and QPSK modulation schemes, RF field measurements like received signal power and pathloss were obtained from where the SNR values were estimated. Their BER values were also calculated and Matlab was used to plot the BER vs SNR graphs for QAM and QPSK. Now from these graphs, how can one tell how each modulation scheme is able to maximize data throughput.


texts: Which things should I have in mind when choosing LED backlight frequency in range 10 kHz to 100 kHz?

texts:
So I have a display which has an integrated LED driver for backlight. The driver expects PWM input with frequency between 10 kHz and 100 kHz. The only other information I have are the maximum voltage and current and that there are two LED strings.

Most of the research results I found concern themselves with PWM frequencies in the very low frequency range and there seems to be little information for PWM frequencies above 3 kHz. It seems that the flicker is not an issue above 3 kHz.

So are there any other important factors, other than EMI concerns, which need to be taken into account when selecting the PWM frequency?


texts: Scratched 18650 Lithium Battery safe to use?

texts:
I tried to salvage 18650 batteries from a dead laptop battery, in the process I peeled off and scratched the metal casing a little bit with my utility knife (see attached image below), Other than that batteries work fine (Cells read 4.01v), Is it safe to keep using them? I'm planning to cover the open area with electrical tape.

Thanks in advance for answering


texts: Why IR receiver at gadget not take the hex code?


texts: Implementing a function using decoder, encoder and some gates

texts:
Implement the function F(A,B,C,D,E) = A’B’C’DE’+ABCD’E using only the components required from the ones given below:

One 3:8 decoder with active high outputs and an active high enable input
One 8:3 Priority Encoder with input no. 7 at highest priority with one active high enable which if disabled forces the outputs to logic low
One 2 input XOR gate
One 2 input OR gate
One 2 input AND gate

My attempts:

I have noticed that the function has the minterms 2 and 29 - 00010
and 11101.
I can make the decoder have four inputs using an enable pin (for a
variable).
Drawing the K-Map doesn't seem to simplify anything.
Applying De-Morgan's law doesn't seem to simplify things.
Tried using B,C and E in the decoder and A or D in the enable. This provides me with 8 minterms of B,C and E.

I am stuck on how to implement it using only these.

How do I approach this question(and other such design questions) further?


texts: Do I need input capacitors for a regulator following a regulator?

texts:
My system contains several switching and linear regulators:

Main DCDC regulator taking the incoming 50v power down to 6v.
Several small regulators (DCDC and linear) creating 3.3v, 5v, etc. from the 6v.

If the small regulators are very close to the main regulator (and thus very close to its output capacitor), do they all need their own input capacitors?

Could they share the main regulators capacitor?

Could they all share one input capacitor?


texts: How does this impedance matching circuit work? How to simulate it correctly in SPICE?

texts:
I have a schematic for a current sensing circuit using a dedicated TI differential amplifier part for current sensing applications. The schematic also includes an "impedance matching" part for connecting the voltage output of the differential amplifier to a BNC coaxial cable. This coaxial cable then can be attached to the PCB and then plugged into an oscilloscope.

The impedance matching bit consists of a potential divider of resistance 5-MOhms and 75-Ohms. I don't understand how or why this would work (my understanding of impedance matching is a bit iffy I'm not going to lie). I was told this bit of the circuit was taken from the internet and I've tried googling around but couldn't find the original source. Could anyone help explain how this potential divider impedance matches to a 50 Ohm BNC coax?

Secondary question:

I tried simulating it in LTSpice to maybe get some insight into how it would work but I don't think my model of a coaxial cable was correct. I found some typical values of inductance and capacitance from here and then measured the resistance of the cable and included that too. I also looked up the input impedance of the oscilloscope which said it was 1-MOhm and an input capacitance of 13pF. I don't think I'm simulating it correctly however, is this circuit model a good enough approximation? From the article they linked it says there's also a parallel conductance, but I have no way of measuring this so have omitted it.


texts: Is there an Amp + Volt-meter on a chip or should I use the Arduino Analog?

texts:
I'm thinking of building a general purpose battery charger. It would charge LiPo packs, 9V, AA, AAA, etc...

I've been doing a bit of Googling and read that the internal Phone charging circuits tend to do top up cycles, after the charge is at optimal level (optimal level being some 70% or 80% to give better life span to packs)

So is there a simple chip that has a Volt-meter in parallel and an Amp-meter in series, with small load, that can interface with the Arduino?

Or should I just use the Analog inputs, as long as I protect the AVR from too much current?

Thanks


texts:
I've been studying pn junctions from the 5th edition of Sedra & Smith's Microelectronic Circuits and I've hit a roadblock regarding how the junction works in forward bias and, more specifically, how its i-v equation is calculated.

From what I've understood so far, in forward bias, free electrons flow into the n-type region and cover up the bound positive charges of the depletion region, while free holes flow into the p-type region and cover up the bound negative charges of the depletion region, thereby reducing the width of the depletion region and reducing the electric field.

This allows the diffusion of free holes from the p-type region into the n-type region, where they become (excess) minority carriers. The concentration of excess minority carriers (free holes) is maximum at the edge of the n-type region, but reduces exponentially the further we go from the edge depletion region, as the free holes recombine with the free electrons of the n-type region, until it becomes 0 at x >= diffusion length.

In equilibrium, the external circuit provides a steady flow of free electrons to replenish the ones that are "lost" when they recombine with the incoming free holes, and the distribution of the concentration of excess minority carriers (free holes) across the n-type region does not change with time, with the excess minority carrier concentration being a declining exponential function of x as described above. (And the same happens with the free electrons diffusing into the p-type region.)

What I can't understand is how does the total current (which would be

where  is the surface of the pn junction,  is the current density generated by the diffusion of the free holes into the n-type region and  is the current density generated by the diffusion of the free electrons into the p-type region.)

flowing through the diode remain constant across the length of the pn junction? The S&S book claims that  somehow remains constant and equal to its maximum value (aka its value at the edge of the n-type region) across the entire n-type region because of equilibrium. But  is a declining exponential function of , so how can it be constant?

Or is it simply the sum of  and  that remains constant across the length of the pn junction?

From the book:

  Observe that Jp is largest at the edge of the depletion region ( = ) and decays exponentially
  with distance. The decay is, of course, due to the recombination with the majority electrons.
  In the steady state, the majority carriers will have to be replenished, and thus electrons
  will be supplied from the external circuit to the n region at a rate that will keep the current
  constant at the value it has at x = x„. Thus the current density due to hole injection is given by

  A similar analysis can be performed for the electrons injected across the junction into the p region resulting in the electron-current component Jn,

  where  is the diffusion length of electrons in the p region. Since  and  are in the same
  direction, they can be added and multiplied by the junction cross-sectional area A to obtain the total current .


texts:
I’m wondering how crucial it is to remove as much of the old solder on a bga chip and corresponding PCB pads.

Is it best practice to always wick before applying fresh leaded solder? (Presuming most original solder will be lead-free)

Or could you just make a few passes with a big glob of leaded solder across the pads with the iron?

Any side effects if both types of alloys mix together?


texts: Disadvantage of using low resistor value for pull up (Strong pull up)

texts: I was trying to choose a resistor value for a pull-up resistor I will use in my project. The project will have I2C communication and SMBus communication. When I was searching on the internet, I have seen some sentence that says using low resistor value for a pull-up resistor causes higher energy consumption. Is it the only disadvantage? If the only advantage of using a pull-up resistor is to reduce energy consumption, would the SMBus or I2C communication work without any pull up resistor? And how much energy does it save if I use 2 k pull up resistor, would it reduce consumption drastically? Thanks beforehand.


texts: PSPICE: How to change the axes in simulation?

texts: I am getting V on both the axes? I need a I- V Curve of zener diode characteristics


texts:
I found a simple commercially available uninterruptable power supply picoUPS-100. The manufacturer does not provide the circuit schematic, however, the principle block diagram looks like that:

I would like to to use it my car along with a small battery. It looks like the battery would be charging without control, so if I do not drive often, the charger will drain the car's battery eventually. I was hoping that it would not be difficult to add a logical charge_Enable switch to the device to only allow the charging portion of the device work when the ignition is ON. To achieve that I would like to place a MOSFET FDD6630A instead of the Diode, and connect the gate to the 12V ignition signal to serve as the gate drive:

Please, let me know your thoughts on this:

Does it look reasonable from the functional diagram perspective?
Do I need a pull down resistor for the gate?
Shouldn't the connections for drains and sources be reversed?


texts:
I am using ATS (automatic start) for my generator. Its programmable IC goes out of work after 2 or 3 days and I have replaced 3 ATS card. My card supplier says that you are somehow getting AC voltage (220V) mixed with DC voltage (12V) which is causing this problem? I want to know if there can be some problem if AC voltage wire is connected directly with DC wire?
I know this is a dumb question but I don't know anything about circuits.


texts: Unable to configure a simple IEC connector with an illuminated switch

texts:
I have this IEC connector with an illuminated single-pole switch.

Here is how it looks like from back side:

As you see above the earth, line and the neutral are mentioned. But for the switch side there is no marks so I marked them as A B and C.

Here is the catalog for this type of connectors:
http://www.bulgin.com/media/bulgin/data/Power%20Entry%20Modules.pdf

If you go to page 277 you find this model named as C20 IEC Inlet.

I cannot see any kind of information how line and neutral will be wired to the illuminated switch. Is there a standard or how can I figure this out?

Edit:

Let's say I would know which pin is 1 2 and 3.

There can be two ways to wire this:

Config 1

or

Config 2

Dashed gray line is when the switch is OFF. I think the pin 2 is the fixed pin.

But which configuration is better than the other one?

Btw I only tried Config 1 and the switch makes arc like sound when one turns it on.


texts:
There exists this qeustion about MOSFET advantages over BJT's Linear Regulator: MOSFET vs BJT

So my question is: What advantages do BJT's have over MOSFETS ?

So far I have these advantages:

They operate better under high load than MOSFETS
They operate better with higher frequencies than MOSFETS

What else did I miss ?


texts:
I am new to RF electronics and trying to build my first circuit integrating Bluetooth Low Energy, with quite strong geometrical constraints : the whole thing needs to fit inside a narrow 8x5x60mm volume.
I am thinking about using a chip antenna (e.g. Johanson 2450AT43A100) on one end of the PCB, but can't find information about the effects of having such a narrow ground plane : datasheets usually only present performance with large ground planes without saying much about the degradation we should expect if we shrink it below recommendations and theoretical limits related to wavelength.

Is there is any practical limit on the width of the PCB serving as the ground plane?
For example, assuming proper tuning, should I expect a decent connectivity with this kind of antenna using a 7x40mm ground plane?

Notes:

The system is intended for short range communication only, with a device less than 2m away (possibly with a human body in the middle though).
I have seen interesting patch antennas like what Apple did for their Air Plugs, but I would really like to avoid the cost of a custom antenna design for now.
Another very interesting solution I found was Insight SiP ISP 1507. Sadly it's just a bit too large for our requirements...


texts:
I have this momentary switch that is used as a Reset switch on my computer :

I opened it and I'd like to assemble it back.

It's made with these parts:

the push button
the grey "frame"
a spring
a hard "wire" in J-shape
2 small "clamp clips" that are, let's say "rectangular"
the black base connected to the cable

The problem is that I can't find any schematic on how this switch is assembled to be able to reassemble it. Can you help me?

I suppose that the spring goes on the "rounded" splitted plastic pin on the base (even the pin seems to be a bit large for the spring diameter, and the 2 "clamp clips" seems to go on perfectly dimensionned places on each side of the button, sliding straight down on the metal part connected to the wire when the button is pushed (but only one of these "extruded" metal parts is clearly visible).

With the button mounted on the base :

EDIT 2020.04.14

Here are some pictures of how I suppose the things go together.
But saying that, I don't see the point of putting the 2 small clamps on each side of the button, as there is one of them that contact nothing else than plastic. And I suppose that the other one, that slides on the visible metal part connected to one wire, cannot contact anything as the second metal part is almost (if not totally) flush with the plastic bottom, and more there is a tiny plastic part under the clamp, to hold it into the button, that should avoid any possible contact.


texts: Any microcontrollers which can be directly programmed on a breadboard?

texts: Does anyone know of a microcontroller which can be directly interfaced and programmed through a PC using serial/parallel/usb port? I am looking for a microcontroller which can be  plugged into a breadboard and connected to a PC (without the programmer) to upload the bootloader and the program into it.


texts: Node analysis in which branch contains Voltage Source

texts: I'm experiencing problem while solving the circuit problem and finding Iab: It is because there is a voltage source on the branch which is connected to the left node. Please, help me to find the current Iab


texts: device for outputting HIGH when input have been HIGH?

texts:
I am looking for a device or circuit that outputs HIGH when a pushbutton  has been pressed (if the button is pressed again it is supposed to still output HIGH), also, if possible, another pushbutton to make the output LOW.

Is this possible without an IC? How to do it?


texts:
I'm interested in using software from diydrones.com specifically written for UAV helicopters called ArduCopter. However, the instructions on the website assume that you've bought the specialty microcontroller board that diydrones sells.

I'm interested in using their ArduCopter firmware in a simulation using FlightGear and APM Planer as this QuadHil tutorial demonstrates, but I want to use it either without any hardware in-the-loop or with a small Arduino in-the-loop.

Anyone who's played around with this software more than I care to share how difficult this would be, and how I might go about it?


texts: What could cause an LDO regulator to fail to regulate properly?

texts:
First, some background. I have two boards, Board A and Board B. Two separate, but extremely similar designs. Let's start with the similarities:

Based on AVRXMega
Exact same regulator setup. 5V in, 7833 SOT-223 3.3V regulator, and identical bypass caps
Both boards draw approx. 5mA unprogrammed, and 30-50mA when programmed.
Both are 2-layer standard 1.6mm 1oz PCB with a thorough application of ground stitching vias

But

Board A has no issues with regulation. Regardless of the load current (up to 500mA), the output is rock solid at 3.3V.
Board B will not regulate to 3.3V unless the input voltage is dropped below 4.5V, and even then it will only output 3.4V. Above 4.5V input, the output voltage tracks the input with an offset of 1V. So 5V in is 4V out.
Adding a 100Ω load resistor to Board B improves the output, it will only track up to 3.6V, and will only output 3.4V once the board has been programmed, drawing approx. 60-80mA.

I have tried half a dozen different regulators, even swapping the ones on Board A and Board B. I have used several different bare boards of A and B, even with just the regulator circuits populated.

I have even tried 100mA (TC1015-3.3), and 10mA (MIC5232-3.3) regulators, they all do the exact same thing.


texts: Arduino mini bluetooth module communicating with an Android device without using an app?

texts:
Is there a way to communicate between arduino device  and the android device through the bluetooth?

I know it is and for that is used some pfodApp, but what if I want to make my own application, without a need of standalone pfodApp. Do you know if there is anything like pfod library for Java/Android? Which would allow me to pair and communicate with the arduino?

Check this: pfodApp


texts: How to safely set/clear only some bits of SCB->SHCSR on ARM Cortex-M processors?

texts:
On p. 265 of the third edition of Joseph Yiu's The Definitive Guide to Arm Cortex-M3 and Cortex-M4 Processors, there is some discussion about the "system handler control and state register" (SCB->SHCSR) which is typically "used by application code only for enabling configurable fault handlers".
Now this register contains three set of bits: one set for enabling/disabling handlers, another set that tracks which faults are pended, and another set which tracks which are active. All three sets are R/W, and author warns:

Be cautious when writing to this register; make sure that the active status bits of system exceptions are not changed accidentally. For example, to enable the Bus Fault Exception, you should use a read-modify-write operation:
SCB->SHCSR |= 2<<17; // Enable Bus Fault exception

Otherwise, if an activated system exception has its active state cleared by accident, a fault exception will be generated when the system exception handler generates an exception exit.

But I fail to see how the example code prevents accidental modification of unintended bits. I do not see |= meaning anything special as far as the "idiom recognition" table later in the book goes, and the lead-up itself calls this a read-modify-write operation which I understand to be three separate (and non-exclusive!) instructions. When I compiled that line of code using TI's ARM toolchain, the sequence indeed is:
LDR       A2, $C$CON4           ; (this just loads the register's address)
LDR       A1, [A2, #0]
ORR       A1, A1, #262144
STR       A1, [A2, #0]

So what happens if right after the LDR A1, [A2, #0] some interrupt happens (e.g. SysTick fires) and that ends up pending one of the faults tracked in this very register? When the STR A1, [A2, #0] happens won't it overwrite that pending bit with stale state?
Wouldn't it be necessary to actually __disable_fault_irq() before modifying this register and then [at least in a multi-processor setting] use an exclusive load/store sequence to safely write this? The author has taken pains to point out the risks of messing with other status bits in this register but only shows a normal/routine (non-atomic) example of modifying the register.


texts: i am using flyback converter to charge a capatior 250uF 300V how can I reduce the charging time to 1 second OR how to increase current.   28V DC input voltage transformer output Voltage is 300V PWM frequency 55khz.


texts:
Friends,

I've tried to initiate TFT LCD with chipset SD1289,
Photo of the result :

Init code that I've written

    void Lcd_Write_Com( int  DH)     //ÃüÁî
    {
        LCD_RS=0;
        LCD_CS =0;
        LCD_DataPortH=DH>>8;
        LCD_DataPortL=DH;
        LCD_WR=0;
        LCD_WR=1;
        LCD_CS =1;
    }

    void Lcd_Write_Data(int DH) //Êý¾Ý
    {
        LCD_RS=1;
        LCD_CS =0;
        LCD_DataPortH=DH>>8;
        LCD_DataPortL=DH;
        LCD_WR=0;
        LCD_WR=1;
        LCD_CS =1;
    }

void main_init(void)
{

  LCD_RS = 1;
  LCD_WR = 1;
  LCD_RD = 1;
  LCD_CS = 1;
  LCD_REST = 0;

    //P1 = 0xFF;
    delayms(100);
    LCD_REST = 1;
    P2 = 0x00;
    delayms(20);
    P3 = 0x00;
    delayms(20);
   // Start screen initialisation

   Lcd_Write_Com(OSC_START);          //Start Oscillation
   Lcd_Write_Data(0x00);
   Lcd_Write_Data(0x01);
   delayms(30);
   Lcd_Write_Com(DRIVER_OUT);            //Driver Output Control
   Lcd_Write_Data(0x23);
   Lcd_Write_Data(0x3F);
    delayms(30);
   Lcd_Write_Com(LCD_DRIVE_AC);       //LCD Drive AC Control
   Lcd_Write_Data(0x06);
   Lcd_Write_Data(0x00);
   delayms(30);
   Lcd_Write_Com(POWER_CONTROL1);     //Power Control (1)
   Lcd_Write_Data(0xA8);
   Lcd_Write_Data(0xA6);
   delayms(30);
   Lcd_Write_Com(DISPLAY_CONTROL);    //Display Control
   Lcd_Write_Data(0x00);
   Lcd_Write_Data(0x33);
   delayms(30);
   Lcd_Write_Com(POWER_CONTROL2);     //Power Control (2)
   Lcd_Write_Data(0x00);
   Lcd_Write_Data(0x05);
   delayms(30);
   Lcd_Write_Com(POWER_CONTROL3);     //Power Control (3)
   Lcd_Write_Data(0x30);
   Lcd_Write_Data(0x0B);
   delayms(30);
   Lcd_Write_Com(POWER_CONTROL4);     //Power Control (4)
   Lcd_Write_Data(0x20);
   Lcd_Write_Data(0x00);
   delayms(30);

   Lcd_Write_Com(ENTRY_MODE);         //Set Display color mode for 65k color
   Lcd_Write_Data(0x68);
   Lcd_Write_Data(0x30);
   delayms(30);
      Lcd_Write_Com(SLEEP_MODE);         //Exit Sleep Mode
   Lcd_Write_Data(0x00);
   Lcd_Write_Data(0x00);
   delayms(30);                //delay 30ms

   Lcd_Write_Com(POWER_CONTROL5);     //Power Control (5)
   Lcd_Write_Data(0x00);
   Lcd_Write_Data(0xA8);
   delayms(30);
   Lcd_Write_Com(HORIZONTAL_RAM_START);   //Horizontal RAM address position start/end setup
   Lcd_Write_Data(0xEF);                  //decimal 239
   Lcd_Write_Data(0x00);                  //decimal 0, i.e. horizontal ranges from 0 -> 239
   delayms(30);                                 //POR value is 0xEF00 anyway. This address must be set before RAM write

   Lcd_Write_Com(VERTICAL_RAM_START);     //Vertical RAM address start position setting
   Lcd_Write_Data(0x00);                  //0x0000 = decimal 0
   Lcd_Write_Data(0x00);
   delayms(30);
   Lcd_Write_Com(VERTICAL_RAM_END);       //Vertical RAM address end position setting
   Lcd_Write_Data(0x01);                  //0x013F = decimal 319
   Lcd_Write_Data(0x3F);
   delayms(30);
   Lcd_Write_Com(RAM_WRITE);              //Commande d'ecriture dans la Memoire ecran

   LCD_CLS(BLANC);                  //send blank  (mode 16 Bits)
}

datasheet of SD1289

http://www.gpegint.com/files/library/files/supportpdf/Driver%20IC%20SSD1289.pdf


texts: SI5351 I2C clock generator breakout board not detected on raspberry pi 3

texts:
I've recently bought a SI5351A I2C breakout board on Aliexpress (This listing) for a project. I was trying to test the board using a simple breadboard, a couple of jumper wires and my raspberry pi 3 (running raspbian buster).
The problem I have is that for some reason the I2C device is not detected when I run i2cdetect. I've enabled i2c in the pi configuration and can see bus 1 listed in /dev, below is the output:
pi@raspberrypi:~ $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
pi@raspberrypi:~ $ ls /dev/i2c*
/dev/i2c-1
pi@raspberrypi:~ $ lsmod | grep i2c
i2c_bcm2835            16384  0
i2c_dev                20480  0
i2c_bcm2708            16384  0
pi@raspberrypi:~ $

I've successfully tested the continuity of all the pins on the breakout board using my multimeter to make sure I soldered everything correctly.
I've also checked the voltage of the VIN pin and I get 3.3V as expected.
I've driven the SCL and SDA pins from high to low and low to high every second using a simple python gpiozero script and I do see my multimeter fluctuating between ~3.3V and ~0V

I also see some activity on SDA and SCL when I run i2cdetect.

I've been following the following tutorial to get everything hooked up properly:
Adafruit SI5351 I2C Clock generator Tutorial
My board isn't adafruit branded but it's the exact same thing every inputs and outputs are in the same position and the board as the exact same layout.
Here are my connections:

At this point I am at my wit's end, I have no idea how to troubleshoot further, I've tested this on 2 different PI 3 and 2 different breakout board and I always get the same result. Did I buy a faulty component?
Now I am not an electrical engineer I'm a software guy taking my first steps in the wonderful word of electronics so please forgive me if something is so painfully obvious and I haven't seen it.
Edit: I've bought a Adafruit branded component, it was more expensive but at least it worked right out of the box.
I've tried to read/dump registers on the Aliexpress component as suggested from both addresses 0x60 and 0x61 and I get a read error so I think it's time for me to get a refund.
pi@raspberrypi:~ $ sudo i2cdump 1 0x60
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
80: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
90: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
a0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
b0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
c0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
d0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
e0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
f0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX

pi@raspberrypi:~ $ sudo i2cget 1 0x60 0x03
Error: Read failed


texts:
hello i'am using FreeRtos API with stm32f4 microcontroller ,  the program gets stuck when it enters vTaskDelay , when I debug it I see that it is stuck in this line (2588 of tasks.c at function vTaskDelay)

            if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) 1 )
        {
            taskYIELD();
        }

thank a lot for your help


texts: Is this logic gate circuit equivalent to the Simulink model?

texts:
Is this Simulink model

equivalent to this circuit?

Although the circuit simulated in Multisim works exactly the same as the Simulink model, switching (S1) between 5v and 0V causes an error. I guess this is a bug with the software because the output is identical to the Simulink model when a switch is not used.

Also, is it possible to eliminate any of these components as I will need 20 of these circuits in the final product. Note, I know that the top case is not achievable in this configuration. This will be needed in the final circuit as A can be HIGH or LOW instead of LOW only.

----- EDIT -----

I found out that the logic gates in MultiSim are not operating as anticipated and I replaced them with logic gate ICs. This is a shame on NI. The result is exactly the same as the Simulink model. The final circuit is as follows:

----- APPENDIX -----


texts:
This stove has not been heating well during the last week, so today we opened it. A rusted wire was to blame; we fixed it and the stove is as good as new now. But I do not quite understand its inner workings, hence this question.

I am attaching a photo and my take at a circuit scheme. I will also describe how it operates outwardly. I hope for an explanation of the function of its parts and an overview of the circuit.

simulate this circuit – Schematic created using CircuitLab

There is a handle on the side of the stove that rotates smoothly in the range of about 300 degrees. There are markings on it: "off" on 0 degrees (counter-clockwise limit) and then from "1" onwards with "5" at 300 degrees (clockwise limit).
There is an orange light source beside the handle. When the handle is at "off", it is never alight. Otherwise, it lightens and darkens alternately (in a discrete fashion) in intervals at the scale of a few minutes. The farther the handle is to "5", the longer the intervals of it shining and shorter the intervals of it darkening, but even at "5" it goes dark for about a minute every five minutes or so.
There is a large flat metal spiral on top of the stove that kitchenware is placed upon for heating. While cooking, it heats up, often so much as to shine dark red. It appears that the spiral heats up when the orange light is shining, and cools down when it is dark.

My idea is that there is a thermistor somewhere in the spiral that is joined in series with a potentiometer controlled by the handle, and the presence of the current in the spiral depends on the current through that potentiometer-thermistor series. But I cannot quite place this hypothetical thermistor-potentiometer series on the circuit scheme.


texts:
I flashed a simple led blink program to an attiny2313 with a usbasp type programmer. Avrdude confirmed that the chip was programed, but the led is not blinking.

I tried switching the led, varying the resistor and double checking the wiring. I've also tried a few other led blink programs for this chip and the circuits that went with them. I can't get the program to work. Avrdude says it was written and confirmed, but the led does not blink.

I occasionally get a 'first bit does not match 0xff not 0xdf' when changing fuses. They are all on default currently. I sometimes got a similar error at the end of the programming but with the values 0x00 and 0x0c instead, but even this error has not come up recently.

The program blinks pin PD6. Here is a picture of my circuit. The unplugged pin is the 3.3 volt connection I replaced it with the brown 5 volt wire.


texts:
I have a problem each time when I start my Roboclaw 2 x 60A motor controller.
When I power it I always see a blinking red light and attaching the USB I see, in the Basicmicro Motion Studio, that I have an alarm which says Logic Battery Low.

I can solve the problem by updating the firmware, but I don't want to do this every time I turn it on. Does somebody have a solution for this?


texts: Can I safely place a 60w between a 50w LED and a large heat sink that can dissipate 100 watts?

texts:
Today I have learned that Peltier devices can be used to generate electricity.

I have a set up with a 50 watt LED which is glued to a very large heat sink that cools it without any fans (that can dissipate up to 100w).

The idea of being able to sandwich the Peltier between the LED (heat source), and the large heat sink (cool surface) to generate current sounds awesome.

Before I order a 60w Peltier device off eBay, I'd like to ask:

Can I safely place this Peltier between my LED and heat sink to:

Generate electricity through the difference in surface temperature (LED bay and heat sink)?
Will my set up still work without trouble (LED works fine and heat sink still cools it down)?


texts:
I was trying to understand GPIO open drain configuration. As far as I understood, to avoid floating output, one should use internal or external pull-up resistors. This is OK. However, I saw multiple times this driving LEDs example. I am kind of stuck here, because;

In this video and other sources, I generally see that internall pull-up resistors are 30-50k ohms. I also confirmed this from the datasheet of one of the MCUs of STM. I know that classic 5mm LEDs require approximately 20mA to give decent light output. Now, I am confused because considering 5V for Vcc, 5V - 2V(LED on) / 30k ohms = 0.1 mA of current, which looks to me that it won't be enough to drive an LED.

So, what do I miss / don't know / know but wrong here?

Thanks.


texts: Firmware self update MCU level support: MK20DX256VLH7 or MIMXRT1062DVL6A

texts:
I've been reading MK20DX256VLH7 datasheet for a day and still didn't find any description about built-in mechanisms for intrinsic firmware update. I mean stuff that helps (allows) currently running firmware update itself. e.g. 2 banks of flash feature in SAM3x8e that can be switched and etc.

Is it possible with these devices firmware to be updated by firmware itself?
This device MK20DX256VLH7 has 256Kb flash memory for firmware. Is it possible to overwrite the program flash while firmware is running? (suppose isn't due to it's executed from flash)

MK20DX256VLH7 has SPI based 'EzPort' that is the way of program it. The programming process is controlled by EzPort protocol. I would like my firmware control the update and just receive the firmware via UART, I2C etc. as the raw binary array.

E.g. ESP8266 provide special command that copies a memory to zero address and reboot. I'm asking for same features in these MCUs.


texts:
This is a new topic to me so it would be great if someone could give me a few pointers.  I have an amplifier that I would like to get the frequency response for and a spectrum analyser with Probes A, B, and an Input probe.

My understanding is that Probe A and the Input probe go at the input of my amplifier, and Probe B is at the output.  I have read that you do not want to put too much voltage in the Input probe, as this will probably blow up the spectrum analyzer.  My question is regarding Probe B.  My output voltage is designed to be over 150V (minimum), so do I need to step down this value before measuring with Probe B?  It seems to me that if I put a voltage divider to make this output voltage smaller, it would affect the magnitude reading of my frequency response.  Is this true, and if so, what should I do about this?  Or would it be fine to place Probe B at my output?


texts: How do ICs work in satellites? Is the temperature in space not 3K? How does silicon gain enough energy to have sufficient free electrons at such low temperatures to behave as a semiconductor and not an insulator? Are ICs heated?


texts: I was just wondering how you would calculate the friction torque for a DC motor? and how the calculations would be different when finding the current, EMF, torque etc, when this is neglected.


texts:
I cant understand what this DRC error means.

Especially I do not understand this box. Does it mean that the Soldermask will cover part of the pad? How to correct it?


texts: Is there a problem using electrolytic (polarized) capacitor as coupling capacitor in SEPIC converter?

texts:
I found this circuit from here and have been thinking about to build it:

The author present it as Ćuk converter but I understand it as SEPIC, after reading this and this.

Q: My main concern is, whether it is safe to use electrolytic capacitor for C6?

My thinking says, the polarity will get reversed for C6 when MOSFET is turned off. Then if there is no load, electrolytic capacitor is going get damaged/exploded?
Also, chance for MOSFET get damaged because of absence of  flyback diode?


texts:
I’m trying to figure out how a step-up transformer works. A step-down transformer is simple and logical enough; you start out with a higher voltage and end with less, the remainder being wasted as heat. But with a step-up transformer, you end up with more voltage than you start with.

I tried looking it up, but all I can find (whether online or even in some electronics texts) is general information on how transformers work (induction, Faraday’s law, construction, etc.) and explanations of the difference between step-ups and step-downs in terms of the number of turns, but not specifically how step-ups result in more voltage.

Where does that extra voltage come from? Not  magic…


texts: Balancing Resistor Values for Series Capacitors

texts:
I just wanted to confirm my rough calculations are correct in selecting balancing resistors for 2 capacitors in series.

Here are the specs:
2x 10,000uF Capacitors with 500V rating in series.

I found this estimation equation online: R = 10 / C where R =Mohm and C = uF.
Based on this, I got 1kohm resistors to use as balancing resistors for each capacitor.

I'm using this setup to filter out transient behavior from a power cycler supplying 900V. Are those resistor values correct (or in the ballpark)?

Thanks in advance!


texts:
This is my first attempt to design a 2 layer board.I got DRC error regarding to the pad size. I am attaching screenshot of my design,and DRC errors.

Desin rull setupis:
distance between trace is 0.25
distance between pad is 0.25

can anybody help me??

Thanks


texts: How do the positive feedback increase the gain of a regenerative receiver?

texts: I know that you adjust the positive feedback just below oscillation. But how can this result in a higher gain? The feedback would not just compensate the resistive loss in the tank circuit and thus increasing the tank's Q?


texts: How to calculate exactly resistors values of opto coupler

texts:
Optocupler: FAIRCHILD MOCD207M

According to the data sheet with If=1mA minimum CTR is 34%. Using  series resistor of 1.5k at 3.3V gives If= (3.3-1.2) / 1.5k = 1.4mA.

The collector is connected to a 30k pull up resistor. It is directly connected to a controller input. Is the value of the pull up resistor adequate?


texts:
this is a noob question but here it is:
How can i connect an osciloscope to the 230V mains power line to see the voltage sine wave ?
- what schematic do i need
- how safe is it ?


texts: Full wave rectifier capacitance calculation

texts: For making 100 amperes, 50 volts full wave rectifier, how do I calculate the circuit capacitance to avoid the ripple voltage? I mean which size of capacitor should I use?


texts: Wiring up a dolls house with LEDs and a 9V battery

texts:
I'm trying to wire up a dolls house that I've built for my daughter with 7x 3mm white LEDs (https://www.jaycar.co.nz/white-3mm-led-4300mcd-round-clear/p/ZD0142)

I'm powering it with a 9V battery and have already blown 2 LEDs, so I guess I need to add resistors.

The guide I was following (http://judyry.blogspot.co.nz/2012/10/where-to-begin_17.html), didn't mention them at all, so that's on me for not researching properly first.

Regardless, I'd greatly appreciate some guidance on what size and how many resistors I'll be needing.

If my Ohm's Law calculations are correct then the resistance is 290Ω, but does that mean I divide that across the 7 LEDs and get 7x ~41Ω resistors or do I need 7x 290Ω resistors?


texts: High Bandwidth, High Voltage differential amplifier problems

texts:
I inherited a opamp measurement circuit that is supposed to be able to measure differential voltages of up to 1000 V with a bandwidth of 1 MHz and a protective impedance between the HV and SELV side.
The 0-1000 V on the primary side are converted to 1.5 V - 3.5 V on the secondary.
It is basically a differential amplifier with 9 megaohm resistors so that no lethal currents can flow.

The 1.5 V offset is applied via the (66 kohm//330 kohm) to (33 kohm//100 kohm) voltage divider and to avoid troubles caused by the common mode the same impedance is used in the feedback path.
To prevent troubles with the input capacitance of the opamp or the capacitance of the diodes 220 pF capacitors are used to add a defined capacity (again in both paths because of possible common mode problems otherwise).
The problems with these capacitors is that they would limit the bandwidth to 40 kHz and add a pole at around 1 MHz which they circumvented with a 15 pF in the feedback.
When I tried making their circuit (which worked for them, they used the same opamps and very similar caps) the frequency response of mine always has a notch at around 200 kHz which I can't explain myself.

Does anyone have any idea which parasitic or stupidity of mine could cause such a deviation from the simulated frequency response.

Schematic:

Simulated frequency response:

Measured frequency response:

!! Update:
The first pole at around 400 Hz disappears when I connect Vpv- directly to Gnd.

!! Update #2:
C3 & C4 are there to improve the steepness of the filter. But as andy aka pointed out they drive the gain of the opamp up at high frequencies until the 15pF get active. Could this be the problem?
Could it be possible that the GBP of the opamp wont be enough at high frequencies because the gain also increases? How would I simulate for that?


texts: I could not find the meaning of DO-254 which is a military standard (not component package). Do you know that the expansion of DO letters?


texts: How to use LM35's temperature as cold junction for K type thermocouple?

texts:
I have been trying to built an thermocouple base temperature monitoring system which can measure negative temperatures (say about -150 C). I previously have used max6675 but later on I found out it can measure only from 0 to 1024 C. So I want to make my own thermocouple Cold junction compensation but using LM35's temperature as its reference temp and this can work for both high and low temperatures(say -100 c and 1000c ) and last but not the least I want to feed it to a Arduino and I don't want to use AD595 or AD859x series chips or breakout boards. So how can this cold junction compensation can be achieved?
if anyone knows then please help.
Thanks in advance.


texts:
When grounding a tall tower in a rocky island, can we just throw a couple naked cables in the sea? If not, why not?

Please provide real-world examples if known.


texts:
What I am projecting is to substitute the manual throttle for a little electric motor with an Arduino computerized one  based on two sensors that yields 0-20V.

But Arduino works with 5V, so I need a lot of signal condition and I face a problem in simulating (to replace the manual control) an output 0-12V.

I am wondering to leave Arduino and move to something else that already works with 12V (in such a way I would also raise the sensor signals quantization).

Any Idea about what would be a wise choice?


texts: Limited output voltage swing in lm358 opamp

texts:
I was having trouble designing a small headphone amplifier that used lm358 as input stage. After verifying the push-pull output stage was correct and that every DC point was correct too (output resting at VCC/2, bias at correct voltage etc), I started to question the opamp's functionality.

I tested a simple circuit using lm358 in multisim with a single 9V supply, and I found out that, somewhy, the output voltage swings only from 6.6V to 2.4V (This is, VCC/2 +-2.1V).

Is that supposed to be like that? I didn't expect it to go all the way from 9V to 0V, but I expected it could at least swing from 8V to 1V.

Here's a screenshot of my circuit, showing the oscilloscope output for it. I'm using an AC input with 0.4V amplitude, so the output was expected to swing between 8.5V and 0.5V, but it only goes from 6.6V to 2.4V:

The datasheet emphasizes the large output swing for this chip. So I expected it to go further. Is this correct?

Thanks!


texts: Calculating the maximum basis voltage of an transistor

texts:
I'm having problem with calculating this parameter, I have to calculate the maximum basis voltage of transistor for power amp with complementary transistors. So I know Uebmax(maximum emitter-basis voltage) I have this formula:

Ubmax = Uebmax - Uebrest
Ubmax - maximum basis voltage
Uebmax - maximum emiter-basis voltage (I have this value)
Uebrest - emiter-basis voltage when the transistor is in rest(there is voltage and current in the schematic but there isn't signal which to amplify).

From where I can get Uebrest ?

Schematic (not the best quality but it's still understandable):


texts: Unconnected Inverting terminal of op-amp to hold a steady voltage?

texts:
I recently completed my final for my first year electrical Engineering Subject and I have the image of the question above.

I was really confused because it says when both switches are open, which leaves the inverting input of the op-amp (-) disconnected and ungrounded, which I now assume the op-amp has an internal ground at its negative terminal? (I might be wrong)
so this would make the inverting terminal =0 and the non-inverting a fraction of 5V. Therefore I would figure that the op-amp keeps turning up the voltage until its limit. How on earth can you select the resistors to match a Vb of 0.5V as the question asks for?

Maybe I am missing something with how the internal value of the op-amp works, please help.


texts: I need to use 0603 ceramic capacitors as I do not have enough space on my PCB. Do I need to add small resistance in series (1-2Ohm) as they have a very small ESR comparing to the electrolitic ones? Or it is not needed?


texts: I programmed my Artix7 with GTP example design of Xilinx, in fact after setting the Wizard of GTP with my favorite parameters, i opened the Example Design and then create constraint file with respect to my board and generated the bitstream, and program my board. now i have a serous problem and, i have now idea how to use this Example for my work, and my work is simply send data from one board to another, my question is how should i prepare my data to send? and on the other board how should i prepare received data for my work? do not get me wrong i use wizard in the exact way user guide says. and write the constraint file based on my constraint file


texts:
I will be using the AT32UC3C2512C, the AVR32768 Application note recommends 22pF capacitors for crystals up to 16MHz...I will be using a 20MHz crystal, should I choose a 22pF or a 15pF loading capacitor?

EDIT:

As requested:

20MHz: 7B-20.000MEEQ-T

16MHz: ABM3B-16.000MHZ-10-1-U-T


texts: How does the op-amp deals with negative inputs?

texts: The diagram shows the internal circuit of a 741 op-amp. Q1 and Q2 are both NPN transistors. So current can only flow through the transistors if a (large enough) positive voltage is supplied to pin 2 or pin 3 (i.e. the input pins). But I learnt that op-amp can also work with negative voltage input. For example, in a voltage follower circuit, a -5V input would produce a -5V output. Can someone explain how the op-amp works with negative voltage input the same way it works with positive voltage input?


texts:
I have a PIC16LF1709 20-pin 8-bit microchip MCU. I am programming it using a PICkit 3. I am able to successfully burn a program to the chip and run it, but it always seems to reset part-way through execution.

While programming the PIC, I'm letting the programmer supply the power, but I can also unplug the programmer and run the chip on its own 5V supply. As recommended, I've run a 50kOhm pull-up resistor from MCLR to Vdd to prevent that from resetting the device.

I have five LEDs connected to RC0-RC4, and I've written the test program below to demonstrate the problems I'm experiencing:

#include <xc.h>             /* XC8 General Include File */
#include <pic16lf1709.h>    /* Definitions of I/O pins */

void main(void) {

    TRISC = 0x0;    // port C (all are LEDs or NC) is output
    PORTC = 0x0;    // turn on all LEDs
    for(int i=0; i<500; i++) _delay(250); // delay for about a second
    PORTC = 0xFF;   // turn off all LEDs

    while(1) {
        // do nothing, forever
        // lights should remain OFF.
    }

}

I expect the lights to turn on briefly, then turn off and stay off until I power-cycle the device. Instead, the lights are blinking. This makes me think that the PIC is being reset about every 1 - 2 seconds.

I've tried including the following configuration line (other than this, I didn't specify any configuration) in an attempt to disable some of the features that might automatically reset the device. The behaviour was unchanged.

#pragma config MCLRE = OFF, STVREN = OFF, LPBOR = OFF

I've also tried letting the execution run while powered by the 3.25v supplied by the PICkit (as opposed to the 5v supplied by my main power supply), but that made no apparent difference either.

What could be causing this behaviour?


texts: What are receivers between 118 and 162 MHz called?

texts:
I’m looking to get a receiver that covers the area between 118 and 162 MHz. Unfortunately all  I have found so far with “Air Band receiver” goes     to max 140 MHz.

Do they have a special name for those receivers?


texts: Calculating the winding equation in a bldc motor

texts:
I want to wound the bldc motor with copper wire, but what exact gauge(diameter of wire) and no. of parallel paths per coil of a stator will decided, So that motor can sustain a tolerable speed and torque..
Is there any relation between the Torque, no. of parallel wires and the diameter of copper wire..
Regards,
Mahesh


texts: What is this motherboard component that looks like a bead of solder [photo], and can it be repaired/replaced?

texts:
As you can see, the one on the top is burnt. Whenever I plug the power adapter into the wall, the component releases a puff of smoke and the adapter instantly shuts itself off. The damage to the component was caused by an issue with the DC power jack, seen directly to the right. I replaced the DC jack with a new one (as you might infer by the evidence of my sloppy workmanship) but unfortunately the problem with the indicated component remains.

So, I'm just wondering, what is that thing, what does it do, and can I repair or replace it. I'm hoping that I can just replace the solder and it will work again, but I'm not exactly holding my breath.


texts: Using single keyswitch for various different operations

texts:
Basically I've made a circuit of various LEDs passing through a single keyswitch. That means when I turn on the key, LEDs light up. I've connected a relay because the keyswitch I have, works opposite (when key if off, it passes current and vice versa). I'm using this circuit in my PC.

Now I've to pass power button and restart button from the keyswitch. I cannot directly connect it's terminal to the same relay, as it can cross trigger the power into restart and so on.

Should I need to connect separate individual relays to power and restart button in parallel with the 1St relay? Or there's are any other possibilities?


texts: 3.3V GPS with 5V active antenna bias-tee

texts:
I'm building a multipurpose MCU + GPS device and doing breadboard experiments at this stage. The Ublox Neo7 GPS IC is on a breakout board at 3.3V. The board supplies about 3.1V to the antenna which works fine with the little antenna it came with. However, I have a proper outdoor active antenna but it is nominally 5V and minimum 3.6V, so I'm at least 1/2 a volt short. I can't raise the Vcc on the GPS as it is absolute maximum 3.6V.
After looking at the data sheet I'm reasonably comfortable with adding an external bias tee, with my only hesitation in layout at 1.6GHz. But I think I'd also need to block the 3.1V that's already there.
The suggested values for the bias tee are 27nH, 47pF (to take stray RF that gets through the inductor to ground I expect) and 10 ohms. Would solving this problem be as simple as putting a 47pF blocking capacitor in series between the board and a 5V bias tee? I'm going to have to go from the existing SMA cable to the bias tee circuitry then to the long coax up to the antenna.
So I'm just trying to confirm the 47pF is correct and any layout considerations. I'm thinking I will put 2 female SMA (or 1 SMA 1 BNC) in a small box and wire one to the other with the components leads.


texts:
Tl; Dr;
I make a lot of reads to a RAM, physically incrementing the address and get more errors every time i restart the read process on address 0x0. Is this the Row-Hammer ?

I made a question regarding RAM problems, it's still the same PCB and i found that with only reads the errors increment.

This picture is from a custom software which reads data and compares the read data to zero. The numbers in the third column are the number of bits which are not zeros from the read data.

What I can say is, that the first 60MBytes are error free and then the errors start.

I changed the ref voltage IC for DDR3 (running with 1.5V and Vtt 0.75) with an IC where no errors occured - no improvement.

Also, the errors are single bits and it can happen that a bit swaps back to zero and another in the same row changes to one.

I am using a RAM from Alliance Memory.

How can I determine if this is a Row hammer problem or not? What can I do against it.

I read here that one prevention mechanism would be increasing the refresh rate and/or to make sure that access to the same addresses should happen slower than the refresh rate, is this valid?

EDIT 1: Additional info to the routing

The exact part number of the RAM is AS4C256M16D3B-12BCN - Commercial temperature.
From my measurements the RAM doesn't reach a temperature above 50°C. Measured on the chassis of the RAM.

I tried various settings in the Uniphy IP Core (CAS settings and so on):
From using ODT (Can't use dyn ODT because the Cyclone V FPGA is not able to use read leveling) to increasing CAS latency, to modifiying memory timing. I made a SI simulation, but wasn't able to eliminate the errors with adjusting slew rates tds, tdh, tlh and dls.

My current setting is, from the RAM side seen:

CAS latency : 5

Output drive strength : 40 Ohms impedance

No additive CAS

The measurement of the 1.5V supply of the RAM showed the following:

Ueff: 1.54V

Uripple: 400mV

Tripple: can't tell from the osci, but the step down converter runs at 700Khz.

The layout of the RAM is:

The red lines are bottom and the blueish ones are on top. Ram is on the Top, decoupling capacitators and RZQ resistor is on the bottom.


texts: What kind of knob fits a slotted potentiometer shaft?

texts:
What I thought was an easy question is more elusive than I suspected. I have a number of potentiometers that have smooth (not knurled) shafts with a slot cut into the end...it looks like a flathead screw.

I need a knob for it, but can't find one. I suspect I don't know the right thing to ask for. When I google "knob slotted potentiometer" or similar, I get a ton of pots drowning out anything I might hit for noise, and no useful links if I search for "slotted knob" "knob for slotted" etc.

While a set screw would likely work I'd prefer to get something that's made for the shaft I'm working with. Does someone know what I'm looking for and what search terms I need to use to effectively filter out the pots from the knobs?


texts: Fourier transform of a sum of 2 delta function

texts:
i have a channel impulse response \$h(\tau,t)=\delta(\tau-1/4t)+b\delta(\tau-T)\$

if I would like to take Fourier transform, I can take FT for each delta function and then sum up a result.

\$FT(h(\tau,t))=FT(\delta(\tau-1/4t))+b FT(\delta(\tau-T))\$

How to find FT for the first delta function is clear, but I don't understand how to find ft of the second delta function, \$FT(\delta(\tau-T))\$.


texts: single oscillator driving multiple speakers

texts:
This is an odd request for a circuit.  I want to drive multiple speakers mono not differential from the same microcontroller. I want to just drive a tone through 8 8-ohm speakers so I thought I could just use a single oscillator circuit. I want to use the microcontroller to switch / enable them to oscillate and then I can modulate the enable.

Since I don't intend to drive more than 3 at a time, and they can take a maximum of 0.4 W each, could I use a single 3W Class D op amp?

Sorry I made a crappy image before I realized there is a schematic app but in essence could I construct a circuit like this that works?

where [in] is the oscillator input and after the op amp the 8 ohm speakers are enabled by a MOSFET switch low side. The multiple [Vin] are from the microcontroller are switched GPIO.

I know speakers are represented by resistance but they are coil magnets in reality. Is there anything I am missing that would defeat this circuit?


texts:
I'm developing an application with PIC32MX, that record 3 WAV sounds and store theme into SD. Unfortunately the speed that I have reach is 155 kB/s and is insufficient for my application. Then I have to move fatFS, that use multi sector write speed wich seems to solve my problem. I download the latest library for fatFS here (bottom of the page). I read on the internet that this code is generic and only some part of code needs to be adapted, based on microcontroller in use.
I have spent many time trying to understand what are this portions of code, but I still dont'find theme.
Anyone can help me?

EDIT: Finally I understand how to modify the fatFS for adapt it to my system.
But I have a little poblem. After I properly modified the "platform dependent" section with correct SPI and chip select pin, I tryied to compile. I obtained an error about windows.h and tchar.h, included in file integer.h. But in integer.h I see the ifdef, and I want compile the "embedded" section, not the windows section. If I try to delete the ifdef, I obtained this error: " ';' expected but 'fs_type' found ". This come from typedef struct of ff.h.
On internet there are project with the identical structure, why this doesn't compile?


texts: Plot voltage for different resistor values in LTSpice

texts:
I've signed up for a SPICE course at work, that will take place on Monday and I'm desperately trying to learn electronics and SPICE. (I work as an embedded engineer but with very lacking electronics skills)

I saw this circuit in chapter 2.13 of Practical Electronics for Inventors and thought I'd try to reproduce something similar using LTSpice.

To start with, I tried to create a circuit where the resistance increases linearly over time, and use that to plot a graph of voltage and current over time. So I guess, I'm expecting LTSpice to treat the circuit as having an ideal voltage  source.

I had expected the current to be straight decreasing line since (i) the dependency between voltage and current is linear and since (ii) the resistance increases linearly. But current is displayed as a curve. (The voltage appears to be a bit below the 10V line, but that's just an artifact of a window resize, when I place the cursor on the green line, it's exactly 10V)

Why is the current displayed as a curve? Is it because the R = 1 + 100 * time expression is incorrect?
How can i model a real voltage source and current source in SPICE?
In LTSpice there's a current component as well. Are the Current and Voltage components models of ideal voltage and current sources or real voltage sources
How would I do to create a simulation that would display a graph resistance vs voltage graph as in the book example at the top of this post?


texts:
I am building an arduino controlled RGB LED driver by using WS2803 constant current LED driver, TLP250 MOSFET drivers and IRF540N MOSFETs. This is how it looks like:

The picture got scaled down so it is harder to see, R3, R7 and R11 are 1k resistors.

This circuit is driving 5m RGB LED strip (100 segments) and should consume max 2A/channel. So each MOSFET should need to handle 2A at 13V max. IRF540N is rated at 100V/33A. RDSon should be 44mOhm. Thus I thought there would be no need for a heatsink.

I obviously want to PWM this things (WS2803 PWMs at 2.5kHz) but let's focus on full ON state. The problem I have is that the MOSFETS are seriously overheating in full ON state (no switching going on). You can see the values I measured in full ON state on the picture.

TLP250 seems to drive the MOSFETs correctly (VGS=10.6V) but I do not understand why I get so high VDS (like 0.6V on red LEDs). Those MOSFETs should have RDSon 44mOhm so when 1.4A is flowing through it, it should create a voltage drop of less than 0.1V.

The things I tried:

removed TLP250 and applied 13V straight on to gate - was thinking that the MOSFET are not fully open but it did not help at all, VDS was still at 0.6V
removed LED strip and used a car bulb 12V/55W on red channel. There was 3.5A flowing, VDS was at 2V and rising as the MOSFET was heating up

So my questions are:

why is VDS so high and why is MOSFET overheating?
even with VDS at 0.6V and ID at 1.4A the power is 0.84W which I assume should be fine without a heatsink?
would I be better off with a less powerful MOSFET, something like 20V/5A? Or use logic level MOSFETs and drive it directly from WS2803 (though I like the optical isolation of TLP250).

Few notes:

I have this circuit only on a breadboard at the moment and the wires that connect MOSFET's source to GND get really hot too. I know that this is normal as there is a relatively high current flowing through them but I thought I just mention it
I bought the MOSFETs in bulk from China, can it be that those are not really IRF540Ns and have quite lower specs?

EDIT:
One more thing. I have created this controller based on the MOSFET driver from here. The guy is using separate power sources for TLP250 and for the load (Vsupply, VMOS). I used the same source for both. Not sure if that matters. And my power supply is 12V 10A regulated so I do not think that the power supply is the problem.

Thanks.


texts:
My first thought was it's not possible but I need a method that could potentially work, just for testing purposes. What I'm trying to do is the following:
I forgot to breakout one BGA pin that I need for testing. However, the pin adjacent to it is broken out and I could use that if I could somehow short the 2 pins together on the bare board and then solder the BGA. A short to the pin itself or to the via.
I was thinking of making a cut from pin to pin or pin to via and filling the space with a thin line of conductive paste, either solder paste or conductive epoxy?


texts: Altium Designer Rigid Flex - Placing Tracks Between Sections

texts:
I've done rigid-flex PCB designs a number of times in the past but it was long enough ago that I cannot remember how I solved this issue. My design has three sections - the main board, the flex, and a daughter board. The flex obviously connects the two rigid boards. The problem is that I cannot seem to place tracks across where the split lines are defined, meaning using the interactive routing tool I can't run traces from the main board over the flex to the daughter board. When I place a trace and move it so that it crosses the line, the error I see is this:

Altium clearly thinks that just because I go from a rigid section to a flex section, that I am going outside the board outline (which is not true). I have no idea what the poly region is, and I do not see anything on the "Multilayer" layer indicating a poly region.

My board stackup is shown below:

I have tried running tracks on all of the four layers and all of them behave the same way.

How does one draw tracks across different sections of a rigid-flex design? My guess is the problem has something to do with the stackup but I can't place my finger on it.

I am using Altium Designer 18.1.7.


texts: rangefinder (very long range), ultrasonic or laser... for arduino?

texts:
I have a maxbotics Ez1 plugged to an arduino

but i was wondering how to build a digital tape measure and to connect it to an arduino, for measuraments longer than 10 feet, maybe 20, 30 feet or more...

I see Stanley sells a digital tape for $29.9 at Sears... I could hack that, but there is anything out there with longer range that ez1

does anybody sells anything appropriate?


texts:
Can the BJT transistors in a Darlington pair be of different types?What are the advantages and disadvantages of a Darlington pair? Is such a circuit able to generate
power by itself?


texts: Is there an online resource for finding microcontroller with specific requirements?

texts:
When looking at digikey with the advanced search chrome extension (Link) on I noticed that some features of the microcontrollers are not recorded (such as MIPI, PCIe, UBC, etc).

Is there a website that does record every (or most) microcontroller features?


texts: Output impedance of a voltage divider with DC bias

texts: I made a circuit simulation of a 200VAC to 0-2VDC for ADC conversion via voltage divider and DC bias with a third resistor connected to a 3.3V supply. What is the output impedance of the divider and how do I calculate it?


texts: Which capacitor in series with resistor circuit to reduce remanence effects of transformer?

texts:
The "Comparative Analysis of Mitigation Techniques for Inrush Current of Transformer" mentions "Pre-insertions resistor with capacitor method" as an inrush mitigation technique:

  When circuit breakers are opened transformer is isolated from network,
  residual flux (remanence) remains in transformer and when transformer is energized
  inrush current will be increased. In order to reduce above affect,
  capacitors are inserted in primary side of transformer which reduces
  residual flux...

and

  The presence of residual flux in the transformer is mainly responsible
  for saturation of transformer core winding result in inrush current
  phenomenon. In order to reduce the effect capacitor is inserted in
  series with resistance.

The as [5] referred "Analitical analysis of transformer inrush current and some new techniques for its reduction" shows a network diagram without showing how to insert the capacitor in circuit:

How does the capacitor in series with resistor circuit look like that reduces the residual flux inrush effect from a three phase two windings star (primary, isolated from network) delta (secondary) isolation transformer?


texts:
I want to drive a 5 metre strip of 300 5050 SMD LEDs. It comes with a 5A power supply but I don't know what the rating are for these LEDs.

The thing is I want to be able to change the voltage using the Arduino from 1v <> 12volt for dimming effect.

What kind of driver should I build for that? And would anybody have a schematic or something that's already available on eBay or similar :)

I am bit of a newb in the prototyping area-but have good skills; and all I need is some guidance in the correct way.

Thanks!

EDIT
Thanks for the great answers- I did find this though.

http://cgi.ebay.co.uk/LED-Bulb-Dimmer-Adjustable-Brightness-Controller-DC-12V-/250828609755?pt=UK_Light_Fittings&hash=item3a668cd8db#ht_1869wt_1140

Guess whats going to be taken apart before it even turned on..
Is this a PWN dimmer? or just a simple Voltage adjuster?

Is it possible to control/replace or build on top of the analogue potentiometer using the arduino? Like for if i turn it on it fades to 100% over a period of 1second for example..


texts:
I'm developing a set of sensor modules that connect to a controller board, that's also developed by me. Though the communication between controller and slaves is RS-485, I'd like to use a USB-C connector because it has some - as I believe unbeatable - advantages like being pretty, allowing hotplugging and also being relatively cheap.
Of course, people are going to plug proper USB devices/hosts in, so I need to make sure none of the devices involved take any damage.
My controller-slave connection consists of a 3.3V supply, GND and 4 RS-485 wires. So the main problem appears to be that my 3.3V will collide with the USB's 5V line and I came up with the below circuit to deal with that:

simulate this circuit – Schematic created using CircuitLab
The idea is, that the op-amp turns off the 3.3V output whenever there is a voltage higher than 3.3V (plus some margin) applied externally to Vcc. The input is pulled high, so the output is off by default and therefore it's off even at the moment, a device is plugged in. In order to get supply voltage, my slaves will pull down Vcc.
I simulated the circuit with LTspice and found that it behaves like I expected, but I still wonder:

Is such an approach legal / is there a general rule that prohibits the (mis)use of usb sockets for different purposes?
A proper USB device connected to my controller does probably not operate at 3.3V. Is it still possible it takes damage?


texts: Regenerating the Gate of a Gated Pulse Wave

texts:
I'm looking for suggestions for alternative solutions to a design problem I have. Basically converting a gated pulse wave back into it's enabling gate. Bottom of the post lists the solutions I've come up with so far.

Background: Immediately following a user input to a black box, the box outputs a pulse wave @ 250Hz, 10% duty cycle for a duration of 70ms (all approximate values).
I need to process this pulse wave output to create a gate output. A constant output gate length of anywhere under 70ms would work, but a cost effective solution for a user adjustable gate length (from say 30ms to 500ms+) is preferred. I sketched up a crude timing diagram to illustrate.

I'll need to implement the circuit 8 times per unit (8 channels of user input, 8 pulse wave outputs -> 8 channels of gate outputs,) so a priority is keeping things compact and cheap.

So far I've tried:
Envelope follower into a Schmitt trigger - cheap and easy for constant gate length.

Non-retriggerable monostable - easy to implement adjustable gate lengths, but $pendy, I haven't found any in quad or hex packages.

I've considered using a MCU; I'll already be using one elsewhere in the design to convert inputs on 8 channels to serial data (requires 9 pins or 2 + a mux). Add to that 16 more IO pins, or 9 + a mux, or 2 + mux + serial to 8bit converter. - This seems like the most spendy solution in terms of time investment and PCB real-estate.

Does anyone have any suggestions for other solutions I could look into?

Cheers!


texts: What determines the upper limit of the capacitive load on a DAC?

texts:
I need to drive a number of piezoelectric actuators. The AD5535B seems promising because of the high number of channels and low cost (and I happen to be able to borrow one for testing) but sadly, the capacitance of my actuators is (way) more than the 200pF specified as maximum in the datasheet.
I can think of two reasons that this limit is specified,

The output source current is limited. A larger capacitance would exceed this rating for large voltage steps.
The amplifier circuit could become unstable due to the capacitive load.

I would think that both problems would be solved by simply placing a >400K resistor in series with the load; maybe a 1M resistor as specified as minimum resistive load in the datasheet. Would that be enough to be able to drive arbitrary capacitive loads?


texts:
I have a Venus634LPx GPS on a breakout board from SparkFun.

The documentation is very cryptic, so I did not manage to configure it manually through the UART (although I can read data from it). Luckily, the SkyTraq GPS Viewer & Configuration program works under wine (I'm on LinuxMint):

I still can't figure out what the pinning parameters mean. The closest thing to an explanation I found online is in a thread from 2009:

  In many applications, the position and/or velocity is represented as point on a display. To make that point appear more visually stable and/or accurate to the end user, position pinning is implemented. In position pinning the reported position will not change unless some user-defined criteria are met.

  The criteria can be set in pinning parameters.

Another website, where they use GPS to build a time server (similar to my own application), says:

  This is what I did to configure my module:

  Enabled position pinning
  Disabled all NMEA strings except for GGA, GSA, GLL and ZDA
  Set update rate to 1Hz and output sync to UTC
  Set baud rate to 9600 (higher is not better!)

Application Note AN0003 from SkyTraq only gives the following relevant information:

What do these parameters mean? Is any better documentation available?


texts: ac current sensing using microcontroller and accordingly perform the operations

texts:
I am working on a project in which I need to monitor the current and if the current increased a particular value then switch off the device. the problem here I am facing is sensing ac current I have gone through sites but not able to get the logic.
1. if we are using ADC how it will be interfaced with microcontroller is the ADC available with microcontroller or separately we have to use.
2. can we use hall effect sensor if yes how.
3. if you have any other method kindly explain


texts: Large 12 kWh 18650 Lithium-ion power pack - best nSmP configuration

texts:
I need to build a 12 kWh lithium-ion power pack for an e-drive system.  The cells will be Panasonic NCR 'B' at 3.4 Ah 18650, which have been sourced at about $3.75 a cell.  Approximately 1,000 cells are needed.  Power is 15 kW.  I am well aware of safety matters and issues with charging strings of li-ion.  I would like to break this pack down into units of 1 to 2 kWh each, to be charged independently.  A 20S balance-protection board can manage a 20S5P = 1,250 Wh configuration.  A smart BMS will be investigated for the 2nd phase of this project.  At C/2, the unit would require a 650 W 84 V 8 A CCCV charger.

Is there a standard for HV e-drive power packs?  The Leaf and Tesla are at about 400 V.  A 5S2Px[20S5P] will provide approximately 400 V at 12.5 kWh.  Is there a recommended, preferred, or popular configuration?  Where can I find such a charger?

Sorry but @DaveTweed is wrong and this question is substantially different from the previous question.  And there is no answer to the previous question anyways.  Has he read the previous answer?  The previous question was formulated in the form of "how is it done" before it was edited and then it went on hold - so no answer is forthcoming.  The new question is very specific and asks if there is a recommended configuration, after explaining all the parameters.

Can @DaveTweed explain how the answer to the previous question is in any way a meaningful answer to this very important question?  The previous answer is "this is too expensive - don't do it".  Is this the intellectual level of Stack Exchange that DaveTweed prefers?  Can DaveTweed read the silly comments to this question and tell me if they are justified?

(question is continuation of Large 10 kWh 18650 Lithium-ion power pack - What configuration? [on hold])


texts:
I am looking at getting 2 Evercool EC8015HH12BP 80x10mm (4-wire) PWM fans. However, I am looking at controlling the fan speed with the arduino via the PWM pins.

I found the following diagram that seems to be what I am looking for in order to hook the fan up to the Arduino:

The code that I think I can use is this:

int pwmPin = 9;      // digital pin 9
int pwmVal = 10;

void setup()
{
  pinMode(pwmPin, OUTPUT);   // sets the pin as output
  Serial.begin(9600);
}

void loop()
{
  if (pwmVal != 255) {
         analogWrite(pwmPin, pwmVal);
         //pwmVal += 10;
         Serial.print(pwmVal);  // Print red value
         Serial.print("\n");    // Print a tab
  } else {
         Serial.print('at max high');  // Print red value
         Serial.print("\n");    // Print a tab
  }
  delay(1000);
}

I gather that the PWM would be in the range of 0-255 when writing out to it from the ardunio? I will be using the DS18B20 Thermometer Temperature Sensor in order to see how fast I need to spin the fan.

However, the fan speed (max 12V right now) never slows down one bit.

I'm using D9 on the Arduino Nano ATmega 328.

The reference is here for the board (in case i have the board pin wrong): enter link description here

Any helpful feedback would be great!


texts: Thunderstorm reseting my micro-controller

texts:
I think this is a follow up from my previous question. If not then please ignore it.
I have created a very basic (crude) alarm system that uses a reed switch. Luckily there was a thunderstorm and some lighting to test out the system. Below is a schematic of the system.
The works as expected, when the magnet is moved away from the reed switch the alarm is activated and sounds the siren. The 12V input is supplied via a Sherlo 3.2A Backup supply. The buck converter is a DC-DC SWITCHMODE BUCK MODULE LM2596. The reed switch is attached to a wooden door and I checked the sensitivity of the reed switch. The magnet needs to be at least 2cm away from the reed switch, so there is a bit of play.
However what I noticed when the thunder came, was the micro-controller reset itself when the thunder started. I know it resets because at the beginning of the code the siren is activated for 3 seconds and then goes off until the reed switch is triggered. I am not sure why this happened.
What additional circuitry can I use to prevent the micro from reseting?
I will bridge the Vcc with the AVcc pin using a wire.


texts: How does the clock skew affect the design?

texts:
What does these statements explain with respect to setup and hold time, I am unable to understand:

If combinational logic delay is very short or clock skew is large enough then output of 1st FF would change (hence input of 2nd FF is changed overriding the previous input) before HOLD time condition for the input of 2nd FF is satisfied and hence circuit would not work properly due to this HOLD TIME violation. Or input of 2nd FF change to create SETUP time violations.


texts:
In the DC compiler user manual the following term is reported when talking about a command.

  Use the set_driving_cell command to specify drive characteristics on
  ports that are driven by cells in the technology library

Can anyone tell me what's the meaning of that "drive characteristic"?


texts: Is there any motor which moves slowly and gives strong torque?

texts: I need a strong torque motor which move slow. However, I don't want to use gear train because gears will be damaged easily by the strong torque. Please give me some suggestion.


texts: Why this short circuit doesn't take all of the current?

texts: When 225 mA comes to the top node, why doesn't all of it go through the short circuit? I think 160 mA on the inductor is what is left from t0- and shouldn't be considered in the equations anymore. I know the solution uses KCL to provide the answer but if only 65 mA goes through the short circuit, where does 160 mA leftover goes? The only possibility I see is that it goes through the inductor but if so current on the inductor at t0+ would be 320 mA or it will have a current of 160 mA as t goes to infinty which is a contradiction to inductor fundamentals.


texts: Planned obsolescence / failure of consumer electronics / kill switch

texts:
General question for those who have worked in the consumer electronics industry:
Are small rechargeable devices (like bluetooth audio devices specifically) designed to fail after a set time to force customer replacement? Is there for instance a mechanism that disables charging once the battery has totally failed or after a certain length of time?
I have heard of AC power supplies having lower-rating capacitors or something that will decrease component life and cause earlier failure.

I've experienced this perhaps 3 times:

Somewhat older electronics:

Motorola HT820 stereo bluetooth headphones - model 1 failed after about 2 years. Lights up on connecting charger but will not charge or power on after being on charger.
Motorola HT820 stereo bluetooth headphones - probably different hardware revision - Failed in same fashion after about 1 year.

Recent electronics

Bose QC35 bluetooth noise cancelling headphones - $350 - Failed after 1.5 years. No lights on connecting charger. Will not charge - Details: Battery was definitely almost at end of life. Disassembled to find the lipo battery inside it. Accidentally poked battery releasing a very small spark. Used it next day until battery depleted. Tried to connect charger after that, no lights, no charge. What the heck? Battery might have been failed/dead completely at that point (0 charge due to short I created?).

On the other hand, I had a lipo based Palm Centro that lasted many many years before it started to display random glitches probably caused by hardware. It lasted clear from 2008 (new model) to about 2014-15?
I've had a lenovo thinkpad T430 that has been running great since 2011, used daily, but not transported all that much (which I think greatly increases mechanical wear on the circuits). I am only now replacing it because it can't run newer games.

So TL;DR: Do consumer electronics have actual kill circuits that make the device fail when the battery really dies or some other timeframe that makes the customer replace?


texts: Save schematic from KiCad / EESchema to png

texts:
I've just drawn my first circuit with KiCad / EESchema (on Kubuntu) to insert my circuit diagram into one of my answers. But I can't find a way to export to PNG (nor gif or jpg).

How can I export my schematic in such a way that I can easily upload it here?


texts: Alternative to diode to allow uniform and predictable voltage drops or On resistance

texts:
I'm trying to design a relatively high accuracy auto ranging Ohmmeter. A typical Arduino example can be found here:

http://www.circuitstoday.com/ohmmeter-using-arduino

The problem with this design is that it uses Diodes to prevent reverse currents. Now to ensure accuracy the exact Diode drop of each and every Diode needs to be known. Initially I thought I could order a "high tolerance Diode" like you can resistors (0.1% etc) but apparently there is no way to guarantee a diode drop.

My next bright idea was to replace all diodes with an 8 channel multiplexer. I had assumed that the "switch" in the multiplexer had an independent resistance but soon found that the On resistance(Ron) of a multiplexer is dependent on the input voltage of the channel selected. Due to the fact that the circuit is used as a voltage divider and there will always be an unknown resistance, the input voltage to each channel will never be the same and so it seems impossible to know what the Ron would be at any given time.

I'm really hoping someone knows of a simple alternative method/solution? I guess relays are an option but they are bulky and seem like overkill. I'm almost tempted to just use diodes and individually measure the diode drop but that makes reproducibility difficult.


texts:
I am designing Zynq-7000 XC7Z020-1CLG484 with single DDR3 chip.
Got following schematic as reference: trenz TE728
Can someone suggest what is value of series resistors for ADDR/CMD lines:


texts:
I am wondering how to properly measure the CMRR vs. frequency of a(n) (audio) transformer circuit. I have found a couple of methods but not sure I understand them entirely.

The main idea I am going off of is from page 7 of this document, with image shown below.

For normal mode, I connect the frequency generator +/- across the primary coil, frequency sweep at a set Vin and record Vout. Simple enough.  But for common mode test, I don’t understand where to connect the generator negative.

From this source, we have:

This suggests connecting the gen (neg) to the center tap of the primary.  This only works if you have a center tapped transformer, and low ohm transformers load the signal generator heavily (at least in my attempt at this).

On the datasheet of a Jensen JT-11P-1, they use the following circuits:

In this case I don’t understand how this accurately measures common mode, since unlike with a normal differential connection, there is no closed circuit (other than maybe capacitive leakage to the secondary?). And returning to the first schematic where a 10 Ohm imbalance is used for testing, I’m not seeing why either leg of the primary would be at a voltage other than Vin from the generator since no current is flowing.

So what is the proper circuit setup to measure transformer CMRR and how should it be measured?


texts: High frequency SPI-like communication: is there any hardware allowing software tweaking?

texts:
I will need to communicate with a device using serial protocol mostly similar to SPI but with several changes:

Data packet can has any bit length (e.g. 35 bits)
Stop sequence formed by lack of clocks for time more than needed to transmit 2 data bits

I could handle this by software implementation of this protocol, but the communication frequency is 40 MHz (20 Mbits/s) so I will need pretty fast controller to handle this.

Now I'm looking for two possibilities:

Use the controller having more flexible SPI (I don't even know where I could look for it, if any of AVR will fit my needs I will be happy).
Attach a hardware shift register to general purpose controller (most likely AVR in my case).

Surely I'd prefer the first option. Any thoughts?


texts: 7 Segment Display Segment C Kmap Confusion

texts:
I am working on the Kmap for the Segment C on the 7 Segment Display.

The list of numbers that light up the 7 segment displays segment C are as follows:

The Kmap I came up with, without grouping yet, is as follows:

Then, when I start grouping, I came up with multiple variations. Some utilize the don't care conditions, and some don't. I'd like to know which one(s) are correct. It seems to me that they are all correct because I am following the grouping rules. If there isn't a single correct answer, then how do  I know if the one I have is an acceptable answer?

Here is the list I came up with:

Finally, looking on the web, I encountered a site where they also have their version of the "solution". However, in one of their grouping, they have grouped 12 1s. One of the rules for grouping was that you can have only 2^n number of elements in a group. So, with that said, I don't know how their solution is correct. Here is the link that I am referring to:
other segment c kmap solution

Can somebody please clarify my confusions? Thanks!


texts: Ferrite bead pi-filter vs feed through capacitors in supply decoupling

texts:
How do I choose a feed through (feedthrough/feed-through?) capacitor to replace a ferrite bead pi-filter circuit? Manufacturers quote capacitance figures but what value should I choose this to be?

The reference design of a CPU design filters out, from a common VDD, various filtered power inputs (several pins per input). Per input, a pi-filter is given plus 100nF per pin. I have read good things about the feed through capacitors and want to replace the pi-filter with one. I am unclear what value of capacitance should be chosen though.

Filter is currently Power->1uF cap->120R@100M FB-> 10uF cap

1uF 0201 caps will be used per pin.


texts: How to calculate stray capacitance on PCB

texts:
I use a 0.4mm spacing between PCB traces (including 0.4mm space between crystal pads and ground) and I believe that's causing stray capacitance.

My circuit board is typical (1 ounce copper on FR4 fiberglass material with height 1.6mm). My ground plane is the largest possible without isolated planes.

I read that the distance between PCB traces has an inverse effect on stray capacitance.

Lets assume the non-ground traces are perfectly straight lines 10mm (1cm) and its thickness is 2.1mm

Given this information, how do I calculate stray capacitance between the traces?


texts:
Admittedly that's quite a beginner question:

When I learned that transistors work like relays and produce the digital values 0 and 1 what I always asked myself was: they have to be triggered by someone, but by whom?

When I turn the light on and off, then it's me who triggers the relay but who is it in an electric circuit or within a CPU? Or when thinking about a flipflop, who tells the transistors to go to 0 or 1?

I never understood how that happens, I image it like the chicken or the egg causality dilemma.