texts: 5a 24v mosfet h bridge to power solenoid

texts:
I created a mosfet h bridge based on the design from bristolwatch.

I'm using it to power a solenoid (that needs +24v or -24v to open/close a valve).  If I connect the solenoid directly up to my 2200uf capacitor, I can get it to turn on/off.  But when I connect it through the h bridge, it doesn't appear to be getting enough power (a multimeter on the capacitor shows it only draining halfway).  I've tried using a 10k, 30k, and 100k between the source-gate of the p channel mosfet, but none appear to be working.  Q5/6 are PN2222ATF powered by a pi. (slight modification is a 100k between the base-emitter, but I'm pretty sure I've tried it with and without this)
My hunch is that it has to do with the gates not getting enough power to open up my mosfet enough for 5a.  The gate threshold voltages are 1-2v (N) and 2-4v (P), but I'm not really clear on whether that is a difference of 1-4v from my 24v or 1-4v total.  And I can't figure out how to calculate the ideal resistor for gate-source and if i need a separate resistor for my n channel gate since it has a lower threshold.
Thanks for any help!
Datasheets
P Channel MOSFET
N Channel MOSFET


texts: Using input capture when the PWM duty cycle is 100%

texts:
Suppose I have a PWM signal whose duty cycle varies between 0% (logical LOW voltage all the time), 50% all the way upto 100% (logical HIGH voltage all the time.)
In case of 50% it easy to measure with an input capture module, but when it is 100%, there is neither rising nor falling transition to the input signal (hence the input capture module can't trigger start/end of the signal.)
Is there a standard way to deal with this exception in the input capture code?
Actually I am trying to implement it for an STM32F030C8 using Timer17 peripheral in input capture mode. I have a few peripherals which output PWM signal in normal scenarios and an "always HIGH" signal in case of errors. That is the need for measuring a signal with 100% duty cycle.


texts: Communication between embdedded system and Mobile phone

texts:
I am software developer and new to the embedded systems.
I need to use a wireless communication method to send/receive data from embedded system and a mobile smart phone (Android - iPhone).

My target to minimize the cost of the unit and have a long battery life.
Which module should I use ?

GPRS module.
GSM/GPS module.
Bluetooth module.
WiFi module.
Bluetooth/Wifi module.
Radio transceiver module.
Other


texts:
I'm still new to electronics, so beae with me. Luckily it's a short question:
I'm following a schematic that calls for a 1.7-1.8v led, but unfortunately I only have 3v 20mA LEDs.. Is there any way I can reduce the voltage, like with a resistor or something? I tried looking it up but all I found was reducing current from a battery with a resistor.

Here is my schematic, it's an led light indicator.


texts: Type-C Cable : Different between Active cable, Passive Cable, EMCA

texts:
Please anyone help me to clarify different btw Active cable, Passive cable, EMCA.
Their definition seem difficult to understand.
Additional, in USB-TypeC Specification from usb.org:

Active cable :  An Electronically Marked Cable with additional electronics to
condition the data path signals.

So what's meaning of "electronics condition the data path signal" ? And what is its purpose?

Thank you!


texts: How does grounding the circuit provide safety?

texts: I don't understand the concept of grounding a circuit for safety reasons, in this circuit that I simulated, imagine my hand touching the circuit as the closed switch. I am creating a closed loop between my body and the circuit letting current to pass through me. If the circuit was isolated or floating however, it would be impossible for me to get zapped because there would be no closed path for the current to flow in and out. So what is the point of connecting the circuit to the earth ground? And secondly, does connecting any point in a circuit to the earth ground pull the voltage in that point to the ground level?


texts:
I saw arguably new and interesting lithium battery which is Lithium Titanate Battery(LTO). It has high discharge and charge current characteristic. Also, it has lower degradation graph when comparing with lithium ion battery. For further information :

https://en.wikipedia.org/wiki/Lithium-titanate_battery

I am planning to build 18s 1p battery pack. My battery cell features: 2.3 volt nominal voltage. It varies between 1.5-2.8 volts. Single cell can charge and discharge 400 amps continuously.

I assume that I don’t need a BMS because there are no parallel cells, or am I missing something? What kind of protection do I need when I charge or discharge my battery pack?

I am looking forward to hear your technical suggestions.

_________________

Better specifications here


texts: Limiting voltage transients with a TVS diode

texts:
My goal is to suppress transient voltage spikes from damaging the 5V, 600mA Step-Down Voltage Regulator D36V6F5. I believe the transients are a result of high inductance in the wires between the power supply and the circuit.

There are a couple of solutions listed in Pololu's guide to transients, but only adding a series resistor or a large electrolytic cap is possible in my case.

The resistor would result in power loss and a cap is just physically very large.

So my idea was to use a TVS diode -- SMF48A-TP. Now ignoring the fact that the maximum breakdown voltage Vbr is 58.9V, which is already too much for the D36V6F5, whose limit is 50V, I'm still seeing spikes of up to 65V.

Why is that?

I don't have the circuit for the D36V6F5, but I do know that it has 5.3 uF and 100 nF capacitors on the input.


texts: if settling time is smaller for underdamped case then why we call it underdamped - parallel rlc circuits?

texts:
Does less settling time means that the response dies out quickly?
If so the settling time for a just correct Resistance such that the circuit is slightly underdamped is least, then it's most damped(considering the definition of damped losing energy gradually, what it intuitively means).
Then shouldn't it be called overdamped instead?
Or maybe I'm confused with the relation between damping and settling time?


texts: Why is my drain circuit always drawing current, regardless of MOSFET gate state?

texts:
I'm building a circuit that will drive various 12V solenoids and a pump.  I use an MDF1903 MOSFET to switch the pump and a ULN2003A to drive the various low-power solenoids.  A micro-controller signals the MOSFET and transistors accordingly.

In order to simulate the 12V components, I've replaced them with 2V LEDs and appropriate resistors to limit current at 12V.  This works fine for the LEDs switched under the transistors, however I've noticed that the LED switched by the MOSFET is always on (albeit at low intensity).  Why is this?  Shouldn't this only occur when the gate voltage is high?  The program on the micro-controller initializes the output pin to the low state and the output pin is grounded with a 10K pull-down resistor.

Here is a simplified circuit to illustrate my dilemma.

simulate this circuit – Schematic created using CircuitLab

For what its worth, the ground inputs and outputs on my Buck converter are common.  The LED draws the full 20mA in its "on" state, and only 0.9mA in its "off" state.  I also measured 10V across drain and source/ground, which is the 12V supply less the 2V dropped from the active LED.  Regardless, I'm a bit confused as to why there is any current draw at all.  Have I done something wrong, or am I thinking about this too hard?


texts: How to calculate the electromagnetic strength between an iron piece and an electromagnet IF both of them are not parallel?

texts:
I am sorry if this question is a bit silly, but I don't really know how to calculate the electromagnetic force between a magnet and an iron piece if they are not parallel to each other. The illustration is attached here.
Any kind of help would be greatly appreciated. Thank you very much.


texts:
Here's the link to the project I'm currently working on: http://www.allaboutcircuits.com/vol_6/chpt_4/5.html.

I have a question about this transformer. I haven't been able to find an audio transformer or 120/6 ratio transformer. The only available transformer that I can buy is 220/6 V of 3.2 or 5 or 6 W. So, of course my question is will it work normally? Also I don't know anything regarding this transformer power because that isn't mentioned in parts description.


texts: Generating electricity by moving door handle to produce 3 Watts?

texts:
I want to attach a generator to a door handle and have the output charge a battery. My system needs to provide about 3 Watts. A similar question was asked here and I referenced it to get an idea of what kind of force, torque, power, and energy are needed to turn the door handle. These values, however, were calculated without the generator attached to the door handle. My question is, how would attaching the generator to the door handle affect these values? I know that the generator will also require some torque to turn it. What I'm confused on is if I should just connect the generator directly to the door handle or use gear ratios to figure out some gear system? The gear system would be to increase the angular velocity of the generator based on the gear ratio and the angular velocity of the door handle. Generators that I have looked at usually have some rating where they say what voltage and current are produced based on the rpm, so I figured I could get these rpms with gears, but gear ratios also relate the two torques.

I know there is more than one question in here, but if you could help me with understanding any of this I would really appreciate this. Even if this isn't quite feasible, what would be the major constraints?


texts: Ultrasonic transducer driver/receiver ultralow power issues

texts:
I'm looking how to easily drive ultrasonic transducer Prowave 500MB120 or similar from MSP430. I found TI: Ultrasonic Distance Measurement With the MSP430 and  AnalogDevices-Ultrasonic Distance Measurement CN-0343 application notes. Both solutions use complement MOSFET output, CD4049 (5-18V, cca 20mA) vs. ADP3629 (9.5-18V, 2A). Because at least for testing purposes voltage <9V is advantage I'd prefer CD4049 option which is also recommended in Prowave sheets. Transducer impedance is 800 ohm, I believe current is in tenths of mA, am I right ?
I plan substitute it with CD4041 which has almost symetric max.source/sink output current.

I need battery powered circuit so low-power consumption in sleep mode is essential. How to do it ?

1) I don't think I can leave MCU output in Hi-Z state because it's against TI's recommendation force HI or LOW output when unused, not Hi-Z!. And probably the same problem with output FETs.

2) when I force HI or LO with CD4041 then there is full DC voltage (Vcc-GND) on transducer (with serial capacitor). What is supposed quiescent current ?

3) drive from 2 complementar MCU timer outputs. It allocates 2 timers and MCU pin but in sleep mode both output can be forced to HI (or LO), i.e. transducer is not powered (Vcc-Vcc or GND-GND). Also CD4041 cannot be used as well as there is internal invertor.

Regarding receiver part I wonder how to sleep easily amplifiers as they have no SHUTDOWN pin. I plan 2 stage amplifier connected to MSP comparator input. I found some ICs from TLV277x series are produced also with shutdown but they are rare in Europe, alternatively AD8647.

I have an idea powering amplifiers from dedicated MSP pin with decoupling capacitor, i.e. on/off it as needed. 3V is ok, available current should be sufficient too. Is it feasible this way without adding MCU noise or have I overlooked some issue... ?


texts: Lithium ion solar battery charger circuit using SPV1040

texts:
I'm studying to build a solar battery charger and I came across this attachment link

STEVAL-ISV012V1: lithium-ion solar battery charger

It's what I was looking for except that I want to use 5V/0.8W 160ma solar panel instead of 0.4W used in the circuit.

So, want to know If I can use this part Amazon UK - 5V/0.8W PV in the place of 0.4W. And also as per the document the circuit components has to change with PV cell range, could you please guide me how to determine.

Thanks


texts: Suitable wire protocol for old house burglar alarm

texts:
My house and outbuildings have a simple 20 year old burglar alarm with magnetic open/closed, shock sensors and a few PIRs.
The main control panel has failed so I was looking to modernise the alarm system and hook it up to the Hassio Home Assistant.
I had hoped to use the existing cabling, new sensors and an ESP32 in each main window/door/area.  The ESP32 would be connected to each sensor and would signal an event using CAN (SN65HVD230 CAN Bus Transceiver) over existing cabling.  This would allow me to see exactly what windows or doors are open which is something the old system could not do.
Some potential problems however:

The cabling is effectively a star network and CAN is designed to work
on a bus
The current system is multi-zone and cables are buried behind walls/underground. CAN requires a
termination resistor at each end of a cable

Total cable length is about 120M and the cables are 4 core.
Might CAN work on a lower speed with this topology, or is there another on the wire protocol I should use? I also considered using existing wiring for power alone and ESP-MESH for communication but that looks even more complicated.


texts: Does a pcb as patch antenna isolate itself?

texts:
I'm currently working on a prototype patch antenna for UHF. Since I'm out of copper at the moment, I used empty PCB's as base material (don't mind the PCB in between, it's only a spacer):

So now my question: Does the plastic part of my director isolate the magnetic / electric field to the reflector, or is it harmless?


texts: Industry Term for Missing/Floating/Lifted Pin on IC Package

texts:
A recent question asking how to deal with a missing pin on a specific IC (Use the heatsink tab which is connected to ground) made me curious. What is the industry term for a pin that is physically missing or otherwise non-connectable pins?

I know these are common in the DPAK/TO252, and sometimes on SOT packages.

Some research shows that the TO252 has both a -3 and a -3+ variation, where the -3 has the truncated pin, while the -3+ version has all three pins at regular length. Same goes for the -5 and -5+ versions.

But what is this type of truncated pin called? There has to be an industry term.


texts: Buck-converter dynamic output-voltage using digital-potentiometer

texts:
I am driving a load at 40 V, 4.8 A, and would like to dynamically change the voltage being supplied to it, ideally creating a 2-40 V range with increments of <0.1 V. To achieve this, I am thinking to use a buck-converter [like this 60v-10a one], and adjusting one of it's feedback resistors using a digital potentiometer, thus changing its output voltage to go between 2-40 V.

Are there any concerns with this method, or better yet, is there a better way to achieve this output? I have limited experience with buck-converters, and I am not seeing any references online for a system like this. All references use a constant output voltage/current to design around.

For more context, the load is a peltier heating/cooling module. I have previously driven these using a low-frequency PWM, which works but a) leads to small temperature fluctuations, and b) that constant cycling on/off will most likely greatly reduce the peltier's lifetime.


texts:
I implemented a position loop using lead lag compensator on bldc motor drive. I am not getting stiffness at required position. Can anyone help with the issue.

Max tolerance 0.01deg with the reference position


texts: How to reliably read register positions from an MCP23017 over I2C?

texts:
I am using a MCP2221 to talk I2C to a MCP23017. Using python3 to interface.
I had some trouble with the adafruit libraries, so have resorted to using the PyMCP2221A library. It works great for writing to the MCP23017. However, I don't know how to ensure I am reading the correct position of the MCP23017 registers.
For example in the MCP2221 I2C Terminal software I ran the following series of commands. If I read just one bit (say that is a bus error, emf issue, or other) then the buffer in the MCP23017 does not reset itself and the data becomes shifted and I will read the data in the incorrect register.

Looking at the adafruit mcp23017 code it looks like they reset the transmission just before reading. This makes sense, but not sure how to do that in python or how to access this I2C stop function from the PyMCP2221A library or the upstream cython-hidapi library. Also not 100% sure it just requires a stop signal or something more.
/**
* Reads a given register
*/
uint8_t Adafruit_MCP23017::readRegister(uint8_t addr) {
  //read the current GPINTEN
  _wire->beginTransmission(MCP23017_ADDRESS | i2caddr);
  wiresend(addr, _wire);
  _wire->endTransmission();
  _wire->requestFrom(MCP23017_ADDRESS | i2caddr, 1);
  return wirerecv(_wire);
}

Any guidance is greatly appreciated!


texts: Why is it important not to exceed Vcc at the input to a logic gate?

texts: What happens to a logic gate (besides magic smoke discharge) seeing a voltage greater than Vcc? Is it just because the gate was not designed to handle a higher voltage than the recommended Vcc, or is it also usually important to limit the voltage to the actual Vcc even if the chip works within a range of voltages?


texts: Sampling one signal with two separate ADCs at different rates?

texts:
I have a system where I need to pieces of information from a single analog signal. The first is a time-average of the signal, over the course of around 0.25 seconds. The second is a detailed breakdown of the signal at approximately 135 kHz.

A little more detail: the input signal is correlated with a 1500 Hz square wave and broken down in to "in phase" and "out of phase", where everything in phase arrives when the square wave is high, and everything out of phase correlates to when the square wave is low. I've achieved this already with the 135 kHz sampling, and I can easily distinguish between in and out of phase. However, the averaging uses a lot of computing overhead and it's not strictly necessary to be sampling this fast all the time. I can't pause frequently enough to make the averaging efficient, and holding all that data in an array overwhelms my memory.

The reason I need the high-resolution measurement is because I need to know how well-correlated the signals actually are, since it's possible that my input signal could lag behind the reference wave slightly. This piece of information is actually critical to my setup, since it tells me important things about the stuff I'm measuring. Ideally, I'd construct a system where the slow measurement is essentially uninterrupted and the fast measurement happens a few times per second.

If I were to use two separate ADCs, I figure I could use one to do the "slow" measurements, use on-chip oversampling, and get a high-SNR signal that I can then casually average and report normally. Another ADC could do the high speed measurements and retrieve the phase separation between my signal and my 1500 Hz reference.

My question is about best practices. How do I make sure that when one ADC is measuring, it doesn't interfere with the other ADC? I've read a little about using buffer op-amps to isolate the signals, would that be the way to move forward? If I can reliably segregate the input into two ADCs, I can work out the details of the math later.


texts:
I have some silly question that I hope someone can answer.

If a coord, connected to the wall socket, is damaged exposing the wires inside, and one accidentally touches these wires, would the current going through the body to the ground be lethal. I would assume it is, but I have read that the resistance of the human skin is 100,000 ohms, which means the current through the body would be 240V/100,000ohms = 2.4 mA . I also read that lethal current through the body is around 15 mA, so 2.5 mA quite low?
If I am insulated from ground (for example standing on a chair), what would happen if I shove a fork in to the power outlet (or some other metal so that the power is short circuited). Would I be unharmed because the current would not go through me because I am not connected to ground? (Of course the fuse would break immediately, but lets assume that there are no safety-systems).
The article on a website mentions that in this circuit

the guy does not get electrocuted, but in this image

he does get electrocuted. Why is this? In the first Image the person is connected to ground (0) and is also holding the the high voltage line (240V), so the electrons/current would want to flow through him I would assume?


texts: Can one battery bank be connected to two static UPS devices?

texts:
To make a redundant static uninterruptible power supply (UPS) configuration such as pictured below, I have seen warnings in UPS manuals that each UPS is to be connected to its own battery bank.

But is it okay that for this configuration I'd remove the battery of the second UPS, and put a jumper so that the battery of the first UPS is also connected to the second UPS?


texts:
I was running through the datasheet of CC2500 (Low-Cost Low-Power 2.4 GHz RF Transceiver) which has a dimension of 2.40mm X 2.40mm approx. It was really amazing to find such transceivers to be fabricated in such a small area.Infact a transceiver requires a lot of R,C and even L.Resistors, Capacitors and semiconductors are easy to be imagined on an IC but an Inductor!!!

I haven't work in any VLSI industry so it would be great if someone can tell how these inductor logic is implemented on IC. Although it is said that gyrators are alternative solution, but thanks for pointing if my knowledge is correct.


texts: Why AC supply is rectified first before stepping voltage down?

texts:
I have opened one of my phone chargers and was trying to understand how it works.. I found IC MB6F just at AC input which came out to be a bridge rectifier.

My question is why AC is first rectified instead of stepping it down with transformers ? As stepping down in DC with a buck converter wouldn't be as efficient as with transformers, why is this path chosen ?


texts: Replace 5mm LED with High Power without changing the circuitboard

texts:
I would like to know if I can replace the LED on my radar detector remote controller with a high power one without changing the circuit board components.

Attached is the board and I'm looking to replace the "Alert LED" with this one:

Brand: Chanzon
Power: 3 Watt (Max)
Emitting Color: Natural White (4000K-4500K)
Recommended Current: 600mA
Forward Voltage: 3.0-3.4V
Luminous Flux: 260-280LM


texts: I have been wondering what this blue thing in the top is called. I want to make the same kind of buttons for a project but i dont know what they are called and how to make them. Please help.


texts: How quickly would a pocket blowtorch ruin PCB traces?

texts:
I need to remove an obtrusive Mini USB port from a small PCB, and I initially wanted to use my Soto Pocket Torch to melt all of the leads at once and remove it. I've tried desoldering braids and solder suckers, but the component is in such a way that neither work. I don't care how hot the port gets, but I know that torching the component off might ruin the traces on the board. Does anyone know if a torch like this would desolder the part before the board suffers any damage, or does it not take long to cook the PCB? The torch I am using produces 1300C˚ of heat.

EDIT: I just want to clarify the part I'm trying to remove. Here are some images of what the component looks like:


texts: When would be occasions to use a lower clock given that high speed would always be preferable?

texts:
I am using STM32F0 MCU and STM32 CubeMX configurator. I encountered the clock configuration below

When would be occasions to use a lower clock speed? Wouldn't faster always be preferable?


texts:
Someone know how a common cheap 4-wire load cell is made?
I'm referring at one that it is in the cheap Chinese scale, like this.

In particular, using a multimeter, I would try to identify the structure of load cell for simulation purpose.

I know that there is the Wheatstone bridge under the load cell, but I'm unable to identify correctly the shape of it (eg how many strain gauges are in the load cell) and the resistor values.

What kind of measures is useful to identify this kind of load cell?


texts: Basic Questions About a Simple Circuit (GPIO-Controlled Relay on RaspberryPi)

texts:
I want to control an 8-port Sainsmart relay from a Raspberry Pi (via the GPIO pins) and I'm trying to understand a couple of things about the suggested circuit for integrating the two.  Here is the circuit:

As the explanatory text says, the relay is "active low" but, for a number of reasons, I want to control it from the RPi as an "active high" device (i.e. raise a GPIO pin to high to activate the relay, and lower it to zero to deactivate it).
I have it working and I sort of understand what it does, but I have a couple of questions:

How is the sizing of the resistor(s) determined?
What is the purpose of the 10K resistor?
This design implies to me that the RPi and the relay must share a common ground.  Is this true?  Does it mean they must also share the same power supply?


texts: New to embedded systems: help selecting the right chip for 8051 project?

texts:
We are to create an 8051 microcontroller based system as a university project. We have the specs, which says we need an Atmel 89C51 chip. But Atmel recommends that we use AT89S51 instead of AT89C51. Why is it so? What is the difference between the two?

Also, what other hardware do we need to connect the microcontroller to a laptop in order to burn the program? What is a "programmer", do we need to build it ourselves? I've also read about ISPs and "off-the-shelf development boards" but I'm a bit confused here regarding what hardware exactly we need to buy.


texts:
I have recently found this tutorial online about making a simple RFID spoofer, using only Arduino, used paper roll, coil wire and some passive components. I thought it was pretty neat and decided to implement the circuit myself. But instead of using NPN transistor 2N3904 as mentioned in the tutorial, I'm trying to make use of my TLE2301 power-amp. I think it can be seen as modification to the original circuit since use of power-amp means that coil will receive more power and be able to transmit signal at longer distance (correct me if I'm wrong). So I'm currently trying to breadboard this and thought I would ask for advice to find out if I'm doing it right.
Here are schematics that I made:
1

I haven't used power-amps before and it would be really helpful to find out if this is the right way to use them.


texts: Fast approaches for Soldering / PCB assembly

texts:
Our team (three hobbyists now developing our first serious device) is interested in soldering/assembling approximately 200 PCBs. We've already found a low-cost manufacturer for the raw boards, so just the assembly remains.

We'd like to keep the total assembly time and cost reasonably low of course, and therefore are considering various approaches.

The numbers are as follows:

200 single-sided PCBs
5 cm X 5 cm board size
30 capacitors and resistors (0603 size)
5 components QFN / QFP
4 components SOIC / SSOP
1 USB connector
1 SD-card-socket

The raw boards may come bunched/panelized as manufactured but essentially, we want to get, on average, each individual board done in less than 20 minutes ideally.

Which one of the following options would you suggest as best? (given the cost constraint and the desired time per board I stated above):

Option A: Hand-place components with tweezers, solder resistors and caps with iron, and solder QFN's with hot-air gun ?
Option B: Apply solder paste (possibly using a stencil), hand-place components with tweezers, then use a toaster/reflow oven ?
Option C: Get it done entirely by an assembly shop ?

Note: All three of us in the team have roughly around 6 months of consistent experience with the traditional soldering method (tweezer, soldering iron, and hot-air-gun). We don't mind any necessary hand-work at all because we're definitely excited about our board, but it would be good to know we're choosing an efficient approach.


texts:
The load cell(withstand 200kG) is connected through a XK3190-A12+E indicator and the data can be read through RS232.

However, the question is:-

How can I get the data from RS232 serial port which connected from weighing scale (load cell - withstand 200kg) to Arduino and from Arduino send a signal to control an AC cement pump?

Can someone please advice. Thank you:)


texts:
I want to replace an NE555 with a 74HC123D in a battery powered device. It is used to clock a CD4017, for which I need a pulsed signal of 46Hz.
I read that a 74HC123D needs less power than a 555. How can I generate that signal with it?

My controller (which is also in the circuit) needs less than 1µA and a timer like the 555 with 100µ would be quite an amount of additional current.


texts: Connecting a 12v router to a 12v battery

texts:
can I connect a 12v router directly to a 12v battery which normally will be at 13-14v (because most of the time it’ll be charging)?
The router is a TP LINK Archer MR200 rated at 12V 1A


texts:
Does I2S support sending multiple mic (around 20) channel data? If no, what is the limiting factor in supporting multiple mics?

Also, is there any way to send multiple channel data from different MICs in any other format other than TDM, if TDM on I2S doesn't allow more than certain number of channels?

It is a generic question and any hardware can be sited as an example. All I am after is that given any hardware what limits the maximum mic supported?

Mic stands for microphone.


texts: Choosing a dev board for physics simulation

texts:
I am looking for a development board (microcontroller based), with reasonably powerful math functionality, for real-time simiulation of oscillation systems (pendulums,SHM,shock absorbers etc.) and other similar systems which can be modelled using differential equations. I hope to represent the solutions graphically on an ossiloscope, so the board should also have analog output with sufficient resolution.
Thanks,
Alex


texts:
AVR Watchdog timers.  Is there any way to read the watchdog timer from within the code?

Intended use case:  To get an approximate idea (very rough, +/- 1sec) of how long it has been since the watchdog timer was last reset.  This would allow my code to guess at how long it's been asleep, without an external RTC or similar.

I've tried looking in the attiny85 datasheet, and not found it.  Any ideas people?


texts:
I have a 0-1kg load cell with 4 wires: Excitation + and -, and Signal + and -. I haven't had any problems wiring them up correctly without amplification, and my voltmeter shows me a 1 mV difference between no load and full load (1 kg).

The signal has to feed into an ATmega microcontroller, so ideally I would like to be able to use the full 10-bit analogue scale when reading the values (voltages from 0 to 5 V). In any case, as it stands now, I only get 1 / 1024 as a reading under full load.

I have a prototype deadline for a product soon, and silly as I am I don't have any instrumentation amps left. I tried wiring the signal wires to a general-purpose NPN transistor, but I'm not getting any amplification. This is the transistor configuration that I tried: ignore the double cell symbol for voltage, I couldn't find anything better.

I also tried adding resistors between drain and ground, but that didn't help.

Is there any way I could obtain a usable reading using components I have right now? Ordering a proper In-amp would take too long, and I don't really know what kind of op-amp would be suited for this kind of measurement (although that might be an option).

I don't have a big selection of stuff available, mainly different kinds of transistors. And of course diodes, capacitors, resistors, and the like.


texts: Low Pass filter using Parrallel components

texts:
I have a PCB design that I need to add a low pass filter. However I can only add components in parallel. It is going to be very difficult to cut the tracks or add components in series. Is there any way to create the low pass filter or similar filter ? The frequency of noise I have to reduce is between approx. 5KHz to 45KHz
I have to add a filter to the INA826A outputs as shown below


texts: Antenna Array - Hundreds of elements forming thousands of beams - How?

texts:
How would an antenna array of 100 elements be able to form 5000+ simultaneous beams?

Or do I have it wrong, there would only be a maximum 100 beams from the 100 elements at any one time and those 5000 potential beams are realized by hopping the 100 elements over the area so each of the potential 5000 beam gets a fraction of time from 1 element?


texts: Physics-Electrostatics: Find electric potential on a center of charged rod

texts:
Sorry if off topic, but I have a question in electrostatics. I didn't get any useful answers at physics forums, so if someone could help I will be very thankful.

I need to find electric potential of a uniformly charged rod at a point on a center of a rod if a referent point is at infinity. Rod is charged with 'Q' and has a length of '2a'.

If we consider left half of a rod of length 'a', than using superposition method on a half rod gives $$dV_{1/2}=\frac{kdQ}{x}$$ where 'x' is a distance between point 'B' and elementary charge 'dQ'. Now $$V_{1/2}=kQ'\int\limits_0^a \frac{1}{x}\mathrm dx$$ where Q' is longitudinal charge density. This integral is undefined. Could someone help?

Thanks for replies.


texts: How do I validate if the ADC data output I am getting is correct or not?

texts:
I have programmed the 10 bit internal ADC in PIC18F458 and displaying ADC output through UART. I have connected a 10 K pot to the ADC input RA0 and varying it to seeing the corresponding ADC output. Since, its a 10 bit ADC configured with +Vref = +Vdd = 5V and -Vref = Vss = Gnd, I presumed that for 0 Kohms, the ADC output should be 0 and for 10 K ohms, it should be 1023, however I have been getting some weird ADC output values when simulated in Proteus, and I am not sure on how to validate if its the right output or not. I have attached the images of the proteus simulations, data table and the code. And another thing is that, If I am using an unsigned int data type (ADC_data) to displaying the ADC outputs, then how come I am still getting negative values too?, provided +Vref = 5V and -Vref = Gnd = 0V. Can someone please explain this?

 #define _XTAL_FREQ 20000000
 #include<P18F458.h>
 #include"UART.h"

#pragma config OSC=HS
#pragma config OSCS=OFF
#pragma config PWRT=OFF
#pragma config BOR=OFF
#pragma config WDT=OFF
#pragma config STVR=ON
#pragma config LVP=OFF
#pragma config CP0=OFF
#pragma config CP1=OFF
#pragma config CP2=OFF
#pragma config CP3=OFF
#pragma config CPB=OFF
#pragma config CPD=OFF
#pragma config WRT0=OFF
#pragma config WRT1=OFF
#pragma config WRT2=OFF
#pragma config WRT3=OFF
#pragma config WRTC=OFF
#pragma config WRTB=OFF
#pragma config WRTD=OFF
#pragma config EBTR0=OFF
#pragma config EBTR1=OFF
#pragma config EBTR2=OFF
#pragma config EBTR3=OFF
#pragma config EBTRB=OFF

#pragma config DEBUG=OFF

unsigned int ADC_data = 0;
void ADC_Init()
{

ADCON0bits.ADON = 1;
ADCON1bits.PCFG3 = 1;
ADCON1bits.PCFG2 = 1;
ADCON1bits.PCFG1 = 1;
ADCON1bits.PCFG0 = 0;
ADCON1bits.ADFM = 0;

ADCON0bits.CHS0 = 0;
ADCON0bits.CHS1 = 0;
ADCON0bits.CHS2 = 0;

ADCON1bits.ADCS2 = 0;
ADCON0bits.ADCS1 = 1;
ADCON0bits.ADCS0 = 0;
}

void ADC_Convert()
{
ADCON0bits.GO_DONE = 1;
while(ADCON0bits.GO_DONE == 1);
ADC_data = (((unsigned int)ADRESH)<<8)|(ADRESL);
}

void main (void)
{
TRISAbits.TRISA0 = 1;
UARTInit();
ADC_Init();
while(1)
{
__delay_us(20);
ADC_Convert();
UARTNextLine("ADC Output is ");
UARTWriteInt(ADC_data,255);
}
}

Additional information :

Fosc = 20 MHz
Tosc = 1/20MHz = 0.05us
32Tosc = 0.05us * 32 = 1.6us
11Tad = 11 * 1.6us = 17.6us

Note that , In the code I have given a delay of 20us before the A/D conversion starts and not 17.6us.

I am not sure if the ADC outputs what I have got is right or If there is some bug in the code that's generating inaccurate values. Any comments, suggestions and advice's on how to verify if my adc is working correctly would be helpful for me to continue and understand.

Thanking you all in advance
~VD


texts:
I am a beginner in Verilog and my counter is not working. I'm not sure what I'm doing wrong. Below, I will type my code.
module jkfflop(
  input  J,
  input  K,
  input  clk,
  output Q);

  reg Q;

   always @(posedge clk) begin
    if(J==1'b0 && K==1'b1) begin
      Q <= 'b0;
    end
    else if(J==1'b1 && K==1'b0) begin
      Q <= 1'b1;
    end
    else if(J==1'b1 & K==1'b1) begin
      Q <= ~Q;
    end
  end
endmodule

module counter(
    input clk,
    output[3:0] q1,
    output[3:0] an,
    output a,b,c,d,e,f,g);

    wire sclk;
    wire t1, t2;
    and(t1,q1[1],q1[0]);
    and(t2,t1,q1[2]);
    slowClock ck1 (clk, 1'b1,sclk);
    jkfflop ff1(q1[0], 1'b1, 1'b1, sclk);
    jkfflop ff2(q1[1], q1[0], q1[0], sclk);
    jkfflop ff3(q1[2], t1, t2, sclk);
    jkfflop ff4(q1[3], t2, t2, sclk);

    sevseg S1(q1[0],q1[1],q1[2],q1[3],a,b,c,d,e,f,g,an);

endmodule

module sevseg(
    input A,
    input B,
    input C,
    input D,
    output a,b,c,d,e,f,g,
    output[3:0] an);

    assign an = 4'b1110;

    assign a = (~A & ~B & ~C & ~D) | (~A & B & ~C & ~D);
    assign b = (~B & ~C & D) | (~B & ~C & ~D);
    assign c = (~A & ~B & C & ~D);
    assign d = (B & ~C & ~D) | (B & C & D);
    assign e = D | (B & ~C);
    assign f = (C & D) | (~A & ~B & ~C) + (B & C & D);
    assign g = (~A & ~B & ~C) + (B & C & D);

endmodule


texts: I'm looking to power a wireless security camera from a 12v 1.4a battery being charged by a 12v solar panel. question is will i over amp camera from solar panel? camera has rating of 12v .5a" don't know output of solar panel yet"


texts: How does a specific pin in a port change its state (PIC Microcontroller)? Software vs Hardware

texts:
How does, for instance PortB.B0 = 1; command change the state of a specific pin in a microcontroller.

Microcontroller usually has a 8 bit data line, meaning it will write and read from the entire port simultaneously. My question is, is it the compiler's job to read the entire port set the specified bit and write the entire byte back to the port or can the microcontroller change a single bit on its own?


texts: Microprocessor architecture bits vs bus sizes

texts:
I am ready following on this website:

  "Another big difference between 32-bit processors and 64-bit processors is the maximum amount of memory (RAM) that is supported. 32-bit computers support a maximum of 4 GB (2^32 bytes) of memory, whereas 64-bit CPUs can address a theoretical maximum of 18 EB (2^64 bytes). However, the practical limit of 64-bit CPUs (as of 2018) is 8 TB of addressable RAM."

It confuses me little that how in the above example of 32-bit system 2^32 is used to calculate the addressable RAM? I thought 32-bits means that the ALU registers length is 32-bits so data bus size is 32 bit instead of address bus. Same for 64-bit architecture. Please correct me if my understanding of architecture bits vs bus-widths is wrong above.


texts:
I am seeing if I can trace out remake some circuit boards laying around.  For this particular board, I can identify all parts except this diode.

The part number is CK 2EZET (I am only assuming it is a zener based on the part number)

I tried googling just part of the number and came up with this:
2EZ Diode Series

Even if I cannot find the exact part, can I use any zener diode with similar characteristics?  It is reverse biased across 28V Input and GND (This board controls a motor)

Thanks for any help


texts: I need to use my Arduino Uno (ATmega328) as an SPI slave and have still have access to at least 5 PWM pins. The only issue is that this means I will have to use pin 10 (Slave select / PB2) as the fifth PWM pin because pin 11 (MOSI / PB3) is definitely not an option and it appears that the moment I initiate SPI in slave mode it stops PWMing pin 10 and simply turns it off. Would it be possible to somehow restore PWM access to this pin? I do not need this pin for slave select, I can rather use a plain IO and just attach and detach SPI upon interrupts from it thereby emulating slave select.


texts: Why SMPS call for multiple input capacitors

texts:
Implementing a LM2677 SMPS, the reference recommends 4 identical 10uF input caps for my design. I understand some of the reasons you may want to use multiple capacitors instead of a single one, and the datasheet has this note:

  In some cases multiple capacitors are required either to reduce the
  ESR of the output capacitor, to minimize output ripple (a ripple
  voltage of 1% of Vout or less is the assumed performance condition),
  or to increase the output capacitance to reduce the closed loop unity
  gain bandwidth (to less than 40 kHz).

However I'm wondering if it's just an old reference design and newer capacitors can achieve these same goals with a single capacitor. I'd like to preserve space with a single cap and I've had some problems with tantalums failing in the past.

For instance, why not use a single low ESR high ripple aluminum polymer like this one:
25SVPF47M


texts: My Vias are getting shorted on the back of my chip

texts:
I have a board design using a Atmel AT90USB1286 (VQFN64) and I placed vias on the back of the chip for routing purposes. Upon inspection, I found that the AT90USB1286 Chip has a thermal pad on the back of the chip and the vias were getting shorted to them.

Is there a way to prevent the shorting of the vias and still be able to utilize the area on the back of the chip for routing?


texts: Is it possible to very roughly estimate the CMRR degredation of a differential amplifier due to source imbalance given its datasheet

texts:
In the datasheets of differential input amplifiers there is a figure of merit called CMRR. This is normally experimentally measured at a particular frequency like 60Hz and presented in the datasheet along with the input impedance of the amplifier. But if our source is not balanced, i.e if the source has high output impedance the overall CMRR will degrade.

Below first figure below shows just a madeup example where a datasheet provides CMRR of such an amplifier at 60Hz as 80dB and input impdace as 1Meg Ohm:

Regarding the same amplifier in first figure, if we dont have opportunity to experiment, in the presence of a source imbalance where Rs is 1k as in second figure above, how can we very rougly estimate the new degraded overall CMRR? (Again for 60Hz Vcm and neglecting parasitic capacitances)


texts: Stability of circuit with amplifier with filter and impedance matching on input and output

texts:
I recently asked a question about an amplifier with impedance matching at the input and output of the circuit. Now that I know the matching is greater, I wanted to generate a Smith chart regarding the input and output stability of the circuit. The Smith chart shows this:

Is this correct? I don't know why these values are showing out of range. Is it possible to conclude from this that the circuit is stable?


texts: How to avoid garbage values received in UART communication

texts:
I am new to the embedded programming. I am doing a UART communication in PIC32MX795F512L MCU. I have somehow managed to transmit and receive data but not able to receive complete string.

I am doing something like this:

char Rx[5] ;                      //variable to store rx data
int i;
for(i=0;i<=4;i++)
{
   while(!DataRdyUART1());       //This check if data is ready to be received
   Rx[i] = getcUART1();         //This get one character from UART

 }
 putsUART1(Rx);              //Putting all the Rx data on UART

But whats happening is If I type 12345 then I get 123452345&+ its taking the last values. Again if I type asdfg then I get asdfg2345&+. After the 5th character, its showing some garbage values.

This should not happen. I don't know why its taking up 2345&+. How can I remove this. Please help. Thanks.!


texts: 4DLCD display doesn't work with ESP32 via SPI

texts:
I have ESP32 custom made board and I cannot make it work with 4DLCD-35480320 (no touch) display via SPI. I triple checked all the wiring. Everything works except the display.
I used Arduino IDE and available libraries specifically for SPI and HX8357D, but no luck. I think I'm missing something but I connected everything as per datasheet. Any suggestions? It is the first time when I'm working with SPI displays, so not 100% sure if all the connections are correct.

Display datasheet


texts: Confused with figuring out this piezoelectric sensor

texts:
I have this impulse-hammer with this specific model data-sheet.

It has output through BNC and if I hook it up to a scope or a daq board, I see nothing but some 50Hz noise when the hammer is hit. There is no direct output.

But when I use this hammer with this amplifier I get proper readings.(I don't know it is the proper type of amplifier for this hammer but it worked)

After I read this document I'm further confused.

Does this hammer have any built in amplifier in it?(Is it charge type or voltage type?) The data sheet says 100mV/LBF but I get no signal without amplifier.

What type of force sensor is it?


texts: How do I calculate the correct value for a capacitor block DC?

texts:
Are the capacitor values important for a capacitor block DC?

I need a block DC to transform an initial signal of 1.98 Vpp (1 kHz to 100 kHz) with the voltage ranging from 0 to +1.98 V:

For a signal of 1.98 Vpp (1 kHz to 100 kHz) with the voltage ranging from -0.99 V to +0.99 V:

What would be the most appropriate value for my case? And why?


texts: MIC6270 comparator - input voltage higher than supply rail

texts:
I've read in various places (such as here) that you can't safely feed an input voltage to an op-amp / comparator that's above its supply voltage, even when within maximum ratings.

However, the datasheet for the MIC6270 states a 2-36V supply, and also states (general note 6, page 2):

  Positive excursions of input voltage may exceed the power supply level. As long as the other voltage remains within the common-mode range, the comparator will provide a proper output state.

This seems pretty clear, but I'd like to double check - am I correct in thinking that this means the input voltage can above the supply voltage?

(Aside: my potential use case here is a signal that will be fed into the comparator of around 18V on one input and ground on the other. Supply will be 3V and the comparator output fed directly to a microcontroller pin. I was going to put a voltage divider on the signals going into the comparator, but if I don't need to do that then great.)


texts:
Why do power supplies generate noise? Also, I have read that the ground receives noise. Why? This phenomenon also appears in integrated circuits.

I had read in a paper that "We use a conventional differential pair as an input stage to robustly reject common mode and power supply noise". How do differential amplifiers reject noise coming from the power supply?

Notice: I know how to reject noise signals which appear at the inputs(when we take the output differentially). Maybe power supply noise does not appear at the inputs.


texts:
I plan to use the BU2505FV Digital Analogic Converter in my design. After some simulations on LTSpice I've concluded that each of the analog output will consume 700µA maximum.

Is this component able to deliver 0.7mA on each of its pins ?
I see that its maximum consumption current is 7.5mA, should I divide it by ten to know how much current the part can deliver on each output?

Here is the schematic of the circuit, the DAC output will go on the DAC label (low right corner of the schematic):

Also I added the simulation results, with:

in red the drain current of the NPN,
in blue the circuit output (there is an amplification stage on the right)
in green, the DAC variation

Thank you for your help


texts: Sharing antenna between receiver and transmitter

texts:
I have two separate low cost 433 MHz transmitter (datasheet) and receiver modules (datasheet) running at 5V.

I wish to use them both in half-duplex operation, sharing a single antenna.

My questions are:

Could I simply connect the antenna to both antenna pins? I am aware the full power transmission could then damage the receiver, but would this be a real risk at the low power I am operating them? I tried it on the breadboard and it worked fine, but I am not sure if there is a long-term risk.
If not, which solution would be the simplest way to go? I am looking at this SPDT switch between the antenna and RX/TX. Is there a simpler solution for adequate performance?


texts: Single-cycle MIPS processor in Verilog (multiplexor)

texts:
I only recently started to understand in Verilog. But I have a task to create single-cycle 32bit MIPS processor.
Instructions I want to implement are
add, and, addi, addu.qb, addu_s.qb, beq, jal, jr, lw, or, slt, sub, sw
The processor should look like this:

I'm stuck with the implementation of the left block.
As far as I understand this is a multiplexer that accepts 4 inputs and 3 selects(PCSrcJr, PCSrcJal, PCSrcBeq true). But I don't understand how to implement it. I can write a multiplexer with a single select.
module mux_4_1 ( input i1, i2, i3, i4,
             input sel,
             output out
            );
reg  out;
always @(sel or i1 or i2 or i3 or i4) begin
case (sel)

2'b00: out = i1;

2'b01: out = i2;

2'b10: out = i3;

2'b11: out = i4;
endcase

end

endmodule


texts: Drawing Bode Plot from transfer function

texts:
I have the following question

I need to Draw the Bode Plot,so i need to find Magnitude and Phase Angles for a Frquency.I understand that i need to susbstitude S=jW(W>Omega) as per this video

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

But in my question that denominator is not of the from (1+xxS)(1+XXS) so how should i proceed.Please advice.


texts: Why does usb have start of frame packets?

texts:
I'm developing some high-speed USB firmware for the STM32F746VG, and on page 1411 (under section 37.16.3, step 2), it tells me that I should enable start of frame interrupts.

I know that usb hosts send a start of frame packet once every 125uS in high-speed mode, but why should my device care about SOF packets, aside from timekeeping?  What could I possibly do in an interrupt service routine that would trigger on every start of frame packet?


texts: Dual MOSFET Switch Circuit not switching

texts:
I'm trying to switch a high-current, 12V load (large parallel LED strip, with the anode connected to LOAD-) using a PWM chip.  My approach right now is to use a Power MOSFET to switch the load; and due to the high capacitance of the gate and higher gate threshold, I'm using a second MOSFET to drive the first MOSFET.

This is the schematic:

5V is the output of a linear voltage regulator rated for 800 mA, which I don't think is an issue in this circuit.

The PWM Driver (a WS2801) is pull-down, so both FETs have a pull-up resistor to return the gate voltage to 5V.

I'm seeing that Q1 behaves as expected: when there's no signal applied, Q1 is pulled up high by R8, and conducts.  Q1 conducting pulls Q2 low, so Q2 stays "off" in this state.

When a PWM signal is applied, Q1 turns on and off per the signal.  However, the Q2 never fully conducts.  Upon further inspection, the gate of Q2 never goes above 700 mV or so.  It definitely pulses between 0 V(ground) and ~700 mV in a way that matches the PWM signal, so Q1 is definitely conducting, but for some reason the gate of Q2 is never pulled up high to 5V.

I feel like I'm missing something fairly obvious here, but can't figure it out -- why isn't Q2 switching as I expect it to?


texts: Can I use some type of transistor i.e. BJT or MOSFET to act as normally closed relay?

texts:
I am designing a power bank which uses sustainable power generation methods for a school electronics project. It is based around the Arduino Nano.
At the moment I am planing to charge an 18650 cell using a hand cranked generator which I have designed as well as a small solar panel array.
One problem I had with the hand crank is that due to the nature of hand cranks its output voltage is not very stable even when using a linear regulator or a buck converter. 18650 charging circuits require a stable 5V input so they are not a practical option for me.
Instead I plan to connect the output of my generator directly to the 18650 cell to charge it. This will however become a problem if the battery gets too full and therefore gets overcharged.
I am already using the Arduino Nano to read the voltage of the 18650 cell and output this as a percentage to an LCD. I now want to add a function to the power bank where it continually checks the charge level of the battery using the data from my pre-existing program to make sure the 18650 is never overcharged.
To do this a couple of things need to happen and that’s where I plan to utilise some type of transistor.
First I need cut the connection from the 18650 to the rest of the circuit each time the voltage is checked (maybe every few seconds.) This is to make sure that the voltage read by the Arduino is the actual voltage of the 18650, if it were connected to the circuit and thus was under load the voltage would be less than actual and this effect is not linear so almost impossible to account for in code.
Next I need to have a second transistor which would cut off only the charge going into the battery in the event that it is full to prevent the overcharging problem.
The way I want to do this is by using an output pin on the Arduino  to control a transistor to break the connection to the 18650 when the pin is high. When the pin is low I want the circuit to be closed.
However I have only ever seen BJTs and FETs used to make a connection when the control voltage (Arduino pin) is high.
Yes I could hold the Arduino pin high instead but this would waste more power.
Yes I could use a relay in a normally closed configuration, but I think the constant clicking would get annoying.
How can I achieve this normally closed relay effect With a transistor?
Sorry for the long winded explanation, but I thought it would be useful to offer some insight into the project to give you an idea of the setup.


texts:
Before I can program my ATmega32 through USBasp but now only in 30 times or more try I can program ATmega32.

I get this error

avrdude: error: program enable: target doesn't answer. 1

program command

avrdude -c usbasp -p m32 -u -U flash:w:pd.hex

What's problem and solution?

When I try with -F option, I get below message.

avrdude: Device signature = 0x887b15
avrdude: Expected signature for ATmega32 is 1E 95 02


texts: Are countries that use 2-pin plugs less safe than countries that use 3-pin plugs given that the earth is missing?

texts: Will there be occasions when using 2-pin plugs is safer than 3-pin plugs? Is it accurate to say that 3-pin plugs are always safer given the presence of earth?


texts: MCP3008 sharing power supply with low-noise DAC

texts:
Asked this question on the Raspberry Pi Stack exchange and was redirected here!

I'm designing a low-noise audio gadget that uses an MCP3008 ADC (for sensors) together with a Raspberry Pi and a PCM5102a high quality DAC. The PCM5102a is powered by a 3.3V LDO. I'm wondering if I should share that same LDO to also power the MCP3008 or should I just use the pi's onboard 3.3V?

The MCP3008 is already using a precision 1V reference voltage IC. Is it necessary to use a low noise 3.3v power supply as well or will it make no difference?

If I use the LDO to power both chips, will the MCP3008 generate noise that will disrupt my (very very low noise) PCM5012a?

The PSRR on the MCP3008 is about -68db whereas on the PCM5102a it's around -100db!

The alternatives are to a) just power the MCP3008 from the Pi's onboard 3.3V supply, or b) use a separate 3.3V LDO, but that seems like overkill.


texts: Avoid inductive coupling on two near coils

texts:
I have two coils that are placed parallel from each other and separated by a mere 1.5cm, lets say A and B. The core of them is built using soft iron. Right now they are wired and built in the same way.

Is there any way that I can use to prevent the induction from coil A to coil B when coil A is being pulsed by a DC current? If I place a scope with a channel on each coil, coil B shows the same pulsing frequency than coil A but with a reduced voltage.

Is there any way that I can use to avoid this behavior? Or this is how it should be and by physics it can't be avoided?


texts:
I am attempting to design a powerful, yet efficient soft switching fullbridge converter. Achieving that requires high side switching with an N Channel MOSFET.

Now while I have succesfully achieved a drain to source voltage drop of but 0.2mV when a stable dc voltage is applied. However, when a switching signal of 100kHz is applied to the gate of the MOSFET, via a Darlington transistor (see diagram below), strange things start to happen.
With strange things I mean:

This is my first attempt at high side switching with an N Channel MOSFET and I am completely lost on what I should do to fix this. Why is it not a pretty square wave like the signal? My guess is that the gate is charging too slow.

As additional information, this is the circuitry of the test setup:

I hope someone can help me with this. Thanks in advance!


texts: Can I share a crystal between two AT89S52? Is this method correct?

texts:
I have a project which I will need two 8051 microcontroller on a board.
I want to reduce its size and cost, so I tried to use one crystal for two microcontroller, but just connect them parallel doesn't work.

One of my friend said that I can try connect normally on one of the chip (chip A), and short the xtal2 from chipA to xtal1 from chipB.
(Not connecting anything on the xtal2 from chipB)

Is this the right way to do it? Do I need to change any code?
I've tried but I failed, so I need some suggestion.


texts: KHN biquad: why does LTSPICE plot a wrong phase plot for bandpass filter?

texts:
I'm studying the KHN biquadratic section and its outputs to obtain a lowpass filter, a highpass filter and a bandpass filter. I simulated the filter using Mathematica and obtained the following plots, which match the theoretical.

Now, then I decided to simulate the circuit using LTSPICE.

Obtaining the following plots:

Now, comparing both plots everything looks fine with the Low pass output and with the High pass output, both in terms of magnitude and phase.
My question is with the band pass output. While the magnitude plot looks fine, the phase plot has nothing  to do with the one I plotted with Mathematica. Why does this happen? What is the difference between the simulation and the theoretical plot? I didn't expect such an abrupt phase change as the one obtained with Mathematica, but the phase plot obtained has nothing to do with it: the limits are different, the variation is the exact opposite... What am I missing here?


texts:
In my experience, some signals disappear from SignalTap possible nodes because of optimization.

I wanted to make aliases to several signals and tried using noprune so they will be available at SignalTap, but I didn't see them in any category (not in the Design List category nor in the pre-synthesis category). I am using Quartus 15.1

Is there any way to make alias for signal names so they will appear for sure in the Nodes list of SignalTap?


texts: Offline Flyback DC-DC converter using NE555, Works in LTSpice, will it work in a real world application?

texts:
I'm currently a novice and am learning EE. I've been experimenting with low voltage DC-DC converters. Now I want to build an offline DC-DC converter that operates directly from AC mains.

The schematic works very well in simulation, but being this converter draws its power directly from AC mains, I'd like some input from experienced users/professionals before I build this thing and test it in a real world scenario.

This NE555 circuit is only a learning tool. The objective was to take on a project way beyond the scope of my knowledge and I decided to build a SMPS using basic oscillators and designing all of the auxiliary circuitry around them.

I'm aware of the existence of and have many different SMPS control ICs.

Update

I took the entire circuit apart and rearranged it a bit. I realized in order for PFC to really work the transformer has to be wound for the max voltage, so I'm operating the boost converter from a pre-regulator then once the boosted output hits 360VDC it starts up the flyback circuit. Once the flyback's regulated output reaches 14.8V it shuts the pre regulator off. All occurring within a half a second or so.

Will the pre-regulator blow up? I know I'll survive up to 170VDC I've tried these (get very hot after a few minutes, but will power an NE555 and a few transistors), but at 340VDC? I know the jump from 340 to 360 won't take more than 60ms, could be safe, but What do you guys think?

Here's are the latest revisions
The output results are with PFC output @ 360VDC carrying a 129Ω load (>1KW)

Schematic

First is both the boost converter and transformer waveforms without current traces.
Second is Boost converter only with current trace.
Third is transformer only with current trace


texts: First or last value checker component/funtion

texts:
I am trying to make a circuit that can store the first and last value from a series of values. To do this I'm guessing I need a component to determine if it's the first or last value and this is what I'm struggling to find.

The data is arriving from an ADC, which is converting a spiromoteter analogue signal into digital. Each binary value of flow is inputted on a bus (with bits in parallel). My aim is to do numerical integration (Simpson's rule) for this I need to add the first and last values together.

Thank you.


texts:
In today's screens, each individual pixel is created by the combination of three transistor as Red Green Blue. But, colours are already just different frequency waves. Why aren't pixels made by just one single component to create different colour values? Is it cost or capability of electronic components?

-- MORE EXPLANATION --

For each pixel, manufacturers are putting three different colour generating transistors/materials, and by the combination of those colours, we can have millions of different colours. My thought was that if colour is a wave as a photon, and colour of photon changes according to the frequency of it, we could use just one transistor/material for each pixel and change its frequency to have any colour we want. But as explained in comments, colours are very high frequency waves (3-digit Terahertz values), and technologically we are not able to generate those frequencies yet, which explains why it is not done in that way.


texts: symbols for ep3c5e144 and ep3c25e144 in Eagle

texts:
I am using ep3c5e144 to design a PCB board. Sadly, in Eagle I cant find the exact library and symbol for this device, but only its near relative ep3c25e144.

I have some questions:

How different is the pinning for ep3c5e144 and ep3c25e144? Can I reuse the symbols of ep3c25e144 for my design?
Where can I find more about the information for ep3c25e144?

Sorry for such amateurish question, but I am a beginner. I have many confusions: for example, the VCC , should I connect them to 3.3V or 1.2V? There are 16 clocks, should I connect all of them?

Thank you so much for your help!


texts: Best Linux filesystem to use on MMC memory chip?

texts:
I have a new embedded Linux project coming up.  The hardware team has chosen an MMC Flash chip (part # MTFC64GJVDN-4M) for the system's non volatile memory; data sheet at http://www.micron.com/parts/nand-flash/managed-nand/mtfc64gjvdn-4m-it.

What would be the best Linux filesystem to use with this part?  I believe it's a block type device, so the JFFS2 MTD type filesystems will not be suitable as they operate on the raw flash.  I am looking for reliability first, then performance as secondary.

It is also my understanding that these MMC devices are like the "guts" of an SD card, i.e. have their own on-board controllers.  I've had a pretty bad experience with SD cards failing before, I've had hardware failures where the card becomes un-readable.  That was using the ext3 filesystem, so I am researching to see if there's anything better for this new project.


texts: Multiple bytes of data not being read from PIC18F46K80

texts:
I am trying to receive multiple bytes of data from the hyper terminal to PIC18F46K80.

This is my source code

uint8_t uart_recv_uchar() {
   while(!(PIR1bits.RC1IF))
   {
       //wait till the data is received
       ;
   }
   return RCREG;
}

uint8_t uart_get_value() {
    uint8_t byte[5];
    byte[0] = uart_recv_uchar();
    byte[1] = uart_recv_uchar();
    byte[2] = uart_recv_uchar();
    byte[3] = uart_recv_uchar();
    byte[4] = '\0';
    return (uint8_t) strtol(byte, NULL, 16);
}

When I type the data that I intend to send more than one byte of data by typing 0x1234 on the terminal the microcontroller reads only the first byte of data 0x12 and then waits for the next byte at the statement byte[2]=uart_recv_uchar().

What should I do to read multiple bytes of data after typing them at once from the terminal?


texts:
I'm looking for a transistor array IC with a common base to all the transistors, but I'm having some trouble finding what I'm looking for. Essentially, what I want is to take 8 data lines in parallel and be able to (somewhat rapidly) switch them on and off - that is, for 8 lines, switch all of them on and all of them off with one input line. I can do this with 8 individual transistors, splitting the input line itself into 8 parallel bases, but I'm hoping some actual EE out there - i.e., not a dabbler like me - knows of a nice little chip that will do the trick and save me some soldering.

You can imagine what it's like trying to search for "transistor integrated circuit", but that's what I want - an IC with 8 NPN transistors, all of which take their base off of one pin.

MORE DETAIL:

I'm attempting to drive quite a few 14 segment dual digit LED displays (like this one - the internal circuit diagram is important to this issue) with a fancy little LED display driver here (details less important. Fancy 16 bit shift register.) The LED driver has some nice features that would be annoying to duplicate, like individually-controllable PWM dimming for each segment, and this would be just fine with a seven segment LCD without multiplexing. Shift in the bits, latch it up, and we're good.

Unfortunately, the 14 segment LCD's only seem to work through multiplexing, as you have 8 input pins that are multiplexed among 4 different "regions" by choosing the anode. You can't just latch the bits you want on the driver and forget it - you need to control the bits as a combination of anodes and cathodes.

What I'm thinking of now is to drive a closed loop shift register with e.g. 0001 in a loop and choose the 8 cathode inputs by and-ing or switching them 8 at a time out of 32 latched input lines (that is, 2 of the driver chips, but only 8 bits of those chips at any one time). This way I would be able to shift the desired bits into the registers and ignore the whole circuit from the microprocessor's point of view (minus the shift merry-go-round clock pulse, which is minor). Just let it round-robin multiplex itself until I want to come back and display something else.


texts:
I’m a software engineering student and working on a project with a microcontroller and building this USBasp. My knowledge about hardware stuff is minimal.

I am having trouble with capacitors. There are several kind of capacitors with the same value. From the circuit I found (ex. Regulator 7805, Serial Programmer, etc) there are capacitors that show:

just the value
value with plus + and minus -
value with voltage rating

I don’t know what kinds of capacitor I should choose and buy.


texts: What is the AUX_IN and CD_IN connection on old Soundblaster sound cards?

texts:
What is the AUX_IN and CD_IN 4-pin connection on old Soundblaster sound cards? The card's model is CT4170. Here is an example

I think its some sort of input. Is there any schematic which tells me which pin is what? There was also a connector on one of those inputs with three wires. Here is how it was connected


texts: Is the value of this resistor critical and if so why?

texts:
The following is a circuit used for the endstops of a 3D printer. The full schematic
I understand that when the switch is closed (pressed) the signal Z- goes low. R16 is used as a pull-up resistor so that the circuit is not in an indeterminate state when the switch is open.
My question is about R17.  What is its role and is its value critical? Would it make a difference if R17 was 100 ohm?
On my board the value of R4 and R13 are both 1k but R17 is 100 ohms and it is the Z- signal that seems to misbehave.


texts: Achieving long term stability of a MOSFET current sink

texts:
I've got 176 infrared LEDs embedded in CNY70 optical reflectance sensors, which I would like to power, and I'd like to ensure that the current supplied to any given LED is +/-1% stable (or better) over the span of a year, down to 20kHz. What should I change/take into consideration to help achieve that?

Additional context for the question:
The exact current should be in the ball park of 20mA, but stability matters more than the exact value. I can probably do some calibration on the other end to account for that, I just don't want to be recalibrating all the time.
I'm not wedded to the MCP1501-20E/SN, it just appears elsewhere in my design. I've left the exact op amp and MOSFET unspecified in my diagram, as in simulation this seems to behave well with a few different choices of old cheap op amp and transistor. Specific suggestions welcome.
+48V is expected to be an off the shelf reputable SMPS. It's all mains powered, and will be in human comfortable environments, with plenty of ambient (but non-forced) air. If I've got to stick a bit of heat sinking on the transistor, that's fine. The design is in part driven by the availability of inexpensive 48V supplies and the "low voltage-ness" of 48V.
The LEDs have a typical forward voltage of 1.25V, and a max of 1.6V. So multiplied by 22, there's quite a range of voltage drops to account for.
+VDC presumably needs to be 2.048V + whatever V_GS is necessary for I_D to to reach the target 20mA. Probably just give it 12V.
I'm interested in and would appreciate all forms of feedback including "do something different", but I'd like an answer to this regardless of how bad an idea it might actually be.
MCP1501 long term drift:

Looks like after 48 hours of burn in, they experienced <=0.2mV of drift in the next 960 hours. If we optimistically pretend 960 hours == 1 year, then the MCP1501 may cause 0.0098% drift on the 2.048V model?


texts:
Is the Microblaze soft cpu better than the Cortex M3 soft cpu in terms of functionality?

Given all the buzz about the ARM based processors, I was wondering if to implement an ARM processor on my FPGA or if I should stick to the Microblaze that comes with it.

Is there any major difference in terms of performance or functionality that I should consider?


texts: Diffrential pair circuit analysis in Pspice

texts: I want to analyze this circuit in Pspice. But I do not know what values have to allocate to the resistors for the circuit to work properly (biasing).


texts:
I want to determine the threshold voltage of a diode from the graph of  iv characteristic diode.
From the point of view of the data analysis I do not know how to do to find a specific value.
I have read the advice of graphing the logarithm of the relationship between   the current passing through the diode and the reverse saturation current.
I get a straight line from which I do not know what parameter could be useful to me. I'm stuck and I do not know what to do.


texts: Question about RF layout seen in application note (Texas Instruments AN043)

texts: I saw the following antenna layout in a Texas Instruments application note titled AN043, Small Size 2.4 GHz PCB Antenna. What is with the right angle the feed makes? Wouldn't that cause reflections? Or is this a special impedance tuning technique (Kind of doubt that though).


texts:
I have an external flash for my DSLR camera (a Canon Speedlite 430 EX II) that runs on 4 AA batteries. I plan on using this flash in a photo booth at a wedding, so it would be great if I could hack some sort of external power supply for this flash, instead of having to replace batteries several times during the day.

I saw several website describing ways of building "fake batteries" that allow to connect an external battery or power supply to cameras or flashes (for example, http://blog.davidburren.com/2003/03/flash-power-pack.html).

Would there be any danger/downside to building a fake battery pack that connects to an external 6V power adapter (for example a 6V 2A AC / DC power adapter)? How would you do it?


texts: How to reference subsets of logic[31:0] in SystemVerilog?

texts:
(I have two questions for you at the end.)

I'm using SystemVerilog to do various exercises (for personal edification) in Digital Design and Computer Architecture's chapter 7. I'm using Altera's Quartus II 13.1.2 Web Edition and ModelSim Altera Starter Edition 10.1d (Revision 2012.11 dated Nov 2 2012) for software on Windows 7 x64, and my hardware isn't relevant right now (it's an Altera DE2-115 though).

One thing I have to do is decode a 32-bit logic signal into various different fields in order to do instruction decoding. There are three separate decoding possibilities for the 32-bit MIPS instructions the book uses. So, I made separate packed structs for each one:

typedef struct packed {
  logic [5:0] op;
  logic [4:0] rs, rt, rd, shamt;
  logic [5:0] funct;
} instruction_r;

typedef struct packed {
  logic [5:0] op;
  logic [4:0] rs, rt;
  logic [15:0] imm;
} instruction_i;

typedef struct packed {
  logic [5:0] op;
  logic [25:0] addr;
} instruction_j;

When I tried then to make them into a union, I found out that Quartus II doesn't support unions. Drat.

So, I made another typedef and used some casting to make these all the same, just with different names:

typedef logic [31:0] instruction;

// usage in a module...

  instruction logic_instr;
  instruction_r instr;
  instruction_i instr_i;
  instruction_j instr_j;

  assign instr = logic_instr;
  assign instr_i = instruction_i'(instr);
  assign instr_j = instruction_j'(instr);

This works in both Quartus II and ModelSim.

However, the need for the additional instruction type was to work around a problem that ModelSim gave me that didn't bother Quartus II. In this next snip, the first declaration works in both, but the second works only in Quartus II.

  // Works in both
  floper #(32) instruction_reg(clk, reset, c_irwrite, readdata, logic_instr);

  // Works only in Quartus II (and allows me to remove the logic_instr entirely)
  floper #(32) instruction_reg(clk, reset, c_irwrite, readdata, instruction'(instr));

// For reference: Enabled, resettable flipflop
module floper #(parameter WIDTH = 8)
               (input  logic             clk, reset, en,
                input  logic [WIDTH-1:0] d,
                output logic [WIDTH-1:0] q);
  // ...
endmodule

The error ModelSim gives is "(vsim-3053) Illegal output or inout port connection for "port 'q'". It doesn't give the error at compilation time, just simulation time.

My questions for StackExchange are:

Is there a more elegant way I can have a simple logic [31:0] variable that can be easily referred to by various subsets of its wires without going through all of this verbose rigamarole?
Is there a syntax I can use with Quartus II and ModelSim that allows me to avoid having yet another extra variable when sending the struct instruction_r (or i or j) to a module that expects a logic [31:0]?

I feel certain there has to be a better way to do this sort of thing as it seems like something that would likely be very common in any sort of large scale design.

Thanks!


texts: Do I choose a series or parallel battery set up to power a fish finder?

texts:
I plan on running a Garmin UHD 73SV fish finder off two 12V 7A lead acid batteries for a kayak. The unit pulls 1.25Ah. So if I run them in parallel I will have 12v 14A with a run time of about 11.2 hours (I will be on the water for 8-9 hours during tournaments). If I run them in series I will have 24V 7A with the same run time. The unit can run off a 12V or 24V system and I will have them wired with 14AWG wire about 4ft. The cables that connect to the unit itself are 16-18AWG and I will solder a connection with the 14Ga wire.

What's the best option and why?

Feel free to correct me if I am wrong, no hard feelings!


texts: Is capacitor leakage harmful? Polymer current leakage compared to electrolyte leakage

texts:
I choose an input capacitor for the LM2596 DC/DC converter.
Since the device will be operated on the street (from -35 to +35°C), I decided to choose polymer capacitors, since they are not particularly dependent on temperature and there is no electrolyte.

Everything seems to be fine, but when compared with electric capacitors, I noticed that polymers have a very high leakage current.

Example:

Electrolytic capacitor - 4uA
Polymer capacitor - 2350uA

It bothers me. My circuit is protected by a residual current circuit breaker, which is of type A and is designed for a leakage current of 10mA. If there are a lot of capacitors and 10mA is typed, will the switch work? Or am I misunderstood?


texts:
How to calculate PWM duty cycle to compensate for different piezo sounder response at different frequencies?

I have a piezo sounder, and the datasheet informs me that I will get the following response:

Frequency      Response
200Hz          74dB
1000Hz         81dB

If I set my PWM duty cycle to 100% at 200Hz to get 74dB, how do I calculate the PWM duty cycle required to give the same response of 74dB at 1000Hz?

Thanks kindly for any help.


texts:
I need to switch supply power from one source to a different one without losing power. I am designing a control system for a customer to run an induction heater. They want to run the system off a generator but it draws to much power during the initial heating phase. Once the item is heated they want to switch over to the generator. My initial thought is to have two contactors, one NO and one NC, feed by the same control wire. That way, in theory, they could never both be on at the same time.

Since they are not perfect ideal devices there is a good chance that they will both be on at the same time or there will be a delay. The control system is also powered from this so I really don't want a voltage spike but I also don't want to lose power and cause the controller to reset.

My question is what other components do I need to add to keep this safe and not lose power?


texts: How to put these together and do I need a PWM expander?

texts:
I'm having here

an Atmega8
a PSM42BYGHW603 stepper motor
the L298 stepper motor driver
and the L297 stepper motor controller

What I want to put those together such that I can control up to three PSM42BYGHW603 stepper motors with my Atmega8 and I also want to avoid to waste too many pins on it.

I was thinking about an I2C-Slave that gets controlled by the master Atmega8. The question is if there is something like a PWM expander or if I should just use another Atmega8 as I2C slave? The thing is, I want to keep everything small, simple and inexpensive.

Would it be too if I asked for a circuit arrangement? I am quite a bit of a beginner regarding the creation of my own circuits.

Thank you for any help!

PS: I also have a MCP23S17-E/SP but I was told that this wouldn't be useful here, right?


texts: This doesn't immediately look so good, but if you think about it, why shouldn't it be? If the extension cord drops in, why should the electricity choose to flow through any of them, instead of just the ~1 inch of water to the other pole?


texts: What is the difference between 7 dBi and 10 dBi WiFi router antenna for 5.8 GHz?

texts: 5.8 GHz known as short range but higher speed for WLAN comm such as for WiFi routers. What would be advantages of using 10 dBi router antenna instead of 7 dBi at 5.8 GHz? Longer distance?


texts: Why is zero crossing detector is used in some AC control circuits?

texts:
Zero crossing occurs when the line voltage is changing its polarity, from positive to negative, or vice versa. What I understand is, to fire the triac properly the firing circuit and the AC line should be synchronous. Is that the reason to use zero crossing detector?

So the micro-controller takes the zero crossing as an input signal and adds a delay less than (1/50) seconds (for 50Hz electricity) to create a firing angle of the triac?

But I saw some projects that do not require this zero crossing detector. Here there is a discussion: Do I need zero-crossing detection for controlling a heater? but I still didn't understand why in some cases it is not necessary.

Could you elaborate when is necessary to use zero crossing detector in a simpler manner?

edit: Please see my related question: Confusion with TRIAC firing and zero crossing point


texts: What is the purpose/benefit of using different electrodes in the same circuit?

texts:
I've studied various science fields in depth for years it seems, and I have never been able to get an understanding of this fundamental idea. I understand the purpose of different types of electrodes in voltaic cells, creating a potential/direction of flow.... but what about in electrolytic cells? For example:

Electrochemistry usually uses different anodes and cathodes, but I've seen cases using identical anodes/cathodes as well.
LCD screens using different transparent electrodes for the anode and cathode. Both are transparent(I think), both are conductive, but have different potentials. What is the purpose of this?

Do the difference in electrodes somehow help set the voltage when there is not an external power supply to set it?


texts: Using Telegram bot to get messages from esp32 board

texts:
I'm working on a project to light an LED using my phone. I use DOIT ESP32 devkit V1 which is connected to an LED and is controlled by Blynk app via Wifi. I'm trying to write telegram bot which will create log file where it will store the current state of the LED. I've created a telegram bot which writes to google sheets all the messages it receives. Now I want to send the state of the LED from my board. For this purpose I've used the following code:
#define BLYNK_PRINT Serial
#define RELAY_PIN 32
#define TEMP_PIN V5
#define MSG_PIN V6
// Initialize Telegram BOT
#define BOTtoken "..."  // your Bot Token (Get from Botfather)

// Use @myidbot to find out the chat ID of an individual or a group
// Also note that you need to click "start" on a bot before it can
// message you
#define CHAT_ID "..."

#define LOG_DELAY 900000

#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

#include <WiFiClientSecure.h>
#include <UniversalTelegramBot.h>
#include <ArduinoJson.h>

// Global variables
bool was_overheated;

WiFiClientSecure client;
UniversalTelegramBot bot(BOTtoken, client);
String chat_id;

// Checks for new messages every 1 second.
int botRequestDelay = 1000;
unsigned long lastTimeBotRan;

char ledState;

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "...";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "...";
char pass[] = "...";

#ifdef __cplusplus
extern "C" {
#endif
uint8_t temprature_sens_read();
#ifdef __cplusplus
}
#endif
uint8_t temprature_sens_read();

BlynkTimer timer;

// Handle what happens when you receive new messages
void handleNewMessages(int numNewMessages) {

  for (int i=0; i<numNewMessages; i++) {
    // Chat id of the requester
    chat_id = String(bot.messages[i].chat_id);
    if (chat_id != CHAT_ID){
      bot.sendMessage(chat_id, "Unauthorized user", "");
      continue;
    }
  }

  bot.sendMessage(chat_id, "Light State: ", "");
  if (digitalRead(RELAY_PIN)){
        bot.sendMessage(chat_id, "LED is ON", "");
  }
  else{
    bot.sendMessage(chat_id, "LED is OFF", "");
  }
}

void setup() {
  pinMode(RELAY_PIN, OUTPUT);
  pinMode(RELAY_PIN, HIGH);

  was_overheated = false;

  Serial.begin(115200);

  WiFi.begin(ssid, pass);
  int wifi_ctr = 0;
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Blynk.begin("...", ssid, pass);

  timer.setInterval(1000L, myTimerEvent);
}

void myTimerEvent()
{

  // Conver raw temp in F to Celsius degrees
  Blynk.virtualWrite(TEMP_PIN, (temprature_sens_read() - 32) / 1.8);
  if(((temprature_sens_read() - 32) / 1.8) > 69){
    Blynk.virtualWrite(MSG_PIN, "NO MESSAGES");
    if(was_overheated == true){
      digitalWrite(RELAY_PIN, HIGH);
      was_overheated = false;
    }
  }

  if(((temprature_sens_read() - 32) / 1.8) > 67 && ((temprature_sens_read() - 32) / 1.8 <= 69) && (was_overheated == false) ){
      was_overheated = true;
      digitalWrite(RELAY_PIN, LOW);
      Blynk.virtualWrite(MSG_PIN, "OVERHEATED!!");
    }
}

void loop(){
    Blynk.run();
    timer.run();

    if (millis() > lastTimeBotRan + botRequestDelay)  {
      int numNewMessages = bot.getUpdates(bot.last_message_received + 1);

      while(numNewMessages) {
        Serial.println("got response");
        handleNewMessages(numNewMessages);
        numNewMessages = bot.getUpdates(bot.last_message_received + 1);
      }
      lastTimeBotRan = millis();
    }
}

I don't know why I'm not able to communicate with the board through the bot. I've read many guides online about how to use telegram bots to communicate with eps32, and many of them used similar structure. what have I done wrong?
Thank you.


texts: Amplifying AC voltage via DC supply voltage

texts:
at the moment I'm trying to amplify an AUX-Signal with a 12V DC supply
voltage. I tried die setup from Here's here as u can see in the sketch below.

simulate this circuit – Schematic created using CircuitLab

But all I get is just an annoying noise sounding horrible.

For the amplifier I used both the CA3240EZ and the OPA134PA.
Maybe my grounds are not connected correctly.

It would be awesome, if anyone could help me out.

EDIT 1:
According to your hints, I tried now those variations of power supply bypass capacitors

1st:

simulate this circuit

2nd:

simulate this circuit

EDIT 2:

The voltage is pretty stable at 12,18V as far as I can measure it with my voltmeter.

I changed now the 22kΩ into a 2,2kΩ resistance, so the gain should be 1.

As i decrease my volume the noise also decreases. And if I have volume = 0, one cannot here anything out of the subwoofer.

I still get this annoying sound. I recorded it with my handy and you can listen to it here: https://soundcloud.com/pixel_95/subwoofer-noise

EDIT 3:

I get the via an normal chinch cable going into the receiver of a LG HT44S (www.amazon(dot)de/LG-HT44S-Heimkinosystem-HDMI-schwarz/dp/B003BYQ74A). From there i use the subwoofer output with the orange and black cable as you can see here: i.imgur(dot)com/Aw0hmfr.jpg
Then this black and white cables go into my breadboard in here:

Other View of the breadboard here:

And afterwards the outputs goes to the subwoofer in here:

I put AUX IN normally to my receiver and set the volume to 0. then inverted, non inverted and output are ALL at 6,1V to ground.


texts: Circuit analysis Thevenin example in sinusoidal steady-state with dependent and independent ac sources

texts:
So I get really confused when I see a dependent source (and serial?) in thevenin-norton problems. Can you help me with these questions?
(I think in the question of the figure b the value C is mistaken with R. It should be C instead of R=1 ohms)


texts:
I'm considering a design which has multiple PIC-based controllers producing PWM signals at 31 kHz. Sometimes, under a well-defined "handover" condition, some pair of PWM power feeds will be connected together (with the same duty-cycle) and need to be driven together. The power feeds come from L6206 H-Bridge drivers, which themselves introduce a 0.5-1 \$\mu\$s dead-time on a transition. But during the handover, I need those PWM signals accurately sync'd so that they don't fight each other.

If I can synchronize the two PICs' PWM generator timers to within 0.5 \$\mu \$s, then I think this will work OK. The PICs are running at 32 MHz from their internal HFINTOSC oscillators and are I2C slaves (over maybe 1 metre via two connector hops) to a master controller which manages the PWM levels, enable/disable etc.

It's easy to run a signal to all controllers, such as a 1 ms stable synchronization clock, which could trigger a low-latency interrupt. Then I can write a primitive phase-locked loop to tweak OSCTUNE and basically keep all the PWM counter clocks in sync.

I've read other questions about synchronizing microcontrollers and I'm super-lucky that I'm not trying to do it over Bluetooth or similar; I can have a physical sync' wire!

But my concern is: are the PIC internal oscillators stable enough over the course of a millisecond or so to not drift apart by more than a fraction of a microsecond?

The datasheet indicates that the oscillator is stable to +/-2 % over a temperature range and the power supply to the PICs will be common and smooth. So I don't see these varying much over a period of milliseconds or even minutes. But can I rely on its jitter to be within 500 ppm? If not, the PLL will always be fighting the wandering clock...

Further progress:
We've implemented the sync pulse system as indicated in the question, though it pulses every 256 μs rather than every 1 ms, to reduce jitter. The recorded jitter is around +/-400 ns for the devices we've tried, so that's within spec'.

We have capacity to decrease the pulse gap to 32 μs but we're still experimenting. More news will follow.


texts: Could a lipo/18650 overheat during discharge?

texts:
Suppose a cheapish lipo/18650 has a typical protection circuit in place, which, e.g., shuts off the battery when voltage gets too low, shuts off the battery when the current exceeds 4A, and prevents over-charging.

If the battery becomes old and begins to fade, and the charging device draws more current than the battery offers, could excessive heat be generated without causing an under voltage, and thus, getting through the protection circuit? Generating heat without the voltage dropping too low could be an unpreventable hazard, right?

Thanks


texts: Finding a sensor for vibration of impact event, preferably for interface with arduino

texts:
Vibration Sensor, I want a really high tolerance, I intend on using this to measure the vibration generated when dumbells are thrown onto the floor in a gym.

Because, I have familiarirty with the Arduino, that is what I was looking into, but found no good solutions for high tolerance vibration sensors. Could you'll please suggest some other alternatives?

I'd prefer having to work with a platform that allows for high level programming of the microcontroller like Wiring for Arduino. But please don't refrain from suggesting anything otherwise ...


texts: Type of cable to use for long > 100m serial connection

texts:
I am starting a project where I have two arduino-based devices positioned about 100 meters apart.  The secondary device will be controlling a solar charging array and relaying stats to the main device.  The main device will display stats to the user and send control commands to the secondary device.

I plan on using a RS485 shield on each device.

Because I will be burrying the data cable(s) underground I am wondering what I need to consider when choosing a cable type to run the distance in a cost effective way.

Can anyone recommend a wire to use?


texts: Why am I reading 22VDC / 69VAC when measuring between myself touching a MacBook and ground?

texts:
If I put the positive probe of my multimeter on earth, and touch the negative probe with my hand, while another hand is touching the metal surface of my MacBook, I get around 22VDC or 69VAC.
I cannot figure out why this happens. If I replace the MacBook with a li-ion battery, I get floating readings, if I try with a DC power supply, either positive or negative, I get nothing else.

This even happens when the MacBook is not plugged into it's charger, so it's not being connected to earth at any point.
This behaviour defies my understanding of electrical engineering, and I would appreciate if someone could shine a light so I can understand how this is possible.

Thanks


texts: How to drive low impedance load with arduino and transistor

texts: I'm building a device which is powered with a small 3.7 v lipo battery. It is regulated down to 3.3 volts and powering an arduino mini. The arduino has to switch an inductive load on for about half a second. The inductor has only 5 ohms of resistance. The lipo battery provides enough current when connected directly. I have attempted to make a simple NPN transistor switch to activate the load with the arduino signal. I use direct unregulated power from the battery, through the load into the BJT collector, but so far most transistors have failed to allow necessary current to be switched. Few components is a requirement because this device has to be small


texts: How does a discharged capacitor work when a dc passes through?

texts:
First of all, I'm sorry for bad English.
My question is if a DC current passes through a DISCHARGED capacitor, what happens? How about a CHARGED capacitor?
Thanks a lot.


texts:
uCurrent is a tool for measuring small (micro) currents by Dave Jones (EEVblog). He published source files:
https://www.eevblog.com/projects/ucurrent/

I took his schematic and recreated in KiCad (no changes in schematic). Then created my own PCB layout and made the board (I have used 0.1% resistors instead of 0.05%, different type of switches, and used 2 single-channel MAX4239 instead of 1 dual-channel MAX4239). It is a good project to spend time for a hobbyist ;)

Problem is it behaves really strange, it was giving unexpected values, I couldn't understand what was going on. Where did I make mistake, or what component is failed. So I started to debug it.

Finally, I found some oscillations across resistor R14:

OK, that explains strange output voltages. But I still didn't know what was causing it.
Then I simulated in LTspice (AC analysis), just to verify the opamps part:

To my surprise AC analysis showed that the system is not stable:

Phase shift is -240deg at 0dB, so the oscillations are explained.

But how is it possible that Dave's uCurrent is working? (I assume without oscillations)
How to stabilize it?


texts: What is the difference between 2.4A output with or without Qualcomm Quick Charge 2 or 3?

texts:
I am looking to get a 12V USB charger for my car for the cigarette lighter. I see there are some that offer 2.4A output per USB port with and without Qualcomm Quick Charge, but how does Qualcomm Quick Charge come in to play?

If I don't get one with Qualcomm Quick Charge will I still get the same fast charge rate for my phones or if I want fast charging do I need the Qualcomm Quick Charge?

EDIT:
Just to clarify, these devices are phones so they do make use of this "turbo" technology.


texts: Bessel Differential Equation and Angle Modulation

texts:
I'm trying to undestand the role of the Bessel differential equation in calculating the side bands of a phase modulated signal. I started out with the
textbook example $$u_{PM} = cos(w_C \cdot t + \Delta \phi \cdot sin(w_m \cdot t)).$$ With trigonometric identities and the equation \$e^{j \Delta \phi \cdot sin(x)} = \sum_{n=-\infty}^{\infty} J_n(\Delta \phi) \cdot e^{jnx}\$, with J being the Bessel function, i came to the identical expression $$u_{PM} = \sum_{n=-\infty}^{\infty} J_n(\Delta \phi) \cdot cos(w_C \cdot t + n \cdot w_n \cdot t).$$ I read, that
the Bessel differential equation describes for example the oscillations on a circular membrane.

My question is, why does the Bessel function appear here? What is the meaning of the Bessel differential equation in this context?


texts: If one has used PIC uC, how different is it to migrate to using a different uC like say Arduino or ARM?

texts:
There seem to be quite many vendors making uC and some uC are more popular than others say for example Arduino and PIC because of their low cost and abundant features and ARM because of its high performance. What I wish to know is, how different is it to move to ARM uC after one has used a PIC and has understood its peripherals and the language/compiler (C++ with CCS C Compiler for example).

Do ARM, Arduino or other uC from TI and other perhaps less known names have big difference in what they can do compared with a PIC?

Let me make the question more simple. Suppose I have done a project using PIC that makes use of its timer, ADC, comparator, SPI and I2C peripherals. Now suppose that I wish to move to a new microcontroller altogether, lets say ARM or Arduino. I understand that the toolset (IDE) used with these other microcontrollers to compile code shall be different, but in what are the things one shall have to learn before being able to migrate such a project to other microcontrollers? I am not sure if ARM and Arduino microcontrollers have such peripherals or if they have more peripherals not found in PIC. I read somewhere that ARM has some graphics engine as well, it sure looked like a wierd block diagram of the processor.

I suspect that one shall have to learn a new plethora of functions and method to write ISR e.t.c, but I am not sure of the full list which I think is not very long.


texts:
I'm a newbie in electronics. I'm trying to build a calculator from scratch as a simple project and side hobby to keep me busy.

My goal is to build a simple calculator, not a scientific or graphing calculator, although I don't mind receiving information about how to do that either, just for kicks.

Is there a good tutorial for this? How should I start?


texts: Powering Digispark 2 and neopixel ring from USB phone charger

texts:
I've got a 16 Pixel neopixel ring and a Digispark 2 board.

I've also got a 5V 2A USB wall adapter.

Ideally what I'd like to do is connect the USB connector of the Digispark to the USB wall charger and use this to power the board, then use the 5V and GND pins of the Digispark to power the neopixel ring.

My concerns are the ~500mA restriction of traditional USB ports. I'm not sure if this comes in to play when using a wall adapter.

I also don't want to fry anything, so just wanted some opinions.

Thanks a lot