texts: Help with using S26MD02 Relay as a Switch

texts:
Hello i'm fairly new to electronics and I'm currently trying to use a S26MD02 Relay from Sharp as a Switch with DC sources. The main problem is that I dont understand the schematic diagram provided as it does not show mosfets inside as I'm typically used to seeing.

I have tried a few different topologies but cant seem to get it to work. This is a basic diagram of what I'm trying to achieve. I simply want it to turn on an LED on and off for a very specific purpose I need to use a relay. However i'm beginning to think that this relay is only for AC sources? And wont work with DC?

simulate this circuit – Schematic created using CircuitLab


texts: Making a star network using 5 xbee series 1 modules in AT mode; how to do it?

texts:
I am trying to connect more than two XBee series 1 modules in a star network. The node point will take data from all endpoints one by one and process it, then send data back to a PC terminal.

In order to do that, the destination address of the central node has to be changed from time to time. Is it possible to do this using my microcontroller C/C++ code?

Is it possible to change the ATDL value during a program periodically?

I am using an Atmel dev board and a FireBird V robot using the same platform.


texts:
I designed and had manufactured a custom version of the Arduino Nano IoT 33 (basically the same, except it has some additional ICs on the PCB). It is working just fine when I program using the Arduino language (e.g. I can get LEDs to light up, PWM output, etc.). The Nina W102 Bluetooth Low Energy module (BLE), however, will not initialize.
I get a failure code returned to me when I run BLE.begin() (the result is 0, meaning a failure code). I used a debugger to follow the stack trace, and found that the exact function where it fails is here (in HCI.cpp in the ArduinoBLE module):
int HCIClass::reset()
{
  return sendCommand(OGF_HOST_CTL << 10 | OCF_RESET);
}

I've reached the limits of my understanding of Arduino and BLE (I'm a little new to this), and don't understand what this code does and whether it's a clue to determine what I have set up wrong.
Some additional comments:

I have triple checked my circuit schematics and board design. The schematics reflect nearly exactly the Arduino schematic here. https://store.arduino.cc/usa/nano-33-iot (see "PDF schematic"). I say "nearly" because I did not include the ECC608 Crypto Auth module and the LSDM6DS3TR IMU module (I assumed these are not relevant to successful BLE functionality - are they?)
The BLE.begin() is in my setup() function and there's nothing else in the app. The rest of setup() is empty and the loop() function is empty as well.

-- UPDATE --
I was told that I probably need to update the firmware for the NINA W102 BLE module itself (assuming that's the cause of the problem in my original question), so I followed the instructions here: https://www.arduino.cc/en/Tutorial/WiFiNINA-FirmwareUpdater (WifiNina 1.5.0 library installed - the latest). Every time I hit "Update Firmware" (see screenshot), I get an error message, "Programmer Not Responding. Make sure that FirmwareUpdater sketch is loaded on the board." even though I have successfully loaded the sketch. (Also by the way, I have the latest version of Arduino IDE (1.8.13)).
To dig deeper, I uploaded the sketch via a debugger, and found that it is stuck in this loop of the FirmwareUpdater sketch:
if (!ESP32BootROM.begin(921600)) {
    Serial.println("Unable to communicate with ESP32 boot ROM!");
    while (1);
  }

The closest available solution on the internet to this problem is here https://forum.arduino.cc/index.php?topic=654833.0 and it did not work for me (still receive the same error, and I think that solution is outdated anyway).


texts: SimCom SIM5360 sharing SD card with uController

texts:
I am designing a data logging system that uploads its data via 3G.

I'm going to be sampling an I2C sensor at 10Hz, buffering this in local memory (or FRAM), and then dumping the contents of the buffer to an SD card periodically (every few seconds).

Every 15 minutes or so, I want to upload the contents of the file to a web server using a 3G module (Sim5360). I understand that this module can be directly connected to an SD card, and can be instructed to upload files from the SD card. This will take processing effort away from my uC and will increase the upload speed that can be achieved, compared to streaming the data from the uC via the UART.

In order for this to work, both the Sim5360 and the uC need to have access to the SD card, requiring a multi master SPI bus. Is this possible?

As long as both devices have the ability to read and write from the SD card, I can ensure that there are no conflicts by simultaneous attempts to use the resource at the same time.

Please can someone tell me if this is possible and if there is anything special I need to do to make this functional?

Alternatively, if anyone has a better idea on how to achieve this, I'd love to hear it.


texts: How do I change the default silkscreen font size in Kicad?

texts: I'm trying to place a bunch of small text on the silkscreen in Kicad but I don't see where to change the default size. Where is this setting in Kicad?


texts: Do I really need lithium batteries? (1.5 V, AA)

texts:
I just bought a Skey indoor-outdoor weather station.

It comes with a separate outdoor sensor, connected to the indoor display unit by radio.  The outdoor unit needs 2 AA batteries and they specifically recommend lithium-ion ones because they work better in the cold.

But they are hard to find.  Mostly they are "photo" size batteries that won't fit in the battery compartment.  The one AA size I did find was 3.6 V (it said lithium but not lithium-ion).  I suppose I could slap one of those in, and jumper out the other side of the compartment; but that still leaves me 0.6 V over.

I rarely get colder than -7 °C 20°F here.  Do I really need lithium batteries?


texts: How many transistors/logic gates are used in the signal path between a TV studio and the restitution of the image on my HD-TV?

texts:
How many transistors/logic gates are used in the signal path between a TV studio and the restitution of the image on my HD-TV ?

You see what I mean ? I need a rough estimation...:-)

I especially want to estimate the number of purely digital-purpose transistors (logic gates) : that means how many SoCs (system-on-chip) are needed in the capture->mpeg encoding->transmission(source,channel coding)->etc..->mpeg decoding, and how many gates are in these SoCs.

Maybe some of you know partially (on one of those chips) how many gates are involved.

Together, maybe we can try to count them ?


texts: Altium Designer Deleted schematics completely

texts:
I opened up Altium after a windows update, and received this error:
[Error] ADF4355-3.SchDoc    Project ADF4355-3.SchDoc, could not be found and will be removed from the project.

I saw another post that said to just add the file back in manually after it removes it, but the file is completely gone. There is a backup that is just a blank schematic, and 2 of my libraries are gone as well. The recycle bin shows nothing.
Has anyone experienced similar problems or know if the data is recoverable?


texts:
I'm new in electronics and would like to build an electric brewery with an electronic control panel. I found on www.instructables.com one control panel and is described as in following image.

Could someone recommend me basic literature to start reading on how to make calculations / connection basics, etc?
Why is the SSR connected to the relay (green square on image)?
What is the purpose of that SSR on the given image, couldn't one of the relays be avoided?


texts: Snubber on the line or just the inductor

texts:
A document on the public internet, yet apparently covered by NDA, makes a surprising claim about snubbers.  vendor link or archive.org

Page 12 shows a device powering and switching an inductive DC load.

similar to this.

simulate this circuit – Schematic created using CircuitLab

The text claims that the diode is more effective if located close to the load
(A) but how can that be? By putting is closer to the source (B) is also snubs the inductance of the cable connecting the source to the load.

So is there a reason to put the diode at the far end? (other than the likelihood that someone want to add an additional switch near the load (location C)

I built a similar circuit to what they described once  and the diode near the load didn't offer sufficient snubbing to protect other electronics that was sharing the same cable. I had to put the diode at the relay end of the cable to get the electronics to survive the switching transients. I was using CAT-5e cable with two pairs for switched power and the other two pairs for power and data to the electronics.


texts: What is the relation (equation) between mileage output and charging frequency of an electric vehicle?

texts: What is the relation (equation) between output mileage (km/charge) and charging frequency (how many times an electric vehicle is charged in a day) of an electric vehicle?


texts: Grounding accessories in an automotive (~12V) system

texts: Have seen similar questions but not found a definitive answer, so here goes. Split charge and leisure battery fitted in my Volkswagen T5, and I want to run a USB charger, cigarette lighter charger and LED light set all from the fuse box connected under the drivers seat (with the battery). My question is whether it would be safe to ground all the accessories to the earth bolt under the drivers seat, where the leisure battery is grounded.


texts: How to measure supply currents ranging from 1μA to 10mA?

texts:
I’m building a battery powered data logger with a microcontroller and several sensors. I’d like to measure the supply current of individual parts with idle currents in the μA range and peak currents in the low mA range. The current is not constant which rules out a simple multimeter.

Usually I’d (temporarily) replace ferrite beads on the PCB with a 10Ω resistor and measure the voltage drop with my DS1104Z oscilloscope. However, the voltage drop of some μV for 1 or 2 μA of current is simply drowning in the noise and peak currents of ~10mA already result in a noticeable supply drop (so increasing the resistance is out of the question).

I was thinking about building a small board with a 5Ω resistor and OPAMP set to something like 100x amplification, but first wanted to know if this is a good idea or if you know of any affordable, ready-made solutions. Obviously the bandwidth doesn’t have to be high, but some accuracy would be desirable.

Thanks in advance.

Michael


texts:
I have a sub-module in a design that has it's own regulator, i want to use its enable pin driven by an MCU output to also toggle some other IC, say 10ms after the EN has transitioned.

I know i can just use two digital pins, but is there a way using an rc circuit or capacitor to do this in hardware?

Of course the alternative is to use a supervisor, but it'll be unnecessary if there's a cheaper way.

Update: The IC that needs to be enabled with some lag is active-low, and the purpose of the lag is to wait until the output of the regulator is at a stable Vcc.

One of these would be the most correct way, but the enable pin is coming from an MCU with its own brown out detector so some generous lag (not a time critical system) should suffice.

Edit 2: this is the IC.


texts: I'm losing data when my Raspberry pi talks to its USB connected Arduino

texts:
Some very simple code, which I got somewhere on the Internet
Arduino:
void setup() {
  Serial.begin(9600);
}

void loop() {
  if (Serial.available() > 0) {
    String data = Serial.readStringUntil('\n');
    Serial.print("You sent me: ");
    Serial.println(data);
  }
}

Raspberry Pi code:
#!/usr/bin/env python3
import serial
import time
if __name__ == '__main__':
    ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=1)
    ser.write(b"Hello 1 from Raspberry Pi!\n")
    time.sleep(1)
    line = ser.readline().decode('utf-8').rstrip()
    print(line)
    time.sleep(1)

    ser.write(b"Hello 2 from Raspberry Pi!\n")
    time.sleep(1)
    line = ser.readline().decode('utf-8').rstrip()
    print(line)
    time.sleep(1)

    ser.write(b"Hello 3 from Raspberry Pi!\n")
    time.sleep(1)
    line = ser.readline().decode('utf-8').rstrip()
    print(line)
    time.sleep(1)

So the plan is to send some data from the Pi to the Arduino and get it echoed back, but always the first line is missing. I appear to see just a blank line coming back ie a line feed.
The output:

vagrant@vagrant:~$ ./fine.py

You sent me: Hello 2 from Raspberry Pi!
You sent me: Hello 3 from Raspberry Pi!

So where is the first line disappearing to?
George


texts: RS HMP4040 doesn't answer on emulated COM port

texts:
I try to control my NMP4040 via USB-emulated serial COM port.

I have downloaded the driver from here. And I have assigned the driver to the device:

I have connected to COM3 with PuTTY:

The terminal comes up, but it does not answer for any command. I try to enter *IDN?, which should echo the Identification Query, based on this manual.

What did I wrong?


texts: Thermal Modeling of 0805 Thick Film Chip Resistor

texts:
I recently got confronted with the question what peak/pulse power a standard 0805 thick film resistor can withstand.

Background:
We are designing a 2kW bidirectional DCDC converter. The Primary side is fed by a 3-phase generator/motor (rectified and smoothed) with 180V DC, the secondary side is connected to a 28V battery.
The generator/motor is attached to the drive shaft of a combustion engine.
There are two operational modes:

Combustion engine is off, power is drawn from the battery and stepped up to start the combustion engine by using the generator as motor.
Combustion engine is running and driving the generator à power is drawn from the generator and used to charge the battery (and supply some other stuff)

On the secondary side (28V battery) an LC output filter is implemented with and parallel RC damping circuit for the filter resonant frequency (see figure below).

Problem Statement:
When the battery is first connected to the secondary side the damping resistor has to handle a large current pulse to charge the 120µ capacitor.
At first we used a standard 0805 resistor but during review the power capability of this resistor was questioned.
Of course there are resistors which have specified pulse power capabilities mentioned in their datasheets but  I was curious about what a standard thick film could handle and don’t just hit it with some big resistors.
The design is also very limited in physical volume and weight therefore I want to find the best solution for the problem.
That’s why I tried to build a thermal model of a 0805 thick film resistor in LTSpice.

The Model:
The heat power in a thick film resistor is naturally generated in the resistive element (the resistive film). The film is attached to the substrate with a specific thermal resistance.
The film also has a specific thermal capacity, as has the substrate. I found this (table 1 page 6) document which states that the thermal resistance between film a substrate of a 0805 resistor is approximately 38°C/W.
Also I found in this document that the film is 10µm thick and can be made of eg. silver or palladium.
The isobaric volumetric heat capacitance of silver is 2.44 J cm-3 K-1.
The footprint of a 0805 resistor is 2mm x 1.25mm.
The volume of the thick film is in best case 2mm x 1.25mm x 10µm = 0,000025cm³ à therefore the heat capacity of the film is 0.061mJ/K and the heat capacity of the aluminum substrate approximately 1.5mJ/K respectively.

Considering the above I came up with the LTSpice simulation simulation is here on dropbox

Question/Results:
According to the Spice simulation the resistor film will peak with ~670°C which is mostly dependent on the heat capacitance of the film because the thermal resistance to the substrate is too big.
I also made a lab test setup which resulted in a cracked 0805 chip resistor.

My questions are:

Is the approach of the model acceptable or have i made some fundamental errors?
I could not find information about the maximum temperature the film is allowed to reach (datasheets dont differ between film, substrate and leads temeratures as they do with eg. ICs where you can find junction and case temperatures etc.)
Is this generally worth to be considered or do you normally just take a few more resistors and don’t waste time how I did?

Thanks in advance


texts: Is it possible to convert 19.5V 3.33A to 12V 5.5A?

texts:
I have a laptop charger which has 19.5 V 3.33 A output. I want to use it for raspberry, which needs 5V and 2.5A and for monitor which needs 12V 3A. Is that charger strong enough to run the whole system? Is it possible to convert 19.5V 3.33A with a buck step down to 12V 5.5A which will be connected to monitor and then use an another step down to 5V 2.5A to feed the raspberry, or I have wrong idea about everything? Sorry I do not know much about electrical engineering.
Thanks!


texts: Does anyone have any recommendations on an embedded platform that would be able to handle RS232 at 921600 baud and log it to a microSD card or something similar?


texts: Any problem with this strain gauge configuration to increase resolution?

texts:
I'm new to using strain gauges, but I've seen the typical 1, 2, and 4 strain gauge wheatstone bridge configurations. Using the diagram below, I'm referring to where R3 is a gauge, or R3 and R4, or all are gauges. Note: for this example, I'm assuming all resistances are equal when no strain is applied.

I know that if R3 and R4 are gauges and attached such that when one is under compression the other is under tension, that you get a higher resolution of the strain compared to only having a single gauge. This also helps to cancel out changes in the gauge resistance due to temperature.

My question is if R3 and R1 are gauges, where they are both attached so they see the same strain (if R1 is compressed, R3 is also compressed), this should also increase your resolution, right? Sometimes it's not feasible to have two gauges with opposing forces on them, so I thought this might be a good way to increase the resolution using two gauges when you can't configure them with opposing forces. Below is a diagram specifying the gauges just for clarification:

The problem I see if that the temperature effects will be doubled instead of canceled out (like they are when R3 and R4 are gauges), but maybe that's not a problem for some applications.

Is there a better way to increase the resolution using a second gauge when the gauges can only be attached the same surface, or if not is there any other problems with my proposed configuration? Thanks for any feedback!


texts: Connecting a single LED to Motherboard CHA Fan Header

texts:
I've been reading that it is possible to connect a LED to the motherboards CHA fan controller. The LED I had in mind was this

Online people have been saying you would need a resistor as the voltage may burn out the LED otherwise. What I'm not understanding is how I determine the necessary resistance. The LEDs website says it runs at 9~14.5 VDC, it also says the Current Draw is 50mA

This answer says $$Resistance = \frac{Source\,Voltage - LED\,Forward\,Voltage\,Drop}{Desired\,Current}$$

But what is my Forward Voltage Drop? Would my desired current be 50mA and the source voltage 12V.

Also how would I go about connecting the two wires from the LED to the pins on the board. Would something like this be appropriate.


texts:
These solder joints on the connector look strange to me (tarnished purple).

In a more "advanced" state, they end up looking like this:

In the last image you can see, it even "ate" the plating on the mating surface of the connector, while two of the pins are still looking normal.

What is going on here?

Bad process? Wrong solder / mix of materials? Mishandling while in storage (the board is intended to be used in an normal everyday environment, thus I would assume, it should not happen due to normal surrounding parameters)?

Edit: the boards were bought from a company as a product, so no soldering on my side involved (so far).

Edit: new images:

Would the last one looks like rust(?) while the other one looks purple-ish.


texts: Using kirchoff's laws to solve a circuit

texts:
The image shown above is for a complex circuit where every resistance in it equals 4Ω, and I want to determine the total current intensity ( the intensity of the current getting out of the battery Itot.) could you please help me because I solved it many times by kirchoff's laws and I got different values in every time. The values I got were variable for examble I got 6.6667A and another time I got 3.11A and another I got 16.5A.
Could you please tell me how to solve it or if one of my answers was correct.
Remember all the values I mentioned were for Itot.
That is one of my works, I would complete it here,
Equations are: (1) 15=i₁−i₂+i (2) i₂=2i−3i₁ (3) 0=4i₂−2i+i₁
 From equation (2): 15=4i₁−i-----> that would be(4), and 0=6i−11i₁--->(5)
                 (4) times 11: 165=44i₁−11i
                 (5) times 4 : 0=−44i₁+24i
Adding the last two equations to easch other results in i=12.69A, and i in my equations represented Itot. Where is the wrong, please guide me and correct it!


texts: MAR vs Stack Pointer, Whats the difference?

texts:
So I was watching some videos on a guy "Building his own 8-bit computer", and the Memory Address Register (MAR) was attached to the SRAM. The MAR took the next Program Counter value and then looked in the SRAM for the next instruction and put it on the Instruction register. (Sidenote: Why doesn't the Program Counter just go straight into a decoder instead of the MAR which is basically another register?)

Anyways, I was looking at the ATTiny85's datasheet and noticed that the "Stack Pointer" was linked to the SRAM in the block diagram (I only understand some of the basics here so apologies if this is a really stupid question). The Program counter in this case was linked directly to the SRAM and the stack pointer pointed at the SRAM as well.

Im curious exactly how this works? Im just learning Computer Architecture so some of this stuff is out of bounds in what i've learned...but Im very interested in understand how a CPU works at the base level.

Maybe im confusing SRAM and program flash in this case though. In that case then where is the MAR?


texts: Unknown diode identification (27 XD or XD 27 markings)

texts:
Very much a novice here. I was attempting to repair an integrated control unit board from a 1990 honda/acura integra, but alas what I was hoping to be an easy fix is turning into more than I can handle. There is a common issue with these ICU's and the capacitors leaking... should have been an easy fix.

Once I get the thing open, both capacitors don't really look like they have been leaking, but I did find some burn marks between the anode side of a diode and (?). The diode was also a bit corroded, and some slight pressure caused the cathode lead to break right off.

My main concern is even finding a replacement diode now. The only markings I see on the diode are "27 XD". I'm not having much luck on finding info about this.

The voltage drop (if im reading this right) is about .627 to .638, but i'm not quite trusting of those numbers.

Pics of board and diode: http://imgur.com/a/OdQud


texts:
I've designed a custom board. and  I have a problem with the supply part:

the board should be supply using a lipo battery **B100 header **, this should charged using an USB cable.

the board works fine when I use the cable but I put both: cable + battery  the supply part heats quickly up, so that I plug the cable off.

Any Idea how may I solve this ?
thanks in advance !


texts: How to monitor an actuator's feedback line from a microcontroller?

texts:
the AG-020-B electric actuator is controlled from a microcontroller. Terminal 1 is connected to the DC PSU GND, Terminal 2 is connected to the +24VDC via a high side Power MOSFET(TPS22810) as shown below. This is for power saving.

Low side MOSFET (AUIPS1021) Q5A and Q5B are used to control the opening/closing of the valve via terminal 3 and 4. The microcontroller I/O lines Valve_Ctrl_1a and Valve_Ctrl_1b provide a 3.3V signal.

Comments are welcome regarding the power and switching circuitry.
Any suggestion on how to monitor the feedback lines on terminal 8 and 10 from a microcontroller. A lamp is not suitable as the system will be enclosed in a box.


texts: Auto-negotiation and link training in 10GBASE-R standards family

texts:
I'm selecting PHY IP core for our future chip supporting 10G ethernet.

I have some confusion regarding which 10GBASE-*R standards have auto-negotiation and link training features.

10GBASE-KR, which is for backplane and does not have connector like SPF+ has both features.

Do other standards, like 10GBASE-LR, -MR, -SR or SPF+ Direct Attach (all use SPF+ connector) have that features? If not, do they just send 64/66b encoded bitstream without any link preparations?


texts: What does this key looking symbol (with 4 bars) indicate?

texts:
Im currently studying for my NEN3140 exam and I stumbeld acros this image:

I have been poking around in google (and all the symbol questions I could find here) and the closest I got is this (page2):

https://www.reconelectrical.co.uk/image/data/pdfs/Electrical%20Symbols%20Guide.pdf

which makes me this it is a "Switch, general symbol double pole", after googleing som more I can find the top right symbol back as a double pole switch

But I can't find the "key/switch" with 4 bars/poles? back. Is it safe to think this is a 4 pole switch or is it somthing else?


texts: How to construct CMOS equivalent of an XNOR gate using AND, OR, NOT gates?

texts:
I am new to digital logic and I am confused hot to construct CMOS equivalent for XNOR gate using AND, OR, and NOT gates.

I found XNOR circuit implemented with gates.

And what I did is I plugged CMOS circuits for inverter, AND and OR.

I doubt it is right thing to do.. but I have no idea how to do it other way.
Need you help!


texts: Resistor value selection for PWM dimming of Meanwell LED driver

texts:
I'm controlling a Meanwell LED driver's dimming function using 0-5V PWM from an Arduino, stepped up to the 0-10V PWM the driver expects.

Here is the circuit.

'0-5v' is the 5V PWM from the Arduino
'VCC' is the 10V 500uA wire from the driver's DIM+
'0-10v' is the 10V PWM output back to the driver's DIM-
'Q1 NPN' is a 2N2222 transistor

I could use some guidance on selecting proper resistor values for R1 and R2, given the function of the circuit and VCC at 10V/500uA.  I've been advised that the given values may be inappropriate for such a low-current VCC.

(I recognize that this circuit inverts the PWM signal and have accounted for this software-side.)

Thanks in advance!


texts: How are metal leads on through hole parts made?

texts:
For example, consider a TO-92 packaged part:

How is one of its leads manufactured?  Can they be customized?


texts: Control variable external power supply with Arduino

texts:
I'm currently working on an air pollution controller project and I have a problem to control an external power supply to supply 5V, 1.5V or 0V to an MQ7 gas sensor.

Using the direct PWM output to power the MQ7 is a bad idea because it drains 150mA at 5v for heating. I planned to control the voltage through a NPN transistor. The voltage of 5V and 1.5V are important to be sure that the output values are consistent.

I started with Experiment 1 which was to obvious way of achieving it for me. The PIN 2 (PWM) controls the S8850 NPN transistor.

With Experiment 1:

Voltage measured at points A and B.
Without the MQ7, the voltage was just great (5V, 1.5V and 0V depending on analogWrite() values)
With the MQ7, the voltage dropped to 3.8V, 1.1V and 0V with the same analogWrite() values)

So, with Experiment 2 using an external power supply (maybe the Arduino cannot manage the drain of 150mA which leads to a decrease of voltage...)

With Experiment 2:

External supply for the MQ7.
Voltage measured at points A and B.
With the MQ7, the voltage is correct (5V, 1.5V and 0V with the same analogWrite() values) as long as I provide 8V on the external power supply.

For the record, a snippet of the code :

const int PIN_MQ7_POWER = 2;

void setup() {
  // Prepare serial console
  Serial.begin(9600);

  // Prepare heater/power MQ7
  pinMode(PIN_MQ7_POWER, OUTPUT);
}

void loop() {
  Serial.println("Switch to 5v");
  digitalWrite(PIN_MQ7_POWER, HIGH);
  delay(10000);

  Serial.println("Switch to 1.5v");
  analogWrite(PIN_MQ7_POWER, 255/5*1.5);
  delay(10000);

  Serial.println("Switch to 0v");
  digitalWrite(PIN_MQ7_POWER, LOW);
  delay(10000);
}

I checked the internet and all schematics use direct output of the Arduino to power the MQ7 (through PWM). IMHO, it could work for an experiment of some cycles in the lab, but not for a long-term solution.

The usage of an 8V additional power supply is not convenient and I'm pretty sure that it is possible to have a better schematics to select the 3 different voltages easily from the Arduino.

Any ideas how to achieve it?


texts: AVR - How to program an AVR chip in Linux

texts: I recently got an AVRISmkII AVR programmer, and I have an ATtiny85 and ATmega328. I was wondering how I could program these chips (with the programmer) but when I try getting Atmel Studio 6 it is only for Windows. Is there a way I could use in Linux (Ubuntu specifically)? Ant suggestions? Thanks!


texts: Phase shift and its importance in audio amplifiers

texts:
I've just begun building a bass (20-200Hz) class D amplifier and already ran into some problems.

The audio source is a car radio with 1V p-p signal. I firstly feed that sigal through a band-pass filter with corner frequencies at about 20Hz and 200Hz. This is how it looks like in LTspice:

Upper three op-amps are configured as high-pass and lower three as low pass active filters. The frequency response of the circuit looks good, but there is -100 to -1300° phase shift. I am wondering what is the importance of phase shift in such amplifiers? Can I just ignore it or should I compensate for it? How would I go about compensating the phase shift?

Note that I am building this for learning purposes and the output doesnt have to be/wont be really clean or anything like that. But I would like it to "sound" reasonably well, so will the phase shift cause distortions or anything like that?

EDIT:

9Hz to 500Hz area, their attenuation levels are ~30dB.

EDIT2:

100Hz to 500Hz area zoomed into 0dB to -30dB attenuation level.

EDIT3:

This is a picture of plotted group delay vs frequency.


texts: Simple constant current regulator for a 1.6A laser LED

texts:
My intent is to build a simple driver for a laser LED with an operating voltage of 4.6 volts and forward current 1.6 amps. I have some spare LM317s that I would like to use, however they can supply 1.5 amps at most with proper heatsinking. Can I use multiple of them in parallel like this, or should I completely scrap this schematic? I suppose each of those should deliver 500 mA making it 1.5 A total.

Also, if this circuit actually works, how can I calculate the power loss on the LM317 regulators?


texts: Biasing arrangement - common gate amplifier

texts:
I'm just really confused at the moment with biasing all these different MOSFET amplifier arrangements. Here is one,

This is a common-gate amplifier and I am told that it is biased by a constant current source. And that's what I don't understand. How is that current source biasing the MOSFET? Shouldn't the current that is passing through R_D be setting the MOSFET in saturation?If so, what is the point of that current source?

Secondly, maybe I am misunderstanding what biasing truly is. I always thought that the biasing arrangement is the circumstances around a transistor that pushes into one region or another.


texts:
When I try to simulate my schematic for my up counter, i get the error

  Net "Net-name" cannot be connected both to an input port and an instance output pin.

Here is my schematic

I am pretty sure the error is because of how to output of the flip flops is sent back into the input, but I thought that is how the design of an up-counter is supposed to be implemented. Is that not true?

I found this when searching the error, which states:

  "Error: DesignEntry:222" indicates that an I/O Marker with an Input Port polarity is connected to an output pin of one of the symbol instances in the schematic drawing. This is not allowed, as it would create an electrical source conflict.

I think that this is my problem, but I am not sure what to do about it. I would appreciate any help, thank you.


texts: Inferring BUFGMUX in Xilinx FPGAs for Clock Multiplexing

texts:
I have a VHDL memory core which requires me to multiplex between two clocks. The Write clock operates at 200 Mhz and Read clock operates at 100 Mhz. I think this can be done using BUFGMUX (correct me if there is a better way to do this)

Is it possible to somehow infer this in VHDL instead of instantiating it ? What are your experiences with this ? Can you post some sample code ?

* EDIT *

The READ ports are completely occupied and need to be used simultaneously. The write operation will occur only once in the start as an initialization step.

RRS


texts: Using UART to program a device with another sensor connected to the same UART - how to disconnect TX when the device is programmed?

texts:
I have a device which I'd like to program without my physical presence.

The problem is when I connect TX, RX and GND to my device, a sensor which is connected to the device through the same UART is not working. I have to manually disconnect Device's TX <-> USB-UART converter in order for it to work.

I want to program the device and after that be able to receive data.

How can I detach my USB-UART converter's TX line?

I was thinking about making another device which would disconnect the line but I'm not sure what it should use? Maybe a simple transistor would be alright?


texts:
I am wanting to provide +ve and -ve 12V power rails from a 12 AC PSU using the appropriate rectification, regulators, smoothing caps etc.
The max current draw on the +ve rail is 1300mA and 800mA  on the -ve rail.
I have found a 1600mA PSU.  Am I correct in thinking this will provide enough current, because the draw on the + and - rail isn't at the same time?
Or should I be looking at the total of both rails (plus headroom) e.g. 2.5-3A.


texts:
I need to implement an asynchronous receiver USART. The length of the frame is 12 bits.

I looked into implementing this with a pic 16F1455 but it only supports 8-9 bits: "Programmable 8-bit or 9-bit character length".

Question: Is there any simple way on how to do this?
I tried bit banging the data, but my timer is not accurate enough.


texts: Why does frequency splitting happen when two resonant circuits are magnetically coupled in wireless power transfer?

texts: When two circuits are tuned to a self resonant frequency and are then magnetically coupled, the resonance happens at multiple frequencies if they are near. How and why does this happen?


texts: I've got a water boiler I want to add a switch to. It has a rating of 120v 60Hz and 1000w. Would I need to find a switch that is capable of withstanding 1000w or is that irrelevant to the switch? Thanks!


texts: Electrostatic Discharge on new Workbench Setup

texts:
I'm setting up a table at home to do some electronics work (assembling microcomputer kits like the Maximite 2 and similar projects that require handling of sensitve IC chips).
I have a desktop lamp that is made of metal and I'd like to use it as a way to discharge any eletrostatic discharge built up on myself before handling any sensitve electronics, as I'm pretty sure the lamp's metal case (when plugged in of course) is grounded.
My question is, how do I test this? How can I be positive that when I touch this lamp I'm connected to ground (and so will discharge any electron build up on me)?


texts: Replacing Dallas NVRAM with larger capacity variant?

texts:
This DS1225AB-200 (8k x 8 = 64kB NVSRAM) is from 1995 and is probably dead (cannot measure from the outside.)  The only close replacement in stock is a DS1230AB-100 (32k x 8 = 256kB.)

Looking at the two datasheets, the pin-outs are identical except for the inclusion of A13 and A14 on the larger-capacity variant. Can I statically pull these to a rail and have it work?
Any other caveats to consider?  The timings look similar as well.


texts:
Here there's a question that I'd like to double check with you lot.

According to an article on impedance, the voltage across each of the tape recorders in the image is divided by two. Is that so?

Thanks for your time!


texts: I'm interested in capturing analog video in NTSC and transmitting it as efficiently as possible over a digital link, preferably while maintaining as much fidelity to the original signal as possible. My thought was that the video signal might be able to be sampled with a high-speed ADC, the samples transmitted, and the signal reconstructed at the other end with a DAC. Is this possible? If there's a better way of doing this, by all means share!


texts:
I am trying to convert highly parametrized VHDL code to verilog. This VHDL code uses good amount of packages and records and I couldn't find the substitute for those in verilog. Also I am just 3 days old in verilog.

Package and entity files in VHDL are as follows:

package control_package is

type control_ca_out is record
   reset           : std_logic;
   end record;

type control_in is record
  clk             : std_logic;
  ha              : psl_control_in;
  dc              : dma_dc_out;
end record;

type control_out is record
  ca              : control_ca_out;
  ah              : psl_control_out;
  cd              : dma_cd_in;
end record;

entity control is
port (
   i                           : in  control_in;
   o                           : out control_out
);
end entity control;

Package and entity are in separate files.
How do i implement the same in verilog? I know there's a way of packing all fields of records in single vector and then use part-select to access different fields of record. How could I include them in separate module in verilog?


texts: Powering up raspberry pi 3 b+ with one 11.1V 3S 2200mAH 30C Rechargeable LiPo Battery

texts:
I wanted to power up my raspberry pi with the only lipo battery I have which is a 11.1V 3S 2200mAH 30C Rechargeable LiPo Battery.

I done some research, and most of them used a voltage regulator to step down the voltage. However, I'm facing dilemma of choosing between two voltage regulator:

LM2596 3A DC-DC Adjustable Step Down Voltage Converter Module
XL4015 5A Adjustable Step Down DC-DC Module

I'm worry that:

Will LM2596 become too hot when supplying power(2.5A) to raspberry pi?
Some suggest to use XL4015 5A because it won't be too hot when supplying power to raspberry pi since rated current for raspberry pi is 2.5A. However, I'm worry that will the raspberry pi draws too much of current since XL4015 can supply max 5A.
This is because I found out from one post "The RPi 3+ board is protected by a special fuse which permits no more than 2.6A. If the user attempts to draw more than that then the RPi will become unstable, crash, reboot etc." [https://www.raspberrypi.org/forums/viewtopic.php?t=230915]
Lastly, after I adjusted the output voltage to 5V for raspberry pi (when lipo battery is fully charged), will the output voltage from these voltage regulator drops if the input voltage from lipo battery drops (after powering raspberry pi for a period of time)?


texts: method of locating schematic part on board layout?

texts: In a design with a large number of parts it can be difficult to immediately pin-point a part's location on the board.  Is there an easy method of finding a schematic part's location on the board layout?


texts:
My brain seems to be stuck on this very basic circuit design question. I want to power a 24VAC load (solenoid valve) with the help of a switch (triac). This switch, however, creates a voltage drop of approx 1V. In order to power this circuit, should I get a 25VAC power supply or should I just ignore this small drop?
I assume the load will work just fine, but I would like to know how this would be solved in a proper way.


texts: Reducing GPS coldstart if we know where the user is

texts: I'm working on a project with GPS and I was wondering if it would be possible to reduce the cold start time by passing in some data. Let's say I already had a fairly good idea of where the user was because this GPS was to be used only in a certain theme park. Could I pass in that data and reduce the cold start time? If so on which chipset would it be easiest to implement and how?


texts: I am just taking a electronics course, and i am trying to understand how to build a flip flop circuit.  I would like to build a circuit that has one push button, and one led.  Each time the push button is pressed the state of the led would change on to off or off to on.  I found this circuit http://www.josepino.com/light/led-flasher-circuits1 and i built it and it worked, but i was wondering if i could possibly adapt it to suit my purposes since it says it is similar to a flip flop.  Additionally, because i am short on supplies i would like to use only transistors, resistors, capacitors, diodes, leds, and switches in the construction of the circuit.  The only examples i can find online of a flip flop is a flip flop where a manual reset is necessary.  I believe what i currently have is an astable multivibrator, and i think what i am trying to build is a bistable multivibrator.


texts: What are the use cases for a closed solder jumper on a PCB?

texts:
I've come across the the symbols for closed solder jumpers in design libraries, and now I came across one in a design. I get why you might include an open jumper that could be solder closed, but what is the use case for a solder jumper that is already closed in the pcb layer?

An example of the symbol:


texts: What am I doing wrong here? LED and Multimeter [Noob]

texts:
As a disclaimer, I am new to this and this is my first multimeter but I have tried researching this problem before asking here, I seem to be doing what the other people do in videos but getting no results.

I bought some LEDs and a resistor kit along with an arduino Uno R3.
Just to show that the components were working I connected them to the arduino and ran the blink demo.

To get started with my multimeter i decided to measure resistance of my resistors and all was good. I tried a 10ohm and 220ohm resistor and got the desired results.

Then I wanted to try the continuity setting. Hooked up the multimeter to just some wire and it beeped as expected. Then I connected across the resistor but got no beep. I was a bit confused as I thought it would work. Is that possible to do? My thoughts were it as a quick way of checking if resistors were still working as opposed to checking for infinite resistance. I put a pin in this one because i wasn't sure but couldnt find an answer to this.

I consulted the manual and it said the following about continuity and diode check [next]:

Ah ha! surely this is the cause of no beep seeing as a was using a 220ohm resistor. I replaced it with a 10ohm resistor but still no beep. Im confused again, sigh.

What is meant by?

  *Open voltage: about 0.5V

After this I tried to use the diode check and calculate the forward voltage drop. Using the LED that I knew was working at the time i connected it as followed with COM on the cathode and + on the annode:

Now I was confused again because on most videos their LED would light up even if not so brightly. Mine doesn't. Also, the display sits on .0L with no change.
I tried switching to continuity and there was no beep (although I don't think it should work in regular use?)

What the manual says about diode check is posted above.
is the multimeter not providing enough to overcome the forward drop and thus not able to measure anything? or am I doing this completely wrong?

Serious apologies for the long post but I haven't gotten much progress on my own.


texts: How to overcome 3.2 mm x 2.5 mm smd crystal pinout differences

texts:
As i am currently designing a project involving a stm32f446ve that requires semi good timing, I am looking into using a crystal oscillator.

As this is still an early prototype, I would like to be able to fit as many different crystals as possible, and after some research determined the 3.2 x 2.5mm footprint is perfect for my need as it is also fairly small.

However, there are slight differences in the pin out. Namely, some wire the crystal itself to the bottom left and top right pin, while others wire it to the bottom right and top left pin. As an example:

http://www.mouser.com/ds/2/40/cx3225sb_e-514166.pdf

vs

http://www.mouser.com/ds/2/122/ecx-32-6206.pdf

To be able to use both, I though it might be a good idea to connect both pins on either side, to connect to the crystal no matter what pins on that side it is connected to. However I have never worked with crystals before and am not sure if shorting the two pins on either side of a crystal is a good idea. As far as I can see however, the pins to which the crystal is not connected are also not connected to anything internally.


texts: DC Motor bridge driver L298N. Why separate the tracks after R sense resistors from GND plane?

texts:
The L298N datasheet says:

  The sense resistor, not of a wire wound type, must be grounded near
  the negative pole of Vs that must be near the GND pin of the I.C.

why not in common GND plane?
If I connect resistors to the common ground, how does this affect the operation of the device?
Thx.


texts: You can't use them for more than 5 variables efficiently and no "real life" circuit has only 5 variables (except for the simplest of them). So what's the point of them? They seem pretty useless for actually engineering work.


texts: What does "Mean Voltage" stand for in an Oscilloscope?

texts:
Most digital oscilloscope have some measurement options besides just displaying the signal. These include "RMS value", "Mean Value" and the like.

Is the "mean voltage" value of a signal shown in an oscilloscope "average value" or "dc offset" of that signal?

What is the meaning of these measurements? How Do I use them? When do they even make sense?


texts: How to determine operating frequency range of an unknown 2-port device (with VNA)?

texts:
I have a question on hand:

"You have an unknown 2-port device, the black box. Find the operating frequency range. Show how to do this with a VNA. Think of the settings, why?"

VNAs can have a very broadband operating frequency range from DC to e.g., 8 GHz. If the measurements are noisy, then you may see frequency selective characteristics of S11, S12, S21, and S22 parameters. So, how would you judge? This is like hunting in a dark, or? do you have a clever suggestion?


texts: Find charge per unit length of conductors

texts:
Sorry if off-topic but I have a question in electrostatics. I didn't get any usefull answer at physics forums. The problem states:

Three very long (theoretically infinite long) hollow cylindrical conductors, with radius a,b,c,(c>b>a) are in vacuum. Inner and central conductor are charged, and outer conductor is grounded.  Potentials of inner and central conductors with reference point relative to outer conductor are Va,Vb. Find charge per unit length of all three conductors.

I used Gauss's law to find electric field of one cylindrical conductor, which is $$E=\frac{\lambda}{2\pi r \epsilon_0}$$ Derivation of Va gives $$V_a=\int_a^b \frac{\lambda_a}{2\pi r \epsilon_0}dr+\int_b^c \frac{\lambda_a}{2\pi r \epsilon_0}dr=\frac{\lambda_a}{2\pi  \epsilon_0}\left(ln\frac{b}{a}+ln\frac{c}{b}\right)$$ Derivation of Vb gives $$V_b=\int_b^c \frac{\lambda_b}{2\pi \epsilon_0 r}dr=\frac{\lambda_b}{2\pi\epsilon_0}ln\frac{c}{b}$$ Now, charges per unit length for first two conductors are $$\lambda_a=\frac{2\pi\epsilon_0 V_a}{ln\frac{b}{a}+ln\frac{c}{b}}$$ $$\lambda_b=\frac{2\pi\epsilon_0 V_b}{ln\frac{c}{b}}$$ Using superposition, charge per unit length of third conductor is $$\lambda_c=\lambda_a+\lambda_b$$ Could someone check if this is correct? I am not sure if the limits of integration for potentials are right.

Thanks for replies.


texts: Can you identify immersionRC transmitter crystal?

texts: Please identify this crystal. It's from immersionRC 600mW video transmitter. Labeled S80003H. I have another one labeled S80009F from same brand transmitter 100mW, they are same, whats difference?


texts: Controlling Voltage or Current with a PIC

texts:
Although I have a fundamental understanding of electronics, I still have much to learn and this one has me stumped.

I am trying to control the speed of a TB Woods SM1 AC Inverter drive that in turn controls an AC motor. My options for speed control are a 0-+10v analog signal, a 4-20mA analog signal, or RS485 via a port by the same name on the drive to set the frequency (0-60Hz). I am unfamiliar with RS485.

Does anyone know how to control this with a PIC? I am planning on using the PIC18F4520. I can spare 8 bits of binary output pins, if I have to.


texts: I have attempted the following question on this circuit with a bjt. As I have learned in my electrical engineering class, I can replace the transistor with the following circuit and assume it is in linear mode. Once I solve it using mna, I can determine whether it is in cutoff mode, or saturated. Accorded to my calculation it is in neither? Could someone please assist me as  I am new to this topic and I may lack some understanding somewhere.


texts: Basic 12V Step-Start Circuit For Automotive Fans: Troubleshooting

texts:
To keep this short and sweet, I wanted to make a circuit/controller to decrease the inrush current on a large powerful fan for my race car. I ideally just wanted something that wouldn't let the amps peak when the fans turns on from a dead stop, and then settle at their steady state current. The fan is large, and is reported to have spikes as high as 80 amps before settling to its steady current of about 30 amps. The fan also has two speeds, by powering one of two coils that share a common ground. (3 wire fan motor).

A very experienced and talented EE on my car forum pointed me to using a simple step-start circuit, to limit the begining current to allow the fans to get up to a decent operating speed, then a few seconds later allow full current for full fan speed. We worked back and forth and came up with the following circuit:

Note there are two different discrete circuits for each fan speed. The main relay is powered by a 12V switched source so the fans only work when the car's ignition is on, and Relay 2 (low speed) or Relay 4 (High Speed) is activated by teh car's ECU grounding pin 86 on either relay. A simple on-on switch is used to select which relay the ECU grounds and activates, selecting the speed.

I just finished it tonight, and after testing have a few problems. The big power resistors do a perfect job of limiting the fan'starting current, but relay 3/5 never kick on after a few seconds as planned to short out the power resistors and provide full current.

Does anything stand out in the diagram above? I have triple checked my wiring, and everything seems correct. The polarity and pin assignments of all the components also seem correct. NOTE: I AM NOT AN ELECTRICAL ENGINEER. I am a mechanical engineer, who is very handy with 12V auto electronics, but this is one of my first explorations with a small circuit. Even though I am sure this circuit is trivial to alot of you, I do not know the specifics of how this transistor operates or should properly operate for the system to behave like I want.

From my initial observations (lets just focus on the low speed circuit at the top of the diagram), the voltage at the base of the transistor when I energize the circuit builds voltage from 0V to .465V over about 2 seconds or so. The collector of the transistor seems to always have 8.8-9V across it from the instant the circuit is energized, and stays at that voltage until I remove power from the circuit.

From here I am not exactly sure where to go. Could it be just a simple issue of the wrong resistor at R5 or capacitor C1 is providing too small a current to switch the transistor? Should there be that 8.8-9V at the collector of the transistor at all times, or is that an issue? The relay (#3) may not have the needed voltage to activate with only 8.8-9 volts?


texts: DIY electromagnet using copper wire and AC adapter

texts:
I want to make for some demonstration (caching some paper clips on ON and doping them on OFF) electromagnet made from copper wire (should it be single wire?) with ferromagnetic inside coil:

As power source I am going to use Panasonic POLV19CE AC ADAPTOR
INPUT: 220-240V ~ 50/60Hz 40mA
OUTPUT: 6V DC 500mA

Is it safe to use this adapter as power source of the?
Is the power of the adapter enough?
The copper wire is enough or it is necessary to add some resistance?


texts: What is the purpose of tiny "bumps" on LED legs?

texts:
A lot (if not most) LEDs have some kind of small thickenings on their legs. Sometimes they are almost as wide as the leg itself and barely visible, sometimes they are twice as wide and instantly noticeable.
When present they seem to be the same on all legs, so I doubt they are used to indicate anode or cathode. The only explanations that come to mind are:

They are a manufacturing by-product, possibly a place for holding LEDs during manufacture.

They are designed to provide a bigger soldering surface.

Here's an image that shows them on both legs (sized 1 x 0.6mm):

They might not be specific to LEDs alone, but are commonly seen on them.


texts:
I'm trying to find the stored charge on capacitor1 at time \$t\$

So, I think I have to find the voltage on the capacitor first.
In terms of Current, the total current \$I(t)\$ should be the sum of the current on \$C_1\$ which is \$I_1(t)\$ and the current on \$R_2\$ (\$=\mathrm{d}Q_2(t)/\mathrm{d}t\$).
I mean...
$$
I(t) = I_1(t)+I_2(t).
$$
And when we look at the outer loop, the total voltage \$V\$ should be the sum of the voltage on \$R_1\$, \$R_2\$, and \$C_2\$, so
$$
V-R_1\cdot I(t) - R_2\cdot\frac{\mathrm{d}Q_2(t)}{\mathrm{d}t} - \frac{Q_2(t)}{C_2} = 0
$$
Similarly, at the inner loop, the total voltage \$V\$ should be the sum of the voltage on \$R_1\$ and \$C_1\$, so
$$
V - R_1\cdot I(t) - \frac{Q_1(t)}{C_1} = 0
$$
But here, I don't know what to do....

Plz help me :(

PS

I didn't learn about the Thevenin theorem
when \$t=0\$, there was no charge stored on \$C_1\$ and \$C_2\$


texts: What edge connector for prototype board?

texts:
For personal hobby projects I'm using prototype boards like this (2.54 mm pitch):

I connect them using wires, which is a mess. I want to use a backplane with female edge connectors, for a solution like this:

Making a PCB is out of question, mostly because I keep adding components to my projects to add further functionalities.

After searching, the only female edge connector I found was 3.96mm pitch ones, that seems to be incompatible with prototype boards.

I'm looking for a solution, better if it accepts the prototype board as is (without a male connector). Cost is not a big factor.

Any sugestion is welcome.

Edit

Durability is not an issue; I keep producing new versions every 12 to 18 months. Cheap components, hardware is totally disposable (I don't even bother recycling them).


texts:
Good day everybody!

So I have a LED clock circuit, which I designed, powered by an atmega328p xmini, and whatever I do the first pin of the shift register which does the current sinking (TPIC6c595D) is always high, so if I want to light up the 2nd LED in my LED matrix the first one lights up as well and so on for the rest of the LED-s.

So my question basically : what could cause this? Without VCC there is no short circuit between the Q0 and VCC pins.The moment I plug in the dev board the short circuit appears. Did I forget to implement pull down resistors? Or the TPIC is faulty?

And here is my code, I don't know if it's important or not, it is a bit spaghetti though.It's a LED test.

#include <avr/io.h>
#include <util/delay.h>
#define HC595_PORT   PORTB
#define HC595_DDR    DDRB
#define HC595_DS_POS PORTB4     //Data pin (DS) pin location
#define HC595_SH_CP_POS PORTB3     //Shift Clock (SH_CP) pin location
#define HC595_ST_CP_POS PORTB2      //Store Clock (ST_CP) pin location
void shiftInit()
{
   //Make the Data(DS), Shift clock (SH_CP), Store Clock (ST_CP) lines output

   HC595_DDR|=((1<<HC595_SH_CP_POS)|(1<<HC595_ST_CP_POS)|(1<<HC595_DS_POS));
}
// change data (DS)lines
#define HC595DataHigh() (HC595_PORT|=(1<<HC595_DS_POS))
#define HC595DataLow() (HC595_PORT&=(~(1<<HC595_DS_POS)))
//Sends a clock pulse on SH_CP line
void shiftPulse()
{
   //Pulse the Shift Clock
   HC595_PORT|=(1<<HC595_SH_CP_POS);//HIGH
   HC595_PORT&=(~(1<<HC595_SH_CP_POS));//LOW
}
//Sends a clock pulse on ST_CP line
void shiftLatch()
{
   //Pulse the Store Clock
   HC595_PORT|=(1<<HC595_ST_CP_POS);//HIGH
   _delay_loop_1(1);
   HC595_PORT&=(~(1<<HC595_ST_CP_POS));//LOW
   _delay_loop_1(1);
}

/*Main High level function to write a single byte to
Output shift register 74HC595.
Arguments:
   single byte to write to the 74HC595 IC
Returns:
   NONE
Description:
   The byte is serially transfered to 74HC595
   and then latched. The byte is then available on
   output line Q0 to Q7 of the HC595 IC.*/

void shiftWrite(unsigned data)
{
   //Send each 8 bits serially
   //Order is MSB first
   for(uint8_t i=0;i<8/*16*/;i++)
   {
      //Output the data on DS line according to the
      //Value of MSB
      if(data & 0b10000000/*00000000*/)
      {
         //MSB is 1 so output high
         HC595DataHigh();
      }
      else
      {
         //MSB is 0 so output high
         HC595DataLow();
      }
      shiftPulse();  //Pulse the Clock line
      data=data<<1;  //Now bring next bit at MSB position
   }
   //Now all 8 bits have been transferred to shift register
   //Move them to output latch at one

}

//Simple Delay function approx 0.5 seconds

void Wait()
{
   for(uint8_t i=0;i<50;i++)
   {
      _delay_loop_2(0);
   }
}

uint8_t shift(uint8_t a)
{
    a=a<<1;
    return a;
}
void main()
{
    unsigned Byte16=0b0000111111110000;
    uint8_t Byte1=0b00000001;
    uint8_t Byte2=0b00000001;
    uint8_t futo=0;

    /*uint8_t reset[2]= {
                        0b00000000,
                        0b00000000
    };*/
   shiftInit(); //Initialise
   while(1)
   {

         shiftWrite(Byte1);   //Write the data to shift register
         _delay_ms(10000);
         shiftWrite(Byte2);
         _delay_ms(10000);
         //Wait();                 //Wait
        shiftLatch();
      /* for(uint8_t i=0;i<2;i++)
       {
           shiftWrite(reset[i]);   //Write the data to shift register
           _delay_ms(5000);
           //Wait();                 //Wait
       }
      shiftLatch();
      _delay_ms(5000);*/
      if(Byte1!=0b10000000)
      {
      Byte1=shift(Byte1);
      futo++;
      }
      else
      {
          if(Byte2!=0b10000000){
          Byte2=shift(Byte2);
          futo=0;
          Byte1=0b00000001;
          }
          else{
              Byte2=0b00000001;
          }

   }

   }
    }

Thank you in advance.
Steven


texts: More elegant code for synchronous square wave generator in Verilog

texts:
I'm self studying with Chu's FPGA prototyping book. Exercise 4.7.1 asks for a programmable square wave generator:

  A programmable square-wave generator is a circuit that can generate a square wave with
  variable on (i.e., logic 1) and off (i.e., logic 0) intervals. The durations of the intervals are
  specified by two 4-bit control signals, m and n, which are interpreted as unsigned integers.
  The on and off intervals are m* 100 ns and n* 100 ns, respectively. Design a programmable square-wave generator circuit. The circuit should be completely synchronous.

I have a completely syncrhonous working solution, but I couldn't find a nice way for it to be cycle accurate, in the sense that the code I like the most uses two more clock cycles to change the logic level of the square wave. I'm pasting the whole code at the end of my question, but what I don't like is the part that does if(clk_tick_count == interval_quant_ns - 1), specifically having to substract 1 from the number of intervals I want to count. I came to this solution after verifying that the solution without the -1 was taking two more clock cycles, and fixed it with the -1. I understand this is because since the update is synchronous I need another full clock cycle for the changes to be reflected in my ouput wave.

I just have a feeling that there ir a nicer way to do this but I can't discuss it with anyone nor have I been lucky searching for nicer code online.

Thanks!

This is my current code:

module sqwaveGen
#(
parameter interval_quant_ns = 5
)
(
input wire clk,
input wire rst,
output wire wave,
input wire [3:0] on_interval,
input wire [3:0] off_interval
);

reg wave_next, wave_reg;
reg [3:0] clk_tick_count, clk_tick_count_next;
reg [3:0] count, count_next;

always @(posedge clk, negedge rst) begin
    if(~rst) begin
        wave_reg <= 0;
        clk_tick_count <= 0;
        count <= 0;
    end else begin
        wave_reg <= wave_next;
        clk_tick_count <= clk_tick_count_next;
        count <= count_next;
    end
end

always @(*) begin
    wave_next = wave_reg;
    count_next = count;
    clk_tick_count_next = clk_tick_count + 1;

    if(wave_reg == 0 && count == off_interval) begin
        wave_next = 1;
        count_next = 0;
    end

    if(wave_reg == 1 && count == on_interval) begin
        wave_next = 0;
        count_next = 0;
    end

    if(clk_tick_count == interval_quant_ns - 1) begin
        count_next = count + 1;
        clk_tick_count_next = 0;
    end

end

assign wave = wave_reg;

endmodule

Output wave of a test for the sake of completeness, showing that this works:


texts: What are the advantages and disadvantages of Manhattan-Style routing?

texts:
Manhattan-Style routing being the use of expressly east-west planes and north-south planes, using a via and changing planes when a signal changes direction.

Comparing to freestyle routing, which lets define as routing signals in any direction on a given layer, would manhattan routing generally result in increased density, signal integrity, and more or less layers?

I know this is somewhat general and highly specific to a given application, but I'm generally interested in why one would decide to route in a manhattan-style -- surely the reasons relate to one or more of the above, and there should be some justification to that end.

One guess of mine is also that two adjacent layers, one E-W and one N-S would be fairly minimal in cross-talk due to the perpendicular nature of the traces, versus two adjacent layers where the layers are routed free-style. Would you agree?


texts: Ultracapacitor initial voltage drop during discharging

texts:
I've been building a test stand for ultracapacitors, with very simple schematic looking like this:

simulate this circuit – Schematic created using CircuitLab

The resistor on the bottom is to enable the source to push the load through the cap while it's discharged as it's internal resistance is too low for short-circuit-protected source to work. Programmable load is also further connected to a PC that lets me read the current and voltage values during discharge. The ultracap is Maxwell's BCAP3000 2,7V.

I discharged the ultracap with stable 10 Amps and what I've noticed is that there is a voltage drop immediately when discharge starts. My question is what is the cause of that voltage drop? Voltage drops from 2,7 to about 2,45 V. The characteristic of discharge looks like this:

Also, should I be concerned about the linearity of the characteristic? I think it is linear because I used the CC method rather than CV where it would drop exponentially.


texts: Is it possible to move VHDL code from the top level of a design to a subcomponent, without changing the underlying logic?

texts:
Suppose I have a component, called Top_Level, that has a bunch of registers that it uses. There are some subcomponents that perform some combinational logic using the registers.  There is also a clocked process, Process_1, that does sequential operations on the registers.  So, every clock cycle, Process_1 does some sequential stuff with the registers.  Then, the subcomponents in Top_Level do their combinational logic.

Process_1 is getting kind of big, so I'd like to make it a subcomponent of Top_Level called Component_1. Here's the problem: to make Process_1 a subcomponent of Top_Level I have to move all of the registers that it uses down to the new Component_1.  But then the other subcomponents in Top_Level wouldn't be able to access those registers.

Is there a way to get the registers of Component_1 to also act as outputs of Component_1? Then I could copy/paste my code into Component_1 without having to rename all of my registers and signals.


texts: How to change signal from 16,7 - 22,1 V to 0 - 3V and clamp for adc

texts:
A device that I want to extend and am reverse engineering uses two wires for power, 2-way digital communication and 2-way analog speech (say mainly 50 - 300 Hz). I haven't yet worked out all of the details, but I know that when the speech signal is present there is a DC component of about 19.4V and the range will be roughly between 16,7 - 22,1 V (including a margin). However, at other times there will be 0V - 24V between the two connections (that is the highest I've seen so far, but higher voltages might be possible although not higher than 36V is expected).
I want to record the sound using the ADC of an ESP32. Up to this point I've used a simple voltage divider, and I am already able to see the sound signal but I don't have enough resolution. So I need to create a signal between 0 - 3V. There are two solutions I have thought of:

RC high pass filter
This gives a signal between about +/- 2.5V. So I would still need to add an offset to make the entire signal positive, maybe using a voltage divider on 3.3V line of the ESP32?

Subtract 19.4V using opamp
I'm new to opamps, but I've found Designing Gain and Offset in Thirty Seconds and that seems to be what I want.

In both cases I need to divide the signal range by about 2 and also clamp the signal to 0 - 3.3V. The lower clamp is easy with a diode, but I don't yet know how to clamp higher voltages and I'm afraid a diode to the ESP32 power rail might damage it (perhaps if I use high value resistors that will be fine?). Perhaps a low-pass filter on the signal lines (~20V) and then a voltage divider to 3.3V and then a diode might work?
I'd prefer a solution that uses fewer and simpler components. It is a hobby project and signal quality is not that important. If there's an IC that does everything that would be best, especially if it can be adjusted digitally. If I need to use opamps are there certain parts that are common? (so I can order a bunch in one go, shipping is probably the biggest cost so better to buy an assortment for future projects). Preferable not too small parts so I can solder wires onto it :)
I understand this is a broad question, but since I am new to these kind of electronics I am mostly looking for a good starting point and some advice from people with practical experience.


texts: How to create an LTspice model for 1N4733A Zener Diode?

texts:
I'm new to LTspice. I'm using EveryCircuit as a crutch and would like to run my circuit simulation in LTspice to compare simulation results.
I've built a basic circuit to understand how a zener diode works. The physical zener diode I have hooked up is an (obsolete) 1N4733 glass-packaged zener diode. The circuit I'm working with is:

In my experiment, I've flipped the direction of the z-diode to see what happens:

I can't find an LTspice model for the 1N4733 but have found what appears to be parameters for a zener diode that you'd put into a SPICE directive:
.model D1N4733  D(Is=1.214f Rs=1.078 Ikf=0 N=1 Xti=3 Eg=1.11
+ Cjo=185p M=.3509 Vj=.75 Fc=.5 Isr=2.601n Nr=2 Bv=5.1 Ibv=.70507
+ Nbv=.74348 Ibvl=4.8274m Nbvl=6.7393 Tbv1=176.471u)

And the transient simulation results:

You can see that the LTspice simulation result doesn't match that of EveryCircuit's nor what was measured on the o-scope. The zener voltage is ~5V and in the forward-bias orientation, I expected the Vn002 to clip at -5V. The SPICE directive must be incorrect.
Problem is, those parameters and their values are gobbly gook to me. What do they mean? Which one represents the zener voltage value?
Solution
See accepted answer.


texts: Physical impact sensor for detecting mail dropped in letterbox

texts:
I would like to attach a sensor to the bottom of my letterbox so that when a parcel or a letter is dropped in it I would receive instant notification. Ideally the sensor would be able to be configured to certain impact threshold and to report the value.

What kind of sensor could I use for that purpose? What kind of device could it be connected to which would be able to trigger a network event (e.g. HTTP request)?

The letterbox is this one (not my photo):


texts: Photodiode operating modes - confusion about wording

texts:
The more I read about the operating modes of photodiodes, the more confused I get since it seems that people are using the same wording for different stuff.
Please consider photoconductive (PC) mode versus photovoltaic mode(PV).

1, and 2 define the photovoltaic mode to be the mode where a short circuit is enforced across the PD terminals (by the OPAMP).
4 defines the PV mode completely different in the sense the zero bias is not interpreted as zero volts across the diode but simply no bias in the sense of "open" circuit (very high impedance) across diode.

Also, 4 uses the definition of the PV mode of 1 and 2 to talk about PC mode with just zero volts reverse bias. In other words, where 1 and 2 talk about PV mode, 4 calls it one special variant of PC mode.

6 uses Fig8 to talk about PV mode while NOT shorting the diode as 1 and 2. Instead, it is used similar as in 4, without too much details, but mentioning that the forward voltage is kepts below the turn-on threshold of the diode by loading with a resistor.

I have lots of questions because of the confusion, but to formulate three very specific questions:
1.)How would you guys interpret "zero-bias"? Is it a short circuit or an open circuit? I assume this is a key for further discussion and understanding.
2.)What is the reason that the PV mod as described in 4 is not used in practise? 6 just also mentions that fact but does not explain why:
"If the photodiode is open-circuit or loaded only with a very high resistance the anode will be sufficiently positive for the photo current to flow in the diode and the voltage across the photodiode will be proportional to the logarithm of the light intensity. It is possible to measure this behaviour using an electrometer op-amp with very low bias current such as the AD549 (Ib ˜ 40 fA) but photodiodes are rarely used in exactly this way."
3.) PC mode seems to represent 3rd quadrant, what about PV mode? If used open loop I would say 1st quadrant, but 7 suggest it is the 4th quadrant?


texts:
Are three-phase contactors rated per pole or in total? For example, have a look at this datasheet for a random three-phase contactor: datasheet

In the datasheet it says that for AC-3 loads (1) the rated operational current [Ie] is 32 A, and (2) the motor power rating is 7.5 kW at 220..230 V. These numbers match, since 32 A * 230 V = 7360 W.

On the Technical FAQ pages of this manufacturer it says:

"Contactor current ratings are per pole. For example a contactor rated 40 amps AC3 could switch upto 40 amps AC3 on just one pole or on all the other poles." (see source)

What I'm confused about is that motor power rating is usually not declared per pole, but in total. So if I use 10 kW contactor for a 10 kW motor, my contactor if oversized by a factor of 3. Is this correct, or I'm missing something?


texts: How does a structural architecture know which entity to use?

texts:
So I'm following this tutorial in which they explain some basic VHDL by using a four bit adder as an example:

-- Example of a four bit adder
library  ieee;
use  ieee.std_logic_1164.all;

-- definition of a full adder
entity FULLADDER is
     port (a, b, c: in std_logic;
           sum, carry: out std_logic);
     end FULLADDER;
architecture fulladder_behav of FULLADDER is
begin
sum <= (a xor b) xor c ;
carry <= (a and b) or (c and (a xor b));
     end fulladder_behav;
     -- 4-bit adder

library  ieee;
use  ieee.std_logic_1164.all;
entity FOURBITADD is
     port (a, b: in std_logic_vector(3 downto 0);
           Cin : in std_logic;
                sum: out std_logic_vector (3 downto 0);
                Cout, V: out std_logic);
     end FOURBITADD;
architecture fouradder_structure of FOURBITADD is
     signal c: std_logic_vector (4 downto 0);
component FULLADDER
           port(a, b, c: in std_logic;
sum, carry: out std_logic);
           end component;
begin
           FA0: FULLADDER
                port map (a(0), b(0), Cin, sum(0), c(1));
           FA1: FULLADDER
                port map (a(1), b(1), C(1), sum(1), c(2));
           FA2: FULLADDER
                port map (a(2), b(2), C(2), sum(2), c(3));
           FA3: FULLADDER
                port map (a(3), b(3), C(3), sum(3), c(4));
           V <= c(3) xor c(4);
           Cout <= c(4);
end fouradder_structure;

I am trying to understand why the component part in the fouradder_structure has to redefine the ports used in the FULLADDER entity; they both contain the following parts:

port(a, b, c: in std_logic;
sum, carry: out std_logic);

I then read somewhere that component defines the interface that the fouradder_structure is expecting. That would explain why entity and component both need to declare the used ports, but then how does the fouradder_structure know to use the FULLADDER entity that was defined previously? Is it a naming convention?

TL;DR, how is the architecture fouradder_structure aware it has to use the entity FULLADDER?


texts:
I am modeling a diode using verilog ams but I have a problem when I simulate its behaviour in different temperatures.

The simple equation of the diode (Id=IS∗(eVd/Vt−1)) is not enough because it gives me the inverse of the predicted results.

Could you help me to find a way to simulate the temperature dependency correctly?

Regards,


texts: Need to automatically switch a 12v 1amp dc pulse between 2 alternating outputs

texts:
I have a control unit that produces two 12v 1amp dc pulses lasting about 200ms.
There is a gap of about 100ms between the pulses

I need to automatically switch these pulses between 2 outputs alternatly.

Any help would greatly appreciated


texts: Graphical design rule for Bessel-Thomson filter

texts:
A Butterworth low-pass filter can be designed "graphically" by spacing its poles equally on unit circle, and then using only the poles in the left half-plane.

Is there a similar rule to find the pole locations for a Bessel-Thomson filter?


texts: Depict Adress Resolution Protocol using Mirobits

texts:
My school assignment says

  In this task you will implement a simple version of Address Resolution Protocol (ARP). A button press on one micro will send a request to the other micro for its “MAC” address. The micro should respond with its IP number and “MAC address” which you add to a table. The IP number will be a string which represents an IP address, eg “192.168.1.2” and the MAC address is a string in the standard MAC address format. Since neither the IP and MAC address are real, you will need to hard wire these into the response code.
  Alternatively, instead of the MAC address, you should do some research on how to find the unique identifier from your micro:bit, and use that.
  The device that sends the ARP request should display the response, i.e. IP and “MAC” address ofthe receiver.

I don't want any code that I want to figure out myself, I just wanted to know the interpretation in plain language that what exactly do I need to code.


texts: Is there any science (or trick) to determining a replacement op amp?

texts:
I have a "mature" circuit design that calls for an LF411 op amp. I've built it up with a through-hole PDIP and it works just fine. Now I'm designing an SMD PCB for the circuit so I have the opportunity to review the device selection and perhaps choose a more modern component for some of the BOM items.

This seems like the sort of situation a practicing EE must encounter from time to time. Is there any science or perhaps a small bag of tricks for selecting a replacement device when its predecessor has perhaps become long in the tooth or even obsolete?

In this particular case, I initially (somewhat hastily) used a TL071 in the prototype because I had one on hand. It turned out to have substantially more input voltage offset and in this (DC lab power supply) circuit didn't allow the output voltage to be adjusted all the way to zero. I got an actual LF411 a few days later and that fixed things up nicely.

So I know I need reasonable precision, as far as the voltage offset is concerned, and also I noted it's a JFET input, so the input current is quite small.

I could redo the analysis of the circuit and simulate, etc. to essentially "re-spec" the part. (Or I could just stick with an LF411 in a SOIC.) But I wanted to take advantage of the review opportunity and wondered how a practicing analog circuit designer would approach the problem.

Any pointers for a well-trained but practically inexperienced newb?


texts: IRLZ44N MOSFET switch - voltage drop across brushless fan

texts:
simulate this circuit – Schematic created using CircuitLab
I have an IRLZ44N with the gate connected to a 3.3v logic output pin as shown in the diagram below. The brushless fan is rated at 5v 200mA, so the resistance should be 25 Ohms. The fan is not switching on, and when I measure the voltage across the fan (labelled load in the diagram), it reads 1.5V. Removing the fan brings the voltage back up to 5v.
What is strange for me is that I'm seeing a similar behaviour when trying to switch using a BC517 NPN transistor as well.
I'm not sure what is causing the voltage drop here - is this normal and what can I do to fix it?


texts: Designing a Band Pass Filter for Project

texts:
I have to design a Band Pass Filter for a project. The filter should let frequencies between 100 and 1000 Hz with a gain of -3db and should damp frequencies about 4 KHz. I am opting for  two  cascaded  Sallen-Key Filters of second order.One is 100Hz highpass and the other is 1000Hz lowpass .Am I on the right track ?             I am unable to decide how to choose the Resistance and Capacitor in order to achieve the desired result.Can someone please help? :)

Have a nice day!


texts: Searching for open source Software for motor driver Simulation (PUC inverter)

texts:
I am trying to simulate the Five Phase Five Level PUC Inverters as you can see below (from this paper):

So as I don't have Matlab licence for this simulation I am trying for others alternative to do this simulation.
I have googled these terms:

site:github.com python   5 phase motor inverter  simulation

open source motor driver simulator matlab alternative

And found some results like gym electric motor Project with Python language (Ref 1,2) :

If Possible, I like to Have your comment for finding some Open source Software With GUI Motor Driver Simulator like Matlab Motor simulation which is shown in this video.
Thanks.


texts:
I'm looking throw bq76940 datasheet and I've found such connection of sense resistor:

What is the purpose of the additional resistors and capacitors? Why all 3 capacitors are required?


texts: Triple modular redundancy (TMR) in hardware

texts: I would like to know if there are already ASICs/FPGAs implemented on top triple modular redundancy for fault tolerance/if they themselves implement TMR for fault correction. Any reference to research paper describing such implementation would be appreciated


texts:
Please forgive me, I have extremely limited knowledge of EE.
I have a 12 volt door intercom system that I am happy with except it turns out that I hooked up the electric door strike directly to the monitor and sometimes the door strike won't energize correctly because I assume the power supply can't handle it.
I purchased a timer relay and a power supply to replace the direct connection to the intercom, but turns out that it is not easy to snake the new wires I would need through the wall and I would like to avoid opening up my walls to run a few new wires.
Is it possible to add a capacitor into the system that would help energize the door strike (5 seconds)?
Thanks!


texts:
I have used a voltage adaptor as power supply. The output is 5.17 V but I need exactly 5v for my circuit. I can't use voltage regulator (7805) because The minimum input voltage is 7 V. And my circuit needs 1 A current. The only reason I insist on it is that if the voltage has less telorance, The ADC would be more accurate. What's your suggestion?
Thanks


texts:
I need help identifying these parts, which I believe are SOT89-3 packaged, and I'm guessing are regulators. I have a board which is not working and my troubleshooting leads me to want to replace this part. They are marked only as "A6 55" and "A6 66".

They are each from different generations of the board. It may be that both chips are the same, and that 66 is just an upgrade/replacement of 55 - I don't know.

Note: these are two separate images. Ignore the apparent size difference between the two parts.

Edit: Using a working board, it appears that pin 3 (right pin) is attached to a 12V supply, pin 2 (and 4) is connected to ground, and pin 1 (left pin) measures approx. 6.1V.


texts:
I was reading the specs. of an electronic module used in process-safety applications & came across this note:

  Self-Checking (Circuitry): a circuit with the capability to
  electronically verify that all of its own critical circuit components,
  along with their redundant backups, are operating properly. Banner
  safety light screen systems and safety modules are selfchecking.

I'm curious, how exactly does one design a self checking circuit? Can someone post a circuit diagram of a self checking circuit?

Does the verifier have to only verify the primary or does the verifier circuit verify the verifier itself?

Edit: Here is a link to the actual device, a "Banner Muting Module ": http://info.bannerengineering.com/cs/groups/public/documents/literature/116390.pdf

A breif description of this device's function:

  The Banner MMD-TA-11B / MMD-TA-12B Muting Module (the Module) is an
  accessory component of a safeguarding system, which may incorporate
  such primary safeguards as safety light screens, safety interlocked
  gates/guards, or other presencesensing safeguarding devices (PSSDs).
  The Module allows the machine to mute the primary safeguard by
  monitoring redundant inputs (two or four) and automatically suspend
  the safeguarding function of a safeguarding device during the
  non-hazardous portion of the machine cycle.


texts: How far can a WiFi signal reach in snow?

texts:
I am a kid from the mountains. If a person comes into an avalanche the people carry a device which sends and receives. The mates can then search for the victim with their one device(s).
If I would build such a device with a cheap ESP32 board with integrated WiFi protocol would it work even out of deep snow?
I am asking of personal interest.


texts:
I'm working in a MATLAB algorithm to compute the state estimation of a power system given some measures. The classical method computes a Jacobian matrix of all the measures, so I have to program all the derivatives of all types of measures. The problem lies in the equations of the power flow between buses. I've searched several books and papers and I've found two distinct sets of equations (\$P_{ij}\$ and \$Q_{ij}\$ are the real and reactive power flow from node \$i\$ to node \$j\$, respectively):
$$
P_{ij}  = \left| {V_i } \right|^2 G_{ij}  - \left| {V_i } \right|\left| {V_j } \right|\left( {G_{ij} \cos \delta _{ij}  + B_{ij} \sin \delta _{ij} } \right)
$$
$$
Q_{ij}  =  - \left| {V_i } \right|^2 B_{ij}  - \left| {V_i } \right|\left| {V_j } \right|\left( {G_{ij} \sin \delta _{ij}  - B_{ij} \cos \delta _{ij} } \right)
$$
Where \$V_i\$ and \$V_j\$ are the complex voltages of buses \$i\$ and \$j\$. \$G_{ij}\$ and \$B_{ij}\$ are the real and imaginary parts of \$Y_{ij}\$, the \$ij\$ element of the admitance matrix of the system. And \$\delta_{ij}\$ is the angle difference betwwen \$V_i\$ and \$V_j\$. These two equations are derived from the book of Abur and Expósito (2004), neglecting the lines' shunt admitance. However, from the paper of Larson, Tinney and Peschon (1970), the resulting equations are:
$$
P_{ij}  = -\left| {V_i } \right|^2 G_{ij}  + \left| {V_i } \right|\left| {V_j } \right|\left( {G_{ij} \cos \delta _{ij}  + B_{ij} \sin \delta _{ij} } \right)
$$
$$
Q_{ij}  =  \left| {V_i } \right|^2 B_{ij}  + \left| {V_i } \right|\left| {V_j } \right|\left( {G_{ij} \sin \delta _{ij}  - B_{ij} \cos \delta _{ij} } \right)
$$
There are other documents that present either the first or the second set of equations, and I'm really bewildered, I absolutely don't know which set I must use. Can someone explain to me the reason of this discrepancy, and which is the correct set of equations? My most sincere thanks to whoever answers me.


texts: Any idea for two transmitters one receiver wireless communication module?

texts: I am undergraduate electrical engineering student. I have a project for Analog Electronics course. I should design a system which tries to equate the heat of two stations with a controlled cooler with wirelessly received heat information. The system basicly will look like as the picture in attachments. The confising point is that I am supposed to implement two transmitters one receiver wireless communication module. And the minimum distance should be at least 1 meter. What do you think to best way for wireless communication for this project. There may be lots of choses lik using two speaker and a microphone or using two laser and an LDR. I tried to use two laser (with changable duty cycle respect to changing temperature). I can transmit that square wave to my receiver (LDR). But I could not find a solution transmitting two information to a single receiver. Any idea?


texts: Arduino  BBB UART issues using bi-directional level converter (5v to 3.3v)

texts:
I am having a strange issue interfacing between an Arduino and BeagleBoneBlack over UART.

The Arduino is 5v logic, and the BBB is 3.3v logic, so I'm using a bi-directional logic level converter from sparkfun.

The level converter works fine with my 3.3v USB/FTDI reading with my laptop When I connect GND,3.3v,RX,TX, but when I use the BBB, I don't get anything unless I disconnect the 3.3v line. Interestingly - on my computer using the FTDI cable, I get garbage UNLESS the 3.3v is connected.

On the BBB, with the 3.3v ref voltage disconnected the level-converter seems to convert from 5v - 2.5v (instead of the intended 5v-3.3v), and I'm weary of this floating voltage.

I made a voltage divider with resistors, and with the reference low-volt of 1.6v, communication still works, but again - not with the reference low-volt of 3.3v.

I'd love suggestions as to why this may be the case!

Edit:

To clarify with sweet ASCII art:

This Works (as it should):

___________             _________________               ________         ____________
|         | <-RX (5v)-> | HV1 (LLC) LV1 | <-TX (3.3v)-> |      | <-USB-> | Computer |
| Arduino | <-TX (5v)-> | HV2 (LLC) LV2 | <-RX (3.3v)-> | FTDI | <-USB-> | Computer |
|   (5v)  | <-HV (5v)-> | HV  (LLC) LV  | <-LV (3.3v)-> |(3.3v)| <-USB-> | Computer |
|         | <-- GND --> | GND (LLC) GND | <--- GND ---> |      | <-USB-> | Computer |
-----------             -----------------               --------         ------------

This doesn't work (and it shouldn't, as there's no ref LV):

___________             _________________               ________         ____________
|         | <-RX (5v)-> | HV1 (LLC) LV1 | <-TX (3.3v)-> |      | <-USB-> | Computer |
| Arduino | <-TX (5v)-> | HV2 (LLC) LV2 | <-RX (3.3v)-> | FTDI | <-USB-> | Computer |
|   (5v)  | <-HV (5v)-> | HV  (LLC) LV  |               |(3.3v)| <-USB-> | Computer |
|         | <-- GND --> | GND (LLC) GND | <--- GND ---> |      | <-USB-> | Computer |
-----------             -----------------               --------         ------------

This works (but it shouldn't):

___________             _________________               _______
|         | <-RX (5v)-> | HV1 (LLC) LV1 | <-TX (3.3v)-> | BBB | (Actually reading about 2.5v)
| Arduino | <-TX (5v)-> | HV2 (LLC) LV2 | <-RX (3.3v)-> | BBB | (on these two lines)
|   (5v)  | <-HV (5v)-> | HV  (LLC) LV  |               | BBB |
|         | <-- GND --> | GND (LLC) GND | <--- GND ---> | BBB |
-----------             -----------------               -------

This works (also shouldn't):

___________             _________________               _______
|         | <-RX (5v)-> | HV1 (LLC) LV1 | <-TX (1.6v)-> | BBB |
| Arduino | <-TX (5v)-> | HV2 (LLC) LV2 | <-RX (1.6v)-> | BBB |
|   (5v)  | <-HV (5v)-> | HV  (LLC) LV  | <-LV (1.6v)-> | BBB | (Using a voltage divider)
|         | <-- GND --> | GND (LLC) GND | <--- GND ---> | BBB |
-----------             -----------------               -------

This doesn't work (but should):

___________             _________________               _______
|         | <-RX (5v)-> | HV1 (LLC) LV1 | <-TX (3.3v)-> | BBB |
| Arduino | <-TX (5v)-> | HV2 (LLC) LV2 | <-RX (3.3v)-> | BBB |
|   (5v)  | <-HV (5v)-> | HV  (LLC) LV  | <-LV (3.3v)-> | BBB |
|         | <-- GND --> | GND (LLC) GND | <--- GND ---> | BBB |
-----------             -----------------               -------


texts:
People, I have very basic question on 'How to make a switch using a PMOS' transistor.

Following are the specifications:
Drain - Output Pin
Source - 4.2V (From Lithium-ion Battery)
Gate - 3.3V / OV (Control Pin)

I am using NDS8434 PMOS. Gate threshold for this is less than -1V.

Question:
Ideally, if I am connecting Gate to 3.3V then PMOS should be OFF and when I am connecting 0V then PMOS should be ON, But this is not the case?


texts: Schmitt trigger design to control lead acid battery charger

texts:
I've found a very good explanation on schmitt trigger circuit design here -What is a Schmitt Trigger and its application exactly?

But the design is done considering same reference voltage and the comparator biasing voltage v1. It means threshold voltages (high and low) will be varied along with the supply voltage. I want to achieve a constant threshold values to design a battery charge controller. For example Vth(H)=13.8v and Vth(L)=13.0v. How can I achieve this?


texts:
[Taken from Razavi's Design of Analog CMOS Integrated Circuits 2nd edition]

I'm not too sure what to do with this question. Here's what I think of the circuit

This doesn't look like a differential amplifier to me since there's only 1 input. From what, I see, M1 has a constant DC bias current through it of I1. I see the following relationship
$$I_2=I_{SS}-I_1$$
Leading to,
$$V_{out2}=V_{DD}-(I_{SS}-I_1)R_1$$

Note that I2 is the current through R1 and M2

As Vin small signal changes, this I1 is perturbed, which in turn perturbs I_2 which in turns adjusts voltage drop across R1 which leads to Vout2 having a small-signal change. Now, I'm not sure how to get Vout1/Vin or Vout2/Vin. I was thinking of maybe adjusting the equation up there and sub in the Id equation for I1 but that would leave me with a quadratic and squared Vin term.

Also if there's any experienced analog people out there. Is my thought process correct for understanding the circuit or along the right lines?


texts: Using the iPhone to control a remote controlled car via Arduino

texts:
So i started this project a while back where i made a remote controlled car that i could control with the directional buttons on my keyboard via an Arduino ->  now the next step i want to do is to get the tilt control in my iPhone to be driving the car  :)

Anyone got a good tutorial on this?

Cheers,

Mad


texts: What are the issues with pulling power off a single battery while it is wired in series with a second battery?

texts:
I have a pair of 18v RYOBI batteries that are removable and recharged separately in a standard charger.

I have a pair of small motors that require 18volts, and a pair of small motors that require 36 volts. I have wired the two 18v batteries in series and tested running both sets of motors, the 18volt motors pulling power from the first battery, and the 36 volt motors pulling power from across both batteries. Initial testing has been successful.

What are the issues that I should understand about this arrangement and is there any way to mitigate these issues? Thanks.


texts:
I am making a 40 kHz ultrasonic sensor. I need to detect when a person is at least 5 feet in front of an object. The sensor does not have to be extremely accurate. I am an electrical engineering student and have not had a lot of hands-on experience, but I am trying to learn. I found some schematics online for the transmitter and receiver pictured below. I also attached a link to the design I am trying to implement.
I will be most likely using an STM32 or an ESP32 for the MCU. I am trying to simulate the transmitter schematic in LTspice to understand how this works but I am not sure which part to test and what component to use for the part circled in red. Also in LTspice instead of Arduino pin 10 should I generate a 40 kHz square wave. I also have added a photo of my Ltspice diagram so far. I would appreciate any help!
http://www.kerrywong.com/2011/01/22/a-sensitive-diy-ultrasonic-range-sensor/


texts: How to stop CodeVision from generating the interrupt vector

texts:
CodeVision has a lot of nice features, among them the automatic generation of the interrupt vector.

However, now I'm working on a very small bootloader, and I can't afford any interrupts. CodeVision still happily generates the interrupt vector at the beginning of the Flash memory, and I couldn't find a way to turn it off.

It is crucial, as the interrupt vector would take up 25% of the space in the flash memory for the smallest bootloader. (128 words bootloader, and the interrupt vector needs 32 words for a 16k atmega)

I set "Use an external startup initialization file" and I use my own startup.asm. Even if I don't include anything about the interrupt vectors, they are still generated for the executable.


texts:
Can anyone please help me to identify this? I’m not sure if it a Zener, Schottky, or rectifier.

It came off a board from a 12V camera. The camera is not getting power.

I thought it just look like a diode, couldn't find any info online..

Size: 0.235” x 0.272” x 0.100”.


texts: LTSpice is frustrating me. Why isn't this Class C amplifier working? I can't get a sinusoudal output

texts:
I've been trying to research how a class C amplifier works, and it makes perfect sense to me, but I'm having problems getting it to function in LTSpice. I have the latest LTSpice version (XVII with latest updates as of last week).

I can't seem to get my "resonant network" to resonate with a sine wave, no matter what I keep getting this cut off wave. What am I doing wrong ?

I have done a lot of searching on the web and this seems like the proper circuit structure - and I think it would probably work in real life, but in LTSpice it indicates it isn't going to work and I can't see why.

Trying to amplify a simple 1Mhz carrier sine signal here.

Here is a picture of the circuit. The waveform is being sampled from the collector of the transistor

Since I can't figure out how to share or attach a file, here is the LTSpice *.asc file contents

Version 4
SHEET 1 1076 680
WIRE 240 -128 -192 -128
WIRE -192 -96 -192 -128
WIRE 240 -64 240 -128
WIRE 240 -64 160 -64
WIRE 336 -64 240 -64
WIRE 160 -32 160 -64
WIRE 336 -32 336 -64
WIRE -192 32 -192 -16
WIRE 160 80 160 32
WIRE 240 80 160 80
WIRE 336 80 336 48
WIRE 336 80 240 80
WIRE 400 80 336 80
WIRE 512 80 464 80
WIRE 240 144 240 80
WIRE -32 192 -160 192
WIRE 96 192 32 192
WIRE 176 192 96 192
WIRE 512 192 512 160
WIRE 96 208 96 192
WIRE -160 240 -160 192
WIRE 96 320 96 288
WIRE -160 352 -160 320
WIRE 240 384 240 240
FLAG 96 320 0
FLAG -160 352 0
FLAG 240 384 0
FLAG -192 32 0
FLAG 512 192 0
SYMBOL npn 176 144 R0
SYMATTR InstName Q1
SYMATTR Value 2N2222
SYMBOL res 80 192 R0
SYMATTR InstName R1
SYMATTR Value 10k
SYMBOL cap 32 176 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C1
SYMATTR Value 10µ
SYMATTR SpiceLine V=6.3 Irms=0 Rser=0.001 Lser=0 mfg="TDK"   pn="C3216X5ROJ106M" type="X5R"
SYMBOL voltage -160 224 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value SINE(0 1 1000000)
SYMBOL voltage -192 -112 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value 9
SYMBOL ind2 352 64 R180
WINDOW 0 36 80 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName L1
SYMATTR Value 100µ
SYMATTR Type ind
SYMATTR SpiceLine Ipk=0.04 Rser=11 Rpar=78263 Cpar=1.868p mfg="Würth Elektronik" pn="74476420 WE-GF 1210"
SYMBOL cap 176 32 R180
WINDOW 0 24 56 Left 2
WINDOW 3 24 8 Left 2
SYMATTR InstName C2
SYMATTR Value 150p
SYMATTR SpiceLine V=6.3 Irms=3.93m Rser=19.9098 Lser=0
SYMBOL res 496 64 R0
SYMATTR InstName R2
SYMATTR Value 220
SYMBOL cap 464 64 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C3
SYMATTR Value 470p
SYMATTR SpiceLine V=50 Irms=20.8m Rser=5.448 Lser=0
TEXT -424 104 Left 2 !.tran 0 30us 0 .0001


texts:
I received some ICs in the package SOIC8. Usually the packages have some indicator where the 1 Pin is. This does not.
I found the chip soldered on a board on the internet and with the marking on it I can guess the direction of the package.

Is there a better way to determine the direction?


texts: MPPT buck converter vs Ordinary buck converter?

texts:
I’m building a small arduino project which is going to be powered using a small solar panel setup with a battery as it’s UPS for power backup during the dark.

The setup is going to be like

Solar panel->buck converter->battery charge module->battery->arduino

Solar panel = 12V 250mA polycrystalline in epoxy
Buck converter has 2 options
LM2596 based generic buck converter
MPPT buck converter with CC CV
Charge Module = TP5000 configured for LiFePo4
Battery = 14500 LiFePo4 3.2V 700mAh
Arduino = ATTiny13A

My question is should I buy the MPPT module or should I just use the dumb LM2596 buck converter module?
Will the MPPT buck converter module help extract more juice out of the solar panel or will the other one do just fine?


texts: What's the difference between a shunt resistor and a four-terminal resistor?

texts:
I want to know if the four-terminal resistor and the shunt resistor are the same.

Is there another use for the four-terminal resistor except measuring current?