texts: Implement boolean function as multiplexer

texts:
Implement and as a multiplexer:

How is that working? When I repeat from before:
Y | out
0 | 0
1 | X

So, this means, when Y = 1, then the output = X
I'm not sure how to understand this. So far, I'm only used to things like "if X=1 and Y=1, then out=1".
My issue is probably somehow connected to the output. I'm only familiar with truth tables like this:

but in this case here, I can only switch between 0 and X. I also found:


texts: Controlling DC (Pager) Motor with Audio Signal

texts:
I'm trying to control a DC (pager) motor with a sound signal so that I can use an audio synthesizer to control the speed of the motor. I'm hoping to modulate the speed of the motor at audio rate (1-200hz). I need to do a few things.

Convert AC -> DC. A rectifier will chop the negative or fold it up, but how can I shift the waveform up, per se? What is the circuit equivalent of f(x)+1? (or will a rectifier be good enough)
I could send the rectified signal straight to the motor, but this might be a waste of energy. Two strategies present themselves:

Use a comparator to send only the peaks
Use PWM (Frequency -> Pulsewidth)

Which do you think will work better? Can you think of other strategies? Should I implement this with, say, a small AVR chip, or with analog electronics?

An additional constraint is that the circuit has to be small. Ideally my motor + battery + circuit would be quarter-sized.

Any advice would be appreciated.

(I'll also need to do some lowpass filtering to avoid overwhelming the motors with information they can't respond to. Thoughts on this would be appreciated as well.)

I will be using this pager motor from Solarbotics possibly in conjunction with this one from Precision Microdrives, who specialize in vibration motors.


texts: Can anyone identify this connector? Havent got a plug

texts: Trying to find a plug for the light in a display cabinet I just bought but have never seen this type of connector.  Wasn't sure if anyone on here could help.


texts: Add Delay to "Momentary to Toggle Button" Circuit

texts:
I have a simple circuit to take a momentary tactile button and make it toggle a power signal on and off. Unfortunately I was now asked to add a delay to the button. So you have to hold it for a second before it operates the circuit.

I am at a loss for any simple passive way to do it. I looked at a simple RC delay, but was unable to make anything work with a time-frame in the seconds without ending up with unrealistic values.

Anyone have any simple ideas that do not involve adding a micro controller?

I'm fine with an RC decay type of timer etc. that does not reset instantly, I am also fine if anyone has an application specific PMIC that does something like this. I just would like to avoid another code base and toolchain.


texts:
OK - I tend to design high value low volume boards so my view of this is biased. I like to sprinkle a lot of LEDs around my boards. One (red) LED for every power voltage on the board. Multiple s/w driven LEDs that show different execution paths in action. LEDs on communications ports, CAN, USART, USB etc so I can see when they are active.
Pros

I can see whether a board is operating approximately OK at a glance.
Ditto with service engineers in the field.

Cons

They cost money in high volume manufacturing.
They take up board space.
There may also be power constraints.

What other considerations exist?


texts:
I was wondering what is this type of pulses is call. Is it a sin wave? I know its the result of sinusoidal pulse modulation. is it considerd a quasi-sin wave?

I would like to know the name to research it more.


texts: How do I calculate maximum frequency supported by an optocoupler say for example PC817 and what factors it depends on?

texts: I am currently working on isolating SPI bus.The SCLK for my non isolated version of design is 5MHz .How do I calculate whether the optocoupler is suitable for operation at this frequency of operation.Can somebody explain me design steps with PC817 say for 20KHz frequency so that in similar way I can design my circuit.


texts: Sacrificial Anode with exterior buildup (Cathodic Protection Underwater)

texts:
https://www.youtube.com/watch?v=1ed5jkbLEOs
A link to a video of an inspection for a group of sacrificial anodes is above. The video is very long but all of the anodes have the same buildup on the exterior surface. Could this buildup prevent the functionality of the sacrificial anode? The anodes appear to be in pristine condition and I wanted to ensure that this was not because of the buildup preventing passage of current.
I am a mechanical engineer, so I have very little knowledge on this subject.


texts: Current flow through inductor (large inductance) in AC circuit

texts: I fail to understand why does the current flow in one direction only initially at t=0 in an AC circuit.. also when inductance is increased the time take for the current to stabilize and move in equal amplitudes ( negative and positive) is higher than in the case of inductor with lower inductance


texts:
I just have a bit of confusion about which way to orient MOSFETs in IC switches for sample and hold circuits

Which one is it? Or does it not matter?, since the Source and Drain potentials will be quite similar anyways. Accoutning for the device Ron, then Vin should be a tiny bit higher than Vout.


texts:
power of ac induction motor is limited by which term??
a) A resistance of copper winding
b) frequency of supply voltage
c) magnetic saturation of iron
or d) air gap between motor & stator


texts: 5V@5A switching power supply shuts down after few seconds

texts:
I have a Meanwell 5V@5A switching power supply, and when I try to power anything it shuts down after few seconds. What is more "it sings" I guess that the coil saturates, which migh be caused by too low output impedance, but that can't be the case cause I am plugging in multiple devices.

On Meanwell site it says in FAQ that this beahaviour can be caused by either Short Circuit (checked), Overvoltage protection or overtemperature protection. SPS is not hot at all during the start and I've set the output voltage to exactly 5V.

The SPS shuts down always at the same moment - when the bootloader loads the linux kernel.

EDIT: The answer to this question is: the cables from the SPS were too long and there was a 1V voltage drop on each of them.


texts:
The circuit that I am looking for is supposed to work as follows:

The circuit has, besides power, three inputs, and two outputs.

The circuit is supposed to act like a get, and let an analog signal pass through it.

The first input is the analog signal input, the first output is the same signal output.

The second input is a close trigger. Presence of a signal in this trigger will cause the circuit to close, if it were open, and stop the analog signal to pass through it.

The second output is a signal given off by the circuit when the analog signal passing through it is cut off due to the close trigger - a close confirmation.

Finally the third input is a open trigger. regardless of the presence of the close trigger signal, the open trigger should open the circuit, and let the analog signal pass through.

If I connected the close confirm signal of this circuit to the open trigger of an identical circuit, which in turn would trigger a third identical circuit to open by its close confirm being connected to the open trigger of the third, and then connected their close triggers together, then the first signal at the close trigger will first cause the first circuit (initially open) to close, cutting off the analog signal passing through it, and the close confirm signal will trigger the second one (initially closed) to open (the close confirm drives the open trigger of the second, and the open trigger, regardless of presence of the close trigger, will open the circuit), letting the second circuit to let another analog signal pass through. Next close trigger will close the second circuit, and open the the third.

How can I start constructing such a circuit? Is there an IC solution for this?


texts: Laser diode driven by a voltage source seems OK

texts:
I have bought a KY-008 laser diode module and connected it directly to an Arduino's output pin. It has been blinking (on for 0.5 second, off for 0.5 second) for an hour. I am very puzzled.

From various sources I have read, all seem to say that a laser diode is supposed to be driven by a constant current source, and that it is a very delicate device, vulnerable to the tiniest of over-voltage.

I cannot find KY-008's schematics, so cannot be sure what is on the board. From the cheapness of it (¥2 RMB, or $0.3 USD), I assume it does not have a proper constant current source.

So, why does the laser diode seem OK (so far) driven by a voltage source (Arduino output pin)? Is the normal lifetime of a laser diode so long that even a shortened one can last for hours? Is "catastrophic optical damage" less catastrophic than it sounds? Is there something nifty on KY-008? Am I missing something?


texts: What will be the output voltage if I supply 1.5V to a 3V to 32V XL6009E1 voltage booster?

texts: Basically I need to convert 1.5V DC to 12V DC. If the module mentioned above fails to do the job,then what should I use instead. Is there any way that I can add two voltage sources in series and  then use the resultant 3V DC power to convert it into 12V?


texts: If serial ports are asynchronous, why do they have an SCL line?

texts:
For instance, this tutorial has these two seemingly contradictory quotes:

  Because serial ports are asynchronous (no clock data is transmitted), devices using them must agree ahead of time on a data rate.

and:

  Each I2C bus consists of two signals: SCL and SDA. SCL is the clock signal, and SDA is the data signal.

Can someone help me to understand how these are compatible statements? How can it have a clock signal without transmitting clock data?


texts:
If a specific project specification says "...amplifier must be linear such that the harmonic distortions are maintained below -40dB...", does that mean that a THD of -30dB would meet the requirements or would something like -50dB be correct?

I ask this because I know with gain, \$ A_v \$, we usually take absolute values so it's a little hard to understand which one is correct. Any ideas?


texts:
What is the best way to light 10 POWER-LEDs with AC mains (220V)?

(I want to make an LED lamp.)

Here is more info:

I have 10 of these POWER-LEDs:

Product Chip: 40x40 mil
Chip Brand: EVERLIGHT-Taiwan
Lumens: 90-100LM
Voltage: 3.2-3.4V
Current: 300-350mA
Viewing angle: 140 degrees

And I have soldered all of them in series (with heat sink).


texts: Electrical engineering - equivalent resistance

texts:
The answer is 0.5 ohm but I couldn't solve it.

What I did is this > R3 is shorted and after doing the series - parallel i obtain the following  :

(( (R2 // R5) in series with R4 ) // R0 ) in series with R1

I don't know where is my mistake , maybe R3 shouldn't be shortened if so when should I eliminate a resistor because it short circuited ?


texts: What are the effects of AC vs DC for an Incandescent bulb life?

texts: What are the effects of AC versus DC on incandescent bulb life? Provided the same amount of power is being delivered to the bulb.


texts: Calculation of resistor and capacitor values

texts:
Taking the circuit from this question: Photodiode driver circuit, shown again as image:

I am now wondering how to calculate the exact needed values for the different resistors and capacitors (in the image placeholder values were used). For the photo diode PD24-01-HS is used (with data sheet here: http://www.ibsg-st-petersburg.com/datasheet/PD/PD24-01-HS.pdf)

From the other question I already know that R2 and the diode are a RC coupled circuit, leading to (if I want to have a frequency of 3 GHz, and assuming that the negative bias voltage in worst case is -3 V) a necessary resistance value for R2 of approximately 40 Ohm. How big should now C2 be? And how big should C1 (which flattens the input voltage) be?


texts: -20 db/decade Gain Slope requirement for Stability?

texts:
I have been learning Analog Filter designing. I started with Loop Compensation in power supply. I came across a document. It states that:

  The requirement for stability is typically met if the overall gain crosses 0 dB with a slope of –20 dB/Decade.

I have read so far for stability, there should be enough phase and gain margin and poles and zeros should be located at the left-hand size of the s-plane.

But I am not able to understand the requirement at Gain Slope when gain crosses 0 dB. Can someone explain this to me with some graphical representation?


texts: IC takes no input (or high) as high and low input as low on breadboard

texts:
I was working with IC 7400 (or LM74LS00 / NAND) (and IC 7486 - XOR) to design and verify combination circuits and logic gates.

Consider the lower end of breadboard as LOW (connected to GROUND) and upper end as HIGH (+5V).

When I connect the input to GROUND (like putting the wire on lower end on breadboard), it is considered as LOW and works as LOW; and when I connect the input to HIGH, it works as HIGH (normal behavior).

But when I remove the wire from both HIGH and GROUND, it still behaves as HIGH.

Why it happens so?


texts: Amplifying a decaying signal to a signal of uniform amplitude

texts: What is the best way, in hardware, to amplify a decaying signal to a signal of uniform amplitude, as shown in the picture below? Does this amplification scheme have a name? I'm working in the audio range.


texts: Waveguide excitation through coaxial antenna

texts:
let's consider a waveguide excited with a coaxial cable antenna:

You may see that this structure is sized with a distance between the antenna and the plate equal to \$\lambda/4\$. My professor has told me the reasons of this choice are that:

1) The antenna irradiates waves both at right and left. But we want all the wave at left. Therefore we put a very good conductor plate at left, in order to reflect the wave towards right.

2) The distance between the antenna and the previous plate is sized to be \$\lambda/4\$ because in this way it acts as a quarter wave transformer with a short circuit load (represented by the plate), and so the short circuit is seen as an open circuit by the antenna.

So, it is a narrow band system, designed to work ideally for only a single frequency. If for instance we excite the antenna with a frequency such that the distance antenna - plate becomes \$\lambda/2\$, the antenna will see a short circuit.

Now my question is: why is it a problem if the source (antenna) sees a short circuit? From a circuital point of view, I'd say that it is a voltage source in parallel with a short circuit, which is dangerous because it means infinite current which may damage the circuit. But this is not a circuit. So which is the disadvantage/danger of this condition?


texts: working out Vout for an Opamp circuit that has a common base npn transistor instead of a resistor?

texts:
Im not able to figure this out I have Vin, R1 and saturation current of the transistor.
Do I need to work out resistance of the transistor first or follow a different method I am very lost with this one.

I have found this equation but I do not have a load resistor so am unsure of what to do.


texts: Isolation of SD IO pins during off state

texts:
I have a project at the moment that uses a PMOSFET to switch the supply to an SD card.  According to the SanDisk SD datasheet available here:

  Because there are clamping diodes on the CMD, CLK, and DAT0-3 pins, it is
  crucial to ensure that CLK, CMD, and DAT0-3 are at zero (0) volts during the
  delay and before the FET switch is turned on. If any I/O pin, (CMD, CLK, or
  DAT0-3) goes above zero volts during the delay and before power reaches the
  card VDD pin, it will forward bias the clamping diodes and can cause the card
  to go into an unknown state.

The card is connected to the SPI bus of the board which has several other devices using the bus.  Since forcing the entire bus low indefinitely is out of the question, how would I isolate the IO pins of the SD card from the bus while it is switched off?

I am also considering switching the SD card supply rail over to an auxiliary LDO so it is no longer attached to the main supply (but I wouldn't imagine this making a difference to the answer).


texts:
I've got a circuit I'm developing using an op amp to drive a power MOSFET for an electronic load:

I'd like to test it for stability, but I don't have enough experience to know what perturbations are most likely to show any instabilities.

I have the following ideas:

Inject a square wave (offset such that low value is >= 0V) into the non-inverting input while monitoring the voltage on the sense resistor (load current waveform). This would simulate sudden changes in the control voltage (1V/A) likely to be supplied later by a DAC.
Apply stepped input voltage to IN+, simulating connection of power supply under test.

Are these sensible ideas that are likely to uncover any op-amp related instabilities?

Also, are there LTSpice simulation exercises that might be worth trying?

UPDATE:

I revised the schematic to be more suitable for simulation. I found and used models for the specific parts I'm using and removed all compensation elements for a baseline simulation.

I ran an analysis feeding a DC-offset square wave into the control pin (non-inverting input in this circuit). The result was dead stable. There's a teeeny-weeeny 1mV overshoot on the rise if you zoom way in, otherwise it absolutely mirrors the input (except it represents current flow of course). I even reduced the rise time to 1ns to see if I could get it to ring, but no luck :)

I ran an .AC analysis like @Kevin White suggested, and found a 62 degree phase margin in the open loop gain.
I built it up as @mkeith suggested, and unfortunately it oscillates like crazy on the breadboard :) I was able to make some progress stabilizing it a bit until I accidentally blew out my MOSFET. It's down to the store tomorrow to get a new one so I can carry on from there :)


texts: what is the max charge current of BQ2057?

texts:
I have gone through the datasheet of this single cell Li-ion charge IC BQ2057
but I couldn't find the charge current detail


texts: Suggestions on wiring PCA9685 i2c + TB67H303 motor ic

texts:
I'm trying to design a circuit in order to use the TB67H303 motor driver with the ATMEGA328p and the i2c protocol by using the PCA9685 controller.

I never used the TB67H303 and the PCA9685 chips before, so I would like to know if I made errors in my scheme.

By considering the TB67H303 datasheet, as reported in the Application Circuit (page 16) for Direct PWM mode, I tried to connect:

pin 3 SELECT to LOW
pin 7 STBY to the pin 6 of the PCA9685
pins 8, 9 and 22 to pins 7, 8, 9 of the PCA9685 for motor control
pin 5 Vref to pin 2 SGND as reported in the application circuit
pin RSA, RSB, PGNDA, PGNDB to GND(12V)
pin 6 VCC to +12V

I connected Pins A0 to A5 of the PCA9685 to a 5 way header so I can set the address by short-circuiting the related pins to +5V.
I also connected pin 23 OE and pin 25 EXTCLK to GND. Is it correct?

This is my circuit, I hope it doesn't have too much errors :)

Thank you for your help!
This is my wiring ->


texts: How to match harmonica impedance to a tube amp to eliminate feedback

texts:
What circuits eliminate feedback between hi z harmonica mics and high gain guitar tube amps?
Do FET circuits work? I have used tube bases attenuators in the past for 50 watt amps, but they reduce the volume too much  for 25 watt tube amps.
I currently have a 25 watt tube amp I'm trying to use a hi z bullet mic with. It makes good tone, but feeds back once volume  gets in the sweet “tone” spot harmonics wise


texts:
I built up a custom PCB for the DRV8313. I used the schematic from the datasheet (S.15)

The Problem is, that VCP is -0.6V under VM and not +7V over VM. The Power supply has 12V and is adjustable. The V3P3 gives me 3.3V. From S.14 of the datasheet the Problem needs to be undervoltage (V3P3 Operating, charge pump and Output not), but thats not the case. nSleep and nReset are 3.3V from the Arduino and GND is connected from the Arduino and the Power supply. Also if I set nSleep to LOW, the V3P3 Pin gives still 3.3V. The soldering should be fine, since I checked all connections with a multimeter and I soldered a second PCB, where still the same problem occurs.

Anyone an Idea what could be wrong?


texts:
I need help choosing a thermistor. I’m not sure what I need to look for. Let’s say I have this circuit measuring temperature:

I have a range of temperatures from 0 to 10 degrees that I need to measure. I need outputs between 0 to 5 volts based on those temperatures.

I can’t seem to find how to choose a thermistor. I have found how to calculate the resistance of the fixed resistor to maximise sensitivity and range. I would choose a resistance that is the same as the thermistor when the thermistor is at a nominal temperature...

Thanks.


texts: Complex Power Example in Hayt Engineering Circuit Analysis

texts: In the attached example from Hayt's book, we go through an example where we talk about adding a capacitor in parallel in order to improve the load factor of some industrial load. What I don't understand is how we can use \$S_1\$ that we computed first (when there was no capacitive load) and then use it again in the second case where we get \$S_2\$ by subtracting \$S_1\$ from \$S\$. Now I do understand that the addition of the capacitor will not change the amount of (real) average power consumed by the load, but how can we say that the reactive power consumed by the inductive motor is the same as before?


texts:
Please refer to this image of page 113 of this manual

I'm not understanding this table. From what I can tell, I have from 0010_0000 to 3FFF_FFF of DDR memory, which is 1 072 693 247 bytes and approximately 1 Gbyte of memory available to write into the DDR, correct? I thought the Zedboard had only 512 Mbytes of DDR memory...

Also, in that table, it says that I have approximately 2Gbytes (4000_0000 to BFFF_FFFF) of address available for PL. What does this space mean exactly? What can I save in here?

Thank you


texts: Rising edge pulse detector from logic gates

texts:
The circuits I describe are entirely made of 7400 series logic gates (7402, 7404 and 7408 ic).
I'm trying to build a rising (positive) edge pulse detector using logic gates.

The following circuit should work in theory:

(see this)

I do not expect the short output to be seen through a LED so, to test it, I make it trigger an SR latch to its up state:

However, it doesn't have effect on the latch. So I added an inductor to delay the input to the NOT gates in the pulse detector circuit and it worked:

But now I can see the short flashing output through a LED which I should not because it would mean it is too long to work with a circuit like that:

Which intends to toggle the D Latch output on each clock rising edge (Note that this is a D Latch not a D Flip-flop)

And anyway there is no place for inductors in integrated circuits so there must be a way to do this only with logic gates. Can someone solve this mystery?

BTW It does not show in my schematics but I did put 10K pull-down resistors where there might be floating pins.


texts: Im struggling with identifying the capacitance on this cap

texts: Cant find capacitance for this capacitor marked x1 100v UD any help appreciated  can find capacitance for this capacitor


texts: So I'm working with an ATMega328P. I'm trying to write a stepper driver to drive a DRV8825 breakout board. This requires only a single PWM. In order to properly accelerate the stepper motor I need to change the frequency of the PWM. I have the PWM running. I try to change the values stored in the Output Compare Registers to increase the frequency of the PWM. However this doesn't seem to work. I've tried reconfiguring all of the registers required to setup that PWM to output on PB2 however that doesn't seem to help. So I'm wondering if it is even possible to reconfigure a micocontroller's register after they are initially configured?


texts:
I have an application that's powered by a typical 3S LiPo battery pack and charged through an MPPT solar charger. The charging circuit in the link doesn't balance the battery pack, however, which means that I have to do it some other way. It's trivial enough to buy an off-the-shelf balancing circuit, but I need to be able to shut it off when not charging so that it doesn't drain the battery.

The question is this: given a standard xS LiPo battery pack, and access to the CHRG pin off the charger (meaning a signal that goes high when charging), where do I need to interrupt the balancing plug to safely shut down an arbitrary external balancing circuit? Do I have to interrupt all x+1 lines, or can I just interrupt one of them?


texts:
i have a question about this circuit and its space-state modeling. I have the node A, modeled by $$I_{C_1}= I_{C_2}+ I_{R_1}$$
But i don't know what can I do. I already know that $$V_{R_1}=V_{C_2}$$ and $$C_1\frac{d(V_{C_1})}{dt}=I_{C_1}$$ and $$C_2\frac{d(V_{C_2})}{dt}=I_{C_2}$$ and $$V_{C_1}+V_{R_1}-V = 0$$. What can you suggest me to not have only one derivative on this equation
$$C_1\frac{d(V_{C_1})}{dt}= C_2\frac{d(V_{C_2})}{dt} +  I_{R_1}$$


texts: How can I simulate x6500 or x6000 FPGAs?

texts: For some odd reason, Altera does not have anymore cyclone II education kits here. I was planning to use them for bitcoin mining or some other number crunching. Then I found x6500 and x6000 FPGAs but they are much more expensive/risky, here. Here is the code I would like to run on the board. How can I simulate the running without the board on my own CPU because the boards are expensive? I feel it is essential to learn this way, not get into some accident and break the board. Also, there is a lot of hot air around this issue so I would like to see what the boards really can do.


texts:
In this video, you can see that the circuit produces two blinking LEDs. These are all the components to make it work.
https://www.youtube.com/watch?v=BEGmT-9GIeE&feature=emb_logo&ab_channel=TheTechnocrat

BC 547 Transistor
LED
Breadboard
Battery 9V
10uF Capacitor
47 komh resistor
100 omh resistor
Wires

My question is, how do you know which transistor/capacitor to use in order to produce the blinking LEDs? How do you know to select BC547 transistor and use it with 10uF capacitor? I just don't understand how to come up with this? Do you need a formula?
I want to understand this so that I can make my own in the future without relying on a tutorial video. Thanks!


texts:
I create applications for STM32 F303RE for communication with the instrument panel. I managed to connect everything but I have some problems. I'm not sure if it's due to bad code or good performance. I've plugged a cheap logic analyzer into CAN_H, CAN_L, CAN_TX, CAN_RX.

I am able to observe the frames sent by the Instrument panel cluster (removed from the car, connected to the power supply at home) as shown below on the screen (e.g. ID: 0x0C194003). Unfortunately none of these frames appear on CAN_RX line in STM32.
When I try to send some own frame (ID: 0x07000000) I see that it appears both on CAN_TX line (which is normal for me) but also on CAN_RX line. The device works in Normal mode, not Loopback. As I understand it STM collects this frame from the bus immediately after sending. But I don't understand why it reacts and accepts this frame and doesn't get those sent by IPC.

At the end of each frame sent by IPC I get NAK. I guess that if the frame did not appear on the RX line and did not get to the device there is no possibility that it will be issued ACK by qC. The frames sent by me (as above, the frame with ID: 0x700...) receive an ACK confirmation. But I don't know if ACK is received from IPC (as it seems to me) or because on CAN_RX line this message appeared and STM issued ACK bit itself...? Filter bank is setted to pass all frames.

Problem is related to previously asked: NAK in CAN bus for STM32F3 uC


texts: Why are different rms noise sources added in this way?

texts:
I'm wondering why noise sources are added such a way their rms values are added in square root of sum of squares fashion.

For instance if the rms noise values from three sources are X,Y and Z, then the total noise is given as \$N = \sqrt{X^2+Y^2+Z^2}\$.

Is there a way to show this relation mathematically?


texts: What does the output waveform from audio source look like?

texts: I understand that every audio waveform will be different but in terms of frequency and amplitude what can I expect? The audio source is an audio jack connected to an Ipod or computer audio jack. What I plan to build is a device that will light some LED's when say a frequency below 700 Hz is embedded into the waveform, however not sure what the waveform is composed of. Is it possible to have filters decompose the waveform into the different frequencies?


texts:
I try to load a program into STM32L011K4 using J-Link. The mistakes I get and the steps I follow are as follows:
PROBLEM-1. J-link could not find STM32L011K4
My Steps:

Click options for Target → Utilities → Debug Settings → Add Unspecified Device (Cortex M0+)

Click options for Target → Utilities → Debug Settings → Port (SW) and click OK.

PROBLEM-2. When I click to load (F8) the program, I got an  error as below:

"JLink-Cortex Error: Flash Timeout.Reset the Target and try it again"

and I clicked OK.
Then I get an error like this:

"uVision: Error:Flash Download failed - "Cortex-M0+"

My Steps:
I changed Options For Target → Target IROM1 and IRAM1 values, but I kept getting the same error. Also I tried to change values of Options For Target → Debug Settings → Max Clock, but nothing has changed.


texts: Using the Temperature Sensor TC1047A with MCU

texts:
In the manual in order to convert the A/D conversion result of an HCS12 MCU to the corresponding temperature, we need to do the
following:

Divide the conversion result by 6.2
Subtract 40 from the quotient

Is there a particular reason for this, or this is a way that temperature sensor is made?

Thanks


texts: Voltage conversion for quadcopter camera

texts:
I am wanting to fit a small camera that I already have to a quadcopter.

I have the camera working on the breadboard but the quadcopters battery is a 3.7v lipo. Supposedly the camera itself runs on 5v but seems quite happy with the 3.7v from the lipo. The line that switches the camera on and off alternates between a 3.3v and ground supply.

So initially it has 3.3v then you switch it to ground for 250ms and then back to 3.3v and recording commences. The same thing to stop recording.

Seeing as weight is a major consideration what is the lightest / easiest way to supply the 3’3 v for this function please and how exactly would I implement any suggestions. I thought of using a zener diode or level shifter somehow but I am unsure how to proceed.

Here is my  Circuit:


texts: Controlling multiple LEDs with Arduino and TLC5940NT

texts:
I'm working on a DIY project at home which needs approximately 150 LEDs  to be lit up at varying levels of brightness.  I'd eventually also like to have these LEDs lit in certain patterns so they really need to be driven by a microcontroller (a controllable LED matrix if you will).

After some consideration, I've started dabbling with the Ardunio as it seems to be suitable for the task at hand and allows me to multiplex LEDs and so on.

I have both the Arduino Uno and the Arduino Mega 2560.  For testing I used the Mega as it has 15 PWM channels so I can adjust the brightness of each LED etc without having to mess about with different valued resistors and hook enough LEDs to give me a good idea of what's going on.

I had a good proof of concept up and running with LED1 lit up for 1800 microseconds, then switched off and LED2 lit up... and so on for all 15 LEDs.  None of the LEDs were actually lit at the same time but it gave the persistance of vision effect (all LEDs appear lit up at the same time) and didn't draw a huge amount of current.  This is what I'm aiming for, on a larger scale of ~150 LEDs.

So, next I needed to scale this up.  The next proof of concept came in the form of utilising the TLC5940 LED driver after reading some articles and blogs online.

I hooked up the TLC5940 to the smaller Arduino Uno, and connected 16 LEDs to the 16 output channels of the chip.  I ran a test program (I think it faded/ran patterns along the LEDs and it worked fine).

I then began writing a loop which would again switch on the first LED, wait for a fraction of second, then switch it off and move to the next LED.

The code worked up to about 3 LEDs but as soon as it hit the 4th LED, flickering could be observed.  By the time it was scaled up to all 16 LEDs, there was a clear visible pattern (like a mexican wave) running across the LEDs.

I tried changing the delay time, reducing it all the way down to 1 microsecond but this had little effect.

My code was something like this:

#include "Tlc5940.h"
int DELVAR = 1

void setup()
{
  Tlc.init(0); // initialise TLC5940 and set all channels off
}

void loop()
{
    Tlc.clear();
    Tlc.set(1, 4096);
    Tlc.update();
    delayMicroseconds(DELVAR);
    Tlc.set(1, 0);
    Tlc.update();

    Tlc.clear();
    Tlc.set(2, 4096);
    Tlc.update();
    delayMicroseconds(DELVAR);
    Tlc.set(2, 0);
    Tlc.update();

    Tlc.clear();
    Tlc.set(3, 4096);
    Tlc.update();
    delayMicroseconds(DELVAR);
    Tlc.set(3, 0);
    Tlc.update();

    // ....and so on for all 16 channels .....
    // (not optimal I know but at this point I'm still just getting my head around the logic)
}

Is there a limitation on the "speed" of the TLC5940 or the channels it's using from the Arduino?

How can I get around this so that all LEDs appear to be illuminated at the same time.  Am I correct in thinking the duty cycle of the Arduino is 16MHz?  and if so, shouldn't I theoretically be able to light up and switch off > 50,000 LEDs sequentially all in under one second?

Disclaimer - I have very basic electronic knowledge from when I was in school about 15 years ago so this is all a very steep learning curve for me!

NOTE:
*For anyone wondering what it is I'm working on - it's a giant world map - the LEDs represent major urban or populated areas (cities etc) as viewed from space at nighttime.  I'd eventually like these to be hooked up to realtime so that the LEDs lit up represent actual urban areas lit up at night at that particualr point in time - this is where the Arduino would be very useful.

It's a string art map based on one I did last year (below)

Only a lot bigger - it'll be 8ft x 4ft - progress so far - holes for LEDs drilled are ready:


texts: Using filters to reduce bandwidth of received signal

texts: I am doing some radio work, and I assume you can use a bandpass filter to reduce the bandwidth of a received signal. The application is modifying schematics for a FM broadcast receiver to a 5-25 kHz bandwidth of received signal ham receiver. Is that correct?


texts: Using NMOS or PMOS for voltage controlled switch?

texts: If I want to use an NMOS or PMOS as a voltage controlled switch, when would I know to use one over the other? I know a PMOS activates with a LOW at the gate and for an NMOS when HIGH at the gate, but would there be a different choice to be made depending on where in the circuit they are oriented? What is the difference in operation of a CMOS inverter with an inverter->NMOS replacing the PMOS?


texts: About the impedance matching problem of this circuit

texts: This is part of the pulse output circuit for cable fault location, but the pulse signal output to the cable is suppressed. I guess the reason for the impedance mismatch, but how can we achieve the match? Is it a series or parallel connection of a resistor directly at the output?


texts: Accessories for Android devices with USB host

texts:
The Android Accessory SDK relies on the accessory having USB host.  However, my understanding is that newer versions of Android (3.1, 2.4?) have USB host support in the kernel.  And I know many existing Android devices have hardware support for host (most tablets surely, Moto Droid, HTC Droid Incredible, etc.).

So my question is, given an Android device that has USB host, what will be the simplest/cheapest way to interface this with a micro?  The first thing that comes to mind is using an FTDI USB->serial chip and a micro with UART.  But I don't know if the FTDI drivers can be put on Android devices.  Anyway, there's probably a much better solution.

I'd prefer a solution that doesn't require a rooted Android device, but would be interested to hear some of these options too.


texts: How could I measure RF transmission power from SMA connector without having a RF wattmeter equipment?

texts:
I need to measure the RF power of a radio transreceiver, and since I haven't specific RF wattmeter equipment,
I'm wondering how I could do this using a classic multimeter.

I would avoid to disassemble the radio equipment so I want to do this check at SMA connector (if viable).


texts:
I am searching for a circuit or any technical documentation or interfacing IC to design the MicroSD memory card to USB. I am very well aware of Adapter available in market which serves the purpose. But I want to know what goes inside, if I can build it for my project.

I have found this
USB controller IC

The software part http://www.signal11.us/oss/m-stack/

Can i interface this with standard MicroSD memory card. Unable to find any circuit diagram for the same


texts: Is there a way to output high quality pictures to a monitor with VGA using an Arduino?

texts:
So, I had a spare monitor lying around and I wanted to find a way to make it like a picture slideshow. I also have an Arduino Uno. I was wondering whether there is a way to take some pictures from an SD Card (from an SD Card shield I have) and output them, through the Arduino, to a monitor. As some of the pictures are pages from a book, I want the resolution to be high enough for the text to be readable.
Is it even possible? Or I should go to other options like Rasberry Pi?
(I'm new to this site and don't really know the tags well, if you know a way to improve them, thanks in advance!)


texts: PWM FAN controller & Ideal 24V DC to DC 5V Converter just to feed 556 IC

texts:
I'm trying to find a best match for a regulator that can feed dual timer ic. The 5V circuit is dedicated to that IC which will generate a PWM pulse signal to  PWM control the FAN speed. It's a 4 pin PWM fan, the 5V will not feed the fan!

Input Voltage: 24V

Input max tolerated voltage: 26V

5V line consuption: +/- 30mA, 50-100mA margin needed

Requirements: Small, good availability, easy to source, less components, low noise, cheap (Don't want isolated AIO solutions which costs a few bucks each), SMD, no zenners!

Circuit:

On my research found the following solutions:

Linears regulators: From 24V to 12V L7812 to 5V L7805, i'm not a big fan of them but for the purpose they may fit?
Bucks: MP1584 (overkill, big), AOZ1282CI (Smaller but still overkill). Then i come across with LT1107 and LT1111 which are simple and low current.

But i'm sure there's a better solution out there that i'm not aware. What you guys would use in that situation?

25/05/2019, Updated circuit

27/05/2019, Updated circuit, Final

Added extra fan header to take advantage of empty space
Change pot circuit to use Jack solution
Reduced PCB overall size
Removed Foot switch and use pot with switch
Change P mosfet to N mosfet

Linear Regulators seens do the job just fine in this situation, as indicated and helped out by @DaveTweed on comments.
Thank you

Edit - 25/05/2019:

End in use LM2936HVMAX-5.0/NOPB to support higher voltages to use with higher voltage fans, up to 58V (If needed)

23/06/2019, Fixed and Updated circuit v1.1

Added alternative XH headers for fan and power, eg. regular fan header
Added solder jumper for test or ignore headers
Added solder jumper to select 2/3/4 fan wire operation
Added more information about pins on board
Fixed wrong mosfet footprint
Changed VH orientation, now tab faces out the board
Better label positions and reorder
Compact board and components
Better thermals


texts: What are the options if the I2C slave addresses clash?

texts:
Now I have ten accelerator sensors (ADXL345) connected to only one PIC16F887 using I2C.
The problem is ADXL345 only has 2 I2C slave addresses configurable. So it brings conflict.

I know NXP does provide a I2C multiplexer that work around this kind of issue, but I have ten sensors. So it seems of no help.


texts: What are some typical low cost microcontrollers and chips that are used in electronic toys?

texts:
I'm researching microcontrollers, memory chips, and sound chips for simple electronic toys.
These toys might take user input via buttons or switches, and then play back sounds stored on a memory chip and maybe play it back through some sound chip or audio amplifier.

What are some typical models for these chips? I've worked with PIC chips in the past as a hobbyist.
I'm looking for ones that are typically used by the toy manufacturers in their products. These are probably more cost effective than the ones I'm used to working with as a hobbyist.

CLARIFICATION
I'm researching this b/c I have a toy idea and want to get a sense of the costs of making it. I want to be able to mass produce this.


texts: How a LPC 2368 controller get the bus mastership on 68K address and data bus

texts: In my project I have 68K processor and LPC2368 controller.Always main program running through 68K processor,Some times I need the bus control of 68K is get over the controller.So please tell in what way 68K is idle and give the bus control to the 2368 controller?


texts: Differential Amplifier BJT Experimenting

texts:
This is a circuit I made recently; a differential bjt amplifier (without any signal, only DC).

So I was trying to see, what happens when I change the voltage difference between the base of Q1 and base of Q2. Q3 represents constant current source.

According to the example shown here: https://www.youtube.com/watch?v=mejPNuPAHBY , with changing the Vbe drop across Q1, the I_e1 should change inversely proportional to I_e2. As the I_e1 increases, I_e2 decreases.

Well, I tried to achieve that, but it didn't happen as said. If 5M potentiometer would be removed, the both of I_e would have a value of approx. 550uA. As I connected the potentiometer into the circuit and changed it, I_e1 was decreasing but I_e2 didn't change a bit (pictures given down below).

Where is the glitch in this circuit, as differential pair doesn't behave as it should?

simulate this circuit – Schematic created using CircuitLab

Without potentiometer

With potentiometer


texts: I've been reading that Phase Noise dominates in frequencies close to the carrier, while Amplitude Noise is more dominant in higher offsets. Could someone explain this?


texts: Guard-ring circuit is designed aroung high sensitive (low current high impedance inputs). What is the technical impact if a guard-ring circutry is fully masked versus unmask ?


texts: Time to digital converter (TDC) for time of flight (TOF) applications. 66.6 picosecond sample

texts:
My question is in regards to dynamic range of short time period TDCs, or alternative solutions to a time to digital application.
If further information is required, please ask.
TDC datasheet
Question.
TDC7200 datasheet says,
Measurement Range:
– Mode 1: 12 ns to 500 ns
– Mode 2: 250 ns to 8 ms
I wish to measure 66.6ps as my fastest sample and 3.33ns as my slowest sample.
Both mode 1 and 2 are outside of my desired range, however I see the datasheet also says 55ps resolution. Further down it also says LSB = 55ps.
Does this mean that if I wait for 12ns then all samples thereafter are within 55ps accuracy?
In other words:

fastest sample = 12ns
next sample = 12.055ns
next 12.11ns
next +55ps
etc etc until the nBit register is full?


texts: Repairing/understanding this guitar amp master stage

texts:
The failure

For the past few months I've been looking to repair my old-style Roland Cube 60 watt amp after it had been left out on a cold night. The point at which it failed was when I turned it on inside, and it started emitting a quite loud low-sounding hum through the speaker even though I had turned the master volume all the way down. I switched it off and back on a few times after checking cables, still humming, and after a few seconds it failed (blew all fuses).

The problem

I opened it up, disconnected the speaker and after blowing a few more fuses, I isolated the fault to the two NPN power amps in red

Through some unknown means, they had become shorted out (I could test continuity between the pins). After removing them from the circuit, the fuses no longer blew and I could could get a good signal from the Preamp Out with no problems, so I know that every thing before the master stage is working as it should be. I checked a 44 and -44 volt power rails and they seem to be fine (not under load)

I ordered replacement 2SD845 power transistors, and after fitting them in the sockets and turning the amp on, the Q12 climbs to 60 C quickly and the loud low hum sounds so I quickly turn it off. Q9 also gets really hot. If I have only one of Q12/Q13 plugged in, there is no heating up, but a slight hum can be heard when only Q13 is plugged in.

I measured the DC voltage present at the sockets of Q12/13, while the transistors were removed:

Q12

B: -11, C: 44.3, E: -5.1.

Q13

B: -35.3, C: -5, E:-44.5

The now

I'm not at all experienced with amplifier design, and this layout is more complex than I've ever seen

1. What is it called, and what are the main things I should know about it?

The only way I've been able to discern faulty parts is by testing for short circuits, to which there currently appear none, and even though Q9 and Q12 heat up, there is no tripping of the fuse

2. What could possibly be causing them to heat up so quickly?

I assume it is this heating damage that caused the original transistors to short out, so I'm not so keen on having to turn the amp on too many times at risk of destroying the new  Q12/13 transistors.

3. What should I be testing for when it is turned on? Or even better, what could I test for when everything is powered off?

Thank you very much for reading, I would really appreciate any and all advice I can get.


texts: (pyramid xpa-240)if i had 10 voltage extra to a amplifiers what will happen?

texts: I have a pyramid xpa-240 amplifier that does work with 110/220 voltage i want to know if it ok to use on 240 voltage? Or is the voltage to much for the amplifier?


texts: Running 7V motors with 2x 3.7v batteries

texts:
We're really enthusiastic to build a homemade quad-copter with almost no knowledge about such things. We will probably use Arduino and Bluetooth to control it, but we have a question about the motor power supply. We're planning to use a phone battery to power the motors. Our motors run at 7-12V, but our batteries are 3.7V, 1450mA. The question is will the motors run smoothly if we connect them like this:

and theoretically will they be enough to power 4 motors. If they're not, can you suggest any cheap solution.


texts: Trying to combine two power source into a single micro usb output

texts:
I had a power bank which is has 2 usb port that can charge simultaneously, the problem is both of it discharge at 5.1v and 0.5a.
I would like to use 2 usb plug combined them in parallel into a single micro usb output.So it would be 5v and 1a.
And also I planned to use that custom made cable with my power adapter, 1st adapter output 5v 1a and another one 5.2v 1.8a.
What did you think, can it be done and use safely ?
Do I need to use a controller ?


texts:
I am planning on using a Diodes Inc. AP9211 battery protection circuit for an IoT project, and I have a question regarding usage.
The AP9211 will be embedded in the PCB, while the battery will be inserted afterwards. Once the battery is inserted, I do not expect to change it long-term. My schematic for the battery protection follows the datasheet guidelines, except I connect P- (the PACK- shown in the datasheet) to GND directly, as this is the GND of the whole circuit.

Since this IC is intented to be used in the battery pack and not separate, do you see any issues with connecting P- directly to GND? I would think not, because even if I placed the AP9211 on the battery pack, I would then connect P- to my circuit's GND through a cable or connector of some sort.


texts: Does anybody recognize this (other) automotive connector?

texts:
Similar to my other question, I have another connector I can't identify.  Does anybody recognize the series?  I am wanting to build my own, so I need to know what series it is and what pins it takes.

(yes, I know what it came from.  It's the crank position sensor from a Focus.  I know I can buy premade pigtails.  I'm not asking for either of those bits of information)

Thanks!


texts:
Using the following code from doulos tutorial on SystemC

#include "systemc.h"
#include
SC_MODULE(mon)
{
    sc_in<bool> A,B,F;
    sc_in<bool> Clk;

  void monitor()
  {
    cout << setw(10) << "Time";
    cout << setw(2) << "A" ;
    cout << setw(2) << "B";
    cout << setw(2) << "F" << endl;
    while (true)
    {
      cout << setw(10) << sc_time_stamp();
      cout << setw(2) << A.read();
      cout << setw(2) << B.read();
      cout << setw(2) << F.read() << endl;
      wait();    // wait for 1 clock cycle
    }
  }

  SC_CTOR(mon)
  {
    SC_THREAD(monitor);
    sensitive << Clk.pos();
  }
};

and a clock declaration sc_clock TestClk("TestClock", 10, SC_NS,0.5);  in the sc_main
the output contains results from time 0
but when the positive edge of the clock is delayed for 1 ns (i.e. sc_clock TestClk("TestClock", 10, SC_NS,0.5, 1, SC_NS);) the output starts from time 1 ns.
This is logical as the first trigger of the process is delayed until 1 ns.
The question is isn't the simulation kernel supposed to run all the processes once at time zero!
According to this the results are supposed to start from time 0 in both cases. what am I missing here?


texts: Digital switching of high voltage analog signal

texts: I need to switch a 70 Vpp analog signal from a low voltage (1V8 or 3V3) digital output. The analog signal may or may not be isolated. What is the easiest and/or cheapest method?


texts:
I designed a unity gain low pass Sallen key filter with equal resistor values of 10k and capacitors of 8nF. The cut-off frequency to my knowledge at the -3dB point is defined as:

\$f=\frac{1}{2\pi\sqrt{R1R2C1C2}}\$

Upon simulation the cut-off designed for, which is 2kHz is at the -6dB point. Is this formula defined for the -6dB point since this is a second order system? I'm confused.

Circuit:

Frequency Response:

Cut-off is at -6dB.


texts: Ground plane has low impedance or inductance? This causes no ground bounce?

texts:
The ground bounce is effect that ground rises due to inductance in the ground lead.
https://www.eetimes.com/document.asp?doc_id=1255019

It is said that ground plane has low impedance, for that reason there is less electrical noise (so less ground bounce!)

But It was inductance that leads to ground bounce, and not impedance?
Can any one explain me this contradiction?

Thanks!


texts:
I have a USB 3 Type A (i.e. 9pin connector) connector on my PC and connected to a USB 3 Type A connector on my PCB with a USB 3.0 Cable. This USB3 A Type connector on my PCB is connected to FT232H chip. It means i am having USB 2 Communication between that connector and FT232H chip. My question is : is it possible to get 900mA Current from the Pin1(VBUS) of that USB Connector. Currently VBUS(5V) from that USB Connector goes to FT232H chip and 2 DC-DC Regulators. These regulators are used to make 3V3dc and +/-2.5Vdc power supplies for use among the various ICs on the PCB.
In case it is not possible with the above setup, what can be done to get maximum current out of VBUS Pin.
Thanks


texts: Why does LED use larger cathode and smaller anode?

texts: The P-N junction of LEDs is always placed on the cathode, which is larger than anode. Is this design of performance concern or just a historical choice?


texts: Recently, I harvested a fist-size electric motor from an old portable space-cooler (an air-conditioner on wheels).  The motor has nothing written on it at all; brand nor specs.  It has 5 (five) coloured (grey, black, yellow, red & blue) wires.  I'd love to power it up and use it for some project - a mini-wood turning lathe for example.  With absolutely no information on the unit, is there a safe way to test the motor based purely on the color-coded input cables?


texts: Impact of PFC output impedance on the regulation of a converter

texts:
I have determined the transfer function of my converter operating in closed loop configuration. Nevertheless I saw on the web that the transfer function is not the same if my converter follows a PFC. This refers to the Extra theorem element and the Middlebrook theory. A correction factor must be applied to the transfer function of the original converter to obtain the transfer function of the converter with the PFC. It depends of the output impedance of the PFC and the input impedance of the converter. I would like to know if it is possible to find the output impedance of a PFC. It seems possible to find to me the output impedance of a boost with the PWM average switch model but it seems to me difficult to find the output impedance of a PFC as the PWM average switch model is not defined and must be complicated to find as it depends on two loops? Isn't it? So do you have an idea to approximate the transfer function of my  converter with a PFC "attached" to it?
Have a nice day and thank you for all you ve done :)


texts: Low Power Toroidal Conductivity Sensor Inconsistent Values

texts:
I have been trying to build a low power toroidal liquid conductivity sensor using the principle given in this image.
This link has more information about the principle behind the sensor.
What I have done so far -

For the AC analyzer voltage, I'm using a Wien Bridge Oscillator circuit built with an op amp. [Sine wave of +-3V/6V peak-peak, 4kHz frequency]
Using ferrite core toroids with approx. 50 turns for both the drive and receive coils. These toroidal inductors are placed in a sealed plastic enclosure.
I'm connecting the pickup coil voltage across a 100Ohm resistor and amplifying this voltage using an instrumentation amplifier for a gain of about 50 times. [AD620] Then the output from this amplifier goes to my scope where I monitor the AC RMS value.

I have attached the schematic for my AC analyzer.
My problem -
I have two test solutions prepared by dissolving common salt in tap water. One that reads 1.160g/ml(1) and another 1.179g/ml(2), I measured this using a hydrometer. Now when I immerse the sensor into the liquids the voltage value shoots up compared to when in air as it should. I was reading 230mV RMS for solution(1) and 280mV for solution(2). After a few more tests I noticed the reading for solution(1) shot up to 280mV and that for solution(2) went down to 260mV. Every time I pull the sensor out of the solution and put it back in the same solution values seem to fluctuate by +/-5mV around a certain value.
What potential fixes I have read about from other threads-

Increasing analyzer drive voltage frequency to 84kHz?
Using Supermalloy toroid cores instead of ferrite.
Using mumetal between the toroids for eliminating crosstalk.

I would like to know what is possibly causing these inconsistencies and maybe in what direction I need to proceed in to increase the repeatability of my sensor values.
Any explanation regarding this issue would be very helpful. Any explanation regarding the general theory about these sensors would be very useful as well.
If anybody has built a Toroidal Inductive sensor before then please share your thoughts and experience with me, it would be extremely helpful to me.
Schematic-

EDIT: Photos of PCB, Toroid Enclosure and Connecting wires.

The wires I'm using appear to have some shielding of some sort but they are not a twisted pair.
The readings I have recorded. Notice how the value for concentration 7 solution fluctuates quite a lot. This happens quite a bit. Sometimes if I give them a move it returns to something closer to the original value.


texts: 2.2K Resistors on Microchip Data Input Lines

texts: I've just been dabbling for the first time into circuit design with microchips and I noticed a lot of designs put 2.2K or 4.7K resistors on some input lines.  I get that this is to limit the potentially damaging current but I don't quite get the math and how it relates to a data spec sheet.  For example, the chip AD9984A by Analog Devices has a SDA & SCL pin input for I2C communication; and the data sheet says it is for 3.3V CMOS and Logic High Voltage min is 1V and Logic Low Voltage Max is 0.8V w/ high Max current of -1uA and high Low current of 1uA.  When I look at a PCB utilizing this board there is a 2.2K resistor to each of those inputs from the pin-through for the I2C device.  Say the I2C device is 5V signals, how is the 2.2K resistor protecting the line and guaranteeing I will still fall in the spec parameters, mathematically? Thanks in advance!


texts: What is the influence of the DC voltage of an inverter on the control of a PMSM?

texts:
I am developing a FOC controller for a PMSM (in blue).
The outer loop (speed control, in orange) is made with a PI.
The inner loop (current control, in green) as well.

Now I'm including the inverter (in yellow) between the current control and the plant. However, I'm not sure how to appropriately set the DC voltage level. If I'm not wrong, this value must be at least twice the voltage sent to the inverter from the current control.

Secondly, the voltage sent to the plant (either with or without the inverter) should be only in function of the motor parameters and speed. However,  once I add the inverter, the DC voltage also plays a role in the voltage coming out from the current controller. Why does that happen?

Thanks in advance.


texts: Determine I through load resistor in circuit with diodes in series

texts:
I'm trying to find an expression for the current through the resistor \$R\$ when the AC-source is at max voltage of 5 volts.

\$U_T\$ represents the voltage drop across each diode.

\$R_D\$ represents the the internal resistance of each diode.

As you can see on the picture, I'm wondering how the expression for the current \$I\$ through the resistor is derived?

Now I got the wrong answer if I said that after all the voltage drops the voltage is zero, therefore I'm trying to understand how the formula on the picture has been derived.


texts: One solved example in transmitter power?

texts:
We have a one 1 MB file that in 1 second moved from 1 MHz channel with 60 dB attenuation. If the density of power to noise is -174 dBm/Hz, the transmitter power is equal to 1 microwatt.

  My question is how this value is calculated? Any idea?

Update 1:

I add my note messy solution. Please help me understand what is this step and how the numerical value is calculated.


texts: I have an 0-10V analog input channel that I would also like to measure 4-20mA sensors. I have added a 500 ohm shunt resistor I can jumper in when I am using the 4-20mA instead of the 0-10. Can this be done and is it the best way to do it? Thanks


texts:
I am working on my senior project. As part of my project I need to use a metal detector. I am using the following circuit schematic.

The principle is based on the properties of inductor coil:

$$L=N^2\mu \left(\frac{A}{l}\right)$$

Where \$N\$ is number of turns, \$\mu\$ magnetic permeability, \$A\$ is area of the coil, and \$l\$ is the length of the coil (if you think of coil as cylinder, l is its height).

Once a metal object is placed near the coil, it behaves as a core for the inductor, and the \$L\$ changes, it becomes:

$$L = L_{air}\times\mu$$

Hence RLC circuit frequency and the following sound produced by the speaker changes as well. When I set up the circuit, I have used a small inductor about \$1\space\mathrm{cm}\$ in size which was \$10\space\mathrm{mH}\$, as it was specified in circuit (there are different variations of the same circuit with small differences), it was detecting the metal, but the range was very small, at most \$1\space\mathrm{cm}\$.

I researched how I can improve the range (not in academic articles, because I could not find anything specific, would be happy to hear suggestions from you) and read that area of the coil is very important, so I calculated and came up with \$100\space\mathrm{m}\$, \$150\space\mathrm{turns}\$, \$10\space\mathrm{cm}\$ in radius, and \$2\space\mathrm{cm}\$ in length coil.

I bought the wire, and wanted some appropriate round shaped object for that. I went to a place which cuts figures from acrylic, and got this:

Now when I connect it to the circuit, sensitivity is even less. I can't get the reason, possibly because of the magnetic properties of acrylic, I tried to look in internet, but the datasheet provides just the electric properties.

Now I am stuck, I have heard that people got \$40\space\mathrm{cm}\$ range, which is more than ok for me. I don't have time to build a different detector. My questions are:

Should I remove acrylic layer?
How can I increase the range? (I have different resistors and capacitors, and a potentiometer, which I can use, but I doubt that they will help with sensitivity, any offers for increasing range are ok)
I am using 9V batteries and they discharge very fast, how do you think what might stand behind it? Sometimes I use potentiometer instead of resistor, and try all values. May it be due to very low resistance?


texts:
I'm doing a home automation arduino / RFID project and using a 12v DC switch mode power supply to power it.  This supply will be plugged in to a wall outlet. The project however will have some components inside the wall in a plastic project box.  It's an electronic dog door that goes from the inside to outside of the house through a wall. I live in an area with 'critters' that I don't want coming in the house.

When I power the project with battery everything works great and I get really good read distances from the rfid tags.  13 - 18cm depending on the antenna I use.

When I power it from the DC wall supply it barely reads at all. I practically have to rub the tag against the antenna and sometimes that doesn't even get a reading. I don't have a scope to see what's really happening in my power, but it seems pretty obvious that the switch mode type supply is noisy enough to mess up the 125khz rfid signals.

When I connect my circuit's GND to the 3rd prong ground on the wall socket my read ranges go back up almost as good as with the battery. Maybe 1 - 2cm less.

I have a 2-fold question:

Q1: My house was built in the USA in 2015 and has 3 prog wires everywhere. That should mean that all my ground wires are true ground, correct?  They shouldn't be connected to the AC neutral wire?  Are these are connected to earth?

Q2: My project will be installed in a wall in my house and there is a nearby outlet. Can I / is it safe to run a ground wire from that outlet to the project box (inside the wall) to ground my project circuit? OR is there another better way to properly ground the project.

[Update 2 - What I did] I don't feel that my question about safe grounding was answered. Everyone tried to solve a problem in my circuit, which I had already solved by grounding. I couldn't make power cables shorter but I did twist them as suggested. I added a grounding wire and attached it to some sheet metal that goes around the outside of the house. My read range is acceptable.

[Update 1] As requested here is a photo of the project on breadboards:

Vcc and Gnd from the power adaptor go to the black breadboard and are distributed to the Arduino Nano and the reader module. The black jumper wire on the left is the one I connect to wall ground to improve read distance. The orange/blue jumpers are RX/TX to the reader. The grey jumper cables go to 2 antenna tuning capacitors in the back. This is per the rfid reader board's manufacturers instructions. Green/Blue go to the antenna.  There is also a PIR motion sensor in the back but it isn't affecting this issue as removing it makes no difference.

Also to clarify something. I can completely remove the arduino and only connect power to the rfid reader board. Isolate that one component. By attaching an LED there I can see when it reads a tag. Same results are happening even when that board is used alone: battery power = good read ranges, dc supply = bad ranges or no reads at all, dc supply with gnd connected to house ground = good read ranges.


texts: Altium buses between sheets on a flat design

texts:
I have a really big design to do and I'm having a rough time with buses. I have several doubts I hope someone can help me solve.

Can I take a bus between sheets using an Off-Sheet Connector? For example:

Can I make a bus containing differential pairs? (And take it to another sheet using an Off-Sheet Connector)
I have tons of differential pairs and I'd like to avoid using so many individuals Off-Sheet Connectors.

Thanks in advance!


texts: I'm not real versed in electrical circuits, I have an idea on making portable 12v electromagnets with 18650 cells. I'm not sure where I should start looking on making a safe and reliable circuit. my original idea was to use four cells in series to a pcb and then a buckboost to drop to 12v to run the electromagnets. is this a viable option, if not what should be done differently? thank you for your time.


texts:
I want to use some metal halide lamps (5-7*150W) to get some decent lighting in my room.

Unfortunately, inductors for these lamps have weight about 2kg each. I cannot accept 10kg of metal hanging near the ceiling :-) So I must go with electronic ballast, but their cost is about 100 bucks per lamp. Forking out 500 bucks does not sounds good.

So, I am thinking about making 5-channel electronic ballast for these lamps. While basic idea looks simple (just make constant current supply), the main problem is ignition.

Is it possible to avoid HV ignition by feeding RF signal into lamp, so that discharge would start just like in induction lamps, and after some time turn on the current?

And finally, do I still need alternating current direction in the lamp? If yes, how fast it should change?


texts: Why do engineers usually short ground and negative ports on a DC power supply?

texts: I'm fairly new to electrical engineering, and have seen many DC power supplies where someone has shorted the ground (green) port with the negative (black) port. From my understanding, the ground is there to serve as a reference when connected to another piece of equipment's ground so that the reference voltage is the same. Why then would ground and negative be shorted?


texts:
I have a problem with a low noise amplifier because I can't find in ADS(Advance design system) software how to integrating under the are of a measured curve in a specific frequency range.Can someone help me how I can achieve that?

Figure 1 shows a paper result and how the noise measured and Figure 2,3 shows my results.As we can see the measured values for the noise is approximately the same but I would like to integrate under the are of a measured curve from 10Hz to 98kHz to find the total input referred noise and I don't know how I can do it.Also, I had searched a lot on the internet and I didn't find something useful.Can someone help me?


texts: What is the voltage value measured by an 8-bit ADC chip showing a binary reading of 64? the reference voltage is 3.3V

texts:
I followed the explanation in this post.

I did 3.3 V/256 = 0.01289 V .

I also did 3.3 V/(256/1.5) = 0.01964 .

And lastly, I used this formula:

I just keep getting the wrong answer! Please could you explain it too because my professor gave us a general explanation about ADC without any formulas, and I have done my researches but still confused since I keep getting the wrong results!

Any help would be appreciated!


texts: Framing error on Rx line in rs485 to ethernet converter

texts:
I have a device connected to MOXA nPort 5150 via 4-wire rs-485 cable. Termination resistor inside the converter was set to 1 kΩ (another option was 150 kΩ, which didn't work at all - I got framing errors on both sides) and now I have a correct signal on transmitting lines (my device properly reacts to commands).

Unfortunately, the data that is sent back from the device to converter is corrupted. I constantly get framing errors with parts of data intact. For example I shoud get 18 bytes of data:

30 30 30 30 30 30 30 31 30 30 30 30 30 30 30 30 30 0d 00

And I get 17:

30 60 30 30 30 30 30 31 04 02 82 02 06 02 02 82 0d 00

Incorrect serial port settings obviously aren't the reason (as I can transmit data to the device correctly). It is also highly unlikely that there is something wrong with the cable (I was able to connect another converter using the same cable and it worked, it was ATC1000 rs485 to ethernet converter).

Also, when I connect Rx lines to Tx lines (in a loop) the signal is passing through without problem.

I considered adding bias resistors to receive lines. I'll try it and see what happens aanyway, but it'll take some time. Meanwhile I wanted to ask:

Is it possible that ATC1000  converter has bias resistors implemented internally, and MOXA5150 doesn't,  or rather MOXA has it implemented only on transmitting lines? Or can there be another reason for this problem?

EDIT:

After adding bias resistor on receive line, signal is a little better (less framing errors), but is still corrupted.

Using shielded cable doesn't change anything.

Surprisingly, another MOXA device, UPort 1150 (which has bias resistors embedded) behaves in the exact same way (Transmision gets through without problems, receive signal is corrupted). This converter works correctly in other cases (with different devices). The third converter I have (ATC1000, not MOXA) still works correctly with my device...


texts:
can anyone tell me the verilog coding and simulation for this design using modelsim software..i had tried a lot by the following coding but i can't get the correct result..please i need it for my reference.

module SD_L(in,clk,rst,q,out);
  input in,clk,rst,q;
  output out;
  reg out;
  wire k1,k2,k3;
  assign k1=in||q;

  SD_dl m1(.enable(k1),.q(k2));

  assign k3=k2&clk;

  always@(posedge clk)
  begin
    out<=q;
  end

  SD_dff m2( .d(in),.clk(k3),.rst(rst),.out(q));

endmodule


texts:
hello,I am trying to do that electronic diagram in the tinkecad. This diagram is a NOR Gate circuit.
What I did is this
Can you tell me what I have done  wrong ? The second image is what I did,but I don't know what is wrong with it..


texts: How to power a 12v outdoor project with microprocessor?

texts:
Forgive me if this is a really basic question, but I'm still at the "consideration" stage of a basic LED project, thinking about lighting up one of those flexible LED strips from a microcontroller such as an Atmel AVR.  But it'll be an outdoor gadget so it'll need to be run from batteries.

I've seen other questions specifically using car power and how to get a lower voltage from that, and other questions starting from a 3V supply and boosting it to 12V, but I'm not even sure which of those I want.  Which would be better, starting from a 12V battery source (either 2*6V or even a real car battery?) and dropping it for the microprocessor, or starting from something lower (like AA batteries?) and boosting it for the lights?

The lights apparently need 12V, and the back of my envelope says they'll draw around 1A, which sounds a lot, multiplied by a few hours (say 3 or 4), so it seems that's far too much for AAs unless I connect a few handfuls of them.  Also it would be nice if the batteries could be recharged easily (and I've no idea how to do that with a car battery!).

At the moment I'm assuming that getting the microprocessor to switch the strip(s) on and off is a separate problem, I'm just at the stage of thinking about the power, the two separate voltage levels, and whether the whole thing is feasible or not.  Any help would be very welcome!


texts: Two reset sources for the CD4017 are interefering

texts:
I have a CD4017 counter configured so that any of its outputs can be connected to the reset pin. I also have a manual reset button connected to the reset pin, and this switch is buffered by a Schmitt trigger.
The problem is that the Schmitt trigger holds the reset pin low and any CD4017 output connected to reset pin is not able to drive it high and trigger the reset.
I tried adding a resistor in series with the Schmitt trigger output, but this only reverses the problem... the CD4017 output overpowers the reset pulse from the Schmitt trigger.
How would you suggest solving this problem?


texts:
I am taking an electrical engineering course as part of my computer science degree and we are talking about how a computer performs math computations only using addition. I understand this because multiplication is a series of additions. Subtraction is like adding the negative value. To do subtraction you have to find the two's complement and then perform the addition. I started getting lost when we got into binary math using signed numbers. I think I understand how to perform multiplication using signed numbers - I think you find the two's complement of the negative, multiply, add, find the two's complement of the result and append the sign bit accordingly. Binary division with signed numbers I don't understand well.

For example,

1111 / 0101

These are signed numbers so the decimal equivalent would be -7 / 5. The answer would be -1R2. If I convert that to signed binary numbers wouldn't that be 1001 0010? So to get there I would have to do 111 - 101 = 010. However, 11 could also be -1, so would I back fill 1s and get 1111 0010? Another question, is about that subtraction - doesn't that need to be changed to addition? If so, wouldn't the problem become 111 + 011 (the twos complement of 010)?

The more I look at it, the more confused I get. Any help would be appreciated.


texts:
I was looking through a datasheet, when I noticed this sentence:

  TSOP package is suitable for cards, and reverse type TSOP is also
  provided.

What is a "reverse type" TSOP? I am familiar with TSOP packages.


texts: Need some help identifying this component

texts: One of my remote controls died recently. I'm trying to find the problem component on the board and I believe this is it. However I'm not sure what this component type is called, and more importantly, where to find another one. Help identifying it would be much appreciated!


texts: On the XMEGA384C3, is it possible to use PORT A and PORT B for General IO digital pins? On the datasheet it saids that the pins are for analog only.


texts: ARM NXP LPC1114 current sink source capabilities

texts:
Can anyone help me to find out the limits of NXP LPC1114 GPIO current sink and source capabilities?

After reading the manual and the product datasheet I could not find this information anywhere. Also searching on Google I could not find anything.

All I could find is information about the high current sink capabilities of I2C pins.


texts: Styrofoam cooler/chest ok for electronics project?

texts:
I'm building a DIY power supply using 6 server power supplies. I've been looking for a case/enclosure to hold them and the necessary wiring and came across a styrofoam cooler that's the perfect size called the Chill Chest (https://www.amazon.com/dp/B07874GXQ5/ref=cm_sw_r_cp_apa_i_xnK4CbE96SDPC). Is this okay to use for this project or is static electricity a problem even if there's nothing constantly physically rubbing to generate it? If the latter, to eliminate static electricity can I cover the interior with a none conductive material like rubber (maybe spray it with a spray rubber like Plasti Dip?)?

P.S. - Of course I would cut holes for fans and ventilation.


texts: using ANSI C libraries for STM32 programs

texts:
In the internet, I often find examples of the source codes for programming STM32 MCUs at register-level. Strangely, some of those source codes include "#include < stdint.h >". In general, is it possible to include ANSI C libraries in the source codes for STM32?

Here is an example of such a C project.


texts:
I need help identifying the following chip. Appreciate any help that I can get.

Here are the markings:

23BX010
3S6538
  1348

If anyone can identify the logo that would be good as well.


texts: Does a capacitor connected directly to a battery consume any energy?

texts:
In this example

simulate this circuit – Schematic created using CircuitLab

After the initial charging of the cap to 3V, current gets blocked, but over time does it consume any energy from the batteries?
Is this safe to make?


texts:
I would like to run 3 circuits and turn them on based on a frequency input from an audio source. I would like to turn on a circuit at a mosfet gate for example with tone A at 100Hz tone, B with 1kHz, and C with 10kHz.

I this this may be possible with 3x band/low/high pass filters of some find but in my modelling I seem to have residual talk from the different channels/frequencies.
Is there a way to achieve this with simple analog electronics?


texts: Micro USB Type B Receptacle Mounting Holes Near Pads

texts:
I noticed a few libraries, in their micro subtype b footprint designs, include round mounting holes very near (touching) the pads. In Eagle, these end up giving me dimension errors. I tried researching this on the web, but I could not find anything specific about this.

Can I safely ignore these errors? Should I edit the part and remove the holes? What is the reasoning behind adding those?


texts: How Can I Calculate Total RMS Value From One Pulse?

texts:
I tried to solve this myself, but I'm forced to beg for help.
I have a very short waveform, too short to resolve accurately on my scope.
When I expand the waveform, the RMS of one complete pulse is 6.6 Vrms, 0.000 001 2 seconds long.
What would the RMS be if the time period was extended to 0.000 254 seconds long (with the same single pulse)?
Seems like it should be a simple calculation, but I can't seem to make it work. I searched the web for a calculator, but no joy.

The answer appears to be as follows...
A 6.6 Vrms 0.0000012 second pulse, in a 0.0000012 second ( 833,333.33 Hz ) time period would be 6.6 Vrms because the pulse fills the time period 100%.
A 6.6 Vrms 0.0000012 second pulse in a 0.000254 second ( 3,3937 Hz ) time period
should be approx 0.399 Vrms.
Is this correct?


texts: How to tell whether a motor is an AC or DC motor?

texts:
I watched a youtube video http://www.youtube.com/watch?v=hT3jJRGVdW4
The man says : by spinning the motor to see whether the output is AC or DC, then it can tell whether the motor is generating AC or DC voltage. It also tell whether the motor is AC or DC
==== What I think is below===
What I think is that "For a DC brushless motor, there is a permanent magnet rotor. If I spin the rotor, the current at the stator should be AC."
Now, if we talk about normal DC brushless motor spinning, we need to provide DC power (as power source) to the motor. That means the motor itself should have a circuit to convert the DC voltage to AC voltage to change the magnetic field at the stator to spin the rotor.
If there is a circuit to convert the DC power input to AC power to really spin the rotor, why the youtube video shows the circuit could reverse AC voltage (generated by the guy moving the rotor) to DC voltage for voltmeter measurement
===========
Then it goes to two questions
Does the youtube video right?
Do the built-in circuit in the motor allow backward voltage convention? What is that circuit?

Here is a transcript of the relevant part of the video:

The first thing that you need to know is that only DC motors can be used as a generator. So that makes this a really easy test. So we're going to connect our pins up to our multimeter, and then we're just going to lightly spin the shaft. Doesn't really matter which way we connect it. We've got the multimeter set to 2 volts. I'm going to spin and you see I'm spinning it clockwise and we get a positive voltage about 1.5 volts if I spin it really fast. If I spin it in the opposite direction I get a negative voltage at about the same amount. I can actually spin it really hard and get past 2 volts. This means this is a DC motor. So now we can move on to figuring out how to drive this motor and whether or not we can use it for some cool project.
I don't know the operating voltage of the motor, but I'm going to assume with a motor this size that it's either 9 or 12 volts. Most DC motors have a faily safe operating range. I've seen 5 volt motors be listed as 3 volts to 6; sometimes to 3 volts to 9. So even if this is a 9 volt motor, I'm going to, in the next video, connect it to a 12 volt power supply and we're going to see if we can drive it. And you know what, if we smoke the motor, it doesn't matter.


texts: How is the feedback estimated in the torque mode control of a servo motor?

texts:
The torque mode control of a servo motor requires the feedback of the current torque generated by the motor in order to compare it against the torque reference signal.

Is the product \$K_t I\$ of the torque constant \$K_t\$ with the measured (perhaps filtered to denoise) motor current \$I\$ the only method to estimate the current generated torque in real-time? Additionally, is the position-velocity-current cascade control loop schematic shown on the linked webpage in error, since it does not explicitly illustrate the torque feedback? Finally, if the schematic is indeed accurate, then is it correct to say that a motor can be run in position mode or torque mode at a time and not both at the same time?


texts: Adding Wifi+ Micro-controller to a device in an economical but production-able way

texts: Is it possible to reliably and economically add Wifi+ Micro-controller(for very simple logic and GPIO) to a non-moving device? I see some wifi soc in the market too. are these a viable options? I am hoping that the wifi+logic won't cost more than 5$ or 6$. Is this event possible?


texts: Why is the split termination method required for the CAN bus?

texts:
I wanted to know how the split termination is implemented for the CAN bus. How does it help one to reduce EMC problems?

What happens if we don't have a split termination? It would be great if I also get the explanation for biased split termination.


texts:
In an inductor, a current waveform 90° out of phase with the voltage waveform creates a condition where power is alternately absorbed and returned to the circuit by the inductor. If the inductor is perfect (no wire resistance, no magnetic core losses, etc.), it will dissipate zero power.

I wonder how this will change in the case of transformer. Suppose the primary and secondary coils are of zero resistance and the core is perfectly ferromagnetic, what should be the phase different between the voltage and current in the primary coil? Power is delivered to the secondary circuit so it should not be absorbed by the primary voltage source as in the case of pure inductor.


texts:
My question will sound really basic and simple, but I have never clearly understood what a capacitor does. I know that it is supposed to store energy, but I never understood its purpose in a circuit. I would love a clear explanation (not just mathematical formulas) because I'm really struggling in electrical courses. I want to understand its purpose, what it is doing in a circuit.
For example, why does it turn the circuit to a low-pass filter here:

And why does it become a high pass filter if we swap the capacitor and the resistor? Also, why does it "act as an open circuit at low frequencies" ?
There are several concepts that I'm not really getting concerning the capacitor.
Is there any simple explanation to all my questions?


texts:
I want to improve my rowing machine by making it connected with a RPI.
I know it counts every pass with this little guy:

But I’m wondering how it works (and why it has two pluses).
I’m pretty sure it’s a magnetic sensor but that’s all I know!


texts: Building an RSSI map for an indoor positioning system

texts:
As I study so far,
Indoor positioning mechanisms are built with two approaches:

Trilateration, triangulation:
Directly calculate/compute position with signal fading/RSII data which mobile device detect.

Fingerprinting:
First training the system with "this point:these RSSI values" to save "fingerprints" then, on online mode, look at the RSSI data and compare it with the existing data/fingerprints

To build a more accurate positioning system which gets its power from calculating/computing,
I imagined:

To consider a floor plan/map on a plane

Modify the map/plan with knowledge of signal interference coefficient of the materials of the walls and any rigid constant objects.

Build a 3D model of the RSSI distribution of predefined signal transmitters.

Is it too imaginary?
What kind of difficulties may I run into?
With a perspective of science of automation, is it too scratchy?


texts:
Looking at the datasheet for the LM1117 regulator, on page 18 to 20 there's a table of various layouts for copper cooling planes for the LM1117 in SOT-223 and TO-252 packages. Comparing figures 30 and 31 to table 2, I see a number of discrepancies:

for layout 6, the one with the lowest thermal resistance, the table gives upper copper area \$1\textrm{in}^2\$, and 0 for bottom. However, the figures show no copper on top, only on the bottom.
layout 2 has top copper area \$0.066\textrm{in}^2\$, 0 on bottom, and has thermal resistance of \$87 ^\circ \textrm{C}/\textrm{W}\$ for the TO-252. Layout 12 has the same pattern repeated on top and bottom, giving a thermal resistance \$89 ^\circ \textrm{C}/\textrm{W}\$. How can the thermal resistance increase when adding more copper to cool?
On page 4, section 6.4., the table Thermal Information gives a junction-to-ambient thermal resistance \$45.1 ^\circ \textrm{C}/\textrm{W}\$, which is smaller than that reported for any of the layouts on pages 18 to 20. While this table doesn't specify for what layout/heatsinking this is, the footnote on the immediately preceding table says "All numbers apply for packages soldered directly into a PCB." Isn't this a contradiction?

So, my question is: am I seriously misreading/misinterpreting/confusing something here, or is the section in the end of the datasheet full of errors? If it's the latter, where can I find more reliable data to make sure I have enough cooling for my regulator?


texts:
I would like to create a variable duty cycle PWM on a PIC18F4550 microcontroller to control the gate of a MOSFET in a project I am doing.

I am new to microcontrollers but already have code that can generate a PWM signal. I would like help figuring out how to do two things.

How can I change the duty cycle step by step (i.e. 10%,20%,30%....100%), increasing the duty cycle each period of the PWM.
How can I change the duty cycle of the PWM based upon the press of an external switch.

I am programming in the C language and would appreciate some example code.


texts: MSP430F2272: Timer B Capture giving shorter measures than the real ones

texts:
I'm using:

CCS V8
MSP430F2272
DSO-x 2024A Agilent oscilloscope

Trying to measure elapsed time between pulses with Timer B, Capture Mode.

My square wave source is at 50 kHz and my timer_b clock at 1 MHz
(MCLK = 8MHz, SMCLK = 8MHz, ACLK = 1MHz)(code below)

P2DIR |= 0x08;
P2SEL |= 0x08;
TACTL = (TASSEL_1 | MC_1 | ID_1);
TACCR0 = 0x09;
TACCR1 = 0x05;
TACCTL1 = OUTMOD_6;

Source is as good as it could be... 50.001 kHz

P4DIR &= ~0x04;
P4SEL |= 0x04;
TBCTL   = (CNTL_0 | TBSSEL_1 | MC_2 | TBIE);
TBCCTL2 = (CM_1 | CAP |  CCIS_0 | CCIE | SCS);

To infer how many seconds have passed between events, the following formula is used:

(Over*65565 + Event_1 - Event_0)*0.000001

Where:
Over - Number of timer B overflows (how many times TBR has counted 0)
65565 - The size of TBR, defined by CNTL_0 bit
Event_1 - Value of TBR at the moment of the second event
Event_0 - Value of TBR at the moment of the first event

Below is presented my ISR:

__interrupt void Timer_B1(void)
{
    switch( __even_in_range(TBIV,14) )
    {
      case  0: break;                          // No interrupt
      case  2: break;                          // CCR1 not used
      case  4:
          TB_Pulse0 = TB_Pulse1;
          TB_Pulse1 = TBCCR2;
          TBCCTL2 &= ~CCIFG;
          if(TB_Pulse0){
              TBCTL = 0;
              SendXBee |= TRUE;
          }
          break;
      case  6: break;                          // CCR3 not used
      case  8: break;                          // CCR4 not used
      case 10: break;                          // CCR5 not used
      case 12: break;                          // CCR6 not used
      case 14:
          TBCCTL0 &= ~COV;
          if(TB_Pulse1)
              OverFlo++;                  // overflow
          break;
      default: break;
    }
}

As you can realize, from the code above, I'll only count timer overflows once the first event was been captured. When my second event is captured, timer b is turned off and I'll send data through UART.

My routine to send data, inside main, simply check the 'SendXBee', put all data through an XBee radio and reset 'Over', 'Event_1' and 'Event_0' variables.

Even this code looking fine (at least for me..) it does not work! Values read on the other radio give me measures about 1/10th of the real signal period.

Any suggestions?  (Yeah!! stop  working with embedded electronics.... just kidding)

Thanks everybody.


texts:
I have ported FATFS for Free RTOS on STM32F103 SPI Flash of 32 Mbit. In a demo Application I have successfully created a file, written a file, and read back from the file. My requirement is like I have to store multiple files (images) in SPI flash and read it back when required.

I have the following conditions/queries.

I have set the Sector Size to 512 bytes, and block erase size for SPI flash is 4K. As in the SPI Flash, block needs to be erased before written. Do I need to keep track on whether a particular block is erased or not or its the file System who is managing this?
How can I verify that the sector, which I am writing in erased or not? What I am currently doing is, Erase the Complete Block for the sector, which I am going to write?
How can I make sure, The Block for SPI flash I am going to erase will not affect any Sector containing useful data?


texts:
I recently ran into problems with my Tenma 21-10115 soldering iron.  The temperature was set at 355 C - which I've used regularly for several years know (low but frequent use).  This was the first time I've seen dramatic temperature fluctuations, at which point I power cycled the station.  Now, when I turn on the station, it is clear that the tip is heating up, but the temperature reads 40-60 degrees, bounces to 0, and otherwise is very erratic.  It's as if the thermostat has malfunctioned.
I replaced the tip with no change in behavior.  I removed the tip to inspect the heating element.  I don't know what a "good" heating element is supposed to look like but I don't see any significant signs of charring.  The connections do not seem to be damaged.
Removing the iron from the station, I do get the S-E error indicating that the station does not notice the presence of the tip.
About the only information I've found is this poor review of the iron on Newark's website:

I really like the 60 watt digital soldering station that uses these, however this part is the weak link of the system. While these heat up very, very quickly and have very long lasting tips - the real issue is that the construction is weak... they loosen, crack and eventually break in the handle area. I also had one where the temperature sensor failed almost immediately, and these were on back-order for the warranty replacement. Frustrating!

Based on that single data point, I may need to simply purchase a new iron. Any suggestions on how to proceed with troubleshooting and if this type of behavior could be expected from a $100 unit that is ~ 2 year old would be appreciated.


texts:
I've had a bunch of op amp circuits do research and find the transfer function of,  and this is the last one, does anyone recognise it? I've had a Sallen Key and an All Pass before, and wondering if this is a 'known' setup also:

simulate this circuit – Schematic created using CircuitLab

Looking at it I believe at low frquencies the LP filter on the non inverting terminal puts both to \$V_{in}\$ and the divider on the output gives an amplification of ~100. I believe it blocks any high frequencies.

Any input is appreciated.


texts:
I'd like to reuse a PCB in non-intended way and I have to remove the green solder mask to expose the copper traces in 1 x 3 cm area. Is there any safe method to do it without damaging the traces?

I've tried acetone first, then a bunch of other household chemicals, but it is resistant.


texts: How does the AXI-Interconnect know where to route the data?

texts:
Im interested in where exactly the Addresses (BASE_ADDR) set in the "Address Editor" of a Vivado Block Design come into play in the FPGA-Part. I have multiple Blocks with AXI-Lite connected to a Zynq via an AXI-Interconnect, which works fine. But i want to know how:

To my current understanding, the routing must be somewhere in the AXI-Interconnect-IP-Block, however i can not see how it knows where to route the bus as "Customize IP" shows nothing related to the Addresses.
It just seems to magically connect everything correctly...

So how does it work?

Edit: For clarification - this is how the part of my system looks like:

                       ______________
                      |              |---------- Block 1 (AXI-Lite)
                      |    AXI       |---------- Block 2 (AXI-Lite)
Zynq (AXI Bus) -------| Interconnect |---------- Block 3 (AXI-Lite)
                      |              |---------- Block 4 (AXI-Lite)
                      |______________|---------- Block 5 (AXI-Lite)

The Zynq itself is not relevant in this picture, there is just a full AXI-Bus on the left and multiple AXI-Lite-Blocks on the right, which can have Address-Ranges set in the "Address Editor" of Vivado.

Further clarification: I know how the lower bits of the address-lines are used to address single registers in AXI-Lite, but the Xilinx-Template doesn't seem to care about the higher bits, therefore my assumption that the addressing has to be done outside of the AXI-Lite block.


texts: Input filter on differential amplifier input

texts:
Hi, I need to determine the transfer function Vout/Vin. A traditional differential amplifier transfer function without the 2.2uF on the input side would be G1 = (Z2/Z1)*Vin, where Z2 = (2.2uF // 150kOhms) and Z1 = 450kOhms + 150kOhms . I am having some trouble to model de 2.2uF input capacitor. The output filter stage (Rout = 10k and Cout = 2.2uF) transfer function is G2 = 1/(sRC+1). The total transfer function without the input capacitor is G1*G2. How do I deal with the input capacitor filter stage (2.2uF connecting both inputs after the 450k resistor)?

EDIT:

I believe this is the correct transfer function for the input filter, it gives the 1/4 gain with some low pass dynamics Vout/Vin = G(s) = (1/4)*2.02/(s + 2.02)

Second stage considering only the op amp ( (2.2uF//150kOhms)/(150kOhms) ratio ): G1(s) = 3.03/(s + 3.03)

Output stage considering the RC filter: G2 = 1/(sRC+1) = 45.45/(s + 45.45)


texts: Can power theft on a large scale be stopped

texts:
Reading this article, I started wondering if there is any way to stop people stealing electricity from a power grid. Let me clarify, the only techniques I have seen (and can think of) is either to

rely on an honor system where you trust people not to steal and pay for all the power they consume
or have visual inspections where a power company just sends its people out they look for illegal hookups and then either just disconnecting them and/or legal action against the thieves.

For the second case, as the article says, power company employees cut the hookups and then the hookups are back up again in five minutes and legal action of any kind is useless and hopeless thanks to massive corruption at all levels.

My question here is, is there any method or technique based on principles of electromagnetism/electrical engineering/grid designing that can prevent/minimize such theft or even detect such theft like where it is happening or who is doing it? Is there anyway to localize it and then cut only the thieves instead of an entire neighborhood including innocents who are not stealing at all? Can a power grid be designed (from scratch if needed) to help with this? Can at least the theft be made so difficult or expensive that it won't be worthwhile for people to steal it?

I understand that security of any kind is a difficult problem and no matter what the system, there is always a way to break it. But in this police/legal action is absolutely useless so how can power distribution be made secure enough that it is beyond the scope/ability/affordability of an average citizen to just brazenly and easily steal all the power they want. Thank you.