texts:
I am relatively new with Arduino and did a little bit of research prior to this post. But I am trying to sense when I have voltage coming from an AC/DC converter (12Vdc) so I can switch from my battery to my AC/DC converter. I am using an interrupt on my Arduino Mega to efficiently switch between power sources. I tried just using a voltage divider and reading 5 volts into my digital pin, but it seems that the pin is "floating" regardless of power being supplied or not, and not correctly sensing the voltage coming from my AC/DC converter. Is there a way for me to incorporate capacitors or some other circuit to correctly sense voltage with a voltage divider? Any help is appreciated.

simulate this circuit – Schematic created using CircuitLab


texts: Is it possible to redirect print streams to debugger in Atmel system?

texts:
Is it possible to configure stderr and/or stdout to make it such that when a printf() is called the string is displayed in the debug console in Atmel Studio?

I do know that it is possible to set everything up so that printf() uses the UART or an LCD or something else.

I have seen hints of this having been possible with AVR32 chips and JTAGICE2 debuggers, but that was back when it was AVR studio and AVR32 Studio as separate IDE's, toolchains, debugging hardware, etc. For the sake of specificity, I would like to do this with an AVR 8-bit chip and an ATMEL ICE (the successor to the JTAGICE3) debugger. I am working with PDI, but an alternative communication protocol (such as JTAG) would be acceptable also.


texts: Getting lower output voltage than expected in 5 level inverter

texts:
I am making a 5 level inverter using an Arduino Mega. I am using an IRFZ44N MOSFET for switching and also an MCT2E as a MOSFET driver.
The problem I am facing is that I am a getting a lower output voltage than expected: the actual output should be 24V, but I am getting 12 - 13V as output.
Can anyone help me out with this problem?
This is the schematic:

This is the code I am using:
float f = 50;
float t = (1 / f) * 1000000;
float a1 = 10;
float a2 = 40;
float a1p1 = (a1 * t) / 360;
float a1p2 = (a2 * t) / 360;
float d = 5;

int pin1 = 1;
int pin2 = 2;
int pin3 = 3;
int pin4 = 4;
int pin5 = 5;
int pin6 = 6;
int pin7 = 7;
int pin8 = 8;

void setup() {
  pinMode(pin1, OUTPUT);
  pinMode(pin2, OUTPUT);
  pinMode(pin3, OUTPUT);
  pinMode(pin4, OUTPUT);
  pinMode(pin5, OUTPUT);
  pinMode(pin6, OUTPUT);
  pinMode(pin7, OUTPUT);
  pinMode(pin8, OUTPUT);
}

void loop() {
  digitalWrite(pin1, HIGH);
  digitalWrite(pin2, HIGH);
  digitalWrite(pin5, HIGH);
  digitalWrite(pin6, HIGH);
  delayMicroseconds(a1p1 - d);

  digitalWrite(pin2, LOW);
  delayMicroseconds(d);
  digitalWrite(pin4, HIGH);
  delayMicroseconds(a1p2 - a1p1 - d);

  digitalWrite(pin6, LOW);
  delayMicroseconds(d);
  digitalWrite(pin8, HIGH);
  delayMicroseconds(t / 2 - (2 * a1p2) - d);

  digitalWrite(pin5, LOW);
  delayMicroseconds(d);
  digitalWrite(pin7, HIGH);
  delayMicroseconds(a1p2 - a1p1 - d);

  digitalWrite(pin1, LOW);
  delayMicroseconds(d);
  digitalWrite(pin3, HIGH);
  delayMicroseconds((2 * a1p1) - d);

  digitalWrite(pin4, LOW);
  delayMicroseconds(d);
  digitalWrite(pin2, HIGH);
  delayMicroseconds(a1p2 - a1p1 - d);

  digitalWrite(pin8, LOW);
  delayMicroseconds(d);
  digitalWrite(pin6, HIGH);
  delayMicroseconds(t / 2 - (2 * a1p2) - d);

  digitalWrite(pin7, LOW);
  delayMicroseconds(d);
  digitalWrite(pin5, HIGH);
  delayMicroseconds(a1p2 - a1p1 - d);

  digitalWrite(pin3, LOW);
  delayMicroseconds(d);
  digitalWrite(pin1, HIGH);
  delayMicroseconds(a1p1);
}
```


texts: Ringing issue in high-side IGBT connected transmission line

texts:
I am trying to charge a transmission line (Z0=4.4 ohms, propagation delay=1.4 ns) by a HV (1-1000 V, 600 mA) power supply through a 1700 V rated IGBT (S1). The charged transmission line gets discharged through a photo conductive switch (S2) to a 4.4 ohm resistive load. There is another identical transmission line between the load and S2. The IGBT is triggered by ISO5852s based gate driver evaluation board. The timing signal for S1 and S2 is provided by an external pulse delay generator. The simplified circuit diagram and the timing diagram for S1 and S2 are shown in the figure below.

When I probe the transmission line placed before S2 after S2 is triggered off (after 150.5 us), I am getting a huge oscillation which is bigger than the HV charging voltage (50 V) although S1 (IGBT) and S2 is off at that time. As a result of that, the transmission line is being charged again although it should be isolated from the power supply at that time as S1 and S2 are off at that time. I am also getting oscillation across the transmission line after S2 (ideally I should get voltage output only for the period S2 is on and a little bit time after that). I am wondering what is the source of these oscillations. The wire that is connecting the collector terminal to the HV supply is about 100 cm long connecting wire. Is it a reason of this oscillation? However, if I remove the IGBT (S1) and charge the transmission line directly, I do not see such high ringing after S2 is triggered off.

Any helpful suggestion will be appreciated. I am also attaching the oscilloscope output here (yellow color-voltage across transmission lien, blue color-voltage after S2).


texts:
I plan to buy an mbed module to get started with NXP LPC17XX. Developing and downloading code seem the easiest possible. What are my options for in-system programming this code in non-mbed devices? I understand the bootloader only requires a UART connection to my host PC.
What tools are available for Windows PCs? Can they directly work with the object code I created on the mbed site?
Can I use code for the LPC1759 directly on other LPC17XX devices?


texts:
for the past couple of months I have been developing software for a custom build board. Due to a non disclosure agreement i am not allowed to share the schematics , PCB layout or software of the board.

What i am allowed to share is that the board uses a Murata cmwx1zzabz module as proccesor and for lora communication. The proccesor in this module is a Stm32l0 which i was able to program for the past couple of months.

As i had a problem with the stability of the program (chrashed randomly after sometimes running perfectly for a couple of hours) i decided to let 3 of my 5 prototype boards run a program in a mode that uses one paticular sensor which seemed to cause problems. As a refference i picked another prototype board and let it run the same software version as the other three prototypes but in a different mode.

The idea was to let the code run on the four prototypes and let it run the whole weekend as a stability check. The last prototype board i wanted to use for an energy consumption test. I loaded the same software as the other boards onto the board and did some measurements.

It was a terrible idea to let all of my prototypes run the same software because keil uvision 5 cant program any of the boards anymore. I get this error:

What i have tried to solve the problem is:

use a different ST-link
use different cables
pulled the boot0 pin to '1' and tried to program it (normally pulled down)
tried to load the program onto a Discovery board (It seems to work but i did stop the programming halfway through the procces because i am afraid to brick the disco board too)
Created a "fresh" CubeMX project and tried to load the program on to the prototypes without succes

Does anyone know a way to do a factory reset or has a sollution for this problem? My internship is almost finished and i dont really have the time to wait +- 4 weeks to wait on new prototypes.

On the plus side the boards are still running but have some inconsistent readings. The only change i made to this version of the software and an older variant was to change return uwTick; to return HW_RTC_GetTimerValue(); in the HAL_gettick() function.

some additional info of when i connect the stlink in my PC with the prototye connected.


texts: How to solder a 70 °C (158 °F) thermal / temperature fuse

texts:
For my DMX project (schematics is not important), I soldered this temperature fuse which has just two leads (see picture below).

The fuse doesn't work (meaning it does not conduct electricity) ... which of course is logical since my soldering station has a minimum temperature of 200 °C (392 °F) (although I soldered it with 350 °C (662 °F), forgetting about this).

But how should I solder this component?


texts: Is there a relay that disconnects BOTH positive and ground wires?

texts:
My latest time-lapse camera rig, was failing to run due to the constant ground connection on the camera power input.

This is an off-grid, solar-powered rig, combining a Raspberry Pi and an Arduino, to share tasks using a minimum of energy.

As a novice in electronics I felt I was making progress, having used GPIO controlled relays to break the positive wire connection on several of my rigs.

However, in this rig, I use two different methods to take the pictures:

1/ An in-camera script (C.H.D.K. Canon Hackers Development Kit) which takes a picture automatically, on power up of the camera by the Arduino,

2/ A PTP connection to the camera's USB port when the Raspberry Pi is active and supplying the power to the camera as well.

Due to the ground wire of the Raspberry Pi remaining connected to the Camera power input, I found that my on-board script failed, due to it falsely detecting a USB connection.  On disconnection of the ground wire, the script works as intended.

I imagined this need for 'double disconnection' ie. of both the positive AND negative wires, would be a common issue in electronics and that there would be a relay component ready made for the job but Google doesn't turn one up.

I suspect I simply just don't know the right name for the task, among the many versions of relays out there.

Please advise, or, if there's another approach in circumstances like mine, I'd love to hear it.  it seems wasteful to be using a two channel relay to operate a single power switch. ie. one channel for the positive wire and one for the ground.
I hope I explained myself well enough. If not, I apologize and will correct as best I can
Thanks in advance


texts: BT138+MOC3063. How to calculate resistor power?

texts:
I want to use this schematic to control AC with maximum current of 10A

The only thing I don't understand is how calculate power of resistors (marked red)?
There are lots of such schematics on web, but nobody explains how to chose resistors.


texts: Have trouble designing antenna coil for chip receiver

texts:
I'm trying to wind a 125khz rectangle coil antenna for the AS3933 receiver chip. I calculated inductance using this calculator where parameters were:

Loop Width:20cm
Loop Height:14.5cm
Wire Diameter:0.51mm
Number of Turns:31
Air Permeability:1 since I was using an empty wooden box to wrap my wire around.

With those parameters I got inductance of 758uH.

Then to tune coil for 125khz, I calculated capacitor value using this calculator, and arrived value of 2200pf.
So I started wrapping my gauge AWG24 wire around empty wooden box 31 times and then connected two ends of the wire in parallel with 2200pf capacitor on the breadboard. Then I connected AS3933's antenna pin LFP1 and antenna ground pin LFN to the breadboard to test functionality.

After connecting everything I tried running this code:

Serial.begin(9600);

Serial.println("test1: Checking AS3933 functionality");

if(!asTag.begin(125000))

{

Serial.println("Communication with AS3933 fails.");

return;

}

unsigned long ant1freqOsc= asTag.antennaTuning(1);

if(ant1freqOsc<124000 || ant1freqOsc>126000)

{

Serial.println("Calibration for antenna 1 fails");

return;

}

Time after time I got 'Calibration for antenna 1 fails error', as AS3933 can't seem to recognize my antenna coil. Does anyone have possible suggestions on where the problem is?

Is it because the AWG24 wire doesn't connect to breadboard?

Maybe it’s my antenna form.  How close should layers be to one another? Or maybe it is because antenna isn't exactly 125kHz, it's somewhere around 123kHz but it's in the ball park and AS3933 supports that frequency as well, so I'm a little confused. Anyways, all suggestions are welcome.


texts: Disadvantages of building own components (such as SR latch)?

texts:
So I browsed Digikey for way too long today looking for an SR latch.  I wanted something low power that would use very low quiescent current for a varied range of VCC and work for between 2-5 volts VCC. After a while I realized that I could just wire two NOR gates together and get exactly what I needed.  Thinking back on it, for some reason I almost never take this route and I wasn't sure why.

SO my question for you is, in general is there a reason to use prepackaged parts when available to avoid building from scratch? As opposed to building from more fundamental parts like resistors, capacitors, AND/OR gates, etc.


texts: Calculating drift/precision on a temperature circuit

texts:
I'm hoping to get some guidance with a circuit I designed. I have a current source which operates between 200uA and 400uA. In order to measure it, I used the following circuit before feeding it into an ADC.

Vadc = 5*(5*(i*500)-0.5V)

I've built a number of these circuits and all of them appear to be within 1 degree at room temperature. Now after designing the circuit, I was asked to calculate the drift over 100C and to evaluate the precision of the circuit to see if I could accurately report temperatures at 0.1C with calibration. For the drift, the data sheet calls out the following values:

500, 2K resistors, 5ppm/C *100C * 100% = 0.05% = RL% drift
Dif Amp: INA2331A: 2ppm/C *100C * 100% = 0.02% = G1/G2% drift
2.5V Ref: REF1925A: 25ppm/C *100C * 100% = 0.225% = Vref% drift

Now for the 2K/500 ohm resistor divider, since they have the same 5ppm, I think I can ignore that drift. Therefore I'd get the following equation:

((RL% *Gain1) +G1% + Vref%/5)*Gain2 +G2% = total drift

((0.05% *5)+0.02% + 0.225%/5)*5 + 0.02% = 1.595%

Is that accurate in how I would do that calculation?


texts:
Not sure if this is the right community - please tell me if it isn't.
I have a connector (see image below) to contact pads of a sample and connected them to a multiplexer. I want to replicate it.

Howver the new samples I need to contact have a different pad distances with pitch new =0.83mm vs pitch old = 0.80. Therefore I want to make a new connector with:

d1 = 1.66 mm
d2=  3.00 mm

To make it, i think i need:

Crimped wires on one side - on the otehr soldered to the loaded tips
Spring loaded tips
wire housing
the crimped end of the wires  end into this structure (see image below) -  What is the name of this thing to buy it?

What is the name of the thing the crimped wires are ending in (so i can buy it)
Is there companies/ services that make spring tip connections with set distance, or something similar?
What materials are missing form this list, if I wanted to make it?
What improvements could be made to the design to make it easier?


texts: Some questions about a magnetically coupled circuit

texts:
Below the RLC circuit on the left side by the help of a periodic impulse generator V1 generates periodic damped oscillations with a certain frequency, and the resulting oscillating current couples to the circuit on the right side via the magnetic field. The circuit on the right side is exactly the same with the one on the left(just that it has no source). Here I also set the coupling coefficient as 1. So I(R1) and I(R2) is exactly the same as follow:

case 1

Now I change only the capacitance of the capacitor C2 from 10µ to 1000µ and both circuits are affected radically and they pass the same currents as follows:

case 2

Finally from the last configuration I reduce the coupling coefficient significantly from 1 to 0.01 and the circuit on the left is not anymore affected from the one on the right side, but the current in the right circuit still follows the same wave shape with the current in the left circuit as follows:

case3

Question:

1)If SPICE is correct, in case1 even though there is strong coupling, the natural frequency waveform of both circuits remain the same. In case2 however there is again strong coupling, but this time the waveform of both circuits radically changed. How can this be explained?

2)In case3 when the coupling is very loose, why does I(R2) replicate I(R1) even though the circuit on the right side has different natural frequency?


texts: recharging zinc-carbon batteries? (if an "AA R6P" is a zinc-carbon anyway)

texts:
Opened up one bike light from china that charges via a USB port (5V, .5A) and inside, the rechargeable battery is a barely labeled "R6P AA size 1.5vols 0% mercury". besides that only engrish, brands and a warning "Do not dispose in fire, re-charge, put in backwards..."

I couldn't find anything from the R6P type, only alibaba.com (china wholesale ebay) sales. So i'm assuming it's an zinc-carbon AA-R6 for now.

If so, i used the bike light for almost a year with that battery inside it (not serviceable) recharging every week or so. what's the magic?

the control board has some ICs with black epoxy, i'm in the process of scrapping it.


texts: Laptop adapter + DC buck/boost converter or buck convereter only?

texts:
I have an old laptop adapter, with 19 V - 4.74 A DC output ratings. Suppose I need to draw 3 A @ 11.1 V for one of my circuits. I have been doing some research about dc-dc converters and have some questions on my mind.

As far as I understood, I will either buy a dc-dc step down(buck) converter and let it convert 19 V to 11.1 V. Then it will do the job(right?).

However, another option is to buy a more sophisticated one, like this one. (I think giving a link to product will be easier than explain it.)

Now, I read that these buck+boost converters are working with the principle of boosting any input voltage to high DC and then lowering it to the desired(set by user) DC voltage.

My question is, if I plan to draw 3-4 Amps constantly, will this boosting/bucking(?) be too inefficient? I mean, would using a single buck converter be more suitable for such operation? Or there will not be any difference?

Thanks.


texts:
What is bit-true implementation (with an example if possible)?

I was reading a paper and it was stated "a bit-true implementation of the algorithm on a FPGA was performed." So what exactly is bit-true implementation and how is it implemented on FPGA?


texts:
I've taken apart a peltier cooling box to salvage the peltier element and also found this thing. The block seems to be plain aluminum, I'm interested in the cylindrical thing at the bottom.

The peltier element was placed on top of the block, the inside of the fridge was below. The heat shrink on the left of the block is just isolation, there is no wire going in or out.


texts:
With a 2N3905 PNP Transistor, with base (input) and collector (output) resistances of \$R_b=1k\Omega\$ and \$R_c=200\Omega\$ (Load to Ground), connected to \$VCC=5V\$ and \$GND\$ respectively, I got \$I_b=7.5mA\$, \$I_c=46.6mA\$,  \$V_{eb}=0.91V\$ and \$V_{bc}=0.75V\$ (edit. Rechecking the circuit I have \$I_b=4.2mA\$, \$I_c=24.5mA\$,  \$V_{eb}=0.85V\$ and \$V_{bc}=-0.76V\$)

Hence, by switching base from \$0\$ to \$5V\$ I obtain \$0\$ to \$4.85V\$ (edit. \$0\$ to \$4.91V\$).

Is there a BJT or other transistor circuit for a better switching, closer to \$0\$ to \$5V\$, keeping the \$200\Omega\$ as load?


texts: Relay stays triggered (latched) with 2 sec interval, 50% duty cycle signal

texts: While building a home automation system, I triggered my 5V relay through the Arduino (running the blink code, 1 second ON 1 second OFF), however my relay stays in the triggered state. Due to which the light stays ON. I don't understand this behavior. After I disconnect the AC connections, a minute later the relay starts behaving the normal way. Are the relays faulty? Is there something causing the latch?


texts:
Is my calculation correct?

I want to tranform 240Vac output of 5Vdc after voltage regulator.

The transformer I am interested in is VB 2,0/1/6: https://docs-emea.rs-online.com/webdocs/0f46/0900766b80f46e48.pdf

I decided to use NCP1117DT50G: https://uk.rs-online.com/web/p/products/5165871/

Now my calculations:

6 * 1.414 = 8.484 VacRMS
No load factor 8.484 * 1.64 = 13.91
After rectifier 13.91 - 1.4 = 12.51 Vdc

Minimum voltage for 5v is 6.5V

This means if my circuit current is 300mA the power loss would be P = (12.51 - 6.5) * 0.3 = 1.8W.

Is this correct? It seems crazy how a 6V transformer can turn double with Vdc and have a high power loss into a lot of heat.


texts:
I want to generate a pulse in Matlab Simulink fixed point solver.

The step size in the Simulink fixed solver is 1e-06, but I need a pulse width of 2e-08.

The figure shows the clear requirement of the required pulse.

The problem I am facing is that the computed sample time of the pulse is not an integer multiple of the step size. I am looking for an alternative idea for creating the pulse in fixed point solver.

If any one has any idea of creating the pulse, please share them.


texts: Is it possible to remap/change the pins of an IC?

texts:
I was wondering if it would be possible to change the a pin of a microcontroller to another pin. Does it depend on the chip or is it generally (im)possible? Specifically, I'm interested in Ethernet Chips (e.g. DP83848 or lan8720) and changing the rx to the tx pin and vice versa.
In case it is possible can it be done via software or do you need direct access to the hardware?
Datasheets of the chips:

DP83848 http://www.farnell.com/datasheets/1668041.pdf

LAN8720 https://media.digikey.com/pdf/Data%20Sheets/SMSC/LAN8720.pdf


texts: Connecting a USB to UART converter to a computer's serial DB9 port

texts:
I have an APU2 that diverts any 'display' over a serial console (DB9F). For accessing the serial console, a null modem cable is recommended where the wires are crossed over. However, my computer does not have a DB9 port but I do have a FT232RL based USB to UART converter. Would the wires crossover apply for the FT232 module as well? For e.g., would the RX of the FT232 go to the TX of the APU2 serial port, DSR to DTR and so on?

Edit: just looked at the board again and it uses the MAX3243 for its serial comms. This appears to be a 3/5V chip.


texts:
I am trying to design a simple processor (in VHDL) that takes in its input a real number coded in the fixed point representation in 2's complement (10 bits for the integer part, and 6 for the fractional part), and outputs its IEEE 754 single-precision format equivalent:

I have been searching for a while now, and still couldn't find any resources on this type of conversion, at least some flow chart from which I could start.


texts: Difference between a Kalman filter and a linear quadratic regulator?

texts: May someone, in simple terms, describe to me the difference between a Kalman filter and a linear quadratic regulator? If possible, please use an analogy or maybe even a visual demonstration of the difference. Also, some basic mathematical descriptions would also be helpful...thank you.


texts:
im my company there is a gate, which can be open with standard RFID card like this

is there any why to replace it with external pilot ? How to do it ?

EDIT:
How do I understand it: when I close my card to the gate, card emits some magnetic field. Is that possibile to measure parameters of that wave, and build the pilot which would send the same wave to the gate but from extendet (2 meters) distance ?


texts:
i want to test my output current of transistor 2N3906. I have two questions.

Is my setup valid to measure the max load of the (2N3906) transistor? One plug of multimeter is on leftmost pin of PNP transistor, the other to rightmost ping of 47R (R2). I count only 13mA when transistor works and 6mA (!) when it is NOT working (extra question: why?). I expected more than 25mA during active transistor since I already operate a device at 25-35mA!

So the transistor is capable of 13mA only? (base with 9mA aka: 3.3V > 330R)

Sorry, third question. According to spec (Hfe Ic=10mAdc Vce=1V =>> 100), I was expecting 100mA with 9mA to base.

Thank you, and excuse basic questions :)
UPDATE: it should be obvious I have installed transistor the wrong way (Collector on emitter - Thanks Passerby!)


texts: How is the current through this resistor not obeying ohm's law?

texts:
In this video, https://www.youtube.com/watch?v=ks_VShSgPns, a 220 ohm resistor is connected across a 5V DC source (the source happens to be oscillating between 0V and 5V but that's besides the point).
I would think that, by ohm's law, the current through the resistor is I = V/R = 5/220 = 22.7mA, and I'm sure this would indeed be the case with an ideal voltage source (I think he demonstrates it at some point in the video).
However the point in this video is to illustrate that the voltage provided across the black and yellow wires cannot push enough current and is a "bad source", and so when measuring the actual current at 0:58 in the video, the reading is only 0.29mA.
This reading clearly does not obey ohms law, as the resistor would technically have a value of around 17k ohms in this case.
My question is, what is exactly happening here? Is the resistor simply not being "put to test" because the source cannot push current in the first place? Or why is ohm's law not being obeyed?


texts: Used different ports of microcontroller for LCD data pins

texts:
I have used different ports for data pins of LCD, RD11 and RD0 pins for DB4 and DB5 and RC14 nad RC13 for DB6 and DB7 . I am using DSPIC30F5011. I have incorporated this on design and manufactured PCB.
I am using 4 bit mode for LCD Read/Write

What might be the solution for this ?

Issue with the design:
My software team feels that if the data pins are on different ports, the code will be increased and latency between reading and writing increases


texts:
I am learning about circuits and I have some questions regarding circuit

initial condition:
- no initial energy stored before switch is closed
- there is current at L1 at t = 0-

I am wondering:

at time t= 0+ what is will be the value of Vc? is it 0V or Vs?
If it is 0V, why? Because it will not satisfy the KVL eqn when switch is closed.
If it is Vs, why so? I understand that Voltage at L can change instatenously but not voltage at C and R. that means at t=0+, should not the VR, C1 and VR2= 0 V? but again this will violates KVL law.


texts: IRF3205 MOSFET gate threshold voltage higher than expected

texts:
I have been trying to drive a 12 V LED array with an IRF3205 MOSFET.
I wanted to do this:

simulate this circuit – Schematic created using CircuitLab

However, when I tested it, the LED was only being given 6 V and the MOSFET was dropping 10 V across the drain and source. Going through the things that could be wrong, I found that giving the gate 5 V causes the problem to be solved, and the LED gets the full voltage of the 12 V power supply. The LEDs draw about 100 mA when they are being driven correctly in this way.

I looked up the datasheet, and saw that the gate threshold voltage is 2-4 V, meaning that this should work fine with the 3.3 V Raspberry Pi GPIO.

What is going on, and is there a way I could drive this chip with a 3.3 V Raspberry Pi GPIO pin?


texts: Ferrite Choke wiring, understanding the datasheet and how it affects the signal

texts:
I've been tasked with digitising an old analogue product for my company. I'm attempting to reverse engineer the analogue circuitry with no documentation (it was designed by an outside consultancy 30 years ago, the company only has gerber files). My experience is mostly embedded programming/digital systems so I'm by no means an analogue expert.
The circuit produces a high power square pulse to an antenna (coil of wire with a handful of turns), but the transmit circuitry and the antenna and the antenna and the ground are separated by a ferrite choke. I've been told that the product failed some kind of certification back in the day, possibly EMI testing and adding the choke allowed it to pass. Now I can observe that with the choke replaced with a short circuit that the signal is indeed much noiser, so the choke helps to attenuate background noise. The other issue however, is that the shape of the waveform transmitted to the antenna looks different.
This is not an exact comparison but the shapes are extremely similar, if the magnitudes were the same. Purple is with the choke (expected) and blue is without the choke. The purple looks "more square" and it looks like maybe the RLC that is added with the choke was taken into account with the design?

The ferrite core:
https://www.digikey.com/product-detail/en/laird-signal-integrity-products/28B0625-100/240-2115-ND/571923
How its wired:

My questions:

What type of choke is this?
Why is it wired this way?
Is it possible to find a surface mount equivalent?
What can I look at to research this problem, e.g. keywords for google?
Although the choke reduces background noise it also enhances the signal to the coil, any broad guesses as to why this may be or experiments that I can try?

Any help with any of this would be appreciated.
Thanks
As an addendum, there are three wires: 1 goes to the transmitter, 1 goes to the receiver, 1 goes to the grounds that the anntennas share. Both antennas are separated from the circuit through this choke. The schematic shows the choke "FILT-B" twice but it is just indicating a connection from the same choke.
Transmit circuit, receives pulses from a 555 timer to a voltage shifter to a push-pull to a FET for power switching. Labels 5 and 6 go to the transmitter, all other connections are open circuit

Receive circuit, second antenna connection is labelled 4. There is some damping configuration and clipping diodes. It then goes to an op amp for filtering and amplification purposes.


texts:
I have a power-hungry 74ls digital logic project that I want to connect a USB-connected Arduino Nano to, but I'm not sure how design the interface between them safely.

The project has an external 5V power supply (a USB wall-socket power adapter,) and I'm concerned about what may happen if USB power is supplied to the Nano without the project's power supply turned on. I'm much less concerned about the Nano getting fried (which probably has all kinds of protection circuitry) than I am about my (poorly-designed) project, which is composed of ~50 chips.

The Nano needs to drive a 74ls245 (bus transceiver, including its direction and enable pins), the inputs of a 74ls173 (4-Bit D-Type Register), and an input of a 74ls04 (inverter). The Nano needs to accept input from the bus transceiver and 2 TTL-compatible CMOS EEPROM output pins.

My first thought was to connect the project's ground to the Nano's ground, but leave the Nano's 5V and VIN pins disconnected. However, the Nano will be outputting digital high to the unpowered chips above, and I'm concerned that that may damage the chips, and/or cause those chips to malfunction and damage the 50 other chips they are connected to.

If I connect the project's +5V to the Nano's VIN, I imagine that the Nano would be safe when the project is powered and the Nano's USB not plugged in.

How can I keep my project safe when the Nano's USB is plugged in but the project's power supply is off?

I have everything wired up, but am terrified of powering it up.


texts: Driving a Turntable with a Two-Phase, Bipolar Stepper

texts:
I'm a relative newbie to electronics, and as an educational project I'm building a record turntable. I'm comfortable with the purely mechanical aspects of the project, but I need some help understanding how to drive the motor.

I have a two-phase, bipolar stepper-motor that I'm trying to use to drive the platter via a belt. The platter will turn once for every six turns of a wheel driven by the stepper. Using a stepper-motor controller in micro-stepped (1/8th-step) mode provides great torque and speed control, but makes the motor much too noisy for this application since the tone arm on a turntable is very sensitive to vibrations.

If the accounts I've read are accurate, a motor like this one can be driven smoothly by applying a voltage sine wave on the first winding, and simultaneously applying a second voltage sine wave (offset 90 degrees) on the second winding. What is the best way to do that? I have found circuit diagrams for op-amp based sine generators which have a synchronized cosine output. Is the task as simple as using a pair of op-amps to amplify the generated signals and then using the amplified signals to drive the motor, or am I missing something that would prevent that idea from working? Is this whole scheme crazy for a reason I don't yet understand?

Thanks for any help you can provide.


texts: what is current path in 6 winding transformer

texts: The 6 winding transformer which i shown in figure is a 1:1:1:1:1:1 transformer.It is a schematic of wurth electronics flex transformer. If I apply voltage at one winding of primary what is the current path in secondary? and what is the applications of this type of 6 winding and equal ratio transformers?


texts: Unidirectional vs Bidirectional TVS diode for ESD protection UART bus

texts:
On my board comes a UART line with a voltage of 3.3V. To safely communicate with the controller on 5V, I use a level offset based on BSS138 transistors. My goal is reliable ESD protection of the UART line from the 3.3V side.

For this, I want to connect RX_L and TX_L to ground using TVS diodes of low capacitance.
The problem arose in the choice between unidirectional and bidirectional diodes. Doubts arose because I learned that the ESD voltage can be of different polarity, in some case a bipolar TVS could miss a pulse of reverse polarity and cause damage to the device. Tell me, is that so? What type is used for UART lines?


texts: Is it safe to frequently restart an ATX power supply

texts:
I'm powering five Arduinos and four LED strips (600 LEDs total) from an ATX power supply (CoolerMaster B2 Series 700W). Four Arduinos drive the four LED strips, and the fifth Arduino periodically cycles the power supply to keep the LED strip animations in sync.

The restart interval is approximately 2 minutes and will be running for about three hours per night over December (i.e. around 2700 restarts for the month).

Is it safe to be cycling the power supply this frequently? I'm a bit uneasy about leaving this to run whilst I'm not at home. I imagine my alternative would be to use relays or MOSFETs to cycle the Arduinos.


texts: Driving LM3886 at 100 KHZ in Bridge Tied Load (BTL) configuration?

texts:
Would someone have experience with driving a pair of LM3886 Overture Power Amplifiers in BTL with up to 100 KHz sine wave?

My parameters:

Frequency band of interest: 20KHz to 100 KHz, sine wave
Load is pure capacitive, 10-20 Ohm, 5000 pF
Power delivery to load: Up to 50 watts RMS
Amplifier Configuration: Bridge Tied Load
THD / noise, even up to 5%, not a concern
Power: Unregulated +/-35 Volts 5+5 Amperes, 10000 uF reservoir capacitor on each rail

Found a useful whitepaper on BTL with LM3886. However, the operating band for this paper is 20Hz-20KHz.

Starting with the schematic from here:

Of course, input / output / feedback part values shown would need to change for my frequency band of interest, but my analog-fu is a bit rusty circa 1988, so some brushing up to be done.

My questions:

Will this work at all? (I don't see why not, but found no useful information found)
Any suggestion on a different single-chip power amp to use instead?
What is the gain I should design for?

More immediate interest: What input Vpp range is needed?

What do I need to take care of in terms of feedback / compensation and stability management

Info found so far is for audio frequency range, little mention of high frequencies
Found a discussion about oscillation at high frequencies (50KHz+) due to electrolytic caps.
No info found about driving capacitive load, as audio = inductive loads, typically.
How do I get an essentially flat response for 20-100 KHz?

For the power supply:

Recommendations between single and dual bridge
Is the 5 + 5 ampere calculation good, with reasonable headroom?
Is there a switching power supply alternative that might save cost / reduce heat?

Anything else critical to address even at experimental stage (One-off DIY, isn't going to production)

Any other inputs / help / advice gratefully accepted!


texts: Using a voltage divider versus step-down voltage regulator for i2c pull-up

texts:
I have a device (NXQ1TXH5) that I want to run at 5V. I am also interfacing this device with a Raspberry Pi4 for i2c communication. This raspberry pi 4 is going to be the master in my i2c network. This runs at 3v3.
As the title says, I want to pull up SDA/SCL to 3V3, as required by the datasheet (although the device can take up to 5v, the SDA/SCL only works with 3v3 (maximum 3.6V)).
Datasheet mentioning 3v3

I could use a voltage regulator to step down from 5V to 3v3.t would require some filtering capacitor and more complex assembly
The second option is a voltage divider. Would a voltage divider do the trick here, given that the 5V source will be constant? (it's cheaper, although it might be less efficient)
If yes, what values?


texts:
I have used this circuit from the TLV431 datasheet and replaced the values according to what I need which is 2.48V. This output will be directed to an op-amp as a reference. My problem is I can't stabilize the output to 2.48V. It is increasing overtime to 2.49 to 2.5V with or without the load capacitor. The resistors used are 1% and my source voltage is 5V. I also tried different values for load caps like 10uF but the same increasing output. What could be the problem?

--------------------------------UPDATE--------------------------------

I have changed my schematic to allow adjustments. thanks for all the help on my first schematic. Below is my new circuit. My values for R1 must be 1.492K and R2 must be 1.5K. I used series resistors to get the 1.4K and the pot(paralleled with a resistor) to get the 92R. Am i doing it right? Are my values now satisfies the current needs of my shunt? Based on my testing, this circuit now gives me a stable output but at some time, it randomly oscillates and then stabilize again. I dont know why that happens.


texts: Change state hardware interrupt handled by micro-controllers

texts:
How are external interrupts handled by microcontrollers?

My question is general to micro-controllers, but if it is architecture specific, leans to ARM- based micro-controllers.

Assuming we have 2 interrupt pins PIN1 and PIN2 set to interrupt when the pin state change. At start both of them are in low state, PIN1 is then interrupted as the signal pulls high. In software the uC is still processing data although the data is very small due to coincidence PIN2 pulls HIGH which in most will be missed since there is still an interrupt being processed.

Now when the interrupt on PIN1 exits will PIN2 immediately trigger another interrupt since its state changed?

EDIT:

since the question is much broader than expected i have chosen a micro - controller for the sake of the question. The micro - controller is: AT91SAM3X8E the one used in arduino due. And will be programmed using the ARDUINO IDE. I have project that uses this chip and knowledge on its interrupt might come in handy.

I have always thought there will be a standardized way.


texts:
I'm hoping someone can verify an answer I have found for the following problem:

A helmholtz coil consists of two identical circular wire loops placed coaxially. If each loop has radius a and carries current I, and the loops are seperated by distance h, find B at a point on the axis halfway between the loops.

The solution I have obtained is as follows:


texts: Can power outlet be taken as a current source?

texts: Consider a situation where I have a power outlet and I am completely unaware of the internal circuits and the fact that the electricity comes from an ac voltage source supplied by some company. I just want to know whether I can take the power outlet as a current source for my device rather than an ac voltage source. In short, what is the property of the power outlet as a black box? I am taking a course in electronics and the difference between a current source and a voltage source is unclear to me.


texts: Simple (probably) question about ADC sampling frequency

texts:
I want to sample a signal at 44kHz.
I've tried to set up the ADC with DMA and calculated the conversion time so that I get that 44kHz sampling frequency.
My thinking is that with continuous mode ADC, after each ADC conversion immediately the next one starts, so by choosing the conversion time I get my 44kHz = (1/conv_time).
Turns out this didn't work, I got much fewer samples than expected.
Only when I set up the ADC triggered by a timer I got my correct 44kHz frequency.
Can anyone explain to me where is my thinking wrong with the first attempt (without timer)?
(I'm using STM32L432KC MCU)
Straight from the reference manual:
The total conversion time is calculated as follows:
TCONV = Sampling time + 12.5 ADC clock cycles
Example:
With FADC_CLK = 80 MHz and a sampling time of 2.5 ADC clock cycles:
TCONV = (2.5 + 12.5) ADC clock cycles = 15 ADC clock cycles = 187.5 ns (for fast
channels)
So sampling freq = 1/Tconv if I understand it correctly
(https://www.st.com/resource/en/reference_manual/dm00151940-stm32l41xxx42xxx43xxx44xxx45xxx46xxx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf page 389)
My code since you asked for it:
float32_t FFT_buffer_in[2048];
uint32_t analogInput;
.
.
.
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
{
    if (i<2048)
    {
        FFT_buffer_in[i] = (3.3*analogInput)/4095;
        i++;
    }
    else
    {
        i = 0;
        doFFT();
    }

}
.
.
.
int main(void)
{
.
.
.
  HAL_Init();
  SystemClock_Config();
  MX_GPIO_Init();
  MX_DMA_Init();
  MX_ADC1_Init();
  MX_DAC1_Init();
  MX_TIM2_Init();
  MX_TIM1_Init();
  MX_USART2_UART_Init();

   arm_rfft_fast_init_f32(&fft_handler, 2048);

   HAL_ADC_Start_DMA(&hadc1, &analogInput, 1);
.
.
.
}
//ADC SETUP:
static void MX_ADC1_Init(void)
{

  /* USER CODE BEGIN ADC1_Init 0 */

  /* USER CODE END ADC1_Init 0 */

  ADC_ChannelConfTypeDef sConfig = {0};

  /* USER CODE BEGIN ADC1_Init 1 */

  /* USER CODE END ADC1_Init 1 */
  /** Common config
  */
  hadc1.Instance = ADC1;
  hadc1.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV8;
  hadc1.Init.Resolution = ADC_RESOLUTION_12B;
  hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT;
  hadc1.Init.ScanConvMode = ADC_SCAN_DISABLE;
  hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
  hadc1.Init.LowPowerAutoWait = DISABLE;
  hadc1.Init.ContinuousConvMode = ENABLE;
  hadc1.Init.NbrOfConversion = 1;
  hadc1.Init.DiscontinuousConvMode = DISABLE;
  hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START;
  hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
  hadc1.Init.DMAContinuousRequests = ENABLE;
  hadc1.Init.Overrun = ADC_OVR_DATA_PRESERVED;
  hadc1.Init.OversamplingMode = DISABLE;
  if (HAL_ADC_Init(&hadc1) != HAL_OK)
  {
    Error_Handler();
  }
  /** Configure Regular Channel
  */
  sConfig.Channel = ADC_CHANNEL_6;
  sConfig.Rank = ADC_REGULAR_RANK_1;
  sConfig.SamplingTime = ADC_SAMPLETIME_12CYCLES_5;
  sConfig.SingleDiff = ADC_SINGLE_ENDED;
  sConfig.OffsetNumber = ADC_OFFSET_NONE;
  sConfig.Offset = 0;
  if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
  {
    Error_Handler();
  }
  /* USER CODE BEGIN ADC1_Init 2 */

  /* USER CODE END ADC1_Init 2 */

}

These are just fragments from the code, If more is needed - let me know


texts: Why does a printer's inrush current double for 240V vs 120V?

texts:
In this answer, the inrush current for a laser printer is listed as follows:

Inrush Current: (Duration: significantly < 1 second)
  Model A  (120V): 23 A peak (20 deg C, from cold start)
  Model AB (240V): 40 A peak (20 deg C, from cold start)

The question posed by Dan Neely in the comments piqued my interest and makes me question my understanding of electrical theory. I would have expected the current draw to be the same, or possibly even half as much, for the higher-voltage model. I should note that I'm basing this assumption on past experience in building out racks in a data center, where we could typically put more 240V servers in a rack than 120V since their current draw was significantly smaller.

So, please school me: why does the 240V model have nearly twice the inrush current as the 120V model?


texts: Why aren't there electric cars with solar cells built on top of them?

texts:
I think it would be nice if leaving the car outside on a sunny day would charge up the batteries. It would make possible long-range weekend trips to the countryside because during the 2-3 days of vacation the car would charge up.

Or wouldn't? Please help me solve this mistery. I can't come up with numbers, I'm only guessing.

I have the same question for laptops and cell phones. Wouldn't be nice if leaving them under the sun would charge them under a couple of hours?

EDIT on 20-11-2016:
There are custom-built solar-power-augmented EVs in the wild:

The next generation Prius will have optional rooftop solar panel although it won't charge the main battery: http://www.autonews.com/article/20160616/OEM05/160619900/next-generation-toyota-prius-has-solar-roof-for-europe-japan


texts: How can I set up SPI using Atmel Studio and C code for ARM processor?

texts:
I am trying to program the SAM3x8E chip on the Arduino Due through Atmel Studio. I would like to be able to control a digital resistor over the SPI interface with the SAM3 chip. I am running Atmel Studio 6.2. I have NO PROBLEM getting things to work on the Arduino IDE, but I really want to figure out how to program this the "hard way" in Atmel. I can successfully program the chip in Atmel Studio, by using a batch file which loads bosssa.exe.

Here is my WORKING Arduino IDE code:

Code:

// inslude the SPI library:
#include <SPI.h>

// set pin 10 as the slave select for the digital pot:
const int slaveSelectPin = 13;

void setup() {
  // initialize SPI:
  SPI.begin();
  SPI.setDataMode(SPI_MODE0);
 // SPI.setClockDivider(slaveSelectPin, 8);
  SPI.setBitOrder(LSBFIRST);
  pinMode (slaveSelectPin, OUTPUT);
}

void loop() {

  // Raise the volume from off to loud

  // Increase brightness of LED
  for (int i = 63; i>=0; i--) {
    digitalPotWrite(i, i);

    if(i>20)
    delay(10);
    else
    delay(100);
  }

      digitalPotWrite(0, 0);
       // delay(500);

  // Decrease brightness of LED
  for (int i = 0; i <= 63; i++) {
    digitalPotWrite(i, i);

    if(i>20)
    delay(10);
    else
    delay(100);
  }
}

void digitalPotWrite(int left, int right) {
  // take the SS pin low to select the chip:
  digitalWrite(slaveSelectPin, HIGH);
  //  send in the address and value via SPI:
  SPI.transfer(left);
  SPI.transfer(right);
  // take the SS pin high to de-select the chip:
  digitalWrite(slaveSelectPin, LOW);
}

Now (sadly), this is my Atmel code:

Code:

#include <asf.h>
#include "spi_master.h"

int main (void)
{
   /* Initialize the SAM system. */
   sysclk_init();
   board_init();

}

As you can see, I don't have the slightest clue how to go about setting up the SPI interface in Atmel studio. I've looked at example code such as the built in "SPI_EXAMPLE1" but I do NOT understand it. Can anyone help me to understand how you initialize the SPI? How do I know what pins to use in the initialization code?


texts: Common Collector Amplifier DC Analysis (why not get the VTH and RTH like in Thevenin's Theorem?)

texts:
I looked in the book of Electronic Devices and Circuit Theory and in the section of a common collector amplifier configuration with a voltage divider, it shows that:
$$ V_B=\frac{VCCR_2}{R_1+R_2} $$
However on other voltage divider amplifiers with a collector resistor the solution is:
$$ V_{TH} =\frac{VCCR_2}{R_1+R_2} $$
and to get \$ V_B, \$ the solution to be used is \$ V_B = V_{TH}-I_BR_{TH} \$
Obviously, both will yield a different answer. So I was wondering if why the first formula above must be used instead of applying Thevenin's Theorem (VTH, RTH)?
It can't be because of the voltage divider approximation which is \$ \beta R_E \ge 10R_2\$, I calculated it but \$ 10R_2 \$ is still bigger and it still uses the first formula.
I searched for youtube tutorial videos and no one explained why. Here's the schematic and the solution: (There's also on YouTube if that's needed)
Youtube link


texts: Is there a safety issue with adding a grounded transformer to an ungrounded network?

texts:
Scenario: Installing a grounded center-tapped transformer in an ungrounded system on a ship.
We have eight 11 kV to 460 V ungrounded three-phase delta-to-delta transformers feeding as many switchboards.  We will often get a ground faulted phase on these switchboards, due to the many consumers. We have ground fault detection and we usually find the culprit in a few hours.  On one switchboard there is a "single-phase" transformer with a grounded center-tapped neutral secondary that is installed in a temporary office container.  It is being fed with two legs of 460 V.
What actually happens when one of the phases that feeds this "single-phase" transformer goes to ground?  You are essentially connecting one of the primary phases to the center tap on the secondary. What voltages will present themselves and in potential to what? You will obviously have 460 V potential to the primary creating some hybrid autotransformer.
Is there possibly a bucking/boosting effect that can take place? Are there dangers associated with this installation?  Am I overreacting?


texts: Getting negative voltage reading when negative voltage does not exist. Why?

texts:
I am beginner trying to make sense of some weird voltage readings I am getting. Please take a minute to look at the circuit below:

If I take my oscilloscope and capture the voltage activity across resistor R1 at the moment the switch is closed I get the following:

Can you see the issue here? I would have expected the oscilloscope trace to start up at 4 volts and then drop down to 0 volts after the switch is closed. However, instead of that, the trace starts up at 4 volts and drops all the way down to -2 volts! How is this possible when my power supply range goes from 0 volts to 8 volts? The minimum voltage should be 0 volts and not -2 volts right?

So the question is why is this happening? Is the voltage really dipping down to -2 volts or is this some kind of oscilloscope artifact happening here?

In case it helps, the oscilloscope that I am using a Rigol DS1104Z oscilloscope with 100 MHz bandwidth.

Thanks.


texts: Toslink (fiber optic) connectors not working

texts:
I built this quick test circuit before I start implementing a switch with multiple receivers and it isn't working correctly. The transmitter appears to be working (I can see the red light on) but when I connect my stereo receiver to the transmitter and my DVR to the receiver I get no sound (tested both cables and they are not the fault).

PLR135/T10 Receiver Datasheet. PLT133/T6A Transmitter Datasheet

My only worry is that Pin 1 has swapped locations between the receiver and transmitter even though the manufacturer is the same. I double checked the datasheets and I believe my schematic is correct with the swapped Pin 1 locations.


texts: Temperature Sensor Selection for temp range of 160C to 240C with 1C Accuracy

texts:
I am attempting to select a temperature sensor for a controlled heating application. The sensor will need to be inserted into a chamber with a cartridge heater and steel ball bearings inside of some stainless steel tubing. I would like to meet the following specifications:

Temperature control between 160.0 and 240.0°C
Temperature accuracy of +/-1.0°C (in the above range)
<250 ms thermal time constant for the temperature sensor

Everything I've read/calculated so far has led me to believe that I can accomplish what I would like to with a J or K-type thermocouple with appropriate cold junction compensation and correct thermal bonding inside the chamber while using a 12-bit ADC with signal conditioning mapping 0-4.5V to 140.0-260.0°C. Based on feedback the duty cycle of the cartridge heater will be adjusted. My questions are:

Should I consider other types of sensors (have I overlooked something critical in my sensor selection)?
What aspects of design will be the most critical to getting the most accurate possible temperature readings? (Guard rings, return current routing, etc.)


texts: Are stand-offs unnecessary when the case is made of plastic?

texts:
If a case is plastic, would there be any real benefit to using stand-offs to ensure the circuit board is not in contact with the side of the plastic case? Even when the plastic is non-conductive?

(The context here is the casual, do-it-yourself casing of small home projects.)


texts:
I am trying to simulate a D flip flop using Vivado 2018.2.2.
But upon running the simulation a window pops up stating Current time: 0 fs. The program doesn't freeze, it just doesn't progress. Here is the code:

LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;

ENTITY Dff IS
    port (d, clk, rst: in std_logic;
          q      : out std_logic);
END ENTITY Dff;

ARCHITECTURE behav OF Dff IS
BEGIN
   main : PROCESS
   BEGIN
      IF rst='1' THEN
          q <= '0';
      ELSIF rising_edge(clk) THEN
          q <= d;
      END IF;
  END PROCESS main;
END ARCHITECTURE behav;

And the test bench:

LIBRARY IEEE;
USE IEEE.std_logic_1164.all;

ENTITY Dff_tb IS
END Dff_tb;

ARCHITECTURE behav OF Dff_tb IS
    CONSTANT T : time := 10 ns;
    CONSTANT N : INTEGER := 3;
    COMPONENT Dff
    PORT(
        d : IN std_logic;
        clk : IN std_logic;
        rst : IN std_logic;
        q : OUT std_logic
    );
    END COMPONENT;

    SIGNAL d : std_logic := '0';
    SIGNAL clk : std_logic := '0';
    SIGNAL rst : std_logic := '0';
    SIGNAL q : std_logic;
    SIGNAL sim_data : std_logic_vector (N downto 0) := "0011";
BEGIN
    Dff_0 : Dff PORT MAP (d => d, clk => clk, rst=>rst, q => q);

    clk_pr : PROCESS
    BEGIN
        clk <= '0';
        WAIT FOR T/2;
        clk <= '1';
        WAIT FOR T/2;
    END PROCESS clk_pr;

    main_pr : PROCESS
    VARIABLE i : INTEGER := 0;
    BEGIN
      rst <= '1';
      wait for T*2;

      rst <= '0';
      d <= '0';
      wait for T*2;

      rst <= '0';
      d <= '1';
      wait;
    END PROCESS main_pr;
END ARCHITECTURE behav;

I am new to VHDL so It is probably something obvious.
Any help is appreciated.

EDIT:
Following a comment, I edited my test bench code like this:

LIBRARY IEEE;
USE IEEE.std_logic_1164.all;

ENTITY Dff_tb IS
END Dff_tb;

ARCHITECTURE behav OF Dff_tb IS
    CONSTANT T : time := 10 ns;
    CONSTANT N : INTEGER := 3;
    COMPONENT Dff
    PORT(
        d : IN std_logic;
        clk : IN std_logic;
        rst : IN std_logic;
        q : OUT std_logic
    );
    END COMPONENT;

    SIGNAL d : std_logic := '0';
    SIGNAL clk : std_logic := '0';
    SIGNAL rst : std_logic := '0';
    SIGNAL q : std_logic;
    SIGNAL sim_data : std_logic_vector (N downto 0) := "0011";
    SHARED VARIABLE sim_end : boolean := false;
BEGIN
    Dff_0 : Dff PORT MAP (d => d, clk => clk, rst=>rst, q => q);

    clk_pr : PROCESS
    BEGIN
        IF sim_end = false THEN
            clk <= '0';
            WAIT FOR T/2;
            clk <= '1';
            WAIT FOR T/2;
        ELSE
            WAIT;
        END IF;
    END PROCESS clk_pr;

    main_pr : PROCESS
    VARIABLE i : INTEGER := 0;
    BEGIN
      rst <= '1';
      wait for T*2;

      rst <= '0';
      d <= '0';
      wait for T*2;

      rst <= '0';
      d <= '1';
      sim_end := true;
      wait;
    END PROCESS main_pr;
END ARCHITECTURE behav;

But the problem stil persists.


texts:
I did some soldering and breadboarding and implemented the precision rectifier circuit as presented in

which was taken from an Burr-Brown Application note sboa068.

R1, R2 and R3 are all 10k, the Opamp chosen was an AD8602 and the Diodes chosen were BAT54 (due to the lack of better-suited diodes at the moment)

The opamps are powered by a split power supply of +/-2.5V and I feed a sinusoidal input signal to the circuit while having a scope on the output.

I use a input signal amplitude of 1Vpp and vary the frequency from about 10kHz to 200kHz. Unfortunately, I see a large variation in the output amplitude of the rectified signal.

When feeding 30kHz, i have an output amplitude of about 400mV instead of 500mV, then when increasing the frequency to about 50kHz I get the correct amplitude of 500mV Peak, when further increasing the frequency to 200kHz, I get an amplitude of about 710mV.
I measured the resistirs R1 and R2, which have 10.016k and 10.011k respectively, so that cannot explain such a large variation in "gain".

According to a LTSpice simulation with the correct spice models, the circuit works rather fine down to about 80mVpp, where amplitude starts to fall off.

Any suggestions?


texts: How to identify SMD device marked LEFBV?

texts:
I have a SOT23-3 component marked \$\underline{\textrm{L}}\,\underline{\textrm{E}}\,\overline{\textrm{F}}\,\overline{\textrm{B}}\,\textrm{V}\$ as shown in the following images:

The following schematic snapshot shows the circuitry surrounding the device of interest which is circled in red and referenced as U11:

I thoroughly searched both the web and a number of SMD code databases for information but I haven't been able to come up with anything.

Can you help me to identify the component?

Update: assuming that the component is a MOSFET with Pin1=Gate, Pin2=Source, Pin3=Drain, I've removed it from the PCB and done some probing by using the diode test feature of a digital multimeter (DMM) as follows:

connecting the positive lead of the DMM to the Source terminal and the negative lead of the DMM to the Drain terminal showed a voltage drop of about 0.57V;
connecting the negative lead of the DMM to the Source terminal (Pin2) and the positive lead of the DMM to the Drain terminal (Pin3) there is no conduction and it looks like an open circuit, that is the MOSFET is in the OFF state;
charging the Gate terminal up by touching it with the positive lead of the DMM; now connecting again the leads of the DMM as in 2. results in nearly a short circuit, that is the MOSFET is in the ON state;

So the device looks like to be a N-Channel MOSFET.


texts: PCB design and manufacturing: How important is it to select actual vs. generic parts?

texts:
PCB newbie here. I'm using Autodesk Fusion 360 to design a PCB that is a modified version of the Arduino Nano IOT 33.

My questions are about selecting parts before sending to the PCB manufacturer:

For generic parts like SMD resistors, capacitors, etc., can I just specify a generic resistor (see screenshot) with the appropriate resistor value, or is it important to specify an actual part number from a real supplier/vendor (like going on to Digikey or Mouser, etc. and specifying that exact part and serial number)?

If it's necessary to specify exact parts, what if I pick a part that is in short supply with the manufacturer? Is there a way to pick parts that are likely to be in stock with the manufacturer already? I guess I'm not sure how it works- do PCB manufacturers order parts from suppliers, or do they typically have generic parts on hand already?

My goal is to minimize the cost and lead time for my boards, and I'm ordering in a pretty low minimum quantity as I'm still prototyping right now.


texts:
I have a circuit that can be broken down to this:

The M54564P has been stripped down to a single circuit from its 8 transistors to demonstrate it in a smaller scale.

The area of interest is where the Resistor-LED pairs are (which are just here to represent the load itself - values are not exact). The 5v signal comes from an Arduino and the 14v from a vehicle (car).

Lets say the 14v is always on while the 5v is switched by the Arduino.
When that happens, the M54564P will complete its circuit and output ~12v - this is where it gets complicated (for me).

I need to power on those two LEDs, preferably using the 14v signal - no relays (need to do this 6 times in total) - by using the 12v signal as activation.
While unpowered, they need to stay as demonstrated - I can't make their circuit parallel.

The Output (from the M54564P) can be used (there won't be a lot of draw from this), but I am trying to avoid this if possible - I would like to keep it as the activation signal - but the M54564P can provide the current I need with no issue (but maybe not the voltage for simultaneous output - I need at least two out of the 8 transistors active at any given time).

What do you guys/gals think?

Can I close this circuit by using the Output from the M54564P to feed the 14v to those two loads - without making them parallel while they are not powered on (they can be parallel while active of course)?

I am looking for transistors, diodes, ICs, etc - just not relays or devices that will draw too much current.

Edit:
To clarify on the outputs on the M54564P; I am already using 6 input and outputs from the M54564P (I need to control 6 independent circuits - a maximum of two circuits will be on at a time, no more) - each circuit has 2 loads that need to be switched on (that is what is represented by the Resistor-LED pair).

Edit:
While modifying my circuit on my drawing application, I might have stumbled across a way to solve my circuit.

Anyways, let me clarify a few things first:
The reason for the M54564P? It was recommended on an Arduino forum as a way to switch a positive signal on with the Arduino's 5v digital output.
As suggested by Jasen - I will look into the A2982 as a substitute. Thanks!

The load I am trying to drive is a Rostra's Dual Heated Seat control unit. It requires that a 12v signal be passed to the selected heat level and an additional (12v) signal that turns the heat unit itself on.

The part I am wiring into doesn't draw much at all and a Resistor-LED pair was the closest I could compare them to. I apologize for the confusion there.

Anyways, I spent a bit more time getting to know the control unit on the Rostra and came up with a way to power it up, send the 12v to the pin that selects the heat level while sending that same 12v signal onto the rest of the unit.

Does this look like a good solution or just a wasteful use of diodes?

I hope this does not cause further confusion - I only have my tiptoes in a bit into electrical engineering. I have a long way to go, but I have no plans to stop studying anything soon.


texts: I have found that the dsPIC are classified in some specific areas, like motor control or energy processing, but  the datasheet of both models looks quite similar, I can't see what  is the advantage of using one or another to a specific application, for instance the motor control dsPIC are more powerful why I shouldn't take the motor control model for all the applications?


texts:
I'm building a class D amplifier with a dsPIC as PWM modulator.

The part of the schematic that I want to talk about is the interaction between the microcontroller output (pwm signal) and the gate of the MOSFET. I use TC4420 and TC4429 as gate drivers.

I know that there could be some overshooting (I think it's called "ringing") every time the output of the driver switches (for the resonant circuit created from gate capacitance and parasitic inductance), but I can see a lot of overshooting even between the output of the microcontroller and the input of the driver that has high impedance!!!
Is it normal or am I missing something?? If it's normal, is it true that that overshooting can be lowered only with a series resistor?

Here is the waveform between dsPIC and driver:

And this is the output of the gate driver:

Talking about switching in the same pcb of a class D amp, is it true that is recomended to have two separate grounds for logic signals and for power? I searched the internet but I don't get this point: how can i have two separate grounds if the power cables has only one ground wire?


texts: 24-bit parallel TFT module on circuit designed for 16-bit parallel

texts: I've designed a circuit that connects a 16-bit parallel LCD TFT module to the SPI-connector on a RPi, but bigger TFT modules often have 24-bit parallel. Can I use a 24-bit parallel TFT with my circuit by ingoring the last 8 bits, or do I have to rebuild the circuit?


texts:
I'm trying to limit power used by servos. The application is such that I don't mind if the servo's position drifts a bit, so I just use an N-MOSFET to shut it off when not in use. A conversation on an Arduino forum brought up the following concern:

  Blocking the current flow path on the ground lead may force voltage/current to flow back thru the servo control wire back thru the Arduino to the common ground between the Arduino and servo power supply. If the servo starts to heat up or behave erratically, this might be the reason. I haven't tried it, but a P-MOSFET on the servo power supply might be another choice.

I am seeing some erratic servo behavior, though I think it has more to do with some sort of reset not happening when I bring power back on. Is the logic in the quote sound? Here's a snippet of the current servo control circuit:

simulate this circuit – Schematic created using CircuitLab


texts: What is the reason that moving iron instrument can measure both AC and DC but moving coil instrument can't?

texts:
What is the reason that moving iron instrument could measure both AC and DC but moving coil instrument can't?
( moving coil can't respond quickly as the AC changes its direction so stays at zero - is the explanation i have listen till now )
 i tried to get my doubt clear but couldn't find what i was searching for


texts:
I'm taking an introductory electronics class, the first chapter is about amplifiers, controlled sources, gain, stuff like this. They mention "small AC signal" a few times but never explain what small mean and why there is the need to talk about "small" signals in the first place.

Anyone knows?

Thank you very much


texts: LTC3106 solar harvester example - open drain on power good pin

texts:
The part of the circuit of interest is highlighted on the image. The block with the antenna is just some device being powered, not important for the question except for providing the generic Vdd, EN and GND pin. I'm trying to understand the concept of an open drain from the example.

The description of PGOOD states:

  Power Good Indicator. Open-drain output that is pulled to ground if
  VOUT falls 8% below its programmed voltage. The PGOOD pin is not
  actively pulled to ground in shutdown. If pulled high the PGOOD pin
  will float high and will not be valid until 3.5ms after the part is
  enabled.

Assumption

The 10MOhm resistor connects V_out and PGOOD. My thoughts are that this serves as a pull up for the EN pin because PGOOD can only provide a fixed ground potential and is floating otherwise.

Is this a correct assumption?
What is open draining in this example?
What current and voltage are used for calculating the pull-up resistor value?


texts:
How is that A.C can travel miles and miles while D.C can't?
Since, from Ohm's law,

So, I think the resistance would be the factor in case of D.C but how does A.C overcomes it?


texts: How do I reduce the rise and fall time to ideal case of 0 in my LTSpice model?

texts:
Working with basic circuit with pulsed voltage yields a rise and fall time or 0.5ns. My maximum time step is 1ps.  With no delay , rise or fall times assigned. ( default assigned to zero) .

How do I reduce the rise and fall time to ideal case of 0 in my LTSpice model ?

What are the minimum limits in LTSpice rise and fall times if it cannot be 0(zero) ?

In this example simulation I changed my simulation parameters to picoseconds range. Even then there is a rise and fall time of 0.05ps.

At a higher range the same happens. In the attachment simulation in the range of seconds is shown. Is there a setting that I need to change in LTSpice ?


texts: What is the purpose of capacitors parallel to crystal?

texts:
In many schematics, we have two capacitors connected in parallel to a crystal?
Why do we have capacitors parallel to crystal? Whats the purpose?
How are the capacitor values determined ?


texts:
I am piecing together my own ADC example for STM's blue-pill module by reading the reference manual (btw I an inexperienced in embedded development).

The code outline so far is:

void do_adc(void)
{
    unsigned int ra;
    ra=GET32(ADC_CR2);

    ra|=1;   // ADON
    PUT32(ADC_CR2, ra);

    // wait for EOC flag
    while ((GET32(ADC_SR) & 0x02) == 1)
    {
        led_blink();
    }

    ra = GET16(ADC_DR);

    PUT32(USART1_DR,ra);
    sleep();

    PUT32(USART1_DR,'\r');
    sleep();
    PUT32(USART1_DR,'\n');
    sleep();
}

int notmain(void)
{

    init_led_adc_and_uart();
    disable_adc();
    calibrate_adc();
    enable_adc();
    while (1)
    {
        led_blink();
        do_adc();
    }
}

I have written code for each of those functions which most probably is not correct, but that's not the question at the moment.  I am still wondering where the Vref pin on the blue-pill; based on this diagram, is?

If my understanding is correct, then I would connect a temperature sensor to physical pin 10 (aka ADC channel 0), ensure that sensor has a voltage of ~3.3v.  Then for reference, connect the same input somewhere on the blue-pill so it can do the conversion.

However based on the diagram I linked, I am not sure where the analog referene is?

Btw: I flashed my code onto the chip and the led continuously blinks, so the code is probably fine, but I need to workout the connections!


texts:
I want to design a circuit for 100V loudspeaker line control. I want to periodically check if the line is short circuit or open circuit and receive notifications in case of any short/open circuit.
I'll be using STM32F4 to do this and have a few ideas, but need to get precise results and I thought I would need to apply several methods at the same time. The first is to add a signal that is not in the 20 Hz and 20kHz range to the output and check the presence of this signal at the end of the loudspeaker line. However, I am not sure what kind of circuit I need to establish to measure this clearly at the end of the line. Even if I do it with RC LP or HP circuit, how can I check with the STM32 the presence of the signal I added? Another method is to measure impedance, but I don't know how to measure impedance. How can I measure impedance with the lowest budget? I think it is more accurate to measure without sending a signal, but I am not entirely sure if there will be any negative effects. Is it sufficient to check with a single method? Which method should I choose if you think it will be sufficient?


texts: Non-intrusive Detection of Power On/Off for a Piece of Instrument

texts:
I have a spectrometer that is basically a diffraction grating driven by a stepper motor. I am controlling it with an Arduino UNO that sends off a pulse train, each pulse moves the grating by some fixed amount. I keep track of the number of pulses and relate that to the position of the grating. The Arduino remembers the position of the grating the last time I turned it off so that the next time I turn it on, it can be driven from that known position onward.

The problem is that sometimes I forget to turn on the spectrometer and the Arduino would start sending pulses and increasing the position counter without actually moving the grating. The whole system is then messed up.

I could go into the spectrometer and solder two wires in order to get a DC voltage signal. But spectrometer is somewhat expensive and would like to avoid hacking into it. Are there any better ways?

FYI, here is a video of the scanning grating: https://youtu.be/e_cCWV18UQ0


texts: How best to strain relieve cable entering aluminium enclosure

texts:
We are manufacturing electronic instrumentation which comes in a machined aluminium case.  We have full flexibilty on design of the case.
I need to design some form of strain relief for the single cable, which has a diameter of 6mm.  The case needs to be sealed to IP67.  I have in mind some sort of glue but not sure what is the best thing to use here - we intend to produce tens of units, so needs to be repeatable and relatively easy to manufacture.  What would be recommended here?
Thank you


texts: How to configure my favorite editor in Quartus?

texts:
Altera Quartus, as most other EDA tools, allows users to use their favorite editor, instead of the built-in editors. For Quartus, this feature can be activated in Tools > Options > Preferred Text Editor.

When I fill in stuff in this dialog, Quartus does not store the data. The old editor is still used, and when I come back to the dialog, the default value is still there ("Quartus II Text Editor" is selected).

Have any of you encountered this? What am I doing wrong?


texts: use ADSL modem like a analog to digital converter

texts:
How to input a signal to a ADSL modem (in phone line input) that such a simple sinusoidal signal and get same signal by computer ? ADSL modem connected by network cable and usb cable is The software to do this ? Is it possible to do the matlab help ? thank you

ADSL modem work like a AtD (analog to digital) converter , Copper telephone lines carry analog data and by ADSL modem that analog date convert to digital data !


texts: Taking the edge/ring off a clock signal with an RC circuit?

texts:
I'm designing a board for a hobby project where I am using a lattice machxo2 cpld as a system interconnect.

The cpld needs to be clocked at 80-100MHz, and because I sprung for a cheaper cpld, it has no on board PLLs.  The easiest way for me to clock it is to use a programmable clock from my main mcu (Atmel SAM4S) to clock the cpld (with a pcb trace of about 3cm).

Because the signal is 100MHz, the slew rate will have to be fairly high, and I'm expecting a lot of ringing.  Can I reduce the ringing by adding a small resistor to the output pin of the MCU (10-100 Ohm) and a small cap to ground on the clock line (10-100pF)?  According to my back of the envelope math, these values will force the rise/fall time to be around 1ns.

simulate this circuit – Schematic created using CircuitLab

Will this approach work?  Is it common practice?  I'm coming from a CS background, so my knowledge is a little shaky.

Thanks.


texts: TTL to NIM logic translation Logic Gate Issue

texts:
NIM is a standard used in nuclear physics. I'm facing an issue with a logic gate being used in my TTL to NIM translation circuit, and I'm not sure what is entirely wrong with it. For a little background, I'm trying to replicate a TTL to NIM logic translation circuit as demonstrated in a reference schematic linked below, but I'm having some issues regarding a specific part of the circuit, specifically the logic gate.

Here's a link to my reference schematic, but if you prefer, I'll draw out my circuit below.

simulate this circuit – Schematic created using CircuitLab

It's a little modified from the original circuit with the addition of a pull-down resistor at my TTL logic input at the gate as well as using 5 pF capacitors instead of 3.3p, but otherwise, the rest are the same.

The original schematic used an XOR gate, and it seems to be the F86 XOR gate. I used the 74LS386 quad dual-input XOR gate to substitute for it, but it doesn't seem to be working properly. Setting one input to ground, I used a switch to set the other input to 3.3 V for the TTL high input (and when the switch is open, a pull-down resistor for that input pulls it down to 0 volts for logic 0). The output of the gate goes to the rest of the circuit, which should produce a NIM-logic current signal (0 mA for logic 0, -15 mA for logic 1). However, somehow, my XOR gate output doesn't change at all, and the NIM-logic stays constant at -15 mA whether or not my input switch is closed (while the output of the logic gate is between -0.5 and -0.6 V). This behavior also occurs when a gate input is set to VCC (+5V).

Seeing as how this is not behaving correctly, I swapped out the IC with the DM7404N hex inverter IC. Logically, it should behave as if one of the XOR inputs is set to VCC, logic high. Swapping it out and putting a pull-down resistor at the input, the circuit behaves exactly as I hoped it would. The output of the inverter goes from 0.7 V to 3.4V depending on the input, and the NIM current correctly goes from -15 mA to 0. Seeing as how the circuit works with the inverter and not with the XOR gate, I was wondering what could be the reason why? I thought that perhaps the inverter circuit is more simple and allows for larger output current than the XOR gate, but I wonder if that is truly the case?

To be fair, there have been instances where using the XOR gate gives the correct intended result, but this doesn't seem to be consistent anymore. Whereas with the inverter replacing the XOR gate, it seems to work all the time.

EDIT: After reading the comments, I thought to try to use a different XOR gate of a different technology type, specifically the MC14507, the CD4030AY, and the SCC4070BE. I did some research and found that these gates are based on MOS technology which should allow for more current flow, and that seems to be the case. The NIM logic signal switches consistently, so is it safe to assume that all my problems are just using the LS XOR gate?


texts:
I implemented a parallel LC induction heater using theory. I made a simple square wave Inverter providing a frequency of 20kHz to the tuned LC circuit. The problem I'm facing is that my tank is not drawing any current although the tank is at resonance with the supply.
The picture of the output wave across the coil wrt ground is attached. Should I attach a resistance in parallel to the tank? I don't have any resistance in parallel to that.
The picture of the circuit is also attached.

EDIT:

@Marla - I have a variable dc power supply with a built-in ammeter and voltmeter. It has a max rating of 30V at 15A. So, that's where I'm measuring the current. The scope is stating the wrong frequency due to switching harmonics (stays constant at 20.2kHz then fluctuates then goes back to 20.2kHz). The switching frequency of Mosfets is 20.2kHz.
Component values => L=1.9uH ; C=33uF; fsw=20.2kHz.


texts: If i solder together enough binary adders, binary subtractors is it possible for it to work like a modern (very very slow) CPU (Such as one found in a graphics calculator).


texts: Will adding an external MOSFET on the switch pin of a boost converter IC increase the output capacity in terms of current?

texts:
So, I need a step-up DC-DC converter. I was going to use the LM2577 but I realized that the output capacity wasn't enough for my application. I was wondering if by passing the current through an external MOSFET I will be able to switch more current through the inductor and get a larger current output. Keep in mind that "go get a more powerful converter from digi-key" is not an option, where I live this is the best I can get.

My guess is that when the output of the LM2577 is pulled low, the transistor's gate should be pulled low, hence turning it on, and when the output is turned off (i.e. high impedance) it should be pulled high through R1. Any reason this wouldn't work? Any help will be appreciated. Thanks

simulate this circuit – Schematic created using CircuitLab
(sorry for the not very tidy schematic)


texts:
I asked a question on Raspberry Pi Beta regarding Using one Raspi to control long (>100ft) of 5V LED strip, one answer in particular I found this answer useful, with a further comment which advised me to seek more specific information here:

IC means Integrated Circuit ... To find out the max amount of LED's you need to
figure out how much data you can send on 25Mhz, then how much data is
actually sent. You need to find out this. It could be 255. But using
SPI extenders it can be 255 x 16. This is all different that what you
area asking.

Therefore, my question is this: ignoring powering for the moment, how many LEDs can one single Raspberry Pi control using the below LED strip, also, if SPI extenders are necessary, what are they and how do I use them:

5M WS2801 Blcak PCB 32LED 5050 RGB Digital LED Strip Individually Addressable 5V
item: nonwaterproof black pcb ws2801 led strips
Model: 5050RGB WS2801
Working voltage: DC5V
LED Type:SMD5050 RGB
Led Qty: 32 led per meter
Wave length(NM):R-650mcd, G-520mcd,B-460mcd
Power(W/M):9W/M
IC: each led controlled by one WS2801 ic chip
Scale:256
View angle:120 degree
Life span:no less than 50000hrs
Packaging:5M/reel in antistatic bag
NONWaterproof

EDIT: The project involves installing accent lighting in a large area whereby it is sometimes difficult or impossible to hide and/or wire bulky AC-DC power supply units or raspberry pi units (which themselves need USB adapters). Ideally I would like to have 1 raspi and 1 power supply. The raspi would be connected once, and the power supply could be wired at 2m intervals. If this is not the case, I have to start hiding multiple power supplies and start networking multiple raspis, both of which make the project more complex.


texts: Digital signal appears to improve with length of wire - troubleshooting multiplexed LED display

texts:
I’ve created a 5x5 multiplexed LED display that’s behaving very strangely. It appears to have something to do with the data signal from the micro controller to the first shift register which appears affected by the length of wire, but in a counter-intuitive way - the longer the wire, the better it works.

What I mean is that the display works fine when the micro controller is sitting on a breadboard and connected to the rest of the circuit via wires (image 5 in the gallery below), but not when connected directly via the header pins/socket (second to last image) - in that state the LEDs are stuck in random on/off states. Interestingly, the display also comes to life in the directly connected configuration when I measure the voltage between the data pin and ground.

Yes, I have decoupling capacitors (although they may of course be connected wrong).

Components:
Trinket M0
2 shift registers (74HC595)
1 Accelerometer (ADXL345)

Project images here (not in proper order unfortunately, but with relevant captions):
https://imgur.com/a/w1Gr4fj

Code:
https://justpaste.it/7lywq

Because of the strange behaviour I thought there might be something wrong with the header pins on the MC and the header socket in combination, but after replacing the header pins and one of the sockets, there was no change. It could be that the second header socket, which I haven’t tried to replace, is faulty, and for some reason a better connection is had with wires as opposed to header pins.

I received some help on reddit where they suggested adding bulk capacitors, but this didn’t help (too few/placed wrong?). Images of project after adding them: https://imgur.com/a/uD8TlVY

As mentioned, if I measure voltage between the pin which sends out the data bits to the first shift register (number 1 on the MC) and GND, the display comes to life.

Does this strange behaviour make sense to anybody? What is the voltmeter doing to the pin which causes it to work? Is it sinking current? Pulling the pin to ground? Increasing resistance? I’ve tried connecting the pin to GND via various resistor values up to 1Mohm, but the display still doesn’t work. Also, merely touching the pin with metal causes a change in which random LEDs turn on/off.

What is so frustrating is that my troubleshooting is muddied by the fact that the display works fine - as long as I have it on a breadboard connected via wires, so loose connections and other such issues are (IMO) very unlikely.

EDIT - SOLVED


texts: How to place the jumpers on Xavier NX to put it in Force Recovery mode?

texts:
I am trying to flash a new Xavier NX kit using SDK Manager and I need to put it in Force Recovery mode for the SDK Manager to recognize it. From these instructions, it is mentioned to 'place a jumper across' pins 9 and 10 (GND and FC REC). I am not sure how to 'place' this jumper.
I have these jumper cables with me and I have two of them (from one end) put onto the pins 9 and 10 and the other end is free. How should I proceed?
I have flashed TX2s before but there were physical buttons on TX2 board and not these pins. Any specific instructions are massively appreciated. Thanks.
EDIT: I have also asked this question on NVIDIA Developer forums and I am awaiting an answer. I hoped here would also be a suitable place to ask.


texts: How accurate is a single GPS at detecting distance traveled?

texts:
I read that consumer grade GPS is accurate 5-10 meters at resolving global positioning coordinates.

However, my question is how accurate is consumer grade GPS at detecting distance traveled.

For example:

Assume I record a position with GPS and consider it my origin of (0,0,0). One second later I recheck my position & calculate the difference which result is (10mm, 20mm, 30mm).

For this sort of example how much error should I expect?

Thanks!!


texts: Translating to "below ground" logic levels

texts:
I have an RF switch chip that is controlled by a logic signal with levels of 0 V and -3 V.
I want to control this from a CPLD that's producing ordinary +3.3 V CMOS levels.

Board area is at a premium in this design because I'm trying to wedge this in to an existing design.

Power consumption of a few mA or switching time as long as 100 us would not be a problem for this circuit. The RF chip's control input provides only about 10 uA load. Acceptable logic levels are within +/- 0.5 V of the nominal values. I can deal with either an inverting or a non-inverting solution. I have +3.3 and -3.3 V supplies available.

I have a "pretty good" solution to the level translation problem, but I'd like to know if there's a canonical "best" solution for this problem.

Edit

To clarify the output requirements, the output logic high needs to be between -0.4 and +0.6 V. The output logic low needs to be between -3.5 and -2.5 V.


texts: Is the circuit a voltage doubler or not?

texts: I'm not able to actually understand how the circuit behaves as a voltage doubler.From my understanding the circuit would behave as a voltage doubler if during the positive half cycle only D1 would conduct and only C2 capacitor would charge to positive max of input and for negative cycle only D2 would conduct and only C1 would charge to negative max of input and hence the voltage drop across resistor would be 2*max input voltage. However my doubt is during positive half cycle apart from cap C2 wouldn't C1 as well get charged through the resistor similarly during negative half cycle wouldn't C2 also be charged through the resistor. If that is the case would the circuit still act as voltage doubler?


texts: Two different ways of writing the same thing but generating different behaviours in Verilog

texts:
I have a part of Verilog code that is basically trying to synthesize a flip-flop. I have been experimenting and it seems that I can come up with two ways of writing it.

The first way being :

always @(posedge(clk),posedge(reset)) begin
    if(reset) begin
        g <= 1'b0;
    end else begin
        if((~wr_full) && (~fifo_empty)) begin
            g <= ~ g;
        end else begin
            g <= g;
        end
    end
end

And the second way being :

reg g_next;

always @(posedge(clk),posedge(reset)) begin
    if(reset) begin
        g <= 1'b0;
    end else begin
        g <= g_next;
    end
end

always @* begin
    if((~wr_full) && (~fifo_empty)) begin
        g_next = ~ g;
    end else begin
        g_next = g;
    end
end

It turns out that both these codes synthesize to become the exact same circuit (which was expected) :

But their behaviour in simulation is different. In the first case, as soon as the condition in the if statement (~tx_busy) && (~output_fifo_empty) becomes true, the output of the flip flop changes, but in the second case, the change in output occurs one clock cycle after the condition becomes true.

So, my questions are :

1) Why are the behavioural simulation results different, even though both the codes synthesize to become the same circuit.

2) Which one of the behaviours is expected as the output of the synthesized circuit, and why? After looking at the synthesized circuit, it seems logical to infer that the behaviour will be that of the second circuit, but why is that (the behaviour I wanted to infer was the first one). And if this is the case, how do I enforce the first behaviour (maybe a latch ?)

3) I have been using these two methods interchangeably to produce the behaviours I wanted, but I have now realized that these two synthesize to be the same circuit. How does this affect my other circuits (do I not understand how they work, but they still work as expected ?)

4) How do I know that the circuit behaviour that I inferred in behavioural simulation will be the one of the synthesized circuit (this experience basically questions all the beliefs I had about the behaviours of simulated and synthesized designs)

EDIT : since the codes are very long, i'd rather not post them here. I have uploaded them here.

There are three floders.

The traffic_generator folder contains the file traffic_generator.v and the testbench for the same traffic_generator_tb.v. These are the top level codes.
The pulse_generator folder contains the include file pulse_generator.v. I am aware that this code is not yet synthesizable, but I can get a synthesizable code with the same behaviour (Right?).
The my_fifo folder contains yet another include file my_fifo.v. I suspect there might be some problem due to the way the empty flag is updated, but I can't seem to figure it out.


texts:
I am making a circuit for converting analog to digital signals using an ADC0808. This IC has 28 pins, and my circuit also includes a 555 timer and some LEDs to display the output. The high number of connections makes breadboard wiring clumsy, tangled and irritating. I have not found a proper resource yet to teach me how to manage a breadboard for such large circuits.

Are there any resources or examples available that may help teach me how to manage breadboard-based projects with relatively complicated wiring?


texts:
I thought that the characteristic impedance was a parameter defined only for transmission lines. But now I have this question: is it defined also for a port? And, eventually, what does it represent and which are the physical parameters that determine it?

This doubt came to me when I saw that for instance it is possible to evaluate the input reflection coefficient of a transistor, which is not a transmission line.

For instance, let's consider this scheme:

These blocks are connected by wires, and not by transmission lines. But there are some reflection coefficients, which are defined starting by characteristic impedances. What do they represent?


texts:
So, its my understanding that the VNA (vector network analyzer) is designed to inject a known signal into an unknown device and analyze the reflected signal's amplitude and phase (both voltage and current). But it is also able to remove the unwanted reflections, delays, attenuations, etc of the test cable, connectors and so forth.

This is accomplished with the well-known calibration sequence in which the VNA samples what an open, load, short and through "look like" through the test cable, connectors, etc, so that it can effectively subtract the measurement errors they cause.

Am I right so far?

My question is, which is better, to use a precision cal kit (and then make electrical length adjustments), or make my own right on the PC board- actually 5 PC boards 4 for the SOLT cal, and the 5th of course for the actual measurements?

It seems to me a precision cal kit is both expensive and NOT what the test circuit will look like. I'm certain I'm missing something, but what?

This question was somewhat answered here, but what I don't understand is even if I get a pristine calibration with a good standard, I'm still going to have to connect to the circuit using some sort of pigtail that injects its own problems.


texts:
truth table for a 7-segment display decoder.
It converts a binary input x[3..0] to a 7-bit code which drives each LED in an LED
display am a bit confused can anyone just give a hint i want to produce a logic circuit for it i take it up from there cheers
 .


texts: How can I reduce the speed of motors with given battery voltage?

texts:
I'm new to building line followers. I'm using ARDUINO UNO and a motor shield for accomplishing this task and for the power supply, I'm using a 12V Li-Po battery along with 2 300 rpm motors.

The problem I encountered is that the voltage provided by the battery to the motors is too high due to which the motors have really high speeds and can't follow the lines properly.

Is there any way by which we can regulate the voltage that is provided to the the the motors, externally or through any function of the ARDUINO IDE, so that the speed of the motors gets reduced and they can properly follow the lines?


texts: Latching relay - Remember state after power failure

texts:
I am trying to use a relay to control appliances. My arduino will trigger the relay on/off. Additional requirement is in case of power failure the relay should be able to maintain its state so that it is in same state when power comes back. Ex: Arduino turned on the lamp (using relay), power failed, power is back, the lamp is in ON state.
I read about them quite a bit and found out that I need a Latching relay. I tried to find them online and stores(vetco, radio shack) but all I find is bulky things. Are there any latching relays that are similar in form factor to regular ones?
Also any other alternate options to make my requirement possible without a latching relay?


texts: Role of "a current-limiting low-inductance resistor"?

texts:
While reading some experimental setup of a paper, I've came across with a statement saying,

"Since a DC power supply is not capable of finely regulating the discharge current at very low currents( in the mA range), a separate current-limiting low-inductance resistor was added to enable the stable operation of the magnetron at very low currents while using the power supply in the voltage mode."

To me who is not familiar with electronics, this sentence wasn't clear to figure out how "a current-limiting low-inductance resistor" is related to the stable operation. They didn't provide the circuit, but I guess it is in series, considering 'current-limiting'.

P/S is on the voltage mode(to keep the current the set value of 100 mA), and the current is from a gas discharge probably with some oscillating nature.

I got the meaning of 'current-limiting' which is a general role of resistor, however, can't understand how stable operation" is achieved with the described resistor.

I found LR circuit example , where time constant is given by L/R, so the low inductance will reduce response time. But, it seems controversy to me because if the circuit reacts quick for discharge oscillation, the inductance wouldn't suppress the effect of discharge oscillation. Then, doesn't make sense of the description 'to enable the stable operation.' And the example of LR circuit is kind of situation for DC circuit, and the page was explaining the current time history when a switch is closed.

I assume 'low-inductance' may somehow related, but can't clearly figure out alone.

I will appreciate if anyone could help me to understand.

** Edit - schematic which I assume is added.

simulate this circuit – Schematic created using CircuitLab


texts: What is the difference between a lock-in amplifier and a superheterodyne receiver?

texts: I apologize in advance if the answer is obvious to many of you. I was looking at some block diagrams of lock-in amplifiers the other day, and I found them to be very similar to superheterodyne receivers (with a mixer, an oscillating reference, and filter). Are they simply identical setups with different names? If not, what are the differences other than that one uses low-pass and the other uses band-pass?


texts:
I was testing the RS485 Circuit, below is my circuit and I connect J5 to my PC using another RS485 to USB converter. In PC through Modscan software I was monitoring the polling and response, a twisted wire used, length of wire is 3 feet only.

I observe the polling missing some time, generally out of 100 polls, I missed three response. my PC is master and device is Slave.
So I probe the waveforms and observe while in receiving mode I saw a lot of noise on RS485 waveforms. and when transmitting mode such noise is not there.
 see the attached waveform, does any have any idea, this is how an RS485 behave. any suggestion, advise.

I have two channel scope only.

layout ( 4 Layer PCB)


texts: Which Earth should a chassis be connected to: supply, or local?

texts:
I have a doubt regarding the earthing of an appliance and its separate isolation transformer. Consider the following simplified schematics; this is my first guess at which earth each chassis should be connected to: connect the appliance chassis to the local earth, not the supply earth. Is it correct? What is and why? I'm sure it has mostly to do with the tripping of the residual current device when a fault current occurs to enclosures, but I haven't been able to get to the bottom of it.

This is also a general question, as I need to make sure the isolation transformer can be removed (appliance directly connected to the supply) without rewiring anything: there are therefore 2 cases of which one (n°2) is totally generic.

simulate this circuit – Schematic created using CircuitLab

simulate this circuit

Context: France and Belgium.


texts:
I need some help correctly identifying the U9 and U10 components on the PCB. I've tried some codebooks and I found several options.

For U9:

H1 - X6603 is a 300mA, low quiescent, high PSRR, low noise and low dropout linear
regulator, but the model marked with "Lv" is a 4.7V and this board is a 3.3V

H2 - Toshiba 200 mA CMOS Low Drop-Out Regulator with Fast Load Transient Response TCR2EF series, but Pin 4 is connected to capacitor C46 and it should be NC...

For U10:

H1 - "4FD" - in the 2011 edition of the active smd components guide, it's a FT521FDa, LDO, Dual out, Vout1/Vout2=2.7V/1.8V±2%, 250mA, +CE, but again it should be 3.3V (4FJ).

Any help?
Thanks.


texts:
I'm making a little heated greenhouse. I have three 1.2 ohm 5W resistors and a 5V 1A power supply. Everything is controlled by my Arduino through a MOSFET. Now, I would just need 5W of power to keep my environment warm, so just one resistor, but by applying Ohm's law I get that it absorbs more than 4A of current, and I don't want my supply to blow up. Even if I use all of my three resistors it would absorb more than the maximum.
Can I limit the current without dissipating it in heat? Thanks.