Wednesday, 18 April 2018

signal processing - How to make a peak detector circuit


I wasn't able to find a good guide on this and I only recently discover electronics for myself so have a little knowledge. I was able to find something like what I need Article



How does the circuit operate? It's simple: the input signal charges the hold capacitor, and the diode prevents the capacitor from discharging. The input op amp, in conjunction with the capacitor, presents that held value as the output via the driver op amp. As the input voltage increases further, the capacitor is charged to the higher voltage; if the input voltage decreases below the previous value, the voltage on the capacitor stays at the previous peak value.


By adding a simple comparator to the output to compares the present input value to the already held value, it can also indicate that a peak has been reached when the present input value is less than the held peak by some desired amount, Figure 2. This transforms the circuit from providing a peak-hold function to implementing the peak-detect function, with comparator hysteresis to establish a valid-peak threshold.



enter image description here


And here is more thorough info about peak detectors enter image description here



What I want is


enter image description here


And add peak resetting feature. Question is, how to unite this two circuits from article and youtube into one? I just think that some resistors were omitted if not in youtube picture then in schematics from article. And another one, how to make negative peak detector(ND)? In video he says it easy task.. I mean which can detect gaps between peaks, and then positive peak detector(PD) will reset ND and vice versa. enter image description here


Think I will be able to increase voltage between top and bottom, so for peak detection and resetting negative peak detector let's have (peak-20mv).



Answer



What you want to do (or at least the way you want to do it) is actually quite complex. First, you need 2 peak detectors, one for positive peaks (let's call it PDA), and one for negative peaks (PDB). Your proposed schematic will work for PDA with a few modifications. If you use a 0.1 uF cap, it needs about a 100 ohm resistor in series with it. This will prevent the current spike / voltage step behavior seen in the video.


PDB is the same as PDA, except that the diode is reversed.


Assuming your signal has no noise at higher frequencies, you don't need to look for 20 mV differences. The output of the first opamp will do the job quite nicely, and all you have to do is detect when its output is above or below ground, depending on whether you're looking at PDA or PDB. For discussion, we'll call these opamps A1 and B1.


Here's where it gets tricky. The capacitors in PDA and PDB must not be tied to ground, but rather, each must be tied to the output of as sample/hold which is driven from the signal input (call them SH1 and SH2). When the output of A1 goes below zero, generate a pulse which causes SH2 to acquire the input, and when A1 goes above zero, generate a pulse which causes SH1 to acquire the input. If the signal you are trying to analyze (the high frequency part whose peaks you are looking at) has a minimum period T, then the pulse width should be about T/10. At the same time as you acquire the SH signal, you also need to short the capacitor to zero.


Since you are talking about fairly low frequencies, the construction of these circuits should be fairly straightforward. I didn't say simple, I said straightforward.



In the presence of higher frequency noise, you may have problems, that is, the system may go berserk. This is left as an exercise for the reader.


There is another, possibly simpler way to do what you want. If (and you need to determine this for yourself) you can view your signal as a high frequency signal riding in a larger, lower frequency signal, and you know what those frequencies are, and they are not too close, then do this. Make a high-pass filter with 90 degrees phase shift at the signal frequency. This can be as simple as a couple of RCs and op amps. For a reasonably large frequency difference,


schematic


simulate this circuit – Schematic created using CircuitLab


is the sort of thing I'm suggesting. R1, C1, and OA1 provide a high-pass filter, while R2, C2 and OA2 provide 90 degrees of phase shift. This 90 degrees can also be described as differentiation (for sinusoids, they're the same thing). Please ignore the TL081 label on OA2 - it's the default for the editor and I missed deleting it (and I'm too lazy to go back and redo the schematic).


Magnet generator



I am wanting anyone's thoughts on if an idea I have is possible. I want to build a generator using a bearing and some neo magnets I bought. I know nothing about generators like this or in general. I know there are ferrous stators and magnets and when they move across each other the field fluctuations convert to electricity. The neodymium magnets I have, both sides of the disc attract metal. I anticipated one side would attract the other would repel and I would arrange a ring on one side attracting at an angle and the other side repelling at an angle and the combination of force would spin the balls in the bearing and the coils around the magnets would pick up the current. Right now I'm trying to prove the concept with a standard bearing but plan on manufacturing one from zirconia or quartz powder. The bearing case would have slots for the magnets and I was going to mix copper powder(theory being that this mixture will pick up fluctuations like fluorescent light bulb instead of using coils?)with the zirconia powder and compress the part then fire to fuse then use Iron filings and mix with zirconia powder compress, sand to size on sanding tracks to keep ball round then fire to fuse. The dielectric property of the zirconia as well as the abrasion resistance I believe make it a better candidate for material but quartz is also conductive soo... I am not trying to patent this. If someone can make it work and charge a reasonable price you have my blessing. I don't care about money I would just like everyone to not have to pay oil prices for the most abundant resource in the universe. I project a cost of 100 to manufacture my prototype so for just the cost of replacing magnets everyone can have near free energy and society can catch up to technology.




design - Functional difference between various astable 555 circuits


Looking through some 555 square-wave-generator circuits (possibly with variable duty cycle for 4-wire PWM fan control) I've found three different circuits:



  • From the Wikipedia 555 article, a "standard 555 astable circuit":



astable 555 circuit from Wikipedia



  • From DPRG, a "simple PWM circuit":


PWM 555 circuit from DPRG



PWM 555 circuit from Nidec


Functionally, these circuits all seem to do the same thing, but seem to be vastly different in design, particularly the last two (the Wikipedia circuit lacks variable duty cycle, though the article briefly mentions it); short of simulating them, is there a way to determine which is "better" or are they equally valid?




arduino - Mechanical Switch in parallel to the Micro Controller working in Sync


Mechanical Switch parallel to Micro Controller Logic


Here is the image for my requirement,want to operate Load Lamp of 230V AC with Mechanical Switch in parallel to Controller where one can 'ON' the Load Lamp from the Mechanical Switch and 'OFF' from the controller and vice versa.


Here only issue is that Mechanical Switch can't work as A FAIL SAFE option as XOR logic gate is involved.



A FAIL SAFE option is my requirement where Mechanical Switch can turn 'ON' the Load Lamp even if the controller or XOR GATE gets fried up or fail's to operate.


In this circuit have shown XOR gate but have doubt whether any XOR gate is available which can operate at 230V AC?


Or is there any way to use XOR logic through other Electronic Components?


Or I don't mind using other logic?


Please help I'm badly stuck because of this FAIL SAFE option


[Edit by @transistor. OP to update table below.]


| MECH | OPTO | LAMP | Notes
| Off | Off | off |
| On | Off | on |
| Off | On | on |


| On | On | off |


The last status I have highlighted because if an XOR gate so available for 230V AC than in code, I can program in way such that if the device is 'ON' from Mechanical Switch and one needs to 'OFF' the Load Lamp than I just need to turn 'ON' the SCR hence as per logic of XOR gate the Load Lamp will be 'OFF'.


Or if any other Electronics component or circuit is available which helps in choosing or manipulating then only last status of logic table change.


Operating voltage, so mentioned in the circuit, for the load lamp is 230V AC and for the controller and opto coupler ia around 5V DC.


Also I need to control the Controller over the Internet.


Also can't use the 2-Pole normal Mechanical Switch as I can't change all existing switches and its a retrofitting job with limited resources.


can't use relay logic due to space constraint.




fm - Voltage Controlled-Phase Shifting Circuits


Forewarned: I have a somewhat good understanding of signals and systems but electrical engineering circuits aren't my strength.


Question: Is there a simple circuit that can introduce a voltage-controlled phase shift on a FM signal (especially for frequencies in the 10's of kHz)?


Complication: There are tons of results that pop up after Googling for voltage-controlled phase shifting (VCPS ) circuits but I can't be sure which are frequency independent and all the other potential limitations that might not satisfy the intent of my question.


This IC would seem to be suitable but I'm not completely sure.


Here's another simpler example I found closer to the frequency range I am interested in.




Answer



TL;DR the part you've linked to is suitable for whatever you want, if you're working in the 1.7 to 2.7GHz region.


Figure 6 of the data sheet shows this


enter image description here


For the higher voltages, at constant control voltage, the phase shift with frequency is flat (to my eye) over a 1GHz bandwidth, so is acting like a length of cable. For the lower voltages, I can see a few degrees of bend over that bandwidth, so it's a bit more dispersive than cable. Microstrip is weakly dispersive, though I don't know whether more or less than these low voltage curves. An FM signal covering a 1GHz bandwidth at only 2ish GHz would be quite some signal! For any lesser bandwidth, 100MHz or so, you could call this as flat as cable at all voltages.


For the higher voltages, the phase shift with voltage is slightly greater at high frequencies. For the lower voltages, the phase shift with voltage is less at high frequencies. Between 7v and 8v (by my eye) it appears that the change of phase with voltage is essentially independent of frequency over the 1GHz bandwidth. Again, over a more reasonable bandwidth like 100MHz, it's effectively flat at all control voltages.


Tuesday, 17 April 2018

What are the ways to make a dual power supply from a single voltage source?


I have a function generator IC XR2206 from EXAR. It's application circuits uses dual power supply +/-9 volts. How can I make such a 9-0-9 dual supply from a single voltage source like a battery or an adapter?



Answer




A relatively painless approach, assuming you have just the requisite positive supply, say +9 Volts, would be the use of a switched-capacitor voltage converter such as the MAX1044 or ICL7660 in voltage inverting mode. The first typical operating circuit schematic in the linked datasheet shows how.


This will provide an inverted voltage supply of up to 10mA, matching the positive voltage supply, up to 10 Volts: Sufficient for XR2206 operation with a high impedance load.


For higher current requirements, other negative voltage generation modules exist from various manufacturers, typically switch mode converters.




If a supply of twice the required minimum voltage is available, another option is to simply split the supply and create a virtual ground, either using an op-amp fed from a pair of matched resistors as voltage divider, or using a dedicated rail splitter part such as the Texas Instruments TLE2426.


This article provides some ideas on virtual ground / rail splitter circuits.


Is there a crimp tool, or something, for when you're soldering leads to leads


Are there any tools or parts that help when soldering a free-floating component to another one, for example a resistor to an LED? Something that will make some kind of mechanical connection instead of just relying on the solder. I imagine someone has to make some kind of little sleeve or collar that you slide both leads into and then crush, but I've never come across anything.



Answer




There are butt splice crimps such as this Molex one which go down to 22 AWG. Or this Amp one.


But the best way is a solder sleeve like this which is heatshrunk onto the pair of wires. The solder melts at the same time as the sleeving shrinks. Raychem solder sleeve


arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...