texts:
I have a wireless keyboard that I would like to power through a USB cord, I am not a fan of wireless, especially due to the battery use. I would however like to have the possibility of having the voice to use the batteries whenever I please. Now the keyboard is powered by 4AA batteries, judging by how they are positioned I am guessing placed in parallel 2x2. In order to power it I am planning to attach a micro-usb connector, and a voltage regulator to drop the voltage to 3.3V. I looked a bit around on how to create a switch which would disconnect the batteries whenever the USB is attached, and found several posts like this one:
Automatically switching from battery to DC wall adapter on insertion
however I am still confused as to what I should do. I tried simulating a circuit using a p-MOSFET:

simulate this circuit – Schematic created using CircuitLab

While it appears to work when simulating it on http://www.falstad.com/circuit/, there is some back-current towards the battery. Also This seems like a bit too simple compared to other circuits I've seen around. Is this really a solution? I know there are some IC that can do power management, but they are a bit expensive for my taste, if I have to spend 10$ on it then I'd rather just cut off the battery part and go with the cabled solution.
Thank you


texts:
Could someone explain the voltage readings on the following "oscilloscopes" of the simulated schematics below:

(I understand the concept of a voltage divider but it seems something less straightforward is happening here)

To be clear, the top source is 12V DC and the lower one is 6V DC. All resistors have the same value.

The first one is simpler:

The second one adds a slight complication:

Sorry for the large size of the photos. I couldn't figure out how to resize them.


texts: Any issues with using an opamp as a constant current source for temperature sensing?

texts:
I understand that most people use a bridge circuit for RTD and possibly thermistor temperature sensing.  I'm trying not to do that for several reasons.

I'd like to use an opamp in the classic constant current configuration, with the temperature sensing resistor as the load resistor.  I sense the voltage change with an INA.

This seems to work so far, on the bench.  Has anyone else had experiance with this? Are there any gotcha's I should be aware of when I put it in the field?


texts: High-current DC power supply in constant current mode with inductive load

texts:
I need to figure what DC power supply to choose. Requirements are:

after supply turned on I need to have fixed value of current of 10 A. Load in this case will be resistance ~5 mOhm. I.e. I will have small voltage of 0.05V
then inductive load will start creating back EMF. Back EMF magnitude could be in the range 0-30 V. BUT I still need to maintain fixed value of current of 10 A.

ALSO I may need to do the same experiment with current 100 A. Back EMF range will be the same.

I've read about constant current mode. Can anyone tell would my task fit for usually available DC power supplies with constant current mode? Any recommendation for particular models?


texts:
I have a Memory (Register Bank), this bank has 255 registers that each register contains a 16 bit number, type of registers is STD_LOGIC_VECTOR but there is no problem if I should convert them to Integer

I want to show an Histogram Graph in simulation wave window

In fact, I want to show a 2 axis graph with 0..255 as X and the 16 bit number (as Integer) as Y

Is it possible ? how ?

If it is not possible, what is your suggestion to show the Histogram graph ?

thanks ...


texts: High voltage and low voltage sensing via the same pin

texts:
I am trying to put together a high-voltage programmer for AVR, which involves applying 12V to the target's nRESET in an otherwise 5V system. However, I also want to use nRESET for presence sensing from the host through its built-in pullup (which gives about 4.2V through a DMM).

Obviously when the 12V is applied I need to allow it through to the target but clamp it before it reaches the host. I was wondering if the following was a sane way to do so or if I missed sometime crucial:

simulate this circuit – Schematic created using CircuitLab

The actual host and target will be an ATtiny2313V and ATtiny85 respectively, but for purposes of this exercise we can assume that both will be ATmega328Ps.


texts: How can I make a 15 minute egg timer circuit?

texts:
I want to make a 15 minute timer for a game. I would like it to count down 3 x 5 minute segments of time, and then ring a bell when the 15 minutes is up.

To do this, I want to push a button to initiate the timer, which will then light 3 x leds. After each 5 minute segment is up, one of the LEDs should go out. Finally, when 15 mins is up, I want to ring a bell (just once) using a solenoid.

Trouble is - I don't know where to start! My background in more in computer programming - so I understand the logic required to do it, just not how! (I've put circuits together in the past, but always using someone elses schematic - I'm not sure where to start in terms of designing my own.)

I'm not looking for someone to design it for me (though it might help!) but for an idea of where to start figuring out how to do this. Have had a look at some 555 based egg timer circuits, but don't know how you set the time periods on them.

EDIT

Have knocked up a vague schematic - does it look like I'm heading in the right direction? If this does what I think it does it should begin with three LEDs switched on, then with each clock pulse knock an LED off until they're all off - then it should reset.


texts: How to read a (matrix) text file from Matlab and store it in a memory array in verilog?

texts:
I have a text file named "rad.txt". I want to load content of rad.txt into a variable name [31:0]RAM[3:0][3:0] in verilog.
rad.txt contains
0,2,0,1
4,0,1,0
1,0,0,6
1,0,0,0
For example :
i want to store the following
RAM[0][0] = 0;
RAM[0][1] = 2;
RAM[0][2] = 0;
RAM[0][3] = 1;
RAM[1][0] = 4;
RAM[1][1] = 0;
RAM[1][2] = 1;
RAM[1][3] = 0;
RAM[2][0] = 1;
RAM[2][1] = 0;
RAM[2][2] = 0;
RAM[2][3] = 6;
RAM[3][0] = 1;
RAM[3][1] = 0;
RAM[3][2] = 0;
RAM[3][3] = 0;
I used the following code,
but I am not sure if it works correctly or as expected:
module file_read;
  reg [7:0] RAM[4:0][4:0] ;
  initial $readmemh("readd.txt", RAM);
  integer j,i;
  initial begin
    $display("data:");
    for (i=0; i < 4; i=i+1)
      begin
        for (j=0; j < 4; j=j+1)
      begin

        $display("%d:%d:%d",i,j,RAM[i][j]);

      end
      end
  end
endmodule


texts: Designing a non-inverting programmable gain amplifier circuit using the LT6910-1

texts:
I'm trying to design a band pass filter with a programmable gain option to record varying levels of sound as defined from a microcontroller. I used LTspice to design my circuit, and the filter portion of my circuit works as expected.
The signal output is centered at 1.65 V which is what I want.

My problems start when I try to use the LTC6910-1 PGA. Looking at the data sheet, the gain seems to be inverting but I'd just like a simple non-inverting gain which can then be adjusted based on the G0, G1 and G2 pins.  My example circuit looks like this:

where OUT is the filter output, \$V_{\text{p}} = 3.3\text{ V}\$ and \$V_{\text{ref}} = 1.65\text{ V}\$. The output from the PGA looks like this for a gain of 100:

I'd just like something centered across the mid 1.65 V but I'm not sure how to make the circuit non-inverting.
Is this possible with this circuit? If not, has anyone got any other recommendations?


texts: Is it ok to power several op amps with the same pair of 9V cells?

texts:
I'm experimenting for the first time in the wonderful world of operational amplifiers. I'm processing signals in various ways - amplify, envelope detection, voltage differences, voltage-to-current, and so on.

Many of these steps use an op amp. Is it usually acceptable to power several (dual-supply) op amps with the  same pair of 9V cells?


texts: High current on PCB to through hole connector

texts:
If I have a though-hole connector with 3.5mm pin spacing and the manufacture rates it for 14 amps per contact, how am I supposed to safely carry anywhere near that current over the PCB?  Specifically, say 10A?

According to various online calculators, with a 2oz/ft^2 copper thickness, 25c ambient, 10c rise, etc, I need 3.6mm traces, which seems physically impossible.  Also the 25c ambient seems to be rather lower than the device I'm working on would likely be used at (35c ambient seems more likely).  I see elsewhere that the 10c temperature rise is likely to be too conservative, but I don't know what would be acceptable given my higher ambients.

What are the normal tricks that would be expected to get higher current to connectors with pin spacing that aren't wide enough for what typical online calculators recommend?

The connector is rated for 400V and the relay on the other side of the trace is rated for 300V, but I would probably only be doing 24-36V over it.


texts: Why FPGA is being used on VR (Virtual Reality) devices?

texts:
I have seen a number of data sheets of VR devices and many are being powered by FPGAs. Is there any specific reason for this? Why not to use an ASIC or a simple CPU, embedded processor or whatever?

In this article https://www.linkedin.com/pulse/fpga-use-image-processing-applications-virtual-gaming-john-pallazola they fail to elaborate the reason why they are using FPGA for this applications.


texts: Wiring a bunch of micro LED fairy lights to a single power source in parallel

texts:
I want to create a cascade effect using the wire fairy lights, like in this photo .

What would I need to accomplish this? I can find the coils of lights for cheap online that use battery packs, but I'm looking to wire this so it can be plugged into our central lighting hub that is powered by our light control board.

I'm a complete amateur in the electrical realm--I'm very handy and mechanically inclined, I've followed a lot of youtube tutorials on wiring small electrical projects, but only understand the bare basics of electricity.

How do I create a string of LED's and switch them on and off?


texts: Is there a conductive tape product that conducts from top to bottom?

texts:
I have an application where I need to place something conductive, like aluminum foil, to a contact where an object will be sliding onto.  So it needs to be adhesive on one side, yet conduct from the top side to the bottom side.

What product will do this or can be modified to do this?  Both thinness and durability are helpful variables but the requirements do not appear high.


texts: detecting low signal levels with a transistor

texts: This question made me wonder. Say I want to drive a LED when a small level audio signal is present. I understand how to do this with an opamp, but how about a transistor. You'd have to bias it so that it just doesn't conduct without the signal, so that any extra voltage on the base will cause collector current to flow, right? Can anybody please explain how you do that: bias the transistor so that it just doesn't conduct, independent of temperature variations and such? Or is this the wrong approach?


texts: Soldering RG-405 coaxial cable directly to PCB pads meant for U.FL connector

texts:
Is there an ideal method to solder a bare cable to a PCB for microwave (5-6GHz) signals?
The U.FL connectors that are normally used in this application are terrible, and there aren't many (or any) manufacturers making U.FL ends for this kind of cable anyway.
As far as I can tell, we're getting near-ideal data rates with the current methods. I'm a little concerned about reflections at the transition between PCB and cable, because I can't be sure the impedance is correct across the junction. Others have voiced concern about RF "leaking" at the joint - the center conductor is unshielded where it is soldered to the PCB.
I was able to increase the received power on the analyzer by making a minor modification in my soldering technique. I would interpret that as making an overall improvement - more of the power getting radiated, right?
I'm attempting to be sure our production techniques are giving us the best results I can, but after hours of searching I can't find anything much better than this - Can I solder a RG316 coax directly to a PCB instead of using the intended SMA connectors?.
EDIT:
I've added a photo of the current "target" connection. The resist layer has been etched away at the 'neck' to provide greater structural support than bare PCB pads. The coaxial cable diameter is .080", for size reference.


texts: Card edge connector and perfboard for EEPROM cartridges

texts:
I'm working on a game console project, want to be able to load data from interchangeable 32kB serial EEPROM (24LC256) cartridges.  These ICs have an 8-pin footprint, so I need an 8-position edge connector.

And here's the tricky bit: I don't think I'm ready to order custom PCBs, so I'm wondering if there are card-edge proto/perfboards that I could use to make my cartridges by hand?  I'm a beginner, and would appreciate any good advice from pros.


texts: Is it possible to negotiate a USB 3 power level, such as 900 mA, if the device is connected to a USB 3 port, without being a device capable of the higher speeds? I'd like to use this higher level if available for charging.


texts: Calculating the Power of the Upper Sideband

texts:
I solved a question in a book that goes like this:

If the carrier power is 1000 watts, what is the power in the USB at 70.7% modulation?

I solved it using the formula:

$$ P_{USB}=\frac{m^{2} P_{C}}{4} $$

and I get the answer $$ P_{USB} = 176.75 \textrm{Watts} $$

but the answer provided by the book says it is $$ P_{USB} = 125 \textrm{Watts} $$

I want to ask who got it right, me or the book?


texts: What parameters affect battery charge time? For example if we're interested in designing a charger for mobile batteries, what parameters should be considered? What happens if a little higher voltage be derived to battery? Is this effect on decreasing battery charge time?


texts: If I had to select between Individual Three Phase Potential Transformers vs Three Potential Transformers in one case for a 600V system (which doesn't require many inches of spacing between phases to avoid arcing). I know the later saves space and about 15% of money. But, should I worry about mutual inductance, mutual interference? The interference I'm referring to, is measuring in one phase also contributions from the other phases to it, instead of the accurate voltage present in that phase alone. Also there seems to be Three Potential Transformers in one case which share a common core and those which are basically individual PTs glued together. Any difference from interference point of view? Is there any bigger inaccuracy in readings in having open delta PTs vs 3 winding PTs?


texts:
I was under the impression in order to generate 'Even Parity'  you had to have an even number of bits... so how could that logic block only have one output?
I am sure I am wrong but I am not sure what to do..


texts: Preventing audio feedback in an underwater multiway intercom

texts:
I'm trying to transmit data(bytes) from a speaker (out) to microphone (in) via an FM modulated link. Now I have the problem that both will be used simultaneously (full duplex) and next to each other (so I have one transceiver) so the microphone (in) will catch sound generated by the speaker. Now I want to cancel out the received audio so that it is not transmitted back to the sender.

For clarification: The data modulation will be FM (Frequency modulation) and I'm a total noob in this case. The 'Data' will be sent in Bytes not voice recording. I use audio waves because those travel underwater way better than radio waves.

I hope I described my problem enough else here is another clarification:

A module is made up by one speaker and one microphone. Two or more of such modules will communicate with each other via audio waves (underwater).
Problem: The microphone will catch audio waves that are sent by the speaker of the same module. I need to cancel out those.

Bad Shematic:

simulate this circuit – Schematic created using CircuitLab

As I tried to explain Mic1 will record SPKR1 I don't want this and need to filter out what SPKR1 sent.

How can I do this ?

PS: sorry for my bad English.


texts:
Circuit below is an op-amp summer combined with PI controller.

simulate this circuit – Schematic created using CircuitLab

What is transfer function of this circut?
How to calculate each R and C value if I want to build PI with parameter gain = 8, time constant  = 1/15?

Notes:
V_ref = Reference voltage
V_act = Actual voltage
V_err = Amplified error voltage


texts: Not port with test bench vhdl, altera quartus prime

texts:
I wanted to test this simple VHDL model

library ieee;
use ieee.std_logic_1164.all;

entity my_not is
port(x : in std_logic;
     y : out std_logic);
end entity my_not;

architecture rtl of my_not is
begin
   y <= not x;
end architecture rtl;

With such goal in mind, I've written the following test bench.

library ieee;
use ieee.std_logic_1164.all;

entity my_not_tb is
end entity my_not_tb;

architecture rtl of my_not_tb is
   signal clk : std_logic;
    constant period : time := 10 ns;

    component my_not is
     port(x : in std_logic;
          y : out std_logic);
   end component my_not;

    signal x, y : std_logic;

begin

   my_not_inst : my_not
     port map(x => x, y => y);

   clk_proc : process is
    begin
       clk <= '1';
        wait for period/2;
        clk <= '0';
        wait for period/2;
    end process clk_proc;

    not_proc : process(clk) is
     variable n : integer := 0;
    begin
     if(clk'event and clk = '1') then
        if n mod 2 = 0 then
          x <= '1';
        else
           x <= '0';
         end if;
         n := n + 1;
     end if;
    end process not_proc;

end architecture rtl;

But when, after compilation using altera quartus prime, the simulation starts I see the input "x" as undefined, is there something wrong with my test bench?

More Info:

Basically I just set the "my_not" entity as top entity, I compile and synthesize and then I run the RTL simulation, a sample of output of the simulation is shown below:


texts: Stability Criteria of Type 3 Digital PLL

texts:
I suppose we can derive the stability criteria based on poles of open-loop transfer function of F(z) in expression (4.11). However, the pole analysis does not help in deriving the stability criteria at expression (4.23)

Could anyone tell me if I had missed anything ?


texts:
I made a pH sensor box to monitoring my hydroponic culture.

I built a PH sensor box (see Frtitzing) to use for my hydroponics system with:
- Esp8266
- ADS1115
- BNC + pH probe (2X)

Unfortunately the pH measurement is very unstable (see grafana graph.)

When I shake the box a little, the measurement varies. I also have a sinusoidal signal with both probes.

What is wrong in the wiring?

)


texts: Why any modern CPU masks 5 lower bits in a CL register for shifting operations

texts:
I'm digging into left and right shift operations in ASM.

From IA-32 Intel Architecture Software Developer’s Manual 3

  All IA-32 processors (starting with the Intel 286 processor) do mask
  the shift count to 5 bits, resulting in a maximum count of 31. This
  masking is done in all operating modes (including the virtual-8086
  mode) to reduce the maximum execution time of the instructions.

I'm trying to understand the reasoning behind this logic. Maybe it works as it works because on a hardware level it is hard to implement shift for all 32 (or 64) bits in a register using 1 cycle?

Any detailed explanation would help a lot!


texts: 8051 - After API call at 0xFFF0, instruction pointer is not returning to my program

texts:
With microprocessor ATmEL 89C51RC2 , when I prepare registers and ACC for API call and I call

CALL 0xFFF0

instructions below the call are never executed. The process never returns from 0xFFF0. Are there any common mistakes begginers can do, that causes this? What is important to take care of, for API instruction to execute properly?

My code:

FLASH_ADR equ 01000h        ; adress in FLASH to write to
PGM_MTP equ 0FFF0h          ; adress of API subprogram
PulseRRef set 4230;

MOV R0, #11
MOV R1,#02h
MOV A, #low(PulseRRef)

MOV DPTR,#FLASH_ADR

LCALL PGM_MTP

JZ END_S

MOV DPTR,#TEXTES     ; writes message to the terminal
CALL SEND

END_S:

MOV DPTR,#TEXTME    ; writes different message to the terminal
CALL SEND

RET


texts: PCI Express data transfer method? Serial VS Parallel

texts:
This is probably very basic, so please bare with me.
In one hand, I read that PCIe is used for serial data communication, but on the other hand, it comes with x1, x2, x4, x8, x16 and x32 flavours.
But what's the use, or rather, the point of having, say, 32 lanes for a serial data communication?

*EDIT

Maybe I should have elaborate.

Sure, 32 lanes means 32 times faster, but then you can't say the communication is serial, because by definition it means that each clock cycle transfers one bit of information, whereas in PCIe x32, 32 bits are transferred at each clock cycle.


texts: What happens when devices request different voltages from a USB hub?

texts: I'd like to charge two devices with one USB charger, one requests 5V, the other 9V. I plug an USB hub (potentially an old USB 2.0 one) in the (9V capable) charger and plug the two devices in the hub. How would this be handled? Would it potentially kill the 5V device or the USB protocol somehow assures that both devices will be powered from 5V?


texts: Crosstalk between secondary transformer windings

texts:
I have hand wound a transformer which has a 220v primary winding, two 25v secondaries and a 15v secondary:

simulate this circuit – Schematic created using CircuitLab

I have centre tapped the 15v secondaries (to later rectify to +-25v) and when measuring the voltage between A-B or B-C, I get 25v as I would expect.
Similarly between D-E I get 15v.

However, If I measure the voltage between B-D I get 5v, and B-E gives 15V.

A-D is also at 24v and A-E at 34v. I would have expected these to all be ~0v.

Why am I getting these voltages? I would have assumed that the 15v winding would be isolated from the 25v centre-tapped winding? I have checked there are no shorts between any the secondaries. I should also point out that this is under no load.

As I said I hand wound this transformer (well the secondaries), so is this something to do with the direction of the windings? Or unbalanced windings? I would like the 15v winding to be isolated from the 25v ones. Is this not possible with a shared core?


texts: Is it possible for an intermittent load to draw too much current from a charger that is also connected to a SLA battery?

texts:
Planning on this setup as a 12V supply and backup:

Load connected to 12V 100Ah SLA Battery connected to a charger (Residential Gateway UPS).

Continuous load will be minimal (<0.5A), with an intermittent load that kicks on once daily at 12A for <5 minutes. This comes out to

Charger is a Residential Gateway Backup power supply. Limited data sheet info says it can output 36W max.

Based on my math there is plenty of charge current to keep the battery topped off in that average load < charger output. My concern is that when the higher load switches on, will the battery provide all the current it needs, or will the the load try to draw from the power supply, which may be inadequate?

I've found this, with a trickle charger instead of a UPS, and conflicting answers:
Does lead battery + trickle charger = UPS?

My hunch is that it will mess up the charging circuit, but I have turned up nothing conclusive to back this.

Thanks!


texts: Wiring a siren to an alarm system, siren isn't going off when the alarm is triggerd

texts:
Hello I have an alarm system of Jablotron Oasis 80. I want to hard wire a sirene of another brand to it Aritech S290. When the alarm goes off then the beacon of the siren is flashing, but there is no sound. I have measured if the voltage is good, the siren is getting 12.8V from the IW and U+ of the alarm system. Actually the label of the siren says Input power(13.0 - 14.2V), but the original battery of the siren is also 12V.
Is this wiring of mine correct? I have really basic electrical knowledge, any help would be appreciated!

Siren schematic:

Schematic with another siren:

Wiring:


texts: Best way to make connection with rubber contact pad

texts:
I dismantled a push-button telephone and I am want to control it using a Raspberry Pi (A+) to trigger the button presses.  The phone has a grid of 12 (+2 special buttons) contacts that correspond to the dial numbers.  Normally the rubber domes would make connection when the button is pushed, but I want to find a way to close the circuit somehow using a Raspberry Pi.  Below is a picture of the PCB.  There's a potential difference of ~4.1 volts across the contacts.

I also need some way to close/open the latch that the handset would normally rest on, pictured below at SW2.  It has the expected ~48 volts running through it, so it's waaaaay too much to directly control with a Pi.  I plan on soldering a relay in there, as the contacts are easier to work with on the underside there.  Unless there's a better way to do that.


texts: Can you play Chords on Arduino with a single piezo speaker?

texts:
I need to be able to play two tones at once and i have the arduino uni with a small 8ohm piezo speaker. Is it possible to do so?

Sample Code

#define  c     3830    // 261 Hz

int tone1 = 10; // digital pin10
int tone2 = 9 // digital pin9
void setup() {
    pinMode(tone1, OUTPUT);    // pin as output
    pinMode(tone2, OUTPUT);    // pin as output
}

void loop() {
   playTone(1000,500,700)
}

void playTone(long duration, int freq, int freq2) {
    duration *= 1000;
    int period = (1.0 / freq) * 1000000;
    long elapsed_time = 0;
    while (elapsed_time < duration) {
        digitalWrite(tone1,HIGH);
        digitalWrite(tone2,HIGH);
        delayMicroseconds(period / 2);
        digitalWrite(tone1,LOW);
        digitalWrite(tone2,LOW);
        delayMicroseconds(period / 2);
        elapsed_time += (period);
    }
}


texts: How to Insert values in 2d array in verilog

texts:
I wrote a verilog code for Circular Shift register using a 2-d array, but can't seem to insert values in the array.
Here is my code

    module cir_shift_reg_v(
        input CLK,
        output reg [16:0] BYTE_OUT
    );

    reg [16:0] byteShiftReg[9:0] = {16'h0,16'h1,16'h2,16'h3,16'h4,16'h5,16'h6,16'h7,16'h8,16'h9};
    integer i,j;

    always @(posedge CLK)
    begin
        BYTE_OUT <= byteShiftReg[0];
        for (i=0;i<9;i=i+1)
            byteShiftReg[i] <= byteShiftReg[i+1];

        byteShiftReg[9] <= BYTE_OUT;
    end
    endmodule

I am getting an error during simulation saying

    Constant value or constant expression must be used for initialization


texts: Why are SMD Diodes different Packages than Resistors and Capacitors?

texts: I was looking for SMD Schottky Diodes on Digikey, and they all come in weird packages like SOD-123. There were some that were 1206 or 0805, but they seem fairly rare. Why is this? The only difference is that diodes are polarized, but the diode packages are the same both ways except for the little mark on one end. It doesn't make any sense, and Kicad's module library, being woefully inadequate, doesn't seem to have the diode specific packages.


texts: About the output resistance of a voltage amplifier

texts:
I know that, if I have a voltage amplifier, the output resistance Rout should be as small as possible: indeed, if the circuit is replaced by its equivalent Thevenin's circuit (1st picture), the voltage on a (generic) load is maximized if Rout goes to zero.

1st question: if I replace the voltage amplifier with Norton's circuit (2nd picture), the output resistance Rout doesn't change, then if Rout goes to zero, I should be able to see the same behaviour of the voltage amplifier: I would expect, indeed, that the more Rout goes to zero, the more the current flows in the load resistance RL, thus increasing the output voltage (that is, a voltage amplifier). But I'm not able to show this: if Rout goes to zero, I get a current source which is shorted by itself, and all the current flows in Rout=0 (and the output voltage is of course 0).

2nd question Is it correct to say that, in general, if the output resistance Rout of a generic circuit is very great, a circuit behaves like a current amplifier (if I put it in Norton's circuit this is evident, if I put it in Thevenin's circuit I don't know how to show this) and if the output resistance is very small, a circuit behaves like a voltage amplifier (if I put it in the Thevenin's circuit this is evident, if I put it in the Norton's circuit I don't know how to to show this)

Thanks!


texts: Why do some of my IE converter circuits have a large offset voltage?

texts:
The following circuit is an active current to voltage converter with switchable gain.

Schematic

Not shown: The inverting input is held low through a 10K resistor when the circuit is powered on but not being used. Whenever a measurement is being made (including calibration measurements where IN is floating), that resistor is disconnected.

Supplies on the analog switches and opamp are +/- 11.5 V. The typical VOUT range is between -10V and +10V.

Purpose

The circuit is used to measure currents in the nanoamp range. A few mV on the output is significant. Constant offsets are not really a problem, as they can easily be calibrated out by measuring the output with an open input and subtracting that from subsequent measurements.

Each board has 6 or more of these circuits.

Components

The selected op amp has very small (< 10 pA) offset and bias input currents and a very small offset voltage (< 1 mV). It's an AD8625AR.

SW1A and SW1B are different poles of the same CMOS switch (ADG1236). They are switched together to select the feedback resistor, which determines the gain of the converter. The maximum leakage current is 1 nA on source and drain pins, on or off. The switch not shown (for holding the inverting input low through a 10K resistor) has similar performance. Typical leakage currents are very small (< 0.1nA).

Problem

The problem I am having is that in some batches of boards, some (or all) of these circuits have large offsets which decay slowly when powered on. However, most boards are perfectly stable at all times, with small offsets.

A typical offset on VOUT with IN floating is < 1 mV. On afflicted boards, the offset can be as high as 120 mV.

When the afflicted boards are powered on, the offset will slowly (after hours of days) stabilize to ~5 mV. After power is removed, the offset accumulates again, so when powering it on after a couple days of being off, it's high again.

Each board has a bunch of these circuits on it. In the first batch of 5 boards, all of them were affected. In the next batch, none were affected. In the most recent batch, each board has one affected circuits, and it isn't always the same one.

At the worst case, the maximum leakage currents of all the analog switches would be 1.2nA,  resulting in a 12 mV offset at the highest gain setting, so I don't think that can account for all the offset I'm seeing.

Where else could the offset voltage be coming from? Is there a common board defect that would result in this sort of behavior?


texts: Battery charger termination using 10-bit ADC

texts:
I'm designing a fast-charge NiCd battery charger. To determine when to terminate the charge, I'll be using the standard technique of monitoring the charge profile of the battery and terminating charge when the battery voltage peaks and begins to decrease, as shown below.

I'll be using a 10-bit ADC to monitor the battery voltage, which gives me approximately 5 mV resolution with a 5 V supply. I'd like to terminate charge when I see a 10 mV drop in voltage. However, I'm a little worried that 5 mV resolution won't be enough to reliably detect the end-of-charge condition, especially with some noise thrown into the mix. Would it be a good idea to use an instrumentation amplifier with one input set to a steady 1.55 V and the other input connected to the battery? Then, that approximately 30 mV rise and fall (above 1.55V) would look like, say, a 3 V rise and fall. Then, charge termination would occur when I detect a 1 V drop instead of a 10 mV drop, which would be a lot easier on the ADC.

Any problems with this solution that I'm overlooking?


texts: Un-moving "static" image from VGA controller

texts:
I am reverse-engineering a daughter card which uses a ADV7125KSTZ140 VGA video DAC driven by a FPGA. The FPGA is a Xilinx Spartan 3E programmed by an off-board processor using slave-serial mode, meaning the daughter card does not require any firmware whatsoever. It also means I do not have any access to the code.

After probing around the board for a couple of weeks, I believe I traced out the entire schematic which can be found in PDF format here. Unfortunately, the board does not work. When plugged into the main device, this is the video output I am getting:

The "static" shown on the screen does not change, it is perfectly still, suggesting it's not simply noise. Unfortunately I have zero experience with VGA, so I am not sure what might cause this - bad data? Bad sync? Missing connections? I am hoping that someone with more experience in this area would be able to check my schematic and see if there are any blatant problems with the design. It is quite possible that I missed some connections during my probing, though all of the connections in the schematic seem logical to me.

If further information is required, please let me know and I will update the question.

UPDATE:

After reading Dave's comments I took another look at the original board again this afternoon. I did some more probing, this time with a meter which had sharper probes. I was able to find several missing/mislabeled connections, which I have now updated. The new schematic can be found here. As I mentioned earlier, my /CE1 was not connected correctly. It should have been connected to /CE3 (mislabeled in the original as /OE3) and also to the MODE and ZZ pins of the SRAM. The connection between /OE and the input of the inverter was correct, but I had left out something very important - the driving source. This should have been connected to Pin 143 of the FPGA, which was originally incorrectly labeled as FPGA_HSWAP.

I do seem to be missing a driving source for the /BW pins though. /BWA, /BWB, and /BWE are all tied together, and pulled high through a 4.53k resistor. I cannot seem to find a connection to the FPGA though, or anything else on the board for that matter. I can't imagine the Byte Write pins can be held high permanently, can they? It seems to me in order to do much of anything with the SRAM you'd have to be able to write to it....

I am wide open to ideas and suggestions of what's going on here.


texts: Communication between BMS and PC via CAN/RS485 — where to start?

texts:
I am about to obtain BYD B-Box LV Residential battery for my off-grid solar system. The inverter I have is not on the list of compatible ones, which means (according to my local battery supplier) that the battery will simply refuse to run unless we connect it to a specially programmed device like Venux GX which will trick the BMS into thinking that it is connected to a compatible inverter. The interface is CAN/RS485.

Now my idea is to use a laptop instead of Venux GX for these reasons:

Venux GX would not be connected to the inverter, therefore it will not have chances to react (e.g. change voltage) exactly/when the BMS wants (although the inverter can be programmed on its own, this is less than ideal). At the same time, the inverter can be controlled from PC via serial port so I would like to write a program that would coordinate the inverter and BMS to co-work nicely;
I want to learn how to program this kind of stuff (I am a software
engineer but never worked with microcontrollers before).

So, the question is about where/how to approach this task. I assume that I will need to obtain:

Some sort of adapter from CAN/RS485 to USB?
Some software/frameworks/languages handy to program communications over CAN/RS485?
Any other gotchas a newbie would be advised to know?


texts: How can you tell what is the net direction of current flow when there are two opposing sources?

texts: How do you tell whether the 12V source will overpower the 5A source at the 4ohms resistor? Changing the net current direction in Node V2. Or vice versa, if the 5A source is stronger than the 12 V.


texts: Low powered wireless doorbell & door open/closed sensor

texts:
I'm trying to build my own sensor network, and I'm hoping to eventually have about half to a dozen sensor all over the house along with a weather station or two outside... Hence me thinking of using xbees for the wireless part of the network.  If anyone has a better/cheaper RF that they can recommend, I'm willing to consider it.

Anyway the door bell & closing/opening of the door is kind of a special case, because it can happen at any time so I was trying to design a way for me to wake up the xbee when the event happen, otherwise just wake up every minute to five minute and just report that nothing has changed/happened.

So basically what I was thinking of doing was doing the following:

Op-isolator (ac->dc) for attaching to the 16v doorbell chime.
Hall Effects sensor + magnet for attaching to the door to detect opening/closing.
Some form of logic that would trigger the xbee to wake up when the door bell is pressed, or there is a state change on the door (IE open to closed, or closed to open).
Some sort of latch? to hold what the state is till the xbee is woken up enough to read and transmit the state.

Basically the goals of this is to get the xbee and the rest of the sensor to be as low powered and stay in a sleeping state as much as possible hence triggering the xbee to wake up.  My current issue is how to design the circuit...

Also from reading it seems that you have to hold the line HIGH to keep the xbee in sleeping state, so I was wondering how low I can get that current consumption to be, and also it will still need a low amount of current in the op-isolator and the halls sensor to detect a state change there.


texts:
I have a bike flash light which is consisted of 5 LEDS (red). Which looks like this.

I unsoldered three of them and put it in a series circuit using two AAA bateries. The Leds did not turn on. I assumed that something was wrong with my circuit connections. So I just disconnected the two leds and kept only one of them with one battery( later i tried with two). The led did not turn on either. I changed the polarity but still nothing. So what am i doing wrong? does the led get destroyed when i unsoldered from the circuit board?

The batteries were not empty.
The leds were operating normally while they were on the board.

Thanks in advance guys I am a total newbie.. :)

EDIT:
The polarity was tried both ways so i did not add + or - in the picture.


texts: Can I use ceramic resonator for ATmega328p?

texts:
https://lcsc.com/product-detail/Ceramic-Resonators_ABRACON_AWSCR-16-00CV-T_16MHz-0-5-22pF_C179647.html
I have been developing a project that includes ATmega328p-AU, So I have studied many circuits that use a 16 MHz crystal with 22 pF capacitors. So I thought why not use a ceramic resonator to save some space. So I want to know whether it would be better to use a ceramic resonator with the internal capacitance of 22 pF
or
crystal with external capacitors as given in the schematic?

I have provided the link to the ceramic resonator that I am referring to.
Thank you.


texts: What's the theory behind speed control of a multi-tap multi-pole induction motor?

texts:
Ceiling fans are an application of multiple-pole capacitor-run/permanent split capacitor induction motors, and they appear to control the speed through a partially powering and shunting multiple-tap coil.  How does the partial powering and shunting of such a motor control the speed?

My original question was migrated from the electrical engineering site to the diy site, but the question I was attempting to ask was about the theory of multi-tap motor coils and their use, with a ceiling fan as a practical, motivating example.

How is the speed control in this circuit I found on the internet supposed to work?

In the diagram shown below, with the switch table in the diagram, it appears that the fast speed setting energizes to only the reversing coil, and the low speed setting energizes only the shorter(/less poles?) coil but does not energize the reversing coil--how can these configurations possibly control direction?  For medium speed, apparently the high #turns tap is energized, but the low #turns tap is shorted.   If you energized the high #turns tap and shorted out the low #turns, would the speed be even lower?

I did not count the poles in my motor, since it appears to require a bearing puller to disassemble it.  The ratio of resistance between the shorter and longer portions of the tapped coil is 30ohm:90ohms and the ratio of the resistance of the capacitor-fed coil to the tapped coil is 60:120.

I'm not entirely sure this circuit and switching diagram is correct, since it doesn't seem to control direction at the high and low speeds.  How should the system work?

This diagram (http://imgur.com/qhHe5x4) is crudely modified to match my ceiling fan: A DPDT reversing switch, power comes into '1' and powers the secondary coil with 'L'.  The wire colors match my motor.

Why does powering or shorting the different taps of this multi-tap motor affect the speed of the motor? Is it like a DC motor, in that there is some kind of braking action if you short across a coil?  If you wanted high speed, would you power the full 120 ohm coil, the smaller (29ohm) section, or the 96 ohm section? Is the tap on this sort of multi-pole motor energizing some fraction of the total number of poles or is the tap putting more or less turns on the same number of poles?  With one end of the triple tap coil tied to Neutral through the capacitor, how do you produce three speeds (High, Medium, and Low) using the two other two taps?

One thing that confuses me is that since a PSC motor should run at RPM=slip*120*Freq/Poles, the three speeds appear to manifest even when unloaded (the fan blades are removed)  Does that indicate some sort of variable-pole behavior?  (Apparently, slip is significantly increased by reducing the voltage, either by using resistors, capacitors, or inductors.)

I apologize for the number of questions here, but this tapped multipole motor seems a lot more complicated than the simple PSC induction motors explained elsewhere.


texts: The options for communicating sensor data in a medium size building

texts:
What are the options for communicating sensor data to a central point in a medium size building?

I want to build a cheap centralized temperature control.
In each room there are about 4 radiators which I want to equip with a few sensors like temperature, light, sound level, and with a radiator valve actuator. Let's say the building has 50 rooms with a wireless network available.

The main requirements are low costs (for the project as a whole), and it should be relatively easy to design and implement. I have some experience with PCB design and micro controllers, and I can ask help of more experienced people.  I'm not bound to specific sensors or actuator.

I guess power for the sensors and for the actuator come from a power outlet. Maybe the signal can also travel over the power net.

P.S. As newbie, I feel I could use some help to improve this question. All help is appreciated.


texts: Second order driving point impedance of RC network

texts:
I am trying to find the transfer function for the following second order model, but running into difficulty as I can't manipulate it into the standard form required for me to extract time constants.

The circuit is as follows:

So far I have worked from this equation for the impedance:

$${\frac{\left( {\it R1}+{\frac {1}{s{\it C1}}} \right)  \left( {\it R2}+{
\frac {1}{s{\it C2}}} \right)}{{\it R1}+{\frac {1}{s{\it C1}}}+{\it R2}+{\frac {1}{s{\it C2}}}}}+R3$$

and factored out the frequency independent gain:
$$k={\frac {{\it R1}\,{\it R2}}{{\it R1}+{\it R2}}}+{\it R3}$$

to arrive at somewhere near what I think is standard form, but missing an \$\omega_{o}\$ term.  I wanted to keep the factor of \$s^2\$ in the denominator unity.

I have this:
$$k.{\frac{{s}^{2}+{\frac { \left( {\it R1}\,{\it C1}+{\it R2}\,{\it C2}+{\it R3}
\,{\it C2}+{\it R3}\,{\it C1} \right) s}{ \left( {\it R1}\,{\it R2}+{
\it R3}\,{\it R1}+{\it R3}\,{\it R2} \right) {\it C2}\,{\it C1}}}+{
\frac {1}{ \left( {\it R1}\,{\it R2}+{\it R3}\,{\it R1}+{\it R3}\,{
\it R2} \right) {\it C2}\,{\it C1}}}}{{s}^{2}+{\frac { \left( {\it C2}+{\it C1} \right) s}{ \left( {\it R1}+
{\it R2} \right) {\it C2}\,{\it C1}}}}}$$

and I'm stuck.  I have spent a day manipulating it in various ways, not taking the factor k out, but can't get it into a recognisable form.  Intuitively I see it is a mixture of high-pass and band pass.

I wonder if part of my problem is that I am assuming an input current of \$I_{b}\$ for the calculation of transfer impedance \$Z={\frac {V_{b}} {I_{b}} }\$, when the circuit must be considered open circuit for transfer function calculation?  Any help appreciated.


texts: Standard packages for compact SMT crystals

texts:
There is an old and bog standard form factor for SMT crystals - HC49/US.
The problem is that HC49/US takes a lot of real estate on the board.  It's 12mm long.

Another problem with crystals and oscillators in general is that they often become long lead time items.  [This is my experience.]

There are lots of small form factor crystals from various manufacturers.  But, at a glance, it seems that there is no standardization of form factor.  It’s nice when packages are standardized.  It alleviates the long lead time problem.  Crystals from manufacturer B may be used, if crystals from manufacturer A are out of stock.

Are there standard form factors for compact SMT crystals?

Update

Armed with the insights from Gribo and Gustavo, I did a more focused survey.  Found that 12MHz in 3.2x2.5mm package are produced by: Abracon, Citizen, Epson, Fox, ECS, TCS, NDK.  To be included in this list, the part had to be in stock at DigiKey.  It turns out that 3.2x2.5mm package is common across many manufacturers.


texts: usage of at24c02 eeprom with ethernet module

texts: ı design  a altium circuit schematic  which consists of lan8720 tranciever rj45 and also at24c02 eeprom .However ı dont know exactly what MAC means and what it does. Why do we use eeprom with ethernet?


texts: MOSFET bootstrap switching circuit switching OFF problem

texts:
Currently I am designing a power switching circuit. The goal is to switch on a N channel MOSFET with a low side load. The circuit should work with input Voltages up to around 60 Volts. The switch is controlled by an Arduino Uno. The problem that I have is the OFF switching seems not to work properly in real life.
I have built the circuit on a bread board and I simulated it as well in LT Spice. Below is a figure of the simulation in LT spice I used existing LT spice models for some parts. In real life for the OpAmps I use "OPA454AIDDA". As N FET I use "IXFH60N50P3". For the P  channel I use "FQP4P40".
The switching code is as simple as 2ms ON pulse (switchON) followed by a 18ms (switchOFF). So this should result in a 50 Hz output with a 10 percent Duty Cycle. This is done with an Arduino Uno.
Working principle of the circuit:
During the ON time, the upper Op Amp powers the gate of the N FET resulting in a positive Vgs, turning the load on. When the load is powered, the bootstrap capacitor boosts the gate Voltage to further activate the NMOS.
The lower OP Amp circuit works as a substractor circuit. During the ON time, the OFF signal is LOW. This should result in a 0 Vgs of the PMOS. When the OFF signal goes high, the Vg should result in Vs-Voff. This gives a negative Vgs, enabling the PMOS. Which should now switch off the NMOS because it will have a Vgs of 0V.
In the simulation the circuit does work as hoped. As is shown in the output signal in the figure. But in real life, the switching OFF does not work properly. Below 30 Volts input it works fine, but as soon as I increase the Voltage to higher levels with my Lab bench power supply, the output pulses are not a stable pulse but are rapidly switching on and OFF during the ON time. My question is how can I improve the circuit to get cleaner output pulses when my input Voltage increases. Also, what other improvements do you guys think I could make?
Thank you in advance!
PS this is my first time posting on the forum so I hope you guys have enough information on the question. Feel free to ask.


texts: Maximum resistance that can be put in series with an input to a (PIC) microcontroller

texts:
EDIT: What is the maximum resistance that can be put in series with an input to the PIC.

Original Question:
I am designing a clamping circuit to protect my microcontroller's pins, I need to know the minimum current required by my microcontroller to register input so that I can bias my external clamping diodes properly, without risking normal operation of my microcontroller.

Edit: Microcontroller is to read digital inputs in an EMI and ESD prone environment and I want to clamp both negative and positive voltages in the range of about -0.3V to (VDD + 0.3V), this range is provided in the datasheet under Electrical Characteristics.

I am using this PIC24, I think this has something to do with leakage current but I am not sure.


texts:
I've been struggling with getting CAN bus transmission to work properly. I'm driving the setup with a Parallax Propeller board and the specifics are in another post, but I have a more specific question about the CAN bus wiring and termination:

Each source I've found that describes CAN bus termination does so with something like the top of the diagram shown below - a high and a low wire with 120ohm resistors at each end.

However, in my lab setup what I actually have is equivalent to the lower part of the diagram shown - the resistance is actually in the "middle", between the two devices.  I've also tried playing with that resistance value, from taking it off entirely, and around 110ohms, as well as 220ohms and they all suffer from the same problem and the chip I'm using is reporting a transmission error.

Two 120ohm resistors in parallel should be the same as 60ohms resistance.  But does the actual position of the resistors along the wire matter?  The devices are physically about 6 feet of wire apart and it's running at 500Khz.  I know some basics including Ohms Law, and I get that CAN uses voltage differential to transmit, but if the position of the resistors is what is wrong then there's definitely something I don't understand about how this circuit is supposed to work.

simulate this circuit – Schematic created using CircuitLab


texts: MCU pull down input push button with interrupt ESD issue

texts:
I have an MCU operated at 3 volt with an input pin that is floating by default. I have an external pull down circuit with a 10K resistor connected to the I/O pin. I also have it tied to VCC using a push button. The microprocessor is sleeping until the button is pressed (it is configured to generate an interrupt when the I/O line become high).

The solution have worked flawless, have tested it for months. Last week however I soldered a new batch of 16 units and when I inserted them inte their plastic case I noticed that some of the woke up and started processing and I did not press the button. I now have two theories and would like to know how likely they are:

ESD has damaged the MCU? Personally I do not think so, since I have seen the same problem on at least 7 devices occasionally. This combined with that they work flawless in all other aspects makes me think that this is not the case.
ESD pulls the line high occasionally when I insert it into the plastic enclosure and in this way the interrupt is triggered in the MCU. Sounds reasonable, I guess a very short ESD near the pins would actually wake up the device. Maybe the reason I see it now and not before is because of winter and a more dry air?

Am I thinking correct here?

I would also like to know if I need to protect the pin in some way and suggestions on how to do this if required. I read that the chip (TI cc2540) is ESD protected but I don't know if it is enough, maybe it needs more protection. Maybe it has enough protection but I still need to handle short spikes in software.


texts: Zener problem in motion detection circuit

texts:
I am studying a sample motion detection circuit which uses a D203S PIR sensor and a BISS0001 motion detector IC. After sensing motion, BISS0001 gives output which switches SCR and SCR switches TRIAC. I don't understand the role of some of the components.

The circuit uses a 7.5V Zener diode across triac gate terminal. What is the purpose of using this Zener diode? When SCR switches the triac the voltage across the Zener varies a lot with respect to the load. It shows different voltages at different load conditions.

We know that a Zener diode always has a fixed voltage drop when supplying greater voltage then the specified one. What's happening in this case?


texts: Large power-systems for power-flow study

texts:
I have just been started on a research project which involves finding ways
to speed up the solution time of the power-flow problem
which is basically calculating voltages at each of the buses of a given
power system.

I have a few data-sets like the standard IEEE power-flow test cases.

However, these bus-systems are still very small. Is there any database
like the standard IEEE power-flow test cases mentioned above, but with a large number of buses. Large being on the order of 1000 to 10000 buses, or even larger.

If also there is some standard algorithm for generating a "fake" power system
with an arbitrary number of buses, or standard technique to join say several IEEE 300 bus
systems to make a larger network, that would also be helpful.


texts:
I would like to get into FPGAs. I'm a computer engineer student and I have knowledge of electronic, electromagnetism, circuit, architecture, microcontroller, software development... but I studied them only in a summary way.

What are relevant and preliminary topic I must know to understand FPGAs?

e.g. I found that Digital Design is an important aspect of the story.

NOTE: I'm NOT asking about FPGAs itself. I'm asking about things AROUND FPGAs, that are requirements to understand it.


texts: I live in a residential area and I want to test and design an antenna in my garage. I plan on using my signal generator as the power supply and a RTL - RDS dongle connected to my computer as the receiver. The signal generator spans from 0 to 60 MHz. The amplitude has a range of 5 to 20 volts. My question is will my em waves interfere with my neighbors? If so what can I do to test designs and not affect the neighborhood?


texts: STM32 - ADC based temperature measurement on FreeRTOS

texts:
I've been trying to measure the MCU's (STM32F103RB) temperature as part of a FreeRTOS application. I've tried initializing the ADC both with the low and the high-level HAL functions, but whenever I try to get data, the variable storing them has a value of about 68 (when normally it should be ~1500 - 1600 in room temperature). Any ideas?

Code follows here: TempMsr.c - HAL

#include "Peripherals/TempMsr.h"

volatile int32_t sensorData = 0;
volatile int32_t temp = 0;
ADC_HandleTypeDef adc1_config;
ADC_ChannelConfTypeDef adc1_channel;

int32_t getTemp()
{
    sensorData = HAL_ADC_GetValue(&adc1_config);
    temp = (int32_t)( ( (10 * V25 - 8 * sensorData) / (AVGSLOPE * 10) ) + 25 + BIAS);
    //manufacturer's formula for determining the temperature in Celsius, adjusted for unit
    //compliance and for minimizing errors due to possible floating-point operations
    return sensorData;
}

void ADC_TempMsr_Init()
{
    ADC_Config();
    HAL_ADC_Init(&adc1_config);
    HAL_ADC_ConfigChannel(&adc1_config, &adc1_channel);
}

void ADC_Config()
{
    adc1_config.Instance = ADC1;
    adc1_config.Init.ScanConvMode = ADC_SCAN_DISABLE;
    adc1_config.Init.ContinuousConvMode = ENABLE;
    adc1_config.Init.DiscontinuousConvMode = DISABLE;
    adc1_config.Init.ExternalTrigConv = ADC_SOFTWARE_START;
    adc1_config.Init.DataAlign = ADC_DATAALIGN_RIGHT;
    adc1_config.Init.NbrOfConversion = 1;

    adc1_channel.Channel = ADC_CHANNEL_TEMPSENSOR;
    adc1_channel.Rank = ADC_REGULAR_RANK_1;
    adc1_channel.SamplingTime = ADC_SAMPLETIME_239CYCLES_5;  //~17 us, manufacturer-suggested time for temp sampling
}

TempMsr.c - Low-level:

void ADC_TempMsr_Init()
{
    ADC_Config();

    LL_ADC_Enable(ADC1);

    LL_ADC_StartCalibration(ADC1);
}

void ADC_Config()
{
    LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_ADC1);  //enable the clock for ADC1

    LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(ADC1), LL_ADC_PATH_INTERNAL_TEMPSENSOR);
    uint32_t wait_loop_index = 80;  //CPU cycles which correspond to ~10 us, suggested stabilization time for temp.sensor stabilization

    while(wait_loop_index != 0)
    {
        wait_loop_index--;
    }

    /* Set ADC group regular trigger source */
    LL_ADC_REG_SetTriggerSource(ADC1, LL_ADC_REG_TRIG_SOFTWARE);

    /* Set ADC group regular continuous mode */
    LL_ADC_REG_SetContinuousMode(ADC1, LL_ADC_REG_CONV_SINGLE);

    /* Set ADC group regular sequencer length and scan direction */
    LL_ADC_REG_SetSequencerLength(ADC1, LL_ADC_REG_SEQ_SCAN_DISABLE);

    /* Set ADC group regular sequence: channel on the selected sequence rank. */
    LL_ADC_REG_SetSequencerRanks(ADC1, LL_ADC_REG_RANK_1, LL_ADC_CHANNEL_TEMPSENSOR);

    LL_ADC_SetChannelSamplingTime(ADC1, LL_ADC_CHANNEL_16, LL_ADC_SAMPLINGTIME_239CYCLES_5);
}

The corresponding header file (TempMsr.h):

#ifndef INC_TEMPMSR_H_
#define INC_TEMPMSR_H_

#include "stm32f1xx_hal.h"
//#include "stm32f1xx_ll_adc.h"
//#include "stm32f1xx_ll_bus.h"

#define AVGSLOPE 4.3
//average slope of T-V chart according to datasheet pg 79
//(min is 4 mV/C, max 4.6, default (4.3): typical)

#define V25 1430
//voltage of temperature sensor at 25C according to datasheet pg 79 (in mV)
//(min is 1340, max is 1520, default(1430): typical)

#define BIAS 20
//according to the manual (pg 235), due to mfg processes
//there is an offset in the V(T) plot different
//to every chip (up to +-45oC) that needs to be found.
//(default is 0 so it MUST be calculated before any meaningful measurements
//are made)

int32_t getTemp();  //returns current MCU temp. in Celsius
void ADC_TempMsr_Init();  //initializes the ADC, this needs to be run in prvHardwareSetup()
void ADC_Config();

Finally, the FreeRTOS task:

void vTempTask(void *pvParameters)
{
    while(1)
    {
        xSensorData.temp = getTemp();  //continually update the appropriate variable inside the sensor data struct
        vTaskDelay(pdMS_TO_TICKS(1000));   //1 second per measurement is enough
    }
}

Thanks in advance.


texts: Efficient battery charger cutoff circuitry

texts:
I've been designing a battery charger circuit for a while. I couldn't decide how to shut down the current flowing through battery. Actually, a simple output diode helps a lot but they make ~0.5V drop and when current flows through it, it lowers down efficiency for about %2-3 percent.

This is the second circuitry that I tried. I am using a MCU with 3.3V logic, this circuitry works well when changing load on and off. However, In my application, the load is a battery which may pump back all the current when supply is low.

I trying to find out which possible way will work the best for this application.


texts: Is this warning about wireless modules interfering with aircraft systems true?

texts:
I see the following warning for Sierra wireless (cellular) modems:

Do not operate the Sierra Wireless modem in any aircraft, whether the aircraft is on the ground or in flight. In aircraft, the Sierra Wireless modem MUST BE POWERED OFF. When operating, the Sierra Wireless modem can transmit signals that could interfere with various onboard systems.
Note: Some airlines may permit the use of cellular phones while the aircraft is on the ground and the door is open. Sierra Wireless modems may be used at this time.

However, from what I know, the restriction on cellular communication in aircraft is (was?) an FCC regulation, not an FAA regulation–presumably because it causes trouble for cell towers on the ground, not for the aircraft itself.
And that makes sense: people forget to turn off their phones all the time, so it would make no sense for aircraft designers not to account for this.
Nevertheless, this warning is explicitly saying otherwise.
I was wondering, how true is this warning actually? Could such a modem really interfere with aircraft equipment, and could this actually be airline-dependent? Is there any history of this happening?


texts:
If this voltage is applied to an ideal inductor. How will be the current waveform look like?

Kindly any one show me the graph for inductor current and if possible explain it. I shall be very grateful! (Voltage is in blue)


texts: Difference between input current and supply current?

texts:
I am reading and trying to understand datasheet of ICs.

I am reading this datasheet now : http://www.ti.com/lit/ds/symlink/sn74hc00.pdf

In the table 6.5, there are two parameters namely Ii and Icc. Input current and supply current.

I would like to understand the difference between the two terms?

Can someone please explain with some example for understanding.

Thanks.


texts:
The Ethereum Foundation (an open-source project) will build an open-source ASIC to support its decentralised randomness beacon.

To date, has the RTL of any ASIC been open-sourced or will the Ethereum Foundation set a precedent?


texts: Best practice for wire harnesses in a BOM

texts: Ive started a new job at a startup and am working on a BOM for a box build with a couple of PCBs and wire harnesses inside. Im in a bit of an impasse about how best to define wire harnesses in the BOM. In my previous job, we made standalone PCBs for OEM markets, where I only defined PCB mounted components, and never dealt with wire harnesses. What im trying to get my head round now though is in this instance where we will order a spool of wire, and then cut it to required lengths to then be crimped and inserted into a connector, should the spool be a BOM item, and then the cut wires be entered as sub-assemblies created from it? Or should the cut wires be BOM items, and they simply reference the relevant spool from a supplier?


texts: LED power consumption in theory and reality

texts:
In theory if one LED consume 10mA so 17 parallel LEDs consumed 170mA, but in reality when i connect 17 parallel LEDs they only consumed 100mA not 170mA
why there are difference between theory and reality?


texts: Why does a differential amplifier need two transistors?

texts:
This probably has a really obvious answer, but it's bugging me, so here goes.
Why do we need two transistors for a differential amplifier? Instead of of using a basic differential pair, can't I just use something like this:

simulate this circuit – Schematic created using CircuitLab
Can't we just use something like this to cancel out the common mode signal and get just the difference (Since V_bias is in the order of Volts and difference is usually in mV/uV)?
Thanks in advance!


texts:
I’m making a Lithium Ion charger circuit and successfully used a Texas Instruments bq2057c to charge 2 Lithium Ion cells in parallel (4.2V). Now I want to do the same with the cells in series (8.4V). I read that when charging multiple cells in series you have to do cell balancing to take into account the difference in charge speed between the 2 cells to avoid gradually reducing the battery’s capacity.

I bought the bq2057c in the first place because in the datasheet it said that it could charge 1 or 2 cells in series. Indeed, you can set the threshold level to 8.4V and the IC will charge the cells to 8.4V. The IC doesn’t balance the cells though so it might very well be that one cell is at 4.1V and the other is at 4.3V which in the long run will ruin the battery’s capacity. I don’t even know why anyone would want to charge 2 cells and not do cell balancing and therefore why this feature of charging to 8.4V is there. Maybe there is something I’m missing. Is it common to use multiple cells in series and not use cell balancing?

I could use an IC that has cell balancing, or I could use 2 single cell ICs and use them to charge my cells individually. Which one is best, and what is the most common? What I don’t like about the cell balancing ICs (e.g. bq29330) is that they always come in packages with a high pin count. I can’t seem to find one with low pin count. Do they exist?


texts: Examine rectified voltage before and after

texts:
I built a simple bridge rectifier.

simulate this circuit – Schematic created using CircuitLab

I connected the output of the function generator with CH1 of my oscilloscope and
with the input of the rectifier (using a T-Piece). The output goes into CH2.

The original wave looks like this:

After connecting CH2 the picture looks like this:

While CH2 looks good,
CH1 now shows the wave I would expect without capacitator but not the expected original wave.

Could somebody explain why? I'm using a Gwinstek GDS-1072A-U Oscilloscope and a Gwinstek SFG-1003 function generator.


texts: Static electricity high voltage and charge difference

texts: I have often heard heard voltage being described as a difference in charge between two points. If this is true, how is static electricity such high voltage even though it is a relatively small difference in charge?


texts:
I have four 50W AC 220V LED panels I'd like to rig to light a work area. I bought a 200W step up / down transformer to test with and it powers a single panel fine.
I have two questions-- first, will this transformer work to power four panels? and second, is there a better way to do this (the transformer is really bulky and isn't quite what I'd want to run the circuit on-- it seems like there's got to be a more realistic and "permanent" way to power these). Thanks!


texts: Alternatives to a sliding switch and relay?

texts:
There is a sliding switch on my board to select two different cases. A key like this:

From sparkfun.com

You know its equivalent schamtic is as below:

From sparkfun.com

I am designing another board to control some devices including this one. I want to replace this sliding key with an controllable electronic device. The first thing which crossed my mind was relays. However, They seem to be bulky and have over current capacity. Are there any other electronic devices to implement this sliding key in a smaller and more proper way?

Edit based on comments:
There are 11 devices which could be categorized as three groups:
1. two fans: I dealt with it by using relay. Yet I am curious to know if there is any other way.
2. eight devices are low level logic signal (not audio or data stream ones and they are quite slow).
3. one device needs to be handled with both switch and software.


texts: Why does higher bitrate requires higher bandwith?

texts:
I try to understand this question since a while and I think I came to an understanding. But I need someone to confirm it.
At first, I thought the bitrate was dependent on the frequency (more sines per sec = more data per second). Now I understand that that was completely wrong.
Here is my understanding now:
Let's say I have a carrier frequency of 1000 HZ

So my 1000 HZ frequency represents one state A.
Now, if I have a change in that frequency (modulation) to 1001, that would be state B.
Another change to 1002, that would be state C.
And one more change to 1003, that would be state D.

Now let's look at the bandwidth:

If I look at frequencies 1000 & 1001 only, I would have a bandwidth of 2, and I could represent 2 states (A and B, or 0 and 1)
If I look at all 4 frequencies (1000-1003) I would have a bandwidth of 4, and I could represent 4 states (A, B, C, D or 00, 01, 10, 11)

So in case 1, with bandwidth of 2 I have 1 bit of information that I can carry and in case 2 I can carry 2 bit per time unit.
I know this is way to simple, but is it in the right direction?
Update: ok, I think I got something wrong. This helped me:
I just found those slides about FSK
https://www.slideshare.net/jessierama/frequencyshift-keying
There is this image:

So in this case, with FSK there is a bitrate of 5 bps.
Because the bandwidth allows to switch the states 5 times per second.
When I have a higher bandwidth, I can switch more often (faster) the states, so I have more bits per second.
Is that assumption right?


texts: Switching transistor off when current is supplied to it's base

texts: Is it possible to switch off a LED when current is applied to base of a transistor? I am using the circuit below but when current is applied to the base, the LED is ON. I need the LED to be off when SW1 is on. I am using 2N1613.


texts: Determining the transmit frequency of a key fob

texts:
How can I determine the frequency of this RF module (car keyfob?)
It should be 433 or 315 MHz.
I have a 50MHz digital oscilloscope.
Is there a way?


texts: How to programming chip with TL866 even if not in the supported list of TL866 device?

texts:
I work at a textile company. We have a sensor header which is named USTER.
The Uster device checks the yarn quality. If it detects any problem it cuts the yarn.
In our company, we have 8x60=480 Uster devices. Every month 5-10 Uster programs give errors. We take them to be serviced, and they just erase and re-write the program in this device and it works again. We pay too much money. I want to do this if it is possible. İt doesn't look very hard. Because there are lots working Uster in the company, I want to copy the program from a working Uster and write it to a non-working uster.
There is problem because the TI c2000  in the Uster is  not in the supported list of TL866 ii plus. even if not in t56 supported list. datasheet of device
Here are some images of the Uster.
Can someone tell me where to get started?
This is the chip and possible programming pins:

This is the red socket side:

This is the top layer and the chip layer:

This is top layer as top side:

This is the result:


texts:
I'm making data acquisition with an amplifier (amplifier is amplifying a transducer and is connected to a data acquisition hardware).

After I make data aq. I am plotting the output signal data in fast Fourier transform. It is a DC output from the amplifier. I observed a sinusoidal ripple over DC voltage on an oscilloscope and I thought it was 50Hz.(Because we use 50Hz in Europe for power supply)

But when I take the Fourier transform the highest noise spike is 100Hz not 50Hz. 50Hz is the second after 100Hz in freq-power spectrum. And the other spikes are 150 and 200. The thing is it looks like harmonics of 50Hz but then why 50hz is not the maximum and 100Hz instead?


texts: How to Choose an External Regenerative Resistor

texts: I have a servo drive that recommends the use of an external regenerative resistor. From what I know, the external regenerative resistor is just a resistor to dissipate power from the servo drive. If 60W 50 ohm resistor is recommended can I use a resistor of lets say 60W 100 ohms?


texts: Connecting an LED to a "incompatible" voltage source

texts:
I'm band new to electricity and electronics and am confused by something I saw with a recent video that explains how to connect a battery, LED and resistor together. In that article (see link for further details if you're interested), its a 9V battery, a 3V LED rated at 20mA and a resistor that are being used.

Is it OK/safe to connect the LED to a voltage source providing more voltage than it is rated for? What potential side effects are there? I think the answer here is yes, because it seems perfectly fine to hook a 3V LED up to a 9V battery.
Is it OK/safe to connect the LED to a voltage source providing less voltage than it is rated for? What potential side effects are there? Pretend I only had, say, a 1V battery.


texts: powering android phone from 3 AA battery directly (not USB!)

texts:
I have Sony Arc phone which was spoiled by me (story OutTopic) as it won't charge lion battery anymore. the phone itself works perfectly. I don't want to do the regular 3AA to USB charger way. Trying to use 3 NiMH in the battery pins of the phone. Getting in ranges 3.7V+ from my 3 rechargables. Original sony li-polymer battery says 1500mA - 5.6Wh.

The phone starts with the logo. Does Experia animation and reboot and starts again in loops.

I suspect my battery is not giving enough current or voltage for android OS to start loading.
I was wondering if I can put the phone on 4AA NiMH meaning ~5V, will it burn the phone forever (just thinking).

Could not find notes on internet about trying this. everyone does USB route. Please suggest what options can help my case?


texts: The LED energy irradiance (mW/sr) is independent from emission half-angle?

texts: I have two LEDs with the same energy irradiance, 10 mW/sr for a solid-angle of 0.01 sr, but with different emission half-angles: LED A = 15° and LED B = 45°. Can I say that they will emit the same energy for the same solid-angle, independent of the half-angle?


texts: Using balancing charger with Li-Ion protected cells

texts: I'm making a 2S1P battery pack with 18650 elements, each of which is protected. Cells currently can be charged individually as each has a TP4056 board attached to it, that means charging one cell then another and so on. However, I have a balancing charger that supports charging 2S packs, with a 3-wire output. Can I just attach the balancing leads to the cells' protedted output connectors? Will the protection circuits somehow disturb the operation of balance charger?


texts:
I am working on a "OTA with signal current enhancer". I am using BSIM4 130nm MOSFET model. DC analysis is quite well, but in AC analysis I am getting the response below:

Please help me to make this gain positive in dB, i.e. gain > 1. I have tried different predictive technology models but all model are giving the same response.


texts:
I'm building a robotics project where I need to control a lot of DC motors. I picked the DRV8870DDAR H-bridge motor driver chip which needs 2 PWM input signals to control the speed and direction. Since I need a lot of PWM signals, I'm thinking of driving them with a TLC59116IPWR LED driver.

Unfortunately all LED drivers I found are built to sink constant current. To turn it into a digital signal I've added a 10K pull-up resistor to the signal line. Switching the "LED" on should then sink 0.5mA (at 5V) current from the resistor and output a LOW value. See the schematic below; the PWM0A line leads to the motor drivers:

My question is whether this will work fine?
If not, is there any alternative I should look for?

My worry is that the 0.5mA current I need to sink to output a LOW signal is too low for the chip to work. In the recommended section it mentions 5mA minimum output current, but that seems to be the lowest constant current target I can set via the REXT resistor. I don't know how the internals of the chip works, so I'm unsure if that's a problem.


texts: How does capacitor allow ac current when there is an insulator layer between the plates?

texts: This might look very fundamental but I am a bit stuck in this. How does the current pass(AC)between the plates when there is an insulator or dielectric between the plates.


texts: Voltage controlled oscillator design: NPN transistor BC238BP vs BC238 equivalency

texts:
Are these two transistors equivalent? I could not find a model for the BC238BP so I wonder if it is ok to simulate the circuit with BC238 to get accurate results.
I found some datasheets online for both of them but they do not seem to be official at all.
If they are equivalent why does the BC238BP have the BP suffix?
Below is my circuit:

Desired output is given below where X-axis is time(s) and Y-axis is amplitude (V)


texts:
For an Arduino project that I'm building, I'd like to read codes from an IR remote, operating at 455 kHz. There is a combined IR eye and demodulator TSOP7000 that I think would fit the bill perfectly, but unfortunately it is discontinued and appears to be difficult acquiring today.

Hence, I figured it might be possible to buy the modulator separately from the IR eye, so basically my circuit would be [IR eye] - [IR modulator] - Arduino digital In. Alternatively build one, but the only I have seen is this that does not really seem to work that well, judging from the authors closing remarks.

Any ideas where I could buy one, or build my own in order to get the same result as with the discontinued TSOP7000?


texts: 60VAC resistive load (heater) on 220VAC?

texts: I need to run a ceramic fiber heater (Watlow part number vc401a06a, datasheet) at 220VAC. This particular part is rated at 60VAC, for 220W. Can I safely use this on 220VAC, if I'll be controlling it with an appropriate SSR? I'm currently using it on 115VAC with no problems, but I want to make sure I can use it on 220VAC. My alternative is to incorporate a step-down transformer and I really don't want to do that.


texts: How to recalculate amperes to amperes/micron (transistor characterstics)

texts:
I measured the transfer characteristic of P-type FET (so I have drain current versus gate voltage.)
The authors usually present results in μA/μm (microampere/micron) versus V (volt.)
Because I have the drain current in μA, should I divide my results by the channel width to get μA/μm?


texts: How is voltage divided between two reverse-biased ideal diodes?

texts:
Suppose we have two identical ideal diodes (without any resistance or voltage drop). We connect these two diodes in series, in the same direction, and reverse-bias them with voltage V. Now we have two series reverse-biased ideal diodes. There isn't any other element in the circuit.

What is the voltage value at the node between the diodes? Maybe one would say V/2 because of the symmetry, but any answer between 0 and V cannot be refuted. A reverse-biased diode can (ideally) have any voltage.


texts: How to model a DC/DC power converter with a pulsed load

texts:
I have designed a power converter for a travelling wave tube which regulates a high voltage output of 6kV and 3kVDC well, but when I move onto designing the control system transient response with pulsed load I am having issues with the regulation, and a large voltage jump occurs at the first transient event an it takes a while for it to return back to normal. I am unsure whether I am modelling the output load correctly - it is a travelling wave tube, which transitions from full load current of ~200mA to substantially zero load current (apart from resistor divider currents) at frequencies anywhere from 100Hz to 100kHz, at duty cycles anywhere from 50% to 1% respectively for each condition. I am using LTspice. At the moment, I am simply using a pulsed current source on the output as instructed by Analog Systems.

However I know that when the load is pulsed ON, there should be some voltage droop in the capacitor as it delivers charge to the load. Then when the load is pulsed back on, the capacitor should be recharged back to nominal. I do not seem to be getting this behaviour. I think I may not have modelled the output correctly - should the output caps themselves not be pulsed ON and OFF? Should I have an active switch at the top of the outputs to stop current flow to the load? I will show my current layout. If anyone has any alternative methods which better replicate a travelling wave tube / pulsed output would be greatly appreciated.

If it helps, my topology is a buck-current fed push-pull converter, which has a resonant snubber to reduce switching losses - but it is fixed frequency and regulated by the buck current - maybe this is what causes the large output voltage increase when the transient event occurs? Any advice on this would be appreciated also. See attached for pulsed load as of current.


texts:
I want to use the L9110 to drive 12V solenoids using my Arduino Uno. I bought this module to test with but ultimately want to design my own board. I desoldered the pull ups so I wouldn't be pulling my Uno pins up to 12V, for safety. My problem is that even with no load the chip is getting crazy hot and drawing around 60mA, which is about 720mW. This happens when I activate the output with pulling the inputs to opposite logic levels. I tried the same thing with 5V VCC and it barely went above room temp.

Thanks in advance.

simulate this circuit – Schematic created using CircuitLab


texts: Measurement of station grounding resistance and test electrodes

texts:
This is a pure electrical engineering question.

I have seen a request for embedding test electrodes and connect them by "disconnectable" joints to a few earthing bars inside a station building, in order to later test resistance to earth (or grounding resistance) of the station itself.

Since it is known that for a large station with a significant earth grid surface and vertical electrodes, the distance of removable test electrodes is recommended to be much larger than the maximum grid extension (IEEE Std. 80, Fall-of-Potential method), how embedded test electrodes in between grounding electrodes and close to the grid can serve the purpose? they will be unavoidably strongly coupled to the grounding system subject to measurement, that is in general a thing to avoid for meaningful and accurate results.

Do you have ref to standards, guidelines, past experience, good ideas?

Thank you fellows.


texts: What is S/P and P/S converter in communication?

texts:
I have a scheme that in it I have D/A which is digital to analog converter, and A/D but what is it P/S and S/P ?

And what is it used for?


texts: Coupling cofficient of coil in Resonant Series RLC Circuit

texts:
In the above diagram the circuit is in Series Resonance. Now we are asked to find the coupling coefficient K between coils L1 and L2.
For which i first calculated L(equivalent) as follows :

Leq = L1 + L2 + 2M ( Dots are in aiding position)
Leq = 12 + 3 + 2M (Assuming w = 1)
Leq = 15 + 2M (M denotes mutual inductance between two coils)

So the circuit becomes

Since The circuit is in resonace the XL should equal to Xc

  Xc = XL
-jw18 = jw(15+2M)
 -18  = 15 + 2M ( w = 1)
  -16.5 = M

Now, To find coupling coefficient K, we can use the follow formula

K = M / sqrt(L1*L2)
K = -16.5/ sqrt(12*3) = -2.75

Which is not possible, Since Range of k should be 0 < K < 1.
Where am i wrong ? Please Help...


texts:
I've spent the last hour trying to get an incremental encoder working with an mbed module.

Keyes KY-040 Rotary Encoder https://www.amazon.co.uk/gp/product/B079H3C98M/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1

LPC1768 mbed module os.mbed.com/platforms/mbed-LPC1768

The code I've written is as follows:

    #include "QEI.h"

Serial pc(USBTX, USBRX);
//Use X4 encoding.
//QEI wheel(p29, p30, NC, 624, QEI::X4_ENCODING);
//Use X2 encoding by default.
QEI wheel (p5, p6, NC, 20);
DigitalOut led1(LED1);
DigitalOut led2(LED2);
DigitalOut led3(LED3);
DigitalOut led4(LED4);

int main() {
int x;
led1 = 0;
led2 = 0;
led3 = 0;
led4 = 0;

    while(1){
        x = wheel.getPulses() % 4;

        if (x == 0){
            led1 = 1;
            led2 = 0;
            led3 = 0;
            led4 = 0;
        } else if (x == 1) {
            led1 = 0;
            led2 = 1;
            led3 = 0;
            led4 = 0;
        } else if (x == 2) {
            led1 = 0;
            led2 = 0;
            led3 = 1;
            led4 = 0;
        } else if (x == 3) {
            led1 = 0;
            led2 = 0;
            led3 = 0;
            led4 = 1;
        }
    }

}

I've tried both pull up and pull down resistors on the lines, but the mbed is not showing any sign of processing these. In all likeliness, I've made a wiring mistake.

Does anyone have a schematic I can follow on how to hook it up correctly?


texts: Mirror bottom overlay designators in Altium

texts:
When I generate a layout documentation in Altium, I want that the outline of the PCB is always the same. E.g. not mirrored when I look at the bottom layer.
But this way the bottom overlay designators are mirrored.
Is it possible to mirror the bottom overlay designators in the pdf generator without manually to have to mirror the designators and move them to the right position afterwards?
Mirroring them manually has the disadvantage that they have been moved around.


texts: Determine transconductance of a JFET given only voltage gain and internal drain resistance

texts:
I have a homework question as follows:
If a JFET having a specified value of rd=100 kΩ has an ideal voltage gain of Av(FET) = -200,
what is the value of gm ?

As far as I know, the closest formula for gm relating Av and rd is Av = -gm(rd||RD)
but RD is not provided in the question. I would use RD=0Ω, but that would result in  1/(1/100kΩ)+(1/0Ω), which is undefined. Is there some other way of doing this?


texts: NiMh switch-mode charger for 6-cell NiMh

texts:
I've built a charger for my batter (NiMh 6-cell 7.2v) using MAX712 IC.

The problem I'm facing is that it's in a linear mode which requires either a huge heatsink or a heatsink with a fan (9W). See my previous question - MAX712 charging circuit - diode gets too hot

The charger has to be a part of a robot, so size does matter.

I was looking at using MAX712 in switch-mode, which is possible, but requires substantial work:
https://www.maximintegrated.com/en/app-notes/index.mvp/id/4496

Someone suggested to use DS2715 instead which is switch-mode natively.
This charger uses temperature change (Dt/dt) for detecting charge termination instead of voltage drop that MAX712 uses. My battery doesn't have a thermistor built-in.

So my questions:
 1. Can I just glue thermistor on top of the battery pack so it would allow me to use DS2715?
 2. What is a better method - voltage drop detection or temperature change (Dt/dt)?
 3. Any other battery charging ICs I should consider?

Cheers,
Leonti


texts: Discharging a capacitor without a resistor

texts:
Is the following circuit considered un-safe? That is, can a capacitor be discharged with a bare wire connecting the two terminals, or should some resistance be applied? Why or why not?

Additionally, what are the more common ways used to discharge a capacitor?


texts:
In my current project I need a high-side PMOS to disconnect a load once a over-current or (downstream) over-voltage condition is detected. Obviously without a permanent latch, once the PMOS opens, an over-current as well as over-voltage will disappear, which would let the comparators re-close the PMOS. This is all fine since I generally assume transient faults, that should disappear after power-cycling. However, should a permanent fault occur, the PMOS would alternate between open and closed state rapidly, which in case of a short would lead to high high pulsed current that drain the batteries quickly.

Therefore I need a minimum-off timer to keep the PMOS in open state for a short (20ms - 50ms) duration after a fault has been detected. This would allow return into operational state for transient faults, while also minimizing the impact of permanent faults.

I know that there are ready-made IC like the LTC4364 and similar from MAXIM but these seem to be in short supply at least in small quantities and are also rather expensive.

My current approach, without the minimum-off timer, looks like this:

simulate this circuit – Schematic created using CircuitLab

My first bet was the venerable 555 timer or other general purpose retriggerable monoflop but my supply voltage requirement of Vin,max 36V rules out all parts that I am aware of. Please correct me if I am wrong!

This leaves me with a discrete solution, resorting to a BJT monoflop. It is triggered by the OK open-collector output of the comparator. When a error occurs, OK is pulled low and C1 discharges, all while the PMOS gate is pulled up by the PNP of the first schematic. When the PMOS opens, the comparator also stops pulling OK low but slowly charging C1 keeps it there for some time.

simulate this circuit

Please review by schematics! I am especially unsure about the working of the monoflop, since I have the feeling I might be using it in a slightly unusual way. I also have not yet breadboarded the thing but only simulated in LTSpice so far (which works fine).

Clarification: Vin, max 36V is only the maximum fault withstand voltage. Maximum working voltage is 12V.


texts: Does the gauge of wire make any difference when wiring the inside of an electric guitar?

texts:
I'm replacing some of the electronics inside my electric guitar.  I have some wire I've used for electronics before, but it seems to be thinner than what's normally sold as 'Guitar hookup wire', so I'm wondering if it would suitable.

Could the sound possibly be affected by different wire, particularly given the very short distances involved?


texts: Where do electric circuit topologies come from?

texts:
The question is pretty straight forward but allow me to expand.
If not clear, by circuit topologies I mean connections between circuit elements/blocks.
What branch of mathematics deals with this? Do electrical engineers study such stuff, in what domain?
The reason for asking this question is, I see circuit designs that use a specific circuit topology but not how topologies are derived. Please shed some light on this.
P.S: I'm an EE student so I do have a rough-idea that a lot of it comes down to R&D of such stuff. I'm more interested in abstract tools (i.e mathematical ideas in layman language) that revolves around such stuff.


texts: Glitchy Touchscreen Caused by Charger extra question

texts: In this thread Glitchy Touchscreen Caused by Charger the answer states it is from the USB charger not being rated high enough. I am using the Moto G 1st gen and upon using a charger rated for 5v 800 mah I experience the same issues. The only thing is that the Moto G is rated 500 mah to 1.5A. In the comments of this post i found a link to this How can electromagnetic interference from a USB charger cause a capacitive touchscreen to malfunction? . Which is the real solution, as when the charger is not plugged into the phone but into the wall nothing happens. One of the wierdest thing i have observed is that upon pluggin the phone into the cheap charger while holding it in one hand and using my laptop touchpad with my other hand it too wacks out until i stop holding the phone. I have also used another charger and it does work perfectly fine with that one, sort of strange. Hopefully you have an answer, thanks.


texts: What's wrong with this latching relay circuit?

texts:
I've been told that this relay circuit should latch.
I built it and it does not.
I want the LED light to stay on after the N.O dP switch is is closed and then released back to its N.O. state.
Using 24 VAC power with a 24 VAC LED signal light.
I'm wondering if the LED is somehow interfering with the relay coil action.  Otherwise I don't see any thing wrong with the circuit design.
Any ideas?


texts: How many flip-flips would this code require?

texts:
H,
I'm trying to understand the below code what how many FFs would be required when synthesis.

TEST1.

wire aclk;
reg [2:0] a;
reg [2:0] b;

always @(posedge aclk)
begin

 a <= b;
 b = a+1;
end

TEST2.

wire aclk;
reg [2:0] a;
reg [2:0] b;

always @(posedge aclk)
begin

 b = a+1;
 a <= b;

end

I'm confused that TEST1 and TEST2. I think 2 above codes are working as the same, But I've got the different result of synthesis.

First is 6FFs and last thing is 3FFs,

So I'm confusing this.


texts:
Does anybody know what kind of sensors are used in these scales?

I've found lots of S-shaped tension sensors like this one.

I've Googled quite thoroughly for few hours and can not find anything matching my requirements.

So they are:

Small;
Precise;
Sub 100g scale, ideally sub 50g;
Relatively cheap (under $70).

Of course I have an option to just buy and tear down that hook scale I mentioned, but I hope you guys know what can be used there.


texts:
I have set up serial communication between my Arduino and a sensor stamp.

The sensor stamp in question is Atlas Scientific EC stamp.
The communication uses RT232 RS232 serial protocol.

The replies I get are often garbled, and after some transmissions the Arduino then falls out of sync, while the sensor board continues transmitting data.

Some people have recommended installing a bypass capacitor.

What is the right position and size for a bypass capacitor in my setup?

The board and Arduino have common 5V and GND, while TX and RX pins are crossed.


texts: Connecting cables when end point rotates 360

texts: I need to be able to rotate raspi camera 360' by motor and up/down by servo. The problem is that when I rotate it 360', all camera cables will tangle up. What is the method to make it right? I need camera, servo and lighting cables to go through that motor.


texts:
I have a board (Krida electronics, not mine) that uses 2-pole PCB screw terminal blocks with 0.2" (5mm) pin spacing for Line & Neutral input. The conductive parts inside the block are very close together. Worst case scenario, there could be a 0.0275" (0.7mm) air gap between conductive parts. As a hobbyist, this normally freaks me out (I usually leave 5mm air gap for L-N separation).

Is there an equation or UL spec that I can use to calculate if this gap is safe?

Also, before someone suggests this: If this was a permanent installation, I would insulate the terminals with hot melt (assuming the device didn't hear up too much)


texts:
My projects consists of:

Arduino Nano
1m 60Leds 12V LedStrip (white)
1m 60Leds 5V controllable LedStrip (RGB)
5V power supply
step up converter (from 5V to 12V)
potentiometer
some trigger buttons
some sensors

I'm making a "lamp" of sorts, that would be controlled through Arduino Nano.
I'm powering it with 5V power supply (phone charger); I have step up converter setup for 12V; potentiometer output 0V-5V to Arduino analog input.

One of the functions would be "dimmable LEDs", controlled by Arduino, according to audio and light sensors.
This is no problem for the RGB strip, as they have additional data pin and I can control them that way, but when it comes to 12V white LEDs...
Using lab bench power supply I found out, that white LED strip turns on at 8V and with voltage rising to 12V it gets brighter.
The natural thought was "put a potentiometer there", but I'm already using one potentiometer, as analog input for Arduino (so 5V).

I don't want to use another potentiometer, as it would be against DRY (Don't Repeat Yourself).

I've seen "solutions", as to use PWM together with MOSFET to run the 12V LEDs, but I don't want to introduce "flickering" (even though it might be insusceptible to humans, it may affect my kids falling asleep [they seem to not be able to fall asleep with LEDs connected to mains, while they can with old incandescent bulbs]).
I've also taken a look at "digital potentiometers" (like FM62429 or X9C104), but they all seem to be made for audio signals or lower voltage usages, not 12V.

Soo, my questions are:

Is it possible to make "nice" 8-12V DC using MOSFET and PWM?

Can I make some circuit that would use digital potentiometers and not overheat them?

Is there a better way to make that project work?


texts: What is the difference between Ohmic and Non-ohmic devices?

texts: Besides the fact that one does not following Ohm's law, are there any other differences between these conductors?


texts: Making PWM with analog input control in PIC18F4550

texts:
I am trying to program with the PIC18F4550 a PWM with which I can regulate the duty-cycle with a variable resistance.

I attach my code to explain the problem I have.

#pragma config CPUDIV = OSC1_PLL2
#pragma config USBDIV = 1
#pragma config FOSC = HS
#pragma config FCMEN = OFF
#pragma config IESO = OFF
#pragma config PWRT = OFF
#pragma config BOR = OFF
#pragma config BORV = 3
#pragma config VREGEN = OFF
#pragma config WDT = OFF
#pragma config WDTPS = 32768
#pragma config CCP2MX = ON
#pragma config PBADEN = ON
#pragma config LPT1OSC = OFF
#pragma config MCLRE = ON
#pragma config STVREN = ON
#pragma config LVP = ON
#pragma config ICPRT = OFF
#pragma config XINST = OFF
#pragma config CP0 = OFF
#pragma config CP1 = OFF
#pragma config CP2 = OFF
#pragma config CP3 = OFF
#pragma config CPB = OFF
#pragma config CPD = OFF
#pragma config WRT0 = OFF
#pragma config WRT1 = OFF
#pragma config WRT2 = OFF
#pragma config WRT3 = OFF
#pragma config WRTC = OFF
#pragma config WRTB = OFF
#pragma config WRTD = OFF
#pragma config EBTR0 = OFF
#pragma config EBTR1 = OFF
#pragma config EBTR2 = OFF
#pragma config EBTR3 = OFF
#pragma config EBTRB = OFF

#include <xc.h>

#define _XTAL_FREQ 20000000L

void ADC_Initialize()
{
    ADCON1bits.PCFG = 0;
    ADCON1bits.VCFG = 0;
    ADCON0 = 0;
    ADCON2bits.ACQT = 3;
    ADCON2bits.ADCS = 5;
    ADCON2bits.ADFM = 1;
    ADCON0bits.ADON = 1;
}

unsigned int ADC_Read(unsigned char channel)
{
  ADCON0 &= 0x11000101;
  ADCON0 |= channel<<3;
  __delay_ms(2);
  GO_nDONE = 1;
  while(GO_nDONE);
  return ((ADRESH<<8)+ADRESL);
}

#define TMR2PRESCALE 16
long PWM_freq = 8000;

void PWM_Initialize()
{
    PR2 = 0x26;
    CCPR1L = 1;
    TRISCbits.RC1 = 0;
    TRISCbits.RC2 = 0;
    T2CON = 0x03;
    CCP1CON = 0x0C;
    TMR2 = 0;
    T2CONbits.TMR2ON = 1;
}

void PWM_Duty(unsigned int duty)
{
  if(duty<1023)
  {
    duty = ((float)duty/1023)*(_XTAL_FREQ/(PWM_freq*TMR2PRESCALE));

    CCPR1L = duty>>2;
  }
}

void main()
{
  int adc_value;
  TRISC = 0;
  TRISA = 1;
  TRISD = 0;
  ADC_Initialize();
  PWM_Initialize();

  do
  {
    adc_value = ADC_Read(4);
    PWM_Duty(adc_value);
    __delay_ms(50);
  }while(1);
}

If I execute the above code, what I have at the output of the PWM are 0v and a frequency 0.
As shown in the following image

If in the fixed code the value of the PWM Duty (580), for example.

Then I stop running the analog input.

So it seems that the PWM signal is regulated and I have a voltage at the output.

As I show in the following image.

What I do not understand is that in neither of the 2 cases the frequency is 0, when it should be approximately 8000Hz.

On the other hand I see that if I set the duty_cycle it seems that it regulates and gives voltage to the output.

So there must be a fault in the part of the analog input that I have not been able to find.

Finally, I leave a picture of the circuit.