texts: Using the XMC4700 relax kit to program any XMC microcontroller

texts:
Is it possible to use the Cortex 10 pin connector on the XMC4700 relax kit board to program other XMC microcontrollers? The solutions that Infineon offers in their website don't look very appealing, as they either use 3rd party hardware and software, or their own solutions (XMC Link and the miniWiggler V3) are way too expensive, compared to the already on-board hardware in the relax kit.

If possible, I'd like to program any off-the-shelf XMC micro using the onboard debugger/flashing tool from the XMC4700 relax kit just as easily as programming the relax kit board (i.e. pressing the Debug button in DAVE 4).

Even if doing this is not officially supported by Infineon, is there any way to do it? Or do the XMCs in the relax kit boards come with some kind of boot loader or pre-programmed "fuse bits" (like in the 8-bit AVRs from Atmel) that makes it impossible to just connect the debugger to a brand new XMC microcontroller and use DAVE 4 to program it?

I'm sorry if this information is readily available and I'm just being dumb, but the whole ARM microcontroller stuff is very new to me and I'm struggling to learn how to use them.

UPDATE

I used Infineon's technical assistance center, asked about it and got this answer:

  The use of the J-Link On Board processor is limited to evaluation purpose of the target processor. It is not possible to use it for programming other microcontroller except the one on board.

  See Licensing information on Segger's homepage: https://www.segger.com/jlink-ob.html

  Licensing
  J-Link OB is provided as part of an evaluation board. It is not sold separately. It may only be used to debug the device on the evaluation board it came with.
  Support is given via the eval board manufacturer and via SEGGER forum. J-Link OB may not be used for production purposes.

Now, I'm not satisfied with this answer, I don't really care if it is not supposed to be used for production purposes, I just need a way to validate that I can use XMCs for a certain product before making any serious investements in expensive programming tools, so the question is still the same.


texts:
On what principle and how
I know that it is a variable resistor, but what principle does it work on, like change in area or pressure..., and maybe explain it in context to mainly available off the shelf ones.
I searched everywhere(online, offline...), but nowhere could I find principle of operation :/

Example - maybe this


texts:
I've just described an UART transmitter and receiver in VHDL. In simulation everything seems to be fine. In FPGA, the loopback interface works well: I push a button, the transmitter sends data, the receiver receives and display in the 7 segment display.

Regarding communication between laptop and FPGA, I am using a USB<->RS232 cable. Using GtkTerm on linux and tera term on windows I can easily send data to the FPGA. The problem is when I try to send data from FPGA to laptop: just a few bytes arrive in the laptop and many of these bytes are wrong. For instance, I send EE EE EE EE EE EE EE, but I receive only EE CF 14.

I have no idea of what the problem is: if it is software (maybe I've configured something wrong or a driver issue?); if it is hardware (faulty cable?) or if it is code (my VHDL code is wrong).

Any ideas on how to solve the issue?

p.s.: I've tried some few uart transmitters besides mine, they also send just a few bytes.
p.s2.: some info: 19200 baud; 8 bits of data, no parity bit, 1 stop bit

if code is needed: https://github.com/hdhzero/hivek-io-modules/blob/master/uart/src/uart_tx.vhd


texts: Why are rise and fall times of a wave going through series inverters not dependent on first inverter?

texts:
I've been intrigued lately by the observation that if enough inverters are placed in series the rise and fall times of output waves become invariant to the delays of the input inverter. The chain gets a characteristic wave with its own rise and fall times.

Is there someone who could ( preferably simply ) explain this to me? Because it seems rather unintuitive

Thanks in advance,
Joshua


texts:
I need to monitor the state of multiple relays carrying 110VAC and 60VAC using a microcontroller (I will probably use an Arduino) to ensure the relays are working properly.
To do this I have figured out that I need a circuit with an optocoupler so when the 110VAC or 60VAC is on 5VDC is forwarded to the input of the microcontroller.
Using an optocoupler with two LEDs in antiparallel, will also still leave me with 0V at the zero crossing, so some sort of stabilizing will probably be needed.
But I need some help choosing an optocoupler and the accompanying components and designing the circuit.


texts:
Is it possible to secure I2C communication between slave and master so nobody else can connect their devices to the master. Basically encrypting the message.

Is this feasible by software or hardware?

Note: I have a sensor that connects to ADC(there are amplifier and filter before this) which I communicate with I2C to read the sensor data. I would like to make sure nobody can use my sensor without my controller.

Base on everyone feedback I will try to use a microcontroller with precision ADC to send data. but does anybody know a small and cheap microcontroller that has precision  ADC with I2C port?


texts:
I had a thermowell with DS18B20 temperature sensor. At some point the sensor stopped working properly and was disturbing the bus, so I wanted to change it. Here are the photos of the assembly:

On the last figure, one can see the thermowell and the destroyed male connector which was fixed in the hole with epoxy.

Does anybody knows the name of this connector type. The closest I could come is M16, but I couldn't find the connectors shown in the figures.


texts: Replacing the core of a solenoid to increase the pulling force

texts:
I have a number of solenoids I would like to use in a project. The problem is that they're not quite powerful enough so I've been trying to come up with ways to increase the their pulling force without increasing the voltage.

The solenoids use a core that is tapered on the end. I would think that would lower the pulling power when the solenoid first engages. If I replace the core with a one that has the same thickness would I be right in thinking that the initial pull when the solenoid engages would be stronger?

If this would work what type of core should I use? If I just google "steel rod" there is a lot of types available. Is there some in particular material I should be looking for?


texts: Will the resistor fail in this small circuit?

texts:
I was looking at this project to make a balloon popper with a Raspberry Pi and very few components
The "essence" of this project is a 12 ohm resistor connected to the positive and negative terminals of a 9V battery
Won't the average resistor (say 0.5W) fail in this scenario?

My (potentially flawed) reasoning:

((9V * 9V) / 15Ω) = 5.4W
5.4W > 0.5W


texts: Questions about a remote relay control application with a MOSFET

texts:
I need to control eight solenoid-valves for water drainage outdoors, remotely and simultaneously. The valves are normally closed (NC) type which I guess, in that context, means they open and let the water drain only when they receive ON signal at their input.

Here is the exact model and the datasheet for the solenoid valves. From my previous question I have figured out that the relay is 4.5W and I guess passes around max 400mA in steady state. Since I don't know the the inductance of the coils, I thought it wouldn't be more than 10uH.

The idea is to keep the 12V power supply and the controller (Arduino in this case) indoors and send the power and the control signal 25m far away to the optocoupler and then to a MOSFET which drives the solenoids.

Here is what I came up with so far:

Since I don't want false triggering, I decided to use a 4N25 optocoupler at the far end. This both isolates the ground of the 12V power supply and prevents coupling noise.

If I use a coaxial cable, it has like 80pF/m. So for worst case, I assumed the total parasitic capacitance of the cable Cp all the way down is around 10 nF. I also assumed Arduino rising and falling edges as 100ns.

Zener and the flyback diodes are for taking care of inductive kicks fast. This is based in what I saw in some examples.

I found the MOSFET IRF530 suitable for such application current and power.

And here is simulation results for power current and the voltage for the MOSFET:

According to the datasheet, Maximum Power Dissipation is given as 88W at 25°C. The peak in my simulation shows max 10W.

And here is the zoomed view of the power during a switch transition:

There is parameter called  Maximum Safe Operating Area, but I don't know how to relate it to this scenario and plots.

I have made many assumptions such as Arduino digital output rise fall time 100ns; total cable capacitance as 10nF; solenoid LR as 10uH and 30 Ohm.

If these assumptions are reasonable, can we say that this MOSFET can handle this application? Is there any fundamental issue with this schematic?

Edit:
(Some other observations: The peak of the MOSFET during the transition is ultimately related to the inductance of the solenoid which I don't know its value. The peak goes to 60W when the inductances are set to 200mH and 1N7433A is used and 40W 1N7433A when not used. I'm doubting the necessity of 1N7433A. And I think it is very important to estimate the inductance of the solenoid.)

After PhilG's note on lack of line resistance, I added 3 Ohm resistance before the Cp. Here is the result:

That didn't change much, but I increased the solenoid inductances to 100mH each here is the plot (the peak goes up to 40W and with 1N7433A to 60W):

Edit 2:

This is another version. Added buffer at transmitting side to ease the Arduino digital output currents. 12V power supply is shifted to receiver side. Increased the inductances to 100uH. Added 10 Ohm series resistance for the MOSFET gate.

Here is the simulation results for transition power:

Is this below safe operating region?

Here is my last edit:

I set the inductance to more realistic one 300mH. I checked the temperature and it doesn't even need heatsink if the simulation is correct. I changed the diodes to 1N4001 because the 1N4148 was a bit too low power.

For stability, 100uF cap is added across power supply. And finally one flyback diode for each solenoid.


texts:
I wants to understands possibility when torque overload occurs.

Suppose motor is pulling up load A through pulley.Now if extra load B is added to trolley.Now there is difference between load torque and electrical torque, motor speed momentarily decreases. Now motor control increase duty cycle and increasing the current and increasing the speed to SET Value.

But if current increases beyond max limit,We switch Off supply.Now motor will start rotating in reverse direction.It can gain very high speeds.
and if motor is PMDC it can generate high voltage also.

My Question:
 what kind of damage it can do to a motor both mechanically and electrically?
Any ways of reducing that.I read torque limiter can be used but what is best option when we have size limitation and we want the process to be automatic.
Please correct me If I am thinking something Wrong.

Thanks


texts: Why is my op amp output not as expected?

texts:
I'm trying to amplify a ~3V signal to ~12V. It's generated using my PC sound card. My circuit works in simulation but in reality, the output is not right at all. What could be going wrong?

The input signal (1V/div):

The output signal (again, 1V/div):


texts:
I am planning to build a circuit with a bluetooth audio receiver (MH-M18) and an Arduino Nano, connected to a DIN connector.

I have a wire with 12V supply readily available to connect to the circuit. The bluetooth module works with 5V and draws up to 20mA.

Is it a good idea to design a buck converter to step down the 12V to 5V to power both the bluetooth module and the Arduino, or should I just power the Arduino with the 12v and power the bluetooth module with the 5V output from the Arduino?


texts:
Application and circuit:

Powered from a 6 circuit fuse block that has both constant and switched power to the output terminals.
Item powered is a dual USB 2.0 port, max forward current if both ports are used simultaneously with a device drawing max current is 1 amp @ 12VDC (supply voltage does very from 11.8 to 14.8VDC)

The USB port has two circuits feeding it so it can be powered and shut off with normal key on bike running (circuit 1) and powered with a switched second circuit when the bike is off.(Circuit 2)

The issue I have is, the fuse block is being energized by by circuit 2
The switch used for circuit 2 is limited to a SPST miniature push button switch that fits a specific mount.

I need to prevent current flow back to the fuse block when circuit 2 is used.
I  have been using two 1N4004 diode in parallel successfully. I understand some of why pairing diodes like this is not the correct solution..
So the question, what is the correct diode for this application?
 As said, an alternate switch is not an option, nor is altering the fuse block.
So the solution needs to be something between the fuse bloc output terminal and the usb PORT

Thank you advance for your time


texts: What is the difference between frequency modulation and phase modulation?


texts:
I need to make a battery pack for a robot horse that has 4 x 12V geared DC motors turning wheels on the four hooves.
Here are the power draws:
5V systems:
Rasperry Pi (3 amp)
Aruduino Uno (<1 amp)
6 high-torque servos (up to 1amp each if they all moved at once)
12V systems:
4 DC motors with stall currents of 22A each, assuming <4A continuous
3 nema 17 Stepper motors
Buck converter 12V --> 5V @ 10A
Summary:  12V supply needs to be able for short bursts to crank out 95-100A, but would normally draw 21A while moving and about 2 amps while stationary.
Battery life of 15 min of hard use is sufficent
My first thought is to use 2-4 5AH 12V Sla batteries in parallel.  (Weight/size is not a factor, easy to charge, safe, and I have several lying around.)  I haven't been able to confirm their ability to put out bursts of current, but assume so since they are used for starter batteries on small engines.
Alternatively, I could use a 4S LiPo pack or 4x18650 cells.  Higher performance, but would make charging and monitoring more painful.  Costs 2-3X SLA batteries and adds a safety risk of battery fires.
Would 12V SLA batteries work for this, or do I need to plan on LiPo packs?  Or is there another better alternative for a battery pack?


texts: Understanding Timers, Counters and Prescaler Registers on the STM32

texts:
So I'm trying to set up a very simple periodic interrupt on my STM32VL-Discovery board using the libopencm3 libraries on linux.  I've looked at the documentation and I just want to verify with somebody that I understand what's going on.

My understanding is that the prescaler register scales the internal clock to another frequency/clock that the timer actually sees.  i.e. you set the timer prescaler register to 24Mhz/DesiredHz to get the timer to operate at the desired frequency.  Is this correct?

Assuming that's correct, say I want to generate an interrupt on every timer clock cycle.  I didn't see anything in the docs that would allow me to do that besides setting the period register to 1.  This would generate an overflow interrupt every clock correct?


texts: Calculating capacitance for high voltage doublers

texts:
I am working on a power supply for a tesla coil, and keep having really annoying problems with MOTS (microwave oven transformer).

We have a bunch of microwave capacitors and diodes, which we are attempting to increase the voltage with those, plus two little 1nf 10kv caps in parallel with the diodes.

Weird problems

So we decided to fire up a voltage doubler, and the results were amazing! We had arcs finally breaking way over a foot and a half, but unfortunately, one capacitor failed, and we realized that maybe it is a good idea for a safety gap!

So, we replaced the capacitor with something a tiny bit off value (like from .9µF to .8µf) and the arcs were horrible, they started at a few mm and broke at a few cm.

So what is making a huge difference with the caps just a tiny bit different in value, and how can I calculate the right capacitor to use?

Does it have to do with resonance?, because I can get the inductance of the secondary with my handy LCR meter.

I left the MOTS at school and I forget the exact secondary inductance, but I believe it was in the Fifteen Henry ballpark.

Schematic:


texts: Understanding load cell and instrumentation amplifier

texts:
I want to build a weight scale with 0.1 gram resolution. But I have some problems in my initial stage.

I am using a load cell with sensitivity of 1mV/V and excitation voltage of 3 V.

With no weight, the load cell output shows -0.089 mV and with full load (500gms) it shows 2.895 mV. Is -0.089 mV the noise of my load cell? If so, how could I solve this problem? Why is my load cell mot showing an output of 3mV for 3 V of supply?
I have connected the load cell to IN amp (PMI AMP04FP) with  a gain of 100, with no load, I get an output of 3.203 mV and with full load I am getting an output of 278 mV.
Why is the IN amp showing an output of 3.203 mV? Is it the offset voltage? If so how could I solve the problem? Why am I getting 278mV instead of 300mV?

I have gone through the basics. But couldn't get my mind clear because of a lot of information in a small time. I know that my questions are basic and need some reading. I would be glad if someone could explain me what is happening and how to proceed. I am willing to learn. So, any kind of help (links, books etc) is appreciated.


texts:
I'm trying to get into IC layouts...

Why do I see some IC layouts with or without the body terminal on the transistors. Do  MOSFet transistors need a body terminal in an integrated circuit? Or should I just ignore it, and just draw the source, gate, and drain (like most examples).


texts: What happens to the energy bands when a forward bias > Buit-in potential is applied

texts:
When we applied a forward bias across a PN junction, the barrier height of the depletion region reduces.

What will happen to the energy bands when we apply the forward bias greater that the built-in potential?


texts: How to find Input capacitance and output resistance of a CMOS circuit with spice

texts:
I have a 2-input NAND gate spice netlist (generated from a Tanner Ledit layout) where I have to find each input's capacitance and the output resistance. I am to use a 1nF load capacitor and a 10 Kohm for the calculations. I honestly have no idea how to do this using spice and could really use some help getting started. Here is the netlist:

*** Extration Obtained

.include Model.txt

NODE NAME ALIASES
1 = Vdd (23.999,44)
2 = Gnd (28.999,0.5)
3 = Nand_out (20.999,21)
4 = A (46.999,19.5)
5 = B (49.999,24)

M1 6 4 3 2 NMOS L=2u W=10u AD=70p PD=34u AS=55p PS=31u
* M1 DRAIN GATE SOURCE BULK (30.5 5 32.5 15)
M2 2 5 6 2 NMOS L=2u W=10u AD=70p PD=36u AS=70p PS=34u
* M2 DRAIN GATE SOURCE BULK (39.5 5 41.5 15)
M3 1 4 3 1 PMOS L=2u W=10u AD=80p PD=38u AS=110p PS=62u
* M3 DRAIN GATE SOURCE BULK (30.5 27 32.5 37)
M4 3 5 1 1 PMOS L=2u W=10u AD=110p PD=62u AS=80p PS=38u
* M4 DRAIN GATE SOURCE BULK (39.5 27 41.5 37)

Total Nodes: 6
Total Elements: 4
Extract Elapsed Time: 0 seconds
.END

Any help would be appreciated!


texts: Differentiate 01 and 10 in digital logic

texts:
I'm looking for a device with the following truth table:

The 00 and 11 case can be done with NOR and AND, but XOR cannot tell 01 and 10 apart.
Is there a device with such a truth table? If not, how can I make one?
I can think of one method, which adds a NOT in one of the inputs that turns 01 and 10 into 00 and 11, but it seems quite messy.


texts: Unknown component in rice cooker designated OS

texts:
I am looking at the PCB inside of a Zoujirushi rice cooker, and there is a component that I can't identify. It has 3 wires and is designated "OS1". I couldn't find anything about an OS abbreviation online, but the neighboring component is labeled OS2 and appears to be a crystal.

The component is bright blue and the covering material is a rough ceramic. It has three wires and is placed next to the crystal below the LCD in the picture below:

Here is a closer look at it:

The text on the component body appears to be "400C ~ 22.5" (hard to see because it's small and at an angle).

Note that the PCB is 2-sided, and all of logic stuff is on the other side. This side of the board is mostly controls, display, and power supply. Here's a picture of the other side:

The OS1 label appears in the lower right hand side of the large IC.


texts: Relay circuit for circulator pump and actuators

texts:
I need help designing/wiring a circuit for thermostatic relays, which control electrothermic actuators.

Basically I have 4 actuators and thermostatic relays, which pretty much is just a 12vDC JQX-115F SPDT relay that trips whenever heat is needed.
This relay switch then supplies 230vAC power to the actuator, which opens the valve in the central heating system.
So i have 4 relays and 4 actuators, now, i would like to wire this up so that whenever one (or more) of the actuators is powered on, the central heating circulation pump is powered on and when none of the actuators is powered, the pump is off too.

Initially I thought this would be easy as i could just wire the pump in parallel with the actuators like so:

(2 switches and actuators, because I'm lazy with paint :) )
Obviously this wouldn't work, as any switch will power everything.

So the only other solution I can think of, with my quite limited knowledge of electronics, is using the thermo-relays to switch 12vDC to 12vDC SPST relays, which would switch 230vAC to actuators and pump, and using diodes to make sure each switch only powers on their own actuator and the pump.
Like so:

This would work right?

Anyone have a better (cheaper/easier) solution?

Any help/guidance would be deeply appreciated :)


texts: Can I use a key switch rated as suitable for 12 or 24V DC with an Arduino?

texts:
I want to use a key switch in conjunction with an Arduino, so that I can detect when the key is turned by reading HIGH on a digital input pin. This is the one I have found that matches the aesthetic I am after:

Momentary Key Switch

I originally assumed I could just use this as I normally would with a standard push button switch: when the switch is closed, the current flows which I can easily detect in the code.

However, I'm now wondering if there's more to it as it is rated for 12 or 24V DC and the Arduino only provides 5V. It seems to me like it should be as simple as if an electrical connection is made (when the key is turned) then the current will flow. Is there more to it that I'm missing, or are these simply upper voltage limits and therefore it shouldn't be a problem?


texts: I can not understand this circuit diagram

texts:
I've many questions about this circuit diagram. I found it on the datasheet of NCP1012. It is a switching mode power supply SMPS.

Are E1 and E2 electrolytic capacitors and C1 and C2 Ceramic Capacitors?
What is the value of C2? Is it 2.2 nF? and what is the meaning of /Y next to its value?
What are the numbers that are around transformer pins? Is number 5 connected to ground?
What are J1 CEE7.5/2 and J2 CZM5/2? I think they are simply output and input.
What is the turns ratio? If I need a 5 v output, Should I change the ratio?


texts: Is there a way for me to increase the OD size of a barrel connector without having to replace it?

texts: Is there a way to increase the OD size of a barrel connect without having to replace it.  Through use it has compressed the female receiver and now works either intermittently or falls out.


texts: Can't find a replacement SMD capacitor - markings 100 16v VD

texts:
I'm trying to replace an SMD capacitor in the echo sounder for my bait boat, which I use for fishing. The problem I'm having is finding a replacement. I've searched the internet and messaged a few of the large suppliers with no luck at all.

Would you possibly be able to recommend an alternative or where I would be able to get one from? The numbers and letters on the capacitor are "100 16v VD". It's 10.4 mm high and 11.3 mm dia.


texts: Altium Clearance Constraints on USB Receptacle Footprint

texts:
I made a manual footprint for a USB micro-B receptacle that is now giving me problems on my PCB in Altium Designer 16.

Here's the footprint drawing that I was going off of:

And here's what my footprint looks like:

I'm now getting a bunch of clearance constraints.

I tried editing the Manufacturing constraints in the Rules to set the minimum clearance to 0.1mm instead of 0.254mm but that doesn't seem to work.

EDIT: What is the point of the rectangular pad in the middle? I ask because if I can get rid of it then maybe I can route underneath it and resolve some of my clearance constraints.


texts: How to get a constant voltage output from a dc to dc converter?

texts:
I have designed a DC to DC converter on proteus. If I set 4V input voltage, output is 22V at 10kHz, but this output voltage is not constant. How to get a constant voltage output from a DC to DC converter?

EDIT to show the linked circuit:


texts: How to represent GND pin in CC2640 VQFN 48 pin package?

texts:
I am making a schematic for a project with CC2640 microcontroller. The datasheet provided at TI  does not mention any GND pin. However, they say something called "Exposed Ground Pad". Is this the GND pin?

How do I show it (GND) in schematic view in NI Multisim that gives fixed footprint selections in multiples of 2(e.g 8, 16, 32,48), when using component Wizard for component creation . I am currently using 48 pin VQFN Package.


texts: Simulating a 'shift key' without using relays

texts:
It's been years since I worked day to day with electronics and I am slowly coming back to the hobby. This is a question related to an intersection of my hobbies though: arcade stick modding and electronics.

I have a stick with 4 buttons for "functions" like "Select", "Start" and etc. The problem is I forgot 2 functions, so I am short 2 buttons.
I can solve that with a "shift" like function. So 1 button will be 'shift', 3 buttons with functions + 3 shift+button = 6 buttons.

Arcade stick PCBs w/ common ground simply close the ground with a pin on the PCB to register the button activation, so if I can simulate a NC/NO relay using smaller pieces I can make it work (the shift button will just close contacts to a different pin). The thing is, I don't want to use 4 huge relays to do that. I think that means that I have to pull low on the PCB pins, I measured and have 3.3v between GND and the PCB pin, so I actually have to find a way to generate 'low pulls' from something.

I have a 5v VCC line that I can use to probably flip some transistors around, but I can't figure out if/how I can make it work with GND being the 'signal' to pass.

This would be what I would do using a relay (of course that's for a single set of buttons, not all of them, I would need 3 relays for that and I am trying to design something quick and simple).

So I bow to youse people that are way smarter and savvier on electronics to help me with that.


texts: Calculate the appropriate bias voltage (and resistor) of a condenser microphone

texts:
I have a condenser microphone that has no any model name or number. As we know condenser microphones need a bias voltage for operation. Some microphones need \$2 V\$[1]. and some need more. As we can not feed microphone more than its \$V_{max}\$, is there any way and measuring method to calculate the appropriate bias voltage of it without having its datasheet?

Edit:
What is the appropriate Resistor to build the biasing voltage?

simulate this circuit – Schematic created using CircuitLab


texts: How to identify the feedback topologies?

texts:
It is extremely important to identify the feedback topology first before starting analysis. However, I find it difficult and cannot get it right.

Is there an accurate yet easy way for me to identify one out of the following four feedback topologies?

Series-series
Series-shunt
Shunt-series
Shunt-shunt


texts: A question about antenna gain and signal property

texts:
I have an antenna with a somewhat constant gain "X dBi (theta, phi)" in the frequency range of interest.

With this antenna we receive a radio signal with an amplitude of "Y Volt (t)".

The signal is a very short pulse which means it has a flat spectrum in the frequency range of the operation (A to B MHz).

How is it possible to derive the properties of the incoming signal to the antenna like the electric file value?


texts:
I've been working on a small project inspired by this question that uses a CMOS 555 timer as a power button controller (short press to turn on, 3s hold to turn off), the goal being to design a micropower circuit that can operate across a wide supply range. To do this, I use a CMOS 555 as a latching window comparator, and have separate RC networks connected to the THRES and TRIG inputs, as shown in the schematic.

While researching different CMOS 555 timer options, I found the datasheet for the TLC555 has the following disclaimer about the quiescent current:

  These values apply for the expected operating configurations in which THRES is connected directly to DISCH or to TRIG.

Does this imply that the TLC555 will draw an excessive amount of quiescent current if THRES is not connected directly to DISCH or TRIG? If so, why would this be the case? Note that in the "idle" state TRIG will be close to the supply voltage and THRES will be close to ground.


texts:
My BIG question is : why does positive battery cable in a car is directly connected to the starter to crank the engine and does that mean the current actually flows from positive battery post to starter and then comes to negative post through a frame? Many car books usually state that it is the positive wire that gives power to the starter and not vice versa?  Where is the flaw in this reasoning - it is certainly how electricity used in cars today practically, not theoretically?  I started reading about Ben Franklin and then "real" flow of electrons and really got lost because i understand that usually it does not matter in simple circuits which way it goes to make it work but I still wanna get a little bit closer to my understanding: does this dc current (force, what ever you wanna call it) works in a car -  a. travels from positive to negative  b. from negative through a frame, starter and into positive c. people don't really know at this time so don't bother :)

UPDATE: Thank you for the answers and adding to this discussion - Franklin was probably wrong but car manufacturers of 21st century certainly have all the knowledge they need yet the THICK positive cable connects to the starter but probably thick cable connects from starter to frame as well and frame is pretty thick itself :) - it is just interesting to know that there are several circuits using the frame as the path, possibly at the same time - I'll have to read more on that : as far as "electron flow" i read that it may take 1 electron from negative post 4 HOURS to reach positive post so I'm not sure what kind of "flow" we are talking about and if the power that makes gadgets work is indeed the "flow" rather than some "force" or "field" that is instantly present once you close the circuit. I also read that change of frame polarity (positive or negative cable to the car frame) which happened sometime in the 1950s was to better deal with higher voltage systems (change from 6v to 12v) and rusting of car frame and bodies due to electrical current running through the frame. How did switch from positive wire to frame to negative wire to frame help with rusting ? - I still have to do more research to see if it was indeed one of the reasons to switch frame wires and whether it did any good but it seems that manufacturers' thoughts about the way current traveled through the frame certainly shaped their decision to make the change


texts: Is this possible to transmit higher data-rate with 9600 bdrate clock in ISO7816

texts:
I am trying to transceive information between an embedded processor and a smart-card device.

Default transition is done in:
9600 baudRate
3.58MHz clock pulse
Fi=372
Di=1

After initial command between smart-card and processor I need to increase baud-rate (e.g. 115200).I must increase my clock frequency to 42.96MHZ for transceiving in 115200 bps,But unfortunately my processor is unable to generate this frequency.Then Can I change Fi or Di parameter to any other higher values for increasing baud-rate?


texts: How to protect a RF chip from thunderstorm static electricity?

texts:
I'm working on a open-hardware wireless wind sensor. It's designed for being installed on mountains, where thunderstorm are quite often. I use a Si4461 RF chip, with a half wave whip antenna.

My problem is the following :

We had several big thunderstorms last week. And every time, I got several sensors dying at the exact time the thunderstorm was here.

Only the RF chip is dead. The other components looks undamaged.

It seems like to be because the antenna is picking-up static electricity from the thunderstorm.

So my question is : how to protect the RF chip from thunderstorms ?

I've been told that an « ESD suppressor » like this could do the job : http://www.mouser.fr/ProductDetail/Cooper-Bussmann/0603ESDA-MLP7/?qs=/ha2pyFadug/ksZDRDWi4cQDcjEmIJ07mgZKTEB3xPvlqKzTt8q7CA==

Someone else told me about using a choke and a TVS diode.

This device is battery powered in a plastic enclosure. Grounding will be difficult.


texts: Reading Analog value from GPIO on STMF103RCT6

texts:
I am new to electronics, but have a fair bit of general programming experience, be gentle :)

I have an existing PCB with an STMF103RCT6 where the available pins are GPIO D 0 and GPIO D 1.

I would like to be able to read values of a variable resistor (joystick) - I can see the voltage dropping gradually as I move the joystick forward, but at the moment I am only able to differentiate between full forward (1) and about halfway towards center. I understand that this is where the threshold is crossed, but not sure if there is a way to get at the 'distance' to threshold or the like - I have set the pins to be GPIO_Mode_AIN but not sure if this is a dead end, or if not, where to actually read analog data from.

Do I have options other than involving ADC or adding a capacitor and capturing how long it takes to fill?

Thanks!


texts: Multiplex Seven Segment Display Fast enough to make Solid

texts:
I have been trying to multiplex a 4 digit seven segment display on my FPGA board but have been running into not being to get it fast enough so it looks solid to the human eye.

You can see an example of the speed here: http://youtu.be/geTgZcHrXTc

How do multiplex fast enough so it looks solid to the human eye?

I am using the Basys 2 board.

Right now my VHDL looks like:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity main is
    port(
        clock       : in STD_LOGIC;
        sevenseg    : out STD_LOGIC_VECTOR(6 downto 0);
        anodes  : out STD_LOGIC_VECTOR(3 downto 0);
        switches    : in STD_LOGIC_VECTOR(6 downto 0);
        dp      : in STD_LOGIC
    );
end main;

architecture Behavioral of main is
    signal counter: STD_LOGIC_VECTOR(1 downto 0) := (others => '0');
    signal r_anodes: STD_LOGIC_VECTOR(3 downto 0);
begin

    anodes <= r_anodes;

    -- Given Binary Value print it
    multiplex: process(counter, switches)
    begin
        -- Set anode correctly
        case counter(1 downto 0) is
            when "00" => r_anodes <= "1110"; -- AN 0
            when "01" => r_anodes <= "1101"; -- AN 1
            when "10" => r_anodes <= "1011"; -- AN 2
            when "11" => r_anodes <= "0111"; -- AN 3

            when others => r_anodes <= "1111"; -- nothing
        end case;

        -- Set segments correctly
        case r_anodes is
            when "1110" =>
                if switches(0) = '1' then
                    sevenseg <= "1111001"; -- 1
                else
                    sevenseg <= "1000000"; -- 0
                end if;
            when "1101" =>
                if switches(1) = '1' then
                    sevenseg <= "1111001"; -- 1
                else
                    sevenseg <= "1000000"; -- 0
                end if;
            when "1011" =>
                if switches(2) = '1' then
                    sevenseg <= "1111001"; -- 1
                else
                    sevenseg <= "1000000"; -- 0
                end if;
            when "0111" =>
                if switches(3) = '1' then
                    sevenseg <= "1111001"; -- 1
                else
                    sevenseg <= "1000000"; -- 0
                end if;

            when others => sevenseg <= "1111111"; -- nothing
        end case;

    end process;

    countClock: process(clock, counter)
    begin
        if rising_edge(clock) then
            -- Iterate
            counter <= counter + 1;
        end if;
    end process;

end Behavioral;

And my constraints file looks like:

NET "sevenseg<0>" LOC = "L14";
NET "sevenseg<1>" LOC = "H12";
NET "sevenseg<2>" LOC = "N14";
NET "sevenseg<3>" LOC = "N11";
NET "sevenseg<4>" LOC = "P12";
NET "sevenseg<5>" LOC = "L13";
NET "sevenseg<6>" LOC = "M12";
NET "dp" LOC = "N13";

NET "anodes<3>" LOC = "K14";
NET "anodes<2>" LOC = "M13";
NET "anodes<1>" LOC = "J12";
NET "anodes<0>" LOC = "F12";

NET "switches<6>" LOC = "E2";
NET "switches<5>" LOC = "F3";
NET "switches<4>" LOC = "G3";
NET "switches<3>" LOC = "B4";
NET "switches<2>" LOC = "K3";
NET "switches<1>" LOC = "L3";
NET "switches<0>" LOC = "P11";

NET "clock" TNM_NET = clock;
TIMESPEC TS_clock = PERIOD "clock" 20 ns HIGH 50%;


texts:
To measure a voltage in a (potentially dangerous) external system, people typically use a differential amplifier or even an isolation amplifier, something like this:

simulate this circuit – Schematic created using CircuitLab

This way, the voltage going into the safe system isn't directly connected to high voltages, and we can happily put our ADC there and supply it a safe input.

I want to do this the other way around. I am generating a voltage \$V_{out}\$ under 5V, and I would like to apply this voltage across an element of the other circuit.

Is there a typical setup for doing this?
I believe that the low side of my output will be connected to the ground of the external circuit. That means it would be possible to do this without a differential output - I could just put my regular ground-referenced output into the external circuit. Am I correct to think that it's unsafe to simply connect the two grounds together, or is this the much simpler solution?


texts: Is RF propagation path loss symmetrical and independent of clutter location?

texts:
Scenario: Consider two measurement points, point one is about 3m above ground level within a cluster of buildings (such as within an office park), and point two is about 1km away with an elevation angle of 30 degrees from the first point.
With ideal isotropic transmit and receive antenna at both points, would the RF path loss measured at point one to point two be the same as the reverse (point two to point one)? Would the scattering and refraction much closer in proximity to point one make a difference measuring to and from it, in the 2.4GHz range for example?


texts:
I have a contact (pushbutton) that's about 10 metres away of a Raspberry Pi.

However; it behaves quite erratic and would trigger when for example an exhaust fan is started in proximity of the wire. I believe the AC electromagnetic interference causes it to trigger.

What I've tried:

Software fix #1 Whenever an active signal is received; I wait 100ms and check again. If it's active twice; it's verified. This actually 'fixes' the problem; though I would like to know how to make the hardware layer more resistant against emi.

Soft/hardware fix #2 Enabled internal pull-up of the Raspberry Pi. In this way it has a predefined state and thus has less interference (though still notable amounts).

Hardware fix #1 Use an external pull-up resistor. I've tried 5K (not quite good enough) and 1K (seems about right), though various sources discourage low resistance as obviously causes higher current.

Hardware fix #2 use an cat5e foiled network cable instead of regular power cable. This didn't quite seem to work (its foil wasn't really connected to anything), should it be connected to GND? (or is shield not GND?). The resistance of the network cable could be higher as electical cable; since it has less copper?

What I'm searching for:

Actual proper ways of implementing such systems; possibly for up to 50m.

I'm thinking of putting 24V on the wire with the button and a opto-isolator or relay on the Raspberry Pi's side. Though this would require quite some extra components and I don't understand why it would be required at ~10m.

Theory and best practices?

How can we calculate the required amount of voltage? Should I use a shielded cable (how to connect the shield?) or a cable with low resistance?


texts: Davies MSP430 Software Debounce Question

texts:
currently working on software button debounce. Using Davies MSP430 book. I am trying to write similar code in C (using CCS) for a MSP430FR6989. The program uses bit shifting, and I understand idea of it. What I cannot figure out is how to deceipher these #defines that Davies uses. I don't know how to convert that for the FR6989. I keep getting errors that I have undefined items.

Like I define RAW_BUTTON_PRESS1 as P1IN_bit.P1IN_1 and am getting errors that P1IN_bit is undefined. I'm having trouble understanding these pin assignment conversions

snippet from davies

my code

// Device: FR6989
// See Davies MSP430 Software Debounce starting on pg 233

#include <msp430.h>
#include <intrinsics.h>
#include <stdint.h>

union debounce{
unsigned char debounceP1IN;
struct  {
    unsigned char debounceP1IN_0 : 1;
    unsigned char debounceP1IN_1 : 1;
    unsigned char debounceP1IN_2 : 1;
    unsigned char debounceP1IN_3 : 1;
    unsigned char debounceP1IN_4 : 1;
    unsigned char debounceP1IN_5 : 1;
    unsigned char debounceP1IN_6 : 1;
    unsigned char debounceP1IN_7 : 1;
} debounceP1IN_bit;
};

#define RAW_BUTTON_PRESS1        P1IN_bit.P1IN_1
#define DEBOUNCE_BUTTON_PRESS1   debounceP1IN_bit.debounceP1IN_1
#define LED1                    P1OUT_bit.P1OUT_0

void main (void)
{
WDTCTL = WDTPW | WDTHOLD;               // stop watchdog timer
PM5CTL0 &= ~LOCKLPM5;                   // Disable the GPIO power-on default high-impedance mode

P1OUT &= ~BIT0;                     //Pre-load LED P1.0 Off
P1DIR |= BIT0;                      //Set P1.0 LED to output

P1DIR &= ~BIT1;                    //set P1.1 button to input
P1REN |= BIT1;                     //Enable Resistor Button P1.1
P1OUT |= BIT1;                     //Set as Pullup resistor Button P1.1

debounceP1IN = 0xFF;                //initialize debounce state of P1.1
TA0CCR0 = 5000;                     // TA0 interrupt triggers every 5 ms
TA0CCTL0 |= CCIE;                   //Enable TA0 interrupt
TA0CTL |= (TASSEL_2 + MC_1 + TACLR);    //SMCLK (1mhz) count to CCR0, clear timer

__enable_interrupt();

for(;;)
{
   LED1 = DEBOUNCE_BUTTON_PRESS1; //Update LED1 from debounced button
}
}

#define PRESS_THRESHOLD     0x3F
#define RELEASE_THRESHOLD   0xFC

#pragma vector = TIMER0_A0_VECTOR
__interrupt void TA0_ISR (void)
{
   static unsigned char P11ShiftReg = 0xFF; // Shift Reg for history of P1.1

P11ShiftReg >>= 1;                      // Update history in shift register
if (RAW_BUTTON_PRESS1 == 1)                         //Insert latest input from P1.1
{
    P11ShiftReg |= BIT7;                //Set MSB of Shiftreg P1.1 to 1
}

if (DEBOUNCE_BUTTON_PRESS1 == 0)                         //when debounce value is low
{
    if(P11ShiftReg >= RELEASE_THRESHOLD)    //when button is released
    {
        DEBOUNCE_BUTTON_PRESS1 = 1;                          //set new debounce state high
    }
}
else if(P11ShiftReg <= PRESS_THRESHOLD)     //when debounce value is high and button is pressed
    {
        DEBOUNCE_BUTTON_PRESS1 = 0;                          //set new debounce state low
    }
}


texts:
How could I decode this capacitor?
MEXICO is written on the other side and it's in a speaker.


texts: Digital regulator for DCM Boost - How does it relate to duty cycle?

texts:
I really hope someone can help me here, I'm tearing my hair out trying to bridge the gap between control theory and electronics.

My aim is to control a discontinuous conduction mode boost converter using voltage mode control. I have modelled the small signal dynamics of the control to output voltage transfer function, as per Erickson's book (fundamentals of power electronics, second edition). I'm quite confident with it's model, shown below in Laplace form:

$$
T_{u} = G_{PWM} \cdot G_{vd}
$$

Where:

$$
G_{PWM} = \left.\frac{1}{M}\right|_{M=PWM\space Ramp\space Height}
$$

And:

$$
G_{vd} = \frac{\hat v}{\hat d} = \frac{G_{d0}}{1+\frac{s}{\omega_p}}
$$

where:

$$
G_{d0} = \frac{2\cdot V_{out}}{D}\cdot \frac{\frac{V_{out}}{V_{in}}-1}{2\cdot\frac{V_{out}}{V_{in}}-1}
$$
$$ D = \sqrt{\frac{2\cdot L \cdot I(V_{out}-V_{in})}{V_{in}^2 \cdot T_s}} $$
$$ \omega_p = \frac{2 \cdot \frac{V_{out}}{V_{in}}-1}{(\frac{V_{out}}{V_{in}}-1) \cdot RC}$$

This is a simplified model of the boost in DCM, as written in Erickson's book, by letting the inductance tend to zero. My final plant, the uncompensated loop, is the following:

$$
= \frac{1}{4.5}\cdot\frac{11.94}{0.0006644s + 1}
$$

So, I designed a controller which suits my needs, ~5 kHz BW, >50 degree phase margin:

$$ G_{C} = \frac{7.716s + 7.716 \cdot 10^4}{1 \cdot 10^-5 s^2 + s} $$

I simulated this in simulink, and it's behaviour is as I would expect. I have transformed the controller from the Laplace domain to the discrete domain, via a tustin/Bilinear transform (I didn't prewarp as it didn't seem to make a difference?) and I converted the resulting discrete transform function into a difference equation as follows:

$$ y(n) = 1.905 \cdot y(n-1) - 0.9048 \cdot y(n-2) + 0.7384 \cdot x(n-1) - 0.731 \cdot x(n-2) $$

And this is where I fail - I can't for the life of me understand how the value out of this function relates to duty cycle. In simulink, I can use the scope function to look at the output of the controller, but it doesn't seem to relate to duty cycle. The number initially goes well beyond 100% (almost to 150%), and then settles around 30%.

And so my question is, how does my controller, \$G_{C}\$, relate to duty cycle? I have the difference equation implemented in software, but I need to use this value to set the PWM output, and I'm sure where this number is! Is it a simple 1-1 mapping, or does it depend on other variables?

Any help would be greatly appreciated, thank you very much in advance!

EDIT:// Updated \$v_{g}\$ to be \$V{in}\$ also adding this picture to help explain simulink:


texts:
I am slightly new to Altium and I've not run into such a problem with other EDA software.

I use version 20. I can find simple stuff like resistors in the included library and at least a few footprints for them. The manufacturer part search is more extensive, but by far does not include every part with a model, so I could directly place it.

I couldn't even find a specific TI dual opamp with a model, so I went through the trouble to create my own symbol for dual opamps.

Then I found out that even completely standard footprints such as MSOP/TSOP/VSSOP-8 used for dual opamps are not in the default library! I will not go through the trouble to redraw all possible parts in the world just to use Altium.

Also I cannot use only the footprint from manufacturer parts. I can only use entire manufacturer components, if they exist.

Is this all a joke or am I not getting something? It is not even possible to construct the most basic circuits without drawing half of your components. I couldn't find any comprehensive PCBlib file which includes all standard footprints either.

Please tell me what am I doing wrong. Also please don't tell me that "I usually draw all components myself." I know, I've drawn many components in my life in different tools but never did I have to draw an opamp before. In this is one of the most expensive softwares out there.

In case there is no useful remedy to this problem in Altium other than in fact drawing all the parts, what other software can you suggest that has useful hierarchical design capabilities across schematic and PCB?


texts: Supercapacitor in parallel with Lithium 3.6V Primary Cells

texts:
I have a circuit I would like to implement but need some advice first. It seems basic enough, but not having worked with either Lithium-Thionyl batteries or supercapacitors before I want to make sure.

There are 2x 3.6V/17Ah primary, non-rechargeable batteries in series to get 7.2V. The peak current of the SAFT 33600 is 400mA for 100ms pulses, continuous is 250mA.
The batteries feed a DC to DC converter to get 12V
There a peak currents needed for short burst, thus the addition of supercap(s): there are 2x 5F/5V supercaps in series (160 mOhm Ri)
A schottky diode will be added from the batteries to protect them.

From this, the supercaps are paralleled between the schottky diode cathode and the DC-DC converter. My concern is this scenario, with the initial charge at zero, before the batteries are inserted, the first time "charge".

I think that once the caps are charged, they reach equilibrium in voltage, and from that point will supply the current "peaks" (about 300ms of 2A) while being used, and getting a trickle charge when not. Note that the load is shown as a simple resistor, but it is a peak-cycle circuit that requires burst peaks as stated.

The question then is, does the current flowing from the battery into the caps need to be controlled when the caps are not initially charged? If so, adding a limiting resistor is not a first choice, I don't want to lose any energy unnecessarily during regular use.


texts: Macros V/S inline functions while programming for avr-gcc

texts:
I have been doing my first serious work of programming these days. I have been exposed to a lot of code by different developers. One thing I find confusing is how do these developers decide when to use a macro definition and when to use a inline function. Both have essentially the same function, they place a certain code at the place they are called from. So is there some logic for selection or is it just at the whimsy of the developer?

(I am here talking about macros for functions and not constants).


texts: Low impedance rail to rail 24V output from NE555

texts:
I'm designing charge pump based 24V to 144V converter for powering up my experimental tube amplifier. So I need a low impedance driver circuit with rail to rail output.
Can you suggest me the best way to drive 24V from low voltage oscillator like NE555 (about 12V max) of even simple TTL Schmitt trigger oscillator (5V)? As far as I understand it can't be done with simple push-pull circuit.

UPD: I think this should work. I added two 10V Zeners to prevent short cut because 24/2-10 < Vth so it's impossible to open both transistors simultaneously.

Maybe there is a more simple solution?


texts: Wearable electronics in which kind of electrically-insulated mold?

texts:
I have a wearable electronics that I need to keep in my finger. I don't have the resources to put a prototype into something small like custom ASIC so I would like to find a way to put it to shape it needs (this may result into short-circuit so and other problems so have to consider different ways). The battery inside the mold last months so it is not necessary to have a charging point. I have considered the following ways to create the mold:

  prototyping

  urethane
  using electrical-tape
  3D-printed mold
  silicone

  more expensive

  printed electronics
  injection mold

Are there some common methods to have electronics in molds or containers for wearable electronics not to cause problems such as short-circuits?


texts:
My manufacturer is asking me to remove those lines from the ground gerber layer

The design was made in eagle, I've been searching information about this problem and I've found nothing, I don't know if it has a specific name or it isn't a real problem

It's a problem of the gerber file?

I'm using Eagle 8.3.0 and GERBER_RS274X as device output

Edit:

This is the same file exported to a pdf, I've visualized with microsoft edge at100% zoom. When zoom in into 300% the lines are gone


texts: SPICE model for a computer bus / data bus

texts:
I need some suggestions on how to develop a SPICE model for a computer data bus.   Since each data signal is similar, I only would model one signal ("D0").
This is for some experimentation I am doing to understand the electrical load and behavior of a data bus on a microcomputer (IBM PC).
The data bus has a variety of devices connected - a couple static RAM chips, a ROM chip, a real time clock.
My first thought is to draw a wire that is the bus.  I would connect a voltage source / switch on the left to represent the square wave used to excite the bus line.   Then I would connect a capacitance and resistance in parallel (to ground) at a few places, with one per device.
I also need to add capacitance and inductance between each device on the model, to account for the PCB trace.  For the PCB, I would use an inductance and resistance in series, with a capacitance to ground.
Is this an appropriate model?
To get the values:  For the device I would get the pin capacitance from the device's data sheet.   To get the value of the resistance, I would use Ohm's law and divide the voltage (5V) by the input current leakage from the data sheet.
For the circuit board, I need to find some formulas for resistance, capacitance, and inductance for some estimates of the trace geometry.
I am excluding effects between signals/traces on the PCB.
Based on the results of the simulation, I will decide on using bus drivers or passive components to terminate the bus signals, to improve signal integrity.
Anyone out there who has a solid foundation able to reinforce my thinking, or, point me in a better direction?


texts: Test stand for remote wire (SMA) testing

texts:
At the beginning I would like to remark two things: First, I'm a greenhorn in your world, but I have some basic knowledge about electronics. Second, theoretically I have Arduino Leonardo, but if you know how to solve my problem with other module, I will gladly buy everything that is necessary.
I would like to measure characteristics of wire (SMA - Shape memory alloy) in a vacuum. I have no problem with the mechanical part of my test stand, but obviously I have huge problems with electronics. I would like to heat the wire remotely (the measurements take place in the vacuum pump) with Joule heating and control my voltage, and be able to read the temperature in real time.
My question is: What components do I need for this system? It would be great if you give me also some hint how to connect it, but I will be amazingly grateful just for pointing out what do I need!
As far as I did my research, I think I need some WiFi module (or radio module e.g. nRF24L01), probably MOSFET, MAX6675 with LM35 as cold junction thermocouple(?), some resistors and of course a battery, solderless breadboard, Arduino, and cables.
I'm really not sure if my thoughts are going in the right direction, I do my research but at the beginning it's hard. The more I read, the less I understand. Is it at all possible?


texts: Automotive IO input protection design for ESD, transients, and reverse polarity compatible with ISO 7637

texts:
I want to accept an signal that could have any of the transients defined in ISO 7637-3 on it. It is a reset signal that could be tied to 24V in the case of a wiring harness meltdown but typically should be either floating or ground.

I was thinking of using the circuit below but I fear it may not be robust enough. (The arrow points to where the transients can couple )

simulate this circuit – Schematic created using CircuitLab

So yeah, if this is exposed to ESD, +-24V (for 60s) or any automotive IO transients it needs to survive. What should I add/change?


texts: Is it possible to use a Mosfet in switching mode as an electronic load?

texts:
I'm trying to use a mosfet as an electronic load to measure the IV curve of a solar cell, but if I use it in linear region it dissipates too much power. I was thinking that I could use it in switching mode like sending a PWM value from a microcontroller, and set the output over drain pin, signal which should be a pwm as well as its input, but with the real value like modulate and demodulate the signal using a low pass filter.
I have tried that and it works, the problem is that it doesn't produce the real IV curve, it shows a linear function. Could you advice me how can I use this mosfet in switching mode to produce that electronic load?. In the picture there's a scheme that I have used to achieve it.

In the circuit Current sensor is a ACS712 for 20Amps and the voltage circuit is just a voltage divider, both filtered signals go to a ESP32 Microcontroller.

Thanks, I'm a little frustrated and I would like to know the reason why this method is not as effective as a electronic load in linear region.


texts: Trying to understand the working principle of a weird transformer driver / oscillator

texts:
I'm trying to fix the high-voltage power supply of an old scope. The HV transformer is burnt, and I'm trying to replace it with a similar one (EPC19 core), but I'm failing.

I already know how to wind and drive this same transformer with a half-bridge, but the driving circuit in this particular scope is something I can't understand.

This is the scope's HV section schematics (I did the annotations in red, annotations in blue may be original from the schematics, or may have been made later by someone else):

The HV transformer is T1001. HV circuitry is inside the red line. T1001 has a feedback winding on the primary, and in the scope schematics, it seems to be changing TR1003 base constantly, making the thing oscillate at a given frequency.

In the original burnt transformer, 1-2 are 8 turns and 3-4 are 2 turns, both AWG 28, but they are strongly coupled: both windings are completely stacked on top of each other. There are no side turns. The bobbin has been made specially for that, the primary/feedback section is a deep slot for only one AWG 28 wire to fit. In my replacement bobbin, this is not possible without modifications. So, my first question: is this coupling critical to make this oscillator work?

I tried making a similar transformer using a core about the same size, (without the strong coupling between primary and feedback, with turns laying side by side) but the circuitry shows only marginal oscillation (2Vpp), with a DC level of 19V approximately. I was expecting something like the blue waveform, annotated on the schematics. Any ideas on what may be wrong?

Another question is: if I only make primary and feedback windings (1-2 and 3-4), should the circuit oscillate? Or oscillation depends on the secondary also? If only primary and feedback are needed, it's much easier to test (no need to wind hundreds of turns on secondary).

And the last, and most important question: How this circuit really works, and which features this transformer must have to properly work with this particular topology?

EDIT:

Adding some missing info:

The transistor gets very hot in my tests. It's seems the oscillator is constantly on, making the transistor draw heavy current.
The original core is formed by EI ferrites. Central part is circular. Replacement core (EPC19) has no gap, formed by two E parts. Central part is kind of oval, but with quite similar section area when compared to the original.


texts:
I'm having trouble assigning variables to structs, particularly making an array of structs, with the XC8 compiler.

Example code below:

typedef struct p{
  int id;
  dateStamp start;
  dateStamp stop;
  int parent_id;
} period;

period p1 = {1, {0, 0, 0, 1, 1, 14}, {20, 0, 0, 1, 1, 14}, 1};
period p2 = {1, {21, 0, 0, 1, 1, 14}, {50, 0, 0, 1, 1, 14}, 1};
period p3 = {1, {51, 0, 0, 1, 1, 14}, {59, 0, 0, 1, 1, 14}, 1};

period periods[3] = {p1, p2, p3};

And this is the compiler error log:

main.c:233: error: (188) constant expression required
main.c:233: error: (207) simple type required for "@"
main.c:233: error: (182) illegal conversion between types
struct p -> int
main.c:233: error: (181) non-scalar types can't be converted to other types
main.c:233: error: (188) constant expression required
main.c:233: error: (207) simple type required for "@"
main.c:233: error: (182) illegal conversion between types
struct p -> int
main.c:233: error: (181) non-scalar types can't be converted to other types
main.c:233: error: (188) constant expression required
main.c:233: error: (207) simple type required for "@"
main.c:233: error: (182) illegal conversion between types
struct p -> int
main.c:233: error: (181) non-scalar types can't be converted to other types
main.c:256: warning: (345) unreachable code
(908) exit status = 1
make[2]: *** [build/default/production/main.p1] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

Suggestions would be welcome....


texts: How come this non-standard ethernet wiring works?

texts:
I am setting up ethernet in a friends house with cat 5 cabling. I do not do this professionally but I have made like 20 patch cables and installed about 20 wall sockets before in my own house.

My friend's house has two existing RJ45 wall sockets with an (old) existing cabling between them. I made two patch cables using the T-568-B wiring system and tested them both using a Goobay CAT-Network-Tester TP III. The tester goes through the pins and the other end lights the leds in the same order from 1 to 8.

When I connect all three segments together:
 - patch cable 1
 - wall socket 1 - existing cable inside the walls - wall socket 2
 - patch cable 2
and set up the transmitter in one end of patch cable 1 and the terminator at the end of patch cable 2, the tester shows only lights 2, 3, 4, 6, 7, 8.

This seems to indicate, that only green and brown pairs are used. However, cat 5 is supposed to work with green and orange.

So how come this connection works?

update: went to this friends house and checked the speed, the speed is 45Mbps download and 32 Mbps upload which is the same as in other parts of the house. So I am assuming that it is not working on one pair only. The physical layer must somehow detect that non-standard wiring is used and adapts to that


texts: How to Attach a Nichrome Wire to a Regular Copper Wire?

texts: I am trying to make a room heater. It comprises of a few coils of nichrome wire connected in parallel with each other and in series with a regulator to control the voltage. I am also having a step-down transformer connected in parallel with this setup powering a small dc-motor to spin a rotor and push the air out. I was wondering how I could connect the nichrome wire coils to my regular copper wires which I am using to connect them to rest of the circuit without the copper melting at the junction of the two wires where the hot nichrome will be of a temperature higher than the melting point of copper. How do I join them without this happening? I haven't tried this but I think this is what is going to happen if I do. Any ideas anyone?


texts: An Op amp circuit to implement quadratic function

texts:
I have some LM358 opamps.
What the circuit to implement (aX^2)-b*X, i.e. a quadratic function where X is the voltage?-where the circuit is made entirely from 358 opamps to do the multiplication,division and so on .To simplfy things a and b are fixed and known before the circuit is made and are both non zero and positive.
Maybe it can be done by considering the function that differentiates to that quadratic sincee , of course, op amps can be used for differentiation and integration.

Before digital computer of course it was common for computing to be done with opamps or other analog circuits. So I guess this is an easy question for someone. I want to make it out of lm 358 opamps only.

I guess (though I may be wrong) it can be done basically with 3 op amps -I'll give
the example to back this guess up.
I'll roughly describe a partial solution as follows.
From the fundamental op amp equation we have (where A cannot be chosen precisely)

A(V2-V1) where a is a constant that can be changed
thus setting V1 to zero gives AV2. Feeding this into another opamp (with the same A) and V1
to add them together gives an output of the form
(A)*(AV2-V1). So it does the quadratic in A.
Different opamps have different maximal values of A though that fact does not  seem to help here to make an efficient circuit with three op amps that does not use feedback.

Thus roughly showing that it may be theoretically  possible to do with three op amps.
Note that this idea is rough so it means that I am using A as the free variable here and not X as before in the top of the question.


texts: 434MHz Small loop printed antenna design

texts:
For antenna design, usually it is half wavelength or quarter wavelength antenna. I am trying to understand small loop printed antenna design for 434MHz frequency where even the quarter wavelength is too large to fit into the PCB. Some companies provide information on such antenna design. In such designs, the length of the loop is way to smaller than the quarter wavelength antenna.
Furthermore, the design of the antennas differ.
Small Loop Printed Antenna Design - MaximIntegrated - 1

Small Loop Printed Antenna Design - Infineon - 2

Can you make it clear what's the difference between the two designs and how to simulate an antenna with such components like capacitor, resistor and inductors in the antenna circuit?
Would I be right to assume as shown in the following image?


texts: How exactly does a transistor amplify the input current in CE configuration

texts: I have gone through tons of forum discussions and videos and books but they all explain in terms of mathematical equations that factor the input by a 'larger than 1' number. What happens physically inside?


texts:
First has anyone used this chip ADS1216 and the IDAC feature on the chip?

I have tried on many occasions to get the IDAC's to work on the ADS1216 and I'm not successful. I'm using an FPGA (artix-7 w/ Vivado 2016.4) to interface with the ADS1216.

I have setup the setup reg on the ADS1216 to use the internal reference and I have also set the range for the IDAC and I have also given the ADS1216s' IDAC a value. After all that I still see no current on the IDAC. I have to use the IDAC's because I'm using and 4 wire temp sensor that requires a current supply.

What do I need to do to get the IDAC to function?


texts: Power Supply Filter detection using Zener diode and PNP Transistor

texts:
I want to understand the below circuit which is supposed to detect voltage if it goes beyond a certain limit.

The Input voltage is between 15V-30V. The circuit means to detect if the voltage increases beyond 36V.

Datasheet of D1 36V Zener Diode - MMBZ5258

Datasheet of D2 6.2V Zener Diode - BZX84

Datasheet of Q1 PNP -BC807

I tried to simulate the above circuit, but I am getting some transient error which I was not able to solve.

The Anode of the 6.2V Zener diode is further connected to the Gate of P-MOS. P-MOS source connected Zener cathode and Drain connected to ground via 2x 47nF capacitors. (I ignored the MOSFET circuit because, I wanted only to understand this section of the circuit which proved to be confusing. If I could I understand this section, I would easily understand the MOSFET part.)

simulate this circuit – Schematic created using CircuitLab

My Questions, What I tried to understand, but I couldn't :

Why do we have resistors connected to the anode and cathode of the Zener diode? What purpose do the top and bottom resistor serve.
The datasheet sheet of D1 36V Zener diode has three columns . Izt1. Izt2 and Ir. I understand Zener diode will go to the breakdown region only when it crosses the breakdown voltage at its cathode and also it must have the required reverse current. But in the datasheet there are two test current column and one reverse current column. Why is that?
In the same Zener datasheet. it is mentioned V=27V and Ir=0.1uA at Vr. What does it mean? Does the Zener clamp at 27V itself or does it start taking the reverse current of 0.1uA when the voltage at its cathode exceeds 27V?
Can someone brief me the overall working of this circuit when the voltage is between 15V to 30V and when it exceeds more than 36V?

I tried to understand the circuit through simulations, but I am not able to get it clear.

My Efforts:

Tried below simulation tool too.


texts:
I'm trying to build the above circuit, which is supposed to flash an LED with a schmitt trigger (with the possibility to vary the frequency with the knob of the
 47kOhm potentiometer). I don't have a 12V lamp so I replaced it with a red LED. I added it in series with a 1K resistor. The rest is exactly as on the picture.

When I turn on the power, the LED comes on with one intensity and stays like that. Also no matter where I turn the knob of the potentiometer, the intensity of the LED stays the same.

I've triple, quadruple, quintouple checked my connections and they're correct.

Please help. What am I doing wrong?

Edit: I have a 9v 0.45A on hand, but it doesn't even turn on with the upper configuration.


texts:
I would like to make an universal USB charger. I have a 5V, 2A max generator and I can not find any electronic assembly to create a Dedicated Charging Port able to charge Samsung, Apple and other devices.

I read the entire USB Battery Charging Specification and in my case, I need to meet Dedicated Charging Port tests.

It means:

a) Have a 200 ohms resistance between D+ and D-
b) Have a leakage current from D+/D- ≤ 300 Kohms tied to a voltage between 0 & 3.6V
c) Have a capacitance from D+/D- of 1nF
d) Have VBUS discharge functionality

But It appears that most things do not even met these specification as shown in this other topic: USB downstream port examples.

So which one to choose?


texts: How to ensure long-duration manufacturing of central components?

texts:
This question is related to project planning and minimizing risks in the future. Say that Company X builds this clever device (I do not own a company - I am just curious). The clever device takes advantage of a micro controller unit (MCU) as the central most important component. This MCU is manufactured by Company Y. Today, in 2013, how does one ensure that Brand Y and model is still produced X number of years in the future, either by Company Y or someone else?

Are there currently any specific brands+model families (or just general architectures), that one can rely on being available into the (un)foreseeable future? Any brands/model-families/architectures known to be uncertain? I guess Intel and Atmel must be producing certain model families, that are quite certain to remain in production for a number of years/decades. But which model or architectures exactly?


texts: When will the 3rd edition of "Art of Electronics" by Horowitz and Hill finally be published?


texts: Faulty operational amplifier of electret mic preamplifier

texts:
I am debbuging a preamplifier for two electret mics. I use opa345 which is a dual low power op amp and i use the same topology as in this link for each channel: http://freecircuitdiagram.com/2008/09/02/battery-powered-electret-microphone-pre-amplifier/ . I have a Vcc voltage of 3.3 volt and i use 2.2K bias resistors (which is the output resistor of the electret mic).

While one channel is playing great, the other gives no output. It can't be a design problem, since an identical board i have built has both channels functioning properly. While searching for an error, like a bad soldering joint or a faulty component, I noticed that with no input, voltage at negative input terminal of the "faulty channel" op amp is not the same as voltage at positive input terminal, which is the case for all other functioning channels.

I suspect that this is happening due to a faulty op amp as i cannot explain why the virtual ground is not reflected to the negative terminal input, but again, the ic is a dual op amp and the other channel is working fine. Obviously I am missing something. Any Ideas or any experiences of half faulty op amps are welcome.

P.S: I havent changed the op amp since I dont have an identical readilly availiable. I have ordered a few spare, but while waiting for them to arrive, do you suggest any more common op amp replacement?

Thanks!

Aris


texts: I need to know what the circuit does where there are 4 resistors in parallel, two capacitors and two diodes with cross links

texts: I'd like to know what the circuit in which include 4 resistors, two capacitors and two diodes would do independently from the rest of the circuit if it was connected by itself to a voltage source at C3 and given two output wires at r12 and ground. What would this do on its own?


texts:
I am using a 12V relay to drive high voltage contactors. The contactor coil causes EMC when turned off. I am uncertain of which circuit I should use for reducing the EMC. Is there even any difference between option 1 and 2?
Secondly It was recommended that I should use a 24V zener diode. But I couldn't find any information on what current rating the zener diode and the normal diode should have. The operating current of the HV contactor coil is around 0.5A. Should the zener diode be able to handle the whole operating current? Is there a way to estimate it?
I had trouble finding a datasheet for the contactor it's name is AEV6505A from panasonic. So I based my info on a similar contactor I looked at the specs for the highest current contactor just to be safe.
EDIT!
Would this zener diode work since it has a " Non Repetitive Surge Power Dissipation" of over 100W at 1ms. And the maximum wattage from the coil is only 0.5A*12V=6W?
EDIT 2! Thanks for all the answers!

simulate this circuit – Schematic created using CircuitLab


texts: What Happens when I use all of my CPU resources?

texts: I've been trying to convert some video with ffmpeg and realized that this is taking ~97% of my cpu when I check with top.  What exactly happens when I use 100% of processor?  How does it fail?  Can I get an alert or log when that happens or is the OS gone at that point?


texts: Amplifier Specifications for Lock-in Detection

texts:
Since a lock-in amplifier is effectively a high-precision AM demodulator, what are the most critical characteristics for amplifiers in the high-frequency signal chain? Take a 50kHz lock-in circuit for example where 40dB of gain is applied before performing synchronous detection by an AD630 or an ADC for digital mixing with and objective dynamic range >80dB. It is easy to find op-amps with <10nV/√Hz @ 50kHz so noise can be made negligible for a narrow output bandwidth (basically the rational for using lock-in detection). It seems to me that 1/f noise of the system may be dominated by amplifier power supply rejection, gain stability of feedback network, offset drift, etc.

Which amplifier parameters should be optimized in this case where we need to minimize introducing AM noise on a high-frequency narrow-band signal? Will some of these things (such as offset drift) be eliminated entirely by AC coupling?


texts: Can I loop two GPIO pins on an Arduino/ATmega328?

texts:
I'm playing around with some wheel encoder sensors and an Arduino. The sensor needs a bit of debouncing, so that got me wondering how the microcontroller core is seeing the input. That is, what does the input signal look like after going through the Schmitt trigger and the synchronizer in the GPIO input path?

Is there any way of looping two GPIO pins directly, one as an input and the other as an output so I can see what's the signal looks like at the other end of the synchronizer?

As I see it, if I try a read/write in software, I'll lose information if the program is any longer than one instruction. True?


texts: Low Voltage, High Frequency, High Amperage Power Supply Design

texts:
For an ongoing project of studying magnetic properties of various metals we need to use a power supply which can generate 25 V peak to peak, frequency 50- 500 kHz, 5A (PP) current. Frequency would be sine/cosine (Hanning) with tone bursts of 1 to 10.

Being An electronics guy finding it is difficult to move ahead. Any help would be greatly appreciated.

Thought of using an audio amplifier but it may not work since signal bandwidth is limited to 100 khz. How about using a sinewave generator with power amplifier such as OPA541. Slew rate of amplifier is 10v/micro second. Any suggestion??


texts:
This answer quotes from a book written by Jocelyn Bell Burnell who co-discovered the first pulsar in 1967 where the author mentions another astronomer who noticed a star was pulsing at around 30 Hz and recognized the frequency because

  The Crab pulsar, with a period of 30Hz, is sufficiently fast that many people cannot see it; however some people can see 30Hz and Sue Simkin knows she is one of them – as a child she lived in an area where the main power supply was at 30Hz.

This page suggests that the area might be Detroit Michigan in the 1940's or 1950's.

But here I'm asking a more general question about mains frequencies well below 50 Hz.

Question: How low have mains frequencies gone? What areas once used 30 Hz, and why?


texts: Pic to Pic Communication with 434mhz wireless module?

texts:
I want to transmit Data From one Pic18f2550 to Another using a cheap 434mhz wireless module. but its not working at all.

Following are the circuits for Tx and Rx respectively.

the code for Tx part is given below. written in MikroC v8.2

void tx_data(char);

#define FREQ 20000000
#define baud 9600
#define spbrg_value (((FREQ/64)/baud)-1)    // Refer to the formula for Baud rate calculation in Description tab

void main()
{
    SPBRG=spbrg_value;      // Fill the SPBRG register to set the Baud Rate
    RCSTA.SPEN=1;           // To activate Serial port (TX and RX pins)
    TXSTA.TXEN=1;           // To enable transmission
    RCSTA.CREN=1;           // To enable continuous reception
    TRISA=0;
    TRISB=255;

    while(1)
    {
        tx_data(PORTB);
        delay_ms(100);
        LATA.LATA4=1;
        delay_ms(100);
        LATA.LATA4=0;
    }
}

void tx_data(char data1)
{
    TXREG=data1;                                     // Store data in Transmit register
    while(PIR1.TXIF==0);                             // Wait until TXIF gets low
}

and the Rx code

unsigned char rx_data(void);

#define FREQ 20000000
#define baud 9600
#define spbrg_value (((FREQ/64)/baud)-1)

void main()
{
    unsigned int state;
    SPBRG=spbrg_value;      // Fill the SPBRG register to set the Baud Rate
    RCSTA.SPEN=1;           // To activate Serial port (TX and RX pins)
    TXSTA.TXEN=1;           // To enable transmission
    RCSTA.CREN=1;           // To enable continuous reception
    TRISB=0;

    while(1)
    {
       state=rx_data();
       PORTB=state;
    } //main loop while(1)!!
} //end main()

unsigned char rx_data(void)
{
    while(PIR1.RCIF==0);                           // Wait until RCIF gets low
    return RCREG;                                 // Retrieve data from reception register
}

But this Setup wont transmit/receive data? i've tried by replacing wireless module with wires.. then it works perfectly... maybe the RF module is faulty... but thats highly improbable cuz i've tried with 10 different pairs of RF modules.

So is there any problem with the circuit or if the RF module is supposed to be faulty, is there anyway to check that it works?

UPDATE:

as asked I've attached the picture of the RF module i'm using...no i dont know the part no. but it looks like the following picture

I also Tried connecting the RF receiver at the USB-TTL board to see if any data is being transmitted... but no.. nothing is being transmitted.
any help?


texts:
As a part of a project at work I need to detect an IR LED of my choice (I was thinking about 1~3 W , 730 to 950 nm) from a distance of ~100 m with a camera sensor (was looking at IDS UI-3160CP-M-GL) and I'm trying to figure out how to approximate the detectable range with a given LED and/or a given sensor/camera.

The range of IR led is quadratically proportional (not really but close enough) to the emitter intensity \$I_e\$. The formula to calculate the transmission range is:
$$distance = \sqrt{\frac{I_e}{E_e}}$$
where \$I_e\$ is emitter intensity and \$E_e\$ is sensitivity of the receiver. Some sources cite \$E_e\$ as irradiance whose relationship to sensitivity of the receiver I do not understand and thus a source of confusion.

The terms intensity (could not get a consistent definition) and sensitivity of the receiver are not well defined thus another source of confusion.
So if some of the more experienced guys could chime in, that would be welcomed.


texts: Detection of weak periodical sound signal having negative SNR (will lock-in-amplifier be useful)

texts:
I'm trying to understand whether it is possible to detect human's heartbeat from a distance.

I'm not a specialist, but it seems to me that the following issues must be addressed:

Very sensitive microphone is required
The signal I want to detect will be weak compared to the noise - I need to figure out how the noise may be filtered (or, maybe there is no need for filtering?). Preliminary information about the signal: I know the overall shape of one "pulse", and the spectra of possible periods (both between "pulses" and inside a single "pulse").
Some algorithm which decides whether heartbeat is heard needs to be implemented.

I read this discussion about UltraHigh sensitive mics, but its too broad for a beginner. It also lacks any mention of algorithmic factors.

I'll be glad to hear your opinions on my intent in general, the segmentation into three stages and any other stuff which you think may be helpfull.

Also, links to any serious papers on the subjects will be appreciated.

EDIT:

I've been reading about lock-in amplifiers for other purpose, but then I though: maybe LIA can also be used for heartbeat detection? The problem is that LIA work on sinusoidal signals, while the heartbeat is non-sinusoidal. Is there a way to use an existing LIAs (or implement a custom one) to be used in such an application?


texts:
I would like to ask about the difference between the terms "AC-DC Converter", "DC-AC Converter" and "Inverter".

If I am getting it right, the "AC-DC converter" converters AC voltage to DC.
The "DC-AC converter" turns DC into AC.
The inverter can do both?
 To be more specific I am working on this configuration:

This topology is characterized by four-quadrant operation. Some authors call it "Three - phase voltage source Inverter" while other "Bidirectional AC-DC Converter". Which is the proper terminology ?


texts: When doing simulations in Gnucap, batch mode, how can I do a parametric sweep? The sweep command works in interactive mode, but when done in batch mode with .sweep it enters interactive mode and I have to specify my simulation parameters every time I do a simulation.


texts:
I am wondering what is the difference between component an entity.
I would like to know in which cases is better to use components instead of entities.
Thank you so much.


texts: Properties of inductors with a magnetic core

texts:
If I take an Iron core,for example a simple nail, and coil wire around it, I create an inductor.

Now if I strongly magnetize the iron core, will any properties of the inductor change?


texts:
I recently acquired a number of components including an Arduino Mega microcontroller and a uM-FPU V3.1 Floating Point Co-processor.

Using a breadboard I have built the circuit shown on Page 2 of the document uMFPU-V3_1 Arduino.pdf from the Micromega website.

I am having some difficulty in getting the circuit to function as expected.

PC details: Window Vista 64,
Microcontroller: Arduino Mega (genuine),
Arduino IDE: Version 0018

The documentation (uMFPU-V3_1_Arduino.pdf) says to download the support files (uMFPU-V3_1-Arduino.zip) and place the folders (Fpu, FpuSerial, Spi) in the hardware/libraries subdirectory of the Arduino application directory.

It seems that the directory structure of the Arduino IDE has recently changed?  Earlier versions of the IDE apparently had the libraries located as suggested in the document above, but the current version 0018 of the Arduino IDE seems to have the /libraries subdirectory located directly in the Arduino application directory.

The sketches provided in the documentation (sample.pde, graph.pde etc.) seem to only compile in the IDE version 0018 with the FPU libraries placed in the new directory location.

With the libraries in the new location, the example sketches (sample.pde, graph.pde etc) can be compiled without error and uploaded to the Arduino.  At the moment, when the sketches run on the microcontroller, the Arduino IDE Serial Monitor only responds with the message 'Sample' or 'Graph' and nothing else.  There is no indication of a connection to the FPU with version details, no display of the results of FP calculations or even the message 'uM-FPU not detected'.

I also have tried using older versions of the Arduino IDE (0016) (with the libraries placed in the location suggested in the documentation) on another computer with Windows XP (not 64bit) and the result seems to be the same.

Hopefully someone may have some ideas or suggestions about where the problem may be?  Could it be a faulty FPU chip or the Arduino board itself?


texts:
After looking at this, I think I already know the answer, but I just wanted some clarification.

Open collector microcontroller output

I have a part that is going to drive my mosfet at 15V. I have thought about putting in a 10K resistor on the gate and pulling it to ground through the atmega48 microcontroller and sink the current 1.5mA to force the gate to ground. According to the datasheet Port B can sink/source current.

I know  from the datasheet that I can sink 10mA per pin at 3.3V with the Atmega48, but based on the datasheet it appears that only ADC4 and ADC5 pins will allow it and I need 4 pins.

So it appears that I have two things going against me. I need 4 pins that can be open collector and the 15V gate driver is much higher than the 3.8V (3.3V (Vcc) + 0.5V) maximum voltage rating per pin.

It appears that I am going to have to use gpio lines and bjt transistors to pull the gate voltage to ground. I was just wondering if I am misinterpreting the data sheet and I can in fact use the micro to pull the 15V gate to ground.


texts:
I have an issue with my headset. I can’t stand not being able to hear myself speak. I’d like to build a passive device to loopback the mic to the headphones that would be plugged in-line between the headset and device, with a potentiometer to adjust the mic volume to headphones.

Would it be as simple as this?

Are additional fixed resistors required? I assume it would be a good idea to put something in series with the pot for when it is turned up fully, but I’m not sure what size..100ohm?

The headset speaker impedance is 32ohms each and the microphone impedance is 2200 ohms. I’m not sure of the impedances of the device, it can be assumed to be a typical laptop computer or smartphone.

As for power ratings, I assume the typical voltage at max volume would be less than 1V for the headphone jack on these devices. So, would a standard 0.06W dual gang logarithmic pot would be adequate for this application?

Appreciate the help on this.

EDIT

Thanks for everyone’s feedback. I’ve added an amplifier with variable gain for the mic input to the best of my understanding, but I’m not sure about splitting/mixing the signal. Will I be able to do this passively without any more amplifiers? Would anyone suggest different values for resistors/capacitors? Any other errors?

Thanks

EDIT 2: New question

I’m looking to create a circuit to add sidetone to a headset. Looking to add it to both right and left channels, with a volume adjustment. The circuit would be connected in-line between the headset and the device to which it is connected (laptop, smartphone, etc). The device would be powered by 2AA batteries.

The speakers on the headset are 32ohm and the microphone is 2200 ohm.

Questions:

Would this even work?

Could the number of amplifiers be reduced?

Could the number of pots be reduced? Note that there would probably be 3 off 2-gang pots, as there is no need for balancing between right and left. There is also no need for master volume control, but I’m worried I won’t be able to select the proper resistor value.

Are the resistors/pots/capacitors sizes critical? If so, any suggestions?

Is it even feasible to run this off 2AA batteries?

Is there any risk of damaging the headset/device?

Amplifier data sheet for reference: https://www.njr.com/semicon/PDF/NJM2113_E.pdf

EDIT 3

Since the amount of gain on preamp is unknown, would it make sense to add a potentiometer? If so, what min max values would you suggest?

Regarding your final statement on ground wiring, are you suggesting arranging the ground wires in a manner such as the below diagram:

EDIT 4

When the circuit is powered (3V on) the mic output to headset is loud and clear, but the mic output to the device is very muffled and quiet. When the circuit is not powered (3v off) the output to the device returns to normal (and nothing can be heard in headset as the speaker amps have no power, of course). Connected to oscilloscope to demonstrate. Mic is picking up a loud tone from a tone generator. Cursor shows where circuit is switched OFF.

Yellow - M+

Green - Preamp Term 4

Red - Preamp Term 5

Blue - Input of Volume Pot

When switched off, preamp output goes to zero, and M+ signal goes to normal.

Any suggestions for retaining signal quality at M+ when circuit is powered ON?

To answer previous question on mic voltages (headset connected directly to device):

Vrms = 1.54V

Vp-p quiet = 44-56 mV

Vp-p talking = ~80 mV

EDIT 5

Looking to clarify circuit:

Note I am using 100k POT for R1


texts: Improving Flyback DCM Peak Power using CCM

texts:
How does CCM can improve the peak power of normal DCM flyback power supply?

I noticed that some of flyback converter can operate in both DCM & CCM. During this peak power excursion, the converter will change from DCM to CCM using special PWM controller. Example High Efficiency, <30mW Standby QR Adapter with Peak Power Excursion Capability

Question:

Based on that, does this means that this peak power can be achieve without changing the size of the transformer?
From my understanding, if we go above the primary peak power, the transformer will saturate. How this CCM mode overcome that?

Any calculation example should help

Thanks.


texts: I'm attempting to shrink wrap wire connections for the first time and I am wondering what size of heat shrink is needed for i.e. a single 22 AWG wire.  Could it be any heat shrink tubing that fits the wire? Or is there a certain size that it shrinks to so that I must purchase one not too large?  Thanks!


texts:
I am using PIC micro controller (PIC16F1846) with an external 8MHz crystal attached to the external clock pins (RA6 and RA7).

Why is it that when I use my oscilloscope probe to attempt to measure the clock frequency my basic LED flashing program stops working (light state freezes) and I have to perform a reset?


texts: I have a basic understanding on this topic but i still have some doubts, my text books says Differential means it will have impact on one of the 2 signal nodes. and Common will have a common impact on both nodes. There is no picture to show what nodes it is talking about! (If possible a description with some basic picture would be easy to understand).


texts:
Has anyone got a really clear diagram of the way to link up a 16x2 LCD screen to an Arduino?

Basically I have an LCD for which the back light is coming on, but I am not getting any words appearing on the screen.

Which Pins should I be focusing on to test this?

This is the screen i'm using

http://www.littlebirdelectronics.com/products/basic-16x2-character-lcd-yellow-on-blue-5v


texts: How do I tell which wires are Red/Positive and Black/Negative on these fans?

texts:
thank you for taking the time to answer this question :
Here are the fans in question... I only ask because I burnt both fans trying to find the right wires, so I guess I put the wrong wires on for too long?

**And this fan as well, if you can:

Is there anything I do with my multi-meter to see which wires are the Red/Black or Pos/Neg so I can correctly position my connections, or is there an electronic handyman's way to do it without burning the fans, is it just you try all combinations but quickly so that I don't burn the motor? There are 16 combinations and that is 16 chances to burn the motor.

OR

I will look for a guide on these models?


texts: 3 phase 208v leg balance and observed KVA

texts:
I have a cluster computer system in a small server room, fed by an 80 kva capable double conversion (480v 3-phase in, 208v single phase out) UPS.  This UPS has an LCD display showing voltage, leg amperage for A-B, B-C, C-A, and total kva.
The computer system has 8 total L6-30 power cables going to some 20+ available wall receptacles.  Upon initial operation we observed on the ups display a somewhat imbalanced current draw across the ABC legs (something like 17, 19, 24 amps I am ball parking from memory it wasn't a huge imbalance).  After identifying all the wall receptacles as to what AB BC CA legs they go to we moved one L6 power cable to a different wall receptacle and that balanced out the current draw.  But even with the imbalance, we saw a constant draw such as ~12 kva at idle, and ~22 kva under hpl cpu stress; both observations were a constant value plus or minus 1 kva.
Fast forward to now we added some additional equipment and are renovating I powered the computer system on knowing the L6 power cables are not going to the correct receptacles to achieve a balanced leg current draw.  According to the UPS display any leg imbalance right now is no worse than previously, but with the computer system just on at idle the UPS display goes from 17.0 kva to 20.5 kva and back consistently.  I have no reason to suspect a problem with the UPS system displaying improperly, however I have never seen this display behavior before.
While the display probably updates no quicker than 1 second intervals this constant back and forth between 17 kva and 20 kva (plus or minus 1 kva) is about 15% is it not?  Is this indicative of some kind of problem and could anyone tell me in electrical engineering terms if this is the result of an imbalanced draw across the UPS legs and if so the how's and why's and terminology surrounding it?  And what tools would best further diagnose this odd behavior?  The computer equipment is brand new and I did not see this UPS display behavior when the computer was initially installed, powered up, and bench marked.  I also assume that the power factor is greater than 0.9 given the only type of equipment being powered is network switches and server power supplies.


texts: Esp8266 node mcu and 5v relay powering issue

texts: i am really frustrated and worried as my problem is unsolved. I am using an esp8266 nodemcu and a 4 channel 5v relay. When i power both with external 5v 2 amps supply it doesn't work, on the other hand when i connect both devices using separate supply from laptop's USB it works. Pls anyone can help me to solve this as i want to run both devices through the power supply. The output of power supply is 5v and working fine


texts:
For some time I have used the K150 PIC programmer but I was tired of some strange behaviour so I purchased an Original PICKIT3 programmer/debugger.
During programming a 16F648A I receive the following message. "You're attempting to program a release platform  with a debug build. Do you want to rebuild? This message keeps appearing time after time.
I do not understand the reason nor can I find a solution to this problem.

After indicating that I do not want to rebuild the programming continues without problems. Reprogramming results in the same message.

When moving over to the debugger the program reports: Target Device (00001100) does not match expected Device ID (00001120). For this I also can not find an explanation. The same message happens with different projects that are all running without a problem.

So two questions.
1. Why do I keep a sustained warning message during programming?
2. Why can there be a device mismatch?

I looked all over but can not find the reason.

Extra information:
The program is generated in debug mode since that is what i require for the on line debug procedure.


texts: Can strong magnets cause permanent damage to RFID tags?

texts:
I have an RFID-enabled ID card for work that is used for building access. While I can use a lanyard, cord-reel, etc. to carry the card and still have convenient access to it, I'd like to simply put it between my phone and its case. (I have legitimate reasons for this that are tangential to the question.)
My concern is that I already have a small metal plate in there that I use to hold the phone to a magnetic mount when I'm in the car. The plate itself is of no concern to me - it's just a small piece of ferrous metal and does not impact the functioning of the RFID chip.
My question is: will the regular very close proximity (1-2mm) of the strong magnets in the car mount cause any issues with the functioning of the RFID tag in the card? It would be exposed for about an hour 2x per day, plus other random trips.
My guess is that it would not be impacted any more than the solid state circuitry in the phone itself, but I'd like to get confirmation.
Additional notes: You now know as much about the particular RFID chip in my card as I do. You also know as much about the magnets in the mount as I do. Unfortunately, I can't provide any more specifics than this because I don't know them.
UPDATE: For those who may come across this question in the future - I thought I'd come back to mention that I've been using the RFID card in the phone case since I asked this question and I've never had any issues. All the "it will have no effect" answers were, in fact, correct. At least for my particular card.