texts: Development of proprietary WiFi protocol

texts:
I would like to do some customizations to IEEE 802.11 MAC layer protocol and implement it on hardware. I searched rigorously but I could not find any chipset with 802.11 PHY (RF + baseband chipset) using which I can implement custom MAC layer protocol. Most of the existing WiFi chipsets are integrated with MAC layer as its better and efficient to have it in hardware.

The one approach I think I have is to interface Radio frontend chipset (like MAX2830) with baseband chipset and then controlling everything using some MCU or FPGA. Is there any other easier approach I can use (e.g. SDR)?

Edit: The purpose I want to implement this is to achieve a custom wireless link with better packet priority and scheduling algorithm. I would also be interested in tweaking CSMA thresholds and implementing additional error correction coding in MAC layer itself.


texts: Voltage output waveform of a differentiating amplifier

texts:
I have the following picture of the input and output voltage waveforms from a differentiating amplifier as shown below:

And the schematic is as shown below:

My teacher claimed that these waveforms are correct, but I am starting to feel some doubt.

I calculated the equation of the line for input voltage waveform from time t=0 ms to t = 0.5 ms (with respective voltages of -500 mV and 500 mV) to obtain: y= 2000x - 0.5, and thus the output voltage waveform should be at y=2 mV for t=0 ms to t=0.5 ms, which is not shown in this picture.

Is this something to do with errors, or simply a mistake?

Also, I am aware that when differentiating a triangular waveform the output waveform should be square. So again, is the obtained picture a result of error (eg. from inaccuracies), or "human" mistake?


texts: Button short press and long press without using microcontroller

texts: I have a single button system for which I want to detect the short press and long press of the button. The task is really easy with a microcontroller, but I want to do it without in a simpler way, in order to reduce the BOM as well as some cost on the BOM, however miniscule it might be. So, is there any way to detect the long press and short press without using the microcontroller?


texts: How to set PWM frequency with high granuality

texts:
I want to create a PWM at 100kHz that can have 1000 steps. e.g. when I set CCR1 to 0%, the PWM is off an when I set CCR1 to 499 it should be 50% and obviously at CCR1 = 999, it should be full duty cycle of 100%.

The CPU_CLK is 80MHz...but I can not achieve this. here is my code so far:

  htim1.Instance = TIM1;
  htim1.Init.Prescaler = 0;
  htim1.Init.CounterMode = TIM_COUNTERMODE_CENTERALIGNED2;
  htim1.Init.Period = 1000-1;
  htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
  htim1.Init.RepetitionCounter = 0;
  htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;

This gives me a PWM with frequency of 40kHz....far below 100kHz...the Prescalare is already at minimum ...is this impossible to achive?

The chip is STM32L476.


texts: How to get more than 100mA from a USB port

texts: I heard that the current limit for a USB port is 100mA. However, I also heard that some devices can get up to 1.8A from a port. How do you get past the 100mA limit?


texts: On CPU start-up cause Start-up my Device Connected on ParallelPort?

texts:
I am using ParallelPort to do communicate with One Electric Device.

My Task on ParallelPort is to just start and stop device.
For that I have write up following code:
[My Code is written in C#.Net]

One static Class ParellelPort which contain Method static extern void Output(int address, int value).

public static class ParellelPort
    {
        [DllImport("inpout32.dll",EntryPoint = "Out32")]
        public static extern void Output(int address, int value);
    }

Using that method

I do write something on ParallelPort in my case just writing 1 and 0.

For starting and stopping Device.
i using following Code.

private const int PORT_ADDRESS = 0x0378;
int startMachine = 1;
int stopMachine = 0;

ParellelPort.Output(PORT_ADDRESS, startMachine); //For starting Device.

ParellelPort.Output(PORT_ADDRESS, stopMachine);//For Stoping Device.

Now my PROBLEM IS,

Whenever i am starting CPU it cause start Device automatically as CPU writing on Parallel

Port each time it starts.

So starting of CPU start my DEVICE  I need to get rid of it.

Is there any way to disable ParallelPort or way something like this to get rid of it.

NOTE:

I am using PIN-2 for Communicate with my device.

Each time I write value=1 on ParallelPort 5 volt is available at PIN-2 and

When write value=0 on on ParallelPort 0 volt is available at PIN-2 (this cause stops my Device).

And whenever CPU start  5 volt is available on each DataPort Pin from PIN-2 to PIN-9.

Thanks.....


texts: Can a voltage comparator be constructed from NPN BPJ transistors and resisitors alone?

texts:
I'm working though some basic logic circuits with my niece and nephew and wanted to implement elements with transistors before we get more complex and replace modules with ICs. I know this is trivial with an OP Amp, but this is a teaching exercise.
I've seen the following circuit,

But I don't understand how it works and I think it requires both a positive rail, negative rail and ground, which is a complexity I'd rather not add to our experimentation. In the application I have in mind, all voltages I'm comparing will be positive relative to ground.
This stepping stone is to allow us to build a 555 timer, as, with help from SE, we've managed to put together a D flip-flop and I think we just need the voltage comparator to get a working 555.


texts: If i wind a primary on an inductor can it be used as a step up transformer(assuming the number of turns in the primary are lesser than the secondary).


texts:
2 days ago I asked for any ideas and references for backup battery charger:
Backup battery charger
For the idea see the image:

You actually proposed me some very interesting solutions, e.g. based on power mosfets, and I'm very grateful to You for all your help.

But somebody showed me this concept of the circuit:

And my question is: What are the main drawbacks of this approach? Is there something that makes this circuit impossible or difficult to implement?

My only idea is the increased heat generation - on diode and transistor.

Thanks again.


texts: Detect if an electromagnet it touching metal (without a switch)

texts:
I have a simple 12V DC holding electromagnet connected to a microcontroller using a MOSFET - the once you buy on aliexpress or eBay for cheap [1].

How can I detect if the magnet is in full contact with a ferromagnetic disk or strike plate when I turn it on? Unfortunately I can't rely on a limit switch since the placement of the magnet & metal has too much freedom.

Is there something with the inductance of the magnet that I can sense or perhaps differences in current consumption? One other possibility is to probe using PWM.

[1] https://www.aliexpress.com/item/CL-P-20-15-Holding-Electric-Magnet-Lifting-2-5KG-25N-Solenoid-Sucker-Electromagnet-DC-6V/32761771780.html


texts: Solar Charge Controller: Voltage increase problem

texts:
I am designing a solar charger controller for a solar panel to charge a 12v battery. I am using arduino uno for this project. Till now I am just checking the circuit on breadboard first. For testing purpose I have plugged in power supply in replace of a solar panel. This power supply has potentiometer so output voltage can vary from 10-14v. Now following is the circuit I am using :

For testing purpose I am giving input voltage and checking this at analog pin A0 of arduino. If it is greater than 12.0 volts then turn on a output PIN6. If the voltage is less than 11.0 volts, turn off PIN6. SO when PIN6 is ON, MOSFET will give 12v and I am giving this 12v to voltage divider circuit where I am measuring the voltage using A1 pin of the uno.

Following is the code

solarScale = analogRead(A0);
batScale = analogRead(A1);
solPinVolt = solarScale * (4.279/1023.00);
solVolt = solPinVolt * (10 + 2.2)/2.2;
batPinVolt = batScale * (4.279/1023.00);
batVolt = batPinVolt * (10 + 2.2)/2.2;

if(solVolt >= 12.0)
{
  digitalWrite(6,HIGH);
}
if(solVolt <= 11.0)
{

  digitalWrite(6,LOW);
}

I am getting the exact voltage which I am applying. Problem occurs as soon as PIN6 is on. When voltage is above 12.0v, PIN6 is ON, so mosfet is on but dont know why at serial terminal is show 13.45v while in actual it is 12.23v.
Why the voltage is increasing when digital output gets turned on. Please help. Thanks


texts:
I'm creating a water level indicator so I can turn on a pump when the water level gets too low. I have NPN transistors, but I would like the transistor to act as a switch that closes when the water level drops below a certain height. The NPN transistor I used for the experiment seems to do the opposite (close the switch when the water level is high enough), so I figured I need to use a PNP transistor instead. However, after following this SO suggestion and flipping the connection to the battery terminal as well as the LED, the LED did not turn on as expected when the water level gets too low. I would appreciate your advice.

The circuit below lit the LED when the water level closed the circuit. How do I get the LED to turn on when the circuit is open?

simulate this circuit – Schematic created using CircuitLab


texts:
When a virtual memory address outside the range of loaded into physical RAM is referenced and a page fault occurs, does the Memory Management Unit rely on DMA (Direct Memory Access) to swap the referenced page into RAM, or is an interrupt routine that uses the CPU to copy in the memory in some more mundane way occur?

Assume the x86 architecture, please.


texts:
I want to couple 10W at 150MHz, 50 Ohms (before and after an RF switch). The PA is a RA08H1317M powered by 14V DC.

How do I choose an RF coupling capacitor?

I have found this answer, but it only applies to the frequency, not power. What power rating can I expect from an 0805 or 1206 MLCC?


texts:
I am using QuartusII for designing a Four bit ripple carry adder.
I keep getting this error:

Error (275022): Illegal bus range or name for logic function for instance "instMyAdder" of type 4 Bit Adder

My schematics are all correct, and you can verify yourself, and I am not using any buses, yet I still get this error. I have tried doing everything. I restarted, but I still get the same exact error.

Here are my schematics:
Full Adder Design:

4 Bit Adder Circuit:

2 Bit Adder Circuit

I have done everything that I can to fix this problem, yet I still get the same exact error every single time. Altera suggests changing the names, but I'm not sure what that means:


texts: Is there a relevant difference between these capacitors?

texts:
I am planning to try designing a board that incorporates a switch-mode DC-DC converter, using this Texas Instruments reference design for their TPS54386PWPR regulator part:

The bill of materials for the Texas Instruments circuit specifies C1 as a 100 µF 25 V 20% aluminum capacitor (Panasonic part # EEE-FC1E101P) that is 10.2 mm tall. I would like to substitute a part that is no more than 8 mm tall for board clearance reasons.

I was able to find several possible alternatives on Digi-Key, including other Panasonic parts, but I do not understand which specifications might be relevant to choosing a suitable replacement and which are not.

For example, all of these match the basic parameters I (mostly) understand: capacitance, voltage and tolerance. But what else do I need to take into account?


texts: Why is only MOV allowed for surge suppression according to IEC 60950-1

texts:
IEC 60950-1 prescribes that if a surge suppressor is used in a primary circuit it "shall be a VDR". The document informs that a VDR is sometimes referred to as a "varistor or a metal oxide varistor (MOV)".

It further explicitly states that "gas discharge tubes, carbon blocks or semiconductor devices with non-linear voltage/current characteristics" are not allowed.

Why is this? From what I've read, I'd much rather use a high voltage TVS diode. MOV's seem to have a finite life when subjected to transients.

Edit: As was helpfully pointed out by Spehro, the word is Prescribe, not Proscribe as I initially wrote :-).


texts:
I remember that there's a very simple circuit diagram that explains how there can be 2 light switches for 1 light and that regardless of which switch you turn 'on/off' the light is toggled on/off.

This, as I recall, is the same circuit that is used for the light on a staircase where there is a switch at both the top and the bottom of the stairs.

I've been trying to draw this circuit diagram but I just can't get it... could someone explain or provide a circuit diagram to help please.


texts: Device for preventing 12V battery from dying

texts: I am looking for a device which cuts off the connection between batteries and the system just like a circuit breaker when my 12V battery goes below 9V(for example) for preventing it from dying completely. I can use a comparator circuit and a power relay however wondering if something off the shelf can do the job.


texts: Why the stable supply voltage present a ripple after connecting it to the testing board?

texts:
I used a power supply to supply 1.8V as the Vdd of the tested-circuit,
after I connected 1.8V to the Vdd pad of the testing-board,
the originally "clean" 1.8V began to have a ripple (the total current is about 70mA).

The phenomenon can be improved by adding 1uF cap between
Vdd and gnd Pad,but the ripple still exsited.
But why the originally clean Vdd present a ripple after connecting it to the testing-board?

By the way,the board only contain an OP amp that I want to test,and some I/O port(ex:header,SMA,switch......),and all inputs are shorted to ground.

U1 and U2 is regulator,the others is I/O ports and the op amp being tested.


texts: It's a 9.5V 0.6A adapter with a really strange plug like a smaller half-flat IEC C7/C8 but much smaller, like 12mm wide. What is this called or is it totally proprietary?


texts:
Today I tried to build a small circuit which basically consists of three NUD4001 LED driver, three n-Channel FETs and a RGB Power LED from SEOUL. I don't have the exact specs ready but the main specs are as follows:

NUD4001 (OnSemi)
FET: 2.2A I(DS)
RGB Power LED (Uf(Red) = 2.5V, Imax = 400mA)

I tried to build the schematics very close to the Figure 9 - Device Configuration for PWM, yet, instead of using a BJT I used a n-FET. I also didn't populate Rext2 since I do not understand its purpose. I am only powering the circuit from 5V and am using a 2R resistor for Rext1. This yields a Vdrop below 2.2V and the Power Dissipation should be fine. The PWM signal is created by a AT32UC3B and its frequency is rather high (some kHz).

I added the somewhat simplified schematics:
https://www.circuitlab.com/circuit/8bde88/nud4001_fet/
(Disregard the AT32UC3, it is actually the EVK1101 from Atmel, I just wanted to display where the logic signal is coming from)

Now for the problem:
It appears that the PWM doesn't produce a PWM result. I have an 8bit PWM with 255 being the maximum value (always on) and 0 being always off. I also checked the logic signal with a scope and it looks as expected (I can set a variety of duty cycles and the signal changes).

Yet, the LED doesn't seem to notice the change in the logic signal (I drive the FET gate directly from the GPIO Pin which is configured as an output).

I can switch the brightness from 255 down to 20 and the brightness of the LED seems to be the same. If I turn it fully off, the LED goes off as well.

Now, do you have any idea what I am doing wrong. I can think of the following things:

The PWM frequency is too high, so the NUD4001 is not able to work as expected
I made an error connecting the FET (What good is Rext2 for?)


texts: Driving 2inch 7segment display using pic microcontroller

texts:
I want to drive 2 inch 7segment display(common anode) using pic microcontroller.
The forward voltage of segment is around 7v.

The emitter of the pnp transistor is connected to the12v power supply. And collector to the common anode pin of 7segment. Base is connected to the pic output pin via base resistor. The common cathode pins are connected to the serial in parallel out shift register via resistors. I don't have a diagram with me right now, that's why this much explanation.

My question is, can I switch on/off the  transistors using 5v out from pic or I need 12v input to make the transistor switch since the emitter is connected to 12v. Because the transistors never goes to cutoff state, always on.

Kindly please give a solution for this...
Thanks

Nikhil.

simulate this circuit – Schematic created using CircuitLab


texts: Will this approach accurately measure capacitance and infer spacing?

texts:
I am interested in any feedback or caveats regarding the following capacitance measurement method before I begin setting it up.

For an experiment, I have come across the need to measure and track the spacing between two samples, with resolution of 0.1 mm or better. Due to the constraints of the rest of my setup, after a little bit of research, it appears to me that a capacitive measurement method is most suitable to infer the spacing.

Consider the following simplification as the goal:

I would like to measure/track the distance between 2 copper plates (each 2cm X 2cm) that essentially form a big capacitor.

Note: AD7746 below is a 2-channel, 24-bit sigma-delta Capacitance-to-digital converter

The idea: Starting with \$C=\varepsilon_0\varepsilon_r \frac{A}{d}\$, where the plate area the dielectric of air are constant, it's of course true that the measured capacitance is inversely proportional to distance. So I could first take some calibration data, and using that, adjust accordingly to infer the distance from any measured capacitance value.
The measurement method: Given my fairly stringent requirement of 0.1 mm resolution or better, I plan to go for a precise measurement by using Analog Devices capacitive measurement IC AD7746.

What things should I be careful about to get as clean a measurement as possible, or what aspects can I improve upon? Could the above get me my desired resolution, or is it prone to error sources that I'm not seeing?

One possible improvement is: I was thinking, since AD7746 has two channels, I could even use the extra channel to also simultaneously measure a separate pair of completely fixed/reference plates, and use that to nullify any temperature or EMI effects. Hmm, not sure how important those factors are...

UPDATE (more detail): A bit more about my setup, and what constraints exist: The experiment involves a larger sample that is directly above, kissing the top plate. The sample is about 75mm X 75mm (non-metallic) and it sort of crushes the top plate down during the vertical motion.

As a result, there is no scope for placing any sensors vertically parallel to the Y-axis motion. Any sensing of the vertical displacement/gap would have to be accomplished either horizontally, or with parts mounted on a board in the position of the bottom plate.

With that said, the top plate was added just for my proposed way of measurement, and is not strictly necessary. My primary goal is to measure how far away my aforementioned 75mm X 75mm sample ends up vertically from the bottom.

UPDATE (Measurement result): I ran a quick test on the capacitive measurement, and I was able to distinguish the capacitance data fairly clearly at about 0.2 mm steps in the displacement. The noise I'm getting in the capacitance measurement is, as of now, too large to get better resolution than that. I am trying to vary a few things to see if I can improve the SNR in the capacitance measurement.


texts: Coupling between hot ground and cold ground

texts:
When reading thru the power supply schematic of a sharp brand television, I noticed the link between the low voltage ground and the mains rectified DC ground.

What is the purpose of this? Don't we achieve best galvanic isolation if such link is not there?


texts: Closed-Loop Voltage Gain of Circuit Problem

texts:
This might be a simple problem, but I simply cannot wrap my head around it; I'm still learning about ideal op-amps and electronics in general.

The problem is:

I have tried solving it using the gain formula for an inverting op-amp configuration, which goes "Av = -(Rf/R1)".

I determined an equivalent resistance for the top 5 resistors (R||R + R||R + R = 2R) and divided that by the resistor at the inverted input, which that gave me an answer of -2, where it should be -8, according to my professor's solution.

What the hell am I doing wrong, help is greatly appreciated!


texts: Why this nrf24l01 module has two VCC and two GND?

texts:
This module has two GND and VCC pins:

However, this module and this module only have one of each. Why is that?

EDIT: I know most MCU's have a lot of 3V3, 5V and GND pins. This is required for connecting the most varied peripherals simultaneously without exceeding max current output. But I have never seen a peripheral with this configuration. Since I never saw a MCU with only one GND and one VCC pin, and there is a lot of nrf24l01 modules with just one pin of each, I would like to know the purpose, since it's supposed that this module should be connected with only one MCU at a time.


texts: Transfer function of three cascaded RC filters?

texts:
I am looking for the transfer function of three cascaded RC filters:

I have found the solution for two RC cascades (components differently labeled):
$$H(s) = \frac{1}{s^2C_1R_1C_2R_2 + sC_1R_1 + sC_2R_2 + sC_2R_1+1}$$
I need an analytical expression like this one for three cascaded RC stages, because I need to fit such a function to experimentally measured data from a network with unknown components \$R_i\$ and \$C_i\$.
I tried to find the function myself using KCL and KVL but expressions tend to get awfully long and so far I didn't manage to find a transfer function that is in agreement with simulations of such networks.
Is the transfer function for three cascaded RC filters well known?
Or is there probably a different way to find the components \$R_i\$ and \$C_i\$ for a system like that from measured data \$V_{\text{out}}/V_{\text{i}}(f)\$?


texts:
I'm currently researching LDO adjustable regulators to make an adjustable supply that runs from 5V. I want my supply to be capable of supplying down to 0V.

I've found the LT3083, which can adjust down to 0V, however has a 310mV drop out voltage. I would prefer to have a smaller drop out voltage than this. Does anyone know of a similar regulator that meets my 0V requirement, but has a smaller drop out voltage? I am seeking a smaller drop out voltage so that my supply's upper range will be closer to 5V.

Thanks


texts:
I have the following circuit:

(source: siteonlinetest.com)

The diagram above has a pot between VCC, LM393 and Ground, on my board pictured below this is replaced by a voltage divider with two 10k pots.

It looks like this: (Front)

The logic is currently as follows:

VCC=5v
Output=5v (obstructed), floating (open).

I need to flip the output logic and haven't had much luck in doing this. This board is the perfect form factor for my application and I would like to keep it if possible. Is there something simple I can add to it to accomplish this?


texts: Pole counts for VFD driven induction motor

texts:
What is the significance of pole count of IM if it is driven by a VFD? If we are using the power supply frequency (50Hz or 60Hz), the pole counts matter in terms of torque and synchronous speed.
But if the IM is driven by a VFD, pretty much any speed (or frequency) can be generated and the torque and RPM can be tightly controlled.
So is there any difference in performance between 2, 4, or 6 pole (all similar power) IM if a VFD is driving them?


texts: External interrupt debugging with PIC16F877A

texts:
I am working with a PIC16F877A on a simulator on MPLABX 5.35 with XC8 compiler ver 2.32. I am trying to understand and work with the external interrupt, I am facing a few issues while debugging.
#include <xc.h>
#define _XTAL_FREQ 1000000

void __interrupt() check(void){

    __delay_ms(4);
    INTCONbits.INTF = 0;
    return;
}

void main(void){

    TRISBbits.TRISB0 = 1;               //setting RB0 for input
    OPTION_REGbits.INTEDG = 0;          //setting falling edge trigger
    INTCONbits.INTE = 1;                //setting external interrupt (RBO) to on
    INTCONbits.GIE = 1;                 //setting enabling global interrupts
    INTCONbits.INTF = 0;                //setting external interrupts flags to off

    while(1){

    }

}

I'm looping a while loop and fire check() when there is a change in RB0.

I am using stimulus to change the RB0 value to fire the ISR. To check whether it's firing I placed a breakpoint at __delay_ms(4). But when I debug, for some reason it does not fire the ISR. During debug mode, it just seems to be stuck in the while loop. I tried to use the SLEEP(); macro but that did not work as it would just go to the end of the main function (I am not sure if that is sleep macro, I am assuming that it's the end of the program).

When I fire the low pulse through the stimulus, it does not change to the check function, its just stuck in the while loop. What am is supposed to do the debug the interrupt so I can get seeable output.


texts: I noticed the term Shadow Register while going through a datasheet of a TMS320F28335 DSP. What does it actually mean? Does it have a physical location in the CPU as the general purpose registers have?


texts: Current capacity of laser drilled micro vias

texts:
Does anyone have a source, formula, or calculator for the current carrying capacity of laser drilled micro vias?  I haven't found anything great yet.  I'm sure it depends on plating too.  Is there a difference between copper filled, conductive filled and open or non-conductive filled?

For example I'll probably use a 5mil laser with a 2-3mil dielectric and conductive fill them and plate flat.

Oh and I did ask my vendor but haven't heard back...

edit: I don't think this is a duplicate of how much current a via can carry because a laser drilled via structure is different than a drilled via.  In fact I've read in multiple places that they carry more current than a traditional via so I was looking to see if anyone had an answer.


texts: Temporary (just 2-3 second) 5V Power Backup for Raspberry Pi

texts:
I have built a portable computer today, with a Raspberry Pi and a Motorola Lapdock. Everything seems perfect. Except, when I close the lid, power goes down for 1 or 2 seconds and comes back and this shuts down my Raspberry Pi.

Can you suggest me a solution for this little power problem? Maybe a circuit with capacitor or something like that?


texts:
I am trying to upload a simple program that does nothing to my samd51. Here is the code:
void main(){}

I have compiled it to the exact samd51 model I have using platformio. But when I telnet to OpenOCD and do a reset run, it halts saying that there is a Handler HardFault.


texts:
I have a small understanding issue here, so I would be very glad if someone could help me a bit!

We are given this FM modulated signal to volts;

Xfm (t) = cos[2*pi*(10^8)*t + 5*sin(pi*t(10^4)) + 3*sin(2*pi*t(10^4)) ] , on a R=50 Ohm.

Find phase and frequency deviation.

I have solved similar exercises, bet there was only one sin(...).

We know that Ufm(t) = Acos(ωt + βsinωt).

Which one here is the β? is it the max value?

For frequency deviation, I know that I have to take the derivative of phase in regard to time. But here is looks like there are two phases on the signal? Do I have to get the one with higher coefficient?


texts:
I have two CAN nodes. For example, one node will transmit temperature and the other node will receive the temperature data.

We know that CAN protocol uses message identifiers (IDs). So what happens is that the receiver node will ask for data with a id of 500. The transmission node reads the request and writes the data with an ID of 3.

Can I remove the continuous checking of requests in my code for the first node and instead write the data to the second node?


texts: How to Correctly Implement this Schematic Circuit including two MOSFET?

texts:
I am trying to steer a 12v motor from my microcontroller's 5V pins (CHIP).
I have successfully wired it up to support on and off which included an N-MOSFET, 100kResistor and a diode.

Now I want to be able to switch the motor direction also. I found this article: http://www.electronics-tutorials.ws/transistor/tran_7.html which claims that its possible with a N&P MOSFET.
It includes this picture:

I have wired it up like this on my breadboard (the orange cables connecting to the gates i would manually move for now, later connected to two independent pins of a microcontroller):

But it doesn't work, moreover the N-Channel MOSFET gets really hot.
1) What's wrong in this setup?
2) Do I need to include any resistors or diodes, like i did in my simple example?
3) Am I correctly hooking up the 0V of the motor to the Ground of the 5v microcontroller (white cable)?

I'm still pretty new to electronics, so hopefully someone can help me out ;)


texts:
I bought a cheap LED strip with a power supply unit from Aliexpress. After using it for some time I noticed that PSU is overheating in one spot to the point where the label looks burned.
I opened it and it looks like the bridge rectifier TD1KN is overheating. The PSU is rated @ 12V/5A, the LED strip draws 1.1A. The datasheet of the rectifier specifies the max current is 1A (if I'm reading it correctly). If so, does it mean 5A on the label is a lie? (see comments)
Should I be worried? Can I fix it? Should I buy a new PSU?
Edit: looks like the cap is busted. Could it be the culprit or maybe it got damaged because of the temperature? (it's right on the other side of the board)


texts: Send data using USB-PD on android phones [ROOT]

texts:
USB-PD can transfer data at low speeds between devices and is quite a bit simpler than normal USB communication.
Is it possible for an android app to send arbitrary USB-PD data? The phone has root access.
I am designing a USB-PD power bank and i want it to be able to report its battery level, wear level and charge speeds to the phone using an app. The normal way would be to use USB but that would require a more complex circuit and USBC connector.
What i am trying is to instead send everything using USB-PD itself and somehow android would report these values to the app.


texts: Sync Jump Width (SJW) in Controller Area Network

texts:
Is there any drawback to a longer SJW vs a shorter SJW?

The PIC32MZ2048EFH064 has a minimum phase 2 requirement of two time-quanta. This means that the SJW could be one or two time-quanta. Why wouldn't an SJW of two not be used by default?

Similarly, if phase 2 is eight time-quanta why not use an SJW of four?


texts: Difference in thermal measurement with thermal camera and thermocouple

texts:
I hope this is a proper place to ask the question. I am using two different methods to do a thermal measurement on a flyback power supply that has a planar transformer. First I used FLIR E60 thermal camera and then I did the measurement with OMEGA thermocouples.

My problem is that with thermocouples I obtain temperatures of about 10 degC lower compared to thermal camera. To attach the thermocouples I used a sort of adhesive pads in which I stick the thermocouples.

Did anyone experience anything similar or my method is wrong? To which measurement method can I trust more?  My next step would be maybe to stick the thermocouples to my points of interest with a kapton tape (perhaps).


texts:
When an AC source is connected with an inductor we have a continuous change in voltage and current across the inductor.

According to Farady and Lenz law we will get an equal and opposite voltage against the source voltage for each change of voltage or current across the inductor.

Now since we always get an equal and opposite voltage across the inductor for each change in source voltage so it means that the current will never be able to flow in the inductor but yet current is always flowing in each text book. I am confused about it. Please guide me. I shall be grateful to you. Note that it is an ideal case and we have no resistance in the circuit.


texts:
I am trying to simulate a monostable multivibrator in GnuCap.  I have the following simple netlist (with arbitrary, probably non-functional component values but that's not the issue):

C1 ( 1 2 )  100.u
Q1 ( 1 4 0 )  BC548 NA( 1.)
Q2 ( 3 2 0 )  BC548 NA( 1.)
R1 ( +9v 1 )  1.K
R2 ( +9v 2 )  1.K
R3 ( +9v 3 )  1.K
R4 ( 4 3 )  1.K
.model BC548 npn ( <snip> )

I'm setting the model of the transistor with build followed by .model BC548 NPN which seems to work nicely.

The thing I don't understand is how to configure the value of the +9V source?  When I run the simulation the voltage seems to be (essentially) zero:

gnucap> tran 0 0.01 0.001
#Time       v(+9v)     v(1)       v(2)       v(3)       v(4)
 0.         19.517u    19.517u    19.517u    19.517u    19.517u
 0.001     -10.f       14.f      -34.f      -10.f      -10.f
 0.002     -10.f       14.f      -34.f      -10.f      -10.f
 0.003     -10.f       13.f      -34.f      -10.f      -10.f
 0.004     -10.f       13.f      -33.f      -10.f      -10.f
 0.005     -10.f       13.f      -33.f      -10.f      -10.f
 0.006     -10.f       13.f      -33.f      -10.f      -10.f
 0.007     -10.f       13.f      -33.f      -10.f      -10.f
 0.008     -10.f       13.f      -33.f      -10.f      -10.f
 0.009     -10.f       13.f      -33.f      -10.f      -10.f
 0.01      -10.f       13.f      -32.f      -10.f      -10.f

I've had a read of the documentation but it seems aimed at more experienced engineers with familiarity with electronic simulation.  I'm trying to refresh the basic electronics I learned at University, and this is my first time with electronic simulation.

If someone could please let me know what the step is I'm missing, I'd greatly appreciate it.


texts: Beaglebone Black — Reading multiple HX711 / Load sensors

texts:
I have a BBB (Beaglebone black) connected to a few capes.

I need to interface with 4 HX711 boards with loads sensors, I've yet to find anyone who has used any weight sensors with the BB;  I've seen the PI do it with python and a possible port that could be used here: Python port for RaspberryPI of the HX711 Breakout Board

Can anyone recommend a method of interfacing with 4 HX711's on a BBB?

If it's not possible, I'm considering having a small Arduino nano / similar before the BBB to process the weight and pass over all the results to 4 pins that I can use directly


texts:
I have created a prototype PCB with an Attiny85 on board. This Attiny is programmed by the supplier before it is sent to the PCB manufacturer. I received my prototype on friday and it seems that the Attiny on the PCB has a clock speed which is much slower than mine on the breadboard.

Is the desired IC clock specification (e.g 8Mhz internal) not compiled into the HEX files one sends to IC supplier? Does it have to be specified separately?


texts:
I have new custom development board ready for IMX6 which is similar design of Sabre board.
But, I would like to know whether the new IC ( MCIMX6Q5EY10AD ) is having u-boot or not.


texts: Time for capacitor charging in RLC circuit

texts:
Time constant is the time taken by a capacitor to charge to 0.63% of source voltage and in rc circuit time constant is RC.
But in series RLC circuit how much time it takes for capacitor to charge to 0.63% of source voltage..?

I searched allover the web and Wikipedia but i didn't find anything. i saw a formula saying that time constant is
2L/R and some where i saw time constant as 1/R*(L/C)1/2.but i don't know it is for inductor(L) or capacitor(C) and how to relate it to capacitor voltage.


texts: For a wireless channel, what is the difference between Ergodic capacity and Outage capacity?

texts: What do the terms Ergodic and Outage mean? And how do they relate to Shannon capacity?


texts: Failing to write ATMega16U4 fuses with avrdude

texts:
I'm trying to set the fuses on an ATMega16U4 with avrdude. The first problem I encountered is that avrdude version 5.11.1 does not seem to support ATMega16U4. Someone mentioned on avrfreaks that you should just copy the ATMega32U4 block on avrdude.conf and change the signature, description and memory sizes to fit the ATMega16U4 and thats what I did, here is my avrdude.conf: http://paste.dy.fi/SQP

This seems to work but I'm not 100% convinced.

The actual problem is that avrdude is unable to set the fuses (I'm using my buspirate as the ISP programmer):

  avrdude -c buspirate -p m16u4 -P /dev/ttyUSB0 -U lfuse:w:0xe2:m -U > hfuse:w:0xd8:m -U efuse:w:0xf8:m

  Detecting BusPirate...
  **
  **  Bus Pirate v3a
  **  Firmware v5.10 (r559)  Bootloader v4.4
  **  DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8)
  **  http://dangerousprototypes.com
  **
  BusPirate: using BINARY mode
  avrdude: AVR device initialized and ready to accept instructions

  Reading | ################################################## | 100% 0.02s

  avrdude: Device signature = 0x1e9488
  avrdude: reading input file "0xe2"
  avrdude: writing lfuse (1 bytes):

  Writing |                                                    | 0% 0.00s >***failed;
  Writing | ################################################## | 100% 0.07s

  avrdude: 1 bytes of lfuse written
  avrdude: verifying lfuse memory against 0xe2:
  avrdude: load data lfuse data from input file 0xe2:
  avrdude: input file 0xe2 contains 1 bytes
  avrdude: reading on-chip lfuse data:

  Reading | ################################################## | 100% 0.00s

  avrdude: verifying ...
  avrdude: verification error, first mismatch at byte 0x0000
          0xe2 != 0x5e
  avrdude: verification error; content mismatch

  avrdude: safemode: lfuse changed! Was e2, and is now 5e
  Would you like this fuse to be changed back? [y/n] y

It seems to be able to read the microcontroller just fine, reads the correct signature and reads the correct (default) fuses but fails to change them.

Here is a more detailed avrdude printout with -vvv: http://paste.dy.fi/JA6

I'm using a 12MHz crystal with 22p ceramics and I have a 4.7kohm pull-up resistor on the reset.

Does anybody have any idea why it is not working? I've gone through the connections with a multimeter etc. several times and they are all ok. I also doubt that reading the device would even work if the connections had a problem. The ATMega is brand new, never used, never programmed (so the lock fuses are not set) etc.


texts: Unable to Generate PWM Signal Using CCP of PIC16F15325

texts:
I am using: Curiosity LPC dev kit, PIC16F15325, MPLABX v5.35 on Mac, XC8 compiler. I am able to blink each LED on the Curiosity.
My goal is to generate a PWM signal on RC5 to drive an LED on the Curiosity board. I want to be able to vary the pulse width to adjust the brightness.
I originally was using the LFINTOSC at 31kHz, but I saw another post that said that you can't run the CCP module when TMR2 is using the LFINTOSC because it's too slow. I am happy to have the PWM at a frequency of <500Hz, so if it's possible to use the LFINTOSC, please let me know. For now I'm using the HFINTOSC at 1MHz.
I also noticed that the steps in the datasheet for configuring the PWM of the CCP module are slightly differently ordered from the steps for configuring the dedicated PWM module. Maybe this discrepancy is part of my issue.
For now I am just trying to enable the PWM in main and then loop on a blinking LED so that I know the MCU hasn't gotten stuck.
Nothing happens to the LED on RC5 when I run this code.
My code is as follows:
void main(void) {

    ANSC4 = 0;          //disable for analog input
    TRISC4 = 1;         //configure PORTC4 for digital input

    TRISA = 0x00;       //configure all PORTA to digital output
    TRISC5 = 0;         //configure PORTC5 to digital output

    ANSA5 = 0;          //disable analog inputs for LED pins
    ANSA1 = 0;
    ANSA2 = 0;
    ANSC5 = 0;

    LATA = 0x00;        //Set all output low
    LATC = 0x00;

    IOCAP = 0x00;       //Disable interrupts on PORTA
    IOCAN = 0x00;
    IOCAF = 0x00;       //Clear PORTA interrupt flags

    IOCCP = 0b00000000;
    IOCCN = 0b00010000; //Set PORTC4 to interrupt on negative edge
    IOCCF = 0x00;       //Clear PORTC interrupt flags

    GIE = 1;            //Enable global interrupts
    IOCIE = 1;          //Enable interrupts on change

    int duty_cycle_reg = 0b0000001100;
    enable_pwm_ccp(duty_cycle_reg);

    while(1){
        LATA5 = 1;
        delay_ms(100);
        LATA5 = 0;
        delay_ms(100);
    }
}

Enable_PWM_CCP definition:
void enable_pwm_ccp(int duty_cycle_reg){

    int lsb = 0b0000000011;
    int msb = 0b1111111100;

    lsb &= duty_cycle_reg;
    msb &= duty_cycle_reg;

    lsb = lsb << 6;
    msb = msb >> 2;

    RC5PPS = 0x09;              //set CCP1 output to RC5 via PPS
    TRISC5 = 1;                 //disable output
    CCP1CONbits.MODE = 0xF;     //set CCP1 to PWM mode
    CCP1CONbits.FMT = 1;        //set CCP1 format left-aligned
    CCPR1H = msb;               //set duty cycle
    CCPR1L = lsb;

    PIR4bits.TMR2IF = 0;        //clear TMR2IF flag
    T2CONbits.CKPS = 0b111;     //set TMR2 prescale to 128
    T2CONbits.OUTPS = 0b000;    //set TMR2 postscaler to 1
    T2CLKCON = 0x02;
    PR2 = 0x26;                 //set PR2 to make PWM freq = 50Hz
    T2CONbits.ON = 1;           //enable TMR2

    while(!PIR4bits.TMR2IF){}   //wait for TMR2 to settle

    TRISC5 = 0;                 //set RC5 for digital output
}


texts: question about lab results on Mutual Inductance

texts:
I used the  device Variable Inductor Type 107N to built those circuits:

I have been told that:
$$M=\frac{|scale-308|}{2} mH$$ Where M is the Mutual Inductance, and scale is a scale on the devic.
Those are the result i got for a constant E with frequency of 1K Hz:
for the first circuit:

for the second one:

I have no idea how to explain the result of I, especially because M is symmetric around scale of 308.


texts: Debugger hangs when reaching to Float or Delay

texts:
When I run this code, the debugger hangs once it reaches to a Float (in this case the variable 'Distance') or Delay, I mean it seems like it's processing, however it never goes through, and I have to close it and run the debugger again, which hangs of course again. Note that the code builds without errors or warnings.
The following is the related part of the code:

    void Delay(int x){
    //input milliseconds, delay that number of milliseconds
    int a,b;
    for(a=0; a<x; a++){
        for(b=0; b<1000; b++){
        }
    }
}

int main(void){

                float Distance;     // actual distance in cm
                .
                .
                .

    while(1){

        TIM4_Echo_Read();

    Distance = (timespan / 58.0);

        if (Distance <= 100){

            GPIOB->BSRRL = (1<<7);
        }
            else {
            GPIOB->BSRRH = (1<<7);

            }
                Delay(10);
        }

Any idea why?


texts:
So i wanted to create a counter that counts from 59 down to 0 using 4510 IC component, so i created simulation in Proteus software.

This is what i came up with:

This circuit works perfectly fine when there's no feedback from outputs of lower 4510 to it's PE input. As you can see, feedback circuits consist of one 4 input NOR gate and one OR gate which is supposed to enable PE input whenever i press button connected to OR gate input or, when combination of four zeros appears at the output of 4519 IC.

However, it happens so that, instead of reseting at zero state at the output, it resets when i have combination 0100 at the lower and  0000 at the upper 4510 IC, so it resets in the moment when i am supposed to go from 0100 (4) to 0011 (3) so i believe that the problem is with delay periods of logic gates or something (i am not quite sure if this is the case), and i don't know how do i need to enhance this circuit in order to make it work properly, as it is supposed to. Any help appreciated!


texts: How do zener diodes, silicon diodes, and base-emitter junctions differ in reverse breakdown mode?

texts:
Here's datasheets for all of the above, and what reverse breakdown-related information I gather from them:

Nexperia BZV55-B10 10V zener diode

Breakdown may damage the device for powers above 400mW, i.e. currents above 40mA (40 deg C)
Reverse current of 5mA will occur between VR=9.8V and VR=10.2V (25 deg C)

Nexperia 1N4148 silicon diode

Breakdown may occur if VR > 100V.
Breakdown may damage the device
Reverse current at VR=75V is typically 20nA (25 deg C)

Nexperia BC817 NPN with base-emitter junction

Breakdown may occur if VEBO > 5V
Breakdown may damage the device
Reverse current at VEB=5V is less than 0.1uA (25 deg C)

Here is my educated guess:

All parts have a certain reverse voltage above which reverse current will increase quasi-exponentially
All parts can be operated safely in reverse mode, for extended periods of time, without irreversible nor reversible damage, if the reverse current stays below a certain value (20nA for the 1N4148, 0.1uA for the transistor, 40mA for the Zener diode).
Only Zener diodes are designed and tested for use in reverse-breakdown mode. This is why the Zener diode has a very high allowed reverse current and a precisely-specified voltage at which breakdown will occur, while all others only give guarantees that involve maximum voltages and very low currents.

Which of these guesses are wrong, and how? What other differences and similarities are there in reverse breakdown behavior of these parts?


texts:
Does anyone knows internal structure of a typical Fast Ethernet 100BASE-TX transmitter?
I wonder how MLT-3 voltage levels are formed and what can cause abnormal voltage levels at the PHY output?
Thank you.


texts: Thermo Electric Can Heater / Cooler Heating vs Cooling Speed

texts:
I recently purchased a cheap (~$25) 36W thermoelectric cup holder designed to heat or cool a soda can sized object.  It works very quickly for cooling and draws about 3A at 12V.  For heating, it heats about 4 times slower and draws only about 0.7A.  The fan only runs when it is in cooling mode.  According to the vendor, it is not unusual for it to heat slower than it cools, and it is normal for the fan not to run in heating mode.

The lack of fan and lower current in heating mode leads me to believe that either it is not using the TEC for heating mode, or that for some reason it only runs the heating mode at 1/4 the TEC capacity.

Is there any reason why it would be advantageous to add a separate resistance heater or to run the TEC at 1/4 capacity without the fan for heating purposes?  It seems that it would be best to have it heat something as quickly as it cools it by just changing the direction of the current in heating mode.

Eventually I will probably take it apart to see what it is really doing.


texts: Why isn't my LED slowly dimming and eventually turning off?

texts: I have a 22uf capacitors hooked up to a 5 volt power source to power a 3.2 LED I am using a 220 ohm resistor to bring down the voltage, why isn't the LED slowly dimming  and then turning off? I had it running for a while. I also have it connected in parallel. I am pretty new to circuit boards and all. Also when would it be appropriate to add a capacitor? like in what situation on a small circuit board should I use one


texts: OLED 128 x 32 SSD1306 display problem (picture inside)

texts:
I bought one of these cheap 0.91" OLED displays and hooked it up according to a datasheet that was sent to me by the seller. I tried several drivers for it after I thought there are compatibility problems, but all of them give the same problem. Only the top of the display shows any characters, the rest seems like random pixels and it flickers while lines are running up and down on it. VBAT + VDD are connected to ~3.3V.

Perhaps someone can spot the issue just by looking at the display picture?

Here is the initiation sequence:

void oled_init() {
    L(PORTE, SS1306_OLED_RST);
    _delay_ms(10);
    H(PORTE, SS1306_OLED_RST);
    _delay_ms(10);

    oled_write(0, 0xAE); // display off
    oled_write(0, 0xD5); // clock
    oled_write(0, 0x81); // upper nibble is rate, lower nibble is divisor
    oled_write(0, 0xA8); // mux ratio
    oled_write(0, 0x3F); // rtfm
    oled_write(0, 0xD3); // display offset
    oled_write(0, 0x00); // rtfm
    oled_write(0, 0x00);
    oled_write(0, 0x8D); // charge pump
    oled_write(0, 0x14); // enable
    oled_write(0, 0x20); // memory addr mode
    oled_write(0, 0x00); // horizontal
    oled_write(0, 0xA1); // segment remap
    oled_write(0, 0xA5); // display on
    oled_write(0, 0xC8); // com scan direction
    oled_write(0, 0xDA); // com hardware cfg
    oled_write(0, 0x12); // alt com cfg
    oled_write(0, 0x81); // contrast aka current
    oled_write(0, 0x7F); // 128 is midpoint
    oled_write(0, 0xD9); // precharge
    oled_write(0, 0x11); // rtfm
    oled_write(0, 0xDB); // vcomh deselect level
    oled_write(0, 0x20); // rtfm
    oled_write(0, 0xA6); // non-inverted
    oled_write(0, 0xA4); // display scan on
    oled_write(0, 0xAF); // drivers on
}

And what the LCD shows after I sent some characters to it.


texts:
I've made a very simple MOSFET LED driver that uses the PWM of an Arduino Nano to switch a MOSFET which controls the power for about 16 meters of LED strip.

I am using STP16NF06 MOSFETs.

I am controlling RGB LEDs, so I use three MOSFETs one for each colour and when all 16 meters of LED strip is running I'm drawing about 9.5 amperes.

9.5 A/ 3 channels = 3.17 A maximum load each.

The MOSFET has a fully on resistance of 0.8 Ω, so my heat should be my I2R loss of

3.17 amperes^2 * 0.08 ohms = 0.8 watts

Datasheet says I get 62.5 °C of heat per watt, maximum operating temperature is 175 °C and expected ambient temperature is less than 50 °C

175 °C - (0.8 W * 62.5 °C/W) + 50 °C = 75 °C for margin of error

I am running these MOSFETs without a heat sink, and I have left it running all night on a program that just cycles red green blue white non stop and it didn't overheat. I am expecting this circuit to be able to run 16+ hrs per day.

I am using a 12 V powersupply for the LEDs and a 5 V control signal from the Arduino, so it shouldn't be possible for me to exceed the drain gate voltage of 60 V or the gate source voltage of 20 V.

After I was playing with it by my desk in my airconditioned office today I found that I couldn't turn the red channel off as I could earlier in the day. And measuring gate to drain with no power connected I found 400 Ω on the red channel and unmeasurably high resistance on the green and blue channels.

This is the schematic I'm working with. It's the same thing just repeated three times and the 5 V is a PWM signal from the Arduino and the single LED without a resistor is just a stand in for the LED strip which has resistors and a solid setup that I didn't feel I needed to model.

I think it failed after I plugged the Arduino in and out of its pin headers about 50 times though I'm not sure what significance that has as the Arduino still works.

So given that it worked for a few days including one day of high load, my questions:

Could hotswapping the Arduino in and out of this circuit somehow damage the MOSFETs, but not the Arduino?
Could ESD somehow be the culprit here? My desk is a resin coated wood or laminated wood. It should be noted that the source of all three MOSFETs is the common GND.
I don't have a fancy soldering iron, and I have no idea if it goes above 300 °C. However, I used lead solder and I spent as little time as possible on each pin and I would solder pin one of the first MOSFET and then pin one of the second MOSFET, etc, not doing all pins from one chip consecutively and if too much solder heat was the issue why wouldn't that have created the issue immediately? Why has it popped up now?
Is there something I have missed or an oversight in my calculations?


texts: Determine efficiency, voltage, current from motor characteristic curves

texts:
I would to identify efficiency, voltage, current for a particular Brush less DC motor in  our lab given characteristic curves.

Electrical specifications are

The operating conditions are

Torque: 0.35 N.m
RPM   : 1200

Based on the operating condition, i drawed one more torque vs speed line (orange color) passing through 0.35 N.m & 1200 rpm and keeping slope constant.

To explain the image

Horizontal axis (X) : Torque (N.m)
Left Vertical axis  : U(V)     - Applied voltage         - Light Blue color
                      I(A)     - Current                 - Green color
                      P1(w)    - Electrical power input  - Dark Blue color
Right Vertical axis : n(r/min) - Revolution per min      - Orange color
                      P2(w)    - Mechanical power output - Red color
                      Eff(%)   - Efficiency              - Brown color

Unfortunately, i don't have better quality image. Please click on the image or Zoom the browser page to enlarge a bit more.

I have drawn few vertical and horizontal dashed lines(pink in color) passing through the operating point (0.35 N.m and 1200 rpm).

Question:

As the voltage vary the torque vs speed curves,  does the efficiency curve vary ? what about the voltage and current ?

What are the approximate values in my case ?

Current = 8 Amps ?
Voltage = 15.00 or 17.50 V ?
Efficiency = 50 % ?

Thanks


texts:
I'm used to always use 100 nF (0.1 uF) ceramic capacitors as bypassing capacitors for ICs.

However, in the LM35 datasheet I find two different figures:

The circuit above I need, since I probably want a longer cable between my microcontroller and the LM35 sensor, so I would need a 0.01 uF electrolycal capacitor.

This circuit I don't need, but somehow a 0.01 uF ceramic capacitor is used.

I Also need negative temperatures, and here no bypass capacitor is used.

Questions, if I want e.g. 1 m wires between the LM35 and the microcontroller, should I;

Use a capacitor at all (I think I need since figure 13 shows it).
Should it be ceramic or electrolytical, or doesn't it matter?
Should it be 0.01 uF, or 1 uF?

I am also interesting in some reasoning behind these different capacitor types/values.


texts:
I'm starting with ARM and I program in C for LPC1768.

I included "LPC17xx.h". It gives registers names in C. But where are the names of bits?

For instance: I want to use UART. So first step: "In the PCONP register (Table46), set bits PCUART2".

Now I'm doing it this way: LPC_SC->PCONP |= (1 << 24);

But I want to do it this way: LPC_SC->PCONP |= (1 << PCUART2)

Now I have to look into lots of tables to see what are the numbers of bits. Is there any C header file that has all the definitions? Something like that: #define PCUART2 24 or similar.

(I know there are high level libraries with functions like "init_uart()" but I have to write it low)


texts:
I am trying to design a audio amplifier circuit but I do now know where to start. The only requirement given to us is for it to be a 1 watt amplifier. We have decided to use a 9v DC battery as source. I searched in google about the designs but I do not know how it becomes a 1 watt amplifier. I do have a background about the Voltage/Current gain and DC biasing I just need a hint what to do first.

EDIT: my load will be an 8 ohm speaker.

EDIT: I know the question is too broad. That's why I am also getting a hard time dealing with this thing. My professor only taught us how to solve BJT and FET circuits and gave us project like this.


texts: Momentary Switching for High-Power DC Motor

texts:
First let me state up-front that I'm an aerospace engineer with very limited experience with electronics. Feel free to get technical, but please cut me some slack.
Background:
I want to modify an electric winch controller to include momentary switches that break the circuit and stop motion in a particular direction -e.g. when the cable plays out by X feet (basically to stop it playing out the entire drum of cable if left unattended). I figured this shouldn't be hard to do since the OEM controller uses what seem to be simple pushbuttons.
However, in the electrical diagram for the winch, shown below, it looks like the full rectified DC current flows directly through the controller. The winch is rated for 6A under full load, at 120VAC supply voltage, so there's a LOT of power going through those switches, and that makes me think there's more to them.
Question 1:
Is there some protective feature that I'm missing which prevents the controller's pushbuttons from arcing when switching under load?
Question 2:
What kind of momentary switches would I need to safely handle the power running through these wires?

Winch Technical Description


texts: How do i get a transistor to work efficiently?

texts:
I'm trying to improve my noobie SMPS design (230v AC -> 60v DC) and i have a major issue with the efficiency. Currently the sim says it outputs 425W while eating 2.2kW, and most of the difference is lost in the main power mosfet.

I think the problem is that the mosfet is always in a half way state but i want it to fully open and close. The mofet(thats supposed to let the ~300V flow through) is being driven by an opamp that gives out 15v but that isnt anywhere near enough to fully open the mosfet for a short burst but rather the current just drips through.. it works but it sucks. What can i do here?

edit: here is the circuit (was an epic mess while i first posted and still kinda is but should be readable)

At the top there is the source, rectifier and a cap to make it look more like dc.
Then there are 2 transformers, one is 1:5 for ~60v, other is 1:20 for ~15v
then there is the opamp(LT1352CN8) and some 46v zeners, one leads to the main collector cap and the other to the reference voltage from the 60v transformer, the 15v transformer is used for powering the opamp.
Then there is C1 and R2 that are supposed to act as a timer.. When the reference voltage goes above C3 voltage, the opamp is supposed to turn on and load up C1 a little bit, C1 in turn would power the mosfet to let voltage through and charge up C3.

I just noticed Q1 is currently getting its source from the 60v transformer, that is wrong, it should be the main ~300v line but i think i was testing something there.

As you probably guessed the problem lies within powering Q1, i've tried a bunch of mosfets and/or configurations of mosfets but all of them either drop the voltage coming from C1 even lower or just leak like crazy.


texts: How do physical connection interfaces handle floating voltages

texts:
I am sorry if this is a bit of a novice question but I am new to electronics and have come to a problem that I can't quite see an obvious answer for.

A while ago I had a bit of a scary encounter when connecting an Arduino powered machine to my pc. The device worked fine with a PC power supply but once I swopped it for an open frame type one I noticed some serious arcing when I brought the USB cable near my pc's port. After some research I determined that this was caused by the fact that the new power supply was not connected to earth internally and once I made the necessary modifications my problem was fixed.

What I am really stumped about is how consumer electronics product manage this floating voltage problem when interfacing with attached devices. What I am wondering is how for example a laptop running from its battery without any possible earth reference can connect to a USB printer without any problems. Is it that the internal regulator in the laptop immediately assumes the USB ground as its ground reference and if so, how would that prevent an initial arc?


texts: Is there a way to find a node by number in LTspice?

texts:
I'm looking for a way to find a particular node, based on the auto-generated node name/number.

One way to find a particular node is to hover the cursor over the nodes, and LTspice will put the name in the status bar at the bottom (see image).

If I have a large circuit with 500+ nodes, and maybe only 10 or so have actual names/labels, it would take a long time to hover over all the nodes in search of one in particular.

How can I find "Node N004" without hovering over all of the nodes?
Is there a way to show the names of all nodes?


texts: Calculating specs of the Li-Ion battery depending on Robot's weight

texts:
I want to build a moving wireless robot. Vehicle needs to have a speed of 50 kms/hr and needs to have a tracks instead of wheels. The approximate weight (without the batteries) might range between 20 - 27 kilograms. Also, I need some thing like the raspberry pi on board the buggy to do some calculations and use a camera on board.

Given such vague specs, I need to have atleast a ballpark figure of the amount of power I will be needing and the amount of batteries I will need to use. The way I am going to develop this thing is over a couple of years and working from the simplest module to the biggest and most complex. Thus, the chassis, tracks, servo that drives the tracks, and the complete battery management system will come at the later stages of the development, but I need to have that ball park figure for budgetary purposes.

UPDATE:

I need a range of 1000 - 1200 meters


texts: The circuit, especially 7 segment parts does not work at all

texts:
I made a circuit of experiment 19 from Make : Electronics 2nd Edition. It's called "time transitor."
I made the first part of this circuit by referring the upper pictures, but when I connect the electricity, it does not work at all.
I want to figure out what's wrong with it.


texts: 12V in, 1V @ 12 Amp Out, Buck, Why 100 Amp MOSFETS and 60A Inductor?

texts:
I was showing someone the TI Workbench and it came up with this schematic.
94% Efficiency, switching Freq. 100khz

With voltage of 12v and 1v, max Amps of 12, why would it select 25v and 30v 100 Amp MOSFETS?

88% Efficiency, Inductor 24 Amp, fsw: 230khz


texts: wifi module board radio immunity problem

texts:
Hi we have designed a board using a dual band Wi-Fi module from redpine signals (rs 9113). While performing radiated immunity test , the board fails to transmit when board is exposed to  2.4 - 2.44 ghz band of frequencies .can
anyone help me on this .immunity test level is 3v/m


texts: I've never seen this type before and don't know what type of connector I need to add to the wires to connect to it. I've looked on Google and haven't seen it. What type of connector is this (the green thing in the photo)? How do I add the appropriate connectors to the wire so they can plug in?


texts: Will my Arduino output pin at 0v handle 25 LEDs cathodes

texts:
Short question: Is it safe to connect a single Arduino ADK (Mega) output pin at 0v to 25 LEDs, each with an appopriate 100 ohm resistor, and each being powered by a output pin at 5v?

i.e. 25 output pins at 5v each connected to an anode of one of 25 LEDs with all of their cathodes going to a single input pin at 0v

Also will I need to use transistors to provide enough power?

Long question: I'm working on a 5x5x5 LED cube similar to this:
The 4x4x4 LED cube (Arduino)

There's 5 levels of 25 LEDs, and using multiplexing I intend to switch between each level very quickly to give the impression they are all on at the same time.
How I understand it is this is achieved by connecting each of the 25 anode pins to the anode of the LED on the above level and connecting all of the cathodes on the same level to one another.
So with 25 anode pins and 5 cathode pins, if I switch the bottom level cathode pin to 0v and all the other level's cathodes pins to 5v I can then turn on individual LEDs on the bottom level by turning on the appropriate anode pin.

If there's any maths involved the LEDs are 20mA, and the Arduino provides 40mA per pin I think. I have a feeling I'm also going to have to use transistors to properly power this as 25 LEDs is 500mA and I have heard that the ADK only provides up to 200mA, though the project I have linked to doesn't seem to do this?


texts: how to identify an impulse response in a system?

texts:
Now I'm trying to identify the impulse response in a system.
Basically,  as I know,  there are consisted with impulse response and gaussian response in a system.

But I don't know how to identify the impulse response.
Would you let me know how to identify the impulse response ina system?
Even if some hints please.


texts: I'm using a breadboard to prototype my projects. On one pin of an MCU, which is an output, I'm getting a 0-3.3V signal, as expected. However, another pin has a 20mVp-p signal almost matching the other one, but lower in amplitude. Where is this coming from? Has my board got a weak short or something like that?


texts: Unit testing with Eclipse System Workbench (STM32)

texts:
Although this is a pure software question, other Stack fora are not suitable since the application problem is only occuring for microprocessor usage.

I installed Eclipe System Workbench for developing STM32 applications which works ok.

However, now I want to do (offline) unit testing but g++ seems not to be installed. Only the Cross compiler/AC6 parts are installed.

When installing e.g. cygwin I get the same errors.

I develop on Windows. Does anybody has an idea how to do unit testing using Eclipse in combination with System Workbench for STM32, like what additional item(s) to install or what settings to use?


texts:
I have installed bootloader into my pic16f877A and now i am trying to write a  program into pic.But after connecting to my computer it gives error as

 Connected to \\.\COM1 at 115200
 Searching for PIC ...
 pic sending unknown data:  "K" <>  0h=
 Check baudrate & Start Write while PIC is not sending serial data (e.g. in reset)
 ERROR!

I am using tiny bootloader to program pic16f877A.
I have used this blog https://alselectro.wordpress.com/2014/10/01/pic-boot-loaderno-programmer-required-to-fuse-hex-file/#comment-1159 for instructions to install bootloader.
Have checked my connections but not able to understand whats the problem.I also checked my pic16f877A voltages and found that at pin26(Rx) i am getting high voltage(+5) and pin25 (Tx) is zero.
My max232 capacitor connections are same as in the blog.I also wanted to know how can i make sure that bootloader is successfully installed and working fine.
Now i am getting following error:

 Connected to \\.\COM1 at 115200
 Searching for PIC ...
 Wait 200 ms
 Rcv:type= 0h=Not found,
 ERROR!

my rs232 connection:


texts: Single supply amplifier for driving 8ohm, 0.7W speaker

texts:
I am trying to build a simple amplifier to drive an 8ohm, 0.7W speaker using a 5V single supply. Audio fidelity is of little importance, since it is a cheap speaker, but I would like the output to be recognisable at the very least. I built the following circuit based on designs I've found on the internet but it doesn't work.

simulate this circuit – Schematic created using CircuitLab

I have checked it with my scope and it seems to work fine everywhere except at the transistor emitter. I suspect that the problem is caused by C2 or the gain resistors, R4 and R5, as removing them, so it is in unity gain configuration, gives an output, albeit with a DC bias.

I would greatly appreciate any suggestions for improvements on this circuit, or different circuits of similar complexity.
Thanks in advance :)

EDIT: I went with Andy aka's answer because it ticked the boxes of simplicity and I was able to build it with parts I had on hand. I combined it with my original circuit, so essentially the only modification I made was the addition of the PNP transistor. I changed the values of the feedback resistors to be equal, giving a gain of 2 as I got significant clipping for anything above this value. Overall the audio quality is reasonable, especially since the speaker I am driving is quite low quality and is probably going to be a limiting factor for audio fidelity.

Thank you to everyone who answered


texts: I want to create a game with arcade style buttons using arduino. I know there are simple loops you can have to check for a button closing a circuit, but if buttons are checked sequentially in an arduino sketch would it not increase the chances of the first button in the loop winning by being the first circuit checked? Seems this chance increases if the sketch does more than just check for presses (control LED's, timer count down display, etc). What are ways to make sure the winner is truly the first to close their circuit rather than just the first circuit that is checked?


texts: Using avr-gcc as an example, int types are specified to be 16-bits wide. Performing operations on 8-bit operands in C results in those operands being converted to 16-bit int types due to integer promotion in C. Does this mean that all 8-bit arithmetic operations on an AVR will take much longer if written in C than if written in assembly due to C's integer promotion?


texts: Where to wire usb shield output on breakout

texts:
Apologies if this is rather obvious but I am very much new to circuitry and most answers I have found are about designing new products.

I have a USB Type C female receptacle that I would like to attach to my keyboard. The keyboard PCB has a USB 2.0 pin out labeled S, G, D+, D-, V. I am wondering where I should attach the S pin (I believe shield) to the female receptacle. The original cable was wired directly from pin out to USB A male plug.

From what I understand, I can:

Somehow connect S to receptacle (buy a different one?)
Leave S unconnected
Connect S to receptacle ground

Edit:

Here is my keyboard pin out.

Here is my Type C receptacle:

I would like to attach it as a Ducky 2 or Pok3r would connect to a desktop. I wish to replace the current cable with one that is detachable at the keyboard.


texts: Media converter (eth/fiber) problem in communication

texts:
I have a system which looks like that:

CPU(macbook)<-->thunderbolt<-eth->ethernet media converter<-fiber->ethernet media converter<-eth->raspberry pi 2.

Both CPU and RP2 have static IPs.

If I connect an ethernet cable from my computer to the RP2 directly there is no problem, I can ping it and ssh it.

The fiber is duplex and I tried with different length (0.5, 50 and 100m) and for the 50 and 100m there is an adaptor from LC/ST because I don't have LC/LC long duplex fibers.

I tested the fibers and they are not broken since I can see light coming out. The media converters seem to communicate since the FXLINK led is blinking in both of them when I try to ping the system. I have tried disabling both firewalls from the CPU and RP2 but still the same issue. When I try to ping them I get timeout messages or similar to "No route to host" and "Host unreachable".

These are the media converters and SFP modules I am using:
https://www.versatek.com/hardened-micro-1000base-t-to-1000base-sfp-ethernet-media-converter.html
https://www.versatek.com/sfp-port-1000base-lx-mini-gbic-module-10km-40-75.html

The fiber is a simple patch cable and a more professional cable from the company FOSS but the 0.5m patch cable is always connected with the adaptor:

example: fiber media<-(LC-fiber(0,5)-LC)-(LC/ST adaptor)-(ST-fiber(50 or 100)-LC)-fiber media.

I hope the information I gave you is enough

Thank you for your help :)


texts: Difference between Brushless Motor and Stepper Motor

texts:
I think I understand the operating principles of a brushless motor and a stepper motor, but I'm a little confused about the difference.  Is a brushless DC motor a very basic stepper motor?  With proper controls, could a brushless DC motor be operated as a stepper motor? If not, how do they differ?

For an electronics newbie, can someone highlight the similarities and differences between stepper motors and DC brushless motors?


texts: How to safely connect USB to TTL (FTDI) adapter to device and also use bench power supply?

texts:
I'm trying to flash new firmware onto an ESP8266EX chip.  The chip requires 3.3v and 80 mA (average).

My USB to TTL programmer (FTDI chipset) can supply 3.3v but only at 50 mA.

Here is what I'm thinking:

[USB-to-TTL] 3.3v -> not connected
[USB-to-TTL] RX   -> [ESP8266] TX
[USB-to-TTL] TX   -> [ESP8266] RX

[Bench PSU] GND   -> [USB-to-TTL] GND and [ESP8266] GND
[Bench PSU] 3.3v  -> [ESP8266] VCC

Therefore, the USB-to-TTL adapter is powered by USB, the ESP8266 is powered by the bench PSU, and all grounds are connected together.  (NOTE: I know it's important to NOT use the earth ground on the PSU but instead use the floating ground/black terminal)

Does that sound correct?


texts: Testing a Bipolar Junction Transistor using an analogue ohm-meter?

texts:
This video says I should see ohmmeter deflection with an NPN transistor, placing positive probe on the base, and negative probe on collector or emitter.

A BC547 NPN is giving me opposite results - ohmmeter deflection with negative probe on the base, and positive probe on collector or emitter.

I tested a simple rectifier diode with the same ohmmeter. I got meter deflection with positive probe on cathode, but no deflection with positive probe on anode. Does that help?

What am I doing wrong?


texts:
I'm trying to build a microstrip antenna for my BLE module to increase its range. I'm more of a hardware Design and firmware guy and the last time I designed an antenna was in college back in 2015. Please excuse my trivial question.

After reading a lot I stumbled upon this Antenna: https://files.seeedstudio.com/wiki/Wifi_Bee_v2.0/res/Antenna_Datasheet.pdf

The spec impressed me relatively (other antennas) so I tried to calculate the range of this Antenna and I got some unbelievable results. I'm sure I did something wrong. I would really appreciate it if somebody points out my mistake or mistakes.

I got a range of 2.1KM for a 2.45GHZ antenna. I work with BLE products and the max range I saw was a little over 100m. I used the following website to calculate the range.
https://www.rfwireless-world.com/calculators/Antenna-Range-Calculator.html

My parameters are as follows (Got em from the datasheet of the antenna)

Antenna gain: 1.5 dB
transmit power: 3 W (34.77db)
operating frequency: 2400MHz
cable loss: 9.5 dB
receiver sensitivity: -80

Thank you


texts: Cause of dead cell on a flooded lead acid 12v deep cycle battery

texts:
I live on the Gulf coast and am annually under threat of hurricanes, so I have a 12v 125 amp hour deep cycle battery I maintain so in the event of a power failure, I can use an inverter to run essential electronics during and after the storm. It was bought in 2012 brand new and ever since I've had it, it's been on a maintenence/float charger designed for this type of battery. It has rarely been used- maybe 3 hours total (we've been fortunate so far) and each time it was nowhere near being drained (load voltage never dropped below 12.5v) and was recharged immediately. Needless to say, I was shocked one day to find it was only putting out ~ 9 to 10 volts with no load (I have a habit of checking on it every month and testing the voltage without the charger on.) So I purchased a good hydrometer and all but one cell tested in a fully charged state. However, one cell was completely dead.

My question is, what causes one cell to go completely bad like this with very little use and being maintained properly? I had high hopes for this battery and now it is useless to me unless I can find a way to reverse whatever is causing this. I tried a change of H2SO4 in the "dead" cell and attempted a charge cycle which did nothing at all. Any ideas on what caused this just sitting there on a trickle charger and what, if anything, can be done? Thanks!


texts:
as you can see options strapping pins are multiplexed with RXD# pins .. which are MII interface pins.

this will make the PCB have "stubs" (connected to MAC + pullup resistors) which is not good in signal integrity wise..

why they didn't build the strapping option on other "non data" pins like LED for example or MDIO .. as much as i know these are just latched at startup of the chip ..

datasheet of PHY chip KSZ8081

stubs im talking about:

the routing is not mine. its "microchip evaluation board"
SAM4E-X-Plained board

i cant see any rule related to MII only differential ethernet it self which is routed on top and bottom only (layer 6) :

layer5 is actually power plane (not gnd) i dont know if impedance matching related to it is counted or it must be GND (return path is GND!)..

things originally worried about:
(note i didnt put them in the question originally because i thought it will be wide and open)
- stubs
- layer changing
- length matching
- impedance matching on non-GND layers
- signals crossing overeach other - some are (routed opposite of each other for small length)
- clock being near edge of board (how close is near?)


texts: How do I add two high speed analog voltages?

texts:
I need to add two 32MHz square wave. It is not possible using all op amps because of the bad frequency response. My question is is there any ic device or some technique to do so???

Update:
Actually I am building a music synth. I thought of using a high source of frequency, higher the better, and divide it using counters to get the musical notes. The reason I wanted to add two high frequency wave is to get an octave kind of sound. But I just realised that I cannot divide the added signal using counter because it is not square. So, this question is pointless. I can make another counter circuit for the second wave and then add. I would not have a problem of the bandwidth also except the massive work of designing dividers for each notes- 12notes. Sorry guys for wasting your time. Thank you very much for replying.


texts: Inductors and caps on buck-boost converter getting very hot under medium-ish load

texts:
I'm currently using a buck-boost converter (generic XL6009 buck-boost like this one) to power a router and fiber terminal from a 12V battery backup system. The reason for using the buck-boost converter is that the 12V battery backup system doesn't regulate the output, so the output can vary between 11V-13.8V depending on whether the battery is charging etc. and I'd rather err on the safe side than assume the equipment has regulators that are OK with that voltage range.
The problem is, the buck-boost converter's inductors and caps are getting very hot, while the driver is running much cooler at a slightly warm temp. In the image below, the circled parts are the ones getting very hot. I measured the current draw on the battery side while in use and it only ran at around 1A @ 12V output, which according the the converter's specs shouldn't be an issue. I've been running the converter as is for around 3 weeks now without any issues, but given that this is a battery backup system I'm worried that the increased heat will further decrease the converter's efficiency and I'm also worried that this could damage the converter prematurely in the long run. Is this normal for a buck-boost converter at these power levels or is the unit possibly defective/out of spec?


texts: Flexing Peltier Plate (Physical Question)

texts: I am doing research into Peltier plates for a project, which requires a flexible component. From what I have found, no commercially made flexing Peltier plates seem to exist. My question is, what is the science behind this that inhibits flexing plates? Is it just a matter of the ceramic casing that usually houses standard Peltier plates? Alternatively, do flexing grids of flexible Peltier plates exist?


texts: PIC18F24K50 vendor-defined USB device using libusb, what is needed?

texts:
I'm trying to learn how to communicate with a PIC18F24K50 through USB. I read somewhere that a vendor-defined device plus libusb/Winusb is to be referred over HID and CDC for cross-platform custom USB applications.

My first goal is to log ADC data from the PIC to a text file. However, I cannot find any good examples on how to get the 18F24K50 working as a USB device. In particular, how do I setup the USB device descriptor file? How do I setup the MCU for USB? I've tried adapting Microchips Application Library examples and several other examples but without success. Any pointer in the right direction would be highly appreciated.

I'm using xc8 compiler and pk2cmd programming software from the command line (linux terminal) but I can also use MPLAB X IDE and xc8 if that is easier.


texts:
I've read some related questions, but I was not able to find/understand a proper solution

I'm using 2 AA batteries to power a SAMD21 MCU (arduino mkr series), a DS18B20 probe and a MCP3424 ADC. My problem is that temperature probe and ADC need more than 3V or 2.7V (respectively) to work properly, and I've seen that with voltages lower than 3V, measurements works, but have an important offset.

I'm trying to solve the issue, and my constraining factor is having the longer autonomy I can get, and the simplest circuit with less components. So I'm thinking on using a easy to solder, low footprint and very low power consumption step-up converter that could take the 2xAA batteries an step up to 3.3V for the instruments just during the measurements periods (about 30s every 12min)

Do you have any hint here?
Thanks


texts: DIY Antenna with minimum components for proof of concept

texts:
I am going to try a simple transmitter-receiver(assuming receiver circuit is same) circuit using the following circuit:

Now, I have got the BJT part and the LC oscillator part figured out. What I need is now the design of antenna. Note that my constraints are: I only need proof of concept, that is I only need to see if wireless transmission is happening or not-for example in receiver circuit I will have an LED which will turn on/off on basis of source voltage at transmitter side.There is no requirement for long range or ultra high frequency(I will set LC accordingly). I will place both circuits side by side(meaning not too far to raise concerns).
So, my question is can I make a simple monopole or dipole antenna(or any antenna) with a jumper wire(or just a wire) or any other simple conductor without any coaxial cable, mounts, brackets, soldering equipment. I just want a quick plug-in of a simple antenna to both circuits and check transmission(do consider the case if circuits are built on a breadboard). Whatever resources I have referred to now, they suggest antennas with complex components(with respect to my constraints above):


texts: Arduino based EEPROM programmer acts weird

texts:
I use an Arduino Mega to program an AT28C256 by using this code [1], but there is a weird issue!
The Arduino's pin 41 is connected to the AT28C256's pin 16 which is I/O 4. It works without any problem up to 27-30 bytes, but afterwards it goes low!
For example, I tried to write 0xEA (11101010) to the first 200 addresses, first 29 bytes were fine, but after that all bytes were 0xE2 which means 11100010. I tired to program different EEPROMs with different data, e.g. 0xFF (11111111) but again after 30 bytes it was all 0xF7 (11110111).
I double checked connections and the circuit, everything seems to be fine (otherwise how could the first few bytes be correct?). I also captured the data with a logic analyzer, the capture shows this data line goes low after few bytes.
What could be wrong?
[1] https://create.arduino.cc/editor/albs_br/94b6f3f5-413d-4714-80dc-836bf5b3705c/preview


texts: What is the difference between electromagnetism and electromagnetic radiation?

texts:
In a previous question, I asked if having 2 coils of wire with electricity flowing from one to the other is RF, and they replied that it was not Radio Frequency. I was puzzled because I thought this was wireless transmission of a changing magnetic field, which thus was RF.

I thought the rate of the AC current oscillation was the frequency of the RF (so a 60 hertz AC input I thought would give me a 60 hertz RF signal). Well, I was told NOT.

I would like to know the difference between electromagnetic radiation and just a plain, changing electromagnetic field.


texts: How to blink LED using NodeMCU in Arduino IDE?

texts:
I have alredy installed ESP8266 package in my Arduino library. I connected d0 pin of NodeMCU to LED's positive terminal and ground pin of nodeMCU to LED's
Negative terminal as well as I uploaded blink code which is included in the library, well code also had run well without any error even nodeMCU's LED also blinked well within the delay time but the LED that I have connected to nodeMCU, was not blinking. what was the problem on there

When I had made a motion detector project using NodeMCU, the same problem that I had met. I have got notification through blynk which was only motion detector connected and got offline. I couldn't get PIR's reading notification
but the sensor worked well when I connected into Arduino


texts: What is the need for an inductor coil in a smps-buck converter?

texts:
Here is the figure:

All tutorials have an inductor in smsp-buck. But when I simulate without an inductor I see a similar plot. Why not use only a capacitor?


texts: Ways to determine approximate magnitude of crosstalk between PCB layers

texts:
Is there any basic methods to calculate crosstalk between different layers in a multilayer PCB. I am not after anything exact just a way to grasp the magnitude of the issue.

The situation I am trying to solve is in a 4 layer space constrained PCB with a stackup of Signal-Ground-Power-Signal, on my bottom layer I have a number of differential +/- 10V Signals max freq 1KHz. On the power layer above these traces I have a power trace with a current varying between 0-200mA with a minimum rise time of approximately 0.1ms, the trace for the return current is directly adjacent.

Assuming there is no other way I can route my PCB how can I go about getting a feel for what kind of affect a step in my current can affect my signals.

Other data

Signal Output impedance <100 ohms

Signal Input impedance approx 10k ohms
Signal trace width 12mil, trace separation 12mil
Power trace width 40mil, separation 20mill
Copper Weight 1oz
Outer plane separation 0.2mm
Inner plane separation 1.2mm
Length of parallel run 75mm


texts: Should I be concerned about reverse current?

texts:
I have incorporated a reference design from this page on discrete driver circuits for vibration motors for the high-side configuration.

Here is the picture of the circuit:

I'm concerned about the fact that my VDD, which is driving the motor is 3.0V, and my PWM output voltage from a microcontroller is 3.3V. Would there be any damage caused by the reverse current when the PWM output is high?

My pull-up resistors and gate resistors are 10k each. The 3.0V comes from a buck converter, and I can't find any absolute maximum rating specification in the datasheet for the IC that I'm using about reverse current. This is the datasheet for the IC in particular. Should I add a diode with a forward voltage of ~0.3V? Thoughts?


texts: How to convert an expression from SOP to POS and back in Boolean Algebra?

texts:
How to convert a Sum of Products (SOP) expression to Product of Sums (POS) form and vice versa in Boolean Algebra?

e.g.: F = xy' + yz'


texts: How to wire a potentiometer to an ADC for low power

texts:
I'm designing a microcontroller based device which spends most of the time in deep sleep.
Every 10 seconds it wakes up, reads a potentiometer connected on an ADC line then goes back to sleep. My aim is to achieve a long battery life.

How should I wire the potentiometer up to the microcontroller in order to minimise power use?

For my first attempt, I wired a 1K pot to 3V3 and GND with the wiper attached to the ADC. No matter what resistance is set on the pot, this seems to consume 3-5mA continuously.

Should one or more of the pot pins be connected to GPIOs and driven only when needed?
If so, should the pins be driven low or tristated when not in use?


texts: Writting Joystick drivers for ARM Cortex

texts:
I need to write a driver for Xbox360 joystick controller, using its module and everything. The idea isn't just take the code, I'm really interesting in the theory behind it. Does anyone have any tutorial or books that explains something about it?

I intend to use a Discovery Development Board, with a Cortex M3 or a Cortex M4 ST Arm.


texts: What do we mean by "gate plateau voltage"?

texts:
While reading some semiconductors datasheets, I've found something called "gate plateau".
What do we mean by this term ?

Reference:
AND8029 application note page 2, from ON Semiconductor written by Christoph Basso.


texts: Any ideas on what to do with a board that condition is unknown?

texts:
I got given a Cirrus Logic EDB7209-2B.0 with LCD Display. It powers up(the power LED lights up and there is power on the board accessing the ARM CPU) but i'm unsure on what to do with it has anyone got any experience with one of these development boards? I know when it left the factory it was running some basic MP3 player. It has some NAND Flash, Flash and DRAM memory. But i have no programming cable for it. Is there a jtag cable i can make? The main processsor is a Cirrus Logic EP7209-CV-C. I would quite like the board to be able to program to play with software development for the ARM processors.
Thanks in Advance,
Dean


texts:
I'm looking for confirmation to see if this battery and this solar panel will cover my needs for a remote timelapse project I'm setting up. The timelapse will run 6 days a week for 9 hours. My area gets 4 hours of good sun a day.

So far, based off all the reading I've been doing, my math looks like this:

The device's power consumption:

12V battery x 275mA device current = 3.3W x 9 hours a day = 29.7Wh + 10% solar controller losses = 32.67Wh

For a 1 day reserve (to try and get past any rain that might stop charging), this upsizes my power consumption to:
32Wh + 30% reserve = 42.47Wh

For battery capacity, I know I shouldn't drain the battery more than 50% to preserve it's health.

42.47Wh / 12V = 3.5Ah x 2 (for the 50%) = 7Ah battery

In order to size a panel to charge this system:

12W panel x 4 h sunlight = 48Wh of power

48Wh of power is within my 42Wh of consumption with upsize to charge.

So I'm looking to confirm:

Is my math right?
Will the 12W panel (at 48Wh) cover my 42.47Wh power consumption?


texts: ESP32 is safe enough to control a door lock

texts:
It is safe to use an ESP32 (specifically DevKitC) to control a Home door lock using a relay module (or maybe a power MOSFET)?

Supposing that the ESP32 is running a safe and bugfree software.

on the hardware side is safe enough?
I mean will an unexpected and unpredictable event (example:power surge, overheating, anything that should not happen but can happen)
unlock my door unexpectedly?


texts: Where is the body of the textio package?

texts:
I have used the textio package several times and thought about reading it. When I opened the textio package from my ModelSim library window in the std library I found that the body of the package is not in the textio.vhdl file. Thus, I can onyl see the declaration of the functions in the file but not their body.

How/Where can I find all contents of the textio package i.e its body?


texts: Grounding of a PCB that communicates with a PC via USB or RS232

texts:
I have a PCB with an atmega8, communicating with a PC. The signal from TX and RX pins is level-shifted through a MAX232 to standard serial port level, then converted via serial-to-USB commercial device, which connects to the PC. The PCB with the atmega8 and the PCB, holding the MAX232 are powered from the same brick (transformer-based power supply).

Do I connect the GND of MAX232 pcb to ground of the serial port (which goes to the PC)? Do I connect the GND of the atmega8 board to GND on the MAX232 board? I would prefer that it doesn't matter if the two boards are powered from the same PSU or separate.


texts: Does a USB mouse have memory that could be used to store malware?

texts:
I worry that this might get flagged as too broad, but here it goes:

Lately I've been thinking about the possibility of loading data on peripheral devices.  One of the most used peripherals is the mouse.  I realize that there are 101 ways to build a mouse.  To refine my question into several, I ask these questions:

Is it possible to build a mouse without memory?  If so, is it typically seen not have memory on a mouse?
Suppose the mouse did have memory (if this is not an realistic assumption, please point that out), is it typical to see ROM types of memory only?  Can the memory be flashed like CMOS memory?
Has any one seen an computer attack/malware attack from the memory of a mouse?

I ask number three because what I've been thinking of lately is the generalization of the attacks performed by various advanced persistent threats.


texts: + and - 12 V power supply with 12v Batteries, How to make a ground rail with both batteries

texts: I'm  new to electronics. I want to make a battery supply to power an OPT301M {photodiode with integrated op amp} and an ADTL082 dual {op amp IC} in order to attempt to reduce noise in the circuit. I have two 12V batteries and I'm assuming I just connect the positive terminal of one battery to the + rail and the - terminal of the other battery to the - rail and the remaining battery terminals connect to the ground rail. I'm going to use a 3 amp fuse on each battery for safety. I'm quite a noob so there might be something obvious I'm missing here or doing completely wrong


texts: Common mode choke to boost cmrr of transformer input

texts:
I was wondering, can a common mode choke be used to enhance the CMRR of a transformer coupled amplifier Even further?

What are the drawbacks?


texts: Designing an air gap transformer Misunderstanding

texts:
Suppose my core is actually with a design which make it saturated and the voltage on the secondary is too high.

So I have to decrease the secondary voltage:
For this I can increase the number of turn on the primary side N1. Nevertheless I will increase the magnetic excitation H which is equal with some appoximation to H = N1*I1/l. It will then saturated even "higher" my core. So I can't go this way.

I can lowering N2 : Unfortunately N2 is at its minimum.

Last solution to reduce the secondary voltage according to the Faraday's Law, reducing the variation of the magnetic flux over the time. (Consider that we cannot change the duty cycle).

How can I decrease the variation of the magnetic flux? Here is what I do not understand:

By decreasing N1, I decrease the excitation H1, so the magnetic flux. (cf B-H curves)

Nevertheless if I consider the Faraday's law, as the primary voltage is constant and the duty cycle fix, If I decrease N1, I increase the variation of the magnetic flux.

Where is my error?


texts: How are the diodes helping in the attached ckt :-


texts:
Hello i have what looks to be a PNP transistor.The marking code on it is U3W with the numbers 65 rotated 90 degrees next to U3W.Its a Sot-23-3 package,refer to image of schematic of how its connected.

Pin A and Pin B are from a RS-485 transceiver,and another note the A,B pins are used to send DMX512 data across it.

Firstly could this be a transistor based on how its connected?If it is do you happen to know the part#,or company,etc?Any input is appreciated thanks.

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


texts: What are the part numbers for PCI-E 8-pin and 6-pin power connectors?

texts:
https://upload.wikimedia.org/wikipedia/commons/a/af/PCI_Express_Power_Supply_Connector-female_PNr%C2%B00438.jpg

I believe they are Molex Mini-Fit series but I can't find the exact match. Thanks.

Found an old thread. It points to some no-name connector, which is nice but I need a part I can specify in a design...


texts:
I'm trying to get a sn74hc595n working with an arduino Due, eventually I will be hooking up each output to an NPN to drive Nixie tubes (I am switching my design from a due to using a esp8266 so I need to cut back on the pin use, hence the shift register).

I have been using this https://learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds/breadboard-layout as the schematic to get working (except using 3.3V isntead of 5V since I'm using a due). When set up according to the schematic nothing works (I'm using the same code too), however when reversing the polarity of the LEDs and hooking them up to high, it works, so the 74hc595 is working fine as a sink, but it doesn't seem to be sourcing.

Am I missing something to make it source? Thanks!

Edit: To make things clearer, here is what I have set up (currently only using 1 LED just to make sure things work)

And here is it set up with the 74HC595 as a source (which is not currently working).


texts:
I have to provide an update mechanism to a product. Currently, I implemented a bluetooth upgrade mechanism, updated pushed via Bluetooth. In case something goes very wrong, marketing asking for a recovery method, which is reasonable.

The uP I use has an embedded bootloader (ROM). I can use this as the bullet proof method. This one requires some pin to be pulled high, original design we didn't expose this, it was a pad on the board. Now, I need some way to expose and give user a way to make this work. The thinking is to use a special power on/off button. Currently, we use a mechanical button, when off, no power to system including CPU.  The idea is to find a button, if you keep pressed at the bottom, this pin is pulled high and if you have the right software on PC, things will start to move.

What do you think about this approach? (I am worried about hackers) and where can I find such a switch?


texts: Why do underground cables "require a higher degree of reactive power compensation" than overhead lines?

texts:
I was reading a brag sheet for a certain company's giant transformers, and I came across this sentence:

  Furthermore, in some regions, the existing over head lines are being replaced by underground cables, which require a higher degree of reactive power compensation.

Why is this?