texts: How can i sense if a circuit is open on 2 wires and if so, close the circuit on another 2 wires?

texts:
I have a 4 wheeler that i converted from a mechanical locking differential to an electric one.   the mechanical one had a 2 wire spring loaded switch that as the mechanism rotated it pushed the pin in and closed the circuit and the 4WD light comes on.

Now that i have converted it to electric differential, there's no where for that sensor/switch to go.  instead it has an electric plug on it and i isolated 2 wires that indicate if is in 2WD or 4WD.  in 2WD it is closed on those 2 wires, in 4WD it is open.

It would be easy if it were closed when in 4WD .. i could just hook the light sensor/switch wires to it.  but it's not.

How can i sense if a circuit is open on 2 wires and if so, close a circuit on another 2 wires?

assume i know how to use a multimeter and how to solder... that's about it. :)

Thanks for any help.


texts: How to Step Down a Low Voltage (≤1.0v) DC Signal by a Factor of 0.9 or 50mV Static?

texts:
Alright you e-lectronic masterminds, I've got a predicament that I'm not quite sure how to solve.  Basically, I need to take a 20mA DC voltage signal that varies between 0.1v and 1.0v several times a second (~20Hz) and step it down EITHER by a factor of 0.9, or by 50mV static.  If you were faced with the same situation, how would you go about doing this?  Ideally, I'd like to get my hands on something that's pre-fabbed.  If I could keep the soldering iron out of it, that'd be great..  Thanks!

Update: I must be pretty bad at this. There's like 15 different ways to do this.. Thanks for all your help, friends.. The op amp idea got me thinking.. Would this do the trick?  Is 10kΩ enough for the input on a LM741?


texts: Full charged 12V battery with AC converter "empty" within one second - voltage drops, converter beeps

texts:
I have the following setup for solar power, which worked well until recently:

solar panel <--> solar charge controller <--> small (car) battery <--> converter: 12V DC to 220V AC <--> my power tools

Last year, on a full battery I could power heavy tools such as a belt sander for many hours before it ran empty.
But now, when I use power on a seemingly full battery (see video below, the battery indicator is full at the start) and 13V on the battery which should be good, the voltage drops immediately after starting the tool - and the battery indicator drops to zero. The converter beeps (low voltage warning). After a few seconds, all power supply stops. When I wait about half a minute, the battery indicator jumps back to "full" again, and I can use the drill for another few seconds until it drops again.

What could be the case here? The battery seems to have enough liquid. My initial thought was to replace the battery, but this strange behavior with the indicators on the solar charge controller makes me think the problem might be in another component.

Video of it happening:

https://youtu.be/q8XNPf64qXI


texts: What are the differences between the NTE102/103 and NTE102a/103a Germanium transistors?

texts:
SO the NTE102/103(a) complementary transistors are a bit more compact(both are cans but the a ones are smaller and thinner). But I've noticed that in particular, the NTE102 is much more prone to frying than the NTE102a. But for this transistor latch oscillator circuit:

When I use the (a) transistors, it fails to oscillate. But it works fine as a sawtooth oscillator when I use the NTE102/103 regular can transistors. I really do wonder why this is. For amplifiers, the (a) work far better.


texts: What are the different ways to implement an LED matrix driver circuit?

texts:
I would like to build a driver circuit (controlled by a microprocessor -- Arduino, Raspberry Pi, PIC, etc.) for an LED matrix to support a couple of features:

Dimmable leds
Simultaneously addressable (multiple LEDs can be turned on at once)

Application: Symbolic display (letters, numbers, special characters), charts (bar graph), art ("twinkling effect" via dimming)

What are some approaches others have taken? In particular, I'm interested in software solutions and minimizing resources (chips, component parts, etc...). Below are some approaches I think may work:

Shift Registers to light individual LEDs very quickly at different locations while relying on persistence of vision (to make LEDS appear to be lit simultaneously)
Decoders to manually address single anode/cathode pairs to light individual LEDS. Not sure how to make it dimmable.
Encoders to complete circuitry to  light multiple LEDs.


texts: Should I stop charging my laptop battery at 50%?

texts:
I know that there are lots of questions about battery health and charging, but mine is very specific. For a lithium ion battery, leaving it at full charge (or low charge) damages the battery capacity. I am able on my laptop to stop the charging of the battery at a certain percentage between 50% and 100% in software. This is accomplished with dell's own software, power manager.

The question is therefore, would it be beneficial for my laptops battery capacity health to limit the charging to say 50%, when my laptop is plugged in for extended periods of time?


texts: ADC negative input clipping vs scaling and bias

texts:
So, I have this differential ADC (AD7641) and plan to use AD8139 as his driver. The goal is to digitize a signal (a sine wave) of about 3.5Vpp and 36KHz. The signal is actually single-ended  and centered at 0V, the differential ADC is for pick-up noise reduction.
AD7641's input range is up to 2.048V its with internal reference.
AD8139 will be used for both scaling and biasing (I'd be glad if someone could confirm it works for less-than-unity gains) and the scaled-down output from a precision reference will provide the bias.
I'd like to reduce complexity by skipping input scaling and biasing and just use Schottky diodes (or maybe an active rectifier, but I guess that would defeat the complexity purpose) to clip the negative part.
The ultimate goal is to build a lock-in amplifier, so I will need magnitude and phase information from the input signal. Is it OK to just clip the negative part and sort of "mirror" half of the wave in software?  What is the best practice?


texts: What are my options for running an overpowered motor on this small vehicle I'm engineering?

texts:
I'm engineering a small (~2 kg and less than 0.125 square meters) vehicle that can traverse sand. I've calculated that my four-wheel vehicle will need two drive motors with at least 30 N-cm (= 43.133 oz-in) of output torque and 20 rpm output speed in order for my vehicle to travel at 10 cm/s which is the average speed I want it to travel at.

I'm having a really difficult time finding suitable brushed, DC motors for my needs, and I want to avoid implementing a gear transmission system if at all possible.

I may end up buying a motor from VEX Robotics that has 167 N-cm of stall torque and 100 rpm no-load speed. Is this an OK thing to do? Can I run these motors at the operating point I need them at or should I just keep looking for a better motor?


texts: I am working with an AD7928 (datasheet) and I am a bit confused by the timing diagram (page 25). I would expect to get my first bit off data from DOUT (ADD2) some time after the first falling edge of SCLK after CS' goes low. It would appear t4 may be the dimension that gives this amount of time (40ns maximum). If so, why is the marking from the falling edge of SCLK to the middle of the transition between two bits on DOUT, not to the end of that transition? I would accept that this is simply their convention in diagramming except for the fact that t7 "SCLK to DOUT valid hold time" marked from the falling edge of SCLK to the beginning of the transition between two bits on DOUT? It seems like either t7 should be marked as it is and t4 marked to the end of a transition, or that both should be marked to the middle of a transition. It seems that t7 marks the minimum time for the transition to occur and that t4 marks the maximum amount of time for the transition to occur. Further, why would I even care about t7?


texts: Using resistor networks as voltage ladder

texts: Are there resistor networks which could function as a pre-made voltage ladder? In other words are there variations on how the resistor network is assembled, ie in series or parallel? I've found these but am not sure how they are assembled...Thanks


texts: Using the arduino toolchain as a convenent way to get GCC - Can you disable the code-munging?

texts:
I've been using the Arduino toolchain as a extremely convenient way to get a complete GCC toolchain and build-system with basically zero effort a lot recently.

However, I'm currently working on some extremely low power applications, and in such a setup, I really need to have complete control and insight over everything going on in the MCU firmware. The Arduino default interrupts and libraries are getting in the way, as such.

Basically, is there any way to disable the code-munging the arduino toolchain does, and just use the whole affair as a convenient automatic-build-and-program system? I'm already basically just writing C and doing all my own forward defines anyways.

Basically, I'm just trying to avoid having to install Atmel Studio or any of the huge "proper" IDE's.

Alternatively, are there any no-installation AVR-GCC build-systems available that have a similar interface?

I'm on windows, FWIW.


texts: How the thyristor in a sawtooth generator reach its holding current?

texts:
In a sawtooth generator(circuit below) , the capacitor charges then when the thyristor turns on due to the bias voltage of R2 and R3, capacitor discharges to the thyristor like a short. Then after discharging the capacitor, the thyristor turns off and the capacitor charges again. This will form a sawtooth generator.

Question : "The thyristor turns off after discharging the capacitor", why would the thyristor reach its "holding current" and turn off when there is still a constant current coming from R1?

This current from R1 is approximately 100V/1kohm=100mA. Even if capacitor is fully discharged, this 100mA is enough to prevent the thyristor from turning off.

Since the thyristor act like a short(with small forward voltage), I thought current from R1 will short through thyristor thus the thyristor will never reach its holding current and will forever be on regardless how small the charge from the capacitor is.


texts: What voltage will blow a fuse with given load resistance?

texts:
What is the maximum voltage that a circuit with a 20ohm load and 2.5amp fuse can be connected so that the fuse does not blow?

Can someone answer this with an explanation please?


texts:
My plan is to use a Teensy logic output pin to switch a transistor to switch an infrared LED

The LED handles up to 1A peak current. I will use it as a computerized IR remote transmitter so the duty cycle will be very low.

The entire circuit will be powered by the USB connection. I don't want to add a second USB connection for more power, nor an external non-USB power supply.

Q: how much current should I drive the LED with?

I don't have a target LED current, I just want it to be as bright as is reasonable given the power supply.

I won't have any other outputs or big loads, just a SPI input from a temp sensor.


texts:
I have a sensor with a 3-wire SSC interface, which is SPI compatible, but only has one bidirectional data line. Now I try to read this sensor (https://www.infineon.com/dgdl/Infineon-Angle_Sensor_TLE5012B-UM-v01_02-en-UM-v01_02-EN.pdf?fileId=5546d46146d18cb40146ec2eeae4633b) out and it sends me data back, but since MISO and MOSI are shorted together (as recommended from the chip manufacturer), the data is blocked after the 470Ohm data line resistance, because MOSI needs to go high-impedance after the command was sent.

So, how can I achieve a high impedance MOSI pin on a STM32F410CBU6? I could define it as an input, but then I need to re-init the SPI interface. Is there a simpler solution with less overhead?

Edit: I tried now to configure the SPI in the half-duplex mode. Since I use CubeMX, the configuration for this was easy, but I have no success yet. When the SPI is in the half-duplex mode, the SCK seems to have some small offset (maybe about 0.4V) and the MOSI line has also a strange behaviour. When I switch to the full-duplex mode, this behaviour is gone. What could cause this? I'm reading the sensor our likes this:

HAL_GPIO_WritePin(SPI_CS_PORT, SPI_CS, LOW);
spi_pos->Instance->CR1 |= (1<<BIDIOE);
HAL_SPI_Transmit(spi_pos,&command,1,1);
spi_pos->Instance->CR1 &= ~(1<<BIDIOE);
asm("nop"); // Since sensor needs some ns to switch to sender mode
HAL_SPI_Receive(spi_pos,data,size,1);
HAL_GPIO_WritePin(SPI_CS_PORT, SPI_CS, HIGH);

The SPI is configured as follows:

  /* SPI2 parameter configuration*/
  hspi2.Instance = SPI2;
  hspi2.Init.Mode = SPI_MODE_MASTER;
  hspi2.Init.Direction = SPI_DIRECTION_2LINES;
  hspi2.Init.DataSize = SPI_DATASIZE_16BIT;
  hspi2.Init.CLKPolarity = SPI_POLARITY_LOW;
  hspi2.Init.CLKPhase = SPI_PHASE_2EDGE;
  hspi2.Init.NSS = SPI_NSS_SOFT;
  hspi2.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_32;
  hspi2.Init.FirstBit = SPI_FIRSTBIT_MSB;
  hspi2.Init.TIMode = SPI_TIMODE_DISABLE;
  hspi2.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
  hspi2.Init.CRCPolynomial = 15;

MOSI Full Duplex:

SCK Full Duplex:

MOSI Half Duplex:

SCK Half Duplex:

Edit 2: Here are the settings in CubeMX:


texts: DAC and Digital Input Sharing the Same Pin - Can DAC overpower a pullup?

texts:
I have a situation where a single pin on a board must handle digital inputs and analog outputs. The digital input is actually a comparator (LM239A - Open Collector Output).

The problem is, when serving the role of a digital input, I need to be able to tell the difference between floating, and ground. This requires me to have a pullup on the input.

However, in the case where the pin is acting as an analog output, the DAC will be fighting against that pullup. If the pullup is weak, say 100k, is the DAC able to able to overpower it? For reference, the DAC would be driving an analog voltmeter. The DAC output range is 0-10V and is a DC signal (ie, it's rate of change is pretty much zero).

I drew up a simplified example of the input to maybe help.

Thank you for any advice you can provide!

simulate this circuit – Schematic created using CircuitLab


texts:
In my application I need to measure a voltage that is in the area of 50V, but my microcontroller has to be isolated from my power circuit. I came across the ACPL-C87A-000E IC. I followed the typical application circuit found in page 12 of the datasheet, but at first, I am not using an op amp. The circuit I am now using, converts the 50V to around 1.9V via a voltage divider, which is sent into the IC. This is my circuit:

simulate this circuit – Schematic created using CircuitLab

By looking at figure 13 of the datasheet, page 9 (Vin vs Vout+,Vout-), I thought that I could send the 1.9V in the IC and by measuring just the Vout-, I could get a value that is proportional to the voltage measured (to be exact, in figure 13, Vout- and Vin seem to be inversely proportional). I left the Vout+ pin unconnected. Also, let me point out that all the voltage measurements are taken from digital multimeters.

However, there are some problems with the above-mentioned idea.

Firstly, immediately after connecting the voltage divider's output voltage to the Vin of the IC, there seems to be a drop in that voltage (goes from 1.9V down to ~1.88V). The IC's Vout- value however seems to be correct for the given Vin, around the one expected from figure 13.
Furthermore, the voltage divider's output voltage continues to change slowly, going from 1.84 to 1.89, as long as it is connected to the Vin of the IC. Obviously, the Vout- changes accordingly.
After leaving the circuit on for some time, the voltage divider's output suddenly dropped significantly, to around 0.3 Volts, which I think may be the result of the IC going bad for some reason.

Another option I am considering for voltage measurement is the LTC6992-1, as suggested here. However, I don't know how to implement the last part, of measuring the PWM's duty cycle and converting it back to an analog voltage that can be read from my microcontroller. I am using a Beaglebone Black.

I would be really grateful for any other suggestions, perhaps simpler solutions, for measuring an isolated voltage with my microcontroller.


texts: Atmel SPI "wait for transmission complete" example is wrong?

texts:
I am configuring my first SPI transmission on my atmega328p.
Everything seems right (My SPI interrupt ISR(SPI_STC_vect) fires when transmission is done, and I can see all SPI pins on the oscilloscope behave as expected) , except from this example on atmega328p's datasheet on page 137:

It waits untill transmission is done. (When transmission is done, SPIF bit inside SPSR register becomes 1, you can confirm it on datasheet page 141).
When I try and use this example on my code, my code hangs in that loop, and never leaves it.
But if I do this instead:
        #define BIT(x) (0x01 << (x)) // 0<x<7
        #define BIT_GET(p,m) ((p) & (m))
        ...
        while(BIT_GET(SPSR, BIT(7)))
        {
            ;
        }

The code does not hang.
Or, even if I remove the NOT (!) from the original example, it will not hang, like this:
        while((SPSR & (1<<SPIF)))
        ;

(Which I do not know if its right or wrong, it was just a test of mine)
So is the example wrong? I did google it a bit, and no one seemed to have any issue with this example not working.
EDIT: ADDING CODE
int main(void)
{
init_rxtx_function();
init_SPI();

BIT_SET(SREG, BIT(7)); //Global interrupts enabled I=1

swn(SPSR, 2, 1);//prints SPSR: it is 0
BIT_CLEAR(PORTB, BIT(2));//SS low

sw("Before while\n\r");

SPDR = 5;//Configuration write address

while(!(SPSR & (1<<SPIF)))
{
    if(inter == 1)
    {
        //pass
    }
    else
    {
        sw("SPSR: ");
        swn(SPSR, 2, 1);//print SPSR
    }
};

sw("After while\n\r");
}

/*
inits the SPI as master, changing the default pin overrides.

*/
void init_SPI()
{
    //=====SPI SETUP FOR PT100======

//===SPI pins override====
//MOSI OUTPUT:
BIT_SET(DDRB, BIT(3));//PB3=1
//SCK OUTPUT
BIT_SET(DDRB, BIT(5));//PB5=0
//SS OUTPUT AND HIGH
BIT_SET(DDRB, BIT(2));//PB2=0
BIT_SET(PORTB, BIT(2));//PORTB2=1

//=====FUNCTION MODE SELECT=====
//Master mode enable
BIT_SET(SPCR, BIT(4));//MSTR=1

//======DATA MODE====
//Modes 1 and 3 supported.
//Select mode 1(CPOL=0, CPHA=1)
BIT_CLEAR(SPCR, BIT(3));//CPOL=0
BIT_SET(SPCR, BIT(2));//CPHA=1

//====DATA ORDER===
//MSB first
BIT_CLEAR(SPCR, BIT(5));//DORD=0

//=====CLOCK RATE SELECT=====
//Fosc/128
BIT_CLEAR(SPSR, BIT(0));//SPI2X=0
BIT_SET(SPCR, BIT(1));//SPR1=1
BIT_SET(SPCR, BIT(0));//SPR0=1

//===SPI interrupt enable===
BIT_SET(SPCR, BIT(7));//SPIE=1

//===SPI ENABLE===
BIT_SET(SPCR, BIT(6));//SPE=1

sw("SPSR: ");//status reg. should be: 0x000000
swn(SPSR, 2, 1);

sw("SPCR: ");//control reg. should be: 11010111
swn(SPCR, 2, 1);
}

/*SPI Serial Transfer Complete Interrupt*/
ISR(SPI_STC_vect)
{
    inter = 1;
}

It outputs:

Everything is ok, program stucked in while()


texts: I want to know when the AD9235BRUZ-65 outputs data? I can't make sense of the datasheet or find a way to simulate it

texts:
I need to know when data is output from the AD9235BRUZ-65 digital pins. I need this to create a type of handshake with a FPGA.

Datasheet.


texts: Can the 1D wave equation be recreated in a conductive wire?

texts:
I am ignorant of EE, but not the wave equation, so bear with me.

The (scalar) wave equation \$d_{tt} - c^2d_{xx} = 0\$ describes the displacement (and velocity) of some medium through space and time. It works for air, EM fields, and many physical quantities.

I am interested in recreating transport phenomena modeled by the wave equation within a conducting wire, so the voltage (or perhaps something else) at any point of the wire would be described by the wave equation.

My main interest in this question derives from the difficulty of experimentally (rather than theoretically or computationally) modeling more complex wave equations \$d_{tt} - c(x,t)^2d_{xx} = 0\$  with variable wave speed. If there were a straightforward way of recreating variable coefficient wave equations using EE, it would be helpful to me!


texts:
I have a buck converter of 400 V input, 200 V output, 300 kHz switching frequency, power output 100 W. I am trying to put it into closed loop voltage mode control. It is working DCM mode. Modelling the open loop circuit in MATLAB, I got to know that a simple gain of 0.25 in the feedback path would meet the settling time, gain crossover frequency (one-tenth of 300 kHz) and Phase margin requirements (> 45°).
So I tried to simulate this using Pspice. But I am not getting this to work properly. I did add a shoot-through prevention circuitry, and later removed it as it did not switch on either MOSFET. In the below circuit, it is switching on, but it does so after some time. Why is this happening? The pulses are being produced after some time, but I cannot get why.
Also, these pulses produced are "shifted", please see the sawtooth waveform which is being compared to the OPAMP positive input, it looks shifted.
Although LM318 is a bipolar supply OPAMP, giving it a negative supply of -5V or -12V gives manny error messages in the simulation. So I grounded its negative supply terminal.
What is going wrong in my simulation?
This figure shows (red) Output voltage, (black) output voltage taken from the voltage divider.

Shifted pulses


texts: Trying to get the Run Capacitors right for my rotary phase converter. Getting Weird Results

texts:
I constructed a rotary phase converter from a 5 HP motor.  The converter converts 220 single phase to 240 3 phase.  Well, it is supposed to.  I am getting some very odd results that I am wondering if someone can help explain.

I wired up the circuit exactly how is done below:

I used a ~420 uF starting capacitor and it works just fine starting up.  However, the legs are out of phase when it is running.  The weird part is, even if I remove the run cap completely, it is STILL out of phase!  I had 3 caps on hand, a 15uF, 30uF, and 50uF.  So I did some experiments and I am getting confusing results.  Here are the voltages between the wires:

So there doesn't appear to be a capacitance value I can choose to get all of the legs in phase.  Furthermore, why is it that the legs are out of phase with NO run capacitor?  Is the back emf from the potential relay causing an unintentional phase shift???


texts: can someone help identify and how to test this component

texts:
I'm new to this forum and I am looking to properly identify and how to test this component.
It is from a vintage Suntester power timing light Model 45XA, 6-12vDC.

If anyone can help in describing how it functions and how to correctly test the components I would greatly appreciate it.
The component is the brown cylinder, from Industrial COND. Corp.
inscription reads:
.4-.4-2.5-.028 MFD
600V.D.C

Rgds,
Mick


texts: Difference between Ground and Neutral line

texts:
I'm learning about electrical engineering and I'm confused about the difference between ground and neutral line. What's different between them?

Ok, I've edited this question for everyone can understand why i'm being confused.

I have an Arduino board here and there is a pin called "GND", as i understand GND is stand for "Ground". . So there are 3 different concept that i need to learn : "Ground", "Earth", "AV Neutral" ?

So what is the voltage output of that GND pin ? Is it 0v ? What is the voltage output of "Earth" ? What is the voltage output of "AV Neutral" ?


texts: How to use a transistor to drive strings of LEDs from GPIO pins?

texts:
This is similar to How to drive a 20mA LED From a 4mA max GPIO Pin except that I need a little more hand-holding in order to understand what is happening.

For background, I'm a software engineer and currently only know enough about electronics to successfully test a 9V battery will my tongue.

I have an Arduino Uno board which I have rigged to separately control 3 LEDs blinking in a "chase lights" type of configuration. I have connected each GPIO pin directly to an LED, a resistor, and back to the board's +3V ground pin. The software strobes the GPIO pins at intervals to achieve the desired effect.

With one LED wired, everything looks great. When adding a second LED to each of the 3 small circuits (to "extend" my string of chasing-lights), the LEDs dim considerably. My plan was to eventually wire a string of 10 LEDs for each circuit for a total of 30 LEDs. Obviously, if I can't light 2 LEDs, 10 is out of the question.

So I thought of using a transistor for each circuit with the GPIO merely providing the "trigger" for lighting the strand of 10 LEDs. I have wired-up a few LEDs, a resistor, and the transistor, and connected it all to a 9V battery. It's dark, as expected. There is only one base pin on the transistor, so obviously the GPIO pin should be connected to that, but how should I correctly complete the circuit back to the Arduino board?

I experimented by taking a 3V battery and connecting the negative terminal to the transistor's emitter pin and then touching the base pin as a trigger and it seemed to work, thought the LEDs flickered a little. That might just be because my hands weren't super-steady. Is this the right approach for working with the Arduino's GPIO pins?

Here are all the electrical specs for the components I have in front of me, because the math matters, of course.

Arduino GPIO: 5V
LEDs: NTE30143 5V 25mA (continuous forward current)
Transistor: 2N4401 600mA

What's the "proper" way to use the Arduino's GPIO pins to light a string of 10 LEDs? Can it be done with the components above, or should it really be done with a more complex circuit?

I'm building this as a prototype for some elementary school students to build themselves, and I'd rather make the circuit as simple as possible.

(Bonus points for explaining where the resistors need to go, what their values need to be, and why they need to be there in the first place :)

UPDATE

I forgot to mention that I want to wire each string of 10 LEDs in series, not in parallel I want to minimize the amount of wire required. These LEDs will end up being maybe 4-5 inches apart and the entire string of 30 LEDs will make a big loop, so I don't want to string each LED individually. I'd like to have 3 large loops of 10 LEDs each with all of the controls in a single place.

UPDATE

One last requirement (I think): this has to run off of batteries. No mains power. :)


texts: Circuitry filters and decoupling capacitors example

texts:
I have some question that i want to ask using an circuit example.

What help provide an inductor in Vin and Vout, a short of noise filter? Can i change voltage regulator and maintain same inductors value?
If i change capacitors value, like from 0.1uF and 10uF to 0.01uF and 2.2uF like i see in other type of power supply of the same module, it change significantly the filter frequencies?
Instead of use 3 inductors, if i use multiple voltage regulators, can replace them with only 1 inductor at the power supply?
If i want to place a decoupling capacitor for this circuitry, which value should i use? and which footprint dimension(SMD)?


texts:
I have been reading about dual slope ADC from this material. It states that

  During ramp down, a counter counts the number of clocks until the
  output voltage reaches zero. The number in the counter is then
  proportional to the input voltage

I didn't understand this statement. How is it that the time during ramp-down gives the corresponding digital output. Please can anyone explain? Thanks!


texts: Why can't ferrite cores be used at lower frequencies like 50Hz? To my knowledge, they can only operate at high frequencies.


texts:
I am just learning how to use microcontrollers, and I have built simple circuits using the PIC16F877A. I have built a simple circuit that flashes the pins on PORTB on and off by setting PORTB to 0xFF in HI-TECH c.

The problem that I am facing is that despite doing this, the pin RB0 will not turn on or off after having had it work previously. The weird thing is that it originally had not worked, than it had begun working and now it won't work again.  I was wondering what possible problems might be causing the issue. I am tempted to just order another PIC and try again, but I was just wondering if there was anything else I should try first.

Here is my program

#include<htc.h>
#define _XTAL_FREQ 20000000
__CONFIG(UNPROTECT & PWRTDIS & WDTDIS & HS & LVPDIS);

int main()
{
    PORTB = 0x00;
    TRISB = 0x00;

    while(1)
    {
        for(int i = 0; i<1000; i++)
            __delay_ms(1);

        PORTB = 0xFF;

        for(int i = 0; i<1000; i++)
            __delay_ms(1);

        PORTB = 0x00;
    }
}


texts: PIC:How to enable watch dog timer in PIC18F67K22 controller?

texts:
I am using PIC18F67K22 controller in my circuit.
I don't know how to enable or configure Watch Dog Timers(WDT) in my controller.
Any one have explanation with some demo code of Enable Watch Dog Timer ???

regards,

shailesh


texts: Does Putting More AC Transformers In Parallel = More Power?

texts:
I have two high voltage Microwave Oven Transformers (MOTs) and I need to have more power in my output. Since I don’t have two torn apart MOTs I will not be able to show a diagram for my idea. I can describe it though.

I have 0 Gauge aluminum wire wrapped through the E core of the transformer. I have not modified the transformer body itself by cutting it or damaging it. I have cut one secondary out of the one MOT but not out of the other.

They are both 60 Hz and both use the same load of 1,380 watts.

Then I want to wrap the 0 Gauge wire through the other MOT the same way so that they are both in parallel.

Will this add more power or not?


texts: Building Custom Eagle part with bad documentation

texts:
maybe trial and error is the only solution here I'm trying to build a custom eagle part for board placement. This is the first part I've built. I've got the pins properly placed, but I'm trying to get an outline of the entire component. Here is the schematic from the MFG:

The problem is. I don't know how to place pin one properly. I've done an outline that's close to the nearest grid point. Is that as good as it's gonna get? This is what I have so far. Any tips/advice would help out a lot. Thanks!


texts:
Hi I'm looking to repair the mainboard of my gaming monitor but I'm having a hard time finding the name of the burnt out components. I can't even find the schematic. Please help

Asus pg278q monitor.


texts:
When I try to draw a line in the Keep-Out Layer in Altium by clicking the tab for the Keep-Out Layer and placing a line, the layer suddenly changes to a different one and prevents me from adding to the Keep-Out Layer. Additionally, when I try to place a line and press the Tab key and try to select the Keep-Out Layer from the Layer dropdown box, it doesn't appear in the list. How can I add shapes to the Keep-Out Layer?

Thanks!


texts: Is the LED drop voltage difference between colors linked to the different wavelength energy?

texts:
To me appears that LEDs that emitt light with less energy (e.g. IR and red) have less voltage forward drop than the ones with more energy associated to their wavelength (such as blue or UV).

That would be fascinating.

Is this a true correlation or is it dependent solely on the technology available?


texts:
This might sound like a stupid question, maybe even so obvious that I can't find the answer anywhere else, but could someone please shed light on why inductors don't short out?

With basically all of the inductors that I've seen, the wire coils touch.. a lot. Why doesn't the electron flow just take the "path of least resistance" and go straight from the input lead to the output lead?

To illustrate, my understanding of how electricity flows through a conductor is as follows (please excuse the dodgy looking MS Paint overlay):

Since the wires are touching, I'm wondering why it doesn't go like this:

The only explanation that I could think of is that the silver-coloured contacts at the ends (somewhat covered by my drawing) are actually elemental silver, and the wires are only coated in copper. This seems like the only explanation, because according to www.tibtech.com/conductivity.php and chemistry.about.com/od/moleculescompounds/a/Table-Of-Electrical-Resistivity-And-Conductivity.htm, the only thing with less electrical resistance than copper is silver. Presumably the difference is sufficient to force the current to run the entire way around the coil and not just short through the copper.

If anyone could shed light on this, that would be great - thanks :)


texts: Where I can find a list of logic gates with non-inverted output?

texts:
I'm doing my homework, where I need to build a pulse duration counter device. I've done it, but now I understand, that every time I build parts of the device, I have to specify the chip, that contains logic elements I used.

I choose a TTL logic, start searching and notice that all elements have inverted output, like AND-NOT. I just can't find chips with elements with non-inverted output, like just AND or OR. Where I can find it?

P.S. it would be excellent, if you provide USSR chips, but it's not necessary.


texts: oscillioscope specification for low speed usb device

texts:
I want to capture the low speed USB device packets, What specification is required for it? I am looking for inexpensive oscilloscope.

As USB low speed device work at 1.5 MBit/s, Is hantek 6022be sufficient for it?

Hantek 6022BE Specification

Bandwidth: 20MHz;

Sample Rate: 250MSa/s

Product page: https://www.amazon.in/HT6022BE20Mhz-Digital-Storage-Oscilloscope-Bandwidth/dp/B009H4AYII


texts: Does anyone know what the team at Nest Thermostat uses as the switching mechanism for the thermostat? I would like to build my own DIY Thermostat utilizing the ESP32 as a learning project. I have searched and found some Mosfets that could work along with some Relays however would really like to keep the project small and compact. Therefor these components would be to large. Would love to know if there is a surface mount component possibly multi channel that could easily replace the above items to perform the 24v switching task? Thanks!


texts: Which op-amp type for a single supply V+?

texts:
No V- from a USB

I am powering an active bandpass filter from USB, but don't know from all the choices which op-amp characteristic (or type) to look for.

Because it's USB, I have no V-, but I've read that you can even get around this by using ground to be lower than the lowest voltage of the input (relatively V-).

I see "rail-to-rail" and "single supply" types, but there are also exceptions to these.


texts: How to measure current practically in a circuit

texts:
I have to measure this circuit, I have done the theoretical calculations using Kirchhoff's 2nd law, but I'm having troubles in measuring the current in each part of the circuit:

I have to measure current in I1, I2 and I3 practically, so where I need open the circuit to obtain the current closing the net using a multimeter?

simulate this circuit – Schematic created using CircuitLab


texts: Electret Microphone preamplification - will it work for dynamic type microphone?

texts:
I'd like to use this diagram to pre-amplify a microphone signal in order to activate the analog input of my arduino

(source: reconnsworld.com)
Will it work with a dynamic microphone in place of an electret microphone?


texts: How does the capacitor push up the voltage in a diode clamp?

texts:
I am having a hard time understanding how a capacitor is able to charge to a higher voltage level than the peak of the input source, like in a clamp circuit. I've been reading articles on clamp circuits, like this one, but I am still confused as to how a capacitor can charge up to a voltage beyond what the voltage source is giving it. I.e. a peak detector makes sense to me, but the clamping circuit does not.

I have simulated the clamp circuit with the falstad simulator

The simulation didn't help that much; I did notice that the voltage on the right side of the capacitor bottoms out when the diode conducts, but I'm still confused about this.


texts: Why are these two electrolytic capacitors so hugely different in size?

texts:
I'm recapping a vintage amp, and that amp has two larger caps at 2200uF @ 50V. I have sourced some possible replacements, and I'd like some insight into why these are SO different in size, and how I should think about that. (These are both new parts. Original cap not pictured. I know they are slightly different in capacitance--the schematic asked for one thing but the original part was another-- but I think the question here still stands since the specs are so close).

The big one is a Sprague Atom rated to 85°C. (data sheet here). The small one is a JWCO part rated to 105°C. (Data sheet here)-- it's over an inch long, which makes the Sprague huge at like 2.5"+ and way more diameter.

Now, I get that the JWCO is a sort of no-name commodity part that I don't want to use in an audio amplifier-- I get that. But even a Nichicon audio cap at 2200/50 is only going to be a bit over an inch long.

But what I don't get here is WHY these are so enormously different in size, and what's up with the Sprague? Small variances wouldn't surprise me at all based on materials and construction but this is not a small variance. Even the 50-year-old cap I'm replacing is much smaller than the Sprague (though not as small as the JWCO or a Nichicon).

Thanks for any insight. Piecing together my knowledge of components by example!


texts: Maximum power out of thermoelectric generator?

texts:
The conventional method to extract maximum amount of energy from ThermoElectric Generator (TEG) is to load it with a resistance equal to the TEG's internal resistance as the maximum power transfer theorem.
However, if the load of TEG is not resistive but inductive like boost converter. How would you use maximum power transfer theorem here?

Also how about the case the boost converter operates in DCM mode so the time which NMOS switch ON is much larger than the time for which PMOS switch ON?
Is there a special to do maximum power transfer in this case?


texts: I'm building a 3.3 to 5V level converter with a MOSFET but can't reach 800KHz

texts:
I've built a level converter for a digital PWM signal that runs at 800KHz. The circuit goes like this:

*I'm using a BS170 transistor instead

The problem is the signal gets distorted at around 10KHz, I think the transistor is supposed to handle the bandwidth. How can I raise the frequency limit?


texts: STM32L053C8 Questions on power schematic

texts:
I am developing a low power board using the STM32L053C8T6TR and have written a schematic to power the board with a 3V coin cell battery and have a few questions.

The datasheet mentions N x 100nf + 1 x 10uF caps on VDD, VSS and while looking at the discovery board schematic, I replicated and came up with the following

In addition to that, the schematic shows the following. Based on the DS STM32 Getting Started I have the following

My question, I am trying to power the board primarily through a coin cell at 3V with the ability to run power through USB if needed while programming (If not using the STLink SWD breakout)
Based on the schematics and documentation, I am not really able to tell if I am using too many caps around the LDO, and around the bead between VDD-VDDA. The documentation states N * 100nF + 1 10nF. What is the optimal capacitance and number of caps needed on the 5V input side, and on the output side?

Same goes for the VDD-VDDA capacitors and bead. Am I over subscribing capacitance for a 3V coin cell?

Edit: After looking through some more schematics and datasheets, i'm not even sure there needs to be caps between VDD-VDDA with the bead. Most schematics I see only have the bead. Since this is going to be a super low power dev board working on a coin cell, is all that needed?

Edit: Edited the question to focus on power input and capacitance around the LDO and VDD-VDDA


texts:
Reading the datasheet of the FT232R from FTDI did not answer my question so I'm asking here:

I have the following configuration:

VCC: +5V
VCCIO: +3.3V

The Part I'm unsure:

The datasheet of the FT232 states the following:

Integrated level converter on UART and CBUS
for interfacing to between +1.8V and +5V
logic.

and a maximum input voltage as:

IOmax = VCC + 0.5V

My question is:

Am I damaging the FT232 if my input high voltage is +5V on either RXD/TXD?
Because I think I won't because of the stated ''feature'' but I want to be sure.

datasheet for the ft232r

EDIT
If you want a reason why I'm specifically asking then: sparkfun sells these FT232 adapters which can be either 3.3V or 5V. But the only difference between the two is that either 3.3V or 5V is connected to VCCIO. Since using 3.3V on VCCIO does not affect the maximum input voltage then I would be able to use a +5V system to send and probably receive data too. This means the 3.3V version would be much more universal than the 5V version. (because I don't want to use two boards)


texts: Is there a name for "chips out of which one can build a CPU"?

texts:
Some people enjoy building "homebrew" CPUs out of simpler ICs.

Is there a name for "chips out of which one can build a CPU, if you have enough of them"?
Is there a name for the other chips, "chips that one cannot build a CPU out of, no matter how many of them you have"?

One can build a CPU out of sufficiently large quantities of 4:1 mux chips
( multiplexers are the tactical Nuke of Logic Design ).
One can build a CPU out of (somewhat larger) quantities of 2-in NAND gates. Or from 2-in NOR gates. Or from a few (perhaps one) CPLD or FPGA.

However,

One cannot build a CPU out of 2-in XOR gates alone.
One cannot build a CPU entirely out of diode-resistor logic alone.
One cannot build a CPU entirely out of D-type flip-flops alone.

Is there some term or phrase for distinguishing these two categories of chips that is less awkward than "chips out of which one can build a CPU"?


texts:
I want to make a device that measures absolute small scale 3D speed. Small scale as in 10-150cm movements, and absolute as relative to ground and not relative to the device (the device will turn, roll, etc). Most use cases are indoors, so a GPS won't help. The range 0-5m/s would be the most interesting. Is this possible to realize? Preferably in a watch like footprint.

I bought the TI chronos watch thinking that would be decent candidate with its accelerometer and easy prototyping through python. However I met some problems.

I can't seperate gravity. Can this even be done if the device turns? I guess at least a gyro calibrated to ground would be needed?
Accuracy. The chronos had only 8 bit accuracy, and even then has quite a lot of noise. Even after removing gravity I suspect from simply integrating acceleration I could end up with crazy speeds.
Detecting zero movement. Closely related to the 2 above.

Hopefully my question is not too open ended.


texts:
Basically I need a low-cost wireless communications module. My requirements would be ~10bit/s , ~2-3m range and up to 1$ for each. Can be receiver and transmitter separately as well. I think it should be working in 433Mhz band.

And suggestions?


texts: How to choose resistors in a decade counter circuit?

texts:
I'll start off by stating that I am a novice.

I'm trying to figure out how to use a decade counter, so I've constructed this circuit:

It worked fine, but now I'm wondering how it was decided to use a 47kΩ resistor on pin 15 and a 10kΩ resistor on pin 13?

How would I calculate these required resistor values in a different setting?


texts:
I have this circuit:
and I have to find the voltage gain at the middle of the band (with all capacitors shorted).
$$
G_v=\frac{Vo}{Vi}
$$
I've drawn the small signal model in which:
$$
Veq = \frac{Rb1//Rb2}{Rb1//Rb2 + Rs}Vin;       Req = RB1//RB2//Rs
$$
1 - Is it correct?

simulate this circuit – Schematic created using CircuitLab

2 - How to solve it and find Vo/Vi?
By now I have:
$$
Vo = -g_{m2}V_{pi2}(RC//RL)
$$
$$V_{pi2} = V_{e1} -V_{e2} $$
But I don't know how to find Ve1 and Ve2.
Can you please give me and advice?


texts: What battery specifications to look for, to run the following setup?

texts:
I need to run 3 brushless motors(3/5k rpm) of 10hp and 120v each, on a lightweight battery(upto 50 kgs) for minimum of 7 hrs.  Is this even possible? What is the closest option  I can go for.
I am working  on a copter.


texts: Implementing standby mode in MIC22705 DC-DC

texts:
While looking at a previous design of i.MX6 CPU-based mini-PC, I was confused by the implementation of Standby function for MIC22705 DC-DC.
PMIC_STBY_REQ is an output that comes from the i.MX6 CPU. the way I understand it, when a standby request comes from the CPU then the CPU is intending to go into a low power mode state. so I expect that the DC-DC which used to supply 1.2V for the CPU VCC, will have to change its supply voltage to a another, maybe lower voltage.
Below, is a DC-DC design which was implemented by an old engineer which used to work in my company. he didn't write notes regarding this standby mode part of the design.
How does Q4 transistor which connects between FB and VDDSOC_1P2 is doing this function?
I also didn't understand why R86 is needed in this case.


texts: Problems with Conversion of 1960s era transistor radio to a guitar amp

texts:
I have an early 1960 Silvertone transistor radio that I'm trying to convert to a guitar amplifier for a cigar box guitar, aka a CBG. (CBG's are typically built with primitive equipment and the inherent distortions and defects are considered part of their charm.)

The old radio works fine, I put 6 D-cells into it and I can pick up AM stations just fine.

Instructions for conversion are all over the web but basically consist of this:

Ground one wire from the guitar cord to ground on the radio.
Find the volume pot.
Attach the other lead from the guitar random posts on the volume pot and strum until you hear your guitar through the speaker.

We're not talking rocket science here.

Now my radio has 2 concentric pots, one for volume and one for tone. I've been able to identify the volume pot by hooking up my Ohm-meter and turning the volume knob.

Now the problem is, when I attach the leads from the guitar I don't hear the string from the radio's speaker.

Here's the back of the volume pot:

Tap 1 has 9v when the volume control is clicked on, 0v when off.  Tap 2 has 9v all the time. So it's clearly the power switch.

Underneath we find 3 more posts:

Taps A, B and C also have 0v when the volume is off, and 9v when the volume is on.

I pull the batteries and measure resistance (and yeah, I know, the pot is in the circuit so it isn't accurate but I'm just trying to find the "input" lead.

A always reads 4k Ohms, B varies from 2k to 4k, C is at 2k no matter what I do with the volume knob.

1 in always at 2k Ohms, 2 is 0 Ohms when off, 2k when on (which makes sense since it is connected directly to the battery)

So it seems to me that I should be hooking into tap B. So when I hook the rod-piezo to B and to ground I still hear the static of the radio and when I pluck the string, I do not hear the note out the speakers. One member of the cigar box forums said that the rod piezo pickup might not put out enough power, so I tried a wound magnetic pick and got the same results.

And here's the 'schematic' of the radio: (ok, so it is just a parts list...)

All the online tutorials make this look easy, but I'm baffled at this point. And go easy on me, my degree does have an EE in it, but it also has a CS in it and I do CS stuff for a living, that EE was really a long time ago...

Bonus question: I'd love to know why this works, it seems to me that I'm mixing the guitar signal with the radio signal but all the web instructions just say that you don't hear the radio.

Bonus question #2: Just how would I find and cut out the radio section? I'm guess that once I find the right place to tap into I just cut there to remove the radio from the circuit, is it really just that easy?

Update

I have something which may be the real schematic! The radio is almost certainly a Silvertone 700. See https://www.radiomuseum.org/r/sears_roeb_silvertone_700_1217.html

Hopefully this helps!

Note: It turns out this is not the schematic since it is 6v, not a 9v circuit. Thanks to glen_geek for pointing this out.

Update #2

Here's some photos showing the connections. First, the battery has a green and black wire coming off it. With the VOM's black on black, and the VOM's red on green, I get 9VDC.

Here's the connection to the pickup:

And my connection of the positive ground (green) wire. (The green wire goes directly to the battery pack's green wire, it's actually the same wire.)

And the connection to the center tap of the volume pot, B, in the above diagram, which should be the + side of C10.

And just for grins I put the ground to the other wire off the battery.


texts:
I am not sure if this is a good question but I am curious. Consider the following PCB:

I have realized that although the lines leaving the IC in the middle start fairly close to each other, they are significantly separated through the edge of the PCB.

Now I am guessing that the width of and spacing between the leaving lines are determined according to a standard but I am not sure why they are decided to be this wide. Could you explain the reasoning behind?


texts: Reading ECU tacho signal with PIC MCU - noise issues

texts:
Am trying to read the frequency of a 0-12V square signal generated by a motorbike ECU with a PIC. Range 20Hz-300Hz I'm getting strange intermittent noise on the output of my optoisolator, and wondered if anyone can suggest the best way to suppress? LP filter on the output, or condition the input somehow?

Circuit:

A couple of scopes (at MCU pin) last one is a higher RPM:


texts: Transistor alternating between multiple LEDs

texts:
I know how to alternate between 2 LEDs using the simple 2 transistor, 2 capacitor and 2 resistor circuit here.

My question, is if you add another transistor, capacitor and resistor, can you have it switch between 3 LED's, four LED's or even more? I am wanting a circuit that can flash each individual LED around a circle. And if so, how would I do this?


texts: Powering transformers using a switching transistor circuit on DC instead of AC

texts: I've been doing some reading about transformers and have gathered that they are only able to increase or decrease voltage when using AC. I was wondering whether a switching transistor circuit (the circuit that turns on and off really fast), would be enough to induce another voltage in the second coil of the transformer. I've heard that it's the switching property of AC that actually moves the electrons around. Will this constantly switching DC work?


texts: Shared antenna on multiple 2.4Ghz receivers

texts:
I want to use several 2.4 Ghz transcievers (not sure which IC yet, either Atmel AT86RF*** or TI CC) in order to build a simultaneous multi-channel sniffer. The transciever output is differential. I am not interested in transmitting anything.

Is there any way I can use a single antenna shared for all the receivers? How would this affect the RX sensitivity/antenna impedance?


texts: In my project I use 240 W switching power supply. Due to energy saving and some safety reasons, I don't want this PSU to be on permanently. I'd like to use relay to switch it on and off. However, this PSU has a significant inrush current - 40A/230VAC. Do I have to take some special precautions regarding the inrush current? I mean, do I have to choose a relay able to withstand 40A peak current (which would be quite expensive), or is there some other way how to handle this?


texts: What happens when you increase temperature AND flow to a temperature compensated flow sensor?

texts:
OK, so I basically have a WARM AIR valve to control temperature and COLD AIR valve that controls flow. The warm air valve is going to gradually be opened, and I want to know what kind of effects it will have on my temperature compensated air flow sensor (uses current through a heated element to measure flow). Since opening the warm air valve will increase temperature AND flow to the temperature compensating sensor, I have 3 logical conclusions to what will happen with the COLD AIR valve.

The increase in temperature takes priority and will cause an increase in heat to the heated element (biasing it towards sensing a low flow condition), causing an increase in resistance and resultant decrease in current which commands the flow valve to open wider to send more COLD AIR flow downstream.

The increase in flow takes priority and will cause an decrease in heat to the heated element (biasing it towards sensing a high flow condition), causing a decrease in resistance and resultant increase in current which commands the flow valve to close down to send less COLD AIR flow downstream.

Neither parameter takes priority. The increase in flow causing a cooling effect on the heated element is counteracted by the increased temperature of the air, and the flow sensor is none the wiser.

Has anyone who has worked with temperature compensated air flow sensors help me understand which response is the most likely? NOTE: I've already confirmed that increasing COLD AIR flow to the sensor sends a command to close down the COLD AIR valve.


texts: How do microcontrollers (MSP430G2452/G2553 specifically) behave when the battery runs low?

texts:
In the event I decide not to monitor the battery (see below), I'd like to know how microcontrollers behave when battery life is low - specifically the MSP430G2553/2452. Do they reach a point and stop, or is there a chance they might behave strangely, or periodically reset? (I.e. this is a silly thing to do.)

Thanks! :)

PS. I've seen these questions on how to monitor battery levels:

How to Convert 0 to 10V analog signal to 0 to 2.5V for ADC input?

and

Voltage dividers and ADC's


texts:
So my problem is that I have 3 steppers and using the Accel Library I tried to make them move simutanousley, first of all two steppers move at the same time then a third one continues to rotate,

However when I upload the code and the program starts running the steppers start to vibrate, like they are struggling to rotate and throughout the program the steppers will vibrate in place for a certain amount of time and then continue to rotate. Also as it is vibrating it is also counting those little movements as steps.

These steppers are rated 2.5 A and I am using a 12v power supply along with a motor controllers and arduino.

Here is the motor controller that I am using:

http://www.ebay.com/itm/Stepper-Motor-Drive-Controller-Board-Module-L298N-Dual-H-Bridge-DC-For-Arduino-/170926726867?pt=LH_DefaultDomain_0&hash=item27cc06ded3

Here is the stepper that I am using:

http://www.ebay.com/itm/1-pc-Nema-17-Stepper-Motor-2Phase-68oz-4wires-CNC-/190505160717?pt=LH_DefaultDomain_0&hash=item2c5afe100d

Here is the code that I am using:

            // MultiStepper.pde
            // -*- mode: C++ -*-
            //
            // Shows how to multiple simultaneous steppers
            // Runs one stepper forwards and backwards, accelerating and decelerating
            // at the limits. Runs other steppers at the same time
            //
            // Copyright (C) 2009 Mike McCauley
            // $Id: MultiStepper.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $

            #include <AccelStepper.h>

            // Define some steppers and the pins the will use
            AccelStepper stepper1(AccelStepper::FULL4WIRE, 5, 4, 3, 2);
            AccelStepper stepper2(AccelStepper::FULL4WIRE, 9, 8, 7, 6);
            AccelStepper stepper3(AccelStepper::FULL4WIRE, 13, 12, 11, 10);

            void setup()
            {
                stepper1.setMaxSpeed(200.0);
                stepper1.setAcceleration(200.0);
                stepper1.moveTo(10000000);

                stepper2.setMaxSpeed(300);
                 stepper2.setAcceleration(100.0);
                stepper2.moveTo(600);

                stepper3.setMaxSpeed(300);
                stepper3.setAcceleration(100.0);
                stepper3.moveTo(700);

            }

            void loop()
            {
                // Change direction at the limits

                      if (stepper3.distanceToGo() == 0)
                       stepper1.run();

                stepper3.run();
                stepper2.run();

            }


texts: What is the purpose of BAV70 in this schematic?

texts:
I've found this schematic for an Arduino board:

What is the purpose of the two diodes (BAV70) in these two applications?


texts: Calculating the annual energy consumption for a fridge

texts:
I'm looking at a spec sheet for a fridge that I'm interested in buying:http://aegelectrolux.co.za/doc/S53420CNX2/SpecificationSheet.pdf and http://aegelectrolux.co.za/cooling/bottom-freezer-fridges/s53420cnx2-stainless-steel-bmf.html.

I was wondering how they calculate the annual energy consumption of 243kWh?

According to the spec sheet and the website , the watt / connected load is 120. If I calculate the annual energy consumption, I get:

(120W * 24 hours) * 365 days / 1000 = 1051.2kWh.

Am I doing something wrong? Quite new to doing these types of calculations so I might have missed something.


texts: Powering two 19v devices from a single 12V to 19V converter

texts:
I am building a laptop charger to run off of a 12V source (lithium batteries in a camper). Initially, I was just going to replicate this article to make a 12V MagSafe 2 charger for my MacBook Pro (up to 85W). I bought a 12V male plug rated for 15A, and this 12V to 19V converter rated for 8A output (152W). Would there be an issue if I also ran a 19V LG monitor (up to 40W) off of the same 19V output in addition to the MacBook Pro? Could connecting/disconnecting one cause a surge in voltage or current for the other?
UPDATE: I finished building this and so far so good, it works! I will update this with a DIY write up when I make it. Thanks for the confidence. It tested it on a really hot day, ambient temps at 30c. The wiring is at ambient temp and the converter is barely warm to the touch. The male 12V plug gets slightly warm but not hot at all. The system uses up 1W of power with nothing plugged in. The MagSafe tip does start to build heat if left unplugged. I suspect this is due to the converter always sending out 19V to the tip, even when not plugged into the MacBook. The AC charger only sends out 3V to the tip when unplugged.


texts: Identifying the parameters of a linear state-space-model using Kalman Filter

texts:
I have a linear state space model (SSM) that looks like this

\begin{align}
    {\dot {x}} & = {\rm \textbf{A}}{x} + {\rm \textbf{B}}{u}                                     \\
    {y}    & = {\rm \textbf{c}}{x}
\end{align}

I was able to roughly estimate the value of the matrix \$A\$ & \$B\$. While \$C\$ is known! I would like to fine tune the value of the elements of these matrices.

\$\textbf{A}\$ is 4x4,
 \$\textbf{B}\$ is 3x4, and \$\textbf{C}\$ is 1x4. There are made up from a combination of ten parameters. Can I use the Kalman filter to somehow estimate the value of these parameters? If so, can you please explain to my how I can do it and if I need to redfine my system.

Thinking along the line of Online-parameter estimation. If Kalman Filter cannot be used, can you explain why and what alternatives are there?

Thank you for taking the time to read my question


texts: Help find data sheet for micro-controller?

texts:
I found a packet of 10 micro-controller in my brother's electronics stuff. It reads "Atmel ATMEGA168A-PU".

I looked at Atmel's website but could not find any such product. I need it's data sheet to know that it is capable of ? I would like to play with it.


texts: Is there no current between these terminals?

texts:
This is related to charge carries movements out of transistor terminals. Assuming a transistor in common emitter connection is biased properly where resistors are omitted for simplicity. Before asking the question here is what I know:

From V3's negative terminal the electrons will enter to the emitter terminal following the path A->B->C.

Most of these electrons will be drifted to the collector and from there they will follow X->Y->Z. The rest of the electrons will recombine with the holes in the base and will cause electron flow from the base to D.

My questions is:

Is there literally no charge movements(current) between B and K?


texts:
Can anyone tell me what plug this is? Looks like a type of USB, but it's smaller than micro USB. It's being used on a Bluetooth motorcycle helmet kit, to connect stereo speakers and a microphone to the main unit.

I'm looking to order more of them so I can build a custom adapter to allow plugging in any headphones via 3.5mm jack.


texts:
I have a microphone whose output needs to be limited to 0V-5V. The microphone itself should be picking up audio from its environment (such as a living room). Later, specific signals will be identified from the audio stream that the microphone is picking up. The output of the microphone will lead into an analog input pin of a microcontroller which will do all of the signal analysis. But for now, all I'm focusing on is the microphone.

I've done some googling and have discovered auto-gain amplifiers that seem to be able to adjust their gain depending on what the output voltage is. If the output is too low, the gain will increase, and if the output is too large the gain will decrease. If I understand this correctly, this should be the type of behavior I'm looking for. I think this process of limiting microphone output voltage is known as compression in the audio world?

Anyways, I've found an example or two of an auto-gain amplifier being used to ensure a minimum output voltage, but I'm struggling to find out how to use one to ensure a maximum output voltage.

The core of my questions are:

1) Is it possible to use an auto-gain amplifier to limit the output voltage of a microphone to a maximum of 5V with an unknown input voltage?

2) If it possible, is an auto-gain amplifier the best choice for this? If it is not possible to do this with an auto-gain amplifier, what are some other methods that may accomplish this?

3) If an auto-gain amplifier is indeed a suitable choice for this task, how would one go about selecting/wiring an auto-gain amplifier?

For reference, a microphone I might want to use is the CMA-4544PF-W. Some other information that might be relevant is that I expect the ambient noise of the environment the microphone is in to be around ~50dB-60dB on average.

I can clarify any additional details I haven't mentioned here if necessary!

EDIT: When I wrote this I wasn't clear, I still do want to amplify the microphone signal before it reaches the input pin of the microcontroller. So although I expect the microphone to output a signal in mV, I'd like to strengthen the signal a bit. I'm just worried that if I use an amplifier with a large gain that the output could possibly exceed 5V. My thought process is that an auto-gain amplifier would be able to both amplify the input signal as well as limit the output amplitude to less than 5V.

Thanks in advance!


texts: The schematic is made by Great scott (a YouTuber).I need to know can we add a current limit to it by using a sense resistor and feeding the sensed voltage proportional to the current in the feedback controller opamp?My question is can I add the output of this current limit part  to the voltage feedback controller opamp?(in the inverting input)?


texts: Choosing Voltage Divider Resistor For LDR

texts: I have a 2Mohm dark resistance LDR and i'm wondering what would be the best choice for the fixed resistor. If I made it too large then it would be very insensitive and if I made it too small then it would be very sensitive and draw more current which I heard can create more noise on the MCU ADC. What would be a good value to use ?, would 10k be fine ?


texts: Why can't I use a variable in an if statement?

texts:
I am new to Pic microcontrollers and just started programming them.

Now my problem lies in this code:

unsigned char i;
unsigned char firstRun;
unsigned char secondRun;
unsigned char released;
void main() {

     unsigned char i;
     unsigned char firstRun;
     unsigned char secondRun;
     unsigned char released;

     i = 0;
     firstRun = 1;
     secondRun = 0;
     released = 0;

     TRISIO.B1 = 0x01;
     TRISIO.B2 = 0x00;

     CMCON0 = 0x07;
     ANSEL = 0;
     while(1){
              if(firstRun == 1){
                          GPIO.B2 = 1;
              }
     }
}

Why don't I get any output on this port?

I want the pin to turn on, but it doesn't.

I know that I have hooked it up right on the breadboard.

UPDATE:
Im using the 12f683, the MicroC pro compiler and IDE, and im programming using the MPLAB X IPE

It has worked with the line GPIO.B2 = GPIO.B1 inside thw while 1 block
GPIO.B1 is input

This dosent work eighter:

char firstRun;

void main() {
     TRISIO.B1 = 0x01;
     TRISIO.B2 = 0x00;

     CMCON0 = 0x07;
     ANSEL = 0;

     firstRun = 1;
     while(1){
              GPIO.B2 = 1;
     }
}

CONFIG:

Assembly:

_main:

;Forste test.c,3 ::                 void main() {
;Forste test.c,4 ::                 TRISIO.B1 = 0x01;
        BSF        TRISIO+0, 1
;Forste test.c,5 ::                 TRISIO.B2 = 0x00;
        BCF        TRISIO+0, 2
;Forste test.c,7 ::                 CMCON0 = 0x07;
        MOVLW      7
        MOVWF      CMCON0+0
;Forste test.c,8 ::                 ANSEL = 0;
        CLRF       ANSEL+0
;Forste test.c,10 ::                 firstRun = 1;
        MOVLW      1
        MOVWF      _firstRun+0
;Forste test.c,11 ::                 while(1){
L_main0:
;Forste test.c,12 ::                 GPIO.B2 = 1;
        BSF        GPIO+0, 2
;Forste test.c,13 ::                 }
        GOTO       L_main0
;Forste test.c,14 ::                 }
L_end_main:
        GOTO       $+0


texts: What does "material finish" imply in heat-sink terminology?

texts: I was looking for a heat sink in a long list of products. In heat-sink datasheets, I usually see terms like anodized, no finish or degreased finish. What do these terms mean? What information they give about the heat-sink. Do they give information about surface insulation of the heat-sink?


texts: Did I implement this function with a MUX correctly?

texts:
I have this truth table:

Which gives this SOP
y = A'B'C + A'BC' + AB'C' + ABC

I tried to use a MUX with 2 selects and 4 inputs and I got this (using A and B as the selectors):

I'm pretty sure it's correct because when I light up A, B and C according to the truth table I get the right value for Y but I just want to make sure.


texts:
Has anyone operated TL494 on +5VDC practically as it works in simulation software ?

minimum operating voltage indicated in datasheet is +7VDC .

please confirm.


texts:
Texas instruments offers source code for a Bluetooth stack (Serial Port Profile) that was written by Mindtree.  It runs on an MSP430 microprocessor and interfaces with their baseband controller chip (i.e. the RF chip).  This uses the FreeRTOS operating system.  This software comes in the form of several demos; the one I used is called the accelerometer demo.  This chipset is part of custom handheld hardware I am developing.
I am running the GA1.0 release (modified accelerometer demo to work on the custom hardware).  I'm trying to simply trying to pass data between Bluetooth SPP and a UART running at 78K.   I have SNIFF mode disabled and am disabling RTS in the UART interrupt.  No processing is done in the Interrupt, other than a write to a buffer and a semaphore take.  I have a low priority task that handles buffering.

All I need the chip to do is provide a link between the Bluetooth and a UART running at 76K (this UART connects with our DSP processor).  Currently, the DSP is the brains of the hardware and communicates with a PC GUI via USB.  I want to take the DSP UART and forward it over Bluetooth instead without the DSP knowing or caring what its UART is connected to.

As constructed right now, the software connects via bluetooth correctly and I've verified transmitting and receiving data.  At low rates, this works great.  Since the DSP is always transmitting a status message out its UART, I can connect a PC with a bluetooth dongle to the hardware, and use Putty (serial port terminal) to watch this status message coming across correctly.   However, once I try to connect with our PC GUI, the resulting RX traffic on the bluetooth is such that the software can no longer service the DSP UART interrupts in a timely manner.  With no Bluetooth RX, I'm getting over 100 UART interrupts before my task is able to process the data, even with the task's priority set to highest.  I imagine it's a great magnitude more once RX data starts coming in, which currently crashes us.  Unfortunately, this MSP430 processor does not offer DMA for the UART we are using, and does not offer hardware buffering.

My attempts at fixing this have always lead to one of three outcomes: my UART interrupt overflowing, the BT UART interrupt overflowing, or my UART buffer overflowing when the Stack can't manage to send the data in time.  The developer guide says that at 18 MHz and 115K, the average data throughput is 84K, and the average CPU utilization is 10.7% yet the software can't keep up with a 78K UART.

It's my fear at this point that the Bluetooth UART interrupt (part of Mindtree's stack) is hogging too much CPU to allow the handling of any other interrupts at the rate we want.

Has anyone had any success integrating the TI/MindTree Bluetooth stack?  If so did you run into these same issues?  I'm basically loooking for any and all suggestions on how to overcome these issues.


texts: Is it possible to drive a 4x4 RGB common-cathode LED matrix with a MAX7219?

texts:
The MAX7219 (datasheet) is a LED matrix driver that's designed to drive an 8X8 single-colour LED array.
tronixstuff has an intro on how to use it with an arduino that has some relevant diagrams.

I'm wondering if it's possible to use the chip to drive a 4x4 common-cathode RGB LED matrix? This is effectively 3/4 of the intended matrix, so if it weren't for the common cathode aspect, it would be easy. But the chip only has 8 in and 8 outs, so it would not work to treat it that way, because all three 4x4 matrices share only 4 cathodes, so there will be interference.

So I'm trying to figure out if it's possible to get around this problem in a not-too-painful way, perhaps using some kind of charlieplexing scheme. Or should I just give up and go back to 74HC595Ns?


texts:
So I have bought a photodiode, which I intend to hook up to the analog port of my Arduino, so that I can measure differences in the light that the photodiode picks up.

I realized, that when I don't ground the photodiode, I get a lot of mV spanning from 2600mV to 5400mV when I measure with my multimeter - Obviously, however, I cant supply my analog ports with 5.4v or possibly more, as I would destroy the Arduino.

I then tried to ground my anode with the output just before the resistor as follows:

simulate this circuit – Schematic created using CircuitLab

Unfortunately now, I get close to nothing with a 10kΩ resistor. even with 40kΩ, the output is nothing to brag about - I would at least expect something in 1000mV range, but I barely get 200mV.

What's going on here - Am I doing anything wrong?


texts: When an amplifier output clips at a certain voltage, does that mean the maximum voltage that its output can provide is the voltage value where the clipping occurs?


texts: How do we write damping factor for a general RLC circuit

texts:
I am not sure how do I calculate the damping factor of a general RLC circuit. I have searched many books and they all talk about only when RLC in parallel or series.
What if I don't have a circuit in which all are not exactly in series/parallel, so in the case where there is only one independent voltage source and a network of R,L,C is there, if I make the voltage source 0 and combine the R,L,C in such a way that it becomes a perfect series/parallel is that method correct?
If not then how am I supposed to solve this?


texts:
I am trying to replace a analog switch (the switch is a momentary button in a low current DC situation) with optocoupler.

Is it possible to use an optocoupler as a switch (i.e. just on/off)?

Ignoring the current/voltage that optocoupler is capable to output.

EDIT:

Is it possible to use an optocoupler to  short two wires carrying low current DC signal?

Basically I am trying to hack a circuit and add Arduino control to it and from my testing I am unable to obtain much more info.

Hope this makes it clear...


texts: Alternate to a proportional linear solenoid

texts:
I am trying to build a circuit using gears, motors, and relays only which mimics the motion of a proportional linear solenoid i.e. Hold a spring compressed at a certain distance depending on the current passed, and push/ release it further based on the increase/ decrease of current. The compression and release is quite frequent, something as frequent as one pressing the car clutch while driving.

I am trying to use a cam follower mechanism but it doesnt work out. Can you please help me out in this regard?.

Thanks in advance


texts: Do i need external pullups to operate the I2C peripheral on an STM32L412? I was assuming the internal pullups for the GPIO would be sufficient but the communications look very slow (pictured). It seems like the ACK bit is there (9th clock pulse low) but nothing happens afterward


texts:
As an embedded software engineer I am familiar with "application-level" (if I may call them) pads configuration, such as; function (GPIO, i2c, etc), direction (input or output), active high or low, its initial value if output pin. Yet, I still don't understand a number of electrical properties that also need to be configured for a pad.

The list is a bit long, but to get more accurate answers I would focus on IB and OB in this thread and I will dedicate other threads for the rest. I would appreciate if I get clarifications to the following points:

1) what are output buffer and input buffer for a pad.

2) what is the effect of enabling/disabling these buffers on pads.

3) Is this configuration recommended or necessary.

4) In which case a pad needs input/output buffer to be enabled

In advance thank you.


texts: Finding input resistance for this circuit

texts: How do I find the input resistance for this circuit.  I think it should be infinite but not able to analyse properly. Thanks.


texts:
I want to have an extremely long-lived (at least one year) blinking LED with a single battery, like one 9V. Think like the battery indicator light in a smoke detector.

The LED doesn't matter to me. Preferably I could use a cheap 5mm one. I have already tried this with a standard 555 timer and LMC555 CMOS timer, the latter lasting longer than the former but both only into a range of several weeks. I also used a modified duty cycle that was well less than 50%. I believe the issue is that any of the 555 timers will draw some power that will eventually drain a 9V well before a year.

A Leona Esaki circuit seems finicky; I can't even get it to work with my current set of transistors.


texts: Connecting a Silicon Temperature sensor to MCU

texts:
I have a project where I need to connect a Phillips KTY83-1 Temperature sensor to an MCU to measure temperature. It appears that as temperature changes, the resistance of the device changes. I am wondering if the circuit to connect it to the MCU (TI MSP430F5529) is as simple as a voltage divider, and size it to +3.3V to 0V? There is a minimum current requirement of 1mA, so do you just size the resistors so that in the worst case you get 1mA through?

Also, how would I protect the input from the outside world if I want to be able to remove and attach the probe at will. Will a Zener Diode selected to just over VCC do the trick?


texts: Communicate with bluetooth module from Arduino Uno

texts:
I'm trying to get my bluetooth module into command mode. I have pin 0(RX) on the Uno connected to the UART_TX pin on the bluetooth module, and pin 1(TX) on the Uno connected to the UART_RX pin on the bluetooth module.

Heres the sketch thats running on the Uno.

int incomingByte = 0;   // for incoming serial data

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);   // opens serial port, sets data rate to 9600 bps
  Serial.flush();
  //enter command mode
  Serial.println("$$$");
}

void loop() {
  // send data only when you receive data:
  if (Serial.available() > 0) {
    //read the incoming byte:
    incomingByte = Serial.read();

    //say what you got:
    Serial.print("I received: ");
    Serial.println(incomingByte, DEC);
  }
}

This is what I see on the Serial Monitor

  $$$

I expected to see

  $$$
  I received: C
  I received: M
  I received: D

What am I doing wrong? Or if its not supposed to do what I expected, what am I not understanding correctly?


texts: How is arbitrary shift function in digital circuits implemented in digital hardware?

texts:
Processors contain an instruction that can shift the input data word by specified number of bits. I assume that this operation would complete in a single clock cycle.
Assuming that the processor deals with 64-bit words and can shift in either direction in a single instruction, it would take 2 set of 64-1 multiplexors where the select signal will be how much we want to shift and the direction.
Are the shift operations implemented using really massive multiplexors? Wouldn't that severely limit the fmax of the design?


texts: How to improve current control loop in power supply?

texts:
I'm working on MCU programmable bench power supply. Its range is 0-50V and 0-3A programmed in 10mV and 10mA increments. It will be published as open hardware and source code that anyone can use it if find it usable. My "expertise" is more on digital and software then analog side and I got some issues with main regulator circuit. Voltage control loop works let's say acceptable for such non-professional grade equipment. As far as I can measure PS (power supply) in CV (constant voltage) mode  (1A resistive load) works predictable and stability and precision is very good. Output ripple and noise is within 2mV using only linear serial regulator but 100Hz component (for rectified European AC) is unfortunately still present and visible. I'm talking about current status which does not include planned switching preregulator.

Something that is far from ideal is current control loop. First I spent some time to make it stable since it was oscillated every time when PS enter CC (constant current) mode. So far I have workable solution with adding C10 (150pF) as negative feedback on transistor Q4. With same load (1A) in CC mode output ripple and noise is huge 50mV. I tried many things and something that I still didn’t find out how to play with poles and zeroes in practice to insure stability and good regulation.
My question is how to improve circuit presents below to get better load regulation and avoid stability issues.

I removed from the schematic for the sake of simplicity digital control (ADC/DAC/MCU). Switching pre-regulator and voltage control loop are drawn as boxes. I_SET is using for set max. current (0-1.5V for 0-3A). -2V derived from -15V using ZD2 was required to go down to 0V otherwise it cannot goes below approx. +1.6V. Not nice at all but currently I have not idea how to eliminate that issue.

EDIT1 (2014-10-30):

A new proposal in accordance with gsills suggestions and decision to change current shunt monitor is depicted below. The picture is exported from TINA 9 simulator. New proposal also required even lower Q4 emitter voltage to reach 0V therefore Zener diode is now for 9.1V. AS you can see I_OUT reference voltage is reversed. I'm wondering is it possible somehow to use possibility to reverse current shunt monitor inputs to get negative current readouts that with some additional modification is possible to use positive I_SET values as before.

EDIT2 (2014-11-07):

I got yesterday INA193 which I decided to use for further testing. Gain is now 20V/V and I'm still using R010 shunt resistor that is a little bit to small since TI recommendation is to have a 100mV drop on shunt resistor for the full scale. Therefore optimal value for 3A will be R033 but I'll probably end up with R025/3W (75mV for the full scale) that is easier to find.
New schematics is depicted below. IC2C is added to invert I_REF voltage (0-1.5V for 0-3A). Please note that switching preregulator and voltage control loop are not deployed (voltage control loop need to be inverted, preregulator is still waiting to be tested).

Thanks to Gsills recommendations few important things was achieved:

C5 between Q4 C and B is not longer necessary (before without it current control loop was unstable).
Feedback loop for IC2A now can works with resistor added in series with C9 (before adding any value makes current control loop unstable).
Simpler control of Q1 (BF245B is no longer necessary).

\$Vout\$ ripple is still considerable, around 50mVpp for 1A and 250mVpp for 3A (full load).

As it's shown on the picture above the main component in ripple&noise is 100Hz which for some reason this control loop cannot reject/filter successfully. I added additional input C6 (tested with up to 10mF) but that does not improve situation. So, now remain the question how to decrease 100Hz on output? Another important question arise in the meantime: how to put under control over shot during power up and power down? Is it possible to achieve that with N-channel MOSFET or P-channel must be used (i.e. IRFP9240)?


texts: Electromagnetic door locks in series or parallel

texts:
I am planning to add two 12V electromagnetic door locks to a door. Should they be connected in series or parallel to the power supply? Or is it advised for each to have its own power supply?
The Power supply is a 24V power supply.


texts:
I'm trying to find the fault on my GTX 970 card and it seems that I have found at least one of the problems. There seems to be a DrMOS(?) that after plugging the power in is getting hot to the touch and anything else stays cool to the touch.
The problem is that I cannot find this exact DrMOS's datasheet from anywhere to clear things up. It is driving me crazy that there are sets of numbers/letters on it, but there are no corresponding results when using Google.
I would be really thankful if anyone could tell me the code/name under what I would be able to find a bit more information about the component.

Original high-resolution images:
https://drive.google.com/folderview?id=1AJP99G8KE7MugQwyeYlKBmCahREtboaV


texts: Confusion with interpreting this power supply's power ratings

texts:
This 24V 150W power supply below is marked by the following ratings on its surface:

I use it for 200-240VAC and it is not clear to me how to interpret these values.

The AC input range is given as 200-240VAC.

The max AC current drawn is given as 1.8A.

The output voltage is 24VDC.

The max output current is given as 6.25A.

The cos phi is given as 0.45.

So I try to write an equation between the input and output real power as follows:

Pin × cos phi = Pout

For max input real power:

Pin × cos phi = 240 × 1.8 × 0.45 = 194.4W

For min input real power:

Pin × cos phi = 200× 1.8 × 0.45 = 162W

For output real power:

Pout = 24 × 6.25 = 150W

So Pin is always greater than Pout. Does that mean it is because of other power losses?

More importantly I want to ask something different:

Let's say The power supply output is always kept at its max that is to say at 24V and 6.25A. Now if we vary the AC line voltage between 200V up to 240V (by keeping the load current at 6.25A), would the AC input current remain as 1.8A?
If so, something is odd to me that I cannot explain to myself. Maybe my approach of interpreting this information is wrong?


texts: Unknown electrical component in circuit - "Chock"

texts: Does "chock" (in the picture) mean inductor with unknown value?


texts: What is the wavelength of an Itron C1S IR LED?

texts:
I'm trying to find an appropriate IR Phototransistor for an Itron Centron C1S Meter. But I can't figure out exactly what is the wavelength of the IR transistor used by Itron.

Do meters have standard IR LEDs? Does it really matter, or can I just get any IR Phototransistor like the TCRT5000 (only the IR Phototransistor)?


texts:
I would like to measure a pulse using the PIC 18F4550 in capture mode. This pulse is generated by the PIC microcontroller itself.
For this, I use a function which plays the role of the XOR logic gate (you find the function that I've used below), with RC0 and RC2 being the inputs and RC6 being the signal output. The pulse leaving RC6 enters CCP2 to be measured.

The problem I found is that the CCP2 cannot detect the pulse generated by the microcontroller. I don't know if there are any conditions to connect the pins of the microcontroller or something.
If anyone has an answer or a hint to fix this, I will be grateful and if you have any questions feel free to ask.
#include <stdio.h>
#include <stdlib.h>
#include "osc_config.h"
#include "LCD_8bit_file.h"
#include <string.h>

    unsigned long comtage,capt0,x;
    char pulse[20];
    char cosinus[20];
    float period,dephTempo,deph,phi;

void init (){

   IRCF0         =1;     /* set internal clock to 8MHz */
    IRCF1         =1;
    IRCF2         =1;

    PIE2bits.CCP2IE=1;
    PIR2bits.CCP2IF=0;
    CCPR2          =0;         /*CCPR1 is capture count Register which is cleared initially*/

    T3CONbits.RD16=1;
    T3CKPS0=0;
    T3CKPS1=0;
    TMR3CS=0;

    TMR3IF=0;

    T3CCP2=0; /*Timer3 is the capture clock source for CCP2*/
}

void xor()
{

   if (PORTCbits.RC0==PORTCbits.RC2)
          {
           PORTCbits.RC6=0;
           }
        else if (PORTCbits.RC0!=PORTCbits.RC2)
              {
               PORTCbits.RC6=1;
               }

}
void main()
{

    TRISCbits.TRISC0=1;
    TRISCbits.TRISC2=1;
    TRISCbits.TRISC6=0;

    xor();
    LCD_Init();

    while(1)
    {
    CCP2CON         = 0b00000101;
    PIR2bits.CCP2IF = 0;
    TMR3ON          = 0;
    TMR3            = 0;

    while (!PIR2bits.CCP2IF);

    TMR3ON          = 1;
    CCP2CON         = 0b00000100;
    PIR2bits.CCP2IF = 0;

    while (!PIR2bits.CCP2IF);
    comtage = CCPR2;

    dephTempo = (((float)comtage /30.518)/65536 );

    sprintf(pulse,"%.3f  ",dephTempo);
    LCD_String_xy(0,0,"the pulse width is : ");
    LCD_String_xy(2,9,pulse);
    }
}


texts: Darlington array: How to output desired voltage at uln2803a driver colectors?

texts:
Someone suggested this driver array to get the current I need:
datasheet
I also need a 12V signal and about a current of 100mA in order to control a relay coil. My 12V signal would come from a logic gate that will provide a current of I = 10mA. So here is where I need the driver. But I need to keep 12V at the driver outputs.

This is my first time working with this kind of device.
Reading datasheet I don't understand how to get Vout = 12V. It says that Vout = VCE and max rate is 50V. But it also says that Icoil = (V coil supply - VCE(sat))/Rcoil. So I don't know if VCE must be VCE(sat).

My questions:

Is V coil supply the desired VCE voltage at the output? Must I do
something in order to keep Vout = 12V when I apply Vin = 12V = VBase?
By the way, what must I do in order to keep the colector current
that coils are needing?
"The collector current rating of each darlington pair is 500mA" --> 500mA per channel, is it?


texts: Is there a switch that can be made when it is spun around a given axis, like a gyroscope solenoid?

texts:
Given in the title, I'm looking to design a small embedded system that only turns on when the part it's inside is spinning.

The electronics is completely enclosed.

I've done some googling for rotary switch, or gyroscope solenoid but to no avail. Do these things exist?

I'm looking for some kind of relay to make a battery connection.

Needs to be miniature i.e. MEMs sized.

At a guess, maybe 100RPM turn on speed, max 24,000RPM.

Thanks in advance


texts:
Do AVR (mega, xmega, AVR32) has any capability that ARM based MCUs don't have?
or can achieve particular purpose cheaper or easier?

Simply, do AVR worth learning?


texts: Altium Designer & Dephi script - how to open HTML file created before

texts:
I'm writing some small Delphi script for Altium Designer that create an HTML report based on the PCB file.
Which API command should I use to open the HTML file created before from that script?
For now, I can only display the TEXT file by using: "Document  := Client.OpenDocument('Text', FileName);"
Below, I attached my script.
Procedure DisplayReport;
Var
    Board           : IPCB_Board;
    Rpt             : TStringList;
    FileName        : TPCBString;
    Document        : IServerDocument;

Begin
    // Retrieve the current board
    Board := PCBServer.GetCurrentPCBBoard;
    If Board = Nil Then Exit;

    FileName := ChangeFileExt(Board.FileName,'.html');
    Rpt := TStringList.Create;

    Rpt.Add('
html header
');
    Rpt.Add('
');
    Rpt.Add('
');
    Rpt.Add('
');
    Rpt.Add('#	');
    Rpt.Add('RefDes	');
    Rpt.Add('Layer	');
    Rpt.Add('Footprint	');
    Rpt.Add('
');

    Rpt.Add('
');
    Rpt.Add('1	');
    Rpt.Add('R1	');
    Rpt.Add('TOP	');
    Rpt.Add('SMD_0603	');
    Rpt.Add('
');

    Rpt.Add('
');
    Rpt.Add('1	');
    Rpt.Add('R2	');
    Rpt.Add('TOP	');
    Rpt.Add('SMD_0603	');
    Rpt.Add('
');

    Rpt.Add('
');
    Rpt.Add('1	');
    Rpt.Add('R3	');
    Rpt.Add('BOT	');
    Rpt.Add('SMD_0085	');
    Rpt.Add('
');

    Rpt.Add('
');

    Rpt.SaveToFile(Filename);
    Rpt.Free;

    //open TXT file
    //Document  := Client.OpenDocument('Text', FileName);

    //try to open HTML file
    Document  := Client.OpenDocument(Client.GetDocumentKindFromDocumentPath(Filename), Filename);
    If Document <> Nil Then
        Client.ShowDocument(Document);

End;


texts: Linearized phase domain model of a PLL - what does a ratio of input phase over output phase mean?

texts:
I am trying to design a PLL and want to test it first in Matlab.

I have seen that the phase of the input and output are linearized, but I don't understand what is defined by the input/output phase.

Usually, a transfer function is the ratio of the input's voltage/current to the output voltage/current. However, this Wikipedia article gives the transfer function of a PLL as the ratio of two phases:

\$ \frac{\theta_O}{\theta_I} = \frac{K_P K_v F(s) } { s + K_P K_v F(s)} \$

where

\$\theta_O\$ is the output phase in radians
\$\theta_I\$ is the input phase in radians
\$K_P\$ is the phase detector gain in volts per radian
\$K_V\$ is the VCO gain in radians per volt-second
\$F(s)\$ is the loop filter transfer function (dimensionless)

* How do I interpret this transfer function ? *


texts: Antenna for broadcast AM reception on ARM Radio SDR

texts:
I'm trying to build the ARM Radio project detailed here. I routed and fabricated a PCB for the anti-alias filter and preamplifier shown on page 2 of the linked PDF, and reproduced here:

Unfortunately there's no mention of what antenna I should use, so I'm trying to use an AM loop antenna taken from a boombox, similar to this one:

Unfortunately, reception is awful (trying to tune to the local AM broadcast stations). Mostly I get noise mixed with interference from a local FM station broadcasting from about 1 km away. At times I get the feeling I'm getting some reception but frankly I'm not sure. Injecting a weak (~50 mVpp) AM signal from a signal generator directly into the ARM board's ADC (bypassing the anti-alias filter) works fine, producing a loud, clear and correct output, proving that everything from the ADC onwards (software, etc.) is working. Reception is great with a car head unit, parked in the same spot where the SDR was tested, so it's not a signal strength issue. My best theory at the moment is that I'm not using the correct antenna to match the circuit (as shown above, the circuit includes a transformer and an inductor/capacitor network for filtering and impedance matching).

I'd rather build a new antenna than design and build a new circuit to match my loop antenna. Thus: what kind of antenna should I build to work correctly with the circuit above?


texts: Mplabx ICD3 PIC18f67k40 programming fpga failed

texts:
I'm trying to program my PIC18F67K40.  The part is not listed in Mplab 8.92.
Installed Mplab X, but my ICD3 will not work.  I used the switcher program and it says it was successful.  Mplab X sees my ICD3 and sees its serial number.  When I try to program, it tries to install new ICD firmware.  After downloading the new firmware, it tries to program the ICD3.  The error message I get says
"The FPGA has failed its selftest.  MPLAB will attempt to download the latest firmware.  Please do not disconnect."  Mplab repeats this forever...

I will post this on the Microchip forum, but am now waiting to be approved by moderator.


texts: Donor concentrations between the Gate and Drain

texts:
When attempting to determine whether a MOSFET is NMOS, PMOS, or at intrinsic concentration, assuming the Drain and Gate are dopped to Nd = X and the bulk is doped to Na = Y, I get a little confused.

My initial thought is that Nd = Na, regardless of two regions of Nd existing (drain is at Nd, Source is at Nd), thus since Nd = Na the whole MOSFET is at Na = Nd = Ni, is this wrong?


texts:
Please Help.
I want to convert usb to Ethernet Net Adopter Can anyone Suggest me the circuit diagram of this connection. below i mention pic
this adopter is not available in my country So i have decided to make this one.

Thank You.


texts: Solar power monitoring with Raspberry Pi

texts:
I want to measure the current and voltage from a set of small solar panels (about 10V and 100mA but not settled yet) using a Raspberry Pi. There will be between 4 and 6 panels.

This project will need to run without a lot of maintenance for a reasonable amount of time. It should be part of an interactive museum display on solar energy.

Part One:

Voltage: Use a voltage divider from positive terminal.

Current: Use a 1 ohm resistor and measure the voltage drop. I want to use a 1 ohm so it does not influence the reading based on head or various other factors.

Plan:

simulate this circuit – Schematic created using CircuitLab

Part Two:

Since there is not ADC on the PI, I would like to use an MCP3008 partly because I know it supported with the PI, and partly because it is available in an SOIC and DIP version. The final version of this will be a custom PCB. And it has 8 channels so I can hook up 4 panels.

Are there going to be any issues adding a second MCP3008 chip if I need to add more than 4 panels? I have never done GPIO programming on a PI.
Is there a better way to measure the current? I also looked into using a PMIC like the INA212-214-Q1 from Texas Instruments but it seemed a lot more complicated than just using the 1 ohm resistor.
Is there anything I am missing?


texts:
I read through universal device programmer (device that program ICs like AVRs, PICs, EEPROM, etc) like items in links below, I found that these programmers perform these checks:

insertion test.
reverse insertion check.
contact check.

can you help me telling how these checks can be done without damaging the Chip?

sample 1

sample 2


texts: Technical hurdles for high-frequency video output implementation

texts:
I'm wondering if HDMI or DVI formats support the display of input signals at high frequency > 240Hz. Most current TVs only display high frequency video from signal interpolation, but only capture input signal at 60Hz.

If a team wanted to develop or tweak a video display to output signals with high data framerates, where would it need to begin? I know the question is a bit vague, but I'm just trying to understand as a non-expert the high level features of the technical problem


texts: Will high inrush current (30A/115V) trip a circuit breaker?

texts:
I was going through some power supplies for my LED Lighting project and found an inrush current of 30A/115V in the datasheet. My questions are:

Will it trip my home circuit breaker?

How long does the inrush current last?

What does cold start mean in power supply?


texts:
I'm helping programming a FLL LEGO robot (two motorized wheels and a ballpoint in the back are the contacts with the ground), experimenting with a PID control to make it turn. It may seem overkill, but everything else, including a pure proportional control can't account well for the "not so precise" motors and sensors.

That said, what is a good exiting condition for a PID algorithm?
Of course just waiting some time until the oscillation becomes imperceptible is good, but I wonder what the literature has to say, since in my application I need control back to the main program asap to do other things.

My guesses:

fine tune the number of iterations with the derivative and proportional therms arbitrarily close to the setpoint
a parallel control loop that "pulls the brake" after the setpoint has been reached a certain number of times (and fine tune it too)

If this is not the right place to ask this question feel free to move it wherever you want.


texts:
What will happen if I apply a negative pulse to the capacitor? Is the capacitor voltage increase positive or negative?

The pulse which is shown in the below picture is the output voltage pulse from a photodetector (photo multiplier tube.) The detector is consists of a photoelectric plate (that gives an electron when a light incident on the plate ) and electron multiplier (that multiplies the number of electrons or amplifies the signal.) The multiplied electrons are collected in one end across a resistor as a voltage pulse.

My aim is to measure the amount of charge from the detector. So I use this signal to charge a capacitor then I do some other analyses to measure the charge.