texts: Complementary output flatlines with higher current

texts:
I have a rotary encoder whose output uses an NPN and a PNP transistor to switch between something slightly less than the high input voltage (~17V input) and ground.

I need to trigger 5V TTL from this, so I connected it to a 5.1V Zener diode and a resistor, and the DAQ board to which it is attached has a pull-down resistor.

To run, the rotary encoder requires a voltage between 12 and 24V input, and at around 14V (which I had almost working) the current draw from the power supply is ~100mA (for 3 outputs, A, B and Z, each with their own same resistor R and Zener)

The voltage measured goes between about 400mV and 4.5V in that case.
The decay is quite curved - not very sharp corners for my 'square' wave output.
Reducing the value of the resistor labelled R improves the corner 'squareness' but I'm concerned that current draw might cause more problems for the diode.

If I increase the current limit on the PSU, the maximum voltage gets closer and closer to 5V but then the output flatlines.

I had worried that the diode was dissipating too much power, so I switched from a 1.3W to 5W zener diode. I'm pretty sure that even if the entirety of the PSU current went through only one of the diodes, with the full voltage drop there, the power dissipated should be less than 5W (14*0.1 << 5).

Why is the circuit output flattening to ground? Should I use larger or smaller R? (Currently at 680 but started with 1k and tried also 3.3k - I'd expect larger R to draw lower current I, but that doesn't seem to be what I'm seeing from the PSU, and larger R is making my wave increasingly curved at corners)


texts:
I am trying to match an op amp (OP27) to its data sheet while doing some stability analysis tasks in LTSpice. I am following the video provided here (http://www.linear.com/solutions/4449). However, when I follow the details of the video tutorial for the specific op amp I am interested in, I do not find the sorts of results expected based on the datasheet.

For instance, the DC gain is >140 dB and the low-frequency rolloff starts much below 1 Hz, in contrast to the Analog Devices datasheet.

Are op amp models in LTSpice generally not that accurate to real devices?


texts: Is my rotor/stator configuration correct?

texts:
Question 1)
 I am trying to make a miniature alternating current (ac) generator from elementary first principles.  Before I waste a lot of time (and copper wire), I wanted to check if the configuration as shown will actually produce a voltage, however small. The rotor (35mm dia) is fitted with 8 neodymium miniature bar magnets.  I have read that adjacent magnets should have opposite polarities as shown (N,S,N,S etc.). I assume my arrangement is OK?

Main issue is how to wind the stator coils. I have read that these should also be wound differently in adjacent coils, for example starting at the 12pm position, clockwise, then anticlockwise, then clockwise etc. (The coils are wound in such that they make a loop 'facing' the bar magnet(s) as they rotate.

Question 2)
Assuming that this not all complete junk, what kind of phase (?) generator would this be?

Question 3)
Assuming that the rotor is spinning at e.g. 1000 rpm, what would the frequency of the induced voltage be and how would I calculate that?  Presumably something to do with number of changes in magnetic field per rotation x rotation speed ?


texts: Relationship between plating thickness, surface area, and ampere-hours

texts:
I am reading a PDF titled Electrochemistry for the Electronics Industry. I am having a hard time understanding the relationship between metals and the Ah (ampere-hour) relationship.
For the presentation example it is given that it requires 6.3 Ah to deposit 1 mil of gold (Au) on 1 ft^2 of surface or 2.6 Ah to deposit 1 µm of Au on 1 m^2.
Could someone explain how they determined those Ah amounts? It states that these factors are available from tables, but I cannot seem to find them.
I have attached the calculation I am talking about.


texts: Do microcontrollers have a big resistance?

texts:
Well, it maybe seems a very basic question, but I have this question because I'm trying to understand the 0 weak and 1 weak on pull-ups and pull-dows, for example:

Here, when the button is not pressed, we have a weak 1 on the input pin, and when the button is pressed we have a strong 0 on the input pin (or, at least, this is what our professor taught us). But this strong 0 is because the MCU has a BIG resistance so all the current will go directly to the left GND instead of going through the MCU. Am I right?
Can you give also typical values of pull-ups resistors and values of MCU resistance?


texts: how to provide light for multiple 12 v led lights for 2 weeks

texts:
I'm participating in an art show soon in which I am making "sculptural light paintings" of which require a few 12v LED strips. They're the kind that work in aquariums and car's taillights and whatnot, and look like this;

I have about 3-6 lights being used per sculpture. So far my idea is to solder each one of them to an individual battery pack (so 3-6 battery packs per sculpture) that holds an A23 12 volt battery, and then connect each battery pack to a communal switch to turn all lights on and off at a whim to conserve energy. The LED strips vary in length (despite all being 12v) ranging from 20 inches long to 6 inches long.

As this is an art show, I prefer to not have any kind of outlet going into the wall as it really takes away from the look of the work, hence the battery packs. That being said, i also need the LEDS to be reliably powered for 2 weeks and  active from 9-5 each day. Do you all think that this may be possible or will a different energy source be more efficient?

So far i have a test led strip lit up via 12 volt A23 battery that has been going for about 2 days now with no problems, but that's my only finding. I'm quite lost as I know this will all work in theory, but I'm not sure it's reliable in duration.


texts:
I want to start a project with led lights, but I am completely new to working with electricity (i have used electricity but have never created something myself).

I want to create a led wire with different leds connected to 220v. I know that the different colors of leds use a different voltage, so my plan was to wire each color in parallel, and for example, all reds will be in series.

Is this the right way to do it? Or does someone has a better recommendation? What will I need to convert the 220v to the right voltage? and what other materials do i need?


texts: 50V Ceramic Capacitor for 36V Vehicle Battery

texts:
In my vehicle Battery powered system which can vary from 12V to 36V , I want to use a Capacitor of minimum 10uF on the input. I have few doubts :-

Which is best for 10uF value @ 36V - Ceramic/Tantulum/Electrolytic
Can I use a 50V(Do I need to derate @ double the voltage) ceramic for 36V rating??


texts: Piezo to detect low frequency, low strain

texts:
I have been trying to detect a very low frequency, very low strain signal with different types of piezos (hobby type, hobby type enclosed in plastic casing, shielded contact mic type, and flexible piezo film type). The signal is generated from a small stream of water passing through a pipe 2" in diameter.

If I put these sensors on the pipe, and measure the AC signal directly with my oscilloscope, I cannot detect a signal. Although I have not been able to do a frequency analysis of the water pipe, I would guess that the water passing through the pipe at the frequency I'm trying to detect to be <10Hz. Additionally, the water passing through the pipe would create what I'd call "very low strain."

If I turn the water up to a "high" amount, the signal is easily detectable -- the frequency of the water is what I'd estimate 100 - 200 Hz and there is more strain on the pipe.

I have also created voltage amplifier to see if I can amplify this (undetectable) low strain signal I mentioned at the top of this post. The amp seems to only amplify noise or interference.

In short, I think that the piezos I have cannot detect a low strain <5Hz signal.

Can anyone recommend a way to detect <5Hz low strain signal? It appears ultrasonic sensors could be a solution for this problem.


texts: Why does the MOSFET drain current increase abruptly when Gate voltage is greater than the threshold voltage?

texts: As far I've understood, channel formation takes place because of the induced negative charge on the semiconductor side of the gate capacitance. So shouldn't the charge concentration increase linearly with the gate voltage from the very beginning. If that is so the current should increase linearly as gate potential is increased from zero. Instead why does the current increase abruptly from zero when a threshold voltage is hit. Why is the sudden increase in carrier concentration?


texts: How to indicate different voltage levels in schematic drawing

texts:
If I have a circuit where I will use different voltages for different parts, how is this best done?

This can be done with power symbols

or using local labels

or global labels

(the default size of global labels is insanely large, but resizing to 0.030 makes them usable).

Which one is preferred and why (just a matter of style or are there any functional differences)? Are there any alternatives?


texts: By the circuit shown bellow I wanna read the ripple current by the 0.33 resistor and the ripple voltage of the capacitor by adding a low pass filter to reduce the spikes and a high pass filter to extract the AC part of the capacitor's voltage. Now my question is how I'm supposed to read the differential voltage shown with the blue indicators and add off-set to it as the ground of the circuit is different from the differential pair's. Because of the set up of the system I cant read the voltage between the capacitor and ground.


texts:
I want to set the output DC operating point to 2.5 V. Here is my schematic showing DC operating point.

If I replace the opamp with ideal opamp, the output DC operating point is set as 2.5V. With the real world device, I am unable to set the DC operating point.

Could anyone help me with this?


texts: Can I use an LM324 voltage follower with a single supply to rectify an AC signal?

texts:
I have a question that is mostly related to voltage input common mode ranges. The LM324 should be able to go pretty close to it's negative rails, as a voltage follower would the common mode voltage pretty much always be close to 0v?

My goal is to clip out the negative portions of a slow ac signal (10 hz, magnitude 2.5v centered at 0v) and then manipulate the now positive signal with a few stages of op-amp circuits. The following circuit is my first stage. The original circuit included a diode going from the ac signal to the non-inverting terminal of the op-amp which, accompanied by a large pull down resistor (1M+) functions, but attenuates the signal somewhat. If I remove the diode/resistor and plug the source directly into the op-amp, my output is exactly what I want: only the positive half of the signal comes through at the output (and the input actually reflects this as well).

All of the research I have done suggests not using inputs outside the rails of an op-amp but everything I've read says the problem is with unpredictable outputs, not necessarily the possibility of damaging the op-amp. My gut told me that the op-amp would simply clip the negative portion of the signal to the negative rail, and that is exactly what happened, but as reliability is very important for this circuit, I can't implement the following design without knowing exactly why it works and whether it will be reliable over time.

tl;dr:

What is the common mode voltage of a voltage follower?
Can op-amp inputs safely exceed the rails if the common mode voltage is still within spec?
Is it safe to use a single-supply op-amp to half-wave rectify a slow ac signal?


texts: I am wondering if my understanding of the following circuit is correct. Specifically it is about the 0V at the non-inverting input. Is it correct to say that, since there is ground at R7 || R8, there will always be 0V at the non-inverting input and when voltage is turned on, the op-amp will try to adjust the voltage at the inverting input to 0V, in order to create zero voltage difference? Which means, no matter what resistor combination there is in the upper branch (non-inverting input), it will not affect the circuit?


texts: In what cases may component "Tempering" be required prior to assembly?

texts:
I know that components should kept in storage either in a sealed bag or in a dry environment.

We had one case where the assembly house got an open bag of LEDs from us and we were somewhat surprised, when they told us that they had to temper those LEDs for 2 weeks (!) to make sure absorbed humidity has been removed before starting assembly. This really hurts if you have a deadline.

I think that if a company gets back remaining parts from one assembly run, its not uncommon that those parts are stored under sub-optimal conditions.

So I was looking for some insights about what kind of components may be prone to require tempering and thus should either be kept in close bags / under optimal storage conditions. At least it would be good to have an idea where tempering may be a requirement.

Can anyone provide some general information regarding this topic?


texts: Integration of exponential function and square-wave

texts:
How do I evaluate,
\begin{equation}
\int_{0}^{t} e^{c\tau}sqw(\frac{\tau}{T})d\tau
\end{equation}
where $$c < 0$$ and \$sqw(\cdot)\$ is a periodic function over \$t\in[0,T)\$,
\begin{equation}
sqw(t) =
\left\{\begin{array}{ll}
1 & \quad t < \frac{T}{2} \\
-1 & \quad t \geq \frac{T}{2}
\end{array}\right.
\end{equation}
I've tried using computer algebra systems but they yield nothing useful.
For context this is part of a convolution that gives me the output of a 2nd-order RLC circuit being driven by a square-wave. The reason I am trying to perform the convolution instead of some process involving Partial Fraction Decomposition (P.F.D) and the Inverse Laplace Transform is because this circuit is actually just the first of two stages. The whole system possesses a transfer function involving a third-degree polynomial so I would like to avoid the algebra involved in the necessary root extraction w/method of resolvents and subsequent P.F.D.


texts: Using diode for reverse current protection

texts:
There are some devices such as step up converters that if you connect the power supply reversely it will burn, also some ICs such as ic555.
my question is >> why the manufacturer doesn't use simply a diode for reverse current protection?


texts:
Please see the image below:

This is an idea for a unity gain clipping circuit to be used
in a guitar effects unit as a 'distortion' pedal.

Some percentage of a peak detector output voltage feeds into the reference voltage of a clamp.

If the input signal were compressed, the clipping would be relatively uniform. Or if the peak detection capacity were discharged quickly enough.

Could someone please:

Tell me if this idea is idiotic?
Tell me if the polarities of the opamp inputs are correct?
Suggest values for the RC network on the peak detectors?


texts: Can I use DC to drive underfloor heating wire?

texts:
I'm in the early phases of designing a new underfloor heating controller for retrofitting solar panels to locations with existing underfloor heating cables, which now take their power from the grid.

The question is: can any type of underfloor heating wire be driven with DC voltage? E.g. use 230 volts DC instead of 230 volts AC?

Can there be any adverse effects of sustained DC voltage, for example in the carbon polymer material of self regulating heating cables? Is there something bad that can happen, perhaps something that resembles connecting an electrolytic capacitor with wrong polarity? Can anyone think of anything else that should be considered for this kind of system?

An old college buddy of mine was concerned that the plastic polymer resistor found in two wire heating cables will ionize over time when DC is applied, eventually converting the plastic resistor into a short circuit. That I would obviously like to avoid, but is there any truth to his concern?

The basic idea, obviously, is to generate some amount of heat in the building from DC voltage without the need of a DC/AC inverter. (e.g. I'm trying to eliminate the inverter cost from the system or use a smaller inverter than what would be otherwise required). A portion of panels in the roof would be configured as a separate string that has a suitable DC voltage at some conditions. And this DC voltage would be fed into some segments of the underfloor heating using this new kind of underfloor heating controller.


texts: Calibration of capacitive sensor using AD7746

texts:
I bought an Analog Device EVAL-AD7746LDZ water level sensor demo board.
I don't have the complete EB board, so I cannot use their LabView software directly. Anyway, I downloaded it and I'm studying the datasheet.
So far, I'm able to read the capacitance of C1 (probe) and C2 (reference) and calculate the water level. The measurement is quite good!
There are some things I don't understand and I didn't find useful answers in the documents above. I try to ask them here:

the AD7746 can measure the temperature and the voltage, I guess for some compensations. But how should I use these values? The formulas have no explicit dependencies from temperature and voltage

the software has three calibration buttons: dry, 0 mm and 100 mm. The first will set Cx_dry, the others gain and offset. I guess that Cx_dry is just the values of C1 and C2 when the board is dry. For gain and offset it's just a way to calculate m and q given the two known measurements? Am I right?

how should I select the excitation voltage? I can choose from Vdd/8 to Vdd/2, but I'm not sure which one is the best and why.

with my test code I set the AD7746 to make single conversions: I read C1 and then C2, do the math and store the final values (mm of H2O) into an array. Lastly, I filter these values to reduce the noise. It would be better to acquire, say, 16 samples of C1, 16 sample of C2, filter those samples and then calculate the height with the filtered values? Please note in my application the water level changes very slowly, so during the acquisitions it can be considered constant.


texts: A laptop charger has 3 pins - positive,negative,earth at the end which is inserted into the switch board. But, the end inserted into the laptop has only 1 pin(don't know what that is). A battery also positive and negative terminals. So how does this one pin suffice the two pin battery?


texts: Why can't analog video be compressed like digital video (example inside)?

texts:
I'm learning the basics of analog and digital TV signals and I came across
this (original link, now gone) short article (see the next page as well).

Why can't analog video signals be compressed in a similar way to digital signals when using MPEG-2 (refer to the article above where they give a basic example of what I understand by MPEG-2)? why can't "repeated" pixels be ignored in analog to reduce the bandwidth usage as in digital?

To see what I mean refer to this question. There you can find the following picture:

Why can't you simply "ignore" (by not modulating it) a line of pixels (assuming it didn't change between frames) and reduce the data signal frequency and therefore the bandwidth usage?


texts: Will this variable voltage supply with variable current limit circuit work?

texts:
I want to make a variable power supply with variable voltage and current.

Recently made a variable voltage supply using LM317 but I couldn't control the current so I want to try combining it with an LM317 current limiting circuit.

My input is a laptop power supply rated 19.5 V 3.42 A.

EDIT:

I want to use this as a lab bench power supply so I need to be able to vary the voltage and current with the potentiometers R2 and R1.

The image below is my circuit.

Will it work?


texts: What is the frequency tolerance of AD9833 module?

texts:
I am making a frequency generator with the resolution of 0.1 Hz and I have found AD9833 module is what I need and had tried using it and it works! But not for all range. At some range I do get some deviation which is more than 0.1Hz. For example, I have tried at 619.3Hz and 707.8Hz (wow thats very specific ^^) and the actual frequency deviates to 619.19Hz and 707.63Hz respectively (both deviates more than 0.1Hz).

DOes anybody knows the frequency tolerance of the AD9833 module? Or the reason of my frequency deviation?


texts:
Sometimes i come across different notations in Op Amps. Sometimes they are fed by V and ground, sometimes +V and -V. I am confused. Does ground mean minus?

Look at here:
http://www.williamson-labs.com/images/opamp-block_h.gif

and here:
http://www.williamson-labs.com/images/op-vg-1.gif


texts: C18 Timer0 timing calculation using MCC18

texts:
I am programming a PIC18F4520 and I've set it to use a 32Mhz internal clock.

I need a counter to tick every second so I'm using TMR0 for this purpose.

To use TMR0, I have set the following:

Prescaler 1:256
16 Bit mode
High level interrupt on TMR0 overflow.

To set the timer to count every 1 second, I've calculated it as follows:

TMR0 = (Required time)/(4 * Timer clock * prescale value)
     = 1 / (4  * (1/32000000) * 256)
     = 31250

So, TMR0 = 0xFFFF - 31250.

Is this correct? If not, what am I missing? The code is as follows:

#pragma code
void main(void)
{
    //Set clock frequency
    OSCCON |= 0x70;             //8 Mhz clock, primary clock
    OSCTUNEbits.PLLEN = 1;          //4x Multiplier, thus we have 32 Mhz clock
    while (!OSCCONbits.IOFS);       //Wait until INTOSC is stable.

    //Enable TRISA as analog input (For ADC)
    TRISA = 0x2F;

    //PIN Outputs
    TRISB = 0;              //Make PORTD as output
    //Reset PORTB
    PORTB = 0;

    //Set ADC
    OpenADC(ADC_FOSC_32 &           //Fosc/32
         ADC_RIGHT_JUST &
         ADC_4_TAD,             //4xTAD
         ADC_CH0 &
         ADC_REF_VDD_VSS &
         ADC_INT_OFF, ADC_5ANA);        //ADC CH0-CH4 Initialized

    //Set Timer0
    OpenTimer0( TIMER_INT_ON &
                T0_16BIT &
                T0_SOURCE_INT &
                T0_PS_1_256);

    //Write Timer
    WriteTimer0(CLOCK_TICK);

    INTCON2bits.TMR0IP = 1;         //TMR0 has high overflow interrupt priority
    RCONbits.IPEN = 1;                  //enable priority levels
    INTCONbits.GIEH = 1;            //enable high interrupts

    //Begin
    while (TRUE)
    {

    }

    CloseADC();             //Closing ADC
    CloseTimer0();
}

On my high level interrupt vector, I've done this:

#pragma code
#pragma interrupt high_priority_interrupt
void high_priority_interrupt()
{
    if (INTCONbits.TMR0IF)                  //TIMER0 overflowed
    {
        //Stuff
        second += 1;
        if (second == 60)
        {
            minute += 1;
            second = 0;
        }

        if (minute == 60)
        {
            measure_and_switch();
            WriteTimer0(CLOCK_TICK);
            minute = 0;
        }

        INTCONbits.TMR0IF = 0;              //Clear TIMER0 overflow bit.
    }
}

So, basically, every 2 minutes, I want the method measure_and_switch() to be executed. Should I follow it with WriteTimer0()?

Btw: CLOCK_TICK is TMR0 (calculation from above).

Thanks


texts: 1 x AA sized battery box with a built in switch?

texts: I have been looking around all the internet for such a thing, but I haven't found one. Do they exist? All I would need is a neat little plastic battery holder for 1 AA sized battery, which has a switch included. Just like it's common with 2x, 3x, 4x AA sized boxes.


texts:
I've got huge three-phase transformer, primaries are connected in Y configuration, secondaries in Delta, then goes to 6 diode bridge rectifier. Output is about 200 amp 52 VDC.

In short, how many ohm resistor do I need to reduce current from 200 amp to 100 amp while dead-shorted ?


texts: Voltage across the Current source in a RC circuit

texts:
I'm a beginner with RC circuits, I would appreciate any hint or help

The problem asks to find the voltage across the current source in the below circuit:

simulate this circuit – Schematic created using CircuitLab

while the graph of i_s(t) is given like this:

desmos.com

I know that from KVL we have
$$v_s=V_R+V_C$$
while V_R and V_C are the Voltages across the Resistor and the Capacitor

we also know that:
$$V_R(t)=R.i_s(t)$$
and
$$V_C(t)=\frac{1}{C}\int _{t_0}^ti_s\left(t\right)dt\:+\:V_C\left(0\right)$$
But I have problem wiht determining the bounds of integrals or how to devide time intervals in order to calculate the integral

I also found the i_s based on singularity functions:
$$i_s(t)=2r(t+1)-3r(t)+2r(t-2)-r(t-3)-r(t-4)+r(t-5)$$
but I don't know if it is helpful

sorry for my weak grammar


texts: Clarification on amplitude of observed NFC PICC response

texts:
I am using a simple pick up coil attached to an oscilloscope (and as pictured a Saleae Logic Pro 16) to monitor the NFC traffic between a reader (PCD) and ISO15693 tag (PICC).
The reader is a PN5180 evaluation board from NXP, and the tag is one of several evaluation boards for the NTAG5 Link.
The trace from the PCD to PICC communication looks exactly as expected.

The trace from the PICC to PCD communication, however, looks incorrect. The amplitude of the modulated signal appears greater than the amplitude of the carrier wave as seen below:

My expectation is that the signal would look similar to below:

I am seeking clarification as to what may be the cause of the discrepancy, and ultimately a suggestion on how to correct said difference.
Paul


texts: How can I decrease the torque of a stepper motor?

texts:
I would like to take a powerful stepper motor, and sometimes weaken it, so it will stall when it hits resistance.

I understand that I can reduce torque with microstepping, but it does not seem to be precise enough. Is there another way to make the motor less powerful?


texts: Power Bank does't able supply power when connected to buck boost converter and Modem?

texts: I've a modem which has GPRS and GPS Module interfaced with PIC24F micro controller. The modem input voltage range is 8-35v and 300mA.We have planned to fix that modem to car battery, so we designed that modem with input voltage range 8-35v. But now we changed our mind not to connect with car battery. We would like to connect that modem to a power bank. We bought a 4charge power bank@ link! . The power bank has two output usb port with 5v 1A and 5v 2A respectively. Since our modem input voltage range is 8-35v so we decided to put a step-up the voltage by booster(XL6009 DC-DC step up module) to boost up 5v to 12v.When we switch on the power bank ,the modem doesn't getting any supply but sometimes Modem is working (getting supply). What could be the problem in this scenario and suggest any idea to solve this issue?


texts: Current limiter circuit in voltage mode SMPS

texts:
I have simulated many ready-made SMPS templates in voltage mode configuration? It is easy for me to understand and design my own configuration of some SMPS in current mode, but when I come to voltage mode, I have difficulties in the current limiter circuit that is used to limit the maximum current through the inductor.
The current limiter circuit does not appear in the transfer functions of voltage mode SMPS, however I have noticed that the value of the shunt resistor and the maximum current selected have effect on the frequency response of the whole circuit.
As an example, let me present the following ready-made buck-boost converter:

I have varied the GAIN of Current controlled current source (CC-CS), and I have noticed that the system is stable for 60m ohm < Ri< 480m ohm where Ri is the gain of the CC-CS
My question is:

How to go from theory to practice in designing this part of circuit?
How to choose the value of Ri and the values of the filter composed of R4 and C2 in the circuit, and what parameters affect the selection or calculation of this part of circuit (Current limiter).
How does this circuit contribute positively or negatively in the frequency response the open loop of this converter or other converters?


texts: Is it safe to use two power supplies to two different circuits independently sharing the same ground?

texts:
I have a Odroid-U3 minicomputer where its USB VBus and Ground pin are shorted, making the USB ports unusable.

But I was able to make a workaround. What I did was used an external power usb hub, taped the VBus pin to the USB plug to be connected to the USB Host (Odroid), and let the external power supply power my peripherals.

Now, I have one power supply powering Odroid and another to power the peripherals but they share the same ground.

It works but is it safe to let them share the same ground or since the data is transmitted via differential signals, ground is not needed?

EDIT:
Here is the current schematic diagram of my odroid setup:

Also, there is no connection between the Vbus of the USB port on odroid to Vcc of the system power supply.


texts:
Here is a datasheet for LM324:

https://www.fairchildsemi.com/datasheets/LM/LM2902.pdf

It says: Large DC Voltage Gain: 100dB

Does that mean the "open loop voltage gain is" 100000?

Is "Open loop voltage gain" the same thing with "Large DC Voltage Gain"?

Are they the same thing?


texts:
I would like to use a N type mosfet in order to cut the current from a USB charger. The mosfet reference that I currently have is an IRLB8721.

I have already done a similary thing to another project to cut off a 12VDC power supply. As the mosfet is a N type, I need to install it on the ground wire. The problem is that I want to keep all 4 wire of the USB connector, even the DATA + and DATA - as the charger and the device use these two channel in order to set the right charge mode, depending on the device.

My question, is it still a good idea to cut off the GND signal ? I have some worries that the 5 VDC will still go to the device, and maybe cause some problemes with the DATA +/- signals ?

Or is it absolutely necessary to use a P Mosfet to cut off the signal directly on the positive line, the +5VDC wire ?

Thanks for your help.

Edit : Here is an additional schematic to expose what I want to do :


texts:
I have drawn a resistive network for test some detector components. It works well. So I want to proceed that project to further and create my own real circuit.
After that EAGLE is the answer where I design PCB of my circuits. Now here is my target, I want to export schematics from LTSpice to importing EAGLE and after a couple edit to finishing this.

But after a few searching, I couldn't figured out how I can make it possible. Everybody has an LTSpice button on EAGLE's toolbar. I haven't.
I'm using Autodesk Eagle 8.2.2 Premium version. There's nothing beside of the design link button.


texts: NTSC -> ADC -> USB. A video digitzer circuit

texts:
I'm working on a project that ultimately needs to incorporate an analog video camera input, digitizing it and spitting it out a USB port as an MPEG stream.  My general aim is for roughly a VGA resolution, so it's not super demanding in those terms.

While I've been digging quite a lot, I'm having a tough time finding ICs or example circuits that aren't either overkill or more focused on frame grabs rather than real-time streams.

Overkill examples are the enormous line of TI products that are aimed at home A/V receivers with multiple HDMI IO, for example.

I want this to essentially be a stand-alone module, but the larger project has a microcontroller and other elements that make me lean away from any SOC or FPGA or Linux-on-OMAP etc solutions, in favor of what I hope and would think could be a simpler circuit.

Can anyone here point me in the right direction?  Or give me an appropriate kick-in-the-head, if I'm running off half-cocked in my thinking so far?

BTW - there is one cool, albeit dated design that I found here
Homebrew digitizer:  http://www.techmind.org/vd/vidmk2.html


texts: JFET in place of digipot for gain control?

texts:
I'm hoping to build a sound sensor using this schematic (http://cdn.sparkfun.com/datasheets/Sensors/Sound/sound-detector.pdf)

To programmatically adjust the gain, I could use a digipot. My (naive) understanding of the main issue with using a digipot is that it's linear, but gain control should be logarithmic for constant change. That said, I guess the MCU could do the conversion.

Suppose I'd like to save the MCU from the conversion, is JFET a good alternative? If so, which JFETs specifically are good for this? Are there other better alternatives?

Thanks


texts: Making use of the serial data received via UART - a few concerns

texts:
So I have been finally able to send and receive data serially via usart, but now I'm thinking of getting something useful out of it.
One thing that I do plan on doing is maybe take in the input, provide a relevant output. So if the user types in "temperature", i'd send back a temperature value after reading off the sensor.
Another would be to turn on the led.

But I have a few concerns:

I am specifying the length of the input that I expect from the user to my driver function, but what if the user types in more than the length? I started to see weird issues.

    if (pusart->handle->SR & USART_SR_RXNE) {
       pusart->rx_buffer = pusart->handle->DR;
       pusart->rx_buffer++;
       pusart->rx_size--;
    }

So RXNE is set upon the reception of each byte, but how do I deal with something like: "temperature status" than just a single char?

pusart->rx_buffer points to the buffer stored in main. How do you keep track of the input that the user just typed in and not something that was previously inputted into the buffer? For e.g: buffer size is 20. When user types temperature, buffer's first 12 (including \r) indices are already taken. Now user inputs LED. Now the subsequent 4 indices are taken.
And you would only parse from index 12 to index 15 for LED and not previous data.
Each character is stored in a specific index in a buffer. How does one parse efficiently?

Is circular buffer the solution where the tail would point to the index that will be the starting point of the latest input and head points to the first element? So for each input, I increment tail and head accordingly so both ends include the string that was inputted and can then parse the data? But from what I've seen, circular buffer works by moving the head when the element gets removed otherwise you continue incrementing tail (with some exceptions).

How would the code flow look like for something where you listen to the input, and then do certain actions (similar to the idea discussed earlier)?

    rx_buffer[50];
    while(true) {
       usart_read();
       // if current input is "led", toggle led
    }


texts: How to make shaft on DC motor easy to turn even though there's electrical load

texts: I'm new to DC motors. When we attach electrical loads to a DC motor, the shaft is harder to turn by hand. Is there a way to make it still easy to turn while there's an electrical load?


texts: Methods to detect metal buildup on a magnet?

texts:
So far I have been exploring Hall-effect sensors and basic metal detection.

The application for my required need has limited space, needs to be small enough to fit in a palm and the simpler the design the better.

Apart from hall-effect sensors and basic metal detecting circuits are, there any other electronic circuits that work effectively in a small environment and in a simple manner?

Are there any electronically related aspects to take into consideration with metal detection on a small scale?


texts: Is it possible to drive a HDMI output without exact clock frequencies (74.25 MHz, etc.)?

texts:
I'm driving a TFP410 parallel to DVI (HDMI) converter using a DM368. Unfortunately I can't generate the exact clock frequencies required for HDMI CEA modes (74.25 MHz, 148.5 Mhz, etc.), I'm stuck with dividing a PLL. The PLL is 680 MHz, so the frequencies within the 720p-1080p video range I can use are basically 68, 75.5, 85, 97, 113 and 136 MHz.

I've written a kernel EDID parser that I'm using to get timing requirements from the monitors and feed them to the video encoder onboard the DM368. I know the video timings I'm sending to the TFP410 serialiser (HS/VS active lines, front/back porch, sync pulse width) are correct since that I'm testing them at the DVI/HDMI output using a development board where I can compare them with working signal sources. I'm also parsing maximum clock, min-max refresh ratios and keeping them into account when deciding the output clock.

Despite all this, I can't get the image to display on the oldest monitors (newer monitors are fine). I've spent quite some time on this, so I can tell you that for example, in one of the oldest monitors I can display an image by increasing the active size (720p to ~730p), or decreasing the clock (from 75.5 to 68 MHz). However, this approach doesn't really scale.

Are my problems due to my imperfect frequencies or is there something else I should look into? Unfortunately I can't add an external 74.25 MHz clock source at this stage.

HDMI is complicated and I'm afraid I don't understand it properly. I just wish monitors respected what they advertise in their EDID, but I'm starting to believe no one uses those specs anyway (max clock, min/max fps, etc.).


texts:
simulate this circuit – Schematic created using CircuitLab

Why there isn't current in R3? Does it depends on the resistance of R3?


texts: Ae parameter for different transformer cores

texts:
I am trying to select a transformer for designing a dc dc isolated forward converter. Now, I see in an example a core of  ETD34 (AN 2013-03 application note from infineon,page 5).

Now, as partof the primary turns calculations, the formula is as shown below, there is a factor/term called as Ae.I have highlighted that factor there.

Now, it is assumed to be 97.1x10^-5 for ETD34 core. Why is such a core selected arbitrarily?
Also, if I select a different core what will be the impact on the Ae parameter ? Also, what exactly is this Ae parameter ?

For example - if I use the transformer - transformer datasheet. How can I find the Bsat and the Ae parameter for it ? It is not specified.


texts:
I am curious to know which figure in the MCU (microcontroller) datasheet would reveal the minimum clock source you could use to feed the I2C driver so it can generate it's CLK and Data line.

Looking to find an answer for this question, I have bumped into this paragraph here,

  Question: I have a 32.768kHz oscillator. Ideally, I'd like to have the I2C bus clock rate run at 400kHz or 100kHz. But even with a value of SSPADD = 0, the (I2C Master mode clock) Fscl is only around 8 kHz

  Answer: The I2C clock is generated by dividing down your clock
  frequency/4, so there is no way it can be faster than a quarter of
  your clock frequency.

If assumed true, I would like to know the analogy behind this.

In this case I am using Atmel SAMD21, however, I honestly don't mind if you use a different MCU as your example.

In SAMD21 the standard speed runs in 100KHz baud rate and this is the baud rate I am interested to know about unless you would like to expand your answer for the faster speeds.

SAMD21 uses the following calculations to eliminate an incorrect clock source in its I2C driver,

tmp_baud = (int32_t)(div_ceil(
        fgclk - fscl * (10 + (fgclk * 0.000000001)* trise), 2 * fscl));

/* For High speed mode, set the SCL ratio of high:low to 1:2. */
if (config->transfer_speed == I2C_MASTER_SPEED_HIGH_SPEED) {
    tmp_baudlow_hs = (int32_t)((fgclk * 2.0) / (3.0 * fscl_hs) - 1);
    if (tmp_baudlow_hs) {
        tmp_baud_hs = (int32_t)(fgclk / fscl_hs) - 2 - tmp_baudlow_hs;
    } else {
        tmp_baud_hs = (int32_t)(div_ceil(fgclk, 2 * fscl_hs)) - 1;
    }
}

/* Check that baudrate is supported at current speed. */
if (tmp_baud > 255 || tmp_baud < 0 || tmp_baud_hs > 255 || tmp_baud_hs < 0) {
    /* Baud rate not supported. */
    tmp_status_code = STATUS_ERR_BAUDRATE_UNAVAILABLE;
}

with fgclk being the clock source (e.g. 8MHz) and fscl the baud rate of i2c I believe (e.g. 100k) and trise=215, which results to tmp_baud=35 and tmp_baud_hs=0.


texts:
Perpendicular (TE) polarization occurs when the electric field is perpendicular to the plane of incidence. I am having a hard time visualizing why that is the case in the following example. please let me know how you can figure where E or H is perpendicular or parallel to plane of incidence.
what does the circle with the cross in it signify? it means that component is pointing out or in? also how do you use Right hand rule having E , H and propagation directions?
Thanks


texts: Help dimensioning mosfet as switch with high current

texts:
I have the same problem as the guy in this question, but in this case the input voltage varies from 20 volts to 28 volts.

I would like a current of 20A to flow through the mosfet without it getting really hot. Which mosfet should I use?


texts: kirchhoff laws with current source connected in series to resistor

texts:
I'm struggling with the following circuit trying, using kirchhoff laws, to write equations system that solve all variables.

simulate this circuit – Schematic created using CircuitLab

(Ground symbols are used as arrows to show current direction)

I'm using source convention for sources and the other one for passive.

What I did so far is to define kirchhoff laws for each net clockwise

Voltages
$$Net1(ABD) \Rightarrow V_{ab}-V_4=5$$
$$Net2(ACD) \Rightarrow -V_3+V_5=-5$$
$$Net3(BC) \Rightarrow V_4-V_5-V_6=0$$

Currents
$$Net1(ABD) \Rightarrow I_2-I_3=-10$$
$$Net2(ACD) \Rightarrow I_4-I_6=10$$
$$Net3(BC) \Rightarrow I_3+I_5+I_6=0$$

So now problems come, writing single characteristics:
$$V_{CA}=R_3\cdot I_3$$
$$V_{BD}=R_4\cdot I_4$$
$$V_{CB}=E6-(R_6\cdot I_6) \Rightarrow V_{CB}+(R_6\cdot I_6)=10$$

My problem is: how can I write the characteristic for \$V_{AB}\$??


texts:
I'm trying to understand if those two circuits are 100% equivalent.

I mean, if I use a dual gang 100K linear potentiometer, and wire it like VR1A-VR1B, do I get a single potentiometer exactly like VR2 (50K linear)?
is the same true with the presence of R1/R2, as shown on the picture?


texts:
I've designed a particular shape PCB with 2 round corners using arc tools. Since I needed precise dimensions I've set them when I was drawing PCB outline. The problem is that PCB outline now isn't closed and I'm unable to connect open ends becouse they don't match exactly. This create me some problems. I've also tryed to set grid to finest and place ends very near, but nothing, they don't join.

Someone can advice me how I can solve this?


texts: Accessing same variables in Verilog on different clocks

texts:
I have a 50Mhz master clock clk and from that I have a derived baudClock clock which runs at 9600bps.

I have a transmitter module that I want to follow a state machine flow every baudClock.

The transmitter module receives strings from an external module/testbench and puts them into a queue. I want the state machine to take an item from the queue and then reduce queueCount by one.

On the other hand, I would like to be able to add an item to the queue on a clk cycle.

I cannot implement something such as that below because I would then be assigning queueCount from 2 always processes (resulting in multiple driver errors).

always_ff @(posedge clk )
begin
  if( addToQueue )
  begin
    if( queueCount < MAX_ELEMENTS )
    begin
      textQueue[ queueCount ] = myString;
      queueCount ++;
    end
  end
end

always_ff @(posedge baudClock )
begin
  unique case( state )
    IDLE         : HandleIdle();
    GETNEXT      : HandleGetNextString();  // Decreases queueCount
    SENDSTART    : HandleSendStart();
    SENDDATA     : HandleSendData();
    SENDBYTEDONE : HandleSendByteDone();
  endcase
end

How would I go about doing this? ie. What's the best way to share variables in reading/writing or producer/consumer scenarios?


texts: RS485 how to tell if HXPS-2108F Prolific is working

texts:
newbie at electronics (not PC's or software) - my first project is to connect the PC up to a Solar Power Inverter to datalog.  Aurora inverter.. great wiki here http://whirlpool.net.au/wiki/solar_software

From a PC point of view, I've got a logger http://www.eltima.com/products/serial-port-monitor  seeing what is coming in on the port COM15.  Nothing.

The USB-RS485 converter is an HXSP-2108F (which people have trouble with).  Laptop is Win7-64bit.

Question:  Before I throw this converter away, any suggestions for testing it?

I guess I need a multimeter and see if any voltage is coming down the rs485 wires?


texts: Full load and Rated Values of a Single phase transformer

texts:
I was reading about single phase transformers. I came across these two terms 'full load' and 'rated' and they left me thoroughly confused.

In some places they're treated as the same thing, in others they aren't.

Are they the same thing? I know that rated values are those at which the transformer is meant to be used. If the two terms aren't the same, what is the distinction?

Also, suppose I were to apply rated voltage at primary side, what current and voltage would I get at the load? Would both of them be rated values?

In case the terms are different, what happens at the load when I apply full load voltage at the primary side? (Is full load voltage even a thing?)

Please help


texts: jfet preamp output attenuated and clipped on bottom rail when connected to codec

texts:
I am currently working on an embedded audio processing system for electric guitar. I have constructed two JFET preamps (left and right channels) based on the j201 transistor using the common source self biased topology. I hand matched the two transistors and biased them from scratch and achieved a voltage gain of around x3. When pushed to saturation, the preamps also clip symmetrically, which is a good sign that the biasing point is correct. See design below.

My problem is that when the outputs from the preamps are connected to the line inputs of the WM8731 codec, almost all gain is attenuated and clipping occurs on the bottom rail. I don't know why this happens. See codec below

I am testing with a signal generator with 10kHz signal at 1.6Vpp with high impedance output.

Codec disconected => pk-pk around 6V, no clipping, clean inverted sine wave

Codec connected => pk-pk around 2.4V, clipping on bottom end

Again, the only thing I've done is plug in the codec between tests. I'm not sure if this is because of a lack of understanding of JFET characteristics or the codec in question, or even something else entirely. One thought that crossed my mind is that maybe the lower half of the voltage divider created by p2 is being loaded down by something in the codec, but then this would only attenuate the signal and not result in clipping on the bottom rail.

Codec Datasheet


texts:
I have a buffer which I want to reset. The EN pin is connected to a pull upp resistor while the Reset pin is connected to pull down resistor. What should I do to reset the buffer manually?
Should i connect the reset to pull upp resistor to Reset the buffer?

Thanks in advance.


texts: AND gate made out of transistors letting current pass despite only one input high

texts: I recently built a gate with transistors, however my meter reads 1.6 volts when only input B is high, and 2.3 while both are high. How can I fix this? (I used 3 volts instead of 6 and 2k instead of 10k)


texts: MOSFET Drain, Source and Bulk connected to a source

texts:
Background:
I have a circuit for a FGMOS and they are describing the Fowler-Nordheim Tunneling (FNT) mechanism. The picture features two transistors: the main (FG)MOS and a secondary MOS to encapsulate the FNT mechanism. The MOSFET responsible for FNT has the Drain, Source and Bulk all connected to a source, V_Tunn. The gate of this transistor is then connected to the gate of the (FG)MOS.

Image source: Ochoa-Padilla et. al. Floating-Gate MOS Charge Programming Using Pulsed Hot-Electron Injection. Oct. 2013.

Question:
Why is the MOSFET connected this way? Does this make the FNT MOSFET act as a Two-Terminal Semiconductor/diode? See the attached picture.


texts: Why do some of my signals 'shiver' (have jitter)?

texts:
I have a 2 MHz SPI bus but one thing I've noticed that is that some of my signals often 'shiver'. Yes my trigger is setup properly so I don't think the issue lies there.

You can see what I mean here: (this is with persistence mode on). This is the clock of my SPI bus.

The SPI does work fine. I've transferred hundreds of megabytes on multiple boards and haven't seen an issue so far. But I'm still interested in knowing what could be the issue here. Also, should I bother fixing it even it works?

The measurements were taken right at the source with a VERY small ground clip.

This is a simplified schematic of my circuit. Of course the board has more SPI devices but for the purposes of this question this is accurate because the board has nothing soldered onto it yet except the uC and the SD Card.

The master (AVR Mega 128) is running off it's internal RC oscillator - I don't know if this would be relevant but since the signals shift in time it's possible that the RC oscillator's jitter is also ending up in the SPI bus. Just thought I'd mention it. It also occured to me that during these measurements I ran the controller in an infinite loop. Here's the code:

while(1)
{
    setFirstBitOnDriver(driver); // this sends a 8-bit command on the SPI bus.
    GLCD_SetCursorAddress(40); // Change cursor position on the display.
    GLCD_WriteText("LED: ");
    for(wire=0;wire<72;wire++)
    {
        itoa(wire+1,str,10);
        GLCD_WriteText(str);
        GLCD_SetCursorAddress(44);
        _delay_ms(10);
        shiftVectorOnDriver(driver); // another command on SPI. 8-bit wide.
    }
}

The jitter/shiver could happen when the internal runs for 72 times and then exits. Since it takes an additional time to execute the first three lines it could be that every 73rd waveform arrives at a slightly different time due to the additional processing time. If I had to bet, I'm guessing this is the cause of my issue (if I could, I'd confirm it this instant but my boards at work and the next week is off!) But I'd still like opinions/answers of SE on this matter.

But considering the uC is running at 8 Mhz I don't jitter due to software would be because in nanoseconds but rather microseconds. But in the 2nd figure a flat line is visible. This occures for a very brief second where the entire waveforms shifts in time and is invisible on the screen. I'm guessing that this is due to the loop and the jitter in the first picture is due to the RC oscillator.


texts: What does Limit at Min to Max values in datasheet means?

texts:
I have doubt while implementing I/O SPI interface for the ADF4158 PLL Synthesizer. I planned to use a simple I/O model to send bytes (using only 3 bits for 3 lines) using RS232 at 115200 BPS. I didn't implemented a proper SPI as I thought reading the datasheet, the device is not so time critical. But I have a doubt, what does the text in datasheet "Limit at TMIN to TMAX (C Version)" means? How can I find the max and min time periods, so that I'm sure the I/O based RS232 SPI lines works.

I am sending bytes to output pins like as below, to makeit behave like a SPI:
port.Write(new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }, 0, 16);
//There are maximum 4 bits that goes HIGH, 3 for SPI (SCLK,CS',MOSI) and a trigger bit for reading function.

Below is the datasheet snap for timing:

Link to datasheet: http://www.analog.com/media/en/technical-documentation/data-sheets/ADF4158.pdf (Page 5, I need only writing)


texts: 555 timer not switching at threshold voltage

texts:
This is a 555 timer circuit which is supposed to generate two short pulses, back to back, at a regular frequency. The top 555 is configured as astable to
control the frequency. It feeds the first 555 to trigger the first pulse which in turn feeds the second to trigger the second pulse.

The middle timer behaves as expected (green it output, blue is threshold, both from middle.

However the output on the bottom timer never goes low when it triggers the threshold voltage (green is output, blue is threshold on bottom timer)

Am I missing something, or is this a limitation of LTSpice?


texts: Question about series-connected (pseudo-nonpolar) electrolytics

texts:
Another Q&A on this site ("Ceramic caps vs electrolytic. What are the tangible differences in use?") contains good information on capacitors in general, including parameters I wasn't aware of, such as the sometimes-considerable change in capacitance of a multilayer ceramic cap as DC voltage is applied.
My search into this realm was prompted when considering use of a 10uF ceramic cap to replace a couple of 22uF series-connected electrolytics in a radio receiver AGC 'servo' application.  An op-amp comparator has full open-loop gain for DC errors between its inputs, but a 10uF integrating cap between the output and the inverting input drops the gain to unity for anything much above a few Hz.
The circuit is such that the polarity across a single cap would often reverse in normal operation.  I've been using a couple of electrolytics in series, plus-to-plus, and included a diode to their junction from the positive supply rail to force proper polarity of the caps.  The circuit of course glitchs as the DC level at the amp's output changes abruptly, but once each of the caps charges to its new DC value the midpoint holds still enough that the diode is essentially out of the circuit.  Nevertheless, a good deal of current flows in and out of those caps when the comparator corrects for a large incremental DC change, and I'm wondering what sort of trouble I'd be in if I simply removed that diode.  From what I understand, electrolytics have the equivalent of a built-in diode pointing to their + terminals and should remain happy.
So my question has two parts:

Does this use of a 'nonpolar' electrolytic violate any conditions of its use when DC is involved? and
Does this seem a proper spot for a 10uF multilayer ceramic?


texts:
I am trying to get a boost converter working. This is the schematic:

simulate this circuit – Schematic created using CircuitLab

The clock signal is 12V and 100KHz, the output capacitor is 330uF and I got it from the output of a PC power supply so is better than a common electrolytic capacitor. The load is a 7W resistor and the coil is a toroidal inductor I got also from a PC power supply but I don't know how much Henri's it is and I don't have an inductometer to measure it. The inductor is something like this:

I can't get this to boost the 12V input voltage and the MOSFET heat up a lot even with a large heat sink on it. I am having from 2A to 3A of current being drawn from the power supply. Here is the the waveform at the output of the boost (diode cathode):

As you can see I am getting a 24.8V peak (the zero voltage line is two divisions below the center horizontal line) but just a peak, I can't get a constant boosted voltage. In the MOSFET gate the signal is a perfect square wave of 12V so problem should not be there.

Can the MOSFET heat up problem being caused because I need a diode in anti-parallel with the MOSFET?


texts: Why is gallium nitride used in power electronics? Are there any alternatives available?

texts: I'm preparing for a seminar related to variable gain amplifier. I read that GaN/AlGaN are used. I wish to know why they specifically use them.


texts: Is there a simulation technology testing both VHDL code and ADC/DAC?

texts:
With HDL simulators like Modelsim, possible to check HDL codes (similar I2C/SPI).
Some of analog ICs(similar OPAMP) have SPICE models.
I'm not sure that SPICE models of SPI/I2C controlled ICs could be possible ?
Also is it possible to test them with HDL code in a same simulation software?


texts: Is a flyback diode necessary with a TC1412?

texts:
Im using TC1412 MOSFET drivers on an H-bridge for a motor, the datasheet says the drivers are protected against 5kV of ESD.

Is it necessary to use a flyback diode on the output?


texts: Im connecting a PCB mounted headphone jack to a circuit Im designing that takes a gnd, V+ and V- input from the 3 way 3.5mm headphone jack. However when I read its data sheet it has three connections and two other connections with switches (see pic below). How do I connect these?


texts:
I'm trying to get a simple UART receiver working and am close but I'm receiving slightly off values (some bits are shifted a couple places from where they should be).

Based on this answer I tried running RX through a flip flop (not sure I did that correctly) and oversampled RX.  My target baud rate is 2500000, so that's 400ns per baud and 20 samples per baud (FPGA clock is 50 MHz).

Can anyone see what I'm doing wrong?  Am I putting RX in the flip flop and oversampling correctly?

entity uart is port(
    clk_50 : in std_logic;
    reset : in std_logic;
    tx : out std_logic;
    rx : in std_logic;
    data_in : out std_logic_vector(7 downto 0); -- data being received
    data_out : in std_logic_vector(7 downto 0); -- data being sent
    leds    : out std_logic_vector(7 downto 0));
end uart;

architecture behavioral of uart is

signal sample_counter : unsigned(7 downto 0);
signal data_count : unsigned(3 downto 0);
type uart_state_t is (IDLE, START, DATA, STOP, STALL);
signal uart_state: uart_state_t;
signal next_uart_state: uart_state_t;

signal rx_data : std_logic_vector(7 downto 0);

signal rx_d : std_logic;

begin

process(clk_50, reset)
begin
    if (reset = '1') then
        uart_state <= START;
        data_count <= (others => '0');
        sample_counter <= (others => '1');
        leds <= (others => '0');
        rx_data <= (others => '0');

    elsif (rising_edge(clk_50)) then
        uart_state <= next_uart_state;
        rx_d <= rx;

        if (next_uart_state = START) then
            data_count <= (others => '1');

            if (sample_counter = x"ff") then
                if (rx_d = '0') then
                    sample_counter <= sample_counter + 1;
                end if;
            elsif (sample_counter = x"31") then -- 20 samples per baud
                    sample_counter <= (others => '1');
            else
                    sample_counter <= sample_counter + 1;
            end if;
        end if;
        elsif (next_uart_state = DATA) then
            if (sample_counter = x"0a") then    -- check rx at sample 10
                rx_data(to_integer(data_count)) <= rx_d;
                leds(to_integer(data_count)) <= rx_d;
                sample_counter <= sample_counter + 1;
            elsif (sample_counter = x"13") then
                sample_counter <= (others => '1');
                data_count <= data_count + 1;
            else
                sample_counter <= sample_counter + 1;
            end if;

        elsif (next_uart_state = STOP) then
            if (sample_counter = x"0a") then    -- check rx at sample 10
                data_in <= rx_data;
                sample_counter <= sample_counter + 1;
            elsif (sample_counter = x"13") then
                sample_counter <= (others => '1');
            else
                sample_counter <= sample_counter + 1;
            end if;
        end if;
    end if;
end process;

process(uart_state, reset, data_count, sample_counter)
begin
    if (reset = '1') then
        next_uart_state <= START;
    end if;
    case uart_state is
    when START =>
        if (sample_counter = x"13") then
            next_uart_state <= DATA;
        else
            next_uart_state <= START;
        end if;
    when DATA =>
        if (data_count = x"8" and sample_counter = x"13") then
            next_uart_state <= STOP;
        else
            next_uart_state <= DATA;
        end if;
    when STOP =>
        if (sample_counter = x"13") then
            next_uart_state <= START;
        else
            next_uart_state <= STOP;
        end if;
    when others =>
        next_uart_state <= START;
    end case;
end process;
end behavioral;

e: I think I got it - I reduced the baud rate to 1000000 and changed the logic for the START state.


texts: What does 125VAC mean on a small indicator bulb?

texts:
I have recently discovered a small box device that used to have an indicator bulb on it that would switch on when a switch was flicked. I am not sure what voltage to give the bulb, or if its AC or DC, though I assume it is AC because it says 125VAC. This is a picture of the bulb:

I am not experienced with circuits at all and I know very little about voltage, amps, resistors, and power supply. What would I need to make this work? Can I use a household battery?


texts: Calculating total resistance between two points (triangle resistor network)

texts:
I want to calculate the total resistance between the 2 points: A, B.

I've tried using the Delta-Wye method, but I'm not sure how to apply it to my problem since there's 6 resistors and not 3 (usually seen in tutorials).


texts: Half Wave Rectifier with Capacitive Filter

texts:
This is an example problem in my workbook. Please can someone explain me the working of the circuit and how is this formula derived.

I got 1 more solution to the same problem.


texts: Finding a 12 V Peltier module that reaches less than 0 °C on the cold side

texts:
I am making a small cooler box using a Peltier. At first, I used a Tec1-12706 without researching first, and it barely went under 12 °C at the cold side. I need a Peltier module that is 40 mm x 40 mm that is 12 V that goes to at least under 0 °C. I have looked at ~ 20 modules, but no matter what, none tell you how cold it can get. It just says QMAX that just says at what voltage it is when it is the coolest, but never say temperature.

How can I find a Peltier module that matches my specifications when it is not listed in the datasheet? Can I convert it from some other parameter?


texts: How To Blink LED's with MOSFET in response to Music?

texts:
trying to blink LED's by music. i've done this circuit no problem:

Now wish to accomplish the same thing using an N-channel Mosfet. I tried this circuit, and got no blinks.

Also no success with this circuit (connecting Gate to audio instead of to Source):

Did NOT use a resistor. I know the LEDs are not blown, because they work if i hook up the battery directly.

Here's the mosfet i'm using, with a li-ion battery.
http://datasheet.eeworld.com.cn/pdf/INTERSIL/20904_RFD7N10LE.pdf

What am i doing wrong. How can i drive LED's with a mosfet, in response to music? Looking for simplest method. Thx!


texts: Cheap wireless module for M2M communication

texts:
We're designing a street light control & monitoring system, which has: solar + induction lamp. Each street light has a wireless communication modules to send/receive data to a central module, which has a GPRS module to send/receive all the data back to the server..
We're not pro at wireless so we decided to use a wireless module, which is ready made.
There are a lot of wireless modules on the market: Z-wave, Zigbee,... that make it hard for me to choose. I don't know the pros & cons of Z-wave, Zigbbe... although I've tried to read a lot, but google seems not to give me any clarification.
Can you give us some suggestions on the wireless communication solution to choose which one should I go with Z-wave or Zigbee or any others.
This is a cost sensitive project. Distance between street lights ~50m


texts: Will thermocouples sharing a common wire create inaccuracies during measurement?

texts:
Specifically, I've been working with pre-existing temperature cables which are T-type thermocouples which share the same Constantan wire.  My question is if one of the thermocouple junctions is heated significantly higher than the others (such as 30 C - 40 C higher), will that hot junction affect the measurement of cooler junctions?  Please see the drawing for a quick illustration.  If Junction 2 is heated to 60 C and Junctions 1 and 3 are at 25 C, is it correct that the measurements at Junctions 1 / 3 could be incorrectly read as low as 17 C?

Along these lines, I guess another way to frame the question is would the Seebeck Effect take place at Junctions 1 / 3 if the only measurement connection was for Junction 2 (would charge carriers move with respect to temperatures even if left unconnected)?  Also, would the moving charge at the heated Junction 2 affect Junctions 1 / 3 and their movement of charges?

We have our own circuit taking measurements, and I have noticed a drop in temperature on the cooler junctions when taking their measurements.  I've repeated this result using a purchased thermocouple reading device.

Any time or clarification is greatly appreciated.


texts:
I built the following simple circuit as an input to an ESP8266 microcontroller:

When I hold the switch closed, the input goes low. How do I modify this circuit to do the opposite? I want to press a switch to produce a high signal for the input to the microcontroller.


texts:
I included a 1000uF electrolytic capacitor on the power supply input in a circuit I built. I just noticed I placed it before the main on/off switch of the circuit, instead of after.

I plan on changing the position of the cap, to after the switch, but this would require disassembly of the housing, so I would rather wait until my next round of changes (in a few months).

Is there any problems leaving the cap where it is for a few months?  My feeling is that there are no issues, such as wasted current flow, danger, or instability.  The only issue is that the current position of the cap will do nothing to suppress inrush current when the circuit is turned on.

Is this correct?  Thanks in advance.

Edit:
The circuit I am driving is a controller and strips of APA102 LEDs, drawing a maximum of 6A.

This from the NeoPixel Uberguide: "Before connecting a NeoPixel strip to ANY source of power, we very strongly recommend adding a large capacitor (1000 µF, 6.3V or higher) across the + and – terminals. This prevents the initial onrush of current from damaging the pixels."

I guess my question has changed to: Do I need the 1000uF capacitor at all, or does introduce further complication?


texts:
I received an shiny new IBL2403 the other day:

IBL2403 http://www.realmotiontech.com/Images1/IBL2403.jpg

However, I've been having difficultly using the EasyMotion Studio software that comes with it.

When I try and set up the driver for the first time, the wizard tries to deploy some test code (i.e. to send back the terminal voltage) on the driver. However, this results in the error message:

Asking for details on test failure gives:

  An internal error has occurred in the application. Possible causes:

  The board is not responding;
  Your board codification does not match with the selected amplifier codification;
  Some of the configuration files are not related with the version of program;
  You might be down with the system resources.

WRT to the first bullet, the driver is known to be responding, as I can successfully send it serial commands. I'm at a total loss to the meaning of the other three error messages.

How can I set up this driver, when the reason for setup failing is that the driver is not set up?


texts:
I have built a few analog filters (LPF, HPF, etc), after the filters, there are some amplifiers, MUX, and it goes to a ADC. For this project I am suppose to have as much of a linear system as possible. So I am wondering how I can measure the phase response of this system (0-60KHz, from the input, which could be a coil or some type of sensor to the ADC) with a 200MHz scope, and some cheap function generators (cannot afford spectrum/network analyzers) so that I can try to build lattice filters or use the DSP afterwards to try and fix the phase response.

Thank you for any advice.


texts: Understanding electric torque of a motor

texts:
I'm missing something fundamental in my understanding of the torque of a motor.

Consider the following analogy:
I have a 10kg dumbell on the ground and a 1kg dumbell next to it. Let's say that I lift the 10kg dumbell off the ground with a certain force 'F'.
Now let's say I use the same force 'F' to lift the 1kg dumbbell. Naturally, I would lift the 1kg dumbell much faster, right?

Now coming to electric motors, let's say I attach a 10kg load to the motor shaft. The motor would produce a torque T and rotate at a certain rpm. Now, I put 1kg load on the shaft.
As per the dumbell analogy, wouldn't the 1kg load cause an increase in speed because it's lighter than 10kg?

But we know that a motor's torque keeps changing with the load. So for a 1kg load, does the motor produce just enough torque required to rotate a 1kg load?
 If yes, how would the motor know what the load is so as to produce the right amount of torque?
If no, them wouldn't the motor produce the same amount of torque for all loads and only the rpm keeps changing?


texts: Automotive or solid state relay as main switch for 3D printer?

texts:
I have 47A 12V server power supply for my 3D printer project. The idea is to add a relay before printer hardware (RAMPS, Arduino Mega clone, steppers, bed heater etc). The normally open relay is then controlled by a separate Arduino Uno which monitors temperature sensors inside printer enclosure and sends constant signal if everything is ok.

For an automotive relay I would need to use an opto isolator to control a 12V line as Arduino Uno signal won't be enough to energize the relay. With SSR I guess could avoid that but is there any other benefit of using SSR instead of automotive relay.


texts:
I am trying to produce a small circuit, and I am looking to reduce the part count. I recently added an I²C EEPROM which is used once when the system boots up, along with this EEPROM I added two resistors for pullups.

I would like to do without these if possible and just rely on internal pull-up resistors.

This question seems to suggest it's possible, but just not recommended:
What happens if I omit the pullup resistors on I2C lines?

I am using an ATmega328 and the EEPROM is located next to the device with trances of about 10 mm.

Has anyone worked on a project intentionally omitting the external pull-up resistors or is this a really bad idea?


texts: Comparing two imbalanced signal transmission

texts:
Below shows a perfectly balanced system assuming cables are balanced and twisted:

Im wondering if the transmitter is not impedance balanced, would a balanced receiver reject CM interference still much better than single ended receiver:

For example below the total imbalance seems 100 Ohm:

But if one uses the receiver as single ended the total impedance seems like 101kOhm.

Would that make a huge difference also in terms of common mode interference rejection? And is there a way to quantify it?

Are there transducers which are not differential signalling but impedance balanced?


texts: Can I charge each Lithium ion battery, that are connected in series, with individual charger?

texts:
I don't know if I can do this and just want to make sure that it can work before I actually test it so that I don't have to worry about blowing my room up... The batteries have the same capacity so there won't be over discharge or charge on each battery (I will connect a battery protection on the ends of the series). The charger that I used is TP4056. The batteries that I use are actually 18650s but I accidentally wrote LiPo in the schematic.

simulate this circuit – Schematic created using CircuitLab


texts: Why or how would a volume pot work if connected in reverse, and how to simulate it?

texts:
I've come across a way to connect a regular pot to be used as a volume or gain pot, but the input and output terminals are reversed. It seems that this way of using it is somewhat common in the electric guitar realm, as I haven't found any other info or mentions elsewhere. The idea behind it is that if you have more than one signal source, each with its own volume control, by muting one of them by turning the pot all the way down, the rest won't be silenced as well because the signal won't be shorted to ground. Here's how it would be used as a volume control for a guitar pickup (voltage signal source):

And here, a dual gang pot is used in the same way to mix dry and wet signals in a tube guitar amplifier's effects loop by simply turning up the volume of signal B (signal coming out of the first triode's cathode) while simultaneously turning down the volume of signal A (signal coming from whatever is connected to the second jack) and vice versa, the "mixer's" output is the top of the pots which then go to the grid of the second triode. The 10k resistors are to avoid shorting the outputs of the signal sources when each pot is turned all the way down.

I haven't actually tried this but I know this has been used for decades now so, my question is how or why would this work and most importantly, how do you simulate this in say Proteus or LTspice? I've tried simulating this circuit using pots or resistors and the result is no voltage loss whatsoever


texts:
I wanted to know the performance of the design in terms of switching activity (hence the power consumption) using Xlinx ISE.

I have Xlinx ISE 14.3 webpack version.

Is it possible to do such analysis? If so how do it? I'm novice in using Xlinx ISE, just have started to understand different options made available in the tool.

One more point to add, the synthesis stage of the design fails due to license issue! Does it affect in doing power analysis?


texts: voltage regulator giving lower output than expected

texts:
I asked this question on the IoT Stack Exchange, but was directed here.

I am pretty new to electrical components, but I have been a software developer for years and want to get into hardware and use it as a hobby around my house.

I recently acquired some motion lights and I thought that I would add an esp8266 to it so that I would be notified when motion is detected (when the light goes on).

So, I took the light apart, soldered a line onto the neutral wire (white) and one on ground (negative line of LED in the circuit), and measured it's voltage, which is 10.5 V when the light is off and 8v when the light is on. I need 3.3 V to power the esp8266 so I put in the LD33V voltage regulator like I have used in previous projects to go from 5 V to 3.3 V to power an esp8266.

However, when I do it this time, I get 1.47 V coming out of the VOUT and not 3.3 V. I've tried multiple LD33V regulators, and other voltage regulator models, and everytime the voltage is lower than 3.3 V.

I'm not sure why that would come out lower than 3.3 V if the input is well over that. Why would the regulator take out more than it should? I've searched the internet and not found an answer, so I am hoping that someone can explain why this occurs and how I can remedy that.


texts:
I would to know what sort of adhesive I can use to stick 3 FR-4 PCB's together?

Back to back. These PCB's measure at 8 by 8 cm. With a single FR-4 substrate thickness at 1.6mm.

The reason for sticking them together is I want to make an antenna's substrate 4.8mm high and I only have 1.6mm PCB's available.

My only option is to get it done via my university which has minimal equipment. Basically what they said is they will cut the substrate to size and the sticking is your problem so I assume they do not have the resources.


texts: Which files to version control in mplabx nbproject directory?

texts:
I just discovered the files in the directory nbproject are required for MPLABX to realize a .X directory is a project.  I don't want my teammates to continually struggle with having to update every single time I make a small change, like recompile.  What are the minimum files I should I add to my version control system?

Screenshot of what I think are too many files to manage a project:


texts: Should chassis ground be attached to digital ground?

texts:
I'm working on a PCB that has shielded RJ45 (ethernet), RS232, and USB connectors, and is powered by a 12V AC/DC brick power adapter (I do the 5V and 3.3V step down on board).  The entire design is enclosed in a metal chassis.

The shields of the I/O connectors are connected to a CHASSIS_GND plane on the periphery of the PCB and also make contact with the front panel of the metal chassis.  The CHASSIS_GND is isolated from digital GND by a moat (void).

Here's the question: Should the CHASSIS_GND be tied to the digital GND plane in any way?  I've read countless app notes and layout guides, but it seems that everybody has differing (and sometimes seemingly contradictory) advice about how these two planes should be coupled together.

So far I've seen:

Tie them together at a single point with a 0 Ohm resistor near the power supply
Tie them together with a single 0.01uF/2kV capacitor at near the power supply
Tie them together with a 1M resistor and a 0.1uF capacitor in parallel
Short them together with a 0 Ohm resistor and a 0.1uF capacitor in parallel
Tie them together with multiple 0.01uF capacitors in parallel near the I/O
Short them together directly via the mounting holes on the PCB
Tie them together with capacitors between digital GND and the mounting holes
Tie them together via multiple low inductance connections near the I/O connectors
Leave them totally isolated (not connected together anywhere)

I found this article by Henry Ott (http://www.hottconsultants.com/questions/chassis_to_circuit_ground_connection.html) which states:

  First I will tell you what you should not do, that is to make a single point connection between the circuit ground and the chassis ground at the power supply...circuit ground should be connected to the chassis with a low inductance connection in the I/O area of the board

Anybody able to explain practically what a "low inductance connection" looks like on a board like this?

It seems that there are many EMI and ESD reasons for shorting or decoupling these planes to/from each other, and they are sometimes at odds with each other.  Does anybody have a good source of understanding how to tie these planes together?


texts: what type of solder do I have in this picture?

texts: I have some solder that might be 30 years old. it has little ridges in it like the edge of a dime. does this mean is it NOT for electronics but rather for other types of metal to metal joints?


texts:
I am not sure I am analyzing this correctly, but here's an attempt:
\$20lgA_o=92.0412dB\$, yielding \$A_o=40K\$

And

\$20lgA_o-20lg(1+100K/\omega_b)=40\$, yielding \$f_b=40.08Hz\$, hence \$f_t=f_bA_o=1.6032MHz\$

Are these values correct?


texts: I’m having trouble solving this digital circuit. Help!

texts:
I need to design sequential logic circuit from this state diagram using only 2 D-latches.

And this is my attempt:

If I put it in the simulator it just gives me error and wont count. I assumed that its supposed to be synchronous. I reversed Q1 and Q0 in the state diagram but that isnt supposed to change anything.

I just don’t know where the mistake is. Someone help please.


texts: Problem with drawing vector lines on an XY oscilloscope, caused by X and Y being set at slightly different times

texts:
I'm doing a project where I need to draw shapes on an oscilloscope by controlling the X and Y channels from a microcontroller, to eventually make a game which you can play on your oscilloscope.
I've come across an issue where, say I want to draw a line from (0,0) to (500,500) (by the way, these coordinates I'm giving are from 0-4096, because 4096 is the highest analogue output from my microcontroller) - I set the X and Y both to an analogue value of 0, and then set them both to 500, with code like this:
void loop() {
    analogWrite(dacpinX, 0);
    analogWrite(dacpinY, 0);
    analogWrite(dacpinX, 500);
    analogWrite(dacpinY, 500);
}

However instead of drawing a diagonal line, it draws a square. This is because it sets the X position before the Y, so supposing the beam is already at 0,0, it will first move right, then up, then left, then down, and so on.
A (bad) fix I came up with was to make a function called lineto(i, j), which draws a line from the current position to the position (i,j). This function just moves from the current position to (i,j), but in a set amount of steps. If I set the amount of steps to a few hundred, I get a relatively smooth line, but at the expense of a lot more calculation, and then it's not even really vector graphics anymore.
I've been looking at setting digital pins at the same time, and this is doable, but only if they're all in the same port. I was thinking of using this fact to control two external DACs at the exact same time, but since a port is only 8 bits, each DAC would only get 4 bits of information.
Does anyone have any ideas as to how I could achieve this?
Here are two images, the first one shows the XY plot of the signal when I try to do this, and the second shows the X and Y waveforms separately (X = bottom, Y = top).


texts: Choose and protect NPN transistor with resistor and diode

texts:
I'm working on my first circuit, controlling closet fans with an ESP32. I did some research drew the following circuit. I control the flow to GND from a 5V USB power supply with the GPIO pin thorugh the transistor. The fans would want 12V, but work with 5V just as well. I use the step-up-module to increase the airflow.

The 1k Ohm resistor should protect the base of the transistor (BC547B) and the diode is used as a " flyback diode", to protect the transistor as well. I've gathered that from this question. For this I bought a mix of common diodes (IN4001 4004 4007 5404 5406 5408 RL207 FR107 207 UF4007 IN5817 5819 5822 4148).
The question is, if the transistor is used safely in this circuit and what diode is best used here?
EDIT: I've updated the above shown circuit with feedback from the community:
EDIT 2: A second update of the circuit.


texts: ESP8266 using DS3231 to wake up from deep sleep

texts:
I am using the Arduino IDE to program the ESP8266 and am able to set the time, alarms on the DS3231 and test to see that they are firing.
My problem is that I would like to use the SQW output to wake the ESP8266 from deepsleep(0).
I have attempted to connect the SQW to the RST and interrupt pins with no luck.
Ideally I would like to have some help with:

wiring diagram
preferred libraries
an example sketch to make the system work

My goal is to set the DS3231 alarms to wake the ESP8266 at specified times, take measurements, reset the alarm and go back to sleep with the aim to extend the battery life.
Thus far I have accomplished this by having the chip wake-up every hour, check the time, go back to sleep, repeat until correct time.  It would be so much easier if I could just let the DS3231 alarms do the job.  I am running the DS3231 with the coin battery and the ESP8266 with a battery.
Stefan Wyss addressed the answer in a previous post on Feb 21, 2020, but I don't know how to touch base with him for a more complete solution.
Thanks for your help


texts: FM radio Transmitter - frequency drifting

texts:
First can someone explain to me how this FM transmitter circuit work?

Second, after replacing Q2 with a blt81, I got a Frequency drifting problem. Once it's running for a while, I need to re-tune my radio. The transistor is not hot none warm to touch, and the power supply is 6v regulated, and it's tuned into around 88mhz.


texts: Sensing analog voltage on Arduino without loading the input circuit

texts:
I want to design a voltage divider for my Arduino Analog input pin, to be able to sense the change in voltage in a 9V, 250mA circuit (without loading it).

Ive programmed the Arduino so that as soon as a drop in voltage is sensed, my Arduino will perform rest of its job (programmed to create a specific series of delays that I need).

In other words how can I create a signal that is proportional to the changes in the 9V signal that operates at 250mA without drawing any extra current from it nor by creating any voltage drops in the original circuit.

The link below gave great information on how I can use opto-couplers and that would have solved my problem but CNY17 cannot operate over 60mA (otherwise I would have just put that in series with the original circuit?)
How can I use a 12 V input on a digital Arduino pin?

Any help is much appreciated!

edit1:
Let me try to describe the problem better. I had a feeling it came across as vague in my attempt to minimize the description.
The 9V circuit that I was referring to is basically a water flow meter that starts spinning when a flow is sensed and this chops the 9VDC applied across it into pulses, an irrigation controller connected to the other end(this is what applies the 9V across the flow meter) measures the frequency of these pulses and determines the flow of the water(in gpm)
Using Arduino, I am building a circuit that will initiate a series of delays as soon as it senses a flow. 9VDC=no flow, chopped 9V=flow
However since I cannot connect 9V directly to Arduino, I need some sort of a voltage divider, but the reason it needs to be isolated from this 9V flow meter circuit is because the irrigation controller is calibrated to read any changes in the voltage and I don't want it to give false reading. I guess I can use some current from the original circuit -it currently runs at 230mA and I dont know how much I can add on to this without confusing the controller - something that must be tested to find out.
Also I would imagine that a small voltage drop (1-2volts) should be okay?

for example: I was considering using an optocoupler- with the photodiode in series with the flowmeter cicuit, but I dont want to reduce the original current (230mA) by any significant amount lest it give a false input to the irrigation controller. At the same time, the optocouplers I am looking at do not allow anything more than 60mA.

Hope this helps understand the problem a bit better. I am happy to answer any more questions.


texts: How to approach transistor-based exercises?

texts:
I  have a little problem on this exercise. I have to calculate \$V_i\$ and \$V_u\$ in A, B, C, D points. I did it for A point watching that \$Q1\$ and \$Q2\$ are off if one of them is off. Then I supposed \$Q1=Q2=AD\$ (active region) and using circuit equations I see we are between A and B. I got a relation \$V_u(V_i)\$ for this region, so I only need to see the condition for \$V_i\$ that represent the limit of active region for \$Q1\$ and \$Q2\$.
I know that I have to set \$V_{CE}=V_{CESAT}\$ for each transistor (which indicates \$Q1:AD\rightarrow SAT\$ and same for \$Q2\$), but I can't find the right expression to do it.
Can anyone help me? If you need numeric values, I'll write them.


texts: Need some advice- Should I use the CORDIC FFT function or write code for an FFT function myself?

texts: I'm currently working on designing a filter in VHDL for a project based on an FPGA. The filter would require FFT and I've heard about the CORDIC FFT function but never used it so I'm not sure how accurate it will be. So should I write VHDL code for an FFT function or use the CORDIC function? Also, does using the CORDIC FFT function require any permissions to be taken in case any work gets published?


texts: Fan control using oscillator with varying capacitance

texts:
We have been working on a small project trying to build a fun game but are having some issues. We basically need an oscillator that can be controlled by varying the distance between our hands and a metal plate (capacitor type of sensor), which then the signal converts into a PWM signal and is fed to a H-bridge that controls the fans. Our issue is the sensor part, oscillator and the converting into a decent PWM signal that idealy would go from 0-100% based on the capacitance. We have tried several types, relaxtion oscillator (square), 7414 schmitt trigger (square) and recently I also built a Variable pitch oscillator taken from a theremin guide, which generated a nice sine wave but only varied from the intervals 120-142kHz. We also could't figure out how to utilize it.

Is there any kind soul that have a great idea of how to make this a reality? Basically what we need is an oscillator that can be affected by just one capacitor where the interval of the capacitance (the hand) is around 20pF, this oscillation then somehow needs to be converted into a PWM signal. Our only challenge here is that we are limited to only analog components but pretty much have anything at our disposal, but mostly standard components, and also the 7414 is something we managed to get our hands on. We have tried to come up with a solution for a long time at a daily basis and are getting pretty frustrated.

Thank you in advance,

Chris.


texts:
I've been searching around the internet on and off now for over a month and now, and I fear my question is so basic that I can't find an answer. Or I've seen the answer and just recognize it.  All I am trying to do (at this time) is power a small dc motor that I bought from Radio Shack from a "wall wart" ac/dc converter. I have an on/off switch.  And while I know enough to wire this all together, I don't know how to power the motor with out burning it up.

The motor is the Radio Shack Hi-Speed 9-18Vdc Motor, #2730256. Radio Shack does not provide specs with its components, but I was able to find this online: "The 12-18V within the 1.98A it requires. The motor is designed to run at 1.98 AMPS MAX!!"

The first power supply that I tried was the wall wart from an old laptop that was rated at 19V 3.4A.  This worked great when the motor did not have any load applied.  It pulled around 0.25 amperes.  When I put a load on it, however, the motor then pulled over 4 amperes.

"No problem," I though, I'll just purchase a more appropriate power supply.  On eBay if found an 18V 2A power supply.  Perfect! When that arrived, I hooked it up, switched it on and the motor then drew 4.5 amperes!

So now I'm lost.  My naive assumption was that a 2 ampere power supply would not supply more that 2 amperes.  Is this not true, or is the power supply I purchased junk?

Or, do I really need to be looking for some sort of current limiting circuit that limits the current to just under 2 amperes?  This would allow me to return the supply I purchased and just use the one I had.  It would also protect the motor from current spikes. I've tried to read up on this, but the more I read, the more confused I get.

The application I have in mind will require lots of torque, so I'm trying to keep the current supply as close to its max as is safe.  My next step will be to control the speed using PWM with either a 555 timer or an Arduino board.  But for now, I'd be happy just to switch it on and have it run for 6 hours and not burn out the motor.  How do I do this?  How do I keep the dc motor from drawing more current than is healthy for it?


texts: What happens if a process needs more pages than number of entries in page table?

texts:
I am having a little trouble understanding the concept of paging. Below is a simple example to illustrate my question.

Suppose main memory has 128 bytes, organized into 32 pages of size 4 bytes each, and the page table has 8 entries.

A process needs 10 pages (= 40 bytes). As a result, the page table will contain mapping to real address of 8 pages. For access to these pages, the page number portion of the logical address will be used as index into the page table to obtain the physical address. However, with the typical scheme of using the page number as an index, the process won't be able to access the 9th and 10th pages.

Does it mean that the page table should always contain as many entries as the maximum possible number of pages (in this case, 32)? Or does the page table have tuples (page number, frame number), with the page number mentioned explicitly (as in TLB)? How is this supposed to be done?


texts:
here is the code

#define F_CPU 1000000UL
#include <avr/io.h>
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
int main(void)
{

DDRA |= (1 << PA0);
DDRB |= (1 << PB0);
DDRD |= (1 << PD2);

MCUCR |= (1 << ISC01);
GICR |= (1 << INT0);
sei();

while(1)
{

if (PINB == 0b00000001) //when i trigger pbo it will light pa0
{PORTA = 0b00000001;}

}
              //idont want any thing to happen i want pa0 is on for ever

}

ISR(INT0_vect)
{
    _delay_ms(10000);

    PORTA ^=(1<<PA0); //toggle pa0

}

and the circuit

the purpose is when i push switch PB0 led connected to PA0 goes on

then when i trigger the interrupt in PD2 this should toggle PA0 to turn it off

the strange thing when i toggle PA0 to turn it off it the led turn on by itself automatically again without triggering the interrupt why??

although this behavior dont happen in Proteus simulation ???


texts:
Firstly I apologise for any mistakes this is deifnitely not my field of expertise. I also apologise if this is not the right place for this question.

I have been doing some reading regarding sizing a UPS and whilst most of the information is making sense I am unsure on how to calculate the VA of some units.

Take for example this Device (power info on the second page).I see the following: 100-240v/50-60Hz/6A

In order to determine the VA I understand this to be Volt x Amp. Currently I am using this pdf. This tells me that the VA subtotal for this unit would be 240 x 6 = 1440.

I then need to multiply the VA subtotal by 1.2 whihc would give me 1440 x 1.2 = 1728.

Presumably this would then mean that I need a unit with a minimum VA of 1728 in order to power the unit.

When you have a device with 100-240v presumably you use the highest value ie 240 for the calculation is this correct? Where would be the best place to find the required info in order to calculate the VA correctly ie the product data sheet? The transformer etc.

Also if anyone has a good guide/link to check I would be most appreciative, whilst I have found a few resources I am not sure if they are excatly what I am looking for.

Edit
This is the Power Module

I have clearly been confusing the input values with the output values.
From the power module link I see the following info:

48V, 400W

From this I take that the amps can be determined by 400/48 = 8 approx.

Therefore I believe the output values of the unit to now be:

48V, 8A, 400VA, 400W

I am unsure how to now determine how long a particular ups would last. I assume in order to do this according to this link would be to also know:

DC Bus, Invert Efficiency, Charger

Looking at the equipment datasheets I do not seem to have this info. But I do seem to be progressing.


texts:
new member here with a question.

My Wine Enthusiast Wine Cooler (Model 254 60), bit the dust.  The new boards cost $297 each and there are three in the unit.

I want to remove all of the boards and use a 12 volt power supply on a timer.  The connections would be (3) Peltier's, (3) fans cooling side and (3) fans heating (exhaust side).  All connections wired in series.

What kind of 12 volt power supply would I need to complete the task?

Thanks in advance....


texts: Cheapest way to dissipate energy (discharge battery)

texts:
What is the cheapest way to burn a lot of energy? Say I want to burn 800W (4V, 200A). How should I do that?

Ugly suggestions like: use a pot of water and a cable are welcome :)

It should be easy and cheap..


texts: Use of a Gas Discharge Tube to protect mains relay

texts:
I have a system that I am designing where I am interrupting the low side of a high voltage transformer with a relay, something like this (input:

simulate this circuit – Schematic created using CircuitLab

Previously I had been using a 400V breakdown voltage MOSFET output opto-isolated solid state relay to do the switching. However, while this worked initially, it failed after 20 or so cycles. It seems that the breakdown voltage of the FET outputs had been significantly lowered, so that current now flowed even when the control to the opto was off. My belief is that the 400V breakdown voltage of the FETs was exceeded during the opening of the switch and that this caused the damage (the load is somewhat arcy).

My theory was that replacing the FET device with a relay would give it greater robustness to transients, but I am now considering whether or not to go belt-and-braces in my protection and add a gas discharge tube in parallel with the relay output in order to absorb such transients. Does this seem like a necessary or smart thing to do? Would a varistor be a better choice? I sometimes see circuits showing GDTs in series with varistors - what advantage does this bring, if any?

My thoughts were to use a GDT with a rated DC breakover voltage of

\$230V\times110\%\times\sqrt{2} = 358V\$

+whatever allowance I have to make for the GDT's tolerance. For what it's worth, the relay is rated at 250VAC, but makes no mention of its ability to withstand surges.


texts: How can one verify if the FCC/CE certification mark on an electronic component or product is genuine?

texts:
Some companies can be unscrupulous and simply paste a label to fake FCC CE. How can one be sure the label is real?

Is there a website for checking the validity of the FCC CE mark?


texts: How to solder an SMD component with a "pad" on the bottom?

texts:
I am getting a PCB manufactured for a project that I am working on. One of the parts, the A4950 motor driver (datasheet), has a "pad" on the bottom, which is meant to be soldered to GND of the PCB for thermal dissipation. I am only ordering a small quantity of the PCBs, so it would not make sense for me to buy some sort of PCB assembly service. I am planning on soldering the components myself.

I was thinking about the soldering, and I am unsure how I would go about (using a soldering iron), soldering the pad on the bottom. Is this even possible to do by hand?

I was thinking maybe I could manually apply some soldering paste to the PCB, but I'm not sure whether that is an appropriate use of solder paste or not.

How can I prototype an IC with an exposed pad on the bottom?


texts: Generic parts library for Altium Designer 15?

texts:
I am just started using the Altium Designer 15 on 30 trial.
I realize the library is empty by default. And as a trial user it seems I don't get access to the Altium Vault (cloud based part library?).

I don't need anything specific, just the usual 0805 SMD resistors, caps, op-amps, some headers.

Is there a generic part library that I can use?

They have a page for old, frozen library for Altium 10. Not sure this is a good start, as it's old!


texts: When should one implement cold-junction compensation in thermocouple applications?

texts:
Specifically, when using K-type thermocouples, what sort of accuracy expectations demand cold-junction compensation as opposed to simple calibration?

Clearly there's no substitute for direct experimentation on the circuit in question, but short of that are there any general rules of thumb?

I'm building a thermal immersion circulator, I want to hold the liquid temperature accurate to 1°C, so the thermocouple readings will need to be at least this accurate.