texts: Applescript to Arduino LCD only works with Serial Monitor

texts:
I spent all day trying to figure this out and finally got somewhere that atleast lets me know that I am doing something weird...

I am trying to send data to my LCD Screen on my Arduino Uno, but for some reason it only works if serial monitor is open first then I try to run my applescript...

So, this is my Arduino Code...

#include <Adafruit_CharacterOLED.h>
Adafruit_CharacterOLED lcd(6, 7, 8, 9, 10, 11, 12);

String inData;

void setup()
{
  // Print a message to the LCD.
Serial.begin(9600);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
char TestData='X';
lcd.print(TestData);
}

void loop() {
while (Serial.available() > 0)
{
    char recieved = Serial.read();
    inData += recieved;

    // Process message when new line character is recieved
    if (recieved == '\n')
    {
        lcd.setCursor(0, 0);
        lcd.print(inData);

        inData = ""; // Clear recieved buffer
    }
}
}

If I open my serial monitor, and type something, it shows up on my Screen...Great

So now if I run this script, from applescript with the SerialPort X Plugin installed...

set portRef to serialport open item 1 of (get serialport list)
if portRef is equal to -1 then
display dialog " could not open port "
else
serialport write "text  " to portRef
delay 1
serialport close portRef
end if

if I try to use the actual port name...it always says it cannot connect, it can only connect if I use item 1, no idea why but thats okay for now...

So if I do not have serial monitor open and I run my applescript this happens...

My LCD is reset to its initial state with an X in the upper left corner...now if I open my serial monitor...

and send something to the screen...it works again

and if I try to go back to the applescript, and run it...

again nothing happens...

but here is where it gets weird...if I again go to my serial monitor and type something and send it...

I get test something on my screen...obv getting the test from the applescript and the something from serial monitor...is there something really simple I am missing...ive tried to add \n to applescript, and also tried adding & return, neither seemed to work...what is the small detail I am missing here??

EDIT

So i did a good amount of research last night and this morning, and found the ASCII representations of both Newline and Carriage Return...Since the newline wasnt working before I started off with switching to a Carriage Return...

I replaced if (recieved == '\n'); with if (recieved == 13); and then in my applescript added set CR to (ASCII character 13) and then changed the write line to serialport write "really" & CR to portRef

This works...well Sometimes, I know it is an issue of opening and closing the serial port, which I have little knowledge on...but what is happening is that, if I start from scratch...open serial monitor then open applescript  and it the script works...the only problem I am having is that then if I try to run it a second time...it says cannot open port

This is where I am confused, my script will be a repeat but what I want to know is why can it not connect to the port the second time?


texts: Resistance in the context of electric loads

texts:
I am having difficulty reconciling resistance which provides resistance to current flow and resistance which is used to generate something useful, such as heat or a magnetic field which rotates a motor, etc.

Work requires power and, per P = V*I, power requires current. A resistor limits the amount of amps being drawn, so it would seem the resistor, in the case of an electric load, impedes its own ability to perform work? Intuitively, a load that has the least amount of resistance, drawing more amps, should produce more work. But, useful work is dependent on resistance, so proportional to it. Hence my confusion.


texts: grade school science experiment peltier module and led

texts: I am doing a grade school science experiment. I am trying to light up a led light using pletier modules with only body heat. I am trying to figure out a lot of things since I have never done anything with electronics before. My first question is what specific led should I buy that I could light up with 5v-9v that would allow me to have enough light to read?


texts: Confusion regarding Boolean Algebra Simplification

texts:
I am trying to solve a simple boolean algebra equation, but am not quite sure how the answer is achieved. The question is  to simplify (\$x'y' + xy + x'y\$). I have got the following steps:

\$x'(y+y') + xy\$   is Adjacency rule, then my final answer is \$x'+xy\$. But the solution set shows the answer to be \$x'+y\$. Why so?


texts: Finding Critical Path of Combinational Logic

texts:
I have a combinational circuit and I would like to find its critical path in design compiler. Essentially, I want to find out by how much the combinational logic will reduce the maximum clock frequency of the larger sequential design.
For this purpose, I have added registers along the input of the combinational circuit (a simple multiplier in this case) which are clocked on the rising edge of a clock as advised in How to find the critical path delay of a big combinational block. I then run create_clock clk -period 5 -name clk and report_qor in DC, but I'm getting a Critical Path Length of 0.00 ns. This looks odd. If I move the multiplier directly to the test module, I get a more reasonable-looking Critical Path Length of 4.88 ns however.

module my_multiplier(
    output reg [31:0] out,
    input      [15:0] in1, in2,
    input             enable
);

always @(*) begin
   if (enable) begin
         out = in1 * in2;
   end
end

endmodule

I've created a separate module to instantiate the multiplier circuit and also clock the inputs to the multiplier:

module Test_multiplier_Tcrit(
    output  [31:0] out,
    input   [15:0] in1, in2,
    input          clk, enable
);

reg  [15:0] in1_reg, in2_reg;

my_multiplier my_multiplier(.out(out), .in1(in1_reg), .in2(in2_reg), .enable(enable));

always @(posedge clk) begin
   in1_reg <= in1;
   in2_reg <= in2;
end

endmodule


texts: How to calculate EMI filter (ferrite bead) specs for digital signal?

texts:
I have a small project of mine that deals with plain old VGA output (d-sub).
In my project I'm using a CM2009 IC between actual VGA controller and VGA output connector. It's mentioned in the datasheet for this IC that I can use EMI filters on HSYNC, VSYNC and DDC channels right after IC and before VGA connector. Though there are no specs for these filters in the datasheet. It is even said that EMI filter configuration in the datasheet (ferrite bead between two capacitors) is given just as an example. I inspected some old videocards and found that most of them have some type of EMI filters on SYNC and DDC channels before VGA connector. Some have just a single ferrite bead as EMI filter, others have more complex EMI filter configuration including capacitors. I decided to use more simple variant of EMI filter in my design - just a single ferrite bead, without capacitors.

So how do I calculate precise specs for a single ferrite bead playing a role of EMI filter on SYNC and DDC VGA channels?
The most importnat specs for ferrite bead (of course SMD one) that I need are impendance @ 100 MHz and current rating.

Also, maybe it would be better to use more complex EMI filter type that includes capacitors? How do I calculate capacitor specs in that case?


texts:
Coming from a computer science background I wonder what is the waveform viewer used for in a VHDL simulator? From Wikipedia:

  A waveform view allows an IC designer to see the signal transitions
  over time and the relation of those signals with other signals in an
  IC design, which is typically written in a hardware description
  language.

But I'm still not sure I get it?


texts: Measure on/off pulse of relay (with reversed polarity) with a MCU?

texts:
Below I have the following (simplified) circuit:

What I want is to measure (monitor) every time the relay switches on and off. The pulse is around 3V and for 32ms.

The problem is that the voltage is reversed, to switch off the relay (single coil latching), and I have no idea how to wire it correctly up with my Arduino.

One solution (not sure) I came up with is to use 3 wires. If I hookup GND with (Arduino) GND, and the A and B wires go both to its own port (with some pull-down resistors) on the Arduino.

I think it should also be possible to hook-up with only 2 wires (just A and B)? But, if I hookup A/B directly on the (Arduino) input ports, I'm basically hooking-up GND, that doesn't seem right.


texts:
I'm looking to stock my capacitor drawers and I was just looking through trying to find standard values or some kind of list for them and I couldn't find a really good list of standard values for audio applications and other analog circuits.

I'm looking for polypropylene capacitors (these seem to be the best bang for my buck when it comes to audio) rated for at least 100 V (I work with 60 V-80 V AC signals sometimes) to be used for bypass and decoupling (and filters).

What values should I get to really cover all the bases?


texts: 74HC00N getting really hot with 5V and GND attached

texts:
I'm doing a project with an SN74HC00N NAND gate and when I wired it up the chip got really hot really quickly.

I immediately unplugged everything and tested just with 5V and GND plugged in and none of the other pins connected to anything. it's doing the same thing -- gets really hot really quickly.

Am I doing something wrong or is the IC just bad?


texts: Not functioning Class-D Stereo Amplifier circuit

texts:
I am connecting a circuit for Texas Instruments TPA3125D2 Class-D Aplifier.

Datasheet here:
http://www.ti.com/lit/gpn/tpa3125d2

The circuit design is here:

The circuit that was tested is not on pcb but on a solderless breadboard.

The problem is, that ALL I get, is some kind of bumping sound in the output speaker which does not depend on the input (no matter if input is connected or not, the output is the same - some kind of pulsation).

I do not get any output except this mentioned bumping sound.

That would be a great help, if someone experienced enough could review this scheme and give some critics or comments, on what is wrong here?


texts: A switch can represent the unit step function

texts:
I have a some what basic question. I was just brushing up on some basics with a book on fundamentals of electric circuits. I came across this:

They say that Fig 7.40a with a switch can be replaced by figure 7.40b where u(t) is the unit step function. I don't understand that. For t < 0, that voltage source will be producing 0V -> hence a short between the resistor and the negative plate of the capacitor. Wouldn't that cause the initial voltage on the capacitor to flow through the resistor?
To me, it seems like it's only possible to jump from Fig 7.40a to 7.40b if the initial voltage on the capacitor is 0V. Am I missing something?


texts: How can I determine run time of a 12V vehicle amplifier using an 18V 5Ah battery

texts:
What specifications do I need to look for in a class D vehicle amplifier so that I can run it for 8 hours using an 18V 5Ah rechargeable tool battery.

I need to operate the amplifier at full power for 8 hours.

What power rating could I hope to support?


texts: What charge does the wiper of a potentiometer give? Negative or positive? I connect the left pin to the positive and right pin to negative. My potentiometer looks like this. The wiper is facing backward and the left and right pins are facing at to your right and left hand respectively. Take the potentiometer below 1K-1M in the picture given below


texts:
I am terribly confused ... I tried myself at building a low impedance guitar pickup some time ago.

Quick LowZ Pickup Intro

Basically just two loops of aluminium with two magnets, a humbucking guitar pickup with a single loop per magnet.

The three tongues are the terminals, but the outer ones are connected so that there is only one output plus ground. The magnets poles are on the top and bottom, one of them is rotated 180 degrees. This results in the desired humbucking effect.

The Plan

I hooked up the whole shebang to my audio interface (connected to the Gnd and Hot Pins of an XLR with the Cold shorted to ground) and lo and behold there actually is audio coming from this thing.

Problem is that the output is super quiet and I have to crank the gain to +30db before I can hear something. My plan was to design a simple opamp preamplifier to boost the signal as close to the source as possible.

Now I definitely am no electrical engineer, but this is not my first rodeo. So I looked up the basic inverting opamp circuit and hooked it up on a breadboard. More specifically I used the schematics from here, but modified it to give me about 35x gain (about +30db). Hooked the output up like before, signal to hot, gnd to gnd and cold. This is a TL072 for testing, I meant to switch that out for a ultra low noise opamp once this is working.

(If I remember correctly this is Figure 4 from the Nuts'n'Volts article, just to give you an impression of my breadboarding conditions, I just noticed that it doesn't even show the output connection)

The Problem

Hum! Instead of sweet guitar sounds I get hum. Definitely no signal in there.

What I Tried

For testing purposes I hooked up a poti to control the gain and found that the hum disappears at unity gain. The signal is audible again then.

Did a two stage design with a unity gain and a 35x gain stage. Still humming, no signal.

Checked the unity gain bandwidth thingy, but at 3 MHz for the TL072 35x gain shouldn't be a problem.

Tried a 1:35 transformer instead... But transformers are magic to me and I didn't manage to get anything from it.

The Question

I suspect that it's the super low impedance of the pickup itself. Basically it's a short against ground. But this is where my electrical knowledge fails me.

TL;DR: What am I missing in designing my LowZ guitar pickup preamp?


texts:
Out of curiosity if it's anyhow possible, cost is not the primary focus here.

Are there any special methods of creating carbon tracks on a ribbon?

Example ribbon with carbon track:

Beside moving the head to a bit different position to use the not broken part of the carbon track can one fix somehting like this in home or using some thirdparty solutions?


texts: Questions about COBs and power supplies from a beginner

texts: I'm planning to use Citizen 1212 COBs, but I don't know how they can be used on 70 watt for each one of them, knowing that each unit will have 5 COBs. So my question is: what is the right power supply for me to run these on parallel? And if they were installed on it directly without any circuit controlling the voltage or amperage, how many volts/amperes will they be using?


texts: Detecting both short and open circuit voice coils in coil driver

texts:
I'm building a voice coil driver for a science experiment. The coils are in an environment where both coil shorts and coil open circuits are common problems. I'd like to build in a fault indicator to alert the user with a logic signal if the coil is either short or open.

I've got two ideas for how to do this, but both are complicated and require many more components. Given that I only care about the two extreme cases (open and short, nothing in between), I hope there is a simpler solution. Here's my coil driver design:

Coil driver

The coil driver is a current driver, so it drives higher voltage initially during an output step to overcome the inductance of the wire, before settling down to a constant voltage output. Here is the rough design (ignore the parts in the dashed boxes for now):

simulate this circuit – Schematic created using CircuitLab

The feedback above OA1 compensates for the frequency response of the coil. OA2 measures the voltage drop across Rshunt and feeds back to OA1 to stabilise its output. The coil is connected from this shunt resistor to ground.

My ideas

I can think of two ways to do this, but both are complicated:

Measure voltage across and current through coil

A short or open circuit changes the effective resistance of the coil as seen by the rest of the circuit. Measure the voltage drop across the coil (with a buffer at COIL+) and the current through it (i.e. the output of OA2), then divide one by the other and check the resistance is in a narrowly defined range near to the real coil resistance with a voltage range circuit.

The problem here is you must divide one voltage by another, which needs complicated op-amp feedback (diodes or transistors) or special ICs. I'd like to keep this simple if possible.

Compare voltage across coil with the set point

See the dashed boxes in the circuit above. Take a buffered copy of the set point signal, correct it for the gain, and compare it to the voltage across the coil using OA4. If the output voltage is non-zero (within tolerance due to offsets, etc.), something is wrong. In the case of a coil short, the voltage at the coil will be zero whereas the set point will be non-zero. In the case of a coil open, the voltage at the coil will be at the rail of OA1 because the shunt resistor will not drop any voltage.

Like the division technique above, I can send the error signal to a voltage range circuit to trigger the warning if the voltage is outside the acceptable range.

This circuit may also trip the alarm during large slews, when the coil driver outputs large voltages to overcome the inductance of the coil. In this case, the difference seen by OA4 may be large. I may then need an integrator on the output to ignore fast changes.

Can anyone think of a simpler solution to this problem?


texts: Slight drop in voltage regulator circuit

texts: Below is a voltage regulator circuit for which I measured Vo and Io over a range of load resistance values. Why is there a slight drop in Vo when Io is increased, does it have something to do with the 1N5232B zener diode? (Vdo = 0.7 V, Vz = 5.6V).


texts: Can two EV chargers be combine to increase charging current?

texts: While charging my EV (Electric Vehicle), Tesla model 3 long range, and watching all the other chargers not being used for the two hours I was there, I wondered if I could use two of them to charge faster. The chargers are greenlots ~200AC @ 30A. I know there are a lot of details that need to be consider ... like my car max. AC charging is limited to 48A (I think), wire gauge for the combined current, etc. I'm wondering about the technical stuff of combining two 60Hz (USA) AC signals only though. Thanks


texts: MOSFET Bootstrap circuit simulation with NGSPICE

texts:
Preface
I am designing a Solid State Relay as an educational exercise, to catch up on what my university did not teach me. I am a long time Linux user and open-source software lover, which brought me to ngspice for simulation. I don't have access to professional design software or simulators.
Context
I designed a Solid State Relay, had a PCB manufactured, and burned out the gate driver upon testing with a 24VDC supply. I was able to verify that the PCB matches my schematic. I took some measurements and found out that my bootstrap circuit (this is a high-side NMOS switch) doesn't appear to be working correctly. I failed to simulate it before having the PCB manufactured, but my back-of-napkin calculations seemed to say everything was in spec. Now, I am setting out to simulate an updated version of my schematic, which is where I am seeking advice.
The problem

Please pardon my amateur schematic. As I understand it, CBOOT1 charges through D1 from the supply, and when the voltage from VBOOT to the source node (in the middle of the two transistors here) rises high enough, Q1 will turn on, discharging the capacitor slowly through any current leaking through the gate. I have elided the gate driver, since I'm trying to just simulate this bootstrapping behavior in AC and DC, for now.
The issue is, ngspice cannot simulate this circuit. I have a level 0 model for the BSC220N from Infineon, and everything else is standard simulation-only components. ngspice seems to be having trouble inside the transistor model because of the source node between Q1 and Q2.
Interestingly enough, I can simulate the model if I only use one transistor (which would work for DC-only applications), but the results are usually very noisy.
Does anyone have advice on how to get ngspice to converge? My SPICE code is below.
Circuit:
.title KiCad schematic
.include "/home/andy/workspace/coffee_items/bean_machine_controller/spice/libs/OptiMOS3_200V.lib"
VAC1 Net-_D1-Pad2_ GND dc 0 ac 120 sin(0 120 60)
RG1 Net-_Q1-Pad4_ /VBOOT 3
* CBOOT1 /VBOOT Net-_CBOOT1-Pad2_ 1u
CBOOT1 /VBOOT Net-_Q2-Pad8_ 1u
D1 /VBOOT Net-_D1-Pad2_ BASIC_DIODE
* RLOAD1 Net-_Q2-Pad8_ GND 8
RLOAD1 Net-_Q2-Pad8_ GND 8
XQ1 Net-_D1-Pad2_ Net-_Q1-Pad4_ Net-_Q2-Pad8_ BSC220N20NSFD_L0
* XQ2 Net-_Q2-Pad8_ Net-_Q1-Pad4_ Net-_CBOOT1-Pad2_ BSC220N20NSFD_L0
.end

Simulation script:
.title "boost circuit simulation"
.control
set ngbehavior=ps
dc vac1 0 120 1
tran 0.1s 10s 0s
option TEMP=27
.endc
.MODEL BASIC_DIODE D()
* .include "/home/andy/workspace/coffee_items/bean_machine_controller/spice/libs/OptiMOS3_200V.lib"
.include "boost_circuit.cir"

Invocation:
ngspice boost_sim.cir
Output:
doAnalyses: TRAN:  Timestep too small; time = 0.0193025, timestep = 1.25e-13: trouble with node "e.xq1.eaux#branch"


texts: I am experiencing difficulties using Logisim whilst trying to implement a simple 2-to-1 MUX. I keep getting "Incompatible Widths" error messages no matter how I connect it. Any idea what's causing this and how it may be fixed?


texts:
I am confused with this! How does a capacitor block DC?

I have seen many circuits using capacitors powered by a DC supply. So, if capacitor blocks DC, why should it be used in such circuits?
Also, the voltage rating is mentioned as a DC value on the capacitor. What does it signify?


texts: How does this CMOS OTA with common-mode feedback work?

texts:
In class I learned about the circuit shown below. It is basically a simple CMOS OTA with a common-mode feedback realized by a resistive divider. But I am not quite sure how it works.

Lets say that I have a VDD of 1.8V and I want my common-mode level ideally at 900mV, so exactly half of VDD. Therefore the voltage vcmref is 900mV. If the voltage Vx is at 900mV, I have zero difference between Vx and vcmref, therefore the amplifier will output zero Volts. But now M6 sees zero volts at its gate, meaning it experiences a huge overdrive. How does this make sense? Shouldn't M6 be off if the common-mode voltage equals vcmref?

Furthermore: If I want to measure the open-loop gain of this circuit, I need to break the feedback loop somewhere. Let's say I break it after the amplifier. Is it correct to connect the gate of M6 to ground then, since it would be floating otherwise?

simulate this circuit – Schematic created using CircuitLab


texts: I cant seem to figure this one out. Can someone please help me design a Buck converter that can take an input of around -40v and produce -12v around 2 amps?


texts: Should I use step-up or step-down transformer?

texts:
I am designing a 21" tablet using a development board, the development board takes 5V DC whereas the display takes 12V DC. The display will take around 800mA and the development board around 500mA.

I am wondering should I use a 12V adapter and Step-Down transformer to convert to 5V, or a 5V and Step-Up to convert to 12V?

What is the standard technique?

And how do you decided which to choose? Will the power consumption be same in both?


texts: Issue with TCP connection to two ESP8266s

texts:
I am working on a project where I want to stream data very quickly (about 300KB/s per ESP8266) to two, or more, ESP8266s over TCP. I have had success with setting up a single ESP8266 in SoftAP mode and connecting to it via my PC directly, and streaming at those speeds or better.

The most obvious solution to connect more than one is to set them up in STA mode and have them connect to a separate commercial Access Point. This works but the data rate drops by about 33%, even for a single ESP8266.

I had the idea of setting up one ESP8266 in SoftAP mode and a second one in STA mode. I was able to connect my PC to the one in SoftAP mode and have the second one connect to it as well without an issue. The problem I ran into is that I could not connect via TCP to the one in STA mode (there was no issue connecting via TCP to the one in SoftAP mode).

ESP8266 in STA ---> ESP8266 in SoftAP <--- PC

My first question is, should this setup be possible, where I would be able to connect to both via TCP (they both have unique IPs)?

Second question is, would it be likely for this setup to speed up the transfer compared to connecting to a commercial Access Point?

Third question is, is it possible that the 33% slow-down, when connecting the ESP8266s to a commercial Access Point, a simple config issue?


texts:
I have just finished build my table saw and now planning for integrated vacuum system for dust collection.

I've designed the circuit to detect if saw motor is switched on and automatically switch on the vacuum pump. Current sensing resistor Rs is on neutral line of the saw. One side of this resistor is floated on DC common as shown in the schematic below.

The voltage drop at the other end of Rs is used to turn on NPN transistor which drives relay. The contacts of the relay will act as the switch to turn on the vacuum pump.

Care have been taken to clamp Vbe to safe values using 1N4004 diodes.

Before I build this circuit and test it, I need some expert advice for Rs. My saw motor is 1500 watts universal motor. It has no soft start feature, meaning it may consume very high starting current which Rs will have to bear.

As such, what should be the right value for Rs in terms of resistance and power rating?

PS; Based on comments on this question, i would like to clarify the reason for this current sensing auto switch is to accommodate few more power tools so that when any of those dust making tool is switched on will start the vacuum unit.


texts: How to test bipolar linear integrated circuit (voltage detector) using a DMM

texts:
I have an IC (KIA7025AP) on my power PCB.  I need to check if it's faulty.

  Function of this IC is accurately resetting the system after detecting voltage at the time of switching power on and instantaneous power off in various CPU systems and other logic systems.

Could you please explain this to me, knowing it's used in the power PCB of a washer.

What is are appropriate tests to apply to this IC using a DMM?

I don't have oscilloscope.

Needless to say that I don't want to remove it from the circuit unless it's necessary.

  Although exposure to high temperature is inevitable during soldering, we recommend limiting the soldering temperature to low levels for the sake of retaining inherent excellent reliability.

I know you going to ask me why do you doubt this IC.

Many users came across the same problem I have, replacing the power PCB solved the problem of the washer not to start, though it powers up and you can change the washing programs etc.
I tested most components (triacs, relay, electrolytic capacitors, varistors, etc) and they're good.
Visual inspection showed a black material right next to its left terminal (VCC) under the wax, it could be an indication of a faulty IC or could be nothing at all.


texts: If I write the transfer function I can clearly see a zero at zero frequency and a pole at 1/2πRC frequency. But If I simply look at this circuit I would say that there is one pole and no zero(as there is only one path from input to output(that's one technique I learnt in my engineering)). Is there any intuitive explanation of this zero or am I making some mistake? Please explain.


texts: Making a NCS36000 PIR controller output a distinct and clearly identifiable signal that could be used as a virtual button push

texts:
I need to trigger a peripheral on my existing PCB design. I would use a pushbutton, but can't remake the boards. I need to hack/modify a way in.

My MCU is An ATMEL XMEGA and I have a PIR detector using a NCS36000 controller. This is currently used for another function, and I would like to keep it. Is it possible to utilize this as a replacement for a pushbutton, I.E. remotely trigger the PIR sensor in a unique way?


texts: What is this test pattern used for? (Computer vision, camera distortion mapping)

texts:
I came across a test pattern a few years back in a robotics laboratory that I remember being told was some sort of test pattern to train cameras for robotic vision.  It was like some sort of checkerboard pattern but it was not a uniform pattern.
The image is my best rendition of it.  Does anyone know what this type of pattern is called and what its use is?


texts: Creating a home made ultrasound transducer

texts:
I don't know how ultrasound transducers (transmitters) are made, is it possible to create a home made ultrasound transmitter with a custom specific range 1MHz or more?  If it is not, would a 3D printer make it possible (to print parts)?

I don't understand why they cost so much and are very hard to get, from my understanding it is just a piezoelectric crystal.

There is a previous question: Building an Ultrasound Generator but nobody answered, they only posted websites to purchase not make.


texts: What's the technical limit to how small RFID-like system antenna can be?

texts:
So far I haven't seen a contactless smart card smaller than a standard credit card. My "biometric" travel passport holds a chip powered off the antenna - I lit the plastic holding the chip through with a bright LED flashlight and the antenna occupies more or less the dimensions of a credit card as well.

Now I understand that the antenna must be "large enough" to serve for inductive energy transfer, but what's the lower limit to how small it can be?


texts:
I'm wondering if it's possible to score a PCB (such that I can easily break off the scored section) while still being able to have traces going across where the score would be. I have a rectangular board, and I'd like to have a little edge connector tab on the side of it for temporary use, with the ability to just snap it off at a certain point. Is this possible?

I'm picturing something like a v-score on one side, while the traces go along the other, but I have next to no experience with PCBs so this is all conjecture.


texts: Creating circuit diagrams from verbal descriptions. (Digital Logic)

texts:
I have these two descriptions of systems:

And I want to answer them correctly (comes from a book with no solutions).

For #9, isn't that just going to be an AND gate? We all know the truth table for that.

But #10 is a little more difficult. I'm not exactly sure how to go about that one. I've looked through my table of gates and their truth tables, but none of them seem to be what I'm looking for.

Thanks for any help!

Truth table for #10 (for OP to fill out). [Transistor]
 A | B | Z
---+---+---
 0 | 0 | 0
 0 | 1 | 1
 1 | 0 | 1
 1 | 1 | 1

EDIT: So it is just an OR gate? When no switches are on then the light is off; if either switch is on then the light is also on; when both are on then the light should be on. That's how I read it at least and it makes sense.

Thanks for you help transistor.

EDIT 2:

A | B | Z
---+---+---
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 0

So it is an XOR.


texts:
I am in the middle of a quandary at work. We have wire feeders that obviously control the feed rate of wire through a welder. We have need of putting these units up out of the way and what I did to accomplish this is to move the 10K pot from the feeder unit to the hand-held "whip" Because the knob on the new pot (also 10K) is now considerably smaller it is very difficult to fine tune the wire speed. The usable range for wire speed is approx 30%-60% as indicated on the original dial.

How could I solve this problem? Change the value of the "new" pot in the hand-held unit? Parallel? Dropping resistor across tab 1 and tab 2? Am at a loss.


texts:
I am trying to design a high-gain common emitter circuit. I know that I need to use a bypass capacitor with emitter resistor to increase the gain. My problem is the formula

A = Rc / re

makes things so much different than designing same circuit without it. I already designed one with gain of 5 in less than a hour but I am stuck in this one.

Any suggestions?


texts: Voltage regualtor with 5v output @ 2.5 amps

texts:
I did some research online and could not find an answer to this. I have a 6v @ 12Amps(I think its 12amps) battery pack with 4 Super heavy duty d-cell panasonic batteries(1.5v each). I want to use it as a power source but I need to step it down to 5v output. I would like to do this with a voltage regulator but the ones Ive research only give 5v @1.5 amps, when I will be pulling 2.5Amps? Any ideas as what I could do or maybe a possible link to a regulator that can do this?

FYI don't worry as to what I will use the battery pack for or why I want to step it down, since that will just make this thread more complicated/more questions.


texts: 1 Regulator for 4 motors or 4 regulators?, connecting 3-5V dc motor to arduino

texts:
I have a 2S Li-Po battery (7.4v) and I want to control 4 small dc motors (3-5V, site says 22mA at 3V) with an arduino nano PWM signal. The nano is also powered by that battery, i do not want another external battery.
So I thought about regulating the 7.4v from the battery to 5v and then there are 2 option that I saw:

use a NPN Transistor, Resistor 330Ω, Diode (1N4004) and use this setup: (But power the motors from the regulated external battery and not the arduino 5V like in the picture)

use 10kΩ resistor, RFP30N06LE MOSFET and use this setup: (My motors is 5v, not 60v like in the picture, and again, there are 4)

Ok, Questions:

What setup is better?
Is regulating the 7.4V to the 5V max the motor need is a good idea?
Do I need 1 regulator and split the output to each motor, or 4 regulator (one for each motor)?

EDIT: if there is an already made board with all the connections needed, for 4 motors (I saw only 2 motors driver at sparkfun and buying 2 of them costs too much) please write, because I need the setup to be the smallest possible


texts: Capacitive coupling between hot and cold ground

texts:
Its understood from other Q&A regarding this topic, the link between rectified mains side and low voltage DC side of most smps are to provide some sort of grounding for very high frequency EMI noise so that it is not emitted through whatever load connected to the low voltage DC side.

What confuses me is, that capacitive link could worsen the EMI problem by coupling the high frequency noise into the household power lines and turn the mains wiring a larger antenna.

Why its not happening?


texts: I have an old CRT TV which had to be switched ON for half an hour or so for the picture to stop being blurry and be 'viewable'. During this initial warm-up time there was a 'static' like noise coming from the TV which was not from the speakers. Also there was this weird smell which filled the room which I now suspect was ozone. I couldn't find any visible arcing although the sound was similar to one. Had it repaired (faulty transformer they said) and the both the sound and the smell went away. How is possible for the device to produce ozone? I understand it requires a very high amount of energy, equivalent to lightning, for ozone to be produced in nature. How can the small voltage and current (compared to lightning) levels in home do this which normally requires such a very large amount of energy ?


texts:
Can somebody explain me why is there this solution for V in the first problem here.

I understand when we have conducting or cut of but how is V calculated? I am very confused

Thank you for your time


texts: Why should the protective angle on high voltage lines be kept as small as possible?

texts:
This website, https://circuitglobe.com/overhead-ground-wire-or-earth-wire.html, said for effective shielding, we should keep the protecting angle as small as possible, the angle between 20° and 30° is quite safe, and it should not be kept above 40°.

Why? I think the larger the protecting angle becomes, the longer will the \$L\$ be, that is, the range that shield wire can protect will become larger.  Isn't it good to let \$L\$ become longer? Why does the website say we should keep the protecting angle as small as possible?


texts:
I'm trying to drive this piezo element at 40 kHz but am running into troubles when using a function generator since the element requires greater drive.

I got the guts of an ultrasonic cleaner to drive the element, but it was modulating at about 10 kHz.

Could anyone give advice on how to drive the element?

I also can't derive what voltage it wants to be driven at, either.


texts: Can lower than rated voltage be used on the non-control side of a relay?

texts: For example, if I had a normally closed relay with 120 VAC control and is rated for 28VDC on the other side, could I use 3.3VDC on the 28VDC side?


texts: Good 5-pin connector under moderate stress

texts:
I'm fixing up some electronics at my marine ecology lab. One of the gadgets we have is a portable RFID tag reader. It runs off of a PIC board, and has an antenna that attaches to it. The antenna looks like a beach metal detector… a 4'long PVC pipe containing the antenna reader, with a 2' diameter PVC hoop (the actual antenna) at the end. There are 5 wires between the PIC and the antenna reader - 2 power, 3 data. Since the antenna reader already decodes the antenna, I'm assuming I don't have to worry too much about RF.

It is advantageous to have an interconnect between the PVC contraption and the PIC board for easy storage and transportation. Previously, the lab has been using MOLEX connectors for this, and have been epoxying the crap out of it. This hasn't worked so well for them, and they have to resolder the connections every couple of months.

I need a 5-pin connector that can withstand a reasonable amount of stress(almost anything has most strain relief than Molex anyway). It doesn't have to be waterproof. The first obvious solution for me was DB9. However, the PIC board already has a DB9 connection (serial for uploading the data onto a computer), and I would rather avoid any disasters that might occur from somebody accidentally swapping connections.


texts: Why do we need to declare ports as input/output?

texts: I am writing code in assembly language (AT89s51). When I see a standard program, the ports are typically defined as inputs or outputs. But, without defining them it seems to work fine. How is this possible?


texts: How can I prototype an Aluminum-clad board?

texts:
I have a fairly thermal-heavy design that I want to prototype on something resembling an aluminum-clad (or -core) board.  Alas, it's not FR-4 and the low-volume run costs are exorbitant.

What is a good way to prototype a thermal design on something "aluminum-clad-like"?  The actual count of high-dissipation components is quite low (about a dozen), so I was tempted to try to hack them on with bubblegum and maybe some electrically-insulating thermal epoxy, then run wires (previously dead-bugged) off to the rest of the circuit on a cheap FR-4 PCB.

Is there a better way?


texts: What is the name of this single slot PCB-mounted connector?


texts: How to connect switches to PWB on IP69K sealed pannel without wiring harnesses while still allowing easy separation of board and panel?

texts:
I am working on a project that has a panel that has several push-buttons, and rocker-switches on it.  The buttons/switches connect to a PWB that sits behind the panel.  The buttons/switches/panel need to be sealed.  The usual method is to use sealed panel mount switches/buttons and connect them to the PWB via a wiring harness.
There is a mechanical engineer who is in charge of the project and they insist on not having a harness.  They are proposing mounting the switches to the panel and then soldering the board to the panel.

There are many problems with this approach.

Our manufacturing plant and test group will hate us forever for making them build this.
Attaching the PWB to the panel will likely have to be done by hand since we cant put the whole panel assembly in the selective solder machines.  This increases the amount of manual labor required to build the boards.
Once we test the seal on the panel we can't open it without re-testing.  This means that the PWB must be soldered to the switches before we leak test.  If any leaks are found, fixing them requires desoldering the PWB from the switches, which is a lot of work.
The board cannot be fully tested until its soldered to the panel.  And if problems are found, we are again faced with desoldering the PWB from the switches.
We are going to be building thousands of these boards and doing 100% testing, so making them easy to build and test is a priority.

Does anyone know a solution to this problem that allows access to the switches/buttons while keeping the panel sealed, without using a wiring harness while still allowing easy separation of the panel and PWB?
I know of some theoretical possibilities, but I don't know where to get them, or if anyone actually makes them.

Use a rubber sealing boot over the buttons.  The buttons are no longer directly connected to the panel so there is no problem just soldering them to the board.  There are some products such as APM Hex Seal, but the mechanical engineer is resistant to this solution because he feels the boots wont be durable.  In the past we have had torn sealing boots if a user steps on the panel with their own boot.  Also there does not appear to be an option for a boot for a rocker switch.

Use sealed panel mount switches/buttons that have a matching PWB mount plug.  I am not aware of anyone who makes this (but it would be ideal).

Use a sealed panel mount plunger and then use it to actuate a standard PWB mount button.  This is similar to using a boot, but the plunger is not rubber and therefore can be much more durable.  I am not aware of anyone who makes such a plunger.  Also I am not sure how this would work for a rocker switch.

NOTE:  We prefer sealing to IP69K is preferable due to how the equipment will be cleaned.  But lower levels of sealing (at least as good as IP68) would be considered.
NOTE:  I show three buttons in the pictures for simplicity, but in reality there are many more buttons and rocker switches attached the same way.


texts: I've come across a few parts that have ND at the end of their part number on Mouser and DigiKey. I can order the part with the ND at the end or not. What does that mean?


texts: Is there a way to flip a component while preserving wire locations (in Altium)?

texts:
I have placed a header component. I started wiring it, but now I realized that the component should by flipped in the y-direction. If I started at the beginning, it could use the shortcut 'y' to flip/mirror it in the y-direction. But because I have already wired the component, the wires will cross.
Is there a standard way in Altium to flip a component, while keeping the connections at the place? I could of course redraw the connections, but I'm curious if there is a standard way.


texts:
I am wondering, if the quartz crystal, to be used as part of an oscillator, needs additional components to oscillate at its resonant frequency? And if it does, which are those extra components that help the quartz resonate? I know it doesn't produce any sine wave only by itself.

Also, should the output of the whole oscillator (which is feeding back a part of output signal to the input of quartz) lag for 180° vs it's input, so that quartz crystal actually oscillates?

Example shown below


texts: Problem with signal edge in schematics containing high speed IC switch

texts:
I am trying to design the following schematics:

There are two kOhms resistance which are connected serially. One is load and another is device resistance. I need to apply the voltage in a the following way using IC switch

When voltage on the IC switch is non zero the voltage is applied only
on the device
When it is zero the both R_load and R_device connected serially

Since the signal through the resistance is a pulse with duration less than 100 ns I am using a couple of op-Amps for impedance matching (the measurements are carrying out on 1 MOhm oscilloscope channel). So I have to use fast IC switch.

For the first experiment I used constant voltage (~500 mV) applied on both resistance. I see the oscillations at the moment when switch is on or off. How can I remove these oscilltaions? I tried these schematics without op-Amps, and saw the same behaviour.

I tried on the several switches

ADG712
SN74LVC1G3157
SN74LVC1G66


texts: simple way to get a single pulse using a cd4060?

texts:
Wondering what what be the easiest (least component count/passives only) of getting a single pulse from a CD4060? Looking for a delay of about 10 seconds generating a single pulse of about .25 second when the chip is first powered up. I have the values for the RC network to get the 10 second delay, but the pulse is also about 10 seconds long, and this repeats endlessly.
I have tried a simple transistor/capacitor/resistor circuit as well, but I don't have the appropriate values in house during social isolation...
Thanks for the help!


texts: Optimum aspect ratio for storing data in Block RAMs

texts:
I am working on Xilinx virtex 4 FPGA. I want to store some filter coefficients in Block RAMs.
Specifically, I have many sets of filter, each set having 64 coefficient, each coefficient is of 18 bits. Each set has to be mapped on a distinct Block RAM.

From the Virtex 4 user guide  (link to pdf), it says a Block RAM stores 18Kbits of data which can be configured in any “aspect ratio” from 16Kx1, 8Kx2, to 512x36.

So, if I program the Block RAM to have 512 coefficients, then I have 36 distinct Block RAMs at my disposal.

My question is, can I scale this aspect ratio down so that I program the Block RAM to store 64 coefficients, in which case I will have 288 distinct Block RAMs at my disposal(64 x 288 = 18K)?

If the answer is NO, then how should I store my coefficients so as to use minimum Block RAM resources?


texts: I have a timing code, and on a trigger event,there is a 5 second countdown to activate a motor. Is it possible to add a delay of half a second in activating the output, or in the start of the countdown?


texts: Question on Current Sensing Resistor in Lead Acid Battery Charger

texts:
I was reading several threads on Lead Acid Battery chargers and encountered a circuit diagram given by Russell McMahon here https://electronics.stackexchange.com/a/152641/93631

First of all, I would like to know if this circuit prevents overcharging for 12V lead acid battery or not.

I also want to know the principle of the charger and how it prevents overcharging lead acid battery. I am specifically curious to know the function of Current Limiting Resistor. From the diagram it seems to be a constant current charger (since I am able to set the current limit). Is it true? Or is it the max allowed current limit (and not constant current limit)?


texts: Help in understanding a IR repeater schematic

texts:
I'm relatively new to electronics projects, as a hobby. So please bear with me. I want to build an Infrared Repeater as a small project. I've found a component which I think will work nicely for the job. TSMP4138. Its an IR sensor, which will output a modulated signal. In the datasheet (which is linked), there is an example application circuit. For the purpose of my own learning, I want to understand all the components in the schematic, and why they are there. There are 3 resistors, and 2 capacitors in the diagram which im struggling to understand their use. If anyone could help me with some explainations, it would be greatly appreciated.
I do understand that the two IR LEDs (TSAL6400) need to have a resisitor, but I cannot work out the calculation to understand why its a 3ohm resistor.


texts: Debugging an old Thermostat: What component is this? (3 pins SMD IC)

texts:
My Thermostat stopped working a couple of days ago and I tried to debug it.
The first thing I check is if there is any component that gives a strange result with the multimeter and I found these three components which look a lot like transistors (maybe BJT?):

I'm sorry for the bad quality but I couldn't get any better picture with my phone. Anyway, the package is like this one (only the package is the same, the component is different from those on my board!:

Two are the same component (5Bp or 58p is what is written on the package), and I can measure 0.6V (with the diode option of a multimeter) across any pins. This is strange for a BJT, but it may be related to how they are interconnected.

And the third one, pointed by the green arrow, with a horizontal "P" and a vertical "D3" written on the package, is what I would assume is a PNP BJT. Here is a sketch of the component (really bad proportion!):

My assumption is also that this is broken: I can't measure any diode for this component. Two pins are not connected (multimeter shows an open) and the other two couple of pins are connected but the multimeter measures a short with the diode option, and the resistance measures approximately 27 Ohm and 19 Ohm, regardless the polarity of the multimeter.

So, my question is if anyone knows by heart what this component is exactly, or if he can confirm that this is at least a pnp.

Unfortunately, I don't have any way to understand what type of bjt (assuming it is a bjt) without knowing the pin out and measuring the orientation of the diodes...

I may infer this from how the components are interconnected and especially if any terminal is connected to Vcc/ground, but without knowing the pin out of the component it's still quite bothersome, I think!

PS: I said I'm debugging my old thermostat, so I'll briefly describe the issue I had, maybe someone can help with the debug in general and not only recognizing the bad component! There may be some inaccuracies/errors in my explanation though, as it's not my business to work with this kind of component, but this is what I could understand from my trials. Please feel free to ask/correct me.

The relay that should give the start signal to the heater works (or the relay that should switch when the thermostat tells the heater to start). I can tell this because when I set the temperature so that the heater should start, I heard the typical noise of a relay that switches. This also means that the temperature sensor works, because it correctly switches the relay when I set a higher/lower temperature on the thermostat. Regardless of the relay that switches, the signal to the heater doesn't arrive, so the heater is stuck off.

There is also a quite big IC (NEC), which I suppose is a microcontroller, and I suppose it works correctly because: it drives correctly the relay, the LCD on the front panel works correctly, etc. There is also a quarz oscillator, which should work because the microcontroller works (I assume it's the clock generator for the microcontroller).

All the other components (15 components approximately in addition to these I already mentioned) are just passive components (capacitors and resistors), mainly SMD.

UPDATE

JRE pointed out that it could be the realy, and it really was. Now I'm trying to find a good replacement and asked a new question there Suitable Replacement for a Dual Coil Latching Relay. Feel free to help/see the end of this story! :)


texts: Can I use WP(Write Protect) pin of a USB flash memory controller to prevent tampering with its firmware/stored data?

texts:
I want to have an USB stick that I can make it read-only and insert it in any untrusted PC without risking a silent BadUSB infection.

I was thinking about finding an USB stick that has this WP pin in its controller and DIY mod an external switch to it for Write-Protection.

Do you think it could be possible?

If you have any other simple/cheap solutions to have a 32/64gb device that can be Write-Protected, please let me know.


texts: The set_command_request procedure from altera_avalon_mm_master_bfm_vhdl_pkg does not return thus master BFM does nothing

texts:
I am trying to use the Altera Avalon MM Master BFM in my Qsys testbench.
When we want the BFM to make a read or write request, we first call the set_command_request()
which is described in the "Avalon Verification IP Suite: User Guide" section 5.4.39.
I have used it in the past and never had any trouble. However, recently I notice that when a call is made to this function it never returns. Has anyone ever experienced something like this with these Altera Avalon MM BFMs before?


texts: THS6002 "Dual Differential Line Drivers and Receivers". Output: 15 MHz

texts:
I made a PCB with the THS6002 chip "Dual Differential Line Drivers and Receivers". I copied the application example of figure 59 in the datasheet (page: 34), with three differences: the transformer is 1:1, the resistors are 22 Ohm (not 12.5) and the power supply is +-5 VDC (not +-15VDC).

link

When I turn on the circuit without inputs or with inputs (2 VAC 500Hz), sometimes it works correctly and sometimes the receivers have a sinusoidal output with 400 mVpp and 15 Mhz, which only disappears when I apply a 50 Ohm resistor between any receiver input and ground.


texts: What does the Amp rating on a Diode Mean?

texts: I have two rectifier diodes, a 1N4007 and a 1N5391. The first one is rated at 1A while the second is rated at 1.5A. What does the current rating mean? Will I damage/overheat either if I connect a device (such as a wall wart/barrel connector) that has an output of 2A or more?


texts: Looking for a binary counter/register IC

texts:
A hobby of mine is to explore technologies and try to re-create simplified versions on my own, in order to better understand how they work. The current project I'm working on is to create a simple CPU using ICs (I don't want to do this from the transistor level, I'm not that into this...)

I can find lots of register chips for the general purpose registers, but the program counter (PC) would require a counter chip that is capable of being set arbitrarily (in order to achieve jump instructions).  Does anyone know of any ICs that are readily available that achieve this?  Alternately, if anyone has ever done this before, how do you make the PC?  Is it a single chip or do I need to create a separate PC circuit?


texts: MOSFETs: Gate-to-Source resistor and Gate resistor value calculation

texts:
I want to control several Mosfets through a microcontroller. I have a low-power application in mind, therefore the power consumption should be minimized.

When do I need a Gate-Source-Resistor, and when not? How to calculate the value for minimum power consumption?
Regarding the gate resistor, Does it make a difference in terms of power consumption, if I choose a 100 ohms resistor vs. a 1k ohm resistor?

Added schematic (Dx-pins: digital pins from microcontroller):


texts:
I've the following schematic for a buck converter charger circuit.

This is getting power from a 10Watt Solar Panel and charges a 7AH 12V Sealed Lead Acid battery.

I'm controlling the BC817 with PWM from an ATMega2560 at 62.5 Khz and usually the current is around 500 mAmp.

My issue is that the IRF4905 gets extremely hot during charging.
With a small aluminum heat sink attached, it does reach temperatures near to 90 degrees Celsius, which is concerning.

The IRF4905 mosfet is designed to handle current up to 74A, so I really don't understand why this is happening here.

Any ideas are welcome.

Thank you!


texts: Open-source DIY audio spectrum analyser and/or graphic equaliser

texts:
does anyone know of any OpenSource/DIY audio spectrum analyser projects

can they direct me to an article, video, pics

hackaday and instructionals style

also I.C's old or new that i could/should try

T. I. A   ;-)


texts: Auxiliary channel signals in display port

texts: Can anyone tell me the significance or functionality of auxiliary channel(P and N) in display port interface.


texts: How can one find the Transpose of a Boolean Matrix? Also how does one interpret the logical circuit represented by it.


texts:
How to reduce \$(\bar B.C + B)\$ to \$(B + C)\$?

Idempotent Law

A * A = A

A + A = A

Associative Law

(A * B) * C = A * (B * C)

(A + B) + C = A + (B + C)

Commutative Law

A * B = B * A

A + B = B + A

Distributive Law

A * (B + C) = A * B + A * C

A + (B * C) = (A + B) * (A + C)

Identity Law

A * 0 = 0     A * 1 = A

A + 1 = 1     A + 0 = A

Complement Law

A * ~A = 0

A + ~A = 1

Involution Law

~(~A) = A

DeMorgan's Law

~(A * B) = ~A + ~B

~(A + B) = ~A * ~B


texts: Impedance matching an RLC circuit (inductor macroscopically drawn on PCB)

texts:
Context: I am a physics grad student with basic knowledge of circuits, but impedance matching and RF domain are beyond my normal scope. My PCB is actually copper bonded to a ceramic substrate that is going in my vacuum chamber, so knowing the details of what this circuit is actually doing is important for calculating heat dissipation requirements as well as because I won't be able to modify it after I install it in the chamber. There is no resistor element, all resistance is from the wire traces themselves.

So my goal is to have ~1 Amp current peak going through my PCB traces at ~5 MHz in order to have the right magnetic fields for the set of boards to act as a trap. The only components I have are a tuning capacitor (high voltage compatible) and then whatever I choose to use for my impedance matching. By using different tuning capacitors to make the circuit resonate at different frequencies, I believe my parasitic capacitance is approximately 4 pF, my inductance is about 42 uH, and to get the circuit to resonate at 5 MHz I use a tuning capacitor of 20pF.

My "transmission" port is a wound pick up coil that is on the board near the larger drawn coils. Using a network analyzer, I have a couple of different scenarios which is where my confusion lies. If I attach the circuit to a 1:1 toroidal transformer, my power coupling is quite bad, my dip in reflection is only -4 dB. however, the width of the resonance is .1 MHz at 5 MHz, so my Q is 50. Using \$Q = \omega L/R \$ that means my resistance is 28 ohms. Even if I change my turns ratio though, I still cannot get better power transfer than an ~4 dB dip in reflection. Why can't I get better power coupling than this? Is the inductance of the toroidal transformer the issue? However, if I use an L matching circuit, (capacitor across input port, inductor in series with the load, (values work out to 470 nH and 560 pF) I can get -30 dB in reflection, but my Q drops down to 25. What is real here? I would think that all the power coupled would have to be dissipated in my coil, but why is the apparent resistance doubled by using the L match impedance matching? Or is the drop in Q just a function of the source now seeing an apparent 50 ohms, but not really driving that?

Any help or references would be much appreciated, I've been fighting with this for a while and all my labmates are also physicists, not EEs, so we don't have much experience with this. Thanks!

Edit: here is the schematic for scenario one: toroidal transformer and 2: L-match circuit

Another edit: the actual coils in question:


texts: Using Belkin 6-Outlet Surge Protector in Morocco without a Converter

texts:
Morocco uses the 220V/50Hz standard, and I was trying to use the following power strip I bought in the US with only a adapter (no converter):

https://www.belkin.com/us/p/P-BE106000-06/

When I plugged the surge protector and turned it on (with no load), there was a very short but intense spark. However, my electronics were charging fine when I later plugged them into the surge protector. I'm just wondering what the initial spark was due to, and if it is possible that I broke something inside the surge protector and if so, is it ok to continue to use the surge protector (given that my electronics were still charging fine).


texts:
Basically I want to create a blinking unit to drive my LED's. The LED's are used to be driven at a frequency of ~1.5Hz (that made me choose the values of L and C).

So here is my schematic. (I am physicist so there might be some issues with current direction...)

(The PNP is used to block the supply-current if the capacitor is charged.)

simulate this circuit – Schematic created using CircuitLab

After a while of thinking about it I got to the point that this wont work because the resistance in the LC-circuit will cause that there wont be any oscillation. Even if in D3 is only a single LED...

And now I have no idea how to get my 12V DC current into a 12V AC current with a frequency of 1.5Hz. I searched a long time how to do this but I don't get it how to get it working.

I found i.e. circuits of power inverters but all of them (I found) are at 50Hz and 230V AC output.

How could I get it working to transform my 12V DC to 12V AC (f=1.5Hz) without using an IC. Well I thought of using a quartz but no one I found has a sufficient low frequency...


texts: Need help with an IR demodulation circuit

texts:
I'm trying to reverse engineer a PCB and made a schematic.
The bad thing is I only have PCB images from both sides, not the actual PCB. This PCB is used to detect a very small black object spinning at the speed of 23000 RPM.
I need to know the following things about the schematic:

Can any one help me to learn the working of this circuit? I know bottom one is inverting Operational amplifier but I don't know about the upper one.
The opamp IC is an LM324A and they are running it on 1.65V. Is it possible to run it at 1.65V? The suggested voltage for the IC is more than 3V.

Here is my actual PCB on which I'm working


texts: Choosing the right sampling frequency for WLAN 802.11ac signal (BW : 80 MHz)?

texts:
I’ve got a WLAN 802.11ac signal & it’s bandwidth is 80MHz, now I would like to know the ideal sampling frequency for this signal.

As per the nyquist theorem , the sampling frequency could be 160 MHz and above, is it correct?


texts: How do I set up speakers in series and/or parallel for a minimum 4 ohm load on the amplifier?

texts:
I need to connect 4 speakers to 1 output of a power amplifier.

All speakers are identical (100 watts @ 8ohms) and the minimum load permissible on the amp is 4 ohms.

They can be connected in series and/or parallel, but the final load on the amp needs to be a minimum of 4 ohms.

What would be the final load?

What would be the final wattage?


texts: What is the best way to measure and record the power consumption of a servo motor accurately?

texts: I can obtain the rotational angle and velocity of a servo motor. However, I cannot obtain the current nor torque while the motor is turning. What is the best way to measure the power consumption of a servo motor when it is turning?


texts:
As part of an exercise, i have 4 inputs and 3 outputs F1,F2,F3.
After minimizing with Karnaugh maps one of the inputs is eliminated and i get these 3 outputs:

F1= x'y'z'
F2= x'y z'+ x z
F3= x'z +x y + x y'z'

Can i make this any simpler or can i start implementing it with Logic gates? I want to use AND, OR, NOT gates of 2 inputs only and right now i am able to do it with about 15 gates.


texts: Does zener diode connected at the input pin of a controller affect the controller when internal pull up is enabled at that pin?

texts:
simulate this circuit – Schematic created using CircuitLab

Controller pin acts as i/p. If internal pull-up(5V) is enabled, how will the circuit behave?? will 4.7V zener breakdown and provide low resistance causing a large current to flow through pin?


texts:
Can you do explain how to draw a Bode plot with GH(s)?
How do I get the slope and intersection point?
This is one of the teacher's examples.
He drew it but I don't know what it means.
Can you explain it?
I only understood that the gain is 20 log lGHl.


texts: Switching a power contactor from an arduino / raspberry

texts:
I'd like to switch a power contactor (such as this one : https://www.legrand.fr/pro/catalogue/31925-bipolaires-250-v/contacteur-de-puissance-cx3-bobine-230v-sans-commande-manuelle-2p-250v-25a-contact-2f-1-module)

To switch the contactor, I use a classic SPDT relay connected on the arduino board, The spdt relay is switching 220 VAC, so the contactor is activated

There is no load (yet) on the contactor (but I assume the situation will be worse after!).

The problem is that switching the coil of the contactor generates lots of EMI with impact on near devices (glitches on screens, disconnections of USB devices aso)

We tried to put zero crossing (switching the SDPD relay when AC cross 0 Volts), which improve the situation on power-on but changes nothing (or almost) when swiching the relay off (I assume this is because the current on the relay is still present).

We also put a Metal Oxyde Varistor in parallel of the relay, which improve the situation, but EMI levels are still very high.

I think I undestand the phenomenon behind these EMI (coil tend to keep the current constant, so switching off produce very high voltage peaks), but how can we improve the situation?

Some documentation suggest using triacs instead of a spdt relay, but I don't understand how such component can improve the situation...


texts:
Is this the table of 12 resistor series?

10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82

http://sv.wikipedia.org/wiki/E12_%28resistorserie%29

And if I have a resistor of let say 1670 ohm - how do I use this table to find new resistors that can replace 1670?

very greatful for help

(this is an assignment in c-programming and I don know much about this stuff)


texts: Amplifier volume potentiometer causes voltage offset

texts:
Using answer about microphone I have built a simple amplifier.

simulate this circuit – Schematic created using CircuitLab

I changed some of the parts due to my needs and resources.

R1: is now potentiometer and allows me to set the "0" of the sound to 2.5V
R3: should control amplification (but it doesn't seem to), so again a potentiometer
C1: unless the original answer meant electrolytic capacitor, there's no way to get 22uF capacitor. So I used just two 22nF caps.
C2: I have 10uF capacitor (salvaged from old sound card ironically), so I used that

So I have set up R1 to get 2.5 volts on silence. The image displays 80Hz sine wave rather than silence, I generated it here (works on Android).

Now if I move the R3.2, instead of change to gain, I just get voltage offset, and an insignificant one. Picture describes full range (min - max - min) of that particular potentiometer:

Note also that increasing resistance increases voltage on output.

I could use my 50k potentiometer instead but that would give me no precision.

So what is wrong with my circuit? How to control the amplification?

Note: I displayed the analog input using this processing script and this arduino program, both mine but I thought I might share.


texts: Can you connect two lm317's either in series or parallel to help spread out heat?

texts:
I am designing an adjustable voltage regulator.
The regulator will have be able to swith between max Vout of 9V, 12V, 15V and 18V and will have a variable resistor that can adjust the voltage from 1.5V to its selected max voltage.

The problem is the amount of heat dissipated.
The input will be 21V, to compensate for voltage drop, and the max current that needs to be handled is 450mA.
Using the power dissipated formula P=(Vin-Vout)Iout.
The power dissipated will be P=(21-9).45=5.4 watts.
The max heat that a lm317 can safely dissipate is 15 watts with a heatsink. 5.4 watts is well below that which is good but still I'd like to err on the side of caution and spread the heat across two lm317's if possible.


texts: 3.3 V relay switches on/off/on - off fails 2nd switch off connected to Pi4

texts:
UPDATE
Issue only happens when load is connected, triggers every time without load

This 3.3 V .relay, link to the the >>> Datasheet
As the title mentions, it works fine until I try to switch it off the second time round, then
I see the red LED turning on (it looks a touch dim).
Tapping the relay housing(lightly) triggers the relay
Stuck relay then!
But why only after the second attempt and never on the first power off ?
EDIT: I looked at the datasheet thinking it needs a bit more voltage, but max is 3.9v!
import RPi.GPIO as GPIO
#from time import sleep
pin =2
# Set up input pin
# set bcm pin mode
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(pin, GPIO.OUT)
#  turn on relay in revese mode so sety pin to low
state = GPIO.input(pin)
if state:
  print('on')
  GPIO.output(pin, GPIO.LOW)
else:
  print('off')
  GPIO.output(pin, GPIO.HIGH)

Edit schematic

Sorry I have really bad drawing skills!
I have posted this on the raspberry pi.stackexchange but think the question may be better suited here.
Thank-you.


texts:
I have a circuit that I am currently designing using a 4 layer PCB (signal, ground, power, signal).  The PCB has rather a lot of vias to route the signals around the board (there are size constraints, meaning I can't space the ICs as much as I would like which would make it easier to route the signals without vias).  The circuit is primarily an audio intercom system, with the vast majority of signals being of audio frequency.  There are only a couple of ICs that have high (10MHz) signals and these I have been able to place close together, i.e. reduce signal trace length.

My question is when should you consider adding an additional signal plane?  Is there a point at which it becomes better to add an additional signal plane (e.g. going to 6 layer board instead of 4) rather than use a lot of vias?  Is there a frequency of operation above which it is better to do this?

Edited to add PCB images:


texts: Discharging a capacitor quicker, using an exterior time varying magnetic field?

texts:
I was analyzing the possibility of varying an exterior magnetic field, that's aligned in direction with the magnetic field produced by the displacement currents(both parallel in the same plane) shown in the figure above.

And when I used this equation to model the case:

It seems possible to discharge the capacitor faster/slower depending on the orientation of the exterior magnetic field, and it's rate of change, the exterior magnetic field would affect the displacement current's magnetic field, wouldn't that help in discharging/charging it? In addition, increasing those rates or decreasing it?

Discharging faster by increasing the displacement currents, and the conduction currents flowing in the loop, if the field was in the opposite direction(out of the page) it would discharge slower since now it's opposing/reducing the displacement currents.

NOTE: The magnetic field will be confined mostly in the separation gap of the two plates, to reduce it's effects on the overall loop(that includes the load/resistor).


texts: Determining Output Resistance of Transresistance Amplifier

texts:
I'm really inexperienced when it comes to operational amplifiers, but I'm trying my best to learn more about them. That being said, I'm currently having trouble understanding the transresistance amplifier shown below:

simulate this circuit – Schematic created using CircuitLab

With regards to the circuit, I'm having trouble figuring out the output impedance of the op-amp circuit. My textbook tells us to use a generic 1 A current source to figure out the voltage at the output to calculate the output impedance, but I'm confused as to the results with the setup shown below:

simulate this circuit

Turning off all other independent sources, the negative terminal acts as a virtual ground, so Vx = Ix * R1, and Zout = Vx / Ix. Therefore, from what I see, Zout = R1. However, according to my textbook, zero output resistance appears at the output terminal of the ideal op-amp. How does this make sense if using a test source to calculate the output impedance?

EDIT: Assuming an ideal op-amp model envisioned below, the internal output resistance of the op-amp is zero if I remember correctly. But let me try and work this assumption out. Using the model below of a differential amplifier, Vd (the difference between the positive and negative terminals) is 0 since both terminals are 0, so the dependent source provides 0 volts, so it 'acts' as if it is 'shorted' to ground. Since Ro is really tiny, close to 0, is that how we get the overall output resistance of the circuit being 0?

simulate this circuit


texts: Why doesn't the STM32F103 have the checkbox "Activate Vbus" for USB device mode in CubeMX?

texts:
I'm studying a task about STM32F103 interface USB in device mode. I see that the STM32F103 doesn't have the checkbox "Activate Vbus" in CubeMX but STM32f105 and STM32f107 have the checkbox. I know that Vbus is important to detect the USB Host.
Please tell me, why is that?

STM32F103

STM32F105


texts: How can I export the frequency response from LTSPICE without phase wrapping?

texts:
After I plotted the frequency response of a circuit using LTSpice as shown:

I exported the plots data as a .txt file in order to plot them after that using MATLAB, however, after I plotted the data using MATLAB I discovered that the exported data from LTSpice has the phase wrapped, as shown:

Is there a way to export the LTSpice frequency response without having the phase wrapped?


texts:
I have an Atmel SAM D20J18 uC. I'm trying to print something via USART. The first few symbols are ok, but after 8-9th symbol there is garbage. However, if I run the code line-by-line in debug mode (with SAM ICE JTAG), all the symbols are printed correctly. I'm sure that I have correct serial settings in both uC and the terminal program (I use Putty). I use USB-to-TTL as serial device. What else could cause the problem? (link to the source code: main.c)

UPD

See my own answer below


texts:
I need to send 800 bytes of data from a computer to an arduino board every 20ms (approximately).  I began with the serial library which works nicely but it is too slow even at its highest rate (115200 baud) for interfacing with a computer.

What other interfaces are available that can send at a faster rate?  Can I use usb or spi?  I can't seem to find libraries for these.  I need something with about a 320 kBaud rate.

edit

Are there any shields that might be able to do this?  Bluetooth or wifi?


texts: Switching AC to AC voltage (not current) converter

texts:
Classic transformers for 220v to 110v or similar (with 50-60hz) are very large and expensive for high power (say 2000W).

For regulating current, a dimmer can be used (and most of the search results return this) but the voltage wave peak is not reduced if I understand correctly.

For DC-DC or AC-DC switching regulators are used, and at least in principle one could use a high power AC to DC and then an inverter to get AC again. But I guess many of the parts in the middle could be omitted for this particular application (hopefully reducing the size and costs).

I'm looking for a relatively simple/inexpensive circuit used to convert mains 220V to 110V. It doesn't have to be a perfect sine wave, but the idea is that devices like a TV would work (not only motors and heaters).

Summary:

Why aren't there commercially available consumer (non industrial) implementations of this idea?
Is it viable to do so (reducing size and costs compared to iron transformer)?
Any sample circuits there?

Please correct me if I'm missing something.


texts: How does complex loading affect an op amp's power dissipation

texts:
I'm trying to calculate power dissipation in a complex load. I know that the power loss due to the resistive component is dissipated, and that the power loss due to the reactive component is canceled out due to an equal amount of power being generated at the load and sent back. My question is how does the op amp handle this, is the power dissipation of the op amp equal to P_resistive+P_reactive? How would I interpret this on an oscilloscope?
Thanks in advanced
EDIT: I should clarify, when I ask how this affects the op amp power dissipation, I really mean how does this affect the junction temperature.


texts: Control Systems-Design controller to achieve the following

texts:
I'm given this system

$$G(s)=\frac{10}{s(s+1)}$$
I am asked to design the least complex controller C(s) so I can achieve the following 2 conditions at the same time :

1) steady state value( y(t) for t going to infinity) is 1 for a unit step input u(t).

2)The dominant poles of the closed loop system are between -1 and -0.5.
$$\require{cancel}$$
I have many ideas but that part about the least complex controller troubles me a bit. Regarding the steady state value: $$C(s)=N_c(s)/D_c(s)\\T(s)=\frac{N_c(s)(10)}{s(s+1)D_c(s)+10N_c(s)}$$
Nc is the numerator of my controller and Dc is the denominator. Using final value theorem I will get : $$\lim_{t->\infty}y(t)=sY(s)=sT(s)2U(s)=\cancel sT(s)2\frac{1}{\cancel s}=\frac{20\cancel {N_c(s)}}{10\cancel {N_c(s)}}=2$$

This can't be 1 no matter what C(s) is. Maybe I could cancel the origin pole with a zero at the origin. That way my denominator in the limit will be left with more terms without an s.


texts: Series Wound DC motor Runaway when going downhill

texts:
I understand that Series Wound DC motors are used in traction applications like golf carts . and that these motor suffer an effect called runaway ( if no load is applied the motor increase its speed until something breaks)

I have a scenario in my head that i cannot answer :
if the golf cart is descending down a hill and no brake is applied , would the motor be in the danger zone of being unloaded and over-accelerate if power is applied to it ?


texts:
I have SMD LEDs in my design and are used for light indication where light intensity is critical.

In such scenario, is it good to add conformal coating on the LEDs, does it impact the output (light)?

Is there any solvent, coating material which will less impact?


texts: High side current sensing in DIY bench supply

texts:
I would like to build DIY linear bench power supply, with adjustable, regulated output voltage and current limiting functions. The voltage and current regulation will be implemented using analog feedback loops. The functionality of the device requires sensing of the output current in order to:

Use it in feedback loop to limit current
Measure output current

Since whole this is to be controlled by microcontroller (voltage and current limit setting, measurement) it means that I need to generate voltage with respect to ground proportional to the current (or not?).

One of the possible solution is to implement high side current sensing using resistor (it is preferable solution due to protection against accidental shorts compering to low side sensing). Examples of the high (and low) sensing circuits can be found in nice app note from microchip.

I am hesitating to use any  of the provided solution as that would mean placing two opamps in cascade (opamp for control + current sensing) which may be an issue for circuit stability. Do you have other ideas how high side current sensing could be implemented and be suitable for both analog control and measurement (does not have to be the same circuit)?


texts: Proper power supply for this gate driver IC

texts:
I will use the gate driver configuration shown below:

Gate Driver datasheet

MOSFET Datasheet

As you can see, the 5V and 12V are isolated. I chose this AC/DC converter for the 5V supply. It's 1 Output 5V/3A. It will supply a STM32 and a Raspberry Pi.

I decided to step up the 5V to 12V using this Isolated Module DC DC Converter.

That module is just 1W/ 84mA max. My question is: Can it effectively supply the peak currents to charge gate capacitance using decoupling capacitors?


texts:
For some testing at my company, we attach the product to a small plane and collect data with a laptop. The product itself is run off a small motorcycle battery and, last time we flew, our laptop battery died. I checked out the specs on the power supply and it was listed as 180W.

Our pilot happens to have a 120W (with the correct output voltage) inverter for a 12V DC plug in the cockpit. If we were to use that and plug the laptop into it, would that just be 2/3 of the current draw and the charging would be slower? If, for whatever reason, my laptop is using the full power normally supplied, draining at 1/3 the normal speed would be awesome if it tripled my battery life.

I found inverters with 200+W ratings online, but they suggest only hooking up directly to a battery because plugs often have fuses at 15A or less. Since the only one up there is the motorcycle battery, it would have to be that. However, I'm hesitant to use that battery because it's rated at 12 Ah, which 12/15 = 40 minutes to drain just powering the laptop.


texts: LEDs, Reverse Polarity, and Battery Life

texts: Would an LED hooked up to a coin cell battery (3v) in reverse, cause any issues with the lifespan of the battery or the LED?  The LED would be acting as a photoresistor, supplying somewhere in the neighborhood of +0.2v back to the non-rechargeable battery in direct sunlight.  Could I expect a reduction in the lifespan of the LED, which seems unlikely, or a reduction in the charge of the battery over time?


texts:
I've currently set my PLC as a modbus slave, and written some python code which connect to it and act as a modbus client.

I am having some problems with the modbus server sometime terminating the PLC, when the python code request/send information to the slave.

It terminates by showing a popup window saying:

runtime error #16 (watchdog expired Task = default task)

And then a error message which it terminates with is:

IEC Task 0 ' cycle time is greater than the set watchdog timer; or cycle time exceeded, but shorter than watchdog timers

The only code I am running on the PLC is basically

(*Bit0 := TRUE;*)
(*Bit1 := TRUE;*)
(*Bit2 := TRUE;*)

DO1 := Bit0; (* Start/Stop *)
DO2 := Bit1; (* Direction [False - Reverse ; True - Forward] *)
DO3 := Bit2; (* Speed [Fast = 11; Medium = 10; Slow = 01 ; Stop = 00] *)
DO4 := Bit3; (* Speed [Fast = 11; Medium = 10; Slow = 01 ; Stop = 00] *)

and thats it. Bitx are coil address's and DOx are digital outputs on the PLC.

I guess, based on the error message it has something to do with the watchdog. I haven't manually changed anything with the watchdog, or even set it?..
How do I in codesys configure it?

Should I maybe adjust some of these values?


texts: How to determine which bridge rectifier to use

texts:
I tried searching and couldn't find how to determine how to decide which bridge rectifier to use in a circuit (assuming you know load). is the only consideration that the rating exceed to voltage and current of the circuit or could it pose a problem if that rating were too high.

Specifically I am creating a set of power indicator LEDs for use with a prototype electronics test bed. I have three inputs that could be any combination of V+, and V-. I want to use 2 bridge rectifiers to correct the polarity to go through an LED and indicate power on either input 1&2, 2&3, or 1&3. My max voltage will be 15Vdc and my max current will be 20mA.

If I choose a rectifier with a high voltage and current rating will I end up dropping too much voltage across the series diodes to show a visible glow in the LED?

I have provided my circuit diagram cause it's a bit more clear.


texts:
I am currently designing a buck converter that takes in 100 V and outputs 50 V.

I want to drive a 25 Ohms load resistance so the current is 2 A. It is in CCM mode and has 1% ripple on output and input.

How does one calculate the switching frequency? Since it is needed to calculate the inductor and the capacitor values.


texts: Question about nodal analysis with an ideal op amp circuit

texts: Iam trying to do nodal analysis of this op-amp circuit, but iam not quite sure if I have done it correctly or if I have missed something. The op-amps are considered being ideal so there is no current flowing in or out. I hope the picture is clear enough.


texts: What is the function of R1 in this relay driver circuit?

texts:
Given the following circuit - (source)

I'm trying to understand the logic of this circuit. Specifically, from the microcontroller, I'm not sure I understand how to switch the transistor "on" (is that the correct terminology?) to close the relay. If the IO pin on the microcontroller is +3.5V in its on state, what is the state of the transistor? What about when the pin is in its off state?

I believe this is a pull-up resistor, but I'm not sure what's pulling it up.


texts: High THD in an Active Power Correction Circuit

texts:
I'm asked to design a 30W power factor corrector for "dimmable" LED drivers. Here are the most crucial requirements:

THD (ITHD - THD of the line input current) should never exceed 10%
PF should be at least 0.91 for PLED ≥ 10W

I have designed one with FAN7930C and prepared a prototype circuit for testing. Here's the schematic:

It works fine as expected in terms of power factor correction. However, the circuit can't comply the THD requirement. Actually, the circuit keeps the THD below 10%, but only when it is under full load. Lowering the load causes the THD to increase.

Below are the power, PF and THD measurements (taken with a Rohde & Schwarz HMC8015 Power Analyzer) and scope images (taken with Tektronix MDO3012 Digital Oscilloscope) of the input current waveforms (the voltage across the 10R fusable resistor, R100):

VLINE = 220V, PLED = 10W, PF = 0.92, THD = 33%

VLINE = 220V, PLED = 15W, PF = 0.96, THD = 22%

VLINE = 220V, PLED = 20W, PF = 0.97, THD = 15%

VLINE = 220V, PLED = 25W, PF = 0.98, THD = 10%

VLINE = 220V, PLED = 30W, PF = 0.99, THD = 7% (I cannot put a scope image for 30W output since the appropriate LED load is not available right now)

Here are what I've tried so far:

Played with the input filter block but helped only a little.
Played with R102 (the resistor coming from aux winding to ZCD pin) which helps to reduce the THD (That's what the datasheet says). It really affects the THD. According to the formulae given in the app note, it should be 47k. However, if I put 47k then the THD skyrockets. So I had to decrease it down to 12~15k.
Played with turn ratios but couldn't play more. Because the IC is supplied from the aux winding. Didn't help, btw.

I cannot explain this. I don't know if it has a relation with \$PF = \frac{\cos(\theta_{v(t)} - \theta_{i(t)})}{\sqrt{{1+THD}}}\$. But I think it's more complicated than that.

What am I doing wrong? How can I improve the THD performance?


texts: Transimpedance amplifier with biopotentials

texts:
I have a PPG sensor to be specific the sensor is called " easy pulse finger sensor " which is a ( phototransisitor), can it be connected  to a transimpedance amplifier ( current to voltage converter)?!
Because the output of the sensor as i assumed will be a current, so i should amplify and convert it to voltage inorder to put it into bandpass filter


texts:
I have a custom PCB with an STM32F303K8T6 microcontroller onboard. Three values need to be measured with the ADC, but the values from the ADC do not match with the voltages measured at the ADC pins.

The voltages for the ADC2 are both 1.64 V and the measured values are 364 and 2001. ADC1 seems to have an offset (around 0-600) that changes over the applied voltage, like it is temperature dependent. I had such a problem on a STM32F4 Discovery, where the diode was the problem, but here I don't use any diode that could cause that problem.

The reference voltage at the VDDA/VREF+ is exactly 3.3 V (measured). The schematic and the setup in the CubeMX is attached in the images at the bottom. The code to achieve the ADC measurements is the following:

Code:

HAL_ADC_Start(&hadc1);
while(HAL_ADC_PollForConversion(&hadc1, 0) != HAL_OK)
    ;
measurement1 = HAL_ADC_GetValue(&hadc1);
HAL_ADC_Stop(&hadc1);

HAL_ADC_Start(&hadc2); // Start regular conversion of regular group (channel 4 and 5)
while(HAL_ADC_PollForConversion(&hadc2, 0) != HAL_OK)
    ;
measurement2 = HAL_ADC_GetValue(&hadc2);
measurement3 = HAL_ADC_GetValue(&hadc2);
HAL_ADC_Stop(&hadc2);

Schematic:

CubeMX:


texts:
I just started writing a program that represents the temperature of an NTC TT102 thermistor. First I tried the famous voltage divider, but I soon found that it is not good. So I decided to uses the NTC formula to get the temperature but it seems not to work. Since the formula results in float numbers, I tried such float variables but still no good results.
What do you think I should do?


texts: Calculating time spent by a function in Microcontroller Applications

texts:
I would like to write a simple profiler for my STM32F100VE microcontroller. I have seen that I can include time.h and based on the c standard functions I can use it, but I was confused about _CLOCKS_PER_SEC_ 1000. I'm not sure if that approach will work or not.

How would one try measure the time a function took in micro-controller application?


texts: Altium symbols/footprints for components with multiple physical parts

texts:
What is the best way to build/use Altium (or other software) parts that have multiple physical pieces. This could be multiple footprints that work as a set, it could be multiple MPNs that form an assembly of some sort etc.

Example 1:

In a new design I have to work with some Beckhoff PLC parts, for example this: https://www.beckhoff.com/EJ1819/

These are designed to be plugged onto a pin header on a PCB, with some coding holes around the header to prevent misconnection of different modules.
The simple way to deal with this would seem to be to have two parts. The pin header would be the schematic part with connections to it, and would use a dedicated footprint for 'pin header + coding holes'. The PLC module itself could then be a separate schematic part, with no connections, and a footprint that was just a step file which could be aligned to create the final 3D view of the assembly.

The same concept doesn't work as well however for the https://www.beckhoff.com/EJ1918/, which uses two pin headers.
I would like a single PCB footprint which would help keep things aligned, but on the BOM I will want 2x the header, with their own designation, so 2x SCH symbols.

Example 2:

IC sockets.

These aren't widely used nowadays, but if you wanted an eeprom/logic chip which was in a removable IC socket, the desire would be an EEPROM/multiple logic gate symbols on the schematic to make the design clearer. But the physical connectivity would be to a generic IC socket, and both parts would need BOM entries.

Example 3:

Displays with mating headers and possibly ribbon cables.

This is a use-case that I have solved before with the proposition in example 1. The PCB connector is the main part, and the display itself and any cables are added as schematic parts without connections/pins. They simply add BOM lines and put STEP files into the PCB.


texts: My book says that by varying Vgs the transconductance varies in a non linear fashion (this all happens in the "linear" or ohmic region of the FET) and it is constant in the saturation region.I just cannot get it!!


texts: Is it a good idea to connect a line buffer to ground?

texts:
Got a quick question.

I'm dealing with 74VHC125BQ,115 and I won't be using one of the line drivers; the rest are connected to UART. So, I'm wondering what I should do with the last one. Is it a good idea to ground its input or should I just leave it floating.

Appreciate the help


texts: Second Order LP function with three opamps

texts: Why is the node voltage at 1 \$s^2(tau)^2Vout \$?


texts: In a linear time invariant system, is it possible for a SS response to exist, when we have a bounded input?

texts:
The answers provided showed that it is possible. I don't understand why. I think since it said that the input signal is bounded, it means that the modes of the signal are within the unit circle, so the forced response will decay to 0. Since we dont have the forced response, there won't be a steady state. Where am I wrong here?

I read it on page 3.29 of this file . It said: "If all of the input signal poles are within the unit circle, then the forced response will decay towards zero as n → ∞."


texts: How to make a circuit to detect a cut cable properly

texts: I want to make my own alarm system,  I put a long cable from my alarm and a sensor, if the sensor's cable is cut, the circuit change it's logic state, and then I read it. But the problem is that the long cable has it's own resistance and other problem I have is the possible induction.


texts: How can a transfer function with only real poles show an overshoot in the step response?

texts:
I am trying to simulate the circuit below on SIMSCAPE, and its behavior is different in the simulation and in the real world. The simulation shows an overshoot, while the measurements I made do not - which makes sense since it only has real poles in its transfer function.

If it helps, the zeros are -4.5 and -3.7. The poles are in -39.1, -6.5 and -4.

Circuit used.

Simulation for said circuit.

Measured step response.


texts: How can I use my high impedance crystal radio headphones in regular nowadays appliances like mp3 players, cellphones and computers?

texts:
I have old crystal radio high impedance headphones, and I would like to be able to use them to listen to music on my music player as well as to use them on my PC.

What kind of circuit do I have to assemble to make it work with low power DC, if that is even possible?


texts: Difficulty in reading the registers using the I2C

texts:
It is necessary to obtain the values of angular velocity of the gyroscope module on "Amperka" board. But even to read the identifier register, returned incorrect answers. Already the day is spent and not have achieved even this, not to mention the angular ) I Use the HAL library. Here's my code:

    void Accel_Ini(void)
{
        uint16_t ctrl = 0x0000;
        HAL_Delay(500);
        if(Accel_ReadID()!=0x68) while(1);
        AccInit(ctrl);
}

uint8_t Accel_ReadID(void)
{
uint8_t ctrl = 0x00;
        ctrl = Accel_IO_Read(0x68,0x0F);
        return ctrl;
}

uint8_t Accel_IO_Read(uint16_t DeviceAddr, uint8_t RegisterAddr)
{
        return I2Cx_ReadData(DeviceAddr, RegisterAddr);
}

static uint8_t I2Cx_ReadData(uint16_t Addr, uint8_t Reg)
{

        HAL_StatusTypeDef status = HAL_OK;

        uint8_t value = 0;

        status = HAL_I2C_Mem_Read(&hi2c1, Addr, Reg, I2C_MEMADD_SIZE_8BIT, &value, 1, 0x10000);

        if(status != HAL_OK)
                    while(1);

        return value;

}

(gyro adress is 0x68)


texts: What is the purpose of the T-568 ethernet color code standard

texts:
A question came into mind. as i was crimping some ethernet cables at home.

I am talking about straight cable not crossover cables.

What is the true reason for the T-568A or T-568B color standard. Because just arranging the wire in sequence will work just fine as long as the wire is connected  on the same pin on the other end, arranging them in sequence will also give a cleaner crimp.

in the image ont T568A blue is sandwich between the orange ? why is that?

Is it to reduce noise ?

if so how will it affect on different category? cat 5, 5e, 6, 7, and 8


texts:
I want to power a prototyping kit for an 8 pin picaxe micro-controller with a 9v battery (the board itself requires a 5v input).

I have the following regulator:
https://www.sparkfun.com/products/107

On the 3rd page of the data sheet says that for that 5v regulator, the min voltage is 7 and the max voltage is 25 (input).

data-sheet:
https://www.sparkfun.com/datasheets/Components/LM7805.pdf

However, in the comments section of the first link,a few people said that it is not a good idea to use this regulator to reliably drop voltage from 9v to 5v.

Questions:
What do you think? Does that voltage regulator fit my expectations?

What would happen if I find that 5v battery and connect the 5v battery to the voltage regulator? What voltage would it output?

Thanks so much!


texts: How to solve cascaded transistors to get gain, Rin and Rout by hand analysis?

texts: I am having a problem calculating the requirements for this circuit, I can't figure out how to calculate the small signal model or the values of the resistances Rpi for both transistors.


texts:
I'm trying to make a semaphore using to LEDs green and red, controlled by one arduino pin. Idea is when pin is low red LED is on and green LED is off, when pin is up green LED is on and red LED is off.

So I've made the circuit using two transistors and in simulation software everything seems to be ok, but on practice red LED (right one on the picture) is still shining dimly when the green one (left one) is on.

On diagrams you can see there is still a small current through red LED, when the pin is in up state.

Is there any ideas how to deal with this current?


texts: So what exactly is a polygon island in altium and why is it generally considered bad? How can they be removed from the PCB?


texts: Can I connect multiple computers with PCIe?

texts:
I've got an crazy idea about obtaining some Computer on Module boards having PCIe connection. Putting them in PCIe network, not ethernet network.

Is it possible to connect multiple computers / CoMs together with PCIe (switch)? And some custom made drivers for transporting data.

edit: Will it go flawlessly without main computer/device that will control the network?


texts:
I'm a beginner with Arduino. I'm reading a book called Practical AVR Microcontrollers: Games, Gadgets, and Home Automation with the Microcontroller Used in the Arduino.

From the beginning, the book speaks about the AVR programmer. It says that the way to communicate and send code / compile code for the Arduino is by connecting your computer to the AVR programmer and then the AVR programmer to the Arduino.

The book is several years old so maybe things have changed. Do I need to have this extra component called the AVR programmer?


texts: Can't calibrate an analogue voltmeter: Is this normal?

texts:
I've just obtained a ALCRON ACROMETER 60 DC 30 V / 3 A panelmeter and have some problems calibrating it.

I plan to use it in a home-made bench power supply and the supply's range is 2.75 V to 35 V. The meter has a zero centering screw and using it I managed to set the meter to precisely display the voltage (compared to my other two digital multimeters, which show the voltage to be within 30 mV from each other). This works fine until I set the power supply voltage to around 28 V. At that point, as the panelmeter nears the edge of its range, it starts to show lower voltage. Once the meter reaches end of its scale at 30 V, my multimeters show voltage to be 31 V. If I set it to correctly show 30 V, it shows incorrect value at lower voltages.

Since this is my fist time working with analogue voltmeters, my question is: Is such behavior normal and expected?

The most obvious answer would be to check the manufacturer's web site for datasheets but I was unable to find the site. The only interesting thing written on the box (if my German is good) says that the meter is pre-wired for two 6 V lightbulbs.