texts: If I have a signal that switches between 5MHz and 4MHz faster than the sample rate of the ADC on a spectrum analyzer

texts:
Basically, what happens if your signal is switching between frequencies faster than the sample rate of the ADC in the spectrum analyzer? I have been curious as to what would happen in this case, would aliasing from sampling occur?
From what I understand about spectrum analyzers is that they use RF mixer magic and a band pass filter to bring an extremely high frequency signal into a frequency range that can be sampled by a relatively “cheap” and “slow” ADC. From what I understand, I don’t think that magic works to also bring down the switching rate of a signal switching between two frequencies.
A follow up question would be if the amplitude of a 5MHz signal is changing from lets say 10dB to 50dB every 10ns, would an ADC on a spectrum analyzer that samples every 25ns be able to capture the event without aliasing?
From what I understand about sampling is that aliasing would occur and you need a faster ADC (probably a time interleaved ADC) in your spectrum analyzer to capture the event where a signal is switching frequencies or amplitudes faster than the sample rate of the ADC.
If it is possible can you explain how it works?


texts:
I'm trying to design an MPPT system for photovoltaic cells for a school project.

As far as I understand I have to change the duty cycle of a buck converter to change the voltage of the PV so I can find the largest V*I. And I have to have a variable load.

The part that confuses me is how can I use a battery as the variable load, since it is charged with constant current and I have arbitrary voltage and current on the output of the buck converter.

Should I connect the battery directly to the buck converter, restrict the maximum current based on the battery and charge the battery with changing current?

simulate this circuit – Schematic created using CircuitLab


texts: Power 5mm LEDs with 5V adapter instead of 2xAA?

texts:
I have a model of the Eiffel Tower illuminated with 5mm LEDs that are powered by 2 AA batteries. The LEDs come prewired with resistors and heatshrink.

Basically I want to use on of the many 5v phone chargers I have lying around to power it and use it as a nightlight.

Can you help me calculate the proper resistance to add so the LEDs get the right current, which I guess is about 15 mAh, after the increase in voltage?

Thanks!


texts:
This IC is from a power supply for an LED domestic light

This appears to be a 7 legged IC, at least it doesn’t seem to have had the 7th leg snipped.

The markings seem to be
9609SB
G8EMOS

I have had a google and I don’t think that it is an AD9609 ADC nor a 9609 MOSFET.


texts: Providing additional fusing for multiple motors one branch circuit

texts:
so i have a 30A disconnect available for use at a customer site for running 2 5HP motors ( at 480V)  the only question i have though is if the line is sized for a 10HP motor would both the 5HP motors need additional fuse protection?

Or could i get away without having addtional fuses protecting the motors ?


texts: Excessive temperature on cheap soldering iron - will series capacitor fix it?

texts:
Soldering iron came in a $14 USD kit off eBay.  Lots of neat stuff, but the iron became so hot as to badly damage a DIY Kit.  After a 2nd chance w/ the same results, it was hacked,  Heating element of 216 Ohms directly connected to two "hot" wires of VAC !  Has to be runaway current.  After much research but before any purchases, it was decided to add a CURRENT LIMITING Xc Capacitor of X2 class to one of the wires,  6uF should do the trick to maintain 5oo mA and 120 volts @ 60Hz.

Will this work?

Did lots and lots of research, and is better than impedance of shaving off 1 to 10 watts to heat energy.  The capacitive reactance becomes the current limithing "resistor", but cannot find any schematic or datasheet to show how it is properly done.

Please advise.


texts: What are the differences between a differential amplifier and an op-amp? Both have two inputs. How do they differ from each other?


texts: Should I use NMOS or PMOS in CMOS demultiplexer circuit?

texts:
I am trying to design a simple 1:2 demultiplexer. I have two question here. First, is the following design right?: (simulation shows that it is working)

in_D is the input data line, in_S is the selector and out_A and out_B are the two demux outputs.

I am currently using NMOS. Now the second question is: "Will it be better to use PMOS?" Or even a maybe a third question: "What is the conventional way to design a CMOS demultiplexer"?

Update: (Removing inverter and changing M2 to PMOS)

This actually worked but I am not sure  if it can be used iin real design. Simulation is ok.


texts: disable "show base" item in Modelsim for automation

texts:
I have trying to write a do do file for automation.
I want to disable the "show base " item in waveform.
So what is the command ?


texts: How to use k150 pic programmer on Linux?

texts:
I'm trying to start with PIC microcontrollers. I bought this programmer: http://www.kitsrus.com/pdf/k150v2.pdf and a 16F628A.

But I'm not able to use it with my Arch Linux...
How can I do that?

Thx


texts: What happens to the voltage through the transistor?

texts:
In Figure above, I was asked: "If the wiper moves more towards point B, what will happen to:

the base current, V1 (the voltage through the collector resistance) and V2.

The answer was that:

the base current decreases.
V1 decreases.
V2 increases.

I would understand the variation happening to both V1 and V2 since the base current decreases, but I don't get why does the base current decreases anyway. Could anyone explain it for me?
Thanks in advance!


texts: Place Design error when using if/else statements in verilog

texts:
I'm trying to do one of the exercises on the book I'm studying from. The idea is to turn on/off LEDS depending on switches. But I got a place design error when tried to run implementation (synthesis ok):

  ERROR:[Place 30-574] Poor placement for routing between an IO pin and
  BUFG. If this sub optimal condition is acceptable for this design, you
  may use the CLOCK_DEDICATED_ROUTE constraint in the .xdc file to
  demote this message to a WARNING. However, the use of this override is
  highly discouraged. These examples can be used directly in the .xdc
  file to override this clock rule.

I'm learning FPGA design so clearly not an expert at it. After trying to "debug" and isolate the error, I found that this works:

module led_pattern(led, l_sw, r_sw);

output reg [15:0] led;
input [1:0] r_sw;
input [15:14] l_sw;

always @ (r_sw or l_sw)
begin
if (r_sw[0] == 1'b1)
    begin
        led[0] = 1'b1;
        led[1] = 1'b1;
    end
else
    begin
        led[0] = 1'b0;
        led[1] = 1'b0;
    end
if (r_sw[0] == 1'b0 && r_sw[1] == 1'b0 && l_sw[14] == 1'b0 && l_sw[15] == 1'b0)
    begin
        led[7] = 1'b1;
        led[8] = 1'b1;
    end
else
    begin
        led[7] = 1'b0;
        led[8] = 1'b0;
    end
end

endmodule

but this doesn't (it triggers the above quoted error):

module led_pattern(led, l_sw, r_sw);

output reg [15:0] led;
input [1:0] r_sw;
input [15:14] l_sw;

always @ (r_sw or l_sw)
begin
if (r_sw[0] == 1'b1)
    begin
        led[0] = 1'b1;
        led[1] = 1'b1;
    end
else if (r_sw[0] == 1'b0)
    begin
        led[0] = 1'b0;
        led[1] = 1'b0;
     end

if (r_sw[0] == 1'b0 && r_sw[1] == 1'b0 && l_sw[14] == 1'b0 && l_sw[15] == 1'b0)
    begin
        led[7] = 1'b1;
        led[8] = 1'b1;
    end
else
    begin
        led[7] = 1'b0;
        led[8] = 1'b0;
    end
end

endmodule

Note that the only difference is in the former I used else statement and in the latter I used "else if". Finally, the part of top module where I'm instantiating led_pattern is:

module top(LED, AN, CA, CB, CC, CD, CE, CF, CG, SW);

// Ports declaration
input [15:0] SW;
output [7:0] AN;
output CA,CB,CC,CD,CE,CF, CG;
output [15:0] LED;
wire [6:0] seg = {CG, CF, CE, CD, CC, CB, CA};
reg [3:0] seg_value;
led_pattern sys(LED, SW[15:14], SW[1:0]);

didn't put the rest of the code because might not be necessary.

Note: I'm not using clocks here (at least not on purpose, maybe yes by accident?). led is used for LEDS on NEXYS4 DDR and l_sw, r_sw are switches from the board. This is purely combinatorial.

What could be causing that place error?


texts: SystemVerilog in ModelSim ignores negedge/posedge when monitoring

texts:
Using SystemVerilog and ModelSim, I want to monitor the values of some signals in my design when the clock is on its negative edge. Strangely, the code responses on both edges (positive and negative). Here is a minimal working example:

`timescale 1 ns / 100 ps
module tb_ex;
logic clk;

always
   begin
     clk = 1;
     #5;
     clk = 0;
     #5;
   end

always @(negedge clk)
   begin
      $monitor($time, "-> clk = %b", clk);
   end

endmodule

which results in

VSIM 40> run
#                    5-> clk = 0
#                   10-> clk = 1
#                   15-> clk = 0
#                   20-> clk = 1
#                   25-> clk = 0
#                   30-> clk = 1
#                   35-> clk = 0

It seems that the always @(negedge clk) is not honored. Even if I put an if inside that block,

always @(negedge clk)
   begin
      if (clk == 0) begin
         $monitor($time, "-> clk = %b", clk);
      end
   end

the result is still the same. How can I make it work as expected? Thanks!


texts: Decoding Transformer circuit for power supply generation

texts:
I am referring below schematic of transformer to generate power supplies in the system.
Transformer used is step up transformer (Input-5V, Output: +/- 12V, +/- 48)

But I am not getting how transistor pairs are operating in this condition and why they have used?

( PS- From my basic understanding, parallel transistors are used for increasing current capacity, but in what condition they are switched ON, that I am not able to figure out)

Left part where 5V is written is basically following circuit:

Please someone guide. Thank you in advance.


texts: Microcontroller output does not change when connector to MMBT2369

texts:
I am trying to Optoisolate a signal from microcontroller. I am driving the signal to base of MMBT2369, and opto isolator LED is connected to Collector of the transistor.

When transistor is not in place, uC output is as per logic i.e toggles every 1 second. When Output from uC is connected to base of MMBT2369, uC stops toggling and output is always constant low.

What can be the reason for this behavior?

Circuit is as shown. SOL_ENB is signal from Microcontroller.


texts: How do I know if not using FPGA dedicated clock input for a PLL pin is bad for my design?

texts:
PLLs are hard blocks in silicon. They are connected to specific pins for their clock input and drive specific pins for clock output. It is possible that we choose a "non-dedicated" pin for clock input/output of the PLL. When we choose "non-dedicated" pins, the fitter shall use routing resource to route the pin to the PLL.

I can see that Quartus generates a warning if we do not use dedicated clock pin for input or output. The message usually states that there will be worse jitter performance. It is not clear if this is an actual problem.

In this case, there is a DDR3 memory controller being fed by the clock signal. How do I know if I can get away with using a non-dedicated clock pin for clock used by the memory controller's internal PLL?


texts: Writing an emulator for a SPI like slave device (LED Driver PT6959) using a PIC

texts:
I am working with a legacy device that uses a "SPI like" protocol. This device acts like a:

SPI "master", but expects to talk with only one "slave" device. It
does not expect any output/data exchange from the slave
sends out LSB first
pulses the 'Slave select' (active low) line to signify the start of a "command" (hence instead of this being a chip select line in
SPI, it's more of an indicator that a command is going to be sent by
the master)
multiple, variable list of data bytes might follow after each such "command" (as long as the 'Slave select' is active, data
following the first/leading data byte is interpreted as parameters
for the command)
a new "command" can start only after the 'Slave select' line has gone inactive and can be pulsed active again

The protocol the master expects the "slave" device to follow is captured in the following diagram (Pg 12 of http://uglyduck.ath.cx/PDF/misc/PT6959.pdf):

I am going to emulate the "slave" device using a PIC18F2550.

Given this information, how do I detect the start of a command?

I have written some code to capture the data from the master and forward it over the UART but can't figure out how to

do the same when using the USB Framework (as I am using busy polling to read data from the SPI port and once all 8 bits are in, I send the byte over UART)
detect when the 'Slave select' line goes active or not (I am afraid hooking up an interrupt could mess around with the built in SPI library)

Perhaps what I am asking is "how do I do the following":

detect that the 'Slave select' is active or not
capture the incoming data from the master without loosing any bytes sent (since the slave device has no way to tell the master to retransmit the data)
do the above two while keeping the USB link alive and not making it timeout (which can happen if the slave is often busy polling the SPI lines for data)

Suggestions and sample code for atleast the first two points will be highly appreciated


texts:
I was reading 17xx series` data sheet, and I had trouble understanding a specific explanation given for a major number of pins:

  5 V tolerant pad providing digital I/O with TTL levels and hysteresis
  and analog output function. When configured as the DAC output, digital
  section of the pad is disabled. This pin is pulled up to a voltage
  level of 2.3 V to 2.6 V."

Now I understand what TTL and hysteresis are, so no need to explain them for me. I`m not certain what the last sentence means. Does it mean when those pins are configured with pull-up resistors the voltage level changes to "2.3 V to 2.6 V"?


texts:
I'm just starting out learning about Electronics but something has puzzled me . I have read that current flows through a circuit from negative part of a battery to positive  .

but what puzzles me is I made a simple series circuit  of a
Diode - Resistor  - LED  ........... Positive terminal is connected to the Diode
so how does the LED light up if electricity flows from negative to the positive terminal ? If  electricity flows from negative to positive the Diode would stop the flow and the LED would not light up?


texts: Necessity of beta in common emitter design

texts:
I'm thinking about a common emitter circuit like this one:

Initial assumption: If the base current is very small compared to the emitter current, then the collector and emitter currents are practically equal. This is an equivalent assumption to saying \$\alpha\$ is so close to 1 it may as well be 1.

If you know all the resistor values, you can find the base voltage, take off 0.7 V, and have the emitter voltage. With that, you can find the current through \$R_E\$. Since with the above approximation the collector current is equal to this, you can find the voltage at the collector by multiplying that current by \$R_C\$. Am I correct in calling this the quiescent collector voltage?

The voltage gain can also be obtained, by using \$r_{ej}\$, which is 26 mV (thermal voltage) divided by the emitter current found above. \$R_C/r_{ej}\$ should give the voltage gain.

From what I can see, if you allow the initial assumption then both quiescent collector voltage and voltage gain can be found without the transistor's \$\beta\$. The assumption seems reasonable to me, so my main question is: Why is \$\beta\$ ever used in this kind of analysis? It appears to be, so either my initial assumption is dodgy or my working following it is.

A smaller question about the circuit above:
I have read various guides on designing such a circuit, and a few of them say you should design them so the voltage across \$R_E\$ is 1 V. Why? Why not 2 V, or 0.5 V, or anything else?


texts: I have a 12V (single ended)power supply available for and op amp circuit I am designing. I want it to be very precise around zero volts for an output. I already though about using a virtual ground, but I am putting the output into a Max 10 FPGA, so I do not think that I can accommodate for that. My question is, is it possible to use a second op amp and make the Vcc of it ground and the Vee of it as 12V and use it as an inverting op amp, to then use that as the power supply for the first op amp. The op amps that I have are LM358, but I do not think that it makes a difference for this scenario. I am shifting the input and scaling it with a circuit like the one below, I am just trying to improve its resolution at small outputs.


texts: How to tell the polarity of a power adapter's wires

texts:
I purchased a power adapter so that I could put a different plug on it, but when I cut the wire and stripped it, it didn't have a colored jacket on it. The brick does not have a diagram on it, so I have no way of knowing which is positive, and which is negative.

I have a multimeter, and set it to  AC Voltage, and touched the red lead to one wire, and the black to the other. it was a positive voltage reading. I switched the leads and wires, and I got a postive voltage again. This is the power adapter I used:

Power Adapter

This is the multimeter I'm using:

Multi-Meter

Thank you


texts: Arduino Duemilanove external power source with USB connected

texts:
Can Duemilanove USB interface be used for data transfer/programming when the board itself is connected to an external power source? (say, USB is not powerful enough)

What are the requirements for the ground in this case? What do you have to do if your external power source is battery?

Is it possible to connect external power source when USB is already connected?

The following forum post http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1287771433 , seems to suggest the answer to the first question is "yes", but some official data source would be appreciated.


texts: designing a universal 0-10v and 0-300k resistance input circuit

texts:
I'm trying to design a universal input circuit which can accept 0-10v as well as variable 0-300k resistance.

I'm using this ADC (mcp3008) which has a maximum input of 5 volts , couldn't find an equivalent product that isn't cheaper than 15 pounds

Therefore I design 2 circuits , one which can accept resistance as an input (R2)(where I provide it with 5 V and then convert the voltage to resistance in order to figure out what resistor is connected ):

The other has a potential divider which can accept 0-10 volts as input (V1)  :

So my main question is how can I combine these two together so that I can have an input that would accept both a resistor between 0-300k or a voltage between 0-10 ?


texts: arduino and seven segment with two digit

texts:
I tried to make a sensing system using arduino UNO R3 with LM35 sensor and a display unit which is seven segment with two digits.

I made all the connections as follow(I know it is Missy but I think wiring is right) :

and I tried to make this program but is didn't work :

int analogPin = 3;     // potentiometer wiper (middle terminal) connected to analog pin 3
                       // outside leads to ground and +5V
int val = 0;           // variable to store the value read

byte seven_seg_digits[10][7] =
                                                            {
                                                           { 1,1,1,1,1,1,0 },  // = 00
                                                           { 0,1,1,0,0,0,0 },  // = 01
                                                           { 1,1,0,1,1,0,1 },  // = 02
                                                           { 1,1,1,1,0,0,1 },  // = 03
                                                           { 0,1,1,0,0,1,1 },  // = 04
                                                           { 1,0,1,1,0,1,1 },  // = 05
                                                           { 1,0,1,1,1,1,1 },  // = 06
                                                           { 1,1,1,0,0,0,0 },  // = 07
                                                           { 1,1,1,1,1,1,1 },  // = 08
                                                           { 1,1,1,0,0,1,1 },   // = 09
                                                            };
    void setup()
{
  Serial.begin(9600);          //  setup serial
  pinMode(0, OUTPUT);
  pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);

}

void loop()
{

  val = analogRead(analogPin);    // read the input pin
  float temp= val*5 ; //calculating the voltage
  temp /= 1024 ;    //calculating the voltage
  temp = (temp) * 100 ;// as 1V/100c
  int pin=0 ; //for first seven segment pins 0,1,2,3,4,5,6 is connected with a,b,c,d,e,s,g
  int pin1=7;
  Serial.println("temperature in C =");Serial.println(temp);             // debug value
  int tempL; //low number
  tempL=int(temp*10);
  int tempH;//high number
  tempH=int(temp/10);
  for(int j=0;j<7;j++)
  {
    digitalWrite(pin,seven_seg_digits[tempL-1][j]);
  pin++;}
  for(int i=0;i<7;i++)
  {
   digitalWrite(pin1,seven_seg_digits[tempL-1][i]);
 pin1++;}
  delay(2000);
}

I have tow problem :
1- pin 0 and pin 1 always high .
2- when I calculate the temperature from converting the returned number to volt then to temp I had wrong answer as I see from monitor and the number of the display is wrong too , the number that appear don't realat even to

when I see the output of LM35 using voltage-meter I see 0.3[v] which is sensible because it is summer and temperature about 30 here in middle east .

this video I recorder live(excuse me for my bad English) to explain more :
http://youtu.be/iQobAe4ie_8

and I hope if any one can explain about "offset" that this link talk about .


texts:
What is V_O in the following circuit?

The book I'm reading says it's 2V but I don't understand how.

This is how I see it:

So V_O from what I know must be less than 2V.


texts: LC filter sizing 50Hz AC to good DC (RMS to DC)

texts:
I'm using a LTC1966 for a RMS to DC converter. My capacitor is a 10 µF. When measuring with an oscilloscope, I have a small ripple which I want to remove.

My result from ADC to the program shows a ripple of ~8-9bits, and it is to much.

Input to the circuit is a 230V 50Hz source. I've tried to add an 1 µH inductor in series with no luck. Do I need a 0.1 µH?

Note of interest: the output of LTC has a high output impedance of 85kohm and my ADC acctually doesn't want anything higher than 10kohm, but somehow it works.

LTC1966: http://cds.linear.com/docs/en/design-note/dn288f.pdf

10 µF cap: http://se.farnell.com/avx/taja106k006rnj/capacitor-tant-10uf-6-3v-10-1206/dp/197014?Ntt=197014

So, what's the easiest way to reduce my ripple to produce the perfect DC?


texts: What's the impact of a crystal's frequency stability, ESR and load capacitance on micro-controllers?

texts:
I'm choosing a crystal for MK20DX256VLH7, but I can't seem to find enough information in MK20's datasheet for the oscillator.

So, what I'm interested in knowing is: What is the impact of crystals' frequency stability, ESR, and load capacitance on the performance of the MCU? Would it be acceptable to use 20 ppm, 150 Ohm, and 8 pF values?

The other question on my mind is: By what margin I can deviate from these specs without affecting the performance of the MCU? Can I choose 18 or 15 ppm? Can I reduce the ESR down to 40 Ohms? Can I select load capacitance of 4 pF?


texts:
What board is the black one? What is it called? The label says "Nano", but if you look at pictures on the Nano online you can see it's the blue board. I ordered both a while ago from a non-genuine manufacturer and forgot their types.
Both work great with the Arduino "IDE" on Nano settings, have ATMega328P. The blue one has a USB-Mini port while the mystery board has a USB Micro like an Android phone or a Wacom tablet.

Sorry if terms are slightly off/inaccurate, I know Stack Exchange can be extremely critical of unfamiliar "newbies".


texts: How to stop frying components with my rework station?

texts:
Recently I decided to invest in a rework station (namely the Yihua 858D) as I am sick of ruining pads when desoldering components.
Just today, I have fried £50 in components.
I am using the station to remove switches, jacks, USB connectors, etc. from a Bluetooth transmitter PCB, in an effort to slim it down for a project. I don't know how I am supposed to keep the solder molten, remove the component and regulate the temperature of the PCB so that the rest of the components on the board don't suffer. I am using the smallest nozzle, and have used temperatures in the ranges between 250-350 degrees Celsius, all to no avail. The board is around 5x5 cm, so it heats up quite fast despite my efforts (so much so that I can't touch it - is this normal?)
I have watched many YouTube videos, and have followed advice given to me (heat around the component, high temperature to avoid heating the PCB and only heating the component, circular motions).
What could be causing the failure of my parts? How do I use a rework station properly to preven the failure of parts?


texts: Best way to connect PCB to enclosed AC/DC power supply

texts:
I'm trying to minimize assembly time in a system that will require a PCB interfaced to an enclosed AC/DC power supply.  Unfortunately, on-board AC/DC converters are not economical for my power requirements (10A @ 12VDC). I'd love to avoid crimping spade terminals to the hundreds of wires (45 systems with one power supply each, 7 terminals per power supply).
Here are some options that I'm considering:

Integrated PCB spade terminals - I saw this design on the X-Carve website--seems like it should work, maybe I'd gold plate the fingers to be safe?  I'd probably design it to be a spade terminal instead of ring terminal to cut down on assembly time.  I haven't seen this design elsewhere--any reason this is a bad idea?

Repurposing a terminal lug like 7236 from Keystone.  I'd need to bend the terminal lugs or orient the PCB perpendicular to the power supply.

Any other ideas out there?


texts: Need help reverse engineering and understanding a small circuit

texts:
I am an electronic student, and one day I opened an energy meter I have at home called EM21, and found out that its body is comprised of two major components:

The meter body, that connects to the grid and measures voltage and current (in theory, it has all the intelligence of the meter)
The LCD display, that shows the user real-time information about the measurements (dumb, has enough intelligence to control the LCD, push-buttons and request the body for voltage/current/power info using induction)

The awesome thing here is that the LCD component is powered by the body, and communicates with the body, using nothing more than induction (contactless).

[LCD with buttons]-----coil  <magnetism magic>  coil-----[meter body]

In a couple of hours I've tried to reverse the circuit that uses coupling to provide energy to an LCD screen with buttons, and at the same time, that coupling is used as a contactless communication channel.

This was the end result:

simulate this circuit – Schematic created using CircuitLab

  Thank you Transistor and /u/eyal0 @ Reddit for organizing the connections

And these are the photos of the real cannibalized circuit:

FRONT (open in one tab)
BACK (open in another tab, and then commute between both, they are aligned with each other)
FRONT Labeled
PWR SRC The coil that is used to power the circuit (body powers LCD circuit through it) and for communication

(can you check if I got the diagram correctly?)

  Thank you /u/InductorMan @ Reddit for pointing me out the C4/R4 mistake I had in the diagram.

I have some questions about the inner workings of this for which I can't find an answer:

How can the coil be supplying the ATMEGA with DC current? How come
VCC is directly connected to one of the coil's ends and it doesn't fry
the ATMEGA?
What is the role of Q1?
What is the WB2 component?
What ATMEGA pins are used for communication? How can I "listen" to them (with an oscillo) and discover the communication protocol?
What are the AVCC and AREF doing the way they are wired in the diagram?
How can I easily find the values of the capacitors and the zeners?

Thanks!

Link: The ongoing discussion on Reddit


texts: Easiest and Best PoE Ethernet Chip/Micro/Design for DIY Interface with Custom Arduino Board (AVR Solution)

texts:
I am looking for a PoE Ethernet chip that I can incorporate in a design I plan on using along with some of the Arduino features. I would prefer to implement a standalone mcu for the Ethernet device capable of providing Ethernet. All possible solutions must support PoE to power the Micro. I do not plan on buying an Arduino nor do I want any shields per se. I am looking for a PoE Ethernet chip that would work well with the Arduino firmware and micro controller. A chip that I can incorporate into my own custom Arduino board.

I would also be interested in any AVR chips which provide the same capabilities (pin wise) as the Arduino ATMega168/etc that has Ethernet built on board.

My devel platform would be AVRStudio or something like it with a Jtag ICE MKII. I do not have the ability to use PIC as I do not have a programmer, the software, nor the cash to invest in another platform.

Thx in advance for your help.

Edit: Andrew noted that I should post more info. First of all Andrew: I have not looked at the MFGs you mentioned. I will do so now.

I would like to place a few Freeduino type setups around the house to do various home automation tasks. My home is already wired with Cat6 and I plan on plugging certain network drops into a 10/100 8 port Linksys POE switch. I would like to provide network and power to each device without having to hack the network cables. I have verified that the switch conforms to the 802.3af standard.

I would like to create each board to solely pull power off of the PoE lines to provide sensor and relay capability (relays would be SSR - GA8-6D05 from Crouzet which requires 3-32VDC for the relay.

I would expect the PoE chip to deliver either full PoE voltage or be nice enough to drop it down to 7-12VDC. If needed, I can add a 7805 or appropriate chip to ensure voltage regulation. In the end, my micro would need 5V + 3V DC regulated @ 1A.

Hope this answers anything my original post left out.


texts:
I want to know is a simple diode is enough to protect non rechargeable batteries from getting charged while used as a memory-saving backup.
The use case is: I have a Car stereo head converted to home use by means of simply using a 12v power adapter. I have a simple switch connected to the cable that normally goes to the acc switch.
It works fine, but here we have frequent power outages so I want to add a backup battery to preserve memory values thus preventing my settings (EQ, radio stations, current track) from getting deleted ever so often.
I want to use 8 AA batteries to hold
I have battery holders lying around and diodes salvaged from old equipment, and part of my purpose is to recycle this stuff.
The following is the intended circuit.
Will the diode (1) achieve this purpose?
Diode 2 is supposed to prevent the battery pack from feeding the ACC line, thus preventing the unit from fully turning on from battery power.

Edit: Corrected battery symbol polarity.


texts: Design of supply for nichrome wire heater

texts:
I have two Cr20Ni80 nichrome wires having 1m length each, 24 SWG and a resistance of 4.390 Ohm/m. I need to heat up a furnace to 450 degree Celsius. How can I calculate the supply voltage and current for the purpose? I need some formulas to design a power supply to power this nichrome wire. Is there any relation between temperature, voltage and current?

The furnace has a base diameter of 54cm and top diameter of 34cm with a height of 40cm. Total volume is 61869cm^3 and is made of mild steel with no insulation.

Also I need to know:
Can I power it using AC or DC supply?

If I give a constant supply for some time, will the nichrome wire temperature increases over time? or will the temperature remain constant?


texts:
I am baffled how this motor works...It has a single axial winding that turns
a disk. The disk is not a strong magnet but somehow this motor has torque
enough to swing a floor fan. I see on the internet that this type of motor is also
used for microwave ovens to turn the tray..

The flux is flowing axiallly through the disk but the disk is not conductive so I
don't think eddy currents are producing the torque. Somehow the flux is being redirected I guess but how can that be???

From the image you can see the disk is sitting in the center of the many turn winding(covered by the white plastic). There are tabs that come up from the
bottom of the motor plate that are used to hold the winding in place. Is it possible that these act as induced stator poles???


texts: Networking options for multi-node Star topology

texts:
I want to create simple network consisting of 1 master and up to 16 slave nodes. Project will be based on PIC MCUs.

Network has the following specs/requirements:

Relatively low speed
Inexpensive
Cable lengths up to 20m
4-line limit (2 power + 2 data)
Slaves connected directly to Master (Star network)
Master initiates any transmissions (if it matters)

I have considered 1Wire, I2C and RS485, and my final choice fell onto RS485 as it seems the best for the task at hand.

However, I've been reading that using Star topology with RS485 is not recommended due to reflection and some other issues.

What would you recommend as the best option in this case? Stick with RS485 or look somewhere else?


texts: How do you set the configuration bits for a PIC 16F1829 in MPLAB X?

texts:
I am new to PIC programming (but not C, embedded systems, etc.)  I am using MPLAB X with the PIC16F1829 specified for the project.  I have the following includes:

#include <htc.h>
#include <xc.h>
#include <pic16f1829.h>

__CONFIG( WDTDIS );  // No matter what I use in this macro, it won't build

I cannot seem to locate and definitions that work in the __CONFIG macro. The documentation also mentions #pragma config SOMESETTING, but I also cannot find any settings that will work. Does anyone know if:

I am missing some setting or include in my project? Or,
if settings that will work with this processor are documented somewhere?

UPDATE:

For anyone else who finds this, based on the documentation, for this processor with XC8, the correct way to specify these bits is with the #pragma config

#pragma config WDTE=OFF
#pragma config FOSC=INTOSC


texts:
The part under consideration is UDA1334BTS - the DAC I use in my design.
Here's the typical connection diagram:

If the circuit is being powered off, and then quickly on, the Vref voltage does not get as low as 0.75 V to get part properly reset, and the consequence is DAC output powering up with some arbitrary voltage, causing click when external interface writes initial value of 0 to the DAC. I can not state if only analog part is guilty, or digital part is also involved.
Here's the related circuit:

We can see that charge to the reference 1.25 V (analog part out of reset) takes about 1.7 seconds, and discharge to 0.75 V (analog part complete reset) takes about 1 second. My tests show that time frame, causing clicks, is actually longer than one second, thus actual reset threshold during powering down must be lower than 0.75 V.
The good thing in the circuit is that there's a system reset signal at the start of power up, which I can use to do something to this Vref input. I drew the following circuit:

and here the simulation zoomed:

Green is reset signal, blue is Vref output, and red is current through transistor's emitter.
I am looking for the feedback on this circuit, in particular:

is it correct in general, is there any better circuit?
what would be the best choice for transistor (I picked 2N2222 out of blue);
any advice on resistor values?
will the chosen values be ok for accelerated capacitor discharge not causing audible click/pop (the DAC output follows the Vref input very well)?

Edit (info for jonk): timing can be extended to the whole reset pulse width, e.g. 200-400 ms, and slope must not be sharp not to cause click/pop as DAC output follows the Vref voltage; I think small residue discharge voltage voltage (let's say, 0.4-0.7 V) would be acceptable, but must be confirmed through testing.


texts: An all-pass filter with 0 degrees to +180 degrees shift

texts:
I need an (for audio bandwidth) all-pass filter that has 0 degrees shift in low frequency and +180 degrees shift at high frequency.
The ones here https://sound-au.com/articles/active-filters.htm (figure 7.5) do just the reverse.

Can somebody please post a schematic or link to an op-amp based implementation?


texts: Interfacing Lego Mindstorm with ultrasonic transducers and actuators

texts:
I'm very new to electronics. I'm working on my school science project and am having difficulties to turn theory into praxis. For my science project, I'm aiming to construct a device that will enable blind people to appreciate the distance of an object ahead of them through the use of ultrasound and a touch signal.

Theory (simple): Ultrasound (input) => Mindstorms NXT (process) => Shock (output)

In more detail:
The ultrasound sensor gathers the distance of the object in front of it.
The data of the ultrasound is fed into the NXT. Based on the distance of the object, the NXT outputs a shock; the closer the object, the higher the shock, the further away the object, the lower the shock (the shock is not high, thus not uncomfortable).

The NXT runs on 9 AA batteries (9 volts). I can specify how much power a specific output port can deliver eg. setOutput(power in %) (so I'm guessing it's regulating the amount of current that is flowing out).

Here's the difficult part (for me). I've bought one of these prank shock toys from the local prank store. I'd like to connect it the NXT output port. The prank shocker runs on 4 button cell batteries that deliver 6 volts.

I've figured output 10 % of the output on the NXT output port (setOutput(10)) is close to identical to the current being delivered by the 4 button cell batteries.

I've connected the shocker to the NXT, when I run my program and touch the shocker I don't get any shock. The only thing that seems to happen is that the shocker makes a silent little sound.

Could someone please share their thoughts on what I'm doing wrong, and the best way to implements what I'm trying to do? Help is hugely appreciated. I can share more details if needed.

Update:

Due to the difficulties to implement the shocker into my science project, I've scrapped the idea of using it as communication to the blind user. (I know it's not right to "give up", yet thanks to feedback I see it's not the optimal decision and I don't wont to harm my precious NXT).

I'll be using my Android's vibrating motor and hook up my phone to the NXT via bluetooth. Apparently there is no way to control the intensity of the vibration (Not sure why, (like Russel says), one could vary the voltage or PWM).


texts: How can I check if there is a signal from my radio-frequency type remote control (RC)

texts:
You can test the output of a television infrared remote control by photographing it with a digital camera - you see on the image if the infrared LED lights up.

Is there a method, without an oscilloscope, to find out if 27 MHz radio remote control is still sending a signal?


texts: Newbie Question: Switch mode Power Supply Troubleshoot

texts:
I have a small 12V 3.5A switch mode power supply that fails to provide any output.  I want to learn about switch mode power supplies so I thought I'd try to repair it.
Was hoping someone might be able to suggest what to check.
What I'v e done so far:
I reverse engineered some of the schematic, it looks like it's the pretty standard design based on the OB2262 PWM controller, with a TL431 voltage reference and feedback via an opto-isolator.
Symptoms and Steps
On power on, there seems to be an initial surge upto about 10V at the output, which rapidly dies away
I can measure 240V AC coming in, and 320V DC or so across the bulk capacitor, so no problems there.
I stuck the multi meter on frequency and looked at the signal on the FET driving the transformer, expecting to see about 200kHz or so, but nothing, so it doesn't look like it's oscillating.
I powered down, shorted the caps, then checked their in circuit capacitance and ESR, nothing seems wrong there.
I checked the diode voltage drops on the pair of Schotky diodes in the output circuit, and they seem to be as expected (voltage drop one way, OL the other).
Looked the board over for obvious shorts, broken tracks, or burnt components.  Nothing appears wrong.
Checked all the other diodes in circuit, none seem shorted.
Tried the following trick:  With the power off, applied 12V DC to the output, and checked the voltage divider across the output.  Under these conditions I checked the voltage between the 2 resistors of the voltage divider, I got about 0.7 volts.  My reasoning here is if I vary the voltage above and below 12V, the rated output of the PSU, I might be able to see some kind of signal being sent from the opto isolator, across to the live circuit.  As far as I can see there is none, although I don't really know what I should expect to see:  a constant voltage as a corrective signal (????) because there's no actual response to the voltage being greater or less than the rated 12V (my understanding here is sketchy I know).
I believe the TL431 and the opto-isolator rarely go bad, but I will check in powered down state as much as I can.
Any suggestions anyone?  How do these small wall wart switch mode PSUs normally fail?
I'm really hoping I don't have to replace the OB2262 chip, because it's so small and I don't have the facilities to do it.
Help would be greatly appreciated.


texts: How can I do offset nulling for this opamp circuit?

texts:
Circuit below amplifies 0-5mV signals to 0 5V level. But at zero input there is like 0.5V offset. Is there an easy way to offset null?

edit:

edit2:


texts: SIM card: Detected when the card is removed

texts:
I have an STM32 with a SIM card reader. For some reason the DETECT pin interrupt is triggered when the SIM card is removed, as opposed to when the SIM card is inserted.

What could be going wrong here?


texts: Class A Audio Amp - Improving Efficiency With A Mosfet CCS

texts:
I'm designing a class A audio amplifier but am struggling with the efficiency of my circuit.

I know of 'push-pull' Class A designs, but only want to use a single output mosfet.
I would like to hit a minimum of 12 watts using a 24V 1.5A supply.

My current circuit:

I know I'm limiting the top of the gate threshold by feeding the gate though the drain of the output Mosfet in order to stabilize the operating point.
Would the only way to get the full range to be use separate DC feedback? Would I have to use another active component (like a PNP transistor) from the input?

Also have I got the constant current source arrangement correct? I'v noticed there is a current drop as the draw by the output mosfet falls, is this anything to be concerned about?

As I am a beginner at audio amplifier design, the design goals are to be a simple, but high quality audio amplifier.

Thank you ESE community :)


texts:
I want to power 25 adafruit NeoPixel LEDs. According to the specs they draw a maximum of 60mA at 5V each. In total that would be 1,5A at 5V.

I would like to use a 2A usb phone charger as a power supply for the LEDs. If I cut open an old usb cable, there should be 2 power lines in there. I would like to use those to power the LEDs.

Is there any reason that an usb phone charger should not be used as a power supply?
Is there any reason that this is a bad idea?

Thank you very much for your advice!


texts: Software Debouncing to detect if switch has been pressed for T seconds

texts:
I need to detect if a switch has been pressed for longer than a set time, without using any Timer registers in my embedded code.

I am using software debouncing in the following manner to detect a normal switch press.

int buttonPress (void)
{
  static int downCount= 0; // static = value isn't lost between calls.

  int currentButton = ((IO0PIN & 0x00000200) == 0x00000200);

  if (currentButton ) { // button is down

    if (downCount == 5) { // button has been down for 5 counts
      downCount++;      // increase the count so we don't trigger next time
      return 1;
    } else {              // some count other than 5
      if (downCount < 5)  // increase if it's less than 5
        downCount++;
    }
  } else   {    // button is up
    downCount = 0;
  }
  return 0;
}

However, I would like to detect whether this button has been pressed for 5 seconds or longer. The problem I am facing is that I cannot seem to be able to count up to 300,000 and if this is not reached, fall back on the original downCount of 5 to mark as a normal button press.

(Since the clock speed for my micro-controller is at 60 MHz, then it will take 5 seconds to reach 300,000.)

I have played around with some logic as follows, however in the case shown below,due to the introduction of the while statement, I am counting up to 300,000 irrespectively of how long the button has been pressed.

if (currentButton ) {   // button is down

  if (downCount == 5) { // button has been down for 5 counts
    downCount++;      // increase the count so we don't trigger next time
    while (downCount > 5) {
      if (debounce == 300000) {
        flag_5SEC = 1;
      } else if (debounce < 300000) {
         debounce++;
      }
    }
    return 1;
  } else {              // some count other than 5
    if (downCount < 5)  // increase if it's less than 5
      downCount++;
  }
}

Any tips or suggestions on how to go about this task?

Note: I want to detect for a longer switch press explicitly in the debouncing code above, since doing anything else may have adverse side-affects on the rest of the code, which someone else had previously wrote.

I have managed to complete the aforementioned task using timers, however, since then, I have used all timer registers (and match resisters that are available) for more important tasks within the same project.

I do not need to detect an accurate time delay, simply if the button has been down for longer than, say, 2-3 seconds.

Comment by @DiBosco clarifies further:

  So what you're saying is that if you get a switch pressed for, say, twenty counts and it is released that acts as normal press that does one function, and if it is pressed and held down for two seconds or so it carries out a different function...


texts: Heater not heating when connected to battery - is it broken or am I dumb?

texts:
So, I'm a total amateur, my sum total electrical engineering experience is stuff my grandpa explained to me when I was 6 and playing with Snap Circuits.

I'm trying to build an electric heater in to my jacket: I purchased this battery:

https://www.amazon.com/gp/product/B016BJCRUO/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

and this heating element:
https://www.amazon.com/gp/product/B00ZP3XCS4/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

The element is a silicone heat pad designed for 3D printer beds; it's rated for 150 watts @ 12 volts. It was the cheapest thing that seemed like it would do the job in my price range. The battery is a lithium-ion pack that's supposed to output 72 watts at 12 volts. They say it's supposed to be able to handle a 6 amp load continuously but I'm aware battery manufacturers always lie. An electric blanket is supposed to draw around 2 to 3A anyway so that should still be enough in theory to get the job done.

Now I realize these numbers don't match up, but I figured the heater would just... not be able to pull more amps than the battery will put out. I don't want it going up to its design temperature anyway (there's an electronic thermostat involved here too).

The thing is, I've tried connecting the heating pad directly to the battery and nothing happens. Even leaving it there for half an hour, the pad is still cold to the touch.

Do you think it's more likely that there's some overload protection circuit on the battery pack that's cutting off the power, or is it more probable that something's just broken?

I've checked the pad with my multimeter and it gives me an ohm reading, so presumably there isn't a broken connection inside the thing. Interestingly, checking the output of the battery gives 8 volts (at half charge) to 10 (fresh off the charger,) and whether the heater is connected or not doesn't seem to have any effect on that. The multimeter also gives 10 volts checking the charger itself though, so maybe it's just broken. It's pretty old...


texts: How to solve this circuit (phase shift across resistor)?

texts:
I can't figure how do I proceed to solve this problem-
Vin is given as 2cos100t, Vout is 2cos(100t-π/2) and R=1k. C is to be found.

What I've done and where I'm stuck - I know that V- terminal will have a sinusoidal voltage with a certain phase shift due to the low pass filter and the opamp forcing V- = V+. I don't know how to proceed after that. I never encountered a problem where there's a AC voltage difference with phase shifted across a resistor! (Vin and V-)
Could anyone help?


texts:
I'm confused as I have seen a triangle waveform referred to in terms of PWM but a triangle waveform does not actually modulate the pulse width.

Is a triangle waveform a type of pulse width modulation?


texts: Inductor through hole legs different length

texts: Why would the legs on a radial through hole inductor be different lengths from eash other?  There is no polarity to indicate like a LED or Electrolytic cap...


texts: Why does the human skin steal field lines when it's very non-conductive in dry state?

texts: In projected capacitative touch screens, sensors measure change in electric field coupling from the drive electrode to sense/receive electrode.    But don't field lines only terminate on conductive surfaces? This article mentions that the change in capacitance read-out when a finger is brought close to the sensor is of the order of a pico-farad. Considering how nonconductive the epidermis is (~100KOhms, worst case), this change is quite large. Wouldn't it be orders of magnitude lesser if epidermis was really acting as a sink? Could it be possible that the field lines actually terminate on conductive layers underneath the epidermis?


texts: Switching IC via FTDI232 DTR and transistor

texts:
I am trying to switch an IC on/off via the DTR signal pin on an FTDI232 USB/TTL Serial converter.
Basically during the flashing of my ESP8266, I need to be able to power the IC off and then on again.
The FTDI adapter can power the ESP8266 without any issues while directly connected to it (this is the normal way to program these IC's).
The circuit I have made is :

R1 -> 1k

Q1 -> B772 PNP

The circuit works fine without the ESP connected (switching the DTR pin (P1) between Hi and Low causes the output (P2) to switch on and off).
The issue I am having is once i connect the ESP to P2 the FTDI resets every time i try and switch the ESP on.
Whole circuit runs on 3.3v.
I presume my issue may be drawing to much power from the FTDI DTR pin, but i am not sure why I get 3.3v at P2 without the ESP connected.  From what i can tell the transistor is acting as a switch and therefore shouldn't draw any more power from DTR if the ESP is plugged in or not.
The whole circuit has been made up on breadboard.
The transistor datasheet can been found : https://www.st.com/resource/en/datasheet/cd00062866.pdf

FTDI USB/Serial adapter is just a generic one with a chip marked as FTDI 1612-G FT232-RL

Any pointers on what i have got wrong?


texts: The intrinsic differences between H/W tasks (executable on FPGA) and S/W tasks (executable on CPU)

texts:
In hybrid platforms containing CPU and FPGA, there are some models for tasks. For example, in one task model, it is considered that every task can be run on either FPGA or CPU (i.e there are two versions H/W and S/W for any task). However, in another task model some tasks must be run only on FPGA (or CPU).
My very important question is that what differences are exactly between tasks that we can run some of them on both S/W or H/W or limit us to run them only on one processing element (only on FPGA or CPU)? Is there any real application in our world with these task models too?
Thank you.


texts: What do you wish you had known before you  started with Microcontrollers?

texts: When working with AVR microcontrollers or Arduinos, what is something that if you had known sooner would have saved you a lot of time or frustration?


texts:
I have motor with build in hall sensor(sc2546). I am controlling speed with 4 mosfet bridge duty cycle modulation. Frequency is about 20 kHz. Motor is powered with separate power supply and it is galvanically isolated from hall sensor power supply. Hall sensor wires are shielded and shield is grounded with hall sensor power supply ground. I want to read pulses from hall sensor but signal is completely destroyed with noise.
What I am doing wrong?
It is something wrong with motor and hall sensor?
EDIT:
When I use 100 % duty cycle the noise disappear.

This is my bridge:


texts:
I am trying to make a voltage multiplier circuit.  When I connect it to mains \$120 \; V\$, the output voltage becomes \$90 \;V \;DC\$,  I do not know why this is.

Capacitors: \$20 kV \; 1000 \; pF\$
Diodes: \$4 \; 12\;kV \;5\;mA\$ and \$2\; 12\;kV\; 350\;mA\$

Edit forgot to mention the \$90 \;V\$ is DC, so it is being rectified and not multiplied.


texts: What would be the design challenges of making a phone out of detachable blocks?

texts:
A video about a phone concept called Phonebloks has been circulating 'round the web for a while now. It is a phone platform where generic "blocks" are connected via the "base", which is some kind of generic circuit which connects the blocks together. Blocks can vary in size and be be placed anywhere on the base as long as they fit, and it will result in a working device.

The inventor is adamant about the advantages of the phone's modularity: less waste, more customizeable, and easier repair. But they don't seem to give attention to the disadvantages there would be. What would be the design challenges and disadvantages of such a modular phone system as opposed to designing usual phones?


texts: RTD sensors and the mystery of Voltage Vs Current sources

texts:
Alright folks, I know there are a decent number of threads about RTD sensors (resistance thermometers. most associated with platinum type ones) Let me first assure you then hopefully show you that I've gone through the threads.  I've read enough now to know there are multiple ways to do things, but I am struggling to figure out the why.

I'm still stuck on this idea that the classical way to measure an RTD sensor is to use a ratiometric measurement of a RTD resistor and a reference resistor, along with an excitation current provided by a current source.

This is great an all, but I can't really see why it helps us versus a low-voltage voltage source.  The ratiometric measurement in the classically described situation is used because it allows any drift in the current source to be tracked by the reference resistor and eliminated as error.

By that same measure, the fact a voltage source would have a drift in voltage and excitation current because of changing resistances, should not matter, since you're running the beauty of a ratiometric measurement.

Other ideas:
(1) Perhaps people like that you can get a clearer linear internal heating error with a current source.
(2) People like the complications of current sources even though the easiest way to make one involves first a voltage reference?
(3) I'm stumped.
(4) Plenty of people say "current source is the classical way!" but then solid chip makers like MAX31865 turn around and still use voltage references not current sources.

Stackexchange questions that were about RTD sensors but only vaguely relevant:
Improving RTD Sensor filtering and readout
--> Decent classic circuit for RTD sensors, but not much conclusive here.
Single current source with parallel loads for many RTD sensors
--> More RTD discussion. Kind of works as another instance of people saying use a voltage source, or saying use a current source, but no clear explanation of why.

Stackexchange questions that were about RTD sensors but not very relevant:
Reading RTD Temperature Sensor
RTD's resistance to temperature

Stackexchange about current source vs voltage source but nothing related to measurement:
voltage source vs. current source

Any clarity would be appreciated. Thanks.

Updates:
Reading more I've seen the general claims "Current sources often are the preferred type of excitation source as they provide better noise immunity."

But it sounds like the good folks here are assuring me [personal interpretations] that the underlying reason why I am unclear on why current source vs voltage source would matter in a ratiometric measurement, is because in a ratiometric measurement it does not really matter.


texts:
I have a RC low pass and ferrite bead cap filter combination on my circuit board. I am trying to use Audio Analyzer U8903 to analyze the gain response of the filter.
I see quite different result in simulation and result using Audio analyzer.

In the audio analyzer if I change the generator impedance from 100 to 600 ohms or vice versa. I think the generator source impedance is impacting the results.

Has anyone used Audio Analyzer for filter analysis? Please let me know the methodology.

Thanks!!


texts: Initialization of custom hardware in Xilinx Vitis

texts:
I am kind a new in FPGA based software acceleration. My basic task was to implement a vector vector multiplier. I designed the IP in HLS, than design the block diagram in Vivado. As the final a stand alone application was created in Vitis from my previously exported XSA file. After uploading the program to my pynq-z2 the program stops in the automatically generated init function. If I am initializing the vec. vec. mult. hardware without the generated function it works. What could cause this issue?
#include <stdio.h>
#include "platform.h"
#include "xil_printf.h"
#include "xvv_mul_hw.h"

#define VEC_LENGTH XVV_MUL_HW_AXILITES_DEPTH_VEC1_0
int main()
{
    init_platform();

    print("Init device...\n\r");
    XVv_mul_hw* vv_mul_dev;

    /* This init works */
    vv_mul_dev->Axilites_BaseAddress=XPAR_VV_MUL_HW_0_S_AXI_AXILITES_BASEADDR;
    vv_mul_dev->IsReady=XIL_COMPONENT_IS_READY;

    /* This init does not work */
    //int init_status = XVv_mul_hw_Initialize(vv_mul_dev,XPAR_VV_MUL_HW_0_DEVICE_ID);

    //print(init_status);
    //print("\n\r");

    print("Init vectors\n\r");
    int v10[VEC_LENGTH],v11[VEC_LENGTH],v20[VEC_LENGTH],v21[VEC_LENGTH];
    for(int i=0;i<VEC_LENGTH;++i){
        v10[i] = i+1;
        v20[i] = -(i+1);
        v11[i] = 2*(i+1);
        v21[i] = -2*(i+1);
    }

    print("Calc golden res\n\r");
    int res = 0;
    for(int i=0;i<VEC_LENGTH;++i){
        res+=v10[i]*v20[i];
        res+=v11[i]*v21[i];
    }
    print("Send vectors to PL\n\r");
    XVv_mul_hw_Write_vec1_0_Words(vv_mul_dev,0,v10,VEC_LENGTH);
    XVv_mul_hw_Write_vec1_1_Words(vv_mul_dev,0,v11,VEC_LENGTH);
    XVv_mul_hw_Write_vec2_0_Words(vv_mul_dev,0,v20,VEC_LENGTH);
    XVv_mul_hw_Write_vec2_1_Words(vv_mul_dev,0,v21,VEC_LENGTH);

    print("Starting PL\n\r");
    XVv_mul_hw_Start(vv_mul_dev);
    while(!XVv_mul_hw_IsDone(vv_mul_dev));
    int res_hw = XVv_mul_hw_Get_return(vv_mul_dev);

    xil_printf("Result is %d, and should be %d", res_hw, res);
    //print(char(res_hw));
    print("\n\r");
    cleanup_platform();
    return 0;
}

I am using v2019.2 version of the Xilinx tools.
Thanks for the answers!


texts: How to improve nasty form clipping behavior in differential input stage

texts:
The amplifier in the following schematic, when simulated, shows that it can cleanly amplify a signal with 0.1V amplitude to 10V. When driven with a larger signal, though, the behavior is very nasty in the positive half cycle. The output suddenly dives from around 16V to the neighborhood of zero. Moreover, the recovery shows hysteresis.

simulate this circuit – Schematic created using CircuitLab

Some simulation plots:

The problem begins when IN+ suddenly rises 50 mv above IN-. S1 plunges from near 20V down to 0, and so it goes.

In the negative half-cycle, things are a lot more civil. The difference between the inputs follows the input curve, and the output is just clipped flat.

What are some ideas to change the circuit so that the positive clipping behavior is more like the negative one?


texts: Internal USB (FFC?) cable with 90 Ohm Differential impedance

texts:
I'm trying to run USB D+/D- signals and some unrelated 19V power between two PCBs, on the daughter PCB the USB D+/D- will terminate to a USB-A-F jack. I have no problem maintaining 90 ohm differential impedance on the actual PCB, but how important is it to maintain that differential impedance on the cable connecting the two PCBs?

I'd like to use a flexible flat cable, but can't seem to find any that are 90-ohm. Is there an easier way to accomplish this?


texts:
Let \$v_1\$ be the input AC voltage and \$v_2\$ be the output AC voltage such that gain \$\dfrac{v_2}{v_1} = \dfrac{A+jB}{D+jE}\$ where \$j = \sqrt{-1}\$. How should I find the 70% point (the point where the gain is reduced by a factor of \$\sqrt{2}\$)?

I was told that I must set \$D = E\$. In that case, \$\dfrac{v_2}{v_1} = \dfrac{A+jB}{D(1+j)}\$. The explaination I was given was: since \$|1+j| = \sqrt{2}\$, the ratio is decreased by a factor of \$\sqrt{2}\$.

But what I don't understand about this is that, initially when \$\dfrac{v_2}{v_1} = \dfrac{A+jB}{D+jE}\$, the magnitude is \$\dfrac{v_2}{v_1} = \dfrac{\sqrt{A^2+B^2}}{\sqrt{D^2+E^2}}\$. When \$\dfrac{v_2}{v_1} = \dfrac{A+jB}{D(1+j)}\$, the magnitude is \$\dfrac{v_2}{v_1} = \dfrac{\sqrt{A^2+B^2}}{D\sqrt{2}}\$. But $$\dfrac{\sqrt{A^2+B^2}}{\sqrt{D^2+E^2}} / \dfrac{\sqrt{A^2+B^2}}{D\sqrt{2}} = \dfrac{D\sqrt{2}}{\sqrt{D^2+E^2}} \neq \sqrt{2}$$ Clearly the gain has not decreased by a factor of \$\sqrt{2}\$.

Is there something that I'm missing?


texts: Industrial equivalent of rapid prototyping hardware

texts:
If I want to automate something at home, I can use a Raspberry Pi or Arduino to hookup some sensors and put the business logic on the chip. Internet-of-Things-style, I can even read those sensors on my laptop.

I sincerely hope Raspberries aren't industrially accepted solutions. In the past, I've used a CX9020 to do industrially what I'd do at home with a Raspberry. However, those are fairly expensive, heavy and overly complicated.

What's the industrial equivalent of the Raspberry Pi or Arduino? Something able to withstand industrial (harsh) conditioins and a product owner wouldn't be ashamed to use as an add-on for existing hardware to do the above mentioned.

I've seen the Intel Edison with boards, Beaglebone, the Riotboard, would those fit the bill or are they too 'hackey'?

Note this is not intended as a shopping question.


texts:
I need to design an FPC to couple to an existing board. There are 3 FFC connections on this board. I believe them all to be Molex connectors but I still can't locate a similar part. Here is what I know:

The locking tab labeled 'A3' on one end and 'KK1' on the other. The pitch is .5mm. There are 17 positions and they face up when inserted into the connector. There are tabs on each side of the FFC measuring .05" in width and .07" in length. The thickness of the stiffener is roughly .012".
The locking tab labeled 'A5' on one end and 'MXJ' on the other. The pitch is .3mm. There are 31 positions and they face down when inserted into the connector.There are no ears/tabs on the mating FFC. The thickness of the stiffener is roughly .009"
The locking tab labeled 'A7' on one end and 'MXJ' on the other. The pitch is .3mm. There are 21 positions and they face down when inserted into the connector. The thickness of the stiffener is roughly .006".

Unfortunately I don't have access to anything more than a camera phone at the moment so I don't have any quality pictures to provide. I am hoping the information above is enough for someone familiar with these parts, but I will add images as soon as possible.

I have located several Molex FFC connectors that look similar but nothing that looks identical. I am not sure that it REALLY matters that I find the same exact part as it's not the connector I am after but the recommended FFC layout and stiffener size.

Suggestions?


texts: How do I design a DC-block cap without interfering with my filter?

texts:
Background

I'm considering the design of an AM receiver for three fixed channels - 3.33MHz, 7.85 MHz, and 14.67 MHz.

The antenna I'm considering is a manually-wound loop antenna with a design-able inductance based on turn count, turn spacing, and loop dimensions.

I'm considering the design for a tuning and pre-selecting circuit for a receiver. I'm interested in having it be all electronically (rather than mechanically) tuned. As such, and based on ideas from other related questions, I'm considering two selectable ranges - a lower range enabled for 3.33 MHz when a cap is switched on by using a pin diode, and a higher range for the other two frequencies for when the diode is off.

The electronic tuning itself is based on a varicap. The varicap has a wide enough range (3-69pF) that it's able to cover both 7.85 and 14.67 MHz with a little room on either side.

Circuit simulation diagram

The physical circuit (without showing equivalent simulated elements) is:

The circuit is simulated in Qucs. Below, dotted lines surround a single component with multiple equivalent simulated elements.

Circuit walkthrough

Lant is the effective inductance of the antenna. It is chosen so that when the lower range cap is disabled, the range of the tuning varicap is in the center of the upper two frequencies. Rant is an antenna resistance estimated from the resistivity of 16AWG and is trivially low.

Crange is the range cap. When the range pin diode is enabled, Crange is intended to add with the tuning diode capacitance to center the receiver around 3.33MHz. RC is an effective resistance for worst-case Q based on the cap's specsheet.

Dpin is a pin diode that, when enabled, adds Crange to the tuning cap. In simulation, the switch Srange is opened or closed to simulate the diode being on or off.

L1 is an RFC to prevent RF energy from being lost through the pin diode bias network. CL1 is an equivalent capacitance to represent the choke's SRF. RL1 is the inline resistance.

R1 is the pin diode bias resistor. If V1 is at 5V, the diode will see about 9.4 mA and be enabled.

Cbp1 and Cbp2 are DC-block capacitors. They're critical because the bias voltage of the varicap can be up to 28V and this should not be allowed to flow outside of the varicap network.

CDtune is the equivalent capacitance of a varicap diode. I'm not using realistic diode models (yet); I want to understand the ideal behaviour first.

L2 is an RFC that prevents RF energy from being lost through the varicap bias network. (L1 and L2 are the chokes with the highest inductance I've found while still having an SRF higher than my operating frequencies.)

Rdamp is a resistor inserted to damp a resonant peak that occurs as a result of L2 and Cbp1 forming a second-order highpass filter.

For now I'm leaving the circuit effectively unloaded until I understand it better. I also haven't yet considered impedance matching, which will definitely be a problem.

Problems

If I leave Cbp1 high (1uF), and use 50R for Rdamp, the second-order highpass filter formed by L2 and Cbp1 has a low cutoff frequency on the order of 7kHz, creating a huge undesirable passband.

There are eight peaks shown here - the lower four are across the range of the varicap when 3.33MHz is selected, and the upper four are across the range of the varicap when the upper two frequencies are selected. The peaks are in the correct places.

If, on the other hand, I use 12pF for Cbp1, the lower cutoff frequency is improved, but the range of the tuning diode in the lower band is severely limited, and the lower rolloff slope is very bad.

So I clearly have some fundamental design problems here.

Questions

Can a topology this simple still act as both a tuning and preselection circuit, or do I need to abandon it and do something more complex?
Can I stay with a passive network prior to my LNA?
Is there some other way to safely block DC and choke off RF where necessary while getting the response I want?


texts: Does any company manufacture American AC power plugs with insulated pins?

texts:
In Australia and some other places, good-quality AC power plugs have "insulated pins". This means that there is a short length of insulation covering the base of the pins. Darren Yates writes that this has been legally required in Australia since 2005.

Insulated pins are a useful safety feature; they help prevent people from accidentally touching live pins and getting electrocuted.

In the US, AC power plugs (such as NEMA 1 and NEMA 5 plugs) seem to normally not have insulated pins. That is why Etotal IntelliHouse writes that they are not very safe.

Does any company manufacture NEMA 1 or NEMA 5 plugs with insulated pins?

(I thank the user tronixstuff for inspiring this question.)


texts: How to determine regulator's components values?

texts:
The final goal is to have an output (u0) of 22 V. The only information given is the uBE value of 0.7 V and the maximum load current of 1 A.

I'm having a hard time determining basically every value involved in this circuit. It would be nice if someone could at least tell me where to start analyzing or something like that, since I can't find a circuit that looks like this anywhere.


texts: A globe from a torch and a refrigerator bulb are connected in series across a power supply. Predict what would happen?

texts:
A globe from a torch (rated at 6V, 0.5 amp) and a refrigerator bulb (rated 240V, 10W) are connected in series across a 240V power supply. Predict what would happen?

I understand that the torch globe will emit very little light and the other globe will operate normally but I don't understand why? Would really appreciate some help!


texts: DDR2 CAS Latency - is it fixed to clock-cycles or time?

texts:
We have a (new, prototype) board that is, at best, temperamental. It's using a Micron MT47H64M16HR-25:H DDR RAM, the design reference board uses a Micron MT47H64M16HR-25E:H. Only one letter different, what could possibly go wrong? The extra letter means our board's DDR has a Cas Latency (CL) of 6, while the reference one has a CL of 5.

So - what could possibly go wrong is that our board does not run! Or, if we drop the clock frequency, it will partly boot but then hang. Of course, there's lots of other things that could cause this so I'm working through the possibilities - this being one of them.

A wrinkle is that the CPU (TI DM368) can't be configured for CAS greater than 5. Another wrinkle is that the DDR is not being run at full speed - it gets run at 340(680)MHz or 270(540)MHz, which are below the 400(800)MHz spec of the part. There's a table in the Micron data sheet that suggests the CL may drop when running slower, but no explanation to confirm or deny.

This post suggests CL is a time-based value, I.E. it will always take Xns to access the part, regardless of the clock frequency.

To my mind, SDRAM being a clock-driven device, the CL would be related to ticks of the clock rather than a fixed period, but I'm quite aware that there's all sorts of trickery going on in DDR to push the limits.

So, the question is: is CL fixed to clock cycles or time?

Bonus question: How can I test the DDR without being able to boot to Linux? The U-Boot ram tests are very basic read/write and never throw an error. Anyone got any good tricks? I can recompile U-Boot with a new routine in if needed.


texts: What is the correct configuration for 3-wire RTDs connected to an ADAM 6015 module?

texts:
I have connected four RTDs by wire (via a 12 pin cable). The common wires of all four RTDs go through only two of the wires in the cable. After soldering those wires together and connecting them to one of the ADAM 6015 COM ports, I have tried two different configurations; using jumper wires between the RTD- port on the module and the adjacent com port, and not using jumper wires--only having the commons connected through the soldered wires and one of the ADAM com ports.

It seems like the com ports on the ADAM module are connected internally because I get low/no resistance when measured with a multimeter and I still get temp readings without using additional jumper wires. However, my temp readings with jumper wires is about 2-3 degrees Celsius higher than the readings without the jumpers. This makes me think there is additional resistance from the jumper wires. Which way yields accurate readings?

I have looked at the diagrams in the manual for the ADAM 6015 and they are ambiguous to me, seeming to just indicate that the common should be connected to the RTD- at some point, not necessarily directly at the RTD- and Com ports.


texts: How to get constant current across varying Rload in h bridge

texts:
My I is a constant source of 10 mA from Vsupply of 50V, so my R(load) can max at 5k at 10mA.

I(load) is going both directions.

My I(source) is constant, but I(load) is changing with varying R(load), why is that?

Thank you.

my voltage source is 50V, supplying a constant current mirror of 10mA, which is then feed to h bridge.

So Vsource could >5V if Rload>500, and Q5 and Q6 will switch on regardless of V1 V2?

My Rload will definitely > 500, while V1 and V2 are 5V. So how should I implement h bridge in my situation?


texts: Detect open or closed circuit via USB sensor

texts: I have a relay which I need to detect the state of (similar to this question but no current flow) and would like know what the easiest method would be to detect the state via USB and Raspberry-pi. I assume the simplest method would be to detect the resistance, but my lack of knowledge of what's available out there makes it hard to even know what it is that I'm looking for.


texts: Are there any general guidelines for knowing which order to find equivalent capacitances/resistances in

texts: When simplifying a circuit with multiple capacitors or resistors is there a generally accepted order for knowing which equivalent capacitors/resistors to find first? Should I start farthest from the potential difference? Parallel then series? For reference I'm working at the college physics 2 level, intro to E&M. Thanks!


texts:
I'm working on an universal receiver and I'm  not able to detect what protocol is used by the Hama VRC-1100 MCE Remote. The signal is this:

The Time/Div is set to 2 mS and the distance between a sequence and another is about 49 mS. Because of the IR receiver the signal is inverted.

It seem use the Manchester Code but from what I see the code is neither RC5 or RC6.

What protocol is it? Is it a standard protocol or not?


texts: CAN Transceiver Interconnection to MCU (Tx, Rx and Propagation Delay)

texts:
I am working on CAN Transceiver and its connection to Micro controller (Hardware Perspective only).

Referring this AppNote - What is CAN?

My questions :

In the above image, I see CAN transceiver connections to the MCU. I have seen UART communications where Tx is connected to Rx and vice vera for proper transmission of data. But there seems to be an exception with the CAN communication protocol. Why is Tx connected to Tx and Rx connected to Rx. Can someone help me to understand why is this exception?
Are there exceptions like this for any other protocol?
In Both MCU and Transceiver, Tx is connected to Tx and Rx is connected to Rx. So how to understand this? From the diagram, RXD pin in transceiver transmits the data to MCU and TXD pin of Transceiver Receives from MCU. Is my understand correct? From which perspective, should we understand the transmit and receive parameters? Should the Tx and Rx parameters always be from the MCU point of view?
I am using this Transceiver IC - TLE7263E

I can understand the Dominant and Recessive states on the CAN bus.

But I am not able to understand the above table of propagation delays.
I tried to correlate the table with the Fig.20 CAN Dynamic characteristices Timing diagram on page 56 but it is not clear to me.
Can someone help me to understand each parameter of the propagation delay table and the Pig.20?


texts: Digital signals have two states or interger values

texts:
Some people have the concept that digital signals are in the form of 0's and 1's.
But in a book i got the concept that digital signals can have integer values. Which concept is correct?


texts:
I used DC-DC to get 3.3V supply from my battery with 3.6V capacity. I used large battery (connected number of cells in parallel) for long term operation of device (81Ah).

So my questions are:
-> I used 3.6V, 81Ah battery capacity (non-rechargeable)
Q.: My board required only 100mA to work so is it fine to use this battery?
(Meaning, does it draw large current and damage my board? Or what should I take care to control this current? Or does it taken care by my DC-DC or current drawn depending on my board's load requirement?)

Thanks in advance.


texts:
I am working on an analog timer using a 4060, 4017 & 555 IC to create a circuit.

I need a timer which is 48 hours OFF.. 12 minutes ON.. to control a standard relay.

So far I have got the circuit working but cannot understand how to fine tune the resistor/capacitor combination to achieve the time..

I want the 12 minutes to be within the 48 hours.. so the relay will begin at the same time every 2 days..

So.. I have the 4060B timing 8 hours.. then using a 4017B I am counting 6 x 8 hours = 48 hours.. then I am using a 555 to time the 12 minutes..

When the 4017B has counted 6 x 8 hours.. it should trigger the 555.. and at the same time reset the 4060B & 4017B to begin the 48 hours timer again..


texts: Checking for signals above strength threshold over SDR on VHF

texts:
So I have a small NooElec Software Defined Radio and I've got it working well with my Raspberry Pi using GQRX as a controller and to visualize the SDR output.

My goal though is to use a python script to listen for pulses (10ms long every 1s) from small VHF beacons on animals that we've tagged. These tags give out a ping around 151MHz and I've been able to find them fine in my GQRX output but I would like to use the pyrtlsdr tool and matplotlib's mlab functions to pull this into python so I can trigger some other equipment once that signal pulse is detected above a certain strength. Basically I'm using signal strength as a proxy for distance to zero in on the tag. My experience with RF is pretty limited but I think this should be a relatively basic operation.

So I ingest the samples from the SDR with pytrlsdr use mlab.magnitude_spectrum() to convert that to signal strength and frequency in order to find out whether or not the signal meets my threshold and this sort of works but I feel like I'm pushing through the dark and wanted to double check my methods and see what else I need to check for when running through this procedure.

Specific Questions:

I'm not exactly sure how the find the peak but have been toying
around with scipy.signal.find_peaks_cwt, is this appropriate for peak finding in this situation? If so how do I find the widths for the peaks? Empirically?
What is the ideal sampling rate? How can I calculate this?
Is anything about this method going to hurt my detection radius, as usual it is critical that is a large as possible. Any way to improve the detection radius?

So here is my current method:

from rtlsdr import RtlSdr
from matplotlib import mlab

sdr = RtlSdr()

# configure device and settings
sdr.sample_rate = 2.048e6  # Hz
sdr.center_freq = 151e6     # Hz
sdr.gain = 'auto'
num_samples = 1024
threshold = -0.10 # empirically derived

my_samples = sdr.read_samples(num_samples)
magnitude_values, freqs = mlab.magnitude_spectrum(my_samples)

above_threshold = []
for index, magnitude in enumerate(magnitude_values):
    if magnitude > threshold:
        above_threshold.append([magnitude, freqs[index]])

I certainly have some reading up to do on RF Signal Analysis but I feel like I'm close to a working system.


texts: LEDs in parallel, strange current consumption

texts:
I just wired a blue LED on a breadboard with the anode to an Arduino Uno's 3.3V rail and the cathode to a 220 ohm resistor to ground. Then I measured the current consumption using my Fluke 87-V and it was 1463 microamps.

Here's the strange part: I then added another blue LED, exactly the same type, in parallel to the first one. This, too, was using a 220 ohm resistor. I expected the current consumption to double to 2926 microamps or so. Instad, the measured current consumption was 2121 microamps. Can anyone explain this?

Update: Just added a third blue LED, same type, in parallel, 220 ohm resistor, and the current drawn is now 2681 microamps. Wtf?

Update 2: I just switched my Fluke to the mA range and now I get 5.41 mA drawn with 3 LEDs in parallel. With two in parallel on the mA range I get 3.61 mA and with just one I get 2.02 mA. All measurements in DC mode of course. So I assume my Fluke is broken since it gives different readings on the uA and mA modes?


texts:
I have a switching power supply that operates at 4V output. I want to have my GSM always powered when my primary voltage is removed. I use a simple Li-Ion battery 4.2V and I want to use it as backup battery.

What is the best way to make a switch over? I'm looking for something robust. I don't want something that it could not work in some circumstances.

If my primary voltage rail was much above battery's maximum voltage I could use a simple comparator.

I was thinking that I could increase my primary voltage to 4.3V and use a comparator but I do worry about GSM operation because it has maximum voltage 4.4V

EDIT: I upload a photo as a reference.


texts: Create poolball patterns with LEDs on snooker (pool / billiards) table

texts:
I'm building a system which places dots on a snooker (pool/ billiards) table for where the balls should be placed, how can I obtain colours like brown and black from LEDs?

Is the best approach to use filters on them? Also how can I avoid using a focusing ring on the LEDs to focus the light to a specific area?


texts: Using an LM34 temp sensor, how can I limit the range of temperatures?

texts:
Over the next two weeks, I'm going to be building a greenhouse fan system.  It's not for a real greenhouse, though. It's just for fun.  Anyway, my plan is to use the Dragon12+ board that I have, an LM34 temperature sensor, and a little 5V fan.

My goal is to read the temperature, convert it with the A to D converter, calculate the actual temperature from the values in the conversion registers, display it on the onboard LCD, and when the temperature reaches 85F, turn on the fan.  Once the temperature gets back down to 80F, the fan would turn back off.  So, really, the only temperatures I care about are from about 70-90F (Giving some extra room on both sides of the scale).  How could I build a circuit to limit the temperatures that the sensor reads?

Would it be better to just implement it on the software side?  My problem is that the A to D converter is 10 bits, so the resolution is (roughly) 5mV (5 volts over 1024 bits), and the sensor increases 10mV/degree.  I know that it should be fine in theory, but will such a small step size of the sensor be a problem?


texts: Are charge pumps better than boost converters since charge pumps do not use inductors?

texts:
Charge pumps use capacitors and not inductors.
https://en.wikipedia.org/wiki/Charge_pump

Boost converters require inductors.
https://en.wikipedia.org/wiki/Boost_converter

Both charge pumps and boost converters seem to serve the same purpose. Would charge pumps be preferable given that it does not use inductors? What are the pros and cons of charge pumps versus boost converters as DC-DC converters?


texts: How much more hardware for Keerthi's' SMO compared to Platts SMO?

texts:
Not sure if this is the correct forum to ask this question. Please let me know if it is not. It would be great if anyone can point out if there is any forum where it may be accepted.

This question refers to the paper by Platt:
https://www.microsoft.com/en-us/research/publication/sequential-minimal-optimization-a-fast-algorithm-for-training-support-vector-machines/

and by Keerthi:

http://web.cs.iastate.edu/~honavar/keerthi-svm.pdf

The Keerthi paper has improved the speed of convergence compare to Platt's paper by changing the search procedure from one threshold to two threshold values. The paper however does not discuss how much more hardware is involved in doing so. Is there anyone who can help to find out this answer?


texts: Program hangs/circuit saturates once ICD3 is disconnected from PIC16F819

texts:
I have written a simple program that turns different colored LED's on and off at different intervals. When I program the chip (a PIC16F819), the program runs perfectly, and all is well. However, the moment I disconnect my ICD3 from the setup, it seems like the program halts (or the circuit saturates, or something is happening with MCLR, not sure) and all of my LED's turn on, and stay there. The program is as follows:

#include "pic.h" // load pin names
#include <htc.h>  // load delay library

#ifndef _XTAL_FREQ
 // Unless already defined assume 4MHz system frequency
 // This definition is required to calibrate __delay_us() and __delay_ms()
 #define _XTAL_FREQ 31250
#endif

void main() // this is the main program
{
        TRISB=0B00000000; // set all pins on port B as output
                          // XXXBXPRX
        while(1) // execute the following code block forever
        {

                PORTB = 0b11111111; // turn all port B pins ON
                __delay_ms(5000);   // pause 1 second
                PORTB = PORTB & 0b00010100; //turn off Red
                __delay_ms(7000);
                PORTB = PORTB & 0b00010000; //turn off Purple
                __delay_ms(7000);
                PORTB = PORTB & 0b00000000; //all off
                PORTB = PORTB | 0b00000010; //turn on Red
                __delay_ms(7000);
                PORTB = PORTB | 0b00010100; //turn on Blue and Purple
                PORTB = PORTB & 0b00010100; //turn off Red
                __delay_ms(7000);
                PORTB = PORTB & 0b00000100; //turn off Blue
                __delay_ms(7000);
                PORTB = PORTB & 0b00000000; //all off
                PORTB = PORTB | 0b00010010; //turn on Red and Blue
                __delay_ms(7000);
                PORTB = 0b00000000; // turn all port B pins OFF
                __delay_ms(3000);   // pause 1 second
        }
}

And my configuration bits are set up like this:

I do have a 10K resistor between MCLR and VDD, and the Build Configuration is set to "Release".


texts: How to design a module that send photos from microcontroller to web server via wifi?

texts:
I'm not good at electronics and I develop software mostly. But now I'm working on a project that I need to learn about IoT.

I want to have the microcontroller take photos and send it to a web server via WiFi. Also, it receive command from the server.

I've looking for some tutorials but haven't get anything useful.

I wonder how do I choose the microcontroller? I only have experience with stc 51 and stm32 and I've heard about Arduino and Rasperry Pi.

I'm thinking about using ESP8266 but is it able to implement what I want?


texts: What could cause the mosfet to burn out in my motor driver?

texts:
Here's the schematic:

I've tried to make this motor driver as tough as possible, but I'm still seeing occasional failures where the MOSFET and the diode D1 are both failed short.

Any ideas what could be causing this? Also is there anything I can do to make this driver even tougher?

Additional info: The motor is speed controlled by a microcontroller. The PWM duty cycle is capped around 60%. The motor can draw about 5A or more depending on the load, but this whole thing is powered by a switching power supply rated for 3.75A with a (fast) over-current shutoff, so that should limit the current in cases with excessive load. PWM frequency is approx 700hz.

I don't know what's burning out first, the mosfet or the diode. I tried replacing the diode (before I knew that the mosfet was also burned), and it burned out again after I toggled the interlock a few times.


texts:
I have a 5 Volt 20 Amp DC power supply. I was wondering if it is safe in terms of electricity shock due to high current output? Do I need to seal the connection to the device for protection?

Edit: Thanks for your answers.

Basically, I am going to connect the power supply to a string of LEDs which are all parallel (they have a series resistor to control the current of each branch). I want to know whether I need to seal the connection of the string and the power supply?


texts: Solving Difference Equation Using Z-Transform

texts:
I was trying to solve a problem given in my textbook. I have attached the solution given in the book.
I thought some modifications where needed to it and tried to solve in a different way. I ended up getting absurd results. Where's the mistake in my approach ?


texts: Brushed motor with shorted contacts can still rotate

texts:
From what I read here and on the internet I understood that shorting or adding a big load to the contacts of a DC motor will make it very hard to turn as a generator.

I have a 500W brushed DC motor that is considerably hard to turn by hand as is.  Upon shorting its contacts I imagined it would be impossible to turn, however in reality I observe that it is just as easy (or as hard) as before. Why is that and how can I prevent the motor from turning (a.k.a. parking brake)?


texts:
Is there a refillable battery chemistry, where the electrodes are unmodified by the discharge, and when the electrolyte is spent, you just empty it out, and refill with fresh electrolyte?
To me it seems impossible to extract any current without modifying at least one of the electrodes, but maybe someone knows of a chemistry that allows for this.


texts: What is under the hood and how different temperature sensors work?

texts:
There are a lot of different types of temperature sensors for various applications. I am mostly interested in human body temperature measurement.

After some reading I'vee been able to distinguish three groups of sensors:

analog (like TMP36)
digital (like DS18B20)
infrared (like MLX90614)

While I understand the difference in measurement type/methodology, accuracy and communication I am not sure how they work under the hood. I've been trying to understand schematics in documentations but because I haven't got lot of experience in that matter I failed.

What I've found out or what I feel about this sensors is:

analog sensors are using some kind of temperature variable transistor/resistor to get readings value.
infrared sensors use infrared detection to determine the temperature. This sensor is I guess the easiest to understand because heat emits some kind of infrared and the point here is just to detect how much of this light is emitted.

I have no idea how does digital works.

Can someone please give me maybe more complex explanation of this sensors, the best would be with some references.


texts: Blown transistor on control board. Am I correct that it is probably an N-channel MOSFET? (and help identifying)

texts:
Please see the image below. I was attempting to hack my espresso machine (my hack was working, then I re-designed the circuit...). Something went wrong, and I believe I blew an SOT23 transistor (Q2 in the picture -- the top looked a bit burnt, and it has no more writing on it). The drain of the transistor (top middle, I believe) goes to the positive side of three LEDs, which glow slightly when they aren't supposed to (i.e., when the machine is off), and each glows strongly when an associated LED is on (but they shouldn't be on). Also, the resistance of the 10K resistor between the base and the source is measuring 300Ω or so.

Question 1: Can anyone tell me what the marking on Q1 stands for? Q1 and Q2 may be identical, which will help immensely.

Question 2: if I desolder and replace the transistor, is it a good bet that this is an N-channel MOSFET? I don't believe it is a P-channel because (1) the drain would not be connected to the positive side of an LED for a P-channel, and (2) the LEDs glow slightly when they shouldn't, leading me to believe that some current is leaking through the blown transistor (incidentally, one of the LEDs in question is the out-of-water LED, and it does work fine when the water is out, but also glows when it shouldn't and it glows proportionately with another LED, which it should not).

Question 3: Could the part be a different type of transistor (e.g., BJT?). I don't know why it would be a BJT, but I'm just not sure.

I will probably attempt the desolder / part swap tomorrow. Thanks for any insight!


texts:
I have a PCBA where the connector for the CAN bus is about 40 mm away from the MCU. The MCU and connector positions are fixed but I am free in placing the CAN transceiver.
I haven't worked with CAN bus before. I believe the intention is to use it at full speed (1 Mbit/sec).

Are CANH and CANL more important to lay out carefully or the Tx and RX from the transceiver to the MCU? I can place the transceiver close to the MCU or close to the connector.

Do I need to ensure the CANH and CANL are length-matched?

Are there any particular precautions to take for TX and RX? Such as the use of vias or distance?


texts: What frequency should an oscilloscope be rated at to measure USB signals

texts:
I'm trying to understand how I can figure out the minimum requirements of an oscilloscope in order to measure for example USB 2 full speed signals at 12mbps.

I know it's not safe or correct to say that 12mbps = 12MHz. So how do I determine the adequate frequency requirement, if I wanted to buy a scope.


texts: Does a common neutral between solar inverter and utility affect current measurement?

texts:
I have solar hybrid inverter at home that's connected to the mains using both, the line and neutral wires. However, to save the costs, I've connected the load to it using a common neutral i.e. I've daisy chained (or looped) the neutral input to the neutral output behind the inverter.

This works perfectly, but an electrician tells me that electrical meters (from the utility company) still measure the current when using the neutral as common, and this is the first time I'm hearing this.

Few points to note are:

My electricity from the utility company is single phase.
The inverter powers critical load in the house during the day using solar energy, while non-critical load is powered over utility.
Both critical and non-critical loads share the same neutral line.

Can someone please explain how current measurement in this scenario would work? Should I be running a separate neutral wire from the inverter to my critical load?

Update:
Below is a diagram to better explain the above:


texts:
I have been learning about CMOS Tri State inverters, and I was wondering which one of these two ways is a better implementation of this circuit.

The first is what we see in all textbooks :

With the middle two transistors connected to Enable (EN) and Enable bar (~EN)

Or the second -

Or with the Enable and Enable bar connected to the transistors closest to the power and gnd nodes and the input signal connected to the gates of the middle two transistors:

Vcc is power and VSS is ground


texts: How useful is Horsehair brush for cleaning populated PCB

texts:
Professor angry as I clean old PIC devboard with nylon brush, and warned me to use horsehair brush next time.

I have been using nylon brush for long time, even to clean my PC and audio amp and they still not damaged.

Is horsehair brush one of the ESD myth or really very much better than nylon in reality?

Did anyone really kill PCB using nylon brush, or people use horsehair brush only out of scare?

Asking because horsehair brush very thin and expensive but nylon brush in three different sizes and very cheap and easy to cleaning using only water.


texts: Controlling Frequency of a Vibration Motor with Battery Voltage Output

texts: I am looking to operate a Vibration motor at a sustained frequency (40Hz) Please see data sheet as below with an example of a motor. I understand that the best way to do this is to control the output Voltage of the Battery (as per below sheet) this will be approx 0.8 V to get the desired frequency - How would I go about controlling the output of the Voltage? or is there an alternative better way to achieve this frequency. Please excuse my lack of knowledge, any help would be appreciated.


texts: Mixing two fluids dynamically using valves and sensors

texts:
I'm new to the field of electrical and electronics design... trying to build a hobby project for home decoration. I want to mix two colored fluids with proportion of each liquid decided by a user input (a slider or touch sensor?). The liquids in two tanks will be mixed on the fly and pushed out whenever a proximity sensor detects a movement nearby. The valve shall remain open for a couple of seconds or so.

My background is software development. But I have a feeling that this can be done with simple electrical/electronics circuit without any software.

Is this indeed feasible with only electrical circuit?
Can anyone please suggest a good starting point? @Reroute suggested a use of 555 timer which I'll have a look into.
What are the caveats to keep in mind while designing such a circuit in terms of failure points?

Regards