texts: cutoff frequency of low pass filter with two resistors (differential signal)

texts:
How do I calculate the cutoff frequency for this design?

simulate this circuit – Schematic created using CircuitLab

Or simply,


texts: What's happening when an LCD is initialized?

texts:
It seems that the function set command is repeated multiple times, with differing delays. Why can't it be a single function set command with all the delays combined? What is characteristically special about each stage?

Datasheet


texts:
I have two questions on semiconductors that I hope someone will be able to help me with.

I have been told that a semiconductor is classed as N-Type when it's donor density is greater than its acceptor density and that it is classed as P-Type when its acceptor density is greater than it's donor density. So far so good, but I have also been taught that trivalent atoms are acceptors and pentavalent atoms are donors.
This seems to conflict with the first part because if I introduce a trivalent atom into silicon then either the acceptor density is lower or silicon is the acceptor. Could someone clarify this for me please?

So far I have only covered introducing impurities with 3 or 5 outer electrons into silicon with 4 outer electrons. If the impurity of the atom has 2 electrons in the outer shell rather than three in the case of p-type or 6 rather than 5 in the case of n-type does this emphasize the effect? Or does something else entirely happen?


texts: 5V output switching with WEMOS D1 mini + MOSFET

texts:
I have a WEMOS D1 mini board which I power with a 5V power supply. I need to switch 5V outputs with a few hundred mA load, so I use AO3400 N-channel MOSFET-s. My schematics are the following:

However, when I power the circuit, my outputs are all powered, their voltages are between 4-500mV and 4-5V, despite the fact that the gate-source voltage of the MOSFET-s are 0V.

What could be the problem?


texts: How can I quickly make a long string of 3-pin components?

texts:
I prepared a 7 m long strip with 7 DS18B20 and, lacking a better idea, I soldered the DS18B20 pins directly to wires, where all but the last sensor have a 3-point star connection: DS18B20 leg, wire to microcontroller, wire to next DS18B20.

To give some strength and to isolate the pins I used hot glue (it's compatible with the final temperature range).

See in the photo.

However, the procedure is very time consuming and taking away the glue, in case of corrections, may damage the pins.

Keeping in mind that (as I found out later) short stubs are allowed by 1-Wire communication, how could I speed up the process? which other connection techniques can I use to do Y connections ending with a similar component? soldering is of course allowed, but avoiding having to keep two wires carefully positioned would be already an improvement.

I also see components like the ones in the second photo but they are only for two wires so I would need two per sensor. Also, I'm not sure they work well for stranded wires.

My work:

T splitters:


texts:
I am using PIC18F67K40 on my custom board. I have interfaced with character LCD to this custom board.

The problem I am facing is:

When the TX and RX lines of UART1 are left unconnected the LCD is not displaying the desired output.

Should those RX and TX pins be Pulled to low or high internally on the code?

If more data is required to answer please ask.

I am using MiKro C PRO and PICkit3 for programming.


texts: How can an input signal to an FPGA be determined as the clock signal?

texts: How can I determine a seemingly arbitrary signal applied to an FPGA to be the clock signal? Conditions: 1. There is no other clock signal available (as an input to the FPGA) for sampling this input.2. Assume, this should be the highest speed clock. 3. The source of this signal can be anything, can be generated elsewhere in the circuit and then applied to the FPGA or can be generated only for this block. (In my opinion, the source does not matter.)


texts:
Can you program a PICAXE microcontroller with an Arduino Duemilanove

Maybe with the ICSP (6 pin) header?


texts:
I'm trying to understand and tweak this smartplug reference design from TI. I'm stumped on the Metrology Analog Filters section on page 1. What I do not understand is why is there a 0R resistor on the Neutral line and more importantly why is this line grounded?

Also since the shunt method is inherently unsafe, can I simply replace the shunt with the primary of the current transformer? In the attached schematic the current source and the terminating resistor essentially mimic the secondary of a current transformer. If I can replace the shunt, can I simply do away with the instrumentation amp in the reference schematic and simply put the attached bit in and feed the signal to the MCU?


texts: Which circuit design application is Arduino using here?

texts:
I've been looking for this software for quite a bit but can't.
It's used on Arduino articles such as this:

Does anybody know what this is called? The interface is definitely there and pretty enough for hobbyists.


texts: Intefacing a PIC Mircocontroller (PIC16F84A) to two stepper motors

texts:
I am a neewbie here so don't cush me yet but I have a question concering stepper motors and Microcontrollers (more specificaly PIC16F84A). Does anyone know how to Inteface these two devices?
Steppers - http://www.sparkfun.com/products/9238
Microcontroller - http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010230
Thanks in advance - James


texts:
I want to make a project that allows a 500 watt PC to run on batteries for 4 hours, so it can be worn by an individual on their back.
I found the below calculation to get the capacity of the battery needed:
(Power (Watts) / 12V) * 1.1 * 4 = total time
(500 / 12) * 1.1 * 4 = 183.3
I get 4 hours running time, however I am not sure what my options are for a battery configuration that can be worn on the back. It would be nice to have a battery pack that follows the contours of a back - but I understand that the requirements rule that kind of flexibility.
Any guidance would be great.
edit 1 The above doesn't include overrun to prevent 100% discharge as the decision to reduce runtime or increase capacity hasn't been weighed (pun not intended.)
The PC will be connected to a 4k VR headset running in a VR environment that would likely be graphically / processor intensive.
The purpose for it being a PC and not a laptop mobo is modularity and future proofing.
I've not decided on the battery type yet as this is just a prototype and would affect ease of setup, functionality (trickle charge or not) etc.


texts: How do I interface to this flexible flat cable connector?

texts: I've noticed this connector on a lot of boards, and I was wondering if anyone knew where to source them? I can't seem to find them on digikey.com anywhere. What I'd really like is to get a male connector for this to breadboard the contacts.


texts: Why is it not possible to create electricity by forcibly putting electrons into the system and closing the loop?

texts:
Why is it not possible to make a device operate by forcibly putting electrons into the system, closing the loop, and having electron repulsion do the job of making charge flow?

Making electrons flow is what creates electricity. So if we are able to put electrons into a system, close the loop so the electrons have no where to go, then the electrons would be constantly bouncing around together. This would cause charge to flow around and create electricity.

What am I not taking into account here?


texts:
I'm using the Van Dyke model from this article and I'm a bit lost on a few things.

Since the only nodes I can physically connect to are the ends, can I assume that I am limited to the voltage across the parallel capacitor?
I have derived the following equation for this network:
$$
\frac{d^2i}{dt} + \frac{R}{L}\frac{di}{dt}+\frac{1}{LC_1}i_1 = \frac{1}{LC_o}i_o
$$
Going back to #1, I guess I'd only need to solve for the right half of this to get the transient response.  But this is simply a tank circuit now, which negates the rest of the piezo circuit.

what is the proper way to model this in a circuit?  I want to model a piezo to see it's response to a pulse.

thanks.

EDIT:

A little more context on the problem I'm having.  here is what I want to model:

The switch closes momentarily and opens.  A measurement on an oscilloscope shows this:

The main resonance is the larger one - the other ones are assumed to be reflections within the medium.  Ultimately, I would like to create a model for this behavior.


texts: How does this opamp circuit act as "good" voltage reference?

texts:
If I understand correctly, we are using MC1043 because we don't trust Vcc to be stable. I get that the output of MC1043 is 2.5V which is extremely stable.

But I don't get how the output of opamp will be stable. Because this opamp is getting supply from VCC and VEE which are not necessarily stable. What am I missing here?


texts: Is it possible to quantify electric power consumption on a fuse?

texts:
If you have a common fuse is there way quantify the power consumption which is flowing through this fuse. Or could you replace the fuse with something that measures the power consumption but still works as a fuse.

Or am I completely stupid? Could you explain me why it is impossible?


texts: Analysis of a modified Howland Current Pump

texts:
I am trying to do an analysis of the following modified howland current pump based on the circuit description in the datasheet of the LMP7701. This is a voltage controlled current pump that is driven by a sine generator with aroung 10 kHz.

simulate this circuit – Schematic created using CircuitLab

I want to derive the formula for the output current, that should only depend on the resistor \$R_s\$ and the input \$V_{in}\$. The formula is already given in the datasheet of the LMP7701 and in AN-1515:

\$ i_l = \frac{V_{in}}{R_s} \$

In order to derive this, I started with the followng nodal equations:

\$  i_1 = i_2 \Longleftrightarrow \frac{V}{R_1} = \frac{V_{out}-V}{R_2} \Longleftrightarrow V=\frac{R_1}{R_1 + R_2} V_{out} \ \ (1) \$

\$  i_3 = i_4 \Longleftrightarrow \frac{V-V_{in}}{R_3} = \frac{V_{L}-V}{R_4} \Longleftrightarrow V=\frac{R_4 V_{in} + R_3 V_L}{R_3 + R_4} \ \ (2) \$

\$  i_l = i_s \Longleftrightarrow \frac{V_{out}-V_L}{R_s} = \frac{V_L}{R_L} \Longleftrightarrow V_{out}=\frac{R_LV_L + R_sV_L}{R_L} \ \ (3) \$

Now I set \$ (1) = (2) \$ and derived after \$ V_{out} \$ to get

\$ V_{out} = \frac{(R_1 + R_2)(R_4 V_{in} + R_3 V_L)}{R_1 (R3 + R4)} \ \ (4) \$

Now I set \$ (3) = (4) \$ and solve after \$ V_in \$ to get

\$ V_{in} = \frac{R_3 R_s V_L}{R_4 R_L} \ \ (5) \$

Now, assuming that \$ R_1 = R_2 = R_3 = R_4 \$ and setting \$ V_L = \frac{R_L}{i_L} \$ I get that

\$ V_{in} = \frac{i_L * R_s}{R_L^2} \$

Which seems to be wrong, or am Imissing something? Are some of my assumptions wrong or are some things missing? I recalculated many times and tried different approaches but this is not my field and do not really now how to proceed further, would appreciate some help.

Thanks in advance.


texts:
I realized a solar battery charger circuit based on LT3652. Actually it doesn't work well, but I think I made some project error. In fact it doesn't reach the end of charge status. But first of all I need some theoretic suggestions.

Panel:
Voc = 20V;
Vp = 16.5V;
P = 5W;
Ip = 0.31A;

Battery:
Lead-Acid;
12V;
C = 4Ah;

The questions are:

What is the maximum charging current reachable? Icharge < Ipeak * (efficiency *Vpanel ) / Vbat is correct?

What happens if I set a charging current too high, for example 1A?


texts:
If one has to design a boost power supply that should generate high output current, it can be a solution to parallel multiple boosters and connect their output nodes to each other. Does this approach have any problems?

Many booster ICs have SYNC pins so that multiple regulators can be synchronized with each other using an external clock generator. The boosters would have ripples in the output voltage, but the amplitude should be small.

I know that there is a method called "load sharing" or "current sharing". But I wonder why it is needed.


texts:
I am trying to design a real-time clock circuit using a 32.768 KHz oscillator. I have no access to a datasheet for the microcontroller that I am using, but I know it requirese a 330K resistor and an oscillator of this frequency. I decided to use a 12.5 pF crystal, so I estimated 15 pF for the loading capacitors.
This is only a 2 layer board, and the copper pour on the underside of the crystal (Y1) is grounded. A thick trace can be seen underneath C4 and R1, this is a power line that powers the controller (can be 3.3v or 5v). Trace widths between crystal and controller are .17 mm.
The problem is that my real time clock is not "ticking". I have narrowed the issue down to this circuit. If I have made some obvious mistake, I apologize. I am no engineer.
Crystal Datasheet (CFS-206): https://www.mouser.com/datasheet/2/77/CFS-145%20CFS-206%20CFV-206_E-1131372.pdf


texts: Is Isopropyl Alcohol 70% a good choice for cleaning electrical wires

texts: I need some wires inside my phone cleaned. And the only alcohol I can find is 70%. Is it safe to clean electrical wires with it? Or would that be too much water?


texts:
When are inductors really used? I have read that the elements are typically quite hard to implement into circuits given their physical characteristics. I also read that if inductors are placed in circuits there is a imlpementation method that actually places them flat and coils around itself on a plane, but it's apparently not very common.

I have seen inductors used a little bit in a few wireless applications, but not much else. I know inductors can be used in filters, but so can capacitors which are much more precise and readily available.

In short, what are inductors really used for?


texts: Simple model for a loop antenna for LTspice simulation

texts:
I came across the following circuit on net which is a simple RF/cellphone signal detector:

Before I build and try I decided to simulate it in LTspice as follows:

I'm stuck at point about modelling the loop antenna for the simulation. You can see I put ??? question mark there in above schematics.

What type of source should I place at ??? to mimic the antenna? Should I use a 1GHz sinusoidal voltage signal source or a current signal source at 1GHz for instance? And what would be a realistic amplitude or frequency of the signal for a cell phone nearby like 5 10cm apart from the antenna?

Edit:

Regarding an answer:

Now what can we say about the model for the antenna coupling?

I used a current source with 1uA amplitude and 1 GHz freq. Coupling done by a transformer above with 1uH inductances and 0.01 coupling factor.

Would this be realistic for a loop antenna for 15 cm diameter 10 cm far away from a typical cell phone?


texts: Cut off frequency in simulation does not match in calculation

texts:
I am an engineering student currently learning how to design low-pass active filters. Currently, I am having trouble matching my calculations with the simulation values. My design has the following parameters: fc = 250Hz, Q = 0.70 (Butterworth approx.) My current circuit is shown below:

I am using Multisim conducting AC Sweep analysis to see the frequency response of the circuit. The response is shown below:

Using the formula 1/2piRC (R1=R2, C1=C2), I calculated the resistor value choosing 47nF initially. Supposedly, it should have fc = 250Hz based on the equation. Based on the simulation, the -3dB point is already pass that (x2 = 359, y2 = -3dB). I used the gain 1.588dB, which is the approx. value for a butterworth filter, and calculated for R3 with 10k chosen Rf value.
Am I missing something here? Is there a design consideration I am missing?


texts:
I am an amateur making my own CNC machine.  This involves manufacturing or buying all component parts as appropriate. I am trying to understand what power supply I will have to provide to operate the stepper motors that I intend to use. Even though I will buy a suitable power supply if possible, I still need to design the system to suit the current required and the appropriate voltage to make the system operate properly but safely.
I'm told that 'just applying Ohms law' will not tell me the voltage I need but I don't understand how to work out what is needed.

I will have 3 stepper motors rated at 1.7A maximum each, with 1.5 Ohm coils. The driver ICs are A4988 rated at 35V, 2A max.

What would be the optimal power supply to use with 3 of these stepper motors and 3 A4988 drivers + GRBL stepper motor driver card

I am confused because the motors don't mention Voltage anywhere in their datasheet.

CNC Shield V3.0 features:
Latest CNC Shield Version 3.0

GRBL 0.8c compatible. (Open source firmware that runs on an Arduino UNO that turns G-code commands into stepper signals)

4-Axis support (X, Y, Z , A-Can duplicate X,Y,Z or do a full 4th axis with custom firmware using pins D12 and D13)

2 x End stops for each axis (6 in total)

Spindle enable and direction

Coolant enable

Uses removable Pololu A4988 compatible stepper drivers. (A4988, DRV8825 and others)

Jumpers to set the Micro-Stepping for the stepper drivers. (Some drivers like the DRV8825 can do up to 1/32 micro-stepping )

Compact design.

Stepper Motors can be connected with 4 pin molex connectors or soldered in place.

Runs on 12-36V DC. (At the moment only the Pololu DRV8825 drivers can handle up to 36V so please consider the operation voltage when powering the board.)

aliexpress link for the shield


texts: SystemVerilog: How to give different parameters to modules in the same array?

texts:
In my design, I wanted to use a number of counters with different initial values on reset. Therefore I defined the counter module as follows:

module my_counter #(parameter int INIT_VALUE = 0)
    (
        input clock, reset,
        ...

Then in the design I have 4 instances of mycounter that share a lot of inputs, but have different initial values. I'd like to make them a module array, but the best way I've come up with is:

defparam my_counters[0].INIT_VALUE = 0;
defparam my_counters[1].INIT_VALUE = 1;
defparam my_counters[2].INIT_VALUE = 2;
defparam my_counters[3].INIT_VALUE = 3;
my_counter my_counters[3:0](
    .clock(clock),
    ...

That works with simulation, but I've heard that defparam is considered poor form. Furthermore, when trying to synthesize my design, the synthesizer complains that Syntax error at or near token '['. on the lines with defparam.

How could I do what I wanted to do without a lot of code duplication?


texts: Switching a SPI chip between two devices?

texts:
I'm working on a project where it would be very handy to be able to automatically switch a SPI flash chip between two different devices (a programmer, and the system that's actually using it).

Conceptually, this seems like a very simple task to me.  I'd want a number of DPDT switches connected to the flash chip and both devices.  I'd like to do this in a somewhat automated fashion (I don't want to have to flick a bunch of switches to do this), so I started looking into relays.

What kind of relay am I looking for here?  I'm only looking at 3.3v here, so voltage shouldn't be a problem.  Am I even looking for a relay, or is there some other type of device that would be more efficient?  In total, there are 7 pins that I'd need to switch.

Due to limitations of the system being programmed, I cannot program the memory in circuit so something simple like a SOIC-CLIP would not be an option.


texts: I want to get data from my NodeMCU to my android application

texts:
I have a NodeMCU which is connected to 4 LEDs.
If i hit a URL like 192.168.1.2/relay1on then my relay 1 gets switched on and the LED connected to it lightens up.
What i want to do is i want to know from my android application that is relay1 ON or OFF For ex. When i will start my Android App in the background it will hit a url and in return NodeMCU will send a response to my Android App that the Relay 1 is on and i will get that information on my Android App so that i can process it further.
Any help will be appreciated.
Thank you.


texts: I wish calculate the maximum number of samples per second that can be obtained by a particular I2C ADC. The ADC is 12-bit, operating at 400 kHz and in continuous mode. Any ideas? Thanks!


texts:
I developed a digital clock circuit that simply resembles the function of a stopwatch. The circuit works fine, but I decided to add an extra functionality: A buzz is produced each hour, but I seem to have a problem understanding the usage of IC 555 terminals. So please review the buzzing part of the circuit and explain what should I append to the IC 555 terminals.

Here's an image to the circuit diagram with the buzzing function...

![enter image description here][1]

[1]:

Thanks in advance :)


texts: LVDS Flex Cables - Optimizing Trace Layout for 10 GbE

texts:
I want to run a 10 Gigabit Ethernet (GbE) signal over a 15 pin LVDS flex cable like this one:

My PCB will accept an RJ45 connector, and those traces will run over the PCB to the flex jumper, then through the flex to another PCB.

I want to optimize the layout of the traces through the connector to reduce crosstalk, both between signals and alien. As we only need 8 signals (4 differential pairs) we have plenty of room for grounds. Here are 2 configurations I've come up with as options. My question:

Which configuration is best from a signal integrity perspective?

Another configuration I haven't included.
It won't and doesn't matter.
Impossible to say without testing.

Config 1 keeps DPs as close as possible, isolated by GND.
Config 2 spaces all traces with GND between them


texts: Polarized Electrolytic Capacitor - Reverse Polarization

texts:
There is one small problem in my understanding of polarized capacitors.

The thing is that when using polarized capacitor, you should apply positive voltage terminal to anode and negative voltage terminal to cathode, otherwise it gets destroyed. But can a polarized capacitor survive when AC voltage is applied, where the polarity of source generator is constantly changing, therefore half of the period capacitor is polarized the wrong way, so in that case capacitor would be destroyed? -> in case of capacitor applied directly to AC generator.

I know that for polarized cap, the "reverse voltage" can be as high as 2V for some period of time and the cap still survives it.


texts: SC2272-M4 Behaviour when using relay SRD-05VDC-SL-C 5V DC

texts:
I'm currently encountering a problem when using a relay switch with a 5v receiver. When using the same receiver with a row of LEDS it works flawlessly. I've noticed that the relay keeps making the switching noise over and over like I'm pressing the transmitter really fast apart from the fact I'm not. Also, when the transmitter is moved closer to the receiver from 20" to around 1" the problem stops. Below is some circuits to help show you my setup.

Any help appreciated thanks.

Setup Specs

USB 5v DC (2AMPS)
Receiver (XY-DJM-5V - SC2272-M4)
Relay (SRD-05VDC-SL-C 5V DC)
Transmitter (XY-04)
Diode (1N4001)
Transistor (2N2222A)
Resistor (1.8K Ohms)

simulate this circuit – Schematic created using CircuitLab

Antenna Signal Workaround or Booster

I believe this issue is related to wireless signal on D0. Basically above 20" inches the output to the relay drops from 5.05v to 0.5v and is obviously causing the problem. I think I need to boost the signal or replace the transistor with something that triggers at low and high current but have no clue. Any help appreciated, I'm new at this.

Board Setup


texts: Passive (energy harvesting) tag / transponder chipset solution with 12 inches range?

texts:
I've been using a 134.2 KHz (FDX-B, ISO 11784/85) transponder/reader for use with implanted and pendant tags.  However, I've been frustrated as to the range.  Is anyone aware of a chip/circuit level solution incorporating that or a similar standard (like 13.56 MHz, ISO/IEC 14443, etc) that can be designed to work reliably at a range of up to 12 inches?  For the tag, I only need the basic requirement of transmitting a unique identifier and can use a pendant size tag.
As I understand RFID transponders, I should be able to build an RF emitter with a power output capable of powering a suitable tag at that distance, which when sufficiently energized will automatically broadcast its unique code.  And then the remaining challenge is just to build a suitable reader.  Is it that simple?  Anyone have experience in that area?


texts:
I have been working on my school project for couple of weeks and  I'm trying to make RFID Door Lock by using PIC16f877A and RDM6300 RFID reader.
I made a code works on PROTEUS but I interfaced the cards tags as decimal number like(123456) and after that I noticed that all RF cards have HEX value like (B5:CF:79:23).
Now I want to store my cards tag in the code and if I put the card on the RFID antenna it should be work if the card is correct.
May you guide me to store my card tags on the program (B5:CF:79:23)
my code:
sbit LCD_RS at RD2_bit;
sbit LCD_EN at RD3_bit;
sbit LCD_D4 at RD4_bit;
sbit LCD_D5 at RD5_bit;
sbit LCD_D6 at RD6_bit;
sbit LCD_D7 at RD7_bit;

sbit LCD_RS_Direction at TRISD2_bit;
sbit LCD_EN_Direction at TRISD3_bit;
sbit LCD_D4_Direction at TRISD4_bit;
sbit LCD_D5_Direction at TRISD5_bit;
sbit LCD_D6_Direction at TRISD6_bit;
sbit LCD_D7_Direction at TRISD7_bit;
void main()
{
    unsigned char  i, rfid[13];
    //char String[8]= "B5:CF:79:23";
    int abdo =54321;
    int islam =12345;
    int y;
    Lcd_Init();
    trisc.RC3=0;
    portc.RC3=0;
    portc.RC4=0;
    trisc.RC4=0;
    portc.RC5=0;
    trisc.RC5=0;                     // Initialize LCD
    Lcd_Cmd(_LCD_CLEAR);              // Clear display
    Lcd_Cmd(_LCD_CURSOR_OFF);         // Cursor off
    Lcd_Out(1,1,"RFID Tag Reader");   // Write text in first row
    UART1_Init(9600);                 // Initialize UART, 9600 baud rate
    rfid[12] = '\0';                  // String Terminating Character
    while(1)                        // Infinite Loop
    {
        if (UART1_Data_Ready())        // If UART Data Ready
        {
            for(i=0;i<5;)                // To Read 5 characters
            {
                if (UART1_Data_Ready())
                {
                    rfid[i] = UART1_Read();
                    i++;
                }
            }
            Lcd_Cmd(_LCD_CLEAR);              // Clear display
            Lcd_Cmd(_LCD_CURSOR_OFF);         // Cursor off
            Lcd_Out(1,1,"  << Welcome >>");   // Write text in first row
            Lcd_Cmd(_LCD_SECOND_ROW);
            Lcd_Out_cp("  Card ID:");
            for(i=0;i<5;)
            {
                Lcd_Chr_Cp(rfid[i]);
                UART1_Write(rfid[i]);
                i++;
                delay_us(1000);
            }
            y = atoi(&rfid);
            if( islam == y )
            {
                Lcd_Out(1,1,"  Welcome ISlAM  ");
                portc.RC5 =0;
                portc.RC3 =1;
                if(portc.RC3 =1)
            {
            portc.RC4 =1;
            delay_ms(200);
            portc.RC4 =0;
        }
    }
    else if( abdo == y )
    {
        Lcd_Out(1,1,"  Welcome ABDO  ");
        portc.RC5 =0;
        portc.RC3 =1;
        if(portc.RC3 =1)
        {
            portc.RC4 =1;
            delay_ms(200);
            portc.RC4 =0;
        }
    }
    else
    {
        portc.RC3 =0;
        portc.RC4 =0;
        portc.RC5 =1;
        if(portc.RC5 =1)
        {
            portc.RC4 =1;
            delay_ms(600);
            portc.RC4 =0;
            delay_ms(200);
        }
        Lcd_Out(1,1,"Check Your Card");
    }
    delay_ms(2000);
}
else
{
    portc.RC3 =0;
    portc.RC4 =0;
    portc.RC5 =1;
    Lcd_Out(1,1,"  << Welcome >>  ");
    Lcd_Cmd(_LCD_SECOND_ROW);
    Lcd_Out(2,2,"Press Your Card  ");
}

}


texts: Is skin effect applicable to pulsed DC systems?

texts: Unlike AC, the direction of DC never changes. If the current varies with time, should there be enough variation in the magnetic field to cause redistribution of the current?


texts: (Arduino UNO) Random Button inputs due to change in code

texts:
(First of all: Sorry for the Title.. I really don't know how to describe my problem in one Sentence)

I'm an arduino beginner. I build a two button control for an electronic motor.

simulate this circuit – Schematic created using CircuitLab

I wrote a Code to set the Speed with the both buttons (SW4 and SW3) and to display the speed in the serial monitor on my laptop.

It's working perfectly with this code:

void setSpeedButton()
    {

     while(1){
      buttonLeftState = digitalRead(buttonLeft);
      buttonRightState = digitalRead(buttonRight);

      if(buttonLeftState == HIGH)
      {
        speed = speed - vChange;
        delay(200);
        if(speed < 0){
          speed = 0;
        }
      }
      if(buttonRightState == HIGH)
      {
        speed = speed + vChange;
        delay(200);
        if(speed > 255){
          speed = 255;
        }
      }
      analogWrite(motor, speed);

    vDisplay();

  }
 }

vChange is an integer with the value 9, the rest should be clear.

vDisplay() is a void with this code:

void vDisplay()
{
  Serial.print("Speed: ");
  Serial.println(speed);
}

Okay.. So far so good..But now:

if I change the code (first block) and put vDisplay() in both if-query (to display the speed only if it was changed) its like my board is going crazy and randomly changing the speed every few milliseconds and displaying it on the serial monitor...

I really find no solution for this problem. what is causing this problem?

If I forgot to add some informations, please let me know in the comments below.
Thanks everyone for helping or commenting on this!


texts:
I have 4 of these

http://www.digikey.ca/scripts/DkSearch/dksus.dll?Detail&itemSeq=233597054&uq=636360449794447719

These are star board mounted UVB LEDs ,I need to devise a way to power them in parallel or series, or combo, it doesnt matter whichever is cheapest. The Vf is 6.5v (min 5 max 8) and at 150mA
max power dissipation of 1.6 watts @ 200mA

So if I am correct I would need a 6.5v dc out , 600ma power supply for parallel Or in series a constant current 150ma 26v supply.  My source is 110v.

Can anyone point me in the right direction? The smallest thing I can find on ebay is 24v 1amp


texts:
I'm facing some problems in the initialization stage of the SD protocol on a custom board, specifically when sending the ACMD51 command and reading the Status Card register on the DAT0 line. I've noticed that, when the command fails, I see a duplicated CLK signal on the DAT0 line.
The picture below shows the CMD line(magenta), DAT0 line(yellow) and CLK(cyan). The last pulse before the B cursor is the end bit of the ACMD51 command. As can be seen, the DAT0 line replicates the CLK while the command is transferring and even after the command is issued (just for one pulse).

I've looked in the specs and, from what I understood, DAT lines should be HIGH when there's no data for transferring or LOW for signaling busy, but I don't get what could be the meaning of that duplicated CLK, apparently sent by the card itself. Maybe I've missed some point on the specs. What could cause that oscillation on the DAT line?


texts:
Experimenting with blinking LEDs, I learned about creating delays with either a software loop or a timeout from a timer.
I know that for a simple blinking LED program, where the processes aren't that complicated and timing isn't crucial, using either wouldn't matter. But in more of a time-crucial multitasking context what are the benefits and/or disadvantages of both?

Thanks heaps, here's how I set them up:

Software delay:

void softwaredelay()
{
    int i;
    for(i=0; i<1000; i++)
    {/*Timer Stuff*/}
}

Hardware delay (specific for PIC16 mcu's):

void timerdelay()
{
    OPTION_REGbits.PSA = 0;
    OPTION_REGbits.PS.  = 0b111;
    OPTION_REGbits.T0CS =  0;

    INTCONbits.T0IF = 0;
    TMR0 = 0b11111000;
    INTCONbits.T0IE = 1;

    while(INTCONbits.T0IF==0)
    {/*Timer Stuff*/}
}


texts:
When I search for level shifting 5V pulse to 12V, I came to know about the circuit given below.

It is simply based on a push-pull amplifier configuration as you all know. And what I have understood is, when the input reaches 5V (high) level, then Q1 conducts and since it is an NPN transistor, it will make the gate of the MOSFETs both low so that Q3 starts to conduct and vice versa for when an input is 0V.
When we see a graph in an oscilloscope it will show 12V pulse as in the attached graph given below.

But when input pulse goes low (0V), I cannot see an output voltage at 0V. Instead, I am getting 6.366V in output wave instead of 0V. why does that happen and how to resolve this problem?

Thanks for the help in advance!

Edit: As per suggestions from the comment, I have attached an output node.


texts: Internally Pulled-Up signal on STM32 interrupt pin?

texts:
I used 2 pins of STM32F103C8T6 as button interrupt which is both located on GPIOA port and 12 & 15 pins. the code compiled and loaded to the board successfully using STM32cubeIDE.
One of the input interrupts works perfectly but the other one (pinA12) is not. I measured the voltage of the pin using a multimeter...strange but there is 3.1 volts on the pin. It looks like the pin is pulled up internally.
by the way, the configuration of the pins is no pull up no pull-down and button schematic uploaded

has anyone faced such a strange condition before?


texts: Micropower voltage regulator with discrete components

texts:
Overview

I have an unregulated power source (photodiodes BPW34) from which I want to get a regulated voltage output 1V. My load consumes less than 10 microamps of current at 1 V.

Constraints:

I'm trying to make the whole system low power (microwatts) so that I can power it with only a small number of photodiodes.
My circuit also needs to be built using discrete active components (MOSFETs, JFETs).
Output error of less than 5%.

Till now

I have tried using a Zener diode for voltage regulation and it worked fine but consumed at least 2 mA of current.
I also read about bandgap references which can run in lower power than Zener but not sure how to build it with discrete components.
On DigiKey, I found LDOs which work in microamps of current. How do they work? How can I build a similar version?


texts: Is it possible for series connected battery cells to provide different currents?

texts:
I know current through series elements is always the same. I was wondering if the same is true for series supplies (batteries) or if it is possible for one supply to provide more or less current than another series supply.
I ask because a project for a BMS system states a specific requirement for per-cell current measurement and this got me confused that maybe there is something I don't know.


texts: How to power a raspberry pi and brushless motor from wall outlet

texts:
I am working on a device that uses a raspberry pi (5v and 2.5 amps) and a brushless dc motor (11.1V at .066 amps --
 http://1012007.kancart.com/item_description/431).  I want the device to plug directly into the wall.  How would I go about finding a power supply that can power both of these devices?


texts: How does this circuit attenuate high frequencies?

texts:
I understand that this circuit could be used as a treble control circuit with high frequency gain occuring when R3 is set so a=b (we'll call this k=0), and high frequency attenuation occuring when R3 is 22kOhms across a and b (k=1). So therefore, depending on R3's setting, this circuit is either a high pass (k=0) or low pass (k=1) filter.

When comparing this circuit to high and low pass filters, I do not understand what is happening: C2 will always have a lower impedance for high frequencies and so surely adjusting R3 will only alter positive gain for high frequencies.

I also understand that the capacitors act as an open circuit for low frequencies and so surely all low frequnencies would be attenuated.

Can you help me understand this?

Link to circuitlab.com schematic:
https://www.circuitlab.com/circuit/x66cq6/basic-frequency-control-circuit/

By the way, I realise I have discussed this schematic in previous questions.

Please note: I am asking something different to any of my previous questions. This is no duplicate question.


texts:
I'm just embarking on a new design assignment and I was wondering - where do you guys start with sizing? What's your train of thought? So many devices, which do I start with first?

The circuit is a bootstrapped switch. I'm currently focussing on the first part, which is the clock-boosting circuit. The circuit shown below

I decided to start with the inverter at the very left. Here is my train of thought:

Inverter consists of a PMOS and an NMOS device. The lengths are fixed due to the process (180nm). The width of the PMOS device in the inverter is usually twice as much as the NMOS due to the low mobility of holes.
At the very initial stage where the capacitors on the left are discharged, this inverter will need to drive the gate of T2 and the parasitics on that node and also the gate of T11.

I was thinking that maybe I can use the parasitics capacitances and some parasitic resistances to get a time constant and make sure that is less than my clock period? But I don't have any parasitic resistances in my schematic?

How do I begin to size the inverters? I also don't have capacitor sizes either. All I know is the sampling frequency and hold capacitor size as well as supply voltage and required SNR.


texts:
I am asking a question on behave of a colleague who's struggling with the following.
Does the relocation of the ground bonding point on a CAN bus ground shield make a difference?
In the photo below the scenario of the before and after. The bonding point was 3" away from the connector, it will be now 10" away.

I did some research on the topic which is completely new to me. My thoughts are that it comes down to a factor called the shielding performance of a cable which is indicated by its transfer impedance Zt. The transfer impedance relates a current on the surface of the shield to the voltage drop generated by this current on the opposite surface of the shield:
Zt = U2 / (I1 x L)  where L is the cable length.

The lower the transfer impedance value, the more effective the shielding

Is the equation above enough to prove that moving the bonding location will not affect the shielding performance?

It says impedance but I don't see the frequency factor in that equation.
I am really not sure about this and any help is appreciated.


texts: Is it possible to solder this non-standard package (sim900) using hot-air station?

texts:
I don't have any experience with hot-air soldering. Would it be possible for a complete newbie to solder this kind of package using a hot-air station:

(source: soselectronic.pl)
I only need to solder pads closer to the edges (the round pads closer to the middle should not be soldered).
To give you an idea about how small are the pads the whole package is 24x24mm.


texts: Should the ground prong in an AC power cord carry current?

texts:
When I use a test light on my laptop charger's head, it turns on.  That means it is shorted somewhere, right?
I used a 3 prong to 2 prong connector and inside it I connected the prong in the image that I marked to the neutral and the test light now won't turn on.
Why does it have current in the ground prong and what causes it? Is what I did safe?


texts: How should I connect / design this tactile push button on PCB & schematic?

texts:
I have need for a tactile push button that I am using to cause an interrupt on a microcontroller.

I have found my desired switch (linked above) but I am having trouble deciding the best way to design the component on Eagle. I have come up with two / three methods but none of them really seem correct IMO.

Here is my first attempt:

This is somewhat how the datasheet depicts the symbol for the component as pins 1 and 2 are connected and the same for pins 3 and 4. However, this leads to the possibility of someone connecting something to pin one and then something different to pin two, which would be pointless. One good thing is though, that the PCB editor will allow me to leave two of the pins unconnected which is kind of desirable.

My second version of it is:

Here I have simply 'appended' the package pads so that they know that pins 1 and 2 are together and 3 and 4 are likewise. This makes a nice little schematic symbol as well as stopping someone connecting two different signals to effectively the same pin. However, on the PCB board it wants me to connect the two respective pins to each other as it thinks it is paramount that they are connected, however as it is mechanically connected inside the switch I don't see a point in doing this, and it makes the board more messy and a little harder to do.

Is there a standard way of making these components on Eagle or any other schematic / PCB editor? Or will one of these methods be suitable?


texts: What would be the easiest method of removing FR-4 from a FCBGA chip

texts:
Does anyone know of any method of decapsulating a FCBGA chip that uses FR-4 as its exterior packaging ? I am interested in studying the internals of such chips and others as a hobby. I understand that there are companies that can perform this service but as I mentioned I would like to undertake this project as a new hobby. I would like to keep the internals completely intact including the die and all other components.

If this is not the correct place to ask a question of this nature then I would appreciate if someone could point me in the direction from where I might be able to gather a solution.


texts:
I'm wiring my brother's bicycle with a Philips Rally H4 Bulb 12V 130/100W. He needs it for like 15-25 minutes everyday.
Since I have only a 12V 7Ah battery and it is insufficient for this bulb as it will drain the battery really bad and damage it, I have connected the bulb to a 6V 10Ah battery.

So the bulb wattage will be like 32.5W(current draw of 5.41A) & 25W(4.2A) at 6V and its quite bright in my opinion.

I have a few questions:

Can I run both the filaments at once?(Total watts will be like 57.5W)
Right now I have connected it directly through a Universal Ignition Key Switch, but it does heat up after running for 20 minutes. Do I need a headlamp relay?
Also what wire gauge would be the best. Right now I'm using 18 AWG I guess.
Will a 12V 10A fuse be enough?


texts: Where can I find a good theoretical treatment of conductor shielding?

texts: Suppose one has three current carrying cylinders lying on the same plane. Some of the electric field of the first conductor ends up on the second conductor, which creates capacitance \$C_{12}\$. But also some of the field lines of the first conductor end up on the third conductor, also creating capacitance \$C_{13}\$. I am trying to find a theoretical derivation of the value of \$C_{13}\$. All I am finding so far is people extracting the value of \$C_{13}\$ using quasi-static field solvers.


texts: Should I keep the decoupling capacitor's vias isolated from ground fills?

texts:
I'm finishing up a PCB layout which contains a 6.5 GHz ultra-wideband transceiver with a chip antenna, an ARM controller running at 72 MHz with a 12 MHz crystal, a 16 MHz SPI bus with 3 peripheral components, USB communications, and a buck converter.

Handling the EMI and decoupling considerations has been a real learning experience :)  I've used good design practices, as I understand them.  I have only one more question before shipping off this design.

I am generally placing decoupling caps like so (this is an 0402 cap):

The vias are going to internal ground and power planes.

For additional shielding, I want to do a selective flood fill on the top and bottom layers of the (4-layer) PCB and stitch them to the ground plane.  I wasn't planning to allow this fill to connect to the pads of the decoupling caps.

My question: should I allow thermals to connect to the ground vias, even though the decoupling should already be sufficient?  Or is it preferred to keep them isolated?  Here is an example of connecting the vias to the top fill:

Thanks!


texts:
The purpose of this is to show images to mice, which have one UV shifted cone relative to humans. An ideal solution would be a monitor that had 3 wavelengths : 365nm, 410nm, and 500nm. But, the 410nm wavelength is optional and a projector would be usable in a limited context.

The easiest way I can think of is swapping the blue LED on a DLP projector with a similar LED one. I would be replacing the projecting lens with a UV compatible alternative set of optics - but I'm unclear on whether there would be other optical issues that would interfere with this.

Is there any way to do this with a non-projecting display (crt or LCD)? Are there other things I should consider?


texts:
I'm trying to count pulses/sec. on a microcontroller pin in the ~5 to 100Hz range. The µC can operate at 5V input, so I have to get the voltage level down safely.

A simple resistor comes to mind, yet that leaves any surges open directly to the µC pin - meh.

I've come across this answer, but the question remains if that circuit is capable of "fast" 100Hz changes.

Is there a proven, reliable way (by means of an IC maybe?) of contacting 5V or 3.3V pins to "dirty" 12V inputs?
I have the 12V and 5V available to drive any "ready made" IC.


texts: What are the possible boot modes in the S32K146 (NXP S32K Series MCU)

texts:
I have been investigating S32K146 MCU boot modes and possible mode selection options.

I am interested to know the possible boot modes and how it can be set up.
From datasheet (Page -92): It can be seen that boot can happen from the flash memory.
After googling and few research: Came to know that booting is also possible from RAM using programmable VTOR (Vector Table Offset Register).

What are the possible boot modes in S32K146 and how this modes can be selected?


texts: Are there any 20v to 240v step up transformers in the market?

texts:
I'm constructing a AC motor driver for a project that will take in a DC voltage source and output an AC voltage fit for an AC-motor. I didn't have prior experience with power electronics or power inverters so one thing that shocked me was how high the supply voltage was for cheap AC motors (110-240VAC). My plan is the following:
Use a microcontroller to make PWM impulses to a H bridge that then outputs the sine wave to a step up transformer whose output connects to an AC motor. I've constructed an H bridge and I've picked a suitable MCU, but I'm having trouble with the transformer and AC motor. This circuit could be a lot easier with a low voltage transformer and AC motor but I can't find one. I have a 24v battery to power the H bridge which will output 20v for the transformer. The problem is that I can't find a step up transformer online that can output up to 240v from a ~20v input. Does anybody have any experience with this that can share tips on how to make this more effective?


texts: Avrisp mkii not recognizing atmega 328p chips

texts:
I have three different sets of chips, the attiny85, 328p, 328p-au. Initially, the avrisp mkii, was programming the atmega328p, however now it is not recognizing this chip (i.e. 328p) or the 328p-au.

I checked the circuit and everything seems fine, I added the necessary capacitor, and pull-up resistors. I am using atmel studio 7, and it is recognizing the attiny85, chips.

Since it was working initially, could this mean that maybe a setting on atmel studio might have a problem? Have anyone faced this interesting situation before?

Error:

Failed to enter programming mode. IspEnterProgMode:Error status received:Got
0xc0, expected 0x00 (command has failed to execute on the tool)


texts:
I found this note on a devicesheet:

I'm asking about the output current:
How can we fin Iload = Vout/(RS*R2/R1) ?

For our example, we will take Vcc = 3V, we call Va the node crossing R1 and RS wires. We consider that the Op Amp is ideal.

Then IRS = ILoad

IRS = (Va-V-)/RS

Iload = (Va-V-)/RS (*)

Vout = R2/(R1+R2) (consider Vce = 0V)

And Vout = V+

IR1 = (Va - Vout)/R1

We use (*)
Iload = (IR1*R1 + Vout-V-)/RS

I'm a little lost. Can someone help me please?


texts: Getting problem in triac based fan speed control

texts:
I'm using this circuit to control the speed of ceiling fan. The fan speed is divided into 8 steps. (0:off & 8:full speed) with 100us gate pulse.
This circuit works with incancescent light bulb perfectly. But having some issues with FAN.

if I increase the speed of fan step by step with 1.5 s delay of each step (12 s full speed time) fan works fine at full speed.

If I start fan at 5th step instantly fan rotate at its speed, and increase each step with required delay of1.5 s fan works fine.

If I start fan at 5th step instantly fan rotate at its speed, and instantly put fan at 8th step(full speed) fan stops with some humming sound.

If I start fan at full speed(8th step) instantly, fan does not work. It gives humming sound.

This concludes that if the fan has required torque on current step it works on next step otherwise not. But for first 5 steps it always works fine.


texts: Using transistor output as a logic input

texts: I'm trying to use the output of the following transistor circuit as an input for XOR gate. It doesn't seem to work, I'm out of ideas. Any help would be appreciated.


texts:
I have a couple of 5v servo Motors (this (big), and this (small)) powered by THIS I2C PWM expansion board.

Right now for testing I'm powering the thing with the +5v line of the raspberry pi, but fluctuations are too high for the pi so I want to power it from an external source. I'm running out of 5v power banks (already powering the Pi's with them) my question is .. would it be ok to power the PWM extension board (and there fore the servos) with 4 x 1.5v standard batteries? This leads to 6v, not 5v. Could I just plug a resistor in series, or even a diode, to bring it from 6 to 5?

My main concern is on the servos (the board keeps a line for the power on the servos and the logic will be powered with 3v3), will they overheat? will the current on the batteries be enough to move the servo? will they last just for some minutes?

Is there anything else I should think about?


texts: Sensing of AC current. Isolation Capacitor Problems?

texts:
I want to measure the AC Current flowing through a Piezocrystal (replaced in the circuit with a resistor) being driven by a TI DRV2700. http://www.ti.com/lit/ds/symlink/drv2700.pdf
This Chip puts out a differential 200Vpp and so ive decided to power it from a standard wall adapter, while the analog frontend and the AD Converter get their Power from a USB Port. The circuit reflects my understanding of the System. Is it true that with frequencys of 1khz to 10khz the Isolation capacitance will produce an error current? If so, how can i prevent this problem?

Thanks everyone!


texts: Split power across three circuits with difrerent resistance and provide equal current

texts:
simulate this circuit – Schematic created using CircuitLab

Me and a friend are working on a project and have three circuits with resistance (8.9k ohm) across them and a single 9v battery. We need to pass 9v along at least two of the circuits at once in full DC, so we can't PWM it. How can we do this? Every circuit only draws 1 mA but they need to stay at 9v each.


texts: Driving 100W COB From mains using discrete components I have on hand

texts:
I was wondering if I could realistically drive a 100w COB directly from mains using a bunch of discrete components that I already have on hand.
I have a bunch of BJTs MOSFETs and E cores and I want to build a circuit to run 1-4 COBs in series using a current sink directly from rectified mains voltage with no isolation. My reasoning is that they sell 50w COBs that plug directly into mains voltage on amazon that use very inefficient linear regulation, so why not make a switching regulator directly from mains and call it a day?
Here is the circuit I designed in LTSpice.

simulate this circuit – Schematic created using CircuitLab
Is there a better way to tighten up the current control, because when I simulate this circuit in LTSpice and I can't seem to get the current down to 3A, the lowest current I've seen was 3.6A which was like 125W (DEAD COB). If this idea isn't completely insane, how can I get the current down to 3A so that I can actually test this thing in reality where I wont have to risk killing 2 COBs in series?
Final Edit
The solution was R36, apparently the resistor was necessary to limit current enough to reset the latch cleanly, like in the case of a BJT RS flip-flop, where each transistor has a base resistor and the base of either transistor has to be pulled directly to ground for a period to enact function.


texts: Measuring a divided differential voltage into a single ended DAQ

texts:
I am looking to log a high sped voltage (20 kHz) +-60 V, into a single ended DAQ at +- 5V.
Is the following circuit a good example of accurately measuring a differential voltage or is it overly complicated? It is derivative of some diagrams I have seen.

simulate this circuit – Schematic created using CircuitLab
On Andyaka's suggestion I present the simplified system below.

simulate this circuit


texts:
If I have more reg declared, every reg needs to have his own always block, for example:

output reg[3:0] A;
output reg[3:0] B;
output reg[3:0] C;

always @(posedge clock) begin
    if(reset) begin
       A <= 4'b0;
    end
    .
    .
    .
end

always @(posedge clock) begin
    if(reset) begin
       B <= 4'b0;
    end
    .
    .
    .
end

always @(posedge clock) begin
    if(reset) begin
       C <= 4'b0;
    end
    .
    .
    .
end

What if I have a loop, lets say something like this:

repeat n times
    if(C<0) begin
         shift C two positions
         C <= C + 1;
    else
         shift A one position
         A <= C + 1;
end

As you see here, inside of if(C<0) block, I can't have

C <= C << 2;
C <= C + 1;

so I will need separate register to store C shifted, let's say it will be output reg[8:0] shiftC, so by the way I need separate always block. And of course, separate always block for A too.

My question is, how can I make this loop work, if I use multiple always blocks?
PS: here, number of bits is just informative, and does not matter.


texts:
Above is the picture describing the configuration outside the MCU.

Vin is 0 to 5V Peak to Peak square wave which may have 0 to 50 KHz frequency, or even higher.

The MCU is supposed to handle interrupt every falling OR rising edge(configure as either one of them, but not both) of the /INT port.

In order to not jam the MCU with interrupts in case of very high frequency VIN, I
added a simple low frequency filter in front of MCU port.

The problem is that I am seeing false trigger of interrupt, If i set up as rising edge trigger. Everything works fine if  i set up interrupt as falling edge.

How I know that Interrupt is false triggering is that I am measuring the time between each interrupts, as I am feeding the certainly known signal(from calibrator, observed with oscilloscope).

The problem goes away if I remove the 10nF capacitor.

However, in my application, I have used up all the timers, so I cannot use timers to limit the interrupt frequency, which forces me to limit it outside of the MCU

The cpu is PIC32 series.

Is there any ways I can achieve purpose of preventing external interrupt from firing too frequently?


texts: What is the difference between red glass diodes and blue glass diodes?

texts: I have some old hermetically sealed glass diodes that have a blue color under the glass, which is different from the red ones that I normally see. Does anybody know what the difference between the red colored ones and the blue ones is if there is any? Maybe they just randomly chose the colors, but I feel like there must be some difference...


texts:
I have a problem, I have to do my schematic on cadence. It is a complex board with an Ethernet part, an Alimentation Part, a display part, a microcontroller part etc...

So I want to do my schematic on different pages (one for each part).
I also want a pages where I can see the interpages connections because I thing the schematic will be clearer with that.

I did it with hierarchical block. The problems with hierarchical blocks is that it is working with schematic folder not pages. The result is the component number is not incremented automatically:

let's say I have 2 Capacitors in folder SCHEMATIC1 and 2 in folder SCHEMATIC2 then my capacitor value are: C1 and C2 in my SCHEMATIC1 and C1 and C2 in my SCHEMATIC2.

What I want is :
let's say I have 2 Capacitors in folder SCHEMATIC1 and 2 in folder SCHEMATIC2 then my capacitor value are: C1 and C2 in my SCHEMATIC1 and C3 and C4 in my SCHEMATIC2.

I have a lot of components, so I don't want to manually change the designator.  I want OrCAD to do it alone.

How is this possible?

I hope it is clearer.


texts:
I'm trying to set the weak internal pull-up resistor for a GPIO, but can't seem to guess the right macro name that maps to whatever memory address in the PIC.

None of these seem to be recognized by the compiler.  What is the proper way to look these up?  All I include is <xc.h> so I have no idea where the actual header file is.

I have the datasheet with the register definition open for WPUB, but it does not map to code in any consistent way that I can find:

#include <xc.h>

void InitGpio(void) {
  TRISBbits.TRISB3 = 1; // compiler recognizes
  WPUBbits.WPUB3 = 1;   // 'undefined identifier' compiler error
  WPUB.WPUB3 = 1;       // 'undefined identifier' compiler error
  WPUB = 1;             // 'undefined identifier' compiler error
  WPUB3 = 1;            // 'undefined identifier' compiler error
  _WPUB = 1;            // 'undefined identifier' compiler error
  _WPUB3 = 1;           // 'undefined identifier' compiler error
}


texts:
How to automatically turn off an SCR after being latched for DC supply?

Type of switches that turns on/off a circuit with a certain voltage

But when i try it in multisim it doesnt work.


texts:
A DAQ board is outputting 0-10VDC analog voltage via its DAC.
The DAC cannot supply more than 5mA so I'm planning to use the following emitter follower for more current(x-axis is the DAC outpout voltage incresing 0 to 10V, y-axis is the base emitter voltage difference):

I thought emitter follower keeps the difference between the base voltage and emitter voltage constant around 700mV.

But if I use the following resistor 1ohm, the emitter follower cannot function anymore and will draw hundreds of mA current from DAC which may cause its damage. Here is the 1ohm case:

If I setup with the right resistor as in the first figure I'm safe but if someone accidentally shorts the resistor or ect. I dont want the DAC to be damaged.

I have two questions:

1-) Why emitter follower cannot keep the base emitter voltage constant in 1ohm case?

2-) Is there a way to totally be safe for DAC will never get loaded?


texts:
I want clearly know this,
Serial is protocol right?
Then what is the Modbus? Is it under serial.
And what are RS232 and RS485?
What is UART and serial and UART same?
What about TCP?
TCP and serial are method of communication the protocols. Right?


texts: Receive SMS from GSM module in a battery powered system

texts:
The title is pretty clear. I'm working with a GSM module (SIM908) and the whole system is powered by a battery and is supposed to work for a pretty long time.
The system gets a sample from a sensor every 2 hours or so and send all taken samples every day using SMS. In the mean time it goes to sleep so nothing is working and thus I can not receive any messages from GSM.
I want to send some settings and configs by my phone using SMS to a system that is in sleep in the moment.

In a normal system where there is power all the time I can read and process received messages using AT commands but in a battery powered system I'm not sure what exactly to do.
Cause I wake up system for a pretty small time just to send data but how can I receive SMS that I have sent maybe couple hours before right in that time while I'm NOT planning on keeping system on for a long time? (I mean I can't wait to receive messages forever)

Unfortunately there are no AT commands to give me the number of received and stored messages so I would be able to turn on the system for a couple of minutes and loop over those number of stored messages to find the message I'm looking for.

there is just a AT+CMGL="REC UNREAD" command but it gives the whole messages including their indexes, their numbers, their time-date, their contents and everything in response which is not very nice for me. It would be better if I knew the number of total messages instead and then I could simply loop over that number of messages. Something like hey dude there are 12 messages in module memory.

BUT what if turning system on for a couple of minutes was not enough and I lost my message somehow or the network hasn't delivered it to the GSM module yet? What do I do then?

I couldn't thing of something else but to turning on the system every day for a couple of minutes and then process stored messages if there is any. But like I said what if those minutes were not enough for the GSM module to receive messages? GSM is like cancer to a battery and I can not keep GSM online forever or for a long time.

So what is the best way to ensure that a sleepy system will receive a SMS correctly? And it doesn't matter if it gets it that very day or the day after. But I can send a SMS as a feedback to the sender so he will know that the system did recieve the messages finally (It's a good idea!).
I hope I was able to make my point.


texts: How to simulate a phototransistor in a circuit, prefereably in ltSpice?

texts:
I copied a circuit from a working pcb, which is detecting small IR intensity changes. I like to simulate it in ltSpice but I dont know how?!
notes on circuit:
the transistor is bc847, op amp is lm324, phototransistor longer pin (perhaps Emitter) is connected to IR-PHOTO++


texts: I'm trying to make a circuit that will latch on\off with a pushbutton. This is what I have, but the LED just stays on even though the current shows the latch is working. Thoughts? Thanks :)


texts: How to increase the distance of wireless power transfer?

texts:
I'm trying to make a wireless charger. But I want to make the distance farther.
So, How can I increase the distance of wireless power transfer?
Does making the frequency higher will increase the distance?
Or winding more turns in the coil? Or making the voltage higher?


texts:
A few questions here along the same lines, I'm looking at the datasheet for the MSP430x2xx family (I'm using the MSP430F235 FWIW). It says there in section 2.2.4 that "illegal instruction fetch" is an interrupt source for the Reset vector. Then separately under 2.2.1 under the topic of Non-Maskable Interrupts (NMI), "An access violation to the flash memory" is cited as a source.

(1) Can anyone explain to me the difference between (and/or causes of) these two apparently distinct event sources (with different apparently different consequences)?

(2) Can I write an ISR for the NMI source, and make it act like a soft reset by reinitializing the stack pointer and "recursively" calling main or something like that, so that the register and RAM (global variable) state isn't altered?

(3) Assuming I can't intercept the one that results in a Reset vector (which I presume also comes along with a reinitialization of all the registers?), can I at least detect at startup that it happened by checking some status bit to decide what to do about it, and if so which status register/bit would that be?


texts:
I've bought a 12VDC pump for a CNC machine I'm building. I want to get a connector that will fit this plug so that I can run it from my power supply source.

The problem is that I don't know what these connectors are called in order to buy a suitable plug.

Anyone know what this type of connector is called?


texts: What is this? What’s it used for? It appeared for 10 days and was then removed. I checked with our city and the power company and internet/phone companies and no one knows what it was.


texts: Can I use TRIAC dimmer output AC rectify to DC

texts:
I am playing with TRIAC dimmer from past few days, by firing TRIAC at different phase angle the overall output can be lowered.

but i was thinking if i can use a diode rectifier and a filter capacitor to get DC out of the Dimmer. I know it will be a non isolated topology.

Transformer are always there but, thinking if i can use triac dimmer output and rectify it to DC.


texts: How can I calculate power consumption of the amplifier from its datasheet?

texts:
In datasheet of the transistor, CGHV40100, I could not find the power consumption of its. How can I calculate the power consumption?
Datasheet of the CGHV40100


texts:
I am designing SIM900 circuit in Eagle. To test the circuit I saved the board layout in pdf and took its print out. I placed the SIM900 IC on the paper and found out that few pins do not match. I was thinking of using PCB toner transfer method to print the circuit on copper clad and solder the pins of IC manually. But few pins do not match. While placing the SIM900 on the paper, the routing goes from in between the IC.

Is there something which I am doing wrong.?

Also I want to know that when I run the DRC check, it shows clearance error for all the pins of the SIM900.

Below is the board layout


texts: What instruction on the STM32 consumes the least amount of power?

texts:
The ADC module of the STM32 is used in my application which is very sensitive to power consumption.

In this application, the ADC is required to work only at 20 samples per second. Using the DMA uses more power than I expected. I decided to make it work in single-sample mode by having a task (FreeRTOS) trigger a convert and wait for the convert to be done every 50 ms.

Here is my code:

 u16 i;
 RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE);
 ADC_Cmd(ADC1, ENABLE);
 for(i=0;i<sizeof(ADC_Channel_Table)/sizeof(u8);i++)
 {
     ADC_RegularChannelConfig(ADC1, ADC_Channel_Table[i], 1, ADC_SampleTime_71Cycles5);
     ADC_SoftwareStartConvCmd(ADC1, ENABLE);
     while(!ADC_GetFlagStatus(ADC1, ADC_FLAG_EOC))
     {
     }
     ADCConvertedValue[i] = ADC_GetConversionValue(ADC1);
 }
 ADC_Cmd(ADC1, DISABLE);
 RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, DISABLE);

Where "sizeof(ADC_Channel_Table)" is 5 because 5 channels are sampled.

The sample time is ADC_SampleTime_239Cycles5 (actually 256 cycles where the convert time is included). 5 channels therefore requires about 1500 cycles. ADC clock is 12 MHz and 1500 cycles is about 120 µs.

And look at the code:

while(!ADC_GetFlagStatus(ADC1, ADC_FLAG_EOC))
{
}

This means the CPU keeps busy-waiting for the convert to be done, and the wait time is 120 µs in total.

120 µs is big as the CPU must wait for such a long time and this wasted the power, but this level of time is too small for the RTOS. The RTOS is unable to use up such a small time.

So I want to insert some "power-saving" instructions to the wait loop.

For example:

while(!ADC_GetFlagStatus(ADC1, ADC_FLAG_EOC))
{
    __ASM("NOP");__ASM("NOP");__ASM("NOP");__ASM("NOP");
}

But NOP consumes the same amount of power as any other instruction I have tried.

What instruction can I insert in my while loop that would consume the least amount of power?


texts: Can a Multiplexer be used as a Demultiplexer

texts:
I'm trying to build a musical machine for myself. I've come to a situation where I want to control 8 LEDs using 3 selector pins on my 74151 IC. I've attached the circuit diagram below. Looks like I'll need a Demux instead of a Mux but I don't have any Demux IC on me. Is there a way I can achieve this using the IC 74151?

In this example I've made S0,S1,S2 as high so X7 should glow. But it's not working. Please help me out. Thanks!


texts: How to get a stable 5V Supply to get stable readings from ADC on Raspberry Pi using SPI

texts:
I have been working on a way to get very accurate measurements of the tilt of a surface. The signal I use is  a bipolar one that ranges between +/-2V. I started by trying the MCP3008, but the since the signal is bipolar, I had to add a resistor potential divider, then a buffer. Those components added some uncertainty, along with the fact that 8 bits with a 3.3V supply only gives 3mV accuracy ( I need at least 1 mV). The circuit worked but only to about 10mV after averaging over time.

To get a better solution, I decided to use an LTC1867 chip which accepts bipolar inputs. I also added an external 2.5V reference LTC6655 to improve accuracy. However for this I had to use the 5V supply (which I have read is more unstable). The reading I got where very unstable but in the right range.

My main question:
1. Is there a way to obtain a different 5V supply that is stable i.e, using batteries/ step down from mains and capacitors and a voltage regulator/ reference. I would like to use this supply just for the ADC and not to power the whole Pi. How would I take care of isolation and the different grounds.

2.This is more of a code question. On my ADC, I have the 2.5V Reference. Using spidev, how to I call spi.xfer2 on two different channels? I ask this because I wanted to use the error from the channel with the 2.5V as an offset to add to the ADC output of my actual signal to reduce the errors. Whenever I tried the code below, one of the values was always wrong compared to when I called spi.xfer2 only once

spi.max_speed_hz = 10000
adc = spi.xfer2([180,0])
spi.close()
spi.open(0,0)
spi.max_speed_hz = 50000
ref = spi.xfer2([244,0])
spi.close()


texts: Can I get power from my Thermostat's AC relay wires?

texts: I have a 2-wire thermostat that activates my baseboard heater when the 2 wires are shorted.  I did an experiment closing those two wires with a relay and got that working well with an ESP32 as the controller for the relay, but the board and relay require their own power supply.  I would like to use the 20VAC on those two wires to provide power to the ESP32 and relay, but I'm not sure if this will work the way I think it will.  Can you take a look at this scematic and tell me if I'm going to blow my thermostat relay doing this?


texts: How can I write high-speed A/D data to an SD card?

texts:
I want to use a microcontroller and A/D converter to do some high-frequency (~100 kHz) long-term (minimum of five second buffer, looping until triggered) data logging. It looks like a good way to do this is with an SD card. I know there are different ways of accessing an SD card, including directly through SPI. I also believe that one can write to a file system, or directly to the card without a file system. I'm also concerned about writes having to cover entire sectors instead of byte-by-byte, or about writes interfering with continuing A/D operation, but those may not be valid concerns.

Presently I'm using dsPIC 33 chips, giving me instruction rates of ~60 MIPS; I'm willing to change to a different controller family if necessary.


texts:
I am a total newbie for electronics and hardware programming, but I would really like to start practicing it. As a first achievement, I would like to find a simple step motor and drive it through a simple USB connection. The easiest (less HW/less SW) is the way to achieve this, the better.

What kind of hardware and software do I need ? How can I achieve this first step? Please consider as you are explaining it to a child. I really know nothing about this activity.


texts:
I am developing a circuit to convert 230VAC to 12VDC. I ran into the problem that my smoothing capacitor for the full wave rectifier is pretty huge. The load is estimated to be around 500mA and therefore the capacitor needs a capacitance of several mF.
My circuit consists of: transformer 230 - > 12 and a full wave rectifier.
 Is there a better circuit for such an application? Desired voltage ripple is no more than 0.2V.


texts:
I had once an oral exam where the teacher was asking me how to calculate the power gain in a parallel way. I am doing datacommunication/telecommunication.
In the following pictures I am sharing existing calculations which I have made earlier:

So these are the questions where I would think that is normal to ask and we can calculate that.
Now during the previous oral exam he was asking me to solve this:

Can we calculate this in the way how we do that also in parallel resistors?


texts: Carry-lookahead adder - what happens to carry bit?

texts:
I recreated and trying to understand for the sake of fun and learning the circuit that can be seen here on second page: Link . This is basically a 4-bit carry-lookahead adder, but there is one thing that I cannot understand. If there will be 1111 and carry bit will be 1, it looks like there is no way to pass a carry to the next unit. Turning carry bit on and off is irrelevant for the output (I mean here output information about carry). Maybe I'm missing something/recreated it wrong or some logic is in the "carry output" unit, anyone could explain it, and show how should connections between that kind of adders should look like? :)

You can download this circuit recreated in CEDAR Logic Simulator Here .

Regards!


texts: Salvage data from a reverse connected thermocouple?

texts:
My SAE Baja team had a competition this past weekend, and we were using some thermocouples in order to get some temperature data on the drivetrain and engine.

They were hooked up right before the start of the race and I think in the rush were connected to the AD595 (here is the datasheet) amplifiers backwards. i.e. T- to the + input and T+ to the - input.

Is there any way to calculate a proper temperature from the output?


texts: Cause of high failure rate in SC189 buck regulator

texts:
I have a small board that uses the SC189C buck regulator to take 5 V down to 3.3 V. For whatever reason somewhere between 25% and 50% of these boards have had the voltage regulator fail at some point, including in ways that have killed the microprocessor they are supposed to power (an ATSAMD21E18A).

In some cases, the regulators have failed with an internal short. In other cases, they lose the ability to regulate well, and I have seen the switching frequency at about 40 kHz and also at 5 MHz when it is supposed to be fixed at 2.5 MHz. In that specific case, using my multimeter to probe the voltage on the output voltage sense pin causes the switching frequency to change between the two and the output frequency to change with it. In both cases, the output voltage sense pin is "close" to the 1.2 V it is supposed to be driven to, but off, at 1.18 or 1.25 V, and stable (no apparent ringing) at these values. In another case, they end up giving a total 1.7 V output for a while.

So far, I have simply been replacing a lot of the failed SC189C regulators. This has worked fine, but I am interested to know what might have caused the failures in the first place, and if there is any additional circuitry I can add to protect them. The datasheet seems to imply they are robust with protection features.

The nominal current draw of the circuit is 130-150 mA, and we are using the SOT23-5 package with the recommended layout from the datasheet: https://www.semtech.com/uploads/documents/sc189.pdf

Input capacitance: 10 uF
Inductor: 1 uH, 55 mohm, 1.6 A (LQM2HPN1R0MG0)
Output capacitance: 22 uF, X5R
R_fb1: 17.4K, 1%
R_fb2: 10.0K, 1%
C_ff: 6.8 nF

The following is what I see with the probe directly across C10 when I insert the USB cable into a battery. It seems to not do this when I insert the USB cable into other 5V sources. The actual peak voltage there is 6.76V.


texts: Simple stand-alone power supply for an arduino device?

texts:
The world of diy electronics is pretty new to me, but I have a sparkfun kit, a temperature sensor, and a new greenhouse that I want to learn the behavior of.  Basically, I want to record the temperature once an hour.  I'm happy saving that locally and periodically connecting the thing to my computer to download the data, but I don't know how to power this contraption.  There's no power source near the greenhouse, so I think my choices are batteries or maybe a solar panel.

A quick look at the battery page of sparkfun reminds me that I know nothing about this.  How long would a 3v battery last?  A 8v?  A Lithium Ion battery?  How does something like that get recharged?  Can these be plugged directly into the board somehow, or (more likely) is there an intermediate step? And what would that be exactly?

Is it too much to hope that there exists somewhere a simple recipe to follow to supply an arduino with a stand-alone power supply?  I'm open to all options, with preference toward the simpler options (at least to start with).


texts: Error Loading Design Unresolved Reference

texts:
Please help!

DUT: AND gate

module ANDgate(a, b, c);
input a;
input b;
output c;
assign c = a & b;
endmodule

TESTBENCH: Without task

`include "simple_task.v"
module task_calling();
  reg tb_a;
  reg tb_b;
  wire tb_c;

ANDgate myAND (
  .a(tb_a),
  .b(tb_b),
  .c(tb_c));

always
  begin
    task_ANDinputs(tb_a, tb_b);
    $display ("time = ", $time, " a = %d, b=%d, c=%d", tb_a, tb_b, tb_c);
  end

endmodule

TASK:

`include "ANDgate.v"
module simple_task();

task task_ANDinputs(output x, output y);

begin
  x = 1'b1;
  y = 1'b0;
end

endtask

endmodule

Question, there is no compilation error, but it says ERROR LOADING DESIGN. Is there a problem with my program? The only use of the task is to input 1 and 0 to x and y respectively. And this is the detailed errror: ** Error: (vsim-3043) C:/altera/14.1/Simple Task 2/task_calling.v(14): Unresolved reference to 'task_ANDinputs'.

Please advise.


texts: Intel max 10 dimensions - datasheet & BSDL mismatch

texts:
TL;DR: The BSD file from Intel doesn't match the datasheet. What are the right dimensions?

BSD: https://www.intel.com/content/dam/altera-www/global/en_US/others/support/devices/bsdl/10M02SCM153.bsd

Datasheet: https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/packaging/04r00471-00.pdf

So I was drawing a max 10 (10M02SCM153) and afterwards saw that you can download the BSD files from Intel (see link above). I crosschecked the imported BSD drawing and the Intel datasheet and came to the conclusion that they don't match.

The number and the layout of the pins match.

According to Intel and the datasheet their BSC informations are in milimeters: https://www.intel.com/content/www/us/en/programmable/support/support-resources/knowledge-base/solutions/rd07152011_585.html

I have a 10M50DAF484 besides me and measured his dimensions and crosschecked with the datasheet: Everything Ok.

Then I checked the BSD file of the 10M50DAF484 and the dimensions where ok too.

In the case of the 10M02SCM153, which dimensions are the correct ones?


texts:
Been trying to get out two matching power factors (p.f) from the following circuit Calculation,

What am I doing wrong? Been working on it for 8 hours in total.  Used matlab to minimize my error and so on. But I keep getting  a differnece...


texts: avr-gcc timer overflow interrupt handler in inline assembly

texts:
My current project involves producing 200KHz PWM waveforms using timer 1 in fast PWM mode. I would like to increment a 16-bit counter every time the timer overflows (every 5μS)

volatile uint16_t count;
ISR(TIMER1_OVF_vect)
{
    ++count;
}

The microcontroller is an ATmega8 running at 16MHz, leaving only 80 cycles for servicing the interrupt and incrementing the variable before the next interrupt fires. Looking at the compiled code...

00000890 <__vector_8>:
 890:   1f 92           push    r1
 892:   0f 92           push    r0
 894:   0f b6           in  r0, 0x3f    ; 63
 896:   0f 92           push    r0
 898:   11 24           eor r1, r1
 89a:   8f 93           push    r24
 89c:   9f 93           push    r25
 89e:   80 91 c9 00     lds r24, 0x00C9
 8a2:   90 91 ca 00     lds r25, 0x00CA
 8a6:   01 96           adiw    r24, 0x01   ; 1
 8a8:   90 93 ca 00     sts 0x00CA, r25
 8ac:   80 93 c9 00     sts 0x00C9, r24
 8b0:   9f 91           pop r25
 8b2:   8f 91           pop r24
 8b4:   0f 90           pop r0
 8b6:   0f be           out 0x3f, r0    ; 63
 8b8:   0f 90           pop r0
 8ba:   1f 90           pop r1
 8bc:   18 95           reti

...I found out that the generated interrupt service routine could easily be optimized further. This is the first time that I have tried to include inline assembly to a C program, and I have found out that learning to do so is unnecessarily frustating and requires understanding some fairly esoteric syntax. I would like to know how to access uint8_t count within the inline assembly (as the variable is allocated statically unlike in every answer that I have seen on the web). Is the code otherwise OK, or have I missed something else?

ISR(TIMER1_OVF_vect, ISR_NAKED)
{
    asm volatile("push    r24"                                      "\n\t"
                 "in      r24, __SREG__"                            "\n\t"
                 "push    r24"                                      "\n\t"
                 "push    r25"                                      "\n\t"
                 "lds     r24, %A0"                                 "\n\t"
                 "lds     r25, %B0"                                 "\n\t"
                 "adiw    r24, 1"                                   "\n\t"
                 "sts     %B0, r25"                                 "\n\t"
                 "sts     %A0, r24"                                 "\n\t"
                 "pop     r25"                                      "\n\t"
                 "pop     r24"                                      "\n\t"
                 "out     __SREG__, r24"                            "\n\t"
                 "pop     r24"                                      "\n\t"
                 "reti"                                             "\n\t"
                 : "=r" (count)   /*this does*/
                 : "0" (count));  /*not work*/
}

As a side note, is there a way to make the compiler reserve a register pair specifically for uint8_t count, as that would allow reducing the ISR lenght by at least 6 instructions (by eliminating both lds and sts instructions, a push to stack, and a pop from stack)?


texts: According to my understanding the common collector transistor should be like figure-1 but in book it is given as figure-2 and in it Vcc is given.Can anyone provide me proper explanation of this.


texts:
I have a pump motor that I was trying to wire. It's been a long time since I've wired a motor and I haven't seen one with just 4 wire connections- U, V, W, and ground.
I have 220v 3 ph power.

Can I wire it directly to a plug that can be plugged in to turn on and run the motor? Or do I have to have a controller?

Also do my red and black wires go to the U and V terminal and  the neutral wire to the W terminal? That other terminal is the ground.

Thanks for y'alls help!


texts: I'm trying to implement a SIM card interface using TI TM4C123XL. I have a question about a clock. TI MCU seems to provide possibility to interface smart cards but don't let me multiply clock without multiplying baud rate. So it seems to me I will have to generate the clock using timer myself. So, how precise should a clock be? Should clock be synchronised with data? If so, how? What is its purpose?


texts: How are load currents balanced in a distribution system?

texts:
Below I drew a simplistic view of a distribution transformer which supplies a particular public area for example some households and shops ect.:

Va, Vb and Vc are three phases(line voltages) of the transformer.

In my previous question I've asked about why balancing the line currents i.e making Ia, Ib and Ib close is important.

Now imagine Z1, Z2 and Z3 are initially same. Let's say they represent same type of electric owens. And we can say Ia, Ib and Ic are initially equal.

And now imagine one of the electric oven Z3 is plugged of from the mains.

In this case, will the system automatically equalize Ia, Ib and Ic again for the sake of a balanced system? Where and how is that done practically? Is there a control mechanism unit for that purpose?


texts:
Below circuits are created in LTspice to confirm my understanding.
Digital input(Vg) would be controlled by the user(High or Low).
'On' condition:  Vg < Vs+Vt for P-channel mosfet

1) For Vg = 0,  0 < 3+(-1.2v) then, it is on condition.
   Vs = Vsd+V_R2 + V_R3 , I labeled the sum of V_r2 and V_r3 as Vd on the circuit.
   3.0V = (~0V) + Vd, As I expected, 3.0V on Vd is measured on circuit.

2) For Vg = 3v, Vg(3v) > Vs(3v)+(-1.2v) so, it is off condition.
   Since it is off condition, pmos operates as an open switch. I expect Vd to be low(~0v) but, 800mV is measured across Vd. I have no clue about this.


texts:
I'm trying to understand how to build a battery charger.

I need to convert from the usually european 220 VAC to 24 VDC but also from USA 110 VAC to 24 VDC like the normal chargers, to adapt it to the whole world plugs.

From the secondary to the battery it's clear for me, rectification, smoothing and regulation.

But my problem it's, how to connect or make the transformation from 220 or 110 VAC?

How can I use both of the voltages (one or another not two at the same time) to feed the transformer without using a manual voltage selector? Like the most of the chargers?

If the avobe solution it's complicated, how can I install the manual voltage selector in my design? and also I need just only one transformer or for both design I need two different trasnformers?

Thanks in advance for your help! :)


texts: Do I need fiducial marks on both my board and my panel for automated assembly? And how many fiducial marks do I need per board for a round 80 mm diameter board?


texts: What is needed to switch a relay via logic output (e.g. from Raspberry Pi)?

texts:
I'm working on a project with a raspberry pi involving some sensor and a relay.
Actually I'm Using a board like this one:

So I connect GND,5V, and a GPIO to the IN pin to control the relay state: ON/OFF.

Now I'm starting to move from the prototype stage..

I'm working on create the PCB, and I'm wondering if I can drive the Relay, with a "naked" version like this:

is it possible? Why all the other components are required on the board, figure 1? resistor, transistor etc..
I'm expecting to connect:

D to the source and one between A or B to the destination
C to GND
E to a GPIO ..correct?

Maybe I'm using "rocket to kill an ant".. I'm using the relay for control a low voltage (between 12V and 24V DC)..is there any more appropriate component or integrated circuit that you can propose?


texts: Do PS3 controllers use SPP to send the state of the buttons?

texts:
I am making a little Arduino circuit, and I would like to use a PS3 controller to control my project (for now).  I know there are things like MotionJoy for PC, but how does this software work?  Would it take a lot of reverse engineering to get the buttons from a PS3 controller to a Bluetooth to UART chip?

The reason I am asking is because I already own the controller.  If it can't be done I have another idea in mind, but I don't want to have to spend more money  on this.  Because of this I appreciate answers related to the PS3 controller, rather than an answer about alternatives.

Thank you!


texts:
Is the USB 3.0 (and latest 3.2) specification only guaranteed to be
backwards compatible to USB 2.0?

Some Arduino microcontrollers follow the original low-speed 1.5 Mb/s
USB standard, so equivalently, are new smartphones and laptops not
guaranteed to work with them?  A specific example product which
does not support low-speed USB would help.


texts: I'm trying to figure out if the BQ78350R1 has a 0.5mm, 0.6mm or 0.8 mm distance between its pins. I'm staring at the data-sheet but I can't find this information. Thanks for giving me a hand with this.


texts:
I came across this question in my assignment:

Initially, the question seemed very absurd, but anyways i applied kirchhoff's voltage law and got

$$V_c = 10V$$

But Since we all know that:
$$i_c = C\frac{dV_c}{dt}$$
$$\Rightarrow i_c=0$$

Seems quite okay because since the time constant of the circuit is zero, it would charge up almost instantly and thus behave like an open circuit

However, when i plot the same ciruit in Ltspice , the i vs t graph is  quite different :

I have no idea how the above graph came about. Can anyone explain why the simulator gave the above graph ?

Thanks


texts:
Is there any difference between the following two netlists for a resistor connected between node5 and node0 with resistance 20K ohms?

• R1 5 0 20k

• R1 0 5 20k

If not, is a resistor the only type of component that is always symmetrical, or are there other components as well where the order of the connected nodes does not matter? Additionally, is it possible in a netlist to use a node name instead of a number (for example set 0='ground')?

Examples taken from: https://www.cpp.edu/~prnelson/courses/ece220/220-spice-notes.pdf


texts:
So I am attempting to tie a real time clock (DS1302) into an Arduino and then eventually a AVR chip directly. From all of the schematics I have seen, it appears a crystal is required. I read through the datasheet (above) and did not get the feeling you can run the chip without one.

Am I mistaken? I hope so as I would just like to hook this up to the Arduino and also have a coin cell battery back it up. Does this IC require a crystal or does it have its own built on board?


texts: Designing waveguide based structure using cst

texts:
I am going to start designing waveguide based circulator , hybrid and loads using cst or ansys workbench.
I am quite familiar with the design of microstripline and stripline based systems using ADS.
But I am.new at designing using waveguide based structures..I want to know how should I start. I am familiar with the theory of waveguides.but I don't know how to design waveguide based structure..Like how to launch the RF power, how to design cavity , how to couple energy , how to realize diffrent modes in waveguides.
Please help me out. Thank you.


texts:
I have an application where my Arduino is controlling a mcp4725 DAC for a design replacing a sensor on an old car. The DAC provides the analog output voltage, .25V to 4.9V to the computer. I recently measured the OEM device I'm looking at replacing and the sensor output had 40mA of current on the line.

Because the MCP4725 DAC only is good for 25mA I need to increase the output current of my DAC, MCP4725.

After some reading I thought I could use an op-amp in a voltage follower configuration.

Considered to use the TI TLV2460 family but seemed like the output current goes to zero when powered with a 5V supply with a near 5V output voltage.

Seems like all the op amp are like this.  What can I do?  I need 60 mA of output current from .25mV to 4.9V.


texts:
I have a circuit about 4x1 bit RAM. I should implement this at LAB. In this case I can make this easily but I dont know which element used for what purpose. Here is the figure.

I googled it but couldn't find something useful.

Why we used decoder and data selector?
Why we used not gate?
What happening while changing Write/Read state?

Best regards.


texts: Calculating transfer function for complicated circuit

texts:
I have a circuit with many components for which I need to find the transfer function. More precisely, the circuit I am looking at looks something like that:
Please don't go into the trouble of computing this transfer function, I just want the general methodology that one would follow as I will later use a code which will do all the tedious mathematics for me. That being said, my professor keeps telling me that I need to use the formula \$H = \lvert \frac{Z_2}{Z_1 +Z_2}\rvert\$ which is quite easy to use when I have a simple RC filter but when all of these components are included, I am lost.
Should I just start from the end and just keep adding impedances? For instance,  say:
$$Z_a = ((Z_{C_5} + R_4) || Z_{C_4}) + Z_{L_2} $$
Then:
$$Z_b = (Z_a||Z_{C_3}) + R_3 + R_2 $$
Similarly:
$$Z_c = (Z_b||Z_{C_2}) + Z_{L_1}$$
And finally:
$$Z_d = (Z_c||Z_{C_1}) + R_1$$
Hence:
$$H = \frac{Z_c||Z_{C_2}}{Z_c||Z_{C_2} + R_1}$$
Where \$Z_{C_n} = \frac{1}{j\omega C_n}\$ and \$Z_{L_n}=j\omega L_n\$
Would something like that, in theory, give me the appropriate transfer function? If yes, then it's easy enough to code this. However, as I lack experience with these type of systems, I am not sure whether my method is appropriate. Any feedback or edits to the question to make it clearer are always much appreciated.


texts: Verilog code "always @" block not working as expected

texts:
My Verilog code samples the input (Vin) at fixed intervals using a counter. The counter is a 2-bit register whose value increments at every positive edge of a clock (CLK). The counter takes on values from 2'b00 to 2'b11, and I want to store the value of Vin whenever the value of the counter=2'b01 in a register named u1. I have written the following code:

module inp_samp (Vin, CLK);
input Vin;
input CLK;
reg u1 = 0;
reg [1:0] counter = 2'b00;
wire CLK_inner1;
always @(posedge CLK) begin
    counter <= counter + 1'b1;
end
assign CLK_inner1 = CLK && (counter ==2'b01);
always @ (posedge CLK_inner1)
    u1 = Vin;
endmodule

Testbench:

module testbench1(); // Testbench has no inputs, outputs
reg Vin, CLK; // Will be assigned in initial b
inp_samp dut (.Vin(Vin), .CLK(CLK));

initial begin
    Vin = 0;
    CLK = 0;
end
always
    #10 CLK =!CLK;
always
    #22 Vin = !Vin;
initial  begin
   $dumpfile ("counter.vcd");
   $dumpvars;
end
initial
  #120  $finish;
endmodule

The waveforms are given as follows:

I don't understand why u1 register changes its value at the highlighted instants. What should I do to fix it?


texts: Driving a stepper motor (0K57STH56-2804A) with transistors

texts:
I want to drive a stepper motor for a homemade CNC machine but I'm not so experienced so any help would be great.
I'm working off of this site: https://www.digikey.com/eewiki/display/Motley/How+to+Drive+a+Stepper+Motor
I was thinking of using 2N3906 transistor in the H-bridge and using either an msp430 launchpad or arduino to control it.
Should i use a different transistors?
Why are they using pnp and npn? I don't really understand the reason given in the website.
Any tips so I don't burn my MCU pins in case i screw up?
Also, any resources that could help with the Darlington pair and transistor calculations would be very appreciated.


texts: STM32F103rb datasheet mentions 4gb address space, while only 128kb flash and 20kb RAM?

texts:
I am trying to advance my way into the STM32F103RB, and I don't understand the address space mapping defined in chapter 3.2 in the the STM32F103RB datasheet.

It states:

  Program memory, data memory, registers and I/O ports are organized
  within the same linear 4-Gbyte address space.

The next chapter 3.3 details on where the different pheripherals are segmented in this chunk of memory. It ranges from:

0x4000 0000 to 0xA000 0FFF.

And my GPIOA peripheral exists on the address:

0x4001 0800 to 0x4001 0BFF.

I really don't understand what I am looking at here. The STM32F103RB only has 128KB flash and 20KB RAM. So obviously I am misunderstanding something here, but how should I map the address ranges to memory that I really have available?


texts: Does anybody know what kind of component this is?

texts:
In the picture below, there are 4 green components.  Does anybody know what kind of component they are?

Some information:

When the circuit is live, I measure no voltage drop.
My multi-meter measures 0 ohms in either direction.
The context is the power input stage of the whole pcb.

Update:

I actually found a visually identical part:

It is a PTC Resettable fuse, by Bel Fuse, PN 0ZCJ0100FF2E.  So there you go.


texts: Ideas to connect wires at 90deg without solder?

texts: I'm in the process of building a 16x16x16 LED cube and am looking for a way to connect two wires at a 90 degree angle (e.g. +) without soldering them together.  The connection does not need to be electrical, it can be structural only.  The reason I don't want to solder them is that I'm constructing the cube as 16 vertical planes.  If and LED goes out somewhere in the middle of the cube, I'd like to be able to take the entire 16x16 plane out, fix it and put it back.  The 16x16 planes will be soldered, as will at least one horizontal connection on each level, but I need more horizontal connections for structural support and don't want to try de-soldering a joint in the middle of the cube.


texts: How to ignore an undesired short output signal coming from arduino?

texts:
I'm currently programming a Nodemcu ESP8266 board, fully compatible with Arduino IDE.
The project drive a relay board with a GPIO pin set as output.

You can see the board pinout in the following image:

I am forced to use GPIO15 (labeled D8 on this board).
My code set the pin value to HIGH in setup() (a LOW value triggers the relay).

Unfortunately, at boot the pin goes LOW for say a millisecond. It is something related to bootloader, as the pin goes HIGH as soon setup() is executed.

The final result is that the relay is triggered for a very short time every time the board reboots.

I really would like to get rid of this short signal. Is there some simple circuit I can realize to ignore every signal shorter than a few millisec?

The pin goes from a LOW value (0v) to a HIGH value (3,3v). The relay board should  trigger the relay for any signal > 1,5v.

If I use another pin the problem is not present. Thus I think the connection (quite simple actually) is correct and no problem with the software. Unfortunately I should use D8 in the final setup.


texts: I am working on a high current MOSFET switch project. I would like to implement short circuit/overcurrent protection, that would be fast enough to prevent MOSFETs from blowing up. In the actual application, I am using HAL sensor to measure current, but it wouldn't allow me to take any action quickly, because of its delay. How should I realize this protection? Should I do it by using shunt and high-quality op-amp, there is any better solution?