texts: rs232 signal on the scope doesn't add up

texts:
I programmed a pic18f4685 to use the onboard UART to send out an Ascii(48)- FYI that's a zero - endlessly.  19200baud 8-N-1  Using a NorthMicro NM101 proto board.

void    TX_UART(void)
{
unsigned char phrase[]="Press 0 to Exit\0";
unsigned char TX_Value;
lcd_clear();
lcd_goto(0x40);
lcd_puts(phrase);
lcd_goto(0x00);

//  Initialize SPBRGH:SPBRG for 19200 baud  BRGH =1 BRG16=0
SPBRGH  = 0;
SPBRG   = 64;
TXSTAbits.BRGH  = 1;
BAUDCONbits.BRG16   = 0;
TXSTAbits.SYNC  = 0;
RCSTAbits.SPEN  = 1;
TXSTAbits.TXEN = 1;

while(KEYBOARD()!='0')
    {
      while(!TXSTAbits.TRMT)
      {}
        TXREG='0';
      while(!TXSTAbits.TRMT)
      {}
        TXREG='0';
      while(!TXSTAbits.TRMT)
      {}
        TXREG='0';
    }

lcd_clear();
}

I've sampled pre-max232 chip off pin RC6 so it hasn't been inverted yet and is only at about .5 Vp-p.

According to internet sources I should be seeing a Start bit / LSB to MSB / Stop bit.

Base on that info I figured I should be seeing on the scope for Ascii(48) a signal like this: 1000011001 but I seem to have an extra bit(s).  What am I missing? [Each 2 bits/Div]

When the signal is received by PuTTY it comes through fine-no glitches.  I just want to understand why I'm seeing what I have and not what I expected.


texts: Yet Another question on using GPIO to short a remote push button

texts:
OK, I bought this little remote-controlled Ac outlet thing for $1.  It controls 3 outlets via RF.  I didn't realize it was RF at first, but I currently have my BeagleBone Black doing a bunch of home automation stuff on my network anyway, and figure I can wire in the remote into the BBB via a couple transistors and be on my way.

I can't read the chip in the remote, it's blank.  Supply is a 3V coin cell battery, but I figure I can run it from the 3.3V supply of the BeagleBone (maybe with a resistor to drop the voltage?  Or should it be okay at 3.3V?
 I'm thinking it should be okay at 3.3V).  There are 6 buttons, 3 for on, 3 for off. There are two positive rails, one for all the on buttons, one for the offs.  Each of these rails connects to a different pin.  The buttons connect the positive rail to different pins.

For schematic see @Transistor 's post below.

Some of this is a bit sketchy and I purposely omitted what looks like a power supply cap, all the antennae stuff (P1 and P7 I think).  Hopefully, it gives you an idea of what I'm looking at.

So, if I drop a few GP PNP transistors over the ends of each switch, then connect base to different GPIO pins on the BeagleBone, then dropping the GPIO pin low should make the transistor conduct, right?  The GPIO pins on the BBB are also 3.3V and current in minimal, so what sort of resistors am I looking at to avoid frying stuff?

I'm a software guy, not a hardware guy.  Any and all help is greatly appreciated!!

Edit: Working now and Google Assistant can now control the AC outlets I bought (3 for $1).  I have a purple livingroom light and a big fan connected right now.  Not using number 3 (yet).  Software will be made more robust later, but really cool to have it on my phone now


texts: Best approach for PIC programming I need to do

texts:
Many years ago now, I have used general purpose 8 bit PIC, like for example the PIC16F84A, writing their code in assembly, which I really like.

I haven't had the need to do anything related to this ever since, but now I'm aiming to use the PIC16F18323, which, despite its low pin count, has a lot more functionality and complex peripherals than the PIC16F84A... quite a leap there.

Also, most of the tools I used back then like DOS software, serial port programmer, etc., don't suit present day PC.

So I've now bought a PICkit 4 programmer but before make a start with it I need to make 2 choices for which I would appreciate your views:

Assembly or C? Purely from a language perspective, I like both, and I have relevant experience with both. For simple things I favour assembly because it reflects the hardware best, saving you from thinking about an abstraction layer, how a particular piece of C code will actually and up executing (including clock cycle count), etc. For more complex things, I favour C because it's more readable, hence easier to maintain and less bug prone. So, for the level of complexity offered by this particular MCU, which would you use?
What development software? Back in the day it was all 3rd party unofficial... Anyway, I read a little about MPLAB 8 vs. X and finally downloaded and installed MPLAB X IDE for Windows. The first thing that caught my attention is it uses something like 12 Gb hard disk, WTF??? I used to develop for this PIC16F84A using a text editor + simulator + programmer, all of which DOS stand alone apps you could fit in a floppy disk, literally!! And now the sensible, convenient way to burn some bytes inside a PIC16C84 is to install a 12 Gb suite?? Not that I mind or care from a hard disk use perspective, but I'm frightened about the amount of (unnecessary) complexity this may come with and I will likely need to face.

Thanks in advance for sharing your insight :-)


texts: Are "wider" battery packs less at risk for polarity reversal?

texts:
If make a 5V battery pack as a series of four 1.2V NiMH batteries, there is some risk of polarity reversal when the pack is discharged too much.  I doubt this risk is reduced by plugging such packs in series.

What if I wire up the eight batteries from two such packs as a single pack with connecters between the cells that lie at the same potential within the pack?  A priori, I'd expect this provides some protection against polarity reversal by averaging the characteristics of the two cells that stay at each potential.  Is this true?

Are there any issues with charging such a "wide" pack arrangement?  Are there any advantages to building in the connectors to access the intermediate potentials, like LiPo batteries require?

As an aside, are high draw 10 amp-hour NiMH D cells at more or less risk of polarity reversal?  Obviously, the financial risk in destroying a cell is higher.


texts:
I'm trying to design a wide band RF receiver(say 5MHz to 5GHz).

The antenna:

How long would the antenna have to be to pick up this range?
I read that the antenna width would have to be at least as long as the half wavelength so would I have to use a 30m antenna to receive a 5MHz signal?
Would I be able to pick up a 5GHz Signal with that same 30m antenna?
And to pick up the signal the circuit would have to have a resonant frequency equal to that of the RF signal?

Are there any good resources out there I should look at?


texts:
simulate this circuit – Schematic created using CircuitLab

I'm replicating a circuit found on evilmadscientist.com: the "detecting darkness" http://www.evilmadscientist.com/2008/simple-solar-circuits/

Here is my diagram: http://imgur.com/gallery/q1g62z6/new

the goal is to charge a 9v batt during the day and then at night (when PV is not producing) use a PNP transistor to open the gate and allow the battery to illuminate a bank of 6 LED ( 3sets of 2 ).
the batt-> LED portion does work the PV does produce a current (will illuminate an LED in dim sunlight)

When constructed, the LEDs are always on regardless (as far as I can tell) of the PVs exposure to sun.

I know this isn't so much information, but if someone could help me pin down the problem that would be very helpful.
I sized the components myself so those should be considered suspect.

specs:

resistor preceding 2 LED = 100 ohm 5%
resistor between PV and transistor = 1.5K ohm 5%
diode after PV before batt = 100V 5A small signal Schottky diode
transistor between batt - PV - LED = 2N3906
9V rechargeable batt


texts: Op Amp Oscillation BPW34 Radiation detection

texts:
I have build the following circuit on a stripboard

Now the problem is, even if I do not have the BPW34 diode attached my output shows a nice sqaure wave as you can see here

But I have no idea where to start how to analyze where this comes from or why this happens. So I am very grateful for any ideas how to approach this problem. One addiational thing: I did not use the 330k Resisitors instead I used 300k resistors. Edit: The transistor is a BF245B.

Here you can see my stripboard.

This blue thing in the upper picture is a capacitor which is not connected. And remember: The BPW diode is missing but when it is soldered on the board and made lightproof it also starts oscillating with the same frequency and amplitude.


texts: How do I calculate power requirements for a bunch of DC and Steppers?

texts: Where do I even get started? I'm so confused because all these articles are complicated for someone with no experience. Is there some sort of general rule you guys use for calculating power requirements?


texts: When is proper to use <= or = assigments in Verilog

texts:
I have not clear at all this part of Verilog when using <= or when =

I have some always blocks that make some adds, subtracts and multiplies an example is like this:

    module Calcs
    #
    (
        parameter RC = 24'h0186DA,
                  RV = 24'h018666
    )
    (
        input clk,    // Clock
        //SOME INPUT VALUES FOR VAL1 VAL2 VAL.....

        output reg go
    );

    reg [63:0] val1;
    reg [63:0] val2;

    reg [63:0] val3;
    reg [63:0] val4;

    reg [63:0] ValSelected;

    reg [127:0] Mult1;
    reg [127:0] Mult2;

    reg [128:0] Subs;

    reg [128:0] Mult3;

    reg isNeg;

    reg go1;

    reg [63:0] LastVal1;
    reg [63:0] LastVal2;
    reg [63:0] LastValSelected;

    always @ (posedge clk) begin

         Is_Valid  = (val1 != 0) && (val2 !=0);

        if (val4 >=  val3) ValSelected = val3;
        else if (val4 < val3) ValSelected = val4;

        if (Is_Valid) begin
            Mult1      = val2 * RV;
            Mult2      = val1 * RC;
            Subs       = Mult2 - Mult1;
            isNeg      = Subs < 0;
            if (!isNeg) Mult3 = ValSelected * Subs;
            else Mult3 = 0;
            if (Mult3 > 1) begin
                if (((val1 != LastVal1) || (val2 != LastVal2))  || (ValSelected != LastValSelected)) go1 <= 1'b1;
                else if(((val1 == LastVal1) || (val2 == LastVal2))  || (ValSelected == LastValSelected)) go1 <= 1'b0;
            end
        end
    end

    always @ (posedge clk) begin
        if (go1) begin
            LastVal1 = val1;
            LastVal2 = val2;
            LastValSelected = ValSelected;
            go <= 1'b1;
        end
        else go <= 1'b0;
    end
endmodule

There is some strange behavior when I use <= to set the value to go1 this is never executed and if I change this for = this execute always and if the if is fulfilled go1 it never comes back to 0

can someone help me to understand this?

sorry if the code has some issues there is just an example

Many Thanks!


texts: Interfacing WS2812B addressable LED to Wemos D1 mini

texts:
I want to connect a single WS2812B LED to Wemos D1 mini ESP. Here is Maximum ratings and Electrical Characteristics.

Now the  voltage input High (VIH) of ESP is 3.3 V max which is less than (VIH)min=0.7 VDD which equals 3.5V.
1- Is this connection reliable for production without using a level converter?
2- Also What if I connect VDD to 3.3V of Wemos instead of 5V?
Thanks in advance


texts:
I can't figure out why drain voltage is rectangular in the following circuit:

I tried this:

$$
V_{ds}=V_{DD}-I_{fund}R_lsin(\omega_0t)-I^{(2)}Z_{in}^{(2)}sin(2\omega_0t)-I^{(3)}Z_{in}^{(3)}sin(3\omega_0t)...
$$
$$
I^{(k)}= \int i_{d}sin(k\omega_0t)dt
$$
$$
Z_{in}^{(2k)}=0\\Z_{in}^{(2k+1)}=\infty\rightarrow I^{(2k+1)}=0
$$
$$
\rightarrow V_{ds}=V_{DD}-R_lI_{fund}sin(\omega_0t)
$$
So the output I get is sinusoid but the reference I studied states it is rectangular. Would anyone please help me with this?

Edit: The transistor is assumed to act as switch.


texts: How do you verify lower cutoff frequency from a voltage vs. time graph?

texts:
I am working on a laboratory assignment. I am asked to verify the lower cutoff frequency (F1) value that I calculated (~4950 HZ) using a graph.

The lab specifically asks:
"Reduce the input frequency to calculate f1. Use your calculated value as reference, but also explain what condition you must look for in your graph to verify that this is in fact your correct f1 value. Paste a screenshot of your graph, explain how you get f1."

I am kind of at a loss for what condition I am supposed to be looking for. If this was a Imax vs. frequency graph, I would know what to look for. But I'm not so sure with voltage vs. time.


texts: What is the sign convention for generated power?

texts:
Generally speaking, generated power is denoted as negative, correct? If I understand correctly, this is just the convention.

Conceptually, I think of it kind of like a force, it has a magnitude and direction. In this case, the direction is either positive or negative, effectively.

If that is correct, is it necessary to write that a source generates -15 W (for example)? It seems redundant. I wouldn't write that a force is -10 N up, that just doesn't make sense. I would write that it is 10 N down. So similarly, isn't it sufficient to say that there are 15 W generated, or 15 W absorbed?

The reason that I ask is that I was doing a homework assignment and I was doing a power check on a simple circuit. When it came down to it, I had "15 Watts generated with 15 Watts absorbed, so the power check is satisfied." My professor marked me wrong, because I supposedly needed "-15 Watts generated." Is he correct in doing this? (I specifically talked to him, all my work was correct, it was just the sign.)

If he is wrong, what source can I use to show him why it's not supposed to be that way? I don't think my opinion will persuade him, I need something more substantial.


texts: Ceramic capacitor in High voltage DC link

texts:
In motor drive application the high voltage dc link between the rectifier and the inverter usually have:

a bank of aluminium electrolytic capacitor
a film capacitor near the inverter

Is there a reason for using a film capacitor on the high voltage dc link instead of a ceramic capacitor?

Are ceramic capacitor suitable for this application in terms of performance? I have seen that nowadays smd high voltage ceramic capacitor are available at low price.


texts:
Hy i would like to play around with PCIe.
My Goals are:

Implement a read and write able BAR.
Implement a DMA that copies data from my Device to the PCs Memory.

I am beginer Level at FPGAs I have a working embeded system with some Sample Code that "runs" on a Virtex 5 XC5VLX20T. (Just smashed to gether some Example Code till it seemed to work.)
I wondered if it is possible to implement this on a ZYNQ XC7Z010-1CLG400C to.
So my main Question is what do i need to look for when selecting an FPGA using it for PCIe?


texts: How can I route a single complicated side PCB design ? Specially on Easyeda?

texts:
N.B:
I'm still a 14 years old boy that is just a beginner in electrical engineering.
I started a project with my Dad which was a "matrix clock." We used 3 red LED matrixes which are driven by several 74HC595N shift registers.
We made the code, uploaded it to a micro-controller, tested it on a bread board and it works sucssesfuly.
When we started designing the single sided PCB we decided that we would just do a module of three LED matrixes aligned together connected to shift registers, so that we can use it as a screen for any thing, not just for the clock.
We used Easyeda as it is the most famous online schematic & PCB designer.
I made a schematic and converted it into a PCB, layed out the parts properly (as I think) and started auto-routing (as it is very hard for me to route each connection manually.)
Remember that: I am using single sided PCB.
Every time the auto-router fails to route, even when we changed the layout of the elements.
At this point we got stuck, and we don't know what to do.
Does anyone have any suggestions?
Edit in Question : If there is any components required like jumpers, sockets, wires, etc. it will be nice to tell me how to use them.
This is my schematic.
Very bad. I'm sorry, still learning.

Edit in question : This is another schematic I did today, no difference in connection but the difference in arrangement, color and in the data header (I hope you understand me more clearly via this image):

This is one of my PCB layouts:

If there are any suggestions please tell me.
Links :
N.B:
Sorry again if the homepage isn't properly setup because I don't know yet how to use Easyeda.
Here arecsome project links on the website so that you can access the PCB & the schematics and see them lively:
Links : (Edited due to some changes)

Home Page


texts: Regarding Microchip XC8 compiler's registers and bits definitions

texts:
I'm going to take a random 8-bit Microchip microcontroller: PIC16F887.

Let's have a look at how the XC8 compiler (and the HI-TECH PICC, for that matter) is defining a register (SFR) and its coresponding bits in the header file of the device (/opt/microchip/xc8/v1.31/include/pic16f887.h):

extern volatile unsigned char           PORTB               @ 0x006;

So PORTB SFR is defined as an 8-bit volatile variable with the absolute address 0x006, as per the datasheet.

I'm having problems understanding the definition of a single bit (bit 1, for example) corresponding to PORTB:

extern volatile __bit                   RB1                 @ (((unsigned) &PORTB)*8) + 1;

Why do they multiply the PORTB address by 8?

EDIT:

I also looked for an explanation in the compiler's manual and found pretty much the same answers that Spehro gave me. I should have consulted the manual before asking here:

  When defining absolute bit variables (see Section 5.4.2.1 “Bit Data
  Types and Variables”), the address specified must be a bit address.
  A bit address is obtained by mul- tiplying the desired byte address by
  8, then adding the bit offset within that bit.

  So, for example, to
  place a bit variable called mode at bit position #2 at byte address
  0x50, use the following: bit mode @ 0x282; If you wish to place a bit
  variable over an existing object (typically this will be an SFR
  variable or another absolute variable) then you can use the symbol of
  that object, as in the following example which places flag at bit
  position #3 in the char variable MOT_STATUS:

  bit flag @ ((unsigned) &MOT_STATUS)*8 + 3;


texts:
If you've got a 4-20mA transducer, powered by 14V, and you want to measure it, your analog front end might look something like this:

simulate this circuit – Schematic created using CircuitLab
... but now my thinking shifts toward failure mode considerations. My ADC has an absolute maximum rating that dictates that it's inputs must not be greater than 3.6V and must not be less than -0.3V.
What circuit do you usually put on the positive input to your ADC to make sure that it never sees more than 3.3V if the transducer fails to limit current to 20mA or if R1 doubles in resistance for some reason (or whatever). Is this input protection circuit a good idea (BAT42 Schottky diodes in a crowbar configuration) and a current limiting resistor:

simulate this circuit


texts: Electrical Generator Windings - Is there an "ideal" way to wind?

texts:
I've got a question that's been bugging me for a while. Is there a "best" way to position a magnet and wire coil inside a generator? I saw a "how-to" on how to build a wind power plant and they had the windings laying down on a flat plane, positioned around a center point. From the center point of the plane a shaft poked out perpendicular to it and some arms reached out off the shaft that had magnets that passed really close to each coil. An alternative way would be to attach the magnets directly to the shaft and wrap the coil around the magnet+shaft combo.

Would one way be better than the other?


texts:
I'm working on a dual headphone amplifier.  I've discovered that it has a pretty bad turn-on transient that results in a loud pop if headphones are plugged into the amplifier when it is turned on.  The split positive and negative rails rise very quickly at slightly different times due to the mechanical action of the DPDT latching switch, S1.

What is the best way to handle this?  I figure something that could get V+ and V- to ramp up slowly and evenly at turn-on would solve the problem.  Is there an elegant way to accomplish this?

Here is the schematic.  BT1 and BT2 are 9V batteries.

original circuit link here


texts: Does the negative terminal of a battery have a higher concentration of electrons?

texts:
I'm 15 and recently started electronics and I just had a question about batteries.
According to a video I watched by "The Engineering Mindset", a battery creates potential difference by accumulating more electrons on the negative plate. Therefore the more electrons that accumulate on the negative plate, the higher the battery voltage.
Could someone tell me if this is correct please?
( Sorry if I'm being stupid and theres a simple answer :) )


texts: Help needed with soldering SPI flash (MX25L8006E)

texts:
Ok so I want to first remove a SPI flash (MX25L8006E) from the pcb and then after modifying its content using Arduino put it back on.

How to do this safe? First on I only have a soldiering iron (30W) (of-course I also have tinol and rosin flux).

I watched this video but I'm not sure if it's safe judging by the comments.

What I'm worrying about is that the temperature range specified on the site for the chip is -40℃ to +85℃ but I've looked up the soldering temperature is way higher (315C). And I don't want to brake the chip.

Any advice?

Foot note : I'm a total noob at soldering. My only experience with it was making my old PS2 unusable by trying to install some hack-chip on it. So sorry if the question is stupid for you.


texts: do I need overvoltage protection with 4.8V NI-MH pack?

texts:
I plan to run an avr like attiny + led strip with 5V supply.
The whole thing can draw up to 15A at 5V.
To avoid heating problem stepdown and other regulator problem, I've choosen a pack of 4 * 1.2V NiMH battery wich can discharge up to 10C.

The problem is that NiMh after a full charge can be at 1.4V instead of 1.2v. So I will have 5.6V in my system wich is very near the limit for working without problems (reading datasheets).

Do you think I should use a protection for overvoltage pic?
which one could fit as I need to pass 15A through it.

thx


texts: current sink/source in ADS114S06B analog/digital converter

texts:
Here is the datasheet.

It seems from the graphs on page 17 that the I/O pins will sink or source as much as 7.5 mA:

However on page 9 the table indicates an expected sourcing of 1 mA (I say expected because this are their test conditions) and a maximum sinking of 1 uA:

How do I establish a sourced / sunk current for my power source calculation ?


texts:
I am struggling to get multiple read from the RHR register working on my SC16IS750 breakout board. I am using the board with I2C standard frequency, normal single reads and write are working fine.
The chip has a FiFo which can hold up to 64 characters. The Fig 24 in the Chip Manual (http://www.nxp.com/documents/data_sheet/SC16IS740_750_760.pdf) shows how multiple read should work. However when initiating such a multiple read only the first character is correctly transfered. All other characters are "0". If eg the FiFO held 16 characters before the transfer it will be empty afterwards.  It seems that the chip recognize a multiple read but does not transfer the value on the bus.
Here what I do when receiving a FiFO Interrupt
from the Chip:
- Read interrupt status register IIR
- Read Line Status register LSR
- Read RX Level register RXLVL - ie number of Charcaters in Fifo
- Read Multiple data:

  I2C start,
  slave address+write,
  register address,
  repeated start,
  slave address+read,
  RXLVL-1 time do (read character, ACK)
  on last character (read, NACK)

I'll send a test pattern to the chip with 16 characters, only the first character is correct the rest are "0". RXLVL shows 16 before read. Does anybody know what needs to be setup/considered for this operation with the NXP chip?

Addtions:
a) I read the following contents out of the registers before I2C read:
lsr 0x61 ier 0x01 iir 0xCC rxlvl 0x18
b)The init code of the chip is:

{SC16IS750_REG_IER,0},// no IRQ
{SC16IS750_REG_FCR,0x06}, //  reset TXFIFO, reset RXFIFO, non FIFO mode
{SC16IS750_REG_LCR,0x80},  // program baudrate
{SC16IS750_REG_DLL,0x80},  // 2400
{SC16IS750_REG_DLH,0x01},
{SC16IS750_REG_LCR,0x03},  // 8 data bit, 1 stop bit, no parity
{SC16IS750_REG_FCR,0x81}, //  enable FIFO mode, RX trigger level 56 char,expect timeout intr
{SC16IS750_REG_IER,0x01}, // Receive Holding Register interrupt only

c) For SCL and SDA I am using 10k pullups
d) Here a picture of SCL (2) and SDA (1); I slowed down the speed to approx >5us for the clock

some more additions:
I do have read the technical notes from NXP on this issue. However I continued trying to get multiple read working without success:
Here the latest init sequence - I added some delay (100usec) between writing the registers:

    unsigned char  sc16is750_reg_init[][2] = {
        {SC16IS750_REG_LCR,0x80},  // program baudrate
        {SC16IS750_REG_DLL,0x80},  // 2400
        {SC16IS750_REG_DLH,0x01},
        {SC16IS750_REG_LCR,0xBF},  // access EFR register
        {SC16IS750_REG_EFR,0x10}, // enable enhanced registers
        {SC16IS750_REG_LCR,0x03},  // 8 data bit, 1 stop bit, no parity
        {SC16IS750_REG_MCR,0x04},  // enable TLR and TCR
        {SC16IS750_REG_TLR,0x60},  //set TLR 24 char RX
        {SC16IS750_REG_FCR,0x06}, //  reset TXFIFO, reset RXFIFO
        {SC16IS750_REG_FCR,0x01}, //  enable FIFO mode
        {SC16IS750_REG_IER,0x01}, // receive line status IRQ only
        {0xff,0xff}
    };

Actually I want an interrupt to be generated if Fifo conatins 24 char. This is why I setup TLR register. This works fine. This means that setting up the register do work. The sequence is in line with the NXP technical note. I'll read the following content out of the registers in ther interrupt service routine:

iir 0xC4 lsr 0x61 rxlvl 24

So 0xC4 means Fifo level interrupt, no overflow. When I do a multiple reads I'll get:

010000000000000000000000000000000000000000000000

If I used the same function but read single characters only I'll get:

010231353A333520536F2030332E30392E323031370000B1

The other interessting point to mention is - I'll can do a multiple write.


texts: I'm reading a page on multiplexers that has the following image. I says for constructing one it used 7 not gate. But looking at the image I don't know why three of them are needed. Could't you just cut down on the number of them by making a connection such as what I've done in red bellow? Is there something else I'm missing here?


texts:
Recently I saw a PCB that it was all Ground and other Nets were Routed inside that. I found out that in order to do that (In DXP software) you have to do as following:

But the question is what is the reason of doing that?

Is that recommended to do it for all kind of circuits at all? Is that possible to make it all VCC? what would be the differences?


texts:
I am looking for a wireless ADC data logger system. The idea is to be able to connect to a test sensor and save output data on a pc. Ideally the system would have:

Range of at least 10 meters
Be battery powered
12 bits resolution minimum
2 Channel minimum, 8 preferred.
2kHz sample rate min
Handle 0-5V inputs
Save in some common format (text file, csv etc.)
Connect to a PC either with some wireless protocol

The closest I have found is something like this:
https://store.ncd.io/product/iot-long-range-wireless-analog-digital-converter/


texts: Soldering ACN/ACL (blue/brown) wires to outlet plug?

texts:
I have a 12v 5.0a AC to DC power converter. I want to solder the ACN(blue) and ACL(brown) wires to an outlet plug I cut that has copper wire (black and white).

I hope I am on the right path here. If I am how do I know which ends to solder together?

I see in this diagram that Black/Brown is live, and White/Blue is netural. So does that mean I can wire Brown to Black and Blue to White?


texts:
I am wondering if this is possible, because all the textbook cases I have seen of using the BJT with an AC source involves an AC input and then an amplified AC output... what i would like to do is use it as a switch to either block the AC or let it through. This is because I want to control the AC with 5v logic. Is this possible? I could always use an actual switch to turn on and off the AC but..well isnt the BJT suppose to be able to do the job if  configured properly... or does "BJT as a switch" not REALLY mean a switch.

Ignore the values of the components i paid them no mind i just wanted to graphically represent what i am considering.

The AC is going to be small voltage signal out of a function generator, not mains.


texts: In this schematic how are the caps such as C5, C6, and C9 connected? They are just going between my power source and ground?

texts: I was told C6 is a bypass for the oscillator(X1). Now I have been building this circuit and I understand that in Eagle grounds are connected automatically and so are voltage sources without having to draw a net between them, which is nice. But why is C6 etc just floating shouldn't it be connected with the oscillator in one way or another? Let me know if clarification is needed. Thanks!


texts:
Okay, simple yet seemingly impossible question here... What type of terminal is this? It looks like exactly what we need, but I found the image on an advert for the shrink-wrap shown in the picture. The company don't know what it's called, none of the engineers I have asked have known, but if this terminal does what I believe it does (essentially 'lasso' a pole) it would save us SO much fabrication.

I have tried reverse image searches and googling every permutation of its description I can think of. Any help GREATLY appreciated!


texts: Identifying Neutral/Active when wiring a caged SMPS

texts:
Just received a switch mode power supply from china and wanted to double check everything before applying power - The screw terminals coming from the cage have Live, Neutral, Ground marked with a sticker  but given the fact that the Made in China label itself is misspelled ("MAED IN CHINA") I have little faith in the labels.
While ground has continuity with the external cage, I noticed that the terminal marked Neutral is connected to the internal fuse on the circuit board while to the best of my knowledge the fuse should be connected closest to the live wire - Is this just a convention or does it add safety? and can mixing Live and Neutral make a circuit less safe assuming everything is still properly enclosed in the earthed cage?


texts:
I am using 64 XBee modules (XB24-Z7UIT-004) as sensors and I am trying to synchronize all the modules to execute a command all at the same time. What happens is that it takes about 500ms to send the command in unicast, from module 1 to module 64 and they all execute the command the moment they receive it. Is there any way to synchronize all the modules to execute the Command at the same time without the 500ms difference? I cannot send Broadcast messages because it floods and slows my network and it kind of "jams" the incoming commands. I am sending fast unicast messages.

I am using PIC18 to interface the XBee modules in API mode.

Thanks


texts: How can I control the pulling power of a DC motor?

texts:
I have a project where a DC motor needs to pull on a yarn and keep it a constant tension. The tension also needs to be adjustable.

I have tried to google this but it seems like I am not asking the right questions...

Would it be as simple as reading the motor current and adjusting the voltage to reduce the current or do I have it totally wrong?

Also would it be bad for a dc motor to be energized all the time and not moving?


texts: So I'm thinking in terms of the cross-section of this circuit, and I wanted to know how would I find the body voltage of M1 and M2 (which isn't shown on this diagram but I'm thinking in terms of the cross-section image)? Is there some expression that can be derived to get the body voltages? My textbook just assumes it's tied to the source to present this but I was wondering what if it wasn't?


texts: sensors for detecting breathing movements

texts: I am looking to find out what sensors can i use in my wearable, to detect if someone is breathing.. we would also like to find out their breathing pattern if it is long deep breath or shallow breath.


texts: Reducing noise in mixed-signal audio circuit

texts:
I am working on an audio circuit featuring the MOS Technology 6581 SID. The circuit works on a solderless breadboard with acceptable but still quite noticable noise. I am now going to design a PCB, but first I want to know what I could change in the circuit to further reduce noise. This is what I considered:

Using more (differnt sized) decoupling capacitors
Using a voltage regulator for VDD of the SID instead of taking it straight from the power supply
Using a separate voltage regulator for VCC of the SID
Using switching regulators instead of linear ones
Using a better power supply

Schematics (click here for unscaled version)

Breadboard setup


texts: Is it possible to use an 8 output demux to switch between seven 16 output demux's in the case that I want to control several LED's with an arduino uno? Is there a better way to do this?


texts: RC circuit with open switch and calculating energy

texts:
Yet again a similar task, however this time I'm supposed to find the energy stored in the capacitor.

This is the circuit:

And the questions are:

And this is how far I have come in the problem:

excuse me for all the white markings, but I've written in swedish so whoever is reading won't get confused.

So my confusion is, I've calculated Req, however I'm not certain if it is correct because the switch was initially open?
And that leads me to my main question: Should Req be the resistor in my last circuit I've drawn?
(Since the circuit is open then the resistor (R1) and voltage source goes away)

And I know the formula of the energy stored in the capacitor: w(t) = 1/2CV^2(t), so all I need is the voltage across the capacitor.

Thank you in advance!


texts:
This is a follow up from Driving IRF540N with darlington

I came up with a different circuit that uses jfet op amps and smaller fets instead of gate pull up  resistor:

The basic idea is that the opamps create a normal and an inverted 12V pwm signal. They open and close the 2N7000 fets. Those fets charge or discharge the gate of the power mosfet. Because the smaller fets are never opened at the same time, almost no current is needed to keep the power mosfet opened or closed. Much less power is discipated. And because of their very low open resistance, the power mosfet's stays less time in half opened state, allowing higher pwm frequency and increasing efficiency.

The jfet opamps are fast enough to be used at higher frequencies (slew 13V/us). I'm not sure how fast can they fully open or cose the smaller fets. Max output current of the opamps is limited but I do not see it in the datasheet. (At least the gate of the 2N7000 has far less capacitance than the IRF540N.)

Would this work better than the previous design? Would it work at all?


texts: FRDM-KL25Z programming using InterruptIn

texts:
I am trying to develop a software to FRDM-KL25Z that needs a button. Anytime this button is pressed, I need the variable "select" to increase by 1, so I designed the function changeSelection:

void changeSelection() {
   selection = selection + 1;

   if (selection > 3)
     selection = 0;
}

But, when I use this on the main function, I get the error: "Expression must have class type "button.rise(&changeSelection)" ". What am I missing?

InterruptIn button(PTA2);
void main() {
   button.rise(&changeSelection);

   while {
     ...do some stuff...
   }
}

Thanks


texts:
I have got 2 questions on transmission line. In coax line, the centre wire is Copper, and the outer line is Aluminium, as far as I can see in the coax that I have. I have got couple of questions on that.

Question 1:

Here this model assumes uniform resistance, conductance, capacitance ... per unit length of both wires, and then went on to derive the equations and intrinsic impedance. But this is not the case for coax line, as centre wire (Copper), and the returning wire (Aluminium) both have different resistance, capacitance ... per unit length. Say top wire and bottom wire in the diagram are Copper and Aluminium respectively.So how come we are allowed to use $$Z_0 = \frac{R + j\omega L}{\gamma}$$. Where R can either be the per unit resistance of Copper wire OR Aluminium wire, same goes for the value of inductance. So what I am reading wrong here?

The second question is on the application side of this question.

Question 2:

Say I am feeding the signal through centre wire (lets assume antenna, and coax are perfectly matched). Braid is at ground. Now as antenna is a transmission line, the upper antenna gets the entire signal, but the bottom antenna is connected to ground. In this particular case the upper half radiates, but the bottom half of the antenna does not radiate as it is at ground. But this a topology which I have seen in some of the places. This does not make sense to me, as the antenna is intended to be a half wavelength dipole antenna, and same V/I characteristic should produced in both the parts of the antenna. Instead this design puts the bottom half at flat Voltage.  I must be interpreting something wrong here.

Your guidance will be greatly appreciated.


texts:
I recently got a INA101HP see picture below. I was trying to use it on a breadboard. To power the op amp I connected 5V to +vcc pin but then I realized I did not really get how to provide -5V for the -vcc pin.... how is this possible if I am using an Arduino Uno as the voltage source??

EDIT: Based on answers received thus far

would it just be easier/CHEAPER if I got a separate 9V battery with a 9V battery cap and connect the pos end to ground and neg end to -vcc? do +vcc and -vcc magnitudes have to be equivalent for an op amp? It seems I will have to get some extra component either way...


texts:
So, a brief foreword. I'm not sure if this question belongs here or in the DSP community, its closely related to both, but I have a feeling this will be more of interest here nonetheless, so I am going to post here.

I have an IMU which I am using to measure the inertial frame of a drone. I'm not using a Kalman filter in this case, this is part of a 5th semester project at university, and Kalman filters aren't mentioned until 7th. As a result of this I have already created a complimentary filter topology to use and tested with an arbitrary cutoff. This is to remove the gyroscopic drift.

I have a ca. 5 second period at a 1 kHz sample time over which to integrate my gyroscope data (raw angular velocity) to estimate the drift. However I have heard this change is nearly DC, and I know the trapezioidal method is going to be fairly sensitive to the white noise present in the signal. as a result, I get values in the range of 1x10³ for each integral, with the yaw being slightly higher, which correlates to the papers I have read.

Would I see any benefit in using a larger data set to reduce stochastic error, should I instead look at using Huen or Runge-Kutta methods, or should I just cut my losses and set an arbitrary cutoff frequency based on what I already have?


texts: How to make an Arduino (ATMEGA16U4) like, software USB to serial on Atmega8u?

texts:
I've start to build a project base on Atmega328 and I need to connect to it(via USB for availability of the USB port) for debugging (I prefer to debug it with serial communication), and I don't want to carry extra device(like FTDI module) around for debugging so I did search for how to do it .
It come to my understanding that I should use one of these solution:

Use FTDI chip(like FT232RL or ...) on my PCB.
Use one of the AVR MCUs with USB capability and get ride of any software or hardware convertor.
Use a software USB to serial converter like what Arduino UNO did with ATmega16u2 by using LUFA library.
Use V-USB to emulate USB connections.

first question: LUFA on USB-enabled devices
Why use LUFA on the chip which already have a USB capability (like at90usb162 and atmega8/16/32u2, as you can see on the LUFA example project)?
My assumption is that LUFA library helps to add software support to AVR which Don't have this kind of capability.

Am I wrong?
Does LUFA only work on the AVR which have D+,D-,UGND and UVCC pin on them?
Do those (USB) pins need extra hardware/software to work?

I know Atmega16U2 is super cheap but unfortunately my local supplier doesn't have it so it is off the table.
second question: secondary MCU alternatives
Could I use an AVR (one of those cheap types like atmega8a) as an intermediate device (to put between USB port and main Atmega328p), to not use main MCU resources and pins and it works as a software USB Serial converter,If there is, What code and schematic should I use or modify to do so? Is there any example to start with? I saw V-Bus example projects but nothing was near as what I have in mind.


texts: how to use decoder and motor drivers to power individual motors at 12V?

texts:
I have a huge set of motors and they need to powered at specific times and at different voltage levels individually. Basic idea that I had, is to use a demux or a decoder to select the motors and then control them through PWM using any uC(preferably Arduino) and a motor driver. But I couldn't figure out how to connect them. Would anyone suggest any ways of executing the above connection or Can suggest a different way to tackle the main problem? The no. of individual control required is approx. 300.

Will the above approach work as to providing closed circuit to the selected coils only? And the PWM control can be provided to the driver through Arduino.


texts: Why is that the frequency domain has the same shape all through out? Look at figure b


texts:
I've been doing some simple RF boards as part of an internship in a lab, mainly to test particular ICs and prototyping, and mainly using coplanar waveguides.

I've now been tasked with designing a board to test an ADC with two differential inputsfunctioning in the 1GHz range.

Now, I know how to calculate coupled microstrip impedance, etc, but I'm kind of at a loss as to how to properly do the transitions (or even how much of an impact said transitions have on the overall impedance).

The following picture is the particular situation I'm now stuck in:

This would vaguely be my idea of what the connection for the inputs should be (for discussion purposes, lets assume the coupled microstrips are properly dimensioned). However, I have 2 types of transitions that will (I think) give me some troubles.

Transition between pad and track: I usually manage this just fine, just by adding a teardrop at a certain angle (according to the info I've found around the web); then I just vary the distance between the pad and ground plane to keep the same impedance as the microstrip. I'm curious though as this is the most used approach.
Transition between microstrip and coupled microstrip: This is where I'm more at a loss. Do I just vary the width of the traces and place a teardrop between them? Sound kind of a hamfisted approach, though I can't really say why it wouldn't work. I've seen a couple of boards that place some vias and change layer for this kinds of transitions, but I couldn't find justification for this.

For reference, this is my stack up:

Top: 1-oz copper.
   6.7 mil FR-408 prepreg (Er = 3.66 @ 1 GHz).
Ground: 1/2-oz copper.
   47 mil FR-408 core.
Power: 1/2-oz copper.
   6.7 mil FR-408 prepreg.
Bottom: 1-oz copper.

Thank you all in advance for your answers!

EDIT:
I'm adding an example of what I'm trying to achieve from the board we are currently using to get our measurements. It's a reference design by National Semiconductor, link for the app note here. There are design files available if anyone's curious, that's where I took the picture from.

As you can see, there are pink tracks on a 3rd layer, that are coupled but then separate in the direction of the pads. Finally, there's a via right underneath the pads to connect with them.
I find it interesting that there is no transition at all done between the coupled microstrip and microstrip, and that the via to connect with the top layer don't generate problems.


texts: When dealing with a fully associative cache, why is it necessary to use an offset (or word), if the entire cache is being searched anyway what will the offset do for you?


texts:
I am wondering if it is possible to trip an RCD safely with a custom circuit.
I know the RCD detects current leaking to ground so could a relay and a resistor be used to short the active to ground? I am needing to make a form of emergency stop that can be triggered remotely or by an MCU.

If this is indeed possible, is it unsafe and or bad practice to do this?


texts:
I am designing a bioimplantable circuit for a biomedical implant. The goal is to have an extremely tiny device in a flexible substrate (Dupont Pyralux) that must be powered wirelessly.

My problem comes here. I do not have much knowledge about antennas. I have been told to design an antenna that must work at 13.56 MHz. I am following the design of John Rogers (page 5, figure 2,b), Implantable, wireless device platforms for neuroscience
research.

Then I have some doubts about the design that I would like to receive some feedback about it.

How would you design a PCB antenna with that operating frequency (13.56 MHz)?
How would you address this problem? I need a primary and secondary coils working in that frequency.

I use Eagle but I don't know how to design, for example, a loop antenna in that software. If you recommend to me any other software for designing the antenna, simulating it and attaching it to my circuit, it would be great.


texts: Power a circuit and read output from tablet microphone port

texts:
I have a project that I'm currently powering with a AAA battery, providing 1.5v to a simple 555 timer circuit. The output of the circuit goes through a voltage divider into the microphone input of a tablet or mobile phone to be measured, i.e. with an oscilloscope app.

Is there a reasonable way to remove the battery from the circuit? When I measure the output of the mic pin with nothing else attached, I get anywhere from 1.5v to 3v, depending on the phone/tablet. Can I draw on this power from the microphone port to power the timer, and still measure the output using the mic?


texts: Simple hash function to implement on a microcontroller

texts: I'm looking for a very simple hash function to implement on a microcontroller. The microcontroller displays a 4 digit alphanumeric session id on a display. I want to give the hash function a count and get back a number, which would later be turned into a 4-digit alphanumeric number. Any suggestions for a lightweight hash function?


texts:
I had some boards made and assembled, but made a mistake with a DFN 10 part, and reversed two pins in the layout.  How do I fix it?
Should I remove the part and create and insert an adapter board to correct the pins?   Are there such things already?   Any suggestions greatly appreciated.
Thanks.


texts: Would adding an LED to a multimeter's LCD screen affect readings?

texts:
I purchased a TekPower TP4000ZC multimeter, which has no backlight for the LCD.
I wish to add one myself, perhaps a single led at low current, driven directly off of the two AA batteries. I'll add a small toggle switch as well for saving the battery.

I'm wondering if there's any reason not to do so.
Could this end up altering a reading?
I know the multimeter has to accommodate a battery that diminishes in power anyway, so I'm assuming the small drop won't be an issue. However I'm worried there may be something I'm not considering, as multimeters measure several parameters with high sensitivity and have many components in close proximity. I could see some sort of tiny EMF or other phenomenon occurring right next to a component and changing a reading, making this a waste of time.


texts: How to raise voltage output of charge controller IC due to cable loss?

texts:
I am using a CN3703 IC to charge a 3 cell li-ion pack (layout as below.)

The charge current is programmed using a resistor between its CSP and BAT pins which develops a voltage drop of 200mV. The output voltage on the BAT pin is preset to 12.6V (+/-1%.)

Due to cable and connector voltage loss, I want to raise the output voltage so that 12.6V (instead of 12.4V currently in my previous layout) reaches the battery. I am not sure exactly how to do this as there is no mention in the datasheet, but I came up with the following circuit (circled in red.)

The idea is is that 99% of the voltage is fed back to the IC so that it raises its output by 1% to around 12.72V.

Would this modification likely work?
How large can I make these resistor values without them introducing significant error?

EXTRA INFO: I should mention that I have already modified (U6) INA219 breakout by swapping the 0.1ohm resistor with a 0.01ohm resistor.

Full Schematic from working prototype and picture of PCB

UPDATE: Some very helpful comments. I have redone the layout to put the shunt before the battery sense so that the chip sees the voltage of the battery directly. I have also switched to a XT30 connector for the battery so that i am not using the same connector for the input power and the output charging cable. I have also moved the battery connector closer to the IC and used a short wide plane to connect them. Finally I have avoided using vias for the high current path by placing the low current signals on the other side.


texts: kVA Calculation for Unbalance Loads with V and I Data

texts:
I Used Power Analyzer for calculating kVA manually and compare with meter kVA values. When I calculate kVA values, I got the same time V and I value. This load is unbalanced.

I calculate total kVA and individual phases kVA. Following equations I used.

Total kVA = root(3) * (VAnIA + VBnIB + VCn*IC)

Phase kVA for A Phase = root(3) * (VAn*IA)

But calculated values and power analyzer readings are different. Please tell me why is that and how to calculate it (Total and phase-wise)

Please tell me how to effect Neutral current for total kVA values and individual kVA values.

All Meter Data and Calculate Data Available in HERE

Previously I calculate using average values but that is wrong. Those data available HERE


texts: Internal temperature sensor for the MSP430 - energia

texts: I'm trying to use the internal temperature sensor for the MSP430G2553 with energia (a branch of arduino for the TI MSP430 microcontrollers) but to I'm having trouble calibrating it. The solution I've found was to make multiple measures at different temperatures with another temperature sensor and from the relation between the two make a linear equation that performs the convention. The problem is that this seems like an hack and doesn't look practical if (for example) I had to mass produce a circuit that used the internal temperature sensor (I would probably have to calibrate each sensor individually). So my question is: Is there a formal way or a good energia library to get an accurate/calibrated temperature (preferably in Celsius) from the internal MSP430 sensor?


texts:
I'm making a detailed electrical diagram which needs to include splices. From researching on Google I couldn't find the conventional symbol for a butt splice, or even a splice, in an electrical diagram. Does anyone know what this looks like?

Thanks


texts: Will My Electronic-system survive? // No Proper Grounding on factory Floor

texts:
I have built a simple system which reads the sensor data and displays it on LCD display.
Sensor type: Strain gauge type
SMPS: MEANWELL Net35-b
PCB: Local made, single side
Case: Metallic
 I want to fit this system on a factory floor.Factory in-charge previously  faced 2 major issues with similar system

1)NO PROPER GROUNDING (Equipment Malfunction)

2)POWER SURGE(Up to 380-400 volts)

My analysis::
1)a)From what I've read I think that no grounding issue is serious and can cause someone to get electrocuted.
  b)From what I have read, there is no problem to SMPS that can lead to system malfunction from faulty grounding so electronics is safe (humans not so much !).I have connected the metallic cover of SMPS to the metal case.

2)For problem number 2 I think that those guys need to buy a servo stabilizer.
In Datasheet of SMPS Maximum input ratings are "85 ~ 264VAC" . 380-400VAC is Way more than acceptable limits.

Questions :

1) Are there any more problems associated with no proper grounding? Is there a possibility of damage to the system ?

2)What will happen in the case of power surge? Will SMPS shut-down?

3)What should I do to avoid instrument malfunction like previous instruments?

I don't know much about electrical safety circuits.Any Suggestions and help are appreciated.
Thanks in advance


texts: 50 Hz antenna for monitoring mains frequency fluctuations

texts:
I would like to follow fluctuations of the mains frequency (50 Hz, yes, I know they are very low) in the lab, without a connection to the wall socket. I suppose it should be some kind of antenna (capacitive one?), amplifier and comparator to create and output a TTL signal corresponding with the mains frequency.

Did someone try this? Will it work? My concern is that moving in the room will affect the shape of the signal.


texts: Simple circuit with resistors in series/parallel

texts:
Given the following circuit, I would like to find the time constant \$\tau \$. I know that at \$t\rightarrow \infty\$, the capacitor acts as an open circuit, so no current flows in it. In an RC circuit, \$\tau=R\cdot C\$, so R in this case would be \$R_1 + R_2\$.

However, given the same circuit written with Norton equivalent, I get \$R=R_1 // R_2\$.

My question is: what is the right way to find \$R\$?


texts:
Organization

Page size ×8: 18,592 bytes (16,384 + 2208 bytes)
Block size: 1536 pages, (24,576K + 3312K bytes)
Plane size: 4 planes × 548 blocks per plane
Device size:

384Gb: 2192 blocks;
768Gb: 4384 blocks;
1T2: 6576 blocks;
1H2: 8768 blocks;
3Tb: 17,536 blocks;
6Tb: 35,072 blocks

I can't calculate the correct capacity, please help me

below is my calculation

It should be 384Gb but I figured it is 466Gb , why?


texts: Buck-Boost Controller Arduino Nano vs STM32

texts:
I have 900W (150W*6Panels) solar panels and 12V inverter (1000VA) which have inbuilt PWM solar charge controller. The distance between pannels and inverter is around >10m and the wires are 6 sq mm only. At this distance inverter shows upto 40A max current from solar pannels at and the wire gets quite hot and waste a lot of power. (Around 150w I assume) (Panels' voltage ~18V, Voltage at input to inverter ~13-14V Depending on usage)

I tried to reduce the distance to around 4-5m and the inbuilt charge controller has been burned twice(Not surprised since inbuilt controller has to dissipate more power in this case). Luckily warranty covered me. So the Inbuilt charge controller is very inefficient.

So i am getting only max 450-500w and 350-400w average usable power.

I want to design a Buck-Boost converter for Solar Panels so that i can connect panels in series and step down the voltage (15V or so) at inverter's input. (Please dont tell me that the inbuilt controller might burn once again, In future i will upgrade to 24v system and maybe design my own charge controller for lead acid batteries, So i definitely need a buck-boost converter)

Now you might ask why buck-boost and why not just buck converter. I will happily make a buck converter if you give me a design which uses n channel mosfets at low side switching.

So i tried to design one with the schematic from GreatScott and burned my arduino nano accidently as i didnt have a gate driver and applied 12V to pin D6 of arduino accidently.
Link to his instructible page: https://www.instructables.com/id/DIY-BuckBoost-Converter-Flyback/

Schematic:

I didn't use feedback as i was just testing. The circuit worked good in buck mode for a while without heating too much. I burned my arduino because i didn't have a gate driver.

So the question is:

Should i use arduino nano( max frequency 63khz) or STM32 microcontroller(>63khz possible, cheaper) to generate pwm signal? I will be using IRFZ44N or IRF3205 mosfets.(Later one is good) (Please suggest pwm frequency for keeping switch losses low so that i can get away with using less mosfets in parallel, if 63khz is enough with reasonable inductor cost, i will go for the Nano blindly)

Please also suggest inductor value and its current capability. (Is 6uH correct at 63khz)


texts:
I am currently searching for a NMOSFET for driving a solenoid valve with maximum coil current of 500mA at 24V. I am choosing between: FQT7N10L and FQT13N06L.

The problem I am having is thermal caclulations and proper copper pad heatsink design. On both devices maximum thermal resistance between junction and ambient is written to be around 60°C/W (when mounted on the minimum pad size recommended).

But what is: "minimum pad size recommended"?

I've also read thrue this app note by Fairchild. There is a table and graph on page 4 of the document. Surface area is written to be for 2 oz copper. But looking at the document layouts 1-6 are done on a single side of a 1 oz copper PCB (page 6). So are measurements for only top and bottom sides for a 1 oz copper?

Is there any ballpark calculations for calculating required copper surface area for heatsinking SOT223 package?


texts:
Over the years I've used lots of different electrical tapes, cheap and not-so-cheap. One thing they've all had in common is that, while pretty tacky to the touch, it never sticks very well to anything but itself.

Just this afternoon I've been using some 3M Temflex to wrap some inline splice joints in some 0.4mm wire (26 AWG) and am once again frustrated by this issue that results in nice little tape sleeves where the tape sticks to itself (for a time) but not to the wire, thus the sleeves slide up and down the wires they are supposed to cover with very little encouragement..

Are electrical tapes just crap in this aspect? Or is there a particular reason for this?

(Tagged as adhesives because there is no tape tag)


texts: How close can you place an inductor to an IC chip?

texts:
I'm using a DC-DC boost converter in an electronics project. This boost converter requires an inductor. I plan on using this inductor with this boost converter chip.

I assume the answer will depend on the scenario (i.e. the chip being used, the inductance of the inductor, the current, etc.), however I'm trying to find a general method for determining the minimum distance I can place an inductor to nearby components. At what point would the magnetic field of the inductor start interfering with control chips?


texts:
I need to build an ammeter circuit for a model train layout. I want to use an analog ammeter (I just like the look of them) but I have to do some special stuff because DCC (the control system for the trains) is electrically weird. It's basically AC, except it sends data by flipping the polarity.

I found a how-to on making an ammeter for DCC, and it uses a DC ammeter gauge with a bridge rectifier. I have an old monitor power supply board (the backlight died, long story) that happens to have a bridge rectifier on it, so I'm thinking I'll use that instead of buying one.

My question is will having a bridge rectifier that is rated for more voltage than you need cause problems? I wouldn't think so, but I don't wish to smoke anything so I figured I'd ask.

Also, is there a way to measure the amperage consumed without a voltage drop on the track? A small one isn't really a big deal, but if I can remove any drop that'd be awesome.

Edit: My DCC controller is a Digitrax Zephyr Xtra, if anyone is wondering.


texts: Which is better, less crosstalk or less skew?

texts:
I'm designing a board that has a LVDS 2.5V interface with 30 lanes clocked at 600MHz and DDR.  This is going from one chip to another chip which could be placed right next to it, there are no other placement constraints.  The interface spec is 300ps maximum skew.

If the two chips are placed as close as possible, the trace lengths are between 10mm and 20mm and the delays on the different lanes are matched to 60ps.

To get a better match, I think I need to add around an extra 30mm or more space between the chips.  The problem is that the lanes run quite close together; to meander them some sideways space has to be opened up first (which lengthens the outermost traces) and then the inner (shorter) traces can meander.  The traces would then be matched to something like 50mm +- 2mm.

Is it worth adding the extra 30mm and meanders to get a perfect timing match, or should I keep it simple and just use the short direct connections and accept 60ps skew?

I am mostly concerned that longer traces would allow more crosstalk, and also the trace impedances / manufacturing tolerances of the board become more important.  Also, doing meanders takes a bunch of time.

UPDATE There is also 50ps skew (known) due to package delays, and up to 50ps skew from the logic of the sender chip.  So the trace skew budget is only 200ps, accounting for all other sources I know of.


texts:
Short question

Is the circuit functionally equal, with the yellow switches always in 'closed' state? (Each yellow switch is a 2DP switch together with the switch left of it)

Background

I'm creating a guitar pedal Fuzz effect, based on Randofo's Instructable, see the picture.
https://www.instructables.com/id/The-Fuzz-of-1000-Faces/

The red cross and resistor on the right (marked in red) is an 'enhancement' how the circuit should be.

The original idea is to use for the selection of the 2 x 6 switches (the combination of the yellow marked and the ones left of it) to use 2P6P rotary switches.

I want to use (analog) multiplexers, to control them digitally.

Current, I'm using CD4052's to handle 4 transistors by one CD4052, where one channel is just for the yellow switch, and one for the switch left of the yellow.

However, I'm wondering if the yellow switches are needed at all. Reason is that it doesn't matter if current flows into the transistor's collector, because if the transistor's base (same 'switch signal') doesn't get any current, the collector's signal will not be forwarded to the emitter anyway.

So, is the circuit functionally equal, to remove the yellow switches? (and assume it's a continuous path) ?

(as a side remark, someone gave me a tip to use analog switch array's which I'm probably going to use).

Analysis

Because of Andy Aka's useful comment to try Micro-cap 12 which I installed, I did some analysis, but I don't understand why the results are as they show.

I made the following (minimalistic) circuit:

I set V2 to DC 4.5 V, and amplitude 4.5V, to get values between 0-9V.

What can be seen is that the emitter of the transistor is 3.879V.
In the Fuzz normally switch 2 and 4 are tied together (SPDT), similar as switch 3 and 5, but I want for analysis to control them separate.

When I however also connect switch 5, the result of the voltage of the transistor's emitters is still 3.879 V ... so far so good.
And when I only select switch 5, I get 3.878 V.

So the result is that it doesn't matter if I remove switch 4 and 5.

However, when I tried NONE of the switches, so no collector is attached anywhere, it still shows 3.878 V.

So how is this possible? This would mean I don't have to connect anything at the collector? This seems strange to me.

Analysis 2

Now I simulated a full chain (using 1 capacitor, 1 transistor, 1 transistor, 1 capacitor).

The input I set to Amplitude 0.5V, DC 1V (to get a s ignal between 0.5 and 1.5V).

Transient Analysis

Dynamic DC


texts: Connectors problem to generate NC Drill Files in Altium - access violation error in module OUT_Drill.dll

texts:
I have a problem to generate NC Drill Files in Altium. Every time that I try, I receive a message of "access violation". I have discovered that the problem is only with the connectors with holes, because when I remove it (only for test) then Altium generates the Drill Files, but without the connector's holes.

My doubt is: I don't understand why Altium shows the message of "access violation" only when I have connectors with holes on the PCB, but with SMD connectors it doesn't happen.

Besides that, if I remove the connector from the PCB and add it manually, Altium can generate the holes of connector added manually, but not the connector added automatically by itself.

I don't know if I forgot to configure something.

I use Altium Library Loader to download all the components that i need.


texts: Cannot get Sainsmart 8 Channel SSR board to turn on sprinkler's 24 V solenoid

texts:
I purchase a Sainsmart 8 Channel Solid State Relay board to control an 8 zone sprinkler system via an Arduino Duemilanove w/ ATmeg168. The SSR's LED lights up but my solenoids do not activate at all.

I admit I have no idea what I am doing. But here's how I connected everything:

I connected the Arduino digital outputs 2 - 9 to SSR inputs 1-8. Also, I connected a 26.6 VAC 650 mA power supply (from my Rainbird controller) to the SSR's VOC and GND connections. Specifically, I connected the wire with the white strip from the power supply to the VOC on the SSR board. The other wire from the power supply was connected to the GND. Each solenoid (two wires) was connected to the SSR outputs - common solenoid wire to the silver SSR connector and the other solenoid wire to the copper SSR connector.

I wrote a simple program on the Arduino to cycle through each Arduino digital output for one minute with a 10 second pause between each relay/sprinkler valve. The blue LED lights up for one minute goes off for 10 seconds and then cycles to the next relay. However, my solenoids are not activated at all.

What is wrong?


texts: How to detect audio plug type to distinguish microphone/headphones by pin configuration?

texts:
I'm looking for a way to detect microphone/headset/headphones. How I can detect if two pins of audio jack has been shorted? This is the easiest way to check what kind of equipment has been plugged in.

In this situation I would check short circuit between pin 2 and 3. I'm using ADAU1761 and 4 pin jack.

  1   2   3   4
|-----------\\\\
|GND|GND|GND|MIC
|-----------////

|-----------\\\\
|MIC|GND|RHP|LHP
|-----------////

|-----------\\\\
|GND|GND|RHP|LHP
|-----------////

Any idea?


texts:
a friend of mine developed this Schematic and Circuit.
The Problem is, on LIN_BUS (please ignore the Name) should be KL15 Volage (13.8V) if the FET switches.

But if FET1_CNTRL is LOW (0.0V) the Output Voltage @ LIN_BUS is 800mV
If FET1_CNTRL is HIGH (3.3V) the Output Voltage @ LIN_BUS is 800mV
Here is my MCU Config:

Here is my Code and the Voltage on the BSS123.
 HAL_GPIO_WritePin(FET1_CNTL_GPIO_Port, FET1_CNTL_Pin, RESET); // = 13.6V 0V @ D-BSS123
    //HAL_GPIO_WritePin(FET1_CNTL_GPIO_Port, FET1_CNTL_Pin, SET); // = 13.6V 3.3V @ D-BSS123

Very strange. Does anybody have a suggest what is faulty here?
If 3.3V on BSS123 the Gate on IRF9362PBF is 0.0V
If 0.0V on BSS123 the Gate on IRF9362PBF is 13.2V
Edit:
Added some Load. Got a meassurment fail yesterday. So Drain on IRF9362PbF is allways 800mV. Anyway in which state BSS123 is.
I added 5V / 12V / GND directly to the Gate from IRF9362PbF, but still no changes on Drain side. Tested with different hardware but same result.
I reversed the Tips from the Measurement Tool and connected the GND Cable to the Drain. and the Plus Cable to Vss.
Now I measure +13.8V But in both BSS123 States.
Checked with different Hardware. But same result.


texts:
I am looking into purchasing a TE 810M1 Accelerometer and had a question regarding the resistor's value for amplifying the sensors output. Here is a photo of the sensors electrical properties:

The output impedance is a property of the sensor and can not be changed, correct? Thus when selecting the resistor value for the op amp, should I select the impedance to be less than 100 Ohms or should I select a value where the current into the OpAmp circuit is less than 22uA? I'm siding with selecting the larger resistor value to be safe and avoid burning the sensor.


texts: Geiger counter pulse detector - too many pulses from amplifier

texts:
I recently have built smiple Geiger counter based on cheap STS-5 tube, high voltage power supply from China and ATmega168 with LCD. Currently, I'm facing a problem with counting number of pulses from tube. I connected the output of simple Darlington amplifier to ext_int pin of ATmega168 and it sometimes does not count properly. I get 3-4 pulses instead of 1. I do not own scope or anything so I cannot measure output.
I also tried to collect pulses from tube cathode and adding additional filtering capacitor to HV supply output with same results. I do not suspect code to be a cause of incorrect counting, I checked it with basic TTL pulse generator and it works perfectly fine. Can anybody help me with this circuit? Also, my HV power supply is this module: Link


texts:
Question: Is there any way that I can change the signals from two inputs into the max signal from those inputs?

Such as,

0, 1 => 1
0, 0 => 0
1, 0 => 1
1, 1 => 1

Extra info:
One input is a reed switch, the other is from an ESP8266 GPIO pin. Once the reed switch is activated, the ESP8266 is reset (the reed is connected to the reset and ground pin). During startup, power is applied to the ESP8266 GPIO pin until the ESP finished processing so that the device is being kept alive until it is done.

Current problem is, when the reed switch closes too quickly, GND is applied to RST, keeping the ESP in a state of non-deep-sleep and inability of finishing its process. So in order to solve this, I'd need to combine the MAX of those inputs.

Requirements: The "max" operation should not require extra power, so that when the ESP is in deep sleep, there is no extra power drain for this "max" operation (such as a reed switch doesn't require power to complete/open a circuit)


texts: Replace analog pot with digital - volume control

texts: I'm trying to replace an analog pot with a digital one for the volume control in a guitar amp. I have a digital pot - MCP4141 put instead of the analog one. However, checking on the oscilloscope seems like "zero level" is in the middle of the signal, so everything below this level gets cut off. How could I "move up" whole wave above the ground level? Does have to be a resistor put between "B" and ground? Or something else?


texts:
I have been trying for nearly a week now to try and build a mechanically locking box. I thought I could try using a linear actuator to do this, so I found a model I liked.

My question is as follows:

Do linears actuators have built in resistors to limit the current? This linear actuator model tells me it has a 2.5A current rating but it does not specify whether or not it is limited internally.
Thanks in advance


texts: ATtiny861 pin change interrupt on PA.2: error in datasheet?

texts:
I faced with some confusion in subject datasheet:

In one section PA.2 should be masking by PCIE1 bit as PA.2 is PCINT2 input and it should be within PCINT[7:0] and PCINT[15:12] range:

On the other hand PA.2 (PCINT2) will generate Pin change interrupt 0:

Is there something that I misunderstood? Or I just faced with a rare case of an error in documentation?


texts: Can anyone identify this 12V DC power connector found on a radio transmitter?

texts:
This connector is used on the back of a QYT KT-8900D radio, in between the radio unit and a cigarette lighter-type plug. The unit itself takes between 12V and 15V, and I think less than 2A of current.
I'm looking for some sort of standard name.


texts:
I want to design a circuit to trigger a relay depending on the house current load:
When current load is below 12A the relay must turn on and when current load goes above 17A relay must turn off.
How can this be done knowing that the relay will switch a 4A 220Volt heater.

thank you


texts:
I'm attaching a schematic of an RF transmitter made by Synoxo. Chip is the SYN115. The schematic is found in the datasheet.

I do not understand why L3 which is the PCB antenna (pointed with the red arrow) is connected on both ends. As far as I know, antennas are connected on one end on a PCB and the other end is not connected anywhere. Also why there is no value to L3?

Also what is the black arrow (pointed with my blue line?)


texts: I was wondering if a PCB trace can support peak currents, larger than the nominal current. E.g., using a PCB trace width calculator, a 7mm trace supports 8A, but can it support larger peak currents? If so, what is the duration of the peak and the value of current supported and how is it calculated?


texts: Any one used Eagle V6 and CNC router to produce prototype PCB boards. I have a high res CNC router HighZ1000-s/T which accepts G-code and HPGL. I am pretty sure that at the end of the day it will well work. Just looking for bit of advice from anyone who has already done it and can tell me what not to do and must do.


texts: Combine signals from two rotary incremental encoders to one output

texts: There is some device controlled by (optical) rotary incremental encoder (which gives quadrature output - two channels with square shaped pulses and shifted between each other). I want to add another encoder, which will work in "parallel" with first one - thus will be possible to control device with any of them. So I need to combine two rotary encoders to one quadrature output. How I am gonna do that?


texts: What does ST mean with "Temperature Offset" for the temperature sensor in their IMUs?

texts:
When reading the datasheet of the LSM6DSO32 IMU I noticed on p. 29 the characteristics of the integrated temperature sensor (see screenshot below): The sensor gives a digital reading of 0 for a temperature of 25°C, but the parameter Temperature offset is specified as \$\pm\$15°C!

Am I interpreting this value correct, that I get a digital reading of 0 for a temperature somewhere between 10°C and 40°C? This would be kind of insane and when this interpretation is correct I can not really follow why they even bother putting a temperature sensor on board. Sure, this offset will be pretty static and can be calibrated against, but every cheap temperature sensor for a few cents has way better specs.

So to formulate real questions:

Does this datasheet parameter actually mean what I think it means?
And if so, why would this sensor be so much worse than any jelly bean DS18B20?


texts: Whats the best type of connector for test equipment?

texts:
I am selecting the components to use for a tester I am developing.

I am looking at various types of board to board connectors.

The requirements are:

Rated to least 2A.
Rated to ~200v.
*High Isolation, in the order of 1Gohm (most important)
Pitch no less then 1mm.
2 rows preferred.
Available in large sizes, 50-200 range.

In the past I have used card edge but it has always been hard to get in and out and the connectors don't always make good contact.

Another connector I am looking at is the rectangular board to board connectors.
They look promising but I don't know what the isolation resistance for these are though.

Also there is DB connectors which have high current ratings and isolation resistance for the expensive ones. How do these compare to the ones above?

Most connector datasheets I see just talk about the dimensions and footprint. It is hard to tell what type of connector is best suited for high isolation while also being able to meet all the other requirements.

Has anyone also had a design that required accurate sourcing and sensing of multiple channels or know of anything purpose built for this kind of thing?


texts: Can I use differential I/O pins of FPGA as high speed comparator?

texts:
High speed comparators are rather expensive and speed is what FPGAs are very good at. On the other hand, FPGAs (in my case: XC3S400) have paired differential pins in each bank  that their voltages are compared ( At least I think so !). They also have Vref for single ended standards that may act as a comparator.

I want to know if I can use those differential I/O pair pins as a comparator -and if so- how should I do that ( Should I connect a vref and use single ended standards or simply connect two voltages to differential I/O pins ?)

EDITION: I tried it and works excellent !!!


texts:
We have a solution for graphic color LCD's (resolution up to 800x600) right now that we are not very happy with: Our ARM Cortex M3 drives the LCD over a 8080 bus and the LCD module must provide the LCD driver (currently SSD1963). This solution was recommended to us by consultants who's priority was optimizing the cost of the processor module. The problem with this is that it pretty much ties us up to one LCD vendor and even only a subset of that vendors displays. The 8080 bus is standard but the cabling (tail) to the LCD module seems to vary slightly from vendor to vendor. The signals is not always on the same pins etc. Another problem is that LCD displays seems to have a very limited market lifetime, I heard less than a year in some cases.
Now, we have chance to redesign the processor module and I want to do this RIGHT this time. I'm looking for a solution that is:

Cheap both on the processor board and the LCD module
Vendor agnostic
Somewhat future proof

Various solutions have been suggested:

Integrate the LCD driver on the processor board: Would this really help us become more vendior agnostic?
Integrate an FPGA (programmed as a display driver) on the processor board and reprogram it when we need to switch LCD vendor: Sounds cool but somewhat backwards, surely there is a standard solution to the problem?
Integrate an LCD driver on the processor that speaks DVI or HDMI to the LCD module: I like this because of the standards, but it sounds like both processor board and display module becomes MUCH more expensive

What do you guys think? Is there a standard way to do this that I have missed?


texts: Current controller circuit to drive solenoid bank

texts:
I am working on building a current controller circuit used to drive 8 solenoids (for those interested, the solenoids produce magnetic fields for use in a Zeeman Slower). My problem is that there is persistent current ripple that I cannot seem to remove.
Each coil runs a different current ranging from 2 to 8 amps with, ideally, a few percent fluctuation. The circuit consists of 8 channels each of which has a solenoid (1 ohm resistance, 250mH inductance) in series with a mosfet (FDP18N20F) and a sense resistor. The voltage across the sense resistor and a set point voltage are fed into an op-amp (OP275) which drives the mosfet gate to set the desired current. Each channel is powered by a common 13.7V/40A supply (tripplite PR50). I attached a sketch of the circuit.

Each channel works well independently when the others are off. However when they are all running and considerable current is being drawn, the supply voltage begins to ripple resulting in current fluctuations (ripple frenquence is about 300 kHZ). Below is a scope trace showing both the AC coupled signal across the sense resistor (nominal value 1.8V) and the ripple on the 13.7V supply voltage.

My confusion is that the supply voltage ripple leads to much larger current fluctuations than expected given the mosfets are biased in saturation. My only explanation is that my control loop is doing more harm than good at removing the disturbance at the ripple frequency. Is this a reasonable explanation?
One solution is to limit the feedback at high frequencies by modifying the circuit shown in the following figure where RC is chosen to limit the bandwidth to a few kilohertz.

Any other possible solutions would be greatly appreciated or advice on how to reduce the power supply ripple. Thanks in advance.


texts: STM32CubeMX USB error "Unknown USB Device(Descriptor Request Failed)"

texts:
My STM32 project has an issue about VCP on a CubeMX generated project.

When the USB cable is plugged in, the windows10 can't recognise it and in the device manager panel, it says "Unknown USB Device(Descriptor Request Failed), error code 43". The funny thing is after the  USB cable been plugged in and out several times (usually more than 10 times), windows suddenly can recognize it. After that, if I power off the board for a short time(several seconds), the USB can always be recognized successfully by windows even if it is plugged out and in repeatedly; but if I shut down the board for a long time, then the issue will arise again.

I've taken the following steps to debug it but no effect:

I build a simple project on CubeMX with just OTG_FS, this issue is still existing.
I've also tried to enable/disable VBUS sensing function but it's the same.
I've measured the voltage on DP and VBUS which are 2.8v/4.4v when this issue exists.

I can't think of another method to debug this issue. Any ideas or suggestions about solving this issue is welcome. Thank you!

These are information related to the USB in my project:

The chip is STM32F205VGT, cubeMX version is 5.0.1.

Keil version:

USB configration:

Clock:

Schematic and PCB, the board is powered from wall supply rather than VBUS:

Updated:

Finally, the issue is fixed by resoldering the 16MHz crystal which may not contact well enough in the first version.


texts: Using adafruit Flora or Adafruit Trinket + MPU-6050 3-Axis Gyroscope + nRF24L01+ together

texts:
I am trying to do a project where I need to transmit data from an object if the object is moved in a particular way. The restriction is that the device has to be as thin and small as possible. I am trying to figure out if I can integrate the following three modules:

An Adafruit trinket or Adafruit Flora controller
A MPU-6050 3-Axis Gyroscope (http://www.gearbest.com/development-boards/pp_22492.html?currency=USD&gclid=CMbguuOG9sICFYXtMgodDxoAfA)
A nRF24L01+ wifi module (https://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRF24L01P)
Use a coin battery.

Does anyone have an idea if the above 3 things are integrable? Do I have any way to check that? Any idea will be appreciated.

Regards,
Zafar


texts: Using a Motor Controller to Limit Voltage to a Motor

texts: I am working on a project where we I have a 24 V battery controlling an electrical system.  Attached to that 24 V battery are four 24 V brushless motors.  I also have to run two 12 V motors.  Currently, I have a 12 V DC Buck Converter to step down the voltage from 24 V to 12 V for the 12 V motors.  However, could I cut my weight by powering the motor controller (which is rated for 36 V) off of the 24 V battery and just programatically running it at 50% power to power the 12 V motor?


texts: I am building an adder with standard 74HC/HCT series logic ICs. I see the result when input pins are left floating are erroneous. Shall I have to connect some pull down resistors. Thank you.


texts:
First time posting here :)
Hope someone can help.

I have a wireless Yale home alarm system and the external siren is chewing through batteries in no time and is expensive to keep replacing them.
I came to the conclusion that if I were to run it of a DC mains power adapter it would be hell of a lot cheaper to run.
The external siren uses 4 x D cell batteries (1.5v each)
The batteries are in series so this is 6v.
With the batteries in series, I used a multimeter to check how much amps/current it is using when the siren is activated.
It seems to be consuming about 450 ma when the siren is fully activated and consuming up to 220 ma in standby mode with just its warning LEDs flashing intermittently every 5 seconds.

I had a 6v DC 3500ma mains adapter lying about so thought this would be perfect to power it as it will only draw 450 out of the 3500 milliamps that the adapter supplies and should be sufficient enough.
I hardwired the adapter to the black and red terminals on the siren and made sure the polarity is correct.
When powered up, the siren seems to be getting some sort of power as it may make 1 beep or the leds might flash once on power up, but that is all. If I do a siren system test with the batteries inserted, it works perfectly with a continuous siren alarm and flashing LEDs.
If I do a siren system when connected to the DC power adapter, the LEDs don’t flash but the siren will only let out one burst of sound for like a second. Like one loud squelch and that’s it.
I’m totally confused why it won’t work on DC mains power when the voltage and the current output of the adapter seem to be similar to the battery power.
Any ideas or feedback are welcome folks!
Many thanks in advance :)

Please see YouTube link below to the Yale Siren I’m using:

https://youtu.be/CUIDHVbGK2o


texts: VARIAC as DC motor speed controller from DC power source

texts:
I'm not sure if this is is where I should ask this but is it possible to use the VARIAC as a DC motor controller from a DC battery source? The thing goes like this:
The 48V, 3kW DC motor is connected to the VARIAC. The VARIAC is then connected to the 48 V battery source.

The idea was actually from a Chinese guy and I'm not sure if it's possible. I have consulted with my professors and they don't believe it would work. I am also researching about this but there are not enough articles and forums to support this.

Thanks for anyone with an answer.


texts:
i try to implement an input which is reacting on an high impedance 3.3V on PC14. My Configuration looks like this.
main.h
#define I_Pin GPIO_PIN_14
#define I_GPIO_Port GPIOC
#define O_LED_Pin GPIO_PIN_5
#define O_LED_GPIO_Port GPIOA

static void MX_GPIO_Init(void)
{
  GPIO_InitTypeDef GPIO_InitStruct = {0};

  /* GPIO Ports Clock Enable */
    __HAL_RCC_GPIOA_CLK_ENABLE();
  __HAL_RCC_GPIOB_CLK_ENABLE();
  __HAL_RCC_GPIOC_CLK_ENABLE();

  /*Configure GPIO pins : O_LED_Pin O_state_Pin */
  GPIO_InitStruct.Pin = O_LED_Pin|O_state_Pin;
  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

  /*Configure GPIO pin : I_Pin */
  GPIO_InitStruct.Pin = I_Pin;
  GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
  GPIO_InitStruct.Pull = GPIO_PULLDOWN;
  HAL_GPIO_Init(I_GPIO_Port, &GPIO_InitStruct);
}

And in my main function i try to read the input like this.
if(HAL_GPIO_ReadPin(I_GPIO_Port, I_Pin)== GPIO_PIN_SET)
    {
        HAL_GPIO_WritePin(O_LED_GPIO_Port,O_LED_Pin, GPIO_PIN_SET);
    }

Then i connect the PIN PC14 to the 3.3V of my Nucleo board but nothing happens. But it should detect the Pin as set and enter the if statement...
Anyone knows what to do?


texts: 3 Cell Series Li-ION charging with TP4056

texts:
I've searched my situation but cannot find my exact answer, I am trying to make 3S Li-Ion battery charger with 3 TP4056 Charger Module.

TP4056 Module 1A 5V one cell battery charger i thought if i use 3 of them i can build 3S battery charger, so i connected battery's balance leads to TP4056s

But I noticed if I connect modules to one power supply GND's will be common and first charger module gets voltage of 3 cells (about 11v) and obviously this will lead problems, and I decided to power each TP4056 module from separate power supply,
now each cell can be charged.

My questions are:

1) Should i give up building this because charging batteries in series would cause problems?

2) Can cells wear out?

3) Cells become Unbalanced?

4) How can i power TP4056 modules just with one power source?


texts: How to better understand binary data streams as electric signals?

texts:
I'm aware that at any step of any computer process the input of a user/program (that gets translated from code to machine language and then to cpu instructions), is represented using both electrically binary and logically binary streams. I know that any operation involves high and low voltages that correspond to 1s and 0s, but what is the component that turns current to data and vice-versa, how does that happen?

I'm a software developer, but at the moment I want to better understand the hardware part of computing, so please take that into consideration as well.

Kind regards!


texts: What does 40VA rating for transformer mean?

texts:
I am working on a circuit for a home make home security system. I bought the following wall transformer to power my circuit. I was going to use with a 5VDC Linear voltage regulator to get 5 volts for my digital circuitry.

http://www.mpja.com/prodinfo.asp?number=12635+PA

I couldn't find any documentation on this transformer. When I plug it into the wall and measure the voltage at the output I get zero volts. I tried attaching it to a couple different loads (with fairly small resistance) but I still couldn't measure any voltage at the output. I realize this is probably because the transformer is not regulated and thus requires a load for the output to be 12V but I am still not sure if I can use this transformer with my design. Does this thing only output 12VDC if it has the exact right load? Or since I will be connecting this to a linear voltage regulator will that handle it all for me? The total current draw of my circuit will typically be less than 200mA unless the alarm is sounding, and then it will go up some.

Also, I was planning on using the 12V from the transformer to power the horn(siren) directly and switch it on with a power Mosfet. The 12 Volts will not be regulated so do I need to add a big resistor in series with the horn so that it will have the proper 12 Volts across it?

I guess I should have just spent a little more and got a regulated supply!


texts:
Let's say I've got an power output and I want to power a chips Vin's with it.  But, let's say it's a couple of different digital Vcc's on the chip that I want to power, like a rail for an LO, a rail for a radio, a rail for something else digital...whatever.

So, if the final output of the power supply stage before it gets to the chip is an inductor (like, for instance, L1), and my plan is to keep the power into the chip as noise free as possible so they don't interfere with each other, does this make sense to do?

I would think this is pointless and does little to help noise/interference separation.  I would think you should do it like this:

Am I correct and is there any advantage or disadvantage to one over the other?

Thanks.

EDIT:  Please excuse my mockup layout...There is, as there should be, a bypass capacitor on the output of the inductor to ground...My question is more about the tracks coming off the pads.  I should have the correct capacitor artwork as well...I assure you, it's there in the real design.


texts: What is an ideal setup for detecting objects moving through an enclosed space?

texts:
I'm trying to create an ammo counter for an airsoft gun. I'm going to control it with an attiny series MCU and i want to detect the projectiles exiting the barrel using a light based sensor. Now that's the question:

Which method of detection is the best for such application?
A photodiode, a phototransistor or other, perhaps laser based sensors?

The projectile is 6mm in diameter and at 115 m/s after exiting the barrel which means that the sensor will have around 70μs to detect it.


texts:
I have a device that uses a pair of 1.2 volt NiMH rechargeable AAA batteries at 550 mAh (Philips HB550L).

Would it be harmful at all to replace these batteries with rechareable 1.2 volt AAA Duracells (or other brand) at 800 mAh or even 13000 mAh? Would it be safe, would it affect longevity of the device or batteries?

Are there other considerations when using higher amperage batteries?


texts:
I'm designing an air ultrasound range finder that bounces ultrasound signals off a person's head to measure the distance of the device from the head. The goal is to get ~1mm accuracy as a device is actively being moved away from a person's head (range of distances is 0mm to ~250mm) so I need a pretty good update rate (>30 Hz). Of course, there are also some issues with the reflectance of the scalp and of the occlusion caused by a person's hair.

How do I determine the best frequency transducer to use? I was thinking 40 kHz due to the low size components and the market availability.
Should I go for narrow beam or wide beam? I think narrow beam would have better reflectance, but wouldnt they only work for specific ranges?
When I mount these transducers onto this device, do they need to be at an angle relative to each other to optimize the reflection? Or can their transmit axis just be normal to the same plane?
What kind of signal processing should I use? Obviously low bandwidth ultrasound transducers will have a fairly broad waveform, so I think correlation won't work too well. But will a threshold method be accurate enough? Maybe there are other methods I haven't considered?


texts: Cable parameters calculation for a long 1000 V DC cable

texts:
How to calculate the current that is needed to charge the cable capacitance and inductance while switching DC power supply ON? And the current that is released from the cable inductance and capacitance while switching DC power supply OFF during the transient(charge/discharge) cable stage?

Here is a equivalent circuit diagram:

The parameters R(Ω/m), L(H/m), C(F/m) are known.


texts: Can I leave SWO/TDO and TDI of J-Link floating?

texts:
I'm designing a board with cortex-m4f having only SWDIO and SWCLK.

I'm drawing schematics for J-Link's 9-pin JTAG/SWD connector, and I wonder if I can leave the SWO/TDO and TDI pins floating.

J-Link's user guide says that:

Pin 6(SWO/TDO): JTAG data output from target CPU. Typically connected to TDO of the target CPU. When using SWD, this pin is used as Serial Wire Output trace port. (Optional, not required for SWD communication)
Pin 8(TDI): JTAG data input of target CPU.- It is recommended that this pin is pulled to a defined state on the target board. Typically connected to TDI of the target CPU. For CPUs which do not provide TDI (SWD-only devices), this pin is not used. J-Link will ignore the signal on this pin when using SWD.

I guess "not used" means that I can safely leave them floating, but I'd like to be sure.

Can I just ignore the pins and leave them floating on the target board?


texts: I have a basic solid state relay that switches an outlet on and off with a 9v input. Everything works good but I'm confused by the voltage readings I'm getting. The load side is reading 124 volts, and the line side is reading 118 volts, and I'm getting this reading whether the relay is on or off. Is this common?


texts: What is the expected lifespan of those 16x2 character LCD?

texts:
I want to use the HD44780 character LCD (commonly available in 16x2 characters,  though I am using the 20x4 version)  in an industrial application but since it will be on 24x7, I am just a bit worried about it lifespan expectancy. I hope it could last 5-10 years.

Have been searching all around,  including the datasheet by Hitachi but no info on lifespan.

I would really appreciate if someone could share his experience using one in a real life application.


texts: Is the Delay in Strain Data Due to Capacitance?

texts:
I have designed a sensor board which gives a strain o/p based on wheatstone bridge principle(change in stress is measured through change in resistance).

But the starting value is not at zero level,it takes roughly 40 to 50 sec to stabilize (Please refer the attachment).

Could it be because of the internal capacitance of the board,if so how can it be reduced or avoided.

Thanks in advance


texts: Why doesn't an inductor mind polarities?

texts: I have seen many textbooks that say consider a capacitor which is polarised (DC capacitors) and non-polarised capacitors also exist, but why don't inductors have AC inductors and DC inductors? Sorry for the silly question, but I want to know the answer.


texts: How to select resistor for emitter follower when driving speaker?

texts:
simulate this circuit – Schematic created using CircuitLab

The objective is to drive 1 watt into the speaker. R1 represents the output impedance of the previous common collector stage.

Here's what I think I know:

1 watt into 4 ohms means 2V RMS or 2.8V peak.
If the beta of Q1 is something like 70 then the input impedance of the emitter follower is something like 700--pretty low.
In the quiescent state C1 is charged and the current through the speaker is zero.
When the voltage rises to +2.8V, 700mA (2.8V/4 ohms) goes to SPKR1. (Confused about whether it all goes to SPKR1, seems like some must go through R2.)
When the voltage falls to -2.8V, 700mA gets pulled back through SPKR1 and must be sunk through R2.

The problem in a sentence is that R2 is too high to sink the current coming back from SPKR1 when the voltage is low. If the emitter voltage is about 6V then when it swings -2.8V to 3.2V, R2 will sink only 320mV. So the returning current causes the emitter voltage to rise, turning off Q1 and creating a flat spot at the bottom of the waveform.

If I decrease R2, then the input impedance drops and it's hard to maintain the voltage swing. Also, the quiescent current increases and I start needing a big heat sink for Q1.

My question is: is there a process for determining a value for R2 that can meet the objective of driving 1 watt into the speaker, or is this just a waste of time?


texts: Relay replacement for my UPS - compatibility confirmation

texts: I've got a UPS that stopped working and found out the relays(Bestar) got busted. I would like to confirm this replacement relay(Songle) I've found online if it is going to work. I'm open to any comments or suggestions. By the way the UPS uses three relays.