texts: Pre-Defining EEPROM Values in XC8 Compiler

texts:
I'm working with a PIC16F690, using Microchip's XC8 compiler.  I want to embed EEPROM values into the hex file, so that the EEPROM gets programmed at the same time as the program memory.

I've done this in the past with the C18 compiler (it was for a PIC18, not this PIC16), as follows:

#pragma romdata eedata_scn=0xf00000
    rom unsigned char my_eeprom_values[256] = {0, 4, 2, 1, (and so on), 3};
#pragma romdata

The EEPROM isn't actually at that memory space (0xf00000), but it's how C18 accesses it.  You can get this address by looking in the linker script:

CODEPAGE  NAME=eedata  START=0xF00000  END=0xF000FF  PROTECTED

Anyway, this doesn't work in XC8.  There is another statement that is similar:

__EEPROM_DATA (0,1,2,3,3,2,1,0);

But this statement can only take eight arguments, and you can't give it a starting location in EEPROM, as far as I can tell.  So, your code ends up with 32 of these statements (for 256 bytes of EEPROM), which seems unwieldy.

Also, the XC8 User's Manual says that this statement isn't implemented for PIC18's.  This doesn't effect me now, but it will in the future!

Is there a better way to do this in XC8?

Edit:

I opened a support ticket with Microchip and asked this question.  It turns out that the __EEPROM_DATA macro is the only way they recommend to initialize the EEPROM values.

On the good side, this macro does, in fact, work for all PIC18 devices with internal EEPROM.  My misunderstanding came from this statement in the User's Manual:

  2.5.9.4 CAVEATS MPLAB XC8 does not implement the __eeprom qualifiers for any PIC18 devices; this  qualifier works as expected for other
  8-bit devices.

The __EEPROM_DATA macro, however, does work.  I've just tested it successfully.

Even so, this is still unwieldy.  Is there a work-around out there that will allow initialization of a specific EEPROM location, without starting at the beginning?

Thanks again.


texts:
I'm trying to make a linear regulator using an op amp and a pass transistor.

Here is the circuit:

From my limited understanding you can predict the stability of the circuit's feedback loop by looking at the loop gain. By plotting V(fb)/V(in) I'm told the circuit has a phase margin of ~75 degrees and a gain margin of ~25dB.

When tested on a breadboard however the output is oscillating at around 7kHz at 100mV pp. I can reduce the frequency of this oscillation by increasing R5. I can also reduce the amplitude down to nothing by increasing C2 to 68nF (though I would like to avoid this to keep the response time down). The question is, What is causing the discrepancy between LT spice and reality?

Bode plot:

Scope trace:


texts: In a voltage multiplier, must the frequency be low enough to allow for charging in first stage before switching?

texts:
For example, in a four stage multiplier, taking 150 V to 300 V, 450 V, and 600 V...

Is it common to charge the first stage capacitor to maybe 50 V (given a high switching frequency) and propagating that 50 V throughout, to 200 V at the output?

Would it then charge the first capacitor to 50 V, but not transfer any of that voltage since the second stage is already at 50 V? And subsequently the next oscillation charge the capacitor from the 50 V to ~85 V (given the RC curve), then propagate those 85 V throughout?

My main question is, is this the way multipliers work? In order to use a higher frequency and allow lower output ripple, are the stages charged to full output in a sequence?

Thank you!


texts: Electrical Engineering Prelab - Absolute value of gate voltage

texts:
A. In the circuit in the figure, the thermistor resistance is 50 kΩ. What is the absolute value of the gate voltage (voltage at node G) versus ground?

B. How does your result change if the thermistor resistance decreases and becomes equal to 30 kΩ?

I'm a little confused because is says the thermistor is "50 kΩ - 30 kΩ" which would be 20 kΩ... You think that is supposed to just signify both parts of the question (in which case a slash would make more sense instead of a minus sign I suppose. If I had to give an educated guess, I would say -10 V for both parts? I'm honestly unsure.


texts: Processing the signals generated by the sensor at the expense of sensitivity / selectivity

texts:
I'm having trouble finding study material or subject.
Theme: Emphasize the processing of signals generated by the sensor at the expense of sensitivity / selectivity.
I can find material related to sensors, but I couldn't find an explanation about 'processing the signals generated by the sensor at the expense of sensitivity / selectivity.'
Could someone explain or indicate a material (book)?


texts:
I am attempting to model a 3V3 regulator supply that will be powering things like microcontrollers and optocouplers. I have successfully modeled the regulator, now I am attempting to model the loads that it will experience to find what the maximum load will be.
Currently I am simply stepping the load to see how it responds to various "constant" loads and where it begins to drop out (see below).

The issue is, in practice, this circuit is only going to be experiencing short but repeating pulses of loading, in the order of micro/milliseconds each time. So I was wondering whether there was a way of essentially pulsing the resistor value as you would a voltage source, as well as having it step through different resistor values.
I have done a quick search on the web to no avail so hoped you guys might be able to be of assistance.
One thing I am considering if this is not possible, is having a switch (transistor) controlled by a pulsed voltage source that will in-turn pulse the load seen by the regulator. But curiosity has led me to this question before opting for the aforementioned method.


texts:
I've heard that MOSFETs for high frequency circuits are generally configured as common gate.

Can anyone explain why? Could this be related with the internal MOS capacity?


texts:
I'm designing a mosfet PWM device with a rather high current. According to my LTspice simulation the mosfet has an average power dissipation of 20W. The mosfet had a TO-263S package ( https://fscdn.rohm.com/en/products/databook/datasheet/discrete/transistor/mosfet/r6020pnjfratl-e.pdf ). What would be the best setup/design to get rid of this heat? I have two of those mosfets next to each other, so the heat sink should be able to dissipate 40W. Can i just connect the heat sink to the top of the case or are there better alternatives?
EDIT: Datasheet talks about a maw PD of 305W, how can this ever be dissipated out of such a package? Are there special tricks to do so?


texts: Adding push button to CC DC to DC converter to adjust CC

texts:
I have a CC/CV DC to DC converter I bought on aliexpress.

I does not come with a screen so I attached to it an LED voltmeter ammeter.

Anyway everything works fine.

One thing though, I don't know at what value the CC potentiometer is at. To adjust before attaching a load, I short the output and the ammeter gives me the Amps the CC is at. So I can adjust it.

My question is. I want to add a push button which would short the output so I can see the CC value. A pushbutton normally open.

Would that cause problem if there's a load currently attached to the output as well. I'm thinking about sparks and bounces and voltage spikes.

I am a software engineer just tinkering with electronics.

Thanks!


texts: Understanding the Base voltage of PNP when driving NPN transistor is cut off and there is no clear DC bias voltage

texts:
I am studying the Art of Electronics and trying to apply what I have learned to a motor driver circuit from an MITx intro to control systems course (https://www.edx.org/course/introduction-control-system-design-first-mitx-6-302-0x). I have a good understanding of the behavior when the driving NPN transistor is ON (pwmIn is 5V) but I am having trouble understanding the reason why the voltage at the base of the Power PNP is 5V (demonstrated on the scope) when the NPN transistor is cut off (pwmIn = 0).  Most of the circuits in AoE had well defined DC bias voltages at the transistor base and in this case it seems the base is "floating."

Can someone please explain how best to understand the base voltage of the PNP when there is no base current.


texts:
I am really trying to get a decent wireless system with my arduino + amateur radio. I found this IC that decodes FSK signals, and was wondering if it could help me with decoding AFSK 1200baud signals. The IC is the NJM2211. I have no idea how the IC works, how to get it timed correctly, or what it outputs out of that pin.

Should I go this direction? Would this IC help me?


texts: What is the best/accepted way to charge multiple 18650 batteries in series but by themselves?

texts:
I am wondering if I had 4 18650 batteries that I want to run in series, is there a best/accepted way to charge each individual battery?  In other words, instead of having to purchase a 16V charger for all 4 batteries, can I connect an individual charging board (I have several left over from a previous project) to each battery without causing a problem with the output of the batteries being in series?
I realize this sounds like I am over complicating the situation, but I'm just trying to utilize what I have before having to buy something else.


texts: Need a bit of guidance in regards to this PNP transistor question

texts:
simulate this circuit – Schematic created using CircuitLab

Hello!

I'm currently stuck trying to answer this question. The question asks for me to find the resistance of R2 for R1 to be at 4V when the PNP transistor has a beta of 250. My current train of thought was to substitute 4V as the voltage of R1 and solve for current which gave me 80mA, then use Ic = β/Ib to calculate Ib which was 0.32mA. I also worked the emitter current, Ie to be approximately 79mA.

This is where I got stuck, I now know the current of R2 but I don't know the voltage or the resistance so I can't work out either of these values. Is there something I'm not considering here? Am I going about this the wrong way? I'm really confused. Any help would be appreciated!


texts: Solving second order circuits by introducing a new voltage source?

texts:
I was looking at some second order questions on the internet and occasionally I see people introducing a second voltage source divided by "s". They also divide the capacitor by "s" and multiply the inductor by "s". I'm not quite sure how it works. I have taken a look in my textbook and haven't found anything regarding it, so I would love some input on what method this is.

Here's an example of what I mean:

Thanks, I appreciate all the help.


texts: How to route a stepper motor through an H-bridge and back into an Arduino?

texts:
So I’ve gone and tried connecting the VCC and GND of a six lead stepper motor (just the two) to the BTS7960 H-bridge, and through that connected to my numbered 0-n pins for I/O on the Arduino Leonardo.
The only problem is I’m not quite sure if I’m following correctly because I have a few options and none are working at least for me.
I see it’s says use pins in case:

1pwm+1dir

Or

1pwm+2dir etc

I’m not 100% sure if I’m supposed to use any leads other than the  VCC or GND from the motor, because the stepper motor didn’t come with an encoder I had to buy one separately and get that one working.
As of now I’m just connecting:

L_EN > pin 8
R_EN > pin 11
LPWM > pin 9

In case of: 1 PWM + 2DIR

Pin 9 for PWM
Pin 8 for DIR L
pin 11 for DIR R

I’m connecting this through the Arduino Leonardo and just need to know whether or not I messed something up considering the six leads on the motor.
Just to be clear, a one motor set up with two directions is 1PWM 2DIR correct? I tried looking it up but all I got was definitive answers for the methods of how they work but not what they are in terms of application.


texts: How do I plan a long range product with microcontroller that needs long term support?

texts:
I need to use a microcontroller on a system that must stay working without major changes for a long time (decades). To ensure that there always will be replacement parts, I need a microcontroller that will be long run produced or produced by some manufactures in a firmware binary and encapsulation pin compatible way. What can I do to ensure that the microcontroller I choose meets these criteria?

The application doesn't need much computing power. Its aim is to control motors and other industrial systems. A microcontroller of 8 bits capable of changing the state of about 8-16 IO pins at a frequency of 0.5-1 MHz is OK. An ADC may be valuable, but can be replaced by a simple external comparator.


texts: How can I protect a DC switch from arcing and sparks?

texts: I have a DC switch that is being used as the main power switch for an audio amplifier project I am working on. The schematic is shown below. (a few things are wrong with that circuit, but have since been fixed.) Anyway, I am assuming that, since this is an amplifier, I have mainly a capacitive load? What is the best method I can employ to "protect" the switch from the effects of arcing and pitting on the contacts?


texts: Understanding LM386 amplifier component selection

texts:
I am a computer engineering student and I still struggle to understand electricity. I am doing an audio amplifier project and would like to understand the math behind why these capacitor/resistor values were chosen in the LM386 operational amplifier. In concept, I understand it mostly, but I am unable to mathematically justify why these values are the way they are.

This may not be the best example of this op-amp's implementation, but its the most consistent I have seen in my research.
Also, that 10k resistor is a potentiometer.
Thank you.


texts: Effective software switch debouncing AVR

texts:
Maybe simple matter, but causes some troubles.

Do you have any effective and simple ways for switch bouncing elliminations?
I'm doing an experiment and I've connected micro-switch to a digital I/O in AVR and LED for the testing,  and I'm struggling with it. I need method which works in background (not delay()) and not very sophisticated. Just a simple way.

So far I tried those ways:

1.

   #include <avr/io.h>

  #define LED (1<<PB5)
  #define BUTTON (1<<PD0)

  uint8_t key_lock = 0;

 int main()
 {
   DDRB |= (1<<LED);
   DDRD &= ~(1<<BUTTON);
   PORTD |= (1<<BUTTON);

   while(1)
   {
      if (!key_lock && !(PIND & BUTTON))
   {
      key_lock = 1;
      PORTB ^= LED;
    }
    else if (key_lock && (PIND && BUTTON))
   {
      key_lock++;
    }
   }
  }

2.

 #include <avr/io.h>
 #include <avr/interrupt.h>

 #define LED (1<<PB5)
 #define BUTTON (1<<PD0)

 volatile bool  state_but = false;

 int main()
 {
   DDRB |= (1<<LED);
   DDRD &= ~(1<<BUTTON);
   PORTD |= (1<<BUTTON);

  // Timera0  overflow
  //F_CPU = 16MHz. time interrupt 16 ms
  TCCR0B |= (1<<CS02) | (1<<CS00);
  TIMSK0 |= (1<<TOIE0);

  sei();

   while(1)
    {
    if (state_but == 1)
     PORTB ^= LED;
    }
   }

  ISR (TIMER0_OVF_vect)
  {

    static uint8_t state_last = 0, state_new;

  //1- ON, 0 - OFF
  state_new = (~PIND & BUTTON);

   if (state_last == state_new)
     state_but = state_new;

    state_last = state_new;
   }

3.

      #include <avr/io.h>
      #include <avr/interrupt.h>

    #define LED (1<<PB5)
    #define BUTTON (1<<PD0)

   volatile uint8_t counter;

  int main()
 {
 DDRB |= (1<<LED);
 DDRD &= ~(1<<BUTTON);
  PORTD |= (1<<BUTTON);

    //  Timera0  overflow
 //F_CPU = 16MHz. time interrupt 16ms

  TCCR0B |= (1<<CS02) | (1<<CS00);
  TIMSK0 |= (1<<TOIE0);

    sei();

 while(1)
 {
     if (counter == 2)
     PORTB ^= LED;
  }
 }

     ISR (TIMER0_OVF_vect)
     {

         if (!(PIND & BUTTON))
       {
         counter++;
        }
       else
       {
         counter = 0;
       }

       if (counter > 2) counter = 0;

   }

And none of those  works so good. Sometimes when I push the button it appears random states and LED blinks without control.

I need to add that I'm using ATmega 2560 (Arduino MEGA) but programing only in C, as you can see.

Any ideas?


texts:
I am trying to implement a simple capacitive touch sensor using the STM32F0's TSC peripheral. I currently have the following setup. (PA1 and PA2 are switched in the schematic, accidentally)

simulate this circuit – Schematic created using CircuitLab

I use the following function to set up the TSC peripheral.

void setupTSC() {
    RCC->AHBENR |= RCC_AHBENR_GPIOAEN;
    GPIOA->MODER |= (0x2 << (2*1)) + (0x2 << (2*2)); //enable AF for PA1 and PA2
    GPIOA->AFR[0] |= (0x3 << (4*1)) + (0x3 << (4*2)); //enable AF3 for PA1 and PA2
    RCC->AHBENR |= RCC_AHBENR_TSEN;
    TSC->IER |= 0x01; //enable end of acquisition interrupt
    TSC->IOSCR |= 0x04; //enable G1_IO3 (PA2) as sampling capacitor
    TSC->IOCCR |= 0x02; //enable G1_IO2 (PA1) as channel
    TSC->IOGCSR |= 0x01; //enable G1 analog group
    TSC->IOHCR &= ~(0x06); //disable hysteresis on PA1 and PA2
    //TSC->IOASCR |= 0x04; //do I need this?
    NVIC->ISER[0] |= 1 << TS_IRQn; //enable TSC interrupt
    TSC->CR |= 0x01 + 0x00C0 + 0x02; //enable TSC and start acquisition
}

And then use the following interrupt handler for when acquisition is completed.

void TS_IRQHandler() {
    char s[16];
    itoa(TSC->IOGXCR[0], s, 10);
    TSC->ICR |= 0x03; //clear interrupts
    writeLine(1, s); //prints s to LCD so I can verify delay
    TSC->CR |= 0x02; //restart acquisition
}

However, no matter what I do, the TSC always counts up to the maximum value (16383 with my configuration). I have tried using larger and smaller electrodes, replacing the electrode with a capacitor to ground (to test), but nothing works, which makes me think my setup is incorrect. What's going wrong here?

My oscilloscope shows that both the sampling capacitor and electrode are charging, but the count register never returns anything other than the maximum value.


texts: Half Bridge with dual powre supply and two N-channel Mosfets?

texts:
I wanted to ask (can't find a straight answer) if it is possible to make a half bridge with two N-channel MOSFETs (I have the solution with one nmos and one pmos, but I'd like two nmos).

For the botton Nmos I have a gate driver that is referenced to Ground and V-, and is active low.
I'm not sure how it would be with the top nmos.

any help would be appreciated. Thanks you very much.

edit: to answer a couple of questions, this is more or less the system. Ignore values of the load. This is just to show how is the set up. The FPGA gives 2.5/0 V signals (one to turn on a MOSFET and one to turn off the MOSFET). Each driver receives those two signals and it is composed of a BJT stage to bump up the signals and an other BJT stage to drive the mosfets.
I cannot show my driver circuits, but the bottom driver is supplyed by +2.5v (this would be the reference) and -24V. I'm just not 100% sure how to make the driver for the top MOSFET, for my current circuit with a top PMOS the gate driver is between +24V and GND

Load to the Half bridge is a LP LC filter and a phase of a motor


texts: Understanding purpose of components in a half bridge driver circuit

texts:
I'm currently trying to learn and understand about creating an H-Bridge using two half bridge drivers. The half bridge drivers I have are IR2184.

I found a circuit diagram someone else has designed using the same driver ICs but I have some questions about it.

I've seen several similar circuits where resistors are placed in line with the gates of the mosfets - What are those resistors for?

Also on the circuit above the designer has placed some diodes parallel to those resistors. Is there a reason for doing that?


texts: How to find the correct graph for variation of capacitance with time.?

texts:
First of all I have to admit that this is a homework type question.  Figure below shows  you the question

My thoughts towards this question

Capacitance for parallel plate capacitor  is given by the following formula

So here when you insert the dielectric material what is the parameter that is going to be varied? I believe the distance between the plates are varying. But I am not quite sure about that.

Anyways the answer in the answer script is fourth one. I don't know how they get it.So I seek your help


texts: How to generate Assembly drawing in Altium

texts: How to generate Assembly drawing with designators inside the boxes like this in Altium? Is it by placing designators (silkscreens) inside manually? I guess not.


texts: Relationship between AWVALID and WVALID in AXI4-Lite interface

texts:
I am implementing an AXI4-Lite slave interface in FPGA and I want to have the read/write operations to complete in as few clock cycles as possible. With that in mind, can I assume any specific relationship between AWVALID and WVALID coming from the master? Such as AWVALID and WVALID will always be asserted together or one would come certain number of clock cycles after the other?
  PS: The master interface I'm working with is the Xilinx DMA/Bridge Subsystem for PCIe.


texts: Looking for a consolidated datasheet for commonly used transitors

texts:
I found it challenging to look for individual transistor pdf datasheets with somehow different layout styles then extract common parameters. Is there any consolidated datasheet or table that lists the essential parameters for common transistors? I came across this table in an article ( https://www.digikey.com/en/articles/transistor-basics ), and I found it very useful.

I am hoping to find something similar for a broader list of transistors.


texts: time constant confusion of second order system

texts:
For first order systems, its easy to get the time constant by using thevenin concept.

Suppose i have a second order system ,for example consider a two stage cascaded LOW PASS FILTER with identical resistance and capacitor values.

I am sure that this system will have more than 1 time constant.

However,

My guess is that the transfer function of desired output with respect to input voltage  will have 2 poles and the reciprocal of these poles will give the time constants.

I am confused whether depending on the output of interest, will the poles change, i think it won't but i am not able to convince myself.


texts:
I found a board by dumpster diving. I am almost sure that it is SMPS board. I didn't understand black strips at the bottom of the PCB marked by red rectangles. By the way, it is a single layer board with all thru hole components. I couldn't peel off them. They most likely on bare PCB like a solder mask layer.

Can anyone explain usage of this strips? My first thought was isolation but i am not sure about it. For example, the rightmost one is wierd. Does it provide an extra isolation layer in addition to the solermask between traces and legs of component?

Edit:

This is photo of the other side. Sorry about quality. At that moment, I can't take a new one. Bottom-left corner of the following photo corresponds to bottom-right corner of photos above.


texts:
I'm working in a digital engineering lab and I'm trying to figure out how this debouncing circuit works. It's provided as-is by Xilinx but I'm not quite sure why it does what it does. Any pointers, perhaps? Following is the VHDL code:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity Debouncer is
    Port ( CLK : in  STD_LOGIC;

           Sig : in  STD_LOGIC;
           Deb_Sig : out  STD_LOGIC);
end Debouncer;
architecture Behavioral of Debouncer is
 signal Q0, Q1, Q2 : STD_LOGIC := '0';

begin
process (CLK) is
begin
 if (CLK'event and CLK = '1') then
  Q0 <= Sig;

  Q1 <= Q0;

  Q2 <= Q1;

 end if;

end process;

Deb_Sig <= Q0 and Q1 and (not Q2);

end Behavioral;


texts:
I've been stuck on this for a few days now and I can't seem to get my stepper to work.
Last week, I bought a stepper motor (nema 17 size, 1.5A) and an A4988 driver to play around with. I hooked it all up and was working great. The other day I decided to remove the pins from the driver and solder wires to it instead, which I don't think damaged it. When I hook everything up, the motor just vibrates and doesn't turn (It looks like it's moving a step forwared then one back constantly).
I've seen lots of similar questions on this site and none of the answers written there work for me. I have tried: switching the polarity of one of the coils, tested for continuity on the coils, tried a different power supply and grounded the MS pins (so that the driver is in full step mode).
I've got the driver configured to deliver about 1A to the motor and I'm using an arduino to control the step pin.
Below is my circuit digagram (Please Note, the switch is actually a toggle switch which either connects reset to ground or 5v, and the step pin of A4988 is actually connected to pin 9 on arduino):

And here is my code for arduino:
  void setup() {
    pinMode(9, OUTPUT);
    digitalWrite(9, LOW);
  }

  void loop() {
    digitalWrite(9, HIGH);
    delay(10);
    digitalWrite(9, LOW);
    delay(10);
  }

Thanks for any help.
EDIT: Here is the link to some photos of my setup as requested by @Jakob Halskov
http://imgur.com/a/QDqxh7W
EDIT 2: So after re-soldering alot of the connections on the driver (I also switched coil a and b around) and changing the 5v input pin on arduino (as suggested by @Jakob Halskov), the motor is now running, albeit with an extremely small amount of torque (It only takes a light touch to stop it). Later on I will test the motor at different speeds but I can't verify it works at the moment. The current delay is 10ms.
EDIT 3: Motor decided to stop working and vibrate again


texts:
I am just a hobbyist attempting to place some remote battery-powered Arduino sensors around my home and needed a way to save power when the sensor is not taking a reading.

Initially I was using the DeepSleep function, but through more searching I found an example sketch & schematic which meant that the Arduino could in fact be completely powered-down, instead of just in DeepSleep and save even more power.

The sketch I found here: PuceBaboon/ESP8266-DS3231

The schematic here: Having trouble determining the circuit employed

Here is a copy of the schematic from the above link:

Now with my limited understanding, I assumed that the polarized capacitor symbol C1 was probably incorrect as the 220pF is likely to be a ceramic cap. So I built my own version for prototyping, following my slightly redesigned schematic, here:

I found that when using a 220pF cap, the circuit did not function as intended, i.e. the Arduino was never powered off.

As you can see in my above schematic, I placed a polarized 1uF cap in C1. This was after experimenting and failing with the 220pF and that the 1uF cap was the smallest value polarized cap I had at my disposal at the time.

Now my circuit works and seems to work flawlessly, running for 2 weeks now taking a temperature measurement once per hour and the rest of the time there is no power through the RTC or the WeMos.

The battery pack input is 3v3 regulated and uses 2 x 18650 batteries.

For my better understanding, I wish to be able to calculate the correct value capacitor for C1 and not just leave it as working due to luck and what I had lying around.

I've done a little research about capacitors, but I am still extremely hazy on how the value is determined for my schematic.

Thanks in advance.


texts:
I am an entry-level hobbyist. I am trying to find a delayed turn off relay for a light, but all the ones that I can find I don't understand how the switch fits into the equation.

Taking this relay as an example:

The picture perfectly describes everything except for where the switch itself should be wired in. Obviously it's not on the incoming as that would switch on/off the entire thing, and obviously not on the load, as that would switch on/off only that?

Thanks in advance!


texts: How to lift the Flip Flop D equations of an ASM-Chart?

texts:
For example, I have the following ASM-Chart already done,which represents an automatic door
:

With moving sensors...
It has 4 state blocks, there are 3 Inputs:
P - Presence Sensor, A - door is completly open , F - door completly closed;
And 2 outputs: SF-The direction of the door (closing or opening) with SF = 1 means its closing and finally ON - which means the engine is working (the door is moving).
I have now  to lift the state equations for Flip Flop's D. I already have the solutions but i don't know how to get there or what method to use,


texts: Is Bluetooth Low Energy (aka Bluetooth Smart) Full Duplex?

texts: Can I transmit and receive at the same time?  Does this vary by silicon vendors?


texts:
I'm designing a circuit where I want to be able to adjust the effective capacitance between two points, A and B.
To do this, I've essentially put a dip switch into a circuit with a bunch of caps on the other side. My goal is that I'd like to be able to turn off and on various combinations of capacitors to be able to achieve different levels of total capacitance.
In the diagram below, ignore the part numbers and just assume the caps can take on any value.
Am I doing this sort of thing right? Is there a better way? Also, is it OK to have the return path on the bottom and still expect the capacitor values will add up as a linear combination? Typically when I see this sort of thing the last capacitor in the parallel group is the return path.

As some context, A and B will get connected to pin 8 and the junction on pin 1 in this circuit.


texts:
I try to build mazzili zvs with 2 IGBT toshiba MG75Q2YS40 75A 1200v.
For the each fast diode, I use 2 pieces DSEC60-06 A 600v 30A in series to get 1200v.

for this, I use 2 power source:

12 volt for switch the gate.
0-80 volt (from variac + bridge diode + capacitor) for the main power

because the gate only use 12v power, I don't use zener.
at first, no problem at all. it work normally.

Then I try to add the resonant capacitor by directly (without turn off the zvs) put second capacitor to the first capacitor in parallel, just by touch the second cap to the first cap (no solder,no screw).

when I do this, arc come out from the connection of the second capacitor and suddenly both IGBT failed together. at that time, I only use about 20 volt for the main power.I don't know exactly when the IGBT blown, when the second cap is connected or disconnected. because it's happened very fast.

I try to re-read the schema, but still don't find reason why both IGBT failed together, but the fast diodes is OK.
maybe someone know why both IGBT suddenly failed ?
thank you.


texts: Soldering time for HC49 through-hole crystal without damaging it

texts:
I do a lot of circuits using through-hole technology, but one part that just does not want to work perfectly every time is the HC49/S crystal even though it is installed correctly.

When I replace one crystal with another one of the same frequency, the crystal works correctly.

I am wondering:

Is there a limit on how long the hot solder tip can touch the crystal lead before a crystal malfunctions?

The reason I ask is because the PCB tracks I make for the crystals are about 2mm wide to lower the impedance between the crystal and the microcontroller and I want to make the connections smooth.

Datasheets with crystals are hard to come by because I order many on ebay, and some from futurlec.com and some from a local shop.


texts:
I have several motors, and a microcontroller.  The microcontroller sends 3.5v signals to the motors, which are powered by a separate 5v source.  (The microcontroller also runs off the 5v.)  Problem is, it seems like the power supply is insufficient.  When the motors start up, or when they're all trying to move, they often behave strangely, and the microcontroller sometimes resets.  If I increase the voltage, they behave better - but I have to increase it to like 6v, and I'm worried about pushing it much farther, since the microcontroller and motors are only supposed to get 5v.  Looks like the motors draw up to half an amp, collectively - which is a fair amount for small motors, but not THAT much.  With a multimeter, I've seen the voltage drop by over a volt.  I've tried two variable power supplies and a set of 4 AA batteries, and they each show significant voltage drop.  (One of the supplies was supposed to provide up to 3A.  Note that both supplies seem fairly inaccurate in the voltage they claim to be producing vs the voltage they're actually producing.)
How do I get the voltage to STAY at 5v?  (Or at least within 50mv of, say, 5.5v?)  Is there a particular style of power supply I need, or a special intermediate box, or do I just need a massive stack of batteries in parallel?  I wasn't measuring voltage AT the battery tips, merely at a convenient spot a little further downstream; only wires/connectors in the way - maybe the wires were adding some resistance??
Here's a video demonstrating the setup, and the problems.  Demonstration video
Here's a diagram of the connections:


texts: What is the "temperature code" of a soldering tip?

texts:
I am looking for a replacement tip similar to the ones below on the picture. On the bottom of my tip there is a number 6 which might be this "temperature code" that I found next to these types of tips on certain sites. I already found out that these are magnetic tips, but I'm not sure about the significance of the number. Does it even matter?

I only found this old soldering iron recently so it's quite new to me, and I'm not sure if these tips are rare, because they seemed harder to find.


texts: Recognize blowing or clapping hands with microphone sensor(Arduino Uno)

texts:
I want to recognize between blowing or clapping hands with microphone sensor(Arduino Uno) and than with DSP to know which gesture is made.

I took a lot of samples but when clapping there is no difference on the output values on arduino(the same like there is silent).

thank you.


texts: How to calculate loop delay in avr based architectures

texts:
I am trying to do some high time precision work (well not that high, but more than normal) and would need calculate the time delay generated by a small loop. Can anyone help me with that? These are just generic instructions like these

for(i=0;i<=100;i++)
{
if(i<x)

    PORTA |= (1<<0);
else
    PORTA &= ~(1<<0);
if(i<y)
    PORTA |= (1<<1);
else
    PORTA &= ~(1<<1);
if(i<z)
        PORTA |= (1<<2);
else
    PORTA &= ~(1<<2);

}

This is just an example.

The controller is an ATmega32 working on the internal 8MHz RC oscillator.


texts:
I am designing a power supply adapter for a  7" LCD PH720128T003-ZBC02.
The main voltage is 3.3V. This is enough for the internal logic regulator (VDD) and analog circuit (VCI) but not for the backlight, so I must design a step-UP DC/DC converter.
On page 9 of datasheet, the  forward current is stated If=90mA and forward voltage as Vf=19.2V.
Is this the total current for the backlight LED?


texts:
I'm designing a simple overvoltage / reverse voltage protection circuit for a 24V battery system, with plans to upgrade to a 48V lithium setup in the future.
I selected the parts to trigger on a voltage slightly above 60V. I haven't used SCRs before in a circuit, but from my understanding it will begin to amplify current similar to a BJT when the threshold voltage on the gate is exceeded.
Note: [Battery+ In] is the battery connection, [Battery+ Out] is the load side

simulate this circuit – Schematic created using CircuitLab
My concern is that the leakage current through D1 will place the gate voltage at at least 1.1V due to the forward drop of the 1N4007, and that leakage current will amplify and cause power loss through the SCR. Most SCRs I have been looking at have a threshold of 0.8-1.1V, Would choosing an SCR with a threshold voltage of 1.3-1.5V be enough to counteract this leakage?
I'm not sure what parameters are important in the SCR. The PTC can have a hold current of 3A, with a trip current of 7.5A. The datasheet says conducting around 15A will trigger it the quickest, so the SCR will need to be able to handle at least that. The +BATT input will be fed into 2 wide input range DC-DC converters to power other devices, each with filters on the inputs.
If there are any other problems with this circuit I'm glad to receive any feedback!
Thanks


texts: I have a modem with a rating of 10 VDC and 1A but I dont have a adaptor for it. Instead I have two 5VDC and 1A adaptors. Just wanted to know if I connect these adaptors in series would It work ?


texts: Which library to use for FT232H, libMPSSE vs libFTDI or something else?

texts:
I have an FT232H chip, which supports a max SPI speed of 30 Mhz, I am interested in writing a library which uses the maximum speed of FT232H. And control 4-5 GPIO pins at the same time.
I have come across two libraries, libFTDI from Intra2net, and libMPSSE. I am having a difficult time choosing which library to rely on.

Officialness: libMPSSE is official and works out of the box. Whereas libFTDI doesn't seem to be that official and is maintained on a private git?
Driver Requirement: libMPSSE works with an MS Windows Certified Driver that is tested. Whereas libFTDI you need to switch to libUSB and work with that.
Maintainance: libMPSSE has a source that has been distributed as a zip file, with no official host. And no recent release. I believe I can pinpoint the latest version to be ~2015/16. libFTDI has a recent release as new as 7 July 2020 with version 1.5.

I am conflicted to decide which one to go for. What are the recommendations that you might have for me to choose one way or another? Importantly are there any other options.
Summary: libFTDI or libMPSSE or is there any other library I need to consider while working with FT232H to make a production quality code?


texts: connecting single phase motor to UK mains AC

texts:
I have a single phase single volt (UK 220-240) 1Hp electric motor with two capacitors, start and run.  As photographed.  This is to run my Milling machine.  I need to connect the motor, via appropriate switch gear, to mains AC.  I appreciate the earth wire connects to the "seventh" terminal at the side.  But I have no idea where the Live and Neutral wires need to connect.

I appreciate that the metal strips (as photographed, shown between U1/W2 and V1/U2) manage the rotation, and presently are connected for forward/clockwise rotation, and can be changed to U1/V1 and W2/U2 for reverse/counter-clockwise rotation (which I will probably use).  But for either scenario (CW or CCW), to which of the terminals should the Live and Neutral AC wires be connected?

If someone could offer a clear answer please - in terms of U1 etc as per photograph - as I've scoured the internet and have fried my brain looking at too many conflicting options (mostly involving 3phase despite specific search criteria).


texts:
I would like to ask what is causing the following phenomenon. I've spotted this on my real buck converter at a low duty cycle first, then tried in my SPICE simulation as well which confirmed this.

Let's have a following simple buck converter:

I've set V2 to 50kHz and 1% duty cycle. The FET on time should be 200ns at this point. But the transient analysis shows this:

Voltage pulse at V2 really takes 200 ns but voltage Q1-D roughly 600ns!
Interesting is that the voltage Q1-D rises almost instantly at turn-on but takes a long delay at turn-off.

Datasheet for given FET says:

tdon 22ns
tr 99ns
tdoff 110ns
tf 92ns

These are for slightly different test conditions but that should not be the matter here. At least not the reason for such a long turn-off time. For these times I would expect the Q1-D pulse to last ca 300ns instead of 600ns.

Is there some additional restriction about switching MOSFETs on for a very short time?

Note: This simulation has been done in Simplis Elements 8.1. In real application I use a different MOSFET even with shorter datasheet times but the off-delay is even longer.


texts: Why would cleaning my OSH Park PCB result in residue left over?

texts:
I recently bought a PCB from someone that was created by OSH Park.  Other than the pictures online, this is the first board I've seen from them.  Even though I didn't buy the PCB directly from OSH Park, it was very clean when I received it from the seller.

Anyway, after handling the board (with finger prints) and soldering all of the components, I decided to clean it with 99.9% pure isopropyl alcohol.  I do this all the time with other PCB's.  I use Kim wipes, Q-tips, etc. and gently wipe the boards.  I allow adequate time for drying.  But for some reason, much of the board has a sticky residue left over which really has me puzzled.  Oh, and yes, my hands were clean before I started...there are no obvious contaminants floating around and my house is smoke-free.  :-)

My other boards don't have this problem.  Plus, the bottle of alcohol I used was brand new...even had to break the seal on it so I don't believe it was contaminated.

Any ideas what this could be?  I wouldn't think it's the purple solder mask OSH Park uses.  I've read lots of good things about them.

The board works great.  Just really puzzled why it is so much harder to clean than the hundreds of other boards I use.

** EDIT **

The flux makes sense.  I just remembered that I cleaned the board BEFORE and after I soldered the components.  I don't normally clean them before I solder them.  Soldering the components more than likely burns off most of the flux which is why I never noticed it when I cleaned the other boards after.  I didn't know that about IPA and flux.  Learned something new today!  Thanks.


texts: Placing covered vias routing signals under microcontroller termal pads is a good practic? I mean to reduce soldered termal pad area to center(connected with vias to gnd) and place covered(with soldermaks) signal vias in the inner corner of IC package.


texts: Why are consumers located near high-voltage lines typically not connected to those lines but instead are connected through a lower high-voltage line?

texts:
A typical grid uses 110..500 kilovolts lines to deliver electricity to substations which lower that to 6..20 kilovolts and then lines with that lower voltage get to consumers where yet other substations are located which finally lower those 6-20 kilovolts to consumer voltage (100 or 230 volts or whatever the local standard is).

Those 110..500 kilovolt lines often pass through areas where those consumers are located. Consumers could be connected to those lines via transformers accepting say 110 kilovolts and outputting consumer voltage. Instead those lines run to faraway somewhere and then another powerline runs back with some lower voltage and a consumer is hooked to the latter. That's a lot of extra wiring.

What's the reason for this design? Why not hook consumers to the closest powerline?


texts: Why should I worry about a motor causing my supply voltage to shoot up when the back-EMF can't exceed the supply voltage?

texts: I have heard people say that in motor control circuits, one must take precautions to keep the motor from feeding back into the power supply, causing the supply voltage to rise, consequently breaking things. But how can this be? Unless some external force is accelerating the motor, the back-EMF can never get higher than the supply voltage. How then could it ever drive the supply voltage higher?


texts: importance of voltage Gain of an audio Op amp

texts:
I have been looking into audio amplifiers theory.
So I understand that in the output you need a current gain in able to drive low impedance loads.
But I am having difficulty in understanding why it is important to have a high voltage gain at low frequency for the IPS(input pair stage) and VAS (voltage amplifier stage).

Why is a high open loop gain so important for low distortion ?

What would happen if the open loop gain is lowered significantly ?
by for example excessive emitter degeneration

Does anyone have an intuitive explanation?


texts: Export Gerber File from Keysight ADS and import in Eagle

texts:
Hello,

I want to import my microstrip patch antenna design from ADS into my Eagle-Board-View. Therefore I exported a Gerber-File, which looks good in the Gerber-Viewer. Inside Eagle, i used Gerber-Import-Function.

Unfortunately, it doesn't correctly represent certain parts of the design (e.g. curves), like it is shown above (1: what the gerber-viewer-program shows and how it should be; 2: eagle-screenshot)

Can anyone help me?
I don't have any other useful File-Import-Option (a DXF-File is even worse importing), I tried to change different export-options for the Gerber-export in ADS but they don't change this problem.


texts:
My Altium Designer does not show any violation, even if I place 2 components right above each other.
Im quite the beginner at PCB Design, but does someone know the answer to my problem?


texts: Can I use LC 16340 batteries to power a Raspberry PI 3 B

texts:
A long time ago I accidentally bought a bunch of LC 16340 lithium ion batteries that have been recently wasting away in my office. I am not big into EE but what I think I know is I need a discharge circuit for these batteries to ensure the 5.1v 2.5 amp needed by the pi. Problem is I can't find a board that supports 16340.

So question is, how would I use 16340s (in whatever configuration) to power a Raspberry Pi B? Or is that even possible?


texts: Oscilloscope can't save data to disk fast enough

texts:
I am using an oscilloscope from LeCroy and am confused as to how to have the scope sample and write data to disk at 1kHz.
When I run the
Low-Speed Measurement Data Logger Script which would make the scope acquire and save data to a file on the hard disk, even though I programmed the script so that it would write to file every 1 millisecond, the actual file results show that data were logged every 100 millisecond.
I realize later that the scope requires time to acquire and process the data which caused the delay.
I also tried to find ways to live-stream data from scope to my computer, which failed due to hardware constraints.
What are some other ways to enable faster data logging on the hard disk?


texts: How to prevent PV input to charge controller if battery breaker trips

texts:
I have a 20amp mppt charge controller (EP Solar tracer 20a).  In the manual it states:

  WARNING: Connect battery terminals to the charge controller BEFORE
  connecting the solar panel(s) to the charge controller. NEVER connect
  solar panels to charge controller until the battery is connected.

However, if the breaker (or fuse) between the battery and controller is ever tripped, then it will essentially put the system into this state.

Is there any way to prevent this from happening?  Or is this not something that I should really be worried about?

Update:

Currently the charge controller is connected to the same breaker as the system load (mainly for the convince of being able to disconnect the entire system in 1 switch).  I'm wondering if this might make the scenario above more likely to occur and if I shouldn't run a separate fused line to the battery directly from the charge controller.

Here is a diagram of what my current wiring looks like:

NOTE: I couldn't find the breaker symbol so I used the switch.  Also the circles are junction blocks that I added for convenience


texts:
I'm developing a UI for embedded system application.
I have to handle few critical tasks always which are being called in main infinite while() loop.

Program flow enters into sub-menu if key is pressed.  Since sub-menu has its own infinite while() loop therefore control can not return back to main loop by on its own.
It makes accessing of critical tasks impossible as long as sub-menu is active.

Is there any way to serve tasks in sub loop which are being called in main loop only?
One way of accessing is to call them in sub-loop as well. But I don't think its a right approach since UI has 50+ sub-menus and also does sub-loops.


texts:
I have sine +/- 10V (20Vpp, no dc offset). I would like to divide it and move to have sine 0V to 2.5V respect to the ground (+/-1.25V , 1.25V dc offset). I can use only one opamp, 1.25V signal is available on the board.

I was thinking about something like below but I suppose that this is not good solution - R divider will be loaded.

It shall be precise to measure generated signal on ADC.

simulate this circuit – Schematic created using CircuitLab

It's better to not inverting signal but this is acceptable.

Cheers


texts: Flyback Transformer Primary Inductance Calculation

texts:
Can we prove the inductance value of this datasheet using calculation based on it test condition (10kHz,100mV)?

Previously I can get almost similar result using LCR meter however I want to know how the value is derived without measurement. Is it possible?

Source Design Note – DN05086/D

Thanks.


texts: arduino "reset" / hangs when load is connected to pwm out

texts:
I have an Arduino UNO and a IFX007T BLDC motor shield. I changed the PWM frequency to 32kHz on the arduino on pins 9, 10 and 11 and created a code that is just creating a three sine waves (120° degree separated) on the three pins. The output on the oscilloscope of the Arduino looks fine, but once I connect the shield (even without a motor) the Arduino randomly resets - but it is not a true reset, because the timers of the Arduino are still running; the PWM still exists, it remains in the last state.
Does anyone know what could cause this behaviour and how to mitigate it? The problem also appears with lower PWM frequencies. Also the three IFX007 get quite warm, but that is probably due to the output capacitors getting charged/discharged with the PWM frequency when no motor/inductance is connected.
Side note: I know there exists example code for the Arduino, however this code did not seem to work - I already opened a thread on the Infineon forum about this issue. The hardware seems okay when I run a self-written block commutating code that has 1 phase low, one phase floating and one phase with a PWM. There is no strange behaviour with this code, only when there is a PWM on all three phases continuously.
I'm using a 12V 40A power supply for the shield (the Arduino is powered through 5v USB) and a 125W bldc motor.


texts: Is there a way to stop servos from "shaking"?

texts:
Very simply, I am controlling servos(9g Micro Servos) based on some data read in from elsewhere. Everything works fine except that the servos will constantly "shake." That is, they vibrate back with very subtle movements (with intermittent movements of 1/2 -> 1cm or so).

I tried correcting this issue in software by doing something like:

  do{
    delay(DTIME);
    positionServo();
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("X position: ");
    lcd.print(xRead);
    lcd.setCursor(0,1);
    lcd.print("Y position: ");
    lcd.print(yRead);
  }while( readChange() ); //while there has been change

Where the do-while is necessary initialize the variables that store the mapped servo value(using the arduino servo library).

The readChange() function is defined as:

int readChange(){
  int x_Temp, y_Temp;

  x_Temp = map(analogRead(x_axisReadPin), 0, 1023, 0, 179);
  y_Temp = map(analogRead(y_axisReadPin), 0, 1023, 0, 179);

  if( abs(x_Temp - xRead) < DEG && abs(y_Temp - yRead) < DEG ) return 0; // no change
  else return 1; //change
}

Where xRead is the value that was initialized (the first, mapped servo output).

Although, this really is not a good approach. It requires that BOTH values must not have changed by a factor of DEG (~10 degrees, or ~0.28V in my case). If I write the function such that either OR be less than DEG, then what if I was only changing one servo at a time? So there is a delimma ..

Is this simply a property of servos (perhaps cheap ones?) or is there a workaround?

It would be much simpler to include a pastie link. Here is the full code:
http://pastie.org/8191459

I have attached two servos together with a laser pointer to allow for two degrees of freedom (X, Y). There are options, based on the state of several buttons, to control the servos in various ways. The first is "Motion" where I have two photoresistors that, based on the amount of light exposure, affect the position of the servos. I have not yet implemented the code to control the servos by an Xbox controller. And the third option is just randomized movement.


texts:
I'm struggling to find any information on how the interrupt outputs on the MMA8452Q accelerometer are driven. I need to know whether they're open-drain or push-pull for example. I've poured through Google and can't find anything pertaining to how the outputs are driven.

How are the INT outputs being driven on the MMA8452Q accelerometer?


texts: building a 900Mhz long-range data communications network

texts: First to be clear: I am a licensed amateur radio operator with about 10 years programming experience and I took electronics in high school (2008). However I tend to stay on the soft side of things. I've forgotten most of what I learned in electronics class (besides what's dangerous and what isn't) but I have been looking into the possibility of building a P2P (backhaul) communications network to deliver messages and communications across long distances. At first I considered bluetooth. The properties of the technology fit almost exactly to what I need. Connection is quick (no waiting like wifi). It has FHSS technology to reduce interference. You can send almost any type of data but the range messed it up for me. Is there an course for building transceivers which doesn't take a million years to finish? Something which doesn't tell every single detail but covers radio circuitry and how it conceptually works? Something involving data transmissions would also be great.


texts: I just picked up my first DSO Oscilloscope, A Siglent SDS1052DL. I have never used an Oscilloscope, so I am trying to learn the basics. I have the following square wave, which drifts during the screen refresh. I know there is a way to set the start position but I can't find it in the scopes directions. I may not be looking in the correct place for it either. Is this called the Video Trigger? If not, what is it called and perhaps some hints on how I can set it?


texts: Are analog CRT oscilloscope becoming rare?

texts: Back in the early 2000s I bought cheap Commodore 64 sets from eBay, we were able to get huge collections for under 100 USD. Today they are rare and commensurately expensive! Today you can get analog oscilloscopes off eBay for under 100 bucks or so, but I see in the shop windows and on the market tons of digital scopes and no analog ones. They are becoming rare, aren't they? You as professionals, would you say you'd no longer buy analog scopes for a professional bench? Or rather, you can see that most semi-pros would forego the purchase, and therefore the market of used analog scope will dry up in the near future?


texts: Creating required voltage across a device using basic electrical principles

texts: Let me explain what I mean by an imaginary case. Let's imagine a 10 V battery in series with two resistors equal in resistance value. The voltage in between those resistors is 5V according to the voltage division rule. I have a component (does not matter what it is) which needs to be powered up by 5 volts. When I try to use that 5V voltage value in between those resistors to power it up, the voltage division rule breaks and I get less than 5 volts across that component. I cannot figure out how to provide it 5 volts to power it up by using voltage division or basic circuit analysis techniques. What is the way to achieve any voltage value across any component we want?


texts: Why did the dimmer burned the linear transformer? It is a MOT transformer, secondary rewound with 7 turns and a resistive heating element of 800w. While the transformer worked fine at line 220AC, burned while connected to the dimmer(phase angle).


texts:
As you can see above, I'm trying to make a copper pour connect all the GND nodes.

I could run a track and define its width to be huge (accomplishing the same thing) but I don't really think that's how it is supposed to work. I've tried all the settings (pour on all same nets, etc).

I have turned off ERC and all other layers too, so it shouldn't be a problem with those.

If anyone has some insight, it'd be great.
Thanks!


texts: Operational amplifier UA741CP - reading the datasheet

texts:
Here Operational amplifier (UA741CP) not working in buffer configuration I asked why my circuit is not working. The question was answered (it won't work with this voltages) but also it has been pointed out that it is all written in the datasheet. Can you please help me to read the datasheet in context of the given problem? Specifically I will go through the extra information given in the answer and point out what I do not understand.

The schematic is:

simulate this circuit – Schematic created using CircuitLab

The accepted answer is:

  This opamp isn't specified for only 5 V supply.

  These parameters shown above are for ±15 V supplies. The common mode
  input range only goes to within 3 V of either supply. Nothing is said
  how that scales to lower supply voltages, so assume it is at least
  that much. That means there is no common input range left with only a
  5 V supply.

  Likewise, the output can't drive to within 3 V of the supply rails
  with a 10 kΩ load, and not to within 5 V with a 2 kΩ load.

First I don't know if I understand what "Common-mode input voltage range is". Here  it says:

  Common-mode voltage range (CMVR) or Input Voltage Range (IVR): For
  signal processing devices with differential inputs, such as an op amp,
  CMVR is the range of common mode signal for which the amplifier's
  operation remains linear.

  If we let the voltage present on the "-" input equal V1, and the
  voltage on the "+" input equal V2, then the common mode voltage is VCM
  = (V1+V2)/2.

So in my case, if I put 0.45 V to the + of OpAmp and - to the the output what is my common mode input range? (0.45 + 0.45)/2 = 0.45? But isn't it within the quoted \$\pm\$ 13 (knowing that is for 15 V supply voltage)?  Can you clarify how the datasheet entry VICR being \$\pm\$12 or \$\pm\$13 leads to conclusion that this op amp will not work with 5 V supply?

Also I completely do not understand the part:

  Likewise, the output can't drive to within 3 V of the supply rails
  with a 10 kΩ load, and not to within 5 V with a 2 kΩ load.


texts: Does this high side n-ch mosfet bootstrap circuit work?

texts:
Edit: With the back to back mosfets i try to eliminate the blocking diode in a solar charger. So on the left side is a solar panel and on the right the battery. So lets say the battery is at 10v and Q3 is on, then c1 charges to 10v while Q1 and Q2 are off. Now when Q3 turns off, the gate of Q1 & 2 gets pulled to c1 voltage level which is 10v so they turn on, while they are turning on the sources reach also 10v bat voltage, which puches charge to c1 which then doubles the voltage on the gates to 20v and turns the fets fully on. So is this right or did i miss something ?

Edit 2: Thanks for the help. But still i dont understand one thing. The gate to source path of a mosfet forms a capacitor and to charge a capacitor charge must be able to flow from + to - ( depends on how you see it ) When the gate source path is charged enough the mosfet turns on. If circuit 2 works and also that if i remove R2 in circuit 1 it wont because the cap cant charge, how can circuit 2 work, because the source of the fets isnt connected to something initially (when off), how can a gate voltage turn the fets on ? And if circuit 2 works, why does circuit 1 not work with no R2, since the left leg of the cap is connected to the source. So basically its the same thing like in circuit 2 where the source of the fets isnt connected to something but still the gate can charge up. Why does C1 not charge up without R2 but with its leg connected to the source pin ( for bootstrap ).

Question 1: Does circuit number 1 turn both high side n-ch mosfets on successfully ? And if the circuit works, would it still work if i omit R2 ? How does this circuit behave in regards of turn on-off times ? How can it be optimized besides lowering the resistor values. Turn off time should be fast since the gate is directly shorted to ground if q3 turns on ( is this ok ? )

Question 2: Does circuit number 2 work ? I ask because i wonder..since the source of the mosfets has no reference ( floating ?...not connected to something ) when both fets are off, will the gate still charge up if i apply a propper gate voltage ? And if not, would it work if i connect a high value resistor from source to ground ? Since now the source pin has a ground reference, the gate would charge up and turn the mosfet on and when fully on, source would be at 10v and with a gate voltage of 20v, the gate-source voltage should be 10v and well within the limits of the max Vgs right ?
Is there another/better way ? I mean ofc there is for shure but you know what i mean i guess.


texts:
I'm exploring bq76940 datasheet. I've found such typical scheme for cells connection:

Why VC5-VC4, VC4-VC3, VC3-VC2, VC2-VC1 pairs have only one capacitor and VC1-VC0 pair has two capacitors? What is the purpose of all these elements in this scheme?


texts:
I've a board with an esp8266ex and a flash IC. The main power rail is +5 and it goes into a MIC5504 for 3.3 voltage regulation. The enable pin of the MIC5504 is tied up with a 10k resistor to the +5 power rail.

The problem is that I'm going literally mad with this voltage regulator, I've already replaced 4 of them, while some simply burned on power up, others either gave me a 4.4 volts in output (and I burned out the ICs) or gives me a 2.4 volts without any visual difference (I'm using the same pcb)...

If I remove the MIC5504 and power the board with a 3.3v direct voltage, everything works wonderfull and the current is about 0.02-0.06 amp , so there's no short around the PCB or excessive current draw (that by the way should shutdown the MIC5504 from its datasheet).

During one of the tests, I magically got a 3.4v output from the MIC and did some test. After this , I just noticed that I forgot to put 2 decoupling capacitors around my flash IC and indeed I was able to flash it , but the flash failed to work on a regular startup (maybe due to the missing capacitor). After soldering the capacitors back, bhooom, MIC5504 down to 2.2v . I cannot see any sense to this...

I cannot sort out this thing in a comprehensive way, I simply have no clue.. Do you have any hint ? Any expert that worked with this voltage regulator that I'm starting to hate ? Or do you think the problem is somewhere else ?


texts: Parallel MOSFETs and Gate Drive Capability

texts:
I'm trying to design a Full-Bridge which can handle upto 330 A (@ 12V). I'm paralleling 3 MOSFETs per leg, and I think I've found a low enough RDS(on) MOSFET to make this somewhat practical. Here's a schematic of the parallel MOSFETs in Half-Bridge configuration:

All transistors are AUIRF1324S-7P and each resistor in the above schematic can be assumed to be about 5Ω. The power dissipation in each MOSFET for 111A is 20W. I am managing this heat by a surface mount sink and a fan. I've written how I arrive at the 20W figure below, in case it matters.

My main concern now is switching losses. The max. total gate charge of the MOSFET is 252nC - so for each leg the total gate charge becomes 756 nC (3*252 nC). If I use a run-of-the-mill driver with 2 A output capability, the switch on time is t = Q/I = 750 nC/2 A = 375 nS! My guess is that I will have a lot of switching losses if I drive my MOSFETs this slow. This is where I'm confused: what do I need to do switch these MOSFETs faster? Use a higher current rated driver?

Assuming I use a 5A rated driver, the time becomes 150 nS. At a frequency of 30KHz, will a switch on time of 150 nS present significant switching losses? If so, suppose I go with even higher rated current driver, how do I ensure that my source (a 12V Lead-Acid batt.) is able to handle current spikes upto 10A?

Essentially, my question boils down to: if 150 nS presents significant switching losses at 30KHz, what do I need to do in order to drive my FETs even faster?

Of course, this all assumes there are no gate resistors! The gate resistor will slow down the switch on even further! But most of the papers on Parallel MOSFETs suggest gate resistors are necessary to prevent ringing.

Conduction Loss Calculation:

The FET's rds(on) @ 175 °C is 1.6 mΩ. With each FET handling 110 A, the power dissipated is ~20W. I want to be able to maintain a temperature of 125 °C on these devices (they are rated for 175 °C) with an ambient temperature of 40 °C. So, (125-40)/(20) = 4.2 °C/W. Considering that the device's thermal resistance between junction to case is 0.5 °C/W, I need a heat sink with lower thermal resistance than 3.7. The heat-sink that I've found provides 3 °C/W at 300 LFM airflow. So I feel I have this area covered (I hope, anyway!).


texts: last serial output of a shift register daisy chain

texts:
I'm daisy chaining several shift register. I will work in the serial input parallel output mode.

Is it good pratice to leave the last serial output of the last shift register unconnected? If this is not the case, how should I connect it? I won't need it for further signals.

Thank you!


texts: I've seen plenty of 3v3 circuits that are 5v tolerant, but I'm wondering if I can make something that is 12v tolerant.  Basically I have a numato 128 gpio expander and there are so many wires that one bad connection can blow a pin.  I would like to make it so that any pin can turn 3v3 on and off or be an input but if 12v accidentally touches the pin I don't want it to blow up.  The best I can come up with is possibly an optoisolator or a buffer like the cd4050.  I'm having a hard time wrapping my head around how these parts work since I have never used them.  Does this make any sense?  Am I on the right track?


texts:
I need to design an Inductor of 9.717μH to be used in a DC-DC Buck chopper for current of 10A. I finished the calculations using 3C94 core material. When I calculate the copper loss, it is 0.35W, and the Magnetic losses are negligible since my peak flux density is 10mT.
If my losses are so low, why should I prefer 3C94 to say, a simple Iron core or very low grade low cost ferrite core?
Core - E Core
Frequency = 200kHz, number of turns = 10, inductor ripple = 15% of inductor current, airgap length = 0.94275 mm
I followed the procedure as in P.Krein Book on Power electronics.


texts: Turning on a PNP BJT from a discrete signal

texts:
Some background, though I'm not sure if it'll be relevant to my question:

In my design, I have two power stages, a 1st stage PFC boost converter, and a second stage asymmetric halfbridge (I'm using the NCP1605 and FSFA2100 control ICs, respectively, if that's helpful).  My goal is to hold off power from the 2nd stage chip until the first stage is up and running.  To that end, I've come up with the below circuit, however it isn't working as I'd expect.

My intention was that VCCP would charge up to about 18V during startup, which happens just fine.  VCCP powers the first stage chip.  Once it has started up and is regulating properly, pfcOK goes high (to 5V).  pfcOK is grounded, otherwise.  When pfcOK goes high, it turns on M1, a logic level FET.  Turning that on pulls current out of the base of Q1, connecting VCCP with VCCP_FSFA, which is the power to the 2nd stage chip.

I've attached a scope shot showing what actually happens.  Blue is VCCP, Purple is VCCP_FSFA, and Yellow is the drain of M1.  Ignore green - it's unconnected.  You'll see the the drain follows VCCP until just before the middle of the plot, when it drops to ground.  This is expected - it pulls low when pfcOK goes high and turns on M1.  Prior to that happening, though, VCCP_FSFA oscillates a few times.  It appears as if Q1 is turning partially on and off a few times before saturating when M1 turns on.  I'm a little confused as to how that's happening.  Any thoughts would be appreciated.

simulate this circuit – Schematic created using CircuitLab


texts: KiCad Eeschema: Defining separate power rails for hierarchical sheets

texts:
I have a root sheet like the following, and I'm having issues figuring out how to properly define separate power nets for each hierarchical sheet.

As in the image below, I have two circuits separated by a connector.

How can I keep the power nets of these two circuits separate?

My current attempt at this was to do the following in the sub sheet, but it doesn't seem to work since my understanding is that the default power nets are global (are connected across sheets).

If this isn't possible, should I be creating a new project for each separate circuit?


texts: Can anyone please identify part with marking code "ZO" "607" it has 6 pins and I think the package is WLCSP.


texts: PCB grounds either side of common mode choke

texts:
I'm modding an old PCB that was put together long before I arrived here and I'd like some thoughts on what I think is a completely useless set-up where a separate comms ground has been routed separately to the the rest of the board's ground plane.

If you look at the first attached JPEG (please ignore the green lines, they're just unrouted traces), you can see I have labelled up the comms ground track which is separate to the large [system] ground place (It's a two layer board and I'm only showing bottom layer which is mostly system ground).

Now, top left, 24Vac or dc comes in (circled section A); at this point the two power lines are fed through a common mode choke as in the attached schematic.

You can see where I've labelled up comms ground and system ground on the schematic.

Back to the PCB, the circled area B is where the RS485 goes to the outside world; the three pins left to right are [comms] GND, A and B.

The problem I have with this is that the RS485 transceiver is connected to system ground, as schematic below. (Please accept that U4's supply pins are connected to system ground and 3V3, the latter which is, of course, referenced to system ground.)

I just do not see the use in this and the common mode choke. Surely with this set-up the common mode choke is useless? Also, isn't this comms ground pointless? Surely, by connecting the RS485 transceiver to system ground, this comms ground is essentially just connected to system ground? Or am I missing something and this system is fine as is?

Am very grateful for musings, ideas and advice.


texts:
I have to design a Flyback SMPS (15v , 6A) output. NCP1217 is the control IC being used to regulate the output power.

-->I downloaded the ".lib" file for the spice model from ON Semiconductor's website for NCP1217.

-->Opened this in my LTSpice console.

-->Right clicked on the

".SUBCKT NCP1217 skip FB CS GND DRV VCC HV params: Fswitch=65k Conso=960u"

and generated a sybmbol for it.

-->Thereafter I made all the connections, using the above symbol and tried to simulate it. But LTSpice generated an error saying :- "Cant find definition of model "N971-KN-1-0-20R18" ".

Please tell me what is going wrong here ? Is it not possible to use entire third party IC's in LTSpice ?

Please refer the link below and have a look at NCP1217's library files. There are multiple ".SUBCKT" lines present here. Which one should I use ? (I am using a switching frequency of 65kHz).

Kindly download the ".lib" file from here.

Link:-
http://www.onsemi.com/PowerSolutions/supportDoc.do?type=models&rpn=NCP1217


texts:
I want to ground a bucket/immersion heater:

should I build a conductive cage around the underwater resistance and connect it to ground?
would it work to just place the ground wire inside the water, maybe close to the heater?


texts: Confusion regarding the operating voltage of a solar cell

texts:
The equivalent circuit of a solar cell:

The operating voltage of the solar cell is approximately 0.5 V.
What does this voltage represent,exactly?
Is it the voltage of the cell (I-V  relation of solar cell  I=(Io *[e^(v/vt)-1])-IL )? But according to the above figure, the voltage of the cell is the drop across the load that will be connected to the cell terminals.
I am very confused.


texts: How to interface a (7.5 V AC) doorbell and an Arduino?

texts:
I have a basic doorbell that I would like to control using my Arduino. The doorbell runs on 220V AC power and is ordinarily controlled through a secondary circuit(??) running 7.5V AC.

My question is - since the control is 7.5V AC, what is the correct way to interface that with my Arduino, which typically outputs 5V DC?


texts:
I have been tasked with taking a fairly old robot vehicle and upgrading as many systems as possible.  It has an array of 7 sonar sensors that I would like to re-use, but I don't have a good working knowledge of what to do with them.  They have only two wires.  I sort of know the idea behind how they'll work (send a pulse to the sensor, flip a switch somewhere in the wiring(?), get the return signal, figure out time between the ping and the return) but that's where I'm at.  What I would love is something like an example circuit of how to hook this thing up and I can then try to program some tests on a Raspberry Pi or some other cheap device.

What about the circuit it originally had?  You're very correct to ask about it.  It appears to have used a TI TL851CN chip to control the sonar.  I read the data sheet and it wasn't very illuminating to someone of my experience level (student).  Second, the data sheet says it is meant to be paired with a TL852 chip which is nowhere to be found on the original circuit.  So, I'm not really able to figure out what it's doing.


texts:
I've searched the electronics stackexchange site but couldn't find an answer for the following 2 questions:

For a home project I'm designing a circuit that is powered by a 24V battery. This battery is placed about 20m away from the circuit. I came up with this circuit:

simulate this circuit – Schematic created using CircuitLab

I encounter 2 dilemma's:
1: At the input of the circuit I'm trying to figure out what kind of fault protection is needed. Am I missing something?
2: At the input of the circuit I'm trying to figure out in what order do I place those fault protection ic's/circuits. (this is where I'm having issues)

The invironmental conditions that I have to deal with are:
- 20 to +60 degree celsius.
- (Possibility of) lightning strikes.
- 24V battery input at +/- 20 meters way.
- +/- 50 watt circuit.

If there are any books I can lookup to understand the order of protection in electronics circuits, please do let me know:)
Thank you guys.


texts: Multisim Circuit with Virtual Crystal and TTL gates

texts:
I have to make the following circuit in Multisim:

This is what I have done:

As you can see, the output (in points ~Q and Q) is 0V and I can't figure out why. Could anybody help me?


texts:
I am a software developer (using high level languages like .NET,C,C++ etc) trying to understand how computers work at a lower level.

I am familar with this diagram:

I am trying to gain a high level insight into how the diagram in the link maps to a circuit diagram like this:

For example, have a look at the assembly language statement:

ADD 1,2

I am trying to understand how the processor produces '3' as the output.  I realise that this question may be difficult to answer in simple terms.  If it is, then a link would help, perhaps to a book.


texts:
I am using the CAD drawing for the DS2777 from Maxim Integrated. http://www.maximintegrated.com/en/design/packaging/cad/?phase=proc&return_url=http%3A%2F%2Fwww.maximintegrated.com%2Fen%2Fdesign%2Fdesign-tools.html&search=ds2777&submit_btn=Search > DS2777+T&R.bxl.

When I am doing my board layout, I am getting the error "Clearance" between every pin on the chip and the autorouter is refusing to make any connections to it. How do I fix this?


texts: the volt time constant of a pulse transformer

texts:
I am looking for a transformer to use with a RS485 driver, but I don't know on what criteria I am to pay more attention: Insulation Voltage or Volt-time constant.

Can someone explain me if the volt-time product is representative of a good pulse transformer used for isolation purpose?

If yes, how does this constant influence the quality of the transformer ? The bigger the better or the smaller the better ?

Or does only the insulation voltage matter?

Thank you


texts:
I have recently had both a tablet (manufactured 2013) and a phone (manufactured 2017) battery
swell (both batteries are Li-ion).  The photo below shows the tablet's damage.  Both
batteries still worked after swelling.  Though it's possible that the swelling was gradual
over many months, I doubt this and am more inclined to believe that it all happened within
one day.

Actually, I believe both were dropped while fully-charged (probably even dropped while plugged
in to the charger), and suspect the impact this caused played a role.  I assume most Li-ion
batteries out in the world, if they never experienced an impact, show no swelling all the way
till end of life.  Please correct me if this assumption is wrong.

So, what is the chemical mechanism by which impact causes a battery to swell?  Is the swelling
more likely if the battery is fully-charged during impact?  Does it matter whether the charger
was connected during impact or would the same swelling have occurred if I had disconnected the
charger 5 seconds before impact?

Or, is it more likely that impact played no role in my damage?


texts: Operating an SD card module with only two pins

texts:
My standard SD card module uses four pins: SDCS, MOSI, SCK, and MISO. However, I can only dedicate two pins of my ATtiny85 to operate it. Is there a way I can do this without using more ICs, such as for example a second, bigger microcontroller?

Keep in mind that:

I only need to write to it.
I can do as much testing as necessary at start, but then it has to work on its own with only two pins.
I can add one or two discrete electronic components, as long as they're few and small.
The other pins are taken by a GPS module, which uses serial (RX-TX), and a crystal.


texts:
I'm seeking advice for components I could use in my lab course. My goal is that my students understand experimentally the ideas (circuit as simple as possible) behind a chopper device and a power inverter device without risks (low power) and for a very low cost (I need to buy components for 15 groups of students).

Chopper:

Which transistor for S1? I use 1N4001 for S2.

Maybe I could use a gate for S1 but I'm stuck to a diode for S2 (but I could buy a diode with a lower voltage drop).

Power inverter:

the switches must be made by an association of a diode and a transistor (or a gate): what kind of transistor should I choose. Here, I'm also looking for the control circuit (that would ideally be simple too...).

Specs

Input/Output voltages < 1V
Input/Output current < 1A (100mA would be ok)
Freq < 1kHz


texts:
I've designed a PCB schematic that uses a MOS device to switch one of the higher power rails. I've looked through the datasheets many times, and believe it should work, according to the Current-Voltage characteristics of the device. However, I'm very apprehensive about this, as I am worried that I missed something, and the drain-source voltage drop will degrade the available power on the rail.

I'm hoping someone could double check my design:

Here is the schematic:

The regulators shown here are fixed voltage, Medium current (<5A). The MOSFETS are planned to be IRLB8743PbF NMOS. Here's the datasheet.

According to this graph in the datasheet, I believe this device should operate without a significant voltage drop on the output rail, at a Vg of ~3.3V. It is important that the drop be no more than half a volt to prevent sensor brownouts. Also, I anticipate the rails using very low current (mostly powering microcontrollers).

I would really appreciate any personal experience tips, or any help finding stuff I may have missed in the datasheet.

Thanks in advance!


texts: Transforming from abc reference frame to the qd0 variable reference frame?

texts:
I have been working on transforming variables from the abc reference frame to different qd0 frames of reference, such as the stationary reference frame, the synchronous reference frame, and the variable speed reference frame. I have been successful in getting the correct transformations for the fixed (ω=0) and synchronous (ω=377) qd0 frames, but I cannot obtain a correct transform for the variable speed frame.
I am using the following ramp function:

To transform between reference frames, I am using the following:

The results I am obtaining are:

and the result I am expecting is (yellow output above is supposed to match this):

I believe discrepancy is due to not having the correct θx while going from reference frame to reference frame, as right now I have θx set to 0 for all cases of ω. How do I know what to set θx to?


texts: CU or ALU? What communicates with memory?

texts: I have different books saying different things. Are the address bus and data bus connected to the CU or the ALU? The control bus connects to the CU right?


texts: Why there are minimum three electrodes used in ECG, EMG measurements?

texts:
My question is related to the number of electrodes used in ECG/EMG kind of signals. I know that voltage measurement is a potential difference measurement. I understand the concept of signal and reference. So naively I can think of 2 electrodes. But most of the first stage in detectors is instrumentation amplifier which can help in deleting the common mode signal. But when you measure using instrumentation amplifiers you need 2 input signals.

So actually are we measuring the difference of two ECG/EMG signals from body (at different locations) using 3 electrodes ?


texts: Current when switching on with inductance. Role of Reactance?

texts:
When switching on the current through a coil it can be described as:

\$ I(t) = \frac{U}{R} \cdot (1 - e^{(-x\cdot R/L)}) \$

For a sinusiodal current the complex resistance for a circuit with inductance is written as:

\$ Z = R + i \omega L \$

If the switching on happens really fast, does this influence \$I(t)\$ from the first equation? Is \$R\$ (both or just one of them) in the first equation actually \$Z\$?


texts:
I'm reading an assembly language book. The problem with this book is that it tries to explain how a ram works with a CPU, but it doesn't explain in depth.

I would like to know how a memory cell, address line, and data pin work when storing or retrieving data.


texts:
I am making a circuit that would produce electric current.

My question is that is there exists any chip that can monitor Voltage and if there would be current at specific voltage, the current would not pass from the chip(it will act like a switch) and when the Voltage < specific Voltage, the current would pass?


texts: What happens if too many devices connected to multiple i2c buses on ESP32?

texts:
See this diagram:

In the above diagram, multiple devices are connected to a single i2c bus.

In my previous question, I was wondering what would happen if there are too many devices on a single i2c bus. In this case, ESP32 has two buses. So I was wondering what would happen as I keep adding more devices to each bus?

I figure there are three scenarios:
1. Neither bus has too much load
2. One bus is below load, the other bus has too much load
3. Both buses have too much load.

What happens to my ESP32, and the devices connected to it in each of the above three cases?


texts: Howto: RF HV power supply (13,56 MHz, ~30 kV - 50 kV, 1 kW - 3 kW)

texts:
I hope you can help me on this one.
Short recap about me, I am a maker and I had a vocational education some 30 years ago as engineer in HV (up to 48kV) in industrial facilities. So I am aware of the risks of handling these kinds of energies.
My Project: I have made a high powered CO2 Laser with a theoretical maximum output of 7kW.
Currently is the laser powered with 35kV DC.
The "problem" with DC is that I have to introduce the electrodes into the resonator, to power the laser. The resonator is a glass tube with 7 to 10 torr (almost vacuum) filled with CO2.
Asides of getting the insertion holes properly sealed is the main disadvantage, that the electrodes wear down, contaminates the gas and sputter molecules onto the mirrors. The contamination of gas reduces the efficiency considerably.
Even worse, the sputtered material on the mirrors makes them kind of blind, which really kills performance and introduces heat to the mirrors until they crack.
The simple way to tackle the sputter is to use the same material for the electrode as used for the coating of the mirrors. That extends the lifetime to a certain degree.
But there is a but (of course X)
This laser runs with a folded resonator.
So it has a size of 3-4 foot, the actual/unfolded length of the resonator is about 21 yards.

You can probably imagine that this requires a solid amount of mirrors ... 44 pieces. This is a lot of money you have to present each time you have to replace these.
Not to mention the tedious process of aligning these mirrors as every deviation in the mirrors sum up in total mis-alignment which on 21 yards is considerable.
Failing to align align the mirrors renders the laser into a fancy plasma lamp
Also using electrodes of pure gold is expensive and the replacement is at least as problematic/tedious as replacing mirrors. Almost everything has to be disassembled and the mirror plate has to be removed too. So at least the mirror plates must be re-aligned.

The golden solution is a RF generator running 13,56 MHz, ~30 kV - 50 kV, 1 kW - 8 kW.
With this setup is it not mandatory to place the electrodes in the resonator tube. You can wrap the electrode around the tube.
No sputtering, no contamination of the gas and no wear and tear. Assemble and forget
This also simplifies the the design.
It is possible to purchase used generators in this category from 500$ upwards.
But as maker I would love to find a DIY solution to this.
Unfortunately is my expertise in electronics more newbie level. I do some basic electronics when needed but this is way beyond my skills and I have trouble to cut my teeth on this one.
Do you have any advice, guides, literature, schematics or at best build plans to achieve my goal?
I don't know how to get started at all.
I have found insane DIY guides on high voltage and high frequency PSUs but one of the voltage, frequency and power values is always out of scope.


texts: How exactly does the AvalonMM interconnect work using all the pieces that it has?

texts:
When looking into the "memory-mapped interconnect" in Qsys for my system, I can see many components that are inserted by Qsys when the system is generated. These are all part of the Qsys interconnect.
We have "instruction master translator", "instruction master agent", "router", "cmd demux", "crosser", "slave agent", "out agent", "data agent" and a few other things by the looks of it. Is there somewhere I can find a simple explanation for how all these things work together? May sometimes we can make use of things in our VHDL code directly as well.


texts: Understanding power system lines and their capacity

texts:
First of all, I am no engineer so forgive me if I confuse concepts (or show lack thereof).

When constructing the power grid, I was wondering about the following:

Do engineers use 'standard lines' (with a fixed capacity per distance) or do we have a variety of lines to choose between (with different capacity)
How is the need for line capacity in general determined? Do we estimate the maximum load and increase capacity to be slightly above this?
If two power grids are coupled by a DC power line, do they influence eachother in terms of stability? Why/why not?

These are some of my thoughts that I haven't been able to answer yet


texts: VHDL - converting types and integer substraction

texts:
I am preparing a program in VHDL and I got stuck in type-conversion. I tryed google-search and also here at stack exchange, but I am quite confused since one answer contradicts other and neither one I can get to work. But finally to the question of mine:
I have to display ordinary digital clocks. I have got from my professor decoder for 7 segment display which takes as input std_logic_vector(3 downto 0). And my part is to provide data (more specifically set of digits) to display. Most of work is already done but I am struggling to convert from my variables e.g. minutes (it is std_logic_vector(4 downto 0)) to two decimal digits. I have done separation this way:

if (min >= 50) then
  d3 <= 5;
  d4 <= min - 50;
elsif (min >= 40) then
  d3 <= 4;
  d4 <= min - 40;
elsif
...
end if;

(Maximal value of min is 59 and if it get this high, it resets to 0 and hours counter get +1, just like ordinary clocks). Thus d3 should display tens of minutes and d4 unites of minutes. As you probably had already guessed, since min has length of 5, I can not compile it (d4 accepts length of 4 tops). Thus my idea is to convert min to integer, subtract number (e.g. 50) and convert back to std_logic_vector with right length (actual value would be in range 0 to 9, thus no problem with length of four bits). I tried to preform something like this:

d4 <= std_logic_vector(unsigned(integer(unsigned(min)) - 50));

but without success. I had always ended with errors like unknown function, type mismatch or no matching overload for method, no matter what combination I tried. Apparently I got somewhere some trivial error, but I fail to see it.
I use those:

library ieee;
use ieee.numeric_std.all;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

Please can you point me to the right direction? I am running out of ideas.

Thank you very much for your time,
Michal

EDIT:
Inputs, outputs, variables declarations as requested are:

port (sw2, sw1, sw0: in std_logic;  -- input switches
        clock:       in std_logic;
        reset:       in std_logic;
        d0, d1, d2, d3, d4, d5, d6, d7: out std_logic_vector(3 downto 0);  -- outputs for eight units of 7segment display decoders
        dp0, dp1, dp2, dp3, dp4, dp5, dp6, dp7: out std_logic);  -- outputs for decimal points

  attribute loc : string;
  attribute loc of sw0   : signal is "P7";
  attribute loc of sw1   : signal is "P9";
  attribute loc of sw2   : signal is "P10";
  attribute loc of clock : signal is "P2";
  attribute loc of reset : signal is "P11";

end main_1048;

architecture main_1048arch of main_1048 is
begin
process(sw2, sw1, sw0, clock, reset)
variable yrs: std_logic_vector(11 downto 0);
variable min, sec: std_logic_vector(4 downto 0);
variable hrs, day, mth: std_logic_vector(3 downto 0);
begin

EDIT2:
After deleting libs std_logic_arith a std_logic_unsigned as sugested by Brian Drummond and redefining variables so they are now naturals. New errors were No matching overload for "-". According to the specifications I found, "-" should work:

function "-" (L: NATURAL; R: UNSIGNED) return UNSIGNED;
  -- Result subtype: UNSIGNED(R'LENGTH-1 downto 0).
  -- Result: Subtracts an UNSIGNED vector, R, from a non-negative INTEGER, L.

Thus final edit was to d4 <= std_logic_vector(min - to_unsigned(50,4)); (with declaration variable min: natural range 0 to 59;) and this (concerning typecast) works.

Thank you all for your help!


texts: Controlling an electromagnetic switch with Reed switches

texts:
I'm trying to power a 12v electromagnetic switch using NO reed switches.

IE: when the 5 reed switches all have magnets near them then the elecromagnet switch unlocks something. However, I'm trying to figure out a way to just turn the elecromagnet switch on for 1 or 2 seconds then turn it off so it doesn't overheat without removing the magnets from the reed switches.

I know there's time delay relays that won't turn the relay on until X seconds, is there a relay that will turn off after X seconds?


texts: Also, what is that circuit element symbol (an arrow leaving a rectangle) called, in the diagram next to the switch?


texts: What can I use to turn on a circuit at 5V?

texts:
I'd like to power an Arduino using a supercapacitor. I already have that part of the circuit figured out.
But I want to charge the supercapacitor using an external power source, without the supercapacitor discharging into the Arduino until its voltage gets to 5V. What can I use to do this? Sorry if it's a silly question - my knowledge of electronics is pretty basic. I've been playing with an SCR (datasheet here) but haven't been able to get it to "wait" until the supercap gets to 5V. The trigger current seems to be too low.


texts: What is the meaning of the term "Ground Paddle" in the context of ORG1411 PCB design?

texts:
I am designing a breakout-board style PCB for prototyping an ORG1411-PM01 module and am unsure about how to meet the datasheet's layout recommendation for the "ground paddle"?

The Reccomended PCB Layout is shown below:

The main issue is that despite the drawing showing a "ground paddle" (which I assume to be the olive green box 6.35*10.008mm), later descriptions shown in 19.3 indicate that there is not to be copper below the component aside from on the bottom layer.

Key question is this: If I am including a ground plane on the bottom layer is this in fact the "ground paddle? Or does a separate "ground paddle" have to be included?

Any advice appreciated!

UPDATE Received 12/02/17

An email request to Origin asking for clarification on this issue led to me receiving another guide entitled "HORNET modules Layout Recommendations - Application Notes", dated to 17th Feb 2016. This includes a clearer diagram to replace Fig. 14 from section 19.3.  I am unsure as to why they have not updated the main datasheet, but this update definitely helps to clarify things.


texts:
I am looking for a cheap solution for sensing temperature with a MCU. My requirements are:

2 channels
temp range: 30-35°C
temp resolution: 1-2 K
cable distance (MCU -> sensor) 10cm - 2m are acceptable
relative temperature between two channels is sufficient, no absolute temperature is required

My starting point is two thermocouples with thermocouple amplifiers, but this seems to be overkill for my application. Thermocouples run at 10$ at Radiospares, amps at 5$ which would cost 30$ just to estimate a temperature.

What is a good direction to look for a cheaper solution. NTCs?

Edit 18 July 2012

After stevenvh extended his answer to show the high degree of linearity that can be obtained with NTCs, I invested some time to reconsider whether NTCs are not a better solution.

I am not sure however that I am able to follow stevenvh in his reasoning on the error that can be obtained with NTCs on the cheap compared to semiconductor chips.

To get the temperature with an NTC the following functions come into play:

transfer function \$ H_{T_a\rightarrow R_{NTC}}(R_{25},B_{25/85}) \$  converting the ambient temperature to a resistance
the voltage produced by the voltage divider \$ H_{R_{NTC}\rightarrow V}(V_{excitation},R_{NTC}, R_{lin}) \$
AD conversion \$ H_{V\rightarrow bits}(V, V_{ref}, \sigma_{conversion}) \$
linear curve approximation: \$ H_{bits\rightarrow T_{est}}(bits, \sigma_{approx}) \$

The error sources the I see are thus:

NTC value errors: 1% each for the \$ R_{25} \$ and the \$ B_{25-85} \$ values: total about 2%
1% for the linearisaton resistor value and let's say 0.5% for the excitation voltage source
For a PIC16F1825 the internal reference voltage used for the ADC has 6% uncertainty. In addition, the ADC itself has integral, differential, offset and gain errors each of the order of 1.5 lsb. At 10 bits, the latter combined are at most 0.5%.
As stevenvh demonstrated in his answer, the linear approximation has an error of merely 0.0015% in the range of interest.

The error in the estimation of the temperature will thus clearly be dominated by the error of the ADV voltage reference and the errors in the resistor values. It will clearly be in excess of the 6%. The error due to linear approximation is utterly negligible as stevenvh pointed out.

An uncertainty of 6% at 300 Kelvin is equivalent to an temperature error of 18K. The temperature chips have an error of about 1K. At 300K this corresponds to an uncertainty of 0.3%.

It would appear to me that it is out of the question to beat this with an NTC without extremely careful calibration and performance verification. The uncertainty in the linearisaton resistors, the excitation voltage or the ADC each viewsed in isolation push the uncertainty of the NTC solution above this. Or do I have a major mistake in my reasoning?

At the moment I am convinced that NTCs can be a high-precision temperature sensing solution but on the cheap it would appear to me that their performance will be a shot in the dark.


texts: Bidirectionnal level shifter not working on my clock to drive a smartcard

texts:
I'm actually designing a circuit that would permit me to drive a Smartcard, it's a pretty straight forward design :

All the signal starting with CA are coming from GPIO of an IC that controls all the timings, and the signal starting with SC are the one going to the smartcard. It's just simple level shifters +3.3 to +5V.
The level shifter for the DATA and RST are working really well. However, the CLK one has some issues. I have a perfectly fine CLK on the 3.3 side, but on the 5V side I have this:

As you can imagine the card can't handshake because the signal doesn't reach the level I want too. I don't understand the problem because all the lines are exactly the same and if I refer to the datasheet of my transistor the timings are perfectly fine to handle my 3.6 MHz clock, also if it was a timing issue I assume my clock signal wouldn't look like a square signal like that.
Does anyone has an idea of where it could come from ?
I also ordered a transistor with a lower Rdson and faster switching frequency i'll update you on that matter
PS:


texts: Am I calculating the total resistance of this circuit correctly?

texts:
I'm picking up where I left off over a year ago on a signal conditioning circuit for a data acquisition system. The DUT (Device Under Test) is outputting a 1-25vpp 4000Hz square wave signal. The circuit I'm about to share represents the load of one of the DUT channels (HI and LO). I should mention I did not create this circuit; I explained what I wanted to an EE I used to work with and he created it.

R1 + R2 + R3 = 999.7Ω (0.001000300090027)
R10 + DS10 = 2,000Ω (0.0005)
R10 + U10 = 2,000Ω (0.0005)

After reading (and understanding just a small amount of) this answer I decided to leave the LEDs DS10 and U10 out of the equation. If you feel this is a mistake, please let me know.

Using the above calculated reciprocals I come to a total resistance on CH1 of 499.92Ω.

Am I correct? Anything else you think I should take into consideration?