texts: Baffling combinatorial feedback loop message in VHDL with ISE Design Suite

texts:
When I try to synthesize my VHDL design (using Xilinx ISE Design Suite), I get the message:

WARNING:Cpld - The signal(s) 'e' are in combinatorial feedback loops.
   These signals may cause hazards/glitches. Apply the NOREDUCE parameter to the
   hazard reduction circuitry.
   Timing analysis of paths involving this node may be inaccurate or incomplete.

This is confusing as my design simply consists of a counter 'c' that increases on each clock tick and some signals that are derived from it in a way where I don't believe any loop can exist, to form an output signal. Here's the code:

library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;

entity foo is
    port (
        CLK : in std_logic;
        A : out std_logic_vector(1 downto 0)
    );
end foo;

architecture foo_arch of foo is

signal b : unsigned(1 downto 0);
signal e : std_logic;
signal c : unsigned(1 downto 0) := "00";
begin
   process (CLK, c)
    begin
        if rising_edge(CLK) then
            c <= c + 1;
        end if;
    end process;

    b <= c(1 downto 0) - 1;
    e <= '1' when b(1 downto 0) = 0 else '0';
    A <= std_logic_vector(b(1 downto 0)) when e = '1' else "ZZ";
end foo_arch;

So you can see

b is derived from c
e is derived from b
A (the output) is derived from b and e

What's the problem? Am I going crazy? Am I doing something incredibly stupid or is the synthesizer playing games with me?


texts: Identify the Maximum ESD Clamp Voltage on a circuit

texts:
This is with regard to a series of my ESD and Inrush Related questions.

My circuit :

The Node A goes to two other circuits like below :

AND

Now, I apply an ESD pulse of say 8kV/330pF, the capacitors C0001, C0002, C0003 and C0004 have the ability to clamp down the voltage to a certain amount.

But now, I need to ensure that whether that voltage does not exceed the maximum ratings of downstream devices like D0004 and MOSFET Q0001 and other components which are connected to NODE A.

In the D0004 Zener 6.2V rated datasheet, only the absolute maximum ratings are provided for Power Dissipation. There is no maximum rating which indicates the maximum voltage that the zener diode can handle. How to deal with this case?

The same I see for MOSFET BSP317P. Only Max Vds. So, I can take that the maximum voltage that the source terminal can handle is 250V with respect to the drain. If the output voltage is 25V, the MOSFET source terminal can handle a maximum of 225V approx theoretically. Is this correct?

And for the other two transistors (BC807 & BC817), the maximum collector emitter voltage is 45V.

So, I see that the ESD Capacitors should be able to clamp the ESD pulses to less than 45V. If it does, then our components are safe. Correct?

My questions :

Are my above understandings correct?
How to find the Absolute maximum Voltage rating of the Zener diode?
And if the output voltage is connected as a regulator input, should I also check the maximum rating of the regulator too? As the ESD pulse is of very short during, the Zener D0004 may not have enough time to clamp it. But will the MOSFET allow this voltage to affect the downstream circuits connected to Output voltage?


texts: What actually happens to electrons in a circuit when work is done at a component?

texts: As the title. Between when voltage is higher; before the electrons reach the component, and afterwards.


texts: I was asked to determine the maximum value of the load \$R_L\$ so that the circuit works properly, under the assumption that \$r_o\$ is infinite. Is that a standard DC calculation, hence do I simply write out the condition for all the transistors to be in saturation and deduce from that the maximum value of the load, or is it something more intricate that requires small signal evaluation?


texts:
I'm designing an 8 bit computer, and one of the tricky parts is streamlining the loading of the small "OS" (read collection of routines) into the 32kB NVRAM that I will use instead of an EPROM.

I was thinking to use a PIC (interfaced to the PC via USB) to load the NVRAM.

What would be a better way to do this?


texts:
I have found this circuit which is supposed to be a current-limiting circuit:

simulate this circuit – Schematic created using CircuitLab

'R1 is used as a current's
resistor. It monitors the current flowing through Q1.
The voltage drop across R1 increases as the current through Q1 increases. If the voltage at the top of R1
reaches 0.65V Q2 begins to turn on. Q2 diverts some of the current from the base of Q1 and sends it to
ground. This reduces Q1's collector current'.

However, I am having trouble understanding this:
When  Q2 is on the voltage drop of R1 will become less and Q2 must be off despite we say it is on and  this will create a closed loop of paradoxes.
Where am I wrong?


texts: What's the purpose of the diodes in this circuit?

texts:
I'm trying to get my head around the headlight wiring in my car, and I'm curious what purpose the two diodes in this diagram serve. Hoping one of the clever people on here can explain it for me:

Is there purpose evident from this diagram or are further related diagrams required?

Thanks


texts: Memory allocation in embedded software development

texts:
In embedded systems, the use of dynamic allocation is strongly discouraged. MISRA C do not allow using malloc and calloc because of their unexpected behaviour. My question is: How do you handle memory allocation when you have no idea how much space you need ? How do you initialise an array before using it ? In the example below, is it really better to allocate 1000 values and end up using 30 values because you don't know how many values you really need ?

#define MY_ARRAY_MAX_SIZE 1000
/**
*
* some code ...
*/

// Init
uint8_t myArray[MY_ARRAY_MAX_SIZE];                              // Approach 1

uint8_t myArray[MY_ARRAY_MAX_SIZE] = {0}                         // Approach 2
/* OR */
memset((void *)myArray, (uint8_t)0, MY_ARRAY_MAX_SIZE * sizeof(uint8_t)); // Approach 3


texts:
I just bought an air ionizer which claims to putting out "negative ion" to the air to make dust attracts to grounded surfaces, I plug it in for a while and found out when I touch a metal plate (the plate did not touched the output of the air ionizer) I get a zap off it, this never happened before.

So I imagine if this high voltage charge get onto PCB or some sensitive electronics which is not shielded in the same room, it might damaged them if I touch it because all the high voltage get discharged through my hands?

I've searched to see if anyone talking about this but all I've found is "ionizer help discharge ESD which use in electronic production".. but since I just get a pretty strong zap from just touching a metal plate, I doubt about this, maybe I'm misunderstood something?

So, is it recommended to put this air ionizer in the same room which I usually working with bare PCB, electronics that may or may not have ESD protection?


texts: I'm about to make a voltmeter from computer line-in. In some strange way I can not see direct current from computer. Why does it work only with alternating current? What information does captured wave contain? Could someone please explain basic principles of how does line-in work? How does sound capturing work in particular? Sorry if this isn't the right place to ask.


texts: Is single ended amplifier a subset of differential amplifier?

texts: The reason I'm asking this is that when I read about CMRR issue in amplifiers I only see differential amplifiers as if it is only a diff. amp. issue. But isn't a single ended amplifier also a differential amplifier where one input is zero with respect to the other input? Can we talk about CMRR issues when it comes to single ended inputs for a data acquisiton or it only applies to differential inputs?


texts: How to count the gate voltage and drain current from the forward transconductance value?

texts: How do i get the ratio of Vgate/Idrain according to the value of the forward transconductance in the MOSFET data sheet? The units i got is 6 siemens, but i don't know how many is 6 siemens? Note that i'm a beginner.


texts: Exporting Mbed code to build with in Eclipse

texts:
I am working on a project to move from the mbed platform, to some custom hardware. I am using the nRF51822 from Nordic. I have just exported my nRF51-DK project to GCC (ARM Embedded) and extracted it and opened it in Eclipse. It is not building however. I am getting an error code, saying

[file:/Users/george/Downloads/project_1V0/nRF51822/source/nordic-sdk/components/drivers_nrf/ble_flash/ble_flash.c#1]nse/nRF51822/source/nordic-sdk/components/drivers_nrf/ble_flash/ble_flash.c:1
make: *** missing separator.  Stop.

Should it not be flash.c ? Is there anything else I was supposed to do, rather than just running it straight out of the box?


texts: Source transformation with impedance being inductor or capacitor

texts:
I found a presentation that states the following about source transformation when the impedance is capacitive/inductive:

While electrical circuits books, like Nilsson's, says:

If I transform the upper-right circuit of the first image to the upper-left, assuming that, for example:
$$i_s(t)=cos(\omega t)$$
$$L_p=L_s=L$$
By the first image, I have:
$$e_s(t)=L\dfrac{d(i_s(t))}{dt}=-\omega L \cdot sin (\omega t)$$
By the second:
$$e_s(t)=Z_L \cdot I_s=j \omega L \cdot cos(\omega t)$$

    Is the first figure's method incorrect or am I doing something wrong?


texts: why pn junction turn ON for lower voltages at higher temperatures?

texts: Increase in temperature produces electron-hole pairs. So number of holes created due to temperature equal to number electrons I believe. If you apply some voltage there will be equal number of majority and minority carrier generated due to temperature hence they should balance each other and there should not be any shifts in characteristic curve. But curve shifts to left (knee voltage reduces to lower voltages as temperature increases) why?


texts:
I'm implementing a Prony decomposition to analyse power system signals in python. I think the code is generally working, but reconstructing a signal from the decomposition shows that it's not "perfect".

Part of the issue is that I have no idea what order I should use. Are there any rules of thumb or best practices for selecting the order? Also, how many components should be used to reconstruct a signal? I've defaulted to using order/2, but I've tried a number of options for both parameters, but they're all not great.


texts: What terminals of bridge rectifier to use, if I want it to behave as a high-current diode?

texts:
I have a 12V power source that can deliver 25A (DC).  I intend to use something around 15A .. 20A on a circuit that includes a diode. However, I can't find a diode that can handle that much current, and I've seen people recommending bridge rectifiers instead.

I happened to find a KBPC50005 bridge, which is rated 50Amp / 50V.

However, I'm not sure how to make the connections to get something equivalent to a 50Amp diode -- there are two ways, as far as I can see:

simulate this circuit – Schematic created using CircuitLab

This is what I suppose:

the second setup would result in a higher voltage drop (because I would be using two paths, each with two diodes in series). In the first setup (A-B), I would be using a single diode, so a lower voltage drop;
the second setup would be equivalent to diodes in parallel, so it would perhaps allow for an even higher current. The diodes are in a single package, so the usual problems with diodes in parallel would not happen;

Am I wrong?


texts: How do I get my 555's output to cycle through different paths with just one button?

texts:
I'm an amateur so this is a basic question.

I have a 555 in astable mode producing a frequency which I put through a speaker as a musical note ("musical" is debatable). I can get lots of different notes by changing the resistance going through the 555.

I want to set up a circuit where I can cycle through 8 notes or so with just one button that you keep pressing. That is, I want the output of the 555 to be diverted through 8 different paths in turn when I press the same button. Each path has different resistor combinations so produces a different note.

I have done some research and a 4017 decade counter or a multiplexer seem like they could work, but I am really in the dark. In particular I don't want to distort the frequencies from my 555 since it will make the notes flat or sharp.

What are the common solutions for this situation?


texts: Switching regulator high frequency ripple

texts:
I've built a switching power supply with a TI 16006Y IC. It seems to be doing its job correctly however I'm having trouble getting rid of the high frequency ripple that occurs for a short period every time the power supply switches on. The white reference was with a different set of output capacitors. The current output bypass capacitors are (2) 47uF tantalum caps and a 0.1uF cap all in parallel which seems to be doing ok with getting rid of the low frequency oscillations. But the high frequency spikes are still there.
Any advice would be helpful.


texts:
Hope everyone is keeping safe :)
I am wanting to build a portable power supply with a slight difference.
I had a quick look on the site and I cant find what time looking for.
I want to use my spare 18650 batterys and essentially convert it to 9 Volts.
As a temp solution I have my batterys (2 in series that I charge up separatly) then it goes to a CN6009 then it comes out at 9 Volts to the socket I need.
In an ideal world I could do with some more batterys to make it last longer and some type of charging circuit (a mobile phone charger thing)
I am a bit of a noob to all this so please be nice :)
Also if you could answer with a drawing that would be amazing EG
Thank you inadvance


texts: What voltage should DIY laptop external battery have?

texts:
I want to make an external powerbank for my laptop, since its battery cannot be removed (MSI GP62M 7RDX).
What voltage should my battery have?
18650 elements have nominal voltage of 3.7.
My laptop power supply has the following parameters:
19.5 V / 6.92 A / 135 W.
Should I get to 19.5 voltage as close as possible? 19.5 / 3.7 = 5.2, so it makes 5S battery (or 6S?).
Or could I, say, make 3S battery and use a boost converter?


texts: Can I use a different V+ terminal if one has burned out?

texts:
I own a Anet A8 3D printer, and I have accidentally burned out I guess one of the V+ terminals and it doesn't function well.

As the printer has multiple terminals for V+ can I just plug in to another terminal?

Picture of my PSU:

Normal PSU


texts:
I have a circuit that has about a 1V input that gets boosted to 3.3V.

To enable the boost converter IC, a switch is pressed which causes the enable signal [EN] of the converter to go high (and stay high, there is more circuitry to latch the signal that is not shown).

After this, I'd like to be able to sample the push button presses with a microcontroller [SW_IN], but the 1V logic level is too low; it needs to be around 3.3V, the boosted voltage.

simulate this circuit – Schematic created using CircuitLab

I am considering just putting a diode at the output of V1 to prevent any back feeding, but I am a little worried about the signal integrity due to forward voltage drop. The minimum enable voltage for my boost controller is 0.8V, so I'd have to get a pretty low voltage drop diode and am wondering if there's a better solution.

simulate this circuit

I also considered a tri-state buffer where the boosted voltage turns off V1 and is connected to the switch input.

simulate this circuit

I'd like the solution to be as inexpensive as possible, so I'm wondering what the optimal and simplest solution would be and if there's options I'm missing.


texts: Calculating phase angles from symmetrical components

texts:
I'm getting the following values from a meter:

NegSeqMag   40397.95
NegSeqPhs   0.4087467

PosSeqMag   229.4626
PosSeqPhs   -134.8785

ZeroSeqMag  132.43
ZeroSeqPhs  -66.25984

I've watched these videos trying to understand how it works (I'm not an electrical engineer):

https://www.youtube.com/watch?v=s_mslfzRJzQ
https://www.youtube.com/watch?v=8hG8XwbLsw8

Based on that, I tried the following:

$$va_{angle} = ZeroSeqPhs + PosSeqPhs + NegSeqPhs $$
$$vb_{angle} = ZeroSeqPhs + 240 + PosSeqPhs + 120 + NegSeqPhs $$
$$vc_{angle} = ZeroSeqPhs + 120 + PosSeqPhs + 240 + NegSeqPhs $$

However, the results do not seem correct. How can I calculate the phase angles?


texts: Amplifier and Speaker matching while in Bridged Mono Mode

texts:
I’m a little confused as to how I should be matching my amplifier and speaker in bridged mono mode. Let’s say I have the following,

• Amplifier Power: 100W at 8 ohms
• Amplifier Supported Output Impedance: 4-16 ohms
• Speakers Rating: 8 ohms

Firstly, when we are in bridged mono, it would theoretically give 400W. But what happens to the output impedance: Does it remain the same, halve or double - 16, 4 or 8 ohms?

Secondly, is it safe to use my 8 ohm speakers if I keep the power low?


texts: STM32 L0 wake from STOP mode with WAKEUP pin

texts:
I am attempting to wake an STM32L073RZ from stop mode using WAKEUP_PIN_1. I'm running MbedOS 5.11. Unfortunately throughout all of the documentation (Mbed/STM) I can't find a callback function to use. I.e. to wake from the RTC you will use the callback function: HAL_RTC_AlarmAEventCallback(RTC_HandleTypeDef *hrtc) but I cannot find an equivalent of this for WAKEUP pins.

I'm attempting to use pin PA0 (PWR_WAKEUP_PIN1) as my external interrupt. I attempt to configure it according to section A.7.2 of this reference material, my entire program looks like this:

#include "mbed.h"

#define LOG(...) pc.printf(__VA_ARGS__); pc.printf("\r\n");

Serial      pc(USBTX, USBRX);

void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
    LOG("Handle interrupt here...");
}

int main()
{
    pc.baud(9600);

    /* Configure PA0 as External Interrupt */
    GPIOA->MODER &= ~( GPIO_MODER_MODE0 );  // PA0 is in Input mode
    EXTI->IMR |= EXTI_IMR_IM0;              // interrupt request from line 0 not masked
    EXTI->RTSR |= EXTI_RTSR_TR0;           // rising trigger enabled for input line 0

    // Enable interrupt in the NVIC
    NVIC_EnableIRQ(EXTI0_1_IRQn);
    NVIC_SetPriority(EXTI0_1_IRQn, 0x00);

    HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFE);
}

I believe this is all I need to do to detect an external rising edge interrupt on PA0, but the interrupt never gets called for me. Any insight as to why is greatly appreciated.


texts: In Eagle, why is the tstop layer larger than the pad itself?

texts: Why is the tstop aperture around a pad larger than the pad itself? I would have imagined that it would be exactly the same size, or slightly smaller, so that the solder stays only on the defined pad. Would there be any reason to make it larger, or smaller?


texts: Trying to design a switchable LED circuit with no experience or skill - please send help

texts:
I'm trying to design a circuit to connect with an Raspberry Pi and have no idea what I'm doing... apologies in advance for terrible descriptions of my problem.
I have some 1 watt LEDs (max fowrad voltage = 2 - 3.4 V, max forward current 350 mA).
I also have an RPi 3B+ model with a breadboard extension, which can deliver 3.3V or 5V with a max current of 50 mA supposedly.
I want to be able to selectively turn on one of three-six LEDs in a parallel circuit using some python code I've developed. My idea was to have a constant current LED driver split off into 3 transistors which are connected to the RPi and also connected to the LEDs. I was hoping this would allow me to select which circuit to activate based on the RPi GPIO outputs. I've attached a crude schematic diagram of what I was going for.
the questions are as follows:

is this going to work?? I'm a chemist by training and trying to do this for a project and don't want to electrocute myself/burn my flat down

the driver I bought supplies 12-24 V at 300 mA, which I now realise is between 4-5 times greater than the volts I need to drive a single LED... I was wondering - can I stick a resistor before/after the LED and the return to the driver? or someway of bringing the circuit voltage up to 12V for the driver to function? or is the best option to buy a different driver?

Thanks for any help! happy to provide more info if necessary.


texts: Low voltage/current power supply for wide range of inputs

texts:
I was thinking of simple low voltage/current power supply that can accept wide range of input voltages, up to the hundreds. Let's say, the input is 20 to 160V DC and output has to be 10V with 20ma maximum current.

Since it has to be simple, I decided that it should be some sort of linear regulator, with Zener diode used for voltage reference. The tricky part for me was that you need to put some minimum amount of current through the Zener diode for it to be effective (about 10ma, as I understand).

However, if you use resistor to limit current through Zener (as in typical circuits), the current would be ~15 times larger on maximum input (150V drop on the resistor at 160V versus 10V drop at 20V input). That would generate a lot of heat both on the Zener and especially resistor (22.5W on the resistor!). So, that does not look like a viable option.

The solution I came with is to use current source for limiting current through the Zener. In that case almost all the heat is released on the BJT (which is kind of easy to cool with proper heatsink, plus the current would not rise linearly with voltage, as in case with resistor). The base currents are relatively small, so heat there should not be an issue (about ~1W at 160V input in the schematic below, which, I guess, is fine).

Here is the schematic I designed (don't pay much attention to the values, I put whatever was available in this editor):

simulate this circuit – Schematic created using CircuitLab

(R3 is the load).

So, the question is does that look like a sensible solution at all or it is complete nonsense? How it could be improved?

P.S. It is more theoretical question of how would you design circuit for these requirements, so let's ignore safety concerns for now.

P.P.S. I understand that efficiency of the circuit is about zero. The story behind is that I saw DC motor controller which is supposed to work on 24-110 AVDC. With my little experience with electronics, I got puzzled how do they supply power for the low voltage part (MOSFET driver and timer for PWM, I guess), which brought me to this design. Since motor is like 100W, wasting 5W on low voltage part is probably ok.


texts: Why does the short circuit time constants method (SCTC) apply to large valued capacitances used for coupling or bypass purposes in a small-signal amplifier?


texts: Inducing noise for testing AC line filters

texts:
From a previous post of mine, you can see that I am trying to test the efficacy of some AC line filters. I got it to connect properly this time without frying my load, but we cannot seem to replicate the noise seen in the field (where our load is powered off the same input as compressors, air purifiers, other household appliances, etc. and is disrupting the measurements of our onboard analog and digital sensors).

In our lab, we've tried plugging in a compressor to the output of the 24VAC transformer, which is the same supply that is going to our small sensing PCB. However it doesn't seem to be inducing much noise so we cannot tell if the filters are doing anything.

Any suggestions?


texts: Why are breadboards laid out in strips of five?

texts:
The canonical breadboard layout consists of two strips of five contact points for every column, separated by a divider that allows you to accommodate DIP-style ICs. Is there a special reason why the strips are five contacts each?

Is wiring up five different components a common occurrence? My experience indicates this is actually quite rare. Is it perhaps related to the fact that five contact make up 0.5", allowing you to lay out 1"+ DIP packages?


texts: Error handling two posedge signals in “always” block

texts:
I have a problem with an "always" block in Verilog. First let me present the code:
module syncRX(clk, signal, detect, output clk_1khz);
    input clk, signal;
    output reg [7:0] detect = 0;

    //wire clk_1khz;
    freq_div div(.clk(clk), .clk_1khz(clk_1khz));

    always @(posedge signal, posedge clk_1khz)
     begin
        detect <= detect + 1;
     end

endmodule // top

module freq_div(input clk, output reg clk_1khz);
    reg [12:0] count = 0;
    always @(posedge clk)
     begin
        if(count == 6000)
            begin
                clk_1khz <= ~clk_1khz;
                count <= 0;
            end
        else
            count <= count + 1;
     end

endmodule

I got this error message (using Icestorm):
Executing PROC_DFF pass (convert process syncs to FFs).
Creating register for signal \freq_div.\clk_1khz' using process \freq_div.$proc$syncRX.v:22$4'.
 created $dff cell $procdff$15' with positive edge clock.
 Creating register for signal \freq_div.\count' using process \freq_div.$proc$syncRX.v:22$4'.
   created $dff cell $procdff$16' with positive edge clock.
 Creating register for signal \syncRX.\detect' using process \syncRX.$proc$syncRX.v:8$1'.
 ERROR: Multiple edge sensitive events found for this signal!
 make: *** [Makefile:44: syncRX.bin] Error 1

I could detect that the "always" block involved is:
always @(posedge signal, posedge clk_1khz)
     begin
        detect <= detect + 1;
     end

becaise if change "always @(posedge signal, posedge clk_1khz)" for "always @(posedge signal)" works.
Also fails in that same way:
always @(posedge signal)
     begin
        detect <= detect + 1;
     end

    always @(posedge clk_1khz)
     begin
        detect <= detect + 1;
     end

And the error disappears when comment the line "detect <= detect + 1;" in bought of cases. Then the error is related to the access to the "detect" counter register. I have not idea why I can not trigger this counter from two different signals, but in fact, I have to increase the counter in bought post edge signals (and I can figure out in my mind a very simple digital circuit doing this), I know that HDL dont allow synthesis of multiple driven register (handle register from many different always block), but in fact I can draw a OR Gate in my mind for do it, also there is many features can not be implemented without this practice, then should be a way to do in Verilog.
I add a schematic about that I have in mind:


texts: TI CC2538 radio turns off after connecting UART

texts:
Need help regarding Texas Instruments CC2538 RF module. (https://store.ti.com/CC2538DK-CC2538-Development-Kit-P4532.aspx) The module has an operating range from 2.1V to 3.6V

I'm trying to use the standalone evaluation module CC2538EVM without the SmartRF06 board by powering it up via the USB. Before connecting the UART, the module is working fine and the radio works. As I connect the UART pins (Vcc, Tx, Rx, Gnd), the radio turns off which is confirmed in Wireshark.

Kindly refer to the attached diagram.


texts: Simple circuit to detect a boolean value on usb port

texts:
I want to automatically record all my calls from my analog telephone line.

I know how to set up to record directly from the phone's microphone but the problem is I don't know when to start the recording. So a simple solution would be to hook up a simple circuit to the usb port to detect if the line is open or closed.I want usb because using ftdi or serial doesn't suit me for 2 reasons (cost and my computer does not have a serial port).

Is there a simple aproach to this problem ?


texts:
I'm trying to design a 2 bit saturating counter but am very stuck in figuring out the state diagram and building the circuit from there. This is what I understand of the saturating counter so far.

It's just like a counter (up and down) except when the maximum value that the bits can represent is reached, it doesn't "wrap" around again but rather gets pegged to that max value. Same thing if you subtract one from the largest negative element. But I'm having trouble realizing a state table for it and what components to pick to realize it. I have an up down counter which i suspect will come in handy also a mux and a 2 bit adder and a few other things but I'm thinking I'll only be using these. There's no helpful resource online for this so I'm kind of lost. Thanks


texts: SPI signal showing up on other pins of ATmega1284P microcontroller?

texts:
I'm using an Atmel ATmega1284P MCU (40-pin DIP) for a project and noticed some low frequency spikes on the ADC0 pin (pin 40). After some troubleshooting I discovered that the spikes were perfectly synchronized with the SPI communication on pins 6 & 8.

I was able to replicate the issue using the following minimal circuit:

simulate this circuit – Schematic created using CircuitLab

And the minimal code:

#include <SPI.h>

void setup()
{
  SPI.begin();
}
void loop()
{
  SPI.transfer(B00000000);
  delay(61);
}

Monitoring pins 8 & 40 using an oscilloscope I can see that the SCK is correctly jumping to 5V every 61ms, but what is weird is that I see a roughly 400mV spike on the ADC0 line. Here's a screen grab from my scope, the ADC0 probe is in yellow and the SCK in blue:

For reference, here's the pinout for the 1284 DIP:

I'm really not sure what is going on here, but it seems like some sort of grounding issue. I've tried adding decoupling caps between pins 10 & 11, as well as pins 30 & 31, but it made no difference. Any ideas on how to eliminate this spike on the other MCU pins?

Shot of the Vcc trace with 22uF electrolytic decoupling caps near both Vcc & AVcc:


texts: How can I draw in Eagle non circular through hole pads?

texts:
I made a custom part footprint in Eagle for a potentiometer ACP SPAIN 22k however in order to achieve a good fit I would like to draw non circuilar through hole pads.

If you look at a picture of the component, you'll see that the pads should have more of a "rectangular" hole rather than a circular one. I can get around this by using a larger circular hole but that would be a rough fix.

As far as my understanding goes, there is no direct way to do this on Eagle and you need to draw the holes on layer 46 (milling layer).

Could you please guide me through the exact procedure to do this? I don't understand if I can simply use the line tool on layer 46 or what tool I should use to draw the milling shape.


texts: I have a USB microphone that I'd like to supplement with more power than my laptop USB port can provide.  What I did was cut the power lines on the USB cord and fed in an external power source through those lines.  I then tested the power line connectivity by plugging in my phone, and it charged (meaning power lines are good), then tested D+ and D- lines with a multimeter, both of which showed a very small amount of resistance.  However, when I plug in my microphone and external power source, my computer does not recognize the device.  I even reconnected the power lines back to their original wire and tested it, and it worked fine, so I believe there is no problem with the wiring or connectivity.  From my knowledge, it seems to me my computer should be recognizing the device because as long as the device is powered, the USB line is pulled up and the computer will recognize there is a device present.  Is there anything I am missing?


texts: USB powered and battery powered on the same connector

texts:
I need to make this Arduino Nano-like board with one single connector: a mini USB type B which will of course be connected to the PC for programming and interface. Additionally, as it will be used away from the PC, I need to be able to connect a 6V+ battery pack using the same connector. There's no way I can fit a second connector for this.

Usually the FT232 (or similar) won't take more than 5.5V, so I've thought of placing an LDO between the USB-VCC input and the rest of the circuit. The LDO would drop about 0.3V but solve my overvoltage problem. It could take 9V easily.

My question is: will the voltage drop cause problems with the USB communication (since the FT232 will get power from a slightly lower voltage source)?


texts: Does voltage drop on power cable depend on the type of MCB used

texts:
I am trying to figure out if there is a relation between the type (A,B,C..) of the MCB used and the total power cable length that can be used with it.

Resistance will increase with the increase in cable length which will increase the voltage drop on cable but will the voltage drop be the same if I am using two different MCB's, lets say one is 10A type C and another is 10A type B.


texts: how to calibrate my multimeter temperature probe

texts:
I have a multimeter with the following temperature accuracy for its Type K probe
±3% of reading ±5C

The display is in steps of 1C
I attempted some calibration:

In ice water, the reading is 0C
In boiling water, the reading is 94C (1012.9mbar/100C)

Can I interpolate that? Would the reading at 20C be 0.2 x 94C = 18.8 C, i.e. "19" or maybe even "18"? Or are there other factors at play?
I would expect the readings to be monotonous against the actual values, but perhaps the ADC's step size and non-linearity, in combination with the display's granularity, make readings not strictly monotonous, leaving scattered "pleateaus" of readings.
Of course, one could mix the 0C water and 100C at various ratios to create a actual vs. reading chart, but not only is this tedious, I am sure also fraught with systematic and random errors. So I'd rather go with the wisdom of the group here.
The model is "DMR-6500", but perhaps the validity of your reasoning will be independent from the model/brand.


texts:
I configured my TIM4 as encoder input and everything is working well when I execute TIM_GetCounter(TIM4)
But I would like to put the timer value back to 0 (reset?) when I press a push button with an interrupt on it) and I don't find a reset function. I'm running a STM32F103 with only StdPeriph Lib.


texts: Are there any generic "how to use this part" guides for basic discretes?

texts:
Coming from a programming background, I'm used to user guides telling me how to use something, rather than how it's implemented. In the world of electronics, when it comes to discretes like, say, a MOSFET, all I can usually find is inventor, history, an overview of the theory and some implementation details.

It's quite hard to find answers to basic questions, like "does a fully turned-on MOSFET conduct more current from source to drain or from drain to source?"

Am I just looking in the wrong places? Or is the best thing to do actually understand the underlying implementation details so that I can deduce the answer from that? It always feels like a bit of an overkill trying to learn how to make MOSFETs when all I want is find out how to use them in a most conventional way.


texts:
What will the output voltage be for the given voltage regulator, if the input voltage is 12v and the load is 0.8 amps.

https://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_51262_-1

I can't make heads or tails of the datasheet in that regard.


texts: RC filter impulse response is exponential decaying but inverse Fourier is Sinc function

texts:
As we all know that the inverse Fourier transform of a frequency domain unit pulse/rectangular function (which looks like low pass filter) is Sinc function. So, I was under the impression that any low pass filter impulse response would look like Sinc function.

However, the RC low pass filters impulse response look like an exponentially decaying function.

Since both are low pass filters with the similar looking frequency domain transfer functions, why RC low pass filter response does not look like Sinc function?


texts: Have a resistor on for 400 ms then change path to a lower resistance

texts:
I'm building a guitar effect with a PT2399 IC. This IC needs a 2.2 kΩ resistor connected to pin 6 for the first 400 ms after power is applied. After that 400 ms, it can be as low as 100 Ω.
I'd like to go that low, but still have that larger resistance in place for that first 400 ms, and I'm struggling to find a good way to do so.
Could it be done with an NPN switch and a capacitor?
(For anyone interested, here is an analysis of the PT2399 by Electrosmash, explaining the requirement for greater than 2 kΩ from pin 6 to ground, during the 400 ms after power on.)


texts: Differential signalling with negative feedback

texts: Does differential signalling always comes hand to hand with a negative feedback circuit?Else the 1s and 0s would be the same!because if we have ground in the inverting pin then the output voltage will be 0 regardless of the resistances.


texts: I am trying to figure this cap out and locate a new one. It says 107K and 10K on it. Is is polarized ? what is it and where do i find one  ?


texts: STM32 hits breakpoint when TIM1 prescaler > 2

texts:
I'm generating a PWM signal on STM32F103 using TIM1. Timebase init code is:

timebase_prescale = 1;
timebase_reload = 3000;

TIM_TimeBaseInitTypeDef timebase;
timebase.TIM_Prescaler = timebase_prescale - 1;
timebase.TIM_CounterMode = TIM_CounterMode_Up;
timebase.TIM_Period = timebase_reload;
timebase.TIM_ClockDivision = TIM_CKD_DIV1;
timebase.TIM_RepetitionCounter = 0;
TIM_TimeBaseInit(TIM1, &timebase);

TIM_CtrlPWMOutputs(TIM1, ENABLE);

With some additional code to configure channel 1 and an I/O pin I get a 24 kHz output signal. Perfect.

When setting

timebase_prescale = 2;

I get 12 kHz instead as expected - but as soon as I use anything > 2 the processor stops and OpenOCD reports

target halted due to breakpoint, current mode: Thread

What's going wrong?

EDIT:

After the above timebase config, pins are initialized and the PWM is started:

void multipwm_setup_channel(int channel)
{
    TIM_OCInitTypeDef config;

    config.TIM_OCMode = TIM_OCMode_PWM1;  // or 2 ???
    config.TIM_OutputState = TIM_OutputState_Enable;
    config.TIM_OutputNState = TIM_OutputNState_Enable;
    config.TIM_Pulse = timebase_reload / 4;  // initial compare value

    config.TIM_OCPolarity = TIM_OCPolarity_High;
    config.TIM_OCNPolarity = TIM_OCNPolarity_High;

    config.TIM_OCIdleState = TIM_OCIdleState_Reset;
    config.TIM_OCNIdleState = TIM_OCNIdleState_Reset;

    switch (channel)
    {
        case 1:
            gpio_config(GPIOA, GPIO_Pin_8, GPIO_Mode_AF_PP, GPIO_Speed_10MHz);
            gpio_config(GPIOB, GPIO_Pin_13, GPIO_Mode_AF_PP, GPIO_Speed_10MHz);
            TIM_OC1Init(TIM1, &config);
            TIM_OC1PreloadConfig(TIM1, TIM_OCPreload_Enable);
            break;

        case 2:
            gpio_config(GPIOA, GPIO_Pin_9, GPIO_Mode_AF_PP, GPIO_Speed_10MHz);
            gpio_config(GPIOB, GPIO_Pin_14, GPIO_Mode_AF_PP, GPIO_Speed_10MHz);
            TIM_OC2Init(TIM1, &config);
            break;

....

    }
}

The complete init sequence is

    multipwm_setup();  // enables timer 1 clock
    multipwm_set_frequency(30000);
    multipwm_setup_channel(1);
    multipwm_setup_channel(2);
    multipwm_start();  // calls TIM_Cmd(TIM1, ENABLE);

Clock runs at 72MHz; configuration as default from some standard system startup code I didn't write myself. The 30000 Hz are what I actually wanted (calculates timebase_prescale as 1), but I tried 50 Hz just to see if my code would work and found that it failed with higher prescale values.

TIM_CtrlPWMOutputs() needs to be called before TIM_TimeBaseInit(). Now I can use whatever prescaler value I need.

But still did not always work! Adding TIM_Cmd(TIM1, DISABLE); and re-enabling the timer later seems to solve the problem - for now?


texts: The D type flip flop needs feedback from its inverted Q output to divide frequency by two. Is there an intuitive explanation for this?


texts:
How do I find the ratio
$${V_0\over I_s}$$
in the following circuit?


texts:
I normally am pretty good with electrics and they taught us about them in a few of my classes, specifically my into to engineering courses.  I however don't know a ton about solar panels so this project is a frustrating adventure to me.

Basically we have 3 Items:

12GA copper stranded wire
18V 8W 450mA Solar Panel,
Link
DC-DC step down module,
Link

So, I would think this would be a pretty simple task, solder some wire on the + and - of the solar panel and plug it into the two ports on the DC-DC converter.  However after I do this, nothing lights up.

I measured the solar panel and it was at ~19.6V [+/- .5v] (unloaded reading on meter) so all seems well there.

Now, normally I would think the DC-DC regulator is bad. So, I have tried with a different one that I purchased for a laser project that is next on the bench. (link -> buyincoins/item/46768.html#.VVGPHoCy3ak)  still doesn't light up at all.

My goal is to use this 18V, 8W, 450mA solar panel to charge a few mobile chargers that I have in the end, so it should ideally take 18V 450mA and make it 5V 2A or 1.5A (which seems reasonable to me, but even 1A is fine. I just want to sit it and forget to ensure the portable chargers are full)

Can someone please help me out here?


texts:
I am trying to simulate an electrical model (Mason Model) of piezoelectric system in LTSpice. So, I use parameters and formulas to evaluate the value of the passive elements in my circuit.

I use the following eq. for one of my capacitor:

C = {Zo}\{cos({Tou}*{t})}

which returns an error saying:

Error on line 9 : c3 p001 n007  63262.1256016315 \ 0.876872546720567
 Unknown parameter "\"

I also use 1/{f} for calculating the on time of my pulse signal but that seems to work just fine. Am I missing to define a library?


texts:
I need to isolate the SPI communication between two chips.

The bottleneck of the communication is on the slave, which apparently can handle up to 2MHz SPI clock frequency.

My idea is to do this isolation using optocouplers. On this first attempt, I used the 4n35. It was just not working, so I looked on the datasheet and I saw the chip takes 10 us to rise and 10 us to lower the signal (on the worst case). This makes its use pointless.

Can someone suggest me an optocoupler that can:

be fast enought for this purpose (2MHz, but 1MHz is also acceptable)
be easy to buy and not expensive

I searched over the internet for an optocoupler that met those requirements, but I couldn't find one that was most recommendable.

I'm open to suggestions on how to isolate the communication in a different way, if it's practical.


texts:
I am given a signal \$x[n]\$ that have the following properties:

Real and odd
Period of \$N=8\$ and Fourier coefficients \$a_k\$
\$a_9 = 6j\$
The sum of \$|x[n]|^2\$ from \$n=0\$ to \$n=7\$ is \$576\$.

I want to solve for \$a_k\$ and \$x[n]\$.
What I have are the following:
$$x[n] = \sum_{k=0}^{N-1}\alpha_k e^{jkn(\frac{2\pi}{N})}$$
$$a_k = \frac{1}{N}\sum_{n=0}^{N-1}x[n]e^{-jkn(\frac{2\pi}{N})}$$
$$\sum_{n=0}^{7}|x[n]|^2 = 576$$
I expanded the series for \$a_k\$ and ended up with something that looks like this: $$a_k = \frac{1}{8}(x[0] + x[1]e^{-jk(\frac{2\pi}{8})} + x[2]e^{-jk(\frac{2\pi}{4})}+..)$$
However, before I proceed any further, I know there must be a technique I should be using to simplify this problem, especially using the fact that this is an odd function. However, an odd function will simplify terms be helping me cancel out terms on either side of the number line.  However, in this case, since I'm only summing up on the positive side, I'm not sure how to simplify this equation. How should I proceed and how do I best use the extra information given?


texts: Showing junk data in RS485 Protocol using pic24f?

texts:
I  am working on Rs485 protocol using PIC24f microcontroller and sp3485c as rs485 transceiver ic . I have kept one pic as master and another pic as slave .
when i am transmitting any data from master my slave is not receiving any data it shows junk data by (testing in debugger pickit3). Please suggest me how to solve this issue?


texts:
I will start with that, i already ask for this question in other topic but i didn't have any anwser about my question link.
Please don't go too far in explaning difficult thing not realated with my question , please first understang my question and my difficulty before to anwser.

Since months i'm totally lost in understanding regulation loop. I mean for exemple in DCDC buck i know that Duty cycle should be +/- Vout/Vin.

But i see that, Duty cycle is set by the output of error Amplifier and can indeed change from 0 to 100 according the output Voltage state. That mean when the output voltage is equal to the reference, the duty cycle is 0. So that mean the duty cycle should oscilate between this value, And when you see the circuit of control loop is totally normal.

But why why why , when we mesure the duty cycle i can't observe it,I see any variation of dutycycle, it's jusf fixe.  see the picture with dutycyle musured in a study state  and that is totally normal too since we should have D.V =Vout/Vin

What i observe is  Duty cycle of +/- Vout/Vin.

is there a trick somewhere.

Could someone take time to explain me in clear


texts: Steppers will hold position and vibrate when sent xSTP instructions but won't move at all

texts:
Edit: setting the Wait time to 0.1 causes it to make music, yay?
I've managed to get the steppers to react to xSTP with this code:
#include "mbed.h"

DigitalOut xEN(P2_1); //Pin 74 of LPC
DigitalOut xSTP(P2_2); //Pin 73 of LPC
DigitalOut xDIR(P2_6); //Pin 67 of LPC

//DigitalOut yEN(P2_8); //Pin 65 of LPC
//DigitalOut ySTP(P0_19); //Pin 59 of LPC
//DigitalOut yDIR(P0_20); //Pin 58 of LPC

int main() {

xDIR = 0;
xEN = 0;
for(int i = 0; i < 100; i++){

        xSTP = 1;
        wait(1);
        xSTP = 0;
        wait(1);
    }

}

but now the motor just holds torque, but don't move. It does however make a slight vibration every 1 second though
I'm trying to get the SKR V1.3 board here:
https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/blob/master/BTT%20SKR%20V1.3/hardware/SKR-V1.3-SCH.pdf
to send 1 second pulses on xSTP and ySTP to get my stepper motors moving, using the MBED framework's LPC1768 pin definitions. They work with Merlin G-code instructions but im trying to get them to work with mbed. Is there something im missing?


texts:
I was at a local surplus store today and I got two LM386N ICs.  I thought I could make a really simple headphone amp out of these.  But I have no idea what the wattage of a normal headphone amp is.

These LM386 are rated 325 mW at 8 Ohm, which should be about 81.25 mW at 32 Ohm load.

Is 81.25 mW a reasonable power for a headphone amp?  How does that compare to, say, a Laptop's 3.5 mm jack's power; how about an iPhone's?


texts:
While layouting in Kicad I've encountered a problem to place a via for BGA component. I design 4 layers board, I have 20-pin BGA component on the front, and I want to place vias for it on the back side. The problem is, that the tool doesn't allow to place via inside the BGA component rectangle. In the attached picture you can see the BGA footprint in the center and the via is from the left side. There it placed without problems, but I cannot drag it into the area between the BGA component pads.

Thank you in advance.


texts: PCB layout questions for MCU breakout board

texts:
I'm attempting to route a board that is, essentially, a breakout for the LPC23xx/LPC17xx MCU. I've never routed anything approaching this complexity before, and I have a few areas of concern. I know that a four-layer PCB would be optimal, but I'm a hobbyist, and turning this into a four-layer board would make this as expensive as commercially-available options. I've based my design on a couple of proven two-layer commercial boards, so I know that it is possible to make this work. First, this is the mostly-routed board (ignore all the USB machinery on the right, I haven't even decided for sure whether to include it) (also, I know the silkscreen is horrid, I haven't worked that out yet):

1) One area of concern I have is the length of traces between the MCU and crystals (one is for the RTC, the other is for the MCU). They're no longer than either of the boards that I based my design on, but I would like a bit of validation.

2) Another concern I have is decoupling. I know that, in general, there is no such thing as too much decoupling, but in this case, I'm short on space, so I haven't decoupled ALL of the VCC/GND pairs (there's a lot!). Both of the boards I based my design on have only 2 decoupling caps, and I have three, so I may be good there. Should I work to get at least one or two more in?

3) I've worked quite hard to provide a nearly-unbroken ground plane on the bottom layer. It's broken only in a couple spots, one for the through-holes (which I think should actually be pads) on one of the crystals, and the other is the largish route for VCC to the MCU. Is my ground plane solid enough?

4) Power distribution was a particular problem for me (see my previous question here). In the end I chose to pour a large fill under the MCU, and hook it up to the VCC pin with a large trace. Is this an acceptable strategy for power distribution? If I was working with a 4-layer board, I'd use a whole layer for VCC, but I want to stick with 2-layer for cost reasons.

Overall, how have I done here? Is this likely to boot up, or should I head back to the drawing board?


texts:
Quick question - I'm using a RS485 transceiver for transmit only, and for a SIOC8 part there are two commonly used I've seen on the internets:

MAX485 @ (£)1.83
& SN75176BD @ 0.271
and there's ADM4852ARZ @1.67
(lowest qtys to compare)

Most specs seem to compare, but i don't see any transmission rate info for the Texas part...

But even so - why such a massive PPU difference? Is there any advantage in the more expensive parts for the 250kbps data rate DMX runs at?

Power is not an issue. I'm going for the cheap part!

SN75176BD it is!


texts: Connect External Memory through SPI protocol

texts: My idea is to connect a Chip which doesn't explicitly support external memory but has SPI protocol and I2C. So far I understand I have only 3 pins for SPI. Wasn't able to find an approach (schematics) to connect a flash memory with the 3 pins and should and what other practical problems should I solve to achieve that ?


texts: Safe to replace just some cells in a NiMH battery pack?

texts:
The battery pack of my Roomba is made of 12 sub-C NiMH 1.2v cells; two of them are down to around 0.5v, and the Roomba won't work.

Can I replace just these two cells with brand-new ones? Will this be safe (as in "not exploding or causing a fire") if I use the same tech and voltage (and perhaps a greater or equal capacity)?

Found this question which leads me to think it should be OK, although my question is slightly different. Many other questions have safety concerns, but they're usually about mixing different kinds of batteries, or mixing voltages, etc.

I don't know what I don't know, so I thought I'd better ask!


texts: Buck converter LM3671 acting as a (weird) voltage follower

texts:
I am making a circuit which has buck converter LM3671 inside: http://www.ti.com/lit/ds/symlink/lm3671.pdf
Schematics are attached at the bottom of this post. In real application, power source is 3xAA/AAA batteries which should buck-convert voltage to 3.05V.

Input capacitor: 4.7uF

Output capacitor: 10uF

Inductor: 2.2uH (CDRH2D14NP-2R2NC)

Set output voltage(with resistor feedback network): 3.05V

The problem I am having is that output is always 0.2V lower than the input. It starts at very low voltage(below 2V) and continues up to 5V. At larger voltages, the output is 0.1V lower than the input. That is at the output current of 20mA.

At smaller output currents, the difference between input and output is even smaller.

I tried a lot of things, can not find the source of the problem. I am using suggested schematics from the datasheet and suggested components from it. What needs change so IC stops following voltage?


texts: How do I develop for STM32 discovery on Linux?

texts:
I have an STM32 discovery board and would like to be able to program it on Linux.

What is the easiest way to do this?


texts: Verilog "Tick" Generation; Concern over hold time?

texts:
In Pong Chu's "FPGA Prototyping by Verilog Examples" he recommends using a periodic enable "tick" to divide the clock while maintaining a synchronous system (to avoid putting the system clock through combinational logic).

The example for a counter (r_reg) generating a "tick" uses a mux and comparator:

assign max_tick = (r_reg == TICK_VALUE) ? 1'b1 : 1'b0;

Example of generating the tick (simulated):

Things seem to simulate fine using this description; But, is there any reason to be worried about violating hold time for the next element in series when using the output tick generated in this manner as an enable signal? If not why not?

To clarify, my understanding is that the enabled device would see the tick in the above example at the out=0000 rising clock edge, but the tick is already being driven low again by that clock edge - would there be a concern over violating the hold time?


texts: IO clock pin far from design, reduce propagation delay

texts:
My design is deployed around a particular tile in the FPGA, mainly because of a gigabit transceiver that is located there.
However one of the clocks needed for the gigabit transceiver has to come from a pin that is on the far end of the die.The propagation delay of that clock causes timing errors.
What would be a way to reduce the propagation delay of a clock in such an arrangement?


texts: Two parallel wires with no resistance - why it's wrong?

texts:
I've built the scheme below in circuit simulator and it didn't work because of "wire loop" mistake. Why it's wrong? Why it's wrong physically?

The simulator is falstad.com/circuit


texts: Finding an inexpensive programmable, cellular data device

texts:
I need to find a device with the following characteristics:

Programmable. A few kb of ROM will suffice.
Can connect to a cellular data network.
Has one digital pin input.
Power consumption is not an issue, I can leave it connected to a power supply all day.
Inexpensive, below USD$100 per unit.

In other words, I'm looking for something similar to the PIC Ethernet Micro Web device described here but with a cellular data modem instead of ethernet.

Can anyone suggest where to look for such devices and/or suggest a specific device?


texts: STM32F0 - interrupt/breakpoint not working on certain hardware

texts:
OK I realise this sounds like a dumb/noob question but please do read it through before calling me an idiot - at this stage I'll gladly take it if you can spot where I've gone wrong!

The scenario:

We have an existing working PCB design using an STM32F051K4, multiple boards have been built & programmed and all have performed as expected.

Populating a new bare PCB with just the micro, its associated smoothing/decoupling caps, and BMP/SWD (debug/ICP) header the SysTick interrupt would not fire and breakpoints set in the debugger would not trigger (setting break main would never trigger!).

I have tried several fresh boards, micros from two different batches, getting a more skilled colleague to solder the board... and none of them work!

The complete environment:

Boards are a fairly basic PCB with STM32F051K4U6 / K6U7 (UFQFPN32 package) microprocessor plus a couple of 100n / 4u7 capacitors around the 3v3 rail.

In the test setup, the board is powered, programmed, and debugged by a Black Magic Probe (BMP) via GDB.

The firmware is based on generated code from STM32CubeMX using low-level (LL) libraries, compiled in SW4STM32, initialising only the basic system clock / systick and setting all GPIO pins to analogue (floating / High Z).

The pseudo-code of the entire thing is as follows - standard init purely as-generated by CubeMX:

LL_Init();
SystemClockConfig(); // Include SysTick IRQ
LL_SYSTICK_EnableIT(); // Enable the SysTick interrupt
MX_GPIO_Init();
while(1)
{
    count++;
    //optionally toggle a pin here to prove it's running
}

The SysTick_Handler simply increments a global ticks variable.

Then the main loop literally just increments a count while we wait for the SysTick that never comes.

The code compiles, and via GDB/BMP downloads and runs - in the "good" board I can set break main and break SysTick_Handler and both will be triggered as soon as the board is run.

In the "bad" boards the breakpoints are never tripped and the interrupt never fires (ticks remains 0) despite the main loop counting upwards (and, if I toggle a pin in main(), I can see it toggle). However, the micro can be stopped and single-stepped and GDB reports no errors setting breakpoints. programming, etc.

I have checked the interrupt vectors in the startup code and they are as expected.

I am really stumped by this, my best-guess is there's some pin that needs to be pulled up or down or something, or perhaps some extra power rail smoothing is needed somewhere that the fully-populated board introduces, but I would NOT expect the micro/debugger to be that sensitive?

I've checked and re-checked the code, the boards, the components fitted, the soldering job, and my sanity (TBC) to no avail.

Any ideas gratefully received at this stage!

Edit to address questions in comments (in order & as I can):

@ChrisStratton:

The binary is identical every time, from the working running board I am then detaching GDB, issuing BMP "power disable", swapping boards, "power enable", scan, re-attach, load the binary, run. Not touching the IDE at all.

Hard to be 100% sure the ground pad is soldered as it's under the chip in the UFQFPN32. All power pins (2x VDD + VDDA) are connected and have smoothing caps per the datasheet.

I have not (yet) tried other interrupts as I would have to write new code to interrupt from a GPIO pin for example.

I don't have a discovery board with this micro on so can't try that.

Linker & startup are generated by CubeMX for this part and are obviously working on the "good" board with no modification.

@SamGibson:

The "bare" board is minus peripherals such as MAX232, I2C EEPROM, external voltage regulator, etc. just has the micro, debug header, and power supply caps / relevant pullups (BOOT0, NRST) fitted.

I'm not currently in a position to post photos/schematics, I will if I can.


texts: I've seen many boads with weird zig-zag shaped tracks just like the one below. Why are they designed like that?


texts: Relation between internal resistance and chosen scale on analog/digital voltmeter/ammeter

texts:
On Introductory Circuit Analysis of Boylestad I found out the following about the relation of internal resistance of a multimeter with the scale choosen on the instrument.

Analog voltmeter: internal resistance does depend on the scale chosen
Analog ammeter: internal resistance does depend on the scale chosen
Digital voltmeter: internal resistance does not depend on the scale chosen

Is all of this true? How can the internal resistance of the digital voltmeter be independent on the scale chosen? And is it the same for the digital ammeter too (i.e. also in that can internal resistance does not depend on  the scale choosen)?


texts: Does polling a DS1307 too frequently affect accuracy?

texts:
I did some research, and I found contradictory response on the web. I'm polling a DS1307 on an loop, with an Arduino, that takes about 20 ms to run, so basically I'm polling the I2C interface 50 times in a second. Is this affecting the time accuracy of the IC?

ADDITION
I did a lot of testing and I2C wasn't causing any clock drift, my poor accuracy had another cause, see this question.


texts: GPS gives weird characters when powering my ATMEGA328 on and off?

texts:
i got a problem with my GPS controlled by ATmega328, when i download the code using arduino ISP the GPS works fine and the lcd displays correct data, but when i remove the power from the atmega328 and connect it again the GPS starts to send weird data to the lcd.
the two pictures below illustrates my problem :

      #include "ALCD.H"
      char rowCount;
      char lastPOSy;
      void lcd_reset()
      {
      lcd_port_dir=0XFF;
      lcd_port = 0xFF;
      _delay_ms(20);
      lcd_port = 0x03+LCD_EN;
      lcd_port = 0x03;
      _delay_ms(10);
      lcd_port = 0x03+LCD_EN;
      lcd_port = 0x03;
      _delay_ms(1);
      lcd_port = 0x03+LCD_EN;
      lcd_port = 0x03;
      _delay_ms(1);
      lcd_port = 0x02+LCD_EN;
     lcd_port = 0x02;
     _delay_ms(1);
    }

     void lcd_init (unsigned char rows)
     {
     rowCount=rows;
     lastPOSy=0;
    lcd_reset();         // Call LCD reset
    lcd_cmd(0x28);       // 4-bit mode - 2 line - 5x7 font.
    lcd_cmd(0x0c);       // Display no cursor - no blink.
    lcd_cmd(0x06);       // Automatic Increment - No Display shift.
    lcd_cmd(0x80);       // Address DDRAM with 0 offset 80h.
     }

   void lcd_cmd (char cmd)
    {
    lcd_port = ((cmd >> 4) & 0x0F)|LCD_EN;
    lcd_port = ((cmd >> 4) & 0x0F);

    lcd_port = (cmd & 0x0F)|LCD_EN;
    lcd_port = (cmd & 0x0F);

    _delay_us(200);
    _delay_us(200);
     }

   void lcd_data (unsigned char dat)
   {
    lcd_port = (((dat >> 4) & 0x0F)|LCD_EN|LCD_RS);
    lcd_port = (((dat >> 4) & 0x0F)|LCD_RS);

    lcd_port = ((dat & 0x0F)|LCD_EN|LCD_RS);
    lcd_port = ((dat & 0x0F)|LCD_RS);

    _delay_us(200);
    _delay_us(200);
    }
    void lcd_gotoxy(char posX,char posY)
 {
 if (posY==0 )
    lcd_cmd((1<<7)+0x00+posX);
  else
  {
    lcd_cmd((1<<7)+0x40+posX);
  lastPOSy=1;
   }
    _delay_us(40);
  }

 void lcd_clear(void)
 {
lcd_cmd(0x01);
_delay_ms(2);
lcd_cmd(0x02);
_delay_ms(2);
}

 void lcd_putchar(unsigned char data)
 {
 lcd_data(data);
 }

void lcd_puts( char *str)
{
unsigned char i=0;

while(*(str+i)!='\0'&&i<rowCount)
{
lcd_data(str[i]);
i++;
}
if (i>rowCount-1&&lastPOSy==0)
{
    i=rowCount;
    lcd_gotoxy(0,1);

while(*(str+i)!='\0')
{
lcd_data(str[i]);
i++;
}
}

}

void lcd_putconsts(const char *str)
{
unsigned char i=0;

while(*(str+i)!='\0'&&i<rowCount)
{
lcd_data(str[i]);
i++;
}
if (i>rowCount-1&&lastPOSy==0)
{
    i=rowCount;
    lcd_gotoxy(0,1);

while(*(str+i)!='\0')
{
lcd_data(str[i]);
i++;
}
}
}


texts: Can Texas Instrument's INA332 really be used for EEG?

texts:
On TI's datasheet, it specifically lists EEG as one of INA332's potential uses.

EEGs are microvolt level signals, and the INA332 has input offsets of +/- 2 milliVolts.

73db CMRR is quite low, but I argue the input offsets make it impossible to measure a microvolt level signal effectively.

This is an instrumentation amplifier "Designed for low cost"... however I would argue it is not difficult, but physically impossible to pick up an EEG signal using this IC.

http://www.ti.com/lit/ds/sbos216b/sbos216b.pdf


texts: I have an extremely basic electronics experience (op amps, filters...not much past that) and need to generate sound from a varying voltage voltage signal. I simply want it to increase in frequency/pitch as voltage amplitude increases. Can this be accomplished with simply running the output into VCO and a speaker? What additional components would I need?


texts: Do I need MAX232 when using USB-to-Serial cable?

texts:
I am willing to build an AVR JTAG debugger (I grabbed from here: http://aquaticus.info/jtag) but the circuit uses COM port and it has MAX232 transceiver. My Laptop does not have COM port, so I need a USB-to-Serial cable.
My question is, do I have to add the MAX232 circuit if I'm going to use USB-to-Serial cable?

I have done some search and found that some cables are implemented with RS232 transceiver, on the box of my cable they say it supports the RS232 interface... is it the same? (http://www.unitek-products.com/en/product_detail.php?id=12)

If I didn't have to add the MAX232, is it necessary to invert the signals going to MCU? If it is, why?

I am sorry for the long questions, but it is my first time to deal with the RS232. Thank you very much in advance.


texts: What switch do I need to enable/disable fan with wind speed measurement by a DIY anemometer?

texts:
I'm going to be making a device for burning man that will effectively evaporate grey water from our camp. This will be mostly wind powered, however when there isn't any wind, I plan on using a high torque, low rpm 12V dc motor to power the device. The power to the motor will be provided by a set of Rynology 100W solar panels which will power up a battery store.

Here is what I would like to do. I want to be able to determine if there isn't any wind in order to engage the power to the motor to take over operations until the wind returns. I plan on achieving this with a DIY Anemometer that is attached to an old CD player motor. When the little CD motor is spun by the wind, the anemometer will produce a little voltage. I would like a switch of some sort that can detect that little voltage, and if its detected, to close the 'gate' that controls the power from the battery store.

It seems I would have 1 lead coming into the switch that will carry the small voltage from the motor, and then two leads one end attached to the battery bank, and the other end attached to the 12V dc motor -- which can be interrupted if there is voltage detected on the aforementioned lead.

Is this a thing? Can I pick this voltage detection gizmo up at a small electronics store? What is this thing called?

EDIT: here are more details of the parts I'm looking at in terms of the motor. This is the motor I will be using to drive the device when there is no wind https://goo.gl/2TWwNS . I haven't decided yet but I'm pretty sure something like this will be used in the aeronmeter https://goo.gl/l8cFUd which seems to be able to produce a little voltage when spun.. here it is in this youtube video... I dont have enough reputation to put more than 2 links in my post. So I left the youtube link in the comment to Transistors suggestion


texts: Two 5V2A powerbanks draw different current under same conditions?

texts:
I have 2 different powerbanks, both have 10000 mAh and both are rated for 5V 2A power input.

I have noticed that they draw a different amount of current despite using the exact same charger (5V 3A), same port and the exact same USB-B-Micro cable.

One of them draws 1.6A while the other one draws only 0.7A. Same results on further retries.

How can there be such a difference?

Is the flawed latter charging IC (0.7A) too paranoid of overdrawing current?

Edit 1:

The slower powerbank that charges at 0.7A is newer and has been used much lesser than the faster powerbank so far.
Both powerbanks only charge faster when compromising cable length. The limit in each case is 2A as the specification said, which can only be reached on slower powerbank when using a cable shorter than 10cm/4 inches. However, one of the powerbanks charges significantly slower with the same cable length, in fact the exact same cable.  0.7A with the exact same cable as the faster powerbank at 1.6A.

Edit 2:

Both of the powerbanks were at around 25% of charging state during the test. This means that their internal terminal voltage of the Lithium-Ion cells is rather low but very similar.
According to imprint, both powerbanks use Lithium Ion, not Lithium Polymer.
Again: Both are tested using the exact same cable.


texts: Overvoltage Protection Circuit for 5V limit

texts:
I found surfing internet an overvoltage protection circuit where I need to choose the value of R1 and D1 to set the value of the trip voltage to protect the load circuit.

How should I correctly choose the value of R1 and D1 for a trip voltaje of 5 ~ 5.2?

Is it correct to use D1 zener BZX84C5V1 of 5.1V?


texts:
Is is possible to use capacitive touch as a power switch for an embedded project?

Can a microcontroller turn itself off and somehow still monitor an input pin?  Or is there a dedicated IC that can cut and enable power to the rest of the circuit while using very little power itself?


texts: Remove Contactor Noise from Load Cell Reading

texts:
I have connected my ADS1231 with STM32F030R8T6 as shown in the attached image.

I have given 3.3 V power to both micro controller and adc. I am connecting load cells and i am getting satisfactory readings. I am powering my smps that gives me 15VDC and .5mA output.

The problem - Whenever the contactor switches or whenever contactor consinously switches besides my device there is a fluctuation in load cell readings. I am giving 230 VAC to my device and contactor from common point.
I have measured the voltage using the multimeter and it is stable. I have also measured the millivolts on the S+ and S- line of the load cell and they are also stable. I don't know why there is fluctuations in my readings as soon as contactor starts switching.

Any advice will be of great help. I can also upload the schematic if needed.


texts: How to fix rounding errors on microcontroller?

texts:
Here are the specs for the chip/chip family that our vendor is using.

For our product we are asking them to perform a calculation by multiplying a number by a factor that has a decimal point...for example: 1.07, 0.93, etc.

We are then asking them to round to the nearest integer.

However, the number that they calculate sometimes have a rounding error. Ex: On my calcuator 56 * 2.36 = 132.16...rounded to 132.  However, the microcontroller will return an answer of 133 displayed on an LCD of our product.

My question is, how can this be fixed? I've been asking the vendor many times and they can't seem to get it right.

Is calculating floating point number really hard for microcontrollers that don't have that native function? (Related question: DIY FP - Implementing floating point math on a microcontroller without a hardware FPU)

UPDATE
The range for the results are 1 to 780.


texts:
In eTap, is there a possibility to run Load Flow analysis for multiple configurations of a one line diagram in a single iteration? This will save time taken for individual report generation and comparison.

Thanks.


texts: Solar cells with 5v regulator: would it supply more current than available?

texts:
I recently bought online three solar panels rated 6v x 500 mA for some circuits I had in mind. What I got instead were 12v cells, and I am certain they are rated 250mA, since the seller had those too.

They were all the same price, so, instead of complaining about it (and wait some extra time for the exchange shipping process), I decided to go along and rethink what to do with my circuits. After all, it is (sort of) more juice.

Most of my ideas are limited to 5v circuits, and a 7805 regulator would do the trick nice and smooth. I just wonder whether the 7805 can supply more current than it has available (if necessary), or it would take a DC/DC converter to achieve this.

Let's say, in a full on sun condition with the cell at its peak (12v x 250mA), would the 7805 be able to supply 5v x 400mA?


texts: Reduce effect of supply voltage on pulse stretcher

texts:
Considering the following simple pulse stretcher, how can I reduce the influence of supply voltage on the pulse length?

simulate this circuit – Schematic created using CircuitLab

I would like to stick to a discrete solution, so please don't suggest the 555 timer or similar unless it can withstand 36V peak.


texts: How do I choose the current sourcing pin in CTMU? (pic microcontroller)

texts: I want to configure CTMU to apply current on pin 17 (AN10), and then measure the voltage. I looked at the CTMUCON and CTMUICON registers in PIC24F16KA101(datasheet). There are no bits to determine which analog pin would source the current. Am I missing something?


texts:
I am currently working on a magnetic levitation project using a Hall effect sensor for distance measurement. I drive the coil using two 12 V car batteries in series to form a 24 V DC source, a MOSFET and a 3900 Hz PWM signal from my Arduino.

Here is my circuit:

I have to map the field strength (-512 to 511) created by the coil to the input signal (0 to 255). I expected this to be a linear relation, but my readings were quite noisy:

I reduced it a lot by adding a bypass capacitor to the Hall effect sensor output (C1):

However, I don't think it's clean enough to get a stable magnetic levitation.

My questions are:

Why does the signal behave like that? Is it measurement noise, or is it the field generated by the coil messy?
How can I improve this?

Here is the code I use for the measuments:

int field[256];
int val;

void setup() {

    setPwmFrequency(MAGNET_PIN,8); //Sets the PWM frequency to 3900 Hz
    Serial.begin(9600);
    Serial.print('[');

    for (int i = 0; i < 256; i++){
        analogWrite(MAGNET_PIN, i);
        delay(50);
        val = analogRead(SENSOR_PIN)-512;
        field[i] = val;
        Serial.print(val);
        Serial.print(", ");
    }
    analogWrite(MAGNET_PIN, 0);
    Serial.println(']');
}

void loop() {

}

Here are some pictures of my setup, as requested:

Here is a picture of the signal after adding a 240 Ohm resistor to the LED:

Later today i encountered a new problem. The output now looks like this:

I am a bit confused, because I have not really made any changes. Could it be that my batteries are running low?


texts:
I'm building some Heated Motorcycle Grips and I think my calculations are off. Can anyone help me verify that for 10 feet of 20 gauge Nichrome 60 wire, I have the correct Ohms, Watts, and Amps for the given temperature?  Wattage seems really high and the Ohms seem low. But maybe I'm wrong.

I'd like to get the Wattage closer to 15-20 Watts. The Voltage should be constant and I plan to adjust the temperature with the right Potentiometer (If I can figure out what that needs to be). Thank you for your help!

You can copy my Google Doc here and play with the formulas.

Source: Temperatures and respective Amperage per foot for that wire
Source: Resistance per foot
Source: Basic Ohm Laws


texts: transition speed causing issue with jk flip flop

texts:
i'm using jk flip flop to latch on a state given by 2 switches to either stay ON or stay OFF, knowing that one of them could stuck on ON which is why i use one of them as the clock input for the 4027B which works fine on simulation but not in the real pcb

i've read that the transition time on this flipflop could cause a problem but i'm new to this so i was asking for help to why this won't work (all the circuit is revised and voltage is correct on all terminals of the 4027 but the output which sometimes output around 2 volts and other time doesn't)

link to a similar problem caused by the transition time Slow clock edge causing issues with D flip flop behavior

also i've achieved the same design using the 4013B which is a D flipflop, would the new one work? is there an easier alternative other than using a microcontroller ?


texts: Single current source with parallel loads for many RTD sensors

texts:
I'm trying to build a circuit that contains multiple 3-wire RTD PT100 sensors (12 of them). I have a microcontroller with plenty of ADC pins so I could potentially measure the RTD and the wire resistance on the ADC without an extra opamp to cancel the wire resistance out.

The question I have is about the power source for exciting the RTDs. Can I have a single current source and power all the RTDs in parallel (or should it be series?) from that single source, or do I need each of my RTDs to have a separate current source?


texts: Deviation in the switch current in a flyback converter

texts:
This is the current waveform of the switch and the Vds of the MOSFET.
Ideally, the current should fall off in a normal fashion with the switch turns off.
Here, the current fall stops and becomes flat for some time and then falls again.
Unfortuinately, the flat current here is flowing when the switch is operating in the active region and resulting in huge power losses.
Any views here as to why this is happening?


texts: 2N7000 Mosfet destroyed during soldering?

texts:
I have been having problems with 2N7000 mosfets that perform perfectly on the breadboard, but when moved to a perfboard start failing. I'm on my third iteration now, replacing all mosfets, between iterations having eliminated possible other sources for failure. On my third attempt I've been probing each separate mosfet for shorts and testing them with the uC between soldering the next. After soldering the third of eight in total, all three suddenly failed. This time they failed having not a shorted gate-drain, as before, but turning the gate ON/OFF has no effect, current now always flows from Drain to Source. I'm quite desperate at this point. :(

I've always been very careful with ESD, always handling the mosfet by the plastic, not the pins. Last run I moved my soldering iron to a grounded socket.
Before starting handeling components and soldering, I always ground myself by touching the ground prong on the wall socket.
I've reduced soldering temperature to 250 C.
For testing purposes I'm switching an 1mA LED, at 24V (I verified the current).

My setup is as follows: A microcontroller* provides 0/5 volt to the gate of the mosfet (100ohm resistor on that). On the Drain, there's the LED with a current limiting resistor. Source is connected to ground. Basically there are no other components.

simulate this circuit – Schematic created using CircuitLab

Since everything is OK on the breadboard, and things start failing after soldering, but never after the first mosfet. I'm fairly confident that something goes wrong during soldering. What could I possibly do wrong here?

*) To be precise, an PCF8547 connected over i2c to an 5V Arduino.

EDIT: I verified that the wall socket is actually grounded.

UPDATE: I decreased temperature to 250C, no luck. I'm fairly sure that I'm not a source of ESD as I'm grounding myself throughout the soldering process, before and after. My suspicion is now on the cheap (but grounded) soldering iron. I'm going to replace it with a soldering station soon, hope that helps. Any additional insights/tips are welcome, I'll keep monitoring this topic and post new findings when the soldering station is in. I may also get some ESD workplace stuff like a strap, I have still to check what's available in this department.

EDIT & UPDATE: Decreased temperature further down to 250C. Now waiting for delivery of two new soldering irons.


texts:
I have a stepper motor ( Model = 23KM-K381-01V , NO.T6Z23-07 , DWG NO.56AA80112).

Motor Specifications:

Motor is unipolar , 6Wires , 2A current , 1.8 deg step angle..
Motor is second hand.
I do not have datasheet of the motor.
and the worst thing is no wire is connected to the motor. so I can not take benefit of color coding.

So my question is how do I know that which wire of the motor should be connected to A+ , A- , B+ , B- of the stepper motor driver...

Thanks in advance for the help.


texts:
Consider the simple circuit schematic below:

1) Would a high voltage (say 1kV-25kV) human body ESD discharge event (1ns rise time, 100ns total) at OUT have a negative effect (damage or destroy) the electrolytic capacitor when in the polarity as shown?

2) Do ESD events in general cause issues when using electrolytics with the polarity such that the + plate is facing the high voltage spike (positive polarity)? Or does the spike need to be clamped approximately to the capacitor's rated voltage for proper reliability?

I haven't been able to find much information about this.


texts: How to go about decoding baseband from RF?

texts:
I'm designing the avionics portion of an ADS-B transponder and have everything done except the one thing I just can't figure out is decoding and encoding the baseband signal. I'm kind of under the gun to get things moving along for my senior design project so that's why I'm reaching out on here so forgive my ignorance. I have been spending a lot of time learning the ins and outs trying to understand but just hitting a wall.

Another person in my group is designing the RF portion and from what he says we got an RF LDMOS producing baseband signals and I have to generate a signal as well to go to it.

I'm using an ATSAM MCU and currently have the schematic made for ATSAMC21G but from what I've been looking at and asking on ATMEL community forums it might not be powerful enough and might have to use ATSAMD or ATSAME models for a bigger clock frequency. I have been looking over the data sheets and not sure if I need to tie this into the TC/TCC, USART, LIN, ADC, PWM, or something else. Once I know how to tie it all together I can get my PCB laid out and ordered. While I wait for that to be made I can figure out the code portion.

I again am sorry for being a newbie at this... my classes thus far have just been really basic MOFSET circuits so any help would be appreciated.


texts: What is the name of these connectors? (XBee Radio Module)

texts: I'm migrating a design from an older through hole module, to a new module that has edge connectors. The dev kit has these nice spring loaded connectors on the carrier board where the module just pops in, but I don't know what they're called. I've googled everything I can think of with no luck.


texts: Some questions regarding the resistors and capacitors around an opamp

texts:
I have been dealing with the following part of a circuit for a while:

But for the sake of curiosity I have some more questions left not specifically about this particular circuit but for all similar ones. I couldn't find satisfactory information anywhere yet.

In the above circuit to filter a very noisy pulse input or to obtain debouncing, as you see an RC low-pass filter is used before the inverting input (R9 C1).

In the simulation results just after the RC filter the signal's rising edge loses its shape dramatically due to the RC time constant. Here is the plots:

Green plot is the noisy voltage signal seen before the inverting input just before the RC filter(just before R9). Blue plot is the voltage seen at the inverting input just after the RC filter. Red plot is the voltage at the non-inverting input.:

1-) Do you think the loss of sharpness of the input pulse is a problem? Would the sharpness of the signal at the inverting input has any effect on the error between the input and output frequency? Here is the ouput vs input:

2-) When we set the hysteresis of a comparator or gain for an opamp the "resistor ratios" matter. I can understand why very low resistors are not used since they would drive more current.
    But why most of the time kOhm level resistors are chosen why not MegOhm? I mean in above circuit the resistors could be 680k instead of 68k, 1500k instead of 150k so forth and so on. Is that something related to opamp's inner resistors?

3-) I found some guides to set the caps around R1 and R2(in the below example) in a Schmitt trigger. Here is an example from a source:

According to these sources RC time constant should be equal. The sources doesn't  explain the reason behind it in detail. Is this something similar when we compensate the scope probes? But I rarely see these capacitors on examples. Is there a good reason to use them or how important are they?


texts:
I am working on a project where I need to use a single RFID reader to read tags from 4 different positions (6 cm apart). It is OK to only read one tag at a time, so I figured an RF-compliant multiplexer would be a simple solution.
To simplify even more, I thought I was smart when I re-used an MFRC522 RFID reader board, where I cut off the built-in PCB antenna and connected my multiplexer circuit to it.

Below is my antenna multiplexer circuit, using an Analog Devices ADG904BRUZ. The disabled antennas are grounded internally in the ADG904 through a 50 ohm resistor.

My problem: Everything works fine, as long as only any 3 of the 4 antennas are included in the circuit. Once adding a fourth, the MFRC522 shows no indications of seeing any tag at any position.
Initially, only 2 of 4 antennas worked but after increasing the antenna gain to max in MFRC522 software, a third antenna started to work.
Testing each antenna separately works fine, so I assume there are no hardware faults.
I am hoping/guessing there might be impedance matching problem, but I don't know enough RF design theory to further test or investigate it.
Any advice or pointer in any direction is deeply appreciated!
Update 2020-10-28:
Moved my reply here instead. It was previously submitted in separate post (Thanks Transistor for instructing)

Thanks RautSa for your valuable input!
It is very likelly that the "disabled" antennas still allows flow in the coils, which in short means the ADG904 is not an appropiate choice for my application.
For any other forum reader with interest of switching RFID antennas, please see NXP AN11314.
I have decided to re-design my board, based on the MOSFET switch concept described in above document. It also addresses some tuning challenges that occures with such design.
I am awaiting new PCB's at the moment, so I can unfortunately not share any result yet.


texts: How do I determine the capacitor to use when converting current to voltage?

texts:
I'm trying to figure out how to use an ALS-PT19-315C/L177/TR8 phototransistor (or something like it).

The datasheet has this sample circuit for converting current to voltage so that I can measure it with an IC.

What does CL do?  How do I select the appropriate value for it?  I've also seen similar circuits where there is no CL so I assume it's optional and for filtering/smoothing maybe?

The datasheet further describes the relationship with the capacitor:

  Vout(max.) = IPH(max.) × RL ≦ Vout(saturation)＝Vcc－0.4V

  RL × CL ≧ 0.5 (empirical data)

What does the part about RL x CL ≧ 0.5 mean?


texts: What to call the PCB that a daughterboard is plugged into?

texts:
I'm looking for a concise term to describe something.

Suppose I'm making a gizmo which has application-specific circuitry but also requires substantial computing power.  Not wanting to reinvent the wheel, I decide to incorporate a pre-made board, call it PCB "B", which is a single-board computer like an Udoo x86 or Raspberry Pi, for said computing power.

I design a larger PCB, call it PCB "A", which has "B" attach as a mezzanine board via pin headers, stand-offs, etc.  PCB "A" has the application-specific circuits and maybe other stuff such as a power supply, connectors to the outside world, etc.

What exactly do you call PCB "A"?

Once upon a time, the physical relationship of "A" and "B" would have qualified "A" as a motherboard.  Problem is, since the ubiquity of PCs, that term now carries specific connotations; in particular, it would tend to imply the CPU and computer chipset are on "A" when really they're on "B".

Mainboard has the same problem, as it's generally understood as a synonym of motherboard.

Backplane is not really applicable either, because "A" is not just a bus interconnection board.

Various SBCs have their own terms like shield or cape to describe daughter cards, but while "A" may use some of the same pin headers, using these terms to describe "A" seems to misrepresent it as being diminutive to "B".

Is there some generally understood term for PCB "A" that doesn't carry the wrong connotation?

(For lack of anything better I might call it the "application board", but I prefer to use standard terminology where possible.)


texts: How best to recharge 3.6v Lithium Coin Cell batteries safely from small solar panels?

texts:
I want to charge 'rechargeable' 3.6v Lithium Coin Cell batteries with one or two 3v 100ma solar panels. Do I need to worry about safety and overcharging the batteries? How can I measure if the batteries are fully charged or not?

Do rechargeable 3.6v Lithium Coin Cell batteries have a small voltage drop happen when fully charged? If so how could I measure that and stop the charging??


texts:
I want to control servo motor with the help of 8086 processor and thus want to connect 8255 with servo motor (with help of some motor driver) . Most of the information on internet is about stepper motor and i didn't found any useful stuff related to my problem . Please help me in figuring in out how to connect servo motor and 8255 . (i mean i want to design in Proteus software , in which servo is connect to 8255 through some drive (or directly if possible)).

I guess we need to find device which can produce pulse with modulation and then connect it to servo .I am not able to run even basic circuit . I guess if i will be able to run this then i am done . Does any one knows the settings or i am using wrong pulse generator ?second screenshot is motor properties and first one pulse generator properties.
Edit : I am accepting Justme answer but i will love to get more ideas and suggestions .so if any one else want to share something please do.


texts:
A resistor (~1 cm x 1 cm x 4 cm) with I = 5 A and V = 10 V (P = 50 W) is perfectly attached (on the 1 cm x 4 cm side) to a flat copper piece with known thickness, D = 5 mm (no fins). Ambient T is 20°C.

Assuming the heat
uniform over the copper piece, what should its area (A) be to cool down the resistors temperature at <30°C?


texts: Setting the initial output value for state space block in MATLAB

texts:
I've got the following control loop in Simulink:

What I'm trying to do is to set the initial value for the output to be 23, right now it starts from 0 and I can't find any explanation how that's done, these are my ABCD parameters which I got from my 2nd order Transfer Function:

I hope I have provided enough information.


texts:
I have some concerns in a motor control board I designed. Sometimes the MOSFETs unexpectedly start to burn. I suspect one of the reasons is the thin track (0.2mm) I have in my flexible board (0.2mm), but I think the transient short circuit is also a good explanation.
I'm just using 4 transistors per motor (2xPMOS and 2xNMOS) like you can see in the picture

I read the information in this website but I still don’t understand how to choose the NMOS and PMOS \$V_{GS}\$ in a way that the transient short circuits stop to happen.

Could someone advise me on this subject?


texts: Ground Fault Protection In Consumer Electronics

texts:
Medical devices have to meet ground fault/isolation requirements such as 60601-1 (link). Particularly galvanic isolation is required on power and data lines to avoid a fault conditions that could electrocute somebody. Do consumer electronics have any such standards that must be met?

I see this is a real issue that kills up to 70 people a year (link) in consumer tech. Based on designs for common devices like cellphones that I have seen there is no particular care taken to ensure that the chassis can't become dangerously energized when charging from something with a 2 prong charger (No Earth GND). Are there cheap methods that provide sufficient protection such as fuses? Galvanic isolation is typically expensive and difficult for large power draws.


texts:
Suppose I have a DC motor and I put a load on it (in fact, the loading part isn't quite necessary for my question) but I have a load on the motor shaft and I connect it to a power supply. I can calculate what the final rotational speed of the motor would be given all the parameters (voltage of power supply, armature resistance, ke, etc) and I know that the torque of the motor would eventually equal to the loading torque (if loaded, 0 ideally if not loaded) and the torque would get driven down with time due to the back emf from the motor, but my question is this: what would be the start up torque of the motor? If there was no load on the motor, then a finite start up torque would be needed to accelerate the motor shaft due to its rotational inertia, but what would this value be?

I can derive a torque speed characteristic for the motor because I have all its parameters, so would the torque just on start up be the same as the motor's stall torque (because both lie at omega = 0 on the torque-speed characteristic curve)? The same goes for loading: what would be the torque just as the motor starts (not just to start the motor)? I have a section here in my lecture notes that's implying the startup torque is equal to the loading torque but that makes no sense to me: as the motor shaft accelerates, the back emf would drive the current (and therefore torque) down, so surely the torque on startup should be greater than the load torque (otherwise it'd be impossible for the motor shaft to accelerate). I guess my question is, is there a way to calculate the torque on startup using DC analysis and the specifications of the motor? Thanks for all your help.


texts:
I've looked around and found a bit of information regarding attaching a 3.7V lithium battery to the BBB (Beaglebone Black) but I haven't found an exact answer to what I am looking for. I understand that the battery voltage, when connected, can't be monitored to determine how much life is left that's fine. However, I would like to be able to tell when the system switches from 5V barrel jack connector to the 3.7V battery backup.

I want to implement some emergency shutdown features on my system in the event that communications and/or power are lost. I was going to trigger this based on when the Beaglebone switched over to battery, with some timer giving the main power time to come back online, but I can't find information on how to determine when the system makes the switch. Is there an I/O pin or an internal reading that I can check to determine when the BBB switched to battery power?

If I can't check it internally does anyone know what pin I could tap for a voltage divider into the ADC to measure this? My guess would be VDD_5V (P9-5) as the system would no longer be able to attain 5V and would dip to whatever the battery voltage is.


texts:
I'm actually working on a project with several "little" modules. They are all connected to the PSU and the MCU. So I've design interface for each, so I can easily wire everything together.

For that I've bought a full range of crimp connectors, male/female pins and 10wires cables. (the "biggest" interface use 9 wires + VDC/GND, but for VDC/GND I use biggest gauge and other connectors)

The problem is that I'm not sure of the way I'm building these cables. Here are the steps I go through with a 1 pin connector.

First I cut the cable so the insulator is near the beginning of the connector and the end of the wire touch the start of the pin :

Then I apply a bit of solder on the inside of the connector and cut the two little piece of metal at the base, without that I can't put the housing (this one is a previously made one where I've removed the housing, that's why he looks really ugly)

Then I place the housing and use to pliers to put it in place. (Can't put it manually)

And here's the final result :

What I don't like is :

I need to cut a part of the base to insert the housing.
I need to use pliers to insert the housing. But if I take a look at the housing there's a kind of little piece of plastic that should block the housing to move back once in place.
If I force a bit I can remove the housing.

So do you have any advice's ? Does it sound ok for you ? (I'm just a hobbyist, it's not for a professional purpose or anything really "serious" or consumer related)


texts: Why the program does not work when I enable PLL on STM32F4?

texts:
When I try to the code below, program running very well. But when I enable PLL_ON bit, the program does not work.
Code that works:
void SysClockConfig()
{
    RCC->CR = 0x00010000;               // HSE ON
    while(!(RCC->CR & 0x00020000));     // HSE READY
    RCC->CR |= 0x00080000;              // CSS ON
    RCC->PLLCFGR |= 0x04402D04;         // P Q N M SETTINGS
    RCC->CFGR |= 0x0009402;             // APB SETTINGS
    RCC->CIR = 0x00880000;
    RCC->AHB1ENR |= 0x000007FF;         // GPIOs ARE ENABLE
}

void GPIO_Config()
{
    GPIOG->MODER = 0x14000000;              // GPIOG 13-14 ARE OUTPUT
    GPIOA->MODER = 0x00000000;              // GPIOA IS INPUT
    GPIOG->OTYPER = 0x00000000;             // PUSH-PULL
    GPIOG->OSPEEDR = 0x3C000000;            // HIGH-SPEED OUTPUT
    GPIOG->PUPDR = 0x14000000;              // PULL-DOWN
}

Code that does not work:
void SysClockConfig()
{
    RCC->CR = 0x00010000;                           // HSE ON
    while(!(RCC->CR & 0x00020000));     // HSE READY
    RCC->CR |= 0x00080000;                      // CSS ON
    RCC->PLLCFGR |= 0x04402D04;       // P Q N M SETTINGS
    RCC->CR |= RCC_CR_PLLON;                        // MAIN PLL ON
    while((RCC->CR & RCC_CR_PLLRDY) != RCC_CR_PLLRDY);      // MAIN PLL LOCKED
    RCC->CFGR &= ~RCC_CFGR_SW;
    RCC->CFGR |= RCC_CFGR_SW_PLL;

    while((RCC->CFGR & RCC_CFGR_SW_PLL) != RCC_CFGR_SW_PLL);
    RCC->CFGR |= 0x0009402;           // APB SETTINGS
    RCC->CIR = 0x00880000;
    RCC->AHB1ENR |= 0x000007FF;       // GPIOs ARE ENABLE
}

void GPIO_Config()
{
    GPIOG->MODER = 0x14000000;              // GPIOG 13-14 ARE OUTPUT
    GPIOA->MODER = 0x00000000;              // GPIOA IS INPUT
    GPIOG->OTYPER = 0x00000000;             // PUSH-PULL
    GPIOG->OSPEEDR = 0x3C000000;            // HIGH-SPEED OUTPUT
    GPIOG->PUPDR = 0x14000000;              // PULL-DOWN
}


texts:
Is there any reason why the gain of a single ended input BJT differential amplifier, with one Rc, is a good approximation of the value of Adm for a common mode input.

The simulation shows the frequency response for a single ended input and the circuit below shows th common mode input circuit


texts: Current flow priorities in PSU / PSU review

texts:
Being an electronics hobbyist, I'm having quite a challenge to design a PSU, which must run both on batteries (during the night time) as well as on Solar energy (daytime). The device is intend to run 3x brushless motors daily, while in night-time it should keep the telemetry alive.

What I'm particularly worried about the design:

a) Is there anything I could improve about the common-ground design?
The logic-level transistors sit on the low-side, while I must monitor
voltage levels of both - the battery and the Solar array
simultaneously. My common ground solution looks like a poor-mans
approach, since voltage drop in the circuit is significant even with
Schotkys.
b) what's the best method of sucking all the current out of Solar
cells, while prioritizing the 3V & 5V devices over the motors &
charger? The transistors introduce huge energy waste due to heat
while in ohmic region.

The components chosen:

transistors: IRLZ44N and MTP3055VL
for gate controll I've chosen a digital potentiometer: MCP4261
uC: Atmega328P
voltage sensing via MUX: CD4067BE
current sensing via HALL: ACS712