texts: Determining capacitor value in a flyback converter

texts:
I have a dead audio mixer power supply (Soundcraft MTK 22) which I am trying to bring back to life and learn more about flyback converters in the process. This particular supply runs on 230VAC and outputs +5V, -15V, +15V and +48V. The user guide states that the power consumption is <120VA. The problem lies in the switching circuit based on the UC3842A switching controller which I've sketched out here:

(Connections on the right are connected to the primary side of the transformer)
The power mosfet was short-circuited so during my previous repair attempts I replaced the mosfet, the switching controller, C103, C107, C105, C102, R102 and R103 but the mosfet shorted again. Thus, I decided to also replace all the SMD components around the UC3842A. However, as I don't have a component tester at hand I can't determine the values of the C106, C108 and C104 capacitors. Also, I don't know the switching frequency, which is in turn determined by C106 and R106 (whose value I do know).

Is there some other way to work out the switching frequency or choose those capacitor values?


texts: Creating a USB to RS485 converter with FT232RL chip

texts:
I want to create a USB to RS485 converter with auto switching between transmitting and receiving the data.  I found this circuit schematic on the internet.

My question is,
Do we have to program EEPROM of the FT232RL before using it or I can directly  mount it on the circuit
as shown in schematic and it will work?


texts: Hi, I'm currently trying to figure out what is the significance of this number on top of an inductor. Does it mean the value of inductance?


texts: Wiring 1 lamp and 1 fan to 2 switches instead of 1

texts:
There's this setup, where I have one lamp and one fan, both are connected to one switch.
I would like to add another switch to control them independently.

Here's a rough schematic of what I found when looking behind the switch:

Here's a text explanation in case my schema is not that clear:

I have 2 trains of 3 wire each coming from the wall, I assume each for each appliance.
Each train has a black/white(red in schema)/green.

The whites are binded together with a screw-on connector.
The greens are also binded together with a screw-on connector, and have a wire going from the screw-on connector to the ground of the switch.

The black from each train goes to each pole of the switch.

What I've tried:

Without touching the greens.

I've tried to untangle all the wires, and connect black/white(red) of one train to the switch assuming it would allow me to control either fan or lamp: nothing.

I've then proceeded to various mix/matches, sometimes the fuse would pop and I would have to reset it (I know, not a very smart move here).

That's why I've given up as I must be too stupid to figure this one out on my own.

I have no idea what's in the wall, I assumed that because I have these two train both lamp and fan are in parallel?

Any ideas? Thanks a lot for your help and sorry if it's a dumb question :/


texts:
I have a basic question for advanced FPGA developers: Do I need to use special synchronisation code for FPGA inputs?

I mean, the input will be checked in a synchronous process. Outside of the FPGA, input signals can change at any time (freq is much lower than the clock of the FPGA). Does the FPGA have some special input implementation which considers this (I am using Microsemi Proasic3) ?

If a special treatment is necessary, how should I do it?


texts: Downwards 74LS190 with clock wired to another's RCO counts twice

texts:
I have a really simple circuit, a 2-digit decade counter (0 to 99) using two 74LS190s. It works fine when counting upwards (0 .. 9, 10 .. 19, etc), but when going downwards, it seems to decrement the second digit once when the first loops back to 9, and again on 8. So the sequence looks sort of like this: ..., 22, 21, 20, 19, 08, 07, ...

The inputs ANY, DOWN and RESET are just LOGICSTATEs.

What am I doing wrong, and how can I get the correct behaviour (..., 22, 21, 20, 19, 18, 17, ...)?


texts: Synchronous Buck Converter - Current sourced by the NCH mosfet

texts:
I am trying to understand the basic operation of a synchronous switching-mode buck converter. I a continuous-mode operation the inductor current is always positive, hence from the mosfets to the load.
When the pmos is off and the nmos is on -the current through the inductor is decreasing, but still positive. According to Kirchoff, the current must be sourced through the nmos device, since the pmos is off.
This is what I can't understand: how can an nmos source current in this configuration? it seems to me it can only sink it!
Any help would be greatly appreciated.


texts: Selecting Loading Capacitor Values for 32 kHz Crystal

texts:
I need some help selecting loading capacitors for a 32.768 kHz XTAL in a design I'm working on.

This is a bit long, but the big questions are: Is it critical to get the loading cap values right, and how important will the parasitic capacitance of the traces and leads be in determining this.

My device uses a TI CC1111 SoC, and is based on a reference design for a USB dongle available from TI. The CC1111 requires both a 48 MHz high-speed (HS) oscillator and a 32 kHz low-speed (LS) oscillator. The reference design uses a crystal for the HS oscillator, and an internal RC circuit for the LS oscillator. However, the CC11111 can be hooked up to a 32.768 kHz crystal oscillator for better accuracy, which I need.

The CC1111 datasheet provides a formula (p. 36) for choosing values for the loading capacitors. As a sanity check, I used that formula to calculate values for the caps used with the 48 MHz xtal in the reference design. I figured I should get roughly the same numbers that are actually used in the design. But the capacitance values I come up with don't match those used by TI, so I'm a bit concerned.

The details of my sleuthing are below, but in summary, the 48 MHz crystal's datasheet says it requires an 18pF load capacitance. The two load capacitors used in the reference design are both 22 pF. The CC1111 datasheet formula for relating the load capacitance seen across the leads of the xtal to the values for the load capacitors (\$C_a\$ and \$C_b\$) is

$$C_{load} = \frac{1}{\frac{1}{C_a} + \frac{1}{C_b}} + C_{parasitic}$$

Plugging in 18 pF for \$C_{load}\$ and 22 pF for \$C_a\$ and \$C_b\$, this means \$C_{parasitic}\$ must be 7 pF.  However, the datasheet says this valus is typically 2.5 pF.  If I had used this advice, I'd wind up with \$C_a\$ = \$C_b\$ = 31 pF, and not 22 pF as is actually used in the reference design.

Alternately, according to TI application note AN100,

$$C_{load} = \frac{C_1' \times C_2'}{C_1' + C_2'},$$

where "\$C_x'\$ is the sum of the capacitance in \$C_x\$, the parasitic capacitance in the PCB trace and the capacitance in the terminal of the crystal. The sum of the two latter parts will typically be in the range of 2 – 8 pF."

If \$C_1\$ = \$C_2\$ = 22 pF, you get \$C_1'\$ = 2*18 pF = 36 pF, so that the parasitic capacitance associated with each trace + terminal is 36pF - 22pF = 14 pF, which is outside of the 2 - 8 pF range cited in AN100.

I'm asking all this because I'm concerned that if I choose the wrong loading capacitor values, it either won't work, or the frequency will be wrong. How sensitive are these types of crystals to the loading cap values?

Details of my sleuthing:

From the Partlist.rep (BOM) included in the reference design zip file, the crystal (X2) and the two load capacitors to which it is connected (C203, C214) are:

X2   Crystal, ceramic SMD    4x2.5mX_48.000/20/35/20/18
C203 Capacitor 0402 C_22P_0402_NP0_J_50
C214 Capacitor 0402 C_22P_0402_NP0_J_50

So the load capacitors each have a value of 22 pF.  The crystal, based on an answer to a previous TI E2E forum question for a related device, is this part:

Name: X_48.000/20/35/20/18
Descr.: Crystal, ceramic SMD, 4x2.5mm, +/-20ppm 48MHZ
Manf.: Abracon
Part #:  ABM8-48.000MHz-B2-T
Supplier: Mouser
Ordering Code: 815-ABM8-48-B2-T

The 18 pF value comes from the datasheet for the ABM8-48.000MHz-B2-T.

Thanks for your help.


texts:
I am currently trying to amplify a very small AC signal that is riding on a high DC offset.  In order to amplify the signal (using a simple op amp circuit), I obviously need to remove the DC offset to avoid saturating the op amp.  Currently, I am using a series capacitor to block the DC.  So the signal input is coupled to the op amp input terminal with a single series capacitor.

My question is this:  how does this affect the DC component of the signal?  Do I need to add a shunt resistor ground to allow the DC component to pass?


texts: SMPS dipping periodically when wall voltage is under heavy load

texts:
I'm going to apologize in advance as I don't have oscilloscope screenshots for the problems I'm about to describe, so words will have to suffice.

I've put together a non-isolated SMPS using the LNK304 as seen below (sorry for LTSpice). Perhaps a better laid out schematic of the power supply can be found on page 4 of the LNK302/304/306 datasheet.

The problem I'm seeing is that when the universal motor (14A) on the right hand-side of the schematic is triggered a noticeable dip repeating at exactly 60 Hz is seen in the LNK302 output, the dip gets progressively larger as the motor is driven at higher and higher currents. At its peak this dip is around 5V. The dip gets less prominent as more capacitance is added to the output but I'm seeing diminishing returns as I add more capacitance (247uF so far).

Additionally, the 5V regulator output sees a dip of the same magnitude on its output.

I did look at the drain input of the LNK302 with an oscilloscope and saw a negative ramp wave, the amplitude of which increased as the motor current draw increased.

I strongly suspect that this issue is related to the neutral line getting yanked around by the motor but I find the repetitive nature of the issue troubling, especially since it continues at steady state. If this is the problem I'm not at all sure how to solve it other than by limiting the current to the motor or designing a fully isolated power supply, unfortunately, neither of these are an option.


texts: Varying run capacitor for speed control of single phase motor

texts: If I want to vary speed of single phase electric motor within say, 10 to 20 % max of its rated speed (or torque), is it a good idea to change its run capacitor setting? Either via multiple capacitor and switches or by using variable capacitor?


texts:
I'll give a background to my main question:-

In a simple NMOS as shown, while constructing the small signal model of the MOSFET, when there is no resistance between Vdd and drain, NMOS is modeled only as a current source with id = gm*vin.

simulate this circuit – Schematic created using CircuitLab

But now, when we put Rd, the drain voltage now also varies as

Vd + vd =
Vdd - (Id+id)*Rd

(Upper case letters depict currents and voltages due to biasing and lower case letters depict small signal currents and voltages.)

Now, because of this variation in Vd, an ro is introduced in the small signal model.

(Background ends here)________________________________________

Now, in a cascode amplifier such as this:-

Here, there is no R(resistor) anywhere.I'm unable to reason out why drain voltage of M4 varies. Hence, what I think is that modelling M4 with and r04 in its small signal model wouldn't be correct. And hence, as I think that drain voltage of M4 should be constant, so should be the drain voltage of M3, and so, Vout should be constant. Please tell if Vout varies or not varies for this cascode amplifier.


texts:
I am using an SX1272 and am having trouble locating viable distributors of any of the 32 MHz crystals recommended by Semtech, listed in the Crystal Oscillator Guidance documentation. I also can't find distributors for ant of the suggested TCXOs.

Thus, I am looking for alternative parts, with not much more success. The aforementioned documentation specifies that the ESR should be a maximum of 40 ohms, the shunt capacitance a maximum of 7 pF and the load capacitance a maximum of 12 pF. What I am confused about is that the frequency can be anything from 26 MHz to 32 MHz. How can this be? I haven't seen any registers in the device to specify the frequency. It seems that the suggested crystals are 32 MHz, but I can't find any 32 MHz crystals online that have <=40 ohm ESR and all of the other requirements as well.

I may switch to just using an RFM95W module instead; I thought that using the SX1272 by itself would have been a useful exercise.


texts:
I want to connect multiple I2C slave devices to a micro controller all on the same set of pins but the I2C devices all share the same address. The addresses are fixed in the hardware.

Is there any way to connect multiple devices with the same address?

Perhaps some kind of I2C address translation module with each device with an configurable address so I can assign my own addresses to each one.


texts: How to change frequency range of this circuit

texts:
I need to design a frequency to voltage converter and I found this circuit on internet:

I removed the resistor R6 and the capacitor C5 because what I need is the PWM output it gives on the 555 timer. I have run a simulation and it seems to work pretty nice, where the output gives a PWM with 50% of the duty cycle on the lower frequency and almost 100% of duty cycle on the higher frequency of the input range. However, it is configured to work in a range if frequencies different from the one I need, and I don't know exactly what should I change because I have never seen such a 555 timer configuration. I guess it has to be related with R4, R5, C2 or C4 but I'm not really sure because the configuration I used before was with the pin 2 connected to pin 7, not 6.

I hope anyone can help me with changing the range of input frequencies that this circuit can measure. More precisely, what I need is a range that goes from 1Hz to 2Hz on the input, to get 50% to 100% of duty cycle on the output. If anyone knows any other circuit or alternative to do such conversion from frequency to voltage I would appreciate it too!


texts: Charged Capacitor discharge into LC circuit (with Freewheeling diode)

texts:
With A capacitor initially charged to Vc (assuming ideal diode and ideal switch), I'm curious about determining the max current through the inductor and total discharge time (the switch stays closed).
I know that when the switch closes, the current equation is: IC = IL, where:
IC = CdV(t)/dt, and VL = Ldi(t)/dt.
This is because the Diode wouldn't have current flow until after inductor stops acting like an open circuit. I was thinking i could solve for inductor current with integration, and plug in the equation for capacitor current. However, I am struggling with solving this problem, because I'm unsure on how the resistor and diode affect the circuit's timing.
Any help on determining the time constant or help solving for the max inductor current would be much appreciated.


texts: Positive of polarized capacitor connected to ground

texts: I'm trying to make this circuit from here but I'm confused as the positive terminal of polarized capacitors is grounded. Can this be correct?


texts:
I have a problem and it spans easily 4 Stack Exchange forums so let's wrap up quick here. I'm doing radio astronomy. I'm setting up interferometry among 3 radio telescopes. (I'm using three PCB's with cheap clocks and if they aren't perfectly synchronized my data is worthless).

How would you go about stabilizing the oscillators of three circuits?

First off, the PCB is this: http://erewhon.superkuh.com/gnuradio/rtlsdr_QS_FSC_USB_DVB-T.jpg
It's basically a multimeter aka a radio receiver made for television stations. On the up side it has spectacular bandwidth, it covers 30MHz to 1.7GHz for 10$ CAD. Also note: tuner error is ~30 +-20 PPM which is awful, but when you can only afford to eat oatmeal, it's beautiful to even have electricity.

Details required to solve this question

Possible Operating Frequencies: 1420MHz, 950MHz, 2150MHz Diameter of the Interferometer: 30-40 feet.
Acceptable Phase Stability of: 1/1000% Cycle Error

Possible Solution

Why not simply desolder the clocks from two of the PCB's and solder a copper shielded cable from the one PCB I didn't desolder? That's o.k. but if I liked that solution I wouldn't have asked. NOTE It's pretty crummy and when I do get a "round-tuit" (probably one in the garage) I'll purchase better circuits- but guess what? Their clocks will also be problematic so let's solve it with the worst hardware, that way any hardware will work.


texts: FIFO wrfull asserted when FIFO is not full

texts:
I have an issue with Altera FIFOs. It seems that the full signal wrfull gets asserted even when the FIFO is not full. My FIFOs are of size 8. The SignalTap traces below show the read levels of my FIFOs (rdlevel) as well as the wrfull signals:

What could explain that the wrfull signals are not behaving properly?


texts:
I need measure a 10A AC current, and need a 50mOhm current sensing resistor with tolerance <= 1% and good temperature stability. I find there are some choices, such as Vishay's RH,NH series, or this type made by special copper alloy as below:

Which one is better? Any other suggestions?


texts: Does this schematic with an old doorbell electromagnet look ok? And could it be improved?

texts:
I have a circuit which seems to work and I would just like someone to confirm that it looks ok and isn't going to damage a 3.3/5V system (Raspberry Pi).  Also, if there are improvements / simplifications I could make, that would also be great.

Basically, the circuit is used to get an old doorbell electromagnet to work to make it chime.  When I set pin 24 high on my Pi, which is connected to a transistor and in turn a relay, it dings and when I set pin 24 low, it dongs.

You should know that initially I was just connecting this all straight to pin 24 on the pi which I was advised here that wasn't a good idea, so thankyou for that ;).

Below is what I put together in Fritzing to show what this version looks like.  Initially, I was just trying to use the transistor on it's own, which would be simpler, but for whatever reason, that doesn't give me enough voltage to get the magnet to work -- I will understand why one day...

So any thoughts / feedback / criticism greatly received.

Many thanks,
D.


texts: Electron flow at the immediate start of this flip-flop circuit?

texts:
I am attaching the following image of a flip-flop circuit.

I find myself constantly trying to visualise what is occurring at the exact moment the circuit is closed, and the current starts (electron flow: negative to positive)
I really don't want a super complicated explanation at this stage of my learning, I'm just trying to understand how the current is moving.
I visualise current flow as like a 'conveyor belt', in the sense that electrons at every point in the circuit start moving at the same time.

My question is, what occurs at the BJT's? Where do the electrons go first?

From emitter to base like here? ->

Or does it somehow move from emitter to collector ->

Although I don't really see how this circuit gets started, since the NPN transistors would prohibit current from flowing from emitter to collector (with seemingly no voltage applied to the base)

I just keep getting stuck on how electrons start to move through circuits when first 'fired up' (closed).

Any help for this noob would be appreciated.


texts: I have heard that Op-amps are like special transistors with none of the drawbacks and all of the advantages. What properties make an operational amplifier a "better" amplifier then a biased transistor, and how are transistors constructed to make an op-amp?


texts: Need recommendation for a first hot air station

texts:
I have a pretty nice soldering station, but now that I am finding the need to work with non-DIP type packages unpreventable, I am beginning to think that purchasing a hot air station would be a good idea. I know shopping questions are not allowed (though links to recommended products would be appreciated), but what I really want to know about is the kind of specifications that I should be looking for when searching for an appropriate station.

I won't be using the hot air station too much (maybe once a month), mostly to solder SMD components. I have some QFN chips which I would like to solder as well.

Any recommendations/tips?


texts: How much space should be left between a PCB's edge and traces and holes

texts:
I am designing a PCB for use with an Arduino mega and I am wondering if there is a good rule for how much space I should leave between the edge of the PCB and various items like:

traces (ground, 5v supply, 9v supply, and 5v digital signals)
surface mounts
small through holes (capacitors)
mounting holes (for screws)
large through holes (power supplies)

I currently have 0.1" around everything except of a through hole for a DC jack, which comes .05" from the edge.  Can I remove some of this space and not hurt my design?


texts: I thought this was a C7 type connector, but it has this significant difference

texts: One can find this type of connector in many small personal appliances at home, usually related to those that are rechargeable. The connector appears eerily similar to a C7, but it is NOT a figure-eight as it NOT "flippable" and is connectable only one way. However, you can see that it is also NOT polarized. Given all this, what type is it? See pictures (multiple) attached.


texts: Transistor - Saturation and Active Regions

texts:
I am using this BC817-40 transistor as a switch.

In the above image, we can see that inorder to operate my transistor in the saturation region, I need to make sure my Ic/Ib ratio is less than 40.

And to make sure it is in the active/linear region, I need to make sure my Ic/Ib ratio is more than 40.
This can be done by selecting appropriate resistor value for a given Base and Collector voltage.

My actual questions :

In the above DC Current gain section, when they say Vce=1V and Ic=100mA, are they saying that the voltage difference between the collector and emitter should be less than 1V or more than 1V in the active region?
And this dc current gain section is especially to be checked when we need to use the transistor as an amplifier,right?
In my application, I am using BC817 transistor as a switch. I refer the Figure5. to calculate my Base emitter voltage and Figure6. to calculate the Collector emitter voltage.
In both the graphs, the Ic/Ib=10.
I take the Vbe and Vce values from the graph and calculate my Base current and collector current. Now, my calculated Ic/Ib ratio comes around 18.
Since 18>10, do I need to adjust my base and emitter resistance values to make it less than 10 so that my transistor is in saturation mode when it is turned ON.
Or should I just leave it at 18, since 18<40. (40 being the minimum Hfe given at the Table 8)

FIGURE 5 : Ic Vs Vbe(sat)

FIGURE 6 : Ic Vs Vce(sat)

Since the figures 5 and 6 plots, specifically mentioned the Vbe and Vce parameters for Ic/Ib=10, and 10 being less than minimum Hfe of 40, does it mean, that these two plots should be referred only when we need to use these transistors in saturation mode? Or is there a case, when we can use these plots in active/linear mode also?


texts:
I am in the process of designing a fancy USB type c cable (paracord, colourful heat-shrink, coils etc) And I'm worried about resistor values, I don't want to blow my phones port or the charger.

I would like to create a usb 2.0 cable and I think to allow it to be used for fast charging + data I will have to add a 56k pulldown resistor on the D+ and D- lines. is this correct? Does this resistor get added on both sides of the cable, totalling 4 resistors in the cable? Can someone help me with a schematic?

These are the connectors I will be using, one on each end of the cable

With these will I have to remove the resistor from one side?


texts: Wiring a Micro-USB cable that doesn't have a black GND and has 3 unshielded wires?

texts:
I have this Micro-USB cable I am trying to attach to a new Micro-USB connector, but I don't know how I can wire it when it is missing a GND and has these additional wires. I assume the unshielded wires are all S-GND? But why wouldn't they be a single wire in that case?
Any ideas?


texts: Solid State Relay "fading" instead of dropping secondary voltage

texts:
I am using a (rather cheap-ish) chinese solid state relay (ssr) with 5V DC on the driving, 230V AV on the driven side (there's an ATtiny85 randomly letting devices run for 10-30 minutes, then cuts the power for 10 seconds, then all over again for stress-testing my embedded audio player).

After the ssr was "up", it only very slowly drops the driven side down to around 10 V AC after the primary side goes down to 0VDC if I don't have a very notable load on the secondary side.

As I'm only turning off a handfull of USB power adaptors, it takes the ssr over 20 seconds to get down to around 10V AC (which seems to be it's off state).

Any idea what I could be doing wrong? I tried "switching" the hot and cold AC line with the ssr, same effect. For now I also switch a lamp which lets the voltage drop almost instantaneously, but in the ling run that can't be the best solution...

As always, thanks for any tips and pointers in the right direction!


texts: If I'm going to use a potentiometer as an adjustable voltage divider, does the tolerance or resistance matter?

texts:
Here's what I working with. I'm researching some three terminal potentiometers for use as adjustable voltage dividers. The outer terminals are connected to 0V and 5V respectably, so as I turn the knob, the wiper voltage sweeps from 0 to 5V.

My question: Does the tolerance of the potentiometer (5%, 10%, etc.), or the resistance matter for this application.

I'm not sure about the tolerance, but I'm pretty certain that the resistance will only affect the size of the load that the wiper can drive (impedance and what-not).


texts:
I got asked to analyze this circuit during a past interview, and truth be told, I still don't have a good understanding on what it is and how it's intended to work.

I understand V+ = Vout/2 and V- is an RC circuit related to Vout.
I assume V+ and V- are meant to be differential.
I also know that the op-amp will adjust Vout to make the voltage at the inverting and non-inverting terminals the same. If you could refer me to this circuit, I'll do my own research and be on my merry way.


texts: I have understood that I have problem with driving High Side MOSFETs as their Gate Voltage must be bigger in respect to their Source voltage. How do I provide a higher voltage supply rail for the gate drivers than what is used for output positive voltage rail so as to turn on the MOSFETs?


texts:
I am trying to fix a brake on a mitre saw. I am yet unsure of its operating principle. The switch (shown taken apart) has one terminal on the left side with grey wire going to the motor housing, and two terminals on the right side (black/live wire on the upper terminal, and white/neutral wire on the lower). In the “Off” position the sliding carriage is pushed to the left side, connecting gray and white wire. When saw is turned on, the carriage is thrown to the right side, connecting live and neutral, and starting the motor.

After the lever is released, the switch returns to the “Off” position. At that point the motor supposed to be forced to slow down. I do not know for sure, but I suppose it reverses direction of the magnetic field to resist rotation, until it stops, and because the live wire is not connected, the motor does not spin in the opposite direction, but only stops.

Currently the motor is not being forced to stop, but slowly coasts to stop. I have tested the switch with an Ohm-meter: infinity between black and white terminals in an “Off” position, short in “On” position, reverse situation between grey and white terminals. Upon physical inspection, switch appears to be in perfect order. Therefore, the common purported causes of malfunctioning brake, worn brushes (they look good, and so is the commutator) and broken switch, do not seem to apply here.

How do I troubleshoot the motor? What is the schematic to help understand the operation? What is this switch called (I could not find proper terminology)?


texts: How can CPUs be stable when they have so many transistors?

texts:
As we know a CPU is pretty much billions of transistors on a single thumbnail, what if one of the transistors breaks?

Does CPU have any auto-recovery mechanism?


texts: Facing to real world feedback designs (here, Constant Current Generator)

texts:
I still work on a current generator made with 2 opamps and a nMOS. If I find the bias point to understand how much my LED can be driven, I still have problems to find an affordable way to derive the transfer function, in order to understand the limits of the PWM signal on the non-inverting pin of the OA1.

Here the implementation:

simulate this circuit – Schematic created using CircuitLab

I know how to derive the transfer function of a simple OA based amplifier. But here there is one more OA in the loop (the OA2) and also a source degenerated MOS configuration amplifier.

Now, the problems are that I don't understand well how to derive the feedback loop gain of the OA1. Should it superimpose to the one related to OA2 to find the worst case of freq behavior? But then I need to insert the Ciss, Coss (and Crss too?) of the MOS.

This is the small signal circuit of the BUZ70:

simulate this circuit

Where can I insert those capacitance and how can I use them to see how they affect the transfer function of the overall system?

I know that this mybe requires a too wide answer, and in this case you can ask to specify better a single part of my doubt. Thanks.

EDIT0 (@Russell McMahon): the LED should be driven in DC and in PWM mode in order to dim the light digitally with a simple microcontroller. The PWM is applied on the 3.3V pin "+" of the OA1. When 3.3V the LED is at its maximum designed current (or in over current, too) and when the PWM is at 0V the LED will be completely shutoff.

EDIT1: I'm not search any "ready" solution. I'd like also to have the hints to continue a correct analisys by myself.


texts: I want to send a tempertaure sensor data to my computer using a USB port in the cheapest most efficient way

texts:
I have to design a product, which takes a temperature sensor (-50:150 celsius), this data needs to be get digitized and then through the USB port needs to be sent to my Raspberry pi.
         I figure there would be ADC, USB interface involved, since the sensor is 50 feet away from the computer, I would require amplifier.

Can someone help me by suggesting the parts that I should be using.

the only power source for this should be through my Pi's USB port


texts: Selection of resettable fuse (PTC) for the board

texts:
I am create a board that will have:

MCU Atmega328P - x1
SK6812 RGBW LED - x9

The maximum current according to my calculations is 650mA (at full brightness of all LEDs, taking into account the margin).

I want to protect the circuit with a resettable fuse (PTC)

Example: Littelfuse 1206L075/13.2WR

Current hold: 750mA
Current trip: 1.5A
Max voltage: 13.2V
Max current: 100A

Questions:

It's a good choice?
I can not understand what the current trip means? Is this for inrush current or trip current?
Passive anging: +85°C, 1000 hours-/+5% typical resistance change. Is this a normal? The board will be operated in the temperature range: -25C - + 35C. How is it possible to recalculate the aging time at a lower temperature?


texts:
I'm currently designing an high voltage DC/DC converter, from a linear technology app-note. My goal is to bias an avalanche photodiode with 200 to 300V, on a small educational satellite. I picked the circuit from figure 16, at page  for that.

My issue is that I cannot find a suitable 10uF, 400V capacitor. Aluminum electrolytic are not good for space, stacked ceramic are huge (like this one). Also, I would like to have proper derating, at least 500V.

Did I miss some option while picking a capacitor?
Can I get away with smaller values, like 5.2uF?
I can put inductors, up to 10000uH. Could I add an inductor after the diode bridge and reduce the size of the capacitor safely? Will the impact on the feedback stability be strong?

I'm also interested in any alternative design for an high voltage, low noise converter.

Thanks for your time.


texts: Control connectivity of resistors in voltage divider arrangement

texts: I am building a device to measure the resistance of a resistor using a voltage divider.  I added multiple resistors so that the range of the divider could be changed by switching to another resistor.  However, only one resistor should ever be connected to ground at the same time.  I was wondering what the best way to control which resistors are connected to ground is.  I thought about using a transistor to control it, but I though that the added resistance and voltage drop could potentially cause issues.  The device runs on a pic18f2550.  What would be the best way to control the connections of the resistors from the PIC?


texts: Thread pitch on locking 1/8" audio connectors?

texts: I feel silly that I can't find this on Google... what is the thread size on locking 1/8" audio connectors like these? There seems to be a de-facto standard, but I can't find any numbers and it's hard to measure an inside thread with an actual plug sticking through it.


texts: Q: Check if an LED in my circuit is still "good"

texts:
I have an electrical circuit which uses an LED, connected to a µC, to show the status of an x-ray source in another room. Obviously this LED is important to have in a working condition.

Now, LEDs can fail in in multiple ways, one being a broken circuit, another being a short circuit.

I have thought about using a light sensitive resistor to check the status, yet the surrounding light might break this.
I then thought about PWMing a "signal" on to my LED power, trying to read the same signal from my light sensitive resistor - assuming that no outside light emits the same strobe signal (I might even modulate the signal further in its frequency over time).

Is there a "best practice" way of detecting if my LED is still working, emitting light as it should, without being disturbed by outside light?


texts: How to reduce the process delay using VHDL in xilinx

texts:
For the code i wrote, i am giving my 19 samples of a sine signal by pasting them in the testbench, i am using a process in the code where i am doing all the calculation i want to do, but in the simulator, its showing like it is taking a lot of time (approx. 19ms) to calulate the output. help me to eliminate this delay.
 Below is the picture where top field is clock, next three are inputs and then we have three outputs, and lastly the time period. here 220 is the max. range i gave to the output.
 code:

entity trial_6 is
generic( width    : integer := 18);
 Port   ( clk      : in  std_logic;
          V1,V2,V3 : in integer range -220 to 220;
         Va,Vb,Vc : out integer range -220 to 220);
end trial_6;

architecture Behavioral of trial_6 is

  type memory is array(0 to width-1) of integer range -220 to 220;
  signal REG_1 : memory :=(others=>0);
  signal REG_2 : memory :=(others=>0);
  signal REG_3 : memory :=(others=>0);
begin
  process(clk,REG_1,REG_2,REG_3)
    variable flag      : integer range 0 to width := 0;
  begin

    if rising_edge(clk) then
        REG_1(flag) <= V1;
         REG_2(flag) <= V2;
         REG_3(flag) <= V3;
        flag := flag + 1;

    if (flag = width) then

      Va <= ((REG_1(0) + REG_2(0) + REG_3(0))/3);

      Vb <= ((REG_1(0) + REG_2(5) + REG_3(11))/3);

      Vc <= ((REG_1(0) + REG_2(11)+ REG_3(5))/3);

      flag := 0;
    end if;
    end if;
  end process;

end Behavioral;

test bench:- i have used clock period of 1.11 ms


texts:
Sometimes you have to try something and have it not go well before you even know what questions to ask.  This is one of those times.

I recently soldered header pins to a 2x16 LCD display.  This was my first attempt at soldering. It "worked" but it seemed harder than it should be, and I don't have a ton of confidence that the connections won't mysteriously become intermittent.  I'm sure part of the problem is my technique, but I'm also wondering if I need different materials.

I have a Weller WES51 soldering station (comes with PES51 point tip iron), brand new, so that should be fine.

From reading something here, I thought I would purchase some Kester solder.  It's fair to say I had no idea how many types of solder exist.  Kester has like 6 families of solder wire and 10 families of flux!  (Who knew?)

So I bought some "245 flux cored wire" SN63PB37 0.025in.  I assumed (not sure I'm correct on this) that since this was "flux cored" I did not need to buy flux.

Sorry for the long explanation, but here are my questions:

I know there are some soldering videos around, perhaps on youtube, but can someone recommend one that they feel is well done?  I would have no idea how to judge the quality of the soldering info.
Did I buy the right product?  To be honest, I don't really understand all the different types.  I know I want leaded, I've seen people here recommend 60/40 or 63/37.  I like the idea of a "no clean" solder, which I believe this one is.  And the 0.025 size seems ok.  I guess my question is mostly about the different types of cores.
Do I need flux?  One of my problems is that I wanted the hot solder to surround the header pin.  The best I could do was to kind of build a hill from the contact area to the pin.  Would putting some flux around the pin help?  And if I do want flux, which of the 10 types do I want?


texts: What type of temperature sensor is this?

texts:
I have a bunch of these temperature sensors that I want to use for a project, but I can't find any information about the specifications of it.  There are no markings on it to aid in identification.

I have hooked it to a multimeter, and it appear to be a simple varying resistance.  At body temperature it reads about 6.5kΩ, and at room temperature about 11kΩ.  Is it simply a variable resistance?


texts: Radio Waves: Spark gaps vs general wireless radio antennas?

texts:
I was recently told by a friend who teaches college physics that "in reality radio waves are only generated when an electric current is made to move violently through a conductor". He went on to elaborate how this works with normal radio antennas, WiFi, etc. but honestly it went over my head.
One thing that stood out was that, he explained, early radio transmission (and even some modern) works through "spark gaps" and how antennas are just refined or less visibly "sparky" versions of these.
It was super interesting to me, but I'm not finding details that (to my lay-woman mind) line up with what he explained in terms of something that I could see as "violent". Could someone please explain this to me through a model or visualization and maybe share some key terms that I can use to research this more?


texts:
I got some Microchip CAN transceivers and some Stellaris Launchpads from TI. I would like to learn how CAN works. It looks very nice for what I want to do (one controller per room, controls lights, vents, etc.)

The first thought was to use Cat 6 for the data line. But I don't understand how I am supposed to tie the connector to the twisted pair (unless I just do a pass through, two RJ45s for each node).

Anyway, my real question is, while 60 ohms is the impedance recommended for CAN, can I use 50 or 75 ohm coax cable? Googling it didn't yield anything much for me, nothing definite.

So I can just run a coax cable and T it off instead of passing through (or splicing the cable I guess).

Coax seems a nice clean way to do it, but since it's not talked about I am missing something, I imagine.


texts:
I am playing around with some SAR (Successive Approximation) A/D-converters. I have made a test circuit where I have a 16-bit DAC from Texas Instruments (R2R-based) and an 16-bit SAR ADC from Analog Devices. Using a micro controller and some SPI programming, I am able to output a voltage on the DAC and sample it with the ADC. The goal of this test is to verify that the resulting data is a straight line, with some noise.

I let the DAC settle for at least 10 times the required settle time and the output is low-pass filtered to get rid of noise. Although I could sample quite fast, I need some time to transfer data from the micro controller to the PC, so I only make roughly 2-3 samples each second. I make sure that the ADC conversion is finished before latching a new voltage on the DAC.

After about 4000 samples regularly spaced over the entire full scale range, the result can be plotted with the DAC 16-bit word (X) and the ADC (Y). The result looks strange and If I zoom in, there is some kind of periodic "noise" (look at the plot below).

I can definitely say that there is no such signal problems when measuring with my scope. There is some noise but that is like 10 mV amplitude. So something is wrong here. I also measured my voltage reference and supply lines and there are no noisy problems here either. I would accept the result if the "spikes" were like 1-10 LSB and random but this is on a much bigger scale and somewhat periodic. The periodicity could be a sign of very low resolution sampling of a linear changing signal but this is not the case. I think this is too large to be quantisation noise. The plot below shows the full range version. The problem is so big that it can be clearly seen in this plot as well. The DAC and ADC is not using the same full scale voltage which explains the flat areas in both ends of the scale.

Keep in mind that the plot shows maybe about 50-100 samples with only a few samples per second, so we are talking about very slow sampling of a DC voltage that only changes after the ADC conversion is done. The voltage reference is filtered and so is the input signal to the ADC.

I have done the same with a 18-bit SAR ADC as well. Same problems.


texts: Waterproofing MLX90640 far infrared thermal sensor

texts:
I would like to use the MLX90640 far infrared thermal sensor array on a car as a "night vision" camera. Since glass blocks thermal radiation I have to install it outside the cabin. Is it possible to make the sensor waterproof while still keeping its thermal sensitivity?

I know that water blocks IR so there will be no thermal imaging when the sensor is wet but the idea is rather to protect the sensor from damage and wait till it dries out for further imaging.

I think there may be 2 ways to protect the sensor:

waterproof coating
waterproof housing

Unfortunately I have no idea on practical realization of either of those.


texts: Reverse momentary N.O. Switch behavior using PNP Transistor?

texts:
I want to install an led board with a switch in my car. The switch would be pressed down by the lid of the arm rest when closed. I only have N.O. tact switches to use for this, since I need momentary action. I think this would work:

simulate this circuit – Schematic created using CircuitLab

When the switch is pushed in, the lid is closed and the light should be off. RSwitch should keep the 2n3906 off. When it is released, the 2n3906's base is connected only to ground, so the lights should be on. Is this right?

The LED light current is roughly 64mA, 100mA at worst case, so the 2n3906 I have should work fine I would think.

Additionally, how do I calculate the right values for RBase and RSwitch? Is 1kΩ each correct or should they be different? Can Rswitch be omitted, or should it be included for safety reasons?


texts: Can I use a 20V or 24V to power up a piano that needs 21V?

texts:
The power adapter of the piano should be AC/DC 21V, 1.5A.

But I can't find in a short time to buy something exactly like that, but I found this options:

20V, 3A or
24V, 3A

Can I use one of this to power the piano or it's not ok?


texts: How is a VHDL variable synthesized by synthesis tools

texts:
I know two ways in which a VHDL variable is synthesized by synthesis tool:

Variable synthesized as Combinational logic
Variable synthesized as a Latch unintentionally (when an uninitialized variable is assigned to a signal or another variable)

What are the other ways in which a VHDL variable can be synthesized ? (Example: can it be interpreted as a FF ? )


texts: Best PCB layout for this circuit to minimize noise at the output

texts:
This circuit contains the final stages of my home built spectrum analyzer.  The design is based on the classic Wes Hayward circuit with a few modern improvements, all of which are online.  I've built a Gen#1 version (minus the '3904 pre-amp) that works well but has too high quiescent noise with no input signal.  So I am considering building a Gen#2 lay-out to reduce that quiescent noise.
I don't think the enclosure construction of my Gen#1 is the culprit, it uses a Hammond aluminum box with 1nF feed-thru caps and RG316 coax from the PCB to the connectors.  So I am looking at making this 2nd spin of the PCB to try and lower the noise.

Basic operation is a 10.7MHz signal at about -35dBm max enters the '2904 pre-amp for about 8dB gain, the AD603 is used as a user adjustable variable gain amp (appx 0dB to 40dB), which feeds a 10.7MHz/180kHz wide Murata ceramic filter, then the AD8307 log amp, and finally a 4.2x gain CA3140 to boost the output to drive the Y-axis of a 'scope.
Schematic from the AD603 to the AD8307 is lifted almost verbatim (minus the AGC loop) from AD's application guide.
Here's the present state of my Gen#2 layout:

Both the Gen1 and Gen2 layouts are 2-sided PCB with a continuous ground plane underneath.  The major differences between them is the Gen1 was about 2x as large and used a mix of thru-hole and SMT components, Gen2 is almost all SMT.  I also moved all ground plane via connections to much closer to their respective components (exception: I made a local star ground for the output of the AD603 and input of the AD8307 to a common via to the ground plane, based on AD's recommendation).
Are there any other best practices I should incorporate?  Searching the internet for best RF practices turns up a lot of stuff, some of it contradictory, some of it likely just lore with no scientific basis.
Here is the Gen1 circuit diagram.  It does not have the '3904 preamp, it uses different voltage regulators, and the filter between the AD603 and AD8307 is made from discrete LC components.

And here is the Gen1 layout. I mis-spoke above, my Gen1 construction had nearly solid ground plane on bottom (clearances for thru-hole parts) and ground pour on top with a few hand made vias.


texts:
I was reading some articles about digital and analog modulating processes. One of them was this:
Modulation techniques
At a certain point is says:

The bandwidth produced is a function of the highest modulating frequency including harmonics and the modulation index, which is:
m = Δf(T)
Δf is the frequency deviation or shift between the mark and space frequencies, or:
Δf = fs – fm
T is the bit time interval of the data or the reciprocal of the data rate (1/bit/s).

I'm a bit confused with these terms. How exaclty the bandwidth relates do data rate? Let's take this image by example:

From what I've understood, if I want to modulate a digital signal by FSK process, I should just choose 2 different frequencies to represent 0 and 1. I should also choose two frequencies that are harmonics of a fundamental frequency to get "smooth" transitions (zero cross), is that correct?
Besides that, how my data rate is related to this bandwidth? Isn't bandwidth the width of a channel?
Let's say I'm using a 2.4GHz transmission with a channel that goes from 2.4GHz until 2.450GHz, then I will have a channel of 50MHz, correct?
My bandwidth in this case isn't 50MHz? If so, my bandwidth should only be expressed by Δf, no? In other words, since I only need 2 differente frequencies, my channel width would be only the difference between those frequencies. With that said, I cannot see where data rates comes in. I think the only thing that would influence on that rate would be how long each bit is holded.
As I said I'm confused with these conecpts. So if someone please could clarify my ideas.


texts: IR proximity sensor for automatic spraying

texts:
I am a beginner in field of circuits, so excuse me for my amateur questions. Let me explain my task:

I have to build a low cost proximity sensor for a sense and spray device. I have read various posts on IR proximity sensors in this site. But I am still not clear in understanding the concepts. As I am a beginner, I get stuck at some silly amateur doubts.

So, this is what I am planning to do:

Build a IR sensor transmitter by pulsing the signal to 56 kHz using the oscillator from PIC MCU and then build the receiver part by using IR photodiode, band pass filter that allows only signals with 56khz carrier frequency, amplifier, op amp as a comparator and then the output is given to the microcontroller.

My objective:

When someone walks by the device, it should detect the movement and spray the liquid. after that it should go to standby mode for 15 min. It should not spray even if anyone passes at this time. After 15 min, it should come back to running mode.

This is the link for a similar type of product in the market.

My hurdles so far which I haven't crossed yet:

To reduce the effect of ambient light and other IR sources, I decided to pulse the signal. But I couldn't get the right circuit in the receiver end to demodulate and amplify the signal. Because it has to be sensitive up to 50- 75 cms (even more would be better).
I can use a tsop series photodiode which comes with bpf and amplifier. But I want to build the circuit with as simple of components as possible.
When a black body is in front of sensor it absorbs all the IR radiation and does not reflect back any. I don't know how to solve this problem.

I have to design a circuit and then write a program for a PIC18F4550 microcontroller. But I think I can find a solution for the program. But the circuit diagram seems to be a bit difficult for me.

Please suggest a circuit diagram for the receiver part with the band pass filter that allows only 56khz signals, amplifier and opamp. Any kind of help and suggestions are welcome. Please don't hesitate to explain in a simple way.


texts: Is it possible to search gerbers for specific parts?

texts:
I am using GC-Prevue to view gerbers I have been supplied.

When I am looking for a part, I typically search through the silkscreen until I find it, (I do not have the PCB design file).  This is really time consuming, very annoying and shockingly inefficient.

Given I have the pick and place data, it should be possible to match with the gerber data.

Is there anyway to search for a component with only the gerber and pick and place data?


texts: What is the purpose of this current sense resistor in my arc lighter?

texts:
I have an arc lighter similar to this one:

The switch failed after a couple days (typical Chinese garbage), so I took the unit apart to replace it. Also, due to its operating frequency (~16Khz), it makes an appalling screeching sound that hurts my ears. So while I had it open, I decided I would attempt to modify it for a higher frequency.
By photographing both sides of the PCB; by using a multimeter; and by shining a light through the board, I managed to reverse-engineer it. Mostly.
My initial intention was to leave the micro in place, but insert a 555 timer between the chip and the MOSFET that drove the output coil. Its reset line would be asserted high by the chip's square wave output (by way of a diode, a resistor and a capacitor), and it would output a (thankfully inaudible) 22KHz signal to the MOSFET.¹ So far, so good.
My initial tests were promising, but in the end a pin broke off the chip and necessitated its replacement. Onto plan B then.
I figure I can just replace the (now defunct) chip with another microcontroller (specifically, a PIC or Atmel one), and write some firmware to perform the original functions, albeit at a higher frequency.
The microcontroller is unmarked, but fortuitously I have other microcontrollers with a compatible pinout. There is a problem, however. I don't understand the purpose of one of the connections on the board!
Here are the photographs I worked from. The high voltage transformer connects at the far right, and the 3.7V lithium battery at the left.² The lower image is flipped for convenience.

From those pictures, I derived the following schematic:

My understanding of the circuit is as follows:

The LTC chip is responsible for charging the battery.
Voltage on the USB connector bypasses the power switch by way of Q1 and Q2, activating the microcontroller, in order that the charging lights may illuminate in sequence.
The microcontroller monitors the USB voltage on pin 2, and refuses to trigger if a voltage is sensed.
Pin 3 is for detecting when the battery is fully charged, in order to display the LEDs statically lit to indicate charging is complete.
Pin 5 is the output pin, by which the chip outputs a 60% duty-cycle 15Khz square wave³ to the transformer via a MOSFET.

So, my question is...

What is the purpose of the current sense resistor R12 (measured by pin 13)?

I have no way to know the model of microcontroller used in this product, or the internal workings of its firmware. So, what can be deduced from the circuit, in terms of how pin 13 is likely to affect the microcontroller's behaviour?
EDIT: I notice there is no back-EMF clamp diode on the transformer. Should there be?

¹ Unfortunately, I discovered that the 555 drives its output low when reset is low; driving the MOSFET on continuously, except when the square wave was present. There was some smoke, and the MOSFET physically desoldered itself from the board! Fortunately I was paying attention and disconnected it immediately; and I'm pretty sure no permanent harm was done. I added an NPN transistor and the problem went away.
² Yes, those dents happened during disassembly. Oops.
³ I measured this with an oscilloscope.


texts:
I can’t get a stepper motor to rotate a load that it should have enough torque to rotate. The load is a 3’ x 3’ x 2” table, with the stepper motor centered underneath. I have a 51204 thrust bearing between the motor and the table to reduce friction as much as possible. The table can be turned with a light touch, and when set in motion it continues to glide for some time before coming to a stop. I had a simple flange bushing machined which connects the motor shaft to the table. The motor shaft is secured using a set screw.

I’m using a 5V 1A DC power supply. I used the code and circuit from the MotorKnob example on the arduino website. I got a Texas Instruments SN754410NE dual H-bridge as instructed, since my motor is bi-polar. I modified the circuit to make it actually work (added one wire connecting the two +5V outside rails of the breadboard) and i successfully got the motor spinning ok by itself, and with the flange bushing attached. Everything seemed ok.

However, when i assemble the table, it does not behave as expected. I’ve fiddled with the setSpeed function: at 10RPM or less almost nothing happens, at 30-40 RPM it starts turning very slightly, then stops moving, then when the motor stops it sort of repositions itself and jiggles the table. Above 60RPM very little motion occurs. I’ve tried adding more steps (the motor is 1.8 degree, so 200 steps), but that has little effect either. I also tried setting it to step one at a time, with a delay between single steps, but this sometimes worked and sometimes did not. the motor gets the load moving, but then the load keeps moving, sometimes forward, sometimes as if the motor is trying to keep position. When it’s time for the next step, often the load is already spinning, which i wonder if is causing it to miss steps. This stepper motor can theoretically output 490mNm, Which should be more than enough to turn this table (estimated weight of 30lbs), but so far I haven’t been able to make it work with the standard stepper.h library. I’m aiming to eventually be able to turn ~500lbs on the table, and my math suggested that this motor should produce enough torque to rotate that weight 180 degrees in ~30 seconds (including allowing for friction of bearing). Any suggestions/hints/comments?

Stepper Motor: Trinamic Motion Control GmbH QSH4218-51-10-049
http://www.digikey.ca/product-detail/en/QSH4218-51-10-049/1460-1076-ND/4843427

Circuit & code from here:
https://www.arduino.cc/en/Tutorial/MotorKnob

I was reading up about how if the voltage profile for the stepper is not properly aligned for the particular motor, it may turn weakly (or not at all). Could that be what is happening here?

I’ve got an A4988 driver board now, I’ll try using it tomorrow, but i have a feeling my problems are in timing the motor control.

And lastly, if you had to design a system to rotate a table like this, would you go with a stepper motor? the rotation only has to be 90 degrees once every 24 hrs.

Thanks in advance!


texts:
I just run into a netlist problem with Altium Designer. As we all now, changing lot of things in schematic will completely mess up netlist and you usually need to clear all nets in PCB and add them again if you don't want to lose time with manual assigning.

Well, now a very strange thing happened to me - I have short circuits on all 0603 resistors, even that library is 100% OK, designators should be as well as unique identifiers.

Shorts are also on some pins of some ICs (SC70) and I have no idea what is going on. When I create new PCB file and force changes there, its all hunky dory.

Do some of you have any idea what is going on?

One of many examples, schematic compared to PCB:

Having custom netlabes wont help at all, it just ignores it and uses only one causing short.


texts: Help Led matix isn't lighting up correctly Is it a Hardware or software issue?

texts:
I am trying to reverse engineer the project from this video: https://youtu.be/zc1zbwheyE0?t=50s. From the video a visible 10 wires are going from the LEDs to the Arduino mega, i am assuming that they are wired in a 5x5 matrix (5 rows, 5 columns) given that there are 25 keys on the Midi controller so there most be 25 LEDs. i reconstructed the project the best a could from observing the video, but my issue is when i press 3 keys 5 LEDs light up unlike in the original video where 3 keys are pressed and 3 LEDs light up(as seen @ 0:50 of the video). This is the issue i am having : http://imgur.com/a/9SOEJ. i am thinking the issue is related to how i have my LEDs wired, but my LEDs are wired exactly the same as in the video. isn't it ? is there something i might have missed? How is the project in the video able to light up 3 LEDs without having an issue with extra LEDs lighting up in their matrix? how can i fix my circuit to replicate the video? here is some of my coed for turning on an LED when a key is pressed:

include MIDI.h>
MIDI_CREATE_DEFAULT_INSTANCE();
byte anodes[5] = {30, 32, 34, 36,38};
byte cathodes[5] = {31, 33, 35, 37,39};
byte data1 = 0;

void setPinTo5V(byte pin) //set a pin given to this function to a 5V voltage source
{
pinMode(pin, OUTPUT);
digitalWrite(pin, HIGH);
}

void setPinToGND(byte pin) //set a pin given to this function to a GROUND (GND pin)
{
pinMode(pin, OUTPUT);
digitalWrite(pin, LOW);
}

void loop() {
MIDI.read();
}

void MyHandleNoteOn(byte channel, byte pitch, byte velocity)
{
data1 = MIDI.getData1();
if (data1==48){//C3
setPinTo5V(anodes[0]);//set pin 30 to 5V
setPinToGND(cathodes[0]);//set pin 31 to GND
delay(1); //do nothing for 1 ms
}

//this is done for all 25 keys any help would be appreciated Thanks.


texts: Arduino Leonardo and Limit Switch cuts serial monitor out for 5 seconds

texts:
I've been trying all afternoon to get this solved. I have an Arduino Leonardo and a limit switch connected as seen in the photos.
I've been running simple code through to check whether or not the switch is pressed.
The code works for about 10 seconds, and then the serial monitor cuts out and displays 0 for 5 seconds. It always cuts out for 5 seconds. I've also tried with an Arduino Uno and the same thing happens.
Any help would be appreciated.
const int lSwitch = 8;

void setup() {
  pinMode(lSwitch, INPUT);
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  int r = digitalRead(lSwitch);
  Serial.println(r);
  delay(200);
}


texts: teensy 3.5 interfacing with RockBlock 9603

texts:
I want to interface a Teensy 3.5:

https://www.pjrc.com/store/teensy35.html

With a RockBlock 9603:

https://www.rock7.com/products-rockblock-9603

I will give 3.3V input to the Teensy, and 5V input to the Rockblock.

The Teensy is said to be 'all digital pins 5V tolerant'. Does that mean that I can just plug in the Teensy and RockBlock UART on each other and get good functioning? Or does this just mean that the Teensy will not be damaged, but the communication will fail due to the different logics levels?

Of course I could use a level shifter (MAX3323EEPE or similar), but this would be 'yet one thing to add to the design', so if I can do without I would like it.


texts: Having trouble identifying value of inductor, what is its inductance?

texts: Need help identifying this inductor's value. Unsure if it's 10 uH or 80 uH, it could be either depending on which way you read the bands.


texts: Kicad: Drag with left button mouse click by default when working with Eeschema

texts:
I want to change default behavior of left mouse click when working with Eeschema. Is it possible to change it from Move (M key) -> Drag (G key) when I select one/many elements?

I'm using KiCAD 5.0 on Mac.I have found below information:

https://en.wikibooks.org/wiki/Kicad/eeschema/General_Commands

BUT Ctrl + left mouse button [Drag selection] does not work


texts: Basic 100 Blue LED Decoration Circuit Design

texts:
I have 100 blue diffused LEDs that I want to use (not necessarily all of them) to make some kind of circuit that would likely just crawl over my wall like some vine growth coming down from the ceiling and twisting downwards to the floor, held in lots of places by pieces of tape or other adhesive. When I bought these they also came with a pack of 100 resistors that read 0.455 when I measure them on 2k scale of my multimeter (so ~500 Ω?).

I am not sure how to check the voltage for the LEDs, they do glow blue when I check them with the multimeter at 2kΩ but I assume since they are blue that they are probably meant for around 3.5 V and draw standard 20 mA. I also have a 9V battery at hand but I suppose I could get a bigger one if needed.

My question is: How should I connect these LEDs (let's assume I am using all 100)? I know the difference between serial and parallel and having them all in serial would probably take a lot of voltage right? So should I make X parallel branches with Y LEDs in each? What kind of wire should I use? Can someone help me create this circuit and also point out anything I should know by the way?


texts:
I'm laying out a PCB with 100Mbps Ethernet (SMSC LAN8710 Phy), a Pulse 1102FNL magnetics transformer plus the RJ45 [a MagJack isn't an option].
The transformer - probably as with most? - is 16 pin, with the RJ45-side Rx on pins 9/11 and Tx on 14/16. I appreciate that the diff pairs are important w.r.t. layout but there's also the centre taps, with their associated termination components. Is it best to keep these routed direct to the RJ45 pins, even if nestled between the Tx/Rx diff pairs, or to prioritise the diff pairs and route these taps around the sides etc?
Ta

Appreciate it's hard to review a screenshot, but here's a revised layout.
The thick green line is the boundary between system ground and RJ45 chassis; the dotted green under the mags is a 'voided' area in the ground plane (not extended fully to the top of the mags because the right-hand diff pair is coming under and around). 'Bob Smith' components are R201/R204/R205/R206/C203.

The (blue) bottom layer tracks running horizontally are low-speed - drives to some/from LEDs, and a low-current tap off of the 3v3 rail.


texts: How does the CMRR of difference amplifier ICs change over time?

texts:
When designing precision analog circuits, I often come across parts which seem to be more than accurate enough for my purposes, but where the datasheet does not specify how key parameters will change over time.

Right now, I am looking at datasheets for difference amplifiers (e.g. the INA157), and the CMRR looks better than what I would achieve by using affordable matched resistor dividers (e.g. the MAX5490). However, the resistor ratios will drift over time, which will reduce the CMRR.

Resistor dividers often give a typical value for this drift in ratio, so I can estimate how long my circuit can go without recalibration. However, while some of the difference amplifiers I saw specify input offset drift over time, I didn't see one yet which specifies the change in CMRR or the resistor ratio matching over time.

I'd assume that the parameters won't drift much beyond the initial limits over time, and this seems to be true e.g. for the offset voltage of many op amps, but on the other hand, I remember seeing 0.1% resitors which were only specified to drift less than 2% (or something along that magnitude) within a few thousand hours.

Now I'm wondering: Is there some rule of thumb for estimating how the CMRR (or similar parameters without aging specification) will develop? Can I assume that it will remain above the "minimum" specification even after some years of use? If not, for how many hours of use does the datasheet specification actually remain valid?


texts: Is it safe to have 4V continuously supplied to a lithium battery?

texts:
I have a compact digital photo camera that will be on for very long periods(for a time-lapse video). It is powered by a Lithium-Ion 3,7V, 720mAh battery

I want to supply 4V to the battery terminals, while the battery is in the digital camera. This will power the camera and occasionally charge the battery.
When the power drops, the camera will still be powered by the battery.

Is it safe to have 4V supplied to the battery for long periods(months, years)?

I'm thinking that at 4V the battery will be kept at around 80% charge(since a fully charged battery reaches 4,2V).
The 4V will be supplied by a LM317 regulator.


texts:
I would like to get a microcontroller out of sleep when the board starts moving (or vibrating). If possible it should just be a passive switch (I only need a positive edge from a battery to get the board started, and I don't care about other behaviour).
I was first thinking of a TILT switch, but I think it is a bit too restricted (i.e. 15DEG in a predefined direction...).
Think of a bicycle light that should start shining when a bicycle starts moving. However, this is for a big machine.
Preferably surface mount.
Is there a proper name for those sensors (I keep on hitting on PIR sensors)?


texts: Using a NIC to do Wake on LAN? Or alternatives

texts: I have a small linux system (kind of like a raspberry pi, but alot smaller and cheaper) that I want to use to back up files by rSync on a roughly-monthly basis. My problem is that the board doesn't have a Wake-on-lan capable chipset... I don't really want to generate excess heat and use lots of energy if the intended usage is only a handful of hours every year overall... I've heard one can use a NIC (relatively cheap?) to interface with the CAT5 cable before it hits the board to do something similar? I'm open to alternatives as well, as long as I don't need to manually go and power up the device every month. Any resources and or ideas would be great! I really don't want to change boards as this one is very inexpensive and is pretty good quality for what I need.


texts:
I want to read the state of a normally closed switch (waterlevel sensor) with a MCU. The NC-switch is connected over two about 20 meter long cables. The MCU wakes up periodically and enables a external pullup (R5) and reads then back the signal on a GPIO input pin. The pullup is switched on by a transistor to minimize the idle current. The schottkey diodes and the series resistors are for protection against external induced voltages.

Will this circuit work?
If the switch is opened one wire-end will float most of the time when the pullup isn't active while not reading the state...Is this a problem?

Thank you for any comments on this.


texts:
In either dc power converters, there must be a diode. I don't understand the need for it? Would a buck/boost converter function without a diode?
Also, what is the maximum reverse voltage for a diode in both cases? Does it have to be higher than the output voltage?


texts: A question on making a simple split power supply

texts:
I'm planning to make a variable split power supply from a 9V DC adapter.

So far I found two easy approaches. One is with a 555 timer here:

Making dual power supply from single for opamp?

And the other is just with two resistors and capacitors here:

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

I have two questions:

1-) If I want to make a variable split supply between 5V to 12V which is  controlled with a poti, can I use the same circuits without changing any component values?

2-) How reliable and regulated 9V DC adapters in general? I mean should I use a voltage regulator between the 9V adapter and the splitting circuitry?


texts: What is the use of different ADC channels in ESP32- WROOM32?

texts:
I have a ESP32-WROOM32 Module ,

From datasheet shows its has two adc (ADC1,ADC2) with multiple channels .

What is the use of these multiple channel?

Is it possible to connect multiple analog sensor to this module?

datasheet_esp32-wroom32


texts:
I'm trying to build a home-made LED strip (non-RGB). It will be using single color SMD chips in array. The thought I have right now is to have 3 rows, each with about 15 or 25 same single color LEDs, will be sitting on custom design PCB board.

The goal is to have it programmable so I can set it to solid, flashing, sequential, and maybe even pickup a specific color (like only 1st and 3rd row lit up and others dimmed, or having 2nd row running sequential while 3rd row lit up solid). It will be run on 12V DC power and expected to be controlled with an arduino. I can ran some LED sequential just by arduino itself but I'm looking for something more efficient for running a large array.

What will be the best way to build it and what parts will I need? I'm new to circuit design and all information (like schematics and some basic knowledge) are welcomed. Thanks

edited:
To clarify, I basically want to build something like WS2812 with single color SMD LEDs, so I can have some high quality lighting and still have the programming flexibility like WS2812.


texts:
I know that you can get a decent amount of power with a coil and a magnet. I've seen flashlights powered by this. I'm having difficulty finding a succinct equation to describe this.

I think its going to be a function of the number of coils, the diameter of the coils, the diameter of the wires, the strength of the magnet and the average speed of the magnet. But that's about as far as I've gotten. I know its probably going to have some messy derivatives in it with the induction but I think my math skills aren't quite advanced enough yet to understand derive them myself.

Thanks!


texts:
Based on numerous internet resources, speaker wire acts like an antenna which picks up the transmitted signal of nearby cellphones and causes the speakers to buzz. But I'm not really buying that...

A 3.5 mm speaker cable is designed to carry 1 V. I've seen old setups where PC speakers are powered directly from the 3.5 mm jack (and I've tested playing unamplified sound directly from a PC through the jack, although the volume in my setup was not very high at all). How can the tiny bit of EM emitted by a cellphone radio cause a speaker system, designed to operate off of a fluctuating 1 v signal, produce such a loud buzzing noise? I couldn't imagine the EM generating more than a few micro-volts in a receiving antenna. Am I wrong?

Thanks.

Updated - corrected voltage of line out to 1 V (see comments)

Update
I looked it up, and yes it seems GSM transmits at 2 W. I'd like to do a sanity check with that figure to verify some of the answers which state that the transmitted power is significant. My physics is quite rusty, but I'll try...

We know that the intensity of EM radiation around a source is:

$$I = \frac{P}{4\pi r^2}$$

So let's say we have a wire 2 m long and 0.2 mm wide (I hope this is a valid approximation for the wire) that is approximately 2 m away from a transmitting GSM module.

Then for \$P = 2 W, I = 39 \frac{mW}{m^{2}}\$

Multiply that by the surface area of the wire (0.2 mm * 2 m)

The total EM power along the wire is then 16 \$\mu W\$.

Like I said I'm quite rusty, but is this not correct? Is this really significant enough to produce that sound without being amplified somehow? Perhaps the signal resonates? Or interferes directly with sound cards?


texts:
WCDMA uses the rake receiver for equalization, this necessitates that the multipaths need to resolvable, i.e. longer than the chip period
if a SAW filter is used in a receiver, what are the chances that the ISI caused by the filter ripples may be corrected by the rake receiver?


texts: Differential input voltage of op-amp with feedback

texts:
I learned that either positive or negative feedback on an op-amp makes voltages at a noninverting input and an inverting input same.

Then, I think I don't need  to care about absolute maximum value of differential input voltage. Is it right?

I have TL972IP and I am trying to convert a bipolar sqaure wave into a unipolar square wave swining 0 V and 5 V.

And I have to determine an amplitude of the input square wave. As regarding the absolute maximum value, a signal will swing -0.4 V and +0.4 V.

But, if my guess--the absolute maximum value can be bypassed, ignored with feedback--is right, I can increase the amplitude a little bit more, from +- 0.4 V to +- 1 V.

By doing this, I can reduce the gain, which results in increase of bandwidth since GBWP = Gain * BW and it is constant.

ADDED

simulate this circuit – Schematic created using CircuitLab

In the case above, I think V+ and V- will be the same. Then the differential input voltage will be zero. Thus, I don't need to care about the absolute maximum rating of the differential input voltage. I only need to care about other ratings and conditions. Is that right?


texts:
Please can you assist me with the following exercise. I attempted to solve the homework question but I am still not able to understand how to get the transmission matrix.

Assume the two-port shown in Fig 5. is the sinusoidal steady state at frequency ω; calculate the
transmission matrix of this two-port.


texts: Why Differential Standards do not exist in FPGA PlanAhead?

texts:
I have never used differential I/Os in FPGA ( XC3S400). I always use PlanAhead for pin planning .When I click on a specific pin, it has all single ended standards but none of the differential standards exist ( as LVDS-25 , DIFFxxx, ...).  When I try manually type these standards into the relative boxes, I receive an error ( the line gets red and save stops).

What am I missing?

I think it is possible to assign a differential I/O in .ucf file , but I don't know the syntax!


texts: TPS26601 Industrial eFUSE Circuit Design

texts:
I have been designing a circuit for various Power protections like overcurrent, overvoltage, undervoltage, reverse input polarity. I have selected Industrial eFUSE TPS26601. I have few queries regarding the circuit designing for TPS26601.

I am using a switch to pull-down SHDN pin for shutdown and leave it floating for normal operation as Page 25 of the datasheet shows an internal pull-up resistor. Am I correct?
I know how to connect RTN pin of the IC but I am not sure why it has been there. The datasheet says it is for Device's Internal Reference. Why can't they have single pin (use GND for Device Internal Reference)?
The Imon pin of the IC is referred w.r.t to RTN pin. Imon pin outputs a current proportional (Reduced by certain factor) to current flowing through OUT pin. Connecting a resistor across Imon and RTN pin can convert the current to voltage and external ADC can calculate the system current. Since, Imon resistor is connected w.r.t RTN pin, I am not sure about using opto-coupler. Should I use it? Is it safe to connect directly to MCU?


texts: Need a cheap 24Vac to 12Vdc circuit to test car audio amplifier / equipement

texts:
I have inherited from a friend a lot of car speakers, amplifiers and related equipements, 'cause his widow says i'm the only friend with some general interest in this field.
Most of these stuffs are from the eighties, some are rusty, some were flooded a couple of years ago and recovered, anyway almost all are in an unknown state, so i want to test them all and decide what to keep, sell or discharge.

I tried one functional amp by using a PC power supply but it can't handle the power peaks.

I have a big 230V to 24Vac transformer, which could handle the required power, but i'd need to build a circuit to have the 12~14Vdc.

I'm not really an expert so i don't know how to take care of the required power, so my question is:
what could be a cheap circuit to have 12Vdc and enough power to test that equipement, starting from 24Vac?

("test" means that i doubt i will try to go to full volume, and that i don't care if the circuit can generate some noise... all i want is to see what's working and what's not)

Thanks


texts:
I would like to send and receive data between two PIC24F microcontrollers via RS485. Here i'm using SP3485 IC. I've set one microcontroller as
transmitter and another one has receiver. My microcontroller has 4 uart. One of the uart(here i use UART4) is connected with RS485 IC(SP3485) for both. As usual data pins 'A' to 'A' and 'B' to 'B' are connected. Below is the image shows which PIC24F pins are connected with RS485 IC. I'm transmitting data from one pic to another pic via RS485. In receiver side i've connected UART1 with hyperterminal for seeing the received data.The problem is While i print the received data in the hyperterminal it shows junk data. I've checked the UART1 its working fine.

Here i just post only UART4 initialize code.

init_processor()
   {
   TRISB = 0x46E0;

/******** pps for uart4 **************/
RPINR27bits.U4RXR = 4;
RPOR3bits.RP6R=21; //RP(6)R---> 6th pin of pic(RP6R has RPOR3)

// Init UART4
U4MODE = 0x8000;
U4STA = 0x0000;     //Enable Transmission, Clear all flags
U4BRG = 25;
//IFS0bits.U1RXIF = 0;            // Clear the Receive Interrupt Flag
//IEC0bits.U1RXIE = 1;            // Enable Receive Interrupts
U4MODEbits.UARTEN = 1;            // And turn the peripheral on
U4STAbits.UTXEN = 1;

//UART4
void uartsend4( char in_c)
    {
        while(U4STAbits.UTXBF == 1);
        U4TXREG = in_c;
    }
void uart4str( char *s)
    {
        while(*s!='\0')
            {
                uartsend4(*s);
                s++;
            }
    }

char uartrec4()
    {
        while(U4STAbits.URXDA == 0);
        if (U4STAbits.OERR)
            U4STAbits.OERR = 0;
        return U4RXREG;
    }
}

main.c transmitter:

int main()
{
    init_processor();
    PORTBbits.RB5=1; //RB5 is RE/DE
        while(1)
            {
                uart4str("Hello\r\n");
                Delayms(1000);
            }
    return 0;
}

main.c receiver:

int main()
[![{
    init_processor();
    PORTBbits.RB5=0; //RB5 is RE/DE][1]][1]
        while(1)
            {
                uart1str(uartrec4());  //printing received uart4 data in hyperterminal
                Delayms(1000);
            }
    return 0;
}


texts: Symetric Voltage source from OpAmp-Potenciometer circuit

texts: I need to design a +/- 4.5 symetric source using only a opamp buffer, a 9V battery and a potentiometer. How can i do it?


texts: What would the best way to filter high frequency noise? Decoupling/Bypass Capacitor? 1:1 Audio Transformer?

texts:
As many high end graphics card have high frequency coil whine and my particular one is causing whine on my diy studio monitors, what would be the best way to filter this noise?

My studio monitors are powered by 24v 750mAh DC adaptors (each) which I suspect aren't properly filtered. Audio signal is carried from Sound card by stereo cable. When using headphones, there's no noise. When I use a different audio source to the monitors, there's no noise. When I exit any GPU intensive application (gaming/rendering) the noise disappears. So that rules out any troubleshooting. High frequency noise is jumping from the graphics card over to my diy monitors.

My proposed solution:

4,7uF ; 0.1uF ; 0.001uF Bypass filtering capacitors rated at 60V connected in parallel on my 24vDC voltage input.
1:1 600 Ohm Audio Isolation transformer on my input.

Please criticize and give a better solution if you have one.


texts: How can I trigger an AC output ON when an AC input is OFF?

texts:
I have a low power 24V AC circuit powering some motorised ball valves for switching water on and off. Several of the valves are 2-wire auto-return meaning that presence of an AC signal will open the valve, and absence of an AC signal will close the valve (ie. via a spring).
One valve however is 3-wire and requires an AC signal between one wire & ground to open and an AC signal between the other wire & ground to close.

In effect, I'm trying to replace the relay in the following circuit with discrete components:

simulate this circuit – Schematic created using CircuitLab

The closest I've been able to get to a solution here is to take the switched AC input, convert to DC (ish) with a Diode Rectifier & Capacitor, then use this to trigger an inverted Transmission Gate but this feels overcomplicated and I'm sure there's a better way.


texts: How to figure out the correct serial port parameters?

texts:
I am trying to listen to a device which communicates via a serial port. I've built a monitoring adapter and set up a python script, which works really well. I just don't know the exact length and shape of the data stream.
The problem is:

I don't have any technical documentation on this device
I don't know how the data I am receiving is supposed to look, therefore I can't do it using trial and error until the data makes sense

So I have to figure out the parameters of the serial port some other way. I have access to an old oscilloscope. Is it correct that I could do this by analysing the voltage signal in a way similar to the following picture?

I got this idea from my old notes on serial communication, where I wrote:

  "The stop bit has a value of 1 and can always be detected, even if the
  preceding value was 1, because of the stop bits duration of 1.0, 1.5
  or 2.0 bit periods."

Is this even correct? And would I be able to do it myself? I would hope to connect the oscilloscope to my computer and look at the signal through sigrok or a similar freeware software. Before I try do to that (the oscilloscope is from 1994 and uses some parallel port unknown to me) I hoped you could give me some input whether this is anywhere near the right approach. Of course I hope that I'm missing something easy to figure out the parameters.

EDIT: thanks to Jot and Tut I was able to measure my baudrate: 19200. However, I am having a hard time dealing with the type and length of bits. I tried to view the incoming data and a serial terminal program, but after altering the settings I am still not able to tell what the correct bit-parameters are.

EDIT2: It's two things my monitoring script in Python reads. Hexadecimal values and ASCII-symbols in between, where the value of a byte equals the value of a printable ASCII-symbol. However, this means that I always get 8 bits at a time, doesn't it? Shouldn't I get at least 9 bits for each byte of data, if at least a stop bit is included? For example for the simplest action of my device I get: "\xf2\xa3", which is 11110010 10100011 in binary. Even if I rearrange the space the start and stop bits or an optional parity bit aren't there

EDIT3: I have to say this is a project for which the main purpose is to learn stuff, therefore I have to linger a bit on the details. I now tried to match the data I've monitored with the raw signals I get from the oscilloscope, even though it's a bit difficult to see the data on the small screen. I've chosen a very simple action for my device and the result is the following picture:

These signal would then, analogous to my first picture, translate to

  00100111111011000101

however, as I wrote in Edit2, the data I get by using my Python script (I checked with Realterm as well) for 19200 8N1 is "\xf2\xa3" (Python uses the "\x" to indicate hexadecimal values), which is in binary

  1111 0010   1010 0011

This still doesn't add up even if I theoretically include start and stop bits as well as parity bits. If I try 19200 7N1 I get

  r# = 0111 0010   0010 0011

which isn't better. Also confusing for me: if I change the setting to include a parity bit (whether it's Python, Realterm or putty) the data I'm receiving doesn't change. Why is that? Shouldn't it change?


texts: high resolution analog AC voltmeter mystery

texts:
I have an old Pekly multimeter that can be seen here. This is an analog multimeter, and only its Ohm-meter needs batteries. It can measure current intensities, DC and AC voltages, and resistances. The maximum resolution for the AC voltage is 0.01V (full deviation = 1.5V, 150 divisions). This means that the multimeter can measure AC voltages as small as 0.01V.

I can't figure out how they did that: obviously, you have to rectify the AC current to use a galvanometer; but the forward diode drop is at least 0.2V. It is of course possible to forward bias the diodes, but as I said, no battery is needed for the voltmeter.
I point out that my question concerns AC currents only, for there are of course very precise galvanometers working with DC currents.
I know there exist AC voltmeters that work with two coils (e.g. dynamometers), but nothing that correspond to this precision (in my opinion). Furthermore, the same mechanism is used for the other meters (ammeter, ohmmeter, DC voltmeter), which add even more to the cleverness of this apparatus.

I have managed to find a schematic of this multimeter here but I don't understand it.

Any insight on how this works?


texts: Contribution of solder parasitic to S parameter measurement

texts:
I have an antenna. I want to measure S-parameters of it using a network analyzer. The antenna has to be soldered to SMA cable for the measurement of S-parameters. After the calibration, will the measured S-parameter have contribution from the solder too?

If yes, what all parasitic will be there? How can I remove it?


texts: PIC 16F1503 - change the frequency of internal oscillator

texts:
My configuration bits are as follows:

#include <P16F1503.inc>
__CONFIG _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF & _BOREN_OFF & _CLKOUTEN_OFF
__CONFIG _CONFIG2, _WRT_OFF & _STVREN_OFF & _LVP_OFF

The relevant part of code I am using for changing the frequency is this:

banksel OSCCON
movlw   b'01101000'     ; Int. osc. 4 MHz
movwf   OSCCON
btfss   OSCSTAT, HFIOFR ; Is internal oscillator running?
goto    $-1             ; No, loop one line back...
btfss   OSCSTAT, HFIOFS ; Is internal oscillator stable?
goto    $-1             ; No, loop one line back...

My debug tool is unfortunately just simulator. The problem is that execution never reaches the breakpoint on line 192:

So this means that internal oscillator never gets stable?

I am using:

IDE:       MPLAB X IDE v1.20
Compiler:  MPASM v5.45

What am I doing wrong?


texts: Anything else required for safe low side MOSFET switch?

texts:
I want to switch power on & off to a module using an MCU output pin. For this I am using a BS170 MOSFET as so:

simulate this circuit – Schematic created using CircuitLab

This seems to work fine, however I'm wondering if there is any reason to add additional parts for protection, stability or something else? Even the 10k resistor seems to me like something I might be able to drop.


texts: Can I use 48 V DC power supply to make my own phantom power?

texts:
I want to know if I can convert a 48V DC power adapter that I have at home to use it as phantom power for my condenser microphone.

I only want to add some sockets that can support a microphone.

Just wanted to know if it is possible at all.


texts: I am building a Colpitts Oscillator that produces a frequency of 500 kHz with 5 volts peak to peak. I think I have designed the tank circuit correctly but I am not sure how to bias the transistor properly so that I get sustained oscillations and so that the oscillations remain at 5 volts peak to peak.Here is my work so far:


texts: Finding short-circuit across 3.3V power rail and ground rail on PCB

texts:
I have a short-circuit between my 3.3V and ground power rail on my assembled PCB. How do I find where the short is?

Should I start by removing components one-by-one from the board?


texts: MMIC RF Amplifier BGA2817 vs. Discrete Transistor/s Amplifier?

texts:
I've been working on learning transistor 101s, for a 900MHz transmitter.

I'm to the point, I can work the basic algebra, and intuitively understand changing the passive components in the transistor circuit to boost an RF signal.

I came across a wide bandwidth RF amplifer from NXP, the BGA2817.

Here is the BGA2817 Datasheet.

At a cost of $0.08/USD at volume, what is the downsides to using BGA2817 as an amplifier, versus going through all the development and trial and error of building up some transistor stages and amplifying your signal for a transmitter?

The one thing that sticks out to me is the 20mA supply current.  Not really a deal breaker for a transmitter, but clearly a deal breaker for a receiver.

Are people moving over to this type of IC for RF amplification?

Why does this thing draw 20mA in the first place, when you get down to how this IC is built.  I have no idea.

It doesn't get any easier to implement one of these, all the voltage step-up, impedance matching, and whatnot is just baked into the IC.


texts: Legality of using HDMI connectors in non-HDMI product

texts:
I'm developing a product which needs an external 100ohm 100mbps LVDS connector. HDMI connectors would be perfect, especially because we could take advantage of the availability of cheap HDMI cables.

However, is it legal to use HDMI connectors in a non-HDMI product? Obviously we wouldn't label them as such, or use any HDMI logos, etc.. We would probably even have to label them as being specifically not HDMI.


texts: Nodal Analysis #1 - Where is my mistake?

texts: I am given a problem with its shallow solution (i.e. not all steps/formulas shown). When I tackled the problem (below), my answer didn't match the apparently correct solution. Where is my mistake? The bold writing is the apparent "correct" answer.


texts:
I have this solid state relay basic circuit:

However there are some details I don't understand. What is the reason of putting R3? And if the gate of the BTA06 needs only 50mA as a maximum triggering current, then how could the value of 180 ohm resistor be Ok? It seems calculated as if the maximum current of the MOC3020 optotriac would be 1A and the supply voltage is 120v rms but has it to be the maximum value ? And wouldn't that current destroy the BTA06?


texts: Effect of load changes on buck converter

texts: I know to some extent that the control block monitors the output and adjusts the duty cycle accordingly and the output changes with change in loading (that's why the control block is used in the first place)...Can anybody explain the effect of load changes on the output if a control block wasn't used at all?


texts: Suitable small/fast EEPROM for Atmega328

texts:
Looking for recommendation on EEPROM chip, which I can connect to Atmega328. The requirements are:

at least 5-10Kbyte
fast reading with Atmega. I expect reading one word about 1-5us, please advise if it's possible.
I am going to store set of custom data structures and read them in the loop every 200ms.


texts: Get expressions of E and H fields at a boundary from expression of surface current - Pozar ex 1.11

texts:
I am bringing whis question because, even though I have the solutions manual from the exercises of the book "Microwave Engineering 4th edition", by David M. Pozar (one of the Bible books for microwave circuits and systems), I just don't understand the solution.

The exercise 1.11 from this book states the following:

  "Assume an infinite sheet of electric surface current density \$
 \vec{Js}=Jo·exp(j\beta z)·\vec{x} \$ is placed on the z=0
   plane between free-space for z>0 and a dielectric with \$\epsilon =
 \epsilon_0·\epsilon_r\$. Find the resulting E and H fields in the two regions"

I was thinking of solving it by using the boundary conditions between two dielectric media. In fact, the previous exercise (1.10) is similar, but without the exponential term in the expression of the current sheet:

\$\nabla\$ x \$(\vec{E_2} - \vec{E_1}) = 0 \$

\$\nabla\$ x \$(\vec{H_2} - \vec{H_1}) = \vec{J_s} \$

But, the solutions manual starts the exercise by asuming that this current sheet will generate obliquely propagating plane waves, without any further information, thus employing expressions for E and H fields which have components in the z direction. I cannot understand the reasons why it makes this assumption.
I hope you can help me!

Kind regards


texts: why DSP is required for over current numerical relays

texts: Is DSP really required for over current numerical relay. If we have processor with 16 bits ADC, frequency in MHz and some KB RAM, then also we can achieve over current protection with good accuracy for wide current range. So what is so special about DSP???


texts:
I am completely blind, and I'm trying to make a tactile drawing of how electricity flows in a circuit.

A circuit implies that something is circular. So, at 12:00, you'd have one pole, and at 6:00 you'd have another pole. Electricity can flow from one pole to another clockwise or anticlockwise. I know that when current flows in the same direction, is direct. When the flow of electricity changes at a fixed interval, it is called alternating. That's why we have mains hum.

You can attach different things in your circuit, like an  appliance at 3:00, and a radio at 9:00.

If there is an opening in your circuit, electricity cannot flow until the circuit is closed.

So, how exactly does ground work, and are there any analogous concepts that can be used to explain what it means?
This web site has some pretty good analogies to imagine how voltage, current, and resistence works. Unfortunately, does not talk about ground. https://www.howequipmentworks.com/electricity_basics/


texts:
I'm hooking an RFID reader up to an antenna.  The reader operates at 134kHz and, due to its resonant circuit design, it can produce up to 350V (peak to peak) across the antenna terminals, with max current of 200mA.

Other answers on this site suggest that you need to start thinking about safety at voltages over 50V (or 30V in some posts).

Apart from avoiding touching the antenna terminals, and surrounding portion of the circuit, what else should I do to make sure I'm safe?

Secondly, if I did get a shock from this circuit, how bad is it likely to be? (I.e. how dangerous is this?)

(FYI The reader is a  RFIDRW-E-TTL from Priority 1 Design)


texts: Buck topology for a 3.3V to 1.1V for a SoC

texts:
I have been given this circuit in a design guide and it does not make sense for such a complicated circuit to be implemented just to get 1.1V out.

It requires 3.3V (input) and will give 1.1V out. The 1.1V is used to run digital functions in the chip; so I can imagine it possibly pulling too much current. Can I not use a simple voltage divider to get the 1.1V?

This image was obtained from this document (page 12).

EDIT:

This is related specifically to a system-on-chip (SoC) application.

I am trying to simplify the design without losing its functionality. Is the inductor necessary and all that.


texts:
I am attenuating an audio frequency (50 KHz) signal that is pulsed at 666 W for 300us with a period of 300ms. I estimated the power dissipated averaged over a period to be approximately:

\$\frac{300 \times 10^{-6}}{350 \times 10^{-3}}\times 666 = 0.5709 \approx 600\text{mW}\$

In the past, I have had no issue with going smaller than the peak power I expect to see on the power rating for the resistor as long as the average over the (reasonably small) period was less than  power rating for the resistor. The resistors warms up, but they are ok long term.

Now I am working with some mini circuits attenuators (VAT-XX) that are rated for 1W with various attenuations (1dB - 20dB). Running this signal through these attenuators results in "POP POP POP" and some dead attenuators. Before the failure, measuring the DC resistance gave some reasonable value around \$300\Omega\$ for the chain of attenuators. The DC resistance is now in the 10s of mega-ohms. The failure happened about 5 or 6 periods after I turned on the source and the attenuators did not heat up. The popping continued after the first pop and has a period that audibly matches the signal period.

I am skeptical that the failure is due to exceeding the power rating and I think that it is possible that the attenuators were damaged by the voltage during the pulses, which is ~850V peak-to-peak (perhaps the coax dialectric was broken down).

I would appreciate any helpful suggestions on why the attenuators failed.


texts: Choosing an Audio D/A converter for I2S digital audio based on 32fs

texts:
I'm hoping someone can either verify or clarify my understanding of interfacing an Audio D/A converter to a device that sends audio over I2S.

I have an Audio Codec chip, the VS1063A (Datasheet), that is capable of sending 16 bit I2S data to an external DAC. Unfortunately, the VS1063A is constrained to 16 bits per channel, which means the bit clock runs at 32fs. Most Audio DACs require a minimum bit clock of 48fs.

For instance, TI's PCM1748 (Datasheet) states:

  BCK can be
  operated at 32 (16-bit, right-justified only), 48, or 64 times the sampling frequency.

I found a different Audio DAC from TI, the PCM5101A (Datasheet) which seems promising, but I want to confirm my understanding. The datasheet states that it has an "integrated High-Performance Audio PLL With BCK Reference To Generate SCK Internally." Furthermore, it says

So here's my question: Unlike the PCM1748, which requires a 4 wire I2S interface (the forth being SCK) with some additional circuity to play the 32fs format coming out of the VS1063A, will the PCM5101A accept the 32fs format because of its ability to generate SCK internally?

Any feedback would be appreciated.