texts: Atmel AVR ADC Inconsistent Sampling Time

texts:
I'm running an ATMega1284 at 20MHz. I've set the ADC up in free running mode as such:

void SetupADCInFreeRunningMode(uint16_t ref, uint16_t channel, uint16_t leftAdjust, uint16_t clockDiv)
{
    ADMUX |= ref | leftAdjust | channel;
    DIDR0 |= true << ADC3D;
    ADCSRA |= true << ADEN | true << ADATE | true << ADIE | clockDiv;
}

And I'm sampling the ADC into a buffer in the ADC interrupt:

ISR(ADC_vect)
{
    DISABLE_INT;
    ToggleLed(Red);
    if (BufferPosition < ADC_BUFFER_SIZE)
    {
        ADCBuffer[BufferPosition++] = ADCH - (int8_t)127;
    }
    else
    {
        BufferFull = true;
    }
    ENABLE_INT;
}

Since I'm having issues with my Goertzel implementation returning bad results I wanted to check my sample rate. Based on the simulator, this ought to be around 12019Hz.

However, after plugging my data analyzer into the LED pin being toggled, I find that it's sampling at an inconsistent speed, I get two samples at 12.4kHz followed by one sample at 9.9kHz. Given I disable the other interrupts whilst the sample is being taken, what could be  causing this?

In order to help debug this I removed everything except the LED toggle:

ISR(ADC_vect)
{
    DISABLE_INT;
    ToggleLed(Red);
    ENABLE_INT;
}

Now I get a consistent (all in us) 80 on, 80 off, 80 on, 80 off, 80 on, 100 off. Does the ADC have to reset every 6 interrupts or something?

TIMER1_COMPA was set to run at 200Hz. With this ISR:

ISR(TIMER1_COMPA_vect,  ISR_NOBLOCK)
{
    PushFrame();
}

However, disabling this interrupt so the ADC interrupt is the only one on the system does not help.

With an absolutely minimal working example:

//Standard lib includes
#include <stdbool.h>

//AVR includes
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/sleep.h>

//Project includes
#include "leds.h"
#include "ADC.h"

//Named Literals
#define COMP_200Hz 12500 //NOTE: Needs 8x prescaler
#define F_CPU 20e6

//Macros
#define ENABLE_INT sei()
#define DISABLE_INT cli()

//Functions
int main(void)
{
    SetupADCInFreeRunningMode(AVCC, ADC3, LAEnabled, CDOneTwoEigth);
    ENABLE_INT;
    StartADC();
    /* Replace with your application code */
    while (true)
    {
        ;
    }
}

ISR(ADC_vect)
{
    ToggleLed(Red);
}

For completeness:

void ToggleLed(Led colour)
{
    switch (colour)
    {
        case Red:
            PORTD ^= true << RED_LED;
            break;
        case Yellow:
            PORTD ^= true << YELLOW_LED;
            break;
        case Green:
            PORTD ^= true << GREEN_LED;
            break;
    }
}

The problem is still occurring.

I'm really stumped on this one.

I've upped the sample rate on my logic analyser to 8MHz and now get this output.

So something strange is happening periodically.


texts:
I'm a high school student in a class called EDD, where we design a product and produce a prototype of said product. I have one issue though: My team bit off more than we could chew, and we have no idea how to calculate the thermal efficiency of the system. We are currently looking through potential designs, but we can't actually make anything, before we prove that it will work.

So, given an R5 1600 as the processor, how would I calculate the heat transfer from the processor to a copper water block, then to a liquid (water), then to an aluminum radiator? The aluminum radiator is being recycled from a car to save money and hopefully increase efficiency. We were just thinking: more aluminum means less heat.

Also, if there is a thermal engineer that knows how to do these things and would be willing to partner with us to guide us through the process, that would be wonderful.


texts:
have a little question about fiducials:

My Layouter/My Boss likes to use 3 fiducials on the panelframe and one fiducial on each individual board in the panel.

My job is to build the program for the pick&place mounter and to produce the boards.

I prefere 3 "global" fiducials on each individual board in the panel. 3 or 2 fiducials on the panelframe ist ok for printing.

What is the better way to do this (I think its my way) and what are the arguments for the better way, so i can convince my layouter.

Thanks for your help in advance

Reelf

edit:

Thank you, friends, for your comments and hints!

Meanwhile I have done some more research on my own.

And I found, that, if I have 2 or 3 global marks on the individual boards, it is possible to get the best results of correction of shrink, stretch, offsets and warpage through the automatic correction algorythms of the mounter.

If I have only panel fiducials and maybe only one fiducial on each individual board, this automatic correction works badly.

Thanks a lot and a good time for you all!


texts: Will RCDs function properly in the Philippines?

texts:
In the Philippines the two pin plug can go into power socket either way.  Most domestic wirings have an earth at the power pole.

My question is can an RCD be installed and function 100 % in this type of wiring system?


texts: Can Putty be used to send serial data from the PC to the PIC? How?

texts:
I am looking for a simple program that can send data down the serial to the PIC. I have used Putty with USB-UART converter on my laptop. I have made the PIC->PC communiation work which is frankly a trivial task.

The question is, how to do the opposite. I can't find any option in Putty to send data down the serial port. What alternative do I have? Is the only option to use custom application written in C++/C#? It is better that I be able to implement flow control (of any kind) so the PC could be told to pause sending the data.


texts:
sorry it could be a basic question but still, I didn't find the answer on the web
is the SPI clock always active or active only when CS is low (during data exchange)?


texts: Ethernet shield-like functionality for ATTINY IC

texts:
I'm looking to shrink-ify my arduino project in the future, and I was wondering if there's anything like an all-in-one 'tiny' ethernet board that'll work with an attiny chip, preferably with the standard arduino ethernet library.

If anyone can name a few such boards/simple ICs, that'd be super! What I want to avoid is horrendous complexities.


texts: How to switch multiple 5-V loads via microcontroller

texts:
I would like to get some input for my very first electronics project.

I would like to split the 5V power Voltage to multiple outputs. Furthermore the individual power lines are supposed to be switched by a microcontroller.

simulate this circuit – Schematic created using CircuitLab

I know that the MC cont controll the "push botton switch" but that is supposed to be representive of a transistor or such.

the 3 output voltages power small loads ( recharge them)

any ideas to bring this idea to life?


texts:
I initially asked this question on math.stackexchange.com, but nobody answer so I thought I could try to ask here, this at least to some degree related
to electrical engineering.

Please help me to correct my understanding.

$$C^{-1}y+Ax=b \\
A^Ty  =f$$

This pair is equilibrium equations, \$C^{-1}+Ax=b\$ represents Ohm's law, derived from:

$$e=b-Ax$$

Vector \$x\$ represent potential on each node in a graph, on each node present abstract force which repel abstract flow. Flow goes to lower potential (which repel less). Act of multiplication \$Ax\$ produces potential difference. I just add all columns vectors adjusted by corresponding potential on each node, this is certainly should give me potential differences on each edge. But formula telling me:

$$Ax=b-e$$

This is my problem. What \$e\$ stands for? I know \$b\$ - potential differences, I can find potential at each node, I know \$x\$, I can find differences. What does \$e\$ mean? In another words if I know potential at each node, then \$C^{-1}y=Ax\$?


texts: How much embedded program memory in this NXP (aka freescale) KL03 processor?

texts:
Is there a way to find out how much programming memory is in an NXP (aka freescale) KL03 ARM processor?  The markings on the chip say "P03T5V" and "PSABA".

There is this NXP package number lookup web page.  But it does not work for the above (any?) number.

...thanks


texts: switching power supply breaks under too small load?

texts:
I've searched for an answer to this question, perhaps with the wrong terminology.

I have several little DIY boards around the house with a small on board 3v3 regulator. I feed these with old 5v phone chargers. Lately I had 3 of them break, all of these were genuine Samsung brand 0.7A USB chargers (older type where the USB lead is permanently connected to the housing, before they started making them detachable).

And with break i mean, the samsung supply stops supplying 5v, its more like 3v now, both open circuit and under load. My boards stop working altogether as well (although hooked up to my desktops 5v they still work fine).

Now the question is, are these switching power supplies breaking of old age ? or aren't they designed to supply a comparatively small load of 20mA 24/7

Any input would be appreciated!


texts:
I see a lot of SMT microphones in vendors' lineups. All of them orient normal to the PCB--either up or down. I'm working on a design where the microphone has to point parallel to the PCB.

On the prototype, I ran wires to the microphone from the PCB. In production, I would prefer an SMT part, and I prefer to point it the same way the the one in the picture.


texts: What is the actual direction of real current in an A.C. generator? From the North pole to the South?

texts:
I see diagrams of a current being generated in a loop or square-ish section of wire that is rotating between two magnetic poles... a north on one side and a south on the other...

BUT, the current direction is sometimes portrayed as being from the North to the South, and other times vice versa...

I assume this has to do with some diagrams still going by 'conventional current' instead of true current...


texts: Optimizing op-amp overload recovery behaviour

texts:
I'm measuring a thermocouple which connected series with a heating element. Heater is driven with PWM and when PWM is off-duty, a measurement is taken through output A0 using an ADC.

Relevant parts of the circuit can be seen below.

I think it is a fairly standard op-amp application. The BAV199 double diode is clamping the input to a safe level (~900mV) for the opamp input (because heater is driven with higher voltage than opamp's supply).

Since this non-inverting setup requires relatively high gain to measure small thermocouple signal, output is easily saturates when heater is powered on.

The problem is, when heater is powered; op-amp "see" this clamped ~900mV at input, because ~300 gain it overloads and it is taking a long time to recover.

The yellow trace is op-amp input, blue is output. Total settling time is around 100uS, which is ruining my PWM strategy at high duty cycles. Also, when (I think) op-amp recovers from overdrive, it also takes a long time to reach correct values (I mean the curve, which is starting from trigger point to second cursor and takes 50uS).

I can't explain these results, probably because I'm not experienced in analog domain. (software guy here)

I'm using MCP6V26, according the datasheet "Output Overdrive Recovery Time" is 45uS typ. and "Slew Rate" is 1V/uS. Especially the slew rate, which I'm associating with the "decaying" signal at the end of blue trace; does not match up the datasheet values.

It also has 2MHz bandwidth and I'm only using ~100Hz PWM frequency; so it shouldn't be a problem there.

Given this input and output requirements;

Am I doing something horribly wrong,
If not, can I get faster output response from this setup
Is there a more appropriate approach to doing this (in hardware perspective)

Thanks.


texts: Looking for audio amplifier circuit using 2SC1050 transistor

texts: Will I be able to find any audio amplifier diagrams using 2SC1050 transistor? I've looked and looked, but can't find any. I mainly want to see what audio power out etc. so I can get an understanding of the datasheet.


texts: Will this capacitive discharge welder design work?

texts:
I'm an electronics newbie trying to learn about the subject through tinkering, and my current project is a capacitive discharge welder for welding on battery terminals. I thought I'd better have someone take a look at my schematic before I fry a bunch of expensive components.

Basically, I have a foot pedal which tells an Arduino when to (briefly) turn on an H-bridge made of beefy n-channel MOSFETs hooked up across a big 33mF 100V capacitor that I plan to charge to 30V. The alternating current produced by the H-bridge energizes a transformer which greatly steps down the voltage and steps up the current for welding through some copper electrodes.

The things I'm most concerned about are:

I have a separate 5V supply for the Arduino because I have a vague sense that it would be a bad idea for it to share a common ground with the big power capacitor. I'm not sure how electrically stable an electrolytic capacitor is when you dump all of its energy all at once. Is this a valid concern? Will separating the Arduino from the rest of the circuit with the optocouplers actually help anything?
Related to the previous question, I'm concerned about having to tie GNDA directly to the negative terminal of the capacitor (-BATT). Is there a better way to do this? Could my current design result in damage to the rather expensive MOSFET driver?
Are there any flyback diodes or bypass/decoupling capacitors or anything that I should add? I have no sense at all for where such things would be advisable. I added the 0.1 microfarad capacitor between +5VA and GNDA because I saw it on the datasheet for one of the ICs, but I don't know if it's really necessary. Is there anything I can do to better protect the $20 (each!) MOSFETs I'm using?


texts: What is the difference between DRAM channel and DRAM Rank?

texts:
Can someone explain me the terms : DRAM Rank and a DRAM Channel is simple terms.

I went through this PDF and I was not able to understand the DRAM Organisation/architecture on page 3 and page 11. Can someone help me understand those block diagrams.

I have seen some server board PCBs. In that, I have seen many DIMM Slots. Like, I have 12 DIMM Sockets. 6 sockets were black in color and 6 were blue in color. Does this difference indicate different channels, if not, why is there a difference?


texts: While loop for function call for enabling I2C interrupts seems to be behaving weirdly

texts:
Trying to understand why the while loop is behaving weirdly.

HAL_MasterReceiveInterrupt() enables the control bits for I2C and continues to loop unless the STATE is READY - in other words, when the data is fully read but I see the it executing outside the while loop.
So while loop shouldn't end until the the return value from the function is I2C_READY

The output looks as follows:

RXing...
Printing buffer values...
Stopping transmission

Instead of:

RXing...
Stopping transmission
Printing buffer values // now that we are outside the loop

what's up with the sequence of execution?

I2C_State HAL_MasterReceiveInterrupt(void)
{
    I2C_State i2cState = I2C_handle_p->I2C_State;

    if (i2cState != I2C_RX_BUSY && i2cState != I2C_TX_BUSY)
    {
        printf ("RXing...\n");
        I2C_handle_p->I2C_State = I2C_RX_BUSY;

        GenerateStartCondition(I2C_handle_p);

        I2C_SetCtrlBits();   // enable i2c control bits
    }
    return i2cState;
}

static void I2C_StopTransmission(void)
{
    printf ("Stopping transmission...\n\n");

    // disable control bits
    I2C_handle_p->pI2Cx->CR2 &= ~(1 << I2C_CR2_ITEVTEN_Pos);
    I2C_handle_p->pI2Cx->CR2 &= ~(1 << I2C_CR2_ITBUFEN_Pos);

    // restore struct
    I2C_handle_p->I2C_State = I2C_READY;
    I2C_handle_p->rxBufferLength = BYTES_PER_TRANSACTION;
}

// app.c
void ReadVal() {
  while (HAL_MasterReceiveInterrupt() != I2C_READY);
  printf ("Printing buffer values..."); // assuming I2C read operation is completed
  while(1);
}


texts: 2-wire MPU interface / 2-wire Serial Control Interface?

texts:
While reading datasheet of an audio codec IC, I got confused over the term "2-wire MPU serial interface". Is that just another term for I2C (just like TWI or TWSI) and they are fully compatible? And what does MPU stand for?

In other datasheets of similar ICs it's also called "2-wire Serial Control Interface", "2-wire serial bus" or all of these together, which is, again, confusing…

If so, does anybody know when did I2C-related patents lapsed as Wikipedia claims? In other words, is it already safe to use name I2C in a new product's datasheet?


texts: Low voltage MPPT boost converter IC, constant input voltage

texts:
Following scenario: I have a bunch of Sunpower C50 unprocessed single solar cells. I'm trying to make a panel out of them for hiking. According to the datasheet each cell has 0.574 Vmpp an 5.65 Impp or 3.24w power. Since cutting the cells is hard I want to put 4 of them in series so that I have around 2V and 12w output...
I want to utilize this as much as possible and therefore charge a single cell Li-ion battery directly with maximum power point tracking.

But I'm struggling to find an IC that fits the purpose. All energy harvesting ICs like the CJMCU-25504 with solar input are low power or not rated for 2V, and most solar battery charger ICs like a CN3791 are mostly buck converters.

I once designed a MPPT circuit myself, so I know that the output voltage of a PV panel is mostly constant, so one simple MPPT algorithm which the CN3791 for example uses is, to just keep the input voltage constant. So I was wondering if I might find a way to design a boost converter that controlls the input voltage ratehr than output? Or maybe there is just the right IC for it, I just can't find it.


texts: What is the highest achievable update rate for a civilian GPS receiver?

texts:
I'm interested in knowing the maximum achievable update rate for a civilian GPS receiver. Specifically

Receivers that depend exclusively on GPS satellites (e.g. not including IMU-based movement estimation to interpolate)
The hypothetical limit (i.e excluding feasibility concerns, e.g. processing power)
Update rate after lock (e.g. TTFF)

The fastest civilian receiver chips I've found have an update rate of 50Hz, such as the Venus838FLPx.
According to alex.forencich in this stackexchange thread, it might be "rather high":

It's difficult to pin a position update rate on the satellites as it's
all in the receiver. The satellites simply transmit orbital ephemeris
data and the time of day at 50 bits per second and a CDMA chip rate
of 1.023 MHz, all precisely phase locked to an atomic frequency
standard. The GPS receiver maintains a lock on the CDMA spreading code
and uses that to determine the time of arrival differences between the
satellites. Getting a lock in the first place takes a while, but after
that the position can be updated at a rather high frequency. I'm not
sure what the upper limit on that is.

And this is of course unrelated to the CoCom speed and altitude limits for civilian receivers.
That's what I've found.


texts: In the diagram below, across what are v1 and v2 supposed to be measuring the voltage?

texts:
This might be a very basic question so I apologize but I really am struggling to understand the following circuit. Below you will see the circuit as well as a description of the task.

Build the circuit in Fig 1.2 as shown below (Remember to ground (GND)
your circuit). Connect  two voltmeters V2 and V1 wrt to ground as
indicated in the circuit diagram

I do not understand how v1 or v2 should actually be connected to the circuit, nor do I understand what voltage each voltmeter is measuring. The task is to build this circuit using an application called EasyEDA so I would really appreciate if someone could clarify how the voltmeters should be connected.
thanks in advance.


texts:
I would like to understand the purpose of biasing the transistor and why It has to be halfway between Vcc and ground?

And which terminal of the transistor (Base, collector or emitter) should be between halfway between Vcc and ground while biasing.

An analogy would help a lot. Please


texts: Current Sensing Amplifier Circuit explained

texts:
I've been trying to understand why each every comment is in the circuit shown. I understand that the amp is taking the voltage drop across the Rsense and amplifying it such that the current across it is known. However, I'm not sure why the two resistors are there because if I didn't know any better, I'd design with no resistors that way all the current is accounted for across Rsense. Also, I'm not sure how to analyze the BJT in the feedback loop.

I'm assuming the current mirror is there to provide a 1:n ratio current/mirror the current at the output.


texts: Active low-pass filters --- good to what frequencies?

texts:
Appendix E of The Art of Electronics, 3rd Edition (LC Butterworth filters) starts by saying that "active filters are convenient at low-frequencies but impractical at higher frequencies".  They go and say that "at frequencies of 100kHz and above, the best approach is passive LC filters" (paraphrased in both cases).

My first question:  really?  A mere 100kHz is already too high for active filters to be practical?

I understand that op-amps with high bandwidth and HIGH slew-rate can be pricey, making it "impractical" in the general case --- however, a low-pass LC filter with, say, 1MHz cutoff, T topology with a 1kΩ load ends up requiring inductors in the order of hundreds of μH --- if I need to avoid distortion (magnetic core saturation and hysteresis), an air-core inductor in that range makes the whole thing rather impractical.

Question 2 would be:  is a cutoff frequency of, say, less than 10MHz too high for a Sallen-Key 2nd-order low-pass filter?

simulate this circuit – Schematic created using CircuitLab

Analyzing it from the perspective of the ideal case (assuming op-amp always within linear operation), all three pins of the op-amp will be subject to the low-passed output signal --- at < 10MHz cutoff frequency that's certainly not an issue (neither bandwidth nor slew rate).  Input capacitance shouldn't be a big issue --- with R in the order of 1k, the capacitors are in the order of a few tens of pF to a few hundreds of pF --- high enough to make the op-amp's input capacitance negligible.

Are there any other practical issues that I'm overlooking?  Am I being realistic if I want such an active filter with cutoff in the order of a few MHz?  (pricing is not an issue --- if I need an op-amp in the $10 or $20 range, that's fine)


texts: Quick question. Will this mono/stereo switch system work on my mixer panel?

texts:
So basically, I designed a mixer panel for monitoring my band when we play live. However, some of us play with a stereo in ear monitoring system and some of us use a mono speaker by their feet.
I don't want things that are panned to the right not to be heard on the mono speakers when they are connected to the left output.

This means I need my mixer to have a mono/stereo switching system. I'm not sure if I want to use switched jack ports to have it automated. If I want that, how do I do that?

The other option is to make a button to switch the system to mono or stereo. This schematic I made very quickly and not very clean will do that? Or will it not mix both channels to the left output correctly?


texts:
I'm going to switch on/off 64 LEDs with a frequency of 100Hz to give the impression that they are all on at the same time. In order to optimize power consumption I want to make sure only one LED is on at any point in time. To achieve this I would need a duty cyle of $$Duty = \frac{1}{64} = 1.5625\%$$

This is obviously on the lower level of the LED brightness, so to combat the brightness I would have to increase the instantanious current, which I have decided would fit well in the range of 100mA to 300mA after testing, research and consulting the datasheet. This will give me an average current of 1.56mA to 4.69mA and the maximum I can get out of the LEDs without possibly harming them. The brightness at ~4.5mA is a good brightness.

The problem I have, is that when I apply 5V and set the duty cycle of a square wave to 1.5%, I can never achieve more than ~0.5 to 1mA. So I tried lowering the resistance until the point where I have just shorted out the resistor, and I never get more current than this. Would increasing the supply voltage work? Because I tried this (with a mosfet + resistor) and it did not work. Is there something I'm missing here? How can I get more current out of this LED?

My circuit is in the schematic below. I'm using a 2N7000 NMOS but I have also tried the circuit without the NMOS and the square wave directly to the LED-resistor circuit, and the result is about the same. The LEDs are blue ones (3.2-3.4V).

simulate this circuit – Schematic created using CircuitLab

My calculations was 5ohm resistor, and as the LED and NMOS both have internal resistance (rds = 6ohm), a short isn't much of a difference anwyay was my thoughts. $$R_{LED} = \frac{5V - 3.4V} {300mA} = 5\Omega$$


texts:
I have used the model of the GPDK90 transitor in Cadence. I have few questions regarding the IV characteristics:

Why does the threshold voltage change with change with Vds (Vds=
0, 1.25, 2.5, 3.75 and 5)?
Why does Id decrease after a particular value of Vgs?
Why does Id cahnge its direction after a particular value of Vgs?
In the case where Vds=0, why is there a negative current after a particular Vgs?


texts: Why don't ceramic capacitors have codes for voltage rating?

texts: Say a ceramic capacitor with the code 103 (0.01 micro farad). How to identify its voltage rating? Searching for a 0.01 micro farad capacitor in Mouser the voltage rating is indicated as 1kV dc. I intend to use the capacitor in a RF receiver circuit((20Mhz) where the maximum voltage is 12 V. Is it ok to use such a high voltage rated capacitor in my circuit? Also if I don't have a capacitor of a particular value,will resolving the value into series or parallel combinations affect the quality of the receiver?


texts: Verilog asynchronous reads of regs - and design question

texts:
I'm trying to understand what the following bit of behavioral code, what kind of hardware it turns into:

reg [7:0] k0, k1, k2, k3;
reg [7:0] data1_tmp, data2_tmp;

// Asynchronously read data from two registers
always @(*)
begin
    case (reg1)
        0: data1_tmp = k0;
        1: data1_tmp = k1;
        2: data1_tmp = k2;
        3: data1_tmp = k3;
    endcase
    case (reg2)
        0: data2_tmp = k0;
        1: data2_tmp = k1;
        2: data2_tmp = k2;
        3: data2_tmp = k3;
    endcase
end

Logically I understand what it's doing. But I would like to know what this mini register file would be made of in hardware. Particularly, the 4x8 bit array consisting of k0,k1,k2,k3. I thought when it came to registers and arrays like this, you need a clock to read out data, like RAM?

See I'm having a conceptual problem designing a simple verilog cache module. I have a data array containing all my tags like so:

reg [NUM_TAG_BITS-1:0] tag_array[NUM_BLOCKS-1:0]

And I have a wire "line_select" (from my input PC). What I want to do is retrieve tag_array[line_select] and then put it into a comparator with the tag from my PC to see if I have a hit.

But I thought whenever I access tag_array, I need to be inside "always @ (posedge clk)" code. Then I got stuck: how do I read from this tag_array and do the comparison all within the same clock cycle? So I found the above code online saying you can read from regs asynchronously, then I got confused because frankly I don't know enough about memory hardware and how that's possible.

Thanks a lot for any help!


texts: Force of linear electromagnet in relation to length of an air gap

texts:
I am confused by derivation of relationship between force of linear electromagnet and length of a core air gap. I have found one source    http://info.ee.surrey.ac.uk/Workshop/advice/coils/force.html#EFB telling, that energy in air gap is
$$
W=\frac{B^2xA}{2\mu_0}
$$
where, \$x\$ is length of the gap and \$A\$ is its area. Then they calculate force on core as
$$
F=\frac{\mathrm{d}W}{\mathrm{d}x}
$$
and substitute
$$
B=\frac{F_m\mu_0}{x}
$$
so they get force:
$$
F=\frac{F^2_m\mu_0A}{2x^2}
$$
Now I am confused, because when I substitute \$B\$ to energy \$W\$ first (as it should be, because \$B\$ is function of \$x\$), and then I solve the derivative \$\frac{\mathrm{d}W}{\mathrm{d}x}\$, I get the same, but with opposite sign. And that means that the force has the opposite direction (to make the gap bigger). Moreover, I thougtht that the system wants to lower its stored energy, but making the gap smaller, energy grows. What am I missing here?
$$
F=\frac{\mathrm{d}W}{\mathrm{d}x}=\frac{\mathrm{d}\left(\frac{B^2xA}{2\mu_0}\right)}{\mathrm{d}x}=\frac{\mathrm{d}\left(\frac{F^2_m\mu_0A}{2x}\right)}{\mathrm{d}x}=-\frac{F^2_m\mu_0A}{2x^2}
$$


texts:
I have several transformers for audio amps, with single thiner primary and dual larger area secondary windings, for lower voltage higher current. They are toroidal, all by different manufacturers, but all producing audible noise, and i thought something is wrong with their construction. So i put off a part of insulation to look at windings - they were not sticked by epoxy - and that was a source of sound most probably. But then i was surprised.

All of transformers expose similar winding style - fatter copper wire (2 secondaries were winded inside, while much thiner primary mains winding was winded outside, and its turns are wrapped kinda randomly, awkwardly. I could see it on all my devices. I thought that thin wire should be wrapped directly on the toroid code, to save space and to make accurate round turns. and secondary should be turned ourside, to "catch" all EMI, emitted from inner primary, so reduce magnetic HUM leak.

Am i right? Or why several transformers have mains primary coil outside secondary? Is order of any matter and is it worth rewinding and sticking windings with epoxy?


texts:
I got some feedback from our software team. Apparently we're writing twenty 4KB blocks per second. I have a 4GB eMMC. The eMMC has a max number of P/E cycle of 3000.

I'm making the assumption that all 4GB will be available for writing/erasing.

I developed a spreadsheet to help me calculate endurance but it's coming up with a time longer than I would have expected.

eMMC Size: 4GB
Number of days used: 365
Hours per day: 8
Max P/E cycles: 3000
Number of blocks per cycle: 20
Size of block: 4KB
Number of writes per second: 1

I calculated 14.9 years endurance by taking the total number of bytes written per year and dividing it by (eMMC size x Max P/E cycles).

I calculate endurance at the end of the file. Am I doing it right or wrong?


texts:
I do a transient Simulation with many similar subcircuits.
Each subcircuit has a current source on the Input.

For example the current source 49 is creating following Signal:

I49 r49 inp49   PWL REPEAT FOREVER( 0.200   9.36    0.201   5.62    0.399   5.62    0.400   9.36    2.200   9.36    )   ENDREPEAT

My Problem is I don' know why spice removes some PWL Points during simulation:
This is what's written in the text file:

I49: Removing PWL point (2.2,9.36)
I49: Removing PWL point (4.4,9.36)
I49: Removing PWL point (6.6,9.36)
I49: Removing PWL point (8.8,9.36)
I49: Removing PWL point (11,9.36)
I49: Removing PWL point (13.2,9.36)
I49: Removing PWL point (15.4,9.36)
I49: Removing PWL point (17.6,9.36)
I49: Removing PWL point (19.8,9.36)
I49: Removing PWL point (22,9.36)
I49: Removing PWL point (24.2,9.36)
I49: Removing PWL point (26.4,9.36)
I49: Removing PWL point (28.6,9.36)
I49: Removing PWL point (30.8,9.36)
I49: Removing PWL point (33,9.36)
I49: Removing PWL point (35.2,9.36)
I49: Removing PWL point (37.4,9.36)
I49: Removing PWL point (39.6,9.36)
I49: Removing PWL point (41.8,9.36)
I49: Removing PWL point (44,9.36)
I49: Removing PWL point (46.2,9.36)
I49: Removing PWL point (48.4,9.36)
I49: Removing PWL point (50.6,9.36)
I49: Removing PWL point (52.8,9.36)
I49: Removing PWL point (55,9.36)
I49: Removing PWL point (57.2,9.36)
I49: Removing PWL point (59.4,9.36)


texts:
Let me preface by saying I'm a total noob at all of this and just learning as I go via the internet.
I'm working on a home project where I need to trigger a submersible pump. I needed the switch for this pump to be as small as possible so I decided to use a tactile switch. The power supply I'm using is a 12V DC battery. The contact rating for the switch is 50mA @ 12Vdc. The power consumption of the pump is 2 amps.
Based on my limited knowledge it sounds like if I use this switch to turn on the pump it will burn out the switch. Am I correct? Is there something I can put in between the load and the switch to allow me to still use it?


texts: CircuitPython & ESP32-S2-Saola boards returning code 43 errors

texts:
I am currently trying to connect to some ESP32-S2-Saola devboards that are running CircuitPython 6.1.0 via the USB OTG pins, but the device shows up as as "Unknown USB Device (Device Descriptor Request Failed)", and I see the following error in Windows' Device Manager:
Windows has stopped this device because it has reported problems. (Code 43)
A request for the USB device descriptor failed.

The boards I tried are manufactured by Espressif and are powered by the ESP32-S2-WROOM and ESP32-S2-WROVER.
I flashed it with the following command taken from the official Adafruit website and using Espressif's tools from their GitHub repository:
python esptool.py -b esp32s2 --port COMx --after=no_reset write_flash 0x0 <firmware.bin>
I didn't notice any error during the flashing process, the hash of the flashed firmware was verified properly, and the onboard LED is slowly flashing green which indicates that the main code file has finished executing according to CircuitPython's documentation.
The serial terminal  on the main USB port also doesn't return any error:
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x3ffe6100,len:0x4
load:0x3ffe6104,len:0x19d0
load:0x4004c000,len:0x162c
load:0x40050000,len:0x20fc
entry 0x4004c30c

I've tried the following things to attempt to fix the issue without any success:

Using 15cm/8cm cables or jumpers to connect the data pins.
Inserting the USB cable slowly into the host device to connect D+ and D- after the device booted
Using different breakout boards
Adding 2 10ohms resistors in series on the D+ and D- line to vaguely match the missing 22ohms resistors
Testing the 6.2.0-beta3 release of CircuitPython.
Using different USB cables that have the D+ and D- wires
Checking that the USB pins from the chip go to the right pins on the booard with a multimeter and through the schematics
Tying the ID pin to GND
Swapping the D+ and D- pins

I don't know if I'm missing something or if my boards have a problem since the official documentation doesn't really offer any help in terms of troubleshooting.


texts: My counter for my cpu stack alternates between counting up and down

texts:
My Counter for my cpu stack is given the up signal at the same time it is given the clock pulse to advance. This happens on the pull from stack instruction so the counter goes back up the stack one and gets th right address..

But here is the thing, even though the clock and up signal are both true at the same time it alternates between counting up one and counting down one. i'm not sure why as it works when testing it normally with a constant 1 for up and ticking the clock myself.

EDIT:
Just tested the instruction in the chip. and for some reason i get a different thing happening. When setting the first 8 bits of FP to 00001110 (Pull from stack) the counter counts down to FFFF, but then the next time i set 00001110 it jumps to 2 for no reason and to 1 and to 0 then to ffff and repeat. there is no way this is not a bug in circuitverse... plus it should be going up not down.

Here is a link to the sim if you wanna look at it.
https://circuitverse.org/users/17603
The chip is called "Stack".

Here is a image of the systemm


texts: For a crystal oscillator circuit, what effect would a series resistor have on the inverter input?

texts:
In some application notes, there is a recommendation to use an external resistor in series with the OSC_OUT pin to reduce the power dissipated by the crystal, if necessary to do so.  A good example is from AN2867 STM32 oscillator design guide called "R_Ext".

Note there is never a resistor on the OSC_IN (EXTAL) leg in any application note and thus I never considered it for any transconductance calculation (Note 1).

So I've been a little bit thrown out by the S32K datasheet which explicitly shows an extra (internal) 280R resistor on the OSC_IN (the S32K calls the pin EXTAL) pin (p27, Figure 8):

So, my questions are:

Does this "resistor" have any effect on the transconductance (gain margin) of the circuit design?  EDIT - Supplementary question: If it does affect the transconductance, how is this calculated?
Is it likely to introduce any other effects that needs to get taken into account in the design?
Would there ever be a reason to deliberately design in a resistor connected the inverter input?

Unfortunately, the 280R is 2-3 times larger compared to the ESR of crystals in the 16MHz range (in the order of 100R, e.g. this or this), so if it does indeed affect the transconductance calculation, the effect is non-trivial to the point where the circuit may refuse to oscillate.

Note 1:

The transconductance calculation I am referring to is the modified form that takes R_Ext into account as explained in the STM32 document referenced earlier:

Part of the question is whether the resistor on OSC_IN needs to be included anywhere in this calculation.


texts:
There is few questions about when someone touch the wire accidentally and can't get out from there.

Whether is high current will pull people or high voltage?
Is it only happen on AC?
What is the reason behind?


texts: How can I load code to a microcontroller?

texts:
Let's say I have a microcontroller, for example, Atmel's ATmega328. Then, I look at ATmega328 datasheet, find its Instruction Set Architecture and, based on it, create an assembly code. Now I get the code and, manually, transform it to binary code.

Now I want to load my runnable ATmega328's binary code into the microcontroller itself. But I want to do it without using Atmel IDE or anything like that. I want to do it sending digital signals to the microcontroller pins.

Is that possible? Is there a protocol to do it? Where can I find this kind of information for each microcontroller?

Thank you! (Outside resources are also welcome)


texts: A confusion about the formula for transistor Vbe Ic characterisitcs

texts:
Below is NPN BJT transistor Vbe Ic characteristics and the formula:

Many texts approximate this equation as:

  Ic = Is*e^(Vbe/Ut)

and following this they say when Vbe=0, Ic becomes equal to Is.

But in real the equation is:

  Ic = Is*(e^(Vbe/Ut) - 1)

And in this case when Vbe is set to zero Ic becomes zero.

So what is Is? Is it the Ic current when Vbe is set to zero volts? If so, why the real formula cannot predict it correctly? What really happens when Vbe is set to zero in a laboratory?


texts: Confusion in power supply specification of op-amp

texts:
I don't understand the power supply specification of the op-amp AD826.

The datasheet says:

  Specified for +5 V, ±5 V and ±15 V Operation

  [...]

  The AD826 can operate from a single +5 V supply, while still achieving 25 MHz of bandwidth. Furthermore the AD826 is fully specified from a single
  +5 V to ±15 V power supplies.

Does it work with a single supply of 8 V or 12 V? 0-8 V
Is the reference to "+5 V to ±15 V" referring to the inverting and non-inverting terminal needing to have a voltage difference of 5 V?


texts: High Quality Audio ADC and DAC with Embedded

texts:
I am starting work on a project where I want to do some DSP using an embedded solution ideally with very low latency as it will be in a real time environment. In addition I want high quality, preferably 16bit 48khz, but I can settle for 12bit.

What I am wanting to know is if anyone in this community has done this before and has any words of advice. I have read all about it and have a dsPIC starter kit to play with.

Specifically I want to know if anyone has experience with PCM and how to efficiently apply filters then send back out.

I also want to know if anyone has any experience with Audio ADC's and DAC's and would have any suggestions for when I get to the point of developing my own board.


texts:
I want to design a magnetic transmitter to detect a device which will be underground (1m to 7m) from surface, so I started to look at a solution and I find that a magnetic transmitter will work because the penetration is much better than electromagnetic waves.The problem is that I don't understand why the circuit is not working as I expect.In first image we see that the VL will generate around 300Vpp but when I simulate the circuit generated a much lower voltage.If I change the resistance with one bigger the oscillation will stop.

The first image is from an application note.(Application Note)


texts: Regulate and verify an AC current to test a current transducer sensor

texts:
Firstly my background in software so this is a bit of foreign territory for me.

I have the requirement to monitor an AC current between 0 and 3 Amps. The plan so far in to use a non invasive current transducer sensor connected to an analogue input on a device connected to a PC. Something like this appears to be what we need: http://www.robotshop.com/uk/10a-ac-current-sensor.html

The problem I have is I don't have access to the equipment we are to monitor until we install so I need an (inexpensive) way to reproduce, control and verify an AC current passing through the CT Sensor.

In the live system we will be getting a sharp rise from ~0A to aproximatly 1.2A (aprox 600ms) which should last for about 3 seconds then a sharp drop back down to ~0A. The system will also need to identify when a gradual rise or drop occurs (over 600ms) as this indicates improper operation and so I will also need to simulate this. Something with a dial would be perfect.

Would simply a plug in dimmer switch, plug in electricity meter/current monitor connected to something like a lamp be able to do the job or is there something more suitable?

Thanks


texts: Efficient cooling system for a DNA Analysis thermal cycler

texts:
My team is doing a senior project that involves using polymerase chain reaction to analyze DNA. From what we know, most modern thermal cyclers uses the Peltier thermoelectric modules for active heating and cooling. For those who aren't aware, a  thermoelectric effect creates a voltage when there is a temperature difference on each side of the involved surface.

Our research indicates that while Peltier thermoelectric modules are simple, accurate and do not involve any moving parts. However, they are very energy inefficient. Most input energy into the thermal cycler is lost as heat.

Our team then tried to propose other alternative methods for active heating and cooling. Below are some of our ideas (heat sink is out of the question).

1.) Cooling the thermal cycler with fan modules, while heating the thermal cycler with wires.
2.) Cooling the thermal cycler with a custom water cooling system (like those used in car engines and computers).
3.) Using a mixture of the fan and water cooling system.

Cost is not the biggest constraint here (although it can be touched upon). Does anyone here have any experience with doing heating and cooling system with electronics? If so, could anyone explain the ups and downs of the methods I've suggested? If there are any better alternatives, please do suggest them so we could do further research. Thanks.


texts: Detect which momentary switch caused a STM32 cpu to wakeup

texts:
Edit: This question is wrong. The stm325105 has only one wakeup pin. But other ST-parts has more than one wakeup pin, so the given answer is valid for those.

I have a stm32f105 that has two momentary buttons connected to the wakeup inputs. The processor is put in STANDBY MODE. When any of the buttons are pressed, or the RTC timer fires, the cpu wakes up.

The problem is that I want the cpu to do different things depending on which wakeup input was triggered. According to 5.3.5 from ST stm32f105xx reference manual, no registers are preserved except for a status register indicating that we've been woken up (but not by who) and 42 backup registers.

  The Standby mode allows to achieve the lowest power consumption. It is based on the
  Cortex ® -M3 deepsleep mode, with the voltage regulator disabled. The 1.8 V domain is
  consequently powered off. The PLL, the HSI oscillator and the HSE oscillator are also
  switched off. SRAM and register contents are lost except for registers in the Backup domain
  and Standby circuitry.

  After waking up from Standby mode, program execution restarts in the same way as after a
  Reset (boot pins sampling, vector reset is fetched, etc.). The SBF status flag in the Power
  control/status register (PWR_CSR) indicates that the MCU was in Standby mode.

This ST forum post, How to determine the origin of Wakeup from Standby?, suggests that I can't detect which wakeup triggered in software. I found no other posts there that gave any more enlightment.

How can I use software or hardware for determining, after waking up, which wakeup input was triggered?


texts: Cooling an outdoor electronics enclosure

texts:
I built an outdoor enclosure which contains electronic devices (cable modem, router, battery backup, MCU, etc) for a long-distance internet connection.  The enclosure is made of insulated metal panels (approx R-15 insulation value).

Volume of enclosed space is approx. 3 cubic feet.

I currently have a squirrel-cage blower pushing hot air out the top, with a cool-air vent at the bottom on the opposite side, to generate cross-component air flow.

However, when the sun hits this enclosure from about 10am until 2pm, it's heating up to 105+F.  (Outdoor ambient is about 85F, 50% RH)

The outside of the enclosure, which is painted dark green to blend with surroundings, is too hot to touch after 10am.

I am looking for suggestions to cool this enclosure to 80F or less, while hopefully keeping costs at $50 USD or less.

I realize miniature thermoelectric coolers exist, but they are cost-prohibitive, starting at around $1,000 USD.

There is a 110VAC, 20A circuit available in the enclosure.

I can't paint the unit white, due to aesthetics etc.

One possibility is to install a sun shield board a few feet from the enclosure to block direct sunlight.

I've also considered building a thermoelectric air conditioner, but I'm not sure how to calculate the BTU output to determine size needed for this space.

Any suggestions appreciated!


texts: Incrementing net name for group in Eagle

texts:
I want to make 50 copies of the block below, but I need incrementing numbers on each of the net labels (these will go to a connector). I do not want each block connected to the other blocks. It would also be nice if I could do the same with the AVD text label.

I've tried using design blocks, but I cannot figure out a variable net label naming convention.


texts: Device which will turn off my water motor automatically after the tanks are full

texts: I have to build a system which automatically turns off my water motor after the tanks are full. I already have build up a system which lights up a bulb and an electric bell and tells me that the tanks are full. Now I want the water motor to be switched off automatically after the tanks are full. Is there some a device I can make which will turn off the water motor automatically after filling the water tanks.


texts: What project is good for a total beginner

texts:
Possible Duplicate:
  For a seasoned programmer Arduino or something else?

I am an advanced systems programmer, y have 8 years experience programming software for various platforms.

But recently my curiosity has got the best of me and im starting to wonder about hardware and how to make it.

I'm pretty good with Boolean math and logic math. and know the basic about logic circuits (in theory... but everything about logic boards and circuits i´ve made on software or paper never made one for real).

the only real hardware stuff i have touched are really computer parts, i have putted together a hole computer... but never "made" anything by myself.

i do like real challenges, and get bored easily with really basic stuff like turning on a led etc.

So what would be a good project for a beginner to start with.. i was thinking of a calculator or maybe something simpler but interesting (interesting enough so it can get my attention because if something bores me i tend to stop it).

Eventually after making this project and some others i would like to be able to create my own thing start to get creative. i don't know basic stuff like being able to create a toy catapult that activates with a remote... i don't really know where i want to go with this, but as a software engineer i would like to know hardware too!

Thank You for your help in advance!


texts: ngspice not printing currents for any circuit

texts:
I'm reading an EE book that references SPICE so to follow along on my linux machine I installed ngspice.  I can't output current for any circuits!  I've tried passing the file with -r option and multiple circuits.  Can never get a current output!

I googled and tried other posts this but nothing seems to work.  I'm starting to wonder if this is an install / configuration issue?

Starting with a simple series circuit with the intent to print voltage at each resistor and current at my source I loaded the following netlist:

series circuit
v1 1 0
r1 1 2 3k
r2 2 3 10k
r3 3 0 5k
.dc v1 9 9 1
.print dc v(1,2) v(2,3) v(3,0) i(v1)
.end

and received errors:
Warning: v1: has no value, DC 0 assumed
Warning: can't parse '0': ignored

My voltage outputs are correct per hand calcs so I know ngspice is calculating the right current.

reducing .print line to just get current::

.print i(v1)

yields error:

Error: .print: no i(v1) analysis found.

I've also tried defining my source different as:

v1 1 0 dc 9

same errors.

I've tried many different circuits and can never get ngspice to output current for my sources (I have created 0 voltage sources near resistances on parallel circuits as well).
The voltage outputs are all correct

I also tried a netlist with no .print line (I thought I've seen others with default output):

series circuit
v1 1 0 dc 9
r1 1 2 3k
r2 2 3 10k
r3 3 0 5k
.end

with this error:

Note: No ".plot", ".print", or ".fourier" lines; no simulations run

isn't there a default output without needing a .print line?

More importantly is there a configuration file not setup properly?  thoughts?

any direction is greatly appreciate... Thank you


texts: VBUS Pin of USB-C type connector in UFP application

texts:
I'm designing a breakout board for a USB2.0 Type-C connector.
The final board, which will contain the connector breakout circuit, should work as "device", and so as Upstream Facing Port, or UFP. It will also be equipped with a self-powered IC (no need for Vbus) that provides dp and dn lines to the connector.
At the moment, I know how to treat the CC lines (via 5.1kOhm pull-down resistors) but I still don't understand how to connect (or how to use) the VBUS lines.
In this kind of device, can I leave the VBUS lines unconnected or I should follow some specific procedure to connect them?


texts:
What I'm contemplating is the practicality of building a direct drive turbine-alternator (or generator) system out of an engine something like this.

Based on some reasonable guesses, that would take an alternators rated for something like 50-120k RPM and a 1-2 kW. Is anything in that range built or should I assume that some reduction gears would be involved in any practicable design?

If there isn't anything in that range, how close do things get? For example, if 400Hz single poll alternators are built, that would be 24k RPM which would only take something like a 2:1 or 6:1 reduction gear set


texts: What type of high temperature crimp connector is this?

texts:
A heating element on a 3D Printer has coated stainless steel leads that were crimped to another wire. I cut the other wire but would now like to reconnect it.

I'd like to use the same type of crimp connector if possible - but have no idea what this connector is called or how to find it.

The wire is approximately 22-24 gauge.

What is this type of connector called? Where can I purchase it (or something similar)?


texts: Generator faster than nominal speed with chopper

texts:
What happens, when a generator (PMSM) is driven faster than its nominal speed and a current chopper is used, to limit the output voltage? So assume we have a 12V generator at 3000rpm, where a quadrature current of 3A is chosen (Field Oriented Control). At 15V the current chopper limits the voltage of the generator. What happens, when the motor is driven now at 6000rpm?
Can Iq still be controlled to 3A? Can Id be controlled to 0A at 6000rpm?


texts: Why did LEDs take so long to appear as light bulbs?

texts: LEDs are an old technology, why did the industries take so long to put them into light bulbs? Was there any technological gap missing?


texts: Unexpected 2N6388G Darlington Transistor Emitter Voltage

texts:
I'm doing some experimenting with a 2N6388 Darlington Transistor, and getting some unexpected (to me) results.  It's been a while since I've played with a raw transistor, so there's a very real possibility that I'm simply mis-remembering how these things work.

According to the datasheet (last page), pin 1 is the base, 2 the collector, and 3 is the emitter.

However, when I apply 5V to pin 1 (base), 12V to pin 2 (collector), and pull down pin 3 with a 100K resistor, I read ~5V on pin 3, where I think I should see 12V.

simulate this circuit – Schematic created using CircuitLab

If ignore the datasheet and treat pin 1 as the collector and pin 2 as the base, and swap the voltages accordingly, then I finally see the 12V on pin 3, and can turn it on and off by alternating pin 2 between 5V and GND.

So, is the datasheet wrong (I doubt it), or do I had a counterfeit transistor (kinda doubt that, too), or (most likely) am I making some fundamental mistake that's leading me astray?

Thanks


texts: What is the purpose of the capacitor in this schematics?

texts:
I am trying to understand a RTC module from Sparkfun.

I don't understand the purpose of the capacitor in this circuit.

Here are the
procduct's page and the schematics link.

Can some one please explain its purpose.


texts: Any Protection Required for Rechargeable Battery Powered Device?

texts:
I created a device which is powered with 6 NiMH AA rechargeable batteries. The device uses between 10-100mA current. It is nothing special about it, there are some foil and electrolyte capacitors from + to - to stabilize the power of some chips and there is a microcontroller.

As I understand, the NiMH rechargeable batteries are sensitive for short-circuits. So I wonder if over time an element fails this could lead to a short-circuit.

It there any protection for the rechargeable batteries necessary for a such setup to protect the batteries? Or more precise: Is it usual to add some protection for the rechargeable batteries in battery powered devices?


texts: Common ground on a switch mode power supply

texts:
I've got a switch mode power supply and I have a question on the grounding of the PCB. Documentation on the PSU can be found here:

https://docs-emea.rs-online.com/webdocs/1621/0900766b81621ef9.pdf

On the back of the pcb you can see 2 of the 4 screws holes with a star. I assume that these are meant to be screwed into a chassis where these screw holes will connect to chassis ground.

A schematic representation can be seen here :

M1 (the one on the AC side of the board is called "M1 - Safety Ground". The other one (on the DC side, not named but labelled M2) is not electrically connected to M1.

According to the documentation it states :

Grounding Required

M1 is safety ground.
For better EMC performance, please secure an electrical connection between M1,M2 and chassis grounding.

The chassis where I will be hosting this power supply has the green/yellow wires (ground) hooked up to the chassis.

So the questions :

Do I connect 2 wires from M1 and M2 to this green/yellow wire ? I don't have any corresponding screw holes so I was thinking about soldering a wire on M1 and on M2 and hooking them up to the green/yellow wire you see in the picture above.
Perhaps a stupid question, but if it's always the end-goal to have these 2 grounds connected (will be the case if you screw it in), then why aren't these electrically connected in the first place ?

The PSU would be attached to the chassis like this (using a single screw as the others don't correspond with the ones in the chassis) :


texts: preventing blown fuses in simple circuit

texts:
I am trying to prevent blowing fuses in a simple circuit: that consists of a battery(12V), fuse, and 2 lights(50W).

There are no switches; the lights are connected and disconnected from the live wire each time...  (its just a simple circuit for outdoor use, so I kept it simple).

However, at least 1-2 month, on connecting, there is a small spark between connectors (random, rain, etc.), and the fuse blows.

The fuse is only really on there for recharging; whats the simplest solution for daily use.

thanks

--edit
lamps are 40W combined parallel
i dont recall the wire/fuse rating(guessing 21G and 10amps).

did switch to a slow fuse(no luck), whats the upper range I can safely go up to with the fuse?
ok, interesting about the garden lamps, cold-resistance spiking the amperage... Does that mean grounding the wire/ shoddy soldering (had been a long time) are not possible solutions/culprits?  When a spark flies, does that spike the amps?

thanks again!


texts:
I wan to build a video switcher with 2 channels, something that has 2 video input (left/right channels) and 1 video output. And control it with Arduino.

The input channels will be 2 dvd player and the output will be a videoprojector.

I don't use normal mechanical relays because of I am afraid of some glitch when I switch the channel, this is the most important thing: the switch must be fluid, no light interruption, no glitch, no flickering.

I've seen in the internet those 2 possibility: NJM2244 and DG542DJ-E3. But I don't know which fits more my needs.

Do they requires some extra regulation? Are the right IC I need?


texts: PIC16F877 blink program uploads correctly but nothing happens - hardware or software mistake?

texts:
I made a custom board based on a PIC16F877 but for now I only soldered the minimum. I installed MPLABX and the XC8 compiler, connected the ICD3 to the board, adapted a "blink" example to RD0 where my LED is, programmed the PIC and ran the program. Nothing has happened.

I removed power to the board and applied 5V (my Vcc) across the R+LED (- to cathode obviously), and it lit up... So I checked the footprint in the datasheet, RD0 is really there and I had little doubt since it's a plug&play CAD component from Modelsource.

So what's wrong then? Programming went fine, here is the log:

(ICD3)

  Connecting to MPLAB ICD 3...

  Currently loaded firmware on ICD 3

  Firmware Suite Version.....01.36.10

  Firmware type..............Midrange

  Target voltage detected

  Target device PIC16F877 found.

  Device ID Revision = 6

  The following memory area(s) will be programmed:

  program memory: start address = 0x0, end address = 0x7ff

  configuration memory

  Device Erased...

  Programming...

  Programming/Verify complete

(output)

  BUILD SUCCESSFUL (total time: 155ms)

  Loading code from
  C:/Users/[...]/MPLABXProjects/test.X/dist/default/production/test.X.production.hex...

  Loading completed

  Connecting to programmer...

  Programming target...

  Programming completed

  Running target...

If programming was ok, that means the frequency was set up properly. I'm not sure if it's a software or a hardware mistake, so here is the schematic:

(bigger) (the jumper is not connected, such that TX and RX are disconnected)

Code:

#define _XTAL_FREQ 20000000

#include <xc.h>

// BEGIN CONFIG
#pragma config FOSC = HS // Oscillator Selection bits (HS oscillator)
#pragma config WDTE = ON // Watchdog Timer Enable bit (WDT enabled)
#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
#pragma config BOREN = ON // Brown-out Reset Enable bit (BOR enabled)
#pragma config LVP = OFF // Low-Voltage (Single-Supply) In-Circuit Serial Programming Enable bit (RB3 is digital I/O, HV on MCLR must be used for programming)
#pragma config CPD = OFF // Data EEPROM Memory Code Protection bit (Data EEPROM code protection off)
#pragma config WRT = OFF // Flash Program Memory Write Enable bits (Write protection off; all program memory may be written to by EECON control)
#pragma config CP = OFF // Flash Program Memory Code Protection bit (Code protection off)
//END CONFIG

int main()
{
  TRISDbits.TRISD0 = 0; //RD0 as Output PIN
  while(1)
  {
    RD0 = 1;  // LED ON
    __delay_ms(1000); // 1 Second Delay
    RD0 = 0;  // LED OFF
    __delay_ms(1000); // 1 Second Delay
  }
  return 0;
}

I have tried debugging it via "Build for debugging Main project" and "Debug main project" but it says "[Programming/Verify complete.] The target device is not ready for debugging. [...]"...


texts: DS18B20 with MOSFET - reading temperature from multiple sensors on Raspberry Pi

texts:
I am attempting to read temperature data from 10 DS18B20 sensors, not connected in parasite mode.

It happens quite often that I don't get a reading from a sensor. I read online a bit about MOSFET's and they are supposed to boost the signal as far as I understood?

Is this possible? How would I connect it and are there any recommendations on the type?


texts:
Using an operational amplifier as a comparator was asked quite a lot times here, but how does it behave the way around?
I've a really cheap one in my circuit with low hysteresis and a MOSFETt push/pull output stage. Using it as a two point regulator with a LPF (fc<100Hz) at the output to drive my actuator should do almost the same job as an operational amplifier? Yes, it will oscillate, leading to higher Iq, and some EMI issues -but the control loop should be stable. Am I missing other huge downsides?


texts: Wireless communications for distance estimation (RFID perhaps?)

texts:
What I want to do it is measure the distance between two points/ devices which are constantly moving apart or together. The value for distance isn't really required I'd just be looking to have an alarm sound when the devices/objects are about 25cm apart and there are no obstructions between them. I did see that it could be possible to use an RFID tag on one of the parts with a reader of some sorts on the other, this would measure the signal strength and when it was so far away an alarm would sound.

Am I on the right track with this? If so, any further reading on detailing this sysyem would be great.


texts: Most efficient way to achieve 3.6V or less from NiMH or Li-Ion batteries (when fully charged)

texts:
I have a micro and RF module both which I'd like to power from either 3 AA NiMH cells or a single 18650 Li-ion cell. Haven't decided which I'll use yet. My current requirements aren't that much (~2mA or so) but I'm looking to achieve a fairly long runtime (30+ days between recharging).

Both the micro and the RF module have a fairly wide input voltage, however the RF module has a max input of 3.6V. So the issue is with fully-charged batteries either of these set-ups would easily supply more than the 3.6V max: more like 3.8-4.2V I'm guessing.

My gut tells me that the drop from, say, a 1N4001 diode (~0.6V) should do the trick, at least initially but as the cells discharge I'll no longer need that 0.6V drop and will then just be a waste.

My other thought was use a high-efficiency buck/boost converter (such as this one) with Vout set to 3V or so. I don't necessarily need a fixed 3V output since both the micro and RF module will work down to 1.9V.

What's the most efficient way to drop the output so that either of these battery set-ups will provide 3.6V or less?


texts: Do we need to send HSync, Vsync, HFP, VFP, HACTIVE in the Display port

texts:
On going through the display port specification, in the main stream packet structure I see only the pixels getting packed between blanking start and blanking end. Don't we need to send HFP, HBP, Hsync, Vsync that is done in DSI transfer.
How DP take care of this? Don't we need to transfer that information? Is it sufficient only to send pixel data?


texts:
I was looking a raspberry pi zero board, and I think it is four layer pcb, but I dont understand now why the designer used a ground plane on top and bottom layer?

It is assumed the four layer pcb has  ground and power internal plane, why external plane added, why not only leave the signal plane without ground planes or I can added a polygon plane no connected.

Sorry if I am wrong. I hope somebody can explain in a short answer pls


texts: Does level shifter have a maximum speed?

texts:
Of course it does, but what's it likely to BE?
I have a string of WS2811 LEDs which accept a 5V logic signal. I am running them from a LoLin board, whose GPIO ports output 3.3V logic.
I've put a Sparkfun logic level converter in between, but it doesn't seem to work.
The peak output voltage has gone up to a little over 3.3V, but the rise time is slower, so I think the average "high" is about the same.
Here's my input (output from the MCU):

Here's my output (from the level shifter):

So, is my assertion correct that there's a rise time associated with the device and a 800kHz waveform is basically just too fast?
....or am I just not using it correctly?


texts:
Although i should use mesh current to find the Vo, i try to apply nodal voltage at Vo. Eventually,i get the wrong answer.
What is wrong with my calculation or concept?


texts: How to reduce voltage of a dynamo to 5 volts

texts: A friend and I are going to make a bike-powered charger. There is a video of KipKay making one. But he uses a 12 volt 6 watt dynamo and there is a schematic that he follows to lower it to 5 volts. Can we use a lower voltage dynamo instead? If so, how would we make the schematic of components?


texts: How to quantify amplitude of oscillations in marginally stable systems?

texts:
A transfer function pole on the Imaginary axis indicates that the system is marginally stable which in time domain manifests as a sinusoidal motion with constant amplitude at the frequency of the pole. In some lightly damped systems, oscillations or limit cycles with small amplitude might be acceptable.

Is amplitude of oscillation for (almost) marginally stable systems is a function of initial condition of the system?
How to intuitively quantify amplitude of the oscillations for marginally stable system?
Can one use Eigen Vectors to quantify the amplitude of oscillations? If so, how?

PS, I asked this question in Signal Processing Exchange forum but did not get the answer I was looking for.
[1]: https://dsp.stackexchange.com/questions/71587/how-to-quantify-amplitude-of-oscillations-in-marginally-stable-systems


texts: I am using DVI(display visual interface) interface supporting FHD at 60fps. What is the current requirement of DVI interface.


texts:
I have an appliance that consumes 5mA when in standby on 220VAC mains.  I'm assuming on a 120VAC 60Hz system it would also consume 5mA in standby (can't measure it).  Since I haven't measured it, I guess my first question should be:  Is the appliance likely to also require the same current on a 120VAC mains?

Assuming the answer to the question above is "yes"; since power is measured in watts, and wattage is V * A, are 220VAC mains inherently less energy efficient than 120VAC mains?


texts: Do phototriac optoisolators (e.g. MOC3021) require pulse trains?

texts:
I have a project where I need to make a microcontroller trigger an old, non-controlled, camera flash (think of discharging a capacitor through a xenon lamp).  First idea was use a transistor-based optocoupler, but there are high voltages involved (200 V) and it is not so easy to find optoisolators with high collector-emitter breakdown voltages where I live.

My plan is use the MOC3021, a phototriac-based optoisolator, as it seems to work well: once the voltage on flash's capacitor goes bellow a certain value, the xenon lamp cuts, current goes down the holding current and the TRIAC opens. I have some experience with transistor-based optoisolators (4N25) and TRIACs, but not with photo-triacs. I don't know how exactly the internal LED will trigger the TRIAC yet, for example.

Question: Do I must generate a pulse train to trigger a photo triac ?


texts: How to remove the noise on the video of the DС-DС converter?

texts:
I had to make my own DC-DC converter on the TPS54360 driver. But because of the driver for two cameras are very strong interference. I want to try to isolate the driver GND and design it with a track back to the ground, because I understand that my main mistake is a common Polygon of GND.

Scheme of TPS54360:

My PCBs:

+12 - Power of cams
+24 - Power of TPS54360

TOP:

BOT:

My result :'( :

(the TPS54360 is on when the light is on)
What else can you pay special attention to?


texts: Mini slayer exciter (tesla coil) not working

texts:
I recently built this tesla coil, and I've tried many different setups, but for some reason, I can't quite figure out why it won't work.

simulate this circuit – Schematic created using CircuitLab

I also have a few pictures that I took to show what I have. The 9volt is charged. I double checked the leads on the transistor, I don't know what could be causing the problem.

The last picture is before I added the 2 rectifier diodes.


texts: Is it possible to passively pipe GPS satellite signals indoors via a waveguide, or 2 antennas connected by a coax?  If so, with what type of waveguide, antennas, coax, etc. should I try and experiment?  Thanks.


texts:
Hello.

I understand that one of the method to turn-off an scr is by
connecting a transistor parallel to it in order to short it.
I would like to turn on the transistor(BC547B)by touching the wires
with my finger(see photo) and make the scr turn-off.
Through the base the current may be about 8 microamper,so the max hfe will be
1.6mA(X200)and that current will be,only if i will connect the collector of the transistor before the R2(second position).

My question are:
Does it enough current(1.6mA)to make the SCR turn-off?

What is the minimum current that i need to pass through the transistor in
order to turn-off the scr?

Should i connect the collector wire of the transistor as the 1 position
or the second position?(before R2 or after the R2,LED?).
Thanks.


texts: Why a high number of harmonics means a lower bitrate?

texts:
I am studying on a book (I'm still at basics) and I haven't understood why a signal with a lower number of harmonics implies a low bit rate. I have this figure:

It clearly shows how a signal with a high number of harmonics means that the bits are easier to "recognize". The bits in the last figure are 01100010. But it also shows the relationships between the number of harmonics and the bit rate:

My question is: shouldn't it be the opposite? A signal with many harmonics could represent more bits than a signal with few harmonics. A signal with N harmonics is able to carry N bits in a certain period of time T, while a signal with just one harmonic can carry just 1 bit in T nano seconds. But there is something wrong in my argument, could someone clarify this?


texts:
I want to make a light for my boat roof. If I were to buy these (or similar), would I need to mount them to a heatsink, or would they be fine just as is?

The largest size one has a power output of 0.9W.

I would like to add some to the underneath of a counter (superglue if it doesn't get too hot, or silicone maybe?), and replace a couple of florescent tubes in light boxes.

Here's the image so you don't have to go via the link (and future-proof the question)


texts:
I am having a little trouble understanding what results from short circuiting.

The bottom circuit is the one we are given in the question, and we are asked to obtain the Norton equivalent. The above picture is the worked solution.

I don't quite get why we can "ignore" the \$20\Omega\$ resistor, is this because the current will flow through the short circuit because it has far less resistance? This has popped up before and I don't quite get it.


texts: I see many references to input and output caps helping with "stability" and some outright references to preventing oscillation in both answers on this site, and even in some data sheets. I also have seen references saying that the 7805 is "inherently stable" in both answers on this site and even in some data sheets and app notes. Are the datasheets/people using the term "stability" confused or are there versions of the 7805 that actually can become unstable? If so, I would like to see an example of a circuit in which this would happen.


texts: Timing specifications in a communication protocol

texts:
I am having this I2C EEPROM Chip from Onsemi - CAT24C

In table 6, AC Characteristics of the datasheet, only the Minimum time is provided for the SCL clock low and high period.

My questions :

Not only with this IC, in some Microcontrollers too, I have observed this scenario. In the timing characteristics of the IC / Microcontroller, why are the manufacturers providing only the Minimum (or in some cases maximum alone) values?
On what parameters (internal logic like TTL, CMOS?) do these timings (For example, setup time, hold time, rise time and fall time) depend upon? Like, why do they provide only either Minimum or Maximum but not the range of values within Minimum to Maximum? What is the reason behind it?


texts:
The circuits in the picture are basically opto-couplers connected to a relay circuit. The input pin of the opto coupler is connected to a MCU and the output of the opto coupler is connected to the relay. Initially I was using circuit 1 but then I modified it to circuit 2 since it uses less components. Both the circuits are working perfectly. My question is that is circuit 2 more prone to spikes and could the MCU get damaged or short due to any abnormality in circuit 2. I am using the circuit for long term continuous use. Which circuit, out of circuit 1 and circuit 2 is more reliable for long term continuous use?

IMPORTANT VALUES/LINKS

R5 = 330 Ohm

JD-VCC = 12V

R6 = 10K

U3 = 4N35SM Opto coupler(AVAGO)

http://www.comkey.in/sites/default/files/attachments/4N35-560E.pdf

Q3 = BC847 (NXP)


texts:
What is this symbol?
I couldn't decide whether it's a solder bridge or not.


texts: EC probe for hydroponics; physical design considerations

texts:
I want to build a simple EC-meter with two electrodes for a hydroponics project. A naive solution would just have the (copper plate) electrodes hanging into the water, but then the active electrode surface area (\$A\$ in calculations like this) becomes dependent on the water surface level. My friend suggested a 3D-printed sleeve to overcome the problem, like this:

The idea is that only the bits of copper sticking out at the bottom will act as electrodes, the sleeve letting us submerge them to sufficient depth that surface level variation is not a problem. However, I am a bit worried about water migrating up into the sleeve, possibly affecting the effective electrode area, or causing other problems.
So, is this a good design? If not, do you have better suggestions?


texts: Weird op-amp voltage increase when using AC-DC power supply

texts:
I'm trying to create a PWM signal to dim an LED. I came a across this circuit:

When I tried it out on a breadboard powered by a 5v supply coming from my USB Digilent Analog Discovery, it worked great. However when I tried to power it up from a 5.3v power adapter that plugs directly into the wall, I get a short increase in voltage on the PWM output signal. On the oscilloscope, it looks like this:

What's interesting is that the voltages reach up to about 5.8v, 0.5v more than what I'm even supplying the op-amp.
Moreover, when I set the duty cycle to 100%, it becomes apparent that the voltage increases have a frequency of 60Hz, the same frequency as the AC coming from the wall.
I tired to see if the voltage from the power supply was fluctuating between 5.3v and 5.8v but after measuring it seems that it does output a constant 5.3v.
What could be causing this weird behavior??? Thanks!


texts: Can I tell the voltage of High Power Transmission lines by its Type?

texts:
I am moving to Foster City, CA and am looking at an apartment about 550 feet from these power lines: https://www.google.com/maps/@37.562322,-122.27068,3a,75y,153.58h,99.44t/data=!3m6!1e1!3m4!1smflaesKSGl9ZTGIfEao93g!2e0!7i13312!8i6656!6m1!1e1

I am trying to figure out the max voltage these lines carry to do research on what a safe distance would be to live from them (worried about EMFs).  From my research I am guessing these lines can transmit 275kv - 400kv.  But information on the internet about these towers is hard to come by and not very clear.

Is it possible to tell the max voltage carried over lines by tower type?  Also any resources about safe living distances by transmission line type would be greatly appreciated.


texts: How to calculate current going through an LED

texts:
I'm a beginner to electronics. I want to find out how to calculate the current in the following circuit. (I know how to calculate total resister value in serial and parallel resisters in order to calculate the current, but is it possible to calculate without knowing the resister value of LED?)

simulate this circuit – Schematic created using CircuitLab


texts: LED lights with a dim light in open circuit

texts:
I was installing new LED lamps on my kitchen, which seemed to be functioning well. After turning off the lights, the newly installed lamps still had a dim light, that kept itself for quite long.

I've measured around 60VAC on the OFF switch for these lamps and 110VAC for the OFF switch attached to another lamp.

After lots of head scratching, I've tried to plug just one leg of the LED lamp into a plug hole, result on the picture below.

Why does this happen? How can I prevent it? Does it take a toll on my electrical bill?


texts: My triac turns on when gate attached to vcc (good)... but also when connected to ground (bad)

texts:
I'm still really new at working with triacs and understanding them, but I want to make a circuit that allows a microcontroller to turn on/off an AC signal (very low power, not mains, don't worry) to blink and sequence EL wire.

I sketched up this circuit:

and tried to build a simple version of it. BAT +/- is a 3-4V (depending on charge level) DC battery, AC1 & AC2 are the output of an inverter fed by the same battery. the loads are connected across OUT1A/OUT1B, OUT2A/OUT2B, etc.

my issue is that when I connect the gate pin of one of these triacs to VCC, the el wire turns on (great!), but it also turns on when I connect it to ground (bad!). if I leave it floating, the el wire is off.

did I do something stupid here? I'm still learning the nuances of these things and I'm not sure where I messed up.

thanks so much!


texts:
I was wondering if it is possible to make LED-s in an astable multivibrator slowly get brighter then slowly dimmer.
Can somebody help me please?
Thank you for your kindness! Have a good day!


texts: How to make an impedance matched circuit for fabbed antenna?

texts:
Okay I have developed an antenna for a system and need to create an impedance matching circuit.  The theory of conjugate matching is simple, but actually implementing it is something I can't find explained anywhere.  For example, do I use the network analyzer to first find the real and imaginary impedance at a desired frequency with the smith chart, and THEN I can take S11 measurements?

I have access to a network analyzer and a spectrum analyzer.  Please take me through the step-by-step process of creating an impedance matching circuit.


texts: Serial monitor controls Arduino Motor Shield; why Bluetooth didn't do?

texts:
I have got Arduino Mega 2560, Ladyada Motor Shield v1.0, HC-07 Bluetooth Module, and Android Bluetooth Terminal App. I combined Motor Shield on Arduino Mega. I get M+(5V)/GND point to run my HC-07 Bluetooth module to give energy. Bluetooth's RxD=Arduino's Tx1(18. pin), and Bluetooth's TxD=Arduino's Rx1(19. pin). I connected Arduino Mega to PC via USB cable to give energy. There is a DC motor attached on Motor Shield's M1 side.

My Bluetooth's connection, my Arduino's connection and Android application's situations are ready to use. But, I only control my DC motor from my PC's "Serial Monitor". Although, I want to control via Bluetooth, I could only control via PC. Where am I doing an failure onto?

My Arduino Code is:

#include <AFMotor.h>
#include <SoftwareSerial.h>
SoftwareSerial bluetooth(19, 18);

char val;  // Variable to receive data from the serial port
// DC motor on M1
AF_DCMotor motor(1);
// DC motor on M2
AF_DCMotor motor2(2);
int i;
void setup() {
  Serial.begin(115200);
  bluetooth.begin(115200);
  // turn on motor #1
  motor.setSpeed(200);
  motor.run(RELEASE);
  // turn on motor #2
  motor2.setSpeed(200);
  motor2.run(RELEASE);
}
// Move FORWARD
void go_forward(){
  motor.run(FORWARD);
  motor2.run(FORWARD);
 for (i=0; i<255; i++) {
    motor.setSpeed(i);
    motor2.setSpeed(i);
  }
}
// Move REVERSE
void go_reverse(){

  motor.run(BACKWARD);
  motor2.run(BACKWARD);

  for (i=0; i<255; i++) {
    motor.setSpeed(i);
    motor2.setSpeed(i);
   }
  }
// Move LEFT
void stop_go_forward(){
 motor.run(RELEASE);
motor2.run(RELEASE);
}
void go_left(){

  motor.run(FORWARD);
  for (i=0; i<255; i++) {
    motor.setSpeed(i);
   }
  }
  // Move RIGHT
void go_right(){

  motor2.run(FORWARD);
  for (i=0; i<255; i++) {
    motor2.setSpeed(i);
   }
  }

// Read serial port and perform command
void performCommand() {
  if (Serial.available()) {
    val = Serial.read();
     }

  //Bluetooth kontrol kısmı
   if(bluetooth.available()) {
    val = (bluetooth.read());
Serial.print(val);
  }
     if (val == '1') { // Forward
      go_forward();
    } else if (val == '2') { // Reverse
      go_reverse();
    } else if (val == '3') { // Stop Forward
      stop_go_forward();
    } else if (val == '4') { // Right
      go_right();
    } else if (val == '5') { // Left
      go_left();
    }
}
void loop() {
  performCommand();
}

/* KOMUTLAR
  1  -  ileri
  2  -  geri
  4  -  sağ
  5  -  sol
  3  -  dur
*/


texts: Current measurement in component level of an embedded system

texts:
I have an embedded system with a MCU, GPS module, GSM module and TI module. The project is largely depend on the total battery consumption. In order to characterize battery consumption, I have to measure current with respect to each module from the embedded PCB.

Does anyone know how to perform current measurements from the PCB with respect to the above mentioned modules?


texts: What is the relation between multiplexing and the sampling frequency in a data acqusition system?

texts: There is a data acquisition board recording analog signals from 10 channels with multiplexing. If one wants to sample each channel with for example 2000Hz and the number channels is 5 should the sampling frequency be set to 5x2000=10000 for the board? I have a confusion with the skew and sampling. here is the device specs I'm talking about: http://www.mccdaq.com/usb-data-acquisition/USB-1616HS-BNC.aspx


texts: Interpretation of the pole of a transfer function of a vibrating platform

texts:
I am not able to understand what the frequency where the hydraulic pole occurs (as in the diagram) signifies? To give an overview, there is a vibrating platform and we are seeing its response motion at different input frequencies using an inductive position sensor (IPS). Now I know poles are points where the transfer function’s denominator is zero. But what does that translate into for a real life system? I was guessing that it might be the point where the amplitude of motion becomes maximum (in reality it can’t become infinity hence this thought). But in the diagram, I just can’t figure out what makes the pole point’s frequency (around 20 mHz) special?
My reasoning might be awful and I apologise if that is so.


texts: What are you going to do with the Arduino Uno?

texts:
The next Arduinos have been announced, the Arduino Uno & Arduino Mega 2560. The major difference is that it's equipped with a USB chip which can be reprogrammed to act like different USB devices like a keyboard, mouse or similar, and the Mega has twice as much memory.

What would you like to do with the new boards?

My plans are to make a keyboard/mouse replacement for playing certain games. Press a button to quickly & repeatedly click the left mouse button type thing.


texts: Why is USB D+ tied to VDD (for PCM2707 at least)

texts:
I'm trying to implement an audio DAC using PCM2707 as a receiver and, looking over a couple schematics of previous implementations - at least one being verified as correct, I noticed D+ being connected to VDD through a 1.5k resistor. Considering I trust the source of the schematics, I take this to be correct.

But why is implemented that way? I'd really want to understand how it works... and Google has not helped me so far.


texts: Does switched-mode power supply feature galvanic separation?

texts:
I've carefully read Wikipedia article and can't get one important thing - is there galvanic separation in such supply?

The diagram in that article goes like this:

What I see here is that the transformer is only on one path and there's the "output->chopper controller" path that bypasses the transformer. Usually the transformer is the unit that performs galvanic separation.

Does this mean a switched-mode power supply doesn't feature galvanic separation between the input and the output? Is it possible for unlimited current to flow through the power supply?


texts:
In my attempt to reinforce some electromagnetism concepts, I took the fragment below from the book “Right the First Time, A Practical Handbook on High Speed PCB and System Design".

I got confused with the statement: Current flow is induced by electromagnetic fields. Electromagnetic fields are not induced by current flow.

To my understanding, current flow through a wire can induce a magnetic field. So it's confusing when the author says that electromagnetic fields are not induced by current flow. Am I mixing some wrong concepts or the statement is not well elaborated?


texts:
Trying to find out what is the possible maximum PWM frequency achievable with a low-cost FPGA with at least 2'000 "steps".

Being new in FPGA, I quite could not quite figure out how to extract this information from the datasheet.

Let's take ICE40LP384-SG32 as an example.

There are several pages concerning timings, but I am not sure what is relevant in this context and how the final max PWM frequency can be calculated.

Maximum sysIO Buffer Performance states a speed of 250 MHz.

With a clock frequency of 250 MHz, and a PWM counter of 2'000 steps that would yield a 125 kHz max PWM output frequency, is this correct or is there more timing consideration involved?

Could it be clocked faster than that? What is the relevant information there?


texts: Current sourcing octal buffer/line-driver for 7+1 segment LED multiplexing?

texts:
I would like to multiplex 8, 7-segment LED displays with two, 8-bit shift-registers.
The required current for one segment is 20mA. I have no desire to overdrive the leds with 8 times the specified current, that will shorten their precious lifetime.

Since the displays are common cathode, the TPIC-6B-595 is suitable for sinking current, but I did not find any current-sourcing shift registers, so I need to use an octal buffer/line-driver. I prefer octal-buffers over Transistor/FET arrays.

The 74**541 and 74**244 datasheets are not clear about the current-sourcing parameters, to me it looks like they are only sinking and cannot handle 7+1 (dot) * ~30 mA = 240 mA.

This is the circuit diagram:

Does anybody knows any solution to my problem?


texts: Change Altium Net Wire / Track Connector in Schematic Editor

texts:
In the Altium schematic editor, is it possible to flip a net object so the text stays read-able but a wire connects on the right hand side of the net?

No matter how I flip or rotate, the net connector is always to the left of the text.

I've bounced into this so many times, I'm hoping there is some Altium way to change this behavior.

I want the connection point under the C in "INDIC" not under the C in "CHG"


texts: LM386 no output with input signal below 2V

texts:
I'm trying to implement volume control using a digital potentiometer (LM386) and audio amplifier (MCP4131). The way I have it setup, I'm outputting square wave audio signals out of a PWM pin on the Particle P1 board.
The amplitude of the square wave is adjusted using a digital potentiometer (acts as a moving voltage divider) before it enters a LM386 audio amplifier.
Where I'm having trouble is, when the amplitude of the square wave is adjusted below 2V (feeding this into pin 3), the LM386 audio amplifier stops outputting a signal (pin 5). Everything works fine above 2V and I get a good amplified square wave out of pin 5. This is a problem because it limits the desired range of volume control. I'd like to get softer audio as well.
I've read the LM386 datasheet back and forth and can't see to find a specification that would explain this. I think I may be missing something pretty basic... The schematic is attached.
Any help would be appreciated. If there are any questions about the set-up, let me know!

Datasheets:
LM386- http://www.ti.com/lit/ds/symlink/lm386.pdf


texts: SPI: How does communication work with a device that has multiplexed SDO and SDI signals?

texts:
Yes this question is related to MCP4131 which is a 8 pin digital potentiometer. I have never seen/heard/used multiplexed SPI before so am trying to clear some confusions. The datasheet shows connection as shown below:

Now lets look at the timing diagrams which is where the confusion lies. They are found starting from page 44:

The first and third waveforms show SDI and SDO being driven at the same time. Certainly the MCP4131 cannot output and input signal at the same time since in SPI a signal is latched at a specific edge of SCK. In this case it is the rising edge. So do I understand correctly that for MCP4131 only the second waveform is applicable since the first and third do not make sense with multiplexed SPI?

With multiplexed SPI and a high voltage mode on CS this looks like a mysterious device. Why make life harder by squeezing so much functionality in such a small package?


texts:
I have a problem with this circuit

I can't write the status equation because the system that characterizes the circuit is coupled respect to derivatives of the difference of rings currents.

Let $$i_1:=i_{R_1}=i_{L_1}$$ $$i_2:=i_{R_2}$$ so, applying counterclockwise the KVLs to the two rings we obtain

$$\begin{cases}
L_1\frac{\text{d}}{\text{d}t}i_1-L_2\frac{\text{d}}{\text{d}t}[i_2-i_1]+R_1 i_1=0 \\
L_2\frac{\text{d}}{\text{d}t}[i_2-i_1]-e+R_2 i_2=0 \\
\end{cases}$$

or, equivalently

$$\begin{cases}
\frac{\text{d}}{\text{d}t}i_1=-\frac{R_1}{L_1+L_2} i_1+\frac{L_2}{L_1+L_2}\frac{\text{d}}{\text{d}t}i_2\\
\frac{\text{d}}{\text{d}t}i_2=-\frac{R_2}{L_2}i_2+\frac{\text{d}}{\text{d}t}i_1+e \\
\end{cases}$$

but now I don't know how to proceed to determinate the vectorial status equation $$\dot{x}=Ax+Bu$$


texts: Implementing a FSM using JK flip flops in VHDL

texts:
This is yet another semester project I'm stuck on.
I need to implement a state machine starting from the following diagram:

What I've managed to do so far is write this state table, although I'm pretty sure I've gotten something wrong even up to here.

I believe the next step would be drawing a Karnaugh map, but I have no idea how to assign the input values.

It also says I need to use a 8x4 memory, but I'll worry about that once I get to it. For the moment, I'm stuck on the K-map. Any help? Is the table at least correct?


texts:
My goal is to generate timer interrupt on Attiny1604. I don't need a specific frequency right now, I just need to understand the inner workings and get it under control. I will be using the 16-bit timer A.
My problem: (If the corresponding interrupts are enabled) I will get a ~217 kHz square wave on the output, but nothing happens if I modify any of the registers (different prescaler, different compare value, etc) the output will always be the same 217 kHz square wave.
If I understand the datasheet correctly, I am supposed to do several things:

Enable timer interrupts:

/* Timer control register
    [0] = Enable
    [2:0] = Prescaler
    - Prescaler 0x2 = /2
    - Prescaler 0x4 = /16
*/
TCA0.SINGLE.CTRLA = (1 << 0) | (0x4 << 1);

Set frequency mode and enable CMP0EN:

TCA0.SINGLE.CTRLB = (1 << 0) | (1 << 4);

Set compare (CMP0) value:

/* Timer Comare register0
    Value to compare against TOP (CNT)
*/
TCA0.SINGLE.CMP0L = 0b0010;
TCA0.SINGLE.CMP0H = 0b0011;

Enable CMP0 interrupt:

TCA0.SINGLE.INTCTRL = (1 << 4);

Then, to monitor the output, I've made this:
volatile int set_output = 0;

ISR(TCA0_CMP0_vect)
{
    // digitalWrite(4, !digitalRead(4));
    if (set_output == 0)
    {
        PORTB.OUT = 0x0f;
        set_output = 1;
    }
    else
    {
        PORTB.OUT = 0x0;
        set_output = 0;
    }
}

Whole code:
#include <Arduino.h>

volatile int set_output = 0;

void setup()
{
    pinMode(4, OUTPUT);

    cli();

    /* Timer Counter register
        TOP (current) value of counter?
    */
    TCA0.SINGLE.CNTL = 0;
    TCA0.SINGLE.CNTH = 0;

    /* Timer Comare register0
        Value to compare against TOP (CNT)
    */
    TCA0.SINGLE.CMP0L = 0b0010;
    TCA0.SINGLE.CMP0H = 0b0011;

    /* Timer control register
        [0] = Enable
        [2:0] = Prescaler
        - Prescaler 0x2 = /2
        - Prescaler 0x4 = /16
    */
    TCA0.SINGLE.CTRLA = (1 << 0) | (0x4 << 1);

    TCA0.SINGLE.CTRLB = (1 << 0) | (1 << 4);

    TCA0.SINGLE.INTCTRL = (1 << 4);

    sei();
}

void loop()
{
}

ISR(TCA0_CMP0_vect)
{
    // digitalWrite(4, !digitalRead(4));
    if (set_output == 0)
    {
        PORTB.OUT = 0x0f;
        set_output = 1;
    }
    else
    {
        PORTB.OUT = 0x0;
        set_output = 0;
    }

}


texts: change cell protection value for 18650 from DW01?

texts:
From what I read, the tp4056 with protected circuit can still damage the cell. According to data sheet, VOCP at 4.3v, VODP at 2.4v.

Is there an "easier" way to lower VOCP, 4.1v, AND increase VODP, 3.0v?

TP4056 data sheet

DW01
8205A
Thx
edit
For your info, i'm not a expert, just a DIY guy.

I think i dont explain correctly.
I need to protect my cell, 18650, from over use, (Overcharge or Overdischarge)

I bought several TP4056+DW01 from Aliexpress.
Frankly, no schematic is needed, data sheet is enough?
I read several forum about TP4056 and DW01. Those chip are not perfect.

TP4056, is a OK a charger.

My concern is DW01 and restrict of space for my usage.
DW01 should protect the cell not to Overcharge and Overdischarge.

All I want is to change the cutoff circuit from DW01.

Overcharge detection voltage [VOCP] (V) : 4.250±0.050
Overdischarge detection voltage [VODP] (V) : 2.40±0.100

Here the perfect chip, FS312F-G
Overcharge detection voltage: 4.25±0.025 V
Over discharge detection voltage[VODP]: 2.90±0.08 V

I found a perfect chip for my need, but why should I buy if i could trick the DW01. Could I?

I check the CN305, it seem good, but not easy to find here :(

Till now, i could not find someone that could change the cutoff, probably because it it not possible with DW01 ??? :)

What do you think of this option,
1. Use TP4056 + DW01 + voltage divider for EACH cell
a. TP4056 charge to max 4.263V, good for not to Overcharge
b. DW01 + Voltage divider, i can adjust to cutoff around 3v, good for not to Overdischarge, but my cell stuck with TP4056 permanently.

2. Use TP4056 + FS312F-G (replace DW01)
a. TP4056, as a charger
b. FS312F-G, Cell protection

*sorry for my bad english,
*thx for good comment or suggestion :)
merci!


texts:
This is my very very very first attempt at any real electronics and someone suggested starting with a simple power supply. So I was hoping that SE could sanity check my diagram.

What I want is deadly simple, a supply that can accept 7.2V DC via a battery or 9V DC from a wall wart and puts out both 3.3V and 5V.

I decided I would follow SparkFun's power supply tutorial, but attempt to "add" a 3.3V supply to the circuit and I honestly have no idea if I did this right, but here it is...

I plan on using the following regulators (3.3V & 5V).

Pretty much any feedback is welcome, but I mostly want to know if this will accomplish what I want and if any improvements can be made (and if so some explaination would be great).


texts:
Using my Arduino Uno, I have managed to arm my drone motors and keep them running continuously and stutter free. I have an esc between the motors and the arduino so I am using the Servo library.

<#include <Servo.h>

Servo motor1;
Servo motor2;
Servo motor3;
Servo motor4;

void armMotors(Servo motor1, Servo motor2, Servo motor3, Servo motor4){
  motor1.attach(3);
  motor2.attach(4);
  motor3.attach(5);
  motor4.attach(6);

  motor1.writeMicroseconds(2000);
  motor2.writeMicroseconds(2000);
  motor3.writeMicroseconds(2000);
  motor4.writeMicroseconds(2000);
  delay(1500);
  motor1.writeMicroseconds(1000);
  motor2.writeMicroseconds(1000);
  motor3.writeMicroseconds(1000);
  motor4.writeMicroseconds(1000);
}

void setup(){
  armMotors(motor1,motor2,motor3,motor4);
  delay(5000);
  motor1.writeMicroseconds(1090);
  motor2.writeMicroseconds(1090);
  motor3.writeMicroseconds(1090);
  motor4.writeMicroseconds(1090);
}

void loop(){
}

So I recently bought an arduino nano 33 ble. Same code and same wiring and the motor sound like they are studdering but still spinning. Every few seconds there is a little jump on one of the motors. I have tested them individually and the problem still occurs. I'm convinced its my new board and I want to know why and how to fix it. I appreciate all the help I can get.