texts: What solutions are available for generating video signal?

texts:
I'm looking for a video chip that could handle VGA resolution.
It should be able to provide VGA, HDMI and Composite video out.
It needs to have some basic hardware acceleration eg. built in support for 80x25 text rendering, sprites.

What I have found:
Bitbang microcontroller libraries - either they don't provide HDMI or they requrire expensive microcontrollers.
MOS 8568 - the thing I'm looking for, but is no longer produced and has no HDMI.

I have looked at similar questions on stackexchange,but their about monochrome composite, which can be done with Arduino TVOut, or their about HD quality video.


texts: How to connect the ESP 8266 to local area network?

texts:
I am working on an ESP8266 ESP-12E WiFi Module to turn an LED on and off.
Yes, I was able to turn on/turn off the LED with the help of Wifiserver and NodeMCU.
The problem is I want to connect the NodeMCU with my local area network on the PC.  My PC does not connect with Wi-Fi, only an Ethernet connection is present.
How can I connect the NodeMCU with my local area network connection, not with the mobile hotspot?
This is my code:
#include <ESP8266WebServer.h>

/*Put your SSID & Password*/
const char* ssid = "ssid";  // Enter SSID here
const char* password = "password";  //Enter Password here

ESP8266WebServer server(80);

uint8_t LEDpin = D2;
bool LEDstatus = LOW;

void setup() {
  Serial.begin(9600);
  delay(100);
  pinMode(LEDpin, OUTPUT);

  Serial.println("Connecting to ");
  Serial.println("ssid");

  //connect to your local wi-fi network
  WiFi.begin( "ssid", "password");

  //check wi-fi is connected to wi-fi network
  while (WiFi.status() != WL_CONNECTED)
  {
  delay(1000);
  Serial.print (".");
  }
  Serial.println("");
  Serial.println("WiFi connected..!");
  Serial.print("Got IP: ");
  Serial.println(WiFi.localIP());

  server.on("/", handle_OnConnect);
  server.on("/ledon", handle_ledon);
  server.on("/ledoff", handle_ledoff);
  server.onNotFound(handle_NotFound);

  server.begin();
  Serial.println("HTTP server started");
}
void loop() {
  server.handleClient();
  if(LEDstatus)
  digitalWrite(LEDpin, HIGH);
  else
  digitalWrite(LEDpin, LOW);
}

void handle_OnConnect() {
  LEDstatus = LOW;
  server.send(200, "text/html", SendHTML(false));
}

void handle_ledon() {
  LEDstatus = HIGH;
  server.send(200, "text/html", SendHTML(true));
}

void handle_ledoff() {
  LEDstatus = LOW;
  server.send(200, "text/html", SendHTML(false));
}

void handle_NotFound(){
  server.send(404, "text/plain", "Not found");
}

String SendHTML(uint8_t led){
  String ptr = "<!DOCTYPE html>\n";
  ptr +="\n";
  ptr +="\n";
  ptr +="<title>LED Control</title>\n";
  ptr +="\n";
  ptr +="\n";
  ptr +="
LED
\n";
  ptr +="
Click to switch LED on and off.
\n";
  ptr +="<form method=\"get\">\n";
  if(led)
  ptr +="<input type=\"button\" value=\"LED OFF\" onclick=\"window.location.href='/ledoff'\">\n";
  else
  ptr +="<input type=\"button\" value=\"LED ON\" onclick=\"window.location.href='/ledon'\">\n";
  ptr +="</form>\n";
  ptr +="\n";
  ptr +="\n";
  return ptr;
}


texts:
I've been experimenting with Python scripts and using an Teensy 2.0 ++ to program different flash memories. So far I've found a script to program a 29GL128, which works perfectly, but I'm trying to change it so that it can also program a 29GL256 chip (datasheet here)... but I seem to be stuck on the A23 address line.

The problem I'm having is that the Teensy is driving the A23 address line high during the entire write, and other than me pulling it low manually with a resistor I cannot manage to find the part in this script that controls the A23 line. This only lets me write to the top half of the chip...which isn't what I want.

I was hoping someone here that has some experience with either Python or programming Flash memory could take a look at this script and tell me what needs to be changed, and ideally how that change works.

Thanks!


texts: Could shielding (not grounded) affect signal integrity?

texts:
I'm trying to shield 6 flat cables that give me some communication issues because I thought that there might be cross-talk or other sources of interference that cause the problem.
The shielding is not connected to ground. For now, it's just an improvised aluminium foil wrapped around each cable.

Leaving aside that it's not really a good shield, I was wondering if, theoretically speaking, this shielding might affect the signal integrity of digital and/or analogue signals.
The curiosity comes from the fact that the shielding changed drastically the distribution of E field around the flat cable, so it's not the one the cable would normally generate anymore.

In other words, when the distribution of E and/or H field is changed by external factors, is the signal integrity affected? And how?

Set-up description

6 flat cables (24 pins) are connected on one end to the same board at a distance of approximately 2 cm to each other, at the other end are connected to different boards at a distance of approximately 50cm to each other;
All flats carry the same signals, the highest frequency is 10 MHz clock with a rise time of 8-9ns, which is present at just one wire. All the other wires of the flat carry low frequency signals (below 500 kHz);
Flat length is 1.5m;
Two 150W switching regulators are present and at a distance of 30cm from the board where all flats are connected.


texts: Review of my first PCB design for a current meter shield

texts:
I am completely new in designing circuits and PCBs and would appreciate your feedback on my first project.

I want to measure the current flowing through an AC line using the ACS712 current sensor (IC1). The analog output (which is a proportional voltage between 0V and 5V) is converted using an ADS1115 (IC2). The digital signal is passed to an underlying Wemos D1 mini board via I2C, which contains an ESP8266 to process and send the data to a server.

Furthermore, an AC/DC module (HLK-PM01) is mounted on the bottom side of the PCB to power the components.

Though I am happy to receive every possible feedback that comes into your mind, I have some specific questions:

I am very uncertain about the AC part of the PCB

Do I need to add some additional wholes or a gap between the AC and DC part in order to increase creepage?
Do I need to add any specific components such as a fuse or varsistor?

Is it common practice to exclude the ground plane around the header pins or is it fine to leave it as is?

Looking forward to receive your thoughts!

Update #1 (2017-07-17):

Here are some more information as required (thanks to @JackB for providing a list):

Intended current --> ESP is rated at ~200mA. Added 100% buffer and calculated with 400mA
Maximum fault current limited by fuse or circuit breaker --> need to google it first :D
PCB copper thickness --> 1oz
Line voltage in your country --> 230VAC
Size of creepages and tracks --> DC tracks: 0.254mm, AC tracks: 1.016mm
or size of the grid so we can work it out --> Grid 0.5mm
intended operating environment (a plastic case?) --> Yes, something like this

Update #2:

Some more information as requested by @Asmyldof:

using coatings? --> not planned. Are there arguments to do so?
desired use case? --> using the attached ESP8266 I want to send the measured values via WiFi to a server
which market approvals are you seeking? --> currently none. The PCBs are going to be manufactered in a very small quantity (10-20) and for personal use only (in this stage of the project).
what are the connectors rated for under that body of approval? --> sorry, which connectors are you referring to?
what board-size restrictions drove you to this layout? --> I want to put it into a typical "power meter plastic housing" (like this)
what's under the board on the devices you want to plug it into? --> I didn't get that question


texts: control Linear analysis error due to RMS(IIR) filter?

texts:
my Objectif is to get a frequency response of the open loop system of plant which will allow me to design the controller transfer function. after including the RMS filter, the Analysis tool of Simulink shows this error:

  Simulink Control Design  1 Clear
  02:22 PM Elapsed: 0.29 sec
  In "frestimate(modelname,op,io,in)", the input signal "in" is a frest.Sinestream signal which has parameter values for "Frequency" and "SamplesPerPeriod" such that it inherently has multiple sample times. Using such an input signal requires that samples rates belonging to the Simulink signals where your linearization input and output points are located are either continuous or fixed in minor time step and the linearization I/O io(2) does not satisfy this requirement. Consider either changing the sample time of Simulink signal where io(2) is located to continuous sample time or using frest.createFixedTsSinestream utility to create a sinestream signal that has a single sample rate.
  Component:Simulink Control Design | Category:Frequency Response Estimation error

what I understood is that I have to use only one sample frequency which I cannot since i need the RMS filter. how can I get my frequeny response


texts:
I am an IT student and that means I do not have lots of money and I use my mouse a lot. However, about a month ago my mouse starting randomly diconnecting and it got worse and worse to the point where it would not be recognised by my computer anymore.
It has a small led on it and when "disconnecting" I noticed it went dimmer for a moment before  going out, and my usb port was shut off. I figured out that this was a short circuit and disassembled it, found the point of short circuit by measuring conductivity of each pin of the usb cable and found out that the green cable (data+ IIRC) was shorted to the shield so I cut the cable and now I have a section of the cable fully working.
However when trying to rewire I noticed 5 pins in my mouse internal connector. 4 of them were for data/5V but one was connected to the shield. Reconnecting it to the shield is complicated for me since it was braided around the other cables and do not offer a clean soldering point. I was wondering if leaving it unconnected was a problem or if it would risk to damage anything. If it would damage only the mouse it's ok since it was not working anymore. Reconnecting the shield seems important since it was connected but I have no actual idea how it works and if it really needs to be connected.
Thanks in advance for your help.


texts: Multiple UART output sensors on one serial port

texts:
I would like to connect 4 UART output sensors to one serial port of my controller. The distance between sensors and controller will be about 10m. Initially I was thinking of using 485 as physical layer (SP3485 tranceivers). Sensor UART --> SP3485 -- (485 layer) -- SP3485 --> UART Controller.
A seperate current controlled cirquit will do the sesnor select job enabling the transmit output for each sensor (DE/RE' pins SP3485)
2,5mA - Enable transmit from sensor 1
7,5mA - Enable transmit from sensor 2
12,5mA - Enable transmit from sensor 3
17,5mA - Enable transmit from sensor 4

Is there any other ideas or suggestions?


texts:
I am trying to connect a stock car FM/AM antenna with a new aftermarket stereo system, Turns out my car antenna has 2 wires. One is Co-axial cable for signal (Most probably) and there's one more single cable comes along with it. Which I have no idea what's its for.

PS. I have tried hooking signal cable But all I got is complete static. I have also tried grounding the other extra cable with no luck.

Moreover When I connected a bare 2 meter copper wire directly to the antenna core. It gained some signal. But that is a inefficient solution to this I wanted to use my Stock car antenna to have a strong reception

  The image below is similar to my cable only difference is that I have a Yellow color cable in place of blue

Also my stereo has only one hole for Co-axial cable. And no place for the other cable.

My Car Name : Maruti Suzuki Baleno

My Stereo : Sony DSX-A100U

Anyone Please put a light what I am doing wrong here. And tell me how to hook this antenna to my stereo.


texts:
Good Day,

This is a lecture on Class A Output Amps by Upenn. Link here:
http://www.seas.upenn.edu/~ese319/Lecture_Notes/Lec_20_PowerAmps1_10.pdf

I can't understand how when Vi is negative, it causes VCE2 to turn on. Vi is only connected to Q1 right, so if it's in negative mode, Q1 should be off, and hence behave like an open circuit. How is it, that Vi is still able to have an effect on Vo while negative?

I can get the equation Vo > -Vcc + Vce2-sat, but how does the second equation where Vi > -Vcc + Vce2-sat + 0.7 come about. Vi is not even connected to Q2, and that part of the circuit should be open, how can we deduce this?


texts: Remove glass top from a TO can packaged VCSEL

texts: I have a VCSEL packaged in a TO-46 can (image here / datasheet with package dimensions). I need to remove the glass top – with or without the silver-coloured cylinder – without damaging the laser diode itself or any electrical contacts within the package. What would be the best method to achieve this?


texts: Switching resistances in op-amp amplifier

texts:
I am building an inverting amplifier with an op-amp to attenuate a signal (ie: gain < 1) and I would like to be able to change the gain electronically by connecting multiple resistors to a switch or a multiplexer (as in this excellent answer.

It is possible to put this switch on either of the resistors in the inverting amplifier, making two possible circuits:

simulate this circuit – Schematic created using CircuitLab

Is there any reason to pick one of these circuits over the other? Are there any unexpected "gotchas" that I might be missing?

My gut tells me to go with circuit A because there is always feedback present - circuit B could have no feedback path while the switch changes positions.


texts:
On the product I am designing, I have an input connector of 60 lines and an output connector of 32 lines.

The input can be connected to different outside products and then the lines can be mixed, so the idea of the product is, more or less, to remap the relevant input lines to the output ones.

For example, the output line Number1 can be connected to the input line number 1 or the number 2 or 55. Same thing for number 2. Meaning my product is more or less a huge multiplexer between 60 inputs and 32 outputs.

The first that came into my mind to do that fairly easily, and to be able to change the configuration if needed in the future, is using a CPLD. My problem is that I am inexperienced with CPLD and I do not know at all at what kind of characteristic I should look for in the datasheet.

Would this kind of project take a lot of resources in a CPLD?

What are the characteristics that I should look for to be sure the CPLD I choose will have enough resource (flip-flop? gate? macrocell?)?

How can I do a rough estimation of the required resources for this kind of project?

Edit

To add information there is actually two different possibilities for the CPLD that arised from previous answers.
First possibility is to just do what is required statically, meaning once the CPLD is programmed the configuration between input and output will not change until the next programmation.

The second possibility is to be able to change the configuration dynamically without reprogramming the CPLD, for example by SPI would be nice.

The questions I asked before are for both possibilities.

Also My inputs are synchronized between each other and the maximum frequency will probably be around 5MHz, how do I estimate the delay between input and output and the desynchronization due to the different paths in the CPLD?


texts: Mealy vs. Moore implications for timing closure

texts:
I am developing a pipeline block for inclusion in an ASIC.  I want to decide between designing the block as a Mealy machine or as a Moore machine.

Does this choice have implications for timing closure?

No answer here: How to choose between Mealy and Moore state machine


texts: Pass bandwidth of backing light for LCD display

texts:
A stardard industry LCD display is composed of several parts. Polarizer film and color filters produce and image by masking the light from a source positioned behind the LCD itself, the so called backlight.
Many resin 3D printers today use an LCD display to actively mask an UV source, used as backlight, by selectively turning on / shutting off pixels.
I read that the fact that a UV source is used compromises the lifetime of the display, since UV light slowly damages the display, shortning its life to circa 500 hours of operation
Normally the UV backlight used in 3D printing has a wavelength of 405 nm. Will it work with shorter wavelength? Proving of course that a resin which reacts to shorter wavelengths is available.
I saw resins available for 385 nm, but what about using even shorter wavelengths?


texts:
Even though I'm a total beginner at electronics, I've decided to build a 6-channel piezo pickup buffer/mixer unit, for a stringed instrument. It should fit into a typically sized electronics cavity, and be powered by a 9 volt battery. Gain boost is not necessary, but I'll take it, if possible :-)
One of my questions, is how to best sum 6 of these circuits together.

Before summing the outputs together, I was thinking of adding 50k trimpots, to allow for level adjustments.
Ideally, the summing/mixing section, would also be jfet based (j201).
I've built the stratoblaster circuit before, and was wondering, if that could be used as a mixing stage?

All very naive assumptions, I know :-)
So, any suggestions would be greatly appreciated. Thank you.


texts: An inverter gate reduces the peak-to-peak of the signal!

texts:
Using a HCF4049 to invert a signal, I simply fed the input to one of its not-gates and got its output. Here is the result:

The highlighted red lines is the output of the not-gate. (Yep! my analogue oscilloscope can display colors, it knows how to use my laptop ;D )

The output signal has a smaller peak-to-peak value! Both channels are set to 2 volt/div. So the output's peak-to-peak voltage is about 0.4 to 0.6 volts less than the input. Why?

I switched the probes and also the channels to check if there is any problem with the oscilloscope calibration. But got the same result.

If it is important, here is the original circuit (the link to schematics is in the middle of the page.)

This is my modified version. I have added A4, and the CH1 and CH2 are where the probes are.

To check the oscilloscope accuracy, here the CH1 is connected to 5V and the CH2 is the output as before:


texts:
I'm trying to do an AC sweep of the following circuit:

But I'm getting the following error:

*Analysis directives:
.AC DEC 5 0 1000000
----------$
ERROR(ORPSIM-16103): Invalid value
.OPTIONS ADVCONV
.PROBE64 V(alias(*)) I(alias(*)) W(alias(*)) D(alias(*)) NOISE(alias(*))
.INC "..\SCHEMATIC1.net"

 **** INCLUDING SCHEMATIC1.net ****
 * source ECE209LEC
 C_C4         N00807 N00815  0.11u  TC=0,0
 R_R4         N00807 N00963  1000 TC=0,0
 C_C2         0 N00889  40n  TC=0,0
 R_R2         N00791 N00889  1k TC=0,0
 C_C1         N00791 N00799  0.26u  TC=0,0
 V_V1         N00873 0
 +SIN 0 10 1000 0 0 0
 R_R1         N00873 N00791  1k TC=0,0
 C_C3         0 N00963  90n  TC=0,0
 E_U1         N01832 0 VALUE {LIMIT(V(N00889,N00799)*1E6,-15V,+15V)}
 E_U2         N01817 0 VALUE {LIMIT(V(N00963,N00815)*1E6,-15V,+15V)}
 R_R3         N01832 N00807  1000 TC=0,0
 ** Floating/unmodeled pin fixups **
 R__UC0001   N01817  0   {1/GMIN}

 **** RESUMING freq.cir ****
 .END

For the start frequency I chose 0 and the end frequency 1000000.

What can I do to fix it?


texts: A question about the function of electrolyte in electrolytic caps

texts:
I read in a textbook about electrolytic caps the following:

  The foils are separated by paper saturated with an electrolyte for
  current conduction — thus the name electrolytic capacitors

I'm confused. I thought there's no current conduction inside a cap but only electric field between the foils which are layered by aluminum-oxide. I thought electrolyte soaked paper is used for to heal the foils.

Is this argument from the text correct?

Edit: If cap dielectric should be an insulator why it is conductive Im completely confused.


texts: How are Zener maximum power ratings derived?

texts:
Im having trouble to understand how some of the maximum power ratings of Zener regulators are derived, I understand that Zener voltage will be dependant of current Iz, but take this for example: http://www.onsemi.com/pub_link/Collateral/1N5913B-D.PDF

If you look at datasheet, you'll notice that those diodes have a 3 Watt rating, here's what I dont get: look at diode 1N5925B on that same datasheet, its a 10V zener, and Izm is rated a 150mA. The higher the current the higher Vz will be, however with a max current of 150mA in order to achieve the 3W rating, that would mean that Vz would have to be 20V, which is twice the rated Vz of 10V. Vz will drift a bit with a change in current, but it wont drift that much!

According to my calculations a 10V zener with an Izm of 150mA will have a max power rating of around 1.5W so where exactly is the 3W rating coming from?


texts:
I have some trouble understanding a basic concept. Here is my question.

This is from a document which can be found on the website,

http://www.ti.com/lit/ug/tidu765/tidu765.pdf

The text accompanying this figure states,  “The voltage signal produced by sound modulates the gate voltage of the JFET, labeled VG in Figure 2 causing a change in the current flowing between the drain and source of the JFET (IMIC). An extremely high resistance, RG, may be included to bias the gate of the JFET.”

I have a question regarding the above statement,

Why is the resistance RG needed after all?

If the Voltage produced by the sound changes the current between the Drain and the Source, what is the role of the Resistor? Can't the circuit work without the resistor? I can read from the document it says the Resistor biases the gate of the JFT. I don’t understand what this ‘bias’ means. What does it mean to ‘ bias X/Y”?


texts: Interactions between Ideal Voltage and Current Sources

texts:
Last week I asked a question involving a linear network involving ideal current and voltage sources. You guys gave me some great advice as to how to approach those types of problems. However, this example is really stumping me right now as the advice I was given on that post was to look at the circuit from one perspective at a time, first considering one type of source and then the other. However, I am having trouble applying this idea to this circuit diagram.

I was under the impression that if I consider the voltage source first, the current source should be interpreted as an open circuit. This, of course, breaks the circuit and no current can flow. I feel like this problem is more simple than I am making it out to be, but it's hurting my brain.

All that I've done so far is calculated that a circuit involving just the 10 V source and the 1k resistor would draw 10 mA. I just don't understand how adding a 2 mA current source changes this.

Any help would be greatly appreciated. Thanks!!!

Matt


texts: how do we get these three formulas from the definition? field strength

texts:
I believe these three equation in the figure are not the definition of  field strength,and the definition of field strength is \$H=\frac{F}{m}\$,how do we get these three formulas from the definition?

1.\$B=\frac{\mu_0I}{2\pi d}\$, 2. \$B=\frac{\mu_0IN}{2R}\$,and 3. \$B=\frac{\mu_0IN}{L}\$?

\$B =\$ Magnetic field strength

\$\mu_0 =\$ Magnetic permeability of free space,

\$r =\$ radial distance/m ,

\$R =\$Loop radius /m

\$N =\$ number of  turns


texts: How is load forecasting profitable to power companies

texts: Let's suppose that a power company is using a software model 'X' to do load forecasting which can predict 24 hour ahead load with a MAPE of 5%. Now suppose that I've created a model 'Y' that reduces the MAPE to 1%. So, my question is how much profit will the company make with reduction of MAPE by 4%. How to do the quantitative analysis ? I want to do it because the pricing of the model 'Y' would be based on the profit made by the company


texts: Why does TTL work with 5V, when there's no 5V battery?

texts:
It's a noob question, but every circuit I make uses 5V: 74LS uses 5V, ATMEGA328 uses 5V and so on.

But in reality, everybody's designing circuits and shove a voltage regulator with 9V or 12V power source. Wouldn't a company who makes 6V batteries sell by billions?


texts: NPN transistor controlling a PNP transistor

texts:
I can't understand why Multisim tells me that R2 and R1 will burn out after a while.

What are the correct resistor values that I should use. Or am I doing something wrong?

When a 3.3 V signal is received, the output of the PNP needs to be 24 V. Otherwise, it is to be 0 V.

Simulation works OK when I toggle the switches. However, when I leave the switch on for about 3 secs, R1 and R2 burn out and the PNP output does not work.


texts: Help identifying a replacement for this discontinued LED, please?

texts:
I am looking for a replacement for a discontinued LED. The old part number is Panasonic LNJ801LPDJA, and the datasheet can be viewed here:
View the Datasheet
The old LED is orange in colour, however, I am looking for a blue replacement.
Would anyone be able to tell me the relevant info that I would need to look for when looking for a new LED that would work? I don't know which info I need from the datasheet in order to be able to source a new one e.g. voltage, size, etc.


texts:
I will have an IR led / photo transistor based reflective sensor, measuring rotation speed of a wheel, producing pulses using a comparator with hysteresis. The pulses will be counted by micro-controller.

The problem is, the sensor has to be ~20m away from micro-controller and a big induction motor might be near the cable.

So, I thought - what if I put a couple of RS485 transceivers on both ends of a cable, drive a Driver Input pin on the sensor side and connect Receiver Output to the micro-controller external interrupt pin? Is this a proper solution to my problem?


texts: Will doubling thinner wire in lieu of thicker wire work?

texts:
I've been needing a jumper cable for a while and have plenty of 10 AWG copper wire lying around. From what I've read, 6 AWG wire is recommended for jumper cables. I want to make a 7 foot cable.

So, I was wondering if it would be possible to use three (or more if needed) 7-foot pieces of 10 AWG wire, and use them instead of one 7-foot piece of 6 AWG wire? Would the 10 AWG x 3 cable be able to handle as many amperes as a single 6 AWG wire can?


texts: High-current motor on isolated circuit causing servos to move

texts:
I have a robot with several servos controlled by an arduino. Also attached is an electric airsoft gun, which draws considerable current. The gun is on an independent circuit with a separate battery pack. The arduino is connected to a relay which controls the gun.

The gun is on a physically separate circuit from the arduino and servos.

The problem is that when the gun is fired, all of the servos move toward their 0 position. This doesn't make sense to me, because the gun circuit is not connected to the servo-arduino circuit.

Why is this happening, and how can I fix it?


texts:
What options are available beyond marettes to join wires together? I am looking for something that holds 3-5 wires and will be within a portable box (ie will hold together if moved around a bit).

Is this push-in connector a fair approach?

This is apart of a digitally controlled power-bar/box I'm making for an art installation.


texts: What is the "safe" amount of current I can apply to a DC motor?

texts: A motor I have ranges from 12 to 30 volts, but it says the current has to be at 0.5 amps (500ma) I am powering it from a 12.6v 20000mah battery. Basically I would to use that motor with 24 volts. There are step up voltage converters available, but the lowest current I could find with one steps it up to 3 amps, which is what I don't need. I've heard people say that the motor will only draw what it needs, but what is the limit before current starts being forced into it? I only need 500ma, not 3A. Will this damage my motor?


texts:
I have been trying really hard to just get a PIC to turn on an LED, i know its super simple but for some reason i just cant figure out, its not turning ON!

I am using an old fashion PIC16F877, I am 100% sure its working because my programmer can read and write to it. I am connecting my Arduino 5v and GND to power my circuit. I am sure that has nothing to do with it but hey, you never know.

Anyway, I double and triple checked the wiring and made sure MCLR is connected to 5V, I am connecting:

PIN 11 Vdd to +5v

PIN 12 Vss to GND

PIN 13 CLKIN to a simple RC circuit

simulate this circuit – Schematic created using CircuitLab

Pin 37 (RB4) connected to the LED.

Following is my code in C:

// CONFIG1
#pragma config FOSC = EXTRC_NOCLKOUT// Oscillator Selection bits (RCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN)
#pragma config WDTE = OFF       // Watchdog Timer Enable bit (WDT disabled and can be enabled by SWDTEN bit of the WDTCON register)
#pragma config PWRTE = OFF      // Power-up Timer Enable bit (PWRT disabled)
#pragma config MCLRE = ON       // RE3/MCLR pin function select bit (RE3/MCLR pin function is MCLR)
#pragma config CP = OFF         // Code Protection bit (Program memory code protection is disabled)
#pragma config CPD = OFF        // Data Code Protection bit (Data memory code protection is disabled)
#pragma config BOREN = ON       // Brown Out Reset Selection bits (BOR enabled)
#pragma config IESO = ON        // Internal External Switchover bit (Internal/External Switchover mode is enabled)
#pragma config FCMEN = ON       // Fail-Safe Clock Monitor Enabled bit (Fail-Safe Clock Monitor is enabled)
#pragma config LVP = OFF        // Low Voltage Programming Enable bit (RB3 pin has digital I/O, HV on MCLR must be used for programming)

// CONFIG2
#pragma config BOR4V = BOR40V   // Brown-out Reset Selection bit (Brown-out Reset set to 4.0V)
#pragma config WRT = OFF        // Flash Program Memory Self Write Enable bits (Write protection off)

#include xc.h

#include stdio.h
#include stdlib.h

#define _XTAL_FREQ 40000;

void main(int argc, char** argv) {

    TRISA = 0xFF;
    TRISB = 0xFF;
    TRISC = 0xFF;

    ANSEL = 0x00;
    ANSELH = 0x00;

    TRISBbits.TRISB4=0;

while(1){

        PORTBbits.RB4=1; //led on
    }
}


texts: The effect of connect batteries in parallel/series on C rating

texts: If I have two identical batteries (capacity:300mAh Voltage=7.4v C rating=25C) is I connect those two batteries in parallel or in series does this effect the C rating of the combination of the 2 batteries


texts: Feeding higher voltage sine wave to Arduino interrupt pin

texts:
I want to use Arduino to count cycles from a bicycle generator. This generator has variable frequency (which I want to measure), but also variable voltage that is proportional to wheel speed, typically being above 6V.

What I want is a way to limit the voltage of the wave so that I can detect the rising of a pin voltage (attachInterrupt(pin, RISING) or maybe pulseIn(pin, HIGH)).

My doubt concerns either voltage limiting (for which I'd think about a 5V zener), but also impedance, since I don't want to drain current from the generator (which has to power the rest of the bike circuitry).

Is the zener idea correct? What other components should I add, and how should they be combined?

I know there is something called a Schmidt trigger, but I don't know exactely how I could use it here (and frankly, I'd rather not to use an IC if not needed).


texts:
I have an HVAC which I would like to add some status indicators to.  I have some tri color LEDs, but could use suggestions as to how to utilize those LEDs.

What I am figuring is that I need a diode to protect the LED, and supply it DC, and then a current limiting resistor to limit the current from the rectified 24 VAC.

I have a bag of a thousand or so 1N4001 diodes, which I figured I might use.

Is there a better way?


texts: Put 1 of 3 batteries the "wrong way" to prevent accidental turning on?

texts: My headlamp accidentally turns on inside my backpack. If it used two batteries, I would put one the "wrong way" to prevent it from coming on. However, my lamp uses THREE AAA-type batteries. Can I invert one to get the same effect?


texts:
Can anyone check over this motor controller design I made?

I'm running off of a rudimentary understanding of electronics (just a hobbyist), so I'm not fully confident in it yet.

Kamil EDIT:

And here is better version of this:

I hope I didn't messed up anything.

End of Kamil edit.

The goal is to be able to control one motor via PWM in two directions.

I need to control up to 5A via PWM from an Arduino.


texts:
I have built a really simple 120VAC to 12VDC 2A power supply.
Here is the schematic and the PCB.

simulate this circuit – Schematic created using CircuitLab

As you can see, the power supply does strange things. The frequency of that bump is about 5 ms and it has a width of about 0.2 ms. I think it is generating inconsistency in my op-amp readings because it gets extremely noisy.

Anyone could help me improve that design with some explanations?


texts: Why does inductor current in my LTSpice model rise to infinity?

texts:
I have been working on learning LTSpice because it appears it could save me a great deal of time.

To that end I have constructed this circuit

Purpose of circuit

This circuit is a high side driver for a N-channel MOSFET. It switches a resistor on and off. It is capable of a 100% duty cycle.

Theory of circuit

This circuit consists of a voltage amplifier formed by Q1 & Q2. This amplifier switches the gate of the MOSFET between V1 and 0 volts above the source. V1 is 12 volts, a commonly available voltage. R2 biases the amplifier to the high state, that is to say the MOSFET is on by default. R1 limits peak gate current, L5 models PCB trace inductance. R9 causes the MOSFET to turn off when the circuit is powered down.

In order to switch the MOSFET, the bases of the voltage amplifier just needs to be clamped to the same potential as the source. Q3 and Q4 form a bistable multivibrator, commonly known as a flip flop. Instead of switches, inductors are used to manipulate the current of Q3 and Q4. The base of Q4 in series with L2 which is the "set" circuit. The base of Q3 is in series with L3 which is the "reset" circuit.

L1 is coupled to L2 (set circuit). L4  is coupled to L3 (reset circuit). All inductors have an inductance of 100 microhenries, this seemed like a reasonable value for a small toroid wound with a simple bifilar winding. Coupling factor is 0.99. I had to set the internal resistance of the inductor to "0.01 ohms" in order to get this circuit to work. Use of inductive coupling allows the high side drive to be isolated, although this does require a separate voltage source (V1).

V2 and V3 are pulsed circuits which work together to produce a 10000 Hz square wave in the other circuit. They just produce very brief pulses to actuate the flip flop. The pulse voltage is 11.5 volts.

V4 and R6 are my sample load. V4 is 24 VAC 60 Hz.

Here is the graph of the voltage of V4 and R6, showing the circuit in operation.

After the body diode in the MOSFET turns off at 0 volts, we get a nice chopped up sine wave of voltage on R6. To me this demonstrates it works.

This is my problem. This is the current in L3 and L4

The current starts at 0 amperes and goes down from there. It's shown as negative just because of the way I have the inductor in the circuit. It's doing the right thing. So here are my questions

Why does the current go downwards towards infinity? This seems like it isn't modeling what I think of as real world behavior. After the voltage across the inductor drops to zero I thought the magnetic field collapsed. Is there something else I need to configure on this?
Why do the voltage pulses from V2 and V3 need to be 11.5 volts? I was thinking that I needed a voltage pulse of slightly less than 1 volt. The idea being that it would just be enough to temporarily counteract the voltage drop across the base-emitter junction of Q4 and Q3. Instead, it seems that I need a pulse of voltage with a value of V1 - Vbe. I don't understand this at all. Is this a problem with the simulation or a misunderstanding on my part?


texts: difference in reverse voltage of diodes?

texts:
I have a 9V circuit to operate latching relays. Because there are instances where two independent DC power supplies meet briefly, I decided to implement schottky diodes in the circuit to prevent them from affecting one another. Initially, I used IN4004 blocking diodes (https://docs-apac.rs-online.com/webdocs/14f5/0900766b814f5b51.pdf), but took them out because I realised they could only carry 1A of current. I subsituted them with SBYV27-200-E3 switching diodes (https://docs-apac.rs-online.com/webdocs/14ae/0900766b814ae442.pdf). I understand that switching diodes are used in instances where there are rapid and frequent switches in the power supply in both directions i.e. AC, however I have used them since they were already available and could carry up to 2A of current (vs 1A of IN4004). When I used my relay to disconnect a part of the circuit (9v measured before disconnection), I found it unusual when I measured around 2V in potential difference (with reference to GND) upstream to the diode at the disconnected part of my circuit. I was puzzled by why there was 2V when that part should have been disconnected by the relay, and any reverse current blocked by the diode. I then took those switching diodes out and switched back to the IN4004 blocking diode. With these, I measured 0V when the relay perform the same disconnection, showing that the circuit was effectively cut off by the relay and no reverse current was allowed through the blocking diode.

Thus, my question is why are my IN4004 diodes able to effectively block all current, while my SBYV27 diodes seem to allow some reverse current through? I want to clarify it this is indeed the case and whether a switching diode is similar (or not) to a blocking diode in blocking reverse current.

simulate this circuit – Schematic created using CircuitLab

I added a schematic. This schematic only has one DC source, but I tested the voltage measurement on this as well. Circuit maker does not have the exact relay model I am using so I combined two of them here. When one the coil is activated, one circuit closes and the other opens, and vice versa when the reset coil is activated. My circuit might appear unusual but I've designed it to work such that the coils are operated by the very same current that runs through the switching circuit it controls.


texts: Cascade of 555 timer with Control Voltage not triggering

texts:
Hi

I'm currently working on a cascade 555 circuit, both operating in the monostable mode. I also want to be able to control the pulse width with a voltage so am using applying 0-5v to the ctrl pin (The supply voltage is 10v). I've simulated the circuit and it seemed to run fine. However when I built it there seems to be an issue coupling the two timers together.

When the output of the first timer goes low and causes the capacitor to discharge through the first timer this should pull the second trigger pin to 0V. However in reality it's only going to about 2.6V which means that it will only trigger when the control pin is higher than ~5V (this is indeed the case). I've tried varying the 100k resistor to see if that would help, but that only seems to change the rate of recharge, not the initial voltage.

Does anyone know why this might be happening and how I can get it to drop further?

Thanks


texts:
When a MOSFET switch is turned off and goes from sample mode to hold mode, the channel charge exits between the source and drain terminals.
My confusion is, why can't some of the charge go back into the bulk instead of source/drain? I was taught that when a MOSCAP is charged and goes from depletion to inversion, the electrons that form the inversion layer are drawn from the bulk. Is this actually not the case? Does this mean that whenever a MOSFET is turned on, in general it'll draw current through its source and drain to form its inversion layer?


texts:
I have an STM32F723.  I'm trying to configure it so that my computer recognizes it as a MIDI device via USB.
I searched the internet for examples, and read up on USB and MIDI.
However, I'm lost in all this flow of information.
I use CubeMX and CubeIDE, do you have a SIMPLE example of configuration?
For the moment I just want Windows to recognize my card as a MIDI device.
I have managed to get Windows to recognize my card as an audio device but I don't know what else I need to do to implement MIDI.
I think I need to add MIDI files with functions to implement MIDI through USB, but I don't know what files, I see everything on the internet I'm lost.


texts: USB-C UFP and DFP Not Working Properly with ONLY Samsung Mobile Phones

texts:
I have a UFP device (basically just a light) that I am trying to sink for power only.  The "light" has a micro-B plug, which then plugs into a micro-B port on a PCB, that then includes a USB-C plug which plugs into a USB-C port on the Samsung mobile phone.

I believe the PCB is to USB-C spec and seems to work properly with multiple devices.  I've tried laptops, tablets, mobiles phones, etc.  The only devices that do not want to work properly seem to be Samsung mobile phones, such as a Galaxy S8.

When plugged into a Galaxy S8, power is applied at about 1 second on, 1 second off, a total of 6 times, then the S8 no longer sends power.  If the sink remains plugged in, the notifications on the S8 show "USB device connected" and then "USB device disconnected" multiple times, even after power is no longer sent from the phone.

The CC pin is grounded with a 5.1k ohm pull-down resistor and also has a 56k ohm pull-up to VBUS.

If I remove the 56k ohm pull-up resistor, the Samsung S8 sends power and the UFP device functions properly.  However, the 56k pull-up obviously needs to be there for safety, in case someone decides to try to use the adapter for a charging cable (even though that is not the intention of the adapter).  Or am I over thinking it?  Can I just pull the 56k and roll with it?

What is it that these Samsung devices are looking for that other devices are not looking for?  Or is there something I'm just not seeing, or that is not compatible?

And a side question:  Is a device required to be OTG compatible in order to host for a UFP?  I ask this because I have tested with another device that will not act as a host, no matter what configuration I use.  This device is not OTG compatible though.

Hopefully my post is clear enough and any insight is much appreciated.


texts: I want to increase the voltage on my electric fence charger

texts: My cows keep getting out and i have a solar powered 6volt fence charger.  I have seen one that was hacked and it was very powerful.  I would like to know how to do it.  I could do it with one that plugs into an electrical outlet also.  Any help appreciated.


texts: Proper way of connecting a molex connector to a breadboard

texts:
So I'm trying to mount a keypad that requires a molex connector to a breadboard. The datasheet says it mates with Molex 2695 series or equivalent. So I thought I could just get away with a 10 position female mating connector, which one end would go to the keypad and the other end would go to something like a male breakaway header. I was pretty surprised when I actually got the connector. One end looks like this, which fits nicely into my keypad

But the other end looks like this:

That hole is way too big for a typical breakaway male header pin.

What's the proper way of connecting something like this keypad to the breadboard?


texts: What effect does the resistance of the fuse have on the output voltage of a voltage divider?

texts: For the figure shown below, I want to know how the fuse affects output voltage when the input voltage is swept within a safe range. Theoretically the output voltage should stay the same, but will it change at all in a real world scenario?


texts:
I am confused on whether this is a depletion or enchantment MOSFET and I am wondering if anyone could figure it out. I need a depletion MOSFET for my circuit and can't figure out if this MOSFET is one.
Here is the link to the MOSFET:
https://lcsc.com/product-detail/MOSFET_ROHM-Semicon-RTQ025P02TR_C79602.html


texts:
I am trying to connect together 2 1W speakers and mount them inside some ear defenders. I am a complete novice and am following an instructable tutorial. The tutorial is a bit light on the basics and I have been unable to find any answers to my questions online. Here is a picture of the materials I am using...

3.5mm headphone jack socket, 2 1W speakers, audio wire, ear defenders.

Here is a close up of the speaker...

Question1: Points A and B are copper and points 1 and 2 are something else. So my first question is do I solder the audio wire to A and B or 1 and 2 or doesn't it matter?

Here is a close up of the headphone socket and wire ends...

Question 2: Do I poke the wires through the holes and solder there? Is it white wire on one and red on the other?

Question 3: Do the red and white wires have any significance?

Here is a link to the instructable tutorial I am using.

https://www.instructables.com/id/Ear-Defender-Headphones/

I am happy with the circuit that needs to be created just not sure where to connect everything. I tried holding wires against the contacts on the speaker and on the headphone socket with sound plugged into the socket and nothing happened with the speakers. Sorry for the long question but I am completely lost. Any guidance at all would be greatly appreciated.


texts: optimal mAH 18650 cell required for laptop

texts:
Good day

I will be replacing my laptop batteries with 18650's, however my question is as follows.

Stats :

Battery pack = 6 cell (18650 type Li-ion battery)

Time : +/- 3-5 Hours if memory serves.

My laptop power supply is 19V, 3.95A.

My laptop battery stats are 11.1V, 44mAh, 48.84Wh.

I have already done battery tests with my multimeter, seems like I have 3 banks of 2 since the voltages are as follows:

2 x 3.786V
2 x 3.808V
2 x 4.089V

This is a 2 part question:

With my battery stats, is there a method I can calcuate the maximum time my laptop can/could last from a full charge?
Can I use 18650 batteries that have e.g. 4000mAh?


texts: How to check a 433Mhz module on an Arduino

texts:
I am new to arduino and electronics so please bear with me :)

I would like to build a 433 MHz receiver which output I would later feed to a RPi (that will be the easier part for me). I bought a set of receiver/transmitter branded XD-RF-5V and XD-FST. I found several pages explaining how to use them with an Arduiono (here and here for instance, the second link has pictures of the exact parts I have) -- they are very clear.

After doing the wiring I have some doubts about whether the receiver works: I put next to it a Oregon Scientific temperature sensor which emits on 433 MHz (THN128 model) and I have no readout ever.

What would be the simplest arduino code to check if the receiver works (actually receives signal)? I have wired DATA on the receiver to PIN 2 (in addition to GND and 5V)and so far have used the simplest code I could find (from rc-switch, Advanced Demo script):

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(0);  // Receiver on inerrupt 0 => that is pin #2
}

void loop() {
  if (mySwitch.available()) {
    output(mySwitch.getReceivedValue(), mySwitch.getReceivedBitlength(), mySwitch.getReceivedDelay(), mySwitch.getReceivedRawdata(),mySwitch.getReceivedProtocol());
    mySwitch.resetAvailable();
  }
}

EDIT: Following up on a post describing a similar issue, I ran the following code which output noise (0 and 1) on the serial monitor. I am not sure this is a proof, though.

#include <VirtualWire.h>

void setup()
{
    Serial.begin(9600);          // Configure the serial connection to the computer
    vw_set_ptt_inverted(true);  // Required by the RF module
    vw_setup(2000);            // bps connection speed
    vw_set_rx_pin(2);         // Arduino pin to connect the receiver data pin
    vw_rx_start();           // Start the receiver
}

void loop()
{
  int val=0;
  val = digitalRead(2);
  Serial.print(val);
}


texts:
When there are multiple sources of power, how is it determined which one is used? or are they all split?

Easy example is a grid tied solar system. If you have grid power in a breaker box and also solar power coming into the breaker box, how is the decision explained? Does the load use the incoming solar energy first? If so, why?

From observation, it seems the inverter monitors the voltage from the grid and outputs very slightly higher voltage. If i'm correct then the determining factor is voltage. If voltage is like pressure, is a higher voltage source pushing back the lower voltage source?


texts:
I do not understand the meaning of the phase of scattering parameters.

Let's consider for instance a two port network, and let's focus on S21.

I know that its absolute value represents a ratio between power transmitted at port 2 and power sent in port 1. But what is the meaning of its phase?


texts: Smallest, simplest possible (randomly) flashing 2-3 LED circuit

texts:
I am trying to randomly flash 2-3 LEDs using the smallest possible circuit using 1 or 2 CR2032 batteries. Can I power 2-3 3mm (3-3.4v, 20mA)(amber, white) flashing (slow 1Hz) LEDs using one CR2032 battery? Can I get them to flash at different rates by using a 2nd battery? I found this project that uses only the flashing LEDs and a battery...http://www.youtube.com/watch?v=Rj5tqhGypAE&feature=player_embedded
...but I think that may drain the battery too quickly since there are no resisitors used, is that correct?
I have read this question but I do not have the power requirements of the IR LED.


texts:
I'd like to hook up a wireless bell to my garage door control board (bell should ring when door is opening).

The garage door control board does expose several contacts dedicated to lighting indicators, that are to my understanding all AC.

230V (25W max) blinking while opening
230V (60W max) constant while opening
24V (3W max)  constant while opened

I chose a pretty basic Wireless bell.

My idea was somehow to short the momentary switch of the remote (that rings the bell when pressed) when there is AC current from some of theses pins.

What would be the cheapest and most cost effective way to do that?
Do I need a AC/DC converter or is there some kind of cheap low-power relay that could do the trick?

EDIT: Here is the actual notice of the garage door control board: PDF link, go to page 6 for lighting options.

Thanks!


texts:
The above image is regarding the Miller Capacitance present in the MOSFET.
I am finding it tough to understand the concept of Miller capacitance. I am trying and researching documents and videos to understand it.
I am not able to understand the graph.
Question 1: Assume Vdc (as per the image) is 20V. And VG is applied from 0V to 5V.
From the graph, at the initial part, when VG slowly ramps up, Voltage at VDC also increases? How is it possible? I think I am failing to understand the basics of capacitors and capacitance which is why this query arises. Can someone help me to clarify this doubt and help me understand a little more intuitive on this capacitor action during millers effect?
Question 2: Why does the Plateau occur? Can someone help me with the concept of miller plateau?


texts:
As far as I know for a feedback loop ,
a sensor is required to reduce the effect of disturbances but
1.why a simple RL circuit has a feedback loop but it didn't contain any sensor , so

isn't sensing element is not a necessary condition for feedback loop?

Or
I'm missing something? Or  I  have some misconception about feedback systems?
Here is pictorial representation of RL circuit -


texts: Combining non-isolated switch mode power supplies in parallel into a single supply

texts:
I'm trying to combine several SMPSs each having a ~350VDC output @100mA each.

Background:

Purchased an unused batch of small DC->DC SMPSs in good industrial quality. Unfortunately they're too weak for my purpose.

Specifications:

Input 24-30VDC
Output adjustable 75VDC-400VDC @ 40W max load.
Non-isolated ( Input and Output shares GND. )
Switching circuit operating ~ 75KHz.
Measured: 350V @ 100mA => Ripple < 3V.

The SMPSs have built-in soft-start + short-circuit protection, but apart from adjustable voltage, they have no other control-options.

I was hoping to combine say 7 of these SMPSs using "simple" non-foldback current-limiters and connect their outputs in parallel.
(The current-limiter in mind is almost similar to the ones described in this topic.)

In my case one dedicated SMPS is used to drive the voltage (emitter follower.)

The "driver" will deliver the desired voltage and the remaining SMPSs should be in current limiting mode, sharing the load equally between them.

At least, that's the result I'm aiming for. ;-)

There should be a total of 7 or 8 current sources. ( Only 3 is shown here ).
Resistors / Capacitors / Voltages has not been calculated.

Is the constant voltage driver + several current limiters a good approach?
Do I need diodes ( D2 - D8 ) at the output of each current limiter?
Is it necessary to have a resistor ( R1 ) or a "current limiter" in series with the output of the CV-mode "driver" ?

Having a "driver" capable of delivering relatively high current should eliminate the need for Darlington BJTs as serial regulators.
However this also means that the current-limiting "bypass" BJTs need to deal with higher currents.

Can I use normal BJTs ( TIP50G or MJE18004G ) or are Darlington BJTs a requirement?

Can I use 2 standard BJTs in a Darlington setup?


texts: will two plls wander with shared reference clock

texts:
I'm trying to learn about pll wander or drift.  My reading leads me to believe one of the reasons plls were developed was to fight wander so maybe it does not affect plls?  Although I've seen some things about the wander of the source becoming the wander of the pll or perhaps noise higher in frequency than the pll can handle doing the same.
If I have two PLLs in two separate chips, both of which are fed from the same oscillator.   Then I set them both to the same frequency I feel like they will jitter, and that I won't know the phase difference, but that they should not wander away from one another over time because they both share the same reference clock.  So the plls will constantly be trying to correct their output to the same reference, thus keeping them close (within 1 bit time).
If they both used their own reference clock I could understand how they could wander because one might be slightly faster than the other.
Am I right or wrong about that?  Do plls wander from their reference?  Thanks!


texts: Eagle - How to make the router ignore internally connected pins (the other way around)

texts:
I have a push-button component in Eagle 8.2.1. The same kind of thing as described in this question:
Eagle - How to make the router ignore internally connected pins (in a package)
Contrary to the person in that question, I want the autorouter ignore the fact that these pins could be used as a bridge and have it connect all traces to one of them.
The setting in the "Connect" window allows me to get one of the following two options:

Force traces to go to both pins:

Consider the pins to be connected the same way as if they were connected by a trace that's not part of the autorouter:

I want neither of those. I want the autorouter to connect all traces to one single pin (ideally whichever works best for the situation):

How can I accomplish this? I can't seem to find an option for this.
PS: Ideally I would like the airwires to also behave this way. If there's a way for that too, I'd appreciate it.


texts: Is there any different on the same amount of amps with different voltages?

texts: Have two different loads on two circuits, the first circuit is running at 3.3V, second is 5V. Those two loads draw exactly 100mA on each. The question is, does those two circuits have the same amount of electrons transfered in the same period of time?


texts:
I try to design a cost-effective but still "reasonably engineered" way of driving a single white LED with a micocontroller with the following "specs":

For the single white LED no extra boost converter should be necessary
(as a side note: I found that most simple led boost converters only work from >=2LEDs in series, so even If I used such as boost converter I would need to use two LEDs even if i only need one)
The supply voltge is nominal 3.3V, but could be set higher to about 3.6V
The single white LED should be run on a rather small but fixed current, let´s say somewhere between 3 - 5mA (across different PCB charges)
The white LED is available in binned forward voltage groups and one group limits VF to be in between 2.8 and 3.2 volts (the unbinned range is up to 3.6V where I see no way of achieving what I want without a dedicated boost converter)
Due to various reasons I'd prefer not to drive/sink the LED current directly from the uC pin, since even if 5mA are small, the driving results in some "ground offset" on the uC pin which could disturb another pin).

This seems pretty simple but is challenging for me because after some number crunching I seem to miss something.

I assume the most simple form of driving a LED with constant current, i.e. a series resistance, the LED and a low-threshold MOSFET as low-side switch. As an example, I assume using the https://www.mouser.com/datasheet/2/302/NX3008NBKW-842194.pdf

To achieve a specific, constant led current (I assume 4mA as target) I think I need to use the MOSET operating in saturation(current not dependent on VDS but settable via VGS and I assume the VGS set by the uC is constant).

I assume the uC can drive the gate of the MOSFET with 3.0V. To operate in saturation I need to keep VDS > (VGS - Vth). If I understand correctly, in this case, I actually want the minimum Vgs,th to be actually rather high, so that the saturation condition is fulfilled and the VDS voltage (voltage drop across the MOSFET) is still low.

According to datasheet I see a Vth,max = 1.1V, and Vth,min of about 0.6V, so let´s take 0.5V. Would mean that VDS must be greater than VGS-Vth = 3.0-0.5 = 2.5V. And there starts the crisis. Even with a forward voltage binned between 2.8 and 3.2V that would mean I need a minimum VDD of 2.5+3.2V = 5.7V, not even accounted for a series resistor to the LED?

There must be obviously something wrong in my thinking. I am pretty sure of having seen single blue LEDs (which are to my knowledge the same as white LEDs in terms of forward voltage) driven with the described topology. Is my assumption wrong that I need the MOSFET in saturation for setting a constant current? Driving a single LED with a few mA can not be that complicated, can it? ;-)


texts: Inducing Hum Deliberately in Analog Circuits

texts:
I would like to make a simple testing device that deliberately emits electromagnetic / electrostatic noise to test analog audio circuits for resistance to hum from switching power supplies, PWM outputs of microcontrollers, motors or whatever.

Can someone recommend a hum inducing circuit for testing analog circuits? Something like a loop of wire with a high voltage square wave perhaps? What would work best?


texts:
Please take a look at this video http://www.youtube.com/watch?v=6HKQTuVD2ac and tell me what's the LITTLE BLACK switch called where he changes the challenges (1 to 10) with. I guess technically it's a number decoder but I'd like to know the name of the design of the switch as shown in the video.

image link: http://www.abload.de/img/unbenannt9sz1b.png


texts: calculating sinewave frequency for a low pass filter with only cutoff frequency, input sinewave amplitude and output sinewave amplitude?

texts: I have the input and output sinwave amplitudes as well as the cut off frequency how do I use that to calculate the sinewave frequency(Hz) for a low pass filter. I'm unsure of what I need to be a looking for to calculate it.


texts: I want read data from rs485 port to arduino using Rs232-TTL converter but I am not getting any data in arduino serial monitor.  Please help me.


texts: Claulating the resistance for the IR Flame Photodiode sensor

texts:
Hi I wish to make a IR Flame sensor. I have made a schematic as below.

But I could not determine the values for R(x) & Rpot(y). I have tried x = 10K, y=10K , x=1K , y=10K,etc (randomly). But I could not fully control the output using the potentiometer.

I need to fully control the output using the potentiometer. Please help me calculate the values of x and y. Also let me know if anything else cold be added for the better functioning of the sensor.


texts:
For inverter closed-loop controlled PMSM motor, if we want to realize a high speed accuracy at steady state, say 0.2%, i.e., +/- 2rpm at 1000rpm, must the PWM accuracy be better that it? Or is it more about PWM resolution?
My understanding is that the PWM resolution must be better, say 12-bit, and then resolution is not a problem. One the other hand, PWM accuracy is affected by MCU clock, which is affected by external crystal/oscillator. If PWM accuracy must be better than motor control's accuracy, then I have to be very careful when selecting the components.
[updated]
Another issue is the motor speed measurement. For such higher accuracy motor speed control, I guess encoder is needed, and since 12-bit and even 15-bit incremental encoders are available, so I guess it is more on the speed detection algorithm to make sure the measured speed accuracy is better than 0.2%. Any suggestion on encoder processing algorithm?
The motor load is a slow changing one and the variation is roughly +/- 5%.
[update-2]
Let's not talk about cases like flywheels where the inertia is huge to help stabilize the speed. I think a proper analogy would be a blender blade driven by a PMSM motor with encoder, blending a small amount of fruits.


texts: Why exactly can't a single resistor be used for many parallel LEDs?

texts: Why can't you use a single resistor for a number of LEDs in parallel instead of one each?


texts: Why do these capacitors have an additional plastic block around them? What kind of capacitor is this?

texts:
Just saw these type of capacitors for the first time and I'm curious :

Why do they have this additional block of plastic around them? Some kind of shielding?
Is there some specific reason they didn't just use the normal "can" type of electrolytics?
What type of capacitors are these?  Are they still electrolytic?


texts: Programming the ATMEGA328 chip without an ADRUINO

texts:
I have the code I can copy and paste, just wondering if I can program the chip with my desktop. I have Windows Vista 64bit. Building what the author states as an Adruino spot welder controller/solid state relay. Just delays a transformer DIY spot welder to a more precise measure.

Thanks!


texts:
Is there some drawback in having a BJT transistor saturating without a load?

The scenario is this: BJT is driving a relay, but there is a switch to have the relay always on or off leaving the BJT collector open. In this case there is just the Ib flowing in the transistor, my worry is that strange situation can damage the BJT or decrease its life duration.


texts: In Sedra Smith I can found that: Rout = ro + (1 + gm * ro) * Re_s, Re_s = Re || r_pi. Can I see in my circuit using simulation tools (like current probe, voltage meter) that previous equation approximately valid? I think that output impedance I need to meter at collector of Q1 to ground.


texts: Unable to identify minimum trace spacing from Gerber file

texts:
I designed different PCBs using KiCAD, exported gerber and drill files and uploaded those to JLCPCB. However, I get the following warning:

  Can not identify the minimum trace spacing

As far as I can see, the minimum trace spacing is set to 0.2 mm by specifying that value for each NetClass. The DRC control is then referring to the given NetClass specification.

I assume that the DRC is only affecting the PCB design inside KiCAD which, for sure, is the basis for Gerber file export, but might not necessarily export the minimum trace spacing setting to the Gerber files.

How can I double-check the minimum trace spacing based on the exported Gerber files? Could I even ignore this warning regarding the minimum trace spacing since this should be correct by means of DRC?


texts: component to measure the passing of a striped string

texts: Has anyone ever come across some sort of optical component that can count the stripes in a patterned string as the string is pulled through?  Just curious if something like this exists or if the DIY route will be necessary.  Thanks for any help!


texts: Is there a way to execute a ULP in eagle with one key stroke?

texts:
I need to use the "find.ulp" very, very frequently when triple checking the parts, so this is what I am doing now: click ulp button, enter "fi" to wait for windows to auto finish, then select the auto-tip and then press enter.

I have to check no less than 500 parts, and this is getting kind of counterproductive as well as well, intellectually humiliating.

I mean in Altium Designer all I had to do is to enter the part No. and the view will be teleported and zoomed right to that component.

I must be doing something horribly wrong.


texts: Analog Input Voltage for Agilent DSO-X 2002A Oscilloscope

texts:
How can I find the minimum analog input voltage for an oscilloscope?
I've checked the datasheet for the particular one I am using(Agilent DSO-X 2002A) and only the maximum input voltage is listed.


texts: Calculate input impedance of this circuit

texts:
I'm not too sure about this. It says neglecting all other capacitances so then surely the Cgs capactior is zero and thus that connection from the gate to between the two caps is relevant. So isn't the input impedance just the series combination of C1 and C2:

$$Z_{in}=\frac{(\frac{1}{jwC_1})(\frac{1}{jwC_2})}{\frac{1}{jwC_1} + \frac{1}{jwC_2}}$$

I feel like I'm missing something very important.


texts:
Some chips with high input voltages have a very tiny package.

For instance, power gauge INA226 has a maximum convert voltage of 36V, but it's in MSOP8 package, the distance between two pins in its recommended layout is only 0.22mm, can such a short distance be safe for 36V?

In another way, how much voltage can a clearance of 0.2mm deal with?

Thanks.


texts: Art of Electronics: Emitter-Follower Zout

texts:
I am a growing frustrated with the Art of Electronics.  It is such an approachable book in Chapter 1, and then in Chapter 2 it seems like the authors wanted to make it more textbook-like and they start dropping information in lieu of exercises.  I suppose this is really not a self-study book...

Unfortunately I am one of those guys who has to understand the concepts, I cannot just blindly follow a formula.  In particular I am trying to understand output and input impedance of the emitter-follower.  The text gives a good breakdown of how the input impedance, the impedance looking into the base, is derived.  It then plops down the formula for output and says that it can also be computed...and then an exercise appears asking one to prove it.

$$Zout = \frac{(Zsource)}{(h_{fe} + 1)}$$

Show that the preceding relationship is correct.
Hint: Hold the sourdce voltage fixed, and find
the change in output currrent for a given change
in output voltage.  Remember that the source voltage
is connected to the base through a series resistor.

I don't really even know where to start.  I just jotted down a few formulas and started substituting...

$$\begin{eqnarray*}
  r_{out} &=& \frac{(\Delta V_{out})}{(\Delta I_{out})}\\
   &=& \frac{(\Delta V_e) }{ (\Delta I_e)} \\
   &=& \frac{(\Delta V_b - 0.6V) }{ (\Delta I_e)}\\
\end{eqnarray*}$$

$$\begin{eqnarray*}
  I_e &=& I_c + I_b \\
 &=& (h_{fe} * I_b) + I_b\\
 &=& (h_{fe}+1) * I_b\\
\end{eqnarray*}$$

\$\Delta I_e = (h_{fe}+1) * \Delta I_b\$

\$r_{out} = \frac{(\Delta V_b) - 0.6 V } {(h_{fe} + 1) * \Delta I_b}\$

Can I assume that 0.6 V is negligible and can I drop it?  If so,

\begin{eqnarray*}
r_{out} &=&       \frac{(\Delta V_b)}{ (h_{fe} + 1) * (\Delta I_b)}\\
 &=& \frac{(\Delta V_b)}{(\Delta I_b)} * \frac{1}{(h_{fe} + 1)} \\
  &=& \frac{r_{source} }{ (h_{fe} + 1)}
\end{eqnarray*}

Am I any where close in my derivation?  Are my assumptions about [\$V_{out} = V_e\$] and [\$I_{out} = I_e\$]valid?  And is it acceptable to drop the base-emitter junction voltage drop in my derivation?


texts: Appearing voltage when connecting different grounds

texts:
We have designed instrumentation equipment. When several instrumentation units are connected their grounds must be connected. The first proposal was to connect the GNDs by cascade topology. But we have the problem of connecting different grounds: each one has different voltage instead the same reference. So, equipment behaviour becomes imprecise. It doesn' t works correctly.
I know this problem is a typical one. This missfunction has been corrected by using the common gnd source supply pin for all the boards gnd instead being cascade wired. But I would like to improve the pcb design in order to save the previous idea.

I'm trying to remember the school subject in which one how to solve different ground voltage when its expected to be the same. There was some circuit design strategies to avoid the problem. But It stills so far from my memory.

Is it possible to connect gnd pins having the same reference?
If you start to design a circuit that is expected to be connected with other by connecting gnd, how do you face this. What kind of pcb and circtuit design strategies will you take into account?

It will be grateful if some one could give me a little strategy list or source where to find the current strategies.

In ex, here:

https://electronics.stackexchange.com/a/39477/144534

Regarding "A well designed circuit must have a reliable ground, which means that the 0 V at one point should be as close as possible to that 0 V at any other point of the ground net. Zero difference is not always possible if you're working with high currents, but the difference should be as low as possible."

Some suggestions about how to get this could be helpful.


texts:
How many transistors are there in a logic gate?

If anybody asks me, I tell them:

A NOT gate is 1 transistor.
A NAND gate is 1 transistor per input.
A NOR gate is 1 transistor per input.
An AND gate is basically a NAND gate + a NOT gate, so it takes 1 transistor more than a NAND gate.
Same for OR vs NOR.
An XOR gate is built from multiple other gates, typically about ~4.

Sounds pretty reasonable, right? Thing is, I just realised... I have no idea why I think these are the correct numbers. I don't remember reading that somewhere or anything. I'm beginning to think maybe I just made it up. Sure, it sounds convincing; but that doesn't make it correct!

So what is the actual number of transistors per gate? I imagine it's different depending on which logic family we're discussing. (My brain is telling me that the numbers above are for TTL, and CMOS is exactly 2× the that, but again I don't know if there's actually a shred of truth to that.) If it does make a difference, I'm most interested in TTL and CMOS.


texts: assign values to all columns in 2D array in one statement

texts:
I would like to assign value to an array. The array is 2 dimensional it has 16 rows and 16 col. Each element is 2 bits wide.

I would like to initialize each row of an array like so:

Initialize the 4th row of the array, then each value should be stored in respective column,  so 0 will be in 15th col, 2 will be in 12th col, etc. I do not want to store values column by column. I've tried implementing it below but my code is erroring.

module test2;

    reg [1:0] mem [15:0][15:0];

    wire [1:0] icon;

    assign icon = mem[4][4];

    mem[4][15:0] = 16'h0002000000000000;

    $strobe("%b", icon);

endmodule;


texts: LEDs on a (battery) budget! – How can I lower the current through a LED without using up the battery?

texts:
EDIT: Here is a much brief version, the meandering motivated version is probably subsumed in the parent question on general battery life optimizations.

  How can I lower the current into a LED without wasting battery?

I think using a resistor to lower the current will use up battery life.  Is this true?  How does it use up the battery if the current is kept small?  Is it the power dissipation?

I think using a diode (and smaller resistor) will still use up the battery (LadyAda said something like "any linear device to lower the voltage uses the same amount of power").  Is this true?  Is it the same amount?

Can I lower the voltage "for free", that is, without wasting too much power?  How can a regulator IC do what a resistor or diode cannot?


texts: Should I use a fan or fume extractor for soldering?

texts: I have been starting to solder about once every two weeks. I haven't used any sort of fume extraction or fan, but reading about the health risks, I now understand how important it is to get those fumes away from you. I have some 120mm computer fans lying around that could scatter the fumes and blow them away. Is this adequate for soldering, or should I really just get a fume extractor? I really don't want to spend 50 dollars one one, so I want people's opinions on this. If I only solder occasionally, and use a fan to blow the fumes, do I need a fume extractor?


texts: H-Bridge out of 2 (1 PNP, 1 NPN) Darlington Arrays

texts:
I need to control, with a µC, 4 single-coil latching relays and I am exploring various options. My first bet would be a H-Bridge. Since H-bridge ICs are quite expensive and are mostly designed to drive motors but discrete components would use a lot of space, I thought I would use a TD62783 for the high side and a ULN2803A for the low side. I attach a screenshot of part of my schematics

K1 = Single-Coil, Latching relay
Q1 = ULN2803A
Q2 = TD62783

Would this combination work? If not, what needs to be changed and why?

UPDATE: The relay is a 12V operated and will switch 230V AC current. Part number: G6CU-117P-US

PS: Thanks for the answers, interesting solutions. My original question was however, if my solution would work and if not, why not. I am quite curious to have an answer for that.


texts: How does NAND A input (pin 2) ever get pulled high?

texts:
Here's a circuit to allow you to pause an Atari 2600:  http://www.victortrucco.com/Atari/AtariPausa/EsquemaPausa.jpg

(Full article at http://www.victortrucco.com/Atari/AtariPausa/atariPausa_en.asp)

I'm pretty good at understanding / designing logic circuits, but still a little sketchy on all the implications of capacitors and some other analog effects.  Usually if I stare at a logic circuit schematic long enough, I'll eventually figure it out, but this one has me stumped.

An unmodified console essentially has pins 2 & 3 of the jumper bridged.  Normally a pin on the TIA chip will briefly halt the CPU every so often by bringing the RDY pin low (for DMA or memory refresh, not 100% sure).  Since there are only certain windows of time where it's valid to deassert RDY, the circuit takes advantage of the existing operation and waits for the TIA to pull the line low, and then doesn't let it go back high if the switch is closed.  Open the switch back up, and gates C and D should begin passing the TIA output through to the CPU again.

The only thing I can't figure out is how pin 2 is ever pulled hi.  It looks to me like diode D4 will allow the switch to pull the pin lo, but should block current flow in the opposite direction so that pull-up R2 can't do its job.  I'm willing to accept that it could initially be high based on less-well-defined behavior of the logic gates when power is applied, and the cap would help hold a steady bias... but I wouldn't mind hearing comment on that as well.

Supposedly this circuit works, and many have implemented it... But the reason I'm looking into it is that a friend just built the circuit as shown (twice), and it's not working for him.  The Atari works fine when powered up with the switch open, and it pauses when the switch is closed.  But never comes out of pause when the switch is opened.  And that's exactly what I would expect from this circuit, so it makes me think maybe I'm not too far off.

Or is there something about the circuit that allows the pin to be pulled high that I'm just missing?  Is this a borderline case where it may or may not work depending on the specific components used?

A couple other small points I'd like to check my understanding of:

Function of pull-down R1...  Diodes D1 and D2 only allow the TIA and NAND B output to pull pin 1 input hi, so this biases it lo
Purpose of pull-up R3...  Perhaps the TIA  output is open collector and RDY pin is pulled hi internally... so this is needed to bias this node hi?
Purpose of C1... Probably debounce
Choice of values for R1 / R3... Any obvious reason R3 is 1.5K and R1 is 1K?  IF TIA output is open collector, these form a voltage divider, I'm thinking not sufficient to hold pin 1 input low.  If the TIA pin is always driven, these values shouldn't matter much.  Are the resistors perhaps helping to set the initial state of the circuit?

EDIT:

is D4 even needed?  Shouldn't this work fine if D4 is bridged?


texts: Circuit to throw out 1st bit of every 17-bit sequence?

texts:
I have a system that currently uses two Maxim DS1867 digital potentiometers in a daisy-chain configuration.  In a new addition to the system I would like to use a new digital potentiometer part like the Analog Devices AD5142 for availability and reduced footprint size.  Both of these parts have two (2) 8-bit potentiometers, but the problem is that the DS1867 uses a 17-bit serial communication string with the first bit being an unused stack select bit, while the AD5142 uses only 16-bits in its communication stream.  This wouldn't be a problem if only one part were used but I need to be able to daisy-chain the parts.

What sort of circuit should I be looking at that could throw out the first bit of every 17-bit sequence so that I can use the existing data stream?


texts: How to hack to limit output power of a regular SMPS?

texts:
I need to charge my 60 Ah LiFePO4 battery with a small charger as fast as possible at 14.4V. There are lots of relatively cheap SMPS in the market which are not designed for this purpose (they are constant voltage supplies with overcurrent protection), so they are either failing to charge the battery or eventually burnt out.

The battery requires 45A @14.4V when it's fully discharged. It quickly drops to 30A after 10% SOC and maintains this current till 80% SOC. After that point, required current quickly drops and charging operation is finished.

I'm not able to place a sufficient power source that can handle that worst case current (40A) because of the space constraints. Moreover, it's not that wise to invest (and carry around) an additional 10A of hardware which will be only used for the first 10% SOC.

The SMPS' that have less than 40A @14.4V power rating is unable to charge this battery because all of them has "hiccup protection mode", which turns off the power supply on an overcurrent situation.

It turns out that the mentioned overcurrent protection somehow fails to operate correctly. I have burnt out 4 power supplies (360W to 480W) in one month. On the other hand, some SMPS models claim to have the appropriate current limit function but those have very insane amount of price.

In this desperate situation, I'm planning to limit the output current while keeping the maximum voltage set to 14.4V, thereby limiting the output power to 90% (eg.) of the rated power of the supply. Moreover, as I'm changing the voltage/current characteristics of the supply as follows:

I'll be able to connect many of this modified SMPS' in parallel to get higher current without worrying the strict voltage matching requirements.

Current approach

After some experiments, I figured out that the 2 out of the 3 pins of the variable resistor is connected to GND. :

The other pin of the resistor has 0.96V while the output is 9.75V and 0V while the output is 14.3V. I'm planning to measure the output current and manipulate this reference voltage accordingly with the following approach:

Set this reference voltage to the highest value by using that variable resistor.
The SMPS will output its lowest voltage at this time.
Add some voltage to that pin if the current is inside the limits till output voltage is below the required level.

Is there any easier way to achieve the same/similar result?

Edit 1

As I reverse engineered the feedback stage, there is AZ431-B reference diode used within the circuit and interestingly, the circuit diagram is the same as one of the examples in the application notes in AZ431-B datasheet:

Solution

(see https://electronics.stackexchange.com/a/482758/20285)


texts: What is the physical significance of the unit ampere/meter in magnetics?

texts:
I'm having a hard time understanding what is the stuff this unit measures. I understand ampere, and I understand meter, and I understand per, but since ampere is a measure of current, I'm having difficulty understanding how this relates to magnetics. I understand a current is associated with a magnetic field. What I don't understand is how these all fit together to make ampere/meter.

What is an ampere/meter and what is the thing that it measures? How can I construct a thing that makes an ampere/meter? As I vary the parameters of this thing (whatever parameters it has: length, turns, current...), how does the amperage per meterage change?


texts: How can I construct a Karnaugh map from this table made from a Moore FSM Transition diagram?

texts: I am new to Karnaugh maps and I would like to find out how I can go about this the data is correct but maybe the layout of this table is not correct, there are four states s0s1s2s3 and the inputs are B and Y where the next stage or state is noted by S1' and S0'the X are there because the diagram had a Y' hence not Y and B is independent of it. I am trying to find the SOP(sumofproducts)binary form of this truth table. Thank you any help will be appreciated


texts: Is there any standard in industry for using uppercase or lowercase for V and I in circuit diagrams? I ask this because my book seems to switch back and forth between the two without any rhyme or reason and I can't figure out any pattern for why it will choose one way over the other. It also switches back and forth for subscripts.


texts: Flash atmega 8u2 on arduino mega with another arduino mega as ISP

texts:
[For a detailed post of my problem read here]

Long story short: My Arduino mega 2560 works fine (I plug it in, code runs flawlessly) except for the usb-serial converter which when connected to the PC (running w7 x64) won't be recongnized, not even on Device Manager.
After digging I came to the conclusion that I had to reprogram the ATmega 8u2 serving as the usb-serial converter.
Borrowed a friend's Mega ADK which works correctly with the same usb cable, OS and everything. Loaded it up with arduinoISP sketch so as to use it to program the 8u2 on my faulty mega. Everything connected and I tried this command on the CMD prompt:

avrdude.exe
  -C [pathToArduinoFolder]\arduino-1.0.1\hardware\tools\avr\etc\avrdude.conf
  -c arduino -p at90usb82 -P [COM_Port_where_arduinoISP_is_connected] -F
  -U flash:w: [pathToArduinoFolder]\arduino-1.0.1\hardware\arduino\firmwares\arduino-usbserial\arduino-usbserial-mega.hex

when I hit enter the error led flashes, the heartbeat led turns off and nothing happens for a few seconds. After that, the programming led flashes a few times, the error led flashes once and finally the heartbeat keeps on glowing. On the CMD prompt I get this message

avrdude.exe: stk500_getsync(): not in sync: resp=0x00

which leads me to think that my mega is not responding to the programmer.

How can I beat through this error and get my mega to work again?


texts:
Assume that Each circuit breaker is identical.
Each breaker trips at 15 amps on a 120V circuit.
One circuit breaker is located back at the circuit box with 50 feet of wire to the outlet.
The other circuit breaker is located at the outlet with 5 feet of wire to a high load application which draws more than 15 amps.
Which circuit breaker has a higher chance of blowing?
I would imagine the one at the box because more current may exist due to the resistance in the 50 feet of wire.


texts: SPI LED driver with radically different brightnesses PCA9745B

texts:
So I'm trying to bring up a new SPI LED driver that I've never used before PCA9745B. and I'm getting a really weird bug.

When writing identical data to the chip, using identical LEDs and nearly identical trace layout. Some of the LEDs barely turn on while others seem to function perfectly. The pattern of bright v dim LEDs is constant per chip but is different between chips. Each of my boards has two driver chips. I've tried swapping the position of the two chips and the position of the bright/dim LEDs swaps accordingly. New chips give new patterns.

Chips are wired like so with LED_CS, LED_MOSI, LED_MISO, and LED_CLK connected to a micro controller

LEDs are wired like so

The LEDs used are 732-4980-1-ND, 511-1589-1-ND, and 732-4978-1-ND

The data being written out on the LED_MOSI line is as follows

send_SPI2(0b0000001000010000, 0b0000001000010000); //MODE2 Clear Errors
send_SPI2(0b0000001000000000, 0b0000001000000000); //MODE2 Reset?
send_SPI2(0b0000010001010101, 0b0000010001010101); //LED0-3 state 01
send_SPI2(0b0000011001010101, 0b0000011001010101); //LED4-7 state 01
send_SPI2(0b0000100001010101, 0b0000100001010101); //LED8-11 state 01
send_SPI2(0b0000101001010101, 0b0000101001010101); //LED12-15 state 01
send_SPI2(0b1000001010000000, 0b1000001010000000); //IREFALL Mid brightness

These two pictures show the output on two identical boards running identical firmware with all LEDs supposed to be on (only the PCA9745B chips have been swapped)

Things I've tried:

I've scoped the data being sent to my chips and they appear to be getting exactly what I'd expect.
I can turn on any individual LED or group of LEDs with no problems except the brightness. Setting the current value for the bright LEDs changes their output as one would expect but has no effect on the dim LEDs except for turning them off when current is set to zero.
Setting the brightness value for each LED individually has the same effect, works fine for the bright LEDs, does nothing for the dims.
Just turning on one LED makes no difference, it will stay either bright or dim
I've considered that I may have damaged the chips somehow and swapped them out but this doesn't help other than to change which LEDs are bright.
I've swapped the LEDs around in case there was some sort of variability in the Vf but the brightness stays constant per position regardless of which LED is there.
I've tried reading out all the error registers on the chip and get no errors anywhere
*I've re-flowed the chips and made sure the thermal pad is properly soldered down
*I've bumped the value of Rext(current limiting) both up and down with no impact

At this point I'm pretty much at a loss for what to try next. My one thought is that the LEDs could need a resistor in series to compensate for slightly different Vf values but the datasheet says the chip should be able to handle this so I'm doubtful that's the solution. If you've used this chip before or have any insights I'd appreciate any suggestions!


texts: What are the basics of using ROM-based controller in lieu of discrete logic

texts: In Computer Architecture and Organization, how can one use ROM-based controllers instead of discrete logic? My teacher explained a bit, but I can't find any details anywhere online (well, I looked on Bing).


texts: Is there a compact way to connect these two ports?


texts: reading values from an IR receiver in a laser tag gun

texts:
I'm trying to mod an existing laser tag gun adding new features. To do this I need to "piggy back" on the guns IR receiver and read values from it using a microcontroller (in my case a microbit) whilst its still connected to the existing guns circuitry.

I'm pretty sure the receiver being used is this:

http://arduino-info.wikispaces.com/file/view/IR-Receiver-AX-1838HS.pdf/264668680/IR-Receiver-AX-1838HS.pdf

I perhaps naively assumed I could attach the signal pin of the IR receiver to an analogue GPIO pin and read values from it as the gun is hit by the other gun.

This doesn't appear to work however as I just get a load of low level noise and no obvious peaks and troughs. I'm taking a reading every 0.026 milliseconds which should be roughly in sync with the 38khz frequency of the receiver.

Just to make sure I've tried reading all three pins in case I got the signal pin wrong but they all read the same kind of noise.

Am I just wrong expecting to be able to get a reading from it whilst its also connected to its existing circuit?

Thanks for any help

=================================

Thanks for the help so far. Do I need to put a resistor on the wire out to my GPIO pin, will that let the existing circuit get more of the signal from the IR receiver?


texts: What electric motor spec clues indicate easy speed control options?

texts:
I'm investigating HVAC fans etc to design my own system and controls, and having fully variable speed control is an important consideration to me.

I'm pretty sure there are types of AC motors that cannot be easily speed controlled with a triac or voltage control (despite the indications in the answer at https://electronics.stackexchange.com/a/2900/7517)

I feel reasonably comfortable with controlling DC motors with voltage control, but suspect this is a simplistic mis-conclusion.

Other than products that explicitly state that "Smooth or stepped speed control can be performed by external thymistor or transformer.", how can I tell if I can use these general techniques to control speed for AC and DC motors? (For extra points/comments: am I correct in assuming they're talking about a thryistor?)

Am I correct that less than 100% of AC and DC (as separate categories) are able to be speed controlled?

Bonus sub-question (for votes rather than answer): in the quote above when they say thyristor, do they really mean a TRIAC? I can't see that a uni-directional current switch would be at all useful. Unless of course the fan could accept rectified ac ... or something?


texts: Have a look at my PCB design and tell me how I can improve

texts:
Here's the current design for Super OSD Lite, an open hardware project to bring a low cost on screen display to the masses. The price target is $71 to $90.

bigger image

There are components on the bottom, but most components are on the top.

It's one of my first PCB designs involving such a complex circuit, so I expect I've made a few mistakes. Constructive criticism appreciated!


texts: Can we not simply connect a battery to a RAM to prevent data loss during power cuts?

texts:
So, I was just wondering about how volatile memory storage loses data when the power to them is cut off. But can we not solve that problem by using a battery in conjunction with a RAM and a ROM and when there's a power cut i.e. when the computer didn't receive a shutdown signal the battery kicks in and a controller transfers data from RAM to an EEPROM?

EEPROM - because I guess HDDs and SSDs consume more power. I mean if we could do this then we can maybe program it to explicitly store data in EEPROM, if not data then the OS(only a copy). That way we can also boot faster. There maybe very obvious reasons not to do this. But they are not clear to me. So can you tell me why is this not done?


texts: Why use two power sources when designing a voltage regulator using a zener diode

texts:
I am currently designing a voltage regulator using a 5V zener diode.

I am wondering why some people choose to use two power sources instead of one, what would be the benefits of this ?

the circuit is being simulated on multisim.

Also if there is any other advice anybody can give me on modifications to this circuit that would be great :) !

Here is an example of a voltage regulator using two power sources:-

Thankyou in advance

-Connor


texts: Arduino reading double-din radio volume rotary dial knob

texts:
Hey all I bought a Chinese double din radio in order to modify it to my liking. The main reason why i went with this one is that it had a few buttons and turn knobs on the front and i wanted to use an Arduino in order to "read" this inputs in order to do stuff within my software program.

However, I am not quite sure what I need to check in order to find out how to go about hooking up the rotary dial knob buttons to the arduino so that i can read each "click" that it makes. They also have a push button mode when you press on the front of the rotary dial.

As a side note I will be supplying the power to these so nothing on the board will be used except the physical rotary dial - aside from a few resisters it seems as well.

Here are a few images of the pcb layout:

And knowledge would be great as to how to go about hooking this up to read by the arduino :)


texts:
I was modeling current distribution in a component:

And I plotted the \$ \vec{J} \$ to simulate & understand the current distribution throughout the conductor, all the flows make sense, except at the edge of the conductor like so:

Current would distribute all around the area, which is expected.  However, one would initially assume that the highest  \$ \vec{J} \$
would be going towards the potential difference applied(which is the lower right bar extending to the right of the page) which I would assume is
\$1.93 \times 10^7\$, and over the furthest left edges possibly low distribution at
\$1.71 \times 10^2\$, but I'm not sure. Is there a way I could figure this out through Maxwell ANSYS? Or should I stick to my intuition here? That the edges would have the lowest current always.

Even when I apply really higher currents(From \$250A\$ to \$250kA\$) the diagram would change to this distribution:

Which leads to the same problem, dark blue being a range of [

\$11.73×10^2\$,\$11.93×10^7\$] My initial assumption is the least amount of current in that scale list is towards the edges in dark-blue.


texts: Relationship between radio transmitter output power and its input electrical power?

texts: Given a radio station of a given licensed effective radiated power, is it the case that the transmitter requires at least that much mains power to run it? E.g., if a radio station says it's 100,000 watts, mustn't the transmitter take at least that much electrical power to operate?


texts: ESP32: pin description and peripheral configuration

texts:
In the datasheet of ESP32, Table 1 "Pin description" there is the list of all pins and their function. For example, let's see the UART ones:
GPIO16     25 I/O GPIO16, HS1_DATA4, U2RXD, EMAC_CLK_OUT
GPIO17     27 I/O GPIO17, HS1_DATA5, U2TXD, EMAC_CLK_OUT_180
SD_DATA_2  28 I/O GPIO9, HS1_DATA2, U1RXD ,SD_DATA2, SPIHD
SD_DATA_3  29 I/O GPIO10, HS1_DATA3, U1TXD, SD_DATA3, SPIWP
U0RXD      40 I/O GPIO3, U0RXD, CLK_OUT2
U0TXD      41 I/O GPIO1, U0TXD, CLK_OUT3, EMAC_RXD2

But in Table 10 "Peripheral Pin Configurations", I read:
UART  U0RXD_in    Any GPIO Pins
      U0TXD_out
      U1RXD_in
      U1TXD_out
      U2RXD_in
      U2TXD_out

(note: for clarity I removed the flow-control pins)
What does the first table actually mean?
It cannot be the "default" function, because for each pin are listed several functions.
From the second table I assume I can configure each UART function to any GPIO pin.
May I rely on the second table? I mean, I really can assign UART, I2C, SPI, etc... to any GPIO as stated?


texts: Is a current-limiting resistor required for LEDs if the forward voltage and supply voltage are equal?

texts:
For blue LEDs with a forward voltage of 3.3 V and supply voltage of 3.3 V, is a series resistor still needed to limit current?

Ohm's Law in this case says 0 Ω, but is this correct in practice?

Perhaps just a small value like 1 or 10 Ω just to be safe?