texts: Using two Arduino dimmer's on two lamps using one eletrical grid

texts:
I'm following a tutorial to build this dimmer module. After testing it with a lamp, everything worked well. Then I tried to move forward, making two dimmer modules to control two lamps.

I'm making all tests at my house, i.e., the same eletrical grid is shared by all wall plug and therefore both dimmers and lamps are working at it.

Then, the problem: If I connect one lamp at a time on the power, everything works well. But then, If I plug both lamps at the same time, things start to get weird. One lamp turns ON and OFF at a high frequency and the other one doesn't work.

I'm using all of these with an Android mobile, through a Bluetooh module.

And my questions:

a) If there a problem to use two dimmers on the same eletrical grid (I feel that the circuit loose the synchronism with the grid when both lamps are plugged)?

b) Can an Arduino control two dimmers at once (code below, which I'm using).

Thank you,

int result;

int AC_LOAD = 4;
int AC_LOAD2 = 5;

int dimming = 125;
int dimming2 = 125;

char incomingByte;

String numberReceivedInStringFormat = "";
int numberReceivedInIntFormat = 10;
int lastValidNumber = 10;
boolean notUsed = false;

void setup() {

  Serial.begin(9600);
  pinMode(AC_LOAD, OUTPUT);
  pinMode(AC_LOAD2, OUTPUT);

  attachInterrupt(0, zero_crosss_int, RISING);
  attachInterrupt(1, zero_crosss_int2, RISING);

}

void zero_crosss_int() {
  int dimtime = (65 * dimming);
  delayMicroseconds(dimtime);
  digitalWrite(AC_LOAD, HIGH);
  delayMicroseconds(8.33);
  digitalWrite(AC_LOAD, LOW);/
}

void zero_crosss_int2() {
  int dimtime = (65 * dimming2);
  delayMicroseconds(dimtime);
  digitalWrite(AC_LOAD2, HIGH);
  delayMicroseconds(8.33);
  digitalWrite(AC_LOAD2, LOW);
}

void loop() {
  while (Serial.available() > 0) {
    incomingByte = (char) Serial.read();
    numberReceivedInStringFormat += incomingByte;
    if (Serial.available() == 0) {
      numberReceivedInIntFormat = numberReceivedInStringFormat.toInt();
    }
  }

  numberReceivedInStringFormat = "";

  if (numberReceivedInIntFormat < 10 || numberReceivedInIntFormat > 99) {
    numberReceivedInIntFormat = lastValidNumber;
  } else {
    lastValidNumber = numberReceivedInIntFormat;
  }

  result =  (int) (((-115 * numberReceivedInIntFormat) + 12275) / 89);

  dimming = result;
  dimming2 = result;

  if (notUsed) {
    delay(30);
  }

}


texts:
I am looking at the problem in page 5 of this document.
It is an example of KVL (Kirchoffs voltage law).

The circuit is as shown below -
.

I have 2 questions -

1) Why is the voltage -5V ? Is it because the polarities reversed ?
2) The sign convention in the 8 Ohms resistor is wrong as I assumed the current loop as shown below and the sign convention as stated in the diagram. The voltage across 8 Ohms is -12V. Is the minus sign because of wrong convention ?


texts: Photodiode draws current from op-amp input

texts:
I am trying to measure light intensity using a photodiode (S1336-18BQ) connected to an op-amp (LF412CP) in transimpedance amplifier configuration. I couldn't get it to work correctly, so I started searching for problems and have found something very peculiar: there is a current flowing from the negative input of the op-amp. The value of the current is the same order of magnitude as the short-circuit current of the photodiode under the same conditions (~1 µA).

simulate this circuit – Schematic created using CircuitLab
I have very little experience in analog electronics, but I understand that inputs of an op-amp (especially a JFET one) should have very high impedance. I have tried three identical op-amps to ensure that it is not just a damaged chip. Please forgive me if I am asking something obvious.


texts: In the PIC18F2550 datasheet, there is an example about how to dual Power it in the figure 17-12. I understand the whole circuit, I am just not sure why there is this diode after the Vself?


texts: How do Mosfets and potentiometers work together?

texts:
I am trying to control the speed of my motor with the circuit shown below:

The circuit works well, and I am able to control the speed. However, I don't understand why.

Here is my thinking now:

According to ohms law, V=RI, so when you change the resistance on the pot and you have fixed voltage, the current decreases.

I then assume that when the current decreases on a mosfet, then the voltage decreases because the angular velocity of a motor is directly proportional to voltage.

Is this correct?


texts: Why Don't PC Boards Act Like Capacitors?

texts: If capacitors are just two conductive components sandwiching an insulator, then why aren't all PC board, or at least their traces, considered capacitors?


texts:
I'm trying to control a stepper motor using transistors to switch the different phases (am I using the correct terminology?) on and off at the correct times. I'm going to use my Raspberry Pi to do this (only for testing/learning purposes).

The transistors that I am using are 2N5550 (datasheet). The stepper motor is a M42SP-5P (datasheet). So as far as I understand, the stepper motor needs 259mA for each phase? (If I'm incorrect, could you please explain why?)

The bit I'm struggling with is understanding how much current I need to supply the transistor's base with to get the required 259mA flowing from the collector to the emitter. I know I need a resistor between the base of the transistor and the Pi, but I don't know how much current I need to supply the base with to be able to work the resistor value out.

(The diagram above is showing only one phase connected up, but I actually have 4)


texts: I have an ispGAL22LV10C that I'm trying to program. I wrote and synthesized the VHDL in ispLEVER Classic, but I cannot seem to figure out how to create pin assignments. Documentation on this is kind of lacking, how might I go about this? I cannot seem to find this fabled "constraint editor" in my version (the latest). Thanks


texts:
I have an equipment which draws 550W at a constant level, no peaks. I want to power this unit with solar cells only during the day when there is light using a simple car battery. Because I don't want to invest in a expensive battery I put it down to run only during the day. How can I calculate the exact cell power I need and the controller. Battery is 63Ah/12V, would it be enough ?

edit:
Sorry, forgot to mention: 1. device run on 220V and i'll use power converter from 12 to 220. 2. I'll run the equipment as long as there is sunlight, summer hours are average is 10hrs a day winter average is 7hrs
Thanks,


texts: Trouble with connection to the terminals of this filter

texts:
Below is a AC power line filter with open terminals as shown:

I couldn't find any practical information about the proper correct way to connect the AC wires to the terminals of this filter. Should the AC cables/wires be passed through those terminal holes and crimped in a way or soldered? Does anybody have experience with such terminals?


texts: Is there an IC that will output randomly?

texts:
Recently I've started collecting those tiny arcades boxes, and found some information to wire them so they stay on the demo mode. This way they can be used as a decoration. Here's an example vid of what I'm going to do: https://youtu.be/kea0oIe023I.

Instead of having it run in demo mode though I want to have the two buttons and little joystick get random inputs. So far I haven't been able to find any little chip to accomplish this with. My idea would be to find a chip with 6 or so pins that output signals randomly, one pin at a time. Is this something I can find?


texts: What's the difference between SAI and I2S?

texts:
I'm developing a USB audio device using an STM32F407G-DISC1 evaluation board.

For the audio output I was intending to just use the I2S peripheral connected to a DAC. However the only sample code I can find uses an SAI module:

What is this SAI module and how is it different from the I2S module on the STM32F407?

Also, do I need an MCU with an SAI module for my USB audio output to work correctly or can I make do with I2S?


texts:
My question is this: Can I use a variable resistor to control the brightness of an LED?

I was originally planning on using a potentiometer and an MCU to control the brightness with PWM, but that'd be a bit more difficult :). So, could I just connect the LED straight to my batteries through a variable resistor to control the brightness?


texts: LTspice simulation problem - energy harvesting rectifier circuit

texts:
SO the circuit below is an approximation to an electrostatic energy harvesting system and device. Basically I want to observe the charging voltage waveform across the cap C3. In real life the cap charges in a few hours but I do not think LTspice likes completing that many iterations without converging on a steady state condition. It just either stops working after a while or gives a 'singular matrix' error (after the first iteration)depending upon the value I use for the cap C3.

Is there anyone that is handy with Ltspice that could tell me how to make it like this sort of transient analysis?

Perhaps this system just has too high source impedance for LTspice?


texts:
for example, if there is a case when an output "clear" is sensitive for both the negedge and posedge, do we write it as: always @ (negedge clear, posedge clear)?

Or is it impossible to have both sensitivities occurring at the same time?


texts: IXYS Solid State Relay Datasheet question (Snubber Diode Required?)

texts:
Here is the datasheet that I have a question about.
http://www.ixysic.com/home/pdfs.nsf/www/CPC1907B.pdf/$file/CPC1907B.pdf

It states in the Features List on first page.
"Arc-Free With No Snubbing Circuits"

Does this mean that I do not need to add a Diode in reverse Parallel with my load?
And it will be fine without it?
I am driving an Inductive Load. 12VDC Motor Brake. 2-3amps.

There are no example circuits in Datasheet.


texts: if, i want a Buck converter with 5.8A(output) in cc and 40V en cv(output), what is the value of the parameters Rin, Rsense and Rfb?


texts: Sharing ground and power across circuits

texts:
I'm just beginning with circuits, so pardon if this is elementary, but I couldn't figure it out.

I'm building a speaker joining several circuit boards together:

a trinket pro
a class d amp
an FM radio chip.

The trinket controls the class d amp and FM radio via I2C bus(sda/scl).

All these boards need connections to 5V power and ground. On a breadboard this is easy.

Currently, I'm making a rats nest of wires where I twist 2 or 3 wires into one and then solder them.

However, what is the best practice to create power rails and ground rails multiple chips can plug into? Should I be using a perfboard or other tool?


texts:
Is it ok to put the vias like that, help with something for a high current? The thickness of the route is 400 mil (200 on top and 200 on bottom). It is necessary to support ~15A. In the right corner the pad is smaller then the route, is that ok, i can put the vias in both sides?
What helps if i put vias on the power routes and GND routes?


texts: Given a circuit with resistors, op-amps, independent voltage and current sources, how do I solve the node voltages? Do I always assume that op-amps are ideal?


texts: How should I connect the RX and TX pins of an Arduino to a Bluetooth module?

texts:
I am working on an Arduino based Bluetooth controlled home automation using a mobile app.
When I power ON the circuit, it works fine but when I power it OFF and power it ON again I have to remove the RX and TX pins and reconnect them to make the circuit.
What is wrong?


texts: paralleling capacitors of diffrent value

texts:
I have a PI filter with capacitors  of  40uF feeding an oscillator that has a bypass capacitor of 0.01uF

I read on previous posts thats its a bad idea paralleling capacitors more than a decade apart. Anyone can tell me if I can run into problems with the above and explain why


texts:
I've set up this circuit on breadboard ( C1 being electrolytic and others disk) with Q1 as 2n3904. The simulation is perfectly fine and the oscillator works in the simulator as expected. However, the situation with the actual circuit is a bit different.

No matter what inductor L2 I choose, the frequency is always 210 KHz. I switched 47 uH with 4.7 and 10 uH; but its always 210 KHz. Even more disturbing is the fact that even if I remove some components from the circuit, ( I removed C1 and L2, not simultaneously though), and measure from L1, its still 210 KHz. To make matters worse, I just randomly waved the oscilloscope probe in air. and it still records 210 KHz ( I even put the probe on my head, and it seemed like my brain generates 210 KHz as well ! ).

So whats going wrong here ? And whats the deal with 210 KHz ?


texts: Floating Conductor Next to AC Power Source

texts: Let's say I have a conductive metal sphere connected to a 50Hz 1kVrms AC Power Source referenced to Earth ground. About 3cm away, there's an identical metal sphere suspended by a non-conductive material. Does the floating conductor gain a charge from an electric field from the source? What is it's approximate voltage against ground?


texts: What does this schematic do, simple MOSFET

texts:
I copied a part of a schematic from another project, I put it into a simulator and it seems like it does nothing. This is for a negotiation "protocol" where you tell a 18V battery that you are about to put it into heavy load.

This schematic should work, but it does not work in the simulator. My guess is that IC DP is a Attiny85 IO pin and BAT DP goes directly into the magic battery control. So this whole thing is just to switch 18V on BAT DP. But in my simulation it's constanly "on".

Q6 Datasheet
Q7 Datasheet
Attiny85 Datasheet
No information on the battery

So I am confused:

the schematic simply does not work
I made a mistake in the simulation
I simply don't understand what this does


texts:
I am looking at a couple motor drivers for a robot I am working on, but I have run into the issue of not really understanding spec sheets and knowing what specs I need to look out for to make everything work. Some of these come up easily on google and others do not.

So what are the specs to normally look out for when wiring up motors and motor drivers?

And what is logic voltage vs drive voltage? (L298n)

Number of channels? (L9110s)

Max continuous per channel? (L9110s again)


texts:
I am currently developing a circuit that 16 LDRs, 4 LM339N ICs and 1 PIC16F877A. I compare outputs of LDRs with an adjustable reference voltage. I achieved getting 0-5 V from LM339N. Now I send these values to 16F877A as digital inputs to check if one of them is HIGH. If I check only one value, it works well and I can get voltages between 0.12-5.01 V from digital output pin. But when I increase digital inputs to two or more, digital output gives 2.1 when it is low and 2.5V when it is high and it is not enough for me. I have tried defining;

TRISB = 0xFF;

TRISC = 0xF0;

TRISD = 0xF0;

reading values between RB0-7, RC4-7, RD4-7 and writing output to RD0. I have also tried neglecting ADC module and;

TRISB = 0xFF;

TRISA = 0x00;

reading values from RB0 and RB1 and writing to RA0. But no luck yet.

I am using 8 MHz HS crystal with two 22 pF capacitors. Pin 1 has a resistor with push button. PIC is supplied with 5.1 V from 11-32 pins and ground is connected to 12-31 pins. I don't have any prepared circuit diagram but if I cannot find any support from here, I can build it. I am using MPLAB X IDE v3.45 and PicKit2 for programming. The code is included below.

#define _XTAL_FREQ 8000000
#include
// BEGIN CONFIG
#pragma config FOSC = HS // Oscillator Selection bits (HS oscillator)
#pragma config WDTE = ON // Watchdog Timer Enable bit (WDT enabled)
#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
#pragma config BOREN = ON // Brown-out Reset Enable bit (BOR enabled)
#pragma config LVP = OFF // Low-Voltage (Single-Supply) In-Circuit Serial Programming Enable bit (RB3 is digital I/O, HV on MCLR must be used for programming)
#pragma config CPD = OFF // Data EEPROM Memory Code Protection bit (Data EEPROM code protection off)
#pragma config WRT = OFF // Flash Program Memory Write Enable bits (Write protection off; all program memory may be written to by EECON control)
#pragma config CP = OFF // Flash Program Memory Code Protection bit (Code protection off)
//END CONFIG
void main(){
    ADCON1 = 6;
    CMCON = 7;
    TRISB = 0xFF;
    TRISA = 0x00;
    RA0 = 0;
    while(1){
        if(RB0 == 1){RA0 = 1;}else{RA0 = 0;}
        __delay_us(5);
        if(RB1 == 1){RA0 = 1;}else{RA0 = 0;} // Works well when I comment this line.
    }
}

Also tried building if/else if/else structure, not working too. Thanks in advance.


texts: Are D-latches and D-type flipflops volatile?

texts: If there is a power cut to the CPU, will be registers clear or keep their memory?


texts: How is the lower voltage on a transformer calculated?

texts:
I was reading the data sheet for the LT8301 and laid on eyes on one of their example schematics.

The input range (Vin) in the example states 2.7V-36V, and even gives measurements for when Vin = 5V.  However, looking at the Sumida 12387-T041 inductor (T1) shows that the application voltage range on the primary size is 18V-42V.

Presumably allowing less than 18V (i.e. Vin < 18V) enter the transformer is fine, otherwise Linear wouldn't give this example schematic.

So this begs the question: how is the lower voltage limit calculated, and at what point does the transformer no longer functions (output power on the secondary becomes insignificant (I realize this is a bit ambiguous, but I can't figure out how to word it differently))?


texts: 35V LED power supply driving 11V LED - what happens to the "unused" power?

texts:
I have a bunch of 10W lamps (like this one) with incorrect power adapters for the emitters - the drivers are meant for a 1x9 configuration (35V, ~300mA), LEDS are 3x3 (~11V, ~900mA).

I am fine with running them at 1/3 power, for now.

Question: what happens to the remaining 2/3 (~23V, 300mA)? Is it radiated off in the driver (and is that a concern, like a short circuit might)? Or does the driver deal with that differently?


texts: Calculating minimum resistance such that Ic is less than or equal to the maximum Ic in BJT

texts:
This is what I have been given for the question. I'm confused on how to answer this question.

I thought this was calculated just by using ohm's law where R = 5V(supply V) / .3A(max Ic) = 18. However this seems rather low. If anyone can steer me in the right direction i would appreciate it. Thanks.


texts: How to tune a radio receiver using a crystal oscillator?

texts:
I'm building my first radio receiver (a simple Ramsey HR-40 kit). The "Alignment" section of the instructions requires that I have some other device which I tune my receiver to. Since I have no such device I plan on buying one. The cheapest option seems to be a crystal oscillator. However, how I would use this crystal oscillator to tune the receiver isn't very clear.

I'm assuming I would want a crystal oscillator in the appropriate range (for me a 7.2MHz one should be good). But I'm not sure what I'll need to do with it and what additional parts I'll need. Will the oscillator actually emit a signal that can be picked up by the receiver? Or do I actually need to add the oscillator to the circuit somehow? And what other circuitry will I need to drive the oscillator? Thanks!


texts:
I observe two identical PCB except the UL logo mark on them , one has UL mark but other don't.

What is the difference between them. why dont they print UL logo on both the PCB if both are same.


texts:
In my circuit, wt-32 gives 4 analog outputs(l+,l-,r+,r-). I want to connect them to a headphone jack. I thought of using 2 lm386 audio amplifiers as shown below:

Will this connection work? or Am I making some mistakes.


texts:
I used the calculator here: http://www.sengpielaudio.com/calculator-noise.htm to find the voltage of JN in a steel conductor, and it disagreed with the following calculation:

V=kTR= [1.38064852 × 10-23 m2 kg s-2 K-1][275K][resistance]

R=[pL]/A=[7*10−7Ωm*.001m]/[.001m^2 ]=.0007ohms

So inserting the R value of .0007 ohms into the V=kTR equation above results in the voltage being calculated at 2.6577484e-24V

The calculator in the first line says the scale is of 10^-9 or so which is very different from 10^-24. Which is correct?


texts: How to select Max. switching voltage and current of Relay for a LC resonant circuit

texts: I have a LC resonant circuit as the above shows. And I want to switch the inductor between L1 and L2 with relays (sometimes L1 is used and sometimes L2 is used). The high voltage point between the inductor and capacitor has a voltage about 400Vp-p, and the current in the inductor is about 10Ap-p. Could I think a relay with max. switching voltage no less than 200VDC and max. switching current no less than 5A is needed? Or how should I select a relay for this application?


texts:
I've been facing a weird situation and unable to find the reason behind so far, therefore I frustratedly turned up for help.

I have a system comprised of 2 separated PCBs (A control box and an on-board controller), connected through a thick 10-pin cable. The system is using a 24V supply (65W) for sensors and motor, 5V for sensors and 3.3V for digital I/Os. It has been working fine until I updated both PCBs with TVS diodes for ESD protection. Things turned bad and I identified the culprit being the TVS diodes, only after burning up dozens of microprocessor chips.

The symptoms includes power-switch self-shorting (the switch contact piece will not re-bounce back when unpressed), motor driver dying (which is supplied with 24V for motor, 3.3V for signal, and GND), dropped voltage on one of the output channel of optocoupler (which display a 3.3V at first, but quickly drops down to around 1V. What came to mind is that the channel also has the shortest trace), and mainly - the micro-controller of the control box got heat up in seconds and permanently stayed in this status. My assumption is either 24V or 5V somehow got into the 3.3V trace and wreak havoc in the system. Or there could haven been a reverse current. However, during the whole process the 3A on-board fuse didn't blow.

The TSV diode layout is shown below:
!

The TSV diode I chose is MMBZ33VAL, and it has the Reverse Standoff Voltage at 26V. I know it might be inappropriate to use it on 3.3V and 5V application, but I believe it will only decrease the protection capability instead of compromising the system. The system will function normally (well, only as far as I can tell) If I removed all the TSV diodes on the new version boards. So must have made a mistake somewhere but I cannot identify it myself, so it would be appreciated if someone can point it out and explain why.


texts:
I need to do some switching and I want to turn off both +ve and -ve(GND)

I can use 1 NPN and 1 PNP transistor. But I'm wondering if I can use 2 NPN transistors only, I have some confusion about NPN. I've been reading for long time about transistors and now this is how I can use NPN.

But can I use NPN transistor like below schematic too ?

or only PNP can do this ?


texts: Why does increased voltage increase processor performance

texts: When you increase the voltage into a computer's CPU it increases the clock speed of the processor and can lead to better performance.  Why does the increased voltage cause the processor's clock speed to change?


texts:
I have a linear actuator that has a pot in it. I am reading the value of the pot on my uC and I am noticing that the values are fluctuating wildly when the pot is changing (both up and down). The values don't ever seem to stabilize. I use the moving average value to stabilize the value in software however this leads to errors. When I attach a normal pot to the uC I do not get any value fluctuations. All the systems are connected to the same power supply.

Question: Is there a better way in electronics obtain a stable reading from the pot in a noisy environment?

Edit: Servo City Linear Actuators


texts: Capacitive Sensing and Dielectric Coupling

texts:
I have a design that uses the MPR121 capacitive sensor.  It's a very simple board with 10 "slider electrodes".  Standard 2 layer construction with FR4 .063" thick.

The board interfaces with a microcontroller on another board, which processes the touch info.  The touch slider board is meant to sit under a piece of wood that is roughly .5" thick.

During development/testing I used a 1" thick text book as a surrogate for the wood (I didn't have the wood casing at the time).  The slider works fine and I'm able to process touch through the book.

When I try to put the slider behind the wood panel, however, I'm not able to process touch info and the ADC values of the MPR121 are totally unaffected by touch.  The wood has a curve to it and a somewhat rough surface such that there is no way for the slider to sit flush on the wood.  I'm guessing that the issue here is that the air gaps (2 mm in some places) between the slider board and the wood are killing my measurements.  In particular the "dielectric coupling" is shot.

How do people mechanically interface rigid capacitive touch boards to irregular surfaces?  Is there a dielectric gel?  Adhesive?  Just buttress the board against a compliant material with desired dielectric constant?  Ideally I'd like to be able to remove the board and tweak it as necessary so epoxy isn't a good short term solution, though it would be OK once everything is validated.

EDIT:

I found polyimide foams on mcmaster carr, which seem like they might work in principle though I suppose if it's a foam it will have air inside of it, which may or may not be problematic.  It's adhesive backed which is nice so theoretically I could mount the adhessive to the PCB and shove the assembly against the structure.  Anyone have experience with/comments on such a solution? http://www.mcmaster.com/#polyimide-heaters/=z9aq3i

EDIT 2:

This TI document refers to two different 3M transfer tapes -- 467MP and 468MP.  I ordered some on amazon and will give it a shot.  Maybe I can use one or two layers to fill all the gaps.  I'll report back when I've tried them out.


texts:
I want to sell an electrical product with an earthed, metallic enclosure for commercial use in Europe.

The wiring inside the product is pretty tight. Are there any laws that prevent me from having an earthed mains circuit in 600V insulated wire touching a low-voltage, earthed secondary circuit in 300V insulated wire?

If the 600V insulation fails (single fault) then the secondary is still protected with 300V insulation, and vice versa. Correct?


texts:
I have been thinking of using LNK305P from Power Integrations to integrate an AC -DC power supply in my next project.

The application note containing the circuit is here.

What things do I need to be aware of safety wise?

I do realize that this is a non isolated power supply and should never be touched while in operation and it would be inside an enclosure to prevent any accidental touching.

I plan to use this to drive a 12v relay (coil current 75ma) and an avr circuit (max current 120ma)


texts: What baud rate can be supported by this internal oscillator?

texts:
I am using this STM32 MCU.

It has an internal 48Mhz oscillator. I only need to use a baud rate of up to 38.4kbps. Is this internal 48Mhz oscillator good enough for 38.4kbps baud rate?

One more question. What if I am going to use multiple uarts, say up to 4 uarts. Does the accuracy of the oscillator matter in this case? Is it the same whether 1 uart is used or all 4 uarts are going to be used?


texts:
I am trying to configure ATSAM3X8E SPI to winbond SPI NAND flash, while ATSAM works at 12MHZ winbond NAND FLASH does not respond at such higher frequencies so when I tried to reduce the baud rate there is data loss in SPI, and the SPI CLOCK, MOSI produces signals at 2v when the frequency is reduced
What is the possible way to work on it?
ATSAM3X-Datasheet https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-11057-32-bit-Cortex-M3-Microcontroller-SAM3X-SAM3A_Datasheet.pdf
WINBOND Datasheet https://www.winbond.com/resource-files/w25n01gv%20revg%20032116.pdf
I am trying to read the Device ID of NAND flash. I am trying register level programming, I am using this four-wire SPI I tried to configure it in three-wire it failed.
This is a development board whereas I have worked on NAND flash integration in different microcontrollers and it worked fine.


texts: In a Delta-Sigma ADC, does noise shaping bring the noise to the signal's frequency?

texts:
I'm trying to understand the Delta-Sigma ADC. It is known that it pushes the quantization noise to be in the higher frequencies (noise shaping). Since I don't quite understand how this works, I implemented a Matlab simulation of a Delta-Sigma ADC. Form the simulation output, it seems to me that the frequency of the qunatization noise is exactly the frequency of the signal itself, and not higher. I can explain this as follows: Since the ADC output depends on the integral of the analog signal in previous times, the output is actually an average of previous times. Now, when the signal is increasing, the average of every interval of the signal will be smaller than the value of the signal at the end of the interval. And when the signal is decreasing, the average of an interval of the signal will be larger than the value of the signal at the end of the interval. So, what we get is the following behavior: The qunatization error will be negative when the signal is increasing, and positive when the signal in decreasing, and so the quantization error has the same frequency as the signal. So is this what is meant by "noise shaping"?

Here is the Matlab code and the output graph:

%% parameters

% sampling rate, [Hz]
fs = 8e3;

% total time of simulation, [sec]
totalTime = 0.01;

% max allowed voltage of signal (min voltage is 0) [Volt]
maxVoltage = 5;

% number of bits for quantization
Nbits = 8;

% this determines the time step of the simulation, which will be
% ((1/fs)/(2^Nbits))/dtFactor
dtFactor = 10;

% functional representation of signal values [Volt] as function of time[sec]
sig = @(t) 2.5+2.5*cos(2*pi*350*t);

%% values derived from parameters

% time step of simulation [sec]
dt = ((1/fs)/(2^Nbits))/dtFactor;

% time axis [sec]
t = 0:dt:totalTime;

% qunatization resolution (width of qunatization zones) [Volt]
LSB = maxVoltage/(2^(Nbits));

% Delta-Sigma modulator will produce a pulse each time the integral of the
% signal passes this value [Volt*sec]
accumV = maxVoltage/(fs*(2^Nbits));

% input signal [Volt]
x = sig(t);

% time axis of ADC output [sec]
ts = t(1):(1/fs):t(end);

%% Delta-Sigma ADC
% this is a simulation of a Delta-Sigma ADC

% perform integration, and substract accumV off the integral every time its
% value passes accumV (negative feedback) [Volt*sec]
xInt = mod(cumsum(x)*dt,accumV);

% produce a pulse every time integrator reaches value accumV
pulses = [0 , xInt(2:end) < xInt(1:(end-1))];

% perform low-pass filtering on the pulse, which actually counts the number
% of pulses in each interval of length (1/fs)
LPF = filter(ones(1,round(dtFactor*(2^Nbits))),1,pulses);

% decimate LPF output, and convert to Volt, to get the ADC output [Volt]
y = LPF(1:(dtFactor*(2^Nbits)):numel(t))*LSB + LSB/2;
y(y>maxVoltage) = maxVoltage-LSB/2;

%% plot results

figure;

% plot signals
subplot(2,1,1);
plot(1000*t,x,'r'); hold on;
stairs(1000*ts(2:(end-1)),y(2:(end-1)),'b');
ylim([0,maxVoltage]);
xlabel('time [ms]');
ylabel('value [Volt]');
title('Signals');

% plot errors
subplot(2,1,2);
plot(1000*ts(2:(end-1)),y(2:(end-1))-sig(ts(2:(end-1))));
xlabel('time [ms]');
ylabel('error [Volt]');
title('Quantization Error');


texts: checking voltage range without a fixed reference voltage

texts:
I am trying to come up with a circuit to determine if my power supply voltage is within a specific range. For example, my nominal voltage is 3.3V but I want to make sure that the lowest voltage that I see is 3.15V and the highest voltage that I see is 3.45V. I have seen circuits on line that will check that a voltage is within a range. However these circuits depend on having a fixed reference voltage to compare against. In my case, the voltage I need to check is the power supply so I cannot create a reference voltage that depends on power supply since it is power supply that I am checking (chicken and egg thing). Does anyone have an idea on how I might accomplish this?

Thank you in advance,
Mike


texts: LTSpice Full Wave Controlled Rectifier Erronous SCR Breakover

texts:
I'm attempting to simulate a full wave SCR rectifier:

However it is not behaving correctly. In my setup V3 controls one pair of SCRs, and V4 controls the other. All the math on the side is just for setting up the pulses that control the gates. The first set of SCRs triggers properly when the gate pulse comes in, however the second set breaks over and acts like a diode. The initial current condition was put in to help the output current settle faster, so the simulation wouldn't have to take as long to run.

The model is used is one available from OnSemi Here. The breakover voltage is 400V, so it should work for this application.

Below are the traces for the current through U1 and U3, as well as their applicable gating signals. U1 (green) only starts to conduct once the gate voltage (cyan) rises.However U3 (red) starts to conduct as U1 is switching off, and well before the gate pulse occurs (blue).

So I decided to take a look at the gate currents to see what was going on. For whatever reason the U3 gate supply has a massive reverse current driven through it compared to the U1 gate.

The net result of all this is that U3 and U4 are acting like diodes and the system does not function as desired.

I'm not sure what is causing this, is there something wrong with the setup, or a parameter of the device that I missed? I picked that particular SCR just because it was the first seemingly adequate model I found that would work.

Thanks!


texts: Precise differences between DRAM and CMOS processes

texts:
There are a couple of questions that mention the difference between standard CMOS processes and DRAM manufacture:

Why do microcontrollers have so little RAM?

How do they integrate logic into a DRAM process while manufacturing SDRAM?

What differences are those exactly, or is this entirely a trade secret? I'd like a detailed answer for someone with a general high-level understanding of the lithographic process.


texts:
My interphone's buzzer receives an AC voltage of 12V. I would like to substitute this buzzer with an embedded board (raspberry-pi).

What would be the ideal way of converting such voltage to 5V DC?

(I have also noticed that when the buzzer goes off, the voltage changes from ~0V DC to 0.3V DC if that might be relevant)


texts:
I have a PLC which gives 24V DC output. I would like to drive an external LED using 24V.

Is this the correct way to drive an led?
Which is the right method let me know any changes needed.

simulate this circuit – Schematic created using CircuitLab


texts:
As you all know one can experiment with drawing graphite patterns on paper for forming improvised potentiometer-like-surfaces

So I was wondering If there's some sort of commercially available resistive materials that could be used for similar tasks, but more sustainable. Are carbon fiber sheets good for this? Material should be lightweight and sturdy, I'd like to try and make a diy resistive touch screen with it. Transparency would be a plus.


texts:
I am attempting sensor-less speed control of a brushed DC motor using PWM and measuring the BEMF (motor-induced voltage proportional to speed). The motor is powered through a H-bridge IC (TI DRV8801).

I've noticed the BEMF is only observable in fast decay mode, where the motor is basically reversed until the current is zero and then the switches turn off.
This leaves the motor connected to power rails through the free-wheeling diodes. Plus the resistor-divider. Plus EMI filter caps on the motor.

So the circuit might look like this:

simulate this circuit – Schematic created using CircuitLab

I assume the oscillation shown in the following image is a result of the residual energy of the motor inductance and the connected capacitance (filter, wire)?

yellow: motor -
cyan:   motor +
blue:   center point of voltage divider: 10 kΩ to GND and each motor contact
pink:   current (large offset with DRV8801; might also be due to bad layout)

The long settling time limits the PWM duty-cycle and the frequency. Is there a way to shorten it? Maybe with a load resistor?


texts:
With inspiration from Ladyada's DIY boost calculator, I'm attempting to build a simple, low-current (<50mA) 40V boost circuit to drive an antique voltmeter.  The PWM source for the transistor will be an AVR that can operate on as little as 1.8V, so that's the minimum voltage I'm targeting.  I've been prototyping with a BC547 (BJT NPN) and a 5V supply, but I'm not able to get more than 36V with the components I have on hand, possibly due to an undersized Schottky diode.

I have a rudimentary understanding of BJTs but I've never worked with FETs, and I'd like to learn more.  For this specific application, I believe I'm looking for a power MOSFET with a relatively low on-resistance. Max Vds should be well in excess of the 40V I want to produce.

Should I be looking at the gate-source voltage threshold (Vgs(th)?) to identify a FET that will work at the 1.8V I'm targeting?  Filtering on that parameter lead me to this STP60NF06L, but the Output characteristics graph (fig 5, p6/16) shows that the current is extremely limited at that voltage, and may not be within the operating margins of the device.


texts: Low voltage 2 channel stereo analog switch

texts:
I am looking for a ultra low voltage 2 ch stereo analog switch.
I have two headphone audio sources that I need to switch between.
It is very important that the chip can run of a 1.2v rechargeable cell (900 mAh) and use very low current.

I have been looking in digikey, intersil and maxim but all I can find are using a minimum single 1.8 V supply, which is to high.

My hopes are to avoid a DC-DC converter on this high quality audio device.
The device currently has a run time of 30 hours on a 1.5v alkaline battery.

EDIT: I check around for relays to use in order to make the mechanical solution, and a 1.5V driven relay use a lot of current which in my case is not a acceptable solution. And I didn't find any 1V relays as well.


texts: How do you find the equivalent voltage of the current source in this circuit?

texts:
The circuit is shown at this schematic.

How do I find the equivalent voltage of the current source by simplifying the circuit?


texts:
Below is taken from the test report for FCC Part 15 for a Bluetooth module:

The heading says "2402Mhz", but the marker shows 2401.9772MHz. It's 23kHz off. However, does FCC permit this kind of discrepancy? What is the allowable margin of error?


texts: Help me verify that my PCB track widths are suitable for my application

texts:
This was my first time designing PCBs, so I apologize in advance if this sounds dumb...

I'm making an ATX PSU adapter for old computers that didn't use this standard. There wasn't much electrical engineering involved, it's pretty much a "converter" (i.e. re-routing) board. I had calculated my track widths based on 2 oz copper layers. Now that I got quotes back from PCB manufacturing houses, I'd rather use 1 oz copper layers because it's much much cheaper.

Here's what I'm working with:

120 VAC: max 6 A power draw (per track). My tracks are 3 mm (120 mils) wide.
5 V (motherboard): max 3 A (per track). Tracks are 2 mm (80 mils) wide.
12 V (motherboard): max 5 A (per track, worst case scenario, probably less in real life). Tracks are 2 mm (80 mils) wide.
5 V standby: 1.25 A, 1 mm (40 mils) wide.
"Molex" power connectors: I can't seem to find an actual max current spec, but 16 AWG can work up to 10 A apparently. The tracks are 2 mm (80 mils) wide.

Should I make my tracks wider or is this sufficient?

I've seen that temperature rise is an important factor. Bear in mind that the PCBs will be cooled by a massive fan.

Thanks in advance for your help.

EDIT: I already tried online calculators and obtained the following results (please check the widths I have vs. temperature rise). I don't know how much these can be trusted... 80°C for the HD connector doesn't seem right.


texts:
What is the difference between the Resistance and Impedance?
When we will say it is an Impedance and when we will say it as an
Resistance?
Can you explain it with diagram (If possible) and real time example.
And how the reactances will form in the circut where the Capacitors
and inductors are not available in our circuit?
How we will find the reactances in the circuit and its values in real time?
I means is this possible to calculate the reactance by using any
instrument?
Do the reactance was intentionally kept by the designer or generally
it'll forms with in the circuit?

All answers are appreciated.


texts:
I am looking to build an H-bridge to control a brushed permanent magnet DC motor. The motor has the following ratings:

Full load current: 18A

Voltage: 24VDC

kW rating: 0.43kW

I am planning to use two BTN8982TA High Current PN Half Bridges by Infineon (Link to Data sheet below) to form a single H-bridge. Looking at the data sheet I can see that both the maximum voltage and current ratings are high enough to fit my application. However I am not sure if these Half bridges can handle the power ratings for my application. I cant to seem to find the maximum power ratings on the data sheet but I do have a link from the Infineon website which mentions that the half bridges can handle a total of 250W (see link below).

Can I continue to use these half bridges for my application if I was to use a heat sink and an external fan for cooling?

Also since I am using two of these half bridges to build an H-bridge does this mean that the power rating of my H-bridge is now 250W x 2 = 500W ?

Data sheet link: http://www.infineon.com/cms/en/product/power/motor-control-and-gate-driver-ics/intelligent-motor-control-ics/single-half-bridge-driver/BTN8982TA/productType.html?productType=db3a30443ef951e3013f0f6c88742068

wattage rating link: http://www.infineon.com/cms/en/product/evaluation-boards/DC-MOTORCONTR_BTN8982/productType.html?productType=5546d4624ad04ef9014b07c0c07922e0


texts: Reduce Interference in Wireless Mesh Network

texts:
I am playing with the idea of mesh network path finding. The goal is that each node can find the most efficient path through other node to a hub.

One way I could approach it is by flooding the network so each node can decide which node is best to connect with. See the following pseudo code that each node runs

Ping out my ID
Wait for responses (all nodes that heard the ping reply their ID and to-hub 'cost')
Ignore replys with no to-node cost, they aren't connected to hub yet
Record ID and Connection Quality + to-hub cost
Pair with lowest cost node
Record as Parent
  Wait for connections from other nodes, record as child
  Forward data from children to parent

The only problem is that when a node pings, multiple nodes may hear it and respond at the same time, possibly creating interference, and giving the node no time to record neighbours.

Possible solution: Each node is delayed by a factor of its ID and time it takes to respond

How else may I limit the amount of interference in my network?


texts:
I have two (supposedly CFL) E27 light bulbs with similar but different labels:

13W 665lm 8.000H 2700K 230V~50/60Hz 110mA
15W 10.000H 805lm 230V~50/60Hz 118mA

Given that 230V is effective voltage, my power calculations do not match the ones on the labels.

P = U * I = 230V * 110mA = 25,3W != 13W
P = U * I = 230V * 118mA = 27,14W != 15W

I am aware that power may be less if reactive resistance is not negligible, but I still do not understand how to read the label. What do voltage and current values really mean? Can somebody point out an authoritative source for me?

Update: both lamps have been bought in Sweden so EU rules apply, although the first one seems to be imported from Norway.


texts: STM32F103 temperature sensor calibration addresses

texts:
I am new to ARM world and using STM32F103C8T6 ARM microcontroller. I want to get micro's internal temperature sensor working.
I am able to get some data from it but I'm not sure how to convert these numbers into temperature. I looked it up on and I found that there is two read-only addresses in memory that hold factory calibration numbers at 30 and 110 degrees.

The problem is there is nothing about it in either datasheet or Reference Manual. There is only some minimums and maximums for parameters. I believe using average of these values may affect accuracy. So I'm confused. How should I do this conversion? Do I even need these factory calibration data? Do I have to self calibrate the ADC in this case?

here is the code I used so far:

 #include "stm32f103xb.h"
 int main(void)
{

// Select a clock source for ADC

RCC->APB2ENR |= RCC_APB2ENR_ADC1EN;     // Enable ADC1 to use APB2 BUS
RCC->CR |= RCC_CR_HSION;  // set the internal clock on (8MHz)
while((RCC->CR & RCC_CR_HSIRDY) == 0){}     // wait until HSI is ready

RCC->CFGR &= ~(RCC_CFGR_HPRE);  // set AHB prescaler to 1
RCC->CFGR &= ~(RCC_CFGR_PPRE2); // set APB2 prescaler to 1 (PCLK2)
RCC->CFGR |= RCC_CFGR_ADCPRE;   // use ADC prescaler

// Select a Sampling rate
ADC1->SMPR1 |= ADC_SMPR1_SMP16;
ADC1->SQR3 |= ADC_SQR3_SQ1_4; //set to convert the channel 16 fitst

// enable temperature sensor
ADC1->CR2 |= ADC_CR2_TSVREFE;

// ADC Calibration
// Power up the ADC and then Calibrate it
ADC1->CR2 |= ADC_CR2_ADON | ADC_CR2_CAL | ADC_CR2_CONT;
// wait until the calibration is completed and reseted
while((ADC1->CR2 & ADC_CR2_CAL) == 1){}

while(1)
{
    // Start
    ADC1->CR2 |= ADC_CR2_ADON;
    while((ADC1->SR & ADC_SR_EOC) == 0){} // wait for end of conversion
    // Print the results on LCD
    LCDSendInstruction(LCD_CLEAR);
    LCDSendInteger(ADC1->DR,8);

}
}

Thanks in advance :D


texts: Can SoC Processors be used as more powerful microcontrollers?

texts:
I'm starting with microcontrollers (still avr), and once I finish, I'll be moving on to ARM based microcontrollers.

However, as I've been reading, the ARM Cortex M is basically the best you can get, like for example the ARM Cortex-M7 based smt32, which runs at 300MHz max.

Which is a lot, but say if I want use a touch LCD control panel that shows the weather, current temperature (which then controls the A/C), the currently active systems in the house (lights, etc), and connects to the house speaker system to play music from its (external) media library. Then Cortex M series wouldn't be the right choice. (Would it?)

The Cortex A series as I read, is the more powerful design, which some companies use to build SoC chips, which are more powerful everything-on-a-chip processing units. (Right?)

Are any of these Cortex A based SoCs available to the public or are they made by big companies for their own specific design only? What would be a solution for the system I plan on making?

By the way, I know something similar could probably be bought, but I'm trying to build this myself as a starting ground.


texts: Two different voltages from a single transformer without a common ground

texts:
I have a transformer with four taps; 8, 16 and 24 V and I want to have a switchable and an stable 24 V from this transformer.
I've asked this question before and you told me that I can't have a common ground between two bridges.
Can I do it like the diagram below without having a common ground?

simulate this circuit – Schematic created using CircuitLab
I need that stable 24 V for the relays supply.


texts: Strategy to balance a Wheatstone bridge for strain measurement

texts:
The purpose of my project is to build a sufficiently accurate "Strain indicator" based on the use of a Wheatstone bridge using an Arduino. Currently I am using a HX711 as load cell amplifier which is working well since I use it with a full bridge.

Currently I want to connect only one strain gauge to a wheatstone bridge built using 3 resistances of 120Ohm (0.1%). I am able to measure something but I want to balance the Wheatstone bridge. My inexperienced question is it is possible to add an accurate balance system to my Wheatstone bridge?

I know that classical solution use potentiometer but the principle is based on a choice of a variable resistance with similar value of the others 3 resistances on the Wheatstone bridge (in my case 120Ohm). Unfortunately, finding potentiometers around this value is not possible. In addition the potentiometer must allow very small change of the resistance around 120Ohm.

I am from the mechanical field, sorry if my question seems to be very common...


texts:
Can an electric circuit do recursion?

By recursion I mean any kind of recursion, tail, binary, nested, etc: http://www.sparknotes.com/cs/recursion/whatisrecursion/section2.rhtml

By electric circuit I mean a simple board without any special chips, just wires, resistors, diodes, capacitors etc.


texts: What is causing a white scale buildup at copper pin connection on LED light sticks and how can they be cleaned?

texts: Can someone explain what is causing this white scale to appear on the copper pins and on the block of this LED light connection? The seal at the connection is supposed to be watertight. On occasion, there is a white (crystallization) that forms at the PC board, pin and on the block at this connection. These lights are exposed to sun and rain and are located 5 miles from coastal waters. There is power and data flowing through these connects and both get affected causing the lights to go out.!(https://i.stack.imgur.com/6tFew.jpg)


texts: Why does the 10G XGMII specification mention a 32b instead of 64b bus for 156.25MHz?

texts:
I'm currently reading the IEEE XGMII specification (IEEE Std 802.3-2005 Clause 46) and I'm really surprised because it mentions a 32b data width for a frequency of 156.25MHz.

The 156.25MHz frequency is for a 64b data width, not 32b.

I read this error almost everywhere.

Why? Can't we even trust the specs?!


texts:
I'm doing some debugging on my project and I need to check if I'm setting my external crystal correctly. I have the ability to print out to a serial monitor via usb,
is it possible to retrieve the Clock Speed and whether or not the cpu is running off the internal clock or an external crystal so I can print that out?


texts:
I received my PicKit4 and some uCs. Since my only PDIP package is a PIC18F4680 I want to test the programmer and MPLAB IDE with it. I set the board following this tutorial. I loaded an template project (pic18_c_template) and configured the properties for my uC.

Since I was not able to find the grid view to set the datapin (like in the video), I wanted to configure a digital pin as a blinking LED. I found some example code for the right registers.

******************************************************************************/
/* Files to Include */
/******************************************************************************/

#if defined(__XC)
    #include <xc.h> /* XC8 General Include File */
#elif defined(HI_TECH_C)
    #include <htc.h> /* HiTech General Include File */
#elif defined(__18CXX)
    #include <p18cxxx.h> /* C18 General Include File */
#endif

#if defined(__XC) || defined(HI_TECH_C)

#include <stdint.h> /* For uint8_t definition */
#include <stdbool.h> /* For true/false definition */

#endif

#include "system.h" /* System funct/params, like osc/peripheral config */
#include "user.h" /* User funct/params, such as InitApp */

/******************************************************************************/
/* User Global Variable Declaration */
/******************************************************************************/

/* i.e. uint8_t <variable_name>; */

/******************************************************************************/
/* Main Program */
/******************************************************************************/

void main(void)
{
    /* Configure the oscillator for the device */
    ConfigureOscillator();

    /* Initialize I/O and Peripherals for application */
    InitApp();

    /* TODO <INSERT USER APPLICATION CODE HERE> */

    TRISB0 = 0;

    while(1) {
        RB0 = 1;
        _delay(1000); // 1 Second Delay
        RB0 = 0; // LED OFF
        _delay(1000); // 1 Second Delay
    }

}

Uploading the program was apparently no problem

[\[code\]Connecting to MPLAB PICkit 4...

Currently loaded versions:
Application version............00.05.41
Boot version...................01.00.00
Script version.................00.03.33
Script build number............0540a22e50
PICkit 4 is supplying power to the target (3.30 volts).
Target device PIC18F4680 found.
Device Revision Id = 0x7

Calculating memory ranges for operation...

Erasing...

The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x7f

Programming/Verify complete\[/code\]]

but the load on RB0 (pin 33) is not blinking. My guess is that I need to connect an oscillator to time the delay, but shouldnt the LED blink regardless? (At least in some intervals).

Also the programmers led strip is yellow, which means 'programming'. But shoudnt the program process be completed?


texts: Electric flow rate (Amper) on the com-port

texts:
I have sending data through com-port from PC.
Is there a constant rate of flow of electric charge (Ampere) when the com-port is used while sending or not sending data through it? Does the Ampere on the com-port depends on the data being sent? If I don't send data from PC will the rate of flow become less?

I am asking it because I have connected the 3rd (transmit pin) and 5th(ground pin) of com-port (with 9 pins) to the lamp. And it is shining when I am constantly sending data from PC to this port. If I am not sending data the lamp stops shining. Also, if I am sending 0x00 value constantly the lamp is shining brightly. If I am sending 0xFF then it is not so bright.
Can u explain it?

EDIT1:

The Voltage is the same when I am sendning data or not between the 3 and 5th pins. However the lamp is not shining when the data is not being sent, but only when it is being sent. How is it possible? The voltage is about 5-6V.


texts: Can I use a simple resistor for ESD protection on an ESP32?

texts:
This question applies both to digital and analog inputs on the various ESP32 dev kits.  From what I can tell, none of these boards (including my OLIMEX-EVB and Gateway boards) add any ESD protection to the bare ESP32.

So far I have had difficulty locating the proper Espressive data sheet to see what (if any) ESD tolerance there is.  I suspect there is (the ESP8266 did) but I can't find it.

I have two specific applications I need to design for, and I am thinking both will work with a larger (e.g. 1 M Ohm) resistor:

A) Reading a digital input line for the open/closing of a limit switch.
B) Reading an analog input value on the ADC capable pins (which I think are 0-1.1v unless you use the attenuation function).

I am OK with a response rate as long as 1 second, although 1/10th of a second would be ideal.

So my questions are:

Does anyone know what the ESD protection is on the bare ESP32?
What is the best sized resistor to use to provide maximum protection and still have a decent response?
Will thin film resistors work or do I need to get another type?


texts: Using a TPP223 capacitive board instead of a mechanical button

texts:
I have this CSR8645 bluetooth module and I wanted to use TPP223 capacitive buttons for its inputs - vol+, vol-, next, prev, etc., but I am wondering if it will work at all.

The CSR8645 is originally intended to be used with mechanical buttons. Micro buttons like these only make a connection between two of the pins. So their working principle is modulating resistance from ∞Ω to 0Ω. On the other hand the capacitive board outputs 5V on its I/O pin when it's touched. So it modulates voltage from 0V to 5V. I am wondering if this can destroy the I/O port of the CSR8645 chip, which certainly is not expecting a voltage input where just a connection should be made.

By your opinion can I use the TPP223 directly instead of mechanical buttons or do I have to add something like a relay to emulate a mechanical button.


texts: Asynchronous motor joule loss calculation

texts:
I'm wondering if this is the right place to ask my question, but i hope to get the answer.
How I can calculate the Joule loss with just those indication
output and input power, voltage, current, and rotor resistance.
I know that Pjr = g*Ptr
where Pjr : Joule loss on the rotor
g : sliding
Ptr : transmitted power (Ptr = Pa - Pjs - Pfs)
Pjs : joule loss on the stator
Pfs : iron loss on the stator
Pa : input power.
sorry for my bad language because i study in france


texts: Power conversion causing huge increase in amperage

texts:
I've got a transformer ballast driving an HID lamp. When the transformer is wired to 110VAC, it's using about 700mA. When I drive it with a 12v battery and power inverter (to 110VAC) the transformer buzzez much more loudly, pulls around 5 amps from the inverter, and I read over 8 amps between the inverter and the battery.

Why the 800% increase in amp draw just from using a 12v battery as my source? Is there a way I can do this more efficiently?


texts:
I need to power up an IC and I have two or three power supplies. The datasheet says:

  Vdd1 and Vdd2 are turned on at the same time; make sure Vdd1 becomes stable before Vdd2.

My power supplies have EN pins so I can power them up in sequence, but how is it possible to power them on at the same time and the first become stable before second?


texts: BGA escape routing, understanding Altera app note

texts:
I'm trying to understand Altera's Application Note 114 "Designing with High-Density BGA Packages for Altera Devices".

Specifically, I'm puzzled by the examples on page 19. The "through vias" example with three layers is straightforward, but the "blind vias" example talks about using two layers and routing traces below vias, which doesn't make sense to me.

This would work for a board with three or more layers, obviously, but the color-coding of the traces suggests that in some of the vias, two traces meet on the same layer.

What am I missing here?


texts:
I have a AC motor and it's belong to an old desk fan, unfortunately I missed it's circuit diagram, so it would be great if you could help.

My AC outlet supplies 220V, and the motor comes with a 1.5uF capacitor.

As you can see in this photo, I have 6 wire

Gray and Red are together!

In this photo gray and green are shorter than others,
If I'm not mistaken, these wires are related to the capacitor?!

please let me know how to connect the wires to AC power and speed switch.


texts: Drawing DC current from batteries on charge controller

texts:
I have an off-grid solar system where this inverter/charge controller (ICC) is connected to a 48V battery (which is in fact 2 parallel quartets of 12V batteries, but this is non-relevant detail I guess). The ICC would feed current to the battery at as high as 56V (high sun, low load and when the battery needs charging), and draw it back (for making AC — when the sun is down and/or load is high) to as down as 42V.

Now, the hitch is that I have some DC appliances and would like to feed them DC without the double conversion through AC (the ICC does not have a DC output for connecting load). The idea is to get a DC-to-DC converter (which would deal with 42-56V floating input) and let it draw DC from the battery/ICC circuit directly — in parallel.

I am hereby trying to figure out if this setup would undermine the ICC's job to any such extent that the battery gets charged/discharged incorrectly and therefore passes away sooner than if I did not do this.

The extra parallel circuit will push down the overall battery/ICC circuit resistance so that:

when the ICC is charging the battery, the effect will be just higher
current in the overall circuit — as the ICC will (attempt to) maintain
the voltage;
when the ICC is drawing current from the battery, the effect
will be just that the voltage drops faster — as the ICC won't be the only
one consumer anymore.

So it looks like the only thing to watch out would be the battery's depth of discharge as the ICC won't be able to account all the current drawn from it anymore, and would only see the voltage as indicator of discharge.

How do the above understanding, reasoning and conclusions stand? Is there something I am fallaciously missing, or is it all reasonably sound?


texts:
I'm getting a syntax error near data0_sim in the following code - New to vhdl and confused as I think this should work:

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

library unisim;
use unisim.vcomponents.all;

signal data0_sim     : std_logic_vector(8-1 downto 0);
data0_sim <= "00001111";


texts:
Two stations are 400km apart from each other. You have access to a 100Mbit/s full duplex radio link which transmits packet of 4000 Bytes in each direction.

What is the transmission time?

I assume the full duplex link will take the 100Mbit/s and split it such that 50 are used for upload and 50 for download.

Then the transmission time is:

Transmission time = (4000*8) bit / (50*10^6) bit/s = 640 microseconds

What is the propagation delay?

delay = (400*10^3 m) / (3*10^8 m/s) = 3.88 milliseconds

What is the throughput if we use stop-and-wait ARQ with piggy backing?

throughput = 32000 bit / (3.88 * 10^-3) seconds = 8.4 Mbit/s

What should the buffer size be for the sliding window in order to fully make use of the link?

50*10^6 bit/s * 3,88 *10^(-3) seconds = 194000 bits
194000 bits / 32000 bits per packet = 6

so the window size should be 6.

Is my thinking correct here or did I make a mistake?


texts: Getting a higher voltage from a battery than specified

texts:
This may be a totally stupid question, but say I have a battery that supplies power at 7.5 V. Is there any way to boost its voltage to provide 9 V?

I know you can step down voltages in many ways (i.e. transformers, voltage regulators, voltage divider circuits), and I know that step-up transformers exist. However, any solution I have found to increase the voltage output seems expensive. I know I could just wire batteries in parallel/series to get what I want, but I am wondering what my options are for a single battery plus whatever else is needed (except another battery) to achieve what I want.


texts:
I trying to understand what problem with next scheme.

I have a power supply which should provide +12V but in my case it's only about 5v in output (checked on 1-2-7-8 and Gnd pins). I have tried to change LNK304P to new one but without result. So seems that problem in harness. I assume that problem with PC101 but Now I prefer to be sure before replacing component. Please help to understand could it be problem?


texts: Microcontroller and Bluetooth application

texts:
I have to design a pedometer, (theoretically, just to suggest the components with a description) so the device needs to detect any movements using an accelerometer. It will then be connected to a microcontroller in order to display the values on a LCD panel. The device should also be capable of communicating with blue-tooth devices.

Can I use a 8-bit or 10-bit digital accelerometer with a 16-bit microcontroller?
Instead of using a ready bluetooth device which is expensive, can I use an antenna (2.4GHz where bluetooth devices operate too) and then connect it to the microcontroller to manage communication with other bluetooth devices? A brief description of how this is possible would be much appreciated.


texts: Signal loss failsafe for a cheap drone using 433 MHz tx/rx pair

texts:
I bought a cheap drone to get into flying quadcopters and it seems it has only one big issue at that price, which is a very long failsafe time of 20 seconds, i.e. if the remote signal is lost, the drone keeps buzzing for 20 more seconds until it cuts off its engines. As an absolute beginner pilot living in a crowded city, that sounds terrifying. The package hasn't arrived yet, but I started thinking of ways to mitigate that, ideally without modifying the flight controller board. I've been dabbling with small electronics projects for a while, but still a beginner there as well.

What I came up with is using a cheap 433 MHz rx/tx pair (like this one https://randomnerdtutorials.com/rf-433mhz-transmitter-receiver-module-with-arduino/), with the rx + a reset switch controlling a FET latch circuit placed between the battery and the drone's VCC, and the tx on the ground emitting a constant signal while connected to a variable voltage source to adjust range. Therefore, when the 433 rx loses signal, the latch would shut down all battery power and the whole thing crashes on the spot.

A datasheet I found on the 433 pair said that the rx data output is maximum VCC/2, which is around 1.85 V for a 3.7 V drone battery. I think that's enough to drive an NFET. My main questions are:

I imagine the "constant" data output from the 433 rx will in fact be flickering at 433 MHz, which could be fed down the line to the drone's board. How do I filter that out with as few (and light) components as possible?
Are there any RF issues that I'm overlooking? I know the 433 MHz band is crowded, but I doubt I'm going to run into another always-on emitter very often. The drone itself is controlled via 2.4 GHz and I intend to add a 5.8 GHz FPV camera.

TL;DR: I want to control a drone battery with a 433 MHz receiver's data output by sending an always-on signal to a  FET latch circuit. Is this feasible?


texts: Supercapacitors vs. High Voltage Capacitors with Inductive loads used in CoilGuns or Solenoids

texts:
I'm looking for some insight on whether an 1000 Farads at 2.7v or 5.5v would be more effective than say 10,000uF at 400v-450v when creating a strong magnetic coil.  The intent is something similar to what I find when examining Coil Gun experiments.  Some of the equations I have referenced are :

The amount of potential energy stored in a capacitor depends on the voltage:

            PE = ½ C V^2
 Where C is capacitance in farads, and V is voltage

And

            v = V * sqrt(C/m) / 10
 Where v is velocity in m/s, V is voltage, C is capacitance in farads, and m is mass in kilograms

I feel like the Cost/Benefit seems like having loads of amps at low voltage would be better than lots of amps at high voltage merely because supercaps pack soo many more Farads. I am given pause because of the v^2 in the energy equation, and the sqrt in the velocity equation.

Additional Information to Consider: Materials cost as of 5/oct/14-

Small Aluminum electrolytic capacitors 450V 1000UF - $1.50 each

SAMWHA super capacitor 2.7V 500F - $5.67 each

Large Electrolytic capacitor 2200uf 450v - $13.20 each

This Last example is what I see in most coilgun examples use and may be more available than the quick search I did for my initial search.

Please also consider the loss of capacitance when run in series vs addition of capacitance when in parallel. As well as the use of the capacitors in other types of experiments if the end result is very similar to each other.

Your thoughts and insights would be appreciated.


texts:
I am using RJ45 connectors(2-406549-1) with built in LEDs, to transmit SPI lines for a microcontroller project(I needed CAT 6 cables for twisted data/ground pairs).
I'd like to use those built in LEDs to notify when the PCB has power, but I can't find any information on what those LEDs are to determine how I can power them.
Any ideas where to find that? I'm guessing RJ45 connectors with LEDs must have a standard LED type but I can't find what that is.


texts: Efficient method for isolated detection of AC voltage without a stepdown transformer

texts:
What is an efficient method to detect the presence of Line AC power in an isolated method?

My first thought would be to use an optocoupler, but in order to do that, you need to supply the current needed.  Placing a diode in series would make it only activate on half of the signal and save power.  For example if you need 20mA to drive the optocoupler you would use resistors to limit the current.  When you multiply 20mA by 120 or 240V you get 1200 or 2400 mW which is not efficient.

What other methods can be used to detect the presence of the voltage in an more efficient manor without using a step down transformer to get a lower voltage?  My goal would be to get a circuit that uses limited power and common components.

I am sure someone is going to try and mark this as a duplicate of the many other 120VAC detection questions, but in this one I am looking for a more efficient method while still achieving the isolation.

Also the reason I do not want to use a transformer is due to the cost and component size as most transformers are not meant for only a few mW.


texts: LTspice : using a sqrt(-1) in behavioral model

texts:
i would like to simulate an equal circuit of two coupled inductors,
So i need a behavioral voltage with following expressions:

V=jwI(R2)

LT spice do not recognize sqrt(-1),

any idea for simulating this circuit?
[[circuit schematic][1]][1]

[1]: https://i.stack.imgur.com/71UKh.png


texts: Reversing direction of a 115v ac motor using Arduino

texts:
I have a 115V brushed motor that I am controlling via Arduino. The manufacturer says it draws 1A but I'm not sure if that accounts for the initial current draw to turn it on. I've had great ease and success hooking it up to a Powerswitch Tail II to power the motor on and off with the Arduino. It is a reversible motor and I would like to program three functions: CLOCKWISE, COUNTERCLOCKWISE, and STOP. I have been told all I need is a relay but I am having trouble figuring out which relays can switch 115V (mains) and how exactly to implement the reverse function.

Can this be done with the Powerswitch Tail II?

If not, what type of relay or other hardware do I need?

UPDATE: This is a Semco T63, almost exactly the same as the one I have. It is difficult to see in this picture, but there are two black wires running to the capacitor.


texts: Freewheel diode / capacitor with this board?

texts:
With DC motors, it is common to put a freewheel diode and/or a capacitor in order to protect the equipment as the motor can induce current into the system.

I plan to use this board to control a 24V DC motor with a Arduino-like microcontroler. In an example in their documentation, they don't put such protection, so I wanted to know if it's unsafe, or is it that the board already protects the system?

The example in question:


texts: Capacitor charging voltage showing ripples on scope. Origin?

texts:
I have an RC circuit delivering a square signal via a standard 555 timer set in monostable.
I am powering the 555 with 4.88V DC directly from the Arduino, which itself is taking its power from the Serial USB cable connected to my computer, running on battery power (i.e. = not mains).
I did my homework and selected appropriate decoupling/bypass caps directly across VCC-GND to help with power smoothing. All fine.
Arduino triggers a set of 6 consecutive reads to calculate/average the time constant and then goes quiet until next request. Nothing fancy.

Now: When I put a probe on the capacitor and observe voltage, I see little ripples that almost look like a heart beat...(Figure 1.) They are spaced 25.5uS apart.

Q: Could someone tell me the origin of the ripples?

Figure 1.

Schematics 1.

simulate this circuit – Schematic created using CircuitLab

Editions:
- Added Schematics following requests.


texts: Sparkfun Bluetooth Modem (RN41) Mode:entering pin

texts: I'm trying to use the sparkfun bluetooth mate gold modem (microchip RN41) link in master mode to another BT modem in slave mode WITH pin authentication. However when I try to connect I receive the message TRYING followed by connect failed. Same situation when I try to connect with any device using pin authentication. My question is: how do I connect to another bluetooth mate that has pin authentication enabled? If it is at all possible. Thanks.


texts: How does the values of the capacitor affect the filter circuit?

texts:
I have connected an Incandescent light bulb (R1) in series with a capacitor (C1) to the power line like so:

With the capacitors I have, only for capacitor values C1 = 17uF, 20uF and 22uF does the bulb glow.

For capacitor values C1 = 1uF, 2uF and 2.2uF the bulb does not glow.

The cold resistance of the bulb is 19 Ohms.

When the bulb glows, I got the following readings from my Kill-a-watt:

Current draw: 0.45A
Voltage: 117.4vac
PF: 0.91
Wattage: 48W (52VA)

From wikipedia, I read the cold resistance of tungsten-filament lamps is about 1/15 the hot-filament resistance when the lamp is operating

This agrees with the readings on the Kill-a-watt as the current through the circuit would be 0.45A if the resistance of the bulb was indeed 15 times the cold resistance (19 * 15 = 285 Ohms. Hence, 117.4/285 = 0.41A).

What I don't understand is why the bulb lights for capacitor values 17uF, 20uF and 22uF but not for 1uF, 2uF and 2.2uF.

With resistor value of 19 Ohms, capacitor values 17uF, 20uF and 22uF should have a cut off freq of more than a few Khz, hence not letting the 60Hz AC through?

Why I say a cut off freq of more than a few Khz:

Because T = RC, and here if R = 100Ohm, C = 20uF, then RC = 100 * (20 / 10^6) => f = 1/T = 500Hz which is much more than 60Hz AC and hence no signal should be out.

(Of course, my understanding wrong as I can see light on, but I want understand where I am wrong.)

Does it imply the higher value caps I am using are damaged (although they read the correct values)?


texts: Why would an STM32 not execute its program after upload?

texts:
I am attempting to breadboard an STM32F401 using a 64-pin breakout board. I am able to both connect and upload my program successfully (via ST-LINK V2 SWD pins), but once uploaded, the program seizes to execute itself.

Oddly enough, I am able to use the st-link debugger and "step" through the program and blink an LED as expected, however, as previously mentioned, outside of using the debugger the program refuses to execute itself.

So after sleeping on this, I woke up and soldered a new chip to a new breakout board to see if I was working with a damaged chip. Since I got the exact same result with a different chip, I am thinking there must be a problem with either the software (unlikely), ST-LINK (unlikely), or the way in which I have wired up the hardware pins (likely?).

I have followed the official ST Nucleo F4 schematics for wiring up the chip for programming, hence why I am kinda stumped with this.

Any help would be appreciated!

Hardware:

ST-LINK V2 (official ST, brand new)
STM32F401RET6

Software:

MBED v5.14

STM32F401 Breadboard Schematic

MBED Blink Program

All this is suppose to do is Blink an LED

#include <mbed.h>

DigitalOut myled(PA_5);

int main() {
  myled.write(1);

  while(1) {
    myled.write(1);
    wait_us(100);
    myled.write(0);
    wait_us(10);
  }
}


texts: Adding 90 ohm resistors to DIY USB cable?

texts:
I just started with electrics a few months ago, but now I am obsessed but still have MUCH to learn. What I am doing is essentially trial and error.

I needed a longer USB cable to a printer so I took a USB cable I had, cut it close to each end of it and then took the thickest 4 cables I could find and connected them to the USB connectors/ends. My idea was simply the thicker the better, the lower resistance the better. But it didn't work! The computer did not recognize the printer.

I read some more on USB and then I saw something about a need for 90 ohm impedance (imped... what?). Read some more and learned that impedance is sort of like AC resistance. After that I connected a 10 ohm resistor to D+ and a 20 ohm resistor to D- (not 90 ohm I know but that's all I had). Then I tested the cable again and it miraculously worked! I was quite confused that lower resistance is not always better in a cable.

My question is if my thinking is correct when I think that when measuring a DIY USB cable with a multimeter the resistance (sort of impedance) should be as close to 90 ohms as possible?

Some additional info added after asking

Cable length is about 2.5 meters (which is less than maximal 5
meters).
I measured with a multimeter before and after the adding of the resistors and + connected to +, - to -, D+ to D+, D- to D-, so I think the "wiring" is/was correct. It is not entirely unlikely that the connection was loose though and something fell out, but not that I noticed.
My extended cable works almost all the time except that sometimes when starting the printer then a USB network card connected to the same computer (as the printer) stops working/is disconnected, so I have to remove then reinsert the USB network card and it works again (so no permanent damage ;) ). And sometimes (after a long time of inactivity) it my computer looses connection to the printer (at least it doesn't print on command) and that is fixed by switching off the printer then switching it on again.


texts:
Why is a series resistor used in high speed signal data lines? Is there any reason to include a resistor or simply protection from the receiver end?

For example, I'd like to understand the reason behind the low value series resistor placed in processor-to-SDRAM data and address lines.


texts: Why is the voltage dropping when using pwm output pin of a microcontroller?

texts: A resistor is connected to one of the pwm output of Arduino. When I add a diode(or a capacitor) in parallel to the resistor the voltage across the pwm output hence all components' outputs is dropping and Arduino board's tiny L light fades in the circuit; whereas if I do the same with analog output 5v nothing happens. Is that because analog output has voltage regulator?


texts: How are unbalanced coaxial cables used for broadcasting TV signals without any problems?

texts:
As far as I know, in telephony STP or twisted pair cables are used. This creates balanced line impedances which is useful to mitigate for common mode related interference.

So using balanced cables in telephony and in audio is crucial to get rid of any EM or RF interference.

On the other hand, in TV broadcasting or many RF systems coaxial cables are used. And most of the coaxial cables I have seen are not balanced. I can see that the 50 Ohm concept is good to get rid of reflections in transmission line theory. But how come the unbalancedness of coaxial cables causes no problems with impedance balancing issues?


texts:
Im trying to implement a simple first order IIR filter on a MCU (PIC24FJ32GA002), without success until now.
The filter is a DC tracking filter (low pass filter) whose purpose is to track DC component of a 1.5Hz signal. The difference equation was taken from a TI application note:

y(n)=Kx(n)+y(n-1)(1-K)
with K = 1/2^8

I made a MATLAB script to test it and it works well in the simulation.
Code used:

K=1/2^8
b = K
a = [1 -(1-K)]

Fs=200; // sampling frequency
Ts=1/Fs;
Nx=5000; // number of samples
nT=Ts*(0:Nx-1);
fin=1.5; // signal frequency

randn('state',sum(100*clock));
noise=randn(1,Nx);
noise=noise-mean(noise);

xin=200+9*(cos(2*pi*fin*nT));
xin=xin+noise;

out = filter(b,a,xin);

However I can't implement it on a PIC24F microcontroller. i'm representing the coefficients in Q15 (1.15) format, storing them in short variables and using a long one for multiplications. Here it is the code:

short xn;
short y;
short b0 = 128, a1 = 32640; // Q15
long aux1, aux2;

// (...)

while(1){

    xn = readADC(adc_ch);

    aux1 = ((long)b0*xn) << 1;
    aux2 = ((long)a1*y) << 1;
    y = ((aux1 + aux2) >> 16);

    delay_ms(5);
}

Long cast is used to extend the signal so the multiplying operation is done correctly. After each multiplication I shift left one bit to remove the extended signal bit. When summing I shift right 16 bits to get y in Q15 format.

Im debugging the MCU with Pickit2 and "View->Watch" window (MPLAB IDE 8.53) and testing the filter with a DC signal (I change the DC signal with a potenciometer to test different values). The ADC has 10bit resolution and the MCU is supplied with 3.3V.
Some results:

1V --> xn = 312 (correct), yn = 226 (incorrect)
1.5V --> xn = 470 (correct), yn = 228 (completely wrong)

What am I doing wrong?
Any suggestions on how to implement this IIR filter on a 16bit MCU?

Many thanks in advance :)


texts: I have a circuit that runs 5V. I need to integrate a CO2 sensor that requires 6V. What would be the simplest, most cost effective way to do this? I need about 200ma for the sensor


texts: Can a 3-phase rectifier handle input from a 1-phase/2-phase source?

texts:
In trying to homebrew a miniature wind-turbine using the stepper out of the tray motor from the CD Drive (sloth that I am) I'm loath to go to the effort of constructing a rectifier, and a regulator. This miniature may grow up to become one from dish-washing machine motor ... but that is an AC motor. Anyway, that is for a later date...

An RR for the scooter was purchased, and never put in. The output from the turbine may be dumped to the RR for rectification. However an RR is meant for 3-phase input.

IMO, please correct me if I'm wrong, if it can handle 3-phase it shall probably handle 1-phase as well ... Hence the question - can a multi-phase RR do it's magic if fed single-phase input?


texts:
I have been puzzling my mind about this circuit for a few days and I have few questions. It seems like this -400mV does a lot of changes to a circuit. So here is a picture:

Can anyone tell me why my output has a DC component?

Why the output is not some form of sine wawe shifted for 90° .

Is there anyway to calculate frequency response of this circuit or unity gain?

Transfer function?

Overall explanation?

I am honestly so confused because I dont know where to start beacuse of these -400mV.


texts:
When you get into the single digit pF capacitors, the capacitance approaches what could be achieved with only a trace (which wouldn't be changeable, but I don't care about that).
Quick calculations tell me that a 5mil trace a 0.6" long would give me about a pF for a clock signal. (or you could do just a pad)
Have you ever seen this done or tried this on FR4?


texts: Natural frequencies of a bandpass filter

texts:
I have the following frequency transform used to design a low-pass prototype out of a bandpass specification mask:
$$\omega=\frac{\omega_0}{B}\left(\frac{\omega'}{\omega_0}-\frac{\omega_0}{\omega'}\right)$$
where \$\omega_0\$ and \$B\$ are constants, \$\omega\$ represents the angular frequency of the low-pass filter and \$\omega'\$ is the angular frequency of the bandpass filter. Since the transfer functions of the filters must be hermitic the function can be reduced to:$$\omega=\frac{\omega_0}{B}\left|\frac{\omega'}{\omega_0}-\frac{\omega_0}{\omega'}\right|$$

Given that \$\omega_0/B=2.45\$, I wonder if by solving for \$\omega'\$ the equation can be rewriten like this:$$\omega'^2-\frac{\omega_0\omega}{2.45}\omega'-\omega_0^2=0$$
and from here just substitude the natural frecuencies of the low-pass prototype and get the natural frequencies of the bandpass filter since I have ignored the absolute value to solve for \$\omega'\$ and I don't know if that can be important when computing the result.


texts:
I want to operate a large set of servos in conjunction with various sensors, each module controlled by an Arduino nano. In order to send overhead operational data to the nanos, I want to use an Arduino mega with SPI communication, daisy chaining the master mega to the nano slaves.
The problem is I don't have any EE/CS background, and I'm not sure where to begin in terms of programming the communication. In terms of hardware limitation for SPI, I'm aware of the distance catch, but all the modules are within a meter from the mega.
I want to send two bytes of data to each module, and receive one byte of data back. For a size of n modules, I was thinking I need to pass an array with a size of 3 * n, with slave reading the data and then after storing, sending it out to the next one.
I've been trying to find specific codes to see how the communication is used, but I could not find any.
I did find https://github.com/hideakitai/SPIDaisyChain but thought that the slave and master would require separate files?
Thanks in advance!


texts: building real simulation in multisim(NI company) of dc-dc SEPIC convertor

texts:
hi I am trying to build  real simulationin multisim of dc-dc SEPIC convertor how ever in my output voltage i get a lot of RIPPLE . the problem is that I get a lot of spikes in my capacitor current . how to fix this problem ?

this the schem

and this is the current of capsitor C1  :


texts: How to interface HCSR04 ultrasonic sensor with ATxmega256A3?

texts:
I have to interface HCSR04 with ATXMega256. I am using the TCC0 Timer in Capture mode with setting it to capture pulse width, using Event System Channel 0 source: Port A Pin0.

Anyway, my code is shown below in one file using USARTE1 to send the measurement to another terminal:

#define F_CPU 16000000UL
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <avr/io.h>

#define USART_Format_Set(_usart, _charSize, _parityMode, _twoStopBits) \
(_usart)->CTRLC = (uint8_t) _charSize | _parityMode | \
(_twoStopBits ? USART_SBMODE_bm : 0)

#define USART_RxdInterruptLevel_Set(_usart, _rxdIntLevel) \
((_usart)->CTRLA = ((_usart)->CTRLA & ~USART_RXCINTLVL_gm) | _rxdIntLevel)

#define USART_Baudrate_Set(_usart, _bselValue, _bScaleFactor) \
(_usart)->BAUDCTRLA = (uint8_t)_bselValue; \
(_usart)->BAUDCTRLB = (_bScaleFactor << USART_BSCALE0_bp) | (_bselValue >> 8)

#define USART_Rx_Enable(_usart) ((_usart)->CTRLB |= USART_RXEN_bm)
#define USART_Tx_Enable(_usart) ((_usart)->CTRLB |= USART_TXEN_bm)

#define USART_IsTXDataRegisterEmpty(_usart) (((_usart)->STATUS & USART_DREIF_bm) != 0)
#define USART_PutChar(_usart, _data) ((_usart)->DATA = _data)

void usart_putchar (uint8_t data)
{
    while (!USART_IsTXDataRegisterEmpty(&USARTE1));
    USART_PutChar(&USARTE1, data);
}

volatile uint16_t pulseWidth = 0;

int main(void)
{
    cli();
    int16_t count_a = 0;

    // System clock External oscillator 16 MHz
    OSC.XOSCCTRL = OSC_FRQRANGE_12TO16_gc | OSC_XOSCSEL_XTAL_16KCLK_gc;
    OSC.CTRL |= OSC_XOSCEN_bm;
    CCP = CCP_IOREG_gc;
    while ((OSC.STATUS & OSC_XOSCRDY_bm) == 0);
    OSC.CTRL &= ~(OSC_RC2MEN_bm | OSC_RC32MEN_bm | OSC_RC32KEN_bm | OSC_PLLEN_bm);
    PORTCFG.CLKEVOUT = (PORTCFG.CLKEVOUT & (~PORTCFG_CLKOUT_gm)) | PORTCFG_CLKOUT_OFF_gc;

    // Port initialize
    PORTB.DIR =0x01; // Trig Port at PB0
    PORTA.DIR = 0x00; // Echo Port at PA0
    PORTA.PIN0CTRL = PORT_ISC_BOTHEDGES_gc;
    PORTE.DIR = 0x80; // USART at USARTE1

    // Timer TCCO in capture pulse width mode
    EVSYS.CH0MUX = EVSYS_CHMUX_PORTA_PIN0_gc;
    TCC0.CTRLB = TC0_CCAEN_bm | TC_WGMODE_NORMAL_gc;
    TCC0.CTRLA = TC_CLKSEL_DIV1_gc;
    TCC0.CTRLD = TC_EVACT_PW_gc | TC_EVSEL_CH0_gc;
    TCC0.INTCTRLB = TC_CCAINTLVL_LO_gc;
    TCC0.INTFLAGS = TCC0.INTFLAGS;

    // USARTE1
    USART_Format_Set(&USARTE1, USART_CHSIZE_8BIT_gc, USART_PMODE_DISABLED_gc, false);
    USART_RxdInterruptLevel_Set(&USARTE1, USART_RXCINTLVL_LO_gc);
    USART_Baudrate_Set(&USARTE1, 0xCE5 , -5); // 9600
    USART_Rx_Enable(&USARTE1);
    USART_Tx_Enable(&USARTE1);

    // PMIL
    PMIC.INTPRI = 0x00;
    PMIC.CTRL |= PMIC_LOLVLEX_bm;
    sei();

    while (1)
    {
        PORTB.OUT = 0x01; // trig the sensor
        _delay_us((20));
        PORTB.OUT = 0x00;
        count_a = pulseWidth / 58;

        // pulseWidth = 0;
        uint8_t hByte = count_a >> 8;
        uint8_t lByte = count_a & 0xff ;
        count_a = 0;
        usart_putchar(hByte);
        usart_putchar(lByte);
        _delay_ms(250);
    }
}

ISR(TCC0_CCA_vect)
{
    pulseWidth = TCC0.CCA;
}

In Atmel Studio 7 I have written a .stim file to generate pulses with 10 ms, and in simulation I was able to capture this pulse which is equal to \$10000/58 = 172 cm\$, but with the real xmega, the terminal received random bytes. Also I checked the USARTE1 sending process and it works fine.

Have you any suggestion please to determine where the problem is?


texts: Is there any way to control a 12Vdc relay using 60Vdc line

texts: I have a 60V li-ion battery back with PCM board attached to it for protection. According to the PCM datasheet, under fault condition the PCM cuts off the load and thus isolates the battery bank. The battery bank has an array of solar panels connected to it through an mppt at all times. I wanted to isolate this source also from the battery pack during fault condition. Is there anyway other way I can achieve this except using a 60Vdc relay?


texts:
I captured an in-process asymmetric connectionless Bluetooth LE link from one device to another. It is a steady flow of data from the remote to the central.

See the screenshot below, where I've added some red lines showing periodicity of the messages:

There are 6 packets all transmitted within ~30 ms, followed by a gap of ~90ms, and then it repeats. Therefore, each cycle of packets+gap is 120 ms.

For various reasons, I do not seem to be able to capture "Connection Parameter Update Request" packets, so I do not have direct access to the "connection interval" being used. I'm trying to infer the "connection interval" only from the information shown.

Can I assume that the connection interval is 120 ms?

Or could it be much less less than that, with some "slave latency" applied?

Is it common for 6 packets to be transmitted in such quick succession like this?

A colleague was guessing that the connection interval is 120ms/6 = 20 ms. I didn't think so, but could he be right?


texts: What does Configure RESET Port Pin as wire-AND mean?

texts:
I am studying to use the ATmega328P in debug mode and this sentence in the datasheet is confusing especially the term "wire-AND".
Link to Datasheet-https://www.sparkfun.com/datasheets/Components/SMD/ATMega328.pdf
Chapter 22
Section 22.3


texts: single cel 3.7 V 2600 mah with 19v charger how is this possible?

texts:
i have a Bluetooth speaker that uses a single cel 3.7 2600 mah battery but the charger says is 19V and i have read that the max volts to charge 3.7 V is 4.2 V, so how is this possible? now im confused?

thanks for the help :)


texts:
I am wondering if a 12VA transformer (10:1, from 120 -> 12VAC) can draw more than one amp on the secondary side?

Just my thought process: 1A on primary @ 120VAC will be 10A @ 12VAC, if I am correct on this, can I draw freely 1-2A on the secondary side?

If not, I am going to have a lot of trouble finding a transformer for my project, I just cannot seem to wrap my head around this one.


texts: Why won't my phototransistor interrupt my microcontroller?

texts:
I bought a couple of phototransistors. They all have one lead shorter than the other. I assume that, like normal diodes, this means that the longer lead goes to V+ and the short end goes to GND.

I set the phototransistor up like so:

I put the output line into my interrupt pin on my microcontroller. When I shine a bright light on the phototransistor, the microcontroller doesn't interrupt.

BUT!!

When I put the same output into my ADC my microcontroller says it reads 5V with the light shining on the phototransistor. It also reads 0.8V when the phototransistor is covered.

Why would a multimeter and ADC read the output as Low/High but it won't trigger an interrupt on my microcontroller. (I know the problem isn't the code because I can take a straight wire from 3.3V to the interrupt pin and it will interrupt.)

EDIT

The logic level is 5V. I put the output pin to a green LED which then goes to ground. When I shine the light on the phototransistor, the green LED lights up. So I'm confident I have enough current.

I want it to trigger when light shines on it and pulls the pin high.

SOLUTION

I had two problems here that combined into a really annoying problem. The first problem was the one stated above. The other problem was that there wasn't enough current flow. I solved both problems by stacking four phototransistors in parallel in a pullup configurations and reversing the leads.

Thanks to Nedd for the suggestion to switch from pulldown to pullup. That made them much more sensitive. I also realized I had my phototransistors pointing the wrong direction.

For this reason I've marked Nedd's answer as the most correct.

I know my solution is not ideal. It's pretty hackish, which is why I didn't answer my own question and mark it as correct. In the future I will probably opt for a different solution, such as the TI OPT-101.


texts: Hi! I would like to connect my LED lights (Vaxmyra from IKEA) designed for 24V system into my 12V system, do I need a current limiting resistor?

texts:
I bought these VAXMYRA LEDs thinking they were made for 12V but apparently they need to be feeded 24V.
Supposedly I'll have to install a 24V DC step-up converter, but this device can deliver up to 3A current. I opened the Vaxmyra LED fixture and I could see there are 8 resistors built in (or at least I think they are resistors), but does this mean that I don't need a current limiting resistor befor each vaxmyra light I plan to install in my circuit?


texts:
I have an STM32f407vgt development board that has a MEMS microphone (MP45DT02) on it.  I aim to take processable data from this microphone. STM32 provides PDMtoPCM conversion library and I2S peripherals. I have set sampling frequency to 44KHz and used 64 decimation factor to get meaningful data. But the real problem is that microphone output does not change according to sound.

This is the output of microphone. The microphone output frequency is 1.4Mhz. I suspect that the microphone is not responding properly. Is this output is normal or am I doing something wrong?
edit:
This is the clock signal to drive microphone


texts: Transient drop in accelerometer gravity reading when in motion

texts:
I am using Pololu AltIMU-10 v4's accelerometer to monitor the acceleration of my system.
I understand that when the sensor is placed upright on the table, it should measure 1g in the +ve z-axis. However, when I place it on the table and slide it on the table in x and y directions, I see that this measured 1g in z-axis drops during the motion and goes back to 1g after the motion ends. This change in the z-axis readings is always in form of a drop regardless of the actual motion being in +ve or -ve x or y directions.

In the graph below, I carried out the motion sequence below:

Sliding motion in -ve x-axis on the table.
Sliding motion in +ve y-axis on the table.
Handheld upward motion in +ve z-axis in the air.
Handheld downward motion in -ve z-axis in the air.
Sliding motion in -ve y-axis on the table.
Sliding motion in +ve x-axis on the table.
Random rotations of the sensor to see the change in the measured gravity.

It is seen that although the expected acceleration in the axis of motion is measured, the measured gravity drops during the motion. Is this the expected behaviour for an accelerometer?

If yes, how can I remove this transient drop from my readings? I understand that the gravity component may be removed by referring the global [0 0 1] vector to the sensor frame and subtracting it from the sensor measurement. But that doesn't help with this transient drop.


texts: Why does LTSpice take so long to solve this circuit?

texts:
Using a technique to model transformers for a wide frequency range, I got at a circuit like this one: https://1drv.ms/u/s!AhR86nrv-ZA7ivoz9BZIoXfs4GwXIQ?e=L6mcKd
LTSpice takes a long time to solve this circuit, being prohibitive. If I remove the mutual inductances, the circuit is solved much more quickly. However, mutual inductances do not change the number of nodes in the circuit.
Does anyone get a clue on how to solve the circuit quickly on LTSpice?
*Some background about the circuit, it's very similar to this one below, but bigger and with a lot of mutual inductances.


texts: How to design a balun circuit for an RF application?

texts:
I am designing balun circuit for the first time.
Baluns are mainly used to convert an unbalanced signal to a balanced one or vice versa, 50 ohm to 100 ohm impedance matching.
Can somebody tell me how to design the pi-pad attenuator circuit for the 100 ohm impedance side and the selection of the AC coupling capacitor?
In my application, I am using the balun TCM1-63AX+ for the range of signals from 10 MHz to 4000 MHz to interface to a Xilinx RFSoC XCZU28DR-2E RF fabric.
Also attached reference circuit design of the evaluation platform.
Xilinx RFSoC website link.


texts: General 3 Phase Motor Inductance Question

texts: I know that motors are inductive loads. Does the inductance of a 3 phase motor depend on the load on the motor?


texts: Why is DC Voltage called Direct Current ?

texts:
I have had this question since a long time, and didn't find any other place to ask this. So thought will just ask here.

The "DC" in DC Voltage/Supplies stands for Direct Current. So why is it combined with Voltage in the name ?

From what I understand it might have something to do with a supply or voltage which has a constant current at one level. Is that the reason ?


texts: Eagle PCB: how to get BOM from a library part?

texts:
I am using a library part in my Eagle PCB schematic. I would love to learn more about what's inside / what sub-components the library owner used to make it. Is there any way to do this? For example without the internal parts list I have no idea how to estimate the cost.

I tried the run bom.ulp command which didn't work (it only showed the top-level module as being a part in the BOM).

Here is the library in particular I've imported: http://forum.pjrc.com/threads/935-Eagle-library-with-Teensy-3-0-footprint?p=20178&viewfull=1#post20178

Cheers


texts:
I have a device with two possible output pins with max. rating 60V/1A and 12V/100mA that I would like to connect to an ESP8266 (that sends notifications when ON). To keep it simple, I would connect it as a regulated source (3.3V) directly (without transistor or optocoupler) to Vcc and so on so It's not necessary to use another external source. (Maybe I should, as an amateur I'm listening to you.)

Can you please give me a direction how to regulate the source? Linear regulator (as the main part) seems to be inefficient in this case so maybe a switching (buck) regulator? The 60V seems to be high for that and 12V has only 100mA that seems to be low for the ESP (even with a capacitor?) as it needs about ~50-170mA with ~350mA spikes (thats what I have found)? Is there a way how to lower the voltage to rise the current (transformator, inductor or anything? )?

to keep the answer one and clear: How would you regulate/use 60V/1A or 12V/100mA to get ESP's 3.3V/~300mA?