texts: Electricity Energy/Power measure with Different power factor

texts:
I am designing a circuit that measures the energy consumed from 50Hz AC supply (error must be < 1%), by measuring the voltage through potential divider; and current from shunt resistor. Then these two signals go to ADC inputs of microcontroller PIC18F46K80 to be multiplied and get the power.

The voltage signal enters a potential divider and an amplifier with DC offset and goes to the ADC input. In the current measurement circuit, the difference between shunt terminals is amplified and then an amplifier with two feedback resistors (NMOS used to select between them to modify the gain) amplify its again. Then go to a DC offset stage after that to the ADC input.

The problem is when the phase change between current and voltage, the energy measurement error changed by 0.8% if the power factor of measured energy changed from 1 to 0.8L.

During my work in this circuit I had come with these notes:

1-  Capacitive coupled noise (in the OPAMP negative input) could affect the measurement if the power factor is changed. But in this case, I am sure it is not because I measure the RMS value in the ADC to check if there is a capacitive coupled noise or not.

2-  The OPAMP is not 100% inverting, it has some parasitic effects on the phase of the signal that comes to it. It depends on the gain and other stuff.

3-  I had some DC blocking capacitor that will make a phase shift (time delay), between voltage and current signal, this phase is very small but it affects the measurement accuracy.

The points 2&3, I have solved it by making small software delay between acquiring the signal of the voltage and the current to compensate for that phase shift/delay.

I have two circuits:
The old one works perfectly when the power factor change from 1 to 0.5L. But it suffered from aging of a capacitor as described here (Ceramic Capacitor Aging Stack Exchange). The accuracy had dropped after 2 months of operation.
So I have modified the circuit (NEW ONE) by increasing the capacitors and some resistors to minimize the effect of the capacitor aging. But now I couldn’t even have an acceptable result, though I have tried adding variable delays between reading the voltage and current from the ADC.

The Code:

//================== voltage measurement ==================== //
  set_adc_channel(VOLT_CHANNEL);                                               //voltage reading channel
  delay_us(3);                                                           //wait for ADC channel capacitor to charge
  voltage_binary = read_adc();
  delay_us(10);
  //================== current measurement =====================//
  set_adc_channel(Current_Channel);                                           //current reading channel
  delay_us(3);                                                             //wait for ADC channel capacitor to charge
  current_binary = read_adc();

Differences between the two designs:

Item    New Design/Old Design

C16     10uF/4.7uF

C7     100uF/47uF

OPAMP   TL064ID/TL064INSR

D9      BAS70/BAV99S

Resistor Case Code   1608/2012

R38      100K/18.2K

R35     470K/82K

Sampling rate (Sample/Second)      3400/2700

The Question is:
What else could affect the operation of the measurement when the power factor change?


texts: Can I connect multiple brushless motors and ESC's to a single GND in Arduino Uno?

texts:
The main aim is to connect 4 motors in parallel each with separate ESC's to a single GND. I want to do this because there is a limited number of GND sockets built in the Arduino microcontroller. I have made a simple schematics that is hopefully a functioning parallel connections of the ESC, motors and batteries. Would this theme work for its purpose?

There is one wire directly from one of the ESC's to the GND socket in the Arduino. Then below that another the GND wire from the next ESC joins with the main wire down to the GND socket on the Arduino board. Please note that the +5v wires from the ESC's are left disconnected to anything. Obviously, the signal wire to the digital I/O on the Arduino board are separate for each set of motor and ESC. The three wires from the brushless motors are connected to the ESC's as per normal.

Would this work? Or are the wiring from the motor to the ESC dysfunctional?


texts: Minimize noise on electromagnet using audio frequencies

texts:
I have an electromagnet (coil with about 500 uH inductance and 0.8 Ohm resistance) that I want to drive at 4 kHz with about 3 Amps of current.  I want to achieve this with minimum noise and power at any frequency other than 4 kHz.

I am using a waveform generator (Stanford Research Systems DS345) to generate a 4 kHz sine wave (unbalanced signal), which is then sent to an audio amplifier (Crown xls 402).  The output of the amplifier is a balanced signal connected to the coil.  In parallel with the coil I have two zener diodes for flyback to prevent damage to the amplifier in the event of a power failure.

In order to minimize noise coming from the waveform generator or the amplifier, which of the following is optimal?  The most critical noise frequencies that I must minimize are those at low frequencies (< 4kHz and in particular those less than 200 Hz) and those over 4 MHz.

(i) Maximize the voltage coming from the waveform generator (10 V peak to peak).  Then set the gain on the amplifier to get desired output current

(ii) Set gain on amplifier to maximum, and then set the waveform amplitude to get desired output current

(iii) Something else entirely


texts: What is the critical path in the design?

texts:
I am trying to understand the worst case path in the 16bit carry bypass adder. Isn't the critical path through all the adders in the design?

But the solution is shown as below, how can it be the critical path(orange line)?


texts:
I'm trying to delay a digital signal using a D flip flop.

This is what I expect:

I expect a delay between D and Q.

But this is what I get:

There is no delay between.

So, why does the delay not appear?

Is there an alternative circuit/flip flop that I can use to delay the digital delay?

This is the link to the simulation to check.


texts: Calculating how long it takes for a circuit to compute the output for a given set of inputs

texts:
I'm having trouble with analyzing a circuit with respect to time, given clock-to-q, setup, and delays of individual components. We are given that

\$t_{clk-to-q} = 3ps\$
\$t_{setup}=4\$
\$t_{shifter}=1\$
\$t_{adder}=5\$
\$t_{multiplier}=6\$
\$t_{subtractor}=4\$.

We are also given that the inputs A, B, and C take on their new values exactly at the rising edge of every clock cycle and that all registers are intialized to zero.
This is the pipelined circuit:

(Sorry, some of the components I don't know how to represent in the circuit maker thing)
Anyway, the question asks:

How long does it take to compute the output for a given set of inputs?
Assume the clock period is 11ps.

And the answer and explanation are given as:

Technically, 30ps is the time it will take for the values of one set
of inputs to propogate to the output, We also accepted 41ps (3 clock
cycles + clk-to-q + adder)

I'm confused on how they got that. Currently, I am calculating 31. Im taking the path from input B to register 2 to the output, which is (setup + adder + clock-to-q + multiplier+ adder + clock-to-q + adder) (I think)
What am I doing wrong?
DISCLAIMER: THIS IS NOT A HW QUESTION, I'M JUST STUDYING FOR FINALS AND DOING PRACTICE PROBLEMS


texts: How to read pin status (high/low) in Spartan FPGA 3E

texts:
For Arduino => digitalWrite(LED,digitalRead(PIN))
This one I want to make in Verilog for Spartan FPGA. I know if I bind a wire to led using ucf and change the value then led will be on/off. But how to read pin status which I can see on Spartan board.
Thank you for your time.


texts: Power multiple parts of one project from one wall wart

texts:
I'm building a project with a high-power 10W RGB LED controlled by PWM from a microcontroller. Right now I'm using a wall wart to power the LED, and powering the MCU through my computer's USB.

My question is: what are the best practices for powering the MCU and LED from just one wall wart that plugs into the final enclosure? I don't want the final box to have two power lines going into it since that strikes me as ugly and I want to eventually show off the final product.

I want just one wall wart that splits its power inside the box to provide anywhere from 6 to 12V (ESP32 regulator accepts 6-12V) with at most 400 mA to my MCU, and another line or lines going to the RGB LED to power the Green+Blue channels at 3.5V and ~500mA and the Red at 2.5V and ~700mA. Something like a 9V, 1.5A wall wart would provide plenty of power for the whole thing.

I'm asking this now because I'd like to understand what sort of Buck converter/switching/linear power supply I would need to design/buy right now that will integrate with the single power source.

Strangely, I can't find any example on Google of finishing a project like this, so if anyone knows of a resource with an example or education on this, I'd appreciate a link.

EDIT: I was thinking of an LED like this one. Except RGB, and not RGGB. I'm open to LED suggestions.

Based on this article on wall warts it seems risky to use them because they're often unregulated.

After looking around some, I found this board mountable AC-DC converter at the right power and with the right over voltage/over current/short circuit protections. This seems like a good solution for a safe final product and I could plug the mains directly into the enclosure and into this power supply.


texts: Is there a toggle switch that returns to default state on power off?

texts:
In my car there is a switch to control traction control that's Normally Closed that I want to swap to Normally Open, however there is a problem. When the car is turned off and back on, the state resets to closed. I want to replace the switch but I also want to keep this feature.

Is there a momentary button operation switch that will toggle signal wire open/closed but will default to NO when power is lost?


texts: Is there Any Nomenclature for names of circuit components?

texts: There are lot of components is circuit named in very different manner like voltage regulator - LM7905 etc. Do different companies name them differently.


texts: Definition required: mixed-level simulation

texts:
Could someone please describe/define what 'mixed-level simulation' is? It keeps coming up in the literature I'm going through.

Thanks.

P


texts: Lock-In Amplifier: Why multiplication with Cos and Sin?

texts:
I have two questions:

I was wondering, why a Lock-In Amplifier does multiply the incoming signal s(t) with both a cosine and a sine reference and not just a single one?
What problem may eventually arise, if you multiply the signal only with either cosine or sine ?


texts: What is the percent impedance of a typical residential power line transformer?

texts:
Power transformers are rated by percent impedance. A 5% transformer, when loaded to full spec secondary current, will show a ~5% deviation from nominal output voltage.

What is the percent impedance of a typical residential power transformer, and why is that the typical value? Or is there a typical answer?


texts:
I'm looking for a device that can convert mV to the minimum required to power an LED. I'm thinking of having a thermocouple or thermopile that will be heated by a constant flame.

I've talked with several guys and they all agree in having a booster.

This device needs to be smaller than a golf ball.


texts: Spice : Error Message: Note: No ".plot", ".print", or ".fourier" lines; no simulations run

texts:
I try to run a simple RLC circuit under ngspice in batch mode and the netlist is written as follows:

Series RLC Circuit
V1 1 0 ac 100 0
R1 1 2 200
L1 2 3 0.125
C1 3 0 1U
.ac LIN 10 10 100
print ac v(1) i(V1)
.END

I run this netlist by giving the following command:

ngspice -b RLC.cir

And i get the following Error Massage which I don't understand :-(!

Circuit: series rlc circuit

Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

Warning: v1: has no value, DC 0 assumed

No. of Data Rows : 10
Error(parse.c--checkvalid): data: no such vector.
Note: No ".plot", ".print", or ".fourier" lines; no simulations run


texts: CAN bus termination in a fully modular design

texts:
I am trying to make a fully modular festo cube design that is controlled with a CAN bus, but I am trying to figure out where to terminate the bus.
I am even not really sure if what I am trying to do is even possible with a CAN bus.
The wiring looks something like this:

[

In every box is a node that is connected to the CAN bus, but there are several open ends in every box were I could connect a termination resistor to. The box on the bottom left is the master box which has a controller connected to it which you could see as the start of the bus. My quess is that I need to connect a termination resistor to every lose end of the bus.

Hope you can help :)


texts: Purpose of L2,L3 & C6 in the following CW transmitter circuit

texts:
I have been trying really hard to understand the purpose of L2, L3 and C6  in this CW transmitter, especially L3 and C6.

I have received many conflicting answers such as that L3 is acting as a loading coil for the rather small antenna, that C6 & L3 is acting as a LC filter for RF harmonics or that it is 'amplifying' the voltage from the BJT PA.

Project Link

Thank you in advance!


texts:
Out of curiosity, can I replace the electrolytic capacitors in the circuit with non-polar ceramic capacitors? Will I get the shifting in level?

MAX232 datasheet: LINK


texts: Measuring the efficiency/acoustic power of a transducer

texts: I was wondering what was the best and the simplest way of measuring the efficiency of a transducer. Finding the output acoustic power in respect to the electrical input power under a water medium.


texts:
I'm designing a small slow control system with ATMEGA2560. This board needs to measure temperature, voltage(0~4V), magnetic field using sensors, and monitor the digital status(High or Low) of some wires. Whenever each measurement happens, then reading should be stored along with timestamp. The accuracy of the timing should be 1ms or better. The data should be kept in a flash memory.

The ambient temperature around the board will be between -50°C and 0°C. The operating temperature of the MCU, and the sensors that I chose include the range. However, I wonder how to have a good accuracy of the time counting. Can I use a quartz crystal operating at -55 degrees Celsius and consider its ppm value as overall error, or should I use some temperature compensated oscillator?


texts: What is the simplest way to turn off some circuit when supply voltage reaches a minimum level?

texts: Knowing I have only a 12V battery to supply my circuit, how I can turn off the circuit if the voltage reaches 11V? I cannot use simple comparator CI since I don't have another supply voltage. I could I do that?


texts: Multi-channels DMA Subsystem for PCI Express

texts:
Say i have a PCIe Gen2 x4 link running in a DMA subsystem. May I know when do we need multi-channels DMA configuration? For example, FPGA vendor like Xilinx offer up to 4-read & 4-write data channel in their 7-series product which eventually translating to 8 independent DMA engines.

1) May i know when the PCIe link need such a feature?

2) What the pros & cons to have such a feature? What is the user consideration factor to use this features?

Is it just matter of performance improvement? or it simplify the SW driver?


texts:
Hello all,
I am trying to run simple LED blink program on PIC24FJ64GB004 using PICKit3 programmer, I tried multiple codes but all give same response. When i write a 0 to GPIO it remains at logic 0, but when i write 1 to any GPIO it starts toggling. Same behavior whatever configuration or code i try whatever GPIO i use. Please suggest me where is the issue. Below is one of the codes i've tried but no luck. Please help me out. Thanks all.

#include <p24fxxxx.h>

_CONFIG1( JTAGEN_OFF & //JTAG port is disabled
             GCP_OFF & //GSP Memory Code Protection OFF
             GWRP_OFF & //GCC Flash Write Protection OFF
             FWDTEN_OFF & //Watchdog Timer OFF
             ICS_PGx1) //debug over PGD1 and PGC1

_CONFIG2( FNOSC_FRCPLL & //Internal FRC with PLL
             OSCIOFNC_ON & //RA3 is clk out (fosc/2)
             POSCMOD_NONE & //Primary oscillator disabled
             I2C1SEL_PRI) //Use default SCL1/SDA1 pins

#pragma code

int main(void)
{
   unsigned long i; //a 32 bit variable to use as a timer

   CLKDIVbits.RCDIV0=0; //clock divider to 0
   AD1PCFG = 0xFFFF; // Default all pins to digital
   OSCCONbits.SOSCEN=0; //Disables the secondary oscilator

   TRISAbits.TRISA1 = 0; //sets the Mode LED pin RA1 as output
   LATAbits.LATA1 = 1; //turns LED ON

//////////////////////////////////////////////////////////////////
///FOREVER LOOP///////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
    while(1)
    {

    }
}

Edit: I am using Microchip PIC24FJ64GB004 PIM, i have added circuit for programming and a crystal below are the schematics attached. Thanks.


texts:
I need to provide a 60V/1A power source from a 12-24V input, -40 to 85 degC temperature range. Parametric searches for DC/DC converters at a couple online vendors don't seem to be turning up much.

I'd prefer a simple chassis mount module of some kind, really.

Are there (readily available) DC/DC converters out there that satify these criteria? If not, how can I go about designing something that will work?


texts: how to design multiple sequence recognizer

texts:
Question : Design a state diagram for a sequence detector that give output 1 once either 1010 or 0101 is detected (Mealy machine)

this is my state diagram, but i am having trouble to detect 1010 because when it detect 101 the output will also be 1


texts: Convert .PCB (Protel) to .MAX (Orcad Layout)

texts:
I need to convert a .PCB file created in Protel to a .MAX (Orcad Layout) file.

I tried importing by using Layout Plus, File->Import->Protel PCB, but I got an error.   Here is what the .LOG file contains:

Tue Feb 14 18:26:30 Loaded file C:\ORCAD\ORCAD_10.3\TOOLS\LAYOUT_PLUS\DATA\PROTEL.TCH
Tue Feb 14 18:26:31  This not a Protel PCB file (3)
Tue Feb 14 18:26:31 Line #1 --> ¡PCB FILE 9 VERSION 2.70
Tue Feb 14 18:26:31  This not a Protel PCB file (1)
Tue Feb 14 18:26:31 Line #1 --> ¡PCB FILE 9 VERSION 2.70
Tue Feb 14 18:26:32 Saved as file G:\205_UC.max

I used:
Protel version: 2.7.1,
Orcad Layout Plus: 10.3.0


texts: Led's in series light power degradation with strange results

texts:
I am doing life cycle test for 7 led's connected in series with current limiting resistor.(picture for reference)

I am measuring light power(mW) with Thorlabs photo resistor for each led. Led's drives from constant voltage supply. After ~ 6 month i see strange results: while 2 led's light power decreased (~5%) other led's light power increased ~4-7%. I don't have the datasheet since this is some custom made module(but i know for sure they have current limiting resistor and the led's connected in series).

Please help to explain and understand these strange results. Will appreciate technical,intuitive and physical explanations.

Thanks you!


texts:
I have an old PSU, model LPK9-4P. I'm trying to power an Arduino project with it, but it doesn't work as expected.

PSU is wired with a switch between signal and ground, and powers on well. Measures shows voltage in every line. But 12V line, with just 2 fans on it, just works few seconds before falling down.

5V line is stable and working, powering arduino and a bunch of sensors.

Is this about load requirements?  A malfunctioning PSU?  I'm kind of stuck with it, and it's just a testing power source!

Photo original on Google Drive
The photo is the only data I have about this psu.


texts: Detecting PWM signal is present on the line

texts:
I'd like to implement the following device: it accepts PWM input 5V p-p, and then produce logical zero (GND) at the output when any signal (duty cycle >0) is present and logical one (VCC) otherwise. My first idea was to use RC integrator with an rail-to-rail op-amp and it works, but has a flaw - when PWM signal disappears from the input, it took some time to discharge the capacitor (i.e. output goes slowly from zero to one), although I would like transitions to become as fast as possible. Schematic goes below.

simulate this circuit – Schematic created using CircuitLab

R1 used to adjust threshold. I also tried to feed op-amp output to noninverting input of another op-amp in same comparator configuration, but it produce constant output regardless of whether PWM input is present. Schematic looks like this:

simulate this circuit

I think I either doing something wrong regarding second op-amp, or missing some concept of using it. Any help will be highly appreciated.


texts: How to design an Oscillator Circuit (500 MHz range) with no Op amps?

texts: I am trying to design an Oscillator circuit which can produce a good sine wave with a frequency of at least 500 Mhz. This is for RFID applications. I have tried to use an class E oscillator, but i cant seem to get the design right. Can anyone help me out?


texts: Suitable Half Bridge Driver to control capacitve load

texts:
I am looking for a method to reliably and quickly charge/discharge capacitors. Each capacitor should be individually charged/discharged. The charge/discharge rate should be in the microsecond range (if possible). Everything should be controlled by a micro-controller.

SPECS (adjusted after @andyaka gave his answer):

Capacitor: 40uF, DC
Power Source: 100V, DC
Switching time: ~us (originally nanoseconds)
Source Output impedance: order of milliohms ~20mOhm (originally 50 ohm)

I thought about using a half-bridge as a load switch, but so far I have been unsuccessful at finding a suitable IC. Therefore, I wanted to ask if anyone had done something similar in the past, or could advise me on which type of Load Switch/Half-Bridge to use.
Many thanks!


texts: I am trying to calculate what size capacitor I need to energize a small relay coil for 5 to 8 seconds while the supplied voltage is removed momentarily . My supply voltage is 12 VDC, Relay coil draws 20 mA. The voltage rating for the coil is 9 - 40 VDC.


texts:
There is already a similar question in this website, but I still can't solve this. I have the following information:

An inverting opamp with nominal gain -20V/V, DC gain 10^4 and unit gain 10^6Hz. I need to find the 3dB frequency. I tried the following:

\$GBP = f_U = 10^6Hz\$;

\$ f_{3db} = \frac{GBP}{nominal_.gain} = 50000Hz\$.

However, the correct answer should be \$299kHz\$. What did I do wrong?


texts: What could be the purpose of the diode at emitter for this transistor buffer?

texts:
I have been using the following buffer(inside the dashed rectangle) as a driver where the 3.3V uC pulse is converted to 12V pulse which is then coupled to a MOSFET gate in this case. I have seen this transistor circuit somewhere I don't remember but it was for 5V uC input.

Now I'm wondering especially "what could be the reason for the D1 at the emitter of Q2" there? And if not much I also would like to get some insight on what makes the given values for R11, R12, R13 and R14 in that design?


texts: How does current sink help in biasing the differential amplifier?

texts:
Here M1 and M2 are differential pairs with analog input. When source resistor is used Rs M1 and M2 when Vgs is less than 0.7 Vt threshold M1 and M2 will be in cut off region and Vo1 and Vo2 will be in Vdd potential .
But this is solved using current sink with specific value of current.
Here to work  in negative cycle M1 and M2 source potential is should go to negative according to the simulation it is and it should theoretical (i am not sure whether its negative).
When i replaced current sink with diode connected nmos transistor it didn't behave as current sink.
I have attached simulations

But the question is how does this replacement of current sink solve the biasing of the mosfet problem and whats happening in that source potential

How is that source node behaving with resistor (Rs) common mode input and in differential mode input the M1 and M2 plus how does current sink solve the problem?


texts: Switching Power Supply - Inrush Current, Input Current, MCB

texts:
I am getting several PSUs (LRS-350-24) from Mean Well. Here's the specs:

https://www.meanwell.com/Upload/PDF/LRS-350/LRS-350-SPEC.PDF

1) The input current is stated to be 3.4A/230VAC at 88%. 350W output at 88% efficiency would mean 398W input/230V = 1.73A input which is 50% of the rated input current @ 3.4A/230VAC.

So should i take it as 1.73A or 3.4A? Because up to 3 PSUs will be tied to a switch rated at 10A, 240V. 3.4A would have exceeded the limit.

2) The stated inrush current is 60A/230VAC. Does this change if say, i am only going to use 50-60% of the PSU's output?

Reason is because the circuit for this PSU is tied with other lighting with 10A type C breaker which may trigger due to the inrush since the minimum is 5x.

Thanks.


texts: Is my millijoule (mJ) calculation correct?

texts:
My partner and I are reviewing our products compliance with IEC 60601-1 and need verification of our millijoule calculations.

Our product outputs (up to) a 240v bi-phasic square wave, 240mA and maximum phase pulse width of 650uS. Each phase pulse is 120v. Our calculation is based on a 500ohm load (per the IEC standard).

With that data, here is what we calculated:

120v into 500 ohm = 28.8 watts
650uS = 0.00065 seconds
28.8 * 0.00065 = 0.01872 joules or 18.72 mJ

We're verifying this because we are so incredibly below the thresholds defined in the standard that we want to make sure there isn't something fundamentally wrong in our simple math.


texts: grounding a mailbox - isn't it already grounded?

texts:
I live right next to some suspended power lines. My mailbox is very close to them, and anytime I touch the mailbox, I get a mild shock. It seems to me I need to do something to ground the mailbox but...it's already on a post going into the ground. Why isn't the electrical charge transferring to the ground? Is there anything I can do? (I can't move the mailbox -- any place I can put it, it will get the charge. Also the type of mailbox I need to use is decreed by the HOA.)

Based on comments and responses so far (1/20/15) it seems like the consensus on the information I provided initially is that the mailbox is well-grounded, and the shock I feel is actually a charge leaving my body that I already had. Based on this, I tested with the mailbox some more, assuming that if this was the case I would only feel the shock once and not on repeated touches. What I found was that I am only shocked if I touch the mailbox door (which, you know, is kind of required to use it) and that I feel the shock even on repeated touches. I'm thinking perhaps the door and the box are made of different materials, and the door is building up a charge that the box and post are not conducting to the ground. Any new ideas based on this additional information?


texts: Interrupts not working on MSP430 when using different PWM pin

texts:
I have a very strange issue I have been stuck on for a few hours now and no matter how often I read and re-read the datasheet and user guide, I still cannot work it out.
I am using an MSP430FR6927 and I need to generate a PWM signal, and I am also using interrupts on I/O pin P3.0.
When I use pin P1.6 for my PWM, using timer TA0 (as per datasheet), everything works fine. When the interrupt on P3.0 is seen, my interrupt handler kicks in, does what it needs to do and everything is fine.
Due to PCB layout, things would be easier if I could use P1.7 to generate the PWM signal, so I have switched over to P1.7, and the PWM signal generates fine, but the interrupts do not trigger on P3.0 any more.
These are the lines of code that have been changed:
#define Enable_PWM              P1SEL1 |= 0b01000000 , P1SEL0 |= 0b01000000   // Set P1.6 to PWM
#define Disable_PWM             P1SEL1 &=~ 0b01000000 , P1SEL0 &=~ 0b01000000 // Turn the PWM off

Was changed to:
#define Enable_PWM              P1SEL1 |= 0b10000000 , P1SEL0 |= 0b10000000   // Set P1.7 to PWM
#define Disable_PWM             P1SEL1 &=~ 0b10000000 , P1SEL0 &=~ 0b10000000 // Turn the PWM off

And
void Turn_On_PWM(void)
{
  Enable_PWM;
  TA0CCR0 = 32-1;
  TA0CCTL1 = OUTMOD_7;       // Reset/Set
  TA0CCR1 = 16;
  TA0CTL = TASSEL_1 + MC_1;  // ACLK, UP mode
}

Has been changed to:
void Turn_On_PWM(void)
{
  Enable_PWM;
  TA0CCR0 = 32-1;
  TA0CCTL2 = OUTMOD_7;       // Reset/Set
  TA0CCR2 = 16;
  TA0CTL = TASSEL_1 + MC_1;  // ACLK, UP mode
}

Just these little changes means my interrupt no longer generates on the I/O pin P3.0. The only real difference I can see is that changing the output to P1.7 uses the TA2 module as the output, but I changed my other timers so that TA2 is no longer used for anything else (to avoid potential clashes) and this still didn't fix the issue.
I have looked through the documentation a lot and it is all starting to blur now! If anyone has any idea what is going on, I would be very grateful for the help. If this is more suited to Stack Overflow, then please let me know and I'll move it over there.


texts:
I'm trying to blit an image with sprites, animated.
While drawing the animated sprite, I draw a background before the sprites. With the sprites, the game looks smooth and playable, with the background its getting very slow.

I'm using a 240*320 image.
I tried my best to optimize the code and that's what I have resorted to.

void  DrawSprite(sprite_ptr spr, uint8_t *fb)
{
    const uint16_t* data = (spr->num_frames > 1 ) ? spr->frames[spr->curr_frame] : spr->imgData;

    uint16_t spriteHeight = spr->height;
    uint16_t spriteWidth  = spr->width;
    uint16_t x = spr->x;
    uint16_t y = spr->y;

    for (int i = 0; i < spriteHeight; i++)
    {
        for (int j = 0; j < spriteWidth; j++)
        {
            uint16_t color = data[j];
            if (color != 0)
            {
                LCD_DrawPixel(fb,j + x , i + y, color);
            }
        }

        data+=spriteWidth;
    }
}

MODIFIED CODE:

void  DrawSprite(sprite_ptr spr, uint8_t *fb)
{
      const uint16_t* data = (spr->num_frames > 1 ) ? spr->frames[spr->curr_frame] : spr->imgData  ;

      uint32_t spriteHeight = spr->height;
      uint32_t spriteWidth  = spr->width;
      uint32_t x = spr->x;
      uint32_t y = spr->y;
    for (uint32_t i = 0; i < spriteHeight; i++)
        {
        for (uint32_t j = 0; j < spriteWidth; j++) {
            uint16_t color = *data++;
            if (color != 0)
            {
                                 *(__IO uint16_t*) (fb + (2*((i+y)*BSP_LCD_GetXSize() + j + x))) = color;

            }
             }

        }
}

Still the frame rate is not acceptable


texts:
I am having 8 wire stepper motor rated as 12V ,0.95A, and torque=1kg cm it has coil resistance 3 to 4 ohms.

I have successfully run this motor with help of this forum.

Now i have one doubt regarding current ratings.

I am using adapter for power supply it will give maximum 0.77 A current(tested with multimeter). I could run motor with that but, still i need more holding torque so, i planned to increase current, can I use  12V 3A or 5V 1A adapter for this purpose.

Will it cause any damage to motor.?


texts: What is mean by 3 level program memory lock?

texts:
I am building my first microcontroller programmer using at89c51. In its documentation I have read that it support 3 level programming lock. But I did not find a simple explanation of this term.

Will somebody explain what are memory locks and what is mean by 3 level in this context?


texts: I cannot understand how the limit switch design in this schematic works.  It appears to me to loop around on itself.  How does it work?


texts: convert from serial modbus to ethernet through plc?

texts:
can I use a plc as a converter to convert from serial modbus(RS485) to either ethernet or usb using code ? , the plc is modicon m340 without communication module but the cpu has serial port , ethernet port and mini usb port.

i know it's easier to buy a converter and it's ridiculous use of a plc for that but i need to know the way if it can be implemented.


texts: What would happen to the voltage or current flowing through the motor in an h-bridge

texts: I was wondering if some one could help me understand what would happen to the motor if I suddenly change the rotation  from clockwise to anticlockwise or vice verse in an H-bridge configuration, would the current flowing through double ? Would the voltage double across the motor ?


texts: Preventing Water Ingress Through Cable Conductors

texts:
Suppose a 4-conductor cable is connected to a printed circuit board mounted inside of a waterproof enclosure. The cable may become damaged (the insulation may be breached) allowing water to seep into the cable jacket and even into the individual conductors, which now behave as water pipes that bring the moisture right down to the board. This will happen regardless of any external waterproofing measures.

Assuming the impure water does not short any of the conductors, there is now a risk of corrosion at the solder connections on the board, as well as additional moisture damage to the rest of the board. Furthermore there is a risk that over a long period of time, this water may actually fill up the enclosure, destroying the board and everything connected to it.

The cable is epoxied into the enclosure containing the board so no water can come in around the outside of the cable, but there is no protection against water coming in through the inside of the cable and the individual conductors.

This can't be a new problem, there must be a practical solution out there for this already but I have yet to find it. Sure, I could apply epoxy around the individual conductors as well where they come into the enclosure but 1) that would be a manufacturing nightmare, and 2) there could still be air bubbles or delamination of the epoxy that would allow water through.

Does someone have any experience with this and have any suggestions for how to prevent water ingress from the inside of the cable?


texts: What is the gain margin of the system, when the phase crossover frequency does not exist?

texts:
I have a simple questions

I have a system in which the system will never reach -180 degrees for any frequency.

Does that make the gain margin infinite ?
If yes, does that mean that the system will always be stable for any gain ?

Thanks


texts: If I have a system working at 2.5V-0.3mA powered by two CR123 3.7V-2000mAh.Is my system going to last the same time if I put my batteries in parallel or in series?Because if I want it to last 12hrs a day during 2 years, at 3.7V (parallel) I need a 1780mAh battery (I have 2*2000=4000mAh) and at 7.4V (series) I need a 880mAh battery(I have 2000mAh).In both case in parallel and in series it will work.But in which case is it going to last longer?Thank you in advance !


texts: Why are logically related bit fields in MCU registers often in separate locations?

texts:
Forgive me if this question has already been answered, but I was unable to find an answer either on this page or in the wider Internet.

I'm an experienced developer with decent knowledge regarding low-level programming, but relatively new to embedded development. I've been teaching myself embedded systems development using an ST-NUCLEO144 board, which features an STM32F746ZG MCU. One question that seems non-obvious to me is that why logically related bit fields in a register may be in different locations.

One example is the USART_CR1 register on the STM32746ZG. The M0 and M1 bit fields together control the word length in USART TX/RX, a combined 2-bit value of 0b00 specifies 8-bits, 0b01 specifies 9-bits, etc. This is all quite straightforward, except that M0 is at bit 12 and M1 is at bit 28... why is this?

Is this for legacy design reasons, such as a new feature was inserted into previously reserved space? Is it for reasons related to the chip design, that I'm not considering, or is there a greater purpose to this that I'm not seeing?

Obviously this is pretty trivial to overcome with bit-masking, but I'm just curious.


texts: If an NPN BJT is being used as a switch, why is the load usually connected between +Vcc and collector? How is the performance affected if the load is connected between emitter and ground?


texts: Electrical generator where a dielectric is pulled out of a capacitor

texts:
In physics class I learned that removing the dielectric out of a charged capacitor increases the voltage and therefore the energy stored.

Could this effect be used to build a generator? The extra voltage could be extracted somehow, the dielectric put back and the capacitor recharged at the lower voltage. How efficient would this be?


texts:
I am working with a SAMD21G18 and a custom board based on Sparkfun design and I am using VSC + PlatformIO.

Actually I want to run at 1.8V instead of 3.3V. Now, the hardware works well at 3.3V but when I use 1.8V it doesn't.

I have disabled the fuse BOD33 using Atmel Studio, but the microcontroller doesn't work. How should I change the fuses in PlatformIO?

Do I need set any other option to work at 1.8V?

PD: My platformio.ini file is:

;PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:samd21g18a]
platform = atmelsam
board = samd21g18a
framework = arduino
build_flags = -D CRYSTALLESS
board_build.variant = SparkFun_SAMD_Mini

; SWD interface
upload_protocol = jlink
debug_tool = jlink


texts: Supplying relay board with mains voltage

texts: I bought a relay board (this one) that can handle 10A at 250V, my question is: if I wire a mains supply into it, say from a ring circuit (that powers sockets throughout normal houses). Will the relay be able to handle the current/voltage to work appropriately? (The relay will power device like a computer, tv, monitor, etc...)


texts: is there any spice model for optoisolator triac driver circuit?

texts:
I have to design a phase angle dimmer using a triac. For this, I have read
How do I drive a TRIAC from a microcontroller (for low voltages)?

This forum really turns out to give me a good solution .. but before that, I want to simulate this circuit in LTspice or multisim or any software ..

I have googled for the spice model of MOC3022M but have not succeeded  .. Can anyone give me a suggestion?


texts: Effect of 30% voltage variation on life of tubular heat elements

texts:
In my country voltage variation can be up to 30%. Recently we had many commercial foodwarmers fail in the same locations while another brand of similiar equipment works perfectly.

The manufacturer of the failed equipment blames it on the voltage variation, but since the other brand works just fine, I have my doubts.

What can I do to determine actual cause of failure?

Defective heating elements?
Inappropiate heating element/thermostat combination?
Voltage variation? (if this is the cause, then why does it affect only one brand?)


texts: Impact of capacitor on half-wave ac to dc rectifier

texts:
I'm trying to convert 24AC from a furnace into a DC signal I can step down to power a 5 volt microprocessor. Following this blog post I bought a 1n4002 diode and a 220 uF capacitor. Then I built this circuit:

To test it I'm using a used power-supply that used to power security cameras. Using my multi-meter I see that the power-supply outputs 28 volts AC when I measure across the leads of my capacitor I get .06 volts DC.

Its kind of working, but I expected a lot more volts because according to the article the peak AC voltage should be even higher then the 28 volts. I'm wondering if using a 220 uF capacitor instead of a 100 uF capacitor would cause this difference? What math would I want to be doing to calculate if my capacitor is the wrong one?


texts: How can I make a UART receiver using logic devices (74164,counters,logic gates,..)?

texts:
I am trying to make a Serial-in Parallel-out Register to be controlled by my PC with logic gates and a 74164, 74193, 555 timer. I am programming it through visual basic and I have no problem making the serial communication, I even made a chat (in a prior application) with it and the data is sent correctly but I'm having some issues with receiving the data and keeping it with the logic. The idea is being able to control the data I output to then control a stepper motor.

This is the circuit I have developed so far, the 555 timer has 10,200 hz frequency the serial communication is 9600 bauds, the counter is going to stop at 9 and the clock is going to be activated when a 0 logic so it is starting when the start bit arrives. I have a NAND flip flop to store when to start and it is going to be deactivated when the counter reaches 9, the problem is it is really bugged and I am not sure why it is, when I send any data the 74164 displays 127 or 63 in decimal (0111 1111 and 0011 1111 respectively) and I would like to see if you could help me solving it.


texts: Understanding jtag between microcontroller and devices

texts:
I am trying to understand how a micro-controller (in this case a C2000 from TI) communicates with other devices via jtag. The device here is a FT2232 (a jtag to usb converter). According to the figure, would the micro-controller be the "JTAG Controller Connection" and FT2232 the "Device #1"?
I also need to convert the jtag signal to RS-232, and I need to know the directions of jtag. Which channels (TCK, TMS, TDI, TDO) are bi-directional? In other words, does FT2232 (Device #1) ever send a signal to any buses besides TDO?


texts:
The left channel of a phono input on a mixer is outputting only noise.
It is measuring -8V DC across input terminals, while the other channel is measuring 0V.

The dual op-amp, a 4580, is getting ~27V in Vcc+.

Channel 1's IN+, IN- and OUT are all ~13.5V in relation to Vcc-. This is the working right channel.

Channel 2 measures IN+ ~5V, IN- ~10V and OUT ~1V.

Should I suspect the op-amp of having failed? Or is this a symptom of something downstream being wrong?


texts:
This question is very basic but I could not find it among previous questions so here it goes:
I am trying to measure the current of a very low power device with very short intervals of activity. I know I should use a shunt resistor and OPAMP but:

1) I am not sure about the correct configurations and setup of these wrt device

2) I am not sure about the range of the resistor and the specifications of the OPAMP that should be used in this matter.

The range of the currents to be measured are starting from 10 microamperes to a few mili amperes


texts: How to implement a 2 digit BCD subtractor with only 2 7483s?

texts:
I need to build a 2 digit BCD subtractor with the limitation of only having 2 7483 (4 bit adders).
Additionally, 20 > minuend >= subtraend.
With those limitations in mind, i can see that if the LSB of the first digit of each input is the same, the output will always be the second digit of the minuend minus the second digit of the subtraend. I can use 2's complement to do that easily.
The problem is that when the LSB of the first digit of each number is different, i can have a situation like 18 - 09, which i dont know how to do with only 4 bit adders, considering 18 doesn't fit in 4 bits and neither does 9 in 2's complement.
I could use some other method of subtraction, like 1's complement, but i wouldn't have enough adders. Am i missing something? It feels like 2 4 bit adders isn't nearly enough. Naturally, i can also use logic gates, but building more adders and complex logic with them wouldn't be reasonable.


texts: Usage of the #pragma pack(1) compiler directive on embedded applications

texts:
I have recently come across this #pragma pack(1) preprocessor directive and was wondering why it is being used?

I Googled the usage, and found it has other options such as push,pop etc. Has anyone used this on their embedded application?

I would like to know some examples of how/why you have used this directive and on what kind of processor? What are the pro's/con's of using this directive?

Thanks.


texts:
I have a circuit which pulses an ignition coil and requires a 6W input. Under load it has an efficiency of around 85% and an output power of approx 5W rms (60kV peak at 1mA).
Under very high resistances (essentially no load) the input is still 6W but the output across the secondary is approx 0.015W (60kV at 25uA), so an efficiency of 0.25%.
I am not too concerned about the load efficiency but would like to improve the efficiency under very high resistances (essentially no load) to approx. 1% by reducing the input power, whilst keeping the output of 60kV at 25uA.
Is this actually possible with enough re-design of the input circuit, and can ignition coil circuits be designed in this way?


texts: What is max current for goldpin connectors?

texts:
I'm designing a circuit which consists of two blocks on the same PCB. For testing I'd like to have an option of bypassing the second block and connect the first one to the output.

The standard solution would be to add goldpins with a jumper. The potential problem is that the output current could be as high as 6A. Can goldpins handle that? If not, what other inexpensive connectors could I use?

The voltage will be 12V.


texts: Why does a charging IC keep a low voltage while connected to a used battery?

texts:
I have a set of devices using Li-Ion batteries and featuring a charging IC (LTH7). Charging works normally on recent batteries, but does not on used ones.
Knowing that chargers initially try to maintain a constant current (CC phase), I was assuming to have a very low or no charging current for those used batteries, and thus expecting the charger to respond like if no battery were connected: increasing Vbat until the max value (4.2V).
Instead of that, I observe that Vbat remains constant around 0.1V.
Any idea why the charging IC does not increase the battery voltage ?


texts:
what the right way to determine the correct capacitors value needed for a avr-chip with a crystal oscillator?

Let say the crystal's load capacitance is: 20pF

and i want to use: atmega8-16pu

what should i look for and what the math behind it?

please don't just tell me to use 2x22pF capacitor. I'm not here to do my homework, but to

understand it for future use.


texts: Realisation of asynchronous decade counter

texts:
Here is the illustration of the counter:

Can you please explain in detal what happens here? Why are J and K inputs always 1 and how does CLR reset these flip-flops?


texts: Why is it wrong to connect an oscilloscope in parallel with a circuit element?

texts: I was told that it is incorrect to measure the DC voltage across a circuit element using an oscilloscope by putting the probe on one side and the ground clip on the other. I am supposed to connect the probe to one side, take my measurement, and then do the same with the other side and then subtract the numbers. Why is it incorrect to bridge the circuit element with the oscilloscope?


texts: Fail to verify if watch dog timer works properly

texts:
I wrote a simple watch dog timer program. First I light up a LED, and I want to see if watch dog timer will reset the chip and the LED would be turned off(I didn't feed the watch dog).

#include <reg51.h>
sfr WDTRST = 0xa6;

main()
{
    P1 = ~0x01; //Light up the LED

    //Initialize the watch dog timer
    WDTRST = 0x1e;
    WDTRST = 0xe1;
}

I use Proteus to simulate, but the LED light is on(and it wouldn't be turned off afterwards) after I ran the program, I can't verify if the watch dog has reset the chip.

The circuit is exactly same as this one:

(Due to some error I cannot upload the image)

Did I miss something important? Or reset wouldn't cause the LED be turned off?


texts: Are RS485 Full-Duplex interface same with RS422 interface?


texts: DC-DC Step-Down (buck) converter 5V 10A 50watt, not understand how to size the supply

texts:
I have a 5V 10A 50WATT DC step-down converter: http://www.powerstream.com/dc-24V-5V.htm

I'm just not understanding how to size the power supply needed to drive this converter at max power.

I have an iGo 15-24V 6.5A 100W Max (130W peak) powersupply.  Is that going to be sufficient to  drive the step-down converter when it's under max load itself?

Am I understanding correctly, that if I have a 50WATT load, it is always going to need a minimum of 50WATT of power regardless of what voltage is driving it?  I understand there will be a loss of efficiency in the step-down, so what's a rule of thumb (10%-100%) for gauging the necessary capacity on the supply.

Or am I missing something fundamental?


texts:
I am trying to make a Eagle library for a Micro USB B connector. The library is unavailable and I decided to make one with the datasheet dimensions provided.
But it is rather confusing.

The units are in mm
Please check the attached image.

The Dimensions are shown as subtracted from another. Like A-B
I thought that was a tolerance.

I have marked the rear pin. As the top view the size of the pin is 4-1.00
But as Y the size is 2-2.00!! So the error is like 4mm??

Please advice me how to read this dimensions in the datasheet. I do not get that 2-2.00 notation.


texts:
I am connecting a 2.5mm TRS jack to an Arduino Mega to monitor for data from a remote.

The remote conforms to LANC standard, viewable here:
http://www.boehmel.de/lanc.htm

So in short, the Tip is LANC itself, the Ring is 5V power and the sleeve is GND.

What do I connect to what on the Arduino to monitor serial communications?

If the Tip is LANC in its entirety, what do I use as TX and RX? As far as I can tell, the same wire alternates between transmitting and receiving.

Thanks


texts:
When an ADC operates on an incoming analog signal, is the LSB assigned by rounding or randomly.

For example, assume that the LSB represents a difference of 1V.  Does the ADC "look" at the continuously varying incoming signal and assign an output of 0 if the incoming voltage is < 0.5V or 1 if it is >= 0.5V or is the LSB assigned a 0 or 1 randomly by some quirk of the circuitry?

I am wondering if ADCs typically have front end analog circuitry to do rounding.


texts: I want to measure currents in range between 4-20 mA. Could you tell me whether this circuit is good for this operation. I'm using an ADC 3.3V in a microcontroller (thus, I receive voltages in range between 0.52 - 2.6V).


texts: On adding components in Eagle schematic same are not reflected on Eagle board else link error pops-up?

texts:
While adding new components to Schematic same are not reflected on board. Forward/Backward annotations cannot be performed. How Re-link the schematic and board so that I can add new components?
or
Can schematic cannot be edited once its board is created?


texts: How to sense when a plant needs to be watered?

texts:
Im trying to design an embedded system that detects when a plant needs more water (mostly the kind of plants you have in at home in a pot)
What kind of sensors would you recommend?


texts:
I need to store/conserve a sealed lead-acid battery (Bosch S4) for 9 months. There are two options I am considering:

Leave battery disconnected and recharge before use.
Charge with solar panel during the 9 months.

With the first option I expect a self-discharge of about 50% overthe nine months with associated crystal formation, etc.

With the second option I fear overcharging. Typically solar chargers restart a timed charging cycle with every sunrise: e.g. 2 hours boost/absorption before falling back to float voltage for the rest of the day. - Independent of whether the battery was discharged at all.

Which option is likely to be best for sealed lead-acid batteries and why?


texts: Is it electrically safe to use an ATX PSU's PCI output for SATA/MOLEX instead of graphics cards?

texts:
My question here is about electrical safety of a proposed PSU cable hack.

The situation is a single rail 1600W PSU  (to avoid partitioning of the current) that has to power some 20-24 HDDs.

I've asked about PSU size elsewhere and I don't need product help - this question is purely about whether it's electrically safe to use an apparently-simple PCI-to-MOLEX/SATA cable hack, to power some HDDs.

HDDs are powered by chained cables, but splitters and chains have a current limit. If they all max out at 3A current, which these do, then potentially 8 HDDs on a 4-ways chain with splitters, would mean 24A on a single MOLEX/SATA cable of at most 16 gauge, and perhaps only 18 gauge. Far above MOLEX/SATA cable spec, and fairly soon it would mean meltdown time for the cable, with 100A+ just waiting to short out.

Ideally I'd like to limit the drives to 3-4 per cable, which means (say) 8 PSU connectors x 3 drives per connector, or 6 PSU connectors x 4 drives per connector. But most PSUs that are electrically, financially and acoustically sensible, have up to 5 HDD connectors, and I'd like to spread the load across more than that number of connectors/cables.

At the same time, all of the PSUs have 3 - 6 PCI power connectors connected to the identical rails, providing identical voltages, that are completely unused, because high quality high power PSU are mostly used for multiple PCI/VGA (which I don't need), not dozens of HDDs.

My understanding is that the PSU PCI connectors are basically identical electrically to the HDD connectors. They provide the same voltages from the same rails (on a single rail supply anyhow). The only real difference is that their pins assignments may be different at the PSU end (that is, for some specific PSU, the HDD connector may be assigned pin1/3=12V, pin2/4=GND, etc, while the PCI connector may be assigned pin1/2=12V, pin3/4=GND etc)

I have spare compatible plugs for the PSU end, and spare compatible chain cables for an HDD end. I can't see a reason why it wouldn't be completely electrically safe to hack a PCI "PSU end" to an HDD "chain end", if I'm careful about checking which wires carry which voltages, and basically treat the 4-6 PCI power sockets exactly like extra HDD power sockets.

Assuming I'm competent to check voltages and solder/insulate the cables appropriately, and I don't power more than about 3 - 5 HDDs off a hacked cable (to not overheat the joint), is there any reason this wouldn't be an electrically safe and sane way to spread the load across more HDD cables?


texts:
I've been using an IBM liberty (cell library) file for some SRAMs, dating back to 2007. [For copyright reasons, I can't post the content here]. I don't have the datasheet, and I've been trying to work out the functionality of the pins.  I've worked out most of them - pins like CLK, d and q are obvious -, but there are a few like bundle (rr), which for a 256x47 SRAM contains 20 pins in 4 groups of 5. Probably related to that are 4 rre pins which I guess are the enables for the rr pins.

The best I've managed to find on Google is that some SRAMs have different modes like Register-Register (RR), Late Write (LW) and Late Select (LS) modes.


texts:
Possible Duplicate:
  How to become an embedded software developer?

I am really a new bie and have some idea about embedded C. I want to program embedded devices using my computer and even want to program some of the computer peripheral. I have got some basics of embedded systems but dont know where to start from? Which platform to use? How to understand the mechanism? Do i need to know all about electronics before putting my hand into embedded world. Please help I have too many questions and need a way. Links to relevant articles are appreciated.


texts: I am familiar enough with eMMC features as there is a great deal of documentation about them. I understand that SD cards have permanent write protection, temporary write protection, and even password-based protection, but these seem to require special equipment to use (strikes me as somewhat stupid for OEMs not to implement this since they use the same exact contacts). eMMCs—and MMCs, as far as I know—support the ability to make certain regions write-protected, so something like a bootloader can be safe against accidental corruption. Do SD cards have this same or similar functionality? If they do, does this include power-on write protection, wherein a lock, when set, will last for as long as power is provided to the card?


texts: tmp36 soic, doesn't work, but the to92 version does, am I missing something obvious?

texts:
I am using a tmp36 temperature sensor to measure temperature (with an attiny 85), when I put 5V across the GND and Vs pins of the to92 model the Vout is not 0 (I can't remember the exact value now but perhaps 0.7 or similar).

I have been trying to make a surface mount board and the Vout value using the SOIC version of the tmp36 temperature sensor is only a few mV (or sometimes 0).  I thought maybe I had killed the chips when soldering them but I just tried one before it was soldered and it is giving Vout of 0V.  I also checked all the other pins in case I had the wrong Vout pin and they were all 0. Is there something obvious I am doing wrong, or could I have gotten fake chips? (bought from two different suppliers though)... will go and check a few more now.

Thanks!!!


texts: Suppression diode for relays in ULN2803A

texts:
I want to make a simple 8 chanel relay multiplexer. My choice for driver IC at the moment is ULN2803A and for relays it is a 12v DC DPST relay.

I read in ULN2803A datasheet that it contains Suppression Diodes. Does this means I should not be worried about adding a diode in the return path of relay coil?

Thanks.


texts: CAN physical layer fault conditions Short circuit to battery on CANH and CANL lines analysis

texts:
In case of short circuit to battery  on CANH, would the current flow as analysed below ? This is in the case of CAN transceiver TJA1042T and I got the internal block of the transciever by NXP.
Data sheet TJA1042T

I have another case where we are using a uC integrated with a CAN transceiver MC9S12ZVC
and the block diagram is as below, and in case of 32 V battery short on CANH, CANL lines - NXP has depicted the current flow below and described it "The diagram below shows the current flow in case of the short circuit on the bus.  The midpoint of the Voltage divider Between CANH and CANL is connected to a voltage reference. The voltage at this point depends on the mode of the transceiver. In normal mode (also when transmitter switches off as in this case) this reference point is set to 2.5V.   In standby, this reference is set to VSS. In off mode this node is left floating but will be clamped to either -0.6 or 7V. The resistance to the midpoint is 17Kohm" But I am not sure if this is right. How do I calculate the power dissipation in the termination resistors due to short circuit conditions on the bus lines CANH and CANL ?

I have attached snapshots of the CANHPHY specs above since I couldn't upload the datasheet.


texts: How to design contact pins for testing SMD board? Only optical inspection possible testing technique?

texts:
The point 6.56 and the Teensy's testing are examples about testing, also the pictures below. Now suppose you want to do a SMD board to the size of fingerprint or smaller. The earlier video mentioned things such as "automatic optical inspection" about 4.20. I think the Teensy-style physical testing with pressing to some conductive golden pikes is impossible with very small SMD boards -- or production/testing boards should be larger to have some testing holes that are cut out later.

How can you test some very small SMD boards?

Examples about testing with pikes


texts:
I have a blue ceramic disc capacitor and I'm trying to work out the values. On one side of the disc are the following characters, in approximately this pattern:

  SHM
X 1400-
Y 1250-
E 222M
  F

The other side has a bunch of logos and symbols which I can't make out. I imagine the capacitor is 22 nF, but I'm trying to work out the working voltage is.


texts: I need to design a circuit that can turn a DC motor on and off. The motor is like a winch motor on a truck an can draw high amounts of current, in some cases up to 200Amps. The motor runs at standard alternator voltage ~14VDC. If I want to be able to switch this motor on and off from a digital circuit what devices are out there that I could use for the switching? Are there MOSFET-like devices that can handle 200 amps?


texts: Altium cannot find harness files of design

texts:
I downloaded the project source files from the ROACH project: Link to it.

I tried importing them in Altium Designer, but it cannot find the harness files, which is strange as they're in the same directory that the PRJPCB file is in.

Has anyone run into this or a similar problem?


texts:
After about 3 years of working with MCUs still I don't know what's the use of Software interrupts? I have done several jobs with STM32 and I have never used the software interrupts. Indeed this is a big question to me:

Why when we can use a simple function to do a task, should we use a software interrupt? What are the differences between a software interrupt and a function?

Every time you like, you can call a function (that you have written for your job). There ought to be some benefits to using a software interrupt instead of a simple function. I'm not sure but I think there is a benefit for software interrupts: you can assign a priority for a software interrupt, then you can give a higher priority to the software interrupt to avoid the hardware interrupt breaking your task.


texts: Is it possible to get input from a 10x10 grid of switches using an arduino board? (Uno, Mega, etc.)

texts:
I'm more of a software guy but I'm working on a prototype of a game that will use a pressure sensitive 10 by 10 grid. This will require 100 switches just for the grid. The closest I've found to off the shelf is an Arduino Mega 2560 r3 but it still comes up short by 30 pins. What is the best approach to this? Should I look into getting more gpio pins or is there a better, more efficient way of accomplishing the task of receiviving positional data from a 10x10 grid (think a1,b2,c3 and so on)?

While Googling a bit I came across a method using resistors and analog pins to get input from multiple buttons. The tutorials always seem to use 5 buttons, Is this a limitation of the tutorials or the method? Could the same method be used to string together 10 switches? link to multi button example


texts:
I'm working on a UART transmit process (uart_transmit) in VHDL (115200 baud, 8 data bits, 1 stop bit and no parity). I need the transmit line (tx_line) in the process to go idle whenever the carriage return (CARR_RET) in the message buffer is detected.

The buffer is part of another process but it shifts each character into char_byte when the transmission of the last byte has finished. It is clocked by the TX_DONE signal.

The issue I'm having, however, is that the FPGA transmits the entire message as required except for the carriage return. I know it's because the process uart_ready detects the carriage return and changes the state of TX_READY accordingly but I don't know how to workaround the instantaneous change, I thought about delaying the TX_READY signal with an FDC but that didn't work. Are there any suggestions as to how I can detect the carriage return, transmit the carriage return and still send the transmit line to idle?

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

entity uart_tx is
        Port (clk               : in std_logic;
                    reset           : in std_logic;
                    tx_line         : out std_logic;
                    switch          : in std_logic;
                    TX_DONE         : out std_logic;
                    char_byte       : in std_logic_vector(7 downto 0));
end uart_tx;

architecture Behavioral of uart_tx is

constant stop_bit       : std_logic :='1';
constant start_bit      : std_logic :='0';
constant idle           : std_logic :='1';
constant CARR_RET       : std_logic_vector(7 downto 0) :="00001010";

signal  TX_READY    : std_logic :='0';
signal  TX_MESSAGE  : std_logic_vector(9 downto 0) :=(others => '0');

begin
uart_ready: process (clk,reset)
 begin
    if(reset='1') then
        TX_READY<='0';
    elsif rising_edge(clk)then
        if(switch = '1')then
            if(char_byte = CARR_RET)then
                TX_READY<='0';
            else
                TX_READY<='1';
            end if;
        end if;
    end if;
 end process;

uart_transmit: process (clk,reset)
 variable bit_count: integer range 0 to 9:=0;
 begin
    if(reset='1') then
        tx_line<=idle;
        bit_count:=0;
        TX_DONE<='0';
        TX_MESSAGE<="0000000000";
        elsif rising_edge(clk)then
            if(switch = '1')then
                TX_MESSAGE(9 downto 0) <= stop_bit &char_byte &start_bit;

                if(TX_READY = '1')then
                 if(bit_count=9)then
                    TX_MESSAGE<="0000000000";
                    TX_DONE<='1';
                    tx_line<=idle;
                    bit_count:=0;
                 else
                    tx_line<=TX_MESSAGE(bit_count);
                    bit_count:= bit_count+1;
                    TX_DONE<='0';
                 end if;
                elsif(TX_READY = '0')then
                 tx_line<=idle;
                end if;
          end if;
        end if;
 end process;
end Behavioral;


texts: Understanding a rotary switch voltage rating

texts:
I am continuing work on designing a vacuum tube tester and curve tracer. I have described part of the challenge in this question: Designing an analog high voltage multiplexer

The component I'm studying at this point is meant to solve the problem of connecting the signals produced by the tester to the pins of the vacuum tube under test. To recap we have 6 signals: plate supply (0-800V/500mA), screen supply (0-800V/100mA), grid supply (-100-+20V/1mA), heater supply (up to 12.6V/2A approx up to 10W), GND, open. These need to be routed to and one of the pins on the tube socket, which in my case go up to 9 pins. For a bunch reasons the intention is to have these signals be oscillating in their range at "easy" audio frequencies, say between a few hundred Hz and maybe 10 kHz.

In the previous question the purpose was to design a little multiplexer board controlled by a microcontroller to switch any of the 6 signals to one pin, and then build 9 of these boards, one per pin. I thought there might be a way to build using solid state devices, but turns out might be impossible to find a suitable part that is low cost enough (although maybe something like Panasonic's AQH3223, a light-controller TRIAC, might be a possible way to go), so the choice is oriented to latching relays to keep power consumption reasonable. Maxim makes a neat little driver MAX4821 that can conveniently be used to drive 4 relays.

However nice, this solution is quite expensive (45 relays are needed, and it looks like this could be about $300 of parts just for the relays), so I was looking into how to achieve a similar result in some other way, and it occurred to me to use 2 pole, 6 way rotary switches (one per pin), such as this one: Lorlin CK1459, which is rated for 250V AC or DC and 350mA.

The purpose of using a 2 pole switch is to use one pole to route the signal, and the other for sensing, so that the microcontroller can make sure the connections are properly configured before sending high voltages through to the sockets.

simulate this circuit – Schematic created using CircuitLab

I am writing because I would like to understand better the voltage and current ratings of these switches. If I understand correctly what I read the current rating is limited by the mating surfaces realizing the contact having a small resistance, heating up due to the current flow and potentially welding the contact shut in place. This makes sense to me, although it seems like it would be a relatively slow process if the rating was exceeded for a brief period of time (I'm guessing a 350mA contact would withstand 500mA just fine if it was for 1ms every 100ms for a total of 3 seconds, because heat would take some time build up on the part and the rest of the metal in the switch would have time to sink the heat away).

I understand much less the voltage rating though: I can see the issue that as the contacts get closer, eventually an arc might form, and that this happens more easily at higher potential differences. But if (as I intend to do) the switch never changes voltage with a high tension applied (because the microcontroller oversees that, and the assumption is that the operator is not malicious to the machine), it seems we're left with a small potential difference on the connected contact (the contact is rated for 20mOhm contact resistance, so at 500mA we're talking 10mV of potential difference), and maybe a larger one between adjacent contacts. Would these be built close enough to one another to create problems here? The datasheet indicates a 'Proof Voltage' of 1500V, I don't know what that means.


texts: Identification of switch type casing type or housing type

texts:
I don't know what or how to identify this switch.

Its dimensions are:

29.5mm by 25 by 21.5 tall. It has a lug for a screw on the side you can't see it is actuated by a pin on a separate housing

Thanks


texts: The circuits of Fig. are ideal, utilize Thevenin's theorem to simplify the circuits and thus find the values of the labeled currents and voltages

texts:
V = 0,7 VI = 198,7 µA, VTH = 6V e RTH = 26,67 kΩ;
How do I do it?


texts: How to wire the mains to a transformer for end user safety?

texts:
Because this can be deadly, and is best left to someone qualified; advice for hobbyist projects on the web are reluctant to offer advice on safely handling mains connections. The get-around is to offer battery, wall wart or power brick based designs.

Perhaps there are already instructions somewhere on the web/in print that avoid liability but manage to advise on how to do this safely.

How to wire up e.g. a mains inlet, fuse, filtering/suppression if any, switch and transformer primary to the mains, done for maximum safety for yourself and for your end users?


texts:
I'm trying to understand the proper biasing procedure of a cascode distributed amplifier part that requires three power supplies. A positive drain-source VDD, a negative gate-source VGG1, and a second, positive gate-source VGG2.

The recommended biasing procedure is for the bottom MESFET VGG1 to be supplied, then the drain-source VDD, and finally the top MESFET VGG2.

I don't know much about amplifier operation, I was tasked to document the proper biasing procedure for parts and determine if there will be an issue. Case in point the VGG2 may be supplied by a linear regulator that's always on while VGG1 and VDD will be controllable. I want to understand what the ramifications of having VGG2 always being on

***EXTRA: I could also use help in trying to model the situation in ADS to have a visual representation of the problem.


texts: Using mosfet with barrel jack shunt pin to shut off regulator

texts:
In the below schematic, I am trying to use the shunt pin (normally connected to ground when a barrel plug is not inserted), to allow the switching regulator, U3 to turn off (pulling the EN pin to ground turns the regulator off).

When the barrel plug is inserted, the gate of the N channel FET, Q3 will go high through the resistor, R13, causing the FET to pull the EN pin to ground.

I tried this schematic with a low gain NPN transistor: http://www.mouser.com/ds/2/308/DTC143E-D-278514.pdf (hFE of 15-30) and I noticed the regulator didn't turn fully off when the barrel was inserted, it was outputting about 0.8 Volts or so. In normal operation the regulator is set to output 5 Volts.

With the N channel FET in the schematic below, would I still have the same issues as I did with the NPN BJT?


texts: What is this kind of symbol meant to be?

texts:
I found this picture in some old labnotes where one wants to determine the vacuum permittivity \$\epsilon_0\$ by using a resonance circuit for a sender and recipient each. However, I don't understand what the connecting line between \$C_d\$ and \$C_z\$ is supposed to be. Can anyone help out here?

Usually open circles are meant to be power supplies or a voltage source, as it is also depicted in the left hand side of the picture. However, this doesn't make sense here...


texts: Measuring switched mode power supply efficiency accurately for high currents

texts:
I hade implemented a switched mode power supply:
* 1.2 kW
* Input: 12 VDC, 100 A
* Output 5 VDC, 240 A

I need to measure it's efficiency (power loss/total power) by accuracy of 1%. In other words: I need to know, if the accuracy is  98.1% or 98.2%.

I would prefer to use oscilloscopes and use them to integrate V(t)*I(t).

What is the most practical way:
* Using shunt resistors? But, it seems, the lowest ones are 50 uOhm and then I need a preamplifier, which increases complexity. Or, if I increase resistance, then the measurement itself impacts the measurement.
* Hall effect sensors (Allegro etc.). But, they do not seem to be geared for accurate measurements?
* Something else.

Thanking in advance for any clues.


texts:
I have OPA355 configured as inverting unity gain. My input signal source is a 10MHz sine wave, with vpeak as 1 V. This opamp is a CMOS based and has very low Ibias current (~pA). With a Gain of 1, the 3dB bandwidth is 450MHz. I expect this to work for a signal of 10MHz. Here is the schematic

Apparently the output is getting clipped (expect the output to swing between 3.5 and 1.5 Volts). Here is the output and input waveform

Could anyone suggest, what's the issue here and how I can fix this?


texts: SIM7600A gives an error when executing commands, but works after executing it again

texts:
I am currently using a WaveShare cellular modem hat for my Raspberry Pi.  The module has an onboard SIM7600A.
I've been reading the documentation and although all the commands work as they are supposed to, some commands fail when I try to execute them for the first time but succeed on a subsequent call.
An example of this would be:
AT+CGPS=1 #Enable GPS
ERROR
AT+CGPS=1
OK

Another example of this happening is when I try to get the GPS lock position (although it happens to most commands usually when attempting to execute them for the first time.)
AT+CGPSINFO #Return GPS fixed position
ERROR
AT+CGPSINFO
+CGPSINFO: ,,,,,,,,
OK

This is my first time working with a cellular modem so I don't know if this behavior is expected, or if something is wrong with my board.
The following steps I tried to do to resolve this issue were increase my BAUD rate from 9600 to 115200. The reason for the change of BAUD was because I read somewhere that it times out when it doesn't receive the carriage return fast enough.
Another step I set AT+CMEE (Report mobile equipment error) to 2 in attempts to return verbose errors to track the issue. It does work when executing commands with purposely incorrect variables such as attempting to insert a wrong SIM pin. But with the errors mentioned above they are just reported as "ERROR".
I've looked all over google and can't find much on the subject so I was hoping someone with expertise can point me in the correct direction.


texts: eliminate noise pickup from shielded enclosure's surface

texts:
I have a test instrument that measure spectral energy density versus frequency. The measurement is extremely low noise. The RF input on the test instrument is an SMA-connector where the inner conductor is for the signal and the outer conductor is electrically connected to earth ground (the 3rd prong in the power outlet; as typical for high-performance scopes and other RF test equipment).

I connect an SMA cable between this input and an SMA bulkhead connector that sits in a penetration panel of a shielded enclosure. The cable's outer conductor is electrically connected to the shielded enclosure, which is a solid (welded) metal box that is only grounded via the shielded cable to the test instrument. On the inside of the shielded enclosure, the SMA bulkhead connects via another SMA cable to a device under test (DUT) that produces a signal for the test instrument to measure.

Using the test instrument, I see a lot of low and high frequency spurious noise on the signal.

If I DISCONNECT the DUT, I see the same spurious noise, which leads me to believe the shielded enclosure (which is roughly a 4 foot cube) is acting like an antenna and picking up electromagnetic fields, which I'm sensing as a small voltage via the outer conductor of the SMA cable connected to the test instrument.

Is there any way to remove or reduce this noise (whose frequency could be anywhere from 1 Hz to 18 GHz)?


texts:
I want to interface 12 VDC rated WS2815B addressable LED strip with a 3.3 VDC microcontroller.

I am having difficulty finding a logic level shifter which translates 3.3 V to 12 V. Data rate is significantly high and hence fast rise and fall times are required. Timings are as below:

How do I tackle this problem?

Two things come to my mind:

1) Maybe there is a part which will do the job and I am not aware of it.

2) I need to implement logic level conversion circuit using basic components. - In this regard, I cam across some circuits as shown below:

However on further reading, I found that these circuits can't achieve the fast rise and fall times required by ws2815b. Is there a better way which can solve my problem?


texts: Do I need to use resistors if I have a step down regulator?

texts: I want to try some LEDs in series. I have a DC-DC step down voltage regulator to give the appropriate voltage to the LED array. Do I have to use resistors or the regulator is stable enough to maintain the right voltage?


texts:
I have a current transformer from this page. I tried to measure the secondary voltage Vs when I apply Vp=230 V and I change the Ip, like this:

But at some point the voltage Vs is not changing anymore (saturated?) How can I calculate this?


texts: Can I use a 250 VAC socket for 120V power?

texts:
I live in canada and I'm trying to build some DIY audio gear.

I'm using a toroid http://www.digikey.com/product-detail/en/VPT30-830/237-1326-ND/2090064 (115, 2x15v)

And this socket to go with it
http://ca.mouser.com/ProductDetail/Schurter/62202100/?qs=sGAEpiMZZMtz8P%2feuiupSXCZijoDTJT7CpNaaNTPFbk%3d

Is this okay? How about the fuse? Do I need to use a 250v 10A fuse?

Any help is appreciated. Thanks

P.S. (residential voltage on canada is 120v)


texts: RS485 UART Rx Receive Event Handler not fired for all Tx Commands sent

texts:
I am using (1)Azure Sphere MT3620 Starter Kit and (2)RS485 CLICK 5V and (3)Geovan Board
Here is the setup (I don't have latest picture, so #2 is swapped to first slot in the MT3620)

My MT3620 is registered all good with Azure IoTHub and pushing all telemetry data to cloud. Now I am trying to sent some HEX commands from MT3620 to Geovan Board via RS485 CLICK 5V
   static void SendUartMessage(int uartFd, const char* dataToSend, size_t totalBytesToSend)
   {
    size_t totalBytesSent = 0;
    //size_t totalBytesToSend = strlen(dataToSend);
    int sendIterations = 0;
    close(r1PinFd);
    r1PinFd = GPIO_OpenAsOutput(MIKROE_PWM, GPIO_OutputMode_PushPull, GPIO_Value_High);
    while (totalBytesSent < totalBytesToSend) {
        sendIterations++;

        // Send as much of the remaining data as possible
        size_t bytesLeftToSend = totalBytesToSend - totalBytesSent;
        const char* remainingMessageToSend = dataToSend + totalBytesSent;
        ssize_t bytesSent = write(uartFd, remainingMessageToSend, bytesLeftToSend);
        if (bytesSent == -1) {
            Log_Debug("ERROR: Could not write to UART: %s (%d).\n", strerror(errno), errno);
            exitCode = ExitCode_SendMessage_Write;
            return;
        }

        totalBytesSent += (size_t)bytesSent;
    }
    int c, d;

    sleep(5);
    close(r1PinFd);
    r1PinFd = GPIO_OpenAsOutput(MIKROE_PWM, GPIO_OutputMode_PushPull, GPIO_Value_Low);
    Log_Debug("Sent %zu bytes over UART in %d calls.\n", totalBytesSent, sendIterations);
}

Response Handler
static void UartEventHandler(EventLoop* el, int fd, EventLoop_IoEvents events, void* context)
{
    const size_t receiveBufferSize = 256;
    uint8_t receiveBuffer[receiveBufferSize + 1]; // allow extra byte for string termination
    ssize_t bytesRead;

    // Read incoming UART data. It is expected behavior that messages may be received in multiple
    // partial chunks.
    bytesRead = read(uartFd, receiveBuffer, receiveBufferSize);
    if (bytesRead == -1) {
        Log_Debug("ERROR: Could not read UART: %s (%d).\n", strerror(errno), errno);
        exitCode = ExitCode_UartEvent_Read;
        return;
    }

    if (bytesRead > 0) {
        receiveBuffer[bytesRead] = 0;
        Log_Debug("UART received %d bytes: '%s'.\n", bytesRead);
        /*time_t rawtime;
        time(&rawtime);
        if (returnDataUart == "") {
            strcat(returnDataUart, asctime(localtime(&rawtime)));
            strcat(returnDataUart, ":");
        }*/
        char  data_hex_str[sizeof(receiveBuffer) / sizeof(receiveBuffer[0])];
        get_hex(receiveBuffer, sizeof(receiveBuffer) / sizeof(receiveBuffer[0]), data_hex_str, sizeof(receiveBuffer) / sizeof(receiveBuffer[0]), 16);
        strcat(returnDataUart, data_hex_str);
        Log_Debug("\s", returnDataUart);
    }

    char* pjsonBuffer = (char*)malloc(JSON_BUFFER_SIZE);
    if (pjsonBuffer == NULL) {
        Log_Debug("ERROR: not enough memory to send telemetry");
    }

    snprintf(pjsonBuffer, JSON_BUFFER_SIZE,
        "{\"gX\":%.2lf, \"gY\":%.2lf, \"gZ\":%.2lf, \"aX\": %.2f, \"aY\": "
        "%.2f, \"aZ\": %.2f, \"pressure\": %.2f, \"light_intensity\": %.2f, "
        "\"altitude\": %.2f, \"temp\": %.2f,  \"rssi\": %d, \"RS485\": %s}",
        acceleration_g.x, acceleration_g.y, acceleration_g.z, angular_rate_dps.x,
        angular_rate_dps.y, angular_rate_dps.z, pressure_kPa, light_sensor, altitude,
        lsm6dso_temperature, network_data.rssi, returnDataUart);

    Log_Debug("\n[Info] Sending telemetry: %s\n", pjsonBuffer);
    SendTelemetry(pjsonBuffer, true);
    free(pjsonBuffer);
}

When I put a breakpoint at UartEventHandler, it almost never hit it.
Can someone help me with the right delays or sequence of code?


texts:
OK, very basic question here.

I read lots of books, searched quite a bit, and every description I read seemed to talk about the flow of electrons and right away go too deep in theory for me to grasp the basic principle of their use.

I understand a resistor limits the "flow", so that an LED doesn't blow up for example. But I fail to understand exactly what a resistor does to current and voltage...

Do resistors affect both current and voltage? In what manner?


texts:
This adapter  is clearly not capable of delivering a null, a power and a ground to the laptop because the connector only has two surfaces. The adapter itself is plastic. So why is it grounded? (Note that this is not specific to this particular brand or model, I see many such adapters.)
I was thinking that maybe on DC side the adapter the ground and the negative is connected but isn't dangerous to connect power to the ground? At another point, say the bathroom you touch a pipe which is connected to the same ground and poof, shock.


texts: Determine the maximum load of a power supply

texts:
I am trying to upcycle an old bit of tech I had lying about. The main part I am looking to recycle is the power supply however I do not have specs of the power supply itself. I have measured an output of about 5.5V with a multimeter but what more can be done to calculate/determine, the maximum load of this component.

Below you will see a photograph of the said PSU, the device actually has dual PSU (presumably for redundancy as the two were wired in parallel).

I have googled any distinguishing marks on the PCB with no avail: this was probably a proprietary board built for this machine.

With regards to components there are your standard capacitors, transformers, fuses and such as well as two components which I have been successful in finding datasheets for: PC123 and 30GWJ2CZ.

I am hoping someone can suggest which components I should look at to determine what the maximum load is or a practical method to test.

In terms of what I would like to achieve I would like to use this to power two raspberry Pis that would fit nicely in the chassis of this device. I am fairly certain there is enough power but I would like to determine more about this PSU before hooking it up and possibly look into ways of protecting the Pis from over voltage/current.


texts: Why is the USART receiver pin configured as "input floating"?

texts:
Reading through this good tutorial  on setting up the USART on an STM32, the Bus Setup paragraph says that the receiver pin (Rx) should be set as input floating.

I would have thought that because the receiver pin's function is to act as a USART receiver, it should be configured as Alternate Function USART.

Why is the receiver pin (Rx) configured as input floating rather than Alternate Function USART?


texts: Solar charging using or not using a dummy (dump) load

texts:
I'm in the process of designing a small solar regulator / charger (no more than 5A) for sealed lead acid batteries.  I have put a working prototype together and all seems to be working.

However, after Googling solar charger circuit diagrams, I have found that a lot of chargers seem to short the solar output to ground via a dummy load resistor using a FET or transistor rather than just just disconnecting the solar panels using a FET or transistor.

In my prototype controller I am just disconnecting the positive of the panel using a P channel FET and it seems to be working fine.

From Googling and searching this forum extensively, I can't seem to find any reasons why one should short the solar panels to ground using a dummy load rather than just disconnecting the positive of the panels.

I am using an AVR micro controller to control the charge process using PWM. However, a lot of the circuits I saw using a dummy load used an analog method instead of a PWM micro controller. Is using an analog method maybe a reason that one needs to use a dummy load to stop charging but with a PWM method disconnecting the charge input is fine?

I cant seem to find any reason why one must use a dummy load to stop charging from the panels... It seems it won't damage the panel being disconnected or anything like that.  Also, in my thinking I would say there would be more strain and possible damage on the system (FET and dummy resistor) if the output of the panel is shorted while not charging vs just being disconnected.

Does anyone have any feedback on what method I should use (dummy load or disconnect) in this controller I'm working on, and why?


texts: How does the resolution of a stepper motor affect its performance?

texts:
I'm looking at purchasing some stepper motors for a project of mine.

I found two which seem to be the same, except one has a 1.8 degree step and the other has a 0.9 degree step.

Now the application I want to add them to is a screw rod, not a belt-drive. I already have a fair amount of gear ratio in my favor. I really do not need such a low resolution, but that led me to think how does the resolution effect the performance of the motor in regards to:

Torque,
Speed,
Acceleration

Links:

https://www.robotics.org.za/datasheet/42BYGHM809.PDF (0.9)
https://www.robotics.org.za/datasheet/MR42BYGHW804_datasheet.pdf (1.8)


texts: The probe and Oscilloscope selections for measurement

texts:
*I searched about the correct oscilloscope and probe to measure the a signal with a certain frequency. I read some documents and white papers about this topic. I have heard some "rule of thumbs" about the measurements : You should use scope and probe with a BandWidth of at least 5 times the Bandwidth of the signal to be measured. i.e : If I want to measure a signal of 200MHz differential DDR3 clock line, I need a Scope + Probe at least 1GHz BandWidth.
OR, Rise Time / Fall-Time duration of 200MHz clock signal is much more important parameter than frequency of signal for correct Scope + probe selection?

*Another one is measurement options of Scope. If I try to measure above 200MHz, 50 ohm differential Clock lines from the input pin of DDR3; Which coupling should I select in the Oscilloscope? AC or DC? And how much termination should I select in the oscilloscope? 50 ohm or 1 Megaohm ? And why?

Thank you,


texts:
i built a vibrobot pictured above.
i now want to connect a led to the working system.
sadly when i connect the led in parallel, it will not work.

power source is a CR2032 3V coin cell. motor is small pager dc motor.
im trying to keep number of components at a minimum


texts: Early Effect, Ebers-Moll, Common Emitter Resistance, reverse alpha/beta and saturation current

texts:
Ive been reading Sedra/Smith's Micro Electronic Circuits book, and it has a lot of info which I like, however I dont know how much of it is actually practial and useful, for instance it talks about Ebers-Moll equations and models, which I know are useful to understand how transistors work and how the practical equations are derived, but then it talks about stuff like Early voltage and dynamic resistance using Early equations, reverse alpha and beta coefficients, saturation current, etc... and while im solving the drill excercises I wonder if im not just wasting my time on this.

I cant seem to find anything on a transistor datasheet that remotely points to stuff like an Early Voltage parameter, or saturation current, or reverse alpha and similar parameters.

Ive also been reading Boylestad/Nashelsky book which is also great and more practical per se, but it doesnt even mention half of the things present in Sedra/Smith's book, which is why I wanted to go deeper with hopes that it would give me better electronics foundations, which is why im reading Sedra/Smith's book, but even if I understand most of the content of the latter, I fail to see the practical application of most of it...

So, my question is, how useful is to know and learn all these complex stuff? will it improve my design knowledge knowing things like how the doping on the semiconductor, combined with the electron and hole diffusion coefficient and the width of the base interact with the saturation current in the exponential model?

Do people actually use the long Ebers-Moll equations or Early Voltage in real circuit design?

Or do most people just use the simplified and practical equations and leave the other stuff to the phsycisists ?


texts: USB transceiver helps me to update firmware program to microcontroller via USB interface?

texts: I am doing one hobby project, using STM32F103R8T6 Micro controller for my project, I would like to use USB transceiver for this micro controller,  does this helps me to update my firmware program through USB interface or do I need to have separate programmer for uploading firmware to microcontroller.


texts: Should I get a reading across the discounted two terminals of buzzer (AT3840)

texts: The buzzer is in a pest deterrent, the red light comes on but its totally ignored by passing cats. The sound frequency is not heard by humans so the only thing I can find suspect is the buzzer because it has no resistance across its terminals. I would be very grateful for your guidance, Thanks R Cook.


texts: long lasting wiring of many ds18b20 sensors

texts:
I'm laying down a number of temp sensors to the air exchange machine with heat pump. Temps there wary from -35 to +70 celsius. I may like to change/relayout components in the machine, therefore need some degree of flexibility to the layout and therefore decided to use connectors.

My choice is ended at Molex SL gold plated terminals. And wiring scheme to be daisy chain, as shown at the attached figure.

I'd like to ask advice/confirm my thinking about these two matters:

I was thinking to use 2 conductor + braid for the cable. Having braid to be used as ground. Is that right choice? Some time ago I met somewhere a recommendation to use ground + signal conductors in a twisted pair. Would it mean that vcc would go to the braid in my case? Or, should I get a twisted triple + braid? (then I'd need to get 4pin housings for the terminals?). Or, should I care about it at all because total length of all cables will be below 30 meters?
Is it OK to get tin plated wires to crimp with https://www.molex.com/molex/products/datasheet.jsp?part=active/0016020097_CRIMP_TERMINALS.xml&channel=Products&Lang=en-US#partdetail  Googling this did not bring me any concrete answer besides that tin + gold is a bad combination and will corrode even quicker than tin-to-tin connectors.

Like a mentioned, I'd like this to last for years. Therefore paying attention to this details. Though, due to being novice in electronics may be choosing expensive & inefficient solutions.


texts: Relays with NC and NO connections: does high vs low matter?

texts:
Is there any difference between:

An active low relay with the load wired to the NC (normally closed) connector, and
An active high relay with the load wired to the NO (normally open) connector?

In either case, when the control signal is low, the relay will be open and the circuit will be incomplete.  When the control signal goes high, the relay will close the circuit.

I ask because I've come across a number of situations in which people build a logic inverter to get active-high behavior from their active-low relay (which seems to be the most common type, at least for the N-channel relay boards commonly available online).

If you have both NO and NC connections, is the logic inverter necessary?


texts:
I have on a few occasions calculated the MTBF using the FITS of all the components on a BOM and something like the telcordia standard in some spreadsheet tool I was given.  We get a number say 1 Million hours, and everyone nods approvingly because 1 Million is a very big number.

I have trouble understanding the practical use of this number though.  Doing some reading I understand this is supposed to be the average time between failures, but does not mean 1 unit will run for 1 million hours.  If however I had 1 Million units I think it means I should expect a failure once an hour?

Can I then extrapolate that and say if I ran my 1 million units for a year or 8760 hours I should expect 8760 failures?   Would it then make sense to say that's a 0.9% failure rate?

The final thing I don't quite get is MTTF vs MTBF.  I understand that MTTF is when the unit can't or won't be repaired, but I don't really understand the difference.  For electronic designs at least no one has ever wanted to talk about MTTF even though most of my products are throw away if they break.


texts: What is the difference between cascode amplifier configuration and cascade amplifier configuration?


texts:
I'm fairly new to electronics here. But I can't seem to find any clear answer anywhere on the internet.

Are wires special depending on their color? Or they have all the same purpose with just colors to define them so people won't get confused? Say I wanted to reverse the black and red wires on a LED strip connected to a battery, would it still function properly or not?

Just been curious about it lately..


texts:
I want to edit Eagle's PCB con-amp 1-794681-8 connector part in way its pads will show only numbered in PCB Design Window, which means without its values, as is my current situation:

The problem is my net names (pads 3-17) are long strings:

3 - INPUT1_SELECT
5 - INPUT2_SELECT
7 - INPUT3_SELECT
9 - INPUT4_SELECT
11 - INPUT5_SELECT
13 - INPUT6_SELECT
15 - INPUT7_SELECT
17 - INPUT8_SELECT

and the PCB itself gets unreadable in some way. How do I achieve such task (removing values from pads) or are there any workarounds without deletion of pads values?


texts: Simple 300-400VDC/100A power supply for EV charging from 400V 3-phase/32A

texts: I would like to purchase or build a simple AC-DC power supply, with 400V/32A 3-phase input, and DC output adjustable (by a microcontroller which I would add) between 300-400VDC and upto 100A (not exceeding 22kW total). The purpose would be to charge an electric vehicle via the fast charge port (CCS or ChaDeMo), which provides direct DC access to the vehicle's battery (usually around 350VDC and 15-70kWh depending on car type). Such power supplies are really expensive (I haven't found any under 5000$) and I have a hard time understanding exactly why they are so expensive. It doesn't need to be isolated, since all parts are extremely well protected from touching. The output voltage is pretty close to the input voltage, and never higher, so shouldn't a rather simple PWM regulation be enough, no transformers, no big voltage differences? (I know such a power supply is not enough to charge an EV, the microcontroller part needs to communicate with the car via CAN (ChaDeMo) or Powerline (CCS), and multiple safety circuits must be implemented, but I already know how to do that, what's missing is the power supply part).


texts: Reading very low capacitances with Arduino

texts:
I'm trying to measure the capacitance of a very low capacitance sensor (two parallel plates across a block of foam). This is a self-produced force sensor; I'm trying to eventually use some of the work presented here. I'm estimating that the capacitance should be in the neighborhood of 90 pF.

I started with the CapacitanceMeter tutorial from the Arduino web site. I modified it to use micros() instead of millis() and output pF instead of nF. I also swapped in a 10 megohm resistor in place of the 10K ohm one, and updated the code. However, I'm getting readings that swing by over 50 pF.

How can I improve the accuracy of the setup?

Thanks!


texts:
Was trying to test the voltage of my car battery but accidently had the multimeter set up for Amps (was using it for an old project and forgot to switch cables/turn the dial).

Turned my multimeter on. Connected the terminal to my car battery to test for a flat and while holding the multimeter probes thought i felt something travel through my fingers. No pain or anything. Just a very odd sensation.

It's a 12V battery. I know (from the sparks and 30 seconds on google) they pack a LOT of current but surely there isn't enough voltage to shock me through the (a) plastic handles of the multimeter, and (b) my skin.

So what did I feel? The multimeter is only rated for 10A. Any chance it could have 'failed dangerously' when I accidently overloaded it? Or was the sensation in the probes just the sudden surge of current inducing some sort of force in the wire?

Thanks for you help. Panicking a bit.