texts: PIC24FJ256GA410, UART interrupt, freeze after enable

texts:
I'm fairly new to PIC and MCUs. My board has PIC24FJ256GA410 MCU with external 3.6864 MHz crystal. I'd like to use UART1 for debugging purposes. Below is my main() that just initializes UART1. However, once I program the MCU with code that calls InitUART(), my board becomes unprogrammable. Every attempt at programming it gives me Failed to program device error. Also, sometimes, it writes something like this into console:

Address: 278 Expected Value: eb0000 Received Value: a90000

or

The programmer could not be started: Could not connect to tool hardware: ICD3PlatformTool, com.microchip.mplab.mdbcore.ICD3Tool.ICD3DbgToolManager

I'm using Microchip ICD3 and MPLAB X IDE for programming. If I comment out the InitUART() call, I can program the board again. What's the problem with my code? It's mostly identical with the code from dsPIC33-PIC24 FRM - UART datasheet except I don't write default values. Also, I've seen other examples on the Internet and my is quite similar. I configured only the output pin.

EDIT: After I comment assignment to _RP11R in InitUART() function, I can successfully program the board every time. AFAIK, I need to select pin for the UART1 perpherial too. But once I set the _RP11R, the board becomes unprogrammable (and UART1 doesn't work anyway). I'm pretty sure the RP11 is the correct UART output pin.

#include <xc.h>

#define FOSC 3686400
#define FCY (FOSC/2)

#include <libpic30.h>

#pragma config JTAGEN = OFF
#pragma config GWRP = OFF
#pragma config FWDTEN = OFF
#pragma config ICS = PGx3
#pragma config FWPSA = PR128
#pragma config WDTPS = PS2048
#pragma config FCKSM = CSECMD
#pragma config OSCIOFCN = OFF
#pragma config POSCMOD = XT
#pragma config FNOSC = PRI

#define BAUDRATE 115200

static void InitUART(void)
{
    __builtin_write_OSCCONL(OSCCON & 0xbf);
    _RP11R = _RPOUT_U1TX;
    __builtin_write_OSCCONL(OSCCON | 0x40);
    U1BRG = (int) (FCY/(16 * BAUDRATE) - 1);
    _U1TXIE = 1;
    U1MODEbits.UARTEN = 1;
    U1STAbits.UTXEN = 1;
}

void __attribute__((__interrupt__, auto_psv)) _U1TXInterrupt(void)
{
    _U1TXIF = 0;
}

int main(void)
{
    TRISBbits.TRISB3 = 0;
    LATBbits.LATB3 = 0;

    InitUART();

    int i = 0;
    while (1) {
        LATBbits.LATB3 = i;
        i = !i;
        __delay_ms(500);
    }

    return 0;
}


texts:
I'm working with MB1034B discovery board and STM32F051R8 microprocessor. I'm trying to output some PWM pulses using hardware timers. I use this tutorial (for STM32F4xx): http://visualgdb.com/tutorials/arm/stm32/pwm/

The problem is, that after some changes needed to compile the code, which I have no idea if are correct, it doesn't work. I'm using VisualGDB and VS2013 Community. I have a led on PC8 and PC9.

Thanks for your help. Here's my code:

#include <stm32f0xx_gpio.h>
#include <stm32f0xx_rcc.h>
#include <stm32f0xx_tim.h>

void InitializeTimer(int period = 500)
{
    RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);

    TIM_TimeBaseInitTypeDef timerInitStructure;
    timerInitStructure.TIM_Prescaler = 40000;
    timerInitStructure.TIM_CounterMode = TIM_CounterMode_Up;
    timerInitStructure.TIM_Period = period;
    timerInitStructure.TIM_ClockDivision = TIM_CKD_DIV1;
    timerInitStructure.TIM_RepetitionCounter = 0;
    TIM_TimeBaseInit(TIM2, &timerInitStructure);
    TIM_Cmd(TIM2, ENABLE);
}

void InitializePWMChannel()
{
    TIM_OCInitTypeDef outputChannelInit = { 0, };
    outputChannelInit.TIM_OCMode = TIM_OCMode_PWM1;
    outputChannelInit.TIM_Pulse = 400;
    outputChannelInit.TIM_OutputState = TIM_OutputState_Enable;
    outputChannelInit.TIM_OCPolarity = TIM_OCPolarity_High;

    TIM_OC2Init(TIM2, &outputChannelInit);
    TIM_OC2PreloadConfig(TIM2, TIM_OCPreload_Enable);

    GPIO_PinAFConfig(GPIOC, GPIO_PinSource9, GPIO_AF_2);
}

void InitializeLEDs()
{
    RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOC, ENABLE);

    GPIO_InitTypeDef gpioStructure;
    gpioStructure.GPIO_Pin = GPIO_Pin_9;
    gpioStructure.GPIO_Mode = GPIO_Mode_AF;
    gpioStructure.GPIO_OType = GPIO_OType_PP;
    gpioStructure.GPIO_PuPd = GPIO_PuPd_UP;
    gpioStructure.GPIO_Speed = GPIO_Speed_50MHz;
    GPIO_Init(GPIOC, &gpioStructure);
}

int main()
{
    InitializeLEDs();
    InitializeTimer();
    InitializePWMChannel();

    for (;;)
    {
    }
}


texts: Quartus Gives Undefined Signal For the State of a Finite State Machine. Supposed to Be Showing Enum of the State_type

texts:
Before beginning a larger project in Quartus II I'm trying to do the section 8.8 "FSM as an Arbiture Circuit" example from the book "Fundamentals of Digital Logic with VHDL Design 3rd ed" and I can't get Quartus to work like it's supposedly documented.  The Machine State Variable which is a VHDL SIGNAL in the FSM's Architecture won't show as anything other than Undefined, even though the FSM is working fine.

Here is a screenshot of the Finite State Machine Implemented in Quartus:

http://i.stack.imgur.com/XtzCn.png

The book, in a different example shows the FSM's state just fine.  The Machine State is the Y variable, which is showing an ENUM like Quartus is supposed to.

I've even followed the directions provided by Altera in the below linked pdf.  The directions for this are on pages 27 to 29.  I've followed them exactly but that SIGNAL is still showing up as undefined no matter what.  Am I missing something?
ftp://ftp.altera.com/up/pub/Altera_Material/11.0/Tutorials/VHDL/Quartus_II_Simulation.pdf


texts:
Often a chip will be available in several different packages. Sometimes QFN which has a thermal pad, and TQFP which has no thermal pad. The justification for the thermal pad is that it helps conduct heat away from the IC. If this were the case, then why doesn't the TQFP need the thermal pad?

The reason I'm moaning is that the thermal pad gets right in the way of the layout. Tracks and vias can't be placed under the device (except in some cases), making fanout tricky in space confined PCBs.

Is the thermal pad just traditional, or is there a good reason I'm not aware of?


texts: How to interface two leds and two push button with 8051?

texts:
i'm using 8051 mcu to do some tests.
i'm trying to use two input for two push buttons and two outputs for two Leds.
SW1 = push button 1
SW2 = push button 2
LED1 = led1
LED2 = led2

for example
-if i push S1 the Led1 will glow continuously.
-if i push S2 the Led2 will glow continuously.

These two command works independently.

So here what i tried:
only S1 and Led1 are working.
Please help, thank you.

#include <reg51.h>

sbit S1 = P2^0;
sbit S2 = P2^1;

sbit Led = P1^0;
sbit Led2 = P1^1;

void main()
 {
    S1 = 1;
    S2 = 1;

     while(1)  // For ever
       {
         if(S1 == 0)  // if press Push button
          {
            Led = 0;// ON LED ( active low )
            while(S1 == 0);// Wait here for release of push button
          }
      Led = 1;
       }

{
  if (S2 == 0)
    {
      Led2 = 0;
      while (S2 == 0);
       }
       Led2 = 1;
   }
}


texts: I am attempting to control Vout to 3.8V and have selected ADJ regulator as my regulator.  According to the circuit below, I need to calculate what R1 and R2 should be to get the desired Vout, Vin being fixed at 5V.  Normally this wouldn't be a problem but the formula given below has the term Iadj and I am not sure how to calculate this?  I could calculate using Ohm's law if I knew the voltage of Adj pin, but I am not sure what this is.


texts: How to drive NFET with current sink (LP5569)?

texts:
I have a circuit where LP55231 is driving NFET and the load is a LED. It's working fine.

Now I need to switch LP55231 to LP5569. The difference is that LP55231 PWM output is current source and LP5569 PWM output is current sink.

How do I need to change the circuit to get it work with LP5569?
I tried to figure it out with LTspice, but couldn't get it to work.


texts: A datasheet of Li-Ion battery states "The current should be maintained at 1.0 It or less". What kind of unit is It?


texts:
I have a encoder on a dc motor that outputs it's signals as RS-422. A, ~A, B and ~B so it just sends to raw ticks of the encoder and not serial data.

I didn't have a line receiver available so a colleague thought to test we can just connect the A and B lines to a microcontroller and use those. I thought this should work as well but we are seeing weird transition in the encoder pattern that shouldn't physically be possible.

So searching online I found discussion such as this:
Can I an RS422 interface to Arduino's serial pins?

which say without really explaining that you really do need to decode the signals for it to work. So my question is basically. Could the reason be that I see weird encoder transition be due to us not using a proper line-reciever? And also why isn't it the case that just connecting the positive signals is enough.

Be aware the cable from the encoder to the MCU is just a couple of inches.


texts: SMPS (LM2678) what transformer to use and why?

texts:
I have made a few power supplies in the last year (only linear ones using voltage regulators). I have always used a big simple step down transformer, from 230v down to 12/24v (depends on the supply i need).

There are a lot of circuits out there on how to make the power supply for the LM2678 but from what I've seen no one writes about the transformer. From what i know, since SMPS operates at a high frequency i can use a smaller transformer?

I have a lot of small yellow ones that looks like this:

But since i don't know much about smps transformer, and i really don't want to play around with the 230v ac to find out where the primary/secondary of the transformer is. I wanted to ask you guys if you could tell me a little more about what transformer i should use and why.

I first thought of using a step down transformer from 230v down to 6v ac, and then use a resistor to limit the current to like 10mA and use that to find the primary of the smps transformer because that would be safer right?

Any tips are appricated! Thank you.

PDF to the LM2678:

http://www.ti.com/lit/ds/symlink/lm2678.pdf


texts: Single NPN or NPN+PNP (push pull) to drive a P-MOSFET

texts:
I need an ESP32 to drive two p-MOSFETs (https://datasheet.lcsc.com/szlcsc/1808131746_Diodes-Incorporated-DMP2104LP-7_C260933.pdf) as PWM controlled output for a motor.
As the ESP32 can not deliver enough current, I want to add a simple gate driver for the MOSFETs.
Board space is very limited, so a dedicated driver IC is not an option.

I now have two solutions:
First, a driver with a NPN BJT, with a current rating of 600mA, using a MMDT2222A (https://datasheet.lcsc.com/szlcsc/Diodes-Incorporated-MMDT2222A-7-F_C96379.pdf)

Second, a driver using a NPN+PNP BJT in push-pull configuration, with a current rating of 200mA, using a NST3946DXV6 (https://datasheet.lcsc.com/szlcsc/ON-Semicon-ON-NST3946DXV6T1G_C232646.pdf)

Space wise, both versions fit on the board, but which version is preferable regarding speed and power consumption? The device is battery driven and very small, so power consumption and heat dissipation are important.


texts: How can I use an IC family or adapter to switch automatically from solar cell to batteries & reverse?

texts:
simulate this circuit – Schematic created using CircuitLab

How can I use an IC family or adapter to switch automatically from solar cell to batteries & reverse ?

if no load => solar cells charges the batteries

if there is a load
     then
        if p2 > p1 then trigger makes comparator connects load power from CELL
        else (p1 > p2) then trigger makes comparator connects load power from  batteries
     else
        CELLS charges the batteries
     fi
fi

Is there some specialized IC to manage something like this as "comparator"
is this a bad approach of the need? (and then if you have ideas please provides them).

This is not really similar to : this question ...


texts: 30x Incandescent light bulb in parallel ? + dimming

texts:
I'm trying to connect 30x small incandescent light bulb in parallel (1.5v / 300mA). But I'm having some issue designing the supply and dimming circuit. Does it just work like LED's for the calculations or shall I take other things in consideration ?

So far my plan is to wire everything in parallel, get my lab supply to throw 1.5v and draw 9A (300mA * 30) and use a MOSFET with a pwm signal from a MUC in order to dim the whole thing.

Does that sound like a good route or am I totally wrong ?

Thank you !


texts: How to generate an underdamped oscillation using transformers?

texts:
We want to generate an underdamped oscillation with a transformer, with this circuit:

I am able to generate this signal:

But I want to use a transformer instead something like this:

What should I be doing to get the underdamped oscillations as above?
Sid


texts: Mos circuit amplifier with multiple stages , overall gain

texts: I have the following circuit and i am trying to find uin/vout. My thought process is that M3-M4 is a Cmos inverter so i can calculate the gain until that point as A1= -gm3(ro3//ro5) How can i find the overall gain?


texts:
Trying to prove to myself that the Q factor for an LRC series circuit is \$\sqrt{L/C}/R\$, but I am struggling with it...

My reasoning runs that the half power upper frequency limit is (ignoring the \$2\pi\$ factor) R/L, so half the frequency delta is \$R/L-1/(\sqrt{LC})\$ and the full bandwidth (assuming symmetry) at half-power is \$2(R/L-1/\sqrt{LC})\$

Then given \$Q=f_{res}/BW\$, we have \$Q = (1/\sqrt{LC})/(2(R/L - 1/\sqrt{LC}))\$,

which can be simplified to \$L/(2(R\sqrt{LC} - L))\$ which is similar to the correct answer, but not correct, with an errant factor of 2 and a stray -L kicking around.

Where has my reasoning gone wrong?


texts: How to measure the resistance of digital potentiometer AD5241 in circuit when power on

texts:
I have designed a transimpedance amplifier including a digital potentiometer AD5241. The circuit is showed below. I want to test the AD5241 to make sure it works as designed.

simulate this circuit – Schematic created using CircuitLab

My question is how can I measure the resistance of AD5241 when power on. As AD5241 has been connected to other components, it can not be tested independently.

Should I use a multimeter to measure the resistance between the two terminal of AD5241 directly? But I have learned that when the circuit is power on, the measurement value would be incorrect.

Or any other methods?
(one condition is that the output of PD may be unknown)

Thank you!


texts: Disposable camera EMP coil not producing any field

texts:
I recently took on this project: https://www.youtube.com/watch?v=WIMhraVcdTg

Trying to use a disposable camera as an EMP generator.

I wrapped my wire around a bottle, but it still won't do anything, except I do hear a little spark in the push button. It goes through the coil but doesn't seem to have any effect.

I connected the coil directly to the capacitor leads with a button and ON/OFF switch. What are some things that would cause the capacitor and coil to not make the EM Field or EMP?

I'm starting to think the coil is not correctly set up or is wound incorrectly.

Is there a requirement I may be missing, for this coil to create the desired effect?

Here is my schematic:

simulate this circuit – Schematic created using CircuitLab

Here is my coil and circuit, what do you guys think is the problem? Do I need a different coil or what?

Here is a schematic of the camera, may not be exactly what I am using but a close equivalent:


texts: Ground return paths versus ground loops in digital PCB routing

texts:
I have a two layer PCB, where I do not have the liberty of adding power planes.  (However, I potentially could add ground or power pours).  My issue is that I am trying to decide whether I should use a strict star-topology to route power and ground to each IC, or also add additional ground return paths for the signaling between the ICs.

To illustrate my point:

In the picture, RED corresponds to the power traces, and black corresponds to the ground traces that are currently on the PCB.  The gray traces (also highlighted by yellow) are the additional ground traces I am considering adding between the ICs to serve as return paths for the data signaling between the ICs (mainly i2c and spi).

I am torn between adding these additional traces because of the potential of creating a ground loop.  However, I may also need to provide a return path for the data lines between the ICs.

What is better?  How do I solve this problem of ground loops versus return paths?

As an additional question--while not ecnomocically feasibly, is it worthwhile to try to move to a 4-layer PCB?  When do you determine whether you should move up to the 4 layer PCB?


texts: I have an Arduino programmed to print a line containing eight values separated by commas every 10 milliseconds. Every line is terminated by a new line character. But when I try to read this data into Python using pySerial, it doesn't read the entire line. PySerial starts to read lines from the middle, sometimes giving weird values. But when I open the Arduino serial monitor, all the data is displayed correctly. How to I fix this?


texts: Mosfet Gate Pull-Down and Gate Resistor Failure

texts:
I'm trying to make an inverter which has a dc bus of 350V and output of 220V(spwm). The problem is I've run the circuit two times and in the first one the gate resistors explode and in the second one gate pull-downs explode. When I disconnected dc bus and checked pwm, everything is fine, I have all the true pwms. Then I disconnected pwms and applied dc bus voltage to the circuit, I also got everything true(DC bus is a rectifier output). But when I applied pwms to the dc bus I got my gate resistors and pull-down explode.

I'm using IRFPF30PBF mosfet, 100Ohm gate resistor and 1kOhm pulldown.

What can cause this resistor failures I can't understand.

Here is the schematic I'm using:

Thank you.

Edit: Photo of PCB(one of two halfbridges and IR2110 driver)


texts: Solving a BJT circuit for transistor voltages/currents

texts:
The problem is if \$\beta= 100, V_{cc} = 9v, R_1 = 16k, R_2 = 4k, R_3 =10k, R_4 = 1k,\$  solve for \$ I_b, I_c, I_e, V_b, _c, \$ and \$   V_e.\$

I tried to write equations for each loop:

\$V_{cc} - (i_{R_{1}})·R_1 - (i_{R_{2}})·R_2 = 0 \$

\$-(i_C)·R_3 - V_{CB} + (i_{R_{1}})·R_1 = 0\$

\$-(i_E)·R_4 + (i_{R_{2}})·R_2 - V_{BE} = 0\$

\$V_{cc} - (i_C)·R_3 - V_{CE} - (i_E)·R_4 = 0\$

And tried to put that in matrix vector form, but ended up with a singular matrix.

What kind of approach can I use to solve this problem?


texts: Why do multimeters have an aluminium foil at the back?

texts:
I was wondering what is the purpose of aluminium foil at the back of some multimeters? I did a continuity test and found that it is connected to the ground (COM) terminal.

My initial guess was that it was some kind of shield but since it wasn't fully enclosed and multimeters don't work in that high RF range it didn't seem plausible. Also, it wasn't some kind of ground plane as it is only connected to the board at one point via the spring.

What is it exactly?


texts: Connection Problem of Night vision IR led for RasPi Camera

texts:
I have a pair of these IR leds that I am powering independently of the RasPi camera using 5V. I have placed them away from camera and each other and soldered wires to the copper pads after correctly determining the terminals.

But there are several issues that come up with this arrangement.
a) In the start, the leds are getting powered but after some time (about 2 minutes), they start blinking.
b) The frequency of blinking gradually starts increasing.
c) The copper pads where wires are soldered also gets heated up.

I assumed that the connections must be right or else the leds would not have worked for the first few minutes. I could find a lot of information on the camera but not on these lights.

I have shown the connection diagram for leds, but I tried testing one led at a time. I am using 5V DC and the current consumption of one led is about 0.29A.

I am just puzzled as to why this is happening. Are they supposed to be connected together with the screws and nuts as shown in various tutorials? Why is it making a difference?


texts: Led Driver/Controller for 3.3v & 5v circuit

texts:
PWM Circuit for 3.3v & 5v logic controllers @ high ampere

With a 5m LED Strip (14.4W/m), a regulated 12v 10A power supply (120w) and lots of microcontrollers (Arduino Uno, Arduino Micro, Raspberry PI B rev.1, Raspberry PI B+,Raspberry PI 2) i'm not able to properly control the PWM.

ATM i'm using the ULN2803A to drive Some short LED strips. Limit is 500mA per PIN.
But thats not enough. I want to drive a full LED strip and totally control it with the Arduino or even better the Raspberry.

This implies using 3.3v and 5v volt at a very low amperage.
While there are hundreads of nice tutorials everywhere, none of them seems to be working properly.

Analyzing the most used type of circuits, it appears that you only need 3 mosfets to drive a led strip with a microcontroller. And that is already wrong in a real world envoirement. A Resistor between the signal and the GND is needed to swtich off the strip if the controller fails. But the biggest problem is to fulfill the N-type Mosfet's Gate Threshold Voltage (VGS) wich if even if it states that 4v are enough the graph shows that to properly saturate a mosfet you need at least 7-8v at the gate. Another problem is the smothness. The square wave created by the controller defers to the one amplified to 12v. It takes to much time to switch/charge/discharge, call it however you want. Mosfets also need some sort of smoothing circuit.

I got some N-type Mosfets RFP70N06, IRF510,  IRF520 from various local stores. It appears that those are the only ones used where i live. I can't find other mosfets. It's easier to find transistors.

Anyway based on another question i made, now i really need to use the stuff i buyed. But i don't want to waste those mosfets or only use the half power of the leds.
In that question @Passerby linked me a nice basic circuit to power mosfets with transistors. I tested it and it works.

It's Inverted. To turn the Leds on  i need to set the pin LOW.
Until i know more about electronics i prefer, if the controller fails, that the light stays off. Looks like that this transistor solution isn't that bad as it allows to push 12v into a mosfet and so the biggest problem is solved (HEAT and fully saturated mosfet.)

Said that I made the following circuit based on the @Passerby's link.

simulate this circuit – Schematic created using CircuitLab

Can i modify that to make it default OFF?

Which one is the proper mosfet & transistor???

Mosfets:RFP70N06, IRF510,  IRF520

Transistor:P2N2222A, 2N2222A, 2N3904, BC546B

What are the tips to keep the signal as clean as possible?

i have no oscillator.

if it's usefull, i have some ULN2803A, maybe those could replace the transiators???


texts: Guard Ring on a printed circuit board for a transimpedance amplifier

texts:
I'm trying to build a trans-impedance amplifier shown in the circuit below.
However, with my op-amp of choice, the AD795, I'm a bit confused by their circuit board notes and how to implement them. The input node sends a current in pico-amp range, and the TIA converts it into a voltage at the output. Considering how tiny the input is, it's very critical to maintain the pico-amp resolution at the input. Looking at the datasheet, it shows some notes about this.

simulate this circuit – Schematic created using CircuitLab
The first thing they mention is a guard ring in figure 34. Using the unconnected pin pad 1, I can connect it to the bias and draw a guard trace around the input signal path in a no-copper-pour zone so all there is is the signal trace and the guard ring. I can add vias within the ring, as evidenced by what Analog Devices did with this evaluation board for the ADA4350. AD shows the guard being tied to the same potential as the non-inverting node, and that is what I attempted to do. Is this the correct way to form a guard ring, or am I doing it completely wrong?
EDIT: Below is my latest attempt at a guard ring, along with the 3D view of it. As you can see, the exposed copper trace is tied to Io, the non-inverting input, while surrounding the inverting input node and the corresponding traces. The ring is also replicated on the bottom plane.

EDIT: Below is my reference circuit for which I'm trying to match up.


texts: How to debug C code of a PIC16F84A in Proteus ISIS VSM?

texts:
I have just downloaded the Proteus ISIS Circuit Simulator and I've noticed that in their samples, they have PIC projects based on C and they could step through the C code in the debuger.

Here is a screenshot from one of their sample videos:

But I just don't know how to specify my C source files to the simulator.

I can specify source files in assembly under Source>Add/Remove Source Files, however this does not work for C source files. I prefer C to assembly coding and I request for help or a simple tutorial on how to debug a simple C PIC project in Proteus ISIS.


texts:
My car battery is dead, and the fuse in my car battery charger is missing....(don't ask me why)

I have a 20A fuse lying around and a 7.5A fuse that I took out of the car. The car battery charger states that it needs a 5A 32V fuse, so I'm guessing the 7.5A will be fine as a once off.  Is it?  My main question is, how do I determine the voltage of the fuse, since it's not written anywhere?

Any help will be GREATLY appreciated, as I can't exactly pick up my girlfriend from the bus station on my bicycle ha ha :)


texts: Capacitor specifications, ripple current and life

texts:
What does the "Ripple current" and the "Life (in Hours)" in electrolytic capacitors specifications mean?
My intuition says it's the highest current it can handle and it can operate for that hours (when it works under that ripple current) before it fails, is that right?

In this picture it's not mentioned the "life" specs but I've seen it in many other (mainly electrolytic) capacitors. It's usually something around 2000 hours.

Let me know if I get this right. This is a theoretical question.
Let's say we have the following specs (after calculations) for a DC to DC converter.

\$C = 350 μF\$
\$ ESR_{min}=10 mΩ\$
\$V_{OUTripple} = 50 mV\$
\$I_{Lripple} = 3,5 A_{peak-to-peak}\$

What would happen if the capacitors can handle lower ripple current (even in parallel)?
For example, if I put 2 capacitors like the specs above does that mean my capacitors can handle up to 1700 mA?
Would it be destructive for the capacitors if they can't handle the specified ripple current?

Could I ignore the ESR if I'm okay with higher voltage ripple (\$V_{OUTripple} = ESR * I_{Lripple}\$)?


texts: How to find NAND logic with the help of full adder?

texts:
Obtain a NAND logic diagram of a single full-adder from the Boolean
functions:

C= xy+xz+yz
S= C’(x+y+z)+xyz

I didn't understand the question. What  do I have to do here? Do I have to simplify the equations into NAND logic type equations then draw the diagram?


texts: TX Antenna dBi relevant for transmit and receive rate?

texts:
If for example I have a USB WiFi adapter with -70dBm sensitivity and 20dBm tx output power and a 5 dBi omnidirectional antenna.

If I change the antenna to 9 dBi, in the coverage zone with same range, I know I can reach higher transmit rate.

But how about receive rate? Can I reach higher receive rates? Or same with the 5dBi?


texts:
The following circuit consists of two IR (Infra-Red) LED diodes; one as light transmitter (IR1) and other as light receiver (IR2). They are spaced for approximately 4 cm, so distance is not the issue here. The issue is that when square wave is applied to transmitting diode, the receiving one does not completely "replicate" the transmitted signal. Applied square wave on transmitting diode results in distorted square wave at receiving diode with significant fall time. Fall time increases as frequency of transmission is increased.

simulate this circuit – Schematic created using CircuitLab

Measured signal on receiver diode versus signal on transmitter diode:

In both pictures, ideally square signal is applied signal to IR1 from function generator. Other signal, with noticeable fall time slope is measured signal at IR2. The left picture shows measurements taken at 1 kHz square signal and the right picture shows measurements taken at 10 kHz.

Main problem here is that this circuit is a part of triggering circuit. IR2 is then connected to comparator. This means that if IR2's slope changes with frequency then output of comparator is square signal, which ON-state length changes with frequency. But if received signal would be approximately replicated from the transmitted signal (not in amplitude but in shape of signal's waveform), then I wouldn't be seeing such behavior at the output of comparator.

NOTE: I also tried to replace receiving diode with IR optocoupler TSOP32230, which is meant to be used as optical communication receiver devices that operates at much higher frequencies. Its output was very low in amplitude (OFF-state = 50 mV, ON-state = 80 mV) but received signal's waveform was completely identical to transmitted one. This optocoupler's datasheet indicates that output should be much greater in amplitude, however my measurements gave different results. The problem here would be that if such optocoupler would be used as triggering device for my circuit, then comparator would need very stable reference voltage, which would be somewhere between 50 mV and 80 mV to properly trigger the rest of the circuit. However, I don't have the knowledge to design such stable reference voltage source. It would be much easier for me, if optocoupler would generate square signal, whose OFF-ON difference would be much higher than only 30 mV.

Any ideas how to proceed? Can IR diode's fall time be compensated somehow? Or could something else be done about optocouler?


texts: Can a modern multimeter be classified as a discrete component tester?

texts:
I work for an avionics training company where we are required to meet certain criteria with respect to the theory and practical tasks that we teach. At the moment there is one area of debate with respect to a requirement for us to teach the use of various pieces of test equipment which include multimeters, logic probes, oscilloscopes, current probes and discrete component testers.

Many people at my work consider a modern multimeter as a discrete component tester since they are able to test resistors and capacitors. I am not so sure however since they specifically mention multimeter and discrete component tester as two separate items.

With that background, my question is this - can a multimeter be classified as a discrete component tester?


texts: Calculating the AC voltage and current across resistor and fuse

texts:
I am currently simulating an AC mains fuse blown indicator circuit  using Proteus 8. However, I can't seem to find out the correct calculation as to why the Voltage and Current across the 550 Ohm resistor and the fuse is the value shown in the image below.

Can anyone help me to find the value attained above, please?

Thank you in advance


texts: PCB fab and assembly, how to resolve width problem between adjacent pads?

texts:
I have just sent off for some pcbs to be fabricated and assembled, I have used this company before for fab but not assembly with no problems a few times.

They have just sent back a issue I need to resolve regarding the distance between two adjacent pads.

Heres what they said:
"The distance between two adjacent pads on one of ICs on top copper layer was measured as 0.23mm. According to our standard manufacture rule, we can make the solder mask bridge in the case the distance is equal to or larger than 0.25mm. Please advise this.

Suggestions:
1.Modify the pads width to give the adjacent distance up to 0.25mm. We can adjust this on your behalf if you need to change this.
2.Accept that all solder mask between these IC pads removed."

I can't understand why they have only highlighted 2 pads.

I am also having 5 supplied bare so I can practice my hand soldering.

What should I tell them to do?


texts: Code transmitter question (original Forrest Mims design)

texts:
I found some old Radio Shack Electronic books from my childhood (authored by Forrest M. Mims III) and have been trying to construct a few of the circuits for fun.  I've been stumped by the operation of the Code Transmitter he describes on page 44 of the Engineers Mini Notebook - Communications Projects.  See attached schematic.

I get the 555 timer is being used to generate a tone.  I'm not sure why they connect it to the emitter?  I see a pot being used to adjust the base voltage of a 2N2222.  What I'm not really sure about is how this thing oscillates.  It kind of looks like a Hartley oscillator but I've not seen the tap connected to +Vcc before.  I assume C4 is some sort of AC filter, C3 is used for the tank circuit, and C5 maybe as a ground reference for the antenna?

I'd really appreciate someone more experienced explaining the oscillator portion of this.  I can get it to oscillate but not anywhere near the right frequency. I also have an Eagle file if that is helpful.


texts: Using a potentiometer to replace an absolute optical encoder

texts:
I am trying to replace a rotary absolute optical encoder (single turn). The resolution of the encoder is 13 bits (8191). The reason for the replacement is to reduce the cost.

My approach is to get a single-turn (electrically) infinite turn (mechanically) precision potentiometer. Use a 16-bit ADC (neglect the last three bits due to noise).

Questions:

Type of sensor element: As I have read, conductive plastic is the best for such an application. Am I right?
Linearity: The least I found was 0.15% for a wirewound potentiometer (which I do not know how much error in degrees it has and how it will affect my result)
Electrical travel: most potentiometer's electrical travel is a bit under 360 degrees (320 to 358). For example: beisensors. So in the last 2 degrees will the system be blind and does not know where it is? Is this common? Does it have a solution?

Please correct my information if I am wrong. Do you think these problems are limiting factors in potentiometers, and they cannot be used to the specific task that I need?


texts: Efficient decoding of a Manchester-encoded serial link?

texts: What's an efficient algorithm for recovering the clock and decoding Manchester-encoded data?


texts: Data transmission from bluetooth module to fpga

texts:
I am using an android app which is taking a string and converting it to its ascii values and sending it to bluetooth module hc-05. Now i need to send this data to an UART receiver in an fpga. In what format is  ascii data from the bluetooth module to the fpga?
When the string has just one character it is working perfectly.
Suppose if there is a character 'a' then the data received by UART is start bit followed by binary equivalent of a and then stop bit.
When the string is having two characters. I want to know if there will be two separate start bits and stop bits  for each character or just one start bit then the data bits (containing ascii equivalent for both the characters) and then one stop bit.

For example ,
if 'a' then data sent is 011000011(MSB 0 is start bit and LSB 1 is stop bit).
if 'ab' then is the data sent is 0110000111000101(msb 0 is start bit and lsb1 is stop bit) or is it 011000011 011000101(like separate for both the characters)

Please clarify.


texts:
Please go gentle as I am a novice at electronics/battery issues.

I am hoping someone with a much bigger brain than me can answer this question...

Is it realistically possible to power a 1200W hotplate with a battery and if so what sort of spec battery would I need?

I am looking to power something like this...

(Product link)

My research shows me that an average kitchen hob uses around 0.72 kWh per use.  I'd imagine something like a portable hotplate would use less but this is a good measuring stick.

I truly appreciate anyone giving this any thought.

Thanks.


texts: Controlling mosfet with a battery-powered attiny85

texts:
I have to control a MOSFET in switch mode. However, the whole circuit including AtTiny is powered by a LiPo battery. AFAIK AtTiny's output pin voltage is somewhere between 0.8*Vdd and Vdd and I'm worried that the voltage between gate and source is unpredictable. At least it can be 0.2*Vdd, which probably can be not enough to open MOSFET fully. Isn't it better to use a bipolar transistor before MOSFET?
So, my idea is that if we can't control voltage on the gate, we can control current, and open bipolar one with it, which gives the battery's voltage level on the gate.
Or maybe I'm wrong and here isn't a problem at all?
The load is a gprs+gps chip and my AtTiny is a kind of watchdog and peripheral controller for it. The maximum MOSFET current is about 2.2A. It's possible to use n-channel FET on gnd side, but it would be much much harder to trace because it has about 8 gnd's pins.
I'm going to use IRLML5203, but want my scheme to be capable to work with other models, with different Rds.
Thanks.

simulate this circuit – Schematic created using CircuitLab


texts: How to detect in the code (Not have to design any extra hardware) if a (peripheral) PCB has been inserted/ plugged/ interfaced to the main PCB?

texts:
I have a main PCB with a microcontroller on it with lots of connectors on it to connect to many other (peripheral) PCBs which have sensors and report data to the MCU on the main PCB.

I wanted to detect using just code if one of the external (peripheral) PCBs is connected to the main PCB, and I want to light an LED via an I2C RGB LED driver using the MCU (say "yellow" if PCB detected.)


texts: Using Neodymium Magnets as wire connectors?

texts:
A new project I'm working has to be highly modular. All the electronics will be hidden in a case, so I was wondering if there's any way to use magnets and pass current through them for the project?

It's well known that neodymium magnets could lose their magnetic capabilities in extreme heat, so simply soldering wires to the magnets is out of the question. Is there anything I could do to solve this problem?

Also the magnets might need to run close to 4 Amps of current, which shouldn't be a problem if the metal coating on the magnet is good.


texts:
Considering the circuit below.:

What is the purpose of capacitor C5? I know it provides positive feedback to sustain the LC oscillations, but how does this work ?


texts: charging battery directly from a source, what could go wrong?

texts:
I have a 100A lead acid deep cycle battery and also have a car's 12V 100A charger (alternator with AVR)

At 1500RPM the alternator will produce nearly 100A.. and the battery is directly connected to the battery, will the 100A be pushed into the battery? Or will the battery act as a load and take only what it needs? And how can I calculate the battery's resistance? I don't have the datasheet nor know the brand (unbranded).

I have been searching on the internet and they all just talk about the relation of the batteries resistance to its capacity.. nothing about how to measure it nor about the charging capabilities...
(Can I get a reference on how to measure it please?)

So, is it safe to connect it directly? (The built-in AVR cuts of when fully charged) or do I need a limiter in between?


texts: Altium Designer '21 error: different modal mode selected

texts: I am trying to add a line to my schematic library, but when I do so it says Error: Different modal mode selected. The other properties for pins etc are also not displayed properly. I tried closing the program and reopening it in hopes that it would restore the previous settings, but it didn't.


texts:
I have followed succsefully the manual in the link bellow.
All the VM the hello world program etc..
But My device is NodeMcu not  esp8266 as shown in the photo bellow.
The pinout of Nodemcu is as shown bellow.
I have an FTDI cable with TX RX GND,where do i connect my NODEMCU according to the diagram of the manual shown bellow?
Thanks.
https://www.youtube.com/watch?v=hT8EK6bz998&list=PLLYZoEqwvzM1v2hB6Ms0x0UPTWD8DFrUX&index=8


texts: Calculating thermocouple voltage error due to ADC anti-aliasing filter resistors

texts:
I am designing a circuit to read thermocouple output using an ADC (AD7124-8). I am using the following circuit with 3K ohm resistors for ADC anti-aliasing filter:

I am trying to calculate the error in voltage created by the filter resistors. According to the ADC datasheet, I should expect a differential input current of 0.4 nA (see image). I am confused about how the input current contributes to error.

Do the above values mean that ADC readings will have an error of 4 nA * (3k+3k) = 2.4 uv due to the anti-aliasing filters?
Is the differential input current constant or does it change with thermocopule voltage?


texts: How much voltage/current is "dangerous"?

texts:
Related:
  Safe current/voltage limit for human contact?

From what I've heard:

110 V (or 220 V; household voltage pretty much) is dangerous (i.e. can kill you) I think there's consensus on this, no need to try :)
60 V (old telephone lines) is supposedly dangerous (never tried, only heard it once... probably won't try)

From what I know first-hand:

9 V is not dangerous (I've put a 9-V battery on my tongue, nbd... actually it kinda hurt!)
1.5 V can indeed be quite shocking with enough current (fell for one of those "Do you want some gum?" tricks back in high school...), but they sometimes do not use 1.5 V with the low amperage levels, some use a DC motor to vibrate and complete the trick.

So I guess there's two parameters here, voltage and current... but are there rough numbers on how much of each (or in combination, which I guess would be power) would be considered hazardous?

No old telephone lines have always been 48vDC well at least since from 1950s, if your skin is wet you can feel it slightly, like on your forearm.  Now the ring voltage is 90-110vAC with a 2 on 4 sec off cycle (USA).  It will ring your bell but good, should you be touching the wires when someone calls. The ring voltage rides on top of the 48vDC, so its present on the same two conductors that the voice voltage(DC) is on. Luckily it's 4 seconds off will give you a chance to get off the conductors with a scream (of pain).


texts:
I'm using an LTC4155 (datasheet) in one of my USB-based circuits to charge an on-board Lithium-Ion battery.

I'm aware of the nitty-gritty details when it comes to selecting charging current, matching your battery, etc. and I have verified this design with my chosen battery - so I'm not here to ask about that.

All I wanted to ask was what the best way to "simulate" the battery, if I didn't have one on hand, to check the charging current?

One of my friends suggested that you can just use a power resistor, choosing it such that the charging current I, times by the resistance chosen R, falls within the range of 3.2-4V (medium charged Lithium-Ion).

When I did this, however, (charging current is set to 1.6A, which has been verified on the actual battery, and I chose 2.2R power resistor) there was only 100mA of charge current - which is obviously wrong. I feel like there must be something else to this - as a real battery, when hooked up to the charger even when flat, has it's own cell voltage which I feel like that needs to be replicated as well (as the charger would be sensing this, on top of the internal resistance etc.)?

Any help or suggestions would be really appreciated.

Thanks!


texts: a lm336 5v ref feeding mcp4922 dac - not getting much vout

texts:
I driven the mcp4922 using my Arduino. I just used my power rail as the vref and t worked fine. However when I used my 5v ref it stopped working. Strange thing is the voltge reference is fine and I feed it to both pin 13 and 11 of the dac. I set the dac to give me around 5 on vout a and 3 on b. But get millivolts on both . However I've check on 13 and 11 and I get 5v from the ref.

Here's the schematic am following:
schematic

I just did some debugging. I was thinking of doing this but it was late and I need my sleep. Even on a breadboard with just the dac and vref, I still get a low vout but works fine when tied to 5v rail.

I took a look at the datasheet it said input impedance = 165K, is that why?


texts: How can I charge my beard trimmer's Li Ion battery from USB?

texts:
I have just bought a beard trimmer with a built-in Li ion battery. The charger that comes with it says its output is "4.2V, 600mA".

I know Li ion batteries will misbehave (!) if fed the 5V from USB. Is it simply a matter of hacking a low drop-out regulator into a USB plug to drop the voltage 4.2V? Has anyone seen a cable like this pre-made? Is it likely there is other circuitry built into the charger itself to regulate charging of the battery or will that be in the device? Is there any way to tell without opening everything up?

(I know the USB spec says you can only draw 500mA, but I'll be plugging the USB end into an iPad charger which can supply 2.1A so I'll have a little headroom.)


texts: How can I tell if this boost converter is in continuous or dis-cont. mode?

texts:
I'm trying to intuitively understand a boost converter, so I've built a variable duty-cycle oscillator circuit that can go from 1kHz to 50kHz and allows me to adjust the duty cycle from 5-95% without changing the frequency (I can change both independently). See my crappy diagram below. (Note: I take care when tuning freq vs. duty cycle to make sure the frequency of the falling edge pulses doesn't exceed the on-time of the one-shot!)

I'm using this to drive a simple nFET+coil+diode+cap boost convert, right out of wikipedia.

It is not behaving at all like the theoretical model. At 50kHz and 50% duty cycle, I expect to see 2x Vin, or 10V, instead I see 50V. When I change the duty cycle, it acts OPPOSITE: voltage goes up as the n-FET on time decreases (again, constant frequency). If I slow down the frequency the voltage shoots up to 200+V.

I'm baffled. I thought 50kHz would be enough to put the circuit in continuous mode. I even tried putting a 330uH coil on there thinking that would keep the magnetic field from depleting, but instead the voltage goes up over 300V (and blows my caps)!!

What am I missing? I thought once I hit continuous mode I would see the voltage gain adhere to the duty cycle equation and would be 2x Vin at 50%, but no combination of frequency (1k-50k Hz) or duty cycle (5-95%) seems to get me there. Instead I get these crazy high voltages. I mean it is fun blowing stuff up, but I'm trying to understand.

EDIT: Here's a scope picture with a load resistor (10k), 1 mH toroidal inductor (large!) and a 333 kHz 50% gate drive. The top trace is the probe of a 10 Ohm resistor from the NFET source to ground (didn't have a 1 or .1 ohm). The bottom trace is the input to the NFET's gate. I'm not using the LM339 for clock gating, I'm just driving in that lower signal to the gate. I'm not sure I'm probing correctly? 333kHz seems like an awfully high frequency for a 1mH inductor and 10k load, but I also don't see the nice charge/discharge lines @mattman was talking about.

EDIT #2: Big thanks to @Mattman94 for building circuits and uploading images. I'm now in continuous mode and the output voltage matches 1/(1-D) as I vary D (mostly, the 5% error is probably due to instruments and component variations) -- Picture below. I had to use a real power supply because a battery couldn't provide the 250mA required reach the expected Vout. I didn't realize continuous mode required an inductor with a very high DC saturation. In fact, I was unaware of this device parameter, but suspected there was a difference between a 100uH tiny air-core choke and 100uH 2" long ferrite core inductor. Now I know. The current equation makes sense now. Running without a load or regulation causes high voltages because there is only a parasitic path to ground through components, which explains why when adding a load the voltage drops significantly: the circuit isn't providing enough current to maintain that voltage.

TL;DR
In hindsight I knew the equations, but wasn't using common sense: loading matters, component parameters matter, and you need enough supply current. WikiPedia was missing some practical nudges.


texts:
the piece of code below is mentioned in 8-bit AVR's instruction set as an example to explain the LPM instruction.

   ldi ZH, high(Table_1<<1)
   ldi ZL, low (Table_1<<1)
   lmp r16, Z
...
Table_1:
.dw 0x5876
...

I get that it's trying to load the address of flash memory word, labeled "Table_1", into Z register and then one byte of that word (depending on LSB of Z) into r16 register (or maybe I'm wrong about this part. please correct me if I am). What I don't get is the left shift in the first two lines. Can someone please explain why "Table_1" needs to be shifted left before begin loaded to Z?


texts:
I haven't done electronics for a long time but am doing some for a hobby project this weekend. I'm looking for some help breaking down/analyzing a circuit board I want to modify/hack:

It's for 3 lights (designated by R, Y and G on the board). At the moment it lights each in turn and I'd like to be able to light one at a time by ignoring/circuventing whatever timer/control mechanism is being used right now.

The black wire in R goes to each light's -ve terminal
The black wire on the left and the brown wire on the left are -ve and +ve respectively
I've identified the resistors, but would be curious to know why they're all different, when do you need to use different resistances and why is each blue one different when they each go to an identical light.
I also identified the transistors - TO-92/S8550/D331 apparently? I'm pretty sure these are for controlling whether or not the light should be on?
Ceramic Capacitors (p104), not sure why we need these?
Tiny thing between the ceramic capacitors - not resistor. What this is?
The upright board which takes +ve and -ve voltage, has a connection to each transistor as well as to C4, then the two rightmost connections seem to join together via resistor RC. **What is going on here?**

I'm sure this is all really basic stuff so hopefully an electronics aficionado can fill me in :)

Thanks in advance!

**Update**

Wow - Thanks for all the input so far. The transistors have S8550 D331 on them and a small circular indent on the curved side?

My plan was to follow all the circuit paths and create a schematic anyway and it seems that would help so I will go ahead and do that. Not sure how to model the IC chip though?

Also, I've added a shot of the underside of the board below (flipped so it mathches the same orientation/perspective) - seems pretty crappy, with solder even in places without components so I tried to colour them out to avoid confusion. If you open the image in a new tab/dowload both this and the previous one are high res by the way, might be easier to see!

If anyone beats me to a schematic (I imagine if you try you'll be much quicker) do share as I'd love to compare my attempt when I've had a go!


texts: PCB Design - Polygon pour remove islands or not?

texts:
Sometimes a polygon pour (I use Altium, so I am using it's naming reference, for other packages it can be power plane and etc.) makes a dead copper area, and the software gives you the option to remove it or no, but why someone will want to not remove it? The only reason I can think someone will want a dead copper area is to make fabrication faster since there will be less copper to remove, and to make it cheaper since less chemicals will be used.
Is this right? Or there are other options that I cant see?
Thank you!


texts: How do you learn about CMOS sensors supporting circuitry

texts:
I want to get some resources about CMOS sensors circuitry - less about the sensors themselves and more about how to build supporting circuitry for them.

I couldn't find any reference designs (Do sensor manufacturers supply reference module designs for their products?), books or actually anything related to that.

Adittionally, it's very difficult to find datasheets for sensors from manufacturers (e.g OmniVision), what am I missing here? Do I need to contact the manufacturers for that?


texts:
In the image above, could someone please tell me what the MOSFET is doing? From what I gather, it is there for switching between the VCC_in and the regulated voltage, in conjunction with the SDA and SCL lines. However, if all the components are receiving the regulated 3.3V from the voltage regulator (IC1) then why is the MOSFET needed? Is it if you were to be using a microcontroller which runs off 5V, and thus the SDA/SCL lines are also at 5V? Thus they need to be switched down to 3.3V?

I'm trying to recreate this design, but the input voltage is already regulated to 3.3V as the PIC I'm using is powered and needs 3.3V anyway. I've taken the regulator out I'm wondering if I can take the MOSFET out too.


texts: Incomplete Astable 555 Circuit Triggering

texts:
I am using a DSO138 oscilloscope for learning electronics. It is not much, but it is very helpful for me at present.

I was setting up a 555 astable circuit. I noticed that it was triggering even though the circuit was not complete. I have included a picture of the circuit as well as the oscilloscope trace. The oscilloscope ground is connected to ground, and the oscilloscope positive is connected to pin 3 of the 555 (output).

The funny thing is that it does not trigger if my fingers are far from the white wire (which is connected to pin 2 of the 555, but nowhere else), but if they are close, I get the trace I included. If my fingers get really close to the white wire, the duty cycle goes to near 50%.
I am not sure what is going on. Can anyone help explain this?

I have also included a trace for when the oscilloscope ground is connected but the oscilloscope positive lead is not:

I assume this is noise in the power supply. I also assume it is related to the issue described above.

Any help would be much appreciated. Thanks in advance.

Here is a schematic:


texts: Built in Tablet Chargers in the Van--Voltage regulation heat dissipation a problem?

texts:
Ok, for fun and enjoyment I have decided to build in chargers in a number of positions on the "Mom Van."  But either I can't do math, or I am missing something.  I want tablet style chargers capable of 2 amps, but when I do the math--basically I'm going to set the car on fire.  I chose:

A to-220 5v rated to 2 amps
https://www.mouser.com/datasheet/2/389/l78s-974158.pdf

And there will be heat sinks--currently thinking of these:
https://www.mouser.com/datasheet/2/303/sink_csm-1265487.pdf

My problem is that with a voltage drop from 14.4 to 5 and at 2 amps I get (9.4v)(2A)=18.8Watts.  Take the 50C/W rating from the data sheet and I get a temperature rise to air of: 50C(9.4)=940C.

I could buy these chargers for a couple bucks (but this is more fun, and I want them built in seamlessly)

I must be missing something? Any help would be appreciated!


texts: Alternatives to relay to conditioning a circuit

texts:
I got a "problem" and it is because of my lack of knowledge so I need your help.

First, the current design is like the attached below this paragraph. The power comes from a car battery (24v or 12v), then I power a DC-DC Converter T1 and this the my IC. So the converter T1 has a pull up pin, internally, EN that enables the converter.

simulate this circuit – Schematic created using CircuitLab

What I want to achieve is when the car turns on, turning the key, the circuit powers up and when the cars shuts down, the circuit too. In my design I'm using a relay NO with the key contact and the battery on the coil and a GND on the common pin of the relay, on NO the EN pin and NC not connected.

The key contact has 12 or 24v depending the battery.

The problem I got is the relay for 12 or 24V usually is a "Relay cube" that it is big (19mm x 15mm). I saw solid state relay for 3.3 or less voltage that are very small but for this I need another dc-dc converter just to drive this relay and this is more messy.

What will be an improvement for this circuit? A transistor?, but I don't know what kind because the specs for the voltage from base to emitter are low (base 24/12v to 0v) Or are there a some IC for this use case?

On a second iteration of the design I will have another event (key contact and IC pin) so I will need some logic gate for drive the EN pin. Just to know if there is a better implementation.


texts:
I am trying to do a simple project in which I am trying to show that when a high voltage battery is connected in a circuit then the fuse will blow and protect other appliances.

In detail, I have four 3 V bulbs which I want to connect parallel to each other, a 0.6 ampere fuse, a fuse holder, and three batteries which are of voltage 1.5 V, 6 V, and 9 V, respectively. How can I blow the fuse?


texts: Is there a frequency at which jumpers start to become a problem?

texts:
Pin header jumpers (like these) can be used to make optional connections between parts.

I would expect at certain frequencies that the these kind of parts become primarily reactive (the imaginary part of the impedance becomes greater than the real part).  At what frequencies does this typically happen?


texts: How to implement a convolution function in VHDL?

texts:
I'm trying to learn VHDL. I wrote this code to do a convolution, but it doesn't work: the output doesn't change from 0 when I run it. I tried adding a clock but it doesn't work, either (do I need one?). What's wrong?

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
package mypack is
type real_vector is array (integer range <>) of real;
end mypack;

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
--use IEEE.STD_LOGIC_UNSIGNED.ALL;
use work.mypack.all;

entity convolution is
port (x:in real_vector(0 to 3);
      y:in real_vector(0 to 1);
      f:out real_vector (0 to 4));
end convolution;

architecture Behavioral of convolution is
--signal temp : real_vector (0 to 4):= (others => 0.0);
--signal enable : std_logic :='0';
begin
process (x,y)
variable sum :real;
begin

  for n in f'range loop
     enable <= '0';
     for k in y'range loop
        sum:=sum + x(k)*y(n-k);
      end loop;
     -- temp(n) <= sum;
      f(n) <= sum ;
      sum:=0.0;
  end loop;
enable <= '1';

--if (enable'event and enable='1') then
--    f <= temp;
--end if;

end process;

end Behavioral;


texts: 3-terminal adjustable voltage regulator: elegant way for Vout=0 when Vin<(setpoint + dropout)?

texts:
As I just discovered, when a 3-terminal adjustable voltage regulator (LM317, LD1086) is operating with Vin less than setpoint + dropout, its output is unregulated Vin - dropout.  I want it to output nothing, zero volts.

It occurs to me there might be a solution using an external zener and a PNP transistor that turns on when there is a greater than 0.6V difference between Vin and the zener setpoint, but then I would need a separate voltage divider to determine essentially the same setpoint, with two potentiometers in the case of an adjustable power supply.

Any more elegant solutions out there?  Perhaps there is a more-than-3-terminal device I should be using instead?


texts: How to make circuit that control number of clock pulses?

texts:
I am trying to design my own processor and stimulate it in software.Now for that I am design a circuit that can control number of clock pulses.
For example if I input 0010 it should output two pulses.


texts:
I am trying to simulate a single NMOS, I calculate the I_ds but I need the voltage of the  drain terminal. Should I multiply the I_ds value by a resistance value? Is this resistance constant? If not How can i calculate this voltage?

        Pin SourcePin = P1.Voltage < P2.Voltage ? P1 : P2;
        Pin DrainPin = SourcePin == P1 ? P2 : P1;

        double Vgs = Gate.Voltage - SourcePin.Voltage;
        double Vds = DrainPin.Voltage - SourcePin.Voltage;
        double Gds = 0, Ids = 0, Gm = 0;

        if (Vgs < Vth)
        {
            Gds = 1e-8;
            Ids = Vds * Gds;
            Mode = MOSFET_Mode.CutOff;
        }

        else if (Vds < Vgs - Vth)
        {
            Ids = Beta * ((Vgs - Vth) * Vds - Vds * Vds * 0.5);
            Gm = Beta * Vds;
            Gds = Beta * (Vgs - Vds - Vth);
            Mode = MOSFET_Mode.Linear;
        }

        else
        {
            Gm = Beta * (Vgs - Vth);
            Gds = 1e-8;
            Ids = 0.5 * Beta * (Vgs - Vth) * (Vgs - Vth) + (Vds - (Vgs - Vth)) * Gds;
            Mode = MOSFET_Mode.Saturation;
        }


texts: How can I design a robust and professional power supply circuit?

texts:
I'm planning on doing a large project that would include an ARM microcontroller @ 50 MHz interfacing with a graphic LCD, user buttons, some sensors and some actuators (DC motors, valves) controlled through relays. I want to design a robust and durable power supply for this project that must have a 10+ years lifetime.
I have a 24V power supply and I have to design the circuit that will give me 3.3V/5V and at least 1A. What protection components should I include in the circuit?
Where does all this components come into place: PTCs, ferrite beads, filter capacitors, EMI filters, fuses etc.?
Could you give me a block diagram of such a circuit?


texts: Connecting a DC barrel jack to a PCB board

texts:
I am wondering how I can include a DC jack such as below in my PCB circuit:

There are no such PCB packages in my library, so the first step, I presume, is to make a prototype with the exact dimensions as in the datasheet (correct me if I'm wrong).

What I am really confused about however is how to drill the holes in the PCB, given that I need a rectangular section instead of a circular one, for the three pins.


texts: How do power adapters automatically detect the output voltage?

texts:
I recently bought this 12 V universal laptop power adapter. It claims to auto-detect the voltage required by the laptop, and that is also what’s written on it:

INPUT: DC 12V-16V
OUTPUT: 18V-5A / 19V-4.74A / 20V-4.5A

The adapter has a plug that seems to be identical to the ones used by Fujitsu Lifebooks, and it comes with different tips that convert this plug into the different kind of plugs that are used by different models of ASUS laptops.

My questions is, how does the automatic detection of output voltage work? In practice, apart from trying to understand what it going on in the electronics of the power adapter, I would like to find out whether I can also use it for a Fujitsu Lifebook (19 V) without using a tip, even though it is meant to be used only with ASUS laptops, using a tip.

Even though adapters like this seem to be common nowadays, I can find almost no technical information about them online. The only things that I could find were some people speculating that some mechanism in the tip tells the adapter which voltage to output. I can barely imagine this, as the tip has only one plus and one minus connector, and I measured the resistance within the tip at both the plus and the minus port as 0.0 Ω.

The output voltage without load both with and without a tip is at about 19.5 V right now (the input voltage is about 12.5 V). I remember measuring it on a different battery before (with a possibly different input voltage), where it was at around 21 or 22 V. Unfortunately I cannot measure the voltage under load, as I would have to cut open the cable.


texts: Output of AC op amp circuit has unknown superimposed signal on top of expected output signal

texts:
I am trying to find the voltage gain of a certain ideal op amp circuit with a sinusoidal input.  However, when I simulate the circuit, the output shown seems to be my calculated output but with a higher frequency wave superimposed on it.  Why is this?

Update:
The 5th harmonic has been mentioned in some answers.  I may be wrong but as far as I know, a sine wave has 1 harmonic so shouldn't the output signal be the same frequency as the input signal?

This is the reference question:

My working:

Ltspice window:


texts: Problem in controlling the device temperature using an op-amp

texts:
OBJECTIVE:
I have a device to which voltage is applied and this voltage has to be controlled according to the temperature detected by the thermistor that is placed on the device. If the temperature of the device increases the voltage applied to it should be reduced and vice versa. The max voltage that can be applied to the heater is 30V.
METHOD:
To achieve this I'm using a P-MOSFET and an OP-AMP as shown below.

When the resistance of the thermistor changes due to change in temperature, the fraction of the voltage across the thermistor will also change which is fed to the non-inverting terminal of the Op-Amp.
At 25C the thermistor resistance is 10KOhm.
PROBLEM:

Is my approach correct?
When I simulate the circuit, I am always having the voltage of 23.9V at the output. It's not changing with the change in the thermistor resistance.

Could someone help me with this?
Thanks


texts: Noise and interference from a buck converter

texts: I have heard that buck converters cause noise/radio interference. Since I am using it next to a Xbee S2C module, will it interfere with my Zigbee signal?


texts:
This is an example of charge pump from MOSFET Models for SPICE Simulation: Including BSIM3v3 and BSIM4 by William Liu.

Could anyone explain why \$ v_D = \frac{(v_{IN} - V_T)}{2} \$ here?

Why \$ V_T \$ is involved in the drain voltage?

Thank you for help.


texts: Typography of Letters in Circuit Symbols

texts: How should the letters in circuit symbols look like / be typeset, especially the symbols for voltmeter, ampmeter, generator and motor? Should the V, A, G and M be typeset in the surrounding font (possibly with serifs), in the surrounding sans-serif font or in a fixed (probably stylized and sans-serif) font regardless of surrounding fonts in the text?


texts: Calculating sum resistance of multiple series and parallel resistors

texts:
!

I know how to find resistance, current, and voltage through series/parallel circuits. The problem I'm having is figuring which part of this circuit to simplify first. What is the correct order of operations for each branch? Or how can I redraw this circuit to make more sense?


texts: I really just need a rough estimation. How strong are eddy current brakes? For example, if I use a solenoid that has 800 turns with up to 2 amps going through it, and I have the not ferromagnetic metal going through the middle of the solenoid, how powerful would the eddy current braking effect be? I just need to know if I should look deeper into this concept for my experiment, which requires something to act as a damper for a small spring-mass system.


texts: Equivalent resistance in this mosfet circuit

texts:
simulate this circuit – Schematic created using CircuitLab

I have 3 NMOS are connected as shown above. I need to calculate equivalent resistance as seen by the capacitor so that I am able to calculate time constant for the above two cases.


texts: I am trying to figure out the best way to join some 12 gauge wire that will be carrying very high DC current (about 100A) for about 2 seconds. When working with lower currents, soldering seems to be the best way to go. But, with such a high current I am unsure of the best way to proceed. I found here that a bus bar may be the best way, but I am working in a very tightly restrained space and I do not think there would be room. Any help is greatly appreciated. EDIT: I failed to mention that it is running a voltage around 40V


texts:
Im trying to measure the irradiance from the sun using the following TIA circuit:

I'm using a BPW34 photodiode due to the good spectral range and for being cheap.

Also the datasheet provides a graph of irradiance vs reverse light current, which I intend to use to obtain a Vout vs irradiance graph, due to the voltage produced in the output being linear to the current produced in the photodiode.

I'm feeding Vout to an microcontroller ADC and I'm obtaining decent results, depending how much light there is outside.

I understand the OPAMP basics, but after some research I saw the same configuration with a capacitor in parallel with R, the reason being to improve stability.

Is the capacitor needed in this application?

Also any feedback to improve my circuit for this application would be helpful.


texts: I understand the reason for choosing a termination resistor of 120 Ohms for the CAN bus to avoid reflections but why was the nominal impedance of the CAN bus cables required to be 120 Ohms by the ISO 11898-2?


texts: When do you say two clocks are asynchronous?

texts:
I have a situation where reference clock of PLL_0 is coming from some clock source and giving out a clock (named C0) with freq0 and and C0 is going as reference clock to PLL_1 and giving out clock C1 and C1 is going to PLL_2 and giving out C2.

Please see the below figure for better understanding.

simulate this circuit – Schematic created using CircuitLab

In the above situation can we say that clocks C2, C1 and C0 are synchronous to each other?

Note: I would like to add that freq0, freq1 and freq2 are not integer multiple of each other.


texts: Can stripped hole in a motherboard be repaired?

texts:
I was doing an SSD upgrade and the fan is held to the motherboard by screws. When I went to re-install the fan, the hole/nut in the motherboard seems to be stripped. Can this be repaired? What do hardware techs do when they are faced with this? My concern is to secure the fan back the way it was.
At time index 1:59 this video shows the same spot I'm referring to where I had the problem:
https://youtu.be/w4nLqjL5V2s?t=119


texts: stepper motor losing streps at limited current

texts:
I control a stepper motor st6318 1A at 12V  with a A4988 because the motor was quiet hot i limited the current to 0.76A what happen now is without any load on the motor i losing steps if i lower the rpm then no step getting lost.

is this a correct behavior or could there be something else wrong?


texts: Is there a way to make a force sensitive resistor vary its resistance from 0 Ω to 5kΩ?

texts:
I want to replace a potentiometer with a force sensitive resistor (FSR.)

I’ve bought one that varies from 1kg —0g. I don’t need the middle pin of the pot, I need it to work as a resistor.

My circuit is a 30V DC motor control, and the 10K potentiometer, wired in parallel with an internal 33k trimpot where the adjustment of speed of the motor is done, controls a TIC226D triac  from a 12-0-12 transformer. After the triac, the AC voltage gets transformed to DC through a diode bridge and an electrolytic capacitor, and powers the motor.

I want to implement the foot pedal of my motor, which acts today as a switch, to also vary the speed. So, I'd bypass the 10K potentiometer with the FSR inside the pedal, when the pedal is activated.

I had to open the control box of the motor. I did this controller maybe 15 years ago, so I don't have the schematics anymore. I could try to draw it completely if needed.

In this one I bought,  its resistance varies from 1M to 2K, but I need its resistance to be close to zero when I press it at maximum “force." I’d also like its max resistance to be close to 10K.

Is there any way, a circuit, that could allow this to happen? A workaround to “set” its top and lower resistances to a defined value?

Attached goes the circuit schematics (corrected II). I didn't draw  the fuse and on/of switch on the primary side of the transformer. The Triac is a TIC226D


texts: Why is the zener voltage increasing with the load resistance in this circuit?

texts:
The circuit below is composed of an 8.2V Zener diode, an R2 series resistor and a load which is a variable resistor R1:

The load resistance R1 is increasing from 1 Ohm to 2k Ohm.

As the load resistance is kept being increased after a point why is the zener diode exceeds its rated zener voltage 8.2V?


texts: MOSFET Difference between Normalised On Resistance and Output characteristics

texts:
In the datasheet for STP36NE06, it has two graphs which seem to contradict each other:

In the graph on the left, for Vgs=10v and Id=18A, the slope of the curve indicates that Rds is approximately 0.05 ohms. (Vds would be about 1v). However the graph on the right suggests it would be between 0.6 and 1.8 ohms.

What am I not understanding here?

Thanks


texts: Using selector switch to engage only one set of valves

texts:
Can you have a selector switch engage one set of directional valves on a machine that can have 2 automated cart dampers which share a motor?

Basically the first position on the switch means no set of valves are on, the second position for cart dumper 1 and the third position for cart dumper 2?

Here is a picture of the system:

The 3 4 contact block is a KA2 N.O contact and the 1 2 contact block is a KA3  N.C contact.

The joystick on the left is what energizes either the up solenoid or down solenoid of either machine 1 or machine 2. The selector is placed there to prevent all solenoids from being on at one time.


texts: Do I need to pull up the I2C voltage to the VCC of a ADC?

texts: I am planning to use LTC2451 which is a ADC with I2C interface.  The main bus voltage that supplies the LTC2451 & the MCU is 3.7V and the GPIO voltage of the MCU is 1.8V.  Is it safe to pull up the SDA & SCL lines of the ADC to 1.8V when the ADC VCC is 3.7V?


texts: High Side P channel mosfet with totempole driver + floating / voltage follower pull down

texts:
This is my first post (been an avid user though as I usually find an answer to my questions...  this time I cannot despite a few days of searching.

I've created a push pull gate drive circuit for a high side back to back mosfet circuit... and I have it working in circuitlab and prototype...

However, I would like to know how to create it so that the pull down part of the totempole only pulls the gate down to VCC - 6V... to allow driving of voltages much higher than max Vgs (which for my circuit is -/+20V).

I've got a transient diode in there at 18V.. but that will not work for sustained VCC > 20V.  I've tried various configurations of different circuits but can't get anything to work!

any pointers much appreciated.


texts:
(Assume Mux4Way has been already implemented)

/**
 * 4-way 16-bit multiplexor:
 * out = a if sel == 00
 *       b if sel == 01
 *       c if sel == 10
 *       d if sel == 11
 */

CHIP Mux4Way16 {
    IN a[16], b[16], c[16], d[16], sel[2];
    OUT out[16];

    PARTS:
    // Put your code here:
    Mux4Way(a=a[0],b=b[0],c=c[0],d=d[0],sel=sel,out=out[0]);
    Mux4Way(a=a[1],b=b[1],c=c[1],d=d[0],sel=sel,out=out[1]);
    Mux4Way(a=a[2],b=b[2],c=c[2],d=d[0],sel=sel,out=out[2]);
    Mux4Way(a=a[3],b=b[3],c=c[3],d=d[0],sel=sel,out=out[3]);
    Mux4Way(a=a[4],b=b[4],c=c[4],d=d[0],sel=sel,out=out[4]);
    Mux4Way(a=a[5],b=b[5],c=c[5],d=d[0],sel=sel,out=out[5]);
    Mux4Way(a=a[6],b=b[6],c=c[6],d=d[0],sel=sel,out=out[6]);
    Mux4Way(a=a[7],b=b[7],c=c[7],d=d[0],sel=sel,out=out[7]);
    Mux4Way(a=a[8],b=b[8],c=c[8],d=d[0],sel=sel,out=out[8]);
    Mux4Way(a=a[9],b=b[9],c=c[9],d=d[0],sel=sel,out=out[9]);
    Mux4Way(a=a[10],b=b[10],c=c[10],d=d[0],sel=sel,out=out[10]);
    Mux4Way(a=a[11],b=b[11],c=c[11],d=d[0],sel=sel,out=out[11]);
    Mux4Way(a=a[12],b=b[12],c=c[12],d=d[0],sel=sel,out=out[12]);
    Mux4Way(a=a[13],b=b[13],c=c[13],d=d[0],sel=sel,out=out[13]);
    Mux4Way(a=a[14],b=b[14],c=c[14],d=d[0],sel=sel,out=out[14]);
    Mux4Way(a=a[15],b=b[15],c=c[15],d=d[0],sel=sel,out=out[15]);
}

As you can see, this code looks quite inelegant. How can I deal with this repetitive code? I'm new to HDL, so I apologize for this trivial question. Is there the concept of loops (or something like it) in HDL?


texts:
The datasheet of the LT3080 voltage regulator says that "For true zero voltage output operation, this 1mA load current must be returned to a negative supply voltage."

What exactly does this mean? How can I return the minimum required load current to a negative supply voltage? In case I have a single supply and I generate a negative voltage using a charge pump how would I connect  the minimum load to the negative voltage generated by the charge pump?


texts: How to measure Open Circuit Voltage of a Battery in Charging and Discharging state

texts:
I am working on a battery(Li-ion) operated device, in my attempt to get the SOC of the battery i have to acquire the battery OCV (open circuit voltage) first and have to interpolate it to the SOC table,

so my PMIC(power management IC) drivers solves this problem for me, it tries to estimate the OCV from Battery voltage, Battery resistance and Inow(current through battery)

OCV = Vbat - (Inow * rint)

my PMIC has a register for Inow which measures the voltage across the resistor kept in the discharge path of battery, as resistance is very low the voltage across it is treated as current to and from the battery, if  its -ve battery is  discharging and +ve if battery is charging, rint is 50ohm

but the problem  i am facing is how to display SOC properly during switching between charging and discharging process, as you know as my OCV is dependent on current through battery, it jumps when i plug out my adapter, when i am in the process of charging and i observe 100% SOC, if i disable and display my SOC to user its less than the previous because the current now changed , so it makes me to disable the charging and measure actual OCV and then again enable charging which is not that reliable process

i want to know how actually the mobile phones handle the SOC update


texts: Using an RF adapter to improve LTE signal in the house

texts:
In my apartment, the GSM signal is very scarce, if not absent at all, except for a few spots, where there's a decent LTE signal and I can browse internet reliably.

In order to improve the reception across all my apartment, I'm thinking about buying a cheap low-noise RF Amplifier like this and put it in a corner where the LTE signal is decent.

It operates from 5 MHz to 6000MHz, which is fine because LTE works from about 400 to 3500 MHz.
It requires a 5 V input, which is the same voltage provided by USB. I can take a USB cable, cut it, and connect the power pins to the Amplifier.
I do not think I need an antenna: the LTE signal is decent enough in certain corners and my apartment is pretty small.

My question: would this setup work? Is there any potential problem that I have not thought about?

(The problem of low GSM signal is know in the building, and it will be addressed sooner or later. It's due to scarce coverage. I have no reasons to think that there are sources of interference.)


texts: Use of a DC power supply and an arbitrary wave generator in digital circuits

texts:
I am a communications and electronics engineering student from home because of obvious reasons, i´ve mannaged to acquire a regulated DC power supply an arbitrary wave generator and a mini oscilloscope this far to make a little home lab.
I took a class in basic digital circuits, multiplexers, decoders, counters, bcd to 7 segment, etc.
We simulated the circuits but i wish to repeat the Laboratory practices physically .
I understand that i can generate a clock signal with a 555 integrated circuit and all other chips powered by the DC power supply with common positive and negative nodes.
But it came to my mind that i can also generate a clock signal with the AWG, is there a way that i can skip the use of the 555 chip and use the AWG? if so, how would i connect it? positive to clock in and negative to common negative with the DC power supply?
Also the AWG has to channels, and it can generate DC signals, could I use one channel for DC power and the other for clock signal? how would you connect that?


texts: Does this circuit have marginal voltage level problem?

texts:
As a research for the problem I described here I found this circuit by Maxim:

This is clock doubler, and must be a really good fit in my case as input frequency is very well defined.

However looking through the datasheets I found that MAX9010 outputs TTL levels, while 74VHC86 accepts CMOS levels (0.7 * Vcc). In general I can not find high speed comparator with CMOS outputs operating @ 5V.

Should I pay special attention to this issue - what are the conditions when circuit may fail producing proper clock?

Can you give feedback on the circuit in general? My assessment that it should work properly doubling 21.47727 MHz to 42.95454 MHz with R1=1k and C1=15pF (however for sure will need prototyping and adjustment in real life).

P.S. Last days I reviewed a lot of designs for managing clocks, and my feeling is that they in high degree a kind of "marketing articles" and not appropriate for the direct application - articles talk a lot about circuits' pros, but almost none state the cons (arising from propagation delays, frequency ranges etc) thus it is really bad idea to implement what is said directly without modelling and proper simulation for target conditions.

Update: as I suspected this circuit is an ideal design designed to work in ideal conditions. When built in real life, it does not function properly without investment into the following areas:

power must be maximally clean. Due to noise in the power rails voltage divider will have level fluctuating, causing spikes at the output of the comparator and false positives;
comparator may (will) sink some current from the voltage divider (reference voltage) at its positive input at the time of switching. It may also change reference point slightly;
RC with such small capacitance is very subject to be influenced by other capacitances around and EMI, changing tuned duty cycle (at best) or making x2 multiplication stage malfunctioning.

In addition, I have built this circuit using MAX999, but its LTSpice model is faulty. It is confirmed by the Maxim support, hopefully they will fix it.

I am going to drop this design, considering ICS501 instead.


texts: Servo Controlled Potentiometer using Rotary Position Sensor

texts:
I need digitally controlled potentiometers but I want real pots and not a digital potentiometer chip because I want to integrate this with conventional relatively high voltage circuits like those you might find in a guitar amp.

My current idea is to mate a Rotary Position Sensor with a Servo:

The Murata SV01 Rotary Postion Sensor costs $0.95 USD and it's basically just a potentiometer with a D shaped hole instead of a shaft:

A cheap micro servo costs $3.50 USD:

I don't want a motorized pot because they're huge and expensive by comparison and I don't need a shaft. And the servo is easily controlled using a PWM output of a microcontroller.

So the question is, is this feasible? I'm not an engineer but I'm just concerned with coupling the two devices, accuracy, control, robustness, etc.

If you think it is feasible, can you recommend where I might obtain the necessary hardware to mate the knurled plastic shaft of the servo with the 4mm D shaped hole. I was thinking a mini-PCB could serve as a base with screw holes for the servo mounts and something to solder the Rotary Postion Sensor to.


texts: MCP3909 Energy metering IC , How to use the HFOUT in it?

texts:
I'm using the Microchip MCP3909 Energy metering IC, How to use the HFOUT in it ?

note:
HFout supplies a frequency output proportional to the average active real power .

This frequency should be sent to the meter on HFOUT pin which access a Timer/Counter in MC and according to number of Pulses I should measure power and use it

The problem is that I couldn't reach the correct relation which determine each pulse represents what amount of watt?

Documents:
MCP3909 datasheet
Reference Design User's Guide


texts:
I Try to use a joule thief circuit to harvest energy from almost die battery. But the reference that i found on forum or conference paper just explain how joule thief circuit works, not the configuration and mathematical modelling for achieving best energy harvesting configuration.

Anybody can explain or give me a reference about mathematical modelling of joule thief circuit?

Thank you,


texts: Elegant way to check a STD_LOGIC_VECTOR to be all zero

texts:
I'm working with Xilinx and VHDL2008.
Is there an builtin elegant way to detect if a STD_LOGIC_VECTOR is all zero?
I use

if my_vector = (my_vector'range => '0') then

at the moment and hope that there is a more elegant way. Maybe something like this:

if is_zero(my_vector) then

I could try to write a function to do this, but maybe there is something built in that I didn't find yet.
What is the best option you know? It should work on constraint and unconstrained vectors.


texts: Connecting Raspberry Pi to Arduino Leonardo

texts:
Can any Raspberry Pi/Arduino experts tell me what are the best options of sending data from the RPi to a Leonardo given the following:

Running Raspbian on the RPi.
Running a Python script on the RPi which detects mouse data, movement.
Only need to send mouse data to Leonardo.


texts:
GDSII is a photomask\artwork format for photolitography. I am having trouble resolving a particular line in the file.

For example,  'SRefs'  means it refers to one of the structures and uses this structure again at new location given by the coordinates and considering corresponding rotation .

How do I resolve the 'ARefs' type of data in GDS II format? What does it mean?


texts: Does electric current prevent corrosion or oxidation?

texts:
I often see overhead power lines without any shielding from the elements. Are these lines galvanized or does current protect them from corrosion?  Wouldn't the electron flow through the metal wires prevent oxygen from bonding to it?  At the same time, however, you could claim it would have no effect. The corrosive elements, air, water, etc, do not have the same voltage reference.

Finally, can carefully limited electric current be used as an anti-corrosion method?


texts: when an AC generator generates current it alternates, so does both terminals of ac generators has current means both are live wires ?


texts:
I'm working on a project where I need to supply power to multiple strings of LEDs, operating at 12VDC, with a max current draw of 20mA per string.

What I'm looking for a quick and easy way to connect multiple strings to one central power source.  The LED strings are terminated to spade lugs, and something like this would be perfect.  The only problem is that the individual terminals aren't tied together in the example above.  Basically, I need a bus bar with approximately 10 screw terminals for spade lugs, used for power distribution.  It's not a high voltage/current/power application.

Any suggestions?


texts: Looking at at adding a simple LED indicator in front of an solid state relay. Not sure if its more correct to put it in series or use two different resistors as shown in the example. The indicator LED while close in voltage is different. The SSR is 1.25v while the indicator LED is 2v. I think under driving the indicator LED low enough not to damage the SSR should still light it. I have also seen it implemented in a similar fashion. However is it really the most correct way?


texts:
What I want to create is a simple logic gate that doesn't actually perform any logic, but instead simply repeats the given signal. I want to do this so that I can have a one-way wire.

Some ideas that I've thought of, but I'm not sure if they're efficient, or which one is more efficient:

A NOT gate plugged into a NOT gate.
An AND gate with both of the inputs as the same wire
An OR gate with both of the inputs as the same wire.


texts: Relationship between torque and back-EMF voltage | BLDC motor modeling

texts:
I want to simulate an BLDC motor, so I am studying corresponding mathematical model. My problem is that I am little bit confused by the torque equation.

\$e_a\$, \$e_b\$, \$e_c\$ - Back-EMF voltages (induced components of winding voltage drop)
\$i_a\$, \$i_b\$, \$i_c\$ - currents through windings
The amplitude of back-EMF voltage is proportional to angular velocity, right? So how can torque be dependent on back-EMF voltage? One would get zero torque for zero angular velocity. I know torque should be maximum at start point, but I am missing something to understand this equation..
P.S. I would get that in stable state, so I can calculate torque from back-EMF for constant speed. But how can I calculate output torque on shaft in nonstable state? Is that the equation including torque constant (\$T=K_t.I\$)?


texts: Why doesn't my transistor audio amplifier work?

texts: I'm a newbie to transistors. Could anyone explain why my set up doesn't work ? The transistor is a 2N2222 NPN BJT, and the microphone is just a standard earbud. The loudspeaker is just one I ripped out from a toy.


texts: Where did I go wrong? Transistor burning up

texts:
I'm trying to control 3 LED downlights using an arduino.
I'm very inexperienced so I'll go through my thought process and you might be able to catch
what I'm doing wrong...

I've chosen a 2N5551 NPN transistor based on the following information:
NPN transistor because I will be switching higher voltage than what is supplied to the Arduino.

Downlights: http://www.malmbergs.com/frmProductDisplay_new.aspx?item=9974006
They are rated at 350 mA, 3x1.2W / downlight equals a total of 10.8W
10.8W / 0.35 A = 30.86 V (to make sure my math is correct I measured the circuit, 28V and 350 mA)
They are driven by a 350 mA CC driver.

So I'm searching for an NPN transistor capable of handling 31V and 350 mA.
According to the datasheet: https://www.fairchildsemi.com/ds/MM/MMBT5551.pdf
the VCEO is 160V and Ic 600 mA, so far so good?

Here comes the difficult part, calculating the minimum current needed to keep the transistor in saturation (for a newbie like me, transistor datasheets seem to be incredibly inconsistent in their layout and overall hard to read).
The guides I've used are telling me to look for Hfe in saturation, Ic/Ib or if it can't be found use a worst case value of 10. Since I can't seem to find the information in the datasheet, I'll use 10.

Base current: 350 mA / 10 = 35 mA (safe value from Arduino seems to be around 40 mA)

Next step, find Vbe:
Figure 3 shows a peak of 0.9V at 200? mA (why is the graph not expanded to show up to 600 mA, does the Vbe not rise above 0.9V?)
Output voltage of the arduino is 5V, giving us a voltage drop over the resistor of: 5V-0.9V = 4.1V

Base resistor: 4.1V/0.035 = 117 ohm

Feeding the output of the arduino through two 220 ohm resistors in parallel to the transistor base, and the emitter and collector switching the ground for the LEDs, everything is working as expected for 20~ seconds, and then there was smoke...

Any help to solving my problem is greatly appreciated.
I have an off-topic question as well, is it possible to PWM a CC driver on the secondary side? Would be real nice to be able to dim these LEDs...


texts: Kalman filter on linear acceleration for distance

texts:
In my application to calculate displacement from motion of accelerometer, I am using kalman filter to improve the displacement accuracy. Please note I am aware of ineffectiveness of acceleration for displacement in real scenario but in my case displacement is pretty small(like 10cm in 2-3 second).

I am following this paper. In this there are 2 matrices Q and R for noise modelling and they have set them such that displacement error is minimized. They tested the above with synthetic acceleration data of a known covariance to use the same in matrices Q and R.

I decided to vary the particular co-variance and find it corresponding to minimum error in displacement. But in my case there is no change in displacement at any value of co-variance. Any help?


texts: What's the maximum CAN bus frame (message) rate at 125 kbit/s?

texts:
My CAN bus is running at 125 kbit/s and is using extended frame format exclusively. I would like to know what's the maximum rate of CAN frame I can send out. Suppose the data length is always eight bytes.

According to this Wikipedia page, each frame has a maximum frame length of (1+11+1+1+18+1+2+4+64+15+1+1+1+7) = 128 bits:

Taking into account of a minimum three bits interframe spacing, the maximum packet rate under 125 kbit/s should be:
125000 / ( 128 + 3) = 954 frames per second.

But in my test, I couldn't get that high. The maximum frame rate I can achieve (with all eight bytes data) is around 850 frames per second.

What's wrong here - my calculation, or my test method?


texts: why do I need a pwm and H bridge, after a PID controller to feed a dc motor?

texts:
let's focus on current control.

here's how I understood how the control works: (picture below)

Basically I feed my PID with a reference current minus the measured current (i.e. I have a negative feedback in current), the PID provides a control voltage to the pwm (so that pwm exit is 0 if the triangular waveform that characterizes it is more than this control voltage) that gives the H bridge a signal characterized by its duty cycle that then makes the H bridge output the driving voltage for my motor.

my question is: why can't I feed the motor with the output from my PID?
what's the point in having the pwm and H-bridge, if in the end all it does is giving the motor a voltage signal that has its average value where my PID decides?

my only guess is that there's something going on with ''per unit'' values. Like if my PID can output voltages between 0-5V but I want to drive my motor with -100,100V then it's up to the pwm and H bridge (which has a battery, of course) to ''transform'' the voltage information in the PID signal to the actual voltage that the motor wants.

What am I getting wrong? Why do I need those two elements?


texts:
I'm doing an analysis of a PMDC motor and I don't understand something about the transfer function.

I have the following equation:
\$(K_t\frac{1}{((s* L_A) + R_A)})(V_I(s)-k_b\omega(s))= (s^2J_m+sb_m)\theta(s) \$
which solved for \$ \frac{\theta(s)}{V_I(s)}\$ gives the result:

\$\frac{K_t}{s((s* L_A) + R_A)(sJ_m+b_m)+K_tK_b)}\$

I wanted to ask, where did \$\omega(s)\$ go? I'm sure it should be out of the result, but I can't figure why.

Thank you.

EDIT: I forgot to mention this. The equation is taken from the transformations of the electrical and mechanical components of a PMDC motor.

\$I_A=(\frac{1}{((s* L_A) + R_A)})(V_I(s)-k_b\omega(s))\$ as the equation of the electrical part of the motor, with \$V_I\$ as the voltage input, \$k_b\omega(s)\$ as the EMF. \$L_A and R_A\$ are the electrical resistance and inductive impedance.

Then, \$K_t I_A=(s^2J_m+sb_m)\theta(s)\$ is the equation for the net torque of PMDC motors which combined with the one above gives the first equation.

I've been trying the think about it and it might be related to \$\omega(s)= \frac{\partial \theta(s)}{\partial t}\$ but I'm not sure.


texts: Trigger charge in Android phone using a PIR

texts:
I want to use my android phone + 1 PIR as a poor man's home alarm. I need the phone to be triggered somehow when the PIR detects motion.

I was looking at the IOIO board. But wouldn't even be easier to just:

monitor the "ACTION_POWER_CONNECTED" event in android
connect a USB cable to the android phone
connect the PIR, a charger + pullup resistor as in:

When the PIR detects movement, it "switches" Ground on the USB cable to Ground on the charger, triggering the "ACTION_POWER_CONNECTED" on android.

Would it work?


texts: FreeRTOS on STM32 - What API should be used: CMSIS-RTOS API (v1 or v2) or FreeRTOS API?

texts:
According to ST's user manual UM1722 "Developing wireless applications on STM32Cube with RTOS" there are two APIs available:

Generic CMSIS-RTOS API (v1 or v2)
FreeRTOS API

The CMSIS-RTOS API located in the CMSIS_RTOS_V2 folder generated by CubeMX is a collection of wrapper functions for FreeRTOS API. The CMSIS-RTOS functions are used in the examples shipped with STM32Cube FW package.

My question is when one should use CMSIS-RTOS API and when FreeRTOS API?


texts:
Consider the following linear machine shown in Figure 2.  The bar with a mass of m, length l, moving with the initial velocity of V0 is moving on a rail.  We now close the switch:

a) Assume  friction  is  negligible.   Derive  the  differential  equation  describing  the  motion  of  the  bar  (use parameters to describe your equation)

I am trying to derive the differential equation for a Linear DC motor. Given that the applied load and induced load must act in opposite directions, this is what I have so far:
\begin{align}
  m\ddot{x} &= F_{load} - F_{induced} \\\\
            &= F_{load} - \left[\frac{V_b-v(t)lB}R\right]lB
\end{align}
Is this the full equation? Or am I missing something else?


texts:
I have problem with getting my LPC2148 to work with i2c devices. LPC is on 3.3v bus and i2c devices are on 5v bus with pull-up of 3k6 ohm on either 3.3v or 5v (jumper selection).
What im experiencing is that measuring SCL with oscilloscope i see that frequency of the square signal is ok (5us high and 5us lower).

The problem is that low is not really low. High level is 3.0v and Low is 2.2v. Well of course communication is not working ...

Schematic is quite simple. uC is connected to i2c devices with Rp on pin2 of "jumper selection" High. pin 1 is 5v and pin3 is 3.3v. No matter what i do with jumper i get the same signal output. What am i doing wrong ?


texts: I've got a 12VDC input thats being used to create 5V to run a AVR and 8V to run 8DC motors. I need 10VAC as well to run some accessories. Basically they are just switches controlled with a solenoid. So the draw on the 10VAC will be minimal.


texts: Why is there a positive body voltage when grounded, but none when not?

texts:
So after reading about earthing and earthing mats, I decided to make myself a very basic one for cheap to test the concept before jumping in with purchasing more sophisticated products.

Here's what I have:

A grounding plug wired on the ground pin with a 2m speaker cable. (I split the 2-wire cable and only used one wire. ).
The other end is connected to an alligator clip, which is clipped to my basic earthing mat.
The earthing mat is a cardboard sheet with aluminum foil taped on one side with aluminum tape. The clip is connected to this tape.

Here's how I measured my body voltage and the associated readings:

Insert black-prong of multimeter into a separate outlet ground. Other end connected to COM port on multimeter.
Put multimeter in V AC mode. Mine only has 200V and 500V, so I picked 200V.
Hold red-prong of multimeter in hand. Reading is 00.0 but briefly reads up to 00.2V (200mV) if I move around.
Now, when I ground myself by stepping onto the earthing mat, the reading jumps to 00.5 (500mV) and stays there.
A second person in the house read 00.6 (600mV).

This didn't make any sense to me. It appears that my body is drawing positive voltage either from ground or from the earthing 'mat'.

I also tried connecting the black-prong of the multimeter to the alligator-clip on the earthing mat and also got the same result.

Can someone please explain what is going on? Did I make a poor earthing mat or is the earthing "mat" acting as an antenna and defeating the very purpose of grounding?

How is it that all other DIY earthers get the exactly opposite result?