texts: DB9 to Serial Connection - Unknow Configurations

texts:
I have a DB9 to Serial Connection and I am wondering if there is a name or a standard for this configuration. So that i do not have have to make it every-time.

I made a diagram, (stock image: disregard the arrows) and included a picture of the wire.


texts: Linear Circuits - Erroneous first order gain observation

texts:
At uni, I carried out some lab observations involving a CR circuit (4V AC power source, capacitor, resistor in series, in than order) with the following parameters:

simulate this circuit – Schematic created using CircuitLab

Here are my observations in graph form:

I attempted to measure the slope in dB/decade and recieved a value of $$g \approx +28.3dB/dec$$ but I thought values for the slope could not exceed $$g = \pm20dB/dec$$ for any first-order filters.

Any ideas why would this happen? (i.e. anything wrong with my lab setup, unforseen variables, etc.)


texts: Distance travelled using RFID or similar

texts:
I want to know distance travelled by an object (sheet of plywood) passing over head with a resolution of 3cm.
Plywood is fed down a shoot and slides on a roller ramp, comes to a rest on horizontal plane above sensing element.

With no discernible features on the the object ultra sound, Lidar, ToF are of no use. I cant add features i.e. i cant add significantly to the plywood in so far as to add a feature that could be distinguished by ultra sound and figured that passive RFID tags may be the best route considering their minimal thickness. I could place visible markers on the plywood if needed

Distance between sensor and underside of object is 30cm  which i cant make contact with and all sensing must be done under the plywood board.

I need to know how much the object has over or undertravelled beyond the sensing element, absolute position needed

My intial thoughts

The object will come to stop over the reader, and with my minimal understanding of RFID i figure that the tag closest to the reader will be the only one that transmits its unique ID as it'll be the only one with sufficient power. If the distance between each tag is known and kept within 3cm then the distance the object has travelled overhead between stop start and stop will be found.

Image below might better illustrate (not to scale) edited to show smaller RFID with width marginally greater than RFID Tags themselves

My question is

1) will the tags likely interfere with eachother and try and transmit their ID at the same time

2)any other suggestions to solve this?


texts: Is there any disadvantage to changing trace width in the middle of a trace?

texts:
Say I have a trace running across a board. It's 50 mils the majority of its length, but in one short place it narrows to 25 mils to make it through a tight area. As best I can tell, this will be preferable to a 25 mil trace the same length, and only slightly inferior to a 50 mil trace without the few percent of its length narrowed to 25 mils.

Is there any disadvantage to the narrowing? Odd high-frequency effects? EMI? Obviously traces have many possible uses, including delivering power, carrying signals of different frequencies, grounding... so under what circumstances will this matter?


texts: In Bayliner boat OMC stern Drives, the trim sensor used an Allen Bradley potentiometer/rheostat. The number on the back of the case is: 984246 8821 J. I believe it is a reverse log design with a 'D' shaft. I'm not sure I can trust my measurement as this was in a submerged environment and no longer functions in-circuit as designed, but it has only two solder lugs. Is there a way to find a current day substitute?


texts: How do we fix a loose plug due to its less lead/pin diameter that slips out of outlets on which the problem doesn't lie?


texts: ADC Signal conditioning. Transform 1V-4V to a 0V-5V signal, how can I do it?

texts:
Hi im doing a project for college and I got some doubts about signal conditioning. Im using a SS49E, hall sensor and, from what I have seen in the data sheets, the analog output gives values between 1v-4v. I want to read the analog output in the uC(ATMEGA88) with values between 0v-5v. How can I do that?
This is a subject in the college that is supposed to teach me how to manually condition a signal, so I can't change the code.
Thanks in advance.


texts:
I have a video cable D-Sub 9 pin. Someone know the connector pin assignments to do a RGB 3 bnc cable? Someone can help me?
Below, the image of description of the cable


texts: What is the measurement resolution of my load cell?

texts:
I am trying to figure out the resolution of a load cell (smallest weight change I can measure) that is connected through a load cell amp and being read through a 10 bit ADC (the DATAQ DI-149)

For example: with a 1000kg load cell will I be able to display in 100g increments or 1 kg increments or 10kg increments, etc.?

This project is going to be used to measure and graph a rocket engine's thrust over time curve.

Below are the load cell and amplifier specs:

Load cell

Combined Error   (%FS)   ≤±0.020
Creep (30 minutes)   %FS/30min   ≤±0.024
Temperature effect on sensitivity    (%FS/10C)   ≤±0.012
Temperature effect on zero   (%FS/10C)   ≤±0.020
Output sensitivity   (mv/v)  2.0±0.2
Input resistance     (Ω)     406+/-6
Output resistance    (Ω)     350+/-3.5
Insulation resistance    (MΩ)    ≥ 5000 (50VDC)
Zero balance     (%FS)   2.0
Temperature, Compensated -10～+40
Temperature, Operating    -20～+60
Excitation, Recommended  (V)     5～12(DC)
Excitation, Max  (V)     18(DC)
Safe overload    (%FS)   150
Ultimate overload    (%FS)   300

Amplifier specs

The bridge road input impedance: 2KΩ
Input sensitivity: 1.5~2.1 MV/V
Sensor excitation voltage: 5V DC
Load capacity : 87 Ω (four 350 ohm sensor parallel)
The working power supply : 18~26V DC
Precision: 0.3%FS
Temperature characteristics: Better than 100 PPM
Working temperature: 0~50C
Load Cell Amplifier Strain Sensor Transmitter 4-20mA 0-10v 0-5v


texts:
I would like to know what would happen to the excess energy produced by my off grid solar panels. The scenario is that I have enough panels to run my appliances and fully charged my battery at same time and still have some energy left from the panels, I would like to know what would happen to that extra energy.

The system is off grid


texts: 74HC238 (Decoder) - Will it use VCC to power channels?

texts:
I am trying to select different combinations of LED's using a 74HC238.

I am testing with an ESP8266, and supplying 3.3v from a regulator LM1117-3.3v.

My question is when I make the digital channels lets say put Y1 to high, will it be using the 3.3v that is being supplied from VCC, or will it go high and use current from the GPI lines?

If so, that means I would need to use a transistor NPN and supply the LED's power from the Regulator.

Any help is appreciated, this is the first time I am learning about Decoders. Thank you in advanced!


texts: Should I really prefer to use std_logic type to write sythesizable VHDL?

texts:
Recently while reading a Xilinx's "Synthesis and Simulation Design Guide", I came over a passage (p. 40) where they recommended the usage of the std_logic data type.

While I understand the power of the std_logic (e.g. its ability to represent the special signal states), I come from CS background and on my previous ventures with VHDL I also liked the expresiveness of its type system (e.g. ability to constrain integers, etc.).

Should I really prefer to use the std_logic? I can see its usefulness for I/O or top-level declarations but I would like to use more "high level" data inside the FPGA.


texts: Bluetooth module HC-05 interfaced with PIC: great latency and wrong data

texts:
I am using a PIC16f887 oscillating on an external crystal of 20MHZ

The code is simple

void main() {
    uart_init();
    while (1) {
         uart_puts("test for bluetooth connection", 0);
         uart_puts("success", 0);
    }
}

The Bluetooth module is on 9600 Baud rate.

And I've used both BlueTerm on Android and HyperTerminal on PC, all I got was either no data at all or truncated data for only serveral seconds before it went freezed again.

I wanna know what's causing this?
Is it because the Bluetooth module is broken in some way?


texts: DDR threshold levels and timing constraints

texts:
I am new in field of DDR and high speed memories, i come across SSTL signaling level diagram, over there VIH & VIL are defined as both DC and AC. What is the difference between them, what is the significance of this? Is timing constraint is related to it? is high speed switching related to it?
Thanks in advance for you help.


texts: How does leaving the neutral line not connected to device lead to burn it?

texts:
When an air conditioner (inverter AC) connected to the source 220V/50 Hz the circuit breaker became off and each time I tried to make CB on it returned to off directly.
After the maintenance center checked the AC control board they told me some components like capacitor and diode burned also the inverter board has some components burned. The reason for this problem was the neutral line not connected to AC as they told me.
I checked the neutral wire connected to the AC and it was not connected on the distribution board.
Could someone explain how leaving the neutral line not connected lead to burn the device board.


texts: Running or belt conveyor with electric motors and control panel need a kind of certification to be sold in US market?

texts:
We want to provide new machinery of a runner conveyor and a belt conveyor in the US market.

The equipment consists of:

the basic construction (metal parts, runners, drums, and belts),
electric motors which give the movement to the system of the runners and drums, and also
the electric control panel with appropriate buttons.

We would like to ask if anyone could clarify th following:

whether some type of test certification is needed to meet US legislation like a test of an NRTL for the final product with all the parts of the product including the electric and electronic equipment,
or the NRTL tests certification of the electric and electronic equipment could fulfill somehow legislation requirements.

Please consider that the product is constructed in EU towards EN ISO Standards and has CE mark and the Declaration of Conformity. Towards the European Directives, the final product with electric and electronic equipment is not necessary to Certify towards LVD and EMC Directive since it is intended to be used in industry and all the electric and electronic parts are certified by a certified body.

We have already been informed that the CE mark is not acceptable to the US and all the machinery fulfills 29 CFR Part 1910 and NFPA 79 Electrical Standards for Industrial Machinery, also UL 508A-Standard for Safety-Industrial Control Panels.

Also, we would like to ask you if there some type of responsible authority in the US to inform us and clarify these type of questions.


texts: Trying to identify threaded round 2-way power connector on a radio

texts:
I'm trying to find a power connector for a Maxon DM200 Mobitex radio terminal. As far as I'm aware, the part of he manufacturer who made this radio closed down some years ago, and there's no support available.

I've uploaded some photos of the connector to Imgur: https://imgur.com/a/1rztAaS

There's a logo on the back of the connector which looks like a letter "W" in a circle.

Here are front and rear views of it.

Here is the top view of the connector.

Some facts and figures:

Connector mating section thread -- I measured this at 12.7mm, it could be a loose-tolerance 13mm. There are only 3 complete threads.
The back mounting nut isn't shaped (eg hex), it's completely round with two notches. I guess you'd use a pin spanner to install and remove it.
The panel hole seems to be around 12mm diameter.
There's a foam or rubber gasket (hard to tell which, it's perished) between the socket's bezel and the front panel. It clearly pushes in from the front.
Pins are 1.5mm diameter and 2mm diameter. This is the only polarity keying I can see on the connector; there's no bump or notch polarising aid like the GX16 connector and most screw-in DIN plugs have.
Pin spacing is about 4mm.

Does anyone know what this connector might be? I've ruled out GX12 and GX16, but either might work as a replacement.


texts: How to measure the On/Off current ratio in TFETs and MOSFETs

texts:
I saw the conventional understandings other questions: MOSFET ON and OFF current
As I know, the off current is not zero, however very small, in the cut-off region. When we discuss TFETs, one of the critical issues is On/Off current ratio. And the characteristics of TFETs are quite different from the MOSFETs'.
Can we measure the On/Off current ratio from transfer and output characteristic curves? If there are many ways to measure, at least I would like to confine it to low power devices. And, I read that somebody talks with the figure of merit. What is it?


texts: I need to design a circuit which will make a LED ON for two seconds and then OFF for two seconds and so on. You can use capacitors, resistors ,transistors and relays for the circuit only (no 555 timer or controller can be used). I also need formula and calculated values of resistors, capacitors for the above mentioned blinking scenario as I have to defend the components. Can someone please provide the link or share the circuit with values calculation. There are a lot of circuits available online but I cannot find calculations for them!


texts: Verilog Parallel-to-serial register works only with if statement

texts:
I am making a parallel-to-serial shift register and I got it to load correctly, but with only with an extra clock cycle/ extra byte. I am wondering what the difference is between two snippets that look almost the same.
This Verilog works:
//Parallel-in serial-out shift register
reg [15:0]temp = 16'habcd;

always @ (posedge clk) begin
    if(load) begin
        temp <= din;
    end
    else begin
        temp <= {temp[14:0], 1'b1};
    end
end

assign dout = temp[15];

Microcontroller Output (correct):
00 00 ff ff ff ff ff ff

This Verilog does not work:
//Parallel-in serial-out shift register
reg [15:0]temp = 16'habcd;

always @ (posedge clk) begin
    temp <= {temp[14:0], 1'b1};
end

always @ (posedge load) begin
    temp <= din;
end

assign dout = temp[15];

Microcontroller output (wrong):
00 00 00 00 00 00 00 00

Microcontroller code for both Verilog snippets:
function read8bytes() {
    spi_latch_pin.write(1);

    /* dummy first byte used only to latch the counter data */
    spi.readblob(1);

    spi_latch_pin.write(0);

    /* actual counter data */
    local s = spi.readblob(8);

    // ...and return it
    return s;
}

// Log results from the above functions
server.log(read8bytes().tostring());

I believe the answer is that there is a race condition in the code where the register "temp" can be edited in two "always" blocks simultaneously. I found that the Verilog doesn't build when I reverse the order of the "always" blocks either with the error "'temp' has multiple output drivers" So I'm going to keep the dummy byte. I just thought the Verilog would work despite the race condition.


texts:
I worked a little on electronics at school but it's a long time since then so I need some advices.

I want to track a finger pressure position on a string on the X axis (see the figure below). I think that I can deduce it from the difference of forces on the 2 sensors, but I'm not sure this will work.

So, is this method correct and what kind of sensor can do the job ? Or do you have any other method that'll work ?

Thanks.


texts: When BLDC motor is used as generator, how does the amount of poles effect the frequency of the 3 phase AC that it generates? For example, if I had a motor with 8 poles and I spun it at 50 rpm, what frequency 3 phase AC would it generate?


texts: Can fixed point division be implemented using a divider that outputs quotient and remainder?

texts:
From what I have seen, division is a highly expensive operation in terms of time or area (tradeoff). It is usually implemented as an operation of continuous subtraction of a number from another number to get the quotient bits.

While I understand how addition, subtraction and multiplication are implemented, there is some confusion surrounding division. I have 3 interrelated questions.

Q1: If division is merely recursion of subtractions until we are left with remainder, how would one get a fixed point output  i.e output with both integer and fraction parts; since an integer quotient represents how many times we did subtraction in a loop.

Q2: How would one deal with recurring decimal numbers as quotient? I assume through round-off i.e we do not care if result is recurring decimal or not, we just calculate the result to certain digits of fractional part.

Q3: Provided that I have a divider IP that outputs remainder and quotient, how would I get the fractional part of the output since the remainder does not actually equal the fractional part?


texts: Does change in current cause voltage across an inductor or vise versa?

texts:
I am currently studying power electronics and trying to truly understand the operation of buck and boost converters. From the Wikipedia page for a buck converter, it states, "When the switch is first closed (on-state), the current will begin to increase, and the inductor will produce an opposing voltage across its terminals in response to the changing current". This sentence really puzzled me because I had always been under the impression that a change in voltage across the inductor caused the current to change.
Even in my power electronics class, my professor discussed how the difference in the voltage across the inductor from input voltage to output voltage, causes the inductor current to ripple. We calculated the inductor ripple by using the voltage across the inductor for the on time of the active switch and solving the differential equation . However, from this Wikipedia article, it seems that the ripple in inductor current actually is what is causing the change in voltage from input to output.
So which one is it? Does a voltage differential across the inductor cause the current to start ramping up, or does a change in current induce a voltage differential?


texts: Advice on connecting batteries in series

texts:
I have a 4 NiMh AA HR6 batteries each with a capacity of about 2000mah. And am working on a LED project which requires 500ma but I need to power it up with a voltage of around 5v. So I was planning to hook these 4 batteries together in series to achieve that level of voltage.

But here are my concerns these 4 batteries are not of same make. Two batteries are GP Recyko and two are Kodak Digital camera batteries. Does it poses a problem when i connect batteries of different make in series.

Moreover I have recharged the battery two days back and when i measured the voltage none of them seems equal even the batteries of same make. The batteries measured 1.24, 1.31, 1.30, 1.27 respectively. If i do connect these batteries together what will be the resultant output voltage?

If this is good to proceed how long can i safely draw 500ma from these batteries?


texts: Controlling the speed and position of a linear actuator

texts:
I'm trying to control a linear actuator's position and velocity. I can create independent PID loops to control either position or velocity, but I'm not sure how I could control both.

Should I be looking at a cascade PID? Which of the two would be the inner loop, and how would I use the output of the outer loop as the set point of the inner loop?

Or, should I be looking at trajectory generation?

The figure below shows an example of the type of motion I'd like to generate, but with meters in place of degrees.


texts:
I've just been looking at purchasing a 3 phase generator for powering wood working machines in the UK. However while I have been looking I have come across generators which only have a voltage gauge which go up to 300V and some 3 phase generators outputting 220V. I always thought 3 phase had to be 415V which my machines say they require. Could anyone explain to me what these generators are for and are they appropriate for my needs?

Such as the one shown here: http://www.ebay.co.uk/itm/DEUTZ-Generator-100-KVA-3-Phase-200-volts-/121873808599?hash=item1c603ebcd7:g:suQAAOSwqYBWo8WG


texts: Why are we going from DUV straight to EUV lithography?

texts:
The current lithography machines use 193 nm light, and for the past 10 years we've been waiting for extreme ultraviolet machines, that emit 13.5nm light.

It's pretty obvious that the this challange is far greater than anticipated — ASML was talking about shipping it in 2010 (!).

So why take such a huge leap? We're talking order-of-magnitude jump in wavelength. Why not go to 100nm light first? Or 50nm? Wouldn't it be easier to develop this EUV technology more iteratively and gradually improve and fix all the problems (light source, power, availability, pellicles, mirrors, etc.) one by one as they arise when stepping between wavelengths?


texts: Switching / dimming a high power mains heater

texts:
I need to make an adjustable power controller for a 3kW heater that will run off single-phase 240V AC power.

How should it be done?

Maybe a triac circuit similar to that used for dimming lights. Could this work? (Household heaters don't seem to ever be 'dimmable', is this just a cost saver, or is there another reason?)

An alternative idea was switch the heater on and off with a minimum interval of once per second in a PWM fashion, using a zero-cross solid state relay. But I don't think the neighbours would be happy with their lights flickering at 2Hz.

Any thoughts or other ideas would be appreciated


texts: .TF Spice Simulation, output impedance with current as output

texts:
So I'm currently reading CMOS by R. Jacober Baker and in the first chapter there is a quick introduction into Spice but I have a hard time understanding one of its examples.
So this is the circuit:

The calculated output impedance is infinity.

While I understand how the .TF statement calculates the output for a voltage as output I'm kinda irritated on how the output impedance for this kind of setup is calculated.
In the book it says Vmeas is getting removed  and the circuit is open, but I don't understand why Vmeas is getting removed for this calculation. And even if it's getting removed, the impedance looking into one of the pins of the removed Vmeas source would still be 3k because you can "reach" the other pin via the ground connection.
(same thing would happen if I apply a voltage source to my output pins -> I'd get a current over gnd and so the output impedance defined by Ro=Vo/Io=3k)

I assume I have a wrong understanding of what the output pins or the desired output is in this case because my defined output is a current now instead of a voltage, but I'm not really sure how to handle this correctly.

So why is the output impedance in this case infinity?


texts: Converting an SMD resistor PCB into wires and film resistors

texts:
I currently have a project in a vehicle in which I want to replicate a small button PCB board with my own buttons using resistance values for the circuit so the car knows which function to activate. I have already done a similar project in another vehicle and wired it up so that each button press closes the circuit and with the current passing through the specified resistor, it gives the vehicle a certain resistance value.

I have managed to source the wiring diagram for the PCB board as follows for which I have removed the actual resistor values and replaced with R(X):

Having not come from an electronics background, I am having trouble understanding how to wire this in practice and what to actually wire to each button.

With all of the resistors being in a row and the circuit being closed at all times no matter if a button is pressed or not, does that mean the car is likely to be expecting a certain resistance by default (i assume the addition of all resistances?) and then a change in resistance once each button is pressed?

If that's the case, how would this be implemented with wires and film resistors?

If its completely wrong please correct me and explain how this would work.

Thanks in advance, any help would be greatly appreciated


texts: What is meant by derating in this context?

texts:
At page 33 of this motor driver there is a section includes the term derating due to temperature:

What is meant by continuous current derating 4% per Kelvin in this context? Does that mean the motor current will decrease with the temperature?


texts: What is difference between STM32 timer channels with N suffix?

texts:
For instance in cubeIDE for board L432KC for TIM16 I can select PWM Generation CH2 and PWM Generation CH2N. What is the difference? Do they need to be interface differently?
I.e. HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_2); will work for CH2N?


texts: I'm using Atmel SAM chips and the data sheets don't have any mention of solder mask clearance for their TQFP packages. What would be a nominal pad/solder mask opening/cream size for a 0.5mm pitch package?


texts: Resetting CD4017 Counter when power source is OFF

texts:
I found the circuit below online and I have two questions about the reset switch.

Does it help to click the reset button when power is OFF? I mean, does it clears the memory of the CD4017 chip when power is OFF as well?
How is it different between the two cases: when resetting while power is ON and when it is OFF?


texts: Blackout Protection for H Bridge with Synchronous Rectification

texts:
I'm designing an H-bridge motor controller with synchronous rectification similar to the Ti Stellaris RDK-BDC24 link here.
Synchronous rectification has the promise of handling the back-emf from a motor more efficiently than schottky diodes, but requires a control signal at the transistor gates. If my motor is on and I have a black out, there will be no control signals sent to the H bridge to protect the circuit from the back-emf and poof! I've got some magic smoke.
How should I design my motor controller to have enough power to stay alive long enough for the back-emf spike? The ti motor controller has, what looks like, a 1800uF cap to keep the microprocessor alive.
I'm shooting for my circuit to tolerate 30A continuous to a 12V motor.


texts: Simulation in Multisim is taking a lot of time. Probably due to the signal multiplier(Modulator)

texts: In this AM modulator/demodulator circuit, I am trying to see the variations of output signal due to changes of frequency and phase of the carrier signal at the demodulator. All is working fine until the carrier frequency gets higher. For 100KHz it is working fine, for 1MHz it barely works, and for 10MHz(which I'm interested in) I have to go to dinner and come back to see a reasonable output at the oscilloscope. Are there any solutions you would suggest? I think the part that is taking a lot of time is the modulation/demodulation process.


texts:
This LED drive module exploded last night, as the result of an earthed (grounded) screw touching a capacitor leg. The breaker (fuse box) tripped, of course, due to earth leakage. That bit makes sense.
What I don't get is why there was a massive bang, a flash, tracks blown off the board and soot all over the place. Of course, this is not unusual in mains power faults, but in this particular case, the short appears to have been between neutral and ground.
I like to think I have a fairly good understanding of electricity, but given that neutral is connected to ground at the fuse box, I don't see how a large enough voltage should develop between the two (in this situation) to cause such devastation.
For bonus points, can you think of any good reason that a completely different piece of equipment (an electronic HDMI switchbox) should now be completely nonfunctional after the above incident? It was powered via an isolated wall-wart, and was completely unrelated to the device that exploded, other than being located within two feet of it.
Photos and (best as I can tell) the correct circuit diagram follow.


texts: ATX power supply turns off when used with DIY boost converter

texts:
I am trying to build my own step-up boost converter.  I have my connections as shown in the following schematic (except for the one circled in red.)

First I powered up my step-up module with a breadboard power supply. Everything works as expected when there is no load on the output.
When the output voltage reads 12V with no load, I connected a 12V 0.5A DC fan across the output. The output voltage dropped upto 6V. This is my code(if it is necessary.)
#define F_CPU 8000000
int feedbackPin = 3;
int potPin = 2;
int gatePin = 1;
int pwm=0;
int v1 = 0;
int v2 = 0;

void setup() {
//Clear OC0A & OC0B on Compare Match, set OC0A/OC0B at BOTTOM
TCCR0A = 2 << COM0A0 | 2 << COM0B0 | 3 << WGM00;
//Normal Waveform genetation mode , timer uses clock source clkI/O/(No prescaling)
TCCR0B = 0 << WGM02 | 1 << CS00;
// PWM1A enables PWM mode based on comparator OCR1A in Timer/Counter1 and the counter
//value is reset to $00 in the CPU clock cycle after a compare match with OCR1C register value
//0 << COM1A0 makes Timer/Counter Comparator A disconnected from output pin OC1A.
TCCR1 = 0 << PWM1A | 0 << COM1A0 | 1 << CS10;
GTCCR = 1 << PWM1B | 2 << COM1B0;

pinMode(feedbackPin,INPUT);
pinMode(potPin,INPUT);
pinMode(gatePin,OUTPUT);
analogWrite(gatePin,pwm);

}

void loop() {
v1 = analogRead(feedbackPin);
v1 = map(v1,0,1024,0,255);
v2 = analogRead(potPin);
v2 = map(v2,0,1024,0,255);
  while(v2 > v1){
    v1 = analogRead(feedbackPin);
    v1 = map(v1,0,1024,0,255);
    v2 = analogRead(potPin);
    v2 = map(v2,0,1024,0,255);
      if(pwm<250){
        pwm += 1;
        analogWrite(gatePin,pwm);
      }
    }
  while(v2 < v1){
    v1 = analogRead(feedbackPin);
    v1 = map(v1,0,1024,0,255);
    v2 = analogRead(potPin);
    v2 = map(v2,0,1024,0,255);
      if(pwm > 0){
        pwm -= 1;
        analogWrite(gatePin,pwm);
      }
    }
}

I understand that what needs to happen to control the output voltage is changing the frequency of the PWM signal. But what I do is increasing the duty-cycle. Could this be the reason it fails to maintain the voltage constant upon connecting a load?
My biggest problem as the title says is when I connecct the +3.3V and +5V and ground to an ATX power supply.
Everything works as before when there is no load across the output, but as  soon as I connect the fan I used earlier across the output my ATX power supply turns off.
I have no clue why this happens.
I would like to know why this happens.
Also is it really necessary to have the capacitor circled in red?


texts:
I am fairly new to using MOSFET's in circuits and I am a little stuck. I want to use the IRF540N as a switch, which will receive a voltage to the gate, and 18-30 volts at the drain. I would like for the source to essentially follow the voltage of the drain as long as there is voltage being applied to the gate. I am having trouble getting it to work that way, I tried testing it with a power supply as seen in the picture but I keep getting unexpected behavior. Am I testing it wrong? Should I add resistors or anything else to achieve the desired results from the IRF540N?
datasheet: https://media.digikey.com/pdf/Data%20Sheets/Fairchild%20PDFs/IRF540N.pdf
attempted tests:


texts:
I have been reading that NPN transistors are sinking and PNP are sourcing devices. I do not really understand this concept. It says current source device connects load to Vcc and current sinking device connects to ground (low voltage).

So does connecting a load at emitter of NPN transistor make it sourcing?


texts: using smartphones SOC or other components as microcontroller like arduino

texts: i have a smartphone which has stuck in boot loop,i was just wondering if i could use it's internal components like SOC to use it as microcontroller like "arduino".have anyone ever tried it?or possess any information about my thought?is it possible?


texts:
I have a few questions regarding the following schematics:
![/imga]

![/imgb]

Initially I was testing the first schematic to see if it works good. The result of the tests were good, the power supply voltage drop under 7A load was 0.01V.
I have a few questions regarding the 2 attached schematics:

The first modification was that I removed R5, R7, R8 and the 2 potentiometers (1k and 10k) and I used instead of the mentioned components a single 2K/2W multiturn potentiometer. What modifications will appear in the power supply functionality after this modification besides the modification of the maximum output voltage ?
How to calculate the power dissipated in the 2k/2W multiturn potentiometer ? It is sufficient a 2W power rated potentiometer ?
How to calculate the voltage on the 2k/2W potentiometer ? it is equal to Vout-1.25V ?

Probably there will be more further question.


texts: Choosing Op-Amp configuration and resistors

texts:
The questions about op-amp resistors are dime a dozen, forgive me for adding another one. I am not asking how to calculate them, I know at least that much.  My questions approach the problem from different perspective. Specifically - hobbyist's choices when it comes to buying specific resistors.

Case in point: I have 1.6V differential signal biased with 1.1V common-mode voltage. I want to remove the bias and amplify it rail-to-rail. Pretty common task in itself. The obvious choice is to use differential configuration, which gives me 1.05K:28K, 16K:430K etc. combinations.

Now, in ideal world I would get something like precision voltage divider from Vishay and have 1 component on PCB in addition to op-amp itself. In reality, however, only industrial designers can afford $20,000 for 1K of these. What hobbyists usually end up with is an awful mess of resistors in series or trimmers taking up over PCB space.

This got me thinking about alternatives. Technically, I can take only one line of signal source and feed it to non-inverting amplifier with bias (to remove common-node). This should be less sensitive to resistor values giving me more choices for less money. And will not require trimmers.

Q1: Does this make sense?

Q2: Would the precision loss due to using non-differential signal be at least slightly alleviated by lesser sensitivity to resistor matching?

Q3: Or maybe somebody can suggest affordable source of voltage dividers or 0.1-0.05% resistors not in bulk amounts? Note, that while cheap 0.1% resistors are not that hard to find, for some reason they often sold with E24 decade values, which kinda defeats the purpose.

Update: Here are the circuits for comparison (and original text changed a bit)


texts: How to power a remote control car using solar power

texts: My daughter is trying to power a remote control car that currently uses 4 AA batteries as power. She is trying to convert it to solar. What does she need to do so?


texts: Using single microcontroller I/O to enable/disable two transceivers

texts: I am using ATMega16L microcontroller, and two IR transceivers for communication with devices. The transceiver I am using is TFBS4650-TR1 which can be enabled using the 'SD' pin. Can I enable both transceivers at the same time just by connecting one I/O pin as shown in the schematic below? Is it safe to do so or is there any other way to achieve this?


texts: Creating printed circuit boards (PCBs) which aren't flat

texts:
I would like to create a printed circuit board (PCB) which is not flat and which is not shaped into a square, but don't know how to proceed. Can Cadsoft Eagle create such a board? If so, how? What other software packages can be used to create boards such as this? Where can I send such a board for manufacture?

Furthermore, I want to create a piece of plastic which has a three-dimensional shape and onto which the printed circuit board will fit. What's a good way to design both the board and the plastic such that it's easy to ensure they both line up?


texts: TBD resistor & capacitor(TBD means "To Be Discussed")

texts:
I’m building the * DN05017/D

power supply from ON Semiconductor. This is the datasheet of the power supply with schematic and BOM
So now while searching for the components, I noticed on the schematic and BOM list a resistor without a specific value; all it says is: “TBD”.

R11 is the resistor that shows “TBD” Value. And also note under the “Manufacture Part Number”, that capacitors and resistors have “TBD” but under the “Value” they have noted their specific values. Just R11 has noted “TBD”.

I’m integrating this into a AC line monitoring project.
I have googled “TBD” but can’t find my answer.
A definition I found for TBD: “time to breakdown”, but it didn’t make sense in my case, because I need the value.
Question
What does “TBD” mean in this case? Do I have to determine the value by myself?


texts: Update tracks on board to reflect new design rules - Kicad

texts:
A PCB has been laid out with track widths according to a set of design rules by net class.

I have modified the net class design rules (Setup → Design Rules... → Net Class Editor) and now I wish to update the tracks on the PCB to reflect their new values. How do I do that?


texts:
Hopefully this isn't too broad of a question, I will narrow it down the best I can.

We need to add RFID tags to feeders on our pick and place machine, to determine that they are loaded into the correct position on the machine itself. Other than having a reader for every single slot, that only reads a single feeders RFID tag, what are my options?

I could have a single reader with longer range, but since the tags we will use will be passive, location tracking will not be overly accurate. I looked into phased array antennas, but they seem still experimental..

If we used a single RFID reader for each feeder slot, that would require over 100 readers..

I'm open to other technologies other than RFID, but I presume that it is the obvious choice.


texts: What are the advantages for certain types of transformers?

texts:
I work designing medium voltage motor starters. Being an mechanical engineer, I still don't understand the advantages, disadvantages, and when to use certain types of transformers.
When is wye-wye best?
When is delta-delta best?
When is delta-wye best?
When is wye-delta best?


texts: How is the second capacitor charged in a Colpitts oscillator?

texts: C1 is connected to ground, so there should be no current from C1 to C2.  C2 will get charged by L1, but then in that case those two capacitors were not connected in series, they can't divide voltage, but that is not what I read from book. I am cofused.


texts: Constant current source - unexplained issues

texts:
I have been puzzling over this for days now, and cannot for the life of me figure it out...

I have a constant current source set up to use as an analog dimmer for my LM3429 LED driver. I have made very slight changes in order to use a digital potentiometer and avoid issues that arise from bad tolerancing of that part.

Here is a stripped back version of the cicruit I am testing on.

What I have observed so far:

When unconnected the LM4120 reference give a stable 5V.
The potentiometer is definitely changing
When top of potentiometer is connected to reference, Reference drops to 3.9V

I really have no idea what is going on here. Can anyone help me debug this?

LM4120 DS: http://www.ti.com/lit/ds/symlink/lm4120.pdf

LM3429 DS (page 14): http://www.ti.com/lit/ds/symlink/lm3429.pdf


texts: What is the UK standard E14 LED Candle bulb and holder for the US, is it E12?

texts:
I am making a table lamp and I'm going to try and mass produce it. I live in the UK but I will be selling in the US, does any one know the differences in voltage/wattage and light bulb holders? I am using a E14 LED Bulb UK, bought from IKEA and what I can see in IKEA US with the same light is a E12 LED Bulb does is that about right? Also I am using a Brass light holder with an earth, is this somthing that is standard in the US or would I have to look at a differen holder, maybe plastic?
Thanks for any help on this, most appreciated!


texts: What is the difference between these two ladder logic diagrams?

texts:
First ladder logic diagram:

Second ladder logic diagram:

I am trying to implement a toggle switch. On the rising edge of "Change", it should toggle "ToggleThis".
I thought the first ladder logic diagram would work. Let's say we start with all the variables turned off, so "Change" = 0, "ChangePrevious"=0 and therefore it doesn't toggle "ToggleThis". When "Change" becomes 1, "ChangePrevious" is still 0 for the first iteration, therefore it toggles "ToggleThis" once and "ChangePrevious" becomes 1 and stays at 1 for the rest of the iterations while "Change" is 1.
Well, it didn't work as I thought it would and I cannot figure out why.
When I add two latches in parallel as shown in the second ladder logic diagram, it magically works as desired. And I have no idea why. I don't see how it changes anything. Can someone please explain? Sorry if this is a dumb question, I've only just started learning about ladder logic.


texts:
Imagine we're trying to get 120V output.

For AC,  we must have a source with a peak voltage of 169.7V to achieve an RMS voltage of 120Vac. (169.7V * 0.707).

For pulsating DC, whether rectified by a fullwave bridge rectifier or sourced from a DC generator, we must obtain a peak voltage of 188.3V in order to achieve an output average voltage of 120Vdc (188 * 0.637)

So, now my question.

I understand the idea of RMS, that in order to calculate something akin to an "average voltage" for AC we must square the negative values of the sin wave AND the positive values, netting us squared positive voltages. Then we find the mean of those two "DC pulses" and then find the root of that average to obtain RMS.

But I'm wondering why the number yeilded is 0.707 of peak voltage whereas average DC voltage is 0.637 of peak voltage. I mean, why is the peak DC voltage so much higher if we're attempting to get 120Vdc than the peak AC voltage when we're trying to get 120Vac?

Why aren't the peak voltages the same? Why is one 188Vdc vs 169.7Vac? Is it all simply an artifact of the squaring and rooting math required to find RMS? I find this very confusing.


texts: Is there a significant loss in a voltage doubler circuit?

texts:
I am making a small generator just for experimentation.

I need to double the voltage that the generator coils are producing.

But I can't just connect them in series, because they are out of phase with each other.

So the plan is simple; 1 gen coil charges 1 capacitor, another generator coil charges another capacitor and I connect the capacitors in series.

But I read that capacitors in series cut the capacity by half.

That means that my gen coils are going to produce half the amperage? or not?


texts: I need to get either a 11.1v battery to 12v or 14.8v battery to 12v for a camera. The current draw will be less than 250mah. I was wondering what the cheapest and easiest way to do that is. I will be using either of my two lipo batteries for my power source. Thanks for any help.


texts: Why does an Oscillator produce sine waves?

texts: By the definition of Oscillator: 'An Electronic circuit that produces a repetitive, oscillating electronic signal, often a sine wave or a square wave' I'm familiar with RC Phase Shift Oscillator and Wien Bridge Oscillator. Both satisfy the Barkhausen criteria,so should produce an output, But why is the output Sine ? If someone could elaborate using either of the two oscillators, or maybe some proof/result that give a better idea on the shape of the output wave.  I also know the principle of a square wave generator using op-amp, but that isn't an oscillator and works on the principle of saturation of op-amp. Am I correct in stating that oscillator and sq. wave generator are  different ?


texts: Floppy / Brushless DC motor speed regulation

texts:
I have a non working TEAC FD-235f 161-U, which is a rather rare (nowadays) 3-1/2" Amiga floppy drive.

A cap had leaked over the PCB and eaten away at the traces. I jumper wired the broken traces and replaced the cap with a through hole 4,7µF electrolytic cap.
https://imgur.com/a/zD79Z

I know its not pretty but its the best I could pull off with my shaky hands.

I triple checked the new connections and they are ok with no solder bridges on the little pins or anything.

The drive is still not reading any disks. When inserting a disk, the flywheel spins up to 800rpm (while it should be exactly 300) and the head is clicking a few times as if it was reading, but it stops and goes back to 1.3 boot screen.

My multimeter is giving me a reading of 13,5hz at the hall sensors output pin, which would equal something around 800rpm.

I noticed the cap I replaced had the wrong value, the original one had 10μF. Though replacing it with a correct one didn't do anything to the rotation speed.
I even tried a different ceramic resonator from a similar drive, and also removed the VCC from the hall sensor to see what happens. Nothing, rpm stayed the same.

I wonder if the hall sensor is involved in speed regulation at all.
Big problem is that I cannot remove the flywheel to see where the motor is powered from, because the screwhead is b0rked but still firmly attached.

I can confirm the hall sensor is working properly (as is my multimeter, I just did an aural RPM check by duct taping something to the flywheel which produces one click per revolution, recorded that and measured the time between clicks. 13,5hz is correct, the drive is really spinning at around 800-810 rpm. Darnit

Neither my meter nor my newly aquired scope is able to verify the correct operation of the resonators (because of limited bandwidth), which should generate a signal of one Mhz for 300rpm. Since two resonators produce the same result I can only assume - with my limited to non existant knowledge of brushless dc motors - that the controller IC must have gone bad. I dont have a similar one or I'd just swap and test.

Sorry for this wall of text. So my question is, what could be the possible causes of a brushless DC motor exceeding the nominal RPM of 300 by 500?

Could it be that it has MORE hall sensors below the flywheel that I can't get at (yet?)? Wouldn't the motor not move at all if the controller would have gone bad?
This tech is so old that I can't find schematics for this device, not even datasheets for the controller IC of the motor or the resonator.


texts: Could anyone explain to me why my 7815 regulator gets hot and eventually blows up ??


texts: Medium to High Voltage Transformer Standards

texts:
While looking at IEC standards, I came across the IEC 60076, which basically establishes pretty much everything about power transformers. I'm particularly interested in maintenance routines and periodicity.
I'm wondering if this standard applies to other transformers as well, say... below 1MVAs? I would like to know if the same routines and maintenance procedures are also applicable to smaller transformers.


texts: Why is input offset voltage so bad? (op amps)

texts:
Take a typical application of an op amp - a photo amplifier:

In the circuit above, since input offset voltage is a dc characteristic, it is modeled as a dc source near the inverting pin of the op amp. This representation of offset voltage is also traditionally seen in many other noise analyses of op amps.

the output voltage V of the op amp as a function of the current i is, by KVL, KCL, and the two golden op amp rules, is

$$V = V_\text{os} + Ri$$

Which is very similar to the equation we'd get with an ideal op amp:

$$V = Ri$$

So, why not just measure the current by letting Vos be the reference voltage in our voltmeter? How about other easy ways to calibrate-out the effect of the offset voltage? Wouldn't those ways be much cheaper than buying a high-quality op amp?

A good answer would include a way to more accurately characterize the negative impact of offset voltage on a typical op amp circuit.


texts: Can the capacity of a battery be determined from Volts, Amperes, and output of Joules for xyz amount of time?

texts:
I'm trying to purchase a portable car battery charger (Noco Genius Boost) and I can't tell if it's possible to calculate the capacity in Ampere-hours or Watt-hours. The reason why I ask is because there is no indication of Ampere-hours or Watt-hours, or anything related to time.

The product information in the details show: 12V, 1000A, and output of 7000 Joules per 3 seconds.

Is the capacity possible to determine and if so, how did you calculate the math?


texts:
I have a set of old FPGA files. I'm trying to identify the tool that created them so I can try to import them into a current tool.

The file extensions of the set of files are *.abl, *.pin, *.ipf, *.dri and others.

The files are 10-15 years old. They were originally built on a Sun Workstation.

The target package is an Actel A1280A.

Any suggestions?


texts: Ramp/Pulse VCO - how to change the frequency?

texts: I've successfully built this VCO circuit using an LM13700 that works just fine if the VC (the 510K resistor) is not connected to anything. Needless to say, I'd like to be able to change the frequency of this VCO. However, when it's connected to a voltage source (potentiometer) it doesn't change the frequency but the amplitude. Tweaking the pot just makes the signal 'die'. I suspect the equations at the bottom has a lot to do with the frequency but I just cannot decipher them. What am I doing wrong? How can I change the pitch?


texts: This is the circuit diagram I used to make my line follower robot. I don't understand the symbol at the right side down corner, the one that is a circle with 3 dots inside. As this is my first PCB design could anybody help?


texts:
I'm trying to order components, so I can make a board following this circuit.
My problem is, I cannot find any 0.1uf capacitors, that are rated at 275VAC. The highest voltage I can find, in stock, is only 50VAC, unless I want to buy a couple thousand, which I only want 2 to 3.

I can how ever find a film capacitor with the exact ratings I need, with the exception of it being bipolar.

Can I add a diode in series with C1, and C2, to achieve the results I want?
And if that wont work, could someone please recommend another cap from digikey?

Much appreciated.


texts: Pushbutton Circuit - Triggers Event when no button press

texts:
I have been using the circuit below. I have noticed there are times the circuit will trigger on its own without any button press. Sometimes it can trigger a few times within an hour. The components are soldered onto a PCB Board. I have my raspberry pi GPIO set as a pull down (GPIO.PUD_DOWN). The interrupt event is triggered on GPIO.RISING and I have a SW bouncetime of 50 seconds. The 3.3V source is connected to the 3.3V and GND rails on the Raspberry Pi. The Raspberry Pi is connected to a wall outlet using a 5V 3A adapter. The wires connecting the GPIO pin to the pushbutton are stranded copper. The distance between the GPIO pin to the pushbutton is about 3-5 inches. I have a PiCamera, 5V 0.5A Motorboard, 10mA Fan and 4 leds (<5mA total) connected to the Raspberry Pi as well in case load would be an issue. Power consumption is about 4 Watts on average.
Is my pull down resistor too low? Possibly a Raspberry Pi GPIO issue? Something else to look into or change circuit wise?

Interrupt Setup via Python:
GPIO.setup(button_gpio,GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.add_event_detect(button_gpio,GPIO.RISING, handler_funtion, bouncetime=50000)


texts: Can SS pin be tied low if only one SPI device is used?

texts: I read online that to start an SPI transaction to an SPI supported device, the SS (slave select, aka chip select) line must be set to low for the entire transaction then be brought high at the end to end transaction. If I make a circuit containing only one SPI device, will I need to lower the SS line send command then raise ss line everytime or can I tie the ss line low and send unlimited commands? The device I am using is ISD1700 sound chip.


texts: Errror simulating IR2110 with pspice (overflow)

texts:
When I use the model pspice for the IR2110 for a full bridge I got overflow error. Does someone have a solution to this problem?
I tried a lot of tweak with the solver, try to use initial condition on various capacitors, but no solution found!


texts: Batteries in series with different amp-hour ratings.

texts:
I have a 1.5 amp-hour, 12 V battery and I have a 10 amp-hour 12 V battery. I know the voltage will increase to 24 V when they are put in series, but I don't know what goes on amp-hour wise.

Does the new amp-hour rating take the amp hour of the low amp hour rating, does it take the 10 amp hours or is it like an average?


texts: Explaining "ground" and grounding as simple as possible

texts:
I am a student of electronics, I am also new to it but I am interested in the whole world of electronics. I've managed to get a hang of everything for now without much of a problem. But there is one thing, ground. They never truly explained to us what ground is except a discharge of electricity in real ground. I would like to ask the community to help me out as simple as you can so I can intuitively know what ground is and how it works exactly. Thank you on your time guys!
P.S. I got this problem when learning about a breadboard online and didn't acctualy understanded how do you ground something on a breadboard.


texts: Malfunctioning atmega32u4 split keyboard -- help diagnose

texts:
I purchased this split keyboard kit called a gergo and assembled it myself. The board properly registered via usb so I flashed it with qmk which has very good support for atmega32u4 and several existing layouts for the gergo.

issue

I have an issue where intermittently (every 5-30 mins), random key input gets sent from the board, BUT only while I'm typing. It doesn't happen if the board is just sitting plugged in. It appears to be only the LEFT half of the board, and a handful of keys. Usually disconnecting the left half TRRS cable and reconnecting it resolves the issue. I beleive this is an issue with my solder job on the board or a messed up component but I don't have a lot of experience with electronics to know where to start.

board components

The board is 2 halves, each half has 25 diodes (one for each mech switch), the right side has the atmega32u4, the left has an MCP23018 IO expander. The right also has a few capacitors, resistors, and an oscillator.

attempts to fix

I put extra flux and re-soldered the IO expander and atmega chip, but this did not fix the issue. On the software side, I've tried 3 versions of avr-gcc, many different layouts, versions of qmk, etc. That plus the fact the error comes from the left-hand only lead me to believe it's a hardware issue. I've tried different cables (trrs and mini usb).

I have several pictures of the board at various states of build if that helps. Any tips on where to look would be appreciated. I should note that the seller of this keyboard has decided not to respond to any of my emails.

pictures


texts: Why would the VCC/GND pins of an ATtiny26 not be aligned?

texts:
In the following pinout diagram for an ATtiny26 microcontroller, a 20-pin IC:

The VCC/AVCC and GND pins aren't aligned. Surely it would be easier for PCB design to connect these by going straight across rather than having to cross (requiring vias, a second layer, or complex routing).

Why would these pins be switched as so?


texts:
I have some questions regarding Transient Voltage Suppressors (TVS).

The specific datasheet I'm referring to is this, from 1SMB22AT3G.

Here is some of its specs:

\$V = 22V\$
\$V_c = 35.5V\$
\$I_{pp} = 16.9A\$
\$tp = 10us\$ (protection pulse width)
\$P_p = 5kW\$ (power rating)

My questions are:

How do I calculate its Junction Temperature at \$T_a = 55°C\$?
If the datasheet says the device can dissipate 5kW @10us pulse width, how is it that its \$R_{JA}\$ is 226°C/W?


texts: flyback converter closed loop by using TL431

texts:
I have some things I can't understand when I use a TL431 to compensate for the flyback converter.
This picture is from RICHTEK Feedback Control Design of Off-line Flyback Converter.
According to this figure, assuming the output voltage is 12V, when the Vo>12, which mean the voltage across the Rb is above 2.5V, the current through the TL431 becomes small, and the Vcomp voltage becomes large. This is what I understand so far.
My questions:

How to design the Rc3 value in the worst case, the TL431 has a minimum current around 1mA~100mA, what is the worst case in the flyback?
How do I know the TL431 output voltage?
How can the TL431 do the negative feedback?


texts: Is a loginway PIC-01 development board enough to program a PIC?

texts:
I have a loginway PIC-01 Development board (it was sat in a cupboard for years).

Does this board require additional adaptor hardware to blow a PIC (ICSP stuff etc), or can the on board serial port be used to do that?


texts: What do these numbers on a package drawing mean?

texts:
I saw this on a package drawing in a BC847 datasheet:

What do the numbers mean? They look like a date, but the SOT883 package is much more recent than 2003. (By the way, the numbers on the drawings for the other packages are "04-11-04", also palindromic. Coincidence?)


texts: Mobile phone battery charge: parallel load circuit to main one?

texts:
In lots of internet web pages it is possible to read statements as this one:

  The less your phone is trying do while it's charging, the more
  quickly it will recharge. Airplane mode blocks any wireless radios on
  your device, reducing your phone's capabilities and therefore stopping
  it from doing so much.

However, from a point of view of electronics, it is intuitive imagine that when mobile is on and charging, both process draws current from charger "in parallel": from the point of view of the external power source, the load is smaller when on AND charging, it keeps its predefined voltage and provides more current.

It is true that internal battery loaders are nowadays very intelligent and can have dynamic adjustments. However, except if the manufacturer wants to reduce maximum power of the external charger, I do not see any technical reason that supports the hypotheses that load battery is faster when mobile is off or in low consumption modes.

Thus, my question is: which is the origin, from a circuit design point of view, of statements like the one said?


texts: Why does my LED not blow out when overpowered by my Arduino?

texts:
I have a standard 5mm RGB LED that I have connected to the digital pwm pins of my Arduino Nano and I am using a potentiometer at one of the analog inputs to change the hue of the LED. My code isn't adjusted for the LED's voltage so it uses the full range of the duty cycle. The digital pins supply 5V, so with a full duty cycle, that means at some spots on the potentiometer, I am sending a continuous 5V to some pin of the LED. However, all three channels seem to be working perfectly fine after testing it.

I previously tried sending 3.3V through all three channels of the same type of LED from the 3.3V pin without adding any resistors and blew out the red channel since it has the lowest threshold voltage (1.8) whereas the green and blue channel were okay because their threshold voltage was very close to the 3.3V. So why does my Arduino not break my LED when connected to 5V with a full duty cycle, but the 3.3V power supply breaks it?


texts: How to identify which transistor is in active region and which one is in saturation?

texts:
In the following amplifier circuit, voltage gain is required. Capacitors act as open circuit for DC analysis but short circuit for AC analysis (consider capacitor value to be very big).

Now MOSFET have 2 different equations for drain current, one for ohmic region one for saturation. How can one determine which equation to use here and for which transistor i.e. which one of the transistor is saturated and which one is not. (Early voltage Va = 50 Volts)
Here is the problem I'm facing if I consider both transistors in saturation :
Due to symmetry in gate circuit

\$ V_{G} = 0 V\$

Now as for pMOS

\$I_D = \frac{k_p}2 (V_{GS}-V_T )^2\$

\$    = \frac{1}2  (-4 + 2 )^2 = 2 mA\$

Therefore voltage at the source of nMOS will be

VS = -4 + (1k-ohm x 2mA) = -2 Volts

So for nMOS VGS = VG - VS = 0 - (-2) = +2 V (= VT)

So overdrive voltage for nMOS is zero. This means no current should flow through it. But 2 mA drain current is from pMOS. That's why I'm confused weather both transistors are in saturation or one of them is in ohmic region?


texts:
I am looking at a filter design in the ARRL handbook for radio communications. It is a bandpass filter designed to pass 144Mhz with a bandwidth of around 12Mhz.

The solid line represents a shield to prevent "stray coupling". \$ C_{c} \$ is a capacitor that "top couples" the two sections of the circuit. The posts labeled "C" are trimmer capacitors designed to tune the resonance of each coil. They connect the top ends of the inductors to ground.

I'm planning on implementing this for a receiver I am building.

What is "top coupling"? I'm confused, because the book says that the two sections are inductively coupled, but yet they are shielded and the diagram suggests that they are capacitively coupled.

Practical question: To shield the two circuit segments, should I use aluminum foil, or something else?


texts: Battery charging: Absorption Charge Stage

texts:
I need some help in understanding basic battery charging.
I read about the three common stages:
Bulk Charging, Absorption Stage and Float Stage, but I can't understand exactly what the controller does in the first two.

Let me explain my problem:

Bulk Charging:

  During the Bulk phase of the charge cycle, the voltage gradually rises
  to the Bulk level (usually 14.4v volts) while the batteries draw
  maximum current. When Bulk level voltage is reached the absorption
  stage begins"

Does it mean that the controller voltage is gradually rising so it always will be above battery voltage, while the battery voltage is rising due to the current from difference on voltage (controller-battery)?
Can the current to the battery can be calculated by Ohm's law: (Vcontroller-Vbattery)/Battery Resistance?

Absorption :

  "During this phase the voltage is maintained at Bulk voltage level
  for a specified time (usually an hour) while the current gradually
  tapers off as the batteries charge up"

The controller voltage is constant, or the battery voltage is kept constant? If it is the battery voltage, how can you keep constant voltage of a battery, if flow of current is into the battery, that means increasing voltage...
Why does the current decrease with time if the Battery Voltage is being set constant? Does the resistance of the battery increase when it's more charged?

Sorry for the damn questions, but I have some holes in my education...
Thanks in advance.


texts: AC signal analysis: Voltage dip (amplitude dip) at time = 0

texts:
I'm working on a series RLC problem where the input voltage is a sinusoidal function for all time. The catch is, for t < 0, the sinusoidal function is of greater magnitude than t >= 0. There is no phase or frequency change.

I am okay at working DC analysis for t < 0 and then AC, but I have no idea how to do this problem.

My guess is to do phasor/fourier analysis for t < 0, and once t = 0 I could use laplace domain now that there are "initial conditions" on the inductor and capacitor, then use those voltage drops to find my final equation for the voltage across the capacitor. I don't want anybody to do my homework for me, but pushing me in the right direction would be fantastic. Thank you.


texts: Change diodes in a NAD C326BEE audio amplifier

texts:
After reading this question, I have additional questions:
I have a NAD CEE326BEE amplifier which is +10 year old. Since 1 week, when I try to switch it on, there is a click and nothing else happens.
According to what I've found in different sources, this might be related to the protection circuit which is switching it off at startup.
I've inspected the board visually and I have found 3 diodes which were not soldered properly, it looks like they are producing heat which has damaged theirs soldering points:

According to the electronic shema these are the following:

The diodes described in the NAD C326BEE Service Manual are the following:

Diode 1N4007 DO-41 1A/1000V (RoHS) D136
DIODE ZENER 5.1V 3W 5% DO-41 1N5918B (RoHS) D134 / D135

I'm not able to find replacement components which the exact same specifications.
Questions:

What would be a good replacements (I've read that higher wattage Zeners could be a good fit?)
What could be improved to prevent future overheating?


texts: Lithium Ion Battery and Warm Circuit Board

texts:
I’m curious if I have a legitimate concern or if I’m just being overly paranoid.

I have a rechargeable Lithium-Polymer battery (prismatic shaped) rated for a max charging temperature of 45 °C.

The battery rests against a circuit board that I know can generate some heat when charging the battery (500 mA current via an MCP73831 IC). It can get up to around 49 °C in a single location on the board (say about 1/4”x1/4” in size) and a dissipated temperature around that (I even measured 63 °C once on the hot spot but haven’t been able to reproduce it). That is for the back of the board where the battery rests (the front side can get up to 80 °C at the charger IC).

Is there any legitimate concern that this will heat the battery during charging? There is nothing between the LiPo and the board. Using a thermal camera, it doesn’t seem like any heat really transfers well to the battery, so it seems like it should be okay, but I’m no expert in heat transfer, especially if it remained in the described state/position for a few hours. The battery and board would sit inside a plastic enclosure.


texts: Design a 32x4 memory chip using 32x8 memory chip

texts:
I know how to design memory chips from memory chips with smaller word,but can we design a memory chip using memory chips with larger words?
Our teacher told us that we can't design a 32x4 memory using 8x8 memory because the word with 8 bits is written as a whole and we can't write a 4 bit word , but than he said that a 32x4 memory can be designed from a 32x8 memory but in that case we have  unused memory. I'm confused.


texts: Need to switch GPIO2 from high (3.3v) to low (GND) when I get 12 VDC on other circut

texts:
I am trying to build a project (almost done !!!) I just need to be able to gnd GPI02 when I get 12VDC on other circut. I don't know if I need a opticoupler or what I need. I'm NOT trying to close the 12 VDC circut with the ESP8266, I'm trying make GPIO2 go low when 12vdc is applied on the other side of the circut.

WWould it be better to use a solidstate relay or reed switch?

Anyone have a suggestion? Thanks in advance for the help.


texts: Pin Extractor to remove female pins from 0.1" crimp connector housings

texts: I have a lot of jumper wires with pre-crimped female terminals 0.1" (2.54mm) single-pin housings. I need accurately pull out a wire with precrimped female terminations from crimp connector housing (I need only pre-crimped wire, housing not needed). I used just pliers to crack the housing, but this often breaks the crimp terminals too. I know there is small dedicated "extractor" tool for that, can anyone advice a proper one?


texts: Designing a compensator - Control system - Missing value

texts:
I would like to determine the transfer function of the following circuit made of TL431. According to the different AN that I have read (and about this subject I really really thank Christophe BASSO, its work is so nice to read and the whole power electronic field become so simple to learn), the current mode controller should contain a pull resistor at the input of the compensation pin. I drawn the pull up resistor on the following schematic. Nevertheless for determining the transfer function, I need to know its value... Does anyone know how to determine its value ?

Here is the datasheet :
http://www.farnell.com/datasheets/1782047.pdf
Have a nice day !


texts: A 4(5)-band resistor with an extra black band

texts:
I need to replace a burned resistor in an electric kettle, but I'm not sure I identified it correctly. The bands are: Red - Grey - Grey - Gold - Black. My preliminary guess 28.8 Ohms no tolerance.

According to one of the answers in this post, a black band indicates non-inductive wire-wound resistor, supposedly its value calculates as a 4-band one. In this (1) case, we have 28 x 1e+08 = 2.8G Ohms 5%.

According to one of the answers in the next post, a black band could be the leading zero(although according to what I've read it never starts with a black marking, but it seems the latter post disproves that, eh?), making it a 5-band resistor. This (2) case doesn't seem to make much sense as the 2nd band is gold. In all unlikely hood, assuming I'm wrong, it's actually a brown, then we have 018 x 1e+08 = 180M Ohms 2%.

According to one of the answers in that post,

  Sometimes a black band, centered over the end cap, is added to make it more obvious which is the right-hand end.

In this (3) case, we calculate it as a 4-band resistor, starting from a red band, and we have the same answer as in (1) case.

I calculated it on the premise it's a 5-band resistor, starting from a red band, assuming a black band implies no tolerance, as it was said here: 288 x 1e-01 = 28.8 Ohms w/o tolerance.

My main question:
What's the value of the resistor?

My follow-up question:
Can a resistor have no tolerance?

My off-topic question:
I didn't want to do the research before posting a question, because it's pain in the ***, and now it is only reinforced. There's so much contradictory information, and it only made me more confused. Why do you guys encourage to conduct a research before posting, if the information is so unstructured and complex so that in each case we have different answer? Thank you.

P.S. Although it's burned, and because of the quality of the image, it may seem like the black band is burned gray one, but it is confirmed it's black. I made another picture, but because of the size, I couldn't upload it.

The place it was connected to is on the left side of the circuit, nearby the marking "R1":

Here's a resistor that was used to replace the original. It failed, and got burned too. I believe its value is 47Ω 5% tolerance

The kettle info: polaris PWK 1783CAD


texts:
I am facing annoying troubles converting 24V AC to 12 V DC. The goal is to supply 1.2A current to 12V DC load. I am both limited in input power (I can only use 24V AC output of a transformer that can supply up to 15W), size and possibilities of heat dissipation (the circuit will be placed within a sealed box with almost no air circulation). I've got some help in building the converter (See picture), but the problem is that it is way too demanding on transformer power input. I've added Proteus simulation screenshot, you can clearly see the power that is taken from the transformer (V1 on the screenshot). Any suggestions on how to make it more efficient or is there any other way for me to reach my goal?
Thank you.


texts:
I want to implement FPGA module which can communicate using PCIe. I am using Stratix IV GX which has PCIe Hard IP in it. How I can use this Hard IP module to communicate.

To develop my module I should understand interface details of hard IP (mainly input and outputs), which I am not finding online. Can someone help me with the same?


texts:
I'm getting the following error on all of my GND vias. Internal Plane 1 is my GND plane:

  Starved Thermal on Internal Plane 1: Via (11.002mm,23.798mm) Top Layer to Bottom Layer. Blocked 3 out of 4 entries.

According to this techdoc: https://techdocs.altium.com/display/ADOH/Internal+Power+and+Split+Planes

the error is due to isolated GND plane sections or not enough copper around the via to allow thermal relief. That or the vias don't go through the GND plane. However, the error appears only if the via hole size is between 0.47 mm and 0.51 mm. Anything smaller/larger that that doesn't generate the error. Although it gives me a workaround, I'd like to keep my via hole size to 0.5 mm.

I haven't separated my GND plane and all I have running through the plane are several vias and through hole pads. I also verified that the vias go through all of the layers and not just some of them so they should definitely reach the GND plane.

UPDATE:
If I change the connect style rule from Relief Connect to Direct Connect, the errors don't appear - see the screenshot.


texts: Battery-less Self-charging Graphics Tablet Pens - EMI

texts:
This is a hardware related question. A lot of the new graphics tablets have self-charging, battery-less pens. I assume the charging is inductive, either off the screen surface or from an antenna within the tablet.
Can anyone please tell me more precisely how this works, at what approximate frequency, and if it represents a source of possible interference to other electronic devices in close proximity?


texts: Conditioning a voltage using constant current for an ADC range

texts:
I wish to make a set of temperature measurements inside a relatively inaccessible box.

The measurements can be made using Pt100 sensors - platinum Resistance Temperature Detectors (RTD) with a resistance of \$100\Omega\$ at \$0^{\circ}C\$. The change in resistance over \$80^{\circ}C\$ is around \$30\Omega\$.

I want to digitize this result within the box. I'm currently looking at microcontrollers like this STM32F373 model, which includes (several) 16-bit ADC.

To minimise the self-heating on the RTD, I want to minimise the current used. To make an accurate measurement, I would seem to need a constant current source. Wikipedia suggests several arrangements, at least one of which is given as an answer to this question - Zener Diode Current Source.

How can I go about arranging a known constant current, with only a constant voltage source?

Should I build a circuit similar to the 'Zener Diode' question, separate from any circuitry near the microcontroller, and then just pass the sense leads to the analogue input?

Is there a simple trick to precondition the voltages to lie within a good range for the ADC? Seemingly a combination of gain to scale the range to fit \$V_{DD} = \frac{30\Omega}{I_{const}}\$ along with a constant offset from another circuit would be appropriate - but perhaps this is just because I'm stunningly ignorant.


texts: Can the terminal voltage of a lead acid battery be reversed?

texts:
I recently acquired a used riding mower. I figured it was dead, so hooked it up to a trickle charge overnight. Next morning, still totally dead.

I stuck my voltmeter on it, and measured -11.8V. Check the leads on the meter, and checked the meter against a AAA alkaline. No, the meter is working fine...the battery has a negative voltage.

To confuse matters somewhat, this battery has a red sticker next to the "-" molded into the plastic case. I'm not sure what to make of that.

So the question is this: is it possible through some mechanism to reverse the voltage polarity on a lead acid battery? Or, is this a case of cheap Chinese manufacturing?


texts: What is the best way to get the phase between noisy signals

texts: I have a few sinusoidal signals at approximately the same frequency. I would like to know the phase difference between the three signals. What is the best way to do this? It would also be helpful to attach an uncertainty to these phase measurements. I've attached a picture of the signals


texts: Need advice on power supply for a device in India purchased from USA

texts:
I bought an Epson Powerlite HC 2040 projector from Amazon US site. I am going to use it in India.

However, the power cable that comes with it has a tag stating (10A 125V). Since I am an ordinary user I am not sure what that means and exactly what I need in order to use the device in India.

I assume I will need a power adaptor for the plug but please advise if I will also need a power convertor (step up/step down)? On epson product sheet they say the device supports 240v. But I am little concerned and want to rule out the possibility of any damage to the device.

Here is the product data sheet : http://www.projectorcentral.com/pdf/projector_spec_8947.pdf

Thank you for all the help good people on this site may offer.

EDIT Nov 9:
Thank you for all the helpful answers.

EDIT Nov 10 [Final]:
Thank you again for the help. I followed the suggestion offered here, but instead of ditching the epson power cable, I simply used a wall plug adaptor for the cable (insanely cheap). The device is operational without problem. Apologies if this post does not belong here, but to me, the answer here is worth $1000 that I invested in the imported device. I truly appreciate your time and kind help.


texts: Display digits on 7 segment 3 digit LED display with Launchpad

texts:
I have a 7 segment led display with 3 digits (BT-M512RD-DR1
) and Valueline Launchpad MSP-EXP430G2

I connected LED display according to this answer and here is my version of the sketch

But I am not sure how to control LED display correctly what data I need to send in order to display particular number or activate specific LED.

Please can someone explain me what is wrong or point me in correct direction?

UPDATE #1:
LED doesn't blink and it is static while sketch is running.


texts: Weird behavior when simulating decoder using modelsim

texts:
In my introductory Digital System design course. We were asked to simulate a 4 to 16 decoder using VHDL and modelSim.Everything compiled correctly. However, when I try to test bench my program, I get a weird error that even my instructor couldn't pinpoint the problem.

--Code for 4 to 16 decoder

    library ieee;
use ieee.std_logic_1164.all;
entity decoder4to16 is
port
    (
     X: in STD_LOGIC_VECTOR(3 downto 0);
     EN: in STD_LOGIC;
     Y: out STD_LOGIC_VECTOR (0 TO 15));

     end decoder4to16;

architecture decoder4to16_arch of decoder4to16 is
signal Y_t: STD_LOGIC_VECTOR (0 TO 15);
begin
process(X,EN)
begin
case X is
when "0000" => Y_t<="0111111111111111";
when "0001" => Y_t<="1011111111111111";
when "0010" => Y_t<="1101111111111111";
when "0011" => Y_t<="1110111111111111";
when "0100" => Y_t<="1111011111111111";
when "0101" => Y_t<="1111101111111111";
when "0110" => Y_t<="1111110111111111";
when "0111" => Y_t<="1111111011111111";
when "1000" => Y_t<="1111111101111111";
when "1001" => Y_t<="1111111110111111";
when "1010" => Y_t<="1111111111011111";
when "1011" => Y_t<="1111111111101111";
when "1100" => Y_t<="1111111111110111";
when "1101" => Y_t<="1111111111111011";
when "1110" => Y_t<="1111111111111101";
when "1111" => Y_t<="1111111111111110";
when others => Y_t<="1111111111111111";
end case;
if(EN)='0' then Y<=Y_t;
else Y<="1111111111111111";
end if;
end process;
end decoder4to16_arch;

-- and here is the code for my test bench

library ieee;
use ieee.std_logic_1164.all;
entity decoder4to16_tb is
end decoder4to16_tb;
architecture  decoder4to16_tb of decoder4to16_tb is
component decoder4to16
port
    (
     X: in STD_LOGIC_VECTOR(3 downto 0);
     EN: in STD_LOGIC;
     Y: out STD_LOGIC_VECTOR (0 TO 15));

     end component;
signal X: STD_LOGIC_VECTOR (3 downto 0):="0000";
signal E: STD_LOGIC:='0';
signal Y: STD_LOGIC_VECTOR (0 TO 15);
begin
U0: decoder4to16 port map (X,E,Y);
process
begin
E<='1'; X<="0000"; wait for 100 ns;
E<='0'; X<="0000"; wait for 100 ns;
X<="0001"; wait for 100 ns;
X<="0010"; wait for 100 ns;
X<="0011"; wait for 100 ns;
wait;
end process;

end decoder4to16_tb;

Now the weird part, when I try to simulate the test bencha and display the waveforms, it's like there is a delay for inputs "0001" and above.

it's like there is some delay of some sort

To make sure that this "delay" is there

Thank you.


texts: Two Crystals & Two PIC18F Microcontrollers on same PCB

texts:
I am planning to have two PIC18F microcontrollers with 20 MHz crystal and 22pF capacitors on the same board. So, there will be two PIC18F microcontrollers, two 20 MHz crystals (one for each PIC18F) and 22 pF capacitors (two for each PIC18F) on the same board. Both the microcontrollers will be placed relatively close to each other. There will also be RF wireless communication module with PCB trace antenna on the board.

Can I have this kind of setup on the same board?
Would two 20 MHz crystals on the same board cause any interference to each other? Any problem of interference in clocking of each PIC18F?
Would this create any problem in EMC testing?
Is there anything that I should consider in this kind of setup and layout?


texts: What is the parameter 'k' in multiple feedback filter design?

texts: In this tutorial from Analog devices, what is 'k'?  The unit seems to be 1/ohm. Is it some arbitrary number to help with finding the R and C values?


texts:
I understand questions regarding IC identification may be a hit or miss, but it's worth a shot.

I have this IC (length 3mm by width 2.2mm) with a grey square marking on the corner. It has 8 pins. Assuming that the grey marking indicates pin one, we have pin one going to a capacitor and then ground. Pin 2 and 3 are grounded. Pin four seems to be the input, an op amp output. Pin five is no contact, as well as pin eight. (I believe) Pin is similar to pin one, going to ground. And pin 7 goes to a hex schmitt trigger. The marking says "SCC."

If any of you have any idea what this would be, or where I could possibly look (I've searched all IC databases that I could find), that would be great.

Picture of IC:

Thanks


texts: Sending commands to semihosting in VSCode + cortex-debug

texts:
I'm trying to move away from doing my firmware development in Eclipse GNU MCU for several reasons, mostly related to project maintainability (much easier to integrate CMake such that there is only one build system), and also for better Intellisense etc.
I seem to have most of everything working, except I can't seem to find any way to send commands via semihosting. Basically I have a command line interface to the embedded system via semihosting, where I can do things like command IOs on/off etc etc, which is a big help in debugging.
Now that I've got my basic configuration set up, what happens when I start my debug session is that the code compiles, is flashed (via OpenOCD with STLink), and the debug session starts, halted at the entry point. When I then continue, I see the semihosting output in the "Output/Adapter Output", which holds the  as expected OpenOCD console. However, if I try to write text to enter a command (which is how it works under Eclipse), I get "Cannot edit in read-only editor".
I've attached a screen cap to show what I mean, the last three lines are output from my console running in the embedded device:

If I run OpenOCD and arm-none-eabi-gdb separately in terminal, I can write to the OpenOCD console, so it seems that the Cortex-Debug extension needlessly makes the window read-only under VSCode.
Is there any way to use bidirectional semihosting in VSCode? Even a workaround, such as connecting to OpenOCD via telnet (or rather nc) will do (I've tried, but writing commands there also don't seem to go to the semihosting pipe), if this can't be done directly in VSCode. Or sending text to semihosting via the GDB console, which does allow writing. However, running gdb and OpenOCD completely  separately is not a solution, since then I don't get any of the other debugging features in VSCode.
I'm on OS X Mojave and VSCode, Cortex-Debug and OpenOCD are the newest versions at the time of writing.
Please let me know if this not the right SE, I suppose this could go to Stack Overflow or even SuperUser, but I though this is the right place since the question is very embedded-systems specific.


texts:
I have a custom high power PCB I recently designed and am currently testing. It is designed to use 2 linear actuators link. I am using a VNH6019A H-bridge to control them. They operate simply as -12v goes up, 12v goes down (wrt each terminal).

My schematic for the bridge is:

I am using the suggested capacitor size for the driver:

"Note:
The value of the blocking capacitor (C) depends on the application conditions and defines voltage and current ripple onto supply line at PWM
operation. Stored energy of the motor inductance may flyback into the blocking capacitor, if the bridge driver goes into 3-state. This causes a
hazardous overvoltage if the capacitor is not big enough. As basic orientation, 500 μF per 10 A load current is recommended."

I am using one 12V power supply, which is used for the main power to the actuators, as well as using an "all in one" switching 5v regulated power supply for my logic level components.

I am using an intelligent LCD display by 4DSystems to control the board, so it has internal decoupling and is powered from the 5v line.

Power regulator schematic:

LCD connector schematic:

Since my actuators can draw a maximum of 10A, I am using a 500uF electrolytic capacitor.

When I hook up one (or two) actuators, they work fine with no noticeable issues. However, if I use one (same issue with two) actuators, and hook up a scope to the 5v output of my regulator when the actuator stops moving, I get a nasty voltage spike on the 5v line up to 16v.

I have sufficient decoupling, as there is a small (<20mA) sag when the actuators turn on. Since it is when the actuators stop, it must(?) be flyback from the inductive load.

My questions:

Why is this occurring when I am using significantly higher flyback caps than required (my single actuator with no load draws only ~800mA).
Since there is such a large spike, why is my LCD or anything else powered by the 5v line getting damaged?
What is the solution?

Thanks

EDIT: I assume the easiest is just to throw a flyback diode across the actuator terminals. Assuming that works, I would still like to know number 1 and 2

EDIT2: Nevermind, I can't do that from an h-bridge, since the polarity switches. Back to square one.


texts: I am trying to interface an HD44780 LCD with an STM32F3 MCU. I'm using examples from the website http://controlsoft.mandela.ac.za/STM32F3-Discovery-Board/Example-programs/HD44780-LCD-(16x2-LCD) it seems it doesn't work. After the initialization I try to print "Hello World" and I get white upper line. Have you ever dealt with this driver or you got better ones? I would rather avoid usage an I2C adapter.


texts:
I'm trying to understand how to set atmega328p clock directly with registers. I'm using atmega328p MCU, Atmel Studio IDE and mikroe programmer for flashing code. From my understanding of datasheet MCU clock depends on the on board crystal (if exist) and selected fuse bits in avrflash program (little program for code flashing). Basically I need to choose right crystal for MCU and then select appropriate option when want to flash code which suit crystal value. For example if I have 16MHz crystal on MCU I use next config:

This works for me. My questions are next:

If I have 1MHz crystal I will use XTAL 0.9 - 3.0 MHz, Slow startup. Is that right?
We don't have registers for configuration clock, in this small program we choose MCU clock? I saw in datasheet that procedure for clock is described but I didn't saw registers which need to change.
F_CPU is used only for delay in Atmel Studio HAL lib?


texts:
Sometimes I see references to "R" resistors. For example:

Obviously the 100 refers to 100 Ohms. What does 100R mean?


texts:
What is dynamic hysteresis in Op-Amp?
I read section 4.3 of the this App Note and was not clear.
Can someone explain me why this is happening?


texts:
I am building a fixture out of LEDs (COBs to be exact) and I'd like to use a 4 prong twistlock AC power plug for a DC connection.

I know this is not recommended but hear me out.

My drivers for the LED'S and the fan are mounted remotely (about 10 feet from the array) and the series of LED'S runs at 300v x 500mA DC.  I'd like to be able to run the power cord from the driver to the array and then use a heavy-duty connector rated for 300v in a junction box on top of the array.  Every "quick connect" dc connector I've seen either looks flimsy or isn't rated for 300v.  The appeal of the 4 prong twistlock (to this relative novice) is that it's really sturdy and can house both the LED power and fan power in the same cord/connection.

Right now I'm using wagos in a small junction box on top of the array but it would be nice to be able to unplug and move the thing without having to open up the JB and snap off the connectors.

So, am I going to burn my house down?  Are there beefy DC connectors  (like a twistlock) that I'm just missing?  Is using 2 of the wires in the cord to connect to a 12v fan, and the other two to connect to a 300v string of LEDS a terrible idea?

Thanks for reading this, I really appreciate any guidance!


texts:
I'm writing a VHDL code for an integer to float converter using variables. I have simulated it and the results match expectations. However, when looking to compile and synthesize using Precision RTL from Mentor Graphics, I'm encountering the following error:

  The slice width in the variable part select expression is non-static. If this a genuine case then use simpler expressions instead.

This error refers to the below line of code:

sig_float_out(WIDTH*2-5 downto 0) <= int_input(first_one_at downto 0) & int_input(WIDTH-1 downto first_one_at+1);

It seems to me that my expression is locally static and should have no problem synthesizing since I am only looking to swap content around a predetermined variable.

If this is not the case some clarifications and modification options would be appreciated.

The complete code for reference:

library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;

entity lab4 is
    port(
        int_input    : in  std_logic_vector(3 downto 0);
        float_output : out std_logic_vector(7 downto 0);
        underflow    : out std_logic
    );
end lab4;

architecture int_to_float of lab4 is
    constant WIDTH   : integer := 4;
    signal sig_float_out : std_logic_vector(WIDTH*2 - 1 downto 0);
    signal check  : integer;
begin
    process(int_input)
        variable first_one_at  : integer;
        variable bool_flag   : boolean;
        variable input_2comp : std_logic_vector(WIDTH - 1 downto 0);

begin
    first_one_at := 0;
    bool_flag  := false;
    underflow <= '1';

    if (int_input = "0000") then
        sig_float_out <= (others => '0');
        underflow    <= '0';
    elsif (int_input(WIDTH - 1) = '0') then
        for i in WIDTH - 1 downto 0 loop
            if (int_input(i) = '1') then
                if (bool_flag = false) then
                     first_one_at := i;
                      bool_flag := true;
                end if;
            end if;
        end loop;

        sig_float_out(WIDTH*2-1) <= int_input(WIDTH -1);
        sig_float_out(WIDTH*2-2 downto WIDTH*2-4) <= std_logic_vector(to_unsigned(first_one_at + 1 + 3, 3));
        sig_float_out(WIDTH*2-5 downto 0) <= int_input(first_one_at downto 0) & int_input(WIDTH-1 downto first_one_at+1);

    else
        input_2comp := std_logic_vector(unsigned(not(int_input))+1);
        for i in WIDTH - 1 downto 0 loop
            if (input_2comp(i) = '1') then
                if (bool_flag = false) then
                            first_one_at := i;
                            bool_flag := true;
                end if;
            end if;
        end loop;
        sig_float_out(WIDTH*2-1) <= int_input(WIDTH -1);
        sig_float_out(WIDTH*2-2 downto WIDTH*2-4) <= std_logic_vector(to_unsigned(first_one_at + 1 + 3, 3));
        sig_float_out(WIDTH*2-5 downto 0) <= input_2comp(first_one_at downto 0) & input_2comp(WIDTH-1 downto first_one_at+1);
    end if;

        check<=first_one_at;
end process;
float_output <= sig_float_out;

end int_to_float;


texts: I'm trying to make a bipolar H-Bridge motor driver. But instead of the mentioned diode(1N4001), I've got a 1N4007 diode. Can I use that instead?


texts:
I was reading an article on how to this guy was generating a sine wave digitally. He had a DAC made out of resistors. What I'm unsure about is what type of dac it is? To me it doesn't look like an r-2r dac.

I've noticed the resistors R20-R22 are the mirrior image of R23-R25, am assuming there is a particular reason for this?


texts: How to repair vintage compute flexi cable?

texts: I have a flexi cable that has had some of the copper removed through wear and tear. What is the easiest way for an amateur to fix this. I though of a conductive pen but is that too thick?


texts:
I am working on a battery powered project. With a multimeter I've been measuring current on the "positive" side of a module and observe 5μA.

However I thought to measure the "negative" side and was surprised to observe a value of 4.6mA, which is a wildly larger value from 5μA.

In terms of calculating battery life, how do I consider -4.6mA versus +5μA? Am I measuring what I think I am measuring, that being current consumption?

I've read over Q/A's such as How to calculate battery life and How do I calculate battery life for my devices? but these don't provide an answer.  I'm totally new to all things electrical. I've searched for answers to this question but I know so very little likely I don't know the correct search terms.

Edit:

@AliChen's first comment prompted me to disconnect the TX/RX lines and having done so, the current measurements are congruent.  Exactly determining the why, of course, is another matter for me to pursue.


texts: adjust clock frequency using Timing Error Avoidance Technique

texts:
I am following the next example as is depicted on the diagram, in order to adjust the clock frequency of a multiplier to its maximum.

The System works as follows:
The flip-flop at the input to the tracking logic is wired as a toggle flip-flop, is clocked by the system clock, and changes from 0-to-1 and 1-to-0 on alternate cycles.

As previously discussed, the output of the tracking logic then goes through the safety margin delay. Next, the exclusive-OR gate is used to normalize the test signal for the timing checker flip-flip at the end of the chain; the final version of the test signal,
D 1, will always change from a1 to a 0 at th e end of the cycle. The timing checker
flip-flop also operates with the system clock.

The timing checker flip-flop output is therefore the command signal for the system clock generator: up/down (increase or decrease clock frequency). This signal controls the counting direction of the up/down counter. The output of the counter is converted to an analog voltage signal by the DAC  This signal sets the clock frequency by controlling
the VCO (Voltage Controlled Oscillator),whose output become the system clock.

The characteristics of the multiplier are :
Maximum delay of multiplier 450ns,
Clock frequency 2.86Mhz,
biased voltage 3.3.V

Am i on right direction to adjust the clock frequency of the multiplier to its maximum?

I am following the above diagram and according with the explanation i am trying to do a timing diagram to show the both cases when the frequency is increase and when it is decrease, my attempt it is the next timing diagram.

Does it make sense or am i wrong?

Thank you in advanced for your help!


texts: Suspected PIC alarm bug with RTCC module in PIC16LF series, cannot set alarm to 00 seconds

texts:
This question is about understanding the functionality of RTCC alarm registers within one PIC family. While I am using 16LF19176, I believe this question relates to all RTCC modules in this family. I also should mention that I am maintaining someone else's code, I did not originally write it.
I am using the RTCC clock and it works properly. I have set up an alarm, giving me an interrupt, properly as expected, every 10 minutes.
The issue comes, when I want to change it to alarm every hour. I am sure it is my problem not understanding the documentation (which is quite short for this by the way).
I am first showing the working code for alarm every 10 minutes:
ALRMMTH = 0x1; // month
ALRMWD = 0x2; // weekday // @todo: why is it 0x02?
ALRMDAY = 0x1; // day
ALRMHR = 0x0; // hours
ALRMMIN = 0x09; // minutes
ALRMSEC = 0x5A; // seconds (it did not work with errata recommended 0x0A)

ALRMCON = 0x40 | (0x04<<2) // repeat indefinitely, alarm every 10 minutes

ALRMCONbits.ALRMEN = 1;

I wanted to change that for an alarm every hour. I assumed that just changing two lines of code would do it, but it doesn't:
ALRMHR = 0x01; // hours
ALRMMIN = 0x00; // minutes

QUESTION 1: what to write into ALRMxx register(s) for an alarm every hour?
QUESTION 2: why is the weekday set to 0x02, or what does that do?
QUESTION 3: can someone clarify, why is it not a conflict of interest setting an alarm numbers versus telling how often the alarm happens in ALRMCON?
Thank you very much for your time!
UPDATE:
I changed the code to @Paul's idea, but still did not wake after 1 hour (I am hoping to wake every whole hour, that is at xx:00:00). I did this code change:
ALRMCONbits.ALRMEN = 0;
ALRMRPT = 0xFF; // In order for alarm be 'sounding' repetitively, not just 255 times, remember to set the CHIME bit to '1' (in ALRMCON below).

ALRMMTH = 0x01; // month (probably this line does in my case nothing)
ALRMWD = 0x02; // weekday (probably this line does in my case nothing)
ALRMDAY = 0x01; // day (probably this line does in my case nothing)
ALRMHR = 0x00; // hours (probably this line does in my case nothing)

ALRMMIN = 0x00; // minutes // was 0x09 originally and woke every x10:00 minutes (10, 20, 30, ...)
ALRMSEC = 0x00; // seconds // I have a feeling I should return here my original 0x5A, which worked for every-10-min alarm

ALRMCON = 0x40 | (0x05<<2);
ALRMCONbits.ALRMEN = 1

UPDATE 2: See my answer, it looks like the Microchip Errata is wrong as well. The seconds alarm register must be set to a weird value of 0x5A in order to get an alarm at :00 seconds


texts: Why is there a resistor in the feedback section of this buffer circuit?

texts:
When I searched for op amp buffer circuits on internet, I found this picture.
I just want to use it as a buffer circuit. So, obviously the gain of this configuration will be 1. I would like to put 0 Ω resistor as Rf in that location.
Is it ok or do I need to connect those two lines without resistor  in the middle. If I put a 0 Ω resistor in that place what will happen? Will there be any instability problem?