texts:
I built a simple project with an Arduino board. I use the board to read analog input values from a rotation sensor (potentiometer), and use the values to determine which SSR relay on a module to turn on. I then connected the relays to LED's and the project works, but only in one way. For example, when I turn the potentiometer toward maximum, the relays sequentially close, like they are supposed to. Same thing when I reach maximum and dial the pot. back toward 0. I can fidget around in the middle and the Arduino will turn on the relay(s) according to the analog values read. This part works like it is supposed to.

The problem is, when I connect LED's to the relays, the LED's will turn on sequentially as the relays turn on, as I dial the pot. from 0 toward maximum. But the LED's will not turn off as I dial the pot. back down toward 0. The relays indicate that they are being turned off on the module (they each have a LED indicator), but the LED's I connected remain on no matter what.

The standard 5V output from the Arduino board is powering the relay module, LED's, and the sensor. Every ground is common with the Arduino GND.

So why are the LED's not turning off? It's probably very beginner stuff I don't know about. I read somewhere that when you use a MOSFET to turn something on and off, you should connect a pull-down resistor to GND, so that the "turn-off" will work. Otherwise, the light or motor or whatever will stay on. Does that sound like it applies here?

Here is my relay module: http://www.sainsmart.com/sainsmart-4-channel-5v-solid-state-relay-module-board-omron-ssr-avr-dsp-arduino.html

My rotation sensor (pot.): https://www.bananarobotics.com/shop/Analog-Rotation-Sensor-V1-Potentiometer?gclid=CjwKEAiAk8qkBRDOqYediILQ5BMSJAB40A5UiGMFbpiVo9rWMI-ooeUwOA2ZfTD-h5ctmCyOAwcUzBoCIo_w_wcB

And here is my Arduino code, if it will help:

//define the digital pins for controlling the relays on the module
//these pins are connected to the relay gate pins on the module
#define in1 13
#define in2 11
#define in3 10
#define in4 9

void setup(){     //make sure the pins are all output, as 5V will be drawn from them
 pinMode(in1, OUTPUT);
 pinMode(in2, OUTPUT);
 pinMode(in3, OUTPUT);
 pinMode(in4, OUTPUT);
}

void loop(){
 float rotationValue = analogRead(A0);        //read the raw sensor value
 float percentValue = rotationValue / 10.23;      //convert raw value to 0-100

 if(percentValue >= 0.00 && percentValue <= 1.00){        //all relays off
  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW);
  digitalWrite(in3, LOW);
  digitalWrite(in4, LOW);
 }

 else if(percentValue > 1.00 && percentValue <= 25.00){         //turn on relay 1
  digitalWrite(in1, HIGH);
  digitalWrite(in2, LOW);
  digitalWrite(in3, LOW);
  digitalWrite(in4, LOW);
 }

 else if(percentValue > 25.00 && percentValue <= 50.00){      //turn on relay 1, 2
  digitalWrite(in1, HIGH);
  digitalWrite(in2, HIGH);
  digitalWrite(in3, LOW);
  digitalWrite(in4, LOW);
 }
 else if(percentValue > 50.00 && percentValue <= 75.00){       //turn on relays 1,2,3
  digitalWrite(in1, HIGH);
  digitalWrite(in2, HIGH);
  digitalWrite(in3, HIGH);
  digitalWrite(in4, LOW);
 }
 else if(percentValue > 75.00){         //turn on all the relays
  digitalWrite(in1, HIGH);
  digitalWrite(in2, HIGH);
  digitalWrite(in3, HIGH);
  digitalWrite(in4, HIGH);
 }
}


texts: vTaskPrioritySet needs extra TaskHandle_t to function

texts:
Im using STM32F429I-DISC1 and Keil uVision v5

Ive written a simple example to demonstrate task priority setting using handles however the code only functions if I first delcare an unused TaskHandle_t (By functioning I mean the red LED blinks whilst the green LED stays static). When the unused TaskHandle_t is removed both LEDs blink (ie task priority is the same for both tasks)

/*

Simple blinky program converted to FreeRTOS
GnLed: PG13
RdLed: PG14

*/

#include "stm32f4xx_hal.h"              // Keil::Device:STM32Cube HAL:Common
#include "FreeRTOS.h"                   // ARM.FreeRTOS::RTOS:Core
#include "task.h"                       // ARM.FreeRTOS::RTOS:Core

#define gn_led GPIO_PIN_13
#define rd_led GPIO_PIN_14

void GPIO_Init(void);
void vGnLedControllerTask(void* pvParam);
void vRdLedControllerTask(void* pvParam);

TaskHandle_t test; //When this line is added code functions as expected
TaskHandle_t rd_Handle, gn_Handle;

int main()
{
    GPIO_Init();

    xTaskCreate(vGnLedControllerTask,
                            "Green Led Controller",
                            100,
                            NULL,
                            1,
                            &gn_Handle
                            );

    xTaskCreate(vRdLedControllerTask,
                            "Red Led Controller",
                            100,
                            NULL,
                            1,
                            &rd_Handle
                            );

    vTaskStartScheduler();
    while(1){};
}

void vGnLedControllerTask(void* pvParam)
{
    while(1)
    {
        HAL_GPIO_TogglePin(GPIOG, gn_led);
        for(int i=0; i<1000000; i++){}
        vTaskPrioritySet(rd_Handle, 2);
    }
}

void vRdLedControllerTask(void* pvParam)
{
    while(1)
    {
        HAL_GPIO_TogglePin(GPIOG, rd_led);
        for(int i=0; i<1000000; i++){}
    }
}

void GPIO_Init(void)
{
    GPIO_InitTypeDef GPIO_InitStruct;
    __HAL_RCC_GPIOG_CLK_ENABLE();
    HAL_GPIO_WritePin(GPIOG, GPIO_PIN_13|GPIO_PIN_14, GPIO_PIN_RESET);

    GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_14;
    GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
    GPIO_InitStruct.Pull = GPIO_NOPULL;
    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
    HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
}


texts: How to make an efficient small scale heater powered by a battery?

texts:
I'll dive right into it.

A project of mine involves a glider in a cold climate. Past the point of gliders not being efficient in cold climates in the first place, I want to keep the batteries in the glider warm, and decided that heating them up directly would be one way to tackle the issue.

I want to heat the batteries, 18650 Li Ion rated at 7.4V 2600 mAh, to 25 C (ideally) for around three hours. Is it possible to do this without drawing more than 500 mAh? I would prefer to build the "heater" and do the soldering myself but if there's a product that efficiently does this then I wouldnt be opposed to just outright buying that as well.

The actual question, or TL;DR:

1.) Is it possible to heat an aluminum surface, 3 in^2 to 25C for three hours while drawing less than 500 mAh?

2.) if so, what kind of resistors/any other items would I need?

I would of course have an insualted enclousure for the batteries to sit in with the aluminum surface. I just need the surface itself to reach 25C.

PS:

I saw this video as well: https://www.youtube.com/watch?v=xIg2R9327bg

It basically works by short circuiting the battery, and draws 1 A. Is there any way to lower the amp draw? What would I need to add to the circuit? Also, is it wiser to straight up use resistors or to use nicrome wire to heat it up? Weight is also an important factor...


texts: Should I use two 2:1 mux or one 4:2 mux?

texts:
I am designing a circuit and I am not sure which solution would be more preferred in the design. I'd like to justify why I'd use two 2:1 mux instead of a 4:1, but I don't seem to be able to. To be more specific, it looks like I'd have option 00 01 and 10 in the 4:1 mux. In the 2:1 muxes, ill have 0 and 1 and then the output will go to another mutex, also with option 0 and 1. Option 0 will be the output from the first mux and then if it is 1 I will have a different output.

Edit: People been asking for a diagram. PC is program counter.


texts: How to get the DC gain of an active high pass filter?

texts:
Edit: I think maybe I am confusing terms (it has been a few years since my last electronics class). I am trying to get the expression for the gain of this active filter amplifier circuit in terms of R1 and R2
So, I am looking at the following circuit from my textbook:

And I want to know how to calculate \$A_V\$, so I get the transfer function:
$$\frac{V_{out}}{V_{in}}= \frac{-R_2}{R_1 + \frac{1}{sC}}$$
Now for a DC frequency of 0 Hz to get the DC gain, the capacitor acts as an open circuit with infinite impedance, so then \$\frac{1}{sC}\$ tends to infinity, and I feel like that would mean that the DC gain is 0 just by looking at the transfer function! But, as the schematic suggests, it \$A_V= \frac{-R_2}{R_1}\$, implying that when the frequency is 0, then \$\frac{1}{sC}\$ tends to zero. What am I missing?
Thank you.


texts:
I am working on a Teensy 2.0 clone for general learning in circuit design.
The autorouter of CircuitMaker was able to route my board. Now I just have to clean up the aesthetics. I am trying to figure out what I should do with the labels of the components.

The board is small enough that there isn't much room to put the text next to the component.

I thought of removing the labels entirely, but I don't want to be looking up for the location when I populate the PCB.

I also thought of putting the label on the bottom, but I am not sure if that's useful at all for all my SMD components.


texts:
Let's consider an op-amp:

From basic courses of electronics, we know that the output voltage as a function of the differential input is given by the following picture:

Now, assuming that:

the op-amp is closed with negative feedback;
the output voltage has a finite value;
the open-loop gain is large enough (ideally infinite);

then

and Vin1 and Vin2 are almost equal (virtual short-circuit).

Question:  when I turn on a given circuit containing an op-amp with negative feedback, the op-amp in general will not work exactly and immediately in the linear region of its characteristic. Does the op-amp go into the linear region thanks to the slew rate due to some parasitic capacitors (which are always present)?

This idea has come to my mind after reading the following example taken from Razavi's book:

Thanks to the load capacitor CL indeed we have that the output voltage either increases or decreases and, as a consequence, the difference between the two inputs of the differential pair returns small, thus restoring linearity.


texts: Precision circuit that is CC and CV circuit or power supply

texts:
I want to design a CC/CV (constant current/constant voltage) circuit in which I can set the voltage limit or current limit with DAC's 0 to 5V range. I know how to design variable CC circuits and CV:

simulate this circuit – Schematic created using CircuitLab

Here is my problem, I need to design a fairly accurate programmable constant voltage and constant current circuit (the output needs to be 0.1% and within 100uV of the DAC input) the constant current portion also needs a similar accuracy and to be able to source 200mA at 0V to 7V.

I also have temperature req's and noise req so I'll be building this with low tempco opamps low noise op amps. I'm not so worried about that now. Right now I'm trying to find a good circuit topology, which in all the literature that I have this type of circuit is not covered. I don't want to use a DC to DC because of the ripple.

What is a circuit topology that I can use to build a precision CC/CV circuit?

(I could also use a precision LDO if needed) Bonus points if it can source and sink current, I can build the rails around the circuit.


texts:
All diodes are ideal and the answer V is +3V in problem (e).
So my question is why we can't let all diodes to be forward-biased. What happens when V is +1V?
Is it because the current flows to infinity in ideal diode? Or is there any reason?
And what happens to ideal diode when Voltage is larger than 0?


texts: PIC18F2550 Loop Counter Overwritten by sprintf

texts:
I have the following code compiled with Microchip's MPLab and XC8 compiler and running on a PIC18F2550 which is doing something rather odd:

char output[20];
int i = 0;

char currentStatus = readShiftReg();
for (i = 0; i < 8; i++) {
    if ((currentStatus & (1 << i)) == (1 << i))
        sprintf(output, "Sensor %d is currently on \r\n", i + 1);
    else
        sprintf(output, "Sensor %d is currently off \r\n", i + 1);
    putsUSART(output);
}

The for loop only ever iterates once and during that one iteration it correctly runs the second sprintf, but after it runs it, the value of i is something random (26154, 8294, ...).  I've tried swapping i out for another variable j assigning the value of i to j at the beginning of the loop, but the same thing still happens to i.

It seems like it's something with sprintf because when I use the debugger, the value of i isn't changed until after sprint runs.  One thing to note is that the value in output is correct (i.e. "Sensor 0 is currently off \r\n") which makes this even more perplexing.

This should be a very simple piece of code, but it's not working and I'm sure there's a simple explanation.  Where should I be looking?


texts: current sensing with DRV8832 motor driver

texts:
I have designed a circuit which uses a TI DRV8832 motor driver but I m stuck in point of current sensing on motor driver. actually it is clear at Datasheet; DRV8832 has 1.3A peak Current and Rsens(Sensing Resistor) is calculated with 200mv/Iset(mA units)and the Datasheet determines that Rsens is limited to 1ohm max. Problem begins at this point too because I m using a mini dc brushed motor which has max 70mA Current draw stucking the motor shaft and also I must be monitoring the Motor's stuck. I have found 2.8ohm value when calculating Rsesn = 200mv/Isesn(70mA here) with datasheet formula but as I said previously its value is limited to 1ohm therefore I cant find a reasonable value to the Rsens in order to sense the motor'stuck. dear you electronic gurus if you can give me advice about it, it would appreciated. Thanks in Advance!

also TI DRV8832 datasheet


texts:
I'm trying to see how this circuit works:

This is taken from http://www.instructables.com/id/TESLA-FREE-ENERGY-COLLECTOR/. I tried the circuit with 1n4148 diode and I can see a voltage on the capacitor, meaning that the circuit can collect energy. But I don't understand why I don't see the same behavior when I replace the diodes with 1n5819 schottky diodes. Presumably a schottky diode will have lower drop of voltage and so the capacitor gets charged more. But the capacitor does not hold any voltage in this case. Can someone explain why?
P.S. I really don't want to generate free energy, just want to understand how this circuit works.


texts: MOS Common-Source stage with source degeneration

texts:
I read about the common-source stage with source degeneration in Razavi's book. I understand that is the small-signal gain of the overall circuit becomes less dependent on gm (hence Vin) and thus the gain is a lot more linear.
My confusion is that I don't understand how from a large-signal perspective, the drain current becomes linearised and has a slope equal to 1/Rs as shown below:

Can anyone explain to me how 1/Rs comes about from the large-signal equations? Razavi only talks about the small-signal perspective.


texts: Inexpensive Frequency Counter and Display for clock generator

texts:
I have the desire to add a frequency display for a clock generator. Certainly not necessary, I can use my DNN, but it would be nice, I found a veritable plug & play frequency counter and LDC display for in excess of $50 USD at Digikey. I didn't have to pay a tenth of that for the clock generator.

I have 1 $20, el cheapo, backup DMM for when I need to measure more than one thing at a time. It has a frequency counter/display. Therefore I would think there must be a way to get this functionality at a reasonable price.

I'm sure I'm over-thinking this and a simple solution is avoiding me. Any ideas on how I can count the number of clock pulses per second and display the results, (7 segment LED would be preferred)?


texts:
I have to design a single ended biopotential amplifier circuit based on an already existing model for differential amplifier.
In other words, I have a circuit in which each channel has two inputs from the electrodes, but I need to change it in a way so that each channel has only one input.
I don’t think it’s ok to just ground the second input. I don’t no what to do instead.


texts: Enabling/disabling a pull-up with a microcontroller (and a level shifter)

texts:
(Split up from this question)

I'm trying to interface an Arduino with an eMMC chip to bit-bang it. eMMC uses bidirectional lines, and one of them (CMD) is first used in open-drain mode (for identifying devices on the bus) and then in push-pull mode.

The eMMC spec advises to use two pull-ups on the CMD line: a weak one for push-pull, just to prevent the bus floating, and a strong one for open-drain. The host should enable / disable the strong pull-up depending on the state machine. As I understand it I don't really need the strong one, it's just to speed up low-to-high transitions (and speed during that phase isn't that important). But if I wanted it, how would I drive it?

Here's a simplified version of my circuit (voltage regulators and lines other than CMD not shown), with a BJT where the Arduino should drive the pull-up:

But even after reading quite a bit about transistors, I'm not sure if it could work and how. I know I'm supposed to drive the BJT to saturation mode (or cut-off to disable), and that requires biasing the poles correctly (and/or let enough current flow to base?), but I'm not in the usual common-emitter configuration because I can't short to ground. Also I need to make sure the emitter voltage is above Vih (should be fine if Vce is only 0.3V).

How would I do that? Just connect a pin of the Arduino to the base, through the LSF with a pull-up? (What resistance then?) Would a FET be more appropriate here?


texts: Minimum tolerable signal to noise ratio in modern communication systems

texts: What is the minimum tolerable SNR in today's (digital) communication systems for successful recovery of the message? I've heard that regular commercial systems can recover the message with a SNR as small as -60 dB (using robust coding techniques). Is it correct? And if yes, how can you observe and distinguish even the presence of a signal when it's burden in a noise with 106X more power?


texts: Proper configuration of a PWM fan which should be stopped when the controller power is cut off

texts:
Recently I am working on a controller to drive a PWM fan (datasheet). I am using a atmega32u4 and it sends a 25khz PWM signal to the fan and it's working well. I want the fan to be off when I cut the power to the controller, so I added a pull down resistor like below:

So my questions are:

is the choice of the pull down resistor correct? It pulls down the PWM control to 0.52V (need to be less than 0.8V according to the data sheet) when the atmega32u4 is powered off. OTOH when the atmega32u4 is on, it pulls down the high signal from D3 from 5V to 4.8V
do i need to add a diode in front of D3? Will it be considered harmful if there's possibility a current flowing back from the PWM control wire to D3 when the atmega32u4 is off?

I am a newbie to electronic and I want to learn how to make my circuit correct and safe. Will be very grateful if my questions can be answered.


texts: E-bike batteries in parallel configuration

texts:
I built myself an e-bike from a kit bought on Amazon. It works great but I have a question regarding batteries for which I can't find an answer online.

I found a great deal on 4.4 Ah (36V) batteries usually for small electric scooters. Since 4.4 Ah is not enough (same with their max current of 16 A), I put 2 packs in parallel. I am aware that there are drawbacks, that my batteries won't last as many cycles as one 8.8 Ah pack but for the price I got them, I simply don't care.

I hooked them up after equalizing their voltages and charge them up in parallel. There is no problem with that. I eventually reach 41.8 V and batteries don't get hot at all while charging.

My question is about discharging. Whenever I reach my destination, one of the two batteries (always the same) is hot to the touch (not burning, simply hot) while the other one isn't. Why is that?


texts: Will capacitance decrease of MLCCs help me pass the test?

texts:
The product I currently design (a fork sensor) has a metal chassis which is not connected to earth ground. Examining the product of a competitor, I see there is a large SMD capacitor between it's chassis and ground. Thanks to some folks here, I was able to understand its purpose: to prevent RF noise from coupling to sensitive analog parts of the device. (Also includes capacitor photo)

However, these devices are subject to a dielectric test in certification, which applies 500VAC RMS voltage between chassis and exposed pins. I am having a real hard time finding an SMD capacitor with 500VAC rating.

My plan is to place an MLCC type capacitor with 1000V withstand voltage. 500VAC test signal will have about 700V peak voltage which my capacitor should be able to handle. However, this time the capacitance value is a problem. The sample I have has about 60nF of capacitance. Doing the math, about 4.7W is wasted on the capacitor. (I don't know how the sample does it, or if it conforms to standard, I couldn't find it in their website)

(Edit: I recently learned that capacitor power calculation is not done that way.)

Then I had an idea: MLCCs tend to have a capacitance drop in high DC voltages, which means lower currents will flow! This is the exact behavior I want: bypass low amplitude noise, and block high amplitude test signal.

How do MLCCs behave with low frequency/high voltage signals? Does this capacitance drop also show itself in 50 Hz?

I would also glad if you can suggest me any capacitor to use in this scenario. I found these AC Safety Capacitors as an alternative. However I don't know how long will these last with 500VAC. It is above their rating, however below their withstanding voltage.

If none of these work, I will just plug in a capacitor very low capacitance and pray it filters enough noise in the application.

Edit: as mentioned above, I learned that the power consumption isn't a real problem, which probably solves the issue. Still, I would like to know the answer to the question, for the sake of curiosity.


texts: Arudino Simulating Button Presses on Keyboard

texts:
I am currently working on a project that involves automating an old Automark Indenting Machine. I want to be able to use an arudino to read a csv and then simulate pressing the keys of the keyboard attached to the machine. The Keyboard is matrixed and I traced back all of the inputs and outputs that the machine's microcontroller uses.

I figured the best way to go about accomplishing this would be by placing an NPN transistor across the two leads that the mechanical buttons presses. The arduino would output to the base of the transistor and connect the circuit. However, I am very new to the field of electronics and completely overwhelmed with how much I don't know.

Here is a question I found that was somewhat similar to my project:
Interface 5v digital pulses to keyboard contacts?

I am fairly certain that the keyboard runs on 5V, however, I'm not sure about whether or not is it AD or DC. DC current readings range from .3mA to .8mA, while AC current measures around 1.36mA. I have included a couple picture of the keyboard. One picture shows how I soldered leads directly onto the board to see if I could use the arduino to sense the output sequence from the keyboards microcontroller and then output to the corresponding input for the keyboard but it resulted in the button staying pressed even after the pin was set to LOW.


texts:
I'm attempting to make my own ISP programmer for an Atmega168-20PU. For the sake of learning I want to have an LED flash as bits are being flashed to the chip. If I use an SMD LED 0603 size, in series with 220 ohm resistor in between the 5V and MOSI line will I risk corrupting data due to voltage drop across LED? What are some other concerns I should be aware of.

I want to make a similar use-case as this:
TX LED


texts: Encoding / Decoding solid '0' or '1' with IC (or discrete solution)

texts:
I ordered a rf 434MHz transmitter and receiver for a hobby project.
It only needs to transmit a solid '0' or a '1' (this won't change more than once every 5s, probably much longer), so I thought I could get away with just the pair.

However it looks like it has trouble sending DC signals (they initially send properly but are quickly lost, I guess a low pass filter).  I checked and it can send a ~8KHz square wave just fine (although varying duty cycle in the TX signal from 5%-95% still causes a nearly square-wave signal at the RX).

So I may need something like Manchester encoding, so that a solid '0' will still switch enough for the tx/rx pair.

It looked like the HT12E and HT12D would do exactly what I need.  But, I can't find them anywhere except on Amazon for ~$10 a pop, or some site in a language I don't understand.

Are there any cheap IC's that would help me accomplish this (encode a 0 and 1 into some format with enough transitions, like Manchester)?  Or a solution with discrete components that I am not thinking of?

Thanks


texts: Capacitive touch sensors, how do they work?

texts:
David mentions capacitive touch buttons in EEVblog #130 - The uCalc Credit Card Scientific Calculator / Computer and indeed I have read about capacitive touch buttons before like in the documentation of de kompasklok which unfortunately is only available in Dutch.

But how do they work and can I easily make my own with a little microcontroller programming (and a PCB)?


texts: How does such an USB step-up 5V-12V work?

texts:
I just bought a cheap USB 5V to 12V step up converter:

Surprisingly, it works very well. There is few place for electronic components (maybe in the USB connector?), how can we do a 5V to 12V conversion with such a small size / few components?


texts: Understanding how the simple precision rectifier works

texts:
I'm specifically talking about this:

If I try to graph \$V_{out}\$ , considering that I'm supplying \$V_oSin\left(\omega t\right)\$:
I would start by assuming that the diode is reversely biased, acting as an open circuit to conclude that \$V_{out}=0\$ so long as we're in the first half cycle, the assumption should be correct as the voltage on the diode is negative throughout the first half cycle.
Now once, \$V_{in}<0\$ (second half cycle) the diode becomes forward biased, I'm not sure how should I carry on from this point. i.e. how should I model the diode?


texts:
I'm interested in a module that I've seen today and is a cold water vaporizer. I turns water to steam without heating it.

Anyways this module needs kind of oscillating circuit to work properly and they didn't mention the specifics of that oscillator cause they are selling the full premade device with an expensive price, so does anyone know how to make that circuit?

Link to product: https://eshop.eca.ir/ماژول-و-سنسور-بخار-سرد/1636-پیزو-الکتریک-مخصوص-بخار-آب-سرد.html


texts: Does anyone else use the PIC18F97J60 Ethernet capability? If so what kind of RX/TX performance is typical for that chip? I was running the TCPPerformanceRX/TX applications provided as part of the Microchip TCP/IP stack and getting between 1500-2000 bytes/sec TX and 60-80 bytes/sec RX. Receive seems way slower than it should be.


texts: Heuristic explanation of the usage of a pull-up (or pull-down) resistor needed

texts:
First, I acknowledge that there are several questions regarding this topic in the forum, however, the answers assume too much background knowledge of electronics to be of use to a true beginner (like myself). That being said, if you choose to answer, please limit your responses to heuristic (non-technical) explanations.

My understanding of a pull-up resistor, is to ensure a consistent charge on a line, as opposed to a disconnected line, which could potentially fall victim to electrical fields and then produce noise. The noise could then be interpreted as an input signal and cause unexpected results from your device.

Question 1) Am I correct in my understanding of the purpose of pull-up and pull-down resistors?

Question 2) How does this work? Can someone provide a metaphor or analogy to describe what exactly is taking place with the electrical current?


texts:
I have setup an ADXL345 to trigger tap interrupts, but believe I should not be seeing events for light taps with the config I have.
the TAP config is as follows,

"THRESH_TAP"  (0x1D) set as 0xFF, this is 16g threshold
"DUR"         (0x21) set as 0x80, ~80ms window
set at full resolution
interrupts are on

I see triggers for Taps when I tap the PCB, the thing is, I do not believe that my taps are anywhere near 16g, possibly 5g as I have captured that when streaming the output and hitting the PCB with some force.
I played with the value for THRESH_TAP, and when it is very low it triggers very easily with light taps and gets hard to trigger as I raise the THRESH_TAP value, but once I get passed the 5g mark, I was under the impression that it should not trigger without a fair amount of force.
so my question, does this sound correct? should I be able to trigger 16g events with just the tapping of the PCB with my finger?(I might be missing something physics wise about this).


texts: Periodic Steady State voltage Buck Converter

texts:
What does Periodic Steady state mean with regard to a Buck Converter ? Does it mean the normal operation  ?

Also, From what I read, the net change in the capacitor voltage in the buck converter is 0. Why is it so ? Is it because it becomes constant ?


texts: How to calculate battery capacity required for home applications?

texts:
The issue I'm facing is calculating current draw from different household items. Like, if a fan is rated at 75 Watts, its current draw would be A = W/V so A = 75/220 and A = .34 amperes.

That doesn't sound right to me, because I have two 150 A-h batteries connected in series to an inverter/charger. Assuming that I use up only 60% of the batteries' capacity to prolong their life, I have 180 A-h of battery capacity. And also if the inverter is only 80% efficient, I have 144 A-h of usable battery capacity.  If the fan does indeed draw .34 amperes of current, that would mean that this battery setup should run the fan for around 424 hours.

I know I'm doing something wrong, I just don't know what it is. Could you guys help me out here? What's the backup time for a 75 watt load drawing power from an inverter connected to two 150 A-h batteries in series?


texts: Colpitts oscillator : having trouble while respecting Barkhausen criterion, is this criterion insufficient there?

texts:
I'm trying to simulate a Colpitts oscillator.

I've determined transfer function of the low-pass filter of this circuit:

I reached this expression: \$H(j\omega)=\frac{1}{1-LC_2\omega^2+jR_3\omega(C_2+C_1-LC_1C_2\omega^2)}\$

I've plotted the Bode diagram with Python of the pi low-pass filter:

With:

\$C_1=C_2=470pF\$

\$L=100µH\$

\$R_3=220\$

Phase plot:

Gain plot:

The red dot indicates the frequency (\$f_0\$) which shifts the input signal phase by 180deg:

\$f_0=\frac{1}{2\pi}\sqrt{\frac{C_1+C_2}{LC_1C_2}}\$

\$f_0\$ is supposed to be the oscillation frequency, because it makes with the inverting amplifier a \$2\pi\$ total phase shift including the filter.

I get with the values given:

\$|H(j\omega_0)|=1\$

\$arg(j\omega_0)=-\pi\$

I choose to use \$R2=R1=1k\Omega\$

Then the Op amp transfer function is (inverting amplifier): \$T(j\omega)=\frac{-R_2}{R_1}=-1\$

Then comes Barkhausen criterion:

\$|T(j\omega)*H(j\omega_0)|=1\$

\$arg(T(j\omega)*H(j\omega_0))=0 [2\pi]\$

From my point of view, the criterion is respected.

However, this simulation fails and I don't get why. It seems like feedback is too weak but gain is supposed to be 1, just enough to sustain oscillations.

I've read on this page that Barkhausen is a necessary but not sufficient condition to get oscillations.

Is there a condition I'm missing there?

UPDATE: TimWescott's answer - first point - helped me a lot. By including R1 in my calculations, I now get this transfer function:

\$H(j\omega)\frac{1}{1 + \frac{R_3}{R_1} - L\omega^2(C_2+C_1\frac{R_3}{R_1})+j(\frac{L\omega}{R_1} - R_3C_1C_2\omega^2(L\omega-\frac{1}{C_e \omega}))}\$

With \$C_e=\frac{C_1C_2}{C_1+C_2}\$

The \$f_0\$ frequency (which produces the 180° phase shift) is now:

\$f_0=\frac{1}{2\pi}\sqrt{\frac{1}{R_1R_3C_1C_2}+\frac{1}{LC_e}}\$

It's worth to notice the dependance of \$f_0\$ upon \$R_1,R_2\$ - which wasn't the case before taking in account \$R_1\$.

This result contradicts many formulas given in articles about this oscillator - like this one.

However, it seems to work, at least in Falstad sim.

With the same values that the ones given above - and \$R_1=1k\Omega\$:

\$|H(j\omega_0)|=0.412\$

Thus \$|T(j\omega_0)|=\frac{1}{|H(j\omega_0)|}=2.42\$

So, with \$R_3=1k\Omega, R_2\geqslant2.42k\Omega\$ which is precisely the value that sustains oscillations (according to Falstad).

Also, according to my calculations: \$f_0=1.092MHz\$ which is the frequency displayed by Falstad. This is not equal to \$\frac{1}{2\pi}\sqrt{\frac{C_1+C_2}{LC_1C_2}}=1.038MHz\$.

Either there's a problem with Falstad (I will give SPICE sim a try soon) or the frequency given in the article (and many others about this circuit) is - slightly in this example - wrong. However, the gap expands when \$C_1\$ and \$C_2\$ values are decreased.


texts: The right oscilloscope for small phase shift

texts:
I am a bit puzzled. I want an oscilloscope which allows me to watch two sinus albeit with a very small phase shift.

I have considered the usual parameters of scopes, namely: bandwidth, resolution, sampling rate and rise time. But I don't manage to put my head around it.

The sine have a frequency on the 100-200 Hz and amplitudes of about 2 Vpp. So typically small bandwidth will do. But I want to see phase shifts of 5ns -- 5 µs. I guess I need at least 18 bits resolution, but then? I don't want to go to the motto, I'll take a scope that overkills all, and be sure, because, those tend to cost slightly more.

Just to try and be clearer, I am not asking for a scope recommendation (brand and all), but which specification of a scope should I check to see such small shifts?


texts: Dual power supply with BJT. How to do tracking without opamp?

texts:
I'm making a 0-±12V 20mA supply for breadboard. Circuit simulates fine with ltspice. How to implement tracking (or tracking ratio) WITHOUT opamp?

I found a schematic here https://groenholdt.net/projects/LAB-PSU/schematic-and-pcb.html but it is a bit difficult for me to understand and extract the relevant part.

I'm thinking of using a ganged dual potentiometer for the voltage control, and another potentiometer to adjust the tracking ratio... saves space.

Any help will be appreciated. (I know how to do it with opamp, just trying to see if it can be done with just one or two transistors... maybe smaller pcb without saving any money, since lm358 are already so cheap.)

PS: At 12V 20mA, the MMBT3904 and MMBT3906 seems to dissipate about 220mW. Will this be a problem? Any tips on if PCB layout (large collector pad) will help? Dissipation will likely be <150mW during normal use. Otherwise will have to put in BD139 / BD140 in darlington configuration (will also increase voltage drop).


texts: Why are power components meant to be power inputs in KiCad?

texts: This was asked before but not answered properly (at least I don't get it). Why are default power components in KiCad libraries are power inputs? What is the idea behind it? I would like connect an IC and some components to make a circuit. My intuitive approach is to add VCC and GND, connecting those to VIN and GND of the IC (e.g. Arduino). But all these 4 pins are power inputs. This results in ERC/DRC check fail. To me VCC is power output. Is there any idea behind it, which I miss? How can I build a simple circuit with power source, IC and some components, which would pass ERC/DRC?


texts: Where to connect RX and TX on my Sainsmart UNO?

texts:
I am trying to connect a Bluesmirf Gold on my Sainsmart UNO.  I don't know where I should connect the RX and TX on the Sainsmart and I don't have any electronics experience.

On Arduino, that's quite clear: digital pins 0 and 1 are reserved for that. But look at the picture of my Sainsmart, and things are not that clear:

I tried to connect to D0 and D1 but things don't seem to work. Is it because on this model, I should connect to the pins marked TX 1 and RX 0? If so, which of the three rows (S, U or G?) should I use?


texts: How to Calculate Appropriate R-2R D/A Converter Resistor Values?

texts: I am trying to make a 4-bit R-2R D/A Converter where a +5V signal on D3 would output -5V, a +5V on D2 would output -2.5V, etc. How would the resistor values for R/2R be calculated?


texts:
Does a diode really follow Ohm's Law?

Ohm's law states that the current through a conductor between two points is directly proportional to the voltage across the two points.
Introducing the constant of proportionality, the resistance,one arrives at the usual mathematical equation that describes this relationship: I = V/R, where I is the current through the conductor in units of amperes, V is the voltage measured across the conductor in units of volts, and R is the resistance of the conductor in units of ohms. More specifically, Ohm's law states that the R in this relation is constant, independent of the current."
https://en.wikipedia.org/wiki/Ohm%27s_law

However, I had a fellow electrical engineer tell me that a diode does follow Ohm's Law, V = IR, except it has a varying resistance which automatically varies in order to keep a relatively constant voltage drop for any current.
Is this true?
Does it or does it not follow Ohm's Law?
Furthermore, if you put a diode at the end of a power supply, with the anode to + and the cathode not connected, you still see a voltage drop with no current flow. Explain this.
Here's a diagram to show voltage drop with respect to current on an HER508 diode:

Source: http://www.rectron.com/data_sheets/her501-508.pdf


texts:
I just got a outdoor solar powered LED lamp to illuminate our house number at night. It is supposed to charge up its battery during the day, and automatically turn the LED on at dusk. The problem I'm discovering is that the solar panel on this lamp doesn't get enough natural light to charge it so that it can power the LED even for a few hours at night. I like the light fixture well enough so I'm thinking of keeping it but giving it some help.

I have a door bell and opener circuit located under the lamp that runs off a transformer. I was thinking about giving the LED lamp some help from this circuit. Here are the specs for the LED lamp and the doorbell circuit:

LED lamp: SMD 5630 LED 0.5 W, 3.2V 1000mAh Li-ion battery

Doorbell transformer output: 16V AC 30VA (but I measure 18.25V AC at the output)

Would this be a complicated exercise? I have some soldering skills but I need help figuring out how to step down the voltage and amperage to feed the light from the doorbell. I'm assuming that with the proper step down I can wire in the power from the doorbell to the same place the little solar panel is attached to augment the same charging circuit in the light?

Any help would be greatly appreciated!

Back of PV and battery (blue and yellow wires from PV, blue and red from battery

Circuit board. The IC is labeled: 8182 4K154

During the day the battery charges from the PV, at dusk the LED switches on and is powered from Battery. Could I maintain the switching capability and just power the LED with appropriate 3.2V power supply? Will the PV be attempting to charge my power supply during the day?! I don't want to cut out the PV since it appears to be the dawn/dusk switch as well...


texts: Is the 555 timer accurate and uniform enough for a metronome?

texts:
I would like to create a simple metronome using the ICM7555 CMOS RC timer (datasheet), but I am not sure if the pulses will be "uniform enough".

The datasheet states "astable timing accuracy" of 2% / 1.7 - 2.3 ms, but I am not sure how to interpret this.

Does this mean the signal will have a variance of 2%, or that the resulting frequency will have a constant error or up to 2%? I can live with a slightly inaccurate metronome (i.e. beeps at 128 bpm instead of 130 bpm), as long as the pulses are uniform, but if the timing between pulses varies a lot, then there is no point in doing this.

If 555 is not uniform, are there perhaps some other ICs which can provide uniform timing (apart from using a microcontroller of course, I am aware that's an alternative, but would like to avoid having to program it).


texts: Does impedance discontinuity distance matter?

texts:
I'm not remembering my education very well. I know when a signal encounters an impedance discontinuity there will be some reflection, I just want to know if in my case that is a practical concern.

I have two 50 ohm single ended signals that come onto a board via 50 ohm SMA connectors. They are to be fed into a 50 ohm differential load. My substrate is FR-4 with a thickness of 62 mils, and a maximum operating frequency of about 100 MHz.

simulate this circuit – Schematic created using CircuitLab

I only have control over what is in the dotted rectangle. I can't change the differential input impedance or the amplifier (which happens to have differential output)

The distance between the SMA connector and the differential amplifier is less than 1/20 of a wavelength. Does that render the discontinuity insignificant?


texts: Electronic components without rust or corrosion

texts: Is there any sort of special conductive material that doesn't rust or cause corrosion?


texts: Plug in charger in laptop before plugging in mains outlet

texts:
Feel free to delete the question if doesn't fit here.

Somebody told me, that a person should plug the charger in the laptop side first, then in the mains outlet, as if there is a current peak, it is less prone to burn the charger.

My knowledge to the data can't make any sense of this.

Does it make any sense?


texts:
I want to implement a alert system using a comparator circuit. The circuit will alert the user when he is a certain distance away from an object of interest. The comparator circuit will comprise of an op-amp powered with only a +5V voltage supply. There will be a Infra-Red sensor to sense the distance. The idea is to turn on a vibration motor only when the user is 2 cm or closer to an object. The output voltage of the IR sensor is proportional to the distance of the object it is sensing. This output can, thus, simply be compared against a voltage of interest to produce an output voltage.

![

simulate this circuit – Schematic created using CircuitLab

]1

As shown in the circuit above, a 5 V voltage supply will be used to power the IR sensor, vibration motor, and the operational amplifier. The voltage output of the IR sensor is proportional to the distance to the object it is sensing, and varies from 2.65 V to 0.4 V as the distance changes from 2 cm to 28 cm. This voltage is fed to the non-inverting output of the op-amp. The inverting output is connected to one terminal of the potentiometer. The knob of the potentiometer can be adjusted such that the input to the inverting input varies from 2.65 V to 0.4 V. If, suppose, the input to the inverting input is held at 2.65 V, then the output from the op-amp is 5 V (the positive voltage rail) only for distances the IR sensor detects to be less than 2 cm. If the distance is more than 2 cm, the input voltage at the non-inverting output will be less than 2.65 V, which means it will be lower than the 2.65 V voltage at the inverting output. This would normally force the output to saturate at the negative power supply voltage, which is simply not present for our circuit. This means the vibration motor will turn off for distances more than 2 cm.

Total Power consumption Estimation

Op-Amp input ~0
Op-Amp output/Vibration motor: 5 V x 75 mA
IR sensor: 5 V x 40 mA

My question is whether the idea of using a single voltage source, and estimates of power correct?


texts:
Has anybody used ltspiceIV in a optimization process using Matlab? I need feedback because I am running my circuit in transient analysis, and when I found the optimal point of my optimization, I ran it again but alone (not in the optimization loop) and I don't get the same values. Also, in a for loop, I obtain NaN (Not a number) value in my results. Is Ltspice suitable for optimization?

I work on electrical machine modeling. It is modelling the machine using equivalent magnetic circuit (which looks like electric circuit with resistor and source). I am then using ltspice coupled with matlab to solve this circuit. I create my netlist using matlab, I solve using ltspice, I collect the results from .raw files using a matlab program and I process the results using also matlab. It works until now. (the end of the question after that)

I am doing optimization so I need to run over and over again ltspice until the algorithm find the optimal point. I want to know if this process of running of multiple time (through optimisation or "for loop") is suitable for ltspice? I found that it can give me false results or doesn't compute the results at certains time (I obtain NaN (Not an Number) values).

In my circuit, there are a lot of controlled source, subcircuit, inductance and resistors.


texts:
I'm having some trouble understanding how I can convert a boolean expression to a NOR-gate only expression. What I'm working with looks like this:

$$T = BD + \overline{A}B\overline{C} + \overline{A}CD$$

I know you're supposed to use deMorgan's theorem, but I'm not sure how to use it. Can I just select parts of the expression I want to use the theorem on, or does this change the result of the expression?

It would also be nice to see a step-by-step solution for the expression above.


texts: Measuring wide range of currents with ADC

texts:
I'm designing an amplifier to read currents using a CT from 10 mA to 30A with a STM32 with no FPU. I have the following data:

CT turns ratio = 1000:1
Burden resistor = 10 ohms
ADC reference = 3.3 V
DC shift = 1.65V (2048 adc count)
Amplifier gain from 10 mA to 10A = 8
Amplifier gain from >10A to 30A = 2

Let's say I want to read 10 mA:

Secondary current = 10 mA/1000 = 10 uA
Vburden = 10 uA * 10 = 100 uV
Vpeak = 100uV * 1.41 = 141.42 uV
Vadc_in (amplified) = Vpeak * 8 = 141.42 uV * 8 = 1.13 mV
Vshifted = 1.13 mV + 1.65V = 1.65113V
Adc_count = (Vshifted*4095)/3.3 = 2048.90 = 2049

I can also say:

Vadc_in(pk-kp) = 1.13 mV * 2 = 2.26 mV (peak to peak)
Adc_span = (2.26 mV * 4095)/3.3 = 2.8 ~ 3

So if I have 3 counts for a 10 mA primary current,

1 count = 3.33 mA
OR 3.33 mA/ADC count

Now, let's say I want to read 15 mA

Secondary current = 15 mA/1000 = 15 uA
Vburden = 15 uA * 10 = 150 uV
Vpeak = 150uV * 1.41 = 211.5 uV
Vadc_in (amplified) = Vpeak * 8 = 211.5 uV * 8 = 1.692 mV
Vshifted = 1.692 mV + 1.65V = 1.651692V
Adc_count = (Vshifted*4095)/3.3 = 2049.6

Doing the same calculation for 10 A, I get 2.78V peak at the ADC input, and 2749 count.

Is this approach right? Could I do RMS calculation in the micro with this method considering the micro doesn't have FPU? Also, look at the case of 10 mA and 15 mA, the ADC count is almost identical, i.e., 2049. If I do the DC shift subtraction by software, that is, 2049-2048 = 1. There would be a lack of precision I think. I would get the same values for 10 mA and 15 mA. Please, correct me where I'm wrong.


texts:
In the following 2-stage cascode tuning amplifier, assuming that both tuned circuits have the same resonant frequency. Is the output voltage 90 degrees "delayed" with respect to the input (i.e. vo = -j(constant)*vi) at the resonant frequency?

[


texts: Why is there a trade-off between AC current measurement and AC voltage measurement?

texts:
I am looking at buying a decent digital multimeter (not looking for recommendations), and in the products I have looked at, there is a trade-off between being able to measure \$\mu\$A and mV.

eg.

DMM 1 Has a minimum AC voltage of 4V, and minimum AC current of 400\$\mu\$A an.

DMM 2 Has a minimum AC voltage of 60mV, and minimum AC current of 60mA an.

The prices of the two are the same (~$120). Even my $20 has a current range of 200\$\mu\$A (it's accuracy is another story).

Is there an electronics related trade-off between AC current and voltage measurement, or something else?


texts:
When buying an off-the-shelf computer I assume it gets tested to make sure for example that the power supply meets the regulation, the battery and usage does not exceed the limits etc.

How does it work when building or substantially customising a laptop/desktop, is it the case that the parts are approved individually and therefore the whole system is approved to be sold in the UK or is it completely not regulated?


texts: I can barely find any information on this, all I know is that the cables look the same but have different pins. Can someone explain the story of why they look the same and if JP-21 is a standard in Japanese TV's?


texts: Good evening, I'm dealing with the glitch of the xor gate. I read on the book 'Code Design for Dependable Systems: Theory and Practical Applications' that a glitch is generated when more than one input variable is changed simultaneously, due to the structure of the port (i.e in a 2 input XOR PORT when the 2 input change simultaneously for example to 00 to 11). I would like to understand the reason why the transistors-arranged like in the following image- lead to this behaviour:


texts: Arc Flash carbonized particles initiation

texts:
Ok. I'm investigating an arc flash accident.

In the above image. The breakers encountered a first short which deposited carbon into the plastic enclosure and lugs. During a second event. The electrician just touch the right most live terminal into the right most lugs. It suddenly arc flashed causing the damage as well as hurting his arms.

What I want to know is. If there is merely carbon deposited in the breakers. Is it enough to cause arc flash between the two live terminals. It's like the carbon initiated the arc flash?

The transformers is an open delta 3 phase composing of two 75kVA transformers serving 240volts to an office building (the red and black line).  It's connected directly by short wires to the service meter and directly the breakers. When the arc flash occurred, there was no overcurrent devices upstream of it. The transformer breaker didn't trip.

Just tell me if mere carbon deposit in the breakers can initiate arc flash. Notice the middle plastic is not damaged. It's as if the arc flash jumped in front of it between the terminals, is this possible? Note the smaller wire is not connected to the right most live wire. The smaller wire is just the ground hidden at the back of the live wire.

posted yesterday:

To clarify my questions. What I was asking was supposed just for sake of discussion the drop thing is not a tool but a thin layer of carbon (again just for sake of discussion or better yet let's say the switch gear or whole facility is turn off and you put a thin layer of carbon between the conductors ). Since a thin layer of carbon is a conductor.. and this bridges the gaps between the two terminals or huge wires with large incident energy, would this initiate an arc flash or should the thing drop be a tool that can pass through huge current? Or can a thin layer of carbon enough to cause chain reaction (or negative resistance) effect that would build up the arc plasma from miniscule until the textbook arc flash occurs that throw the person across the room?

original message:

In panels or switchgears where a tool dropped can initiate a major arc flash. I'd like to understand the behavior if carbonized particles (say from previous short) get into the conductors causing a short. What quantity before they can initiate and chain react into a major arc flash?

Imagine there is little amount of carbonized particles between the two phases or conductors. Once it conducts. It can vaporize immediately. Would this be enough to establish a major arc flash. What is the carbon deposit threshold before this can occur?


texts: Uniform Linear Array (ULA) beamwidth and angular resolution using FFT

texts:
I have a four element uniform linear array receiver and I want to know what will be the angular resolution if I perform perform Fast Fourier Transform (FFT) over antenna elements. As I think that it will be same as the beam width of the array.

The antenna element spacing is lambda/2

Question1: What is the beamwidth of the array structure

Question2: If I perform FFT over the element array will I get the same angular resolution as beamwidth

Question3: How each bin in antenna FFT will represent my region of space (e.g Frequency bin 1 = theta 0 to 30 degrees)


texts:
Hi i´m designing a robotic arm based on this idea of the NOVABOT I only want to change its structural parts by aluminum tubes. In this design 3D model it use the servo hs-311 wish have a max torque of 3.7 kg/cm, and its made of some plastic material.

I made my calculations following this url and made a excel that I append here... the mass of my design have been taken from iProperties of Autodesk Inventor, so they are in mass units not in weight. And I´m dismissing the mass of the joints (m5,m6) to have a first idea of the values, because I dont have the selected motors.

And my problems is that I think I´m missing something here because the it results in a very high torque motors, for this simple design.

here is my excel


texts: Can GaN FETs be driven directly by logic level signals?

texts:
I've gotten interested in using GaN FETs for their combination of fast switching speed and very low on-state resistance.  Most of the eval boards (for example by EPC) use GaN driver chips such as UCC27611 and LM5113 which regulate the gate voltage to 5V and clamp transients.

Now, looking at some of the smaller GaN FETs like EPC2037 which has 0.12nC gate charge or EPC2036 with 0.70nC, I'm wondering: is there any reason this cannot be driven directly from a 3.3V microcontroller pin?

If the microcontroller can source/sink 25mA, the switching time is in theory only 0.12nC/25 mA = 4.8ns, and that's without a driver (!!).  The real switching time may not be quite as good of course, but it should still be super-fast compared to a non-GaN FET.  I would like to tie the gate to a microcontroller pin without a gate resistor, if possible.

Now, I can see from the same datasheet that FET won't be fully on at 3.3V, but does this have any negative effect other than slightly higher heat dissipation?  I'm okay with lower efficiency, just want to know if there are any pitfalls of the kind that could make the FET fail.

(My use scenario is switching 5V 1A at ~1MHz, I think 20-50ns switching times should be fine but faster is better.  The microcontroller is STM32F103)


texts: Why not produce household electricity with natural gas generator?

texts:
I don't have an engineering background so I apologize in advance if this seems like a silly question.

So I noticed natural gas in my area is a lot cheaper than electricity. So I was asking myself why not get a natural gas generator to produce electricity?

My utility company charges .17 kwh for electricity and .35 per Therm/100 cubic feet for NG. A 10kw generator uses about 200 cubic feet NG per hour. So that's .35x2 = .70 for 10kwh. Or .07 per kwh.

Of coarse there's the initial costs for the generator too.

Am I doing this correct or am I missing something?


texts: Water wheel turning a fan motor and voltmeter shows approximately 300 VDC. How to charge batteries from that?

texts:
I’m trying to create something to produce enough power to keep a bank of batteries (wired for 24 volt configuration) charged. Basically I'm using six to eight 12 volt batteries, wired to a 24 VDC to 110 VAC inverter.
I have a couple of streams, where I’ve managed to collect water that runs down a 2 1/2” tube with a drop of 20 feet onto a water wheel, which is connected to a ceiling fan motor (I believe).  When the wheel is turning, I check the fan motor wires with a voltmeter. On the 500 VDC range, it reads a pretty consistent 300 volts.
If anyone could give me a better idea to achieve my need, please respond.  And if I’m really generating 300 VDC, what can I do with it to charge the bank of batteries?
Thank you.


texts:
I bought an LED night light that's powered by three AAA batteries. At first it was super bright (too bright!) but then faded and finally went dead after just a week. It seemed to me that it didn't have an adequate current limiting resistor so I opened it up. It's simply 8 LEDs in series with a resistor, 3 AAA batteries and a switch.

The resistor is strange since it appears to be red-red-gold-gold banding and I don't know what to make of gold in the third position.

My question is, do you think it was the resistor that caused it to burn out so fast, and if so, what would be an appropriate replacement?


texts: Method to configure an Embedded CPU for WiFi network w/o a physical user interface

texts:
Let's say you have a device you built that uses something like an Arduino with a Wifi shield. The intent of this device is to connect to your wifi network, and then connect to the internet and do something (use your imagination).

If the device was so simple that it did not have any buttons or a screen on it, how would one initially configure it to connect to a particular WiFi network?

(Obviously directly inputting the wifi network parameters into the source code for your project is out of the question).

I have been thinking about this lately and wasn't sure what the best approach was.

Yesterday something happened that got me thinking. I purchased a WiFi enabled Honeywell Thermostat for our house. It connects to your WiFi network so you can control the thermostat using your phone from anywhere in the world.

The method used to connect the thermostat to the wifi was interesting though. When you first hooked up the thermostat, it would create it's own wifi network/server called "Thermostat_EKDD94" or something. You use your phone or laptop to connect to this network. Then visit 192.168.1.1 in the browser, in which you see a list of available wifi networks to connect to. You pick the network, input the password, and then the thermostat disconnects you and connects to the network you picked. At this point, the thermostat's own wifi network/server goes away for good (unless you do a hard reset on the thermostat at a later time).

And just like that, your thermostat is connected to a wifi network of your choosing, all without having to actually touch the device. It was a very interesting approach. Is this something that is possible with an Arduino? Can it act like a server and then client? Maybe at the same time?

Any thoughts to this approach or if there is a better approach?


texts: What happens to current if I change dielectric from air to material with Ɛr>1

texts:
Electrostatics: One of the job interview question:

Plate capacitor, with area of electrodes S, and distance between them d,has air as dielectric. Capacitor is connected to constant voltage source. Then, it is disconnected and dielectric is introduced between plates with relative permitivity Ɛr>1,

What happens to current between plates? does current drops (asuming to zero if there is no voltage), increases, or stays the same?


texts: Handling Hi voltage and very low current (10 mA) will need to prevent arc and corona effects on my PCB?

texts:
I' m following this guide; concretelly 3 and 4 chapters for High Voltage (HV)  PCB design:

https://www.magazines007.com/pdf/High-Voltage-PCDesign.pdf

The fact is that I have read interesting ways to avoid arcs and coronas between to high voltage conductors.

I have found here some of them as for example:

Field gradient rings
Routed Slots
Inert Insulators
Cover Coats for solder mask with Kapton
Dielectric strength sheets material
Rounded copper shapes

I must to design a board with some HV relays, 8 points x 2 relays. Every relay will connect some of these points to a source positive terminal. This High voltage will arrive to the every relay by a wire from an industrial HV source.

HV source is an external device that brings energy to the board relays towards H and L terminals:

Although the board or relays will handle a max of 10KV the application only will need a few mA from the HV source.

Board will only have relays, connectors and not too much elements apart of these; maybe some diode, decoupling C if needed or even some R (depends on relay specs). Relays coils will be fed by low voltage (12V or 24V).

My question here are:

Will I really have arc and coronas problems to avoid with this little
current consumption: few mA (5, 10, etc)?
Will I really need to use those techniques: upper dielectric strength material for the sheet, routed slots to prevent carbonation of board, Kapton Cover Coats for increasing the dielectric strength of the board, etc.. or can I still using low voltage PCB design materials and techniques?
At page 14 autor says that "corona and leakage current from the field must be calculated o experimented with" when designing pcb. How can I calculate corona and current leakage effects? So in case I get them, how must I use them?


texts:
I have electrical engineering this semester and there is this thing bugging me this whole time, how to see which resistors (or whichever component) are connected in which way?

I can do it by following where current divaricates, but it gets a little tricky when I have circuits like this below.

Do you have any tips?

(We don't know if all resistors are the same value or not !)


texts:
Do you know how to use state-plane analysis to learn the zero-voltage-switching buck converter?
I searched for some papers, but most papers talk about LLC converter. I want to learn the ZVS of the buck converter.

Can somebody suggest to me some useful papers or material that I can learn from?

How can I find the state-plane analysis to learn?


texts: Why put the bits of a port on non-adjacent pins?

texts: Some micros have all bits of a port nicely lined up, while others' bits seem to have been scattered by the winds to all four points of the compass. Why?


texts: Thevenin Voltage with only Dependant Sources?

texts: If I have a circuit composed of only dependant sources with linear control functions (ie a voltage source with a voltage of bVx, where b is a constant and Vx is some other potential in the circuit) and linear resistors, won’t the Thevenin Voltage always be zero? The only solution seems to be for every voltage and current in the circuit to be zero. Wouldn’t anything else break linearity?


texts: FFT Analysis using powergui (SimPowerSystem)

texts: How to do FFT analysis using powergui tool available in matlab


texts: Writing SSPBUF from variable in I2C slave protocol in PIC18

texts:
I am migrating this question from StackOverflow to this forum because I believe it is more adequate.

I am writing an I2C slave routine for PIC18F25K80 and I am stuck on a weird problem.

This is my routine: (EDITED WITH THE LATEST VERSION BASED ON THE COMMENTS - STILL SAME PROBLEM)

void interrupt interruption_handler() {
INTCON1bits.GIE = 0; // Disable Master Synchronous Serial Port Interrupt

if (PIR1bits.ADIF == 1) {
    //This is a A/D interruption
    PIR1bits.ADIF = 0;
    INTCON1bits.GIE = 1; // Enable Master Synchronous Serial Port Interrupt
    return;
} else
if (PIR1bits.SSPIF == 1) {
    //This is a I2C interruption
    PIR1bits.SSPIF = 0;
    //Treat overflow
    if ((SSPCON1bits.SSPOV) || (SSPCON1bits.WCOL)) {
        dummy = SSPBUF; // Read the previous value to clear the buffer
        SSPCON1bits.SSPOV = 0; // Clear the overflow flag
        SSPCON1bits.WCOL = 0; // Clear the collision bit
        SSPCON1bits.CKP = 1;
        board_state = BOARD_STATE_ERROR;
    } else {
        if (!SSPSTATbits.D_NOT_A) {
            //Slave address
            debug(0, ON);
            //Read address (A/D number)
            address = SSPBUF; //Clear BF
            while (BF); //Wait until completion
            if (SSPSTATbits.R_NOT_W) {
                SSPCON1bits.WCOL = 0;
                unsigned char a = 0x01;
                SSPBUF =  a; //0x01; //a+1; //Deliver first byte
            }
        } else {
            if (SSPSTATbits.BF) {
                dummy = SSPBUF; // Clear BF (just in case)
                while (BF);
            }
            if (SSPSTATbits.R_NOT_W) {
                //Multi-byte read
                debug(1, ON);
                SSPCON1bits.WCOL = 0;
                SSPBUF = 0x02; //Deliver second byte
            } else {
                //WRITE
                debug(2, ON);
            }
        }
        transmitted = TRUE;
        SSPCON1bits.CKP = 1;
        PIR1bits.SSPIF = 0; //Clear again just in case

        INTCON1bits.GIE = 1; // Enable Master Synchronous Serial Port Interrupt
    }
} else
    PIR1 = 0x00; //Just in case
}

It works like a charm if I set constant values on SSPBUF. For example, if you do:

SSPBUF = 0x01;
(...)
SSPBUF = 0x02;

I get the two bytes on the master. I can even see the wave forms of the bytes being transmitted on the oscilloscope. Quite fun!

But when I try to set SSPBUF using a variable like:

unsigned char a = 0x01;
SSPBUF = a;

I get zero on the master.

It is driving me crazy.

Some hypothesis I've discarded:

Watchdog timer is messing up interrupting in the middle of the protocol: It is not. It is disabled and the problem happens in both SSPBUF assignments
I need to wait until BF goes low to continue: I don't. AFAIK, you setup the SSPBUF, clear SSPIF, set CKP and return from interruption to take care of life in 4Mhz while the hardware send data in few Khz. It will interrupt you again when it finishes.

It makes no sense to me. How good it is if you cannot define an arbitrary value using a variable?

Please gurus out there, enlighten this poor programmer.

Thanks in advance.


texts: 3.3V Regulator giving 4.8V with 5V Input

texts:
The ST L78L33ACZ 3.3V voltage regulator has 5.028V in the Vin pin but the Vout pin is giving 4.765V.

The datasheet states that the dropout voltage is 1.7V. Shouldn't 5.028V Vin be sufficient to regulate the voltage to 3.3V? Or is there another problem?

Photo + Update:

May be hard to identify in the photo, but I did make the necessary cuts to the traces.

Vin is now 3.927V after adding the load and using a new regulator. Have not used the capacitors yet, maybe thats why its at 3.9V? Or maybe the load (Xbee) is not pulling enough current?


texts:
SAE J1708 is basically an RS485 hardware interface without the typical 120 ohm termination resistors. In typical applications, a half-duplex RS485 transceiver chip is used to connect to the bus.

In order to avoid collisions, J1708 protocol rules dictate that the device must monitor the data bus while transmitting the first byte (MID) of its message.

How is this possible using a half-duplex transceiver? In other devices I have worked with, half-duplex implied that receiving during transmission was not possible. Does the Receiver Output pin of the transceiver match the Driver Input during transmission?


texts: Calculating resistance for variable voltage

texts:
I have built a very primitive voltage booster with a push button.

Now I would like to add my ATMEGA328 to automate the switch. The problem I'm facing is that I want to measure the output voltage as well, but my ATMEGA's VREF is set to internal 1.1v.

I could make a simple voltage divider in parallel and take the reading from there, but I'm a bit confused about the following:

If my max output voltage is 20v, then my R1 value should be 190kΩ and R2 value should be 10kΩ, BUT what happens if my output voltage drops from 20v to 3v, wouldn't that cause R1 and R2 to try to 'draw out' more current from the capacitor? or is this the proper way of doing this?

The boost converter voltage will change from 0v to 20v in random phases, so basically what I'm trying to do is find a proper way to do this in circuit:

voltage_reading = voltage_from_capacitor / 20v;


texts: How to select alternative inductors for High Frequency Amplifiers

texts:
I have a question on Inductors for VHF Amplifiers and Transmitters. I often see circuits on the web, where several aircore enameled copper wire inductors are used. The specification looks something like this:
L1 = 5 Turn 26 SWG Enamelled Copper 10mm diameter aircore

I understand all the attributes of this specification. But the problem arises when a specific guage of wire used in the circuit, is not available with me. In such scenario I thought of using the calculators available online (like this one) to calculate the inductance of the Coil. For that inductance, with simple reverse calculation I will try to determine the number of turns and coil diameter for a different guage wire which is available with me. The inductance may not match exactly, but it reaches very close to the desired inductance. My question is, is this approach correct? Can I really replace an inductor in RF circuit which is expected to be x turns of y guage wire of z diameter by an inductor which is x1 turns of y1 guage of z1 diameter. The question might be silly for subject matter experts, but I am not originally from Electronics Background. So, just wondering if apart from the inductance of the coil, anything else matters to those RF Circuits.

I also see that some circuit uses 'RFC' or 'FM RFC'; and often no other specification is supplied. I understand it means Radio Frequency Choke. But is there any standard inductance for an RFC? If I don't have an RFC for say 100 MHz, how can I make one myself?


texts: Novice question about setting system clock in microcontrollers

texts:
This is a novice question. I see that for every embdded project system clock is set by using PLL multipliers.

But what determines the system clock value? Why not always max system clock is used? Can you give an example?


texts: Predicting current flow through crosshatched wire

texts:
Consider the crosshatched current-carrying wires depicted:

The shorter wires have been placed on top of the longer wires. Each wire can facilitate a maximum of 170 amperes of current and contributes a small amount of resistance to the circuit. Note that wires carrying 170 A are parts of separate circuits that include more elements than the wires depicted (e.g., a battery).

Since the conductors are touching, is there any way to predict how current will flow across the ‘bridge’ that is formed?

If more information about these circuits is needed to formulate an answer, please share that in the comments.


texts: 100 Mhz clock frequency for a 16 Mhz MCU

texts: I would like to ask what will happen if I set, for example, 100 Mhz as a clock frequency for a MCU, which can operate at maximum speed of 16MHz. Why wont it work?


texts:
I am having a circuit for a TL5001 boost converter that outputs approximately 400 Volts.

I am trying to modify the circuit as to output a voltage between 20V- 100V. The output current will be less than 1A.

I am attaching the circuit and hope that I can get your advice on how to do the modification.

I already have a couple bare PCB of the full circuit.

Ihab


texts: USB shield shorts battery... protect the PC?

texts:
I'm making a retro-fit device (so I have plenty of parameters that aren't in my control) where we're adding USB connectivity to the device for use with a PC.

The device is battery powered, and the battery configuration varies greatly from one user to the next.

There is concern that some users are using a battery holder that has exposed rivots that may come in contact with our USB connector's shield, thus shorting the battery's + and - with the shield material.

I'm less concerned with what happens to the device if they do this than I am for thier safety and what may potentially happen to their PC if I connect the shield in the usual way (ie. 1M res / 4.7uF cap between shield and ground).  If I understand, the host side will have the shielding go directly to ground.

I'd want to be either a) comfortable that a short wouldn't be as tragic as I'm imagining or b) make electronic changes to my circuit board such that said short would be protected against, even if damage to my circuitry occurs so long as the user and PC are protected.

Unfortunately, due to previously mentioned constraints, I can't physically ensure the battery's poles don't come in contact with the USB shield, and I'm not soliciting responses to that effect.  Of course I can warn the user by way of instruction manual and/or included notice to be careful if they use that type of battery holder, but if there's something I can do electronically I would like to know what it might be.

Thanks.


texts:
I came across this example in Razavi's Analogue CMOS IC Design book

The solution says that the for differential output, Vn does not change. Why not? Is it because any voltage drop across any of the resistors is essentially accounted for at either X or Y?


texts: How does distance between parallel batteries affect voltage drop/required wire thickness?

texts:
I'm looking to wire up an off-grid system. What I'm stuck on is battery placement.

The likelihood is my batteries will need to be quite far apart (almost 2 metres). My question is how does this relate to the wire thickness I should use to add components to the circuit?

To flesh this out in case I'm not being clear: if I only use one battery, the fusebox can be 50cm away from both positive and negative terminal. Using a certain wire thickness, this could result in an X% voltage drop since the return distance of the current is 1m.

If I use the batteries in parallel, the positive terminal is now 50cm from the fusebox, whilst the negative terminal (on the other battery) is now 1.5m away.

Does this means the return distance is now 2m, resulting in a 2X% voltage drop?
Or does it include the parallel connections, meaning it's 3.5m or 5m?


texts: Design an emitter follower to operate in the audio range (20 Hz - 20 kHz)

texts:
I am now self-learning with the "Art of Electronics" book by Holowitz and Hill, and I encountered a problem understanding one example from the book. Here it is:

And here is the explanation for the calculation of the circuit:

  A. Emitter follower design example

  As an actual design example, let’s make an emitter follower for audio
  signals (20Hz to 20 kHz). VCC is +15V, and quiescent current is to be
  1 mA.

  Step 1. Choose VE. For the largest possible symmetrical swing without clipping, VE = 0.5VCC, or +7.5 volts.

  Step 2. Choose RE. For a quiescent current of 1 mA, RE = 7.5k.

  Step 3. Choose R1 and R2. VB is VE +0.6V, or 8.1V. This determines the ratio of R1 to R2 as 1:1.17. The preceding loading criterion
  requires that the parallel resistance of R1 and R2 be about 75k or
  less (one-tenth of 7.5k×β ). Suitable standard values are R1 = 130k,
  R2 =150k.

  Step 4. Choose C1. The capacitor C1 forms a highpass filter with the impedance it sees as a load, namely the impedance looking into the
  base in parallel with the impedance looking into the base voltage
  divider. If we assume that the load this circuit will drive is large
  compared with the emitter resistor, then the impedance looking into
  the base is β RE, about 750k. The divider looks like 70k. So the
  capacitor sees a load of about 63k, and it should have a value of at
  least 0.15μF so that the 3 dB point will be below the lowest frequency
  of interest, 20 Hz.

  Step 5. Choose C2. The capacitor C2 forms a highpass filter in combination with the load impedance, which is unknown. However, it is
  safe to assume that the load impedance won’t be smaller than RE, which
  gives a value for C2 of at least 1.0μF to put the 3 dB point below 20
  Hz. Because there are now two cascaded highpass filter sections, the
  capacitor values should be increased somewhat to prevent excessive
  attenuation (reduction of signal amplitude, in this case 6 dB) at the
  lowest frequency of interest. C1 = 0.47μF and C2 = 3.3μF might be good
  choices.

My questions are:
1) they only mention high-pass filtering (below 20 Hz). But what ensures filtering above 20 kHz, namely where is the low-pass filter here?

2) Is this modification will do the job (adding C3 to form a low-pass filter with the Re)? (sry for terrible drawing)

3) If no, than how to add high-frequency filtering properly here and calculate the values of additional components? (if needed).

Thank you in advance for your help.


texts: Method for having long task delays in freertos

texts:
I was wondering how I can delay for longer periods of time using freertos function vTaskDelay().  Because the largest number you can store in a 16bit unsigned integer is 65535, the longest I can delay for is a little under 2 hours.  I have currently implemented a method which uses a counter.  Is this approach the best or is there another way?

  void vSomeTask(void) {
  static int16_t counter = 0;

  // DO SOMETHING

  //WAIT 24 Hours
  while (counter != 23) {
    vTaskDelay((1000*3600) / portTICK_RATE_MS);
    counter++
  }
    counter = 0;

  //DO SOMETHING ELSE AFTER ONE DAY DELAY

  vTaskDelete(NULL);
}

EDIT: I just realized that because vTaskDelay is relative, it does not account for time that passes after the delay ends if other tasks of greater priority keep running.  So a more refined approach would be to get the current time and instead use vTaskDelayUntil() because it's based of absolute time.


texts: Currently I am building a quadcopter with Raspberry Pi and I have four 20A Tunigy Electronic Speed Controller (ESC). I was wondering about could I use ESC's red wire to power my Raspberry-Pi? (tying 4 red wire out of ESC could fill the current requirement?).


texts: So currently I am using a phototranssitor to detect light from several IR LEDS; however, I am having some trouble. I am currently using the right side of the circuit in the picture half way down the page on this website (http://www.nerdkits.com/videos/theremin_with_ir_distance_sensor/) should be under the heading The Electronics. Anyway I have been trying for ages. I have a 5V supply, connected to the collector of the phototransistor (BPV11) in series with a 10K ohm resistor to increase the sensitivity to light, then to ground (as shown in the picture). My problem is when testing I am getting changes of MAX 100mV (milli) which is no were near my friends change of 1V to 5V with the same set up. I have tried every orientation to no prevail. Any help? And yes the LEDS are working!


texts: What are the differences between optoisolator output styles?

texts:
Digikey lists optoisolators with several output types:

Darlington
Darlington with base
Photo FET
Photovoltaic
Photovoltaic, linearized
Transistor
Transistor, with base

What are the differences among these, and in what circumstances would I use one or another?


texts:
I have 2 electrodes placed in a water bucket for electrolysis, electrode[A], and electrode[B].
I am supplying a positive DC voltage to electrode[A] and connecting electrode[B] to the ground and this polarity changes after half an hour and so on.
What I am trying to do is create another small piece of an electrode which I am calling water sensor here.
Whenever the water level in the water bucket touches the water sensor or whenever the water sensor is submerged inside the water, only then electrolysis happens otherwise there will not take place any electrolysis.
I have found many DC power supplied water sensors but there seems to be a problem of corroding. I am trying to avoid corrosion.


texts:
I made this simulation circuit using Proteus.

In this I connected a AC source 200V RMS/50Hz.
But, sum of capacitor voltage and lamp voltage not equal to given 200V. What is the reason for that?

According to calculation of Xc(Capacitor reactance) and lamp resistant and using the voltage divider rule capacitor voltage and lamp voltage equal to given 200V.

What is the reason for this difference?


texts: Why do my led bulbs state: not for use in totally enclosed luminaries?

texts:
I recently bought some nice inexepensive LED bulbs but I noticed the warning states: (see image below)

  not for use in totally enclosed luminaries

I am guessing that it gets too hot but I find it interesting that it doesn't add that part to the warning text.  I was wondering if it has something to do with it not performing well if it doesn't have air or something.

Also, I wonder if that means I can't use it in overhead lighting like the following: (Again I'm assuming you should not.  It's totally enclosed, but I wasn't sure if it just meant small enclosed luminaries).


texts:
i have data at portb on microprocessor (pic), i need to compress three bits rb3,rb4, and rb5, the other pins are various IO on port b, i wish to compress that info held in those three pins on  port b, ignoring all others on port b, and present it as two bits on port A, pins RA3, RA4.

I just dont know how to apply bitmasks etc in this problem, i trust that is even the correct approach?


texts: How can I calculate DC motor continuous current?

texts:
I have some information for a brushed DC motor:

Nominal voltage: 24 V
Omic measure: 16 ohms
Power: 400 W
Maximum output power: 550 W

Rev: 150 RPM (no load)
Test voltage: 26.0 V (no load)
Current: 2.5 A (no load)

Now, I'm trying to find the right motor driver and I have to calculate continuous current of motor, but I'm not sure how to do it. Here's my attempt:

$$P_{max} = I_{max} \cdot V_{max}$$

$$550W = I_{max} \cdot 24V$$

$$I_{max} = 22.9 A$$

Is my calculations correct? If not, how can I calculate the current properly?


texts:
For part of a project, I am needing to monitor the current draw of 4 low power loads simultaneously. I like experimenting with circuits and I found one online in a TI application note (AN-31 page 35) which looked good.

I had 4 loads to monitor, and I wanted an LED to light up when the current got higher than a set amount (undetermined as of yet). My supply voltage to the loads were 2.5V, and I didn't want a large voltage drop over the sense resistor, so I made that 0.1 Ohms. I then used the formula provided in the App note to calculate the other resistors to give me an output in the mV range.

I simulated the circuit on Proteus, and decided on a current limit of around 125mA, giving my circuit a Vout of 125mV.

I added in a couple of extra ammeters and voltmeters just so I could understand it a bit better. I believe I have an understanding of the circuit, in that there is a voltage drop over the 0.1R resistor, the op-amp will then turn on the FET to equalise the 2 inputs, which puts a current through the bottom resistor (R8 in this case), causing a voltage drop which is then the Vout. This is just a very quick explanation as it shouldn't need much more detail than that.

So, I then duplicated this circuit 4 times, and added a comparator circuit with a reference voltage set to 125mV. This should then turn on an LED when the current passes the 125mA threshold. I simulated this again:

So, I am happy with that, and I decided before putting this in my main circuit, I would build this current monitoring part on a separate PCB, just to double check it all works. It did not.

The current monitoring part of the circuit is here:

I set up a few test points so I can measure different things. I used an OPA4251 as my opamp, and an LM339 as the comparator, mainly because I had some of those around. The 0.1, 10k and 1k resistor are all 0.1% tolerance resistors. The MOSFET used is the IRLML6402, again because there are lots of them here.

Once setting the load current to 125(ish)mA :

The LEDs were not turning on. I took some measurements:

Vdrop over 0.1R resistor - 128.2mV
Voltage supply to load - 2.5014V
Voltage at I1 (Vout of current monitor circuit) - 0.0003V ?????
Voltage at output of opamp (to FET) - 2.4591V
Voltage between '-' and '+' input of op-amp - 129.3mV

It seemed to me that the FET wasn't turning on, so I tried changing it, and still nothing. When looking at the simulation, I put a few different FETs in the design, and sometimes it wouldn't turn on, so I have managed to convince myself it is to do with this, however, when comparing datasheets online, I am not quite sure what I should be looking for in this. I also don't have any of the FETs that I used in the simulation, and the ones I do have don't have SPICE models on Proteus (always the way eh?!).

So my question is am I correct in thinking that it is likely the MOSFET selection that is causing my issues? If not, could it be the Op-Amp? Rather than asking for components I could use instead, what are the parameters I should be looking out for? And finally, does anyone have any ideas on how to get this working?


texts: Control DC motor from very low RPM (10) to high RPM (1200)

texts:
I'm trying to make a DIY Wash & Cure Station for my resin printer, part of the design involves and very slow rotating platform for curing (around 10 RPM) and a high RPM (around 1200 RPM) spinning fan/propeller for mixing the water (think magnetic stirrer). Both are powered using the same motor and the fan/propeller and curing platform are just magnetically attached.
I've read from previous questions on here that out of the box high RPM DC Motors with a PWM controller perform bad (or not at all) at low RPM's (unless specifically geared low). I wanted to ask if anyone has any thoughts on how I can accomplish this without two separate motors or some type of gearbox?
Edit: A few important things I've missed. The torque required will be minimal at both RPM's. The RPM's do not need to be precise, the only constraint is the lower RPM has to not be spinning fast enough to throw whatever is sitting on the plate, off.


texts: WTB (Build): Low power "proximity to a device" detector

texts:
I'd like to create a small device that can tell when it's near another created device or sensor.  When it detects the other device, it lights up an LED.

Maybe maximum detection range of a few feet.  No need for any unique ID values or complex data exchange, just a simple "Yes I detect one, no I don't" sort of control.

Any suggestions on how this could be done in a low power, portable sort of way? Because its requirements are so simple, something like RFID seems overkill (even if it could be made to work).


texts: What safety regulations do I need to follow for wiring of a decorative lamp utilizing a fluorescent tube with g10q fitting?

texts:
I'm building a cast concrete decorative lamp. It will use an exposed circular fluorescent bulb, which attaches to a g10q lampholder. I understand I will need to wire it up to a ballast and starter, which I will enclose within the concrete lamp base.

I'm planning on trying to sell these lamps online and to local retailers in the UK. What safety regulations and requirements should I follow, and where can I find them?

I know they should be PAT tested as a minimum, but I have struggled to find any other definitive answers as to how I can reassure retailers that my lamps won't electrocute their customers, or burn their stores down.

Thank you all!

(https://www.nationallampsandcomponents.co.uk/fluorescent-tubes-and-starters/circular-fluorescent/22w-circular-216mm-triphosphor-3000k)


texts: Altium: how to disable Messages dialog when jumping to component

texts: When I use Jump Component (shortcut j-c) and enter a designator, the Messages dialog pops up with a history of recently searched designators. Is there a way to prevent the dialog from showing when I use Jump Component?


texts:
I'm in the planning stages of a project where I'll need at least 2 stepper motors. As an added challenge to myself, I'd like to try using just one H-bridge to drive both steppers independently from each other. My idea is to use transistors (or a transistor package) to control which motor is getting the output from the H-bridge and I'm wondering if, practically, this is a smart approach, or even possible. I'm also planning on making the H-bridge out of discrete components instead of buying a dedicated IC for it.

The project is nothing fancy, just something to help me explore and mess with stuff. It's a two-axis drawer (basically a printer) with a pen mounted in the sliders connected to the steppers and a solenoid to pick up the pen from the paper, controlled by an Arduino.


texts: Spike and Ripple Currents in PWM-driven DC Motor

texts:
I intend to drive a DC motor through an H-Bridge with PWM Control. Therefore I'm using only NMOS powerfets to drive the bridge. However I'm facing an issue with the current at the MOS gates. As you can see from the image below, the gate currents suffer periodic spikes.

Additionally, the lower the potentiometer value - the one that regulates the PWM Duty Cycle -, the more ripple I obtain in the current going through my DC Motor model. For instance, the image below shows the current going through the motor when the potentiometer is set to 10%.

How can I verify if the gate current spikes and/or rippled current driving the DC motor are harmful to the motor or not? Since, in theory, the motor is powered by a perfectly DC current.
Here's one side of the H-bridge I'm setting up:

The IC I'm using is the IR2104S, since it has built-in dead-time to avoid shoot-through currents. The powerfets are IRF530 NMOS.
Here's a picture showing M2's drain current measured through a low-resistance high-wattage sensor resistor.


texts: How should I setup the PIC's LCDREF register?

texts:
I am using PIC16F1946. It has a LCD driver module in it. I read the datasheet and it mentions LCDREF register (Section 27-3 in the datasheet). I cannot find useful info on how to set it up?

Could anyone help me out here please.


texts: Parallel ADC IC interface to FIFO Memory

texts:
I am referring below schematics attached here.

ADC AD7821KP IC is interfaced with IDT7203 FIFO memory. Now, I want to use 12 Bit ADC in above schematics. But I am not able to find 12 bit FIFO Memory for storing results.

Is there any Memory IC which will be suitable for above application OR any technique to use 9bit as 12 bit memory?

Thanks in advance.


texts: How do i go about using the joystick with an Arduino?


texts:
I'm trying to understand the circuit presented in this video: https://youtu.be/qfgX93o8HzY?t=229
We states that when the power is first turned on, the left-most transistor has 0v at it's base so it is off - but my current understanding of electronics says it is actually on - for the same reason the other transistor is - there is a current via the 100k resistor direct to base.
He says that because the capacitor is connected to the Collector of the right-most transistor (which is itself at ~ ground) the base of left-most must also be at ground - However i cannot recreate this in PSpice (see below).
I'm missing something obvious/simple but its not quite clicking for me - So thanks in advance for any pointers in the right direction.

Edit: Looking further into the voltage traces when this is running, I'm struggling to explain why the observed voltage at the base of Q9 drops to -2.5V? I tried to reduce the circuit to something similar to see if that showed why the rise and fall of the voltage on the other side of the capacitor would cause this change but I think I fell down a rabbit hole:


texts:
I am currently building an induction heater to anneal brass casings. I have bought a 1000W induction heater with coil and a 36V 16.6A PSU to run it.

Everything works well, I can put in a screwdriver and heat it to 600*c in a matter of seconds, but once I put in a piece of brass it takes it a very long time to reach over 100*c

The coil is 508mm in diameter, and has 7 coils.

Doing a quick calculation,

my Inductance = 0.201 microhenries

Working:
(600W - 100W) x 3.32s = 1660J
1660J ÷ 10.95g ÷ 0.38J/g°C = 398.94°C

It should take me just over 3 seconds to reach 398°C/750°F but it won't reach over 100°C

What should I change to improve heating, should I remake my coil to a smaller diameter?
My brass is 1cm in diameter and very thin.


texts:
This question is related to AVR deprogramming itself.

Project info:
We have a battery powered product using an ATMEGA644P.  The application permanently runs in sleep mode and only wakes up once a second (RTC) or when one of the two external interrupt lines is triggered.

The device features a pretty simple boot-loader that is communicating over UART (using RS232 interface IC). Its just serves as a convenience method to update the firmware so that no hardware ISP programmer is required. (The boot-loader expects checksum secured telegrams)

The devices was designed with internal brown-out DISABLED because it doubles the power consumption and long battery life is mandatory (I guess that an external brown-out detection should have been used - a re-design is in work).

Problem:
Every few month a device just stops working, there were NO firmware updates performed on those devices. However, after further examination, the flash contents of those devices seem to be corrupted. Furthermore, the batteries of some of those devices were still good, but I don't want to rule out some kind of under-voltage situation.

This is a comparison of the original flash contents (left) to the corrupted contents (right):

Some observations:

A corrupted block always consists of at least one flash page (256 bytes) and is page aligned. In other words: Only whole pages are affected, not single bytes.
Corrupted content reads 0xFF most of the time, but may also contain some other values or be completely "random".
The small bar on the left side of the image shows all affected areas. For this device, its about one tenth of the total flash contents.
We had one device where only a single page was affected.

It is totally plausible that an under-voltage condition while writing the flash memory can corrupt flash contents. However, this would mean that some flash sensitive instructions have to be executed.

Maybe the controller is randomly restarting due to under-voltage and the boot-loader code is acting entirely unpredictable during this time. To quote some guy from another forum regarding under-voltage:

  "It is not only random instructions from flash being executed, but random instructions period (there is no guarantee that the code from flash will be read & interpreted correctly). Along with this other parts of the mcu may not behave as designed, including protection mechanisms."

Question(s):
Do you think the "random behavior during under-voltage and executing some instructions changing data in flash pages" - explanation is sound? If that is the case, why don't we see this kind of errors all the time just as a cause of some software issues (stack overflow, invalid pointers).

Do you have any other ideas what could cause this kind of corruption? Could this be caused by EMI/ESD?


texts: Identifying a connector for an AR headset

texts:
I'm trying to identify the connector between the Epson Moverio BT-200 smart glasses (similar to the Google Glass) and the battery pack/touchpad.

Some measurements:

20 pins top
20 pins below
Pitch (between individual pins) - 0.50mm
Male connector outer height - 3.20mm (0.122 inch)
Male connector outer width - 16.60 (0.653 inch)
Male connector inner width (inside the metal part that fits into the female connector) - 11.1mm(0.437 inch)

Female connector inner width - 16.6mm (0.653 inch)
Female connector inner height - 3.2mm (0.126 inch)

We want to build an inexpensive HDMI interface to use with our DJI phantom 3 pro quadcopter. Would be great if anyone has ideas on how we can identify this connector.

Thanks!


texts:
I have two UART ports on an MSP430 that need to stream data between a Host Controller (Freescale IMX6) and potential devices that can be hooked up on the other side. The Host Controller communicates (read/write) data with MSP430 (including serial data from devices) over an I2C bus.

IMX6 --writes I2C--> MSP430 --writes `UART`0--> Device 0
IMX6 <---reads I2C-- MSP430 <---reads `UART`0-- Device 0

IMX6 --writes I2C--> MSP430 --writes `UART`1--> Device 1
IMX6 <---reads I2C-- MSP430 <---reads `UART`1-- Device 1

Currently, UART receives are interrupt-based on the MSP430. When a byte comes in, it interrupts the MSP and tosses the byte into a ring buffer.

UART writes, on the other hand, are polling-based. In my main loop, I have a UART_process that runs. In that process, I check if the UART TX hardware single-byte buffer is ready for a byte. If it is, I write in a new byte, set of the transfer, and exit the function.
With this functionality, it could be (for example) 1 millisecond before I send out another byte to the UART device, even though the MSP's UART may have been ready to transmit another byte much sooner.

My concern is that if I have to manage 2 UART ports from the MSP430 that are both running at 115200 Baud, will writing a byte out every 1ms (potentially a little more or less) be sufficient for the device? The baud rate transmission will still be at 115,200 obviously, but the bytes will be streaming over slowly.
Some quick n rough calcs:

1 bit  @115,200 takes about 8µs.
1 byte @115,200 will take about (8µs * 8bits) = 64µs.

So as you can see, a new byte can be transmitted from the UART driver, let's say every 100 µs. If I'm sending a byte out every 1 ms, I'm not transmitting to the device very fast (about 1/10) compared to the potential max speed.

I don't want to transmit UART via interrupt, because I fear that 2 UARTS with both RX and TX being interrupt based could take over my CPU. I have other important things I am doing as well on the MSP430. Like constantly accepting I2C messages via interrupts and handling a timer interrupt based IR process.

I've considered adding a simple task scheduler. But that wouldn't do much to speed things up because I'd probably run the task scheduler at 1ms intervals. This would only guarantee a UART byte write every 1 ms (which was what I was proposing above anyway). The other option is to look into using the DMA with the UART transmit. But I only want to explore these options if I have to.

From your experience, will most UART devices/implementations be OK with receiving bytes at a slow rate compared to the Baud rate? Any general suggestions? Let me know if I'm being unclear on any points. Thanks!