texts: PCB plane cuts for audio paths in mixed-signal device

texts:
I am working with the TLV320AIC3204 32-bit audio codec.  The codec has three inputs and two outputs.

While I was designing my own test PCB, I noticed on TI's evaluation board (on page 33) that they have cuts in the copper on all the planes which separate some of the inputs and outputs.  It seems they have IN1/IN2 separated from IN3 by a plane cut and then the HP/Line-out outputs cut off as well.  For example, the third layer looks like this:

I'm curious what the purpose of these cuts for the audio paths?  I've never seen any documentation discussing the cuts between audio paths/channels across all of the planes, only ones between digital and analog ground planes, which some suggest those aren't even needed.  I don't really understand it since all the audio channels are using the same analog ground plane.


texts: Bridge Configuration Problems for OPA2544

texts:
I picked up one these: opa2544 datasheet
I assembled the circuit on page 8, figure 4:

I also placed freewheeling diodes on the outputs and bypass capacitors. The power supplies powering the opamps can source 9A each.
For testing, under no load (other than the meter), I placed a DC input to Vin of +10V, about +60V came out. I then placed a DC input of -10V, about -60V came out. Awesome, everything looks okay so far.
I then placed a +/-1 V sine wave @ 1kHz to Vin, the opamp began to over heat like nuts. Then my frequency generator said "high voltage detected" and began to go into protection. I did have my meter connected but I could not get a reliable voltage reading.
There is definitely something I am inherently doing wrong. I have designed simple, low power opamp circuits before, but not many of them. First time trying to make a high power amplifier circuit work.
Any advice on why I experienced this type of behavior?
Note: The opamp did have a heatsink attached to it with a screw and thermal tape.
2: https://i.stack.imgur.com/Y5Xew.png![enter image description here](https://i.stack.imgur.com/4wj3T.jpg)
Edit: I tried the 100pF across the feedback resistors and have loaded each opamp with 6kohm to ground. I re-tested and I was able drive the opamps to my required frequency of 1kHz and achieve the 120Vpp I was after. It is not clear if the suggestions given fixed the issue as I did not try to break it by removing these additions.


texts: Is there a way to open/import gschem .sch file in qucs?

texts: Is there a way to open .sch files produced by gschem in qucs? The two applications use different file formats. Does anyone know if a converter exists?


texts:
I'm trying to build a 16kHz single phase, full bridge PWM inverter, Vdc=380V, 2kVA rated.

When I load the inverter a little bit, the output voltage waveform is looks like this:

simulate this circuit – Schematic created using CircuitLab

I have capacitor snubbers across each half bridge as shown in the schematic.

How can I get rid of the distortion in the red circle?

Added:

Here is one of four PWMs (I only have one probe so I can't show you all four same time, but I've checked phase differences and they're ok. Other PWMs have same duty cycle and Vpp like this.):

Here is the driving circuit (I have 2 of these for each half bridge.):

Here is the rising edge of one PWM, purple is pwm signal and blue is output of driver circuit.

Here is falling edge of same PWM above

Here is all four mosfet's Vgs waves

Here is all four PWM


texts: BJTs drawing collector current from a limited current source

texts:
simulate this circuit – Schematic created using CircuitLab

Let's make everything ideal by ignoring the voltage drops:

Q1's allowed collector current is: 22.4 mA
Q2's allowed collector current is: 4.2mA
Total available: 300uA

I need to know if we have a limited current source and multiple collector are drawing current from it (as above), do each collector draw currents proportional to what they would've been drawing if they would be drawing from a non-limiting current source?

According to LTSpice, this will be around:

Q1's collector current: ~252 uA   --> 300uA * 22.4mA / (22.4mA + 4.2mA)
Q2's collector current: ~47 uA

As LTSpice's own component library is different valued, and one might be comparing from another simulator that happens to be non-SPICE, these are just simple calculation from the numbers we have above. But if one were to add up the actual values in LTSpice (and other non-idealities), it really obeys this proportionality.

CircuitLab seems to give another result. Q1 apparently goes in Reverse Mode and everything adds up.

Intuition tells me that unless the difference in Q1 and Q2's "collector current allowed" is really big they will have nearly the same amount of current.

So which one should I trust?

I could also breadboard it, but I hardly think an example is a guarantee.


texts: Heat transfer coefficient in a Module Baseplate

texts:
Today, for example in a power IGBT module cooled by a heatsink, it has been found that the heat transfer coefficient (htc) distribution may not be uniform across the bottom surface of the module baseplate. If it is going to be non-uniform, do you have any images for the distribution? I think that the parameter htc directly under chips heated up must be the highest due to the largest temperature available in the whole baseplate. And as we get far from this hot region of the baseplate, the parameter htc will be reduced due to lower temperatures. What do you think?
The screenshot below shows a power module mounted on the heatsink that may have a fluid flow among its plate fins.


texts: Characteristic Impedance of Multi-Dielectric Coplanar Waveguide

texts:
Background
I've calculated the characteristic impedance of a CoPlanar Wave Guide (CPWG) type transmission line on my 8-layer stack-up between L1 - top layer and L2 - GND1 directly underneath it. The calculations are pretty standard and supported by many freely available calculators. The calculator by Spok consulting, for example, gave the following result:

Problem
I would like to increase the width of my traces whilst maintaining the same ~50 Ohm nominal characteristic impedance of my line. An obvious solution would be to have my reference plane further away from the top layer. Let's say I want to use L7 - GND. Naturally, I'd clear out all copper from between these two layers.
Question
How do I calculate the effective permittivity of all the different layers of dielectric combined? I couldn't find any calculators that support this.
Stackup


texts:
We are building a system that interfaces an approx 3-20 KHz square wave that comes from an engines crank position sensor. It is an open collector sensor, so we have a 1 KOhm pullup in our system to track it. We currently use a simple 74 series buffer to turn this into a "safe" signal for our 3V3 MCU, however, some slight electrical noise/ringing etc causes our MCU to miss trigger. The stock ECU of the car (and others) can "live" with this noise without issue, so must be using a decent filtering system. We will be scoping the system today to get a better picture of what the noise is.

Is there a simple hardware method to clean this up? I am thinking a schmitt trigger but open to ideas?

This is the signal presented to my conditioner, which is a MAX9926 IC into the +ve line only, -ve left floating

Here you can see for some reason always at a certain RPM, the VR conditioner "drops it" 9Yellow is signal into MCU after MAX9926:

Here is the Max9926 system. This signal is Fed into CAMVR+. CAMVR- is left open circuit (floating). Also, a 1K pullup is attached to CAMVR+ to 5v to give us our voltage due to the open collector nature of the sensor.


texts:
I'm new to electronics and want to be sure that I'm selecting the correct wattage resistors for the circuits I'll be making but I'm struggling to understand why for instance 1/4 resistors are safe to use in many circuits using in some cases 10 watts.

I've found this 4w FM transmitter schematic as an example: http://www.diy-electronic-projects.com/p121-4W-FM-Transmitter

This might be a big ask, big would somebody describe step by step how that circuit operates and why we can use 1/4 resistors?

I'm also curious as to how the 2n2219 is only rated for 800mW

Thanks


texts: Driving 7 segment displays for a 16bit breadboard computer

texts:
Electronics noobie here trying to work on some projects to learn something. I'm currently working on a 16bit breadboard computer, and I'm trying to figure out how to display the 16bit binary number as a decimal number on some seven segment displays.

I originally thought I could make a 32M EEPROM out of 64K EEPROMs, which is incredibly stupid of me.

What's the best way to do this? I don't really want to use a microcontroller, as to me that's kind of 'cheating' in the nature of this project, but if that's the best option I'll go with it.


texts: Opamp buffer output sine wave, is it normal?

texts:
I'm using this opamp - GS8331/32 to buffer voltage reference to ADC. Here my oscilloscope measure input and output of opamp:

Why ouput is sine wave? Is it normal or because of my opamp? Any way to fix this?

Here my chematic:

Thanks


texts: Coin Cell Battery for Arduino/Microcontroller

texts:
Excuse the lack of electrical engineering knowledge but I have an Arduino Uno microcontroller that I want to power with a coin cell battery.

The project will have 6 LED lights that will flash for a few seconds every few hours.
My question is, what sort of coin cell battery would I need for this project? Also, how would I connect it to arduino? With something like this?

Would I require anything like resistors/transistors?

Here is a diagram of what I have so far:

.

(Resistors are 1/4-watt 200ohm resistors)


texts:
It was suggested to me that GPIO outputs on Raspberry cannot be used as a reference voltage: for example GPIO TRUE might give only 3.2V and GPIO FALSE could give 0.1V.  On the other hand, according to Exploring the 3.3V Power Rail 3.3V rail should be rather stable .  What I want to do is to correct GPIO output in a way that it really returns something very close to rail voltage (3.3V) when TRUE and something really close to ground voltage (0.0V) when FALSE:

I would be satisfied also with the inverted logic solution, i.e. that it returns something very close to rail voltage (3.3V) when FALSE and something very close to ground voltage (0.0V) TRUE.  I know that in principle inverters should do such a job, but I don't know how precise they are.

I have several questions:

What is the simplest circuit do the job?
Would ready-made inverters be good enough for inverted logic solution?

Specification for the circuit:

current output less than 1 mA,
TRUE/FALSE or FALSE/TRUE voltages on OUT less than 0.04V from rail voltage and ground voltage.

I already assumed (hopefully I am right) that rail voltage is within few percents of 3.3V.

@Andy aka's solution:

Reference output voltage can be regulated between 0V and 1V.  For GPIO=FALSE, OUT equals reference voltage.  For GPIO=TRUE, OUT is (according to my calculations) less than 1 uV.

(Could you please confirm this is your proposed solution?)


texts: Can I use two AD623 instrumentation amps on one shunt to cover broader current range?

texts:
I'm working on building a circuit with an ESP8266 module.  I'd like to track its current consumption over time so I've cooked up a scheme to use a microcontroller dev board (Arduino or something similar) with an ADC to log the current consumption as it transitions from awake to deep sleep and back.
The problem is my current consumption ranges from 100uA in deep sleep to 100mA when it's awake and transmitting.  I was thinking about adding a 1 ohm resistor as a shunt between the power supply and the device and then using 2 AD623 instrumentation amps as inputs to the ADC.
I have two basic questions.  Is it reasonable to take two measurements from the same shunt?  Will that dramatically impact my measurements?
And, if the amp is saturated, will it just output the max voltage or will I damage the ic?
Here's something along the lines of what I'm thinking (one AD623 with a 11 kOhm RG for the 10x gain for sensing the mA range and the other with a 100 ohm RG for the 1000x gain for the uA range):

simulate this circuit – Schematic created using CircuitLab
I used labels to keep the schematic clean.  Not sure if that's cool or not . . . but that's what I did. :)
This whole thing may be a little bit crazy town, but what I'm thinking is that if I use the Arduino internal 1.1V reference on the ADC and a 1000x gain, I should still get decent granularity in the uA range.  Basically, 1.1V / 1023 is a little under .0011V and with the 1000x gain my sensitivity should be roughly 1.1 uA.  I think I should be able to read between 0 uA and a little over 1000 uA.  I dunno if any of that is right but at least that's my current (no pun intended) rationale.


texts: How to calculate voltage and current of this circuit?

texts:
I already know the answer of question 1, 2 and 3.

1) 448 ohm

2) 1.6 V

3) 0.13 V

About the question 4, why 6V/300 = 0.02A = 20mA is wrong? Can I use current divider like 0.01339 * (3.3 * 10^3 / (300 + 3.3 * 10^3))? But, the answer still wrong.


texts: Write collision for multiple reads - PIC24 I2C

texts:
I am trying to poll a CAP188 sensor so I'm sending it read commands in a while loop, but the first read works and then on the second read when I send the slave address it detects a write collision.

To test my code I am trying to read the product ID which is a known value. Any help would be appreciated, thanks!

void chipWrite(unsigned char reg, unsigned char data){
//Start bit
I2C2CONbits.SEN = 1;
while(I2C2CONbits.SEN);
IFS3bits.MI2C2IF = 0;

//Slave address bit
I2C2TRN = 0b01010000;
while(!IFS3bits.MI2C2IF);
IFS3bits.MI2C2IF = 0;

//Register address
I2C2TRN = reg;
while(!IFS3bits.MI2C2IF);
IFS3bits.MI2C2IF = 0;

//Data
I2C2TRN = data;
while(!IFS3bits.MI2C2IF);
IFS3bits.MI2C2IF = 0;

//Stop bit
I2C2CONbits.PEN = 1;
IFS3bits.MI2C2IF = 0;
while(I2C2CONbits.PEN);
}

void initChip(){
CLKDIVbits.RCDIV = 0;
AD1PCFG = 0x9FFC;
I2C2CON = 0;
TRISBbits.TRISB3 = 0;
TRISBbits.TRISB2 = 0;
I2C2CONbits.ACKDT = 1;
I2C2BRG = 157;
I2C2CONbits.I2CEN = 1;
_MI2C2IF = 0;
}

 unsigned char chipRead(unsigned char reg){
unsigned char msb = 0;
while(!I2C2STATbits.P);

 /*start*/
I2C2CONbits.SEN = 1;
while(I2C2CONbits.SEN);

/*sensor address*/
I2C2TRN = 0b01010000;
while(I2C2STATbits.TBF);
while(I2C2STATbits.TRSTAT);
while(I2C2STATbits.ACKSTAT);

 /*Register for reading*/
I2C2TRN = reg;
while(I2C2STATbits.TBF);
while(I2C2STATbits.TRSTAT);
while(I2C2STATbits.ACKSTAT);

 /*repeated start*/
I2C2CONbits.RSEN = 1;
while(I2C2CONbits.RSEN);

/*Slave address with read = 1*/
I2C2TRN = 0b01010001;
while(I2C2STATbits.TBF);
while(I2C2STATbits.TRSTAT);
while(I2C2STATbits.ACKSTAT);

 /*receiver enabled*/
I2C2CONbits.RCEN = 1;

/*read first byte data*/
//while(!I2C2STATbits.RBF);
while(I2C2CONbits.RCEN);
msb = I2C2RCV;

/*send nack*/
I2C2CONbits.ACKEN = 1;
while(I2C1CONbits.ACKEN);

/*send stop*/
I2C2CONbits.PEN = 1;
while(I2C2CONbits.PEN);

return msb;
}

int main(void) {
initChip();
char key = 0b00000000;
chipWrite(0x72,0xFF);
chipWrite(0x2B, 0x80);
chipWrite(0x26, 0xFF);

while(1){
    key = chipRead(0xFD);
    asm("nop");
    if(key == 0b01010000){
        asm("nop");
    }
    else{
        asm("nop");
    }
    key = 0x00;
}

return 0;
}


texts: My college undergraduate electronics classes covered some analog design, and I'd like to further my knowledge and experience. What would be a good project that would require significant effort as far as research and learning new material? Ideally, the project, when finished, would also serve as evidence that I have analog design skills.


texts: Problems on switching MOSFET for boost converter

texts:
**EDITED
I am supposed to build a boost converter that steps-up a 1.5V input to 5V (also I only have 1.5V as my power source). I have designed the circuit out but the only problem I face right now is that I can't turn the MOSFET on with 1.5V peak-max. I am using a B012N03LX3 MOSFET as my switch.
This is my schematic connection btw (assume that the Diode is ideal and assume that NE555 can operate with 1.5V which the simulation show that it can)
Also I check the datasheet and I know that the Vgs(th) must be at least 1V to turn the MOSFET on

Also I check the datasheet and I know that the Vgs(th) must be at least 1V to turn the MOSFET on

And the Vne555 has the output of this (10kHz with 0.7 Duty Cycle)

But the voltage output at Vload is

So from this I am pretty sure that the MOSFET did not get sufficient voltage at Vgs(th) to turn on. But due to the fact that I only have 1.5V as my voltage supply I am not sure what correction I need to do to my circuit to make sure that the MOSFET is able to turn on (with only 1.5V as a voltage source) properly
Btw I think the output should look like this if the MOSFET is able to turn on properly

So any idea on what should i change in my circuitry to make it work?


texts: How to select correct Tpd values to use from Datasheet?

texts:
I'm trying to work out worst-case propagation delays for an address-decode circuit I'm designing.  I'm looking at the datasheet for a 74HC00N, and I'm confused by the propagation delay (tpd) values on p6 of the datasheet:

Focusing on the Vcc=4.5 V section, there are three lines:

TA=25˚C
SN54HC00
SN74HC00

I understand that the first line is indicating values where the ambient temperature is 25˚C, and the the next two lines are values for the two IC versions covered by the datasheet (54xx and 74xx).  But one of these things is not like the other.  If I'm using the SN74HC00, the datasheet says that the max tpd is 23ns.  So when does the 18ns tpd value apply?  The only explanation I could think of is that at TA=25˚C, both the 54xx and the 74xx versions exhibit the 18ns max, but above 25˚C, the max values diverge to the other values listed.  Is that the correct interpretation?


texts: Tradeoff between embedded chip and external GPS antennas

texts:
I'm currently redesigning a board that implements GPS positioning. Until now I've been using a Fastrax IT520 module, which is very nice but has been discontinued. This forces me to rethink my board and I am wondering how would these options compare for a GPS antenna connection:

An on-board patch GPS antenna like this question. Perhaps a
Yageo ANT2525B00FT1575A.
A similar passive GPS antenna, off-board using SMA connectors and a 1 foot (30 cm.) cable, from a Chinese supplier.
An amplified (LNA) GPS antenna, off-board using SMA connectors and a 1 foot (30 cm.) cable, from a Chinese supplier.

In my application I need to track moving vehicles and the GPS antenna is never attached in the best position. It's usually half-shadowed by the vehicle itself and I have little control over this.

I was using an amplified GPS antenna connected via SMA connectors and a 30 cm. RG174 coax. However this antenna is drawing ~8 mA from my battery powered device, and that's a lot. I wish I could get rid of this load without giving up too much GPS accuracy.

The antenna LNA gain is about 28 dB, which AFAIK might saturate the GPS RF input with a cable that short, although I don't think it's been a problem with the current boards so far.

Of course, removing the LNA would reduce the antenna power draw to zero, but I fear the cable and connectors could produce some noticeable attenuation, especially for cheap chinese antennas whose cables are manually soldered and crimped.

Placing the antenna on the board itself is not ideal because of the real state its ground plane needs. Also, it would strongly condition my board layout as where to place the antenna in the device (the external antenna gives me some freedom about it).

So, all three options seem to have advantages and disadvantages. My design goals include:

The cost should not grow too much (a $5~10 increase could be acceptable).
The dB budget should not be severely affected; a 3~6 dB attenuation at most.
I'm hoping that an on-board antenna would make my GPS RF input less exposed to ESD, as the only ESD diodes I could find are extremely small.

The devices are low volume (50~100 units).

So, what do you think are the pros and cons of each solution? Thank you!


texts: Why almost all decoder zero selected output?

texts:
I have decoder IC 74138 and I found almost all decoder make selected output low (0) and I want it high (1) and I don't want to connect NOT gate to all of the outputs (it is illogical).

What should I do to make output high? Or is there any way to use this one without buying a new non-inverting decoder? If there is not what type of decoder should I buy (IC number)?


texts: Differential Amplifier with Hard Limiting

texts:
I'm currently going through RF Microelectronics by Razavi. In chapter 3 he presents an example where the following signal is applied to a differential amplifier with a tail current source.

$$Acos(w_ct) + acos(w_c+w_m)t$$

He then decomposed the signal by the following:

$$Acos(w_ct) + acos(w_c+w_m)t=\frac{A}{2}cos(w_ct)+\frac{a}{2}cos(w_c+w_m)t+\frac{a}{2}cos(w_c-w_m)t+\frac{A}{2}cos(w_ct)+\frac{a}{2}cos(w_c+w_m)t-\frac{a}{2}cos(w_c-w_m)t$$

Where the first three terms of the equation represent the AM signal and the last three terms represent the FM signal.

His questions is to explain why the output of the differential contains the following and to assume that the differential pair experiences 'hard limiting' (A is large enough to steer Iss to each side):

$$\frac{A}{2}cos(w_ct)+\frac{a}{2}cos(w_c+w_m)t-\frac{a}{2}cos(w_c-w_m)t$$

Part of the solution he explains that "the one with sidebands of identical signs can be viewed as an AM waveform, which due to hard limiting is suppressed at the output. The spectrum with sidebands with opposite signs can be considered an FM waveform, which emerges at the output intact because hard limiting does not affect the zero crossings of the waveform."

My main confusion is why would hard limiting only suppress the AM signal and not the FM signal? They both have identical amplitudes and frequencies (besides one of the sidebands).


texts: What is this array-like notation of registers in datasheets?

texts:
I am reading BMP280 datasheet (pressure&temperature sensor). On different pages they use the following notation:
$$register\text{_}name[a:b]$$ where a, b are integers. For example, on page 13 "Enabling/disabling the temperature measurement and oversampling setting are  selected  through  the  osrs_t[2:0]  bits  in  control register 0xF4".

How to interpret this notation?


texts: I am planning to use an RF switch to pulse a signal >1GHz. Specifically, I'm interested in the ZASWA-2-50DR switch from Minicircuits (http://194.75.38.69/pdfs/ZASWA-2-50DR+.pdf) due to the low rise time that should ramp the signal within a few cycles. Now, all in- and outputs are SMA, including the +-5V supply. I have not seen this before and am a bit puzzled on what power supply and adapters to use. Does anyone have a suggestion?


texts:
I'm using LT3494a to generate 37v from 6v input. This is my circuit.

According to the datasheet, this chip can provide up to 40v output, so it should be able to generate 37v. Also, the simulation result also indicates 37v is achievable.

However, when I measure my design with the oscilloscope on the PCB board, the Vout is not as expected. The result is :

Pin1(SW),Pin4(CTRL),Pin5(nSHDN) : 6.20v
Pin6(FB): 1.20v
Pin7(VOUT):1.02v

I don't know why the Vout is just 1.02v which is far away from expected 37v. Can someone help me to figure out the error in my circuit or some suggestions to debug this problem?

Thank you.

Edit:

The problem is finally solved by replacing R71 from 5.3M to 5.2M. The reason is probably that the actual R71 value should be a bit smaller than the value calculated from the equation provided by the datasheet. I got this value by fine adjusting an adjustable resistor on R71 and measure the output voltage at the same time. When the R71 value is 5.3M, the actual voltage will be above 40v which is the maximum rating output voltage for LT3494A.


texts: implementation on write-first single-port ram

texts:
Following shows a single-port RAM in write-first mode.

module raminfr (clk, we, en, addr, di, do);
        input        clk;
        input        we;
        input        en;
        input  [4:0] addr;
        input  [3:0] di;
        output [3:0] do;
        reg    [3:0] RAM [31:0];
        reg    [4:0] read_addr;
        always @(posedge clk)
        begin
           if (en) begin
              if (we)
             RAM[addr] <= di;
                  read_addr <= addr;
           end
        end
           assign do = RAM[read_addr];
    endmodule

Here, how can we assure that output do is changed after RAM[addr] <= di; is executed?

If the logic does write-first mode, data has to be written first and then read has to happen. But, as we know, RAM[addr] <= di; and read_addr <= addr; are executed concurrently. However, it seems that we cannot guarantee that output do is changed after writing.

Why this code works?

Following are my exepctation:

assumption: addr[10] = 5, addr[20] = 15;

previous addr: 10, current addr:10, en: 1, we: 0 => do = 5

previous addr: 10, current addr:20, en: 1, we: 1, di: 12 =>
do will be changed because of RAM[read_addr] will be changed as 15. But, how can we assure that do will be 12 instead of 15 (write-first mode)?

Also, is the reg read_addr necessary? If it is, why?


texts: How to wire a RCBO/GFCI correctly (in series with the upstream RCBO/GFCI)?

texts:
For one of my projects, I need to add a RCBO/GFCI for the protection of the users. I know that there is a RCBO somewhere up the chain, therefore I am facing a confusion: there is a non-zero resistance between Earths which can be very similar.

Doesn't that mean that the current will be limited or won't be able to flow at all? Or maybe that the current forces the two Earths to be different by R*I? What's the correct way of chaining RCBOs?

simulate this circuit – Schematic created using CircuitLab

Bonus question: the customer requires an isolation transformer to be inserted between those two elements, "just in case", and I have no idea why. They don't seem to know either.

Edit

Is that correct now?

simulate this circuit


texts: xorwf literal not affecting z flag even when literal value is same as value in w

texts:
According to Instruction Set Description
"xorwf myLiteral" should xor contents of "w" with "myLiteral" and if both are same then flag Z in STATUS must be set (not interested where this instruction saves the result but Z flag must be affected if both values were same)

But in my code this is not happening

movf PORTC
xorwf red_on    ;w holds 01000100 and red_on is also 01000100 Z must be one
btfsc STATUS, Z ;but here it's not one
goto Turn_Yellow_On

Full code is following:

    ; PIC16F72 Configuration Bit Settings

; Assembly source line config statements

#include "p16f72.inc"

; CONFIG
; __config 0xFFF7
 __CONFIG _FOSC_RC & _WDTE_ON & _PWRTE_ON & _CP_OFF & _BOREN_ON

STATUS equ 0x03
TRISC equ 0x87
PORTC equ 0x07
INTCON equ 0x0b

RP0 equ 5
RP1 equ 6
Z equ 2

GIE equ 7
INTE equ 4
INTF equ 1

all_off equ 0x00
red_on equ 0x44
yellow_on equ 0x22
green_on equ 0x11

bank0 macro
    bcf STATUS, RP0
    bcf STATUS, RP1
    endm

bank1 macro
    bsf STATUS, RP0
    bcf STATUS, RP1
    endm

extrn_int_enable macro
    bsf INTCON, GIE
    bsf INTCON, INTE
    endm

PORTC_as_out macro
    bank1
    movlw 0x00
    movwf TRISC
    endm

PORTC_out macro outByte
    bank0
    movlw outByte
    movwf PORTC
    endm

test_and_switch macro testWith, jumpTo
    movf PORTC
    xorwf testWith
    btfsc STATUS, Z
    goto jumpTo
    endm

    org 0x00
Reset_Vector:
    goto Main

    org 0x04
Interrupt_Vector:
    goto Switch_Next

    org 0x05
Main:
    PORTC_as_out
    extrn_int_enable

Loop:
    clrwdt
    goto Loop

    org 0x200
Switch_Next:
    bcf INTCON, INTF

    ;test_and_switch all_off, Turn_Red_On
    movf PORTC      ;I recognized the mistake I should use d = 0 but data
    ;will still be copied in w when program goes to "Turn_Red_On" routine for
    ;the first time
    xorwf all_off
    btfsc STATUS, Z
    goto Turn_Red_On

    ;test_and_switch red_on, Turn_Yellow_On
    movf PORTC
    xorwf red_on    ;w holds 01000100 and red_on is also 01000100 Z must be one
    btfsc STATUS, Z ;but here it's not one
    goto Turn_Yellow_On

    ;test_and_switch yellow_on, Turn_Green_On
    movf PORTC
    xorwf yellow_on
    btfsc STATUS, Z
    goto Turn_Green_On

    goto Turn_All_Off

Turn_Red_On:
    PORTC_out red_on
    goto Return_From_Int

Turn_Yellow_On:
    PORTC_out yellow_on
    goto Return_From_Int

Turn_Green_On:
    PORTC_out green_on
    goto Return_From_Int

Turn_All_Off:
    PORTC_out all_off
    goto Return_From_Int

Return_From_Int:
    retfie

    end


texts:
I'm making an ALU (Arithmetic and Logic Unit), I've made a 1-bit ALU with ease, but 1-bit (1b) is impractical, who would need only 1b? I've made that adder/subtractor and I need the comparator (multiplication/division is insane), I don't know how to make a 4b comparator (obviously). Please help!
EDIT: I have found a PURE 4b comparator, that uses 1b comparators:
Valid XHTML http://www.setupsolution.com/wp-content/uploads/2013/08/Magnitude-Comparator.jpg
Thanks to the people that helped!


texts:
let's say I have an ADC with a full scale input from 0V to 2.1V. I want to protect the input of the ADC from voltages > 2.1V. I thought about using 3 diodes like shown below.
Each diode has a breakdown voltage of 0.7V:
When I use this circuit the ADC should be protected from voltages > 2.1V, right?
Is their maybe a better way to protect the ADC inputs?


texts: LM350 as current supply with Li-ion batteries

texts:
I am trying to make an circuit to control max current using LM350. The power source is Li-ion 3.7v 2200mAh battery. I hope to add max current controller and `small push button to turn on output.

How could I create a constant charge circuit that I can turn on with a push button?

I tried some circuits but those applications draining battery in few pulses and current is not limiting.


texts: Datasheet and information needed about 6C17504 and 1D17409 8-pin ICs

texts:
I have a power supply of an Epson EB-X41 projector that doesn't turn on. I haven't found the problem yet, but in the power supply circuit it has 2 ICs for which I couldn't find any datasheet or information. I think they should be switching ICs, but it's so strange for me why there is no data about them.
What are these ICs? do they have datasheets available?


texts: Design RFID tag that works with Bluetooth

texts:
Is it theoretically possible to engineer manufacture a RFID tag that works within the Bluetooth wavelength range allowing a standard booth-tooth device (a phone for example) to power and pick up data from this specially designed passive tag.

I understand there are bluetooth tags but these have batteries and are not passive nor are they necessarily cheap or small.

I am a novice when it comes to electronics (chemical engineering background) but would like to understand more. If you worked with an actual RFID manufacturer, could you design a passive tag that natively was powered and passed a very small amount of data to a bluetooth device? Data would only need to be transmitted 5-12 inches, keeping the power requirements and footprint small.

I appreciate any feedback! Hopefully my question makes sense!


texts: Is SPI significantly faster than bit-banging?

texts:
I have a project based on a pic 18f4550. To write to a '595 shift register, is there a distinct advantage to using spi over regular io pins? I heard that spi is faster, but I am not sure how. Does it use a different, faster clock than the rest of the chip, or is it simply more efficient? I can bit-bang out a byte through regular io pins in a pretty small number of instructions. Does spi use less processing power? I will be shifting out fairly often during fairly intense calculations, so I want as many cycles as possible dedicated to my process and not shifting out.

My main reason for not wanting to use spi is that my current layout would make it a bit more difficult to access the required pins because I am already using a few of them for other things and would have to shuffle things around. I wanted to find out what benefits there are before I start ripping things up and moving them around.


texts: Inkjet Printers+lamp+unused pcb can It work?

texts:
So suppose I have design x

Can I print design x inverted onto paper, shine a lamp on it above unused pcb and make a printed pcb?

Sorry for my ignorance

Cheers!


texts:
while(true) {
  movePlayer('upright', '10 * Time.deltaTime');
}

Here, an animation is done. No button or mouse click is done. Everything moves automatically.

How to make that in electronics ?

I know that with an human action, this can be done

[Mouse click]-------| \--------[Light pixel on (10,10)]

but... I want to automate this without any human action. How to do that ?
For instance, if I want to light on, light off, light on, light off... several times, how to do that ?


texts: I was reading about arduino and the AVR architecture and got stuck at the point that how does pipeline stall or bubbling is solved by Harvard architecture introduction in the AVR.I mean what Harvard does is just provide different storage location to data memory and program memory which makes it possible to load program without an operator.But how does it help solve the above problem?


texts: How to make a solenoid armature travel at a faster rate of speed?

texts: My project requires a solenoid with a stroke of 15mm and the travel speed must be 15mm in 2ms. What can be done to get higher speed of travel in the armature?


texts: Why does hot plugging blow stuff up, and how to prevent it?

texts:
I made the very stupid mistake of hot plugging stuff many times before. My problem is that I rushed and it's just so easy for me to forget I have the Arduino on or some other expensive IC or hardware plugged in.

Today I hotplugged the PWM input of my ESC to my Arduino digital pin. I saw the magic smoke escape. Bye bye a group of digital pins! I hate myself now.

Why do things not like being hot plugged?

Is there an easy way I protect against this?


texts:
I bought a 220v 100w sewing machine motor to use it in a project
Firstly I thought that the motor works only on ac (because there is  220v written on it) and just for try I gave it 30v dc and surprisingly it spined

1- Is that enough to know that this motor is a universal motor ?

2- If it is a universal motor what is the best way to power it to get full power with 220v dc ? Maybe a rectifier bridge ?

3- I don't want to work with ac voltage because it is hard to control (for me) and it needs triac trimming with zero cross detection to work with arduino so can i just use arduino and a mosfet to control the motor with 220v dc ? And what is the best mosfet for this thing?

Thank you all in advance


texts: Why is KCL giving me the wrong solution?

texts:
I'm trying to derive the gain of the following common base amplifier circuit:

To do this, I drew the equivalent T-model circuit: .

The problem I have is that I get two different transfer functions for \$\frac{v_{out}}{v_{in}}\$ depending on which method I use. I originally tried using KCL at the \$v_{in}\$ node: $$\frac{v_{in}}{h_{ie}} + \frac{v_{in}}{R_{e}} = h_{fe}i_{b} = -\frac{v_{out}}{R_{c}}$$ $$\therefore \frac{v_{out}}{v_{in}} = -R_{c}(\frac{1}{h_{ie}} + \frac{1}{R_{e}})$$ The alternative method, which gives the correct solution, is by saying that $$i_{b}=-\frac{v_{in}}{h_{ie}}$$ and that $$v_{out} = -h_{fe}i_{b}R_{c}$$ and thus $$\frac{v_{out}}{v_{in}} = \frac{h_{fe}R_{c}}{h_{ie}} = g_{m}R_{c}$$ as expected.

Why doesn't KCL give the correct answer in this case? I suspect it is something to do with the current source, but I don't know exactly what and it's been baffling me for ages :/.


texts: I thought magnets could affect the operation of chips, but I see Apple use them increasingly in more their products, am I wrong in my thinking?

texts:
I’m a bit confused because I used to use magnets to fix the TV monitor when it had faults in the image, but it wasn’t good to use it that much.
Apple is using magnets in their products such as AirPods and iPad, could someone provide some clarity on this please?


texts: Getting 9V and 400-500mA out of a 24V power supply

texts:
I recently bought this power supply to power a microstepping stepper motor controller (which requires an input voltage of 24V).

My project requires the ability to dynamically turn on and off an arduino (which is the heart of the embedded system I'm working on) using only code.  I have literally everything working as of right now.  The problem is that I have the arduino's power coming from a 9v power supply [through a relay that I control using my code], and the microstepping driver coming from the 24V power supply.

I want to power BOTH the microstepper driver and the arduino using the 24V power supply.

The power supply has two V+ pins and two V- pins, so I plan to just hook one pair directly into the microstepper driver.  The goal is to have the other pair going into the arduino.  However, it is quite obvious for anyone who has used an arduino before that 24V is NOT a good input voltage.

So, I'm trying to design a circuit that will step the 24V down to ideally 9V and around 400-500mA.  As of now, I only have access to resistors for help.  If there is a strong reason NOT to use just resistors, let me know! (I'm not an EE).

The resistors I have on hand are 10, 22, 47, 100, 220, 470, 1k, 2.2k, ..... , up to 1M. (ohms)

I have technically already designed the circuit I need, but after looking at it for 1/2 a second, you will realize that it it not what you would call.....good:

simulate this circuit – Schematic created using CircuitLab

This is basically three 20-ohm resistors in series, and I'm grabbing the voltage across the last "20 ohm" resistor.  But, because a 20 ohm resistor will basically explode when subjected to that level of current, I have had to split each 20 ohm into five 100-ohm resistors.

Problems with my circuit that I am aware of:

Requires FIFTEEN resistors.  Eww.
The resistors STILL get very, very hot.  But they seem to be stable.  But it's not good enough for my liking.
I'm getting 8V out instead of 9V, I'd much prefer 9.

I have no idea if grabbing the voltage and current from the last set of resistors is even the best way to do this.  I really have a very elementary understanding of circuit design, though I am trying to improve.

So, finally it's time for my question:

Can anyone show me an improved design using only resistors to step 24V down to 8-9V, as well as limit the current to 400-500mA?  Again, I intend to directly take the output of this circuit and have it powering an Arduino.


texts: DisplayPort cable 2.5V for non standard use

texts: I want to use a DisplayPort connector and cable for transmission of a custom 8b/10b protocol (not the DisplayPort protocol). Does anyone know if these cables are good for use at 2.5V instead of 3.3V or if any degradation of the signal would result?


texts: Bit position to bitmask conversion using MPASM directives

texts:
I'm writing firmware for a PIC16F877A in assembler, and I want to set some constants at the top of my source code to indicate which port is used for what, so that if needed I can easily change all the i/o pins around by changing the constant values and recompiling.

Like this:

O_LEDS   EQU      PORTA
CONSTANT O_RED    = RA1
CONSTANT O_GREEN  = RA2
CONSTANT O_BLUE   = RA3

In my code, I need a bitmask to represent the ports I'm using. My question is, how can I write an expression using assembler directives to calculate the bitmask?

Using my example above:

O_RED = 1
O_GREEN = 2
O_BLUE = 3

and the bitmask I want is:

movlw b'00001110'

If there was a to the power of operator, I could do something like this:

movlw (2 ^ O_RED) | (2 ^ O_GREEN) | (2 ^ O_BLUE)

but ^ in MPASM is a Bitwise exclusive OR, not to the power of.

Can anyone think of another way to do this?


texts:
When I try to compile my project Altium find a floating pin on block in a my schematic. I have tried to remove the wire and to make a new one to ensure the red cross appear well when placing the net and the wire but Altium keep telling me this is floating net (cf belows screenshot).

What I am missing here ?

This schematic was imported in Altium directly from TI website, this is PMP9773 reference design.


texts:
I have breadboarded a simple H-bridge shown further down using the mosfets linked below the schematics.

The prototyping motor is a DC 12V 1A (NO LOAD) Motor Pictured below:

Ultimately I ultimately want to use the motor pictured below:
(so if you have tips concerning this motor and how it will behave let me know because I have not gotten past the small motor to test the big one)

simulate this circuit – Schematic created using CircuitLab

P-Mosfet Datasheet

N-Mosfet Datasheet

Ok so I originally had no Cap across the little motor, in that scenario the switching mosfet got really hot at low duty cycles and just motor just turned off at 20% duty cycle.

Adding a capacitor across the Drain of the two mosfets as pictured in the schematic made a world of difference!
Mosfets stayed cool and worked through the entire pwm rang and the voltage spiking because of switching transitions remained low. But the cap got hot as hell. its a tiny ceramic 50V , but i think the current through it is whats making it hot.

Next I moved the cap closer to the motor, in fact right at the connectors as you can see and that helps also, now I can have a smaller cap near the mosfets and all works well.

from some reading I have read about RC snubbers, I tried that but my Resistors quickly burn off.

So my question is how do I fix the issue of my caps getting hot? Because imagine if I am using the bigger motor I am sure they'll get hotter.
Do I just need a higher voltage rated cap?

One way that i found worked was that since I am using a 5uF that is getting hot I used 5 1uF in parallel and that stopped the heating since they share the current.

Any other tips are welcome. I see some off the shelf motor drivers with SMD components and no huge power resistors or caps to snubb spikes etcc..... how do they do it?


texts: Why does writing 0 to IOSET (ARM7) has no effect?

texts:
I am learning ARM7-TDMI using NXP LPC2148.

While studying the reference manual, I came across these two functions - IOSET AND IOCLR , used to set and clear the port bits respectively,

As per the reference manual:

" This register controls the state of output pins in conjunction with the IOCLR register. Writing ones produces highs at the corresponding port pins. Writing zeroes has no effect"

Reading this I got curious as to why they had to define two different functions to do this? Wouldn't it take more memory? I mean they could have used IOSET and a single function where writing 1 produces high at pin while 0 produces low.

Additionally, why writing 0s to IOSET has no effect? I tried Googling this question but it is not explained anywhere.

Anybody got an explanation with respect to soft/hardware reasons?


texts: Raspberry Pi high voltage supply soft-off circuit

texts:
After looking at various designs for a "software" controllable power off circuit for a Raspberry Pi computer I decided none of them fit my need so I designed my own. Before I commit it to a PCB for manufacture, I would like to ask whether anyone sees any obvious problems with the circuit and the description below:

Background: I am designing an embedded controller which includes a Raspberry Pi compute module, an ARM Cortex M3 MCU, and it needs to drive a number of high current loads (motors). The board is to be powered by a 24V high current supply.

Requirements are that the board will power on when the momentary power button is held down for a second or so. The board shall initiate a shutdown procedure when the power button is pressed and held low for a second or so again.

A shutdown procedure is required in order for the compute module to properly exit application code and save state to memory.

My solution is in the diagram below:

As the on/off momentary switch is held low, the system receives 24V through the Schottky diode D1. Regulators start up, and MCU and compute module start booting (all within a few milliseconds). The first thing the compute module does upon power up is drive GPIO 8 HIGH. This signal is buffered by U1 and it activates FET Q1 which latches the power on. The momentary switch does not need to be pressed any longer. Capacitor C1 maintains charge on Q1 in case GPIO 8 accidentally flickers from the HIGH state during the startup process.

D2 is a flyback diode for the solenoid.

Another press on the ON/OFF button results in ~3V appearing on the A terminal of buffer U2, due to resistor divider R4/R5. This signal is buffered and passed to compute module GPIO pin which is setup to interrupt on rising edge hence generating a shutdown software command.

The last thing the software does upon shutdown is drive GPIO 8 LOW, hence turning off Q1 and unlatching the relay, cutting the power to the PCB.

The question is whether my logic is sane, and whether anyone has spotted any problematic areas on the schematic?


texts:
I'm trying to get sensible bits out of a Bus Pirate hooked up to a Launchpad board (Using the Sparkfun cable: Orange goes to P1.6, Yellow to P1.5. This should be correct, unless I have MOSI and MISO confused...). I don't have CS hooked up, since I'm just using the bus pirate to monitor anything.

The bus pirate is set up for SPI, 125KHz, Clock polarity Idle low, output clock edge Active to idle, input sample phase middle, /CS, output is normal.

On the Launchpad, I have a MSP430G2231 with no external crystal. Using Code Composer Studio, I have the following:

#include  "msp430g2231.h"
volatile unsigned char value=0;

#pragma vector=USI_VECTOR
__interrupt void universal_serial_interface(void)
{
    value+=1;
    USISRL=value;
    USICNT=8;
}
void main(void){
    WDTCTL = WDTPW + WDTHOLD;

    BCSCTL1 = CALBC1_1MHZ;                    // Set range
    DCOCTL = CALDCO_1MHZ;
    BCSCTL2 &= ~(DIVS_3);

    USICTL0 |= USIPE7 +  USIPE6 + USIPE5 + USIMST + USIOE;
    USICTL1 |= USIIE;
    USICKCTL = USIDIV_3 + USISSEL_2;
    USICTL0 &= ~USISWRST;
    USISRL=value;
    USICNT = 8;

    __bis_SR_register(LPM0_bits+ GIE);
}

Most of this is cobbled together from the various samples. After much reading of the data sheet, it does seem that the USI clock is set to run at 125KHz (SMCLK of 1MHz, divided by 8), although I do not have a scope to measure this.

When running, I get what is essentially garbage out of the bus pirate. P put a breakpoint on the first line of the USI interrupt vector, and had it go through three times, so I should have gotten 0, 1, 2 from the bus pirate

0x00(0x00)0x00(0x00)][0x40(0x00)]

And letting it free run, I just get stuff like this:

[0xFF(0x00)][0x3F(0x00)][0x7F(0x00)][0xBF(0x00)][0xC0(0x00)0x00(0x00)][0x40(0x00)0x80(0x00)]

Which still looks nothing like what I'm expecting.

I've spent most of the evening going through the users guide for the chip, and I'm still stumped.

While writing this, I discovered that I can use the Bus Pirate as a logic analyzer (using LogicSniffer), and set it up to do so. And modified the program to write 0x55 to USISRL, and change the USIDIV to USIDIV_4 to slow things down a bit more, and here's the results:

The clock signal looks good, LogicSniffer reports that it's about 285KHz... and MOSI is... special. I would expect a nice alternating pattern, since I'm writing out 0x55, and that's anything but.

Any one have any thoughts on what I might be doing wrong? Defective chip? Something else?

EDIT:
Ok, minor amount of idiocy on my part. I didn't change the value that gets written to SPI in the interrupt. Doing this results in the expected pattern:

However, going back to attempting to write out an incrementing byte gets me garbage:

So, I still have a problem, just not as big of a one as I thought...

EDIT 2:
Thanks to the comments below, I tied the ground wire off the Bus Pirate cable, which was previously unconnected, to the ground off my power supply (Sparkfun's breadboard power supply). Previously, the closest ground they shared was back in the USB hub I'm hanging all this equipment off of.

This removed the glitching on MOSI when running the counter program, and LogicSniffer can now decode the bytes correctly on its own:

The bus pirate in monitor mode still reports odd results:

[0x00(0x00)][0x04(0x00)][0x06(0x00)][0x10(0x00)][0x10(0x00)][0x10(0x00)][0x12(0x00)][0x18(0x00)]

It does seem better able to detect the ends of the writes (I'm assuming that's what the square brackets delimit), but the data is decodes is still off. I'm not quite as concerned now that the waveform looks better, but it would still be nice to know why the Bus Pirate is getting confused.


texts: Why does the power light on surge protectors flicker

texts:
I've noticed that on several surge protectors from various manufacturers the light usually behind the red power switch will flicker. I found an arstechnica forum discussion that says the light behind the power switch is a neon light and flickers because its cold or old.

Why does the indicator light on (some?) surge protectors flicker?


texts: Pulling the circuit's voltage to the ground with grounded probe

texts:
When measuring a point on an isolated circuit board with my grounded oscilloscope, I fear my oscilloscope ground will pull the measured point to ground level but this has never happened, I am always getting the expected values. Can somebody explain to me the logic behind this?

Does the oscilloscope just subtract the voltages between two probes or the voltage difference between oscilloscope's ground probe and lower side of Z1 resistance effect anything?


texts: Powering LED Strips with a Constant Voltage Supply and Constant Current Driver

texts:
I have a LED strip (16ft Hitlights Luma5 warm-white high-density) powered by a constant voltage supply. I'm considering adding PWM dimming with a Maxim MAX16820 constant current driver. The PWM signal is generated by a microcontroller monitoring a pot for brightness control. One difference from the reference circuit is that the LED strip contains parallel sets of three series LEDs with a current limiting resistor.

Some sources suggest that a hybrid architecture with a constant current driver and a constant voltage supply are beneficial (e.g. this reference).

In my case, is there anything that makes this a bad topology, or traps to consider? And what are the benefits of this setup?


texts: Not getting proper acknowledgement and stop condition on I2C bus

texts:
I am trying to communicate Kinetis K60 tower board with a Cypress IC CY8CMBR3116 cy8320 development board as slave IC. There are only two devices on the I2C bus. I am attaching a snapshot of the communication taking place on the I2C bus.

The problem is that the acknowledgment is not low enough for the master to detect and even the stop condition is not correct. This is happening after sending the default address of 0X37 to the cypress IC.

Please tell me the reason for this output.


texts: Multiple Transistors (FinFET) sharing a gate?

texts:
Transistors are among the most fundamental components of electronic devices, and that to produce transistors with better performance, FinFET transistors have been developed:

This allows for better control over the channel between the source and drain of the transistor. What is preventing us from using multiple transistors that share the same gate?

I believe that this could allow for some more complex/efficient analog design in circuits. Does it affect the electrical performance of the transistors?

My questions:

Is this design actually in practice?
If not, would it be beneficial for this design to be used when applicable?
How would this affect electrical performance, if the effect is not negligible?


texts:
I am constructing a simple circuit to convert AC power from the wall to a 10V DC power across a load. I am fairly new at this though, so I have a question about how much power a capacitor can handle. I will be using a couple of 100μF capacitors. These are just your basic capacitors, purchased at your local university for college labs.

Using the OrCad tools, I have determined that these capacitors will have about 20 V across them, and will be handling around 10 W. I cannot find datasheets that will tell me the ratings of what they can handle. Does this seem too high? Am I going to blow my capacitors?


texts:
simulate this circuit – Schematic created using CircuitLab

This schematic is giving me trouble because of the connecting wire shown in red. What is the equivalent resistance of the circuit, as seen from the blue terminals?


texts:
This is a reliability doubt regarding an LDO. I was attending a conference on hi-reliability application of PMICs. During such a discussion one of the speakers said that when using an LDO ina hi rel application, the worst case is that the LDO fails and the input comes at the output as it is. Suppose Vin = 3.3V and output = 1.8V, when it fails Vout = 3.3V.

So one must make provisions to protect it. How can that be done ?
Would using a TVS protection(unidirectional) diode do the trick ? So basically it will clamp the Vout to a more manageable,say 1.5V or so.
is this a good approach ?


texts: Power an Arduino Nano with the 5V port and use an LED

texts: I have an infrared LED that uses the 5V port for power. However, I've read that you need to use the 5V pin to use AA batteries. Is it possible to wire the LED or the batteries to a different pin, or do I need to stick to USB power?


texts:
could some one explain me these technologies? I understand the main difference is the strenght of the signal.
If im trying to automatically send an alert to any smartphone (able to receibe it) can i use any of this trchnology tags? Example: imagine i have a tag in my house entrance and every time i arrive i receive a "welcome home" message in my phone. Is that possible? Or i need a trigger from my phone?


texts:
I'm having trouble merging two polygons together; when I select them they have the same nets.

They are on the same layer and they have the same net, but they stay separated when I draw them. How do I merge them?


texts: How to DC bias the output of a Wien Bridge oscillator so that it oscillates about 2V?

texts: I was wondering what a practical method of biasing the output would be so that it osicllates around 2V? I tried connecting an DC voltage source in parallel to the positive terminal but alas the output signal was severely attenuated. Could I perhaps use a circuit on the output to bias it? I tried a voltage divider of sorts but it did not work.


texts: Configuring INA126 Instrumentation Amplifier for Data Acquisition

texts:
I have a TI INA126 (datasheet) instrumentation amplifier that I want to use to amplify a noisy, low-level signal from a fabric-based resistive stretch sensor.

The resistance ranges for the fabric sensors vary depending on how they are cut. Sometimes the range is 50Ω-100Ω. Ideally it is 300Ω-600Ω. Let's assume the range 200Ω-300Ω at first.

With a simple voltage divider (R2=250Ω) and working with 5V, I get a voltage range of about 0.5V from 2.27V to 2.77V.

(250/(250+200))*5 - (250/(250+300))*5 = 0.5

So, I need to remove the common-mode of 2.77V and amplify the difference into the output swing of the INA126 (0.8V-4.2V).

The equation for the INA126 is:

Vo = (Vin+ - Vin-)*G

G = 5+(80kΩ/Rg)

Setting the gain is very easy (one resistor across pins 1 and 8). A table is provided in the datasheet.

I'm having trouble figuring out how to set everything up. I have it set up as follows:

Rg (no resistor for 5x amplification)
V-in (3.3V? 5V? 2.7V? grnd?)
V+in (sensor in)
V- (grnd)
Ref (grnd)
Vout (output)
V+ (+5V)
Rg (no resistor for 5x amplification)

With the above setup and V-in connected to 2.2V from a DC power supply and V+ connected to the Arduino 5V supply, the output range becomes:

2.65-2.98

This doesn't make sense according to the calculations:

(2.27-2.1)*5 = 0.85
(2.77-2.1)*5 = 3.35

Generally the amp doesn't seem to do what I want it to. What am I doing wrong?

EDIT1: I have access to a DC Power Supply (w/ negative voltage). Perhaps this will help me?

EDIT2: I'm going to try once more with a Wheatstone bridge and the dual power supply. If that doesn't work, I'm ordering amplifiers that are less fussy in single-supply mode (along with some 1% resistors) and trying again on Monday.


texts: Why do we need the "nop" I.e. No operation instruction in microprocessor 8085?

texts: In microprocessor 8085 instruction, there is a machine control operation "nop"(no operation). My question is why do we need a no operation?  I mean if we have to end the program we will use HLT or RST 3. Or if we want to move to the next instruction we will give the next instructions. But why no operation?  What is the need?


texts:
According to above equation doesn't output voltage depend on input voltage?

I have made this regulator circuit but it can't increase output voltage than the input voltage.

So can't we increase voltage above 12V if we input 12V?


texts:
I would like to create a variable resistor as following:

R2=1 if i(R2)<1
R2=2 if 1<i(R2)<10
R2=3 if i(R2)>10

I know that the syntax is:

R=if(condition,valueiftrue,valueiffalse)

What if I have three intervals?

The .asc file and the IF statement law is also shown below.

What is the correct syntax to do that?


texts:
So a few months back, I asked about how to connect a RN42.  I finally built the circuit, which is basically a copy of the schematics on the right side of this pdf:

http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Wireless/Bluetooth/BlueSMiRF-Gold-ChipAnt-v1_rotat2.pdf

I have RTS shorted to CTS, RX going to the TX pin (P1.4) of the MSP430, and TX going to the RX pin of the MSP430.  All the grounds (1, 12, 25, 27, 28, 29) connected to the common plane, pin 11 getting 3.3V, and a 10kohm resistor connected between pin 22 and ground.  The only difference is that I used 470 ohm resistors for the LEDs.

When I turn it on, nothing happens.  The status lights don't light up, windows bluetooth doesn't detect it at all. I've measured pin 11 and it is getting 3.3V input.  I'm stumped at what the problem may be.


texts:
I have a result in a 16-bit register which I have created. And after getting my result in this register, I am trying to shift it by two bits to the left. I am using the function for SLL to do the shifting but nothing is happening.
Here is my code below. NOTE: q is where the output of 16-bit register is stored in REG0.

If there is any other way to do the shifting of my result in 16 bit register please let me know.

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;               -- Needed for shifts

entity L_shift is
    port ( a : in STD_LOGIC_VECTOR (7 downto 0);
           b : in STD_LOGIC_VECTOR (7 downto 0);
           clk, rst : in std_logic;
           --clr : in std_logic;
           --data_valid_in : in std_logic;
           q : out STD_LOGIC_VECTOR (15 downto 0);
           tst : out STD_LOGIC_VECTOR (15 downto 0)
           --data_valid_out : out std_logic
    );
end L_shift;

architecture Behavioral of L_shift is
    component multi_8bit
        Port ( a : in STD_LOGIC_VECTOR (7 downto 0);
               b : in STD_LOGIC_VECTOR (7 downto 0);
               p : out STD_LOGIC_VECTOR (15 downto 0));
    end component;

    component reg16
        Port ( din : in STD_LOGIC_VECTOR (15 downto 0);
               clk,rst,load : in STD_LOGIC;
               dout : out STD_LOGIC_VECTOR (15 downto 0));
    end component;

    signal Bit8_multi_result : std_logic_vector (15 downto 0);
    signal load: std_logic;

begin
    --create  8 bit array multiplier
    AM: multi_8bit port map (a,b, Bit8_multi_result);

    --create result register
    REG0: reg16 port map (Bit8_multi_result, clk, rst,load, q);

    tst <= unsigned(q sll 2);
end Behavioral;


texts: control system - is the gain positive or negative?

texts:
If the phase of a control system at high frequencies approaches to 0º then its gain K is negative. And if it approaches to -180º it gain is positive? Why is that? And how it works for low frequencies? Does anybody here know where can I find information about it?
The transfer function of the control system:

Phase result (request by @AJN):


texts: Effect of lower VDS on MOSFET Crss ( Reverse Transfer Capacitance )?

texts:
I am trying to understand the effect of lower \$V_{DS}\$ on MOSFET \$C_{rss}\$ ( Reverse Transfer Capacitance ). In most of the FET datasheet, \$V_{DS}\$ versus capacitance curve will be starting from 1V of \$V_{DS}\$.

Here is a graph from page 5 of the datasheet.

What is the change in \$C_{rss}\$ with \$V_{DS}\$ variation from zero to 1V?
Please explain.

Thanks,
VT


texts: Are screened transistors an endangered species?

texts:
In the germanium transistor era, the RF transistors were PNP small signal devices.  Some of these small metal cased BJTs had 4 leads instead of the usual 3.  The metal can was isolated and the 4th lead was called the screen and was connected to an internal screen.  Common european example part numbers of such devices are:

AF116
AF117
AF126

I have even seen such transistors in  early solid state MW AM car radios, and the popular Phillips 1960s electronics set had an AF116.

Sure there were some reliability issues with the screens shorting due to tin whiskers but they were not that bad.  The long leads of the day would undermine the effectiveness of the screen at HF but the lead could be cut shorter.

Why don't they make SMD screened Si or GaAs or GaN devices today?
Is a screen expensive to manufacture?
Would there still be reliability issues?


texts: What it the base technology used in electronic speaking pens?

texts:
I am interesting to learn more about the technology used in electronic speaking pens which can be found as education toys for small children.
When the pen is placed over a book illustration or text, the pen will read it.

I did some research, finding interesting insight about light-pens (used on screen), but I cannot find any information on pens working with paper.

What is technology behind this pen?
Are circuits embed in the paper?
Some of these pens do work at optical level, how they can detect with precision what the pen is pointing to if the tip is very narrow?

An example:
https://www.albi.eu/games/mr-pen/


texts: Does the physical distance from electrolyc capacitor to inductor matter?

texts:
I am designing simple LC circuit (L=470uH, C=1000uF) for 12V / 12A (1 Ohm load):

As you can see, I did do some soldering already (without too much or noob thinking). The capacitor and inductor are almost touching each other (just 2-3mm space between their bodies).

Since both: inductance and capacity are quite big, I was wondering if this may cause some interference between them (inductor's magnetic fields etc...)?


texts: Amplify voltage between transistors in a current mirror setup?

texts:
I have a bottom gate TFT transistor:

W/l=320um
Substrate: corning glass
Gate: 60nm Molibdenum
Dielectric: 350 nm Ta2O5
Semiconductor: 30nm IGZO
S-D: Molibdenum 60nm

It is wired like in current mirror setup https://en.wikipedia.org/wiki/Current_mirror#Basic_MOSFET_current_mirror :

simulate this circuit – Schematic created using CircuitLab
I am forcing pulses of current IDS and registering VGS=VDS
This is what it looks like on the SMU:

Plot 1: CH1 IDS VS time
Plot 2: Ch1 VGS vs time

I want to wire a second transistor in the same way, get a recording VGS2 and then find the difference VGS1-VGS2.
The application
I am using the TFT to detect ionizing radiation: The X-ray radiation creates electron-hole pairs in the dielectric, which then affects the VGS recorded for a fixed ISD
Here is a plot showing how the VGS curve changes with the radiation exposure:

EDIT-from remices2 answer
Does the circuit in the answer of remicles2 work? Since it has only gotten down votes for now, but I think because it wasn't using my original circuit (which I edited now since I think it was my circuit that was wrong.)


texts: Power Supply Design: Am I after DC-DC Controllers or DC-DC Converters?

texts:
I'm trying to design a variable dual rail power supply, which has an unregulated input voltage of ~11V and a maximum output current of 1A.

I want to have a 5V/12V/20V positive and negative output. The different voltages will be controlled via switches which alter the feedback resistor.

Here's a block diagram of my design:

I chose to boost the voltage to above the maximum and then step it down as it made choosing the voltage via a switch easier.

I have had a look at many DC-DC Converters (the ones with the inbuilt mosfet), however most of them only have a very limited current capability, especially at high voltages. DC-DC Controllers however, only have a maximum voltage restriction.

So my questions are:

Is a DC-DC controller a suitable option for me to step-up/step-down the current?
Is the only different between the two the inbuilt MOSFET?
I'm not working with very much current here. Will stepping up then stepping down cause too much power loss?


texts:
I have some doubts with the following code,is this a flip flop JK or SR latch?
process(a,b,c,q) begin
  if a='1' and c='1' then
    q<='0';
  elsif b='1' and c='1' then
    q<='1';
  else
    q<=q;
   end if;
end process;


texts:
I've have already used Arduino as ISP Programmer to load codes to Atmel chips like ATmega328p and ATmega8 quite a few times without any problem.

On my last project though, I decided to use an Atmel ATtiny1634 microcontroller with QFN package instead of the bigger chips I used before. The soldering was ok, and the board has an ICSP header (MOSI, MISO,...) for the connection with the Arduino to program the chip.

I loaded the ISP Programmer sketch into the Arduino and connected it to the board. I use avrdude in Cmd Prompt for setting fuses and loading the code, so I wrote the following line to check if the communication was ok:

The device signature was correctly readed and so were its fuses. According to the datasheet information, I had to change lfuse to 0xFF because I am using External Crystal Oscillator >8MHz, so I wrote the next line for changing the lfuse:

Apparently the lfuse change was successful because at the end it reads "Fuses OK (E:FF, H:DF, L:FF), as it should. Then I wrote the same line I did at first to check if everything went ok, but that's what I got:

The programmer (Arduino) simply cannot read the chip anymore, as it gets 0x000000 invalid signature.

I wonder if there is any issue with the lfuse I sent to the device (0xFF) and also if there is any way to maybe reset the chip or reestablish connection to find out what happened.

The circuit of the microcontroller is down bellow, with the ICSP header, Crystal Oscillator, Power and the other I/O connections of the project:

Thanks in advance for any help!

UPTADE

As @Kevin White corrected, I expressed myself badly when I said External Crystal Oscillator. I saw on the datasheet it has the option of External Clock Source and Crystal Oscillator or Ceramic Resonator.

According to the CKSEL and the lfuse tables, the proper fuse value for Crystal Oscillator >8MHz is 0xFF:

Is that right or am I misinterpreting those tables?

SOLVED

Yes, I was misinterpreting those tables. Beyond the table about the clock frequency range, there is another table that relates the CKSEL bits with the SUT bit of lfuse. By setting lfuse to 0xFF I was selecting SUT=1, which sets the external ceramic oscillator, and not the external crystal. The correct lfuse value for my situation is 0xED. I'm stating to get familiar with the datasheet and its "hidden" information.


texts:
Currently I am learning control systems.
I specifically find the mathematics very hard to understand.

For my exam I am practicing on this question:
"Determine the transfer function of this circuit in the S-domain."

I came to here:

I don't know if it's correct and I don't know how to simplify this.
Could you please explain me in steps how to solve this mathematically?

Thank you in advance for your help!


texts: How do you interpret/draw out the simplified circuits in Sedra's Microelectronics?

texts:
I legitimately do not understand how the simplified drawings in this book are meant to be interpreted. Coming from a basic circuit analysis class which had everything explicitly drawn, I'm having a lot of trouble even interpreting the simplest circuits in this book and can't even get started with solving them.
Where do the arrows go?
This notation is briefly addressed in chapter 1 where it says that the arrows are connected together, but that wouldn't make any sense, since I is given a different value in the problem.


texts: How to add reset functionality to a master-slave D-type flip-flop?

texts:
I'm trying to implement a shift register and therefore need values to be stored on the downwards edge of the clock signal (otherwise the whole register just sets to the input), so I am using a master-slave D-type flip-flop to store each bit. The design also requires a control line that resets the value stored in each flip-flop to 0 (low voltage) regardless of the clock value. How would I implement this by editing the below circuit?

simulate this circuit – Schematic created using CircuitLab


texts:
I've got a reason to count a number of marbles in a game. Up to about 100. I can feed them down a track one at a time. I can ensure that they each go down separately, although I can't accurately control the distance between them.

I can adapt the track if need be. At the moment I have several variations: two straight pieces of thick wire with "sleepers" soldered to maintain the gauge, wooden channels, pvc pipe. I'm assuming that at the point of detection the track will hold one marble.

Marbles are glass and hence they are both translucent and reflective. They vary in diameter between about 16mm to 18mm, and are not perfectly spherical, although they roll easily down a 2% slope.

I had several ideas in mind and I wonder if anyone has any practical experience on this. Almost certainly, it will involve a uC that counts pulses. To make a pulse, I suppose I could have some kind of beam breaker. Or have each marble land on a piezo. Or even activate a micro switch. I'm sure each of these has it's own advantages and drawbacks, but before I make a prototype I'd like to canvas any suggestions first. Also, I'm not adverse to using two methods and corroborating the results.

I know this is also an engineering question, but I thought this board would be more or less the best.


texts:
What is the correct wording to use in a formal paper, "power consumption" or "energy consumption" for an industrial machine?

I totally understand the practical difference between power and energy, but this is a question I never got a definitive answer for, no matter how many experts I have asked. I personally lean towards the later.


texts: How to get the full Vcc output from comparator?

texts:
I am working on a circuit using a comparator for a school project, but in testing it is not acting as expected.  Specifically, the output is not going all the way to the higher rail voltage attached to the comparator.  I am using the LM311, an open collector comparator.  This can be changed if that would fix my problem.  I have tried varying values for a pull up resistor but I still cannot get all the way to the Vcc value I want (this project is my first exposure to pull up resistors and I am not sure how to choose values.)  This circuit is designed to turn on the mosfet (or BJT) and charge a capacitor so that the mosfet/BJT stays on for a period of time after the comparator output goes back to low.

Note: This is not the exact circuit we will be using, we will likely be switching to a BJT instead of the mosfet and resistor values will be adjusted around the capacitor.  The solenoid valve values are also made up. However, I do not think this changes the general question around the comparator.


texts: Difference between 24 bit and 32 bit addressing mode in QSPI flash

texts: I would like to know the difference between 24-bit and 32-bit QSPI flash? why 24-bit address is used in flash?


texts: Parameters for VAC 5046-X005 gate pulse transformer

texts:
I'm trying to parameterize this device to find a suitable equivalent. Trouble is, there seems to be no datasheet available, and one of the two secondaries are measuring open, so complete measurements are not possible. The manufacturer has the 5046-X006 datasheet, but nothing for the X005.

Primary and one secondary measure 1.0Ω DCR
With good secondary open, primary measures 3.61mH / 143Ω (LCR meter)
With primary open, good secondary measures 3.9mH / 143Ω
With good secondary shorted, primary measures 0.02mH / 1Ω
With primary shorted, good secondary measures 0.03mH / 1Ω

From what I can gather, the ratio is 1:1.1:1.1. Two of these are present in parallel and they function as 140kHz power switch-mode transformers. They are driven from unipolar 24vDC and clamped to -24vDC. Here is a primary waveform in-circuit:

This Vacuumschmelze document lists their modern devices and none are rated for >100kHz, whereas the X006 (closest datasheet I could find) is rated for 130kHz. But only the X100 (L=1.4mH) and X008 (through-hole, 18v/100kHz) are available from Mouser...

Is this a lost cause?


texts: Play PCM stored in EEPROM without microcontroller

texts: Is it possible to connect digital-to-audio converter with a EEPROM storing PCM data to play that data with a speaker? I am interested in a solution that does not employ any kind of microcontroller. Basically what I need is a low-power circuit driven by 3-3.3v that just plays recorded PCM data. This is for self-educational purpose, not commercial. I do realize that the use of microcontroller is more appropriate here.


texts: How do DC motors work with respect to current, and what consequence is the current through them?

texts:
Motors in general have always been a difficult subject that I cannot fully wrap my head around. Considering DC motors, what determines the rate at which the motor spins?

It was my understanding that a permanent magnet created the field by which the current through the motor would act against via the conductor's induced field. As current increases then the induced field would thus increase - thereby increasing the rotational speed.

However, I have read quite a bit of material that has led me to realized that I was incorrect.
Namely, what is said at this link about DC motors: DC Motors

For example, the same circuit schematic as above produces (considering back emf) the governing equations:

So we have the current through the motor as a function of the back emf.

Is the back emf a function of the load on the motor? Is it that the emf
is generated in such a manner that current is limited  by the lessening of the potential difference between it and the supplied voltage?

The governing equations dictate that if the applied voltage is lowered then the back emf decreases further which in turn will decrease the current demanded by the circuit (through the motor).

So, is the current through the motor just an indirect indication of the speed, or how does the current otherwise affect the operation?

Are all DC motors (aside from brushless) similar?


texts:
I have this circuit and I have to find \$x(t)\$, starting from \$ x_c (t) \$
I know that, at \$t=0\$, the switch is closed, so the capacitor is charged and, at the moment \$ x(n)T_c \$ the switch is open and the capacitor discharge on the resistance (with an exponential trend and an RC constant).
So I wrote that \$ x_c (t) = x(nT_c)s(t - nT_c) \$ where \$ s(t) = e^{- \frac{t}{RC} } \$ if \$ 0 < t < T_c \$ and \$0\$ for the rest.
But now I’m blocked. My book finds \$S(f)\$ and after the equalized filter transfer function.
I obtained that \$ S(f) = \frac{RC}{1 + RCf} \$ but this result is completely different from my book  \$ f_c = \frac{1}{T_c} \$ and we assume Nyquist condition is verified.


texts:
So im trying to measure the voltage at output of an DC/DC converter, however I believe I am observing what is known as 'ground bounce'. Previously the converter was supplied a voltage from a wall wart, and the voltage at output could be measured easily with a multimeter.  The ON/OFF of the dc  converter is determinded by an arduino board. When the arduino asks for the voltage to be stepped up the voltage would read 0 before jumping up to 150 volts.

However I am now using a battery pack as a power supply. Here the voltage reads -40, and jumps to 60. As the -40 may be due to ground bounce can I take the actual voltage as 100? (difference between -40 and 60).

Not as much current is being drawn from the battery, so i would expect there to be not as much of a voltage increase. However I am concerned with measuring the increase, so can I take this as 100V?

Thanks


texts: Working around voltage drop in a classic BMW

texts:
I have an '87 BMW 535is that has had an odd electrical gremlin for years. The previous owner tried gallantly to address as have I. I am not done trying to diagnose and fix the underlying problem, but in the meantime I need a work around.

The problem manifests itself as a voltage drop on (most, but not all) ignition switched circuits when other loads are applied. The most obvious load that causes the problem is the brake lights. Depressing the brake pedal causes the voltage on ignition switched circuits to drop from ~13V to ~11V:

I have not found any examples of un-switched circuits that have the voltage drop.

Most causes of the voltage drop are lighting loads (brake lights, blinkers, hazards). Interestingly turning on the headlights does not cause the drop.

As I indicated an huge amount of effort has gone into trying to diagnose this problem. Everything from testing & replacing the voltage regulator (happens whether the car is running or not) to checking all ground points has been done. Relays have been replaced. The brake pedal switch has been tested (and replaced anyway). Etc...

I'd love to hear other ideas of what to test, but the point of this post is to design a work around for something this problem causes. For the most part, this worst thing this voltage drop does is cause the LCD in the OBC/trip-computer to dim.  However, the really annoying thing is it causes my Valentine 1 Radar Detector to reboot!

I want to work around the radar detector reboot problem. As an EE hack, I see two options:  (1) install a separate relay just for the radar detector and (2) install a capacitor to the radar detector to dampen the voltage drop.

The first idea is easy: Just get an 12V/12V automotive relay. Use an un-switched load as input and the switched load as control.

But I'd like to explore (if just for academic purposes) how a capacitor could work. What kind of cap would I use? Would it just go inline? Would the drain of the cap after the power's been removed cause problems?

Thanks.


texts: Use Potentiometer to change frequency in FM Radio Transmitter

texts: I know that in most circuits you use a tank circuit consisting of an inductor and variable capacitor in parallel to generate different frequencies like this one. However since most cheap trimmer caps are not very user friendly(have to use screwdriver to adjust instead of traditional knob) I wondered if there was a circuit that somehow used a variable resistor to change the frequency. This circuit would be less than 12 volts. This circuit doesn't use of variable cap could I mod it in some way? Any ideas?


texts: Shielding to Block Wi-Fi for Testing No Signal

texts:
I was trying to conduct a test recently to show that the system I am developing behaved as expected when it can't connect to the Wi-Fi network it is configured for, and then subsequently to test that it resumes normal behavior when it can connect to that Wi-Fi network again.

I have a USB cable, a temperature probe, and a 5V power and GND wire connected to the system.

I started by wrapping the system in aluminum foil in hopes of killing the Wi-Fi signal, but my system was able to connect happily. I did a bit of research and found some suggestions on the web that the seams have to be good to block Wi-Fi because the receivers are very sensitive. I was dubious, but went out and bought some double-sided copper tape and wrapped the whole situation in a box covered in overlapping copper tap strips. I went so far as to even cover the entire temperature probe under the tape. So the only things that are exposed to the 2.4GHz radio waves in the world, in principle are the power wires (wired to a Benchtop DC power supply), and the USB cable (connected to a desktop PC). The whole situation looks like this:

I am startled that my system can still connect to Wi-Fi inside that box. It's nominally slower in getting there, but it powers up, connects to Wi-Fi, and sends a packet to my server without batting an eye otherwise.

Is this a common experience? Can anyone explain how this is possible? Faraday cage says what?


texts: Acoustic "round trip" switch/shifting times for "time of flight"

texts:
Consider the following scenario (see figure below):
At beginning, time 0 (t0) is recorded, [A] (left) produces an acoustic signal, detected by [B] (right). If the signal can be discriminated from background noise (see below, e.g. by frequency, i.e. any ultrasound signal as opposed to human voice spectrum), [B] sends a 2nd signal, which is detected by [A], and the time (t1) is recorded (to RAM for processing or to SD card for processing later).

t1 - t0 will

indicate the distance
comprise both the "time of flight" forth/back (blue) and the electronic switch/shifting times (red).

(Background noise is from normal speaking, and signal should be non-disturbing - in the easiest(?) case signal is ultrasound, and noise is normal human voice.)

Question: what are "normal" switch/shifting times (the "red" parts) in terms of absolute time and (more impotrant for calculating accurate distances) variance? "Normal" refers to "achievable by commercially available electronic compounds", with [A] and [B] no larger than few cubic centimeters each (say max. 15 cm3), and preferably << 100 $ alltogether. If necessary, a seperate controller unit (e.g. Arduino-based) can be attached to sender/receiver units [A] and [B] by wires. All calculations (filtering, calculating of distance from ToF times) can be done afterwards.

Accuracy of the whole thing needs to allow measurement of distances in the centimeter to meter range, with precision of few centimeters. Actually the purpose of my question is, if this is achieveable by acustic time of flight. I am more interested in the increase/decrease of the distance (within ~20 min) than the exact absolute distance.

Bonus points:

Any suggestion that facilitates the project, e.g. what components I should look for
If not feasable, I would be happy for other suggestions to measure the distance between 2 objects that do not necessarily face each other in really constant angles in 3D space (therefore  I thought of sound in a broad beam, ~50° would suffice).


texts: Timer sequence with delayed off and long trigger pulse

texts:
Attached here below is the input and out put sequence that I am trying to achieve with a timing circuit. This looks like something that might be achieved with a few monostable 555 timers, but I am struggling with triggering on both sides of the input pulse. The input pulse could be inverted, but since I need to trigger on both sides (positive and negative edge), I'm still in the same situation. Any suggestions would be most appreciated.
The supply voltage is 12 Volts.


texts: ISO 14443 Type B REQB fails to cause a response

texts:
Am I performing a reasonable REQB?  What might be going wrong?

In attempting to perform my 1st ISO 14443 Type B communication with a bit-banging RF interface I do not receive any response.  Same circuit works well with ISO 15693, ISO 144443 Type A.  I've years of experience with these other kinds so I do not expect I've have a trivial problem like a bad tag, too far away, etc.

Outgoing command

1) 5 ms RF (no modulation)
2) SOF (12 etus 0 0000 0000 011) (0 is modulation. ETU 128/13.56 MHz or about 9.44us each)
3) 05  (10 etus 0 1010 0000 1) REQB
4) 00  (10 etus 0 0000 0000 1)
5) 00  (10 etus 0 0000 0000 1)
6) 71  (10 etus 0 1000 1110 1) CRC lsb
7) FF  (10 etus 0 1111 1111 1) CRC msb
8) EOF (10 etus 0 0000 0000 0)
9) 5 ms RF (no modulation)

Sometime during sequence #9, I'd expect to see the tag respond, but no modulation is noticed.

Tag: MAXIM MAX66040K-000AA+

RF outgoing no modulation 16.1 V p-p.
RF outgoing modulation 12.5 V p-p.
Modulation index = 13%

Maybe MAX66040K does not work with AFI of 0?
I've tried additional delay after SOF (2 to 4 etu).
I think the CRC is correct and sent in the correct byte order.

[Edit]

Supplied own solution.


texts: What exactly is stopping OpAmps from reaching VCC/GND?

texts:
So I have been reading about OpAmps and also simulated a bit with Ltspice. I made a simple Integrator with an LM324 OpAmp and its getting close to the positive rail but Its not really exact.

What is causing OpAmps not reaching exact positive rail values ? Is it the circuit inside the OpAmp limiting it ?


texts: Phase shift oscillator: confused about phase shift per stage?

texts:
I am just learning about the RC phase shift oscillator with 3 RC stages and an opamp. From what I've
learned - each stage will introduce a phase shift of \$60^\circ\$ so the total phase shift will be \$180^\circ\$ which added to the \$180^\circ\$ introduced by the inverting opamp should  make the
feedback signal in phase with the output.
Now from the derivation of the transfer function, the value of \$\dfrac{1}{\omega RC}\$ comes out to be
\$\sqrt{6}\$ to produce a \$\beta = \dfrac{1}{29}\$ and gain \$A = -29\$ (barkhausen condition). But
won't this mean that the phase shift per stage is \$\tan^{-1}\left( \dfrac{1}{\omega RC} \right)\ =
\tan^{-1}(\sqrt{6}) = 67.8^\circ\$ which is not \$60^\circ\$ ? Am I incorrect in my use of the phase shift formula ? Any help is appreciated!


texts: Help with device identification in a chain

texts:
I'm working on a new project where I'm trying to identify devices on a closed protocol "network" of sorts.
I'm trying to determine how many devices are out there and the unique IDs of each device. I'll probably have an EPROM or something similar to store the unique identifier.
The question I would have for the forum would be: is a daisy chain the best way to identify the devices? (as shown below)

I was thinking I could try to also route individual control lines to the devices but I won't necessarily know how many total devices are out there. I will be able to connect the final device back to a return line (physically using a jumper and identified here by the blue dot.)
So again, my question is: is there a better way to do this?


texts: Why does a relay have a minimum applicable load?

texts:
I am trying to find relays for my application and I read a data sheet which looks fine but specifies

  Minimum applicable load: 10mV 10µA

In my circuit, it is expected that the relay closes but no voltage and current is applied. You can think of it as 2 relays in series where one is open and one is closed, so there is no current. This sounds like something I'd do since I was at school.

Why would a relay require a minimum voltage and current on the load side? Is it allowed to operate that relay under my conditions or not? What could possibly break in a relay if I don't respect this requirement? What does "minimum applicable load" mean? When and how do I need to consider this value?


texts: Mosfet Driver IRS2007 failure when running with mosfet IRFB3607

texts:
I am designing a BLDC motor controller and facing some issues with using an IRS2007 along with IRFB3607.

For one phase, the high side and low side give clean wave forms as long as V_Pow is disconnected.
Rise time - 300ns; Fall time-100 ns; On time - 312us; Period- 416us;

Once V_pow is connected, the input signal to the low side of the mosfet driver leaks to the high side and drives the gate of the high side mosfet. The gate of the low side mosfet is off.

This creates a high to high short over 2 phases of the motor and the motor immediately stops. This happened first time after running for about 1 min. Ever since, the motor does not run when powered by 3 phases.

The motor is a 48V 900W motor driven at 12V, no load (1A).

If driven by the two other phases, the motor runs.

------------------------End of current issue-----------------------------

Background:--------------------------

I have tried this configuration multiple times, at first I used a complimentary BJT (PNP_NPN) duo to increase the current pumped to the gate of the MOSFET

In this case the driver would work properly when V_POW was not connected but fail after V_POW was connected to 12 Volts.

Each time, with 3 phases and V_pow disconnected, the gate pulses would be in order. Once V_pow was connected, one phase would randomly fail before 1 cycle was completed.

After that the remaining 2 phases would happily power the motor till the failed Mosfet driver was replaced and then again within 1 cycle 1 phase would randomly fail.

In the above config, on mosfet driver failure, both HO and LO pins would be shorted with pins of V_Boost & V_in respectively. I presumed it was an internal MOSFET failure due to over current.

As of now I have destroyed 17 drivers trying to figure out what happened. Don't know what I am doing wrong, The power mosfets mosfets don't seem to fail. Max current through the power circuit is hardly 1 -2 amps.

The oscilloscope images are made into a powerpoint presentation which can be downloaded from https://drive.google.com/open?id=1nlpuCNPgn9C2LMH-RJehQwbQ5_Q2hv2O

Original circuit


texts:
I have some questions regarding atxmega128a4. I want to use all of its 5 uart modules but my very basic problem is that I do not know what are the pins for RX/TX. I have read in manual but I cannot find this. Can anyone help me? Can you configure from software what of the pins are tx/rx?(the ports are mentioned in datasheet but not the particular pins,because of this I cannot do my PCB:()

http://www.atmel.com/devices/atxmega128a4u.aspx

The second part of this post is about bluetooth BTM-331. I want to use one of atxmega uart to communicate with this module.
First of all, if I power up the bluetooth should I be able to discover it from my laptop?
Secondly,must the reset be put at ground?(in the datasheet says the reset pin is high for > 5ms will cause a reset) If I let the reset unconected will I have always "1" and the module is in permanent reset?
The last very stupid question about this module. Is the 1 pin on bottom left(regarding FIRST PHOTO)? The datasheet is also confusing.

http://www.tme.eu/en/Document/655d5da34b456d9bc96554c46e9251dd/btm-331.pdf

Thanks!


texts: Strange behavior from peak detector's certain op-amps

texts:
I built a multiple feedback 2kHz band-pass filter with gain Vo/Vi = 4 and an envelope detector for this filter as shown in this great video tutorial
EEVblog #490 - Peak Detector Circuit

When i applied a 1v 2kHz square wave signal at the input of the BP-filter i got 4v peak to peak sine wave signal (2v positive and 2v negative).So far so good.

For the peak detector, in the beginning, i chose two OPA379 op-amps.

When i connected the output of the filter to the input of the peak detector   and measured the filter's output and the demodulated voltage with the oscilloscope something strange happened.

The filter's output was at 2v (positive peak) as i expected but The demodulated detector's output voltage was 1v instead of 2v (exactly half of what i expected, since the detector holds the peak voltage). Then i changed the two OPA379 op-amps with two OPA340 op-amps and the detector's output voltage was at 2v (as expected in the first place). So i cannot understand why this thing happens. Both OPA379 and OPA340 (or OPA350) are single supply cmos op-amps. Why did the OPA340/50 worked but the OPA379 didn't?
 Ι assume that i have disregarded something in the datasheet but i don't know what this can be.

I attach two pictures of the faulty one and the correct one (same circuit with different peak detector op-amps).

Thank you


texts:
Here is the scenario: The sensor is pointed at a black lightly padded wall. And the sensor is secured to an object that oscillates toward and away from the wall. What is the best sensor to use to keep track of distance from the wall within the range of 4 inches to 9 feet from the wall or 0 - 3 meters? The sensor must be able to sample accurately within a few inches at a rate of at least 5 Hz.

I have tried using the lv-ez1 ultrasonic sensor, but this only has a reliable range of 1-3 feet at a rate of 5 Hz.


texts: How to draw chamfer on PCB for PCIe finger in Eagle

texts:
I am drawing a pcb with PCIe golden finger. Based on the datasheet shown below, it requires chamfer at the edge of the finger. I am new to PCIe golden finger, was wondering how I can achieve this part.

Thank you!


texts: STM32F769I display not showing framebuffer content

texts:
I am trying to get video to work on STM32F769I device.
What I have done already is that I have changed the device tree so it has the required support and enabled the kernel features required for it to work, that resulted in /dev/fb0 framebuffer device.
If I write to framebuffer and save its contents it works perfectly fine, but its contents are not displayed on the screen, the only thing I see on the screen is ST splash screen and it would not change.
If I try to do any of the following the board hangs and I have to reboot it:

echo 0 0 > /sys/class/graphics/fb0/pan
cat /sys/class/graphics/fb0/modes > /sys/class/graphics/fb0/mode

Additional information print:
~ # for file in /sys/class/graphics/fb0/*; do echo "$file";  cat "$file"; done
/sys/class/graphics/fb0/bits_per_pixel
16
/sys/class/graphics/fb0/blank
/sys/class/graphics/fb0/console
/sys/class/graphics/fb0/cursor
/sys/class/graphics/fb0/dev
29:0
/sys/class/graphics/fb0/device
cat: read error: Is a directory
/sys/class/graphics/fb0/mode
/sys/class/graphics/fb0/modes
U:480x800p-0
/sys/class/graphics/fb0/name
stmdrmfb
/sys/class/graphics/fb0/pan
0,0
/sys/class/graphics/fb0/power
cat: read error: Is a directory
/sys/class/graphics/fb0/rotate
0
/sys/class/graphics/fb0/state
0
/sys/class/graphics/fb0/stride
1024
/sys/class/graphics/fb0/subsystem
cat: read error: Is a directory
/sys/class/graphics/fb0/uevent
MAJOR=29
MINOR=0
DEVNAME=fb0
/sys/class/graphics/fb0/virtual_size
480,800

Please help me get the display to work, I will gladly provide more info if requested.


texts: Audio Player and RF Receiver Interference (no transmission data when audio is playing)

texts:
I've been trying to control a MP3 player wirelessly through RF but it seems that once I start to play music the receiver stops carrying data to the MCU.

My setup is the following:

Receiver: Arduino Nano, DFPlayer and XY-MK-5V (generic 433MHz receiver).
Transmitter: Arduino Nano and FS1000A (generic 433Mhz transmitter).

I'm using the RadioHead library (ASK driver/examples) and the data transmission works perfectly when the mp3 player is on idle mode. When I play the module by short circuiting the play/next pin to ground (or via serial mode) the player operates normally (music starts) but the data transfer from the RF receiver stops immediately.

At first I thought it was a power sharing problem, but I'm powering it through a power bank that allows up to 2A and that is proving power to this circuit at 5.20V / 0.02A. The player's data-sheet (https://github.com/DFRobot/DFRobotDFPlayerMini/blob/master/doc/FN-M16P%2BEmbedded%2BMP3%2BAudio%2BModule%2BDatasheet.pdf) confirms it draws very low current (DC3.3~5.0V, rated current: <15mA) and I couldn't find a data-sheet for the receiver but there is a website pointing its operating voltage at 5V/4mA, so both are very low powered modules.

I realised then it should be an interference with the audio frequency. The player has a built-in 3W amplifier so probably frequencies are going through the power lines and mixing up with the RF.

If I power the audio player with a different power supply it works, but is there another way of avoiding this interference using the same power supply? Or maybe, would another type of RF module work?

Below is my schematics for the receiver circuit. Thank you.

simulate this circuit – Schematic created using CircuitLab


texts: Is there a way to experimentally separate the effects of gate voltage?

texts:
I'm currently doing experiments on new kind of semiconductors. These devices have a body (source, drain) and a top gate.

These devices show a response to gate voltage. The conductance changes with respect to gate voltage. Exploring at these features is an avenue for new physics. The gate current is small (pA).

But the conductance change is also small. I was wondering, whether this change is from the actual physics of the material or is it simply due to leakage current.

Is there a way to separate the effects of leakage experimentally ?


texts:
I am here to clarify my doubt on paste mask layer for through hole components.

I know the paste mask layer is also called the stencil layer.

It's only used for assembly.  I want to know if the paste mask layer (both top and bottom layer) is necessary for through hole components.  For smd components I know the pastemask layer is required to solder the components.  Is it necessary for through hole components?


texts:
I have a display assembly with 8 WLEDs in 4s2p configuration for backlight. However, the split between 2 strings is made within the display assembly so I have only a single anode/cathode pair in the display connector. Each WLED has a Vf of 3.2V and If of 20mA, so I need to source 12.8V @ 40mA to drive the LEDs. In my current design I have been using a TPS61165, which has been working great.

Now for the next iteration of the device in question, I want to make use of the Qualcomm PMI8994 PMIC which comes with the SoC module we have selected. It has an integrated WLED SMPS that is capable to supply the required voltage, but has 3 WLED sink drivers, which, judging by the datasheet, can sink max 30mA each.

Assuming I synchronously control each sink driver to set brightness, can I safely split the backlight cathode connection on my PCB and connect them to 2 of the LED sink drivers to get under the 30mA limit?

Note that the part within the dashed region is something I can't change.