texts: can we do one always inside another always for verilog?

texts:
I am wondering if the following statement could be supported by verilog. Basically I would like to be inside the posedge clock detection, in some cases to trigger a negedge detection as well. Is it doable?

I basically want to generate a divider (both even number and odd number). For example, for divider number of 10, I would only count the positive edge to generate a 50/50 duty cycle clock. in this case, only the positive clock edge detection is fine.

However, for divider number of 11, I would like to count the negative colck edge as well in order to generate a 50/50 duty cycle. So inside the positive clock edge detection, I would like to have a negative clock edge detection as well.

Can the negative clock edge detection be placed inside the positive clock edge detection loop?

  Always @(posedge clk) begin
     if (n=10) begin
     always @(nededge clk) begin
          n=5;
          end
     end
     else
     xxx
     end
endmodule


texts: Solve a circuit with the nodal analysis (1)

texts:
I have the following circuit...

...and I want to find Vo with the nodal analysis.

At node 1 (V1):

V1 + 40 + (V1-Vo)/2 + 5 = 0
2V1 + 80 + V1 - Vo + 5 = 0
3V1 - Vo = -85

At node 2 (Vo):

(V1-Vo)/2 + 5 + (Vo+20)/8 + Vo/4 = 0
4V1 - 4Vo + 40 + Vo + 20 + 2Vo = 0
4V1 - Vo = -60
Vo = 4V1 + 60

Then V1:

3V1 - 4V1 - 60 = -85
V1 = 25 V

And Vo:

Vo = 4V1 + 60 = 4*25 + 60 = 160 V

But something is wrong, because the solution is Vo = 27.27 V (source).


texts:
So, I can get push-to-break switches that will break my circuit when pushed in. I assume this is how the light in my fridge works.

But how do these works? I would like to make something like this, but I have no room for a switch. My door closes very tight and I cannot drill any holes or mount any switches where it closes.
I can, however, run a wire on the door and on the flange it closes against, and have them touch to complete my circuit.

So I imagine, that using the push-to-break functionality, I can break when the wires touch, and un-break when they no longer touch.

I have no clue how to achieve this though. Maybe I am even thinking about this wrong.

How can I turn my lights on, when the door is open?


texts:
My experience is that when I'm running, my fingers "don't work" on my phone screen.

My understanding was that the sensor on a touch screen works on static-charge, ie that you act as an 'earth' to the screen and it can sense the difference in charge.

Surely sweat on your finger would increase the conductivity of electric current?

My question is: Why does a sweaty finger neutralise the touch-sensor on my phone screen?


texts: Are cutoff frequencies of bandpass and bandstop filters equal?

texts:
Consider the two filter in picture

simulate this circuit – Schematic created using CircuitLab

Are the cutoff frequencies (i.e. the two frequencies at which \$V_{out}=\frac{1}{\sqrt{2}} V_{in}\$) the same for the two filters? (And therefore also the bandwidth is the same for the two filters?)

I think they should be the same since in both cases the condition \$V_{out}=\frac{1}{\sqrt{2}} V_{in}\$ reduces to

$$R^2=(\omega L-\frac{1}{\omega C})^2$$

Nevetheless it is strange that there is a frequency for which both \$V_{out}\$s taken at resistor and at LC series have the same value \$\frac{1}{\sqrt{2}} V_{in}\$.

Doesn't this violates Kirckoff voltage law? (At any time it should be
\$V_{in}=V_{R}+V_{LC\ series}\$ but if \$V_{R}=V_{LC\ series}=\frac{1}{\sqrt{2}} V_{in}\$ then this is not true).


texts: How would you increase voltage to drive an LED yet also keep it limited?

texts:
I have somewhat of a special situation. I have a telephone system at the performing arts center I work at, and I need to make some of the phones flash an LED with no audible ring. My predecessor came up with a way and did this on two of the phones, but it has a bit of a flaw that I am attempting to solve. Just as a quick background, we have an Avaya Partner phone system, and the phones that have/are to be modified are system phones with speakerphone in them. These phones ring through the speaker. On the phones my predecessor modified, he installed a SPDT switch on the positive lead for the speaker, so that when the switch was "off" an LED would flash and the ring wouldn't sound, when the switch was "on" the ring would sound but the LED would not come on. This setup is perfectly fine, except for one issue: the ring volume must be turned all the way up in order for the LED to flash. This creates a big issue in that if someone turns the switch on for either the ringer or speakerphone and forgets to turn it off, the ringing telephone creates a big disruption during the performance taking place. The ring volume on these system phones is digitally controlled in about 14 steps, and the LED will only start to flash dimly around the 10th step, and finally bright at the 14th. I bought various LEDs to see what would work best, and found two that would light bright enough, first one being FW supply 2.4v (max) FW current 20mA and the second FW supply 1.8 typ 2.4 max FW current 20mA. Both of these still require the ring volume being turned up as much as I previously stated.

What I am trying to figure out if its possible to do is to be able to increase the voltage to drive the LED with the ring volume at the lowest level. I also assume that if the voltage was increased to drive the LED, I would also somehow have to limit it to protect the LED from burning out in case someone turned the ringer up all the way. The only markings on the speaker are 24ohms 0.2w.

My questions are:

-Is there a way to make the LED work as I described?

-Is there a better way/different place to hook in the LEDs so that they will flash when the phone rings and just install a switch to turn off the speaker?

-Do I need to find a power supply on the board in the phone and tap into that to drive the LEDs instead? The phone system supplies 48vdc on pins 3 and 4 to power the system phones (was reading 45vdc with the system phone connected).

I spent hours searching around to find a way to do this but I had very little luck and most of what I found were phone flashers that were external and would need either a battery or power supply to operate, and I wasn't sure if our phone system would put out the necessary AC and Hz to make them work correctly. I also didn't want to risk burning out an extension on our phone system since some said there was a possibility of damage to the system. I would like to keep any necessary circuitry contained to the phone if possible.

I am still a bit of a beginner with this so any advice and thoughts would be greatly appreciated!


texts: Problems Building Variable Frequency Wien-Bridge Oscillator

texts:
I have been doing some experiments with Wien-Bridge Sine Wave Oscillators, specifically trying to make one where frequency can be controlled via a single knob, using a dual ganged potentiometer. I am basing my design on the following circuit from page 29 of Analog Devices App Note 43:

I am replacing the two 1.6k resistors with each of the gangs of a 100k dual potentiometer.

I have been noticing some strange behavior. Rather than creating a variable frequency oscillator the circuit only oscillates when the potentiometer is set to a very specific range of values (~1k ohms). As I turn the knob away from this range the oscillation first becomes unstable (very jittery in oscilloscope) then disappears. Does anyone know the reason for that this is happening?


texts: Measuring potential between two pins below ground

texts: I am trying to use a Raspberry Pi to measure the amperage used by a boat's electrical system. The boat has a shunt pre-installed just before the battery ground. I have a Pi with an ADC installed behind the main DC panel reading other battery voltages. I'd like to use the Pi to measure the voltage across the shunt to check amperage. The problem I have is that because the shunt is right next to the batteries (no load in between) its voltage is lower than the ground where the Pi is installed.  The Pi's ground needs to run through about 20' of load carrying wire before getting to the shunt. Typical voltage across the shunt that I want to measure is 1 to 50 mV. The low end of the shunt sits about 60mV below the Pi ground. I've fried an op-amp and an ADS1115 that worked fine on my workbench where the shunt is not lower than the ground. I would tie the pi ground to the shunt directly but I'm not sure if that would affect some of the other things I'm reading with it. Can I use a separate IC with its ground at the shunt level and still have it communicate via I2C with the Pi, or would the different ground levels break something? Or is there some other circuit I could use? Attached is a schematic of what I need to measure.


texts: Frequency modulation and communication between two microcontrollers

texts:
I have good progamming skills and concepts on 8051 microncontroller. People suggest me to work on PIC and ARM micro-controllers but I want to make some small projects on 8051 and later move on to complex micro-controllers.

I have decided to do some wireless operation using two micro-controllers. Well the idea is to send certain information from one micro controller to other micro controller. for example I would give some input to one microcontroller like some hex value 55H and that micro controller should send this input value to the second micro-controller and  the second microcontroller should perform the operation based on the input value I  have given.

Well I guess, I require some FM transmitter and reciever IC's in my circuit design but to be honest I dont know what type of FM IC's I should prefer. I could not find a better notes on the internet about FM IC's.I just saw infrared techniques using micro controller but its only for short distances may be 10 meters.

Could any one kindly provide me some links on FM transmitter and receiver IC's and  how to use the FM IC's with 8051 micro-controller in transmitting and recieving its data to other micro-controller using FM techniques.Thanks


texts:
I'm building my first PCB design using EasyEDA tool and I have some concerns to avoid errors after printing. Here is my circuit (I hope it's clear enough):

I'd like to know are the spacing between the components okay enough or not (each grid block is 0.1*0.1 inches).

I also want to know, is it okay to have the labels on top of the wires?

I've used DIP8 IC's, when it's printed can I put an IC socket first then mount my IC on it or should I change my design to have 8 pin IC sockets instead of my original ICs.

Finally, what is the best way to check it for errors before sending it to be printed?

The dimension of the board are (3.0315*2.019685 inches)
Thanks

EDIT: I took your tips and rearranged the circuit to reduce the tracks' length. I also added the capacitors near the IC's. The supply tracks width were doubled as well.

EDIT2: I increased the clearance and the track width for all of them. I also changed the pads' shape for the IC to have bigger pad size.It looks better now.

Edit3: RG (10k) is now closer to the amplifiers.


texts:
The sensor is a DS18B20, I accidentally connected the positive and negative inverted to the sensor and it became very hot then I quickly disconnected the power.

I don't have any other calibrated temperature sensor at hand to check if the temperature reading is correct or not, only a mercury thermometer. The temperature reading from mercury thermometer is around 1.3°C less than the reading from DS18B20...

How can i tell if I damaged the sensor or not?


texts: Analysis of Negative Input Resistance Op Amp

texts:
simulate this circuit – Schematic created using CircuitLab

I'm having a difficult time analyzing the circuit shown and would appreciate some help.  I'm just curious in order to get better at op amp circuit analysis.
 This circuit and others like it come from the following source:

https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19940020710.pdf

I'm getting lost on the way the author of that paper is determining the equations for Vout, and having a feedback path to both terminals of the op amp is really throwing me off!  Thanks for any suggestions.


texts:
I'm learning LTSPICE and am very confused by the results coming from playing around with P-channel MOSFETs.

I created a very complete test of P-channel and N-channel MOSFETs, and all the N-channel results make sense to me, but can someone please explain what's going on with the P-channel?

M1 behaves as a forward biased diode with a voltage drop of about 0.105 V (seems small but believable).

M2, which according to my understanding of P-FETs should behave like a closed circuit, behaves virtually identically to M1.

M3 and M4 are also identical, and the results are:

M4, which is likely the most useful configuration, has a waveform that makes sense, but the numbers don't make any sense. Shouldn't this work as a switch, meaning that the voltage should go between roughly 0 and roughly 20, not 19.898 and 19.895? (R_ds,on = 0.035 ohms) And M3 is the same - is that okay?

Lool I was fighting with a more complicated simulation all day and finally decided to go back to the basics, and now I'm just more confused...


texts:
I'm ass deep in my next project.....4 LED cubes(small lanterns) on the ceiling...
The strip is:
Power: 0.1-0.4W/LED 6W-24W/m Total: 30W-120W This is a variable value
Have a 12V power with enough AMPS.... they wiill be laid out on the ceilling in a square about 8ft between each "node"
There will be about 54 leds on each node...
What I'm not sure of is wire thickness...on an RGBW the pads are quite small.....
The run from the power to the first light will be about 14ft(corner of the layout) then of course there is back from each RGBW back to the ground...
i'm kinda scratching my head at wire size.....12V LEDs..


texts:
I am working on an exhibition where I want to use DIY, self-made directional speakers for transmitting interviews to the visitors.

Until now I have seen a couple of video on Youtube like the one listed bellow

Diy video of the directional speaker

This exhibition in Berlin seems to have used some type of directional speaker but I am yet unsure what exactly they have used. Link.

My question is as follows:
What would be the best solution to include some directional speakers in my exhibition?

In case I build the diy model, from the video, will the voice from the interview be clear enough for the visitors to understand.


texts: Can I use a TRIAC on a secondary isolated AC winding?

texts:
Can a TRIAC be used on the secondary winding of an AC isolation transformer?

Say I have 230 V on the primary, but I want to use the 12 V AC secondary, will a TRIAC work on the secondary?

What I want to achieve is this: Use the TRIAC on a secondary winding (say 12-24 VAC) to use on a spot welder. The control pulse to the gate of the TRIAC will be delivered via two optocouplers (one for the positive cycle and one for the negative cycle) of the AC wave. The optocouplers will be controlled by a single-shot (mono-stable) pulse from a 555.


texts: AC/DC - Current generator with short circuit

texts:
I have the following circuit (AC regime):

I am given the current I in the branch 4-5. I don't understand what happens with Ig2 here. Is it annulled? Should the circuit look like this:

What would be if, instead of current generator Ig2, we had voltage generator, E1 for example? Would it be annulled?


texts:
I have a DOS Based "black box" which prints out to the parallel port,
the need is to capture these data for later analysis.

I saw some project based on FT245R, do you have any suggestions ?


texts:
After moving into a new house I plugged my oscilloscope in and turned it on. After booting there is a constant 1.4-2.0 MHz signal being picked up. If I ground the scope with my hand on the probe lead it doesn’t produce the expected mains hum.

Disconnecting the probe however produces the mains hum as expected.

I have tried switching probes, channels, and plugging it into a socket directly instead of a surge protector in case the surge protector earthing is bad. None of it solves the problem. Holding the probe up to various electronics equipment doesn’t produce a difference in signal. Raising the probe up and down seems to alter the amplitude but not the frequency.

What could be the issue? This is rendering my scope unusable.

EDIT:

I am using a Rigol DS1054Z. I have driven around a few blocks in any direction and I don’t see any towers that would be a source of distortion. I am near a WiFi router (the one I’ve always had) but that is operating at 2.x and 5.x GHz.

I am operating the probe in 10x but turning that off doesn’t do anything.

The period of the signal is around 500-900ns. The frequency varies between 1.13 and 2.59 MHz.

EDIT AGAIN:

Took a multimeter to my sockets and discovered while it appears to be grounded, hot and neutral are reversed.

It would appear my oscope is ok. Connecting probe to test and grounding the plug on one of the bnc channels produces a clean square wave after hitting “auto”. Will need to construct a loop antenna to find the source now.


texts: Design doesnot work properly when clock net delay is slightly higher in spartan3a fpga

texts:
I am running my design on spartan3a 3s700afg484 at 50 mhz.

There is no set up and hold time violations.

There is only one global clock net.

My clock report for two runs are

RUN 1:

Info: [707]: |        Clock Net    |   Resource   |Locked|Fanout|Net Skew(ns)|Max Delay(ns)|

Info: [707]:  |             clk_int | BUFGMUX_X2Y11| No   | 2056 |  0.236     |  1.213      |

Post pnr frequency is 140 mhz

I have compiled my design for some timing optimizations and I got below results.

RUN 2:

Info: [707]: |        Clock Net    |   Resource   |Locked|Fanout|Net Skew(ns)|Max Delay(ns)|

Info: [707]: |             clk_int | BUFGMUX_X2Y11| No   | 2049 |  0.216     |  1.191     |

Post pnr freqency is 112 mhz

Note that clock net delay is lower in RUN 2 and it functions properly.

Post pnr frequency is higher in RUN 1 but designs doesnot function properly on fpga

Only difference between two runs is that RUN 2 is compiled with some timing options. I have simulated the post pnr netlist and it works fine.

What can be possible problem ? I want my design to function properly for RUN 1, since it has higher post pnr freqency.  If clock net delay is the problem, then how to reduce it?

Thanks,


texts: Is D flip flop can be combination circuit?

texts: I read that circuits are two type combinational and sequential. In combinational circuit the output depends on present state/input i.e the previous state do not effect the present output. but D flip flop have characteristic equation Q(t+1)= D which means here also output at any time follow the input only ... so can we say that D flip flop is a kind of combination circuit instead of sequential circuit...


texts:
I'm trying to create a MOSFET based switch device. I want to control the gate with some GPIO pins (H = 3.3V, L = 0V). I understand there must be a positive voltage (VGSth) between gate and source in order current can flow from drain to source.

simulate this circuit – Schematic created using CircuitLab

My Question is, can there be different voltage sources like in my schwematic with common ground? As I understand, R2 only restricts the current flowing from GPIO to GROUND since there is almost now current flow between Gate and source because of it almost infinite impedance. If this assumption is correct, can't be R2 have an almost inifinite impedance too like 10M ohms?

The purpose is, that I wand to provide an external power source BT2 that can provide far more current than BAT1 power source.

Is there something I'm missing in order to work?


texts: Impedance matching (RF transformer) - Impedance dependence

texts:
I'm using a TC2-1TG2 1 to 2 impedance trasnformer. I want to convert a 50 ohm load to 25 but I'm finding that the transformer only works for 50 to 100 as seen in the following simulation:

Is there something that can be done about this?
Thank you,
Joao


texts: Made a mistake of connecting pin-1 NC of MPU6500. Will it affect my pcb?

texts: Yeah I made a mistake but the pcb is on the way and I cannot cancel it. I mistakenly connected the pin-1 NC of MPU6500 to VDD(Yeah even bigger mistake). So anyone who has worked with MPU6500 know if it will affect the IC function or it will still work properly?


texts: In a buck boost inverting converter is there any difference exchanging the position of the diode from the positive to the negative rail?

texts: In a buck boost inverting converter is there any difference exchanging the position of the diode from the positive to the negative rail keeping the same current rotational direction ?


texts: Why are pull up resistors more common than pull down resistors?

texts:
I noticed that pull up resistors are much more common than pull downs, why?

For example, the Arduino's MCU has internal pull ups but these tend to invert the physical logic of things you are working with (such as working with switches) whereas a pull down resistor would do the same job and avoid the logic issue.


texts: PCIe card powered but not recognized on custom interface

texts:
I have a black magic declink mini recorder card that I am trying to recognize on a small form factor linux machine (debian 3.2.46-1 x86_64).  I have made a custom interface board with what I think are the critical connections.  When I boot the machine, the card definitely powers on, I can feel the heat on the chip, however, the OS does not recognize it.  It is not a driver problem, they are loaded.  I have tested the card with the same MOBO on another custom interface and it works fine.  Here is what I have connected:

+12V

+3.3V

SMCLK

SMDATA

GND

TX+

TX-

Rx+

Rx-

PWRGOOD

REFCLK+/-

Hot plug presence detect 1 & 2 (PRSNT#1, PRSNT#2) - these are shorted to eachother.  I believe it is to detect when a card is fully plugged into the port as they are at the furthest ends of the card.

SMCLK and SMDAT are optional from what I read here: http://www.pcisig.com/specifications/pciexpress/technical_library/dev_con_09_02/specifications/pciexpress/PCIExpress_Cards.pdf

I got the pinout of the card here: http://pinouts.ru/Slots/pci_express_pinout.shtml

In order to check if it is recognized, I check lspci and lsmod for blackmagic.  On the other custom board, it was recognized fine and showed up in lspci and lsmod.

I don't think it is a differential pair problem as I have not had problems with USB 3.0 of LAN on the same board.


texts:
I have purchased a circularly polarized antenna with a gain of 2.54dBi at 1W. If you require additional specs please let me know. My question is does the gain of the antenna equals the multiply of the power, for instance, if the input power is 4W then the gain is 4x2.54=10.16dBi?

Or does it still remain at 2.54dBi at 4W?


texts: Understanding voltage and current of a phototransistor w/ collector resistor

texts:
I want to study the circuit of an Infrared proximity sensor, so I assembled a circuit with an infrared LED (940nm) and a phototransistor.

When no current passes from the LED, obviously the phototransistor is switched Off, thus the whole amount of current passes from the A0 branch. In that case I read from A0 a 1023 value which is equal to 5V for a 10bit ADC (Arduino).

When current passes from the IR Led, thus the Led is on, the phototransistor should be switched On, thus a considerable amount of current should pass from the phototransistor to Ground. Yet, even if LED and phototransistor are positioned extremely close, I read from A0 a value no less than 900, which means that only a 10% of the total current reaches the Ground.

I expected (and desired) when the IR Led is On, the value of A0 to be near zero, thus the phototransistor to be fully open and almost the whole current to pass from it.

Do I miss something there? Should I change something to the circuit or the components, in order to get an almost clear 0V or 5V?


texts: How data is stored in memory beyond 0s and 1s?

texts:
I am working as software Engineer. As far as I know the data being stored in memory (Either HARD Disk or RAM) is  0s and 1s.

I am sure beyond 0s and 1s there are different ways data being stored in memory devices based on memory device types.

Please share your ideas about it .

or

Where can I study about the how data stored in memory devices ?


texts:
I am using a 3V coin vibration motor and using a 3V coin battery. Red wire of the motor connects to 3V and the black/blue wire connects to GND. What happens if the terminals are connected incorrectly and the black/blue wire is connected to 3V? Will the motor not turn at all? Or will it turn and burn out?

Looking at the datasheet, the motor has 6 poles. Does that mean the motor can turn in one direction only?


texts: Verilog simulation: How can I start my circuit after the reset signal is turned off?

texts:
I tried to implement the simple FIFO and its test bench.

FIFO testbench code:

`timescale 1ns / 1ps

module fifo_tb();
  localparam B=4, W=2; //4bit sized 4 entry fifo
  localparam T=20;
  reg clk, reset;
  reg rd, wr;
  reg [B-1:0] w_data;
  wire [B-1:0] r_data;
  wire empty, full;

  fifo fifo
  (.clk(clk), .reset(reset), .rd(rd), .wr(wr),
   .w_data(w_data), .empty(empty), .full(full),
   .r_data(r_data));

  always begin
    clk = 1'b1;
    #(T/2);
    clk = 1'b0;
    #(T/2);
  end

  initial begin
    reset = 1'b1;
    #(T/2);
    reset = 1'b0;
  end

  initial begin
    wr = 1;
    rd = 0;
    w_data = {B{'b1000}};
    @(negedge reset);
    @(negedge clk);

    w_data = {B{'b0100}};
    @(negedge clk);

    w_data = {B{'b0010}};
    @(negedge clk);

    w_data = {B{'b0001}};
    @(negedge clk);

    $stop;
  end
endmodule

FIFO module code:

module fifo

#(

  parameter B=8, // number of bits in a word

            W=4 // number of address bits

)

(

  input wire clk, reset,

  input wire rd, wr,

  input wire [B-1:0] w_data,

  output wire empty, full,

  output wire [B-1:0] r_data

);

  reg [B-1:0] array_reg [2**W-1:0];

  reg [W-1:0] w_ptr_reg, w_ptr_next, w_ptr_succ; //tail

  reg [W-1:0] r_ptr_reg, r_ptr_next, r_ptr_succ; //head

  reg full_reg, empty_reg, full_next, empty_next;

  wire wr_en;

  //register file write operation

  always @(posedge clk)

    if (wr_en)

      array_reg[w_ptr_reg] <= w_data;

  //register file read operation

  assign r_data = array_reg[r_ptr_reg];

  //write enabled only when FIFO is not full

  assign wr_en = wr & ~full_reg;

  //fifo control logic

  //register for read and write pointers

  always @(posedge clk, posedge reset)

    if (reset)

      begin

        w_ptr_reg <= 0;

        r_ptr_reg <= 0;

        full_reg  <= 1'b0;

        empty_reg <= 1'b1;

      end

    else

      begin

        w_ptr_reg <= w_ptr_next;

        r_ptr_reg <= r_ptr_next;

        full_reg  <= full_next;

        empty_reg <= empty_next;

      end

  //next state logic for read and write pointers.

  always @*

    begin

      //successive pointer values

      w_ptr_succ = w_ptr_reg + 1;

      r_ptr_succ = r_ptr_reg + 1;

      //default: keep old values.

      w_ptr_next = w_ptr_reg;

      r_ptr_next = r_ptr_reg;

      full_next  = full_reg;

      empty_next = empty_reg;

      case ({wr, rd})

        // 2'b00 no op

        2'b01: //read

          if (~empty_reg) // not empty

            begin

              r_ptr_next = r_ptr_succ;

              full_next = 1'b0;

              if (r_ptr_succ == w_ptr_reg)

                empty_next = 1'b1;

            end

        2'b10: //write

          if (~full_reg) // not full

            begin

              w_ptr_next = w_ptr_succ;

              empty_next = 1'b0;

              if (w_ptr_succ == r_ptr_reg)

                full_next = 1'b1;

            end

        2'b11: //write and read

          begin

            w_ptr_next = w_ptr_succ;

            r_ptr_next = r_ptr_succ;

          end

      endcase

    end

  //output

    assign full  = full_reg;

    assign empty = empty_reg;

endmodule

As far as I know putting @(negedge clk); makes the code infornt of it

to be executed at the negative edge of the clock, and

putting @(negedege clk); @(negedge clear); back to back makes the code to be executed at the negatvie edge of the clock that generated after the clear becomes zero.

Therefore, I've expected that the first code block in initial block

    wr = 1;
    rd = 0;
    w_data = {B{'b1000}};
    @(negedge reset);
    @(negedge clk);

will be executed after the reset <= 0 and clk <=0 (i.e., 30ns in the below simulation).

However, the simulation result shows that the wr, rd, w_data are set at the first rising edge of the clock not at the 30ns. What code block generated this unintended simulation result?

I've tried to debug it, but still having a hard to find it...

I appreciate any help.


texts: Which side should I place a TO-220 transistor on a heat sink?

texts: On TO-220 heat sinks, there are usually two sides, on which the transistor fits easily. One side is more narrow, surrounding the transistor. The other side is more open. Which of these sides is thermodynamically best option to put transistor on?


texts:
I need a -300mV Voltage Reference for a Potentiostat circuit (http://www.sgxsensortech.com/site/wp-content/uploads/2012/10/AN2-Design-of-Electronics-for-Electrochemical-Cells1.pdf @ page 3). What is the best solution? If I can find a 300mV voltage reference I can use an inverting Operational Amplifier, but it seems that there are no 300mV voltage reference.
Thanks all.


texts: Need wireless communication technology options when long range is necessary

texts: I need to find a way for my cell phone app to "ping" a device (that doesn't have a service plan, etc.) and make it vibrate when pinged. Range needs to be at least 1km reliably. Also the device needs to be small, around the size of three nickels stacked. Ideas?


texts: I'm using a KSC1173 TO-220 power transistor in a design, and I need to calculate the case temperature for the maximum average power dissipation, to see if the power dissipation falls under the temperature derating curve in the datasheet for a particular heatsink.  Unfortunately I'm not sure what the case-to-sink thermal resistance of a TO-220 package is; it's not listed in the datasheet.  I suppose it will vary somewhat with the type of heatsink and mounting used, but does anyone have a ballpark figure?


texts: How to use two of this DC-DC converter synchronously to get more current output?

texts:
This is the DC-DC converter: http://cds.linear.com/docs/en/datasheet/37911fb.pdf

There is a clockout pin in the chip and in the datasheet it says:

  CLKOUT (Pin 33): Clock Output Pin. A 180° out-of-phase clock
  is provided at theoscillator frequency to allow for paralleling two devices
  for extending output power capability.

This is the block scheme of the chip:

I searched in application notes and example designs but there were no use of this feature in them. I need a clear explanation of the working principle and how to do this.


texts: How does this battery protection IC prevent overcharge/overdischarge?

texts:
As I was trying to understand how BeagleBone Blue is handling battery management, I encountered a battery protection IC (S-8261).

How does S8261 prevents overcharging and overdischarge? (ELI5)
BQ29209 and MP2615 also have overcharge and discharge protection, why would you need an aditional IC (S8261)?

Bonus Question

Battery out (V_BATT) is directly connected to motor drivers (TB6612FNG).

What's point of feeding the dc motors with a non-constant voltage(V_BATT)?

Source: https://github.com/beagleboard/beaglebone-blue


texts: Additional gain with in-amp for nanovolt-scale pre-amp

texts:
Currently I'm designing a pre-amp for detecting nanovolt-scale(~100nV, <1kHz) signal for experiment. I need a final gain to be around ~100000. Since the magnitude of the signal is extremely small, noise control is the major issue. So I am considering using AD8428 low-noise, fixed gain(G=2000) instrumentation amp (https://www.analog.com/en/products/ad8428.html) as the main amplifier and get some additional ~50 gain.
The two major options that I am considering to get the additional gain are,

A subsequent AD8429 low noise variable gain in-amp
PGA in ADC

And I have two questions.

Is using in-amp(AD8429, https://www.analog.com/en/products/ad8429.html#product-overview) to get additional gain rather than using PGA is the better option in terms of noise-control? Or is there any other recommendation?

If using additional in-amp is the best option, how should I stack them? It's hard to find a good method to stack two in-amps. Is there any good example?

I appreciate any advice you might have.


texts: How much continuous current is from the battery needed to power my piezo buzzer?

texts:
I have found these "bluetooth location stickers" on this website

http://www.sticknfind.com/product/sticknfind

Inside the stickers is a buzzer and a light. I am trying to build something similar, but with no light - just a buzzer - and I am trying to find a battery suitable for use with a piezo buzzer that has a rated current of 3mA.

This company says their stickers use a CR2016 watch battery. The examples that I found of CR2016 batteries seem to have a
Nominal voltage: 3V,
Nominal capacity: 75mAh,
Standard current: 0.1mA,
Continuous current (maximum): 1mA,
Pulse current (maximum): 10mA,

The lowest rated current piezo buzzer I could find here
http://www.microbuzzer.com/smd-piezo-buzzer
has a Rated Current of  ≤3mA (second from the top of the list)

Based on this data, is it safe to assume that a battery with a Continuous current (maximum) of 1mA can power a piezo buzzer (and drive circuit) with a rated current of 3mA? Am I missing something here? Wouldn't the buzzer demand more current?


texts: I have a simple application where I need to isolate a body connected instrumentation amp from recording equipment.  The floating side (patient) needs to be battery powered.  Coupling is to be analogue (as is the reporting equipment).   I am having trouble finding a analogue coupler chip that is low power and has reasonable isolation.  Hope someone may know of one - I could probably use plastic fibers if they can be driven with an analogue signal.


texts:
simulate this circuit – Schematic created using CircuitLab

I have been designing the same basic AB amplifier, trying to really understand all the intricacies of currents, voltages, and power flowing throughout the circuit. I have ignored all signal inputs for now as I am focusing on understanding the biasing with feedback in this circuit. The final circuit has capacitors, I have not included them for simplicity. I have built the circuit with appropriate caps, etc. The circuit works, but the transistors get very hot under quiescent conditions. (Have not yet included emitter resistors R1 and R2, which might explain the currents).

Modeling this circuit in spice, there is a 7.6mA total current supplied by V1.  The current flowing through the R3-D1-D2-R4 is 5.8mA and the current flowing through the collector of Q2 is 1.8mA.  This makes sense with KCL at node 1. The voltage at the base of Q2 is 6.2 volts.  Assuming 0.7 Vbe, the emitter voltage at Q2 will be 5.5 volts.  According to spice, the voltage at node 2 is 5.48 volts, or 20mV dropped across R1.  This won't work since 1.8mA is flowing through the Q2 collector (0.020/33 = 0.61mA), so am I missing how Q3 influences this?

Is something in the circuit causing a voltage drop across R3 of 5.8 V, or is something in the circuit causing 5.8 mA of current to flow through R3?  It kind of seems like a chicken v. egg. I don't know what is affecting what in the circuit.  Also, what is causing the 1.8mA through Q2?  If the voltage at the emitter of Q1 was known, the base voltage at Q1 could be known and also the voltage at node 2 due to the bias network.

What makes Q1's emitter voltage 0.5V as reported by Spice?  The collector voltage at Q1 is the same as the base voltage of Q3, which is two diode drops below the base of Q2.  But, I am then back to my first question.

It seems like there are a lot of unknowns, and if you can figure one of them out, the rest falls in place utilizing all the basic circuit analysis tools.  I have always struggled with where to start on a circuit like this though.

Finally, below is a picture of my Spice analysis.

Edit: I just simulated the same circuit without R1 and R2 and the currents do go way up (see below Spice analysis picture), which probably explains the heat.  I think my questions are still valid though.


texts:
Part A - Series RLC Circuit
1st. Get a Q-factor from the measured voltages at resonance;
I know the general formula for Q=1/R*sqrt(L/C)
L is 4.7 mH and C is 0.01 microF. R is 100 ohm.
If I get Q from the general formula, I get Q to be around 6.9. If I try a formula I found online to use voltages at resonance (in this case VC=VL=3.04), I get Q=VC/V. Since V is 1Vrms, I get 1=3.04/sqrt2 which is not near 6.9. Why? How can I calculate Q from the measured voltages? Also, resonancy frequency is 23215 Hz.

Why is there a difference between the values? I assume there were mistakes while doing the experiment, but how can I know which one is more accurate?

Part 2 Series R with parallel LC
Values of L and C are the same. R is 100 ohm. Voltage source is 1.5Vrms

1: How do I do a current versus frequency graphic for the parallel circuit? I know that the current entering the parallel must be equal to the one leaving for the series circuit (kirchoff's laws). Should I just get the current at VR and use it as the total current of the circuit?

2: How do I calculate an impedance of LC at resonance?This I really don't know how to do it and found no help online :(

Thank you in advance.


texts:
I am working on trying to understand more about a fan control circuit I came across and tested.
J1 will be connected to a 3.3V fan. My goal is to slowly turn the fan on depending on the temperature of some other chip, by using the PWM signal. I need the fan (J1 pin 2) to receive 2.2V at 50% duty cycle and 3.3V at 100% duty cycle.
Here is my understanding:

The user chooses what power source to power the fan with (3.3 or 5)
The PMOS is pulled high and is thus off initially (with no PWM signal)
The BJT base is pulled high so when there is no PWM it is not floating
R5 limits the current to the base
When the PWM signal starts, at let's say 50% duty cycle, the BJT should pull the PMOS gate down to turn the PMOS on and let the fan receive current.
As the PWM signal keeps going higher, lets say to 75%, the BJT should pull the gate even lower to turn the PMOS on more and let the fan receive even more current. And this continues to 100%.

My question is, without simulation, how can I calculate or get a rough estimate of what resistor values to choose? I want to avoid guess and check.
Thanks


texts: How to have an in-system check in an FPGA based system that it has been reset?

texts:
I have a system based on Altera's MAX10 device that is doing the following tasks:

receives the data and stores it on an on-chip flash memory only once.
reads all the data from on-chip flash, stores it into a 2D register and relays it to another system at a certain frequency.

The first part (i.e. reads all the data from on-chip flash, stores it into a 2D register) of the 2nd task is performed only once, but if the system resets it again needs to read from the flash. Now how can I check if the system has been reset, and after reset whether it earlier saved any data in the memory or not.
Further I don't want to perform a flash read operation to check whether the system has been reset or not and whether the data has been saved in the memory or not, because of its time cost. Would appreciate any ideas.


texts:
I have two components in parallel on a DC circuit driven by a single momentary switch. Each component is individually fused.

I need to detect failure of either fuse and in that event power on a warning indicator.

The most direct approach is to wire a NC relay in series with each fuse, but the specs of the circuit aren't tolerant to the voltage drop as power output from each component must be maintained.

I'd like to solve with common cheap components as this is a hobby implementation.

Any ideas?


texts: What is the slave address of the STM32 NUCLEO-F401RE?

texts: I am currently trying to learn I2C communications with two STM32 NUCLEO-F401RE boards and I am having trouble on how to figure out the slave address of the board. I searched the datasheets and the internet but could not find it and I'm not sure how to determine it.


texts: what kind of OS is present inside 'mbed'?

texts: mbed seems to be a good place to start a new project on ARM. And they are saying that there is an OS inside. Is that real time (RTOS) ? is that capable of multi tasking and inter-task communication ? is there any comparison with FreeRTOS ?


texts: Summing multiple audio signals while keeping a copy of the originals

texts:
First off, I'm a programmer and I have only a little experience with electronics and I'm aware that what I'm after may seem a little ludicrous.

My goal is to process the audio of an electric guitar with an MCU (most likely an Arduino for prototyping). Most specifically I want to process each individual strings by using piezo elements under each string. My ultimate goal is to convert this data to MIDI but in the short term I mostly want to experiment (e.g. building an on-board tuner etc.)

While I have a general idea on how to proceed to process the signals with an MCU, what leaves me pondering is that I also want to mix the piezo signals with the magnetic pickups of the guitar.

I cannot wrap my head around how to sum the piezo signals and mix them with the magnetic pickups while keeping the signals separated for the MCU to process. My basic knowledge of electronics tells me that I cannot simply have two leads from each piezo, one wired to the multiplexer and the other to the blend potentiometer, as this will connect all the signals together by the blend pot and thus all signals will be merged before reaching the multiplexer.

Here is a revised schematic of what I understand:

TL;DR To recap what I'm asking, I would like to know how you can mix (sum) a defined number of audio signals while keeping a "copy" of the originals in a way that further processing of the mixed signal won't affect the separated signals and vice-versa.

Additional info I forgot to say that the ADC requires a DC signal (if I understand correctly) so at some point the piezo signal must be offset by a reference voltage (e.g. 2.5V). I also assume that the splitted signal that blends with the magnetic pickups must remain AC. I'm a little confused on how to achieve that.


texts: Usefull 0402 and 0603 solderbridge footprints compatible with machine manufacturing?

texts:
I am currently in process of my eagle library cleanup, and came up with the idea to create a footprint similar to the one from nucleo boards. Those pads are meant to be easily bridged by just solder when modifying the board:

However I couldn't really find much useful information about specific layouts, especially things like pastemask layout and minimum safe gap on such pad shapes.

Goals of the footprint:
1) will take a surface mount resistor by pick-and-place
2) won't bridge if the resistor is not placed
3) can be easily (un)bridged by hand soldering
4) provide visual distinction between normal resistors and bridges on both schematic and PCB

Please note, that the goal of these footprints is not to replace original footprints specified in manufacturing standards, but rather make prototyping the product easier, when the ammount of devices is in hundreds rather than millions.

If anyone has any useful materials, or even clues where to find such info, it would be really nice to share them here.


texts: Can I reasonably expect a USB connection manage a 3.7 Volt 6-8 Watt output at 1.9 Amps or less?

texts:
I am thinking about making a 510 Vape eCig mod that runs directly from USB. The cart I would like to attach to the 510 head has a 1.8 ohm resistance atomiser in it and wants to see under 2Amps (or it will burn out). There are lower ohm atomisers that can be used (and higher). The important thing is to hit 6 to 8 Watts (closer to 8 where possible) without crossing the 2Amp mark. The standard battery on these things runs at about 3.7 volts.

Is this something that USB could sensibly be expected to handle? If so what limits should I expect to face?


texts: In what way VBW and trace averaging are different in spectrum analyzer?

texts:
We know both VBW and trace averaging intends to smooth the fluctuations of a spectrum.

But how do they differ from each other?


texts:
I'm building a MindFlex-based EEG. Basically, I'm sniffing a 9600bps bus, analyzing the data with an Arduino*, and sending it to Processing/Java for display. To make it absolutely isolated from mains power, I want to make it wireless, but the only wireless gear I can afford (transmitter, and its matching receiver) transmits at 2400bps. I think that if I move the Arduino into the headset, I can make a SoftSerial connection at 2400bps to operate the transmitter, then use hardware serial at 9600bps to talk to the headset. That way, I can hook up a reciever to a FTDI USB-TTL adaptor and send the data to Processing.

Will that work? If it helps, new data comes from the headset about once per second, and I plan on implementing a timestamp into the data from the Arduino, so lag shouldn't be too much of an issue. I also cannot afford XBees, Bluetooth, or anything else.

*Before anyone says anything, if wireless works, I will use an Arduino Pro Mini, and if it doesn't I'm going to use a BoArduino - I'm not throwing an entire Uno at this project.


texts:
I have implemented field oriented control for pmsm motor .
FOC algorithm takes care of phase current limiting.
Can anyone guide me how can we do battery current limiting in foc ?


texts:
Consider the discrete-time system described by

$$
x(k+1) = \begin{pmatrix}0 & 1 \\ -2 & -3\end{pmatrix}x(k) + \begin{pmatrix}0\\1\end{pmatrix}u(k)
$$

a) Find a feedback state vector that assigns the closed-loop poles to \$0.5\$ and \$1/4\$

b) Design an observer so that the error between the state and its estimate goes to zero faster than 0.5.

c) Write down the equations of an observer-based control system.

Attempt:

For the first part of the question, I have set up the feadback matrix (A - BK) and computed the state feed back vector K = \$[-11/6 -23/6]\$.

For the second part I know the question is looking for the observer L, which is obtained by setting up the matrix (A - LC), but I dont know how to make sure it goes faster than 0.5.How would I do this?

For the last part I think I just need to multiply the determinants of the matrices (A - BK) and (A - LC) (so I need both K and L ) because K and L are supposed to be able to be designed independently, is this right?

Any Help Appreciated.

Note: Exam Revision, not Homework.


texts:
I have a part that says "2 positions", does this mean I could feed VCC through one pin and GND through the other, or are they 'connected'?

Source:digikey.com


texts: Noninverting optocoupler with a pulldown resistor

texts:
I am using a power MOSFET to switch a solenoid valve. The MOSFET is driven with a optocoupler (LTV-847) to isolate the 12V required to switch the valve from the 3.3V used by the microcontroller. However, from what I understand, this requires a noninverting optocoupler. The circuit I am using at the moment is:

I've breadboarded it and it seems to work fine. Is it OK to have a pulldown on a simple optocoupler like this (I know that some of the faster ones don't like that). If it is, then why do most websites suggest the inverting congfiguration with a pullup resistor? See for example this Sparkfun board which includes extra transistors to invert the signal: Sparkfun optocoupler board


texts: Need Realtek's rtl8188cus (WiFi USB dongle) datasheet. Any advice?

texts:
I have to develop a driver for Realtek's rtl8188cus (WiFi USB dongle), but couldn't find any datasheet or any kind of how-to...

I contacted RealTek but they don't seem to respond.

Any advice ?


texts: I would like to know if the circuit is correct?

texts:
simulate this circuit – Schematic created using CircuitLab

I have used the voltage follower concept in order to keep the output logic non-inverted.I would like to know the issues that I might have if I connect the output pin to the micro.

I am aware that the output will be (3.3-drop across NMOS).I am concerned about the output impedance of the circuit and how do I select the value of the R7 resistor?


texts:
Are there common guidelines for bulk capacitors?  If I have the decoupling capacitor placement shown below (where the vias connect to Vcc and GND planes):

And I need to place a bulk capacitor in parallel, which option is recommended?

Option A: Bulk capacitor connected before the vias  (i.e., move the vias to the right and place the bulk capacitor between the decoupling cap and the vias)
Option B: Bulk capacitor on the right of the vias, and the traces from the IC pins touch the decoupling capacitor pads, then touch the vias, then continue to the bulk capacitor?

What if the bulk capacitor did not fit nearby and is (relatively) far away from the decoupling capacitor?

Does the situation change if:

The bulk capacitor is shared for two or more Vcc pins?  (each of those Vcc pins would presumably have its decoupling capacitor connected like in the figure above)
Several pins of the IC connect to the same supply, but each of the pins is supposed to be decoupled by a pair 0.1uF ceramic + 10uF tantalum?

Any comments or pointers to relevant information will be appreciated.

[[ Edit: It was suggested that this question has been already answered by this decoupling capacitors question.  However, that question has nothing to do with this one, as it does not even mention (not even in passing) bulk capacitors ]]


texts:
We know what is piezoelectric effect and its operation.Whereas Reverse piezoelectric effect is just opposite that of the piezoelectric effect i.e, Electrical to mechanical and we get oscillations in the crystal.

As i know the principle, now I'm eager to know its operation. If someone have designed the crystal using this, please share the same.


texts: Can sending correct data via UART qualify as valid manchester encoding?

texts:
I'm currently in the process of having a laser beam detected by the phototransistor. While the parts in themselves work, I want to detect when the beam has been detected.

I understand that a 38Khz module exists for detecting IR but I already bought my phototransistors and they are much less expensive and offer me more flexibility.

What I currently have setup in my 8051 microcontroller is a procedure which detects when a laser beam has been sensed by detecting the value 0Fh from SBUF (uart input).

The reason I chose that value 0Fh is because for a standard 8N1 UART protocol The data packet for the UART starts with a logic low for start bit, then the next four bits are logic low then the next four are logic high then logic high for stop bit.

Then the remote unit that controls the beam will operate much the same way by sending 0Fh over its UART (8N1) and both units will run at the same baud rate.

Currently I have the speed set to 1200bps on both units.

My questions are:

Is this a good way to implement manchester encoding to detect when a valid laser beam is sensed (as opposed to interfering light)?
Is the speed too high for the lazer to keep up?
I mean some devices take some time to turn on and off. The laser in question comes from those cheap 5mw laser modules you can get off ebay for under $1.


texts: PCB alterations post-production. Or, how do I not stab myself while scraping off the copper?

texts:
I made a PCB that I am happy with (it works!). This is for a power circuit, and I have realized (way too late) that I want a switch on the board as well. I bought a switch from a hardware store that seems to be ok for the purpose.

I have the location of the thick VCC trace where I want the switch identified, and I think I can drill two slots using a small drill. The only problem that remains is the copper trace between the two slots. I want to remove that copper to make sure it cannot turn on without the switch being on.

I have 2oz copper traces. The trace I will need to remove is about 7 mm in width and probably 1 cm in length.

The only two ways I can think of getting rid of this trace region are:

Try to scrape it off with an exacto knife. I have only ever taken solder mask off with a knife, so I don't know how well this will work on copper...
Try to overheat that region of the PCB and hope the copper peels off. I've done this accidentally a few times. Well, the transistor burned and took the traces with it).

Is there a better/safer way? I could probably just not put the switch on the board, but put it on a separate prototype board by itself and wire that to the power board.


texts: How to get started with Bluetooth 4.0 (BLE / Low Energy)

texts:
I want to get started with Bluetooth 4.0 / Bluetooth Low Energy / BLE.
I know it's different from a normal Bluetooth.

Currently I'm using BlueSmirf Bluetooth 2.1 module, UART interface and SPP profile.

I have a simple operation sending a string to arduino. Up to 512 byte/second. Since I'm using BlueSMirft BT module, it's easy and everything is transparent.

It's seems it's not easy to do this in BT4.
http://www.bluegiga.com/BLE112_Bluetooth_low_energy_module

I just want to get the basic idea how difficult it's to learn BT 4.0 before I buy the development kit. Not cheap, $350+.

Do you have a sample code on how to setup and send a simple string using BT4?
Bluetooth low energy technology supports very short data packets (8 octet minimum up to 27 octets maximum) that are transferred at 1 Mbps. http://www.bluetooth.com/Pages/low-energy-tech-info.aspx  With this limitation, can I send data  512 bytes / second?

Thanks!


texts:
I have a CNY70 sensor connected this way:

I read the output (the CNY1 port) with a PIC18F2550's ADC and in the datasheet, it tells me

  The maximum recommended impedance for analog sources is 2.5 kΩ.

I want to know my circuit's output impedance because using common sense I can assume it's 10kΩ (because of R2). It actually works and also using an Arduino but I don't know if the ADC is being damaged or something.


texts: Voltage divider to measure battery voltage on Arduino

texts:
I am working on a 3V battery powered arduino project. I need to monitor the battery so that I could send a signal when battery is dying. At first it seemed tricky because the same voltage is being used by the micro-controller but later on I came to know that there is some sort of internal 1.1V reference in Arduino. However I need to use a voltage divider to reduce the voltage. This is the circuit described on the webpage:

PIN_A1 is where the battery voltage is being read. High value resistors have been used to avoid excessive current draw.

My question is - What is the aim of using a voltage divider here?

EDIT:

It has been figured out that voltage divider is bringing the battery voltage within internal voltage reference range i.e. 1.1 V.

(Credit goes to Vladimir)


texts:
I am using a PIC18F452 micro-controller to generate PWM with ADC. The PWM output is connected to an LED through a MOSFET. There is some flicker occurring. How can the flickering be reduced?

can you provide a circuit for this led brightness control?


texts:
My challenge at the moment is dissipating 60A of load current through an array of MOSFETs.

Here are my specs:

No cooling fans
Heatsinks allowed, if needed
FET and/or heatsink cannot attach to the enclosure
FET used is: https://www.digikey.com/product-detail/en/nexperia-usa-inc/BUK9Y4R8-60E115/1727-1503-1-ND/4486637
8 thermal vias per FET
30 deg. C ambient temperature
FETs need to sustain 60A continuously for 30 minutes, and 120A for 1 sec, without damaging the rest of the circuit

Assumptions:

the rest of the circuit is some combination of MCU and 5V gate drivers
no switching of FETs after initial "on", then 60A sustained for 30 minutes without interruption
Likewise, 120A for 1 sec after initial "on"

Background Info:
Schematic and Board of the FETs plus gate drive portions of the circuit are attached.  You will see in the board that there is a separate polygon for "LOAD-".  The bottom of the board has the same outline of a "LOAD-" polygon, and they are connected together by vias around the FETs and the solder pad, which is where the negative lead of the load wire is attached.

My question:

Are the calculations that I did below for PD (power dissipation), the equivalent junction temperature for 2x parallel, and the thermal resistances for 4x parallel all correct?

The reason I ask is because I ran this 60A test with a PCB that had 2x parallel, and within 15 seconds, one of the two FETs smoked, the load wire desoldered from the pad on the PCB, and the gate of that damaged FET melted to ground, so now there is a partial short.  With all that, the rest of the circuit is still operational actually.  So, curious where I failed to catch the schism between theoretical and practical.

Update 2020-1-3:
Schematic was updated to reflect mods: QGATE changed to be on low side rather than high side, and values of RGL/RGPD changed to 1k/25k in order to bring rise time to 280us.  Load test repeated with 30A instead of 60A.  Test lasted for 5 minutes before FETs started smoking.  Off button was pressed, and even though gate drive went to 0V, the FETs continued to conduct.  Load wires desoldered from board.  After test, gate signal shorted to ground but the rest of the circuit is still operational.

Question:

Is this test indicative of the Spirito effect even though the FETs lasted for 5 minutes?
If the root of the problem is not the rise time, then what is?

Thermal Calc:

Schematic:

Board:

Scope of Power FET Gate Drive:


texts: Photocoupler to Latch Microcontroller Power Supply

texts: I'm revising my custom arduino circuit which involves powering an atmega328p. I am using a 9V battery connected to a BS170 MOSFET. Without any voltage applied to the gate of my BS170, the battery is disconnected from my regulator which powers my Arduino. Applying over 5 volts to the gate connects the battery and my arduino turns on. This part works flawlessly but my issue is that this gate voltage will only be applied for 5 seconds and I need to keep the arduino on for about 20s. My question is, using an optocoupler such as this one, could I use an arduino output pin connected as shown below and set it high to latch the power on until a timer counts to ~20s. At this point I would set the pin low and the photocoupler would become open. It seems like it could work but would I have any problems with the optocoupler and MOSFET in that configuration? Does this seem like its okay?


texts:
I'm new to IMUs and know that they are prone to high drift, which depends on Temperature, White Noise and Time, but the most uncertain drift is caused by time, and under certain circumstances, drift can be taken as a function of time as we are integrating the raw values.

Here I'm specifically taklking about gyroscopes.

I came up with a solution, which may look absurd but bare with me please.

Let us add two gyroscopes to a rigid metal rod, each at both the ends of the rod, now any of the gyroscope cannot move independently so let us assume an axis of rotation on the rod, doesn't matter where.

To make things simple let us assume orientation with respect to one axis only, let us say x-axis, now the rod is rotating about its axis and we are measuring the orientation of each gyroscope w.r.t x-axis.

Because we only care about orientation and not position, so let us assume the axis of rotation is fixed to one point and only allowed to rotate about it.

I'm in high school so my knowledge of co-ordinate geometry says that the sum of the angles of both the gyroscopes will be same, and does not depends on how much the rod is rotated about its axis, of course the rotation will change the angles of individual gyroscope but the sum will remain same.

So we can take and add readings(angles) as we turn on the gyros now as drift is a function of time, drift will be minimum at the first reading and will be stored as a constant.

Now that constant will be compared with every next reading, deviation from constant value will determine the deviation/drift and we may be able to compensate for it.

What I described above is possible to do or not? I want your thoughts please.


texts: How to decrease the speed of a DC motor?

texts:
After replacing the motor in a cassette player with a matching 6V DC motor, the minimum speed of the motor is too fast for desired playback speed (even when the internal potentiometer is at the minimum.

What can I add to the circuit to decrease the speed floor of my motor?

More details / what I've tried already.

I'm repairing a boombox cassette player.  The motor had seized, and I wasn't able to repair that, so I found a motor with the same dimensions that was rated at 6V.  I chose a 6V motor because that was the DC Voltage I measured across the existing motor when "play" was engaged.

After installing the new motor, I found that it ran significantly faster than I desired it to, even when adjusted with it's internal potentiometer to the lowest setting.  What I would like to do is slow the motor down so that this lowest speed is below the intended speed, and I can calibrate the speed more delicately with the internal potentiometer.

The DC voltage is provided by a full bridge rectifier after a small power transformer.

I understand that motors typically adjust their speed based upon input voltage.  I attempted adding a low value resistor in series with the motor drop, as I understand voltage drops across resistors - the motor did not run at all.  I tried adding a low value diode - in this case the voltage dropped from 6V to 3.8V, but the motor did not decrease in speed significantly?


texts: Can a digital pot and op-amp challenge the performance of a programmable gain amplifier

texts:
Currently I'm using a Microchip PGA for applying gain factors of 1, 2, 4, 8, 16 and 32. It's used in a design of strain gauge amplifier. The part number is MCP6S21 and I am happy with its performance in these areas listed below: -

Noise - it doesn't seem to introduce any but there is a large gain stage preceding it. It is specified as having 10nV / \$\sqrt{Hz}\$ but like I say, the circuit isn't challenging in this area.
Input offset voltage is quite good at +/-275uV and I expect, at the output this could be up to 32 times higher on maximum gain. Again, this is easily acceptable for the product.
Gain error is +/-1% - providing this is a stable gain error with temperature then no problem. The MCP6S21 is specified as having a gain drift of ±0.0004% per deg C
Bandwidth and slew rate are flat easily beyond 100kHz at all gains.

The input to the PGA is from an op-amp and the PGA feeds an ADC via a low-pass RC filter i.e. the output isn't feeding a low-load and the input impedance could be a few hundred ohms without too much bother.

There may be better PGAs that are rail-to-rail input/output devices but does a digital pot combined with an op-amp come close to challenging this "moderate" level of performance?


texts:
I am developing a PCB which is having control MCU circuit, it will control the relays. Relays output are connected to 230V AC mains load (~100W load).
This PCB is mounted on a cabin where people cant access, and the risk of electrical shock is nill.
So is it a good idea to connect the mcu with non isolated power supply(capacitor based) which will reduce the overall cost?

1) Compare to the isolated version this topology having any prons & cons?

2) I am scaring about the high common mode voltage which demands more clearance and creepage in PCB?

3) What about surge/spike compatibility. I need to add any protective devices additionally


texts: Calculating electromagnet – magnetism vs heat

texts:
Im making an electromagnet that will be more or less permanently turned on so I need to avoid heating problems. I have studied this a bit and came to the conclusion that:

  the lower the gauge (AWG) (the thicker the wire) and the more turns
  around the core => the greater current it can handle and the lower the
  heat.

with this in mind I would have taken something like 500 turns around a 10 mm diameter screw, with pretty thick copperwire awg 20 (0.5 mm) or something similliar would be okey?

What do you say? Is there a way of calculating these heatingproblems before I decide the dimension and number of turns of my copperwire?


texts: 2 x 8-channel multiplexers with with linked outputs

texts:
I have only one input to measure 16 channels, my intention is to use this circuit below based on the LTC1380 MULTIPLEXER:

The multiplexers have different addresses (AO A1). The output of both is linked to the same output buffer. Therein lies my confusion how to deal with both outputs connected together

My questions is

Will I have to close top multiplexer off, while I take a reading from bottom multiplexer and vice versa. (I would assume that this is the case, which leads to the next question...
What would happen if I have both S0 lines open on each multiplexer


texts: Help me identify power issues with this PCB

texts:
I bought the following UPS module for my Raspberry Pi: Power Pack Pro

The module kinda works, when I unplug the power cable, the module instantly switches to battery powered mode without restarting the Pi. Also the I2C output works, I am able to read the voltage of the battery.

BUT: It cannot provide enough power for the Pi. The lightning bolt is there 99% of the time. It disappeared in absolutely random times, even during a CPU stress test.

I tried the followings:

with 3 different Pi 3 and 3b+
multiple charging cables (which are totally fine with normal usage)
5V 3A charger
tested the UPS board with a fully charged battery (+ external power), without a battery (only external power), and with only a battery (without charging), but still the same
the module also has a micro usb out, so I bought a male-to-male cable. It looks like the output voltage is 5.0V which even drops when I power up my Pi.

After these I contacted the seller and asked for a replacement board. I got one. The new one has all of these symptoms.

(I even asked a YouTuber if he has the similar problems, but he said no. Other reviews were also positive)

The reason why I ask you about this problem is I found out my board has different chips than what displayed on the official wiki.

Photos of my board: drive

I was able to read (sort of) the numbers from the chips:

U1: IP5306 20HG00FA(?)
U2: ETA1096 6312F
U3: LM393 SSM FK52
U4: 2015CS AD9T8H(?)

I'm a beginner in electronics, but I can't think of anything else but I have these problems because of the different electronic parts.
Can I make a working module by resoldering different (working) chips into the board?

Edit: (note) the module is no longer for sale.

Edit 2: I made a comparison image of the advertised/received boards: image

The U1 chip is different. The others look like they're the same.
The 2R2 inductor is flipped, but if I'm correct, that's not a problem.
Some capacitors are changed to ceramic ones.

I hear some static noises under use, but I can't tell what is the source of it.


texts: How to extend optocoupler's common mode transient immunity to its Input constant current driver

texts:
Hello planning to use an optocoupler to interface a button meters away from the circuit. The optocoupler ILx series already comes with Common Mode Transient Immunity which would work great for my application. Driving the input of the optocoupler is a Constant current IC BCR401 that is set to 10mA from a separate power supply.

We already know that opto has built in immunity to transient, is my decision of omitting the TVS diode on the twisted pair (place near the optos input cathode) as it would be redundant with the built in one correct?
The BCR401 datasheet has no mention of any form of immunity against transients. Would it be protected by the opto's protection circuitry too? If it need its own protection it would most probably some sort of a TVS diode but i could not figure out where its anode and cathode would be connected because the induction
would come from the twisted pair so it has to go to VDD making it not needed ??


texts:
So I don't get it, why is the capacitor oriented with its + terminal on the bottom?

Wouldn't this peak detector work just as fine if + terminal is on the top?

Like, when diode is on, \$V_o\$ would be negative, and capacitor would charge to \$-V_{b}\$ + \$Vd_{on}\$, wouldn't it?

I mean the way you calculate voltage across the capacitor is how... like when diode is on, voltage from plus terminal minus voltage at the negative terminal

voltage at + terminal is \$-V_b\$ and on plus side it's \$(-Vb + Vdon)\$ ???

so \$-Vb - (-Vb + Vdon) \$

?????

So confused.


texts: How many wiring combinations exist for an *n*-pin cable/connector?

texts:
This is more a pedantic question about the possible number of wiring permutations inherent to an n-pin connector and cable.  Note combinations imply that elements may be used more than once (combined), whereas permutations do not.
I occasionally have to fabricate custom cables for esoteric devices or troubleshoot them (example cable cut or missing, service manual unavailable, etc.)  On a four or nine-pin connector, this isn't a problem because the number of permutations is very low, some pins are unused or are otherwise identifiable, or the connector follows some standard.  But what about a 16-pin touchpad connector, where all pins are used and none have a definite, identifiable function?  How many wiring permutations exist for this connector?


texts:
In IEEE 802.3cg, a new (2019) 10BASE-T1S interface is defined.   The intent is to deliver both power and 10 Mbps Ethernet data over a single conductor pair.
I understand 10BASE-T1S was designed to support a very simple PHY front-end implementation.    Are there any example circuits to do this?   Is it based on the same magnetics as other twisted-pair Ethernet, or is capacitive coupling used?


texts: Automotive IO electrical levels standard

texts:
Is there a standard that propose voltage/current thresholds for GPIO in automotive ECUs. Something that would define ViH, ViL, Iil, IiH, etc for 12V or 24V networks.

I have good intuition of what is needed by working with different types of controllers, but I'd like to find something more rigorous to back up a design. The best I found is IEC-61131-2 which defines these levels for PLC.


texts: As part of my circuit, I need to step down voltage from +15V to +-12V. For this purpose, I am using Traco TEN 20-2422WIN. I was going through its application note when I saw that they because of EMI, advice to connectC3 and C4 between input and output. Can anyone elaborate on possible reasons for this


texts: Determine power requirements and limitations for an old shortwave radio

texts: I picked up an old Novico shortwave radio at a garage sale. Missing was the wall plug adapter. The battery pack runs at 9v, but I'd like to find an AC wall converter that I can modify that will let me run without batteries. Is there a relatively easy way to determine what kind of voltage/amps are needed without going over the limits? Thanks in advance!


texts: NRF24L01+ and NRF24LU1+ Communication - RFID application

texts:
I have an RFID application in which tag has NRF24LU1+ and the Reader has NRF24L01+ chip. The Reader is based on STM32F4xx Micro-controller.

I have two same Readers which are communicating with themselves, one as RF transmitter and other as RF receiver.

I have two same tags which are communicating with each other, one as RF transmitter and another as RF receiver.

The frequency range of the nordic chips is 2.4 to 2.525 GHz. The problem I have is the Reader is not communicating with the tag, the Reader as Receiver and tag as transmitter. Data rate selected is 2Mbps, channel is 2, payload is 5. These settings are common between tag and Reader. I am not sure if I am giving correct address for TX and Rx.

The registers TX_ADDR, RX_ADDR_P0(Pipe 0), RX_ADDR_P1(Pipe 1) are updated for address on a device as I know.
I tried:

(Reader)

RX : TX_ADDR = 0xE7E7E7E7E7,
     RX_ADDR_P0 = 0xE7E7E7E7E7,
     RX_ADDR_P1 = 0xC2C2C2C2C2.

(Tag)

TX: TX_ADDR = 0xC2C2C2C2C2,
    RX_ADDR_P0 = 0xC2C2C2C2C2,
    RX_ADDR_P1 = 0xE7E7E7E7E7.

Is this the correct address setting? Am I missing something.?


texts: Find the transfer function given responses

texts:
We have an open loop system with an input u , a transfer function G(s) and an output y. We apply the following inputs $$u_i(t)=\sin(ω_it), i=1,2,...6 $$ and get the following responses

These are of the form $$y(t)=Y_1\sin(ω_it+ψ_i)$$
Seeing some of the graphs I though G(s) is a differentiator but this doesn't hold true for every graph.
The solution manual gives $$G(s)=\frac{s}{(s+10)^2}$$ Any ideas ?

We have $$G(s)U(s)=Y(s)$$ Taking the Laplace transforms : $$G(s)\frac{ω_i}{s^2+ω_i^2}=Y_1\frac{s\sinψ_i+ω_i\cosψ_i}{s^2+ω_i^2} \\ G(s)ω_i=Y_1(s\sinψ_i+ω_i\cosψ_i)$$ Doesn't seem like the (s+10)^2 denominator will show up.


texts:
Can anyone suggest an alternative to energy from a battery?

I'd like a system to replace my deep cycle leisure battery, I currently use this 110 AH leisure battery with a 1200W inverter.
I run my computer, lighting and sound system off it while I'm "out in the sticks", It works just perfect, there's more than enough energy to get a couple of days usage between charges, I just wanted to know if there's a greener way of storing the energy - instead of using ye olde plastic box full of acid and corroding metal.

I'm not interested in using a diesel or petrol generator, I'm looking for something a bit cleaner and greener than that, was thinking about the possibility of running a dynamo off a bottle of pressurized gas or air? - I'd probably need an unfeasibly large tank for this tho!

Cheers Chiphackers :)


texts: There is an op amp in switching power supply

texts: I still can't figure out what is function of the operational amplifier?


texts:
I used to work with the Lattice IceCube IDE where I just constrained all pins to the corresponding signal not matter whether they were actually used in the design or not. No I have to create a new design with the Diamond IDE from Lattice and it seems like this practise doesn't work anymore.
E.g. if I have an input port that may be or not be used based on some generic settings I cannot generally assign the port in the "Pin Assignment" tab. I can assign it if the current sythesis uses the given port, but if I then change my design so the port is "unconnected", Diamond throws me an error.

Is there a possibility for pin assignment independent from whether the pin is actually connected in the design or not?


texts: So I purchased a min 3V relay switch (https://www.digikey.com/products/en?keywords=ADW1103HLW) and am trying to turn it on with a simple transistor setup. The data sheet says I only need about 66.7mA (operating at 3V, even less for 5V) for the switch to turn, and my ammeter is currently (no pun intended xD) reading 90mA through the switch. So the circuit seems to be working correctly, yet the switch still will not throw. Ive tried two different switches to rule out the switch being bad. Can you guys recommend another approach to figure out whats going on? Thanks!


texts: Phase margin Vs damping ratio: Intutive explanation

texts:
While designing the compensator for SMPS we always talk about the relation between phase margin and damping factor( or Quality factor).

I don't completely understand how damping plays such a keyrole in determining phase margin?

Even in a simple RLC circuit the phase difference between input and output is attributed due to all the components, not just resistor alone.
Also in most of the graphs the relation between phase margin and damping factor is only shown for phase margins in the range of 0 deg to 90 deg. What happens to phase margin higher than that?


texts: What makes the transformer in a SMPS smaller?

texts:
I'm reading up on how SMPS's work and all the videos say that after the high-voltage chopping stage, a smaller transformer can now be used, because of this high frequency. My question is, how does higher switching frequency result in a smaller transformer?

In other words, what makes switching 50-60Hz AC require a bigger transformer?


texts: How much current can a microcontroller/DSP pin sink/source?

texts: I'm using a TMS320F2812 and want to drive LEDs of some of the pins. I couldn't figure out what the safe levels of current were which could go in or come out of the IO pins from the datasheet. What is the safe range or how could I find out? What are normal values for these levels? Thanks.


texts: Please help me to identify the SMD marked as 20 3C, which is used in a cable TV set top box tuner section for amplifying the RF input. It's operating on 5V DC. Please inform me of the package code, and the component value. It resembles the SOT89 dimensions.


texts: Small displacement measurement of a conducting beam with Neodymium magnets

texts:
I relies the displacement is very small and with up to a decent frequency.

Here is details of the Magnet data
Magnet poles North/South over the height(h) = 1.5 mm
Coating: Nickel
Length(a) = 8.5 mm
Width(b) = 2 mm
Height(h) = 1.5 mm

Material/grade: 48H
max.operation temperature = 120 °C
Flux density inside the magnet = 1.37 Tesla = 13700 Gauss
Flux density on the surface = 2600 Gauss

Dead weight: 0.19 g
Holding force on a steel plate: 4.64 Newton
Weight, which the magnet can lift: 0.47 kg

Small displacement needs to be measured of around  +-.3mm
Sensor can be up to 3cm away  (min 1mm) from the stationary point of the displacement.  But there is a second margent not moving 1.5mm away from the first.
Frequency of change between the max and min could be as high as 400Hz and displacement could be as low as +-0.05mm at times.

The sensor has to be of little effect on the system as possible although a small effect can be compensated for. System should be non contact to the moving base.

One idea that was suggested was a hall effect sensor. However such a large gauss with a small displacement and the other magnet nearby with such a large offset makes me think this idea is possibly not going to work although I could be wrong.
The surface for sensing is the size of the magnet if using hall effect or inductance or a maximum of around 8.5mm x 15mm

Another two options suggested where a capacitive sensor as the moving part is grounded and conducting however there is also ground all around so good shielding would have to be implemented or some form of optical sensor probably based on intensity  with fiber wires for the sending and receiving light using some form of modulation and filtering to keep costs down.

I am open to any other suggestions or where someone might know a good sensor suitable, circuit diagram or informational website. I know this system is a lot to ask.

If the displacement oscillates at a sinusoidal waveform the output should reflect this and be analog if possible. if there is a phase shift that shift would have to be known and frequency would need to remain the same but the amplitude does not have to accurately represent the total displacement.

Thanks for any ideas or suggestions


texts:
I want to create a solenoid to match the magneted strength of an n52 magnet of around 4-6 inches in length.
A quick google search reveals an n52 magnet is about 14,000 gauss.
Using online solenoid calculators I can get to this point at sort of sensible currents with around 15000 turns, but there's no wire that can go 15000 turns around 4-6 inches that can withstand that current without being incredibly bulky right?


texts:
I recently bought a logic level converter for interfacing Arduino Uno with ESP8266.  I had decided to use SPI communications between the two but after making all connections correctly it failed.  After checking the shifter with a multimeter I found out the pins were high even with no signal applied (only HV and LV voltages are applied).  This is fine for I2C but not for SPI. Is it possible to perform SPI with this shifter? If yes, then how?

Product link: here.


texts: Translate signals amplitude into frequency

texts:
I have a sinusoidal signal at 50 Hz, that varies in amplitude, with no offset. The amplitude goes from 0 to 5 V (peak to peak), and the amplitude contains all the information I need. This signal will change abruptly (in amplitude) but not very frequently, by that I mean for example that it could be at 2Vpp for an hour and then suddenly change to 3Vpp.

What I want to do is transmit that information using FM. For that to work I will need to transform the signal into something which gives me the same information but now related to it's frequency. For example map the 0 to 5 V range into some frequency range so then I can modulate using a VCO. I would also need to demodulate this at the receptor, and will probably need to remap from frequency to voltage ater the signal is received. This I don't know how to do, so I'm asking for help here.

I don't know if I explained myself correctly, so I'll edit my question if needed. I know that FM may not be the best way to go here, but I have all the components I would need and I don't have the money to buy for some other option.


texts: Ultrasonic Sensor - To digital or or Analog?

texts:
I have a MaxBotix (MB7092) Ultrasonic sensor.  It has an analog pin as well as serial transmission capabilities.

I'll be using the sensor with an Arduino.

Can you tell me the benefits of the digital reading over the analog in the case where the Arduino has ADC capabilities.

Ultimately I'm kind of wondering which way is the lowest power requirement of the overall system (sensor and arduino).


texts:
I'm modifying an RC car to use bluetooth. I use the L293D chip, and when I connect the motor to the chip, the car barely moves. If I connect the 9V battery directly to the motor, it moves the car well. I've used a voltmeter, and the chip does indeed output 9V, which seems really strange to me. If it outputs the right amount of voltage, how come the motor is barely moving? How do I solve this issue? My apologies if the schematic is difficult to read. That was my first schematic ever.

simulate this circuit – Schematic created using CircuitLab


texts: What are all the multiple pins on PSU connectors for? How does a 24-pin MB connector work exactly?

texts:
I'm looking to learn more about power requirements and such that a Power Supply/Computer work with.

I see this image

and it has a lot of different pin layouts for various things and such.

For a few projects of mine I'm looking to connect up to the power supply.

I've heard I only need 1 12V+ and 1 ground, but I also need a 5V+ and a ground for another part of the project.

I'm curious if it matters where this is taken from on the whole?

I'm also curious, looking at that 24-pin connector, why the MB needs all of those values?  3.3v, 5v, a bunch of 12 volts....

Does that all get split into individual things or...?  I see the VGA connector is 3 12V, and 5 grounds, so I'm curious if individual parts of the GPU require 12V+ or if it requires 36v total, or whatnot?

Essentially I'm just curious how power works, how you know how much voltage, and amps and such you need to power your devices, and all that stuff with connectors and such, to make sure you have the proper power inputs and such?

Any advice is appreciated, thanks a lot!


texts: Instructions on building CMOS camera wifi video transmission

texts:
I am not sure this is the appropriate place to ask this kind of question, but I believe this is the best community to ask. I'd like to learn how to build my own circuit that would be capable of streaming video from a CMOS camera like this:

https://www.sparkfun.com/products/11745

I don't want to use Arduino or Raspberry Pi. I need a smaller PCB that focuses purely on the video transmission. It doesn't need to run Linux or do anything else. I know decent amount about electronics, so I should be able to follow instructions. I can't find anything online. Does anyone know about a webpage that sheds more light on how to design such a board? It can be built from smaller board components, but it has to be smaller and lighter than using Arduino or Raspberry Pi. Thanks!


texts: Actually 4.8 v dc is arduino nano output. In multi sim it works but practically not, transistor is 2n2222a npn.


texts: Estimate electrical frequency from clock shift

texts:
About 6 months ago I installed a solar power system with 2 Tesla Powerwalls for backup. Today, we got to test out the system with a power outage from an ice storm in the southeast. (We are still on battery power as I write this.)

My kids came downstairs to tell me that it was time for bed (9PM), but when I looked at my phone, it was only 8:17PM.  They were reading the time off the microwave.  I checked the alarm clock in my room and it also read 9PM

I know that the way power is "pushed" around between solar, utility, and the Powerwall is by modifying the frequency of the ac signal. I also know that many digital clocks keep time via utility frequency.

So, my question is this: if our power went out at roughly 10AM, and by 9PM our digital clocks were off by almost 45 minutes, what frequency is the powerwall delivering backup power at? That large of a shift in time seems excessive (purely speculative).


texts:
Will it be safe if I connect STM32F407 GPIO outputs (Vdd=3.3V) to 74HC04 hex Inverter inputs (Vdd=5V)? What is the best recommended method to add an inverter at the output of STM32F407 MCU?

edit:

Included schematic details about the 74HC04 circuit.


texts:
I use an atmega32 and I want to use the SPI bus. I have the Adafruit 24 channel, 12 bit pwm led driver. I use a buffer to set the pwm for a certain channel.

The question is how to send the whole buffer via SPI?

My code:

/*
lat = ss
dat = mosi
clk = clock
oe = miso is not used because it is one directional
*/

uint16_t *pwmbuffer;
int numdriver = 1;

void tlc5947(uint8_t n){
    pwmbuffer = (uint16_t *)calloc(2, 24 * n);
    /* Set MOSI and SCK output, all others input */
    DDRB = (1 << dat)|(1 << clk)|(1 << lat);
    /* Enable SPI, Master, set clock rate fck/16 */
    SPCR = (1 << SPE)|(1 << MSTR)|(1 << SPR0);
}

void write(){
    /* Start transmission */
    SPDR = pwmbuffer; // Here is the problem, I don't know how to do this

    /* Wait for transmission complete */
    while(!(SPSR & (1<<SPIF)));
}

void setPWM(uint8_t chan, uint16_t pwm){
    if (pwm > 4095){
        pwm = 4095;
    }
    if (chan > 24 * numdrivers){
        return;
    }
    pwmbuffer[chan] = pwm;
}

int main(){
    // This is not my real code but a simplified version of it
    tlc5947(numdriver);
    while(1){
        setPWM(4, 2000);
        write();
        _delay_ms(5000);
        setPWM(4, 100);
        _delay_ms(5000);
    }
}

Thanks in advance


texts:
I'm trying to drive symmetrical voltmeter with not-so-symmetrical voltage divider. PWM is working as a charm, but I have problem with rest of the circuit. I can't really control voltage in a voltmeter, its always around -5V or 5V. How can I improve this circuit to make it work?

Here's the link:

schematic


texts: What are the main tasks to do when characterizing a DC motor?

texts:
Suppose you have found in your basement an old small DC motor and you have nothing but the data on the metal plate of the motor because, say, the supplier did not published any techical data sheet. How would an electrical engineer go to characterize such motor, ie what characteristic curves would be a "must have" (possibly independently from the application) for the motor? Please describe also the way you'd go to derive empirically such characteristic curves.

Suppose all you know before starting is just the data on the metal plate of the motor as in the picture below:


texts: Selecting the correct input/output capacitors for a 7805

texts:
So I've got a 7805 Regulator and I've been looking it up and each website says different info. I am using an input of 12V DC 1A Wall Adapter as an input supply.

www.adafruit.com Says

  This regulator does not require capacitors for stability.
  We recommend at least 10 uF electrolytic capacitors on both input and output.

Datasheet Says

  0.33 uF into the input pin and a 0.1 uF into the output pin.

so I want to know which is better and if it matters. I am looking to make it stable to charge electronics and supply projects and such.


texts: Why is the inductive reactance or capacitive reactance phasor on the imaginary axis?

texts:
As you can see there are electrical circuits of power supply, resistance, inductive reactance combination in one case and power supply resistance and capacitive reactance combination in another case are there.
Their respective phasor diagrams are also drawn.

But why is the inductive reactance or capacitive reactance phasor on imaginary axis while the resistance phasor is taken on the real axis? What will happen if we take resistance as the imaginary component and reactance as the real component?


texts: Is it a good idea to ground a heat sink?

texts:
Have a nice piece of Motorola obtainium that I want to use to power a Raspberry Pi, and I also happen to have a left over ground wire (the case has a three-lead power connector). The case is 100% plastic.

I assume the metal bit on the top, pointed at by the arrow, is a heat sink, and am wondering if it would be a good idea to connect the ground to this?


texts: BIG SRAM with no parallel interface / SPI based?

texts:
I am designing a device that does not have an external bus interface and requires a modest ram size for binary data buffering. 16mb would be great, more would be awesome.

It's quite easy to find SPI flash that are 32 - 64 mb, but a lot more complex to find > 4 mb SPI RAM.

I found one 4mb at cypress :

http://www.cypress.com/documentation/datasheets/cy15b104q-4-mbit-512-k-8-serial-spi-f-ram-datasheet

But :

I would need to have 4 chip. That's lot of PCB area.
It cost a lot. The unitary price is almost 27$ ( ! )

What other options do I have ?


texts: Is it possible to implement a fail-proof watchdog timer in software?

texts: I want to add a piece of code for watchdog timer within my source code so that the board resets automatically when programs hangs. I am using Mediatek Linkit One board.


texts: How to dive into IoT world with just high-level programming experience

texts:
I came from a high-level programming world and recently got a bit bored. Now I want to dive into IoT subject and start a hardware side project. I was thinking if there is a Hello World IoT tutorial, that would teach me how to:

Use modern BLE module, ARM processor, and a nice sensor (for example the ambient temperature sensor or ECG - whatever works).
Choose proper electronic parts and read the data sheet.
Use KiCad or Eagle to draw schematics.
Write firmware for my device.
Connect everything all together.

Basics of electronics in the tutorial would be a plus (but there already exist a massive amount of nice tutorials about electronics).


texts: N-channel and P-channel mosfet for inverter

texts:
I have a question. Do I have the transistors connected correctly to transformer?

simulate this circuit – Schematic created using CircuitLab

Thank you in advance for your help.


texts: Voltage divider equation giving wrong thermistor resistance

texts:
simulate this circuit – Schematic created using CircuitLab

I'm using the voltage divider equation to solve for thermistor resistance. I have:

V_source = 4.9v
V_therm = 2.95v
R_known = 9kohm

I rearrange the equation so that it looks like:

R_therm =  ((R_known * V_therm) / (V_source - V_therm));

And this results in a resistance value of approximately 13.6kohm, however, when I take the thermistor out of the circuit and measure its resistance directly (being sure not to touch it), the resistance measures ~11kohm. This 11kohm value makes more sense because it translates into an accurate temperature reading in Kelvins using the Steinhart-Hart equation. So, what am I doing wrong here?

edit: I know I'm converting the raw 10-bit ADC value to the V_therm value properly, because it's exactly the same value that my multimeter shows.

Basically it seems like I need to let the Arduino run for a bit, heat the thermistor, cool it, then after a while it starts giving proper resistance readings. Is there a reason it doesn't work properly from the get-go and/or anything I can do about it? I'm using a TTC-103 10k thermistor.


texts: Multiple TP4056 Li-ion in 8s Pack - How much voltage?

texts:
I've attached a TP4056 to each of my 8 cells (4 parallel Li-ions) to charge each group of 4 18650 cells as one cell.

However, currently I've got 8 5v USB chargers plugged in the wall and each one is connected to a TP4056 board.

My question is this, which I'm a little hazy about...
If I wanted to use one power supply to charge each cell through their respective TP4056, what voltage and amperage power supply would I require?

Is it 40v 8A, or 5v 8A or something else? Can you feed these TP4056 boards with a higher voltage than 5v? Will they just take what they want or will a higher voltage blow it?

Thanks for all your help


texts: NRF24L01+ Power Amplifier -dBm options to milliWatt

texts:
From the datasheet for these module I have the folowing power settings
  available (listed form highest to lowest), I need to know what they equate to in milliwatt, as in
  Australia maximum 2.4ghz power I can use is 10mw.

RF output power - DC current consumption

0dBm - 11.3mA

-6dBm - 9.0mA

-12dBm - 7.5mA

-18dBm - 7.0mA

Conditions: VDD = 3.0V, VSS = 0V, T A  = 27ºC, Load impedance = 15Ω+j88Ω

Thanks

Edit: Is it possible that the dbm value above is relative to total max power output. so 0 is uninhibited, and -6dbm is taking away 6dbm from full. in this case i think it may be 20dbm (100mw)

Edit: Photos Added of device:


texts: Meaning of the determinant of an ABCD transmission matrix

texts:
In a thesis, [1] I found the following statement:

To determine [characteristic impedance and] dispersion relationships for
an arbitrary reciprocal network having the transmission matrix
$$ \begin{bmatrix} A & B \\ C & D \end{bmatrix}, $$
one sets the determinant of
$$ \begin{bmatrix} A-e^{-\gamma d} & B \\ C & D-e^{-\gamma d} \end{bmatrix} $$
to zero where gamma is the complex propagation constant and d is the
physical length of the whole network.

I can calculate this, and use it to verify the propagation constant of an element of an artifical transmission line, for example.
But can someone give a compelling, concise explanation why do we subtract $$\mathbf{I} e^{-\gamma d}$$ from the ABCD matrix and set the determinant to zero? What is it about the determinant that gives us the propagation constant? What is the intuition.
(I definitely see a similarity to determining eigenvalues via the characteristic polynomial, for example, but I don't see how this plays here)
[1] Michael Garth Case, Nonlinear Transmission Lines for Picosecond Pulse, Impulse and Millimeter-Wave Harmonic Generation


texts:
I have Quectel EC25 module comes with GPRS and GNSS in built, this module needs supply of 3.3V and it's UART works at 1.8V (default Baudrate is 115200) - But i have a processor ATMEGA2560V running at 8Mhz on 3.3V supply.
I am trying to interface that module with my processor, I have used voltage divider circuit with 1M Ohms resistors to pull down 3.3V of processor to 1.8V, I can see some random values comes in the Serial Monitor and i am unable to send any AT commands.

How do i solve this.? is this need any more reliable Resistor divider circuit.? and i don't have source to get 1.8V to 3.3V level shifter :(

Please help

Thank you


texts: Can two microcontroller output pins play tug of war?

texts:
Using an AtTiny85, I'd like to drive an AlfaZeta C30NR flip-disc component to indicate dead batteries for a small project. It is a semi-permanent electromechanical indicator that uses two pins, SET and RESET, and depending on the direction of a current pulse, the state of the component toggles.

In order to accomplish bidirectional current, I could connect an output pin to SET, and another output pin to RESET, allowing current to be tugged in either direction by the microcontroller. It doesn't seem that there would be issues, as the voltage going between the pins would not exceed their specs, and outputting high on both would have a net 0 effect.

In this particular case, it is obviously a poor idea as the current draw required by the component is 250mA where the absolute maximum per I/O pin is 40mA. It actually doesn't seem possible here, as a current divider between the sink output and ground would require a resistor (preventing one output from driving the component with the minimum current while protecting the other), but I'm more interested in the theoretical aspects.

What drawbacks would there be to this configuration? What alternatives would be better design?

Naturally, one option is the C30ND, which uses a common ground for either input pin. I imagine another is to use transistors to convert the outputs into open collectors.

Schematic

A pulse from PB2 turns the indicator on. A pulse from PB1 turns it off. The pulse must be 250mA@4.5V for 1.5ms, but PB2 and PB1 can only receive 40mA. Adding parallel ground, and a resistor on PB1 means that PB2 can safely use a 250mA current, but then PB1 cannot give 250mA of current (it is limited by a resistor and a direct path to ground).


texts: Mosfet testing for short from youtube repair video

texts:
In the 23:40 of the youtube video https://youtu.be/YQ7SXJqIpzs  , the presenter does a p-channel mosfet test for short, using his bench power supply on the circuit.

From what i understood, he disconnected the charger and with his bench power supply he applied the nomimal 19v with 0.5A of current on the Drain of the suspected mosfet. The DMM showed about 0.2A and he concluded that the mosfet is not shorted. I suspect the he tried to switch ON the mosfet externally but i can not see the actual wiring.

Can someone explain how this test works ? And the other thing i saw is that this laptop motherboard had two mosfet one n-channel that outputs to a p-channel. Why this combination is used ? I mean what is the purpose of this?