texts: Control current to one of two loads on PCB

texts:
I am currently working on a project where 2 batteries powers multiple components on a board. A raspberry pi, 2 thrusters and a winch. Each device is powered via the battery and a buck converter. The main issue is that the thrusters and the winch cannot run at the same time because they will overdraw the battery. Changing the battery is unfortunately not an option. This also has to be implemented in the hardware and not the software. Here are the numbers. The winch runs on 12v and can pull up to 20amps (but most likely will not). 2 thrusters run at 18.5v and can also pull up to 20amps each (again will not reach this). There are 2 18.5v batteries with a draw limit of 20amps each. The batteries are fused for worst case scenario. How can I switch the power from one device to another using the raspberry pi. Originally, I was thinking a relay however I have not been able to find a relay that can handle about 50amps to be safe, and have a control voltage of 3.3v (rpi gpio). I know there has to be other options however I cannot find any through my own research.

Here is the current model of the PCB I have now. (Feel free to rip it apart, This is my first time doing this and I don't necessarily know everything) The red circles indicate the two paths, the green circle indicates the power supply. Essentially I need a single pole double throw switch that can be controlled by a raspberry pi. Any ideas would be amazing. Thank you.


texts: I am powering a board and circuit with a 9V battery (those alkaline ones). And I would like to read the 9V battery to keep track of how much power it has left. I have read that I can do this with a voltage divider since most ADC input on uCs take 5V max. That's good but wouldn't the voltage divider itself draw power and make the battery drain faster? I am not going to constantly measure battery level.


texts:
I would try to make it as clear as possible. I have a relay, and it has five pins( NC, NO, C, and coil) like any basic relay.

Now, I want to apply a logic - when the input (I would say it BMS from now) is 230V ( the mains supply is on) the alarm system should not buzz ( the alarm work at 230V mains supply) and when the input(BMS) is cut off (0V) the alarm system should start buzzing. In short, the alarm should start when the input is 0V and should turn off when the input is 230V mains. I realized the best way I can achieve is by using a relay and 2 different mains supply. The BMS will control the coil of the relay. The second power supply mains will be connected to the NC pin of the relay. And the alarm (hooter) will be connected to the C or common pin of the relay. Now, we consider two cases.

Case 1:
The second power supply is On and BMS is also on.

When this is the case, the Coil of relay is high as we have connected BMS to the relay coil.  So, NO and C of the relay will be connected to each other. We have nothing connected in the NO pin so the C pin would be low and the alarm will not start. Exactly what we want.

Case 2:
The second power supply is On and BMS is cut-off

In this case, the coil of the relay will be cutoff so NC and C of the relay will be connected to each other. The second power supply is connected to the NC pin and as it is shorted to C of the relay, it will start the alarm as it will receive the supply voltage from the second power supply. So, when the BMS is cut-off, the alarm starts. Still, exactly the case we want.

The problem is that the BMS will always be on usually and the relay will always be in the switched state( NO and C of the relay will be connected). It will be only when the BMS is cut-off the relay will come to normal state( NC and C of the relay are connected).

Now, coming to my question. As the relay will be in the switched state forever ( NO AND C is always connected), will it damage my relay? Will the self-life of the relay decrease in that case? I hope you got my question. If it will damage my relay, please read further. If not, I would not look for alternatives.

Please help if you have any alternative for achieving the same thing.

If there is any other way of the same functioning ( the alarm should start when the BMS is cut-off) without using relay or using relay but with different connections, please do let me know. I am open for suggestions and please do help. Thanks for reading as I know I wrote a whole story here. Thank you.


texts: Identifying a round connector with four pins and screwable housing

texts:
This cable was in use carrying both power and data to a simple push-button panel previously.

It has three small and one big female pin.

Close-up photo of the front, with logo.


texts: Help needed trying to build an audio sawtooth oscillator

texts:
I'm a total beginner hobbyist trying to understand the concept of an audio synthesizer, with a view to building one. Rather than just build a kit I'm keen to understand the concepts.

Goal: build a simple sawtooth oscillator using an integrator and Schmitt trigger

I'm working through the VCO module and just wanted to strip it down an see if I could build a simple sawtooth oscillator, using op-amps; an integrator circuit feeding to a Schmitt Trigger that would short the capacitor on the integrator when a certain voltage is reached.

My circuit so far is below:

R4, R5 provide voltage to the RC circuit R6, C2; I feel I need R4, R5, R6, C2 to supply a change of voltage to the integrator in order for to start to integrate C1 with the Integrator U1 - although this seems messy. Please see the waveform outputs below. The is the linear change of voltage from the integrator I'd expect V(TP1), however, this voltage is negative (I'm not sure if this should be positive). This then feeds R3 and the Schmitt Trigger and the next step would be for V(out) of U2 to turn on a JFET across C1 to short it at certain voltage point along V(tp1).

Should the voltage to the JFET just be a very short single pulse at the point the threshold voltage is reached, say of 20us? Currently, V(out) just seems to be flatlining.

When working I'd expect to see a sawtooth wave of 2v peak to peak centred on 0v from v(tp1)

Any help for me to gain further understanding into these fundamental concepts and my goal in creating this simple sawtooth oscillator would be greatly appreciated.

Many thanks
Alex


texts: What is a C&I circuit? I've seen it in a surge arrester catalogue indicating that those kind of surge arresters are to be used in C&I circuits.


texts:
I am trying to use MOSFETs to switch AC power. Here is my test circuit:

simulate this circuit – Schematic created using CircuitLab

If I put DC or low frequency ( < 1000khz) across the MOSFETs, the switch turns the MOSFETs on and off perfectly. However, the MOSFETs will not turn off completely when I use high frequencies. I ultimately have to switch 350 khz. If I give it 20V at 350 khz, I get about 10V across the load even if I turn the transistors off by directly shorting the gate to the source.

The high frequency AC seems to be passing through the parasitic capacitance of the MOSFETs and turning them on. Are there MOSFETs, perhaps with low input capacitance, that can switch high frequency power? Is there another way of setting up this circuit that would turn off completely? Or is there another something besides a MOSFET that I need to use? I am trying to avoid relays.

I spent a lot of time searching, and found references to switching 20 khz audio with circuits like this, but I don't see my circuit turning off well even at only 20 khz. I have to switch 150V at 5A and 350 khz on and off once or twice a second.

Thanks!


texts: Is there a dual row edge connector that is connected a the edge of the PCB, with one row connecting to top side, the other to bot side?

texts: I do not want a card edge connector that sits on neither the top or bottom of the PCB, I need one that sits parallel to the PCB board.


texts: 2 Pin Reed Switch Normally Closed Effect using BC547

texts:
I am very new to electronics. I am using a reed switch with 2 pin. Which acts as a switch near to magnet.

I want to keep the switch ON when magnet is not near and OFF when its near to magnet.

I thought to use BC547 as it can act as a switch as well. And can help me to perform this task. But doing this, I realise it keep drawing the voltage and current even in OFF state.

Someone can please help with this, where it don't consume any additional voltage and break the circuit when magnet is close to switch.

Thank you!


texts: Grabbing data from separate USB cords / separate serial streams

texts:
I have two measurement circuitry connected to two separate Arduinos.

I need to grab and record data from the two simultaneously, so how can I monitor and record data from two serial stream from separate USB cords?

I don´t have a unix system but I have been using Cygwin so far. I´m currently installing Ubuntu on VMVirtualBox. Can I just open multiple shells in Ubuntu and record the data in that way given that I know my COM ports?


texts:
I am designing a circuit using a MAX232. I have connected Tx and Rx of the MCU to the 11th & 12th pin and connected the 14th & 13th pin to the RS232 cable. I do not have a UART port in my laptop, so I have used a UART to USB Cable. However, I am not getting data. Vcc is 3.3V. I have used 1uf capacitors. Below is the circuit:

Where am I going wrong?


texts:
I was reading an answer to this other question which asks about saturation of a BJT transistor.

In that answer it states to be saturated you should shoot for a 1:10 ratio or more between base current and collector current. While this is perfectly acceptable, the MMBT5087 transistor meantioned in that question specifies a minimum hFE value of ~150.

In theory the base current can be reduced until it's just bigger than a 1:hFE ratio with the collector current. However, for practical designs I would assume designing close to the 1:150 ratio is risky, even if this is the specified minimum value (if I'm reading the datasheet right).

My question is what type of safety factoring should I aim for (assuming I want to minimize base current)? A 1:10 ratio seems a bit excessive as that provides a FOS of 15. Also, this specific example is a PNP type transistor. Are there any different recommendations for NPN type transistors?


texts: How does a domestic appliance "know" how much current to draw?

texts:
I have a small wall plug which takes 240V 50Hz AC from the mains, and can give me 500mA 5V DC. I suspect there is a transformer stepping the voltage down and a bridge rectifier converting the AC to DC.

BUT... the amount of current which flows... how is it controlled?

I know that if I plug in a 3KW heater, that the electrical cable gets quite warm from all the current flowing through it, but the cable on a phone charger does not.

Is it to do with every mains socket being a parallel load? i.e. if everyone on the national grid unplugged every appliance at the same time, apart from my charger, would my charger explode?


texts: Interpretation of input impedance graph of a filter

texts:
I tried to simulate the input impudance of a multipass feedback low pass filter. I want to know if the graph I got is right, and if so, what does it show? Also, what is that dashed line about?

And here is the circuit itself:


texts: How to measure capacitance of a capacitive sensor?

texts:
I've started working on capacitive sensors and finally got one ready(which is concentric cylinder type) but now I need to test it. I have few doubts:

Can I calculate the value of capacitance without any instrument?
May be just with an analytical formula.
What difference I may get in the values of capacitance produced from this formula and from an LCR-meter?


texts:
I'm kind of a newbie so excuse me if this is a beginner's question. tried to find an answer but couldn't find one.

I'm working on STM32f3Discovery eval board, with the stm32f303vc on it.
The code uses TIM6 overflow interrupt to generate LEDs lighting on shifting fashion, using shift register (the LEDs connected to PORTE pins).
This is the code :

     #include "stm32f30x.h"
    #include "system_stm32f30x.h"

    void TIM6_DAC_IRQHandler(void);
    void setTIM6(void);

volatile uint32_t _regValue = 1<<15;

    int main(void) {

    volatile int _timer = 1000000;

    RCC -> AHBENR |= (uint32_t) 1 <<21;
    GPIOE -> MODER |= 0x55550000; //ports 8-15 output
    setTIM6();
    TIM6 -> CR1 |=0x1; //timer enable

    while(1)
    {
    }
    } //end of main

    void setTIM6(void) {

    NVIC ->ISER[1] |= (uint32_t) 1<<22; //TIM6 int. enable
    RCC -> APB1ENR |= (uint32_t) 1<<4; //clock enable
    RCC -> CFGR |= 0x00000700; //APB1 prescaler -> clock=(8MHz/16)*2 = 1MHz
    TIM6->CR1 |= 0;
    TIM6->DIER |=1; //int. enable
    TIM6->PSC = 0xFFFF; //prescaler for TIM6. -> clk = 1Mz/2^16 = 2^4 =16Hz
    TIM6->ARR = 240; // int. flag every couple of secs.

      DBGMCU->APB1FZ |= 1<<4; //for debug - TIM6 counter freeze during breakpoint
}

void TIM6_DAC_IRQHandler(void)
{
    _regValue = _regValue >> 1;
    GPIOE -> ODR = _regValue; //writing value to PORTE output

    if (_regValue == 1<<9){
        _regValue = 1<<15;
    } //this is for rotational loop of LEDs

    TIM6->SR &= ~0x1; //UIF (Interrupt flag) disabled
}

OK, so the problem is what I get in the board is a blink in LED(x) (first LED I intended to), then (after a timer's pause) blink in LED(x+2),
meaning LED(x+1) was "skipped"! this goes on: Led(x+3) on, then LED(x+5) and so on.
But when I enter debug mode (step-by-step), I see that this LED (x+1) is truly blinking, apparently it's just a matter of speed so the next interrupt overrides it before the eye notices.   Any ideas what is the reason for this?
When I debug this I see that on the second time it enters the IRQ, the SR is NOT active.  on the third it is, the fourth time not, and so on.

SO, I've got this weird assumption that the last line of IRQ is toggling SR to LOW, but the transition time is low
so the when the NVIC returns to main it sees that the UIF is still HIGH, so it jumps again to IRQ and do the LED shift rotation
and output it, but because the counter has already started ticking earlier it finishes too quickly and overrides the last blinking so we can't see it.  but I don't know if it's reasonable in terms of the architecture of the Core.   Although, still doesn't

Anyway, what solved this was to include the SR checking in the beginning of the IRQ, i.e :
if (TIM6->SR &= ~0x1)
{
...
}

Moreover , if I put the "TIM6->SR &= ~0x1;" line in the beginning of the IRQ, it also works well!  and that's also indicates the reason
I've pointed to! (it gives the transition more time before returning to main).
So.. is it really that?  it looks to fit, but still sounds strange: shouldn't the transition be quick enough, definitely quicker than the return to main?...  (with POP stack etc.)

thanks.


texts: Driving ADC's CONV input at the falling edge of SCK

texts:
Trying to makes sense of the following in this LTC1407 datasheet:

  It is good practice to drive the LTC1407/LTC1407A CONV input first to
  avoid digital noise interference during the sample-to-hold transition
  triggered by CONV at the start of conversion.

The same datasheet also has the following note about CONV:

  It is best for CONV to rise half a clock before SCK, when running the
  clock at rated speed.

So I thought CONV might be driven high at the falling edge of SCK.

But the statement about driving the CONV input first is confusing.

Does it mean CONV shouldn't be driven on the falling or rising edges of SCK and should be offset from those? (see the datasheet's timing diagram)

Looking at interfacing the ADC with Lattice LCMXO2-256 and running the FPGA's clock at the SCK frequency, but then if it needs this offset I would need a PLL (which it doesn't have) or a higher clock frequency to achieve the offset.


texts:
I was responsible for making up my own question and providing the answer to the problem. I was just wondering if someone could check my work, I would go to my schools tutoring thing but they are closed over the weekend.

I believe I have all the right work just have some weird numbers.

The first to are in series so simplifies to 9ohms in series with the 200mj inductor

simulate this circuit – Schematic created using CircuitLab

I then want them to have them correct the power factor to .95, then calculate the new impedance angle of .95.

Let me know if you see any mistakes.
I can't get it to stay upright to read, so if it doesn't work here is uploaded version of it:

http://imgur.com/XV9NIG6

Believe the power factor is: 18.9+158.9j or 159<-83.2*

The to correct the power factor to .95 we need a 3.39uF capacitor.


texts:
I'm currently developing with Keil µvision5 and STM32CubeMX on a Nucléo Board L053R8 (LQP64). Now I would like to transfer my program to my prototype board which has a STM32F051K6T8 (LQP32).

Do I have to re-code it ? Or can I just import my file?

I have tried to create a new project and import file one by one but it still link with my old project.

Do I have to change the Include and Source file?


texts: Passive Elements At high Frequency [parasitic effects]

texts:
What would the magnitude Response curve for a Resistor, Inductor and Capacitor look like [with parasitic effects not ideal components] ?  From what I have gathered they would look something along the lines of:

these are log-log graphs.

Resistor:

Inductor:

Capacitor:

Resistor: At high Frequency inductor characteristic dominates jwl hence impedance increase, capacitance would go to zero and R would become negligible.

Inductor: there is the peak there due to the resonance otherwise straight line gradient 1.

Capacitor: straight line gradient -1, not sure of any parasitic effects here?

Are these correct if now I would love to hear your contributions. If my explanations are lacking anything please add on for better understanding.

To add on to this, If I where to draw the circuit symbols of these non ideal passive components what would they look like?

Many thanks.


texts:
Why do instructions need to be processed at set time intervals (i.e. with the use of a clock)? Can't they be executed sequentially - immediately after the previous instruction has completed?

An analogy for the necessity of clocks in microcontrollers would prove particularly useful.


texts:
Can someone give me an indication on the performance (time) of ECDH executed on the STM32F4 board. The STM32F4 has hardware acceleration for ECC (http://www.st.com/st-web-ui/static/active/cn/resource/technical/document/user_manual/CD00208802.pdf) but I can't find any benchmarks.

[background] I want to setup a secure channel between a smartphone and an embedded device. The embedded device will use the STM32F4 MCU. The communication link will be established over NFC. NFC has an inherent protection against man-in-the-middle attacks so we can use a standard ECDH to establish a symmetric key and encrypt further data exchange. To make sure that ECDH is feasible on the STM32F4 I am searching for some benchmarks.


texts: How does satellite TV get through in rain? I read somewhere that satellites make use of KU band to transmit data, we have heavy rainfall in various times of the year but even during those times TV channels run smoothly without problem. How is it possible? I thought microwaves are absorbed by water and can't penetrate through solid objects, higher the microwave frequency is. How do they travel through rain clouds and rain and finally into the dish antenna?


texts: Can flash memory in smart phones be recovered after being under 10000 ft of ocean water?

texts:
If you've been watching the news, you know why I'm asking this.

For reasons not yet known, flight 370 from Kuala Lampur left its planned flight path to Beijing, and flew for hours before (probably) crashing in the southern Indian Ocean.  If the passengers or crew were alive and aware of problems, they might have had time to leave messages or record events with their electronic devices.

So I'm wondering: how tough is that memory?  Can it be recovered using advanced forensic techniques, like those that sometimes recover data from destroyed or erased magnetic hard drives?


texts:
The solid state relay board functions normally by shorting + to input, but latches closed on device side of the relay until load is turned off or is disconnected.
Is this normal for solid state relays with inductor type devices?


texts: Full wave rectifier with a high DC offset voltage?

texts: For a full wave rectifier, can it rectify an AC wave with a DC offset above the rated voltage of its diodes rated voltage if the peak to peak voltage of the wave is within its rated voltage?  Like if you had a rectifier that with diodes that could work up to 10 volts, and you were rectifying electricity with 100 volts DC and a 5 volt amplitude sine wave ripple, would it work because the AC component is only varying by 10 volts?


texts: Serial Communication with rs232/485 and rj45

texts:
I am working a project where I want to connect and control, using Labview,

TDK-Lambda Power Supply
Process Vacuum Controller Ion Gauge (MODBUS interface)

They both have rs232/rs485 capabilities, just depends on a switch on the back of the terminal and both connections are with a rj45 jack (I will attach relevant manual). And connect via a RJ45 cable, and I want to connect it to a computer.

Now, I've set up a .vi that should be able to connect to, or at least discover, the devices but to no avail. It might be because I am using a regular Cat5E Patch/Ethernet Cable and it therefore not the right pinout. I've tried to read some post and/or white papers about the subject, but these devices are specific and have different pinouts.

So my question is, how to I go about using an rj45 cable for serial communications? Can I simply connecting a cat5 cable to my laptops ethernet port and to one of the devices serial rj45 jack? Or am I missing something major?

This is my first attempt at anything like this, but I have used Labview to connect to serial DB9 to usb adapters and able to communicate.

Here is a link to the PVC Ion Gauge Manual
And the TDK-Lambda Power Supply

I know I am asking for a lot of help here, but I am super lost and any help is much appreciated.


texts: Switching Between an Analog Sensor and a Digital Sensor

texts:
I am working on a project that reads sensor data from multiple sensors. I am trying to come up with a universal solution for connecting these sensors, and have decided to go with a 4P4C Modular Jack since I need a minimum of 4 lines. Some of the sensors communicate via UART, and some are simply analog.

These are the cases I need to cover:
NC = Not Connected

+5V, GND, TX, RX
+3.3V, GND, TX, RX
+5V, GND, Analog, NC
+3.3V, GND, Analog, NC
NC, GND, Analog, NC

Is there an IC that I can use to switch between +5V, +3.3V, and NC. Then also switch between TX/RX, and Analog/NC?

Edit: I am using a BeagleBone Black to record the data that comes from the sensors, and I am designing a cape/shield to go on top of it, so the space I have is limited.


texts: Do AA battery chargers detect battery charge level and automatically turn off when full?

texts:
When I put in AA batteries for charging, do I have to remember to disconnect the charger after the specified number of hours, or does the charger detect the charge level and automatically turn off when full?

I know that some chargers have a timer that turns them off after a certain number of hours. However, there are frequent and intermittent (few seconds) power cuts where I live. Since that means the timer will be reset every time the power goes out, I don't think the timer works for me.

What I need is for the charger to turn off based on the charge level in the battery, not the time. Do AA battery chargers work that way? Phones and laptops, for example, can be left plugged in without worrying about overcharging. Is that the case for AA chargers as well, both NiMH and NiCd?

In case the answer depends on the specific charger, it's a Sony "CycleEnergy" NiMH AA charger:

With Sony batteries:


texts: How do I calculate I2 by nodal analysis only?

texts:
I am trying to do a nodal analysis of this circuit.

and I need to do this by nodal analysis only.

I need to find \$ i_1 \$, \$ i_2 \$ and \$ i_3 \$.

I have found that

\$ i_1 = \frac{V_B - V_A}{R_1} = \frac{40 - (-15)}{10} = \frac{55}{10} = 5.5 A \$

\$ i_3 = \frac{V_A}{R_2 + R_3} = \frac{-15}{5 + 25} = \frac{-15}{30} = -0.5 A \$

Both these value are correct, according to the simulator.

But this is the problem:

\$ i_2 = i_1 + i_3 = 5.5 + (-0.5) = 5 A \$

But the simulator says -6A.

What is the correct way to approach that?


texts: Output of an TTL family gate for Vin=1.5V?

texts:
Recently I came to find out that TTL outputs are typically restricted to narrower limits of between 0.0 V and 0.4 V for a "low" and between 2.6 V and VCC for a "high".

But if input of an TTL gate is 1.5V then it will not fall in any region and produces an output which will be neither high/low.
If due to noise any such condition occurs in design then what preventention can be done?


texts: Designing af PCB with an ISP header and a LED

texts:
This is my first project, it should be very simple. I'm trying to add an ISP header and a LED to a PCB, but I'm having doubts if it'll work. The problem is the GND connections .. the yellow line (in EAGLE) runs through the LED and then to the ISP header, then to the Attiny. Note that the board is not routed yet - but I have to follow the yellow lines.

That doesn't seem right.

Any points on how to solve this?

I would expect it to be: GND -> LED -> PB3 .. than GND -> ISP HEADER - GND (on Attiny) separate, not running through each other.

Pictures of schematic + board:


texts: Op amp output DC operating point variation with load current

texts: Consider a cmos op amp in non inverting configuration. For a small load current, we expect the output DC voltage to be the input DC voltage multiplied by closed loop gain. As the load current is increased, DC open loop gain reduces. For e.g, the open loop gain can reduce from 80dB to 40dB as the load current increases from 10mA to 30mA. 40dB of open loop gain corresponds to an error in closed loop gain of about 1%. Will the DC output voltage reduce by 1% as the load current changes from 10mA to 30mA? It doesn't seem to be the case from simulations.


texts:
I've found that image:

and cannot find a reason why there is page directory ? I think that it could save time, if the process (or processes), especially the CR3 register, points straight to the page table.


texts: Interface and data trasfer between FPGA and Processor- TI AM4376 over USB2.0

texts:
I have interfaced Xilinx 7 Series FPGA with TI processor- Sitara AM4376 over USB2.0.

I have implemented USB PHY through Cypress USB Controller IC - CY7C68014A (EZUSB-FX2LP). The attached file is the architecture I have implement for USB PHY between processor and FPGA. I can establish the data transfer from processor to FPGA from D+/D- to parallel data.

I am confused with how shall I send the data from FPGA to processor back, over USB when a respective request command is received by FPGA from processor. I have used processor in USB host mode and FPGA as a slave device mode.

Can some one help with this.

Thanks in advance.

(click to view in full size)


texts: Design of a proximity Sensor with Digispark MCU

texts:
I want to design a battery powered device that detects proximity (through an IR LED and a photodiode), and displays information on a small screen. As it is an autonomous device, it must be low-power. I chose to work with a digispark dev board that seems to fit my requirements, in terms of power, pinouts, and memory. Here are the components i chose to use:

Digispark dev board (ATtiny85)
BPV10NF photodiode
IR LED TSFF5210
0'96 Adafruit 128x64 OLED screen
a 9V battery
a push button (it will drive power (software function) on the OLED screen)
some resistors.

Here is the schematic that I made for this project:

pinouts of the Digispark will be configured as follows:

P0 --> SDA
P1 --> Digital output (Reset pin driving)
P2 --> SCL
P3 --> Analog input (button pressing detection and pull-up)
P4 --> Digital or PWM for IR LED (I am not too sure here)
P5 --> Analog input

So, as I am a beginner in electronics, I am not too sure about my design, particularly concerning the resistors. I made some calculations, for the IRled that led to a 225ohm resistor, in order to avoid damage on micro, but concerning the pull-up resistor and the photodiode one, I am not too sure.
Could anybody verify if there is a problem on this design ?
Thanks !

EDIT:

So according to what st2000 said, i changed my dev board for a MSP-exp430G2 (that seems to draw less current). I chose a ADM1602K as LCD (with a potentiometer to monitor the contrast), and a TSSP4P38 as IR proximity sensor. As i want to use a Lipo (3v7), i added a XC6206 voltage regulator that seems low-power (around 1µA current draw). the wiring on each pinout of the MSP430 is not definitive, as i only need 2 analog input, and the other are digital output (if i'm not mistaken).

Here is the schematic: (sorry if it's a bit messy :S)

Could you please give me inputs on that circuit ?
Thanks !!


texts: OpenOCD FT2232H as SWD debugger with STM32L0 mcu

texts:
I would like to debug my MCU with OpenOCD. I run this command:

openocd -f interface/ftdi/minimodule-swd.cfg -f target/stm32l0.cfg

and then I get this prints from OpenOCD:

Open On-Chip Debugger 0.10.0+dev-00689-g6c2020eb-dirty (2019-02-09-17:42)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Info : FTDI SWD mode enabled
swd
adapter speed: 300 kHz
adapter_nsrst_delay: 100
none separate
cortex_m reset_config sysresetreq
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 300 kHz

It seems that everything OK! but when I try to do telnet localhost 4444 I get

Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

What could be the problem?


texts: Wire gauge for low voltage, high current DC application

texts:
For the past few weeks I've been shopping for a remote controlled car for my son, along with some batteries and a charger that will work with them and his other RC toys. To make a very long story short, it would be generous to say that the RC industry has many "standards" for it's electrical connectors. Rather, there appears to be an almost limitless menagerie of arbitrarily shaped plastic and metal pieces to connect batteries to their respective toys and chargers.

Consequently, the consensus advice I've received from friends, online research, and our local hobby shop is to cut off the heterogeneous connectors from our various components and solder on a standard type across our fleet. OK, I can do that.

I'm having difficulty, however, in choosing appropriately-rated connectors and wires, because I don't understand the safety implications in this application. I've done enough home wiring to choose the right wires/breakers/outlets/etc. for 120V AC. Unfortunately, I don't trust my layman's understanding of electrical/electronic principles to translate safe home wiring to safe RC car wiring.

The crux of the issue is that I'm seeing staggering numbers for some of these RC components - like 100A maximum draw for the car's electronic speed control (ESC) unit, or 65A for a high-performance brushless motor. I say "staggering" because the main breaker in my house is 100A, and we're talking about a little toy car here.

Of course, my house uses 120V AC, and this toy uses (nominally) 7.4V - 11.1V DC. So, my gut tells me that I don't need a big slab of metal like the main bus in my home's breaker panel to safely move electrons from the toy car's battery to its motor. I mean, 100A@120V has to be somehow "more" than 100A@7.4V, right? This is supported by the fact that the car comes with 12 AWG wires, not the hot dog sized cable that carries 50A to my oven, for example.

Still, in looking at spec sheets for my connector and wire options, most things seem to be rated based on how much current they can handle, without specifying a voltage. Similarly, I've read a number of posts on other forums that say essentially "amps are amps" for safety/heating purposes, regardless of whether they're AC or DC. Again, few mention voltage.

So, with all of that as context, my question is:

Does either the type of current (AC or DC) or the voltage matter when choosing a safe connector/wire to carry a given number of amps?

To recap, I'm looking to standardize on connectors for, say, up to 15V DC over wires a few inches long. In practice, the current will probably be a few tens-of-amps. But, the battery is rated to discharge at 300A (no kidding!) and the thingy it powers (the ESC) is rated at 100A. So, I assume I should plan to use connectors that can handle 100A@15VDC.

Apologies for my verbosity; I just want to make sure that I neither burn down my son's new toy, nor our house. Thanks in advance for your help.


texts:
I am making my own 2GHz DSO and I have question regarding position of my power supply.
Many companies and hobbyists that are designing their own osciloscopes, not include power supply on their motherboards. I  didn't find a reason why is that so. I started to ask myself if it's possible because product have some kind of warranty and its cheaper to just replace the power supply. But that doesn't apply to DIY researchers.
Is it possible because of the EMC? Or maybe for some other reason?


texts:
I am starting new in using PIC MCUs and am slightly confused by these two available options.

Pickit is a programmer/debugger, that's what they say. Now, there is this something called Microstick which is a ready-made development board with an inbuilt programmer/debugger. Microstick seems to me to be like an Arduino for PICs. Furthermore, Microstick is almost half the price of Pickit.

Now, the question is that why would one buy Pickit if Microstick can already do what Pickit can? I mean Pickit is just a programmer while Microstick seems to me to be not only a programmer but also a quick-start development board.

Am I missing something here?


texts:
Perhaps a Simple Question, but maybe Im misunderstanding "Voltage" drop in terms of LEDS.

So I have a Circuit wired up with a 9V Battery, one 270ohm Resistor and 3 Blue LEDS (that draw around....20ma and 2.0v forward voltage. (this is for testing purposes, I would always put a resistor with each LED)

I put in 1 Led and Read the Ground and Positive Leg of the LED. Multimeter says: 3.52 V
ok.....

2 Leds (same LED): 3.35v

3 Leds : 3.20v

It's hard to see on my super crude MS paint, but im labeling each LED with what the Voltage on the Multimeter reads when I measure that LED leg.

Whats going on here? the LEDS get slightly dimmer (and I mean VERY slight).....but shouldn't the voltage difference after each one be alot more?

Also the Entire System is drawing 30mA exactly (+/- .2-3 mA) regardless of How many LEDS I have on there(and im checking the mA after each additional LED leg to be sure). Clearly im missing something? Is this because the LEDS are in Series? I just kinda assume "Ok more LEDS = MORE mA drawn and voltage drops among each LED.

And I know theirs a Similar question about LEDS in Series, but im more curious about WHY there is no voltage drop or mA change per LED in Series than if it's a good or bad idea (Im sure it's not a great idea to keep LED in series like that of course).


texts: 4 Contacts on Cell Phone LiPo Battery ??

texts:
I am doing an arduino project that requires wireless charging. I am trying to get all the parts on Amazon because I have giftcards to burn so I had to go with a more complicated but I feel safer than a hack solution.
I have an Arduino Fio that has a built in LiPo USB Charging circuit.
My plan is to use a Galaxy S3 Wireless charging base transmitting to a Galaxy S3 Wireless receiver which I will solder a USB dongle onto and plug into the Arduino Fio (The USB port on the Arduino fio is ONLY for battery charging so this should work)
To keep things consistent I am going to buy a Galaxy S3 3.7v 2100mAh battery to power this device.
Question
So my question is the battery appears to have 4 contacts on it. From research I am assuming that 2 of the contacts are for reading the battery temp and other stats. If I am using the Arduino Fio's lipo charging circuit do I need to connect these other 2 terminals on the battery or can I just use the + and -
This is the battery
http://www.amazon.com/gp/product/B0089VO7OM/ref=ox_sc_act_title_2?ie=UTF8&psc=1&smid=A2DE8N3Z0PUB32
To keep it consistant I plan on using this wireless charger
http://www.amazon.com/gp/product/B00B7LPA42/ref=ox_sc_act_title_7?ie=UTF8&psc=1&smid=A2L77EE7U53NWQ
With this receiver
http://www.amazon.com/gp/product/B00BCC2B1Q/ref=ox_sc_act_title_6?ie=UTF8&psc=1&smid=A2L77EE7U53NWQ
Arduino Fio
http://www.amazon.com/gp/product/B005K0O1PA/ref=ox_sc_act_title_8?ie=UTF8&psc=1&smid=A1LHQ5G6ONPXVT


texts:
I have a reel of cable approximately 1000 ft long attached to a robot. I need a way to measure the length of cable that is off the reel in real time (it is being pulled out and reeled back in constantly).

My currently method is to measure revolutions at the center of the reel using a quadrature encoder. While this works, what I'm really looking for is a method that can be retrofitted onto the reel and placed outside the reel.

Cost is a factor, and the cable itself operates in a wet environment, so non-contact would be ideal.

Any ideas? Something like this seems like it would work well, but I'm going to guess it will be way too expensive.

http://www.laserspeedgauge.com/index.php/en/wire-a-cable


texts: Function generator output level drifting

texts:
The output level on my BK Precision 4017A function generator is drifting.

For example, if I set the output level to 10.0V on a 2kHz sine wave, driving a variety of simple half-wave rectifier and diode clamp circuits, the function generator output level will hold fairly steady for perhaps 10 or 15 minutes then drift down to around 6 volts or up to around 15 volts over a period of a couple of minutes, then settle at the new level for a while.

Any suggestions what might be wrong please e.g. dodgy potentiometer, capacitor, or transistor, or are there just too many possibilities to diagnose? I have read the manuals, Googled FG trouble shooting (a lot on frequencies but nothing so far on output level) and emailed BK Precision support but no reply and I guess they are closed now for the weekend.


texts: I am not able to control speed of a DC motor

texts:
I am making an Arduino project in which I have to control speed of DC motor with an ultrasonic sensor.
I have written an Arduino program to do this work but unfortunately my motor only rotates in forward and backward direction and when it comes in specific range like (50-95),(105-150) where I have to decrease the motor speed by 50 and 40 % then the motor only makes some noise - it does not rotate.
Components I am using:

Arduino Uno
L293D motor driver IC
external 5 V/1.5 A  power supply
9 volt motor

Code:
#define echoPin 2
#define trigPin 4
int enA = 9;
int in1 = 8;
int in2 = 7;
// defines variables
long duration;
int distance;

void setup() {
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  Serial.begin(9600);
  pinMode(enA, OUTPUT);
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);

  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW);
}
void loop() {

  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);

  duration = pulseIn(echoPin, HIGH);

  distance = duration * 0.034 / 2;

 Serial.print("Distance: ");
 Serial.print(distance);
 Serial.println(" cm");
 if (95<=distance && distance<=105)
 {
Serial.println("forwrd");
analogWrite(enA, 255);
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
delay(2000);
 }
 else if(50<=distance && distance <=95){
 Serial.println("forward 40 %");
 digitalWrite(in1, HIGH);
 digitalWrite(in2, LOW);// forward
 analogWrite(enA,102);
 delay(2000);
 }
 else if(105<=distance && distance <=150){
 Serial.println("reverse 50%");
 digitalWrite(in1, LOW);
 digitalWrite(in2, HIGH);
 analogWrite(enA,127);
 delay(2000);
}
else if(10<= distance && distance<=50){
Serial.println("10-50 forwrd 40 %");
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);// forward
analogWrite(enA,102);
delay(2000);
}
else if(150<= distance && distance<=200){
 Serial.println("105-200 reverse 50%");
  digitalWrite(in1, LOW);
 digitalWrite(in2, HIGH);
 analogWrite(enA,127);
 delay(2000);
}
}

Circuit diagram:


texts: Voltage ripple on power lines after 6502 CPU is reset

texts:
I have built an Apple 1 replica which is based around a 6502 processor (R6502AP).
It functioning rather unstable (sometimes it works, sometimes it doesn't - it won't always boot properly) so I'm trying to figure out the cause.

When I look at the power line with my scope, I notice a huge voltage ripple starts right after the 6502 boots (when it's reset).

It varies from Vpp = 300 mV up to around 450 mV, so it's pretty significant.
The clock signal is a clean square wave at around 630 kHz (currently produced by an Arduino as I'm still waiting for a proper 1 MHz oscillator).
All the IC's have 100nF bypass caps close to them.

I'm pretty confident this ripple is causing the CPU to be this unstable.
My question is two fold:

1) Is this ripple normal behavior? If anyone has built a 6502 computer, maybe you can tell me if this also occurs in your build.

2) If it's not normal, how can I counter it? I have tried adding electrolytic capacitors of varies values close to the CPU's power line, but it doesn't seem to help.

Update: maybe this helps - I remembered I had an Atari 2600 laying around which contains a 6507 CPU that comes from the same family as the 6502. The Atari 2600 also has ripple voltage on the CPU power line once it boots. It peaks at round Vpp = 300 mV.
So maybe it is normal?


texts:
Say we have this circuit below:

And we were tasked to:

a.) Get Ve and Vc when Vb=0v.
b.) To find what Vb will make the transistor be in the cutoff and saturation region.

The following are given:

α is approximately 1; VBE=0.5V at the edge of conduction.
I1=8mA; I2=2mA; R1 = 2k; R2=2k

I already know what to do with B, just having trouble with the circuit analysis itself lol. I'm not sure how I1 would contribute to Ic and I2 with Ie. Could somebody point me in the right direction? I am thinking that the transistor might be in active mode because the emitter is connected to -Vcc and much more negative potential than Vb. So if i do a KVL eq around the base-emitter loop, ill get Vb-Vbe-Ve-(-Vcc)=0 so then Ve = 0-0.7+Vcc. Now at this point, i'm not really sure how to get Vc to prove that CB junction is reverse-biased and to prove that the transistor is in active mode. Would I1 be Ic and Vc be Vcc-I1R1?


texts: noisy power supply for electric guitar pedal

texts:
I'm building a pedals board for an electric guitar. In order to have better integration, I replaced the wall wart power supply that was doing the job by this (BTW, the wall wart power supply is also a Chinese one) one packaged like this:

The issue is that the power supply generates a kind of whistling in the speaker.
What surprised me is that I plugged my oscilloscope on both power supply (with and without pedal) and I can't see any difference. The voltages seems to be pretty stable.

So my question is: what kind of measure / modification can I do to improve the system?

Edit: I tried a bead like this and I did not observe any change:


texts: VFD IGBT blew up and I can't find a replacement part

texts:
So here’s my situation, a few weeks ago I received a 2.2kW variable frequency drive from a chinese seller and it worked perfectly. I then watched a video on youtube by AvE where he takes one apart (not the same model). He says that if you want to increase the lifespan on your VFD you should check so there is thermal paste on everything that is in contact with the heatsink. So I take mine apart to apply good thermal paste to it. In between the IGBT’s and the heatsink there are thermal pads (the thermally conductive rubber ones), rather than thermal paste. At the moment I think that's stupid because they do not have as good thermal conductivity as thermal paste. I remove them and apply some thermal paste.

Once I have screwed it back together again, I plug it into the wall and press the start button without having any load on it. I hear a pop and then see an error message on the display. I take it apart again to see that one of the IGBT’s has blown open. My guess is that the IGBT’s weren’t supposed to have electrical contact with the heatsink… Now I'm trying to find a replacement part but I can't find one with the exact same specs as the broken one. This is the one that was installed on the VFD and blew up.

I'm not an electrician nor have much experience working with IGBT’s. This is the closest one I could find on Ebay but the gate-emitter voltage is +- 20V instead of the +- 30V mine is rated for so I’m not sure if it will work.

Does anyone have any suggestions or can provide any help?

(if this does not follow the format of a good question I guess it could be rephrased as “What are the important things to consider when replacing IGBT’s?”)


texts:
I am working with altera QuartusII version 13.I want to write a program that reads data from a text file and  outputs this data serially at every positive clk edge.

I have tried writing a code,but it did not work.The simulation result shows a value '1' for y(data read from) all the time even when reset is set '1' initially .Could someone help me in resolving this problem.

--code
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
use STD.textio.all;

ENTITY readfile IS
port(rst,clk:in std_logic;
EOR:out std_logic;
y:out std_logic );
END readfile;

ARCHITECTURE behav OF readfile IS
BEGIN
process (rst,clk)
  file file_pointer : text;
    variable line_content : character;
  variable line_num : line;
    variable j : integer := 0;
    variable char : character:='0';
    variable cnt:integer range 0 to 80:=0;
begin
if rst='1'then
    EOR<='0';
    file_open(file_pointer,"C:\input.txt",READ_MODE);
elsif rising_edge(clk) then
    if cnt<80 then
  readline (file_pointer,line_num);
  READ (line_num,line_content);

        EOR<='1';
        char := line_content;
        if(char = '0') then
            y <= '0';
        else
            y <= '1';
        end if;
cnt:=cnt+1;
 end if;
end if;
  file_close(file_pointer);
end process;
end behav;

--text file(input.txt)
  1
  1
  0
  0
  1
  1
  1
  1
  0
  0
  1
  1
  1
  1
  0
  1
  0
  0
  0
  1
  0
  0
  0
  1
  0
  0
  1
  0
  0
  0
  1
  0
  0
  0
  1
  1
  0
  0
  1
  1
  0
  1
  0
  0
  0
  1
  0
  0
  0
  1
  0
  1
  0
  1
  0
  1
  0
  1
  1
  0
  0
  1
  1
  0
  0
  1
  1
  1
  0
  1
  1
  1
  1
  0
  0
  0
  1
  0
  0
  0


texts: What are the main components reducing harmonic distortion?

texts:
I'm doing a study of harmonic distortion in a system. The system contain several large VSDs and other non-linear loads. There are no filters in the system, and all cables are relatively short.

Not surprisingly, the results show that the harmonic distortion is low close to large generators, while it is very high far from the stiff part of the network (given that there are non-linear loads in that part of the system).

My question is: What exactly is it that determine the level of distortion, except for the harmonic contributing equipment?

What influence does the different factors have:

Voltage level
Load at the bus
Short circuit current capacity

I understand that if the non-linear loads are 1/1000th of the total load, the THD will be low, and if the load is completely non-linear the THD will be high, but is it the most important factor? And supposing the load level is the same at two buses, what other factors will determine the THD levels? Will the distortion level be different if the loads at the bus are passive linear loads, compared to for instance motors?


texts: Function of the FET in LM350/LM317 programmable current limiter

texts:
My question pertains this circuit which is from this question, which in turn is a circuit straight from the data sheet.

I don't understand the function of the FET in this circuit. Surely, with the gate tied to the source, it's an open circuit? It seems to me something clever is being done here and I would love to know what it is.


texts: External 8MHz Oscillator not working for STM32F405RGT6 custom Hardware

texts:
I am using custom-designed hardware for STM32F405RGT6. I need to put the chip in DFU mode to perform a DFU firmware upgrade. I am able to flash the chip via the STLINK, which indicates that the chip is functional. I have connected the Boot0 pin to Vdd. I am connecting the board to the PC via a USB cable whose DM, DP, and GND are connected to PA11 (DM), PA12(DP), and GND of chip respectively. The board is not detected on PC and doesn't show up on the device manager irrespective of BOOT0 status. As per my understanding, the USB needs HSE to function correctly as per AN2606.

I checked the waveform with an oscilloscope on both the terminals of the crystal and all I get is DC 1.8~1.75V on both pins (which means the oscillator isn't working). I also checked the waveform on the oscillator on the discovery kit from STM where I can clearly see an 8MHz 1.8V Vpp waveform. I am using the same oscillator as on the STM discovery kit and the resistor values are also the same.
Crystal Oscillator Troubleshooting Guide https://www.nxp.com/docs/en/application-note/AN3208.pdf
USB DFU Protocol (Pg 6) https://www.st.com/resource/en/application_note/cd00264379-usb-dfu-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf
STM32 microcontroller system memory boot mode (Pg 110) https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf
I need your help to get the external crystal working as I believe it is the reason why my board isn't detecting on a PC.
Thank you.
Edit 1: Adding oscillator schematic for reference. Component Y1 is the crystal oscillator.


texts: Does anyone know how to add a timer on Qucs ? The component's navigation bar doesn't help at all, It confuses me, I can't find a timer. I wondering, perhaps It could be added through library. In this case, I need to add LM555C timer on my circuit.


texts:
I don't get any signal on the load, what am I missing? Shouldn't it amplify the input signal?

I have 50mA from the current mirror, the Vbe on Q10 and Q11 is around 0.75v


texts:
I am trying to make a boost converter that step up 5V to 400V. I am doing it for a geiger counter. I know that it's complicated, but it should be possible. Anyway, here is my schematic:
My problem is that I can't get the assumed output voltage. I tried to calculate the output voltage and everything sits perfectly. Here is my calculation:
But with these conditions I can only achieve about 30-50V.

I tried to decrease the switching frequency to 20kHz or vary the duty cycle, but it seems to not make a huge difference.
I read somewere that the inductor might need a bigger load, so I added a 400k resistor in parallel with the output, but still the same. The last I tried to change the inductor to 10mH and it worked!! Kind of... I got 100V. Which is better, but still not what I expected.
I know that the calculations may not be 100% accurate, but I would expect to get at least close to 400V. Probbably the best solution might be to use a different boost topology with some transformer, but I think it should be possible to achieve 400V with standard Boost converter. At least I want to find out what's wrong.  Is it caused by too small inductor or too low frequency? Do you have any ideas?
Thank you for help!


texts: SMD board: Routing feedback trace for SOIC OP amp

texts:
This is a follow-up question of PCB layout for SOIC packaged op amp which goes back to an article by John Ardizzoni from AD (can't put the link in here as I'm new to this forum and limited in links).
I started this as a new question as meta stack exchange seems to be OK with it. Please redirect it otherwise.

His application note compares, amongst others, two SOIC layouts. Copied from the note:

and the author of the quoted question adds a third option where the "feedback trace" is routed on top of the board (ie. like (a)) but with the traces under the OPA. This idea was stimulated by John's advice "keeping trace lengths short is paramount".

The accepted answer states that "the capacitance on the -ve input pin is a key factor in feedback stability" but without a specific requirement, "it would not be possible to declare a winner".

As a hobby electronics aficionado, I'd like to make a board for analogue signals up to 100 MHz and I figured that the answer, despite being detailed, still left me a bit unsure. So I took these three designs:

and calculated the parasitic capacitance and inductance according to the formulas given in John's note, as I know the trace length, width and height, and PCB specs. I'm aware that the 0805 package of the components might be a bit too bulky for the application and that the width of the trace can be turned down a bit as well, but as a comparison it might do. So I calculated

0.24 pF and 1.34 nH for the "around" layout (top)
0.19 pF and 2.88 nH for the "under" layout including two vias (middle)
0.17 pF and 0.89 nH for the layout proposed in the mentioned question (bottom design with slightly different topology)

From this it appears that routing the feedback trace on the same layer but sending them under the OPA is the optimum. Sure enough, this is also just an approximation and doesn't account for angled traces and the negative input pin capacitance, etc.. The latter might like the via design, as it naturally opens the ground plane and the negative pin.

Similar to the person who asked the question in the first place, and having some estimates for parasitic effects, I don't quite understand why routing the traces under but on the same layer of the OPA isn't considered as beneficial for applications in the ~100 MHz regime.

Update

New layout for supply bypass as a reaction to the answer of @peufeu


texts:
I am designing a four layer board with a grounded copper pour on the top layer.

I had my board reviewed by a 3rd party and one of their comments was that the via on the South side of C41 was unnecessary since it is already connected to the top ground pour. I have read on here that it is important to place "stitching" vias across the board to provide solid connections between the top copper pour and the ground pour. I placed the via by C41 to provide a short path to the inner ground plane. But the more that I think about this, it doesn't seem necessary.

For a general purpose circuit board (no high frequency signals, no sensitive analog components), what is best/acceptable practice for placing stitching vias? Are they even necessary? I would appreciate answers that are backed up by theory so I no longer have to "guess" on what is best.


texts: Does the STOP condition have any meaning on a single master I2C system?

texts:
I'm currently working on rewriting some of the code on my I2C driver, and I'm trying to figure out the exact purpose of the STOP condition.

I believe that on a multi-master system, once a START condition has happened, the other masters can't/shouldn't drive the bus until a STOP has happened.

But what about on a single master system?
Does the STOP condition have any function? What exactly does it do?
Because the I2C bus works DC-x Hz, couldn't you just keep doing start
conditions and re-start conditions any time you need to send data?
What does doing the STOP at the end give you?


texts: Using the TP4056 to charge a LiPo battery and supply power to my circuit

texts:
My goal is to power a 5V circuit using a rechargeable battery with an optional USB power source. I have a TP4056 battery charger (with battery protection circuit) to charge my 3.7V 900mAh LiPo battery such as this one here:

The default value of the current RPROG resistor on the TP4056 board is 1.2K. Do I have to change the resistor for my 3.7V 900mAh battery or is this fine?
The circuit I'm going to power, however requires 5V supply. So I'm using a DC-DC step up converter (B6286, similar to MT3608), like the one shown below, to step up the 3.7V from LiPo to 5V output. The question here is, will this 5V output be regulated?
Or do I need an additional 7805 regulator for this? For using the 7805, I understand that the input voltage for the 7805 IC now has to be stepped up from 3.7V to at least 7v. My load just consists of a XBee Module which draws around 40mA and a Joystick Module which works at 5V.
The DC-DC step up board also comes with a USB port, so I have the option of using both USB power source as well as battery as the source. So, is the a good method to supply power or is there an alternate better method? The goal is to keep the components and battery as small as possible.


texts: Is there such thing as an EMG sensor which doesn't use electrodes?

texts:
In a traditional EMG the user is required to clean the target area with alcohol, then apply some gel, and finally stick on an electrode.

I'm looking for some sensor that can read the same muscle tension/activation data without that extensive setup. Something that would work just by being vaguely/imperfectly in contact with the skin, and could be embedded inside a haptic VR suit.

I need to read the muscle activations of over 40 muscles simultaneously, and at 2-3 electrodes required per muscle it would be highly infeasible to ask the player to apply 100+ electrodes to their body every time they want to play a game.


texts:
Background:
I'm designing a general purpose robotics controller. The controller is split into two boards, a power board, and a computation / data handling board. The controller is intended to be flexible, so it is to take two battery inputs. Either battery could be between a 2S and a 6S lipo. The controller provides several toggle-able outputs, 1x 60 amp, 4x 30 amp, and 4x 5 amp with the user able to select which battery will provide current to the output.
There are three possible configurations I'd like to implement for battery power to each output: Battery 1 only, Battery 2 only, or Battery 1 & 2 in parallel (some sort of current matching would be needed here). I'd like to do this because the controller is intended to be flexible, so it could have one backup 2S battery for 5V systems, and a main 4S or 6S battery, or dual 4S batteries, or a 4S battery and a 6S battery etc.
Questions:
I've developed an idea for how I want to do this, shown in the simplified diagram below.

simulate this circuit – Schematic created using CircuitLab
Power distribution is set up using a battery bus with high current MOSFETs selecting which battery powers a given output. This scheme is repeated for each output using either a dual N-Channel mosfet array, or a half H bridge to keep the FETs at similar temperatures for parallel mode.
Is there anything inherently wrong with this idea? Are there specific safety circuits I should implement for either the batteries, the outputs, or the MOSFETs?
edit: The batteries in the schematic should not say 9V


texts: Is there a way to use PWM to control AC mains powered heater?

texts: Is there a way to use PWM to control the power and temperature of mains powered heater? I know that I could use triac but I am just wondering. I know what PWM is and what is it used for, but image if you only have a microcontroller PWM output like for example from Arduino, then how would you use it?


texts: Difference Between Waveforms When Using An X10 Attenuator

texts:
I noticed a thing that I cannot explain on my GDS-1052-U scope: while the probe and the oscilloscope are set on 1x the noise from the LM317 power supply is about 5-6mV pp and while the probe and the oscilloscope are set on 10x, the noise from the same power supply (a LM317 power supply with PNP pass transistor) is about 50-60mVpp (see the images below, in the first image the probe and scope are set on 1x and in the second image the probe and the scope are set on 10x). Is that normal ?
I tried to use another probe but it does not change the amplitude of the noise.

1x probe: https://imgur.com/tV0kUqD

10x probe: https://imgur.com/nyeucoi


texts: How long can you power a solenoid? Is heat an acceptable way to check?

texts:
I am wondering how long you would expect a standard electromagnetic solenoid like this to be able to be switched on? Any first hand experience would be appreciated.

If there is no data on this - is it safe to turn it on and wait until it heats up? And then use just under that time for the future? In other words - if it doesn't get noticeably hot, does that mean it is fine to run it that long?


texts: common mode choke and derating vs current

texts:
I have a CMC that has is rated at about 1kR at 100Mhz at 3A

However my circuit uses only 1A. Do I need to derate my inductance since there is less current flowing through it ?


texts: A question about serial communication and received buffer

texts:
Using my own program in PC side, I am polling data from a device in half duplex way(like in old walkie-talkie style) through USB port. This is serial communication (Baud rate is 9600 bits/s, 8 data bits, 1 stop bit, no parity). So one cannot simultaneously send and receive messages. The PC side is master, the device side is slave. When the device(using and embedded system) receives certain byte array, it processes it in a few ms of time and then sends back a byte array in response to PC(my program then processes it).
The manufacturer told me to add delay between sending and receiving such telegrams. And the protocol is fixed at 9600 baud rate meaning that one byte takes around 1ms to send or receive. So if I send 10 bytes as command and receive between 10 and 50 bytes I would need to introduce minimum 60ms of delay. But to be on the safe side I want to use 300ms delay or even more.
My question is, how long the received data can wait at the received buffer. I mean is there an upper limit for the delay time I can use in my case? And is that something to do with timeout?


texts: (Bad) counting digital pulses with Arduino using interrupts and a 4 pin switch

texts:
I have to write an Arduino sketch to accomplish some tasks with the number of digital pulses detected by a pin. For this purpose I chose to use interrupts in order not to miss any pulse and perform the rest of the algorithm virtually at the same time.

In order to make a quick test, I put on this circuit:

and I loaded this sketch (based on the example in the attachInterrupt documentation):

volatile unsigned int pulses=0;

void setup() {
  attachInterrupt(0, countpulses, FALLING); // interrupt 0 = pin 2
  Serial.begin(9600);
}

void loop() {
  Serial.println(pulses);
  delay(500);
}

void countpulses() {
  pulses++;
}

What I expected here is that whenever I press and release the switch (and the red led turns on and off), it should read one pulse. The weird thing is that it counts two pulses instead, that is, it counts a pulse for each state change instead of just for the "falling" one.

Is this a matter of code or it's due to the switch? Will I have the same issue handling direct digital signals on pin 2?


texts: Reading voltages from ngspice to another program

texts:
I am using ngspice for a project and need to do the following:
Read a node voltage from the simulation into another program, process it and change another node voltage in the circuit.
For example :
*netlist

v1 a  0 10V

R1 b  a 10

R2 0  b 10

.control

stop when time = 0.01000ms

stop when time = 0.02000ms

tran 0.001ms 0.1ms

alter @v1 = 0V
resume

alter @v1 = 5V
resume

plot v(a)

.endc

In the above netlist, whenever I stop the simulation, I want to be able to read the voltage at node b into another program, do some processing on it (possibly in another program/SW) and change the voltage of node 'a' (v1) depending on the result (of the other program). Any hints about how this can be achieved?
Thanks in advance.


texts: Can we short the neutral to earth (ground) at entry point of our home electrical supply?

texts:
Normally in our 230V power outlet, the voltages are as given below.

Neutral to Earth - Less than 2V
Neutral to Phase - 200V to 230V
Earth to Phase - 200V to 230V

But nowadays, after around 10 am, until the evening, these voltages change as below with some variations as the day progresses.

Neutral to Earth - 77V
Neutral to Phase - 228V
Earth to Phase - 282V

After the inspection by the power distributor in our neighboring firm, it was found that there is a short between the phase line to the body of an electrical panel when the power switch of a fan is turned on.  But they have not rectified the problem yet.  So our electrician shorted the neutral to earth (ground) at our power entry point.  Now the neutral to earth voltage is close to zero.

But is this a good solution?


texts:
I have a sensor that needs in order to function 30 seconds 2V, 30 seconds 5V (on both max 300mA). I have done the power supplies, I can do the programming for the delay but I'm not sure exactly how to switch between them using some types of transistors. Can anyone help?

What I need is a kind of switch that on digital LOW goes on the 2V supply, and on HIGH goes to the 5V supply. What transistors should I use so they can be controlled from a digital PIN from Arduino and handle the max. 300mA current the sensor needs?

Thank you!

Edit: Please see the image for my idea (I'm a totally noob in electronics). Both supplies are done with MAX603/4 so they have an OFF switch. T1/T2 are 2N2222 and I was thinking that I can disable one supply then enable the other one and so on. Will this work? If yes by just disabling/enabling the supplies .. maybe Pin1/Pin2 are useless. What do you think?


texts: Why not include a thermal fuse in electrical outlets?

texts:
I have found myself reading reports of fires lately, including some that started due to high-resistance connections in electrical outlets and switches. A load on a high-resistance connection can generate enough local heat to ignite building materials, while not tripping any upstream safety devices. This is a problem that may not manifest until years after the original installation.

(Having not thought of this before, obviously I am now scared out of my mind...)

Why not integrate a thermal fuse into the outlets? It seems like a cheap way to prevent some fires. Is there some technical flaw in the concept? Or is this just an actuarial cost-benefit computation?


texts: If we can increase the directivity of the single element antenna by increasing its electrical size then why do we need array antennas?


texts: How to physically stimulate a touch screen with an external device

texts:
I need to develop a small autonomous device that could stimulate a touch screen. For the record I need such a device to be able to run some automatic tests on some specific smartphone apps, where touch related functionalities cannot be tested by injecting touch events from USB.

Here is my first design idea: a first prototype would consist of a grid of copper pad on a PCB, like on the following picture.

Each copper pad could be connected with a transistor to a metallic mass that would simulate the fingertip capacitance. Obviously each transistor would be commanded by the MCU comprised in the device.

simulate this circuit – Schematic created using CircuitLab

However I don't have any idea if this design would work. What I can't figure out is how I should connect my battery to the metal part and/or the copper pad, and how big should my metal body be to yield enough capacitance to the device to be detected by the touch screen.

Thank you for any insight you stackexhangers could provide!


texts:
U
When I use the PMW output with a speaker  like this, all is good:
http://www.instructables.com/id/WT588D-Standalone-Arduino-sound-player/?ALLSTEPS

I want to test DAC output so I did it like this but the sound seems to be too high for my amp (2 basics amplified speakers), I ear only lots off distortion, did I miss something?


texts:
Assume that the \$C-V\$ curve of a Silicon diode is the following

The equivlant \$\dfrac{1}{C^2}=f(V)\$ is shown next

The slope will give me \$slope=\dfrac{2}{\epsilon q N_d}\Rightarrow N_d=2.50\times 10^{10}\$ while the interception will give me the built-in pottential \$\Phi_i:\Phi_i=-\dfrac{\text{intercept}}{\text{slope}}\Rightarrow \Phi_i=0.8V\$.

Are those values reasonable? I am asking because I don't know anything about the diode(\$N_a, N_d\$)...

The fact that in higher voltages, the capacitance is constant means that the depletion region has reached its maximum length-correct me if I am wrong.

How can I find this length from the aforementioned diagram? In Sze's, Physics of Semiconductor Devices, p.\$85\$, relation \$24\$ it is stated that

\$C_D=\dfrac{\epsilon_S}{W_D}\$

but \$C_D\$ is the capacitance per unit area, \$W_D\$ the depletion region's length and \$\epsilon_s=\epsilon_0 \epsilon_r^{(Si)}\$

If I use this, \$W_D\approx 2.35m\$. This is way too much... To be honest i would expected it to be near the diode's thickness, which is \$325\mu m\$.

How to calculate the depletion region's length from the \$C-V\$ curve?


texts:
I would appreciate some help. I am trying to fix a board for a friend and the problem is that a component has been knocked off the board. You will see the missing E2 component in the image below. E6 looks like the same component.

My initial thought is that it's a capacitor but I don't understand why it would be referred to as "E" when you can see "C1" in the image towards the bottom of the image.

I can always remove E6 but I need to understand the type of component in order to measure its value.

Cheers,
Crom


texts: Which lead of a voltmeter is subtracted from which to get the potential difference?

texts:
I'm working on a problem (on paper, not in a lab) in which I'm using the Hall Effect to determine the sign of the charge carriers in a current.  In order to get this right, I need to know which end of the wire is at a higher voltage.

Say I have a voltmeter with a red wire plugged into the + terminal and a black wire plugged into the - terminal of the voltmeter.

I touch the red wire to point A in a circuit, and I touch the black wire to point B.

\$\Delta V\$ gets displayed on the voltmeter display.

Is the voltmeter reporting \$V_A - V_B\$ or is it reporting \$V_B - V_A\$?

Let's say the voltmeter is functioning properly and that it behaves in the "standard" way, if there is a standard way, and further let's assume I don't have a physical voltmeter to test this out.

EDIT: Since there was interest in the original textbook question, here it is.  Given the image below, what sign are the charge carriers?


texts: Why does SAM3x8e work only with Atmel-Ice programmer connected?

texts:
I have DIY sam3x8e pcb board based on schematics of Arduino Due. I can program it with Atmel-Ice (jtag connector) in Atmel Studio with basic serial transfer example and it works fine when the Atmel-ice is plugged in to the board. But when I unplugged it, the MCU doesn`t work. What are possible reasons for that?

I tested all the voltages across Sam3x8e power pins and they are all correct.


texts:
I want to make a low thrust linear actuator with a cheap continuous rc servo motor and then control it with a microcontroller. The thing is, I want to find out what the minimum degrees is that a motor can move but it seems to be something that is not documented. I can see the pulse range that you can control the motor with but I also have no idea how a pulse length relates to a given output. Is there some place that I can find some documentation?

PS I am sort of wanting the FS5106R motor at the moment.


texts:
Most inductance formulas seem to assume that the COIL cross sectional area is the same as the CORE cross sectional area.  Many times, the coil is wound on a bobbin which slides over the core.  In this case the core area is slightly less than the coil.

How is the difference in inductance related to the core to coil area ratio?


texts: Cockcroft-Walton voltage multiplier can be built with electrolytic capacitor or not

texts: i know that capacitor is usually work with ac supply as in dc acts as a open circuit after charging , so can electrolyte capacitor be used in Cockcroft-Walton voltage multiplier , or it will explode due to sine wave source supply ?


texts: Is a Karnaugh map always a good way to simplify a Boolean expression?

texts:
I want to simply the following expression:

(NOT A AND NOT B AND NOT C) OR (NOT A AND B) OR (A AND B AND NOT C) OR (A AND C)

I created a truth table first, then a K map from the truth table.  (See below.)

As far as I can tell, the simplest expression I can derive purely from the K-map is:

(A AND NOT C) OR B OR (A AND C)

But I can reduce this further with Boolean algebra to:

A OR B

Is it fair to say that a K-map will not always give the best possible solution?


texts: 24vac to 24vdc with bridge rectifier BUT

texts:
I am needing to power a 24vdc gate motor, it is rated for 24vdc 1A on battery power and 24vdc 4.5A on mains power, i have a laptop charger(AC Adapter) that does 220vac to 24vac and 4.5A but i need the output in VDC. The motor is rated for 3000lbs load and will only be moving a 120lbs load as it is re-purposed for a mixer.

my answer as far as i have searched is a bridge rectifier circuit, i want to use 4x 1N4007F diodes, but i need to know what the voltage drop will be across the circuit so that i can add the right capacitor the maintain the voltage generally in the 24vdc range... I understand it is not ideal but i do need a workable solution for the time being.

South africa does not have surplus electronic supply stores and importing is not an option at the moment.

in short i need to convert 24VAC to 24 VDC with max A of 4.5


texts: Shared parameter for several modules (Verilog)

texts:
I want to define a parameter in Verilog in such a way that several modules will be able to use it.

Each module is implemented in different file.

Can it be done or should I (re)define this parameter in each module ?


texts: Instrumentation amplifier not rejecting common mode signals

texts:
I'm trying to implement an instrumentation amplifier to measure pressure from an MPX2050 transducer. After deriving resistor values to give me a suitable gain and adding an adjustable reference voltage I moved on to simulation and everything was looking good.

After building the circuit on the breadboard, it was amplifying differential signals as expected. However, I found the circuit was not rejecting common mode signals. I've tried rebuilding the circuit, testing the breadboard for shorts, replacing the op amps and at this stage I'm out of ideas. Do you guys have any ideas on what might be the cause or how to fix it?

Schematic:

Breadboard:

Op amps: OP27G

Pressure transducer: MPX2050

EDIT:  Thanks for the help guys.  I've reuploaded the breadboard layout with labels.  I completely agree with you guys saying I should use an off the shelf instrumentation amp, however, it's a college project and we're limited to using this configuration.

I can understand tolerance issues being a cause of reduced CMRR, but I'm getting pretty much zero common mode rejection.  Connecting the 68k resistor directly to ground doesn't affect the output.


texts:
When VRAM fails within a video device, there appear to be certain common patterns of visual artifacts. This got me thinking - when VRAM (and RAM in general) fails, what is it that's actually happening to cause these patterns?

Repeating block patterns:

Stripes:

Another common one seems to be a particular colour tint across a portion of the screen.

Conventional wisdom might suggest that memory devices would fail in terms of single cells, leading to isolated visual artifacts, but this does not seem to be the case. I'm interested in the common failure modes of memory used in VRAM, particularly in modern computing hardware. How does the construction of the memory device cause visual patterns such as these? What typical ways do these devices fail, leading to these "cascade" effects?


texts: How can I make this VHDL code synthesizable and more neat?

texts:
I am doing multiple comparisons on variable values in VHDL and it won't synthesize using Design Compiler.
I wrote it in VHDL-2008 and newer, but Design Compiler wont synthesize VHDL-2008 and newer.
It does not like the when statements.
How can I clean this comparison up so it can synthesize ?
process begin
    wait until rising_edge(clock);
    if state(7) = '1' then
      b(0) <= '1' when (a(0) = '1' and a(4) = '1' and a(6) = '1') or (not a(6) = '1' and not a(5) = '1') or (not a(6) = '1' and a(5) = '1' and not a(2) = '1') else '0';
      b(1) <= '1' when (not a(4) = '1' and a(6) = '1') or (not a(5) = '1' and not a(6) = '1') else '0';
      b(2) <= '1' when (not a(0) = '1' and a(4) = '1' and a(6) = '1') or (not a(1) = '1' and not a(4) = '1' and a(6) = '1') or (not a(2) = '1' and a(5) = '1' and not a(6) = '1') or (not a(3) = '1' and not a(5) = '1' and not a(6) = '1') else '0';
    end if;
end process;


texts:
I'm designing an audio mixer and currently i'm working on a cue section. The whole point is that i have 2 or more channels and want to mix them in summing mixer. You can turn off the channels you don't want to hear - simple switch -> ground the channel you don't want to hear or connect it to the summing resistor.

When i turn off the channel the summing resistor is floating. Floating input of an op amp is usually not a good idea. Putting relays that ground the floating inputs when unused sounds like a lot of hassle. Any other ideas? Or maybe i can just leave this way? But i'm afraid that floating inputs will pick up a lot of noise.


texts: In the power amplifier circuit shown if the input is an RF sine wave, with VDD=1.8V and Vgs = 1V, what will be the waveform at the drain of the MOSFET - sine or square wave? Is it possible to get a sine wave at the drain?


texts:
The Project

So I have a project idea. (groan)

I want to monitor multiple motion and/or ultrasonic sensors to build a simple proximity alert. I want to "deploy" sensors at key points along the perimeter of my home (outdoors). Later, I'd like to send z-wave notifications to my home controller and play a gentle alert tone for large signals but ... baby steps... For now I'll settle for a simple output (a lit LED will do) just to get things working.

The Problem

I'm aware of the components I'll need and have an idea for the sketch to drive it (either with one or as many sensors as an Uno 3 can support after shields) but I'm at a loss regarding distance. I have a choice between multiple Arduinos with their own sensors, each communicating back to home base OR one Arduino in the loft with multiple sensors and a hydra-like set of cables to each, as well as a SINGLE hardwired power draw. I like the latter approach as it's less wasteful in a number of ways and is certainly cheaper (especially considering radio shields).

The Actual Question

What I want is recommendations on how to approach (if it's even feasible) long-distance connection of the sensor components to the Arduino. Specifically:

Might some of the extra Cat-5 I have laying around be a good match for this?
If not, why (I'm trying to learn - a reference to good reading is all I ask)?
Is there an alternative I hadn't considered?
Am I trying to run before I can walk?
Mother will they tear your little boy apart?*

*Okay, so that's just a Pink Floyd reference. I'm just getting started with the Arduino as a new hobby (I'm a software engineer by trade, no EE background or experience). I'm currently facing the problem of "not knowing what I need to know to ask a good question." Please forgive any perceived laziness and feel free to school me. :-)

Update

Further research did turn up this thread where someone suggested this is feasible but the OP said one sensor wouldn't respond. A responder said one sensor's manufacturer suggested a low pass filter on the sensor side of the connection, as close as possible. Thoughts?

Also, it occurs to my network engineering background that if multiple cat-5 runs in different directions wastes at least 2 of 8 strands, maybe a 2-pair telephone data cable would also work just fine, assuming the tips are soldered to make them solid leading into the breadboard. Again, thoughts?


texts: Connect crystal to low jitter clock generator

texts:
I have this TSX-3225 25MHz crystal. It has two outputs (pin3 and pin1).
I want to connect it to the CDCM61001 low jitter clock generator. The CDCM61001 has one crystal input (XIN).

Should I connect one of the two outputs to XIN and tie the other one to ground?
the TSX-3225 has two unconnected pins (pin2 and pin4) does it matter if I tie them to ground or let float?

Link for the CDCM61001: https://www.ti.com/lit/ds/symlink/cdcm61001.pdf?ts=1603113603064&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FCDCM61001
Link for the TSX-3225 25MHz: https://support.epson.biz/td/api/doc_check.php?dl=brief_TSX-3225&lang=en


texts: What is the resistance of a typical PCB?

texts:
What is the typical resistance between two points on a "typical" PCB? Let's say the points are 1mm apart and let's assume a normal office environment.

I've noticed that resistors come in many values, but resistors larger than 10 megaohm are rare or hard to find.

I suppose that a circuit with a 10 gigaohm resistor would be kind of sensitive and probably not a good design (under "normal" circumstances).

Is it somehow understood that resistances more than 10 megaohm would be too affected by electrolytes in the form of grime, pollution and moisture? Or is there some other reason >10 megaohm resistor parts are so rarely used? Noise perhaps?

Edit: It seems my question is partly resting on a false premise. Apparently >10 megaohm resistors aren't that hard to source. I was looking at surface mount thin film resistors at Farnell (www.farnell.com), and those only go to 10 megaohm. But I see now that there are "thick film" resistors above 10 gigaohm.


texts: Does a 5A Car Fuse Blows in a 12 Miliseconds Peak of 6A, in a 220v Circuit?

texts:
Thinking here in using a 5A fuse in a certain circuit, but it may reach 6A sometimes for a mather of 10 or 12 miliseconds only.

That way, would this fuse blow or it would sustain and blow only in given time?


texts: How does firmware write protection work?

texts:
I recently had to look into firmware readout and write protection for the STM32. And I noticed the process of disabling write protection after it's been enabled, is not device-specific; there's nothing unique (like the 96-bit device ID) involved in the lock/unlock process, that prevents someone other than the owner from unlocking the device, except that the unlocking process triggers a Mass Erase of the flash memory. The unlock keys are there in flash programming manual for anyone to see.

So did I miss something in the docs? Or is this just how it is with some MCUs, where disabling write and read protection basically results in a Mass Erase, ensuring the owner's code is safe (typically the ultimate goal, I assume)? Are there MCUs that actually use passwords from SRAM, unique device IDs or pin logic levels, to protect the flash and is this usually a built-in feature or must be implemented by the programmer?


texts: Output frequency of bistable multivibrators

texts:
I was wondering if there was a way to determine why the output frequency is half the value of the input frequency based on the schematic. I am currently learning about multivibrators in the Navy and have never seen anything like this in high school physics.

This is what I understand so far about bistable multivibrators: When \$TR_1\$  turns on, the voltage on the collector drops to zero volts, which is the normal common emitter operation when reaching saturation. A negative voltage goes through the resistor to the base of \$TR_2\$. This negative voltage ensures that it does not conduct.We now see +Vcc on the collector of \$TR_2\$ and this is then applied to a resistor to the base of \$TR_1\$. When \$TR_1\$ is on, 0 volts is applied to the cathode of \$D1\$ and +Vcc on the cathode of \$D_2\$, so it is reversed biased.

I was wondering how would you find the period or frequency? And does anyone have a better explanation as to how bistable multivibrators work that includes all the components involved (i.e. diodes, resistors and common emitters).

(source: electronics-tutorials.ws)


texts: Maintaing Data Packet Wholeness Over RS-232 Serial Port?

texts:
This might seem a bit simple, but when I'm reading data sent from over RS-232 to be read by my computer, is it reasonable to expect that if the data was sent as a single packet, that the packet will stay whole when I go to read it?

For example, If I send a 32-byte packet of data over the serial port, and this arrives into the serial buffer on my computer, could I safely assume that the data arrives simultaneously? I feel as if, even if the data was sent as a packet, there is a chance that only half of the data might be in the buffer on my computer before I go to read it. Because packets have a certain data "width", I imagine it could create a sort of race condition where the rest of the packet has to arrive before I finish reading the buffer. Especially if the idea of "packet" is interpreted more loosely to mean multiple separate pieces of data that are sent shortly after each other (shortly being something along the lines of for-looping through the data to send and calling the serial write method on it sequentially), as opposed to a single 32-byte data struct which would contain the data.

Thanks in advance for any help you can provide.


texts: What is the use of resistors in series with BJTs in a push pull amplifier configuration?

texts:
If you make an internet search for "Push pull BJT amplifier" you will find many different variants of the following schematics:

simulate this circuit – Schematic created using CircuitLab

These three configurations are the ones I am interesting in understanding better. First, I see that this circuit is often labelled as amplifier but since the gain appears to be in the best case equal to 1 it looks to me more like a current amplifier perhaps rather than a voltage one.

Suppose that V_signal is a sinusoidal 1 Vpp (maybe even lower 100 mVpp) signal at a given frequency. My main question is as follows:

Referring to configuration A, while I understand the role of the diodes and R1 and R2 in the biasing of the BJTs to avoid crossover distorsion, I do not understand what is the role of R3 and R4 which are in series to the BJTs. My first thought is that they should limit the current through the load but in the simulations the circuit works fine even without them so I am a bit confused on their use and how to size them.

As a sidequestion, what are the advantages/disadvantages of configurations B and/or C over A? I can see how C is more advantageos in that it does not need a double side power supply and can work straight from 12 V but I cannot understand why I should use B which is using an additional capacitor apparently for the same result as A and C.

Edit: I noted the circuit is not easy to visualize, so I've just added 3 screenshots (Vcc=12V, Vee=-12V)


texts: ADC first transition at 1/2 LSB - is that not a non-linearity?

texts:
[From Analog Devices Data Converter Handbook]

I understand why they chose to place the first transition at the 1/2 LSB point but does that not cause non-linearity?, since you basically have reduced the probability that a 000 code could occur?


texts:
I have a piezoelectric sensor that I would like to use as a force sensor. Some rudimentary testing with it tells me that it is outputting voltages in the range of 0-120V VPP, possibly more (I haven't tested it all the way but the manufacturer tells me that it will output up to 150VRMS). A big issue here is a lack of information provided by the manufacturer (They don't really want to tell me more about the sensor)

I would like to use the readings from this force sensor as input to an ADC that is capable of handling 0-5V.

Some reading that I did seems to indicate that the following are possibilities that I can do:

Voltage divider with op-amp buffer
Voltage divider with op-amp buffer and a diode to clamp negative voltages

My question with regards to these two are: What type of opamp am I looking for for either one? These signals are very fast and seem to disperse very quickly. My issue with the diode to clamp negative voltages is that I don't see why this is necessary -- wouldn't you just treat one side of the piezo as COM and then the op amp would only see the peak to peak voltage?

My apologies if this sounds a bit rambling, I am rather new to electronics and do not quite understand how this works.

In addition, I would like to ask what op-amp would be good for this purpose?

Thank you


texts: Why can't this LM324 op amp reproduce a signal above a certain frequency?

texts:
There seems to be no shortage of circuits like this that attempt to use an R2R as a DAC and an op. amp. as an output buffer. These make sense to me so I decided to try and construct one.

I constructed a slightly simpler circuit

simulate this circuit – Schematic created using CircuitLab

This circuit uses a single op amp from an LM324 operating at unity gain. The other 3 in the package are left unconnected. It is driven from +12 VDC on the positive rail which comes from a bench power supply.

The "4.4k" (2R) resistors are really just two 2.2k resistors in series.

D1-D4 are running on an atmega328p using a wavetable direct digital synthesizer I wrote. I'm not going to talk about that much, but the microcontroller runs from +5 VDC so each line is either 0 or 5 VDC.

R13, Q1, and R14 were just so the circuit was driving some sort of real world load. The transistor is acting as an inverting amplifier.

I originally omitted R10 and R12. I got output like this.

CH1 - yellow - output of DAC
CH2 - blue - output of op. amp.

At this frequency it was pretty reasonable.

CH1 - yellow - output of DAC
CH2 - blue - output of op. amp.

This rather unexpectedly produces a phase shifted triangular wave.

At this point I added R10 and R12.

CH1 - yellow - non inverting input of op. amp.
CH2 - blue - output of op. amp.

This cut the output voltage in half, but resulted in a more accurate output. That difference can theoretically be made up using gain in the op. amp.

However it still doesn't work at higher frequencies.

CH1 - yellow - non inverting input of op. amp.
CH2 - blue - output of op. amp.

In this case not only does it produce a phase triangular wave, it actually doesn't ever make it to +2.5 VDC or back to ground.

Here is a physical shot of the setup:

Since I am using jumper wires and breadboards there should be some upper limit to the practical frequency my DAC can produce. However the ~60 KHz my scope indicates shouldn't be much of an issue. The data sheet for the LM324 seems to suggest that 1 MHz is the practical upper limit for the op. amp. at unity gain. The output waveform shown seems like the transistors inside the op. amp. are saturated or a similar effect. I don't know enough about operational amplifiers.

Is there a change I can make to my circuit to get accurate reproduction of the input signal at the op amp output from DC to 60 kHz?

Datasheet I was looking at for the LM324:

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


texts: Raspberry PI LED calendar project. First steps with a circuit

texts:
I need help with the project in several ways:

Design circuit
Calculate resistors
Calculate power supply

I started it thinking that it would be something simple (turning LEDs off and on), but it seems that it is not so easy.
The idea is to assign an RGB LED to each day of the month. Each LED shows a different color depending on the day it is: if it has passed, if it is the current one or if the date has not yet arrived. Therefore, I have 31 LEDs, one for each day of the month. One of them will not be used for months with only 30 days. Each LED has 3 input pins R, G and B, therefore 93 pins in total.
The first problem encountered (solved) was that the Rpi does not have enough GPIO pins. I have purchased MCP23017 pin expanders that work with the i2c protocol. I have learned to handle them in a simple way with python. Each chip provides 14 outputs, so I would need 7. Since the MCP23017 has three pins to define its direction (HIGH or LOW on pins 15, 16 and 17), I can connect up to 8 of them, solving the problem.

Since there are many LEDs, I should supply them with an external source, so as not to demand too much from the RPi. In such a case, I would need to drive the LEDs by an electronic device. From what I've read, a PC817 optocoupler could do the function of turning each LED on and off. I would need three for each LED, to independently control the R, G and B of each.
The circuit of each LED could be represented like this. Note that I have to repeat this scheme 31 times, one for each RGB LED:

The questions I have (total beginner) are:

Is this representation correct?
How do I calculate the power of the LED power circuit?
How do I calculate the optocoupler resistors (logic
circuit)? The GPIOs of the Rasperryi PI 3 have a 3v output, but I
don't know the amperage.
How do I have to calculate the resistances of the LED (electrical
circuit)?

Thank you for the help.


texts:
I was experimenting with software (National Instruments Signal Express) where I used a 16 bit A/D converter, I connected the analogue input to ground at a range of -10V to +10V

I've calculated the theoretical rms quantization noise to be:

$$88.0μV$$

I have exported the data from the graph below to an excel sheet, where I have time values and voltage values...how do I go about obtaining the measured rms quantization noise?

EDIT:

I tried using the SNR formula and rearranging in terms of rms quantization, and managed to get a value close to it, would this be correct?

These are the readings:


texts: Efficient low power regulation? i.e. 9 -> 5 Volts

texts:
For the sake providing as much current as possible to a small circuit, regulated down from ~9V to 5V (or 5V->1.5V), I have looked at some possible options. What I was originally going to do (maybe a regulator for a solar cell, or 9v battery) is the I assume standard used LM7805 (5v) IC. I have read that it does use up a small, but fair bit of current to do this especially when only 50-100mA peak current is available.

Would a Zener diode rated at ~5 volts be able to do this more efficiently, as it should keep the voltage at or very close to 5V for quite some time higher, "regulating" it?

Would a (MOS|J)FET/other transistor (if more efficient, ignoring the slightly weird use) or something of that sense be able to lower the voltage with a very simple energy conversion?


texts: I'm a bit new to microcontrollers. Can you please tell me what is a port and pin in a microcontroller? What are their uses (pin and port)?


texts:
Hello I would like to know what can happen if I connect a whole apartment that has a 12 awg internal wiring, using a 16 awg external wiring.

What are the issues or dangers that I may encounter?  and what do you recommend?

I plan to use just lights and small appliances @ 300w max

Recommended fuse for awg 12,14,16?

Finally whats the max recommended ampacity for awg 16?

Thanks


texts:
A basic block diagram for FMCW radar I will be using, modified MIT radar project:
MIT block diagram
 I
My transmit frequency is 2200-2600 MHz, my receive frequency is ~2200-2600.
I want my IF frequency to be a constant 1 MHz (or 100 MHz; I haven't decided on bandwidth yet).
The only way I can think of doing it is is introducing another VCO2 and having it produce constant 1 MHz RF signal, so it will mix with first filter, giving me LO 2201-2601 MHz.
The LO is then mixed with receive frequency and I get a constant IF of 1 MHz.

Is there a better way to approach it? Introducing second VCO, second mixer and filter seems like too much.

EDIT: my specific question is about keeping IF constant, I put the whole block diagram just for illustration.


texts:
In ECG signal, to what DC level should i expect? Can it be 3V, at least from time to time?

Alternatively, what would be decent input voltage range for the instrumental amplifier for ECG stage?


texts: There is Stm32l052 with built-in EEPROM (2k). 4 ADC channels are used, data is collected by the trigger every 40 microseconds. Data from the ADC is processed in the interrupt (determined by the output of values beyond the boundaries). So, using the standard Hal libraries during recording in EEPROM points are lost (3 milliseconds standard write speed in EEPROM data), even if you write one byte from the ring buffer. Is there any way to get the controller to write to the EEPROM asynchronously without blocking the ADC interrupts?


texts: crystal stability gone wild on higher speed microcontroller

texts:
I made a board with AT89LP52 (higher-speed brother of AT89S52) and at the crystal connection I used a 22Mhz crystal with 5pF NPO ceramic caps grounded.

The circuit itself works along with the software on-chip, but I noticed something interesting.

This chip comes with some "fuse" setting that allows me to automatically apply an internal 5Mohm resistor from a crystal connection to ground.

I also noticed that when I touch pins 19 and 20 of the chip together (a crystal pin and ground), the software goes erratic, and I know this due to the results of the LEDs on board during the test.

So I'm curious. If I continue with the AT89LP52, Should I always enable or never enable the internal 5Mohm resistor? and Would my crystal value (of 22.1184Mhz) be too high for this particular chip?

I don't really notice this erratic behavior when I use a normal AT89S52.

Yes the crystal is connected as close to the crystal pins as possible


texts: Why does a headphone attenuator need separate resistance for each side instead of a shared resistor for both?

texts:
I have a Shure headphone attenuator and opening it up it looks like there are separate pins on the pot for the left and right speakers (the pot has 5 pins, which I believe are left in/out, right in/out, and ground), like this:

(I have no experience creating schematics and I'm not sure what I should be using to represent the input or how to represent the 5 pin pot, but I've tried to convey what I'm talking about)

simulate this circuit – Schematic created using CircuitLab

Why is the resistance applied separately to the left/right sides, instead of using a pot with 3 pins and applying between both speakers and the ground, like this?

simulate this circuit

My reason for wanting to understand this is that I want to modify a 4-pole TRRS headphone extender to create a fixed-resistance attenuator compatible with headphones with a remote/microphone and I'd like to understan the circuit on my existing attenuator.