texts:
I have put together a sine wave generating circuit. The signal goes through a transformer. The output signal of the transformer is detected and used for a measurement.

Yellow signal - From sine wave generator
Blue signal - output from transformer (not really relevant here)

I am worried about the oscillations occurring on the output of the sine wave generator. The oscillations are only present when the transformer is attached.

Are the oscillations due to not enough output drive current or from the transformer load? I am trying to understand what is going on here when the transformer is attached.

The peak to peak voltage is 3.38V and the impedance of the primary is 500 ohms, secondary is 240 ohms. I am using the LM324QT op amp (https://www.digikey.ca/product-detail/en/stmicroelectronics/LM324QT/497-12005-1-ND/2772310).

The schematic is shown here :

[![enter image description here][2]][2]

simulate this circuit – Schematic created using CircuitLab

Thank you!


texts: I'm having trouble disconnecting the dual LVDS cables from a Philips PFL6008 main board. These don't seem to have a "flip-up" type of bracket, but the 2 small black taps on the top look as if they can be pulled (or maybe also pushed).  Still, I don't dare apply too much force to the cable or connector without some knowledge on how it is supposed to open (and attempts with limited force so far failed).  So, can anyone give me some info on the connectors below?


texts: Why is the Iz max given before Iz min in this zener diode catalog? If you look at the list of diodes at the bottom, you can see that the maximum test current is given first. Is there something particular or it's just provided this way?


texts: Is a current limiter recommended for an isolation transformer rig?

texts:
Something I've been meaning to do for a while, but never quite got around to, is to build an isolation transformer unit. So, I was pretty happy when I got my hands on a couple of identical 240V to 24V 96VA step down transformers in good condition.

They look well made and are pretty heavy with a 1 Amp slow blow fuse on the primary and a 5 Amp slow blow on the secondary.  So, they've allowed for a slightly higher output current than the rating otherwise indicates.  There is one primary winding (240V) and one secondary winding (24V loaded).

My plan is to connect the secondary windings together (so 240V in and 220V-ish out) with a 1 Amp slow blow on the load side.  However, whilst the current draw is fine for most light project work, inevitably you'll attach a poorly understood load and end up blowing fuses all the time.  I won't include a diagram on this occasion, since the setup I described is trivial.

So, my question is simple, is it recommended to install a current limiting circuit (or component) to limit the output current to below 1 Amp or is this overkill?

UPDATE: Andy asked that I measure the magnetizing current into the transformer pair and, as much as I like a good old spark-off, the results are quite interesting (to me anyway!).

I left one of primary windings open circuit, then I soldered the two secondaries together.  I connected the other primary winding in series (hot side) with a 100W 1 Ohm resistor.  The DMM is a trusted true RMS model and I measured the resistor with a very accurate LCR meter, which turned out to be 1.04 ohms.

Powering up the circuit and applying 240V mains I read 0.146V AC(rms) across the resistor.  If I'm not mistaken that's over 200mA peak magnetizing current draw, which I must say I found pretty amazing.  Anyway, there you go.


texts:
I'm making a simplified version of SPICE to teach basic electronics to high school students (This is for a high school independent study).

Why does SPICE analyze circuits using Kirchhoff's current law instead of Kirchhoff's voltage law? Usually you have a voltage source to start with instead of a current source, and it is easier and more efficient to analyze a circuit using voltage instead of current.

Using voltage to analyze circuit: (See best answer)
Circuit Simulation

Using current to analyze circuit:
http://en.wikipedia.org/wiki/Nodal_analysis

Thanks!


texts: The detail of External PCIe cabling specification?

texts:
As searching on the Internet, I found that the PCI group has released the "PCIe External cabling specifications". But I can not download the document because I am not a member of the PCI group. So, please help me explain these PCIe to MiniSAS HD's signals below :

PWR
MGTPWR
CBLPRSNT#
CADDR
CINT#
CMISDA
CMISCL

Can anyone share the document or reference design?


texts: How can I attach a USB microphone to a Breakout-board using ADC Ports?

texts:
I am almost a total noobie to electrical engineering and I bought a programmable Drone called "PlutoX" from here.
I am currently trying to attach a USB microphone like this:

to the so called "X-Breakout board" delivered by the drone manufacturers.

My question is... how can I attach the usb microphone mentioned above to the ADC Ports on the Breakout board? Here's an image:

I've circled the ADC Ports in red. Through some recherche I was able to find out that the slot on the very bottom of the ADC Ports is the Pin13 (for coding purposes), where I have to attach the microphone to. Unfortunately I don't know which kind of wire I need for this or even which kinds of wires exist.

I am pretty sure that I will need some kind of adapter to set up a connection between the usb microphone and a wire which is connected to the Breakout board.

I am very thankful for your help!


texts:
I'm making a PCB with two ground signals, power ground and signal ground. These two shall be connected together at one spot on the PCB, after recommendations from the datasheet.
But how is this done in the schematic? I can't simply connect these two together, since it will then be interpreted as one net and give a DRC error. Any help is appreciated. The schematic is done in Altium Designer.

Here is the schematic of the demo board which I have based my design on, a connection between SGND and GND is done on the bottom if the schematic.

http://cds.linear.com/docs/en/demo-board-schematic/DC2044A-2-SCH.PDF


texts: What is the voltage across the diodes D1 and D2?

texts:
Following is the circuit I have been analyzing. Voltage supply at the input is -6V. I have to calculate the voltage across the diodes (D1&D2) or R2.

simulate this circuit – Schematic created using CircuitLab

Attached is the voltage I have calculated with my understanding. It is -1.4 V. Can anyone verify the calculations. Thanks.


texts: How to identify the loops to apply Kirchhoff's voltage law in these circuits?

texts:
Here is what I know so far regarding KVL. To apply KVL to a circuit, the nodes of the circuit must be identified. Then we identify loops in the circuit (a loop starts at a node, travels along one or more branches and ends at the start node). Then apply KVL to the loop.

My problem is with circuits such as a the following

I am having some difficulty in finding the loops in the circuits to apply KVL.

In schematic on the left, because Vcc and ground are drawn as single lines not connected to anything, I don't understand how to form loops to include Vcc and the wire from the transistor's emitter to apply KVL.

Similarly, in the schematic on the right, I don't understand how to include the 10V source in a loop.

I am able to solve circuit analysis questions using Kirchhoff's laws when there are "closed" connections in a circuit. But components like the ones in the above schematics confuse me.

Can someone please help me understand these schematics?


texts: Soft switching drain resistor in mosfet gain stage

texts:
I would like to switch between two drains resistors in a high voltage (300 VDC) audio LND150 gain stage. I opted for a BJT instead of a MOSFET, because the MOSFET parasitic capacitance was too high and thus reduced the bandwith of the stage. Here is the idea:

It is basic but it should work.

The problem is the switching transient, it will induce noise at the output of the circuit.

I would like to "soft switch" the BJT to limit switching noise. I thought to ramp on and off the base current of the BJT in about 200 or 300 ms but I don't find how to implement it with discrete components.

Could you suggest a circuit? Or if you have an other idea to switch the drain resistor, keeping in mind that V+ is about 300 VDC?


texts: physical 0 and 1 signals in communication and storage systems

texts:
How are 0 and 1 signals actually encoded in today's communication and storage systems? Would their actual encoding cost the same or differently? My intuitive guess is that there must always be some differences. Examples I can think of include,

Morse code (yes, Morse doesn't sound modern, but I am not familiar with the state-of-the-art physical technologies): 1 would cost longer transmission delay than 0.
Radio systems: 1 may be encoded with high frequency while 0 is low frequency. So presumably, they cost different amounts of energy to transmit.
SSD writes: perhaps writing "1"s requires more power/delay than "0"s since "0" states are by default but "1" states requires some electric power to reset things.

Time and power are two metrics that would meaningfully differentiate the two signals. But are there something else interesting? Anyway, I would really appreciate technical references (papers, url links) that corroborate these thoughts.

Thanks!


texts:
I'm considering buying a lightning protection unit for my electronics at home and would love some assistance in understanding how it all works. I live in an area where lightning strikes are very common and would like to buy/install something specifically for lightning protection.

I was looking at surge protectors that claim a joule rating of 1800+ joules. Now, in my limited understanding, a lightning strike packs much more punch and I need something more capable.

So here's my question - would a device with a rating of say 1800 joules be able to protect my electronics and if not, what do I need to look for in a surge protector?

How about surge protectors that claim they can absorb "20 000 Amps" on live, neutral and earth?


texts: How to specify a via should be plugged to prevent solder wicking?

texts:
I have a 0.167mm diameter via under a BGA component to provide ground connections to two adjacent pads (ENIG-finish PCB). Our PCB fab house recommended that we plug the via to prevent solder from flowing into the via which might leave the pads with insufficient solder.

I am using Altium Designer 20. I'm familiar with tenting vias with soldermask (I generally tent the top and leave the bottom open to avoid trapping heated gas). How do I specify that the via should be plugged? I haven't been able to find any appropriate property to set in Altium. Is this commonly done by callout on the drill guide layer or some other method?


texts: Understanding the behavior of my mistake

texts:
Few days ago, I receive the PCB I ordered, solder all the chip, and upload the program in the microcontroler. Unfortunately, I made a very huge mistake in my design. For some reason, I invert the diode sense in a RGB diode :

simulate this circuit – Schematic created using CircuitLab

I know there is no way to fix that mistake so I have to do the entier schematic, board and PCB again.

By inverting every diode sense, none of them works... But one, the one in the middle remains on regardless of the input.

I double check every parts on the board, check resistor value, possible short circuit and I found nothing. I wonder if it's another design mistake or if it's an effect from the previous error.

Here is the schematic for one RGB LED, the part in the box is repeated for each color:

Note that the LED orientation is as on the board. (upside down)

simulate this circuit

"PWM" and "Segment selection" signals come from a microcontroler. Whatever the logic level of these two signals, the LED remains on.

I'm running out of idea right know. I'd like to know where does problem come from before I restart the design. (So what I can avoid the same mistake if there is one)

Let me know if you want more information (resistor value, transistor gain, part number...)


texts: Amplitude influence in the output signal in inverting op-amp

texts:
I testing an inverting op amp circuit in LTspice.

First I observed the graphic for the gain, and calculted the bandwidth of the circuit that is 11995Hz.
Then I did a simulation at that frequency, and I was very intrigued with the result.

I thought that the saturation limit was 15 V however when I put an input amplitude of 0.15 the output amplitude is 4.2V and the form of the signal is a sine, but as I increase the value of the input amplitude the output amplitude does not change but the form of the signal becomes a triangle.

I do not understand how the phenomenon occurs.


texts:
The following analysis is taken of power electronics book of William Hart

I do not understand the process to pass of first equation to second, solving the derivative of the first equation and rearranging does not add up the accounts.


texts:
I want to know what Pulsed Drain Current has to do with discharging energy storage devices. What does a mosfet need to have in order to be capable to discharge a cap? How do I determine a rate of discharge which the fet can handle repeatedly discharging a cap? What particular items are key in mosfet datasheet to this subject matter?

Please note - this is a mosfet specific question. This is about mosfet calculations and selection, not about the circuits involved in discharging into the mosfet, I am only interested in a capacitor discharge situation because inductors are often too common.


texts: How do you visualize the frequency spectrum for a digital waveform?

texts:
How does the mathematics of a single or periodic rectangular pulse help us quickly visualize the frequency spectrum for a digital waveform? Develop the ideas behind this.

My professor posed this question and I had a hard time understanding how the digital waveform would contain any of the harmonics seen in an ideal squarewave, much less a singular pulse.

All I know is that a periodic rectangular wavefor holds the form of impulses at odd frequencies, and a singular rectangular pulse is a sinc function.


texts:
Recently, I've been working to repair a broken 1980 "Arp Solus" synthesizer that I acquired from a friend.

I have, however, found myself confronted by an unfamiliar arrangement: some kind of resistor fixed (glued? melted?) firmly to the top of a nearby IC.

The IC beneath is a CA8036 General Purpose Transistor Array. The resistor is axial, matte black and cylindrical, with no notches or contours, and is labeled "1.87 kOhms", "+/- 3%", "KRLP IC", and "8047". In the schematic, it is drawn as a standard 1.87k resistor but is also marked "3% T.C."

My initial though was that "T.C." stood for temperature coefficient, and the resistor was placed such that it would compensate for the changing behavior of the transistors as they began to heat up, perhaps keeping the oscillators in tune.  But a 3% temperature coefficient would be 30,000 ppm/C which seems impossible.

What kind of resistor is this? Why is it stuck to the IC? And to what does "3% T.C." actually refer?

Thanks!

Additional info if needed:

Here's the link to the service manual, which includes the full schematic.
The arrangement occurs twice in the circuit, one located in each of two voltage-controlled oscillators.
Neither VCO is functioning.
The synth has apparently undergone one other previous repair, somewhere between 15-20 years ago.


texts: How to experimentally calculate transconductance of an OTA?

texts: How can I experimentally calculate the transconductance of an Operational Transconductance Amplifier given that I know the value of bias current ?


texts:
I have the following I2C configuration with an ATmega168 (1 MHz) as the master and an Arduino Uno (16 MHz) as the slave.

The command for the LED connected to the slave comes from the master and vice versa. I can't get the I2C to work. The LEDs are at whatever value I initially set ledValue to be, and it is not getting it from the slave/master.

The code running on the master.

#include <stdint.h>
#include <util/delay.h>
#include <avr/interrupt.h>

volatile uint8_t slaveAddress = 5;
volatile uint8_t ledValue = 0;
volatile uint8_t refValue = 100;
volatile uint8_t rw;

void send_start(){ TWCR = (1 << TWINT) | (1 << TWEA) | (1 << TWSTA) | (1 << TWEN) | (1 << TWIE); }

void send_stop(){ TWCR = (1 << TWINT) | (1 << TWEA) | (1 << TWSTO) | (1 << TWEN) | (1 << TWIE); }

void send_data(){ TWCR = (1 << TWINT) | (1 << TWEA) | (1 << TWEN) | (1 << TWIE); }

ISR(TWI_vect)
{
    volatile uint8_t status = TWSR & 0xF8;
    if(status == 0x08) // start send successfully - now send SLA+R/W
    {
        TWDR = (slaveAddress << 1) + rw;
        send_data();
        return;
    }
    if(status == 0x50 || status == 0x58) //receive mode - data received - read it - send stop
    {
        ledValue = TWDR;
        send_stop();
        return;
    }
    if(status == 0x18 || status == 0x20) //transmit mode - SLA+W successfully sent - now send data
    {
        TWDR = refValue; //data to be transmitted
        send_data();
        return;
    }
    if(status == 0x28 || status == 0x30) //transmit mode - data successfully sent - now send stop
    {
        send_stop();
        return;
    }
    //anything else - clear TWINT
    TWCR |= (1 << TWINT);
}

void initialize_pwm()
{
    DDRD |= (1 << DDD3);
    TCCR2A |= (1 << COM2B1) | (1 << WGM20);
    TCCR2B |= (1 << CS20);
}

int main(void)
{
    initialize_pwm();
    TWBR = 0;
    //TWSR &= ~((1 << TWPS1) | (1 << TWPS0)); // prescaler 1
    // SCL = 1 MHz/(16 + 2*0*1) = 1/16 MHz
    TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWIE);
    sei();

    while(1)
    {
        rw = 1; //read
        send_start();
        _delay_ms(1000);
        OCR2B = ledValue;
        rw = 0; //write
        send_start();
    }
    return 0;

}

The code running on the slave.

#include <stdint.h>
#include <util/delay.h>
#include <avr/interrupt.h>

volatile uint8_t slaveAddress = 5;
volatile uint8_t ledValue = 0;
volatile uint8_t refValue = 100;

void send_data(){ TWCR = (1 << TWINT) | (1 << TWEA) | (1 << TWEN) | (1 << TWIE); }

ISR(TWI_vect)
{
    volatile uint8_t status = TWSR & 0xF8;
    if(status == 0xA8) // trasmit mode - master sent SLA+R - now send data back
    {
        TWDR = refValue; //data to be transmitted
        send_data();
        return;
    }
    if(status == 0x80 || status == 0x88) // receive mode - master sent data after SLA+W - read it
    {
        ledValue = TWDR;
        TWCR |= (1 << TWINT);
        return;
    }
    //anything else - clear TWINT
    TWCR |= (1 << TWINT);
}

void initialize_pwm()
{
    DDRD |= (1 << DDD3);
    TCCR2A |= (1 << COM2B1) | (1 << WGM20);
    TCCR2B |= (1 << CS20);
}

int main(void)
{
    initialize_pwm();
    TWAR = (slaveAddress << 1);
    TWCR = (1 << TWINT) | (1 << TWEN) | ( 1 << TWIE);
    sei();

    while(1)
    {
        _delay_ms(1000);
        OCR2B = ledValue;
    }

}


texts:
I am working on an ultrasonic mist maker for my school project but I can't seem to make the piezoelectric disc work and the MOSFET keeps burning up.

Can s.eone help me figure out what's wrong?

Here is the schematic (credit goes to greatscottlab on youtube.)

While we're at it I was wondering what would be the better power source for the circuit, a 12V DC power source or a 12V battery.

Update : I have retried the circuit the 15V is now connected at the 8-pin and no components get burned up (yay!!) but I still can't get the piezoelectric disc working.  Any ideas why?

P.S. I used the 12V DC power source and I'm building it on a bread board because I do not have the necessary appliances such as solder and PCBs.


texts: Storing info bytes in ATmega169PA that remain after reprogramming

texts: Does anyone know if there is a way that I can store 2 bytes of data into an ATmega169PA that will survive re-programming of the device? I would like to store a unique ID into an ATmega169PA that will remain in the device even if I erase both FLASH and EEPROM or reprogram the device with a new application.


texts: Calculating sampling frequency off of estimated stop band attenuation

texts:
I'm trying to calculate what I will have to set my microcontroller's ADC sampling rate at in order to sample a band of 500kHz to 1.6065MHz without aliasing. Some constraints here are that I have to work with only 3 high gain-bandwidth product op-amps (conceivably at my level of expertise this means designing a maximum 6th order filter or 3 2nd order stages cascaded) and the maximum sampling rate the ADC can do is 7MSPS in a triple interleaved mode.

I read in a reference book that for a 10 bit ADC the average attenuation at the end of the transition band and beginning of the stop band should be about 62dB down. From the equation for a butterworth filter I work out the sampling rate as follows:

\$A_{min} = 62dB = 20log_{10}(1+(\frac{f'max}{fc})^6)^\frac{1}{2}\$ where \$f'max\$ is the frequency the stopband begins at and \$f_c\$ is the cutoff frequency \$1.6065MHz\$. The power 6 comes from the filter order.

\$(10^{\frac{62}{20}})^2-1\ = (\frac{f'max}{fc})^6\$

\$f'_{max} = 17346kHz (17.3MHz) \$

and according to my reference source \$F_s=2f'max\$ meaning Fs needs to be like \$34MHz\$

This seems really high. Is there a flaw in my math or my reasoning here? It seems that the higher the filter order the lower the sampling frequency needs to be but due to the 3 opamp constraint I can't implement something upwards of a 10th order (for a 10th order filter I work out Fs = 13MHz) and the ADC does a max of 7MSPS.


texts: Why is "hole" conductivity called so, isn't that a case of electron movement?

texts:
Why is it that "hole" conductivity is called so, isn't that just a case of electron movement in the opposite direction, or as in 'Vacant Seats in Theater' analogy mentioned in the Electron Hole Wikipedia, it can be thought of as people moving in opposite direction?

I am not looking for a long explanation, just curious why would textbooks/theory prefer mentioning something fictitious rather than something real which is electron movement?

Is it because it helps distinguishing the conduction due to normal electron movement vs movement due to lack of it? Probably when you visualize it, it does indeed look like movement of holes as well. I was really not able to understand the rationale, hence this somewhat basic question.

As a side note, did anyone have this question while learning? I hardly saw any discussion on however I thought it is a good question to ask.


texts:
I am looking to make very basic timings on an STM32. For example, I would like to program my STM32 to output bytes on the UART for 1 minute. What clock/timer should I use?

Looking through the reference manual, a lot of clocks are available. It seems that some of the most appropriate clocks would be the Real Time Clock (RTC), a General-Purpose Timer or an Advanced-Control Timer. What clock would be the easiest to use for making basic fixed timings?


texts: Do BLDC motors have saliency similar to IPMSMs?

texts:
I am experimenting with an outrunner BLDC motor, which is a Gaui GUEC GM410. It is a 12N14P motor and it has sinusoidal bEMF.

If my assumption is corrent, it can be considered to be a SMPMSM with no iron teeth between the permanent magnets, thus there is no dependence in reluctance (and consequently inductance) with regard to the rotor angle, unlike in an IPMSM.

However if I connect a small amplitude (1-2V range) 200kHz sinusoidal test signal between two phases and measure the voltage on the third while slowly rotating the rotor by hand, the ratio of the output and input amplitude is clearly changing a bit, from about 0.45 to 0.55, so around the expected 0.5.

My question is what causes the saliency in this type of motor? Since the test signal is low, I don't believe it has anything to do with saturation.

My final purpose of knowing the source of this saliency would be to fully understand the model here, where the expression of the A phase inductance is $$L_{aa}=L_s+L_mcos(2\theta_e)$$ with Lm being negative as default in the parameters section.

In this article on the second page in the corresponding equation it is negative and is specified as $$L_{ms}= \frac{1}{2}(L_d –
L_q)$$ so the sign eventually depends on whether Ld or Lq is bigger. Currently I cannot measure them, but that would not help to identify the reason for their difference anyway.


texts:
A lot of online resources never question the use of high amperage power supplies for powering LED Strips. As an example, 5 meters of low density (30 LEDs per m) WS2812B strips already use 30 * 5 * 0.06A = 9A at 5V. I have serious concerns about safety since the contacts and cables inside these strips have to be very thin and, to my knowledge, high amperage and thin wires don't mix very well.

My Question is: How many Amps are safe when powering LED Strips?

Side questions: Should I use 12V strips to lower the voltage? How would I safely power an arbitrary amount of LEDs (say 20m of strips, preferably only using one power supply).

Thank you for your answers!


texts: Is it okay to use these kind of batteries with this holder (pictures inside)

texts:
I have the pictured battery with 1.2 v .. It does not look like regular AA batteries on both ends.

My questions:

1) Is it fine to put the batteries in the holder although it does not fit (the batteries are slightly shorter than regular AA). So I have to force the ends to touch.

2) I do not know why the holder specifies 1.5 V on each slot. Would it be problematic if I use 1.2?

Battery brand and specifications:

Lucky sky AA NI-MH 1200 mAh 1.2 v (made in china)

Thanks.


texts: How to make audio using ultasonic transmitters

texts:
I have an idea for a project that involves two ultrasonic beams colliding in mid-air to make a sound. However, I have a few questions.

Will this even work? I've read of this type of thing being done online, but it may have been more high-level.
If so, how will I create specific sounds using these transmitters? For example, if I found a car sound online, how would I convert this to ultrasonic level?
How can I find cheap transmitters? I've seen expensive ones and transmitter / receivers, but no cheap transmitters alone.
I would appreciate any answers. Thanks!


texts: AVR Bootloader write: How to write a bootloader page address and execute SPM instruction in C code

texts:
I want to write bootloader for avr atmega328p in C language.
I want to perfom a page erase:

So I have to write the address of the z pointer. // Don't know how to implement in c code;
Then make SPMEN AND PGERS bits high. // SPMCSR = (1 << SPMEN) | (1 << PGERS);
Then execute SPM instruction within the next 4 clock cycles // Don't know code;

My 1st question is how do I access the Z-register in order to write the address of the page to be erased, Like I have been able to access the SPMCSR register and set the SPMEN and PGERS bits. something like ZPOINTER = 0x00FFEE;

My second question is that, in the datasheet it states that in order to erase the page at a certain address you have to SET the SPMEN and the PGERS bits, then you execute an SPM instruction within the next 4 clock cycles. How do I execute the SPM instruction after setting those aforementioned bits in C code?

Help will be highly appreciated. Thanks. And I throughly searched for similar info on the internet and came with nothing.


texts: How to view the output of this microcontroller/FPGA?

texts:
I am using a motor controller board from an Asian company. It has an Atmel AT91 and Cyclone II chips on it.

While I have basic experience in using some microcontrollers (PIC, Arduino) and know the basic concepts, it's my first time using an Atmel and an FPGA.

The firmware for this board has many printf() statements in its code. I'd like to know how I can view these messages during use. I know that for an Arduino you can use the serial monitor to view the system.println() statements whereas for a PIC and other microcontrollers you need the development board. Is it the same for this board? It seems to be custom made so I doubt it will "fit-in" on to any development board. The motor driver just receives motor velocities from a laptop connected via a USB cable and drives them. I do not see any statements being printed on my Laptop terminal so I was wondering how to view these statements. Are there any software tools for Atmel or is there something else that I'm not getting?

Edit: I have seen "at91sam7se512-ek" somewhere in the documentation if this means anything


texts:
I am in the design phase of a piece of machinery that needs a "Digital Clutch."

Requirements of the project:
Machine must run at several different constant RPM settings.
Machine needs to ability to "sense" a jam based on the motor load/torque
Clutch Sensitivity must be able to be digitally changed on the controller for various work loads.

Project will be made with a low horsepower motor(1-3HP), running on 110v.

I am stumped as to how to measure the apparent load in order to stop the machine should a jam occur.

One thought I had was using a speed controller to measure the RPMs, and designing the controller to sense a change in current, thus being able to I believe measure a change in load.

While I've scoured Google for equations, I think I'm missing something and there may be an "easy" solution to my problem. Thanks!


texts: Are there constant voltage regulators regulating up and down for variable input?

texts:
So let's say I have a circuit that requires 2 Volts DC exactly as the source, but my power supply can be from 1 Volt to 12 Volts DC.

It would be easy to step down the voltage with a linear voltage regulator if the supply voltage was higher than what is needed for the circuit.

However, I can't seem to find any ICs that do both. It seems like no voltage regulators step up the voltage while stepping down the current into the circuit... So I'm wondering if this is even possible.

The load is a huge capacitor that will draw as much current as possible due to low series resistance! I don't care the rate at which the capacitor charges, as long as the volts don't exceed the maximum rating. 1.5 Volts will be minimum, 12 will be maximum. The capacitor is rated for 2.7 Volts, so storing energy at 2V seems pretty good to me. But in the source is 1.5 Volts, that's a lot of energy that is unable to be stored, so I figured id step it up to 2V somehow.


texts: USB Type-C EMCA cable - where does the mux happen?

texts:
If I wanted to re-route SBU1 and SBU2 to a separate controller because I only intend to use the USB 2.0 capabilities of the wire - Do I have to worry about the EMCA chip interfering?

Does the USB MUX happen in a EMCA cable - or does it happen host/device side?


texts:
I've decided to take some time to refresh my electronics knowledge after 30 years out of college.  I've run into a small problem that I can't quite figure out and need a pointer.

TLDR:  The Z80 initially starts (watching M1 strobing) but halts after just two or three, sometimes more, sometimes fewer, machine cycles.

I've built an ~ 5hz 555 astable circuit to drive the clock line of a Z80B.  The Z80B has all of the data lines pulled down to ground.  The INT, NMI, HALT, BUSRQ, and WAIT are all pulled high.  I have the RESET on an RC circuit to go high after 1 second, plus a push-button to pull it low for a manual reset (pictured below... Ignore the crystal oscillator circuit; that isn't connected to anything).

The 555 is putting out a nice steady square pulse at about a 50% duty cycle.  M1 will go high during reset and then cycle between one and five times, but then stops (seeming to indicate that the processor has stopped).  With the data lines pulled to zero, I'm expecting it to continue to run, executing NOPs.

Can someone see anything obvious that I've done wrongly here?  The thing that keeps running through my head (and that I can't seem to find any data on anywhere) is that the clock might be too slow if the Z80B uses dynamic registers internally.  I can't seem to locate any authoritative datasheet for the Z80B.


texts: Can you find informations about this IC? D61422F1

texts:
Could you find the information about this IC, like its datasheet or something. The IC name is D61422F1 17B and the next line is 1317EV007G
Here is the image:

I found this IC in a TV box, in this case it's VTVcab DVB T2.
Thanks for any help!


texts: Turn vacuum on when another load (eg. drill/saw/etc.) is active

texts:
I need to turn ON (and OFF if possible) a vacuum when another DIY tool, like a drill, is activated/deactivated.

The idea is: "I start working and the vacuum start sucking dust automatically. Then it stop when I stop working".

The tech spec. are (both for tools and vacuum):

Voltage: 230V
Current (max): 16A

NOTE:
I don't want another manual switch to turn on both.
I want an automatic system which detect when the load (the tool in this case) is turned ON and turn on a "slave" switch (like via relay) to power on the vacuum.


texts:
I have following PCB design, which use PIC32MZ2048EFH144 and KSZ8081RNACA, I want to set up phy address to be 3.
From document it has following words "Config Mode: The pull-up/pull-down value is latched as PHYAD[1:0] at the de-assertion of reset.",
which can be found at following link: https://docs.rs-online.com/583f/0900766b8141ed48.pdf
How to get into config mode?
What are the steps to configure this chip?
Thanks


texts: How to Measure differential conductance dI/dV experimentally?

texts:
Numerical derivation of IV curve is always a possibility to deduce dI/dV graph.
How to measure it directly in voltage bias mode?
What concept is required for it?
What instrument are required to measure dI/dV?


texts:
I am working on a project where I have to monitor Vehicle fuel levels using an ADC of a micro controller. My fuel signal is a 0-12V signal & my 10 bit ADC is 0-3.6V range. I have 2 questions :-

Is only putting resistor divider for 0-12V to 0-3.6V sufficient? Do I need to take care of anything else here?
How do I calculate resolution of 10 bit ADC after I drop down the voltage as mentioned in point 1 using a divider circuit?


texts: Measure voltage with PIC18F97J94 (resistor divider)

texts:
I want to measure the input voltage (range from 4V-10V) with AD converter on my PIC18F97J94. I need to use resistor divider to scale the voltage between 0V-3.3V to work with my ADC.

I used voltage calculator and came up with values below:

Vin = 10V (max voltage)
R1 = 7.5k
R1 = 3.7k
Vout = 3.3V

Will this schematics work and how do I calculate capacitors value to filter the supply noise? Please find picture attached.

How do I make sure the impedance is within datasheet value? If Im right, maximum impedance on ADC would be 2.5kohm?


texts: Need of External Pull Up/Pull Down for Processor I/O pins

texts:
For a particular I/O pin, its been mentioned in the processor data manual that there is Internal pull down, after power on reset, in the device with a default drive state of the pin as tristate(Z).

I understand that when the processor drive state for that particular pin, when it acts as output(processor is driving), is in tristate, the internal pull down will be effective.

What happens when that processor pin acts as input and the state of the signal driven by an external device(say FPGA/Memory) is in tristate? Will this internal pull down be effective?

I confused myself with which one of these two is dominant.. Active(state of signal from external device) or passive(internal pull down)..

My question is, do I need a External pull up/down for that signal, taking into consideration that current will flow in low resistance path..

I suppose the Internal pull down is sufficient to get rid of that tristate.. Just wanted to check with you guys..

Thanks in advance..


texts: How can you power a device using a relay when the device uses power cables to change its operating mode?

texts:
I am working on a custom automative install on my car. I have a few lighting fixtures that change colour based on which power +12v wire is being used.
For example, each lighting fixture can display a purple light, or a white light. To switch between the colour options, the +12v wire connected to the power source must be changed. The red wire gives me a purple light, and the yellow wire gives me a white light.
I want to use a switch panel for individually turning each fixture on and off, but a separate switch for changing the colour of all fixtures as a whole. What is the best way of doing this?
If the devices only had one colour option, I could build a simple relay panel for each device into my fuse box, but I do not understand how to achieve something similar to this with devices that use multiple +12v power wires to change their operating modes.
Any help is much appreciated.


texts: Basic power: drive 12v LED from 5v Raspberry Pi output — no 12v supply available

texts:
There are a lot of questions on here and elsewhere about this.

The consensus seems to be to use a transistor to switch a power supply — implying that I have a 12v supply available.

Only 5V is available, either coming out of the GPIO pins or directly from the power supply (USB battery in this case).

This is a single LED: seems like it should be possible to directly wire it to the GPIO pins with a component in the middle that raises voltage. (GPIO pins can "safely" provide 16 mA)

It appears that I need a stepup/boost converter, but nobody seems to be discussing that. Am I thinking about this correctly?


texts:
I'm currently trying to leave the Arduino board aside and starting to program microcontrollers on PCB boards via programming pins. I'm using an ATMega328U from this premade board.

For starters, I'm trying to upload the bootloader. I know  every single connection is in place since this PCB is a kit, the FTDI driver is installed on my machine, the cable has been verified to work by using this guide

FTDI Board pins

However I have no idea of how to actually write the program and upload it to the microcontroller. I have been messing with the Arduino IDE all day. My FTDI cable is at COM10, however no programmer available in the Arduino IDE seems to work with this cable, I have been looking and trying all day with no luck.

How can I write code in C and upload it to my microcontroller using the FTDI cable? Do I need specific software to do this? Any special configuration or hack? What am I missing?

Actual schematic of the project I'm trying to program:

I am currently using this datasheet for my cable.


texts: Cleaning Type K thermocouples - What is safe?

texts:
Historically, I used a cheap (i.e. $11.00 USD) Type K thermocouple with cloth braid on my Heatermeter temperature controller rig, until my daughter tripped over the thermocouple while she was running around and rendered it unreliable.  When I threw the old thermocouple away, it was heavily coated in old smoke and grease due to the environment in my charcoal-fired BBQ smoker.

I invested a bit more in the replacement thermocouple (a Thermoworks TW-113-442-GC Type K, with an armored-metal cable jacket).  My question is what (if anything) I should do to prolong the useful life of this thermocouple; can I soak the junction end in apple-cider vinegar to clean it?  How can I clean the grease, without damaging the electrical functionality?

Google searches for cleaning Type K Thermocouples haven't been terribly productive.

To be explicit, I am not using a Thermapen; Thermoworks has a FAQ that addresses cleaning this Thermapen, but they do not have anything addressing a simple Type K thermocouple.


texts:
I am trying to make a ring oscillator inside of a Xilinx's CoolRunner-II CPLD and trying to measure how many ring-oscillator cycle fits inside a low half of external 10MHz clock. Below is simple code i made using 5 inverters.

module Top(
    input clk,
    input trig,
    output TXD
    );

 wire node1;
 wire node2;
 wire node3;
 wire node4;
 wire node5;
 wire node6;
 wire node7;

reg[31:0] counter;
reg[31:0] counterBuf;

assign node1 = ~node7;
assign node2 = ~node1;
assign node3 = ~node2;
assign node4 = ~node3;
assign node5 = ~node4;
assign node6 = ~node5;
assign node7 = ~node6;

always @(posedge node5) begin //use ring counter clock
    //increase counter only during low period of clock
    if(clk==0) counter = counter + 1;
    else begin
        counterBuf = counter;//save counter value for later use
        counter = 0;//restart counter
    end
end

However, I try to read counterBuf, it always reads 0.
If i comment out "counter=0;", counterBuf shows some change in value. Is the code wrong in esetting the counter?

How can I implement otherwise using verilog?


texts: Op. Amp. read variation when Earth is connected with Signal GND

texts:
I've made this simple circuit to read the line voltage (the 1 pin is conected in a uC by a resistor):

In the image NEUTRO is Mains Neutral AC, FASE is Mains Line AC and TENSÃO is the signal to the uC (microcontroller).

The circuit worked very wel until a connecting with the PC's serial connector has been made with de eqp. This connection had increased the signal readed (1 pin), making a measure error by 30Vrms in the uC.

When i was probing and investigating what would be the problem, i noticed that in the PC everything is connected with earth! USB shield and GND pin, GND of audio conector, GND signal tracks in the motherboard, shield and GND of the serial conector, everything.
I've tested 3 PCs and all of them is the same.
Searching in the internet i have found conflicted opinions about the union between Signal GND and Earth.

So:

What is better to stop the circuit functioning variation? Make the union once of all?
If this represent's users risks why in the PC everithing is Earthed?
And finally what kind of problem this connection could cause? Could expose the circuit to line noise for example?
Any other thing to concern?

Thank you!


texts:
I want to meausure the impedance of a sample of carbon, marked Rc in my drawing. On my FPGA I have a DAC which can provide 0-3 volts and an ADC that can read 0-3 volts. By reffering the positive input on the Op-amp(+) to the left to Vcc/2 = 1.5 V and amplifying my signal (1.5 + 1.5*sin(t))V, it looks like I get a sinewave symmetricaly around 0 with an amplitude of 15, on my oscilloscope.
I then want to measure the current through my sample with a transimpedance amplifier, while also applying a gain of 1/10 and shifting the signal to be strictly positive. Would I be able to do that with one op amp, similar to what I have drawn to the right of the Rc sample?
I am measuring a type of impedance called memristance, where the impedance depends on how much current has gone through the sample in past time. Therefore I cant have any DC voltage on top of the sinewave when I do measurements.


texts: Single I2C EEPROM 24C02 uses all eight addresses by itself

texts:
I was scanning for a used address by I2C EEPROM (24C02). Contrary to my expectations, it returned all eight possible addresses (0x50-0x57) instead of the hardwired one. I thought the problem was in a faulty chip, but changing to a new one didn't fix the problem.

Is this a "feature"? I hope not, as it would eliminate the purpose of having multiple EEPROMs connected to the same I2C bus. I tried to search on this topic, but only found this:
ATMEL 24C02 EEPROM - Trouble understanding how the addressing works. Sadly, it doesn't answer my question, so I hope someone knows that is going on.

The EEPROM that I am using has markings ATMEL711 24C02 PU24 D.

Edit1:
Here are example waveforms when I am trying to read one byte from EEPROM (hardwired to 0x50):

As you can see, both addresses work (0x50 and 0x53) eventhou hardwired address is 0x50.

Edit2:
Here is the schematic showing how the EEPROM is connect. Pull-up resistors on SDA and SCL lines are present but not shown here.


texts:
I am working with USRP(Universal Software Radio Peripheral) having power gain (mentioned in specifications) of 17dBm to 20dBm. I am using 3dbi omni-directional VERT900 antenna with it. I know the operating frequency 'f'. How could I find the actual output power of this setup?

Actually I want to connect the setup with power amplifier but firstly I need to find power output without amplifier. I don't know exactly how this will happen?


texts:
I have a question regarding battery sizing and solar panel sizing ,I am not from an engineering background that's why i might need some help with this.

I want to run a 24vdc gear motor 180W 11.5 amps just for 20 mins everyday.The motor spins an 80 kgs drum.

1)What battery size should i get? ( watts amps and volts), Also what type of battery should i get eg: li-on ,deep cycle etc .

2)Also i need to charge this battery on solar, would a 50 W panel and a charge controller of 40 amps be fine?
What controller should i get digital or analogue mppt or pwm.(i dont want it to be too complicated and expensive as this is just a university project


texts:
I am designing a PCB that controls 16-relay or more using micro-controller, but micro-controller does not have enough pins.I searched google and find solution of this problem is I/O expander, but that cost ~50 Rs and that increase PCB cost drastically high, so i want some alternative of I/O expander.
If possible/exist please suggest.
PS: The design is like as soon as supply high at input to relay circuit the load is "on" and if makes input low at relay circuit the load get off.


texts: Ceiling LED light emits very dim light when switch is off!

texts:
I have overhead ceiling LED light fixtures.

When I turn on Main Switch of the house, I see the LED starts emitting very dim light ( have to look for a 3-4 second to perceive) even when LED's switch is off!

Is that normal or I need to check it out by an electrician ?


texts: How to find step down transformer secondary output current rating?

texts:
I have obtained a small transformer with 7 windings, a 220V and 6 other individually isolated low voltages. How can I find out the current rating for the lower voltage windings? I was told these used to be made for "CD players". This is from the local market, so no datasheet. Transformer weighs about 500 grams and looks reasonably well made. If it was only one secondary 12-0-12V, I'd say it would be 1-1.5A. But, with 6 completely isolated secondaries, I'm not sure. The wires near the output seem probably slightly less than 0.5mm dia, but I'm not sure, it may be thinner. Output voltages were listed, and I measured the resistance with a DMM:

Volts Ohms
220  229
13.5 1.3
10   1.5
12   1.9
11.5 2.3
3.5  2.5
21.5 11.1

I got this to power op amps, and am currently building an electronic load (for a power supply that I will be building next). So, if an electronic load can be used to guess the output current rating (by plotting voltage drop etc...), that will also be a big help. Obviously op amps will only draw ~1mA, so I'm safe for now.... but circuits tend to get bigger...

This is my first question on stackexchange. Thanks in advance for all help and suggestions!

[edit]
Thanks Neil and Tony!

Assuming 20VA for the transformer (as it's not a toroid), I have the following calculations:

wire    V       R       V2/R    VA      I
red     220     229             ~20
blue    13.5    1.3     140     7.2     0.53
purple  10      1.5     66      3.4     0.34
green   12      1.9     75      3.9     0.32
white   11.5    2.3     57      2.9     0.25
black   3.5     2.5     5       0.3     0.08
yellow  21.5    11.1    42      2.2     0.10

I have managed to make an electronic load on the breadboard, and although it's not terribly accurate because of the wire resistances, it seems to be working reasonably. I used it to load up the blue winding. Firstly, the transformer is becoming warm even with no load (all secondaries disconnected). With some back an forth loading over 30 min (while testing the electronic load, mostly below 200mA, maybe 2 minutes @ 400mA), it became quite warm (under ceiling fan, room temp 30C, rel humidity 75% here in Kolkata/Calcutta). I didn't measure temperature as it wouldn't be accurate under the ceiling fan. Forgot to measure the hot resistance as well. Also, the voltage drop was a lot. DC voltage (measured after a 1N4007 bridge and 1000uf cap) went down quickly (open circuit voltage close to 18.5V, went down to even 11.5V under load):

V      mA
18.22  0.32
17.0   33.5
15.8   150
15.0   180
14.88  245
13.8   350

All this for the blue winding. (Also I managed to fry an lm358 as I stupidly forgot that transformers put out AC, thankfully the IRF540 was spared). The open circuit AC voltage is 13.8V.

I'll see if I can load up all the windings simultaneously for the test you suggested, but I'm a bit scared considering how fast it's heating up. I'll probably have to measure the AC primary current to check what is happening. The other 9-0-9V transformer I have has 1K resistance on the primary winding, and it stays cool even with 175mA load.

Neil, thanks for the excellent answer, I'll accept it, and see if I can do the resistance test in future.

Added Feb 2018: After some more experience with transformers in the local markets in India... Transformers here are rated on the open circuit voltage (no load). i.e. a 12V 5A transformer will show 12V at no load. Super hyped up ratings? Customer beware? One needs to carry a multimeter and measure the secondary winding resistance to estimate voltage drop and heating before purchase.


texts: How can one seperate the negative feedback types one from another?

texts:
Like voltage shunt, voltage series, current shunt, current series. I can seperate them with opamps or box diagrams very well(its easy i guess) but when it comes to a point that we use real transistors and resistor and capacitors i cant understand which one is wich. I checked some books also the web and they all have something like boxes which the gain is written in them but i couldn't find a direct way to seperate negative feedback types with a given real transistor resistor capacitor circuit. I hope my question isn't silly.

for example this circuit. what should i check first? then according to it what should i do next. and how to decide it is current series. if you can answer as it is an algorithm it would help me understand way better. Thank you in advance


texts: Noise stemming from resetting integrator

texts:
I employed an OP37 op amp to build an integrator as shown below.
There is noise caused by resetting the integrator. I made V_IN ground, and V_OUT is as following graphs. CLOCK frequency is 200 kHz.

Why does this occur?
How can I eliminate it?

V_OUT:

The used probe is a GTP-250A-2:

This is my new probe setup according to Tony Stewart EE75 and winny comments:

These are the results for 1x and 10x probe, respectively:
(It is weird that the 10X result is worse.)

Something that I suspected was the redundant traces that I placed allow me to easily install capacitors with different values. I tested different capacitors with PXC connector (X2) as below pic. However, when I trimmed the capacitor legs and soldered it to C35 actual position, the noise only reduced 10 mV. So it is not likely the problem. Am I right?
One thing likely to be worth mentioning is that when I change CLOCK to 2 kHz, the same result will appear. (It may imply that rise time plays the key role, not the sampling frequency.)


texts: Calling ports in C on my microcontroller

texts: I have been developing a small OS for my lpc1313fbd48. I am sending all of the C and assembly code in a binary file. I want to be able to call the ports in C and have an LED turn on for a few seconds and then turn on my vibrating motor (both of which are connected to the IOs on the microcontroller). How would I call the ports in C?


texts: How can I remove the return paths for a series of circuits and still know when they are completed? NFC/RFID? Multiplexing? Goubau line?

texts:
Apologies for the vague title. And know that my electronics knowledge is rather limited. Also my circuit diagrams may be incorrect.

I currently have something like this, which represents contacts on the thumb, and each of the four fingers:

I am simply detecting when a finger and a thumb touch, and determining what finger it was that made the touch. Easy!

Right now it works perfectly. It is reliable. I have dealt with the switch bounce. Now I want to retain the reliability/robustness while removing the wires that run to each finger.

So I want to remove wires on the fingers, and simply have a wire running to the thumb from the microcontroller, with a contact of some kind on each finger.

I feel perhaps I am over-complicating this, but these are my ideas thus far:

Glue micro NFC/RFID transponder to each fingertip, with the reader on the thumb.

Same as above, but some kind of NFC/RFID transponder which is activated from direct current rather than from a range. Does this exist?
I've been reading about different kinds of multiplexing which allow multiple signals to run through a single conductor, in opposing directions. My worry here is that whatever hardware this requires, might be too big to sit upon a fingertip.
Some kind of contact which allows current to flow both ways in a single conductor. I can send a current from the thumb, and have small resistors of different values on each fingertip, and then analyze the return current to determine which finger was touched.
I also read about single current earth return which allows power transmission without return lines, by grounding. Could I deliver a current from the thumb to a resister on the fingertip, then ground the current in the fingertip. And somehow listen for the grounded signal in the wrist?
Have fingertip pads made of materials with different conductivity, and read the conductivity of whatever material touches the thumb. This will require a return line though (I think).
Colored finger pads, with a color sensor on the thumb.
Fingerprint reader on thumb, fingers are identified by print. This might be tough given the amount of partial prints, and also latency is analysis.

I hope I have made my intentions for this rather clear. Running a single wire to the thumb from a microcontroller, and determining which finger touched the thumb contact by using some kind of wireless pad on each fingertip.

I hope my lacking knowledge in electronics has deprived me of some simple solution to this problem.

All help is appreciated.

Thanks!


texts: Low Pass Filter that can quickly turn on or off?

texts:
I may be pushing physics here so please tell me if I am. I have a signal I'm trying to anti-alias at 50Hz (sampling at 100Hz). The problem is my input signal is essentially an Amplitude Modified square wave that matches the sampling frequency with a very short duty cycle (~2-5%, settable). I'm timing my samples so that they only read the pulses at their peak after a settling time ts. I just realized though that my 50Hz cuttoff passive AA LPF will filter out the square wave and make ts far too long.

We've been banging our heads against the wall on this one, but here's what we want (don't know if it exists):

A Low Pass Filter that can be turned on or off quickly. Desired sequence of events is as followed:

Signal input is at 0V (off duty cycle). Filter can be on or off during this time.
Filter is turned off so signal can quickly rise to it's max amplitude (on duty cycle).
After ts, Filter is turned on again so that it is now being filtered at that higher level taking whatever value the signal is at as a sort of initial value.
After a few ms, the signal has been sampled by the ADC and the filter is turned off so the signal can return to 0V.

I dream of the circuit that can accomplish it, but cannot figure out how to pull it off. Does this exist? If so, what should I be googling?


texts: Watchdog timer not being called in sleep mode

texts:
On an ATMega328p, I'm trying to setup a program that counts 1 second intervals via the watchdog timer, even when the chip is in sleep mode. A button interrupt puts the chip into sleep mode. The problem I'm having is that once in sleep mode, it seems that the watchdog vector is never being called. I think I have everything setup like it should be but cannot figure out what's wrong. Any thoughts?

#include <avr/interrupt.h>
#include <avr/power.h>
#include <avr/sleep.h>
#include <avr/wdt.h>
//#include <avr/io.h>

#define SLEEP_ENABLED MCUCR & _BV(SE)

void setup()
{
    pinMode(2, INPUT);
    digitalWrite(2, HIGH); //enable pullup

    Serial.begin(115200);

    MCUSR &= ~(1<<WDRF); //Clear WDT Reset Flag

    /* In order to change WDE or the prescaler, we need to
    * set WDCE (This will allow updates for 4 clock cycles).
    */
    WDTCSR |= (1<<WDCE) | (1<<WDE);

    /* set new watchdog timeout prescaler value */
    WDTCSR = 1<<WDP2 | 1<<WDP1; /* 1.0 seconds */
    //WDTCSR = 1<<WDP3 | 1<<WDP0; /* 8.0 seconds */

    /* Enable the WD interrupt (note no reset). */
    WDTCSR |= _BV(WDIE);

    attachInterrupt (0, initSleep, LOW);
}

volatile uint32_t _count = 0;
volatile uint32_t _sleepCount = 0;
ISR(WDT_vect)
{
    _count++;
    //if(PIND & _BV(PIND2))
    if(SLEEP_ENABLED)// && _count >= _sleepCount + 5)
    {
        wakeSleep();
    }
}

volatile uint8_t _oldADC = ADCSRA;

void wakeSleep()
{
    attachInterrupt (0, initSleep, LOW);

    ADCSRA = _oldADC;
    //setClock16();

    sleep_disable();
}

inline void _doSleep()
{
    set_sleep_mode(SLEEP_MODE_PWR_DOWN);
    sleep_enable();
    //Do actual sleep
    // turn off brown-out enable in software
    MCUCR = bit (BODS) | bit (BODSE);
    MCUCR = bit (BODS);
    sleep_cpu();
    /////////////////
}

void initSleep()
{
    _sleepCount = _count;
    detachInterrupt(0);

    //setClock8();

    //disable ADC to save power
    _oldADC = ADCSRA;
    ADCSRA = 0;
    /////////////////////////////

    _doSleep();
}

static uint8_t __clock_prescaler = (CLKPR & (_BV(CLKPS0) | _BV(CLKPS1) | _BV(CLKPS2) | _BV(CLKPS3)));
void setClock(uint8_t prescale) //Only call from within an interrup
{
    // Disable interrupts.
    uint8_t oldSREG = SREG;
    //cli();
    // Enable change.
    CLKPR = _BV(CLKPCE); // write the CLKPCE bit to one and all the other to zero
    // Change clock division.
    CLKPR = prescale; // write the CLKPS0..3 bits while writing the CLKPE bit to zero
    __clock_prescaler = prescale;
    // Recopy interrupt register.
    SREG = oldSREG;
    //sei();
}

void setClock16() { setClock(0x0); }
void setClock8() { setClock(0x1); }

void loop()
{
    static uint32_t lastCount = -1;
    if(!SLEEP_ENABLED)
    {
        if(lastCount != _count)
        {
            Serial.println(_count, DEC);
            lastCount = _count;
            delay(100);
        }
    }
    else
    {
        _doSleep();
    }
}


texts:
I'm using a PIC32MX795F512H to set up a Roving RN-131 wifi module using UART.

I can communicate with the device but I want some feedback whether my commands are processed or not.

I basically need to check a string the WiFi module returns. The first time I check, it works, the second time, it's not doing anything anymore.

int connected()
{
    char receiverbuffer[50];
    char CMD[] = "CMD";
    char AOK[] = "AOK";
    int done = 0;
    int connected = 0;
    char str[250];
    putsUART1("$$$");
    memset(str,0,250*sizeof(char));
    memset(receiverbuffer,0,50*sizeof(char));
    while(!done)
    {
        while(U1STAbits.URXDA)
        {
            getsUART1(50, receiverbuffer, 123);
            U1STAbits.URXDA = 0;
            U1STAbits.OERR = 0;
            sprintf(str, "%s%s", str, receiverbuffer);
            memset(receiverbuffer,0,50*sizeof(char));   //Clears the buffer
        }
        if(!strcmp(str,CMD))
        {
            LATBbits.LATB7 = ~LATBbits.LATB7;
            done = 1;
            strcpy(str, "");
            memset(str,0,250*sizeof(char));
        }
    }
    done = 0;
    putsUART1("show con\r\n");
    while(!done)
    {
        while(U1STAbits.URXDA)
        {
            getsUART1(50, receiverbuffer, 123);
            U1STAbits.URXDA = 0;
            U1STAbits.OERR = 0;
            sprintf(str, "%s%s", str, receiverbuffer);
            memset(receiverbuffer,0,50*sizeof(char));   //Clears the buffer
        }
        if(!strcmp(str, CMD))
        {
            LATBbits.LATB7 = ~LATBbits.LATB7;
            done = 1;
            connected = 1;
            memset(str,0,250*sizeof(char));
        }
    }
    putsUART1("exit\r\n");

    return connected;
}

Any help would be welcome. I think I'm not clearing the string correctly but I have no idea why.


texts: I have a 95microF +5% 250v.ac c 50/60 capacitor. And I would like to use it as a  battery even if it only last a couple hours. I have a charger I made for it but the cap. Drains way to fast. I was thinking about using a dimmer switch to reduce it. Or maybe even some resistors to reduce the output voltage to like 10v roughly. I was planning on heating up nichrome wire (68ohm resistance) with this cap. So I can heat the wire up without damaging my power source.


texts:
I'm having an issue with my stepper motor, while I am aware they should make a noise that is dependent on the current and speed of the stepping, the issue I'm having is the noise is changing. For example, if I tell it to take 5000 micro steps (1/16), 1 every 700 micro seconds, perhaps after 500 steps, the frequency of the sound changes for a brief period (perhaps 1/4 second) then returns to what it was.

The typical sound is a fairly high pitched whine, the "different" sound is a slightly lower pitched sound.

The reason I ask is that I am having accuracy issues with this stepper, it is attached to an axis and if I move it 5000 steps forward, then 5000 steps backward, in some cases (not all) it is not in precisely the same position.

The power supply used is just a regular computer PSU (I had one spare) and the connector is providing 12V at upto 40 amps, the manual on the PSU states that the current is regulated to within 5% and the volts may fluctuate by upto 120mv, could this fluctuation be causing the issue? If so, how can I rectify this?

I'm working with this stepper motor: https://www.sparkfun.com/products/13656 and this driver: http://www.robotshop.com/ca/en/pololu-single-bipolar-stepper-motor-driver.html


texts: Is there a Energy Harvesting Power Management and Battery Charging EVM dev kit (e.g. BQ25504) with easily adjustable voltage thresholds?

texts:
I have a BQ25504EVM-674 Energy Harvesting Power Management with Battery Charging (EHM) development board by Texas Instruments. It fulfills my requirement of charging an energy store (e.g. supercap/rechargeable battery) and producing output voltage that can appropriately power a MCU (MSP430).
The BQ25504 also has a boost converter, meant to be used with solar panels.

Most importantly for my design - It outputs a VBAT_OK (battery level) indicator that toggles high when the stored energy ramps up to 2.8V DC and toggles low when the energy store discharges and ramps down to 2.4V DC. Lets call these voltage thresholds V1 and V2 respectively.

As mentioned above, in the BQ25504EVM-674 by TI the V1 and V2 are fixed in the factory (V1=2.8V, V2=2.4V) by surface mount resistors on the board. If one needs to change these thresholds, then one has to de-solder the resistors and solder back appropriate resistors to get the required voltage levels. TI provides a spreadsheet to calculate the resistors, voltages etc.

However, I was wondering -

is there another EHM which has similar functionality to the BQ25504EVM but with adjustable VBAT_OK voltage thresholds ?
Or does anyone know how to change the resistor settings on the BQ25504EVM easily without desoldering ?


texts: Help with 144Mhz small signal amplifier not amplifying

texts:
I attempted to build a single transistor amplifier to try and increase the voltage signal coming from a Si5351 module, set to 144 Megahertz.
My primary goal is to increase the voltage about 3 to 4 times. The default output of the Si5351 with 85ohm load is around 1.3volts or so. I want to get up to about 4 volts. Mind you, not to match with any load as of yet - just to get the voltage increased first. I seem to be having problems at every turn (even LTSpice simulations don't work like I expect..sigh)
I naively thought I could design a simple Class A common emitter to try to do this, but it's just not working and I don't know why. The bias voltages all make sense.
I am using a BF240 transistor data sheet here, which according to the datasheet, has an Ft of 1.1Ghz. So in theory I should be able to get at least a gain of 7-ish. I bought the BF240's from Jameco electronics.
Here is a picture of my current prototype construction:

It's an arduino which programs the Si5351 module, which outputs 144 Megahertz. I then measure the input and output of my transistor amp.
Here is the schematic:

simulate this circuit – Schematic created using CircuitLab
I put on a 10K or so load just to keep out any possible strangeness.
When I measure the DC bias voltages, everything seems good. I have about 1.75volts on the base, and .9 volts at the emitter, this emitter resistor is about 46 ohms so it should be about 20ma. The BF240 is supposed to be able to handle up to 50ma, so it should be safe. I measure Dc voltage of about 6.8 volts on the collector. So the DC bias looks good. I double checked the transistor by removing it and measuring the base/emitter junction and it appears OK, not shorted, etc.
I'm pretty sure I have the pinout soldered correctly as well - I even used a transistor tester I own and it verified the pinout matches with the datasheet, with flat side facing you , is collector, emitter, base. I tried two different transistors and get similar results in amplification , though..
I should be getting a gain of around 4 or 4.5, but as you can see I'm getting a NEGATIVE! gain, it's cut in half..wtf.
This is the input signal, measured just before the input capacitor:

And here is what I'm getting on the collector of the resistor:

I know I have a pretty long wire running from the Si5351 but I'm not looking for perfection yet, and the signal makes it across OK - it's literally the transistor doesn't appear to be amplifying at all, even though it's supposed to be a higher frequency transistor.
I can't imagine it's my layout that is causing it to simply NOt amplify at all.
My oscilloscope probe is set to 10x and I'm using the super short probe spring ground. The scope is a 200Mhz scope with 200mhz probes.
Scope Probe:

I clearly have to be doing something WAY wrong because it's not making sense to me. I know RF is "magic" but this is a bit weird.
I simulated the circuit in LTSpice and it looks like it gives a gain of around 4, which is what I wanted..

What the heck do I have wired wrong - or these transistors are not correct or something..


texts:
I am getting a warning in bitgen like:

  This design is using one or more 9k block RAMs(RAMB8BWER). 9k block RAM data, both user defined and default requires a special bit format.

Is it a critical warning or can I proceed with dumping the bitfile onto the FPGA?


texts: HMC197BE| GaAs MMIC SOT26 SPDT SWITCH| do not “hot switch” power levels

texts:
I came across a datasheet that says:

I want to know what does this: "do not “hot switch” power levels
greater than +20 dBm (Vctl = +5Vdc)" means.

Based on its truth table, I "assume" that it is forbidden to simultaneously apply +5V on both control inputs.

The device here is a HMC197BE, GaAs MMIC SOT26 SPDT SWITCH.
Here is the link to the datasheet: http://www.analog.com/media/en/technical-documentation/data-sheets/hmc197b.pdf


texts: Voltage divider for Xbee's ADC - what resistor values?

texts:
I have an analog sensor which outputs a value in range 0-3V depending on soil moisture.
The Xbee's ADC requires a value between 0 and 1.2V.

I was thinking about using a simple voltage divider:

Where R1 would be twice as large as R2 thus giving me effective 1/3 voltage division.

The part I do not get is what size resistors should I choose? While keeping in with the resistor ratio, I have tried a small resistor value first - around 100ohm for the R1. This did not give me any reading on my Xbee. Then I found an online tutorial for a different type of sensor (LM335) where they used 100Kohm for the same one and I found this to seemingly work a bit better in my case, giving me varied reading according to varying soil moisture.

How can I calculate what would the best resistor sizes for this application?

Some information about the rest of the circuit:

My power supply is 5V and the is powered directly from it, the Xbee also has a voltage regulator to bring it down to its required 3.3V (active XBBO). Grounds are connected.

EDIT

After bit of trial and error, I have determined the sensor website must be wrong because the moisture sensor behaves as it would have 10kΩ resistance (impedance) - I was able to half its voltage by simply using another 10kΩ resistor connected to the ground (and third it using two of those resistors). All the measurements seem to be working just fine so I may get away without using the amplifier. Either way, it would be useful to know what the parameters of Xbee's ADC are as the voltage requirements are different compared to the Series 1 which makes me reluctant to simply assume that the information is the same.

Anyway, that brings me to the basic question again - knowing the sensor impedance and other parameters of the circuit, how do I determine what resistor sizes would be a good match?

Lastly, thank you all very much for your input and help so far!


texts: Identifying 6-pin SMD from LXM05AD17M2 servo motor controller

texts:
I have LXM05AD17M2 servo motor controller and I need to replace a burnt 6 pin SMD component, but I don't know what it is. I got this picture from the internet.

I circled the part which I need. Thank you all.


texts:
Once I establish a ground plane in Eagle PC, how can I relieve it(remove spots locally)  such as under smd caps in a filter circuit to avoid impedance change.
Andy-KM4TRT


texts:
This question just came up during the review of a design.

Should the TVS rather be placed before the feedthrough-cap or after?

I would place the TVS before the cap (see A in schematic) because TVS is there to protect against fast transients, which requires the shortest return path/lowest inductance possible. On the other hand though the feedthrough-cap is mostly there to get rid of conducted EMI, which also requires placement as close as possible to the connector and a short connection to case/chassis.

simulate this circuit – Schematic created using CircuitLab


texts:
The task is to find the thevenin equivalent (seen form terminals a and b) of the following circuit:

I believe I have found the thevenin voltage by simply finding the voltage drop over the 5 ohm resistor, which is in parallel with the 5A current source (if there is a better way to approach this please let me know). However, finding the thevenin resistance of this circuit puzzles me. I am aware of the method of short circuiting and open circuiting independent voltage and current sources. I apply this which reduces to the following:

However as we are looking for the thevenin resistance from terminals a and b, I am confused with how to deal with the 5 ohm connected to the node connecting the 10 and 8 ohm resistors. Is it connected in paralled with the 8 ohm resistor, or do we ignore it? Any help will be deeply appreciated. Thanks in advance.


texts:
When we talk about AC current, is it peak current value or average value?
Also when we measure AC current with a multimeter or a clamp meter, is it peak or average?
I mean, if with a multimeter I measure a 1A current under AC110V, is 1A an equivalent value, and does it mean it is 110W like DC?
My multimeter dealer says the measured AC current is standard deviation. It confuses me more.


texts:
My attempt:

Any ideas how to proceed from here?


texts:
What will be the output if I connect two 1.5 AA Alkaline batteries (3V) to a 3.3V Voltage regulator (LM1117)?

Will it give me 3.3V output? If yes... what extra components (Capacitors/Resistors) should I connect? A circuit diagram will be highly helpful!


texts:
I am a high school student and have no experience with piezoelectricity but I’m working on a piezoelectric shoe.

My plan, initially, was to connect piezoelectric transducers in parallel and solder the two end points to a full wave bridge rectifier and the DC current would be used to charge a rechargeable battery pack or the sort.

(Courtesy of the Internet)

But after searching on the internet ive been told that I’d require a separate bridge rectifier for each transducer (because of actuation problems)!!

Is this true?
So the following setup wouldn’t work?

Thicker red and black wires from transducers :-

The aim of my project is to create electricity and though the output current may be low, I’m not really concerned about that.

The justification I was given for having separate bridge rectifiers for each transducer was that they can, but don’t always, cancel each other’s power outputs (and this was from a person who has done it, I think he has an instructable on this)

From this link I gather that the piezo elements have to have the same frequency and voltage and should be in phase. I presume the frequency refers to the resonant frequency but frankly I have no idea.

And how would it be possible to modulate all of their frequencies, wouldn’t they be slightly different as pressure is applied to them? I think I am misunderstanding something fundamentally and would like clarification.

Ps: the transducers have the same (resonant) frequency


texts: Why is the cut summed in a graphic equalizer?

texts:
I would think a basic graphic equalizer could function as such: a bank of filters, each with their own connection through a potentiometer to a summer (such as an op-amp summer). However, I've run across several designs and it appears that while indeed it seems the boost is summed in this manner, the cut is also negatively summed at the input (for instance, here).

For reference, consider the following from the link, above:

Why would one do this? Why do we have to or would we want to "sum" the cut at all?

I get in theory, if I'm correct, the cut is feedback, inverted to the input op-amp (U1B in the link above), and so cancels some of that frequency.

Is this necessary, or a feature? Why is the boost summed to the output op-amp (U2A) instead of say the same opamp as the cut?

My apologies if I don't understand this design, it's one of the things I'd really like to make as a project.


texts: Understanding peak repetitive surge current

texts:
I have moc3021 optocouplers.  The data sheet says it has a peak repetitive surge current rating of 1 amp, 120 pps.  I was hoping to use a microcontroller to control 24V .800A AC with this optocoupler.  I am assuming .800 is the rms, so the peak current would actually be 1.1A and too high for this device.  Am I understanding this correctly?
MOC3020 thru MOC3023 Series datasheet
https://www.digikey.com/en/datasheets/liteoninc/liteon-incmoc302x20series20201606


texts: Migrating from PIC32MX to ATSAM MCU - SWD interface doubt

texts: Currently I use PIC32MX MCUs in my projects, but my new projects are going to have ATSAME5 MCUs onboard. On the PIC32MX I use a 5-pin interface to program and debug using a PICkit4 tool. The signals that I always used with PIC32MX are VCC, GND, MCLR/VPP, DATA-IO/PGD and CLOCK/PGC. For new projects I am going to use ATSAME5 MCUs, and I plan to keep using a 5-pin interface, by using VCC, GND, RESETn, SWDIO and SWCLK. I want to confirm if these group of 5 signals are really enough to program and debug the ATSAM MCUs, because it will be my first project with an ARM core.


texts:
What would happen if I charge a LiPo battery with a constant current source?
I know that properly it should be charged constant-current until 4.2V and then constant-voltage mode, but what if I just keep sourcing current to it, will it exceed the 4.2 limit or it will charge happily at 4.2V with whatever current it needs?
Charger schematics is taken from LM1084 datasheet.

  In this application the LM1084 acts as a constant voltage, constant current part by sensing the voltage potential across the battery and compensating it to the current voltage. To maintain this voltage, the regulator delivers the maximum charging current required to charge the battery. As the battery approaches the fully charged state, the potential drop across the sense resistor Rs reduces and the regulator throttles back the current to maintain the float voltage of the battery

With suggested schematics you can set current to say 5A at 3.5V and only 100mA at 4.2V, but will battery stop at 4.2V by itself or not?


texts: Does US have standards for smart power outlets?

texts:
I am hobbyist and I am trying to build Wi-Fi power outlet.
Right now it is personal project but I want to bring it to a mass production if I will succeed. I have never built such things before and I am curious about rules and regulations regarding such devices. I want to ensure that I won't make anything bad, stupid or hurt someone.

For example, I know that in Russia maximum power rating for such devices is 1kW. Is there something like this in the US?

I want to ensure that my device is safe and complaint with common regulations.


texts: Why active buzzers (and some vibration motors) require LOW in order to emit sound

texts:
I have an active buzzer which I connected to an arduino pin (besides the other two pins being connected to Vcc and GND).
I would expect the speaker to beep when I do a digitalWrite(PIN, HIGH) but it's the opposite.
Indeed if I don't turn off the pin explicitly the buzzer will go off.
This is the same for a small vibration motor.
Is there a sort of "convention" or even these devices have some weird default logic? And more importantly why?


texts: In this 6 purposes of Vacuum Tubes Video, what does "Generators" mean?

texts:
I was just checking how Vacuum Tubes worked in this very informative video Principles of Vacuum Tubes, however I was unable to understand what is the third point i.e Vacuum Tubes as "Generators".

Is it the same as https://en.wikipedia.org/wiki/Electronic_oscillator?

Most modern books don't explain legacy technologies like Vacuum Tube because it is out-of-date and Transistor has the same principles. From my experience which is not necessarily applicable to everyone, I felt that for a beginner being introduced to this field, explanation with simpler devices is usually more easier to grasp and it also gives you the motivation for finding Transistor and why it was such a path breaking invention.

Are there any books which deals with legacy technologies like Vacuum Tubes etc?

Retaining some parts of original question which was quoted in the answer.

  Would books like "The Art Of Electronics" help me study these topics
  in a more organized manner?


texts: Using a PWM Signal generator to drive MOSFET transistor?

texts:
I purchased a couple 1Hz-150kHz signal generators off ebay: https://www.ebay.com/itm/Signal-Generator-PWM-Pulse-Frequency-Duty-Cycle-Adjustable-Module-LCD-3-3V-30V/372273269652?epid=4017774479&hash=item56ad374b94:g:DBUAAOSwiuxaytbq

I have been trying to use them to drive various transistors. Pretty much all of them are NPN, but they range from 90V 10A to 600V 400A IGBT. I have been trying to wrap my head around a basic circuit using LEDs and a DC motor but haven't had a ton of luck so far.

My basic understanding of a transistor is that it is a kind of solid state relay switch that is capable of cycling at incredible speeds. With that info it seems that in this circuit I should be able to replace the whole left side of the schematic with the signal generator from ebay and place any type of load where the LED is, whether it is a LED, Motor, EDM, Piezo, Induction furnace and so on. Then I could adjust the frequency using the simple generator rather than trying to adjust things with the 555 circuit.

Assuming I wanted to use a transistor like this at 100V: https://www.digikey.com/product-detail/en/infineon-technologies/IRFB4110GPBF/IRFB4110GPBF-ND/2096587

What should I change in the diagram? Should I run 2 separate power supplies, or use a voltage regulator to drop from 100V to the 5-30V used by the generator?


texts: Coupling coefficient variation in Wireless power transfer

texts:
Question regarding WPT compensation topologies.

I'm trying to make a inductive wireless power transfer system where the RX coil can move quite conisderably relative to TX coil and still transfer decent amount of power.

The problem I'm encountering is that the most efficient power transfer for a coil happens at a given coupling coefficient, which is usually pretty small ~0.1. But when the coil changes relative postion, the coupling coefficient changes aswell.

Here is a simulation with variating coupling coefficients.

What would be the best method to transfer a considerable amount of power while the coil moves aka changes coupling coefficient?


texts: Prevent Clipping and Hum in class d amplifier

texts:
I got this amp. Now at large volumes, there seems to be clipping. How can I prevent it from happening, rather than never playing at high vol.

Can it be done by AGC or Dynamic Range Compression or Noise Gate.

In my case, which is a ready made pcb, how can I include such circuitry. Is it even possible.

Also, while selecting an IC, what needs to be looked at that will suggest clipping would not happen, or which parts needs to be referenced from the datasheet which ensures preventing clipping.

At large volumes, if I disconnect the mp3 player from the amp but keep the jack plugged into the amp, a high hum is heard. When removed, hum is lowered but not eliminated. Similarly, when track changes. What steps needs to be taken to eliminate them.

All the time before actually getting into practical electronics, I was only looking at Power output, THD+N, Class, etc of amplifier. It is only after going hands-on, for the first time, that I can experience the real things which most matter.

Appreciate for helping me become a pro.

Thanks.


texts:
I would like to use an isolated circuit for my animal experiments. The stimulation protocol would be: pulses one after the other (I have already used a demultiplexer circuit for this) but now I want to apply simultaneous DC at 3 pairs, as well at 200uA. I built the circuit shown in the picture. At the bottom there is the TTL sequence.

I have a PIC16F1826 which gives a seperate TTL signal (25us On 50us Off pulses or 500 ms pulses) to two TLP521-4 optocouplers. My question is that this could work without collector/emitter resistors? Does the animal head act as an emitter resistor which would give an inverting output? Is there any other switching solution (for the switching one after the other the demultiplexer worked perfectly but it cannot handle the simultaneously active part of my experiments). The isolation and to use the same circuit is necessary for me.
I tested this circuit idea which is shown in the second figure.
And thats what I see with the oscilloscope.

I know as I touch the isolated ground with the oscilloscope probe I lost the isolation. So my question is that this is only a measurement error or my whole circuit idea is not working? Why is there a DC shift at higher frequencies? What is that huge peak at the current controlled mode?

Thanks for your help and sorry for my basic misunderstanding but I am a medical doctor:)


texts: 24VAC to 5VDC or 12VDC Trigger - Maybe optocoupler?

texts:
What I'm trying to achieve is taking a 24 to 30 VAC signal from an HVAC thermostat and converting it to possibly a 5VDC or 12VDC Trigger Input to a what I believe is a
optocoupler/isolator type relay. The relay then closes the COM and NO contacts turning on a 12VDC LED (Labeled either FAN, Heat, and/or Cool). I'll post a photo of what I'm working with.


texts:
I have an Altera Cyclone IV FPGA, and I use the Quartus II software as the compiler.

In the "PinPlanner" it is possible to specify groups of pins (e.g. data buses). For each group, an I/O bank and an I/O standard (e.g. LVDS) can be specified. Then, the fitter (place and route) provides specific "Fitter Locations", specifying a precise pin for each individual wire.

Is there a way to specify the precise pin locations before the fitter attempts to fit the pins within each bank for me? Can this be done in the Pin lanner?


texts:
Here is an image of an LNB circuit:

There is some parts in this circuit that I cannot know what they are. Marked them using blue circles. What are these parts and what do they do?

They looks like the Crest of Roman Gelea :)


texts: Can USB Type-C 2.0 upstream (device) connect its CC pins and share a pull-down?

texts:
Since USB Type-C cables have only a single CC wire for detecting orientation (Microchip USB Type-C diagram:

can an upstream (device) connect its CC1 and CC2 pins and share a single pull-down resistor?

This would prevent the device from detecting orientation (and thus using the SuperSpeed USB 3.0 lines) and so limit it to USB 2.0.
But could shorting the CC pins in a receptacle actually cause damage to other devices or prevent it from operating as a 2.0 device?


texts: Why isn't this VHDL falling edge detector reliable?

texts:
I'm trying to write an RS232 decoder for my Mojo v3 (Spartan 6 XC6SLX9). I know I can find existing libraries to do this - I'd just like to do it myself. As part of the decoding, I need to detect the high-to-low transition for the start bit.

Many sources, such as fpgacenter's edge detector and Pong Chu's FPGA Prototyping by VHDL Examples book, recommend something like this:

architecture arch of edge_detector is
    signal last: std_logic;
begin
    process(clk)
    begin
        if rising_edge(clk) then
            last <= signal_in;
        end if;
    end process;

    output <= (not signal_in) and last;
end arch;

I haven't found that to be a reliable detector of falling edges. In particular, it appears to miss falling edges when the FPGA sees the edge near the rising edge of the clock:

SLOW is an edge detector that uses two registers to do the detection. Whereas FAST will fire in the same clock cycle as the falling edge, SLOW fires in the next cycle. BAD goes high when it sees SLOW fire without a corresponding tick from FAST. RAW_RX is direct from the FTDI USB-to-Serial transceiver, bypassing the FPGA; RX is that same signal as seen from inside the FPGA (and routed back out, like FAST, SLOW, etc). CLK is a 50MHz clock.

The same falling edge detector properly fires when it sees a high-to-low transition during the clock cycle:

That successful detection also illustrates why I've called SLOW slow.

What am I doing wrong? Is this detector expected to work when transitions coincide with clock rising edges?


texts: car A/C using peltier devices, is it feasable'

texts:
In a couple of forums where we are working on kit cars with VW air cooled engines and therefore little room for conventional air con compressors etc we are looking at electronic means of getting cooled air into the interior and peltier devices  have been mentioned. There is the advantage that we have small two seat cabins, about 2,5 cubic meters so not a lot needed but with ambient external summer temperatures of 30c to 42C and a large, almost horizontal windscreen, internal temps can get as high as 60c+.

I have looked at a few kits and assemblies and I can see where we could use and even utilize these but how COLD if one could expect from say a 6.5A to 10A unit using something like a CPU cooler heat sink and fan.

Alternative idea is to cool the fluid with Peltier devices in an insulated container (like a cool box) and then use that to construct a pumped cooled fluid system passing the pipes through the cooled fluid and a matrix in the car with a fan as normal and again use the heated side when needed for warming the car, when not needed the heat would be vented away or the whole thing just switched off. A/C using peltier devices, is it feasible'

Any brain storming ideas would be very welcome as I can get my head around the engineering side but electronics are limited to 12vDC car systems.

My Mercedes air con delivers as low as 5c at the vents but that is too cold and it is a much larger area.


texts: Preferred current flow in relay contacts?

texts: Yet another relay question. In this document the moving and fixed part of a relay contact are named anode and cathode. This suggests that there's a preferred current flow through the contact in DC applications. Is this taken in consideration if both contact parts have different contact materials? For instance, if contacts are tungsten and silver-nickel for anode and cathode resp. (just an example, not necessarily realistic), are you supposed to have the anode more positive than the cathode?


texts: Iterative CORDIC algorithm dynamic shift optimization

texts:
I've implemented the CORDIC algorithm on an FPGA using an iterative approach. The component is loaded with a set of values to calculate and then iterates as many CORDIC steps as necessary for the required precision. In contrast to a fully pipelined version which accepts new inputs on every clock cycle the iterative version does require far less registers and logic, but the shift operation of the main CORDIC step does turn into a dynamic shift with the shift distance depending on the current iteration:

\$x_{i+1} = x_i \mp 2^{-i} y_i \\
y_{i+1} = y_i \pm 2^{-i} x_i\$

This dynamic shift and add currently does limit my maximum frequency (only ~80MHz instead of the targeted 100MHz on an Altera MAX 10 for 32 bit precision).  I’ve thought about ways to turn this shift into one with a constant distance but I think that is not possible. I’ve also searched for articles on optimized CORDIC algorithms, but I haven’t really found anything suitable (all the interesting sounding ones seem to be not publicly accessible).

Is there any other trick to optimize the latency of this algorithm? Splitting the shift and addition into two clock cycles and therefore doubling the number of required clock cycles is not acceptable. Increasing the number of required logic is acceptable as long as it’s still smaller than the fully pipelined version.


texts: Unstability with tda 2002 bridge configuration

texts:
I'm trying, for MONTHS (obviously not everyday, but I spent at least more than 80 hours on this) to do a 15 W audio amplifier with two TDA 2002's in a bridge configuration, following the circuit provided in the datasheet itself, but it never works.

This is the circuit:

(Note: both the TAB and the 3rd pin are the same thing)

The circuit is only stable in one configuration: with the potenciometer P1 completely grounding the non-inverting input of the chip on the right, setting its output to 0 V.

This causes the chip on the left to work like it was alone in the circuit, with a speaker directly on its output with no DC decoupling. It sits around half VCC with no signal, causing a constant ~1.2 A to flow in a 4 ohm speaker.

Other than that, if the P1 is far from grounding (ie, if its on the opposite end), the circuit is wildly unstable, it keeps making loud clicking sounds and making the speaker jump from end to end, like if its output was a square wave going from one extreme to the other.

If it ever stays stable for a while, any input signal makes it go back to that unstable state.

In some of the circuits I made, it was so ridiculuously unstable that clapping my hand or screaming loud near the speaker would make it start again (just because of the small fluctuation in voltage caused by the sound reaching the spaker, making it behave like a microphone).

I've checked every single component, specially the capacitors many times, all of them are working and correctly valued.

I've checked my power source and even used a car battery to ensure it wasn't the cause of the problems.

I've disassembled the circuit and reassembled it TWICE (all components are soldered in place) and checked them to make sure no connection was wrong or failing. I also tested changing the load from my speaker to an equivalent resistor to avoid unstability caused by its inductance.

I even changed the chips 2 times. I even thought they could be fake, so I did a test circuit for the single chip amplifier configuration and all of the ones I bought work correctly on it.

I've come from the "something maybe wrong with the design" to "something is surely wrong with the design".

What's curious is that the bridge configuration for other chips like tda 2003 is almost identical, I doubt they would make the same error twice.

But I can't see any way the problem is in any of my equipment or pieces.

Do you have any idea what the issue could be, and how to solve?

Thanks!


texts: Does MAX3665 amplifier have a minimum operating frequency?

texts:
I am using the MAX3665 in a design. The amplifier has an IR Photodiode at the input and is failing to detect any signals. My signal generator outputs a maximum of MHz square waves and MHz sine waves.

How do I know what the operating frequency of the MAX3665 is?


texts:
I have a Light Sensor IC.
There is an Interrupt pin. I can see the status of it on page 9.
What is the high and low threshold exceed that they are mentioning in that table? Can someone tell me what does the interrupt pin indicate when connected to a Microcontroller GPIO?
Is there a possibility that the INT Pin will send some signal if there's some error in I2C Communication bits? Like does INT help in the data protection of the data transferred from the Light sensor to the microcontroller?


texts: How to calculate transformer inrush current?

texts:
I have a transformer with 220 V primary and three secondaries;

1. 24 V | 1.2 A
2. 24 V | 600 mA
3. 12 V | 200 mA

Each secondary have 4400uF capacitor and 100mH inductor after the bridge rectifier.

How can I estimate the inrush current and pick the proper thermistor value for limiting the inrush current?


texts: Can I use I2C protocol for product with SPI interface ICs?

texts:
I am working on FPGA project where I have to configure the onboard ICs with SPI interface specified in their datasheets and few with the I2C interface. I was wondering that, is it possible to bring these SPI interfaces ICs as well on I2C interface? I'll permanently enable the Latch Enable pin to Logic '1'(VCC) and use the SCLK and SDATA pins interface for I2C interface pins because those 2 pins only what I need! Later My HDL protocol logic will take care of it inside the FPGA.

I'm exploring this first time so, Have anyone tried it earlier with these industry standard protocols?
Is it even feasible? Especially when the product datasheet tells me that it has SPI and not I2C?


texts:
I'm trying to use a Semtech 5V 3A buck regulator, and there is obviously something wrong with the circuit, because whenever I try to pull current from it, the IC catches fire...

I've done buck regulators before and the schematic looks fine to me, but maybe I'm missing something obvious. I depopulated U15 and hooked up resistors to the output to draw current, and when ~100mA were being drawn the voltage started to drop until eventually the regulator caught fire. Any thoughts on causes?

Below are the different parts with digikey part #s:

U2: TS30013-M050QFNRCT-ND
L2: SRN6045TA-4R7MCT-ND
C4: 1276-1104-1-ND
C6, C8: 1276-6504-1-ND
C2: 1276-6736-1-nd

The full project can be found here: https://github.com/UWARG/ZeroPilot-HW/releases

Thanks!

EDIT: Below is a screen shot of the pcb layout. You can also look at the github link if you are familiar with KiCad.

EDIT #2: Below is an oscilloscope screenshot of the input on CH2 and output on CH1 with a 200 Ohm load (25mA). There isn't substantial noise for either signal at any frequency, no matter how much I zoomed in or out. As you can see, the output voltage has dipped to under 5V under a 25mA load.

5V_INT_OUT node with no load:

5V_INT_OUT node as it started to smoke:

Hopefully those oscilliscope images help, I managed to catch one of the screenshots half way through the buck regulator failing, using a 200mA load.


texts:
I'm wondering something.

Let's take a 9V dc voltage source with \$\infty\$ output current. If I short the two poles only the wire resistance will impact the current. I'll take a standard breadbord hookup wire. Based on the following table the resistance for 3 meters (10 feets) is \$0.16140\Omega\$. So...

\$ I = \dfrac{9V}{0.16140\Omega} \\ \\ I = 55.762 A\$

Based on this table the maximum current is \$7A\$ for chassis transmission and \$0.92A\$ for power transmissions.

So I've got two question :

First what can happen to the cable as the current is 8 times bigger than the limit ?
Second, let's say I replace my \$9V - \infty A \$ with a \$9V - 900mAh\$ battery. She should be discharged really quickly (in approximatively \$900mA / 56A * 60 = 0.9\$ so less than a minute), but when I've tested that, she heats up but remains charged, why ?


texts: What is the voltage that goes through a computers power switch?

texts:
I'm hooking up a microcontroller to be able to turn a bunch of computers on/off remotely. This is via the soft switch on the motherboard which doesn't carry any kind of load.

Looking at relays, the 5v one is slightly cheaper than the 12v one, both are 1A which is far overkill.

Does anyone know if I can save 5 cents by going with the 5v relay or do I have to splurge on the 12v ones?


texts: Altera Cyclone V - Linux & FPGA interrupt handling

texts:
I need to propagate an interrupt from my custom FPGA IP core to the HPS system of a DE0_nano_SoC (Cyclone V HPS-FPGA architecture) and handle in Linux. I have googled quite a lot to confidently say that this topic is not well covered.

Required functionality

The custom FPGA IP core sets an interrupt signal. The HPS registers this signal (possibly writes to the custom FPGA IP core to de-assert the interrupt signal) and copies a few bytes from registers in the FPGA to a program running in Linux.

The choice of Linux is arbitrary, preferably Angstrom/Yocto, which I have running right now, but if the FreeRTOS would offer simpler implementation I would go for it.

My assumptions (please correct me if wrong)

1) The Interrupt Controller in the HPS recognices the FPGA generated interrupts, starting at the number 73 (there is some shifting, but in principle they are mapped with constant values).

2) Linux for ARM Cortex A9, is able to recognize vendor specific interrupts (for different peripherals like I2C0/1/2, UART0/1, etc).

Question

1) Does Linux recognize the interrupts from the FPGA, mapped by HPS Interrupt Controller?

2) Do I need to develop a driver, so that the Linux can recognize the FPGA interrupts ?

3) This seems to be quite important feature of the whole Cyclone V architecture. Hasnt Altera developed such drivers already, to handle simple FPGA-to-HPS interrupts in Linux ?