texts: Are there any special internal Ethernet connectors other than RJ45?

texts:
I am working on the board that suppose to have 1 GbE port (10/100/1000BASE-T). Looking at connectors all I seem to find is standard RJ45 connector.

However in my design the board itself is not directly exposed to the outside, there is a backplane which will include some other ports as well.

Now, I could put the standard RJ45 on the board and and 2 of them on backplane and connect board to backplane with standard CAT5 cable. However the RJ45 connector is rather bulky comparing to everything else on board.

So my question is -- are there any alternatives to this approach, how do commercial products that do not expose main board ports directly work around that?

PS: I've seen this question which recommends micro USB 2.0 port as chip alternative, but that means only 4 wires per port (so 2 ports per board for single RJ45?) I foresee some impedance matching issues right there.


texts: SC4503 Step Up Switching Regulator Design: Why is output unregulated?

texts:
I am working on a PCB design with the Semtech SC4503 1.3MHz Step-Up Switching Regulator to regulate an input from 4V to 10V to a constant 5V output.

I have printed a prototype PCB, but the circuit is not working as expected—the output voltage is the same as in the input voltage. Additionally, the Shutdown function does not work; the output voltage remains the same as the input voltage, event when I drive the _SHDN pin low to GND.

With an input voltage of 3.0V, I measured the Feedback voltage at 0.68V, output voltage of 2.7V.  If the output was 5V, the feedback voltage should be 1.25V based on feedback resistor selection.

Is there some minimum value for the feedback resistors that should be used with the SC4503?  Are my selections of inductor (Bourns SRR4028-4R7Y) and schottky diode (ON Semiconductor MBRM130LT1G) acceptable?

Pasted below is my schematic, PCB layout (red = top layer, blue = bottom layer; bottom layer is ground plane), and components list.

Thank you,
Hal


texts: Altium Designer Rule: Between Silkscreen and Via

texts: I have not find a solution about between top overlay or bottom overlay and vias. Can you help me about this . I need identify a rule.I don't want the silkscreen to touch a via


texts:
I'm building a motorcycle intercom and am using the LM368 IC for my amp. My circuit works well (surprisingly, I'm new to this).

I've got a button which I use as a push to talk switch. This works for the most part, however when I press the button it takes a good 5 seconds before I hear any output.

Below is my very rough schematic.

Any ideas what might be causing this lag?

Thanks all.


texts:
I am researching the PI filter. There're a number of great articles on how to calculate values for inductor and capacitors, the response curves and frequencies. Examples are: Input Filter Design for Switching Power Supplies, Ferrite Beads Demystified, Optimal Single Resistor Damping of Input Filters etc etc.
The circuit below works great, suppressing the ringing during fast power supply voltage rise.

I will not include simulation pics as it is fairly easy to draw and simulate it.
However I can not find any information on the damping resistor power rating. The steeper voltage rise, the higher immediate current flows through the resistor while its series capacitor is not charged. Taking damping resistor as 2 Ohm, it will anyway be much larger than tantalum cap or MLCC ESR, thus during power on most power will be seen on the resistor. I simulated it to be up to 45 Watt...
Here's my test circuit:

L2 is a ferrite bead BLM21PG221, consider it working in its inductive region. (however during fast transients, including power on, may it be more capacitive/resistive rather than inductive?)
The only statement about damping resistor current I found in third source I cited:

Capacitor Cd blocks dc current, to avoid significant power dissipation in R.

Yes, in static it is. But I am sure people also considered dynamic performance - in particular during power on.
So what do I miss here and what would be the power rating on the damping resistor?
There's a second question, very closely coupled with the above one: what is practically achievable power rail rise time? The answer to this question will define the answer to former one. Yes, ATX power supplies have strict standard on the power level rise time, what about other type of power supplies (switching and AC-DC)? What about turning switch on closing the circuit, theoretically happening in a nanosecond causing very sharp rise time? Does the first capacitor on the power wire path makes a difference "absorbing" the initial voltage strike?


texts: Buffer amplifier for DC-1MHz (discrete parts)

texts:
I would like to make a buffer amplifier from discrete parts (transistors) which is working from DC to 1MHz. I'm not able to google any schematic or tutorial or app note etc.

Everything I found was for AC only (it has blocking capacitors in the input and output).
I know how this amplifier works:

I made couple of them for audio related signals.

Is there anything similar but starting from DC (0 Hz)?

I know I could use single opamp:

but I really would like to play with discrete parts (and learn along the way), and simulate it in spice.


texts: What is the point of having a level-based interrupts?

texts:
Wherever I have searched about the practical implementation of the level-based interrupt, I have found only one suggestion that people have given i.e disable the interrupt as soon as it enters the ISR so it doesn't keep triggering back.

Another thing I have read is that it is used to create a loop i.e as long as interrupt is there, serve the ISR, but that could be achieved with a while or do while loop.

And the advantages a level edge interrupt would provide might be the luxury to run one instruction of the main programme in between serving the ISRs and the latency. I guess.

So is there something I am missing when it comes to understanding the level edge interrupt?

A great answer would be to show me some sort of practical usage of level-based interrupts.


texts: Xilinx Vivado: How are inputs/outputs handled that are not in the constraints file?

texts:
Assume I have the following constraints file which specifies only one single input:

set_property -dict { PACKAGE_PIN J15   IOSTANDARD LVCMOS33 } [get_ports { Switch }];

And the following top file which also lists input A and output B in it's port specification:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity test11 is
port (
    Switch      : in std_logic;
    A           : in std_logic;
    B           : out std_logic
);
end test11;

architecture Behavioral of test11 is
begin
    B <= A xor Switch;
end Behavioral;

This compiles just fine.

Are A and B assigned to some random pins? Are they tied to '0' or '1'?


texts: The powerbrick for my computer emits a high pitched whine. What could be causing the noise? Any way I can stop or reduce it?


texts: VCO SN74LS624 - understanding pin out / how to read datasheet?

texts:
I have a SN74LS624 chip and I am trying to get it working on a simple breadboard with an oscilloscope.

I have read the datasheet here: http://www.ti.com/lit/ds/symlink/sn54ls629.pdf

I can not understand a few things from the data sheet:

1) The intro paragraph mentions you need an external capacitor. Where does this capacitor go exactly and how do you wire it up after determining the value for C

2) What are the pins CX1 and CX2 for? How should you connect them?

3) How to use the RNG and FREQ COUNT pins?

Can somebody please explain how I am supposed to determine the answers to these questions simply from reading the datasheet.

It appears to me that not enough information is in the datasheet to use this chip successfully by the enduser.

Thanks in advance.


texts:
I keep getting conflicting answers on this and it's absolutely killing me. Some say \$R_{ds(on)}\$ is the contact resistance in the FET (for instance, make many FETs of varying channel lengths, turn them full on and measure the resistance and the residual resistance at zero channel length is \$R_{ds(on)}\$). Others say it's the slope of the \$I_{ds}\$ \$V_{ds}\$ curve in the linear regime when the FET has a typical gate voltage applied and is at a sensible temperature.

I also can't honestly find an answer on whether you use a FET as a switch in the linear or in the saturation regime!


texts: What are the parameters to consider while selecting MOSFET or IGBT for Inverter and SMPS Design

texts:
I'm working on a project to design Buck Converter with following Criteria
Vin: 4.5-60V
Vout:8-15V
Iout:6-12Amps


texts: Negative ion generator scrambles with other electronic components in device, how can I put it in properly?

texts:
I'm making a DIY air purifier and among other things I want to put in a negative ion generator. I disassembled some Chinese product that had it in, its specs are: input voltage 12VDC, output voltage -4.5kV - -5.0kV. I figured it could cause problems so I enclosed it in the case that I got from one of my power supplies (MEANWELL power supplies).

Ionizer has 2 power supply cables and one cable that has small broom at the end of it where the negative ions should be transmited from. I tried and moved ionizer as far as I can from my other components and enclosed it into the metal case, but still when I turn the power on, device malfunctions and when I measure voltage across sensor and other components, it gives some sparks on their metal parts.

When I disconnected the cable from the outlet and tried to remove the cables of ionizer from power supply, I got zapped, even though I waited till the LED in the power supply went off as I presumed the capacitors in it were then discharged.

I removed the ionizer from the module and tried it, and everything works fine, there are no more sparks and other components are working fine.

The components are:

Meanwell 230-12vdc power supply enclosed
Meanwell 230-5vdc power supply enclosed between which I connected their grounds for a common ground
Arduino pro micro
sensor that works on 5vdc and gives 2 digital outputs
programmable LED strip that signals the state of air pollution that works on 5vdc
2 vents that work on 12vdc and are connected on l298n motor driver

My question is: Can some changes be made on the input of ion generator, such as putting some Zener there or something to help this problem? Not sure what to do to eliminate these issues I have when I connect the generator (it is connected directly to 12vdc meanwell power supply). I'll try and move the broom of generator as far as possible from the sensor and see if that helps. Any other ideas?


texts: TA12-100 Current Sensor (increase range)

texts:
I have a TA12-100 current sensor. The circuit have a 200ohm resistor as shown below. At 5A the analog signal hits the roof (1023).
My question is - can I increase the resistor to be able to get readings up to 10A(with some lower accuracy I assume)?


texts: Gate Driver Circuit Gives Unexpected Results!

texts:
I have designed around the LM5106MM/NOPB gate driver. Used two IPB017N10N5ATMA1 N-CHANNEL MOSFETS. This circuit has actually been used in another design in production by a engineering group beyond my time. Works great as an LED driver and is in production. Now mimicking the same circuit for another product that will drive both LEDs and resistive heaters.
I did make some alterations from the original circuit, such as adding in D7, D9, R40, R43, R50, R53 and using a higher current MOSFET and inductor (part numbers previously mentioned). Other circuit also used +10V whereas I am using +9V (can source 500mA). Sounded like I was good to go!
Now the board is in and I am testing things out, and with very different results than what I was expecting. When I place +3.3V on the IN pin of the gate driver, with no load attached, there is self-oscillation. Measuring the HO pin, I see a spike of about 40V and then quickly goes to ~22V and then exponentially decays to nearly zero, and repeats all over again.
One thing I should have realized is that placing R43 was a particularly a bad idea. Through muscle memory (and shear clumsy-ness), I placed that resistor there to bleed off the gate charge. But the driver does this and instead I made a bad feedback path. No biggie, I have 3 other channels and tested it with that resistor removed.
Similar behavior. Tried to remove both capacitors as maybe the delayed turn on set by R47 perhaps wasn't long enough to fully discharge C31 and C32. Nope, still giving similar-ish effects. Even got desperate and tried to short the inductor out. Circuit gremlins still in control. I also tried to remove C32 and place the + on +36V_CH1 and - on C31's +. Stopped the spiking but still oscillating.
I am now back to searching the internet on those who have taken the same path but I couldn't find an issue similar enough. Has anyone else had an issue like this?


texts: Is it possible to detect battery chemistry?

texts: I'm looking at making a universal battery charger. And I am interested in seeing whether I can get it to detect the chemistry so if a non rechargeable had been put in it won't charge.


texts:
first post here, so sorry for any bad styling.

I'm working on a group project and using an Atmega328, without going into specifics, I need to drive two fans, two servos, and 1 CTC based function from 3 timers. To my question then; there's registers OCRx A and B that I'm using to drive the fans at variable speeds, and using a similar method for the servos. Setting up a very basic PWM script, I've noticed that both registers will drive a fan, however when I attempt to use either register independently (fan 1 on, 2 off, then change), OCRxB will not produce an output.

Here's a cut-out of my setup code:

void setup_timers () {
// Set Timer0 to Fast PWM mode
TCCR0A |= (1 << WGM01) | (1 << WGM00);

// Set Timer0 to clear OCR0 A/B on match
TCCR0A |= (1 << COM0A1) | (1 << COM0A0) | (1 << COM0B1) | (1 << COM0B0);
TCCR0B |= (1 << CS01);
TCNT0 = 0;

// Set OCR0 A/B
DDRD = 0xFF;}

Now, ideally, this will set up both registers in Timer 0 for outputs. I'm sending this signal to a transistor, which then powers the fans as determined by this next bit:

int main () {
setup_timers();

while (1) {

    /* Timer 0; OCR0A (i = 0, L), OCR0B (i = 1, R), i = 2 denotes both fans */

    for (uint8_t i = 0; i <= 3; i++) {
        // Cycle Fans Left/Right/Both

        for (uint8_t j = 1; j <= 4; j++) {
            // Cycle Speed

            if (i == 2) {
                // Check motor; run timer 0 A/B as required
                OCR0A = 0xFF * j / 4;
                OCR0B = 0xFF * j / 4;
                _delay_ms(2000);
            }
            else if (i == 1) {
                OCR0A = 0xFF * j / 4;
                OCR0B = 0;
                _delay_ms(2000);
            }
            else if (i == 0) {
                OCR0A = 0;
                OCR0B = 0xFF * j / 4;
                _delay_ms(2000);
            }
        }
    }
}
return 1; }

Now I know this could be done better, this segment has a heap of other tests cut out. The main issue here is that Fan 1 will run (directed by OCR0A), but Fan 2 is completely ignored. I have read through the data sheet a few times, but it was a bit unclear as to whether this is actually possible, it did say something about OCRxB not being stored, and I have seen other posts asking after that. From what I understand they are independent registers, but is it possible that OCRxA is retained, but after writing OCRxB it is impossible to execute?

Or maybe I'm completely wrong, certainly wouldn't be the first time.


texts:
I need to decode communication between two devices, but I have no information about these devices. All I know is that four wires are needed (GND, VCC and two wires of communication). I suspect that it is I²C communication.

I'm trying to decode it with the oscilloscope decoding tool, but I'm not quite sure about it. I can not identify elements of I²C communication appropriately when I visually check the waveforms.

Looking at the waveforms I made the following assumptions, and maybe someone can help. These were my assumptions:

Everything leads to believe that the clock is the blue signal and the data is the red signal.
The clock seems to be inverted because its idle state is not at high level.
I'm not sure if the data signal is also inverted, but it seems to be.

Are my assumptions correct?

In the last figure, the figure with the number 5 indicated in a circle, and there is a part of the signal. I can not identify the start, ack and stop bits. Can anyone identify these elements just looking at the figure?

[Edited] Some people asked me about the devices that are in the communication. The communication is between a car key and a tool that I'm not allowed to say, but I'm trying to do a reverse engineering on it.


texts: How do I calculate resistance when I have the voltage drop?

texts:
This is my circuit:

3 volts in with a 1k ohm resistor in series with the LDR.

I have the voltage drop across the LDR but I need to find the resistance.


texts: How do I wire up a 2.3-3 V LED to a 12 V car battery that can have a variable voltage depending if the engine is running or not?

texts:
I am making a wireless switch for my car tyre inflator. I have a basic hand-drawn sketch of what I intend to wire up.

Basically, it will be a box with an 50 amp Anderson plug for input (right hand side) and the same on the output (left hand side) but also two terminals for alligator clamps. The pump I have is rated at 45 amps max, so I need some decent wiring and a high current relay - in this case I have a 75 amp one.

The output is fused 50 amps. I have ordered a 12 V wireless switch/relay that can only handle 10 amps, so it is tasked to activate the 75 amp relay. So far so good. You can see the diagram below. (Typo: NO and NC should be swapped around on the wireless relay)

What I want to do is add some LEDs to give me basic trouble shooting information, if any issues happen.

LED (A): Indicates power from the battery
LED (B): Indicates wireless remote is powered and working
LED (C): Indicates wireless relay is open/closed
LED (D): Indicates fuse is open/closed
LED (E): Indicates power has reached the output i.e. 75 amp relay is open/closed

Simple enough I thought, until I looked at how to calculate the resistors needed so not to destroy the LEDs. Ohm's law calculations are straight forward, but the problem I have is the voltage from the battery is variable. i.e with the engine off and battery fully charged, the voltage is around 12.6 V. But when the engine is running, the voltage can go up to 14.7 V.

Thinking about it some more, I realise I have a second problem. Example, LED (B) - I can't put the LED inline because the LED will have a resistor to limit current to 20 mA and voltage to 2.3 V, but the wireless relay needs 12 V.

So my question has two parts:

How do I handle the voltage variation for LEDs?
And how does one wire an LED to show that a particular "sub circuit" is closed?

I do have a third related question:

Is it possible to turn on an LED when a circuit is open? For example, if the 50 amp auto reset fuse has opened, turn on red LED (D)?


texts:
I'm trying to set up OpenOCD debugging through a JTAG port on a custom board with an Atmel ATSAM3X8E microcontroller.

OpenOCD is running on a Raspberry Pi using the bcm2835 native GPIO.  The JTAG port of the SAM3X is broken out to a header - it has NRST, TCK, TMS, TDI, TDO, GND and 3.3V on it.  NRST is pulled to 3.3V through 100k, while the others are directly connected.

OpenOCD comes with a target called at91sam3ax_8x.cfg which looks like it ought to be the right thing to use, but it seems to bear no resemblence to the part I'm using.  That target script expects the device's TAPID to be 0x4ba00477, while the device I have reports 0x05b2b03f as its TAPID (and this matches what's in the SAM3X datasheet).  Once I've fixed that, the IR check then fails (it expects 0x1 but sees 0x9).  Having fixed that, this is then the output I get from OpenOCD:

Open On-Chip Debugger 0.10.0+dev-00093-g6b2acc0 (2017-03-17-16:47)
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO config: tck = 11, tms = 25, tdi = 10, tdo = 9
BCM2835 GPIO config: srst = 7
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
adapter speed: 500 kHz
RCLK - adaptive
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m reset_config sysresetreq
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : JTAG only mode enabled (specify swclk and swdio gpio to add SWD mode)
Info : RCLK (adaptive clock speed) not supported - fallback to 10 kHz
Info : JTAG tap: sam3.cpu tap/device found: 0x05b2b03f (mfg: 0x01f (Atmel), part: 0x5b2b, ver: 0x0)
Error: Invalid ACK (7) in DAP response
Error: JTAG-DP STICKY ERROR
Error: Invalid ACK (7) in DAP response
Error: JTAG-DP STICKY ERROR
...repeated about 40 times...
Error: Could not initialize the debug port

What's going on here?  Is there something wrong with my setup?  Or is the AT91SAM3AX a different part to the ATSAM3X that I'm using?


texts: Real time location sensor for following a kite in the air

texts:
In search of a new project I decided I want to build a kite which I can fly using my computer. For this I need a couple of things: a kite, an electro motor to steer the kite, and also a way for the computer to see where the kite is located in the sky at any given moment.

This last thing is what I wonder about. It means I need a sensor on the kite which can register "where" the kite is at any given moment. "Where" is defined here as a 2 dimensional context (I keep the rope length constant). The location should not be seen from the sky, but from the base of the kite its rope (i.e. the person flying it), which rules out GPS. It means I need something like a kinect sensor, but it should be able to register the object (kite) at a distance of up to a 100 meters or so. If needed I can of course attach a small "following device" to the kite.

I searched around a bit and I find technologies like Infra Red, Ultrasound, RFID. Does anybody know what kind of technology I need to use to be able to track a fast moving object in the sky in real time? There is of course a line of sight, so IR or Ultrasound could be possible, but then there is also a rope in the air (the one attached to the kite), which might confuse things.

So does anybody have any experience or thoughts about this? All tips are more than welcome!

Please note: it's a home pet project, so buying industry grade equipment is out of the question. It should be reasonably simple (consumer) hardware. If it can be taken from old home appliances that would be even better.. :)

[EDIT]
In the meantime, i've found the OpenCV software (Open source computer vision),  with which you can follow differently coloured blobs (a kite). Furthermore, it has python bindings (my favorite programming language). So this would already be a very cheap option (just need a webcam). It would create a problem with cloudy weather though, so if there is an option with a little device I can attach to the kite and which can follow the kite through the clouds, that would be a better option..


texts: L298 Motor Driver spinning motor only one way :/

texts:
i just made a motor driver circuit on a veroboard to use with my arduino
but the problem is l298 spinning motor only one way.
here is the code
it was supposed to spin motor forth and backwards every 2 seconds right?

int mot1ana=5;
int mot1a=6;
int mot1b=7;

void setup() {
pinMode(mot1ana,OUTPUT);
pinMode(mot1a,OUTPUT);
pinMode(mot1b,OUTPUT);
}

void loop() {
  analogWrite(mot1ana,200);
  digitalWrite(mot1a,HIGH);
  digitalWrite(mot1b,LOW);
  delay(2000);
  analogWrite(mot1ana,200);
  digitalWrite(mot1a,LOW);
  digitalWrite(mot1b,HIGH);
  delay(2000);
}


texts: How to find the derivative of: \$s(t)=(1-e^{\frac{-t}{RC}})u(t)\$ w.r.t \$t\$?

texts:
The response of a linear, time-invariant system to a unit step is
  \$s(t)=(1-e^{\frac{-t}{RC}})u(t)\$, where u(t) is the unit step. What is
  the impulse response of the system?

(A)\$e^{-t/RC} \$

(B)\$e^{-2t/RC} \$

(C)\$\frac{1}{RC}e^{-t/RC}u(t)\$

(D)\$\delta (t) \$

  Doubt:

The derivative of the unit step response generates the unit impulse response.

Therefore we have to find the derivative of the expression: \$s(t)=(1-e^{\frac{-t}{RC}})u(t)\$ w.r.t \$t\$.

DOUBT 1) The derivation of the the first term in the expression \$s(t)=(1-e^{\frac{-t}{RC}})u(t)\$, should yield $\delta (t)$. But there is no option which contains $\delta (t)$ in combination with other terms.

DOUBT 2) How to find the derivative of the term: \$-e^{-t/RC}u(t)\$. I am confused about it because \$u(t)\$ is appended to it. Should it be like:

\$-e^{-t/RC}\$ exists only for +ve values of time. Therefore, derivative of \$-e^{-t/RC}u(t)\$ is \$\frac{1}{RC}e^{-t/RC}u(t)\$.

Therefore, the answer should be:

\$\delta(t)+\frac{1}{RC}e^{-t/RC}u(t)\$

But there is no such option.

  In short, my question is:

How to find the derivative of:

$$s(t)=(1-e^{\frac{-t}{RC}})u(t)$$ w.r.t \$t\$ ?


texts: Why does this circuit oscillate despite a short?

texts:
I was following a tutorial online and found the following schematic:

Here, there seems to be a base-emitter (and base-collector) short hence bypassing the transistor completely. I still constructed the circuit and to my surprise it does oscillate (it induces aa 10mA current in a secondary coil placed nearby). Why is this?

Edit: I forgot to mention that the secondary coil also has a potential difference of 3 volts. This current remains as long as the circuit I'd connected to a power source


texts:
I want to use a sensor that delivers a DC voltage that varies from 0.174V to 1.174V depending on the temperature.
After processing the signal, I want to have a voltage between 1 and 9V (when Vin = 0.174, Vout = 9V and Vin = 1.174, Vout = 1V.)
Here is a circuit diagram that was given to me by an electronic engineer but I don't know how dimensionate component :

Here is my calculate :
In linear mod, E+ = E- because Espilon = 0.
More over, I, in born "+" is equal to 0 so :
E+ = 5V
From milman :
E- = (UeR3+UsR4)/(R3+R4).
So 5 =(UeR3+UsR4)/(R3+R4) <=> 5(R3+R4) = UeR3+UsR4 <=> 5(R3+R4) - UeR3 = R4Us
(5(R3+R4) - UeR3)/R4 = Us
I put my system from my point : Ue = 0.174V Us = 9V; Ue = 1.174V Us = 1V
And here is my system :
9 = (5R3 + 5R4 - 0.174R3)/ R4        R4 = (4.872/4)R3
<=>
1 = (5R3 + 5R4 - 1.174R3)/ R4        1 = 3.872R3+(5(4.872/4)*R3)/4.872/4)*R3
So 1 = 9.962R3 / 1.218R3 <=> 1 = 9.962/1.218 so that's not good.
Somebody can help me to solve this please ?


texts:
I am developing a school project to make a rechargeable outdoor light for use at BBQ's etc.

The idea being, on the wall is a mains powered charging dock, with 4 battery powered lights attached.

Once one of the light is removed from the dock, it lights, giving 2-3 hours of light.

Returned to the dock to charge again.

I have the product design part sorted , just need some help with electronics. Would any of you guru's be able to help me out?

I guess the lights would be a series of super bright LED's, running off NiMH rechargeable battery pack in each, these charging through a 'connector' to the charging dock. The simpler the better.

To switch them on automatically , once removed from charging dock ? I am not sure.

Your time and help would be greatly appreciated,

Thanks for your time


texts: Input resistance of a transistor circuit

texts:
I have a question from the razavi's microelectronics book:

I'm puzzled because in the solution provided, the first line states that:

"We know that the input resistance Rin = R1||R2||\$r_π\$."

While I understand if I transform the circuit's base input into Thevenin equivalent, R1 and R2 are in parallel (R1||R2). But shouldn't the small signal resistance \$r_π\$ be in series rather than in parallel?

e.g.
Vth --- Rth --- \$r_π\$ --- ground of emitter

Am I missing something fundamental?


texts:
I'm having trouble understanding what the upper part of an electronic metronome depicted in the below schematic does.

I already asked about the lower op-amp part in another topic, but I also can't figure out how the upper part works.

This is my understanding of what the upper part does:

The TLC556 component is basically 2 TLC555s in 1 package. The first 555, marked as IC1a, is wired as an astable and generates a square wave at its output. The frequency and duty cycle of the square wave can be set by changing the value of the variable resistor marked as P1 on the schematic. Using the formulas from the datasheet, the duration of the high logic level can be calculated as C1*(R1+P1+R2)*ln(2) and the duration of low logic as C1*(P1+R2)*ln(2).

By setting the resistance of the variable resistor P1 to 0 Ohm, the output square wave frequency is 6.673 Hz with a duty cycle 60.9:39.1, and setting the resistance of P1 to 10 kOhm output frequency is 1.2478 Hz with 52:48 duty cycle.

What I can't seem to figure out is what does the other 555, marked as IC1b, do?
I believe it's wired as a monostable, which means that, when the output of the first 555 goes low, the second 555 gets triggered and its output goes logic high. The duration of logic high is set by R4 and C3 and can be calculated by 1.1*R4*C3, according to the datasheet. That would mean that the logic high pulse duration on the output of the second 555 is 1.1 ms, which is far less than the duration of low logic level on the first 555's output.

While the first 555's output is low, the second 555 always gets triggered (?), which means that it either gives constant high logic level at its output, or it is a square wave with a very high duty cycle. So I'm wondering what exactly is the point of the second 555?

The output of the second 555 is connected to the clock input (pin 14) of a 4017 decade counter, and by selecting the desired output on the switch S1, we can basically set the frequency divider of the square wave on the 4017's clock input.


texts:
In software defined radio (SDR) I often see sample rate and bandwidth interchanged or maybe I'm misunderstanding... If an sdr can sample a 2 MHz wide slice of rf spectrum does that imply it would be sampling at 2 million samples per second (2M S/s)? And if so what about bandwidth - is the implied bandwidth 2MHz? The particular sdr I am thinking of is the rtl2832u.

I'd like to understand if sample rate and bandwidth are tied together and if not how are they defined in terms of this or other sdr.


texts:
I am unable to pick the right option from the below

A divide by 78 counter can be realized using?
     a) 6 number of mod 13 counters
     b) 13 number of mod 6 counters
     c) one mod-13 counter followed by one mod 6 counter
     d) 13 number of mod-13 counters

I know a divide by 78 counter has 78 states so I decided that answer cannot be C  because a mod-13 counter has 13 states and mod-6 has 6 states total making up only 20 states and then the next option is D that has 13 *13 = 169 states  more than required. I think it must be a or b and the is b according to the book I solved but my question is why it can't be a?

  mod-6 counter has 6 states so total 13*6 = 78 . this was the explanation
  but mod-13 counter has 13 states so total 6*13 = 78 both are same

Iam unable to find out the reason why the answer is B. kindly help me with this. Thanks


texts: PIC18F4550 C-compiler that's open-source & cross-platform?

texts:
I'm a long time AVR user.  I really like that AVR-GCC works on the two main OSes I use (Mac OS X and Linux), is open-source, and is supported by Atmel.  I'd like to get back into PIC programming (used them in the 90s) since there are some pretty good PICs out there, like the PIC18F4550-class of chips.

Unfortunately, most all the compilers for PIC18s seem to be Windows-only and for-pay.  And they almost always have an IDE that I do not need.  I prefer command-line compilers and Makefiles so I can tell by glancing at a single file how code gets built. (and not wade through a twisty maze of dialog boxes)

I poked around at SDCC but it doesn't appear to have PIC18F4550 support and even if it did, grumblings on the net make it sound like its PIC18 support is weak, or at best very confusing to use.

So, what's a good cross-platform command-line C-compiler with PIC18F4550 support out there?

Failing that, what's the best-of-breed C-compiler for PIC18F4550 and how does one use it with Makefiles?


texts: Installing a USB-A Port on D-Link DIR-300NRU B7 with Ralink RT5350F Chipset

texts:
I am writing to enquire about the installation of a  USB-A port into the existing but soldered pins on DIR-300NRU B7. The board is given below:

The USB pins are located on the bottom right.

The backside of the board is the following:

First of all, the installation can be successfully completed (see, for instance, ptipti.ru for a guide on the related topic).

The following equipment was listed as required:

4 zero-ohm resistors
1 8.2 k\$\Omega\$ resistor to be soldered to R129 in the back (for the USB2.0 to work)
1 capacitor, preferably 1000 \$\mu\$F with the power of 6.3 V
1 capacitor of any capacity to be soldered to C209 in the back (for the USB2.0 to work)

Unfortunately, there is no comprehensible guide to soldering the USB port to this board.

The questions are:

Q1. Is the equipment listed necessary and sufficient? If yes, please kindly proceed to the second question. If no, what is the required equipment?

Q2. What capacitor in the point 4 would you recommend to use? What power of the resistor in the point 2 should be installed? Do I have to use zero-ohm resistors and why?

Q3. How should the USB socket be soldered? Which part of the equipment should be soldered into what pins?

Additional Info:

One resource mentioned "using the power source on the empty track" for some reason.

Added Questions:

Q*1. Could you please tell me or recommend any sources on how to connect right angle through hole socket?

Q*2.Would you mind telling me where the zero-ohm resistors should be soldered in? Where should the data pair be soldered in?

Q*3.Where should the power and ground fuse go?

Q*4. Could you please tell me where the capacitor given in the point 3 has to be soldered in?

The picture of a similar modification scheme has been found:


texts: 5-stage pipelined implementation (RISC) of a microprocessor

texts:
I'm trying to solve two questions about a RISC 5-staged pipeline that is not exactly like MIPS found here (everything is included in this post).

Consider the non-pipelined implementation of a simple processor that executes only
ALU instructions in the figure. The simple microprocessor has to perform several tasks. First, it computes the address of the next instruction to fetch by incrementing the PIC. Second, it uses the PC to access the I-cache. Then the instruction is decoded. The instruction decoder itself is divided into smaller tasks. First, it has to decode the instruction type. Once the opcode is decoded, it has to decode what functional units are needed for executing the instruction. Concurrently, it also decodes what source registers or immediate operands are used by the instruction and which destination register is written to. Once the decode process is complete, the register file is accessed (the immediate data are accessed from the instruction itself) to get the source data. Then the appropriate ALU function is activated to compute the results, which are then written back to the destination register. Note that the delay of every block is shown in the figure. For instance, it takes 6 ns to access I-cache , 4 ns to access register file, etc.

a. Generate a 5-stage (IF, ID1, ID2, EX, WB) pipelined implementation of the processor that balances each pipeline stage, ignoring all data hazards. Each sub-block in the diagram is a primitive unit that cannot be further partitioned into smaller ones. The original functionality must be maintained in the pipelined implementation. In other words, there should be no difference to a programmer writing code whether this machine is pipelined or otherwise. Show the diagram of your pipelined implementation.

c. What are the machine cycle times (in nano seconds) of the non-pipelined and the pipelined implementations?

Attempt:

I'm thrown off by ID1 and ID2 as MIPS usually has Fetch, Decode, Execute, Encode, Memory.

But here's my try

 a) diagram

  F   D1   D2   E   WB
      F    D1   D2  E   WB
           F    D1  D2  E   WB
                F   D1  D2  E   WB
                    F   D1  D2  E   WB

c) non-pipelined:
This would mean sequential progression, so 1) compute the address of next instruction to fetch by incrementing the PIC = 2+1 = 3 ns 2) PC to access I-cache = 6ns 3) instruction type decoder = 3.5ns 4) function decoder = 3ns 5) source, immediate, destination 2.5 + 3.5 + 4 = 10 ns 6) Register file = 4ns 6) ALU = 6ns 7) Register file = 4ns Total = 39.5 ns

pipelined:
very unsure


texts: PIC24F MPLAB X MCC Microchip Code Configurator SPI driver issue

texts:
Currently doing a project using a PIC24F communicating with a HSC Honeywell pressure sensor (Honeywell pressure sensors SPI protocol document)

Due to time restraints and this being the first time I'm using a PIC device I have decided to use the MPLAB X MCC Code generator and driver tool. Had a number of issues already with other things along with not being able to find adequate documentation for the APIs.

but right now I am struggling with the SPI exchange buffer API.

Whilst I can successfully communicate with the sensor using 16bit single exchange to get 2 bytes of pressure reading I would like to access other information; up to 4 bytes

However using the API SPI1_Exchange16bitBuffer(); using the example code I found in a generated header file below:

@Example
<code>
uint16_t   myWriteBuffer[MY_BUFFER_SIZE];
uint16_t   myReadBuffer[MY_BUFFER_SIZE];
uint16_t writeData;
uint16_t readData;
SPI1_STATUS status;
unsigned int    total;
SPI1_Initialize;
total = 0;
do
{
    total  = SPI1_Exchange16bitBuffer( &myWriteBuffer[total], MY_BUFFER_SIZE - total, &myWriteBuffer[total]);

    // Do something else...

} while( total < MY_BUFFER_SIZE );

readData = SPI1_Exchange16bit( writeData);

status = SPI1_StatusGet();

</code>

No matter what size buffer I use the code never exits the do-while loop, some of the bytes in the array fill with zeros but not data.

Further investigation found that the driver often gets stuck in the "while(count)" loop shown below:

    while (dataSentCount < byteCount)
{
    if ((count < SPI1_FIFO_FILL_LIMIT))
    {
        if (spiModeStatus == SPI1_DRIVER_TRANSFER_MODE_16BIT)
            SPI1BUF = *((uint16_t*)pSend);
        else
            SPI1BUF = *pSend;
        pSend += sendAddressIncrement;
        dataSentCount++;
        count++;
    }

    if (SPI1STATbits.SRXMPT == false)
    {
        if (spiModeStatus == SPI1_DRIVER_TRANSFER_MODE_16BIT)
            *((uint16_t*)pReceived) = SPI1BUF;
        else
            *pReceived = SPI1BUF;
        pReceived += receiveAddressIncrement;
        count--;
    }

}
while (count)
{
    if (SPI1STATbits.SRXMPT == false)
    {
        if (spiModeStatus == SPI1_DRIVER_TRANSFER_MODE_16BIT)
            *((uint16_t*)pReceived) = SPI1BUF;
        else
            *pReceived = SPI1BUF;
        pReceived += receiveAddressIncrement;
        count--;
    }
}

return dataSentCount;

}

It seems SPI1STATbits.SRXMPT sometimes doesnt become true, looking at the data sheet it can be seen that this means the FIFO stays empty

FIFO bit from datasheet

I am unsure what I am doing wrong, perhaps the driver has been written incorrectly, the example code istn clear and I do not have any documentation that explains how to use these API's and do not have time to completely dissect the SPI module of the PIC right now

SPI block diagram

Can somebody who understands this module please shed some light?


texts: I know this is like my other question on the SAA1027 but i can't find the UCN5804 anywhere. Are they obsolete now?


texts: Can I stack two l293d h-bridge IC's to drive more current?

texts: I need more current but I do not want to change my pcb board so can I piggy back two L293D pin for pin? I am driving dc motors and I am not seeing any gross failures but I am very close to the max ratting and so I wanted just a bit more headroom.


texts:
I have a few questions about 7-segment LED displays.

When we build a circuit using 7 segment (common-anode) and decoder (7447), we also use 4 tactile switches to make combinations. Should I directly connect switches to Vcc or ground (I have no knowledge about that) or what should I do with switches, after completing rest of circuit i.e. resistors to IC, IC to Vcc and display to Vcc?

I still need the answer but I think I did it!


texts:
Can anyone tell me how to add 2 button switches to this sketch (one forward and one reverse) for a second motor?` This code works great and I would like to just add the some button switches to pins 4 and 5.  I tried to just add switches to pin A1 and gnd or 5v but it does not work.
#include <AccelStepper.h> // accelstepper library
AccelStepper stepper(1, 8, 9); // direction Digital 9 (CCW), pulses Digital 8 (CLK)

//Pins
const byte Analog_X_pin = A1; // x-axis readings
const byte enablePin = 7;

//Variables
int Analog_X = 0;             //x-axis value
int Analog_X_AVG = 0;         //x-axis value average
  //----------------------------------------------------------------------------
void setup() {
  Serial.begin(9600);
  //----------------------------------------------------------------------------
  //PINS
  pinMode(Analog_X_pin, INPUT);
  pinMode(enablePin, OUTPUT);
  pinMode(2, INPUT_PULLUP);
  pinMode(3, INPUT_PULLUP);
  //----------------------------------------------------------------------------
  InitialValues(); // averaging the values of analog pin 0 (value from potmeter)
  //----------------------------------------------------------------------------
  // Stepper parameters
  // setting up some default values for maximum speed and maximum acceleration
  stepper.setMaxSpeed(2000);     //SPEED = Steps / second
  stepper.setAcceleration(1000); //ACCELERATION = Steps /(second)^2
  stepper.setSpeed(1000);
  delay(1000);
}

void loop()
{
  ReadAnalog();
  ReadLimits();
  stepper.runSpeed(); //step the motor (this will step the motor by 1 step at each loop indefinitely)
}

void ReadLimits()
{
  if( digitalRead(2)==LOW && stepper.speed()>0 )//read input, assuming they have pull-up resistors.
  {
    stepper.setSpeed(0);
  }

  if( digitalRead(3)==LOW && stepper.speed()<0 )//read input, assuming they have pull-up resistors.
  {
    stepper.setSpeed(0);
  }
}

void ReadAnalog() {
  if (abs(Analog_X-Analog_X_AVG) > 50) {
    digitalWrite(enablePin, HIGH);  // enable the driver
    stepper.setSpeed(5*(Analog_X-Analog_X_AVG));
  } else {
    digitalWrite(enablePin, LOW);   // disable the driver
    stepper.setSpeed(0);
  }
  // Reading the potentiometer in the joystick:
  Analog_X = analogRead(Analog_X_pin);
  // if the value is 25 "value away" from the average (midpoint), we allow the update of the speed
  // This is a sort of a filter for the inaccuracy of the reading
  if (abs(Analog_X-Analog_X_AVG) > 50) {
    stepper.setSpeed(5 * (Analog_X-Analog_X_AVG));
  } else {
    stepper.setSpeed(0);
  }
}

void InitialValues() {
  //Set the values to zero before averaging
  float tempX = 0;
  //----------------------------------------------------------------------------
  // read the analog 50x, then calculate an average.
  // they will be the reference values
  for (int i = 0; i<50; i++) {
    tempX += analogRead(Analog_X_pin);
    delay(10); //allowing a little time between two readings
  }
  //----------------------------------------------------------------------------
  Analog_X_AVG = tempX/50;
  //----------------------------------------------------------------------------
  Serial.print("AVG_X: ");
  Serial.println(Analog_X_AVG);
  Serial.println("Calibration finished");
}


texts: How to work out or calculate this circuit?

texts: I'm not an engineer, I understand a lot but I fail to understand how it works and how to calculate this for a 24vdc input:


texts: Correct me if I'm posting this in the wrong sub. I've never really played with LED lighting, but I've seen there are two types, bulbs and down lights. While the bulb type is more common as most of us still use CFL or already moved to LED, the down light type is somewhat interesting. It reminds me of the circular CFL. While I don't really see the advantage of using bulb against the down light version and vice versa, since from what I've seen they could have same wattage ratings (in this case I've seen both in 25W version). Are there any real advantage in between the two? Or is it just a mere design?


texts: Is it legal to use a device's Bluetooth serial commands in one's project?

texts:
I'm currently making an android application that reads data from an hydrometer that sends it via Bluetooth serial. But when I connect to it, it doesn't send anything, probably expecting control commands to be inputted.
Is it legal to use those commands or should I ask for them to the vendor?
In case of that being legal, my idea is to connect an already functioning android app for the device to my laptop and listen for those commands. Is that common practice? Is it possible for that to be successful?

In case of that being illegal and I should contact the vendor, how common is it for them to give them for free or sell them?


texts: I'm trying to figure out how much power I can expect my ATTiny84 to use in idle mode and I'm not sure which of the two graphs from the datasheet I should use, or why there are two in the first place. I intend to run it at a clock speed of 1MHz and off of a 3V battery. Also, if I choose to run it using an 8MHz crystal with CKDIV8 set (so the clock speed is 1MHz), should I read the graph at 8MHz or 1MHz?


texts: How can I switch multiple circuits using switches with limited pole counts?

texts:
I am trying to refine the design of an audio switch that I built a while ago. Since this is used to connect two inputs (two sound cards) to five possible outputs (speakers, tv, etc) with stereo audio plugs, I am dealing with three circuits. Since finding triple-throw, triple-pole switches is difficult, I was forced to wire the ground directly to all possible outputs (the ground isn't switched) which sometimes causes audible interference. I was therefore wondering, is there a way to control more circuits using simple switches? What if somebody needs to switch four circuits at a time? Or five?

I am a software dev and just beginning with hardware tinkering so please excuse this being so elementary.


texts:
When I implement a "safe" state machine in Quartus, what is the difference between a normal/unsafe state machine?

Edit: And is this the same as:

case state is

...

    when others =>
    nextState <= idle;

end case;

if you don't take into account that the synthesizer ignores this "when other"?


texts: Best way to sync LED's to light NES figures on a wall clock?

texts:
Advice & Ideas needed...

Working on a project - a custom wall clock with perler bead NES sprites in the place of the numbers.  The figures are mounted to a wood board with cutouts underneath, and during each hour an LED will turn on and light up the NES figure for that hour, and an audio file will play some sound effects/theme music from that particular NES game.

Time, Budget, Experience

Time is not a factor
$50 - $100 if possible.  I already have a bunch of components (resistors, caps, LEDs, wire, etc.) laying around.  I don't have any chips or an arduino.
I'm an engineer, just not electrical.  Mech Eng + lots of math.  I did take a couple EE classes in college but that was...a couple...years ago.  I'm comfortable with circuits, wiring breadboards, sizing capacitors and resistors, etc.  I've built several computers (thanks, Newegg).  I'm pretty certian that once pointed in the right direction and with a little advice I can figure it out and build the circuits.  My problem is knowing where to start.

Controlling the LED's

My main issue is trying to figure out the best way to sync LED's to a clock.  For example, if Mario is at the 3 o'clock spot, then at 3pm the light behind Mario will turn on and stay lit for one hour.  Then at 4pm the light behind Mario will turn off and the light behind another figure at the 4 o'clock position (Link) will turn on.  The lights will cycle through 12 figures, then restart.

From what I've been researching the last couple weeks, there are lots of options:

555 timer (don't thing this will work with time periods required)
555 timer with decade counter
555 timer, decade counter + 32.768 Hz crystal (can I run a clock off this too?)
cascading decade counters with 555 timer
arduino board and write code for program
raspberrypi (probably overkill)
others?

Playing Audio

I want to play a short clip of the theme music for each game at the top of each hour.  For example, at 4pm when Link lights up, the overworld theme from Legend of Zelda will play for a minute, then stop.

This is where I'm least familiar with my options.  I've looked at stuff like:

WTV020SD with arduino
taking apart an old mp3 player and setting in to play in a loop
various audio chips and boards

Battery life will likely be a problem with the mp3 player route.  If I go the arduino route I could probably program the LED's and get an mp3/audio board and control that too, right?

TLDR

Need to sync 12 LED's to a clock/timer so one LED will stay lit for 1 hour and then turn off for the next 11 hours while the next LED lights up.  Repeat.
Need to play an audio file once at the beginning of each hour.

I've looked through the googles, here, sparkfun, buildcircuit, instructables, mdfly, and several other sites.  Haven't seen anything that addresses this, or if I did I didn't recognize it.  My apologies if this is covered somewhere else already.

EDIT

I found this:

Sequential circuit with more than 10 LEDs

which talks about using 2 x 4017's to get a bunch of LED's going, and also SIPO shift registers.  Seems like it would work, but again, the length of time required makes me think the 555 timer won't work.  Am I right on that?  Still leaves the issue of controlling the audio...


texts: Minimal functionally complete operator sets with XOR

texts:
What's the minimal functionally complete operator sets which contains XOR?

Since AND, OR and NOT are a functionally complete set, I have to find a set of operators that can build these three operators.

I completed the exercise this way:
Set = {XOR, AND}

simulate this circuit – Schematic created using CircuitLab

Is my solution correct? Can someone dimostrate why this is the smallest functionally complete operator set or why it's not (and post the solution)?


texts: How to calculate maximum switching frequency of TPS54160

texts:
The data sheet of the TPS54160 buck converter (https://www.ti.com/lit/ds/symlink/tps54160.pdf) includes a formula for calculating the maximum switching frequency due to the frequency shift protection.

The parameter fdiv (frequency division factor) is listed as 1, 2, 4, or 8. How do I know which one to use? During normal operation it should be 1, but in over-current situations it can go up to 8 in order to allow the inductor current to fall. Also, what is the meaning of "output voltage during short?" Shouldn't this be zero - the definition of short?


texts: What are the limits for a USB PD charger and device to settle on a charging profile?

texts:
I've got a laptop which charges through USB Power Delivery. The charger supports the following profiles:

5V x 3A
9V x 3A
12V x 3A
15V x 3A
20V x 3.25A

I know USB PD devices and chargers enumerate and negotiate the profile they will use together. I suspect my laptop to use the last, 65W profile, although I cannot guarantee it.

My question is: what happens when there's no exact match between the profile(s) the laptop expects and the ones the charger proposes? I am asking because I need to buy a second charger, but most of the ones I find only provide 60W (20V x 3A, not 3.25A). What would be the result of the PD negotiation if I plugged one of those chargers to my laptop? If it would work (which I suspect), why? Do the charger and device negotiate only based on voltage? If not, is there any limit of amp difference for a profile to be accepted?

In conclusion, would it work, and why?  :-)


texts: Setting up KCL equations for non-ideal op amps

texts:
I don't understand how to set up the KCL equations for this.  It seems as if it would be \$\frac{-v_d - V}{R} + \frac{-v_d}{R} + Q = 0 \$ and \$-Q + \frac{V_{out}-Av_d}{R_o} = 0\$, where \$Q\$ would be some relationship between \$-v_d \$ and \$V_{out}\$, but I don't understand exactly the connection.

I think I'm not understanding why I can name the node between \$R\$ and \$R_i\$ "\$-v_d\$".  Wouldn't that make the other one \$+v_d\$.

I'm self learning this, so as clear as possible an explanation would be helpful.


texts: Thermador oven circuit board troubleshooting - where to go from here?

texts:
I have a Thermador double oven unit that is not working correctly in one of its cooking modes. I have done some troubleshooting, but haven’t located the problem to my satisfaction. I wanted to see if there were any suggestions as to where I could go next.
Here is the issue:
The unit has one control board and one relay board for each oven. The upper oven is malfunctioning and the lower oven is working fine on all settings. The upper oven has three settings (and three separate elements): bake, broil and convection. The broil and convection settings seem to work fine, but the bake setting will not bring the oven up to temperature.
The bake cycle runs a program that runs a 60 second cycle where the bake element is on for 51 seconds and the broil element is on for 8 (see pic). The bake element side of the circuit seems to be at fault as it does not ever heat up enough to glow. I have tested all elements, and they check out for ohms within specification. I have tested the harnesses and the wires are intact (continuity test with a multimeter.) I was fairly certain that the relay that energizes the bake element was at fault, but I have had the board out and tested both the bake and broil relays by applying DC power to the coil sides of the relays and testing for continuity at the other contacts and they check out. As for the board itself there are no obvious burned areas or bad components (see attached.)
With the oven running and the panel open the bake relay, which was suspect, does not always seem to be closing or opening in the correct sequence. Similarly with the oven in diagnostic mode, the bake relay does not seem to be operating.
Could the relay be bad in spite of checking out on the bench?
Should I look at testing other components and how?
Can anyone think of where I might go to test from here? Is there an easy way to move upstream and test that the control board is sending the correct signals to the relay board?
Any help would be appreciated, I am a newbie at this, but I am looking for an excuse to learn to solder.


texts:
I am trying to make a device that uses several motors all with an arrow fixed on top that has 8 fixed positions (N,NE,E,SE,S,SW,W,NW). This means steps of 45° or \$\frac{\pi}{4}\$.

I am trying to avoid servos and steppers because of the price, so I was wondering if anyone had ideas on how this could be achieved. The only way I can think of is to calibrate pulses to the amount of rotation that the motor would experience. It seems like there should be a better solution than this!


texts: How to determine which wire is which on a transformer?

texts:
Let's say I have a transformer with 3 coils. When primary coil is connected to 230V, two secondaries output 12V. Wires are color coded, but I don't know what colors stand for and there is no information about that on manufacturer's website.

Is there any relatively easy way to determine which wire is primary, which is secondary and which is start to the secondary and which is end of the secondary coil?


texts: Transistor switch: How to commutate 4-6V rail with 0-3.3V signal?

texts: I want my gate (fet) or base (BJT) to turn on at 3.3 v, I then want to have 4 - 6 volts on my collector or drain, and the same voltage as the C or D to be present on the emitter or source,how should my circuit look like? this is to turn a buzzer on or off, I am controlling it with a microcontroller


texts:
I would like to protect the input of a sensor (reference : MAX30001) from ESD.

In the datasheet, they say that the absolute maximum rating of this input is -0.3 V < Vinput < 2 V.

Do I have to strictly respect the given interval ? If yes, I do not know how to do it.

If I put a simple Zener like this :

The voltage of the input would be between - Vforward and +Vbreakdown. Problem : forward voltages of Zener diodes are 0.7 V, and I cannot find a breakdown voltage below 3 V.

If I put two clamping diodes like this :

The voltage of the input would be between - Vforward and Vdd + Vforward. Problem : Vdd is 1.8 V and I cannot find diodes with a forward voltage of 0.2 V.
What clamping diode do we typically use ? Schottky diodes ?

What other solutions do I have ?

Thanks. :)


texts: DMA Continuous Request and Normal vs Circular Mode

texts:
In STM32CubeMx, when configuring the ADC with DMA I can enable DMA Continuous Requests and set the
DMA in circular mode if I want to perform N conversion at time indefinitely, right? But, what if I set DMA Continuous Request but with Linear mode? Wouldn't it anyways request the array to fill again when it is completed?


texts: Motor selection for high speed rotary actuation

texts: I am trying to select a motor for a high-speed application where I need to rotate a load bearing cylindrical disc at 20,000 rpm. The total mass of the disc along with its load is approximately 1.5 - 2 kg. I'm attaching a diagram of my application along with this question. Kindly help me define the motor torque parameters for this application.


texts: what is the performance of an OFDM system in one-path channel (Flat response channel),with no multi path propagation?

texts:
i work on modelling a OFDM system in a indoor optical wireless channel (LOS channel), since my channel is LOS there is no multi -path propagation , so the delay spread of my channel is much smaller than the length or duration of one IFFT output sample, Cyclic Prefix length is the duration of multiple of IFFT output symbols , now i cant determine the suitable number of samples needed to be inserted to the CP ?
CP is critically needed as it turns the linear convolution to circular convolution causing a much easier equalization technique in the frequency domain , how to determine the length of cyclic prefix in this case , thanks so much in advance


texts:
I got a code for PN sequence generator using linear feedback shift register in VHDL.

I am using 1010 as a initial seed but in the output all the four PN sequences are 1.

What changes I should do to obtain different PN sequences?

I'm using Xilinx ISE 10.1.  This is the code.

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

library UNISIM;
use UNISIM.VComponents.all;

entity pnsmall_1 is
  Port (
    clock           : in  STD_LOGIC;                    -- synchronous clock input
    init            : in  STD_LOGIC_vector (3 downto 0);    -- the seed
    pn1,pn2,pn3,pn4 : out STD_LOGIC);                   -- PN sequence
end pnsmall_1;

architecture Behavioral of pnsmall_1 is
  component dp
    port (
      clk,clr,pst,d : in  std_logic;
      q             : out std_logic
    );
  end component;

  component exor
    port (
      a,b : in  std_logic;
      z   : out std_logic
    );
  end component;

  signal q0          : std_logic;   -- 1st stage out
  signal q1          : std_logic;   -- 2nd stage out
  signal q2          : std_logic;   -- 3th stage out
  signal q3          : std_logic;   -- 4th stage out
  signal x           : std_logic;   -- 1st stage input, the feedback
  signal qout        : std_logic_vector(7 downto 0);

begin
  s0: dp port map(
        clk => clock,
        clr => '0',
        pst => init(0),
        d   => x,
        q   => q0
        );
  s1: dp port map(
        clk => clock,
        clr => '0',
        pst => init(1),
        d   => q0,
        q   => q1
        );
  s2: dp port map(
        clk => clock,
        clr => '0',
        pst => init(2),
        d   => q1,
        q   => q2
        );
  s3: dp port map(
        clk => clock,
        clr => '0',
        pst => init(3),
        d   => q2,
        q   => q3
        );

  xx: exor port map(q0,q3,x);

  process(clock)
  begin
    qout(0)<=q3;
    if(clock'event and clock='1') then
      for i in 0 to 6 loop
        qout(i+1)<=qout(i);
      end loop;

      pn1<=qout(1);
      pn2<=qout(3);
      pn3<=qout(5);
      pn4<=qout(7);
    end if;
  end process;
end Behavioral;

the code for dp is below

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

library UNISIM;
use UNISIM.VComponents.all;

-- Code for D FlipFlop with synchronous clear and preset.
entity dp is
   Port (
       clk : in STD_LOGIC; -- synchronous clock
       clr : in STD_LOGIC; -- clear
       pst : in STD_LOGIC; -- preset
       d   : in STD_LOGIC; -- data input
       q   : out STD_LOGIC -- data output
       );
end dp;

architecture Behavioral of dp is
begin
    process(clk,pst,clr)
      begin
        if(pst='1')then
            q<='1';
          elsif(clr='1')then
            q<='0';
          elsif (clk'event and clk='1') then
            q<=d;
        end if;
    end process;
end Behavioral;


texts: With parallel termination of a transmission line, why does the receiver see the full voltage?

texts:
With parallel termination of a transmission line, the line characteristic impedance \$Z0\$ is matched with the pull-down resistance \$Rt\$. But, in that case, shouldn't the receiver see half of the transmitted voltage?

In my understanding, with no reflection, the whole situation can be brought back to a voltage divider with equal resistances.

Obviously, I made an error somewhere. So, how can the receiver see the full voltage with parallel termination?


texts:
I need to power an Arduino and four 4.5v-9v 2A Li-ion charger boards with a single wall adapter. Not wanting a shared circuit between the chargers, I'm thinking maybe a 12v 600mA (or something..) plug with a buck converter for each charger and powering the Arduino directly from the plug.
I have no clue how to calculate how much amperage the buck converter will output given the input/output voltage range possible.
This one states it only ouputs 1A when stepped down to 5v from 12v

Need each charger circuit to have 2A available whenever needed but cant figure out which buck converter/voltages/input current I need?

Im not fussed about exact voltages once its within range of the Ardunio (5v-12v) and chargers (4.5v-9v) of course.

Edit:
According to this and taking into consideration 80% efficiency, it seems my application would need a 12v plug that delivers at least 1.04A for a buck converter to step down to 5v 2A output.
Does this seem correct?
If it is then I guess the only question left is will any old buck converter that is rated for 2Amp or more be suitable?


texts:
This is probably the dumbest question ever, but I am an electronics nublet.
I understand what capacitors do, and I've been reading beginner Electronics books and such, but I don't quite understand when to use them? Sometimes in these books they just seem kind of thrown in. I understand they are meant to smooth out current, but I still am not sure I understand when to use them.

Like I said, this is probably a nublet question to the max. But most information I find is more about what they are rather than when to use them.

Edit: For clarity, I mean in SMALL electronic applications. Think simple circuits and such.


texts: What is the physical meaning of the voltage across an inductor in the Laplace domain?

texts: In my Electrical Engineering degree I recently learned how to analyse circuits using Laplace transforms and I know that the Laplace transform of the voltage across an inductor is \$V_L(s) =s*L*I(s) - L*i(0)\$, but I don't understand its physical meaning. I know that \$s*L\$ is the impedance so with Ohm's law we get \$V_L(s) =s*L*I(s)\$ but when it gets to subtracting \$L*i(0)\$ I don't understand where it comes from, I know it is supposed to represent the initial voltage but shouldn't it be also \$s*L*i(0)\$ ?


texts: What are these incompatible micro usb type B plugs?

texts: I have 2 usb cables, both of them appear to be micro usb type B. Both of them are almost the same but the second one has 5 tracks on top (see 2nd image), while the 1st one has not them (1st image). The 1st one is newer than the 2nd. The problem is that the 2nd does not fit well to Android smartphone, I recently bought. It seems I can charge it but can't do data transfer. I thought that all micro usb type B plugs are compatible and interchangeable. So does micro usb type B plugs subdivide on several more types and what are these types?


texts: What to make of this strange snap dome switch configuration?

texts:
I'm trying to figure out how to interface a microcontroller with a cheap MP3 player that used snap domes for buttons. I do not have a datasheet for anything on the MP3 player board, because I can't find any reference to the main IC's model number on Google. The front of the board looks like this:

I scoped the inner and outer snap dome pads to see how they were configured, and got some strange results.

The Top, Middle, and Right pads behaved how I expected: The outer rings scoped as ground and the inner circle scoped at 3.3 volts.

However the Left and Bottom pads were strange: Both the inner and outer pads were at 3.3 volts. Notice these buttons have pads look different from the other 3. Also The MP3 Player worked fine before I took it apart, and I was gentle in dismantling it so I don't think I damaged it.

I'm wondering what to make of the signals from these two pads. It doesn't seem like pressing the two buttons (and closing the circuit between the two pads) would do anything because they are at the same potential. Is there something I'm missing? Thank you.


texts:
I have the following setup:

simulate this circuit – Schematic created using CircuitLab

(The LEDs are actually some generic UV leds without a known part number, so I didn't edit the default number in the schematic.)

When applying 5 to 10 Volts at V1 I always only get D1 to glow, how can that be and what can I do to fix this?

Already checked the board for shorts and also supplied 5V directly to some other LEDs by crocodile clip cable, then they work correctly.

Oh and sometimes when using crocodile clip cable to jump over R1 some other LEDs randomly flash on, and then instantly off, and D1 remains the only one glowing.


texts: What is this symbol on this schematic? (two boxes on wire)

texts:
Apologies if this is a stupid question - I'm very new to electronics and feeling slightly out of my depth...

I've puzzled out most of the rest of this schematic, but can't find the circled symbol's meaning anywhere

Thanks!


texts: Having the same source for power supply and positive input for a single-supply buffer amplifier

texts:
I am new on designing power management for circuits.

simulate this circuit – Schematic created using CircuitLab

I want to design a circuit to stabilize the 12v power input. I have a buffer amplifier at the signal input. I use OPA743, which is a rail-to-rail op-amp. I add a bypass capacitor (C3) at the power input and connect the input to both the power supply (pin5) and positive signal input (pin3) for the op-amp. I connect the negative signal input (pin4) to the output (pin1) and negative power supply (pin2) to GND.

I want to have a unity gain from this buffer amplifier. I want the circuit to buffer the 12v power input. I follow figure 4 of page 10 on the datasheet:

But I get an output voltage of around 4v, instead of 12v. Does anyone know what the problem is? Thank you!


texts: Breadboard circuit with PN2222 transistor, LED constantly on

texts: I am trying to build a breadboard circuit for my class assignment using a PN2222 transistor. The LED light is constantly on, without pressing the switch (button). The directions of my assignment suggest that if this occurs it could be due to the orientation of the switch. I am not sure what this means as I have tried to rotate the switch several times with no success. Please help!


texts:
I am able to control the speed and direction of 2 DC motors using an AVR-based microcontroller board (see here for details) currently through hyperterminal (Flash Magic).

Is it possible to do the same through a Java-based GUI program instead?

I mean the speed entered in the textfield of the GUI being sent to the COMPort instead of the one entered in hyperterminal. If so, how?


texts: Build own custom USB 'regulator' adapter board to solve Desktop boot hangs with KVM

texts:
My Desktop PC hangs in the BIOS boot phase when my KVM is attached. If I unplug the USB connecting the PC to the KVM, the PC boots without hanging. If the USB of the PC is connected directly to the keyboard and mouse, it does not hang.

After contacting the KVM maker and discussing the problem on several forums, I still have no solution. So I would like to consider making my own solution.

The Desktop PC has an ASRock G31M-GS R2.0 Motherboard.The attached KVM is a Startech 4 port DVI USB KVM Switch with Audio and USB 2.0 Hub, SV431DVIUA.

I contacted the KVM maker Startech, who advised "In STANDARD CMOS, set HALT ON ERROR to ALL BUT KEYBOARD" in the "STANDARD CMOS settings" but I could not find this setting. I also discussed the problem on several forums, but did not arrive at a solution

ASRock forum: G31M-GS R2.0: where are the STANDARD CMOS settings?
Tom's Hardware forum: G31M-GS R2.0: where are the STANDARD CMOS settings?
TweakTown forum: G31M-GS R2.0: where are the STANDARD CMOS settings?

I noticed that the hang at the BIOS occurs when the PC is powered up "from the cold" with the KVM attached. If I have left it plugged in for a while, it boots straight through with the KVM without hanging. If the KVM is not attached via the USB then it boots straight through in all cases.

It is a minor inconvenience but I like the idea of fixing the issue.

It seems to me to be some kind of electrical issue as to how the KVM interacts with the motherboard via the USB. Some kind of "settling down" electrically seems to happen over time for the aforementioned scenario whereby it boots straight through if the PC is booted with the KVM if they have both been plugged in to the mains for a while, with mains power on.

So, I'm envisioning making some kind of custom mini circuit board half the size of a credit card to go between the USB input on the PC and the KVM. This board will let the usual USB traffic pass in both directions, as if it wasn't there. But its specific job would be to regulate/stabilise the current/voltage from the beginning. A combination of capacitors/resistors.

What would you recommend to do this job in terms of an outline of a circuit diagram etc?

Thank you.


texts: Atmel ICE Debugger - Does it work with nRF52-DK

texts: I bought the Full Kit Atmel ICE (2016) to allow me to debug AVR chips. The Atmel ICE debugger can program both AVR as well as SAM for ARM Cortex. I have an Nordic Semiconductors nRF52-DK board which has an 64MHz ARM Cortex-M4F processor. Could I use the ICE kit to debug this development kit or is it locked to work only with Atmel Cortex chips? Will I have to buy another debugger kit? If so which will work with the nRF52-DK board?


texts:
I'm a beginner and trying to understand some basics of electricity.

One thing I'm having a hard time understanding is the correct side where I should put a resistor. For example, in the following circuit:

The author of the schematic is putting 7 470ohm resistors in the 7-segment display. Why? Can't he put one single resistor in the cathode side of the display? I also saw some schematics where a resistor is put in both sides of the display. Is it necessary?

There are also resistors in the connectiong the inputs ABCD of the 4511 with the ground. Couldn't these 4 resistors be replaced by one single resistor in the left side of the switches? Or perhaps between the 4511 and the ground (or the positive voltage source)?


texts: Calculating total voltage/current for 3-phase?

texts:
Consider I have a 3-phase generator with the following measurements:

Phase 1 (A): 22.8828A
Phase 2 (A): 22.9922A
Phase 3 (A): 22.9219A

Phase 1 (V): 239.7656V
Phase 2 (V): 241.8594V
Phase 3 (V): 245.9375V

I will like to know what is the total current generated, as well as the voltage value. Additionally, I want to find the power too.

What I am thinking is that the 3-phase current and voltage will just average respectively and then applying P = sqrt(3) * pf * I * V to find the power?

I would appreciate some clarification.


texts: Can a standard Rx/Tx bluetooth module send and receive at the same time?

texts: I can a simple bluetooth module receive and transmit data at the same time? Or will it require a secondary antennta or even another bluetooth chip?


texts:
I'm working on an USB audio interface; the board has an analog section, with amplifiers and filters for the input and the output signals, a digital section, with the DAC, ADC, and the microcontroller which will control both ICs, and a power supply unit, which generates all the necessary voltages for the whole circuit (dual supply for opamps, 5 volts for micro and ICs).

I've been struggling the whole week to cram all this stuff together onto a single, 2-layer PCB, but eventually a modular design looks like a better solution to me; it is easier to design a single module, and it will be easier to debug later.

I've read loads of somewhat similar stuff on the internet, about mixed signal layout considerations, and I've tried to keep those considerations in mind during the final layout. The separation of grounds looks like the main thing to look at; now, I'm using a dedicated, isolated PSU which gives power to all the circuitry, and it's designed so that the digital and analog grounds are the same; but, since I'm going modular, there can be actual separation of grounds between the building blocks of this circuit.

Enough talking. I'd like you to take a look at the first modules I've finished, which are the power supply and the ADC preamp filter.

The PSU generates +/9V,+5V, and a voltage reference of +2.5V used in the preamp filter; it uses a Murata DC-DC converter which takes 12V in and spits +/9V @ +/-111mA; the +9V rail is connected to a pair of LDOs, one which generates +5V, and one which genereates a precise series voltage reference of +2.5V, which is used to bias the input filter for the ADC. I separated the input ground from the DC-DC converted ground, as it is an isolated type converter. I stitched the whole ground plane to reduce its total impedance. The MCU needs 5V, 30 mA max, and it has a 3.3V regulator; the DAC and the ADC get 5V and 3.3V, and they consume together 60 mA max; will the remaining 21 mA be enough current to power four MC33078 and two AD797? (two MC33078 are for the input filter, the other two with the two AD797 are for the output filter).

Schematic and PCB:

The other module I've managed to finish is the ADC filter preamp; it is a stereo balanced line receiver filter/buffer to balanced out; it just gets a pair of balanced audio signals and filters unwanted noise from them, feeding the differential receivers of the ADC. This one was actually more difficult; I tought that using the top layer to accomodate two power planes (upper part is +9V, lower part is -9V), while using the bottom plane for the ground plane was the best solution, in terms of ease of layout, and in terms of pcb space required. I got some doubts about the +2.5 V trace going under those 1206 components, but that was the only way I had to route it; I also have some doubts about the need of electrolytic 10uF decoupling caps near the PSU connector, and of the smaller 1uF decoupling cap between 2+5V and ground, near the opamps.

Schematic and PCB:

Bear in mind that this is the first well-thought circuit design I'm making, and it's probably the second circuit I'm making that will actually get printed and populated. Moreover, the filter circuit was not designed by me, but was the suggested reference filter designed in the ADC schematic. In the case the PSU will not give enough power to the circuit, I can easily use an ATX power supply to power everything, at least for the sake of prototyping. Any help, hint, criticism, or whatever is really appreciated!


texts: Why Beta value is changing and very low in this circuit

texts: I am simulating a circuit in Proteus 8.1 and I am getting very low value of Beta (16 in this case). It is changing depending on the resistances. Can you please guide what is happening here? d


texts:
I'm trying to teach myself Verilog. I have some previous experience using VHDL. I am using Lattice Diamond as my environment.

I successfully created and simulated a full adder. I now want to use this full adder module to create an 8 bit adder.

The include statement I'm using is

`include "fullAdder.v"

and I get the following error:

2049990 ERROR - EightBitAdder.v(1,10-1,11) (VERI-1055) incorrect use of predefined macro include. Expected "filename"

further down I'm getting errors appearing in the fullAdder source

2049990 ERROR - fullAdder.v(3,1-33,10) (VERI-1206) overwriting previous definition of module fullAdder

I am trying to use the modules as shown below further down in the source file:

    fullAdder adder0(
    .clock      (addClock),
    .a          (a[0]),
    .b          (b[0]),
    .carryIn    (1b'0),
    .sum        (sum0),
    .carryOut   (carry0)
    );

    fullAdder adder1(
    .clock      (addClock),
    .a          (a[1]),
    .b          (b[1]),
    .carryIn    (carry0),
    .sum        (sum1),
    .carryOut   (carry1)
    );
    ...etc

I'm uncertain as to how I should go about fixing this. My searches haven't turned up anything helpful.

Thanks!


texts: What is the best tips to use while soldering?

texts: Is a silver tip better to use rather than a copper tip?


texts: I am using a AD790JNZ comparator and am always getting a high output regardless of the input. It is connected as in the image below and is powered by a single 5V - 0V. When +In is greater than -IN the output is high but also when +IN is less than -IN the output is still high when it should be low. Is there something missing here?


texts: Removing voltage spikes and overshoots using power MOSFET as switch and 555 timer as pulse generator

texts:
I'm trying to turn on a power LED using LM555 timer as input signal of IRF630N N-channel power MOSFET as Fig1.

Fig1. pulse generator and switching circuit.

Here is the output of LM555 Timer (Not connected to MOSFET). How can I remove the beginning upper voltage as Fig2 (voltage in red circle)? I need exactly a clean square pulse.

Fig2. LM555 Timer output.

When output of 555 timer is connected to gate voltage is completly changed as shown in Fig.3. Why this is happening?

Fig3. output of timer connected to gate.

t on is 1us, and t off is 9us. Drain voltage (blue diagram) is supposed to be like Fig.4. How can I remove ringing shape of drain voltage?

Fig.4. Voltage spikes

When a big time division is used (more than 200 ms) Drain output is like Fig.5. When I zoomed in the image timer555 out pulse wasn't square, and also it seems Mosfet does not switch good. What should I do?

Fig.5. Output for 500ms time division.

Is there other ways for pulse generating (t on 500ns - 1us and t off > 1us)?
Any help is appriciated.

update1: Power LED link.

update2: Final application Images added.


texts:
I'm still working on a circuit to hear my heartbeat.  I've come a long way but it still doesn't sound as good as some example recordings I've heard.  I was wondering if someone could spot something wrong in my input circuit.  Currently I'm using an electret mic (CUI POM-2245L-C33-R) on a short wire inside the tube of a stethoscope (really close to the chest piece).  The mic goes into my OPA350 opamp with a gain of around 30 like this.  Sorry my VCC got cut off in this pic but it is 3.3V:

That feeds into a low pass filter at about 2.5k like this:

The  output of the lowpass goes into a little codec DSP where I have a 250 tap low pass FIR filter at 220Hz.  I've tried different frequencies.  The DSP has some analog gain I can adjust, as well as digital gain, then it outputs to a pair of headphones.  They seem to have enough bass response to hear the recordings I mentioned before.

Oh and all this is on a little 4 layer board I made, and I have decoupling all over.  I can hear my heart beat, but it's a little muddied.  I'm looking for ways to improve my design to get things clearer, maybe by getting better SNR.  I've considered going full differential on the audio path, so diff output opamps into diff inputs on dsp.  I've also tried increasing C4 to 10uF, and various different FIR filters.  I've tried more gain but then it sounds like things are clipping.  Could be noise though.  Oh and I see some pro versions of this use piezo contact mics.  I've tried that but I keep failing at it not sure why.  I bought some piezo discs off of digi, and connected them across J1, with a 1Meg also across J1.  I get sound but barely get hearbeat.

Anyway I thought I'd post what I had and see if anyone with more experience than me might spot a problem.  I don't really know if I'm matching mic impedance to opamp input impedance properly.


texts: STM32F303 code gets stuck in SysTick Exception Handler

texts:
I am working with a STM32F303 microcontroller with a Nucleo board and my code gets stuck in the SysTick_Handler routine of the startup_stm32f303xe.s file. (My code is based on an example Nucleo project, but rebuilt from scratch for learning purposes).

This post suggests that I need to set the Systick Interrupt to higher priority, which I did and doesn't fix the problem. This post suggests that the Systick Exception occurs when the system timer reaches 0... but I don't think I am using the system timer in my code.

In debug view with some breakpoints, I can see that the code executes to the two GPIO_TogglePin functions, after which it goes into the exception handler.

How can I prevent the program from causing the Systick Exception?

Here is my code:

int main(void) {

    HAL_Init();
    SystemClock_Config();
    LED2_GPIO_CLK_ENABLE();
    __HAL_RCC_GPIOA_CLK_ENABLE();

    GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
    GPIO_InitStruct.Pull = GPIO_PULLUP;
    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;

    GPIO_InitStruct.Pin = LED2_PIN;
    HAL_GPIO_Init(LED2_GPIO_PORT, &GPIO_InitStruct);

    GPIO_InitStruct.Pin = GPIO_PIN_8;
    HAL_GPIO_Init(LED2_GPIO_PORT, &GPIO_InitStruct);

    HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0);
    // Also tried HAL_InitTick(0);

    while(1) {

        HAL_GPIO_TogglePin(LED2_GPIO_PORT, LED2_PIN);
        HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_8);

        // Project code
    }
}

void SystemClock_Config(void) {
    RCC_ClkInitTypeDef RCC_ClkInitStruct;
    RCC_OscInitTypeDef RCC_OscInitStruct;

    /* HSI Oscillator already ON after system reset, activate PLL with HSI as source */
    RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_NONE;
    RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
    RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
    RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV2;
    RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL16;
    RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
    if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
    Error_Handler();
    }

    /* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2
 clocks dividers */
    RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK
        | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2);
    RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
    RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
    RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
    RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
    if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) {
    Error_Handler();
    }

}


texts: Why is NMI commonly pulled high on many ARM SoC schematics?

texts:
I've noticed that "AP-NMI" is pulled high on several ARM SoC schematics, and it is pulled high by the real-time clock (RTC) voltage, which is an always-on power domain (battery backup). Why is this?
I've also noticed that without NMI being pulled high (no RTC battery), a given SoC (A64) might not wake up from a watchdog-initiated reset. Are they related?
Also, how beneficial is the external NMI permanently being held high?
Here are some example schematics:
NanoPi A64 (ref)

Banana Pi (ref)

A31 PAD (ref)

My best guess is that NMI always being high wakes up the ARISC / AR100 / R_INTC systems, but the actual process escapes me.


texts: My 24V motor's measured voltage was 8V when I connected it to a 24V supply

texts:
I recently bought a 24V 250W DC motor. In order to test it, I connected it to a DC power supply (rated +-25V / 1A). I set the PSU to 24V and connected the motor (no load) to it. The current immediately reached its cap of 1A and the motor voltage raised and capped at 9.3 V.

I suspect that the current capacity had something to do with it because the motor did not get its ideal starting current (~10A). Is this normal behavior of motors (that the voltage is dependent on the amount of current I can supply to it)? If so, why?

This will help me determine the battery I will use for my motor since batteries have recommended currents.

Any help would be appreciated. Thank you.


texts:
When talking about closed-loop motor control, people usually refer to a rotational frame in DQ terms.
In motor specifications(see image below) the value of current is more likely to be specified in the phase or line terms.
In the control algorithm, is it safe to assume that the Iq should be no bigger than the rated current - 8.2A in this case?


texts: Rechargeable battery type recommendations for a 1-2 amp bicycle LED circuit

texts:
We are building a blinkey-blink circuit for a bicycle and not sure what battery to use.

The circuit will need to run on about 5V, since is is powered by ATmega chip which must run at 20mhz.
When all the LEDs are on, the circuit will consume about 10Amps (yes, there are lots of LEDs). We anticipate that about 1/8 (12.5%) of the LEDs will be on at one time, so we are estimating 1-2amps current draw.
Ideally the circuit could run for a couple of hours on a charge.
The battery should be relatively small. Lugging around a car battery on a bicycle is not an option.

The LEDs are SMD RGB LEDs, being driven from TLC5940. There are 120 LEDs, and 24 TLC5940s to drive them.  There are a few other components, but other no major current sinks.

According to some posts here (which I am having trouble finding at the moment) LiPO batteries provide the best power density among the rechargeables. I worry that with LiPO batteries we'll have to use voltage regulators to get our 4.5-5.0V, since LiPO cells are 3.7V each. Does that mean losing power to heat? I suppose switching voltage regulator is an option, but I know very little about them.

What would be the recommended battery types for this purpose?


texts: I am working with ADC 11040K with 1 kHz (1/1kHz = 1ms conversion time) sampling frequency. I am confused with timing diagram of its data conversion. As you can see the image, which duration is equal to 1 ms? DeltaT_1 or DeltaT_2? And Could you explain your answer briefly?


texts:
Reading MCU and component datasheets is a whole new skill to me.

I have a wire that I want to monitor as high/low (1/0) voltage, using a PIC10F200. (datasheet)

I presume somewhere in the datasheet the min/max voltage an IO pin configured as input guarantees to read 1 or 0 is defined.

Can someone teach me how to find these values in the datasheet for this particular PIC?


texts:
I'm building a device that will feature the ESP32 as the main microcontroller, and have a SAMD10 onboard for taking care of the precision timer stuff that TC's and TCC's are oh so good at. I would like the ESP32 to be capable of updating the firmware on the SAMD10 by downloading a pre-compiled file over WiFi, and then flashing it to the SAMD10 over UART.
Is this possible? Would I need a special bootloader to do this? I've looked and looked but amazingly nobody seems to have documented this.


texts:
Recently I went to order a set of these 100uF electrolytic capacitors with 10% tolerance, needed for impedance balance for an audio output. When I noticed they were out of stock, I decided to order a number of the 20% version, thinking I could just measure them and sort out the "beyond 10%" tolerance caps. To my surprise, when measured with my Fluke 87V (DC), all caps measured just about the same at around 103.4uF (I expected them to vary as resistors would). This was more-or-less the same value I measured on most of the 10% caps. The datasheet specs the capacitance tolerance at 120Hz. I've also read that DC measured capacitance is often around 10% higher than the AC measured capacitance.

So my questions: Are actual electrolytic capacitance values generally relatively consistent across a wide frequency range? For example, can I pretty much assume that if the capacitance is 102uF at 20Hz, that it will be around the same at 20kHz? (Related to this, should the datasheet tolerance spec be read as the deviation of capacitance from the specified capacitance, independent of frequency, or does it also account for frequency dependence)?

Secondly, does the consistency of the measured DC capacitance across a number of different capacitors give me any indication of the consistency of actual capacitance values in AC?  In other words, is it likely/probable that while all the caps measure the same at DC, that they could deviate significantly from each other at, say, 1kHz, with one cap measuring 85uF and another 105uF? Or can I assume that if the DC readings are all pretty much the same, the AC readings should be also?


texts:
A customer that has bought this device years ago somehow managed to fry this IC and he tried to replace it himself.

That did not work out though and he messed up the track for good. He sent it to us to repair it.

My boss gave me this board and told me to fix it. We do not have a replacement board, so I have to somehow fix it.

Question is how do I solder this?

Edit:
I looked up where the broken trace leads to in the schematics and then got into contact with the customer. As it turns out, it leads to a part of the device he never used and he's not planning to use it in the future. So he gave me his Ok to leave that pad unconnected.

The other pads - believe it or not - actually had a strong enough mechanical bond for the application (a large gas analyzer that is only rarely moved).

I would've definitely used the suggestion from Marcus Mueller if the trace in question would've been needed, so a shoutout to his answer as well.


texts: Computer controlled potential difference across wires

texts:
I am trying to design a circuit to control the potential difference across 2 stainless steel wires. The two wires are connected together at one end (common node) and on the other end, one wire is connected to +ve and the other wire is connected to -ve.  With a DC bench power supply, I performed a voltage sweep from 0V to 20V, with a maximum of 200mA of current drawn by the wires @ 20V. I would like to replace the DC bench power supply with a computer-controlled alternative.

My question is, how to use a simple Arduino microcontroller to do so, my main issue is how to convert the simple PWM single and amplify it to a voltage range of 0 to 20V, taking into account the current requirement of 200mA. One idea is to connect the PWM to a low pass filter, basically extract the DC element, followed by using an opamp to amplify the signal. Can anyone advise me on what would be the best approach ?

I attached a sketch of the wire setup.


texts:
I'm using an STM32F765VGTx on a custom PCB with an external crystal (at 26 MHz), which however I can't seem to get working.
My first question, before any further detail, is: how can I find out if the crystal is actually oscillating properly and is not broken? (The PCB has been designed and assembled by another team - I don't know too much about electronics). I tried to configure a Master Clock Output line and attach it to an oscilloscope, but I only observe a 16 MHz signal if using the HSI, otherwise with the HSE I only see a steady logical high voltage. Here is the circuit:

Anyway, assuming the oscillator is working, here's my configuration (auto-generated by
CubeMX):
void SystemClock_Config(void)
{
  RCC_OscInitTypeDef RCC_OscInitStruct = {0};
  RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
  RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};

  /** Configure the main internal regulator output voltage
  */
  __HAL_RCC_PWR_CLK_ENABLE();
  __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
  /** Initializes the RCC Oscillators according to the specified parameters
  * in the RCC_OscInitTypeDef structure.
  */
  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE;
  RCC_OscInitStruct.HSEState = RCC_HSE_ON;
  RCC_OscInitStruct.HSIState = RCC_HSI_ON;
  RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
  RCC_OscInitStruct.PLL.PLLM = 13;
  RCC_OscInitStruct.PLL.PLLN = 96;
  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
  RCC_OscInitStruct.PLL.PLLQ = 4;
  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
  {
    Error_Handler();
  }
  /** Initializes the CPU, AHB and APB buses clocks
  */
  RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
                              |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
  RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSE;
  RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
  RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
  RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;

  if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
  {
    Error_Handler();
  }
  PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_UART4|RCC_PERIPHCLK_SDMMC2
                              |RCC_PERIPHCLK_CLK48;
  PeriphClkInitStruct.Uart4ClockSelection = RCC_UART4CLKSOURCE_HSI;
  PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48SOURCE_PLL;
  PeriphClkInitStruct.Sdmmc2ClockSelection = RCC_SDMMC2CLKSOURCE_CLK48;
  if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
  {
    Error_Handler();
  }
  HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_HSE, RCC_MCODIV_1);
  HAL_RCC_MCOConfig(RCC_MCO2, RCC_MCO2SOURCE_HSE, RCC_MCODIV_1);
}

Once the main loop starts, I can see that the HSE is not active and the HSI is being used instead with:
if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_SYSCLKSOURCE_HSI)
    HAL_GPIO_WritePin(LED_3_GPIO_Port, LED_3_Pin, SET);
else
    HAL_GPIO_WritePin(LED_3_GPIO_Port, LED_3_Pin, RESET);

I tried entering debug mode and tracing the execution of HAL_RCC_OscConfig(&RCC_OscInitStruct), but once I reach the while loop that checks for an initialization timeout, the debugger hangs there and never gets out. Activating breakpoints right after the loop or at the line where the error would be returned, never stops the debugger, but I'm pretty sure this is a debugger issue since HAL_GetTick() always returns 0. Letting the execution continue, however, eventually reaches the main loop (so it is not really stuck) but as I said it never switches to the HSE.
If anyone could help me find additional resources to learn more about the issue or could provide any idea to solve it, I'd be very grateful.