texts:
First, the problem I am trying to solve:

My objective is to create a device that will generate a constant current to a load that varies in resistance from approximately 1Kohm-40Kohm. I will be using two 6V batteries in series as my main source to create a 12V source. For the sake of this question, the current I am trying to generate is 5mA.

Now, on to the boost converter:

I've done a bit of reading over the last few days and the concept of a boost converter in its simplest form is rather straightforward. Most searches on the internet will yield the following image (or some variant):

I thought that was simple enough. I could just input my 12V, provide the switching signal for the MOSFET and vary the duty cycle to get the desired output voltage over the load. To ensure that I maintain the correct current, I could use a set resistor in series with my load to read the voltage drop across the resistor. Then, using a simple Ohm's Law calculation, I could find out what current I'm supplying and vary the duty cycle accordingly.

My next thought was to go and see if an IC existed for such a device, surely they must... This led me to a 513-NJM2360D switching regulator from Mouser. Just what I needed, a 12V input should be able to get me a 1.25-40V output. Fantastic. It looks like this thing can output up to 1.5A. Yikes, way more than I need. Oh well, surely we can reduce that for our load. I ordered 4.

As it turns out, I did not do nearly enough research.
Apparently that's not at all how the NJM2360D operates. Consulting the datasheet shows that a "typical application" of the device would look as follows:

Of course, I was a bit bummed. I thought I was going to be able to hook this thing up and have it pumping volts out in no time. Fortunately, I was in close proximity to a supply closet. I went and grabbed the components that I could locate that matched exact values. I didn't have a 180uH inductor but I did have a 200uH so I figured that should suffice. It measured 189uH at 1kHz, close enough. After some careful breadboarding, I was able to stand back and confirm that it was all wired up. I hooked it up to a power supply and turned the knob to 14V. Then, I grabbed my multimeter and checked the output voltage. -30mV. Whaaaat? Surely there's a mistake somewhere. I couldn't find one. I tried tweaking the input voltage from 5V-20V and couldn't get much different results.

Now I'm a bit back to square one, I suppose. I don't know how to go about designing and choosing the values as they did to come up with their application circuit. Likewise, that approach doesn't allow me to perform any sort of digital logic to maintain a constant output current. It seems like the fancy internal gadgetry takes care of the switching signal by itself.

Any advice or tips would be greatly appreciated. I am looking for similar ways to achieve a constant current given different loads. Applications in which a microprocessor can be used are helpful because I can choose different output currents with ease (say, 6mA instead of 5mA).

-

Note: I attempted to link the datasheet and the device page from Mouser but was unable to do so since I don't have enough reputation. A quick google search should get you there.


texts:
I am looking for a way to design something that can tell me the cumulative power draw of a circuit -- the same concept as a Kill-a-Watt, but measuring mWh rather than KWh. An added bonus would be the capability of generating graphs to show usage over time.

I'm dealing with ~3.5 Volts, current in the low mW range. Time periods to be logged range from a few minutes to a few days.


texts: In a Wilson mirror, does Q3 need to have the same beta to cancel the base current error?

texts:
I'm learning about Wilson mirrors in the Art of Electronics Third Edition  (pg. 102). It shows the following circuit:

simulate this circuit – Schematic created using CircuitLab
It then explains the circuit. As part of the explanation it says this:

Transistor \$Q_3\$, by the way, does not have to be matched to \$Q_1\$ and \$Q_2\$; but if it has the same beta, then you get an exact cancellation of the (small) base current error that afflicts the simple mirror of Figure 2.55 (or the beta-enhanced mirror in Chapter 2x).
Exercise 2.17. Show that this statement is true.

Figure 2.55 is just a Widlar mirror as so:

simulate this circuit
The book doesn't explain what the "(small) base current error" is but I assume it's referring to the fact that in the Widlar mirror, \$I_P = I_{load} + I_{B_{Q1}} + I_{B_{Q2}}\$ instead of \$I_P = I_{load}\$. So I set out to solve Exercise 2.17 with that assumption.
From an analytical perspective, it makes sense to me that if \$Q_3\$'s base current is equal to \$Q_1\$'s base current, \$Q_3\$ will balance out the equation. \$I_P + I_{B_{Q1}} = I_{load} + I_{B_{Q2}}\$ (and because both base currents are equal, \$I_P = I_{load}\$). However, when I start to solve this mathematically involving \$\beta\$, it seems to me that \$\beta\$ needs to be different, not stay the same.
Here is my logic:

\$ I_{B_{Q1}} = I_{B_{Q2}}, I_{C_{Q1}} = I_{C_{Q2}}, I_{E_{Q1}} = I_{E_{Q2}} \$
\$ I_{B_{Q3}} = I_{B_{Q1}} \$
Use \$ I_B = I_E - I_C \$ to give \$ I_{E_{Q3}} - I_{C_{Q3}} = I_{B_{Q1}}\$
Use \$ I_{E_{Q3}} = I_{E_{Q1}} + I_{B_{Q1}} \$ to give \$ I_{E_{Q1}} + I_{B_{Q1}} - I_{C_{Q3}} = I_{B_{Q1}} \$
Rearrange to give \$ I_{C_{Q3}} = I_{E_{Q1}} \$
(Lines 2 & 5 appear to be correct according to my simulations)

Use \$ I_C = I_E - I_B \$ and 2. and 5. to give \$ I_{C_{Q1}} = I_{C_{Q3}} - I_{B_{Q3}} \$
Use \$ I_C = \beta I_B \$ to give \$ \beta_1 I_{B_{Q1}} = \beta_3 I_{B_{Q3}} - I_{B_{Q3}} \$
Substitute \$ I_{B_{Q1}} \$ with \$ I_{B_{Q3}} \$ to give \$ \beta_1 I_{B_{Q3}} = \beta_3 I_{B_{Q3}} - I_{B_{Q3}} \$
Divide by \$ I_{B_{Q3}} \$ to give \$ \beta_1 = \beta_3 - 1 \$

Now we can see if the two \$ \beta \$ values were equal, the equation would not work. I've been bashing my head on this for hours. Where did I go wrong?


texts:
When using multiple regulators in a chain, is there noise added to the input by the regulator?

If I have a SMPS feeding an LDO, and then another SMPS after the LDO. Is the ripple or noise added to the LDO rail by the downstream regulation?


texts:
I just learnt of TopoR routing software. It routes PCB traces without grids, with curves and arcs for reduced trace length and vias.

http://www.toporouter.com/

But its not a complete PCB routing solution , they have examples on how to use it with DipTrace.

At work we all use and are comfortable with EagleCad . Has anybody used TopoR with Eaglecad? or know of EagleCad plugin/user script that kinda does the same.


texts: Why has this configuration chosen for feedback?

texts:
I'm a newbie in electronics and Trying to understand and build this circuit. would somebody tell me the rule of R1 & C2 in this circuit and their magnitude effect on the controlling of process.why didnt feedback start just after the output of opamp?How could i find the transfer function between the voltage output of Hall effect sensor and the voltage output of MOSFET drain?

The schematic is the circuit of a magnetic levitating tool at:

http://www.bis0uhr.de/index.htm?http://www.bis0uhr.de/projekte/schwebekugel/english.php%99https://www.youtube.com/

Thanks so much


texts: What general purpose connectors are used for GPIO data?

texts:
Let's say I have a chassis housing a raspberry pi.

I have a second chassis with some neopixels. I want to connect these two chassis with two panel mount connectors and a cable. The cable would be sending the data from the rpi to the neopixels.

What sort of connector would you recommend I use? Something cheap, panel mount, and not universally used for anything else, ie, USB connector or 3.5 mm connector are both bad ideas for obvious reasons.

I don't want to use a ribbon cable either, please assume both chassis are "sealed".

Maybe some sort of DIN connector? What is the standard connector for GPIO type data?


texts: Variation of Fermi level in doped semiconductor with applied voltage

texts: Is Fermi level of p or n type semiconductor constant with respect to applied voltage ? Please explain. From the attached image it seems Fermi level of intrinsic semiconductor varies but that of extrinsic semiconductor is constant.


texts:
I'm in the middle of installing GPS tracking into my car using the following guide:

http://gizmodo.com/5691724/how-to-track-your-vehicle-on-the-cheap

Though I'd like to build something a little more elegant.  Ideally my solution will have a programmable GPS unit and a sim card (cdma seems better than gsm tracking), with no unnecessary hardware. I'm hoping this will help keep the size, power consumption, and operating cost minimized, though I can only imagine that something like this would cost more than the $30 phone from the guide without good ol' economies of scale. Do you know of any way that I can build something like this on the cheap?


texts: I want two build a USB to ethernet adapter and was looking around for an IC to do it. It looks like the 9500a from microchip seems to be the popular one. All I'm doing is making a adapter so that I can hook up to the internet through USB. I have never used an Ethernet bridge before so this is all new to me. Any alternate ICs would be appreciated and if it included built-in drivers as well that would be great too.


texts:
Yesterday I tried to solve a question in a second order circuit , but I couldn't ! because I have problem understanding the concept of 0+ , 0- !
 So let me try it in a first order circuit , it supposed to be much easier :

Is there any thing wrong !?


texts: I don't know how to simplify resistors which have 2 grounds

texts:
I think that I can't apply normal Thevenin method and mesh method. How I can I simplify it? I don't think it is really parallel because that has mid ground.
If some online site has same form like this, can you do take about that?
I don't need the need answer, but I hope to get advice and how to operate process.
I simulated that, but the voltage graph was not sine wave. Just weird.

I thevnined that circuit and made under circuit.


texts: How fast can a 120VAC LED bulb be switched on and off? (Without serious damage)

texts:
Since LED's run on DC and the 120VAC replacement bulbs receive AC power there must be some electronics inside to step down the power.

Can these electronics handle the bulb switching on and off rapidly?  By rapid I mean 1/8 second on then 1/8 second off repeatedly.

I am using an Arduino to control ~20 independent 120VAC 60w equivalent LED bulbs.  I am asking the question here since it is more electronics than Arduino programing but wanted to give context to the question.


texts: UART continues to receive despite cable is unplugged!

texts: I have a custom DSP board which has a UART port to send data to PC. Strange thing is when I stop the UART port on DSP, PC still continues to receive data. Even stranger, I unplugged the USB cable from PC so there is no connection between the board and PC, still terminal is receiving data and it doesn't stop for 10 minutes! Do you know what's going on? I hooked up Oscope to DSP UART TX port, it was in-active.


texts:
.For a project I need to display a progress bar of the activity performed by my MCU. For this purpose I am going to use a bargraph display, but the problem is that bargraph display driver driver IC LM3914 uses analog input where as MCU produces a digital output.

How can I display a value on bargraph using digital input instead of analog? The bargraph should display values from lower to higher and higher to lower. Schematics will be highly appreciated.

UPDATE:

FIFO is more important then moving the value in backward direction.

I only have two data pins available on uC (PIC16F84a) to drive a Bargraph display, and IO expander will increase the cost of system.
I tried IC 4017 for the purpose, but it provides only one ON pin at a time.


texts: Overtones(?) seem to be showing up in FFT of audio signal

texts:
I am processing audio data using a Teensy 3.2. I have a microphone attached to it, and am playing music in my room using some powerful speakers.
When I look at data from the Fourier Transform of the audio data (specifically, the 1024 point fft from the teensy audio library), there appear to be overtones showing up when I don't expect them to. For example, when I play a pure middle C tone (263 Hz), the corresponding frequency bins return about .6 amplitude, but the frequency bins corresponding to 700-800hz also light up at about .2 amplitude. Some higher frequencies also light up at lower amplitudes. This is unexpected, as I am just playing a 263Hz sine wave through a frequency generator app on my phone (through the powerful speakers.) The same kind of thing happens when I play other pure frequencies.
The speakers are pretty high quality, so I don't think its any artifacts created by them (but correct me if I'm wrong.) Clearly it isn't aliasing, since the audio data sampling rate is controlled by the teensy (correct me if I'm wrong).
I figure it must be artifacts because the sound is bouncing off the walls, but I don't see how that could result in such specific overtones. I would just expect to have a bunch of slightly delayed copies of the same signal, and delaying a signal just results in scaling the entire Fourier transform by a constant. I don't see how this could change a purely-263Hz signal to a mostly-263Hz-partially-777Hz signal.
I found a post on some forum talking about something kind of similar, but the replies were not very helpful. Does anyone have any idea where these overtones might be coming from?


texts: Controlling a 4 lane DSI display from RasPi 3

texts:
I have a DSI display which runs on 3 data lanes. Can this be controlled from a Raspberry Pi 3 which has a DSI interface that only supports 2 lanes? Looking for a yes or no with a reason. If you have any way to help it's much appreciated. Thanks in advance!

Pinout for Connector On Display:


texts: Why is there such a huge price range for BNC terminators?

texts: I wanted to buy some standard BNC 50 Ohm terminators and was surprised when I saw multiple offers with prices well above 20€ per piece. I found others for around 2€ (same online shop) and now I am intrigued on why the expensive ones are more expensive. Are they in some way better? Longer lasting?


texts:
I'm trying to create an AND gate with transistors. But I've stumbled on a problem.

I've also connected a LED to out.
When I turn A on the LED is off.
When I turn B on the LED is on??????.
When I turn A and B on the LED is on

Why is it when B is on and A is off the LED turns  a little bit on?
And is it possible to turn the output fully off when B is on and A is off.


texts: How to work out resistance of milli-ohm resistors?

texts:
I have a dilemma. The schematics for a development board I am using specifies that it uses 20 milli-ohm resistors for current sensing (7 current sense channels). However, by calibration (using low burden voltage fluke ammeter), I have "calculated" that the resistance is 27 milli ohms (plotted around 6 operating points, fitted a linear curve to it, gradient of V-I graph is 27.004 with R^2 = 0.9996).

So I am now confused. Is it really 27 milliohms or 20 milliohms? These are 0603 resistors, and common multimeters don't range down to the milliohms. :(


texts: Hi I want to make Cell Phone Purse w/ Touch Screen Easy Access in mass production . My question, what is the quality of plastic which used window in front of cellphone which is touch screen . Thanks


texts: Hey guys I am designing a PoE circuit board and the microcontroller that I want to use (PIC32MX795F512H) seems to be missing some pins to connect my data lines or it's not clear to me where the lines should go. From the Ethernet cable I need to connect TX+,TX-,RX+,RX- to the microcontroller but the datasheet doesn't indicate which pins are for positives and negative on the Ethernet transmit and receive port. What am I missing here?


texts:
Today I attempted to reflow solder a board using a solder paste mask and a hot air station but for a QFP chip, I got a of solder bridging. This has generally been my experience with trying to solder QFP chips with hot air - I can't seem to prevent the bridging.

I rarely have these problems with QFN chips, they seem to somehow be more resistant to this behavior. I can do QFP chips without that many problems by hand with a lot of flux but reflow seems to escape me. This time I even used a solder stencil!

Any tips or tricks to prevent bridging of QFPs when reflowing?


texts: What would a professional use to switch sprinkler solenoids?

texts:
As evidenced by several previous questions of mine, I'm working a project to design a sprinkler controller. This involves driving one of 16 solenoids (well, probably only one at a time...) based on a schedule. I have the microcontroller sorted out, and the software is just about finished up.

As reference, the solenoids I'm driving are generally between 300mA and 500mA inrush current, and 200mA and 400mA holding current. They're driven at 24VAC.

My initial hardware design involved a set of SSRs, of this Sharp variety. They're non-zero-crossing type optoisolated triac-output SSRs. I've tested the solenoids with these, and they seem to work well. The datasheet shows a protection diode (which is probably overkill) and a snubber circuit (to be used especially when driving inductive loads), but I gleefully ignored that advice, and I haven't seen any ill effects yet.

Because I'm curious, I took a peek inside a couple of commercial controllers. Inside, I saw nothing that looked to me like my SSRs. One of them had what seemed to be a set of TO-220 size triacs. I couldn't see what other componentry surrounded the triacs.

My question is, what would a professional use to drive these solenoids? Are the SSRs overkill in this application? Would it be simpler and cheaper to just use logic-level triacs directly? Is my lack of a snubber circuit going to come back and bite me eventually by destroying the SSR, the solenoid, the MCU, or my entire neighborhood in a flaming fireball of death?

Note

To all those suggesting DC solenoids, please don't. Commercial sprinkler systems use AC solenoids. That's just the way it is. I will not be using DC solenoids, because Home Depot, Lowes, and others don't sell DC sprinkler valves. Such a thing (to my knowledge) doesn't exist, at least not in markets where the average home user would be.

To be absolutely clear

I'm not asking for a list of possible ways to drive solenoids. I can imagine a lot, and there are lots more available out there. I'm asking how this sort of thing is done professionaly, i.e. how it's done when designing for cost, robustness, and mass-producability.


texts: Ratio of inductance and capacitance in Colpitts Oscillator

texts: I would like to build a Colpitts oscillator. The oscillator will have a frequency of \$f = 1/2 \pi\sqrt{C_{tot} L}\$. But what implications does my choice of \$L/C\$ have? Can I arbitrarily choose my tank circuit to be very inductive, or very capacitive? For resonators, the impedance goes as \$Z=\sqrt{L/C}\$, but it is not obvious to me how this impacts on the behavior of the oscillator.


texts: Garage door opener - turn light on without opening the door

texts:
I made a wireless garage door opener using NodeMCU. This is to replace a wall unit inside my garage.
The original unit was wired with two wires (red and white). To open/close the door I just need to close the circuit for a moment.
My original wall unit had motion sensor and would turn the lights on when motion was detected.
I would like to replicate this functionality in my DIY solution, but I am not sure on what to do (do I send some different signal).
I am thinking of hacking it by sending open/close signal twice with a delay of say 100ms. This is because the open/close turns the light on.
Any help would be appreciated.


texts: DIY SMT Reflow: Toaster Oven, Skillet or?

texts:
I've read quite a few write ups on converting toaster ovens or skillets for reflowing SMT components. The important parts appeared to be:

Attempting to match a reflow profile (temperature pattern to ramp up and then down that gets hot enough to reflow but not hot enough to damage components/PCB)
To make applying paste easier to specific areas: use a template (laser cut appears to be popular)

SparkFun even offers a kit to control an oven or skillet but apparently due to liability concerns, the kit uses a 12v relay instead of a 110/120v or 220v relay (adapting it to full voltage is left up to the DIYer).

What is your personal experience with this? It would be great to hear actual experience on what works and what to avoid.


texts: How do media buttons on a plain wired headset work?

texts:
I mean the simple analog headset pluggable into the jack of a phone. Not USB, not bluetooth, not fancy proprietary plugs with extra connectors - just a generic stereo+mic jack.

The four "bands" on the jack plug are GND, right earphone, left earphone and microphone. And there's nothing to cover the buttons - usually "Volume up/down" + "Media key" for receiving the call.

How do these buttons communicate being pressed to the phone?


texts: Quality factor in antenna matching / question about SX1261 LoRa transceiver

texts:
I have a question about how the quality factor is determined for RF antenna matching, especially for PI network matching.

The reason for the question is the Reference Design for antenna matching for the SX1261 LoRa transceiver:

C9 = C10 = 3.3pF, L5 = 9.1nH.
According to https://www.semtech.com/uploads/documents/AN1200.40_SX1261-2_Reference_Design_Explanation_V1.1.pdf the impedance both left and right is 50 Ohms.

Using a PI matching calculator, I found out they designed for a Q factor of 1:

9.17nH = 9.1nH, 3.67pF = 3.3pF.

My questions are:

Why do they even use a matching network, if impedance is 50 Ohms at both input and output?
Given Q = f / BW, f = 868 MHz I would expect Q in the range 30 - 50 for LoRa operation. Why did they design for a Q of 1? If I want to calculate my own matching network for a non - 50 Ohm antenna, do I also calculate for Q = 1 and why?

I would love to understand this, but all literature I found online usually calculates Q using the frequency and bandwidth, and in this example BW = 868 MHz clearly makes no sense?

Thanks.


texts: I am working on choosing an ideal anode for salt water battery.

texts:
Can anyone tell me how to justify this anode is the best compared to other?  ALso, why the discharge capacity decrease with C rate?

what does cyclability  and rate capability means?


texts:
Trying to find out what's wrong with the internal amplifier of my old Klipsch subwoofer SW-12. I'm a novice in electronics.

..............................................................

This is the second question related to this subject.

..............................................................

The schematic of this model is on page 15-17 of its service manual:

http://www.audiolabga.com/pdf/SW12-15%20I.pdf

The subwoofer consists of three things: enclosure (wooden box), an amplifier with inputs and outputs connectors, and a front control panel consisting of three controls [LEVEL, PHASE ADJUST, LOW PASS] and an LED connected to the amplifier through two cables (6 wires and 5 wire) and two sets of connectors.

(They are shown on Sheet 1 of the schematic above.)

Can turning on the amplifier (with the driver connected) without connecting the three controls and the LED to the amplifier damage the amplifier or the driver? In other words, is it safe to test the amplifier without connecting the three controls and the LED? While testing, the low level LINE IN may OR may not be connected to an audio source such as an AV receiver. No speaker input or output terminals on the back of the subwoofer's amplifier are connected to anything.

The three controls on the front are made with 4 pots: 1 for LEVEL, 1 for PHASE ADJUST, and 2 for LOW PASS.


texts: Comparator over I2C with programmable reference

texts:
I'm looking for a programmable comparator which has a digital or open-drain output and a voltage reference which can be programmed over I2C. My searches at my favourite sites of Microchip and Farnell haven't brought up anything interesting.

If this isn't possible I'd be looking at making an external R-2R (or R = 2^n) divider (precision not critical) from 4-5 IO pins to get 16 or 32 levels granularity. The setpoint needs to be adjusted to compensate for varying video levels.

Edit: such comparator should also have <1µs response time. Most comparators satisfy this, but there are a few cheap ones that don't.


texts: what does Loss Tangent means in capacitor?

texts:
As we know the definition of Loss Tangent in capacitor which it is:
When a sinusoidal alternating voltage is applied to an ideal capacitor, the current advances by pi/2 in phase. In the case of a practical capacitor, however, advance
in phase is (pi/2 - delta), which is smaller than pi/2. “delta” is referred to as Loss Angle.

but how we can use it when we are selecting a capacitor?


texts: Motor control solution on the truntable for computer vision and optics usage

texts:
I'm lack of electrical engineering knowledge, I'm just a software engineer, so I need your help on the turntable design and control problem.

I need a very accurate turntable to allow me to scan some objects with a DSLR camera, and I can use a computer vision based algorithm to properly digest the images.

Unfortunately my algorithm only works well on very accurate turntable. Each rotation must be exactly same, say the rotation precision should be around 0.01 degree.

The rotation is like every time it rotates 3 degree, then stop, allowing the camera take the photo, and repeat the rotation again, until some images are taken. Since the object I'm scanning is fragile, so the rotation speed is around 1 degree per second.

The potential design can be like the following graph and design .

So I'm asking a question that how can I control the turntable with computer precisely ? Do I really need an encoder to tell me the angle it reaches ? I wish to get the actual hardware type suggestion, and of course I wish the entire control module (without the computer) could be less than 1000 dollars.


texts: How to select free wheeling ultra fast recovery diode for 30VDC coil with 10 amperes of current

texts:
How do I select an ultra fast recovery diode for switching circuit of 30VDC coil having 10 amperes of current?
The coil is switched ON by an N-channel MOSFET.

20 milli seconds ON
300 milli seconds OFF


texts: Why active analog summer (adder) over passive summer exactly?

texts:
Background: Designing voltage summer without op-amp and Operational Amplifier Adder

I know that op-amp can provide virtual ground for the circuit, and can have benefits in eliminating crosstalk. But the latter part confuses me.

Suppose that voltage sources are modeled as independent voltage source plus resistor. In such a case, resistor can be added to existing resistors to provide total resistance value, and voltage laws to calculate voltage works, so crosstalk does not affect the sum value, as long as resistance value of each source is quite different.

Is the whole concern regarding crosstalk related to different sources having different output impedance? Or am I understanding something completely wrong?

To summarize, I do understand that adding voltage makes the output voltage higher than input voltages, and current flows from high voltage to low voltage. But Kirchoff's voltage laws are still there unless we are talking about distributed circuits, and the calculation using same output impedance for different voltage sources results in an accurate-enough sum. So why active summer over passive summer?


texts: Using a p channel mosfet to switch a RF switch

texts:
I'm very new to electronics, i have the following RF switch (CG2179M2) which i need to control using the output signal of my MCU, which will provide a 3.3V HIGH for transmit mode and LOW for receiption mode. The final product will be running on a battery, thus i need the most efficient way to control the RF Switch.
I've been suggested that i shall use a p channel mosfet instead of a PNP transistor because the transistor will consume some power in the On state. My final product will stay most of the time in the reception mode, therefore, i need to keep one pin of the RF switch (the pin used by the reception channel) always on HIGH state. I thought to do this by connecting the drain to the pin controlling the reception of the RF switch, Source to the battery and Gate to the control pin of the MCU. So what i expect to happen is, the MCU enters the reception mode by setting LOW the control pin -> the p channel mosfet getting a LOW on Gate will set the Drain to HIGH which in turn will set the reception channel pin of the RF switch to HIGH.

These are some of the questions i have:

Is this the correct way to do this? Or shall i need a PNP transistor instead of the p channel mosfet?

I found the following mosfet on mouser, will it be fine for the job?
NTR2101P

Shall i use a pull down resistor on the mosfet to keep it always open unless i set it HIGH to cut it off?

EDIT:
I thought it's much easier to just use an inverter IC. I found the following one on Mouser (74LVC1G04), do i need to add passive components (resistors or capacitors) between the 74LVC1G04, RF Switch and the MCU?

Thanks in advance,
Bilhan.


texts: Is it safe to use optoisolator for a longer period?

texts:
I have the following optoisolator PC817. It is a 4-Pin Phototransistor Optoisolator.
My idea is basically to control electrical appliances in my home. The power supply in my country is 230V 50Hz.

I specifically want to control tube lights in my room. The control of 5V comes from an AVR microcontroller.

My circuit connections are shown in the picture.

Hoping that my connections are correct, my question: is it safe to run them with optoisolator for a prolonged duration. And also how reliable are they?

I also want some suggestions on additional safety precautions.


texts: How to dynamically adjust voltage divider (90V) using a 3.3v microcontroller

texts:
I have a power supply that regulates its output by turning a potentiometer. It supplies the full 90V to the two leads of a 200k potentiometer. By sending a voltage in-between 12-90V to the wiper input on the power-supply, it will adjust its output. I tried to use a mcp41010 digital potentiometer, however it promptly let the smoke out since you can only apply 0 to VDD across its leads. Is there a way to add additional circuitry to use a digital potentiometer, or is there a better solution to divide 90V using a microcontroller?

Edit:
The powersupply I'm trying to dynamically adjust it this one:

Found here:

https://www.banggood.com/DC10-60V-30A-1500W-To-12-90V-Boost-Converter-Step-Up-Power-Supply-Module-p-1076169.html


texts: Need a Relay For to reverse a thermostat

texts:
This should be a simple question for someone who knows what he's doing. Unfortunately, I don't, so I've been researching like crazy and am stuck on where to go from here.

I am trying to modify a mini fridgerator for as cheap as possible to allow me to control the temperature from 55 to 90 degrees. I stumbled across several simple bimetal thermostat switches that have a pretty good range in them, but they are heating thermostats. I need to reverse these to cooling so that the fridge will activate at a certain warm temperature and turn off once it reaches set cooling.

Thus, when the thermostat is open, I need the fridge running. When the thermostat is closed, I need to fridge to stop running.

I think I've narrowed it down to either a SPST NC relay or a SPDT relay, but I'm stumbling heavily on the exact values I'm looking for. The normal fridge would accept 110 volt AC from the wall and output 110 volt AC into the unit. Normal operating amperage of these I beliefe is 3 - 5 amps, and most suggest the start up should provide 1.5 times that ammount. So my first question is, I guess I am looking for a 110v AC relay that can handle 5 - 7 AMPs?

If I'm on the right track, then my next concern is cost. I can find these in expensive electronics catalogs. I've looked on ebay, and they have some fairly simple and cost effective relays, but they are made for China outputting 240V capacity. Does this affect me, or because it's more than the 110 I should be ok?

Does anyone have better suggestions? Again, only looking to reverse this thermostat from heating to cooling. Shouldn't be this complicated! :)


texts: I have a chinese made genset (1 ph 220vac 5kw).   The engine is broken but the alternator is sound.  I want to re-use this alternator on a waterwheel to produce 12vdc.  What sort of output can i expect if the waterwheel turns the alternator at about 100rpm.    Is there a graph of rpm v V, I? What sort of rectifier is required?  Will I need to energise the rotor at start up?  It has about 20 stator poles and 2 rotor poles with 2 carbon brushes.


texts: How to solve this problem using supermesh analysis

texts: Can we solve this problem using supermesh analysis? I thought you needed to have a common current source between each mesh? Is there an easier solution to this problem?


texts:
I am designing a 4 layer PCB with power planes and a ground plane, with mixed voltage signals and high currents. I have two possible isolated ground plane configurations, and I am wondering which would be better in terms of reducing EMI and noise. The logic circuit includes a microcontroller with ADCs, so I don't want the high current ground to interfere with the analog signals. The power section drives a motor, so the ground there will be very noisy. Here are my power planes.

One of my ground plane configurations forces the logic level ground return path to follow the same path as the supply path to the regulator. For this configuration, I am assuming that it is better for the logic ground currents to return to the regulator's ground pin. The advantages I can see are that the current will return in the same path as the supply, so there is no inductance created by current loops. The isolation from the high current ground also seems to be better (not sure if this is true).

The other ground plane configuration allows for a more direct current path from the logic ground to the supply ground for minimal resistance (instead of the regulator's ground), but it creates a larger current loop. It also seems to be less isolated from the high current ground (again not sure about this).

Which ground plane configuration would be better for EMI and signal integrity, and why? In general, if I have a regulator, should the ground return path be optimized to return to the ground of the regulator (and then back to the supply ground), or straight back to the supply ground?


texts: 555 timer monostable operation with multiple or long input pulses

texts:
I've constructed a simple circuit with a 555 timer:

When the button is pushed, the led lights for about a second as expected. What I want is:

push the button: led lights for a second (I have this)
push the button and before the led turns off, push again: led
continues to light for an additional one second after second push
push the button, hold it and release after x seconds: led continuously lights
for x+1 seconds

Is this kind of thing possible?

Thanks.


texts: Switch AC contactor with an ESP-12s - will this circuit work?

texts:
I'm trying to make an ESP-12s control 2 relays to switch an AC contactor.

I made this schematic in  Altium and posted to ask if it will work.

The 2 DC power supplies (3.3V and 5V) are isolated.


texts:
I am very very new to the electronic engineering side of things but I am taking a class on Computer Architecture. I have ran into a problem.

Power = Capacitive Load * Voltage ^ 2 * Frequency Switched.

I have a hard time understanding what capacitive load is. Let's say I have a CPU with the following specs.

Uses 3.3 Volts
Requires 29.1 Watts
Has a clock rate of 200 Mhz

How would I use these three bits of info to find a capacitive load? Can I? I'm not sure if I am going about this correctly. Help is appreciated! :)


texts: Trusted brand Led Driver gives much more current than on spec

texts:
I bought 2 trusted brand LED drivers. They are LPC-20-700. Spec says it's constant current 700mA, but I blew my whole project. After (yes, I know) that I tested the driver and while it gives me the correct voltage 30V, the current is 1.1A, which is 400mA more.

I have a hard time believing the drivers are bad, because I've read that this is a safe brand. I bought good ones to avoid house fires and such.

Is there any possibility that I'm doing something wrong? It seems very simple but the results are wrong.


texts: Can an electronic system be built with absolutely no single point of failure?

texts:
Is it possible to make an electronic system, where every sub-system is duplicated and absolutely nothing is a single point of failure and if a failure (or multiple failures) occurs the system itself will seamlessly route around it?

Back in the 80s I worked with Stratus fault tolerant computers, their party trick was to be able to hot-swap the microprocessor boards, memory or hard discs seamlessly without interruption for the end user. But even this system wasn't quite as good as the adverts - both the clock and the motherboard were single point of failure.

At the simplest level, I've build devices that will choose which of two batteries to connect to (based on state of charge) but even with a simple set-up like this the relay becomes a single point of failure.

I've also worked with microprocessor based systems that would connect to three different GPS feeds and take a 'vote' on the most plausible position if one of the three disagreed with the others. But even with this, the voting system and bus it communicated over was a single point of failure.

Is a possible to build a multi-function system (example - drone autopilots, missile control systems, nuclear reactor safety systems) where every system and sub-system is fully redundant and any internal system failure is seamlessly routed around?

I'll freely admit this is a follow-up to my previous question about space probes. The consensus answer seemed to be that (in the case of Voyager) reliability was ensured by using one-of-everything and making sure that each component was maximum quality and 100% reliable.

It occurs to me that an alternative approach is three-of-everything, and some mechanism to to ensure that if one-of-the-three becomes faulty it gets ignored.


texts:
tl;dr:   I want to understand op-amps better!  How do I choose the magnitude of resistors?  1k, 10k, 100k, etc..  I made a schematic to play with an In-amp to create a gain of 5.
What other considerations should I implement in a real world circuit?

-

I'm trying to learn how to use op-amps to provide a gain of Av=5
Eventually I would like to apply this knowledge to the use of strain gages in a Wheatstone configuration.  That's a later thing :)

For now, I'm diving into it by creating a instrumentation amplifier with a gain of 5.  I like this approach because as I understand it, it is a more robust solution to boosting a signal for a variety of reasons.  Not to mention the gain is easily adjusted, which I may be interested in using a digital potentiometer in that location for just that reason.

This is what I have came up with so far in ltspice:

This yields what I want:

The frequency is not very relevant in my situation, the signal won't be changing very much over the course of 1 second.

So my question to you guys,

Why do I choose resistors in the realm of 1k?  Why not 10k? or 100k?
How can I add some basic noise filtering?
Do you see any issues that may occur in applying the circuit above to real life?

I apologize for my lack of knowledge and terminology if I butchered anything!  Thank you for any time you can lend me, I do circuits by hobby and want to understand more of the analog elements.


texts: ATmega328P 16MHz or higher clock output on CLKO pin

texts:
I need a high frequency clock (16MHz or higher) to drive OV7670 camera module, and I want my ATmega328P to be source of that clock. I'm using the CLKO pin since I can't get such high frequencies from PWM.

I programmed the lower fuse bits (0xBF - 8MHz+ external crystal osc., PB0 used to output clock) so it outputs its clock from quartz on PB0 pin. The problem is that if I drive my ATmega with 16MHz quartz, I get 8MHz output. If I use 20MHz quartz, then I get 4MHz output on PB0. The highest clock I get is from 12MHz quartz - then I get 12MHz on PB0.

It's quite strange since frequency goes like opposite direction. Am I doing something wrong?


texts:
I've been trying to test my PIC just by turning a LED on, I verified that the PIC is energized and that the MCLR pin is HIGH.

The PIC I'm using is the PIC18F45K22, running at 3.3 volts.

The LED has a Vf of 1.8 volts and I have verified that its polarity is correct. It is connected to pin RB4 with a 1 kΩ resistor in series.

Not sure what else to try here. I have only 1 LED connected and that's RB4, is there something that might be blocking RB4 from giving the output? Is there anything else that I have to setup?

This is my complete source code:

#include <p18f45k22.h>

void main(void)
{
  ANSELB = 0;
  TRISB = 0;
  while(1)
  {
    LATBbits.LATB4 = 1;
  }
  return;
}


texts: Connecting terminals to transformer on Power Inverter circuit LTSPICE

texts:
I am simulating a Power Inverter circuit using LTSpice, but I am confused as to where the corresponding terminals from the resistor and mosfets go.

I am trying to simulate this circuit:

Based on the one below:


texts: Purpose of 8051/AVR USB programmer in a micro-controller kit

texts:
I want to develop microcontroller projects at my home. In college, we had a device that would write the microcontroller code into the microcontroller. I was going through some of the microcontrollers kits and found this. My question is that the one which is labeled as 8051/AVR USB programmer(zoom the image), what is its purpose? Could that be used for writing code into the microcontroller through USB and then the uC be plugged into the 8051 development board?(But the chip which is plugged to the 8051/AVR USB programmer is smaller than the one on 8051 development board, which makes me confused abut this being the case.)

If this is not the case, then do I need to program the microcontroller the conventional way? the way we do in college, using the device which is specifically designed for burning codes into the microcontrollers? Is there any way by which I can write the code into the microcontroller at home with constrained resources?


texts: Safe to remove piezo-buzzer from this PCB?

texts:
(Click on images for larger view.)

The AC indoor unit I own has an 85dB, 2kHz piezo-buzzer on the PCB. I find it unnecessarily loud, so after coming across this question I filled its hole with blu-tack. This muffled the sound it produces, but not as much as I expected. I'm willing to try hot glue in the future.

What I'd like to know is whether it is safe to remove the piezo-buzzer from the circuit. If not, what can I replace it with?

(Click on images for larger view.)

The schematic diagram and PCB diagram above are taken from the unit's service manual (the location of the buzzer is BZ61). Bearing in mind I don't have much of a background in electronics, and have little experience fiddling with PCB's (sorry!), is there anything useful I can safely assume from these diagrams?


texts:
How do you correctly setup Timer9 (TIM9)on an STM32F405xx to count pulses on rising edge? Is there a special configuration for the pin to the timer outside of this short example?

Here's what I've done so far and also followed the BRIEF counter example from the reference manual copied here:

  For example, to configure the upcounter to count in response to a
  rising edge on the TI2 input, use the following procedure:

  Configure channel 2 to detect rising edges on the TI2 input by writing CC2S = ‘01’ in the TIMx_CCMR1 register.
  Configure the input filter duration by writing the IC2F[3:0] bits in the TIMx_CCMR1 register (if no filter is needed, keep IC2F=’0000’).
  Select the rising edge polarity by writing CC2P=’0’ and CC2NP=’0’ in the TIMx_CCER register.
  Configure the timer in external clock mode 1 by writing SMS=’111’ in the TIMx_SMCR register.
  Select TI2 as the trigger input source by writing TS=’110’ in the TIMx_SMCR register.
  Enable the counter by writing CEN=’1’ in the TIMx_CR1 register.

I believe I've done the above correctly, but reading the register returns 0 always. Is there any additional setup within a different register to connect the to the Timer? I was reading about alternate functions but could not find anything specific to Timers and Pins.

I am loosely following this as a code reference: https://www.ghielectronics.com/docs/108/register-access

Chip Datasheet: http://www.st.com/web/en/resource/technical/document/datasheet/DM00037051.pdf

Chip Family Reference Manual:
http://www.st.com/web/en/resource/technical/document/reference_manual/DM00031020.pdf


texts: Determining Phase Boost needed to Compensate SMPS

texts:
I'm attempting to find the Control-To-Output Bode Plot (open-loop) of a SMPS designed around the TPS54160 so that I can design the type II compensator. The first step in designing a compensator is finding the attenuation and phase boost needed at the crossover frequency (4Khz) using the open-loop gain. Thus, I need the open-loop gain (or the gain of the system without the compensation added). I used the circuit below to find open-loop bode plot, and according to it I need 7.36dB of attenuation at the crossover frequency and some amount of phase boost. I'm not sure about how much phase boost I need (given a phase margin requirement of 60 degrees) because it appears there is 100 degrees of phase margin already since the phase has only shifted 80 degrees at the crossover frequency, since this is a single pole system when open-loop. Perhaps, I'm just confused. Are my model and bode-plot correct? And if so, how do I calculate how much phase boost I need?

In the circuit above G1 is the idealized OTA that the TPS54160 uses for its error amplifier, where R1 and C1 model the bandwidth and DC Open-loop gain of the amplifier. G2 and the output filter form the power stage. I think this model is correct based on the datasheet, which gave relatively simple instructions.

In the bode plot above, I measured V(b) (the output) with an AC source at the input of the power stage. According to this bode plot the phase has shifted 80 degrees at the crossover frequency of 4Khz. The gain is 7.36dB at the desired crossover frequency so it needs to be attenuated.


texts: How do I get to a counter stops at five using logic gates?

texts: I need a circuit to recieve the signal called "50" or "20s" and it trigger a single pulse with five seconds called "TRIP". I set up the circuit below, however, by keeping input J HIGH of the FF7473, the counter repeats the count infinitely. I want to know how to make the counter stops counting when it reaches 5 with J in HIGH.


texts:
Just a quick question about decoupling capacitors here, hopefully will be something nice and easy!

Let's say you are designing a circuit with 4 IC's that all need a decoupling capacitor. Some datasheets specify the minimum value of decoupling capacitor that should be on the PCB. Let's assume all of the datasheets to these IC's say a minimum of 100nF is required.

If all of the IC's are powered from the same rail, and each one has a decoupling capacitor of 100nF, will this not then mean they are in parallel, and hence lower the capacitance? With 4x 100nF capacitors, will this mean that each IC now has a decoupling capacirot of around 25nF value?

If a datasheet says their IC requires a minimum decoupling capacitance of 100nF, will there be any issues from this now?

As a visual aid:

simulate this circuit – Schematic created using CircuitLab

If we just ignore the function of the IC's and just focus on the input, we see all 4 are connected in parallel between V+ and GND, is this not the exact same configuration as this:

simulate this circuit

This, as we all know will give us a total capacitance of 25nF(ish). Am I right in thinking that this is how it would work? And are there any instances where this could cause issues?

Apologies for this question. As soon as I read the answer by Andy aka, I realised how silly it was! Must have been a long week this one!


texts: Interpreting results of a thermal camera - what should I expect to be hot?

texts:
I'm not a trained electrician, but I got my hands on a thermal camera to play with. Its existing documentation didn't help me quite understand what's going on when I see a hotspot. What components can I ignore when they get hot? What components typically heat up on a PCB as soon as power goes on? I know that heat is caused by current, so I kind of expect anything current flows through is heating up. Should ground leads be hot (in the temperature sense) where they touch your chassis or whatever you're using as a ground?

Let me get more specific. A small amplifier (based on the TDA2003) I'm using has a very hot resistor (compared to the rest of the circuit) as soon as power is on, and eventually the main IC and pieces of the PCB nearby heat up too. Is this sort of a case-by-case basis where it depends on my circuit diagram, or are there general rules of thumb when looking at thermal imaging of circuits?

EDIT: Attaching some images as requested, first is visible circuit, second is immediately after power on, third is after 2 minutes on.

Circuit schematic from CanaKit:

(Original source of instructions above: Imgur)


texts: Using bench power supply to drive ex-cordless driller

texts:
Ok, so I perhaps naively thought I was the first person to ever think of this - go figure.

Anyhow I managed to get my hands on a couple of cordless drillers which have an expired battery and thought that if I added a power jack (socket) to one of the drillers I could buy a cheap external "wall wart" power supply to drive it. It turns out that it is not that easy to find such a power supply but I have recently bought a bench power supply which can deliver up to 30V and 5Amps so I thought I could use that given that the driller runs on 18V and draws between 1 Amp and 3.4Amps in operation (the latter when I held the chuck to simulate resistance (and torque current)).

The snag is that some guy at the local electronics shop told me that if I use the bench power supply I would almost certainly damage it (specifically he said that switched mode supplies should NOT be used to drive a driller and that I should use an old style "brick" transformer).

I have in fact already operated a similar driller using the bench supply (to test motors for my robot) but this was only for a few seconds at a time. There wasn't any evident harm to either motor or supply.

But was he right? I obviously would not like to think I had saved a few Euros only to have to throw away my new bench power supply.


texts: What to do with unused pins for this ADC?

texts:
For my senior design project I'm using this ADC (HMCAD1511)

https://www.analog.com/media/en/technical-documentation/data-sheets/hmcad1511.pdf

I'm only using one of its four analog inputs - what should I do with the unused analog input pins?

Is it best to just ground them?

Lastly the same question but more generally for unused digital input and output pins, what should normally be done with them? (I'm guessing there isn't a catch all solution and that it often depends)


texts: How much is VLIW power- and area-efficient then superscalar anyway?

texts:
Most of texts say VLIW, which is lack of hardware to detect hazards and schedule the instructions. But I haven't see any evaluation about how much VLIW can save area(h/w complexity) and power compared to performance-matching superscalar.

When VLIW came out, the advancement of technology node size was slowing down, but not anymore. I want to know it's still valid to say VLIW can be considered to be efficient enough in power/area compared to equivalent superscalar when enough ILP is given.


texts: How to interface two wire & three wire SPI device?

texts:
ADC AD9266 Here is the datasheet of ADC AD9266. page no 25 of it is SPI

I'm working on a Project where I have to interface my ADC with MCU 8051. The Problem I encountered with is my ADC supports two wire SPI mode ( SCLK , SDIO pins ) while my MCU has three wire SPI configuration ( SCLK , MISO , MOSI ).

How would I connect my MISO & MOSI pins to single SDIO pin..

My Actual problem is I have to program ADC first to through SPI Port for which I need my MCU to act as Master &  connect MOSI to SDIO & During first instruction ADC will be programmed but after that I need to collect the data from ADC so ADIO must be connected to MISO. What is the remedy ?

thank you all in advance.


texts:
There are different kinds of snubbers that can be used. I know of 3, but there could be more.

D
RC
RCD

If an certain circuit uses a diode, can I swap it for an RC ? Or if a circuit has an RC, can I swap it for a diode ? Are they interchangeable ?

If they are interchangeable, is cost the reason why one is chosen over the other or are there specific applications where one would be better suited over the other?


texts:
Have you ever used this device? https://fluxworkshop.com/products/biaa100070-lm358-a2v-20ma-5v-lc-blue

I have prepared a circuit as follows.

I have used a distance sensor. Unfortunately, I obtain a constant value of 10-12 V in the VOUT. That value doesn't depend on the distance, only on a potentiometer value. What did I do wrong?


texts: Determine the Number of Transistors Needed to Build CMOS circuit

texts: I would like to determine the number of transistors that will be used in the CMOS circuit below. Is there a specific formula for it?


texts: No output at H bridge during quick power drop

texts:
I used a H bridge with PMW control to drive DC motor in two directions. I observed a strange phenomenon that during quick voltage drop, the PWM output at M2 is cutoff, although the T4 gate PWM input is still provided. It seems that the T4(N-MOS) is not switching during that time.

Test condition:

Power voltage changed from 12V to 6V in 5ms; PWM at T4 gate: frequency 20KHz, duration 90%; T1 is always on before T4 gate PWM is off

Actions:

when dv/dt increases, the problem disappears, eg. 12V to 6V in 40ms
when T4 gate PWM duration decreases to 50%, the problem disappears, but the M2 waveform is a little strange during voltage drop.
when the motor is replaced with a resistor, the problem disappears.
when 4.7uF capacitor is applied between M1 and M2, the problem disappears. Meanwhile, the Vpk-pk of M2 is much lower than before.

Assumption:
Since problem disappears when a resistor is used instead of motor, it can be concluded that T4 is always switching properly. The output at M2 is "drawn" by other part. It also can be verified by the 50% PWM duration waveform.
The 4.7uF capacitor helps M2 to remain the pulses. How to explain the phenomenon?

@Further verification:
Drain and source of T1 is shorted, PWM at T4 is provided continuously.
Result: Issue still exits, and M2 recovers to normal PWM output after about 36ms automatically.


texts: Snubber causing more problems than benefits

texts:
When designing and building a simple motor controller i used 2 snubber circuits, one to protect the main triac and another one the smooth the communication between the phototriac and the main triac. See schematic below.

simulate this circuit – Schematic created using CircuitLab

The Phototriac is a VOM3052T and the main triac is a BTA137-600.

When testing the circuit however, no matter if the Microcontroller's pin is high or low, the motor always turns on. I found that when removing C1 the problem did not occur and the circuit perform as it originally was supposed to do.

now that C1 is removed, the phototriac does not have a snubber anymore, but seems to work fine

The questions is: Is removing C1 from the circuit a viable option, or will this cause the circuit to fail in the long run? why does the circuit not work when C1 is placed?

====================================================================

Based upon community feedback (thanks!) & more online research I decided to update the circuit:

simulate this circuit

Where the resistors are 2W the the capacitors are film.


texts: Max length of extension cord for a 5kW load on 240?

texts:
So we have a 5kW generator for our film set. We need to get it as far away from the set as possible. As well as leave the option for 25m consumer extension cord for lights and haze machines.

So what I need is to work out the max length I can get with a little voltage drop as possible.

We would not be using all 5kW on set, probably only around 4kW but I would like to leave some headroom.

Am I right in saying that 6 mm\$^2\$ pair with earth will be adequate for this?
I have Google'd this for a few days but not found a definite answer to this.

Thanks guys.


texts: How do you calculate the output voltage of an op-amp with DC voltage

texts:
Suppose the following inverting op-amp.

How does one calculate the voltage output when we connect a DC voltage source of for example 750mV to it.

With an ideal amplifier we can just multiply the gain with the input voltage. But that is not the case with inverting op-amps. But i don't know how to then calculate the output voltage with a inverting op-amp when we give a dc voltage input. I know that in this case the output voltage should be 2.05V. But i do not know how this is calculated.

simulate this circuit – Schematic created using CircuitLab

Since there is a negative feedback there is no current going into the input terminals of the op-amp. Thus the currents of R1 and R2 are the same. U = IR, so I = U/R.

For R1, I = 750mV/100 and for R2 I = \$V_{out}\$/300. These are equal to each other

So we get \$ 750mV/100 = V_{out}/300\$

which leads to \$ V_{out} = 2250mV\$, which is still not the correct answer


texts: How does charging and transforming work?

texts:
I remember, whenever I got an electric device that could be powered either by battery or grid, I usually also got a transformer, that is positioned between the device an the power plug, while charging.

The transformer would be of such a way, that it would meet certain requirements set by the maker of the device.
Recently I got an electric toothbrush that could be recharged, it's description said: "Charging over laptop or the mobile phone charger is fine." - that made me highly suspicious - but according to the Internet it works. But how?

The specifications set by my laptop or cellphone are different and surely different than that of the toothbrush. I am confused now why there are even so precise information what transformer etc. to use and especially what not to do. What do these differences in voltage an ampere do?  How do the devices or batteries react to the wrong voltage? How does it affect the device and the charging procedure?

Thus far I found informative: How does charging a phone battery work?

Related is the following, however doesn't go into depth too much :/
Charging devices - Voltage and Amperage


texts: How long will a 12V 30W device run on 12V 65AH battery, if the battery is first fully charged and the battery is dedicated to this one device?


texts: Is there any chip which supports 802.11 along with 802.15.4

texts: I am looking for a chip which supports both 802.11 along with 802.15.4 over a simple SPI interface. Does anyone know of any such chip?. Also , is there anyway I can use the existing 802.11 chips on my laptop to actually read the data on the 802.15.4 channels? Is this physically possible? I know that it will be hard but is it physically doable or are there hardware limitations?


texts:
Is it in principle possible to connect two computers with a USB A to USB A cable, and have one pretend to be a USB device, and the other act as host?

Assume I have complete control on the software side (via driver / kernel module), and the cable can be modded (e.g. crossover).

If it's not possible, why not? (For example, maybe the host chipset can't be made to send neccessary signals by software, or something.) And what is the minimal hardware I'd have to put between the two computers to make this work?


texts: Black carbon like contacts on circuit boards, eg remotes, what are they made of?

texts:
Have been given a 30+ year old electric piano that wasn't working. Looking inside, it looks like it's been taken apart 1000 times.

Anyway, I replaced a load of tact switches, replaced one capacitor and it all sprang into life.

All except one note.

I've taken off the keys, cleaned with alcohol but the note that doesn't work has been really butchered, in that the black carbon like stuff doesn't exist (see right hand contact on pic).

Someone advised me to try repairing it with high silver content conductive paint. That may well work, but the keyboard isn't really worth spending much money on, and in the UK, the cheap silver conductive adhesives don't get very good reviews (and one said it had to be lacquered over to prevent oxidization).

I wondered what they use originally on all these things such as remote controls etc, I suspect it's something baked on hence not available to the home user?

There's a ton of info about repairing the carbon contacts on the rubber buttons such as on a remote but I've found zero info about repairing the circuit board side of things?

Any info or suggestions greatly appreciated

Many thanks


texts: I am using SIM800L. It requires 2 amp current spike(very shortly). As it requires just 4Volts, I am powering it through Arduino. To sustain load spike of 2 amps, which cap should I use?


texts: Can I lay traces on internal layers of 4 layer PCB?

texts:
In a 4 layer board it's advised to have power and ground plane as internal layer, but due to space crunch on my board I want to lay a few tracks on the internal layer.

Is it okay to do it ? If yes then is there any precaution to take while doing so ?


texts: nRF8001 DevKit usage with FPGA and Embedded Linux

texts:
I would like to develop an application with Nordic's nRF8001 DevKit. The master emulator of this kit is an USB Dongle and it is originally meant for PC connection. My final goal for the project is to run it on an FPGA (possibly through Embedded Linux). Regarding this goal, I have some questions.

1) Is the master emulator (USB Dongle) compatible with Linux? Are there any open-source drivers or from Nordic?

1a) If there is a driver for Linux, can I use it with Embedded Linux or do I have to make some modifications to it?

1b) If there isn't a driver for Linux, can I write my own Embedded Linux driver (no prior experience on drivers)? Are there any similar/reference drivers?

2) Is it possible to use the nRF8001 chip, not the USB Dongle, with FPGA as a master, possibly through serial interface (SPI/UART)?


texts: Do you need high voltage or current to produce a spark?

texts: An electric spark can be formed when there is high potential energy between two conductors, right? My question is can a spark be formed with high current and low voltage or only vice-versa?


texts:
On page 7 of the "SAM4E schematic checklist", Atmel recommends the following filtering circuitry on the core and PLL supply voltages:

(It's worth nothing that VDDOUT is the 1.2 volt output of an internal regulator)

I have the following questions about the filtering on VDDPLL:

Why does the PLL require an inductor whereas VDDCORE does not?  Is it so that a steady current is supplied?
What's the purpose of the 1 ohm resistor connected to the 4.7u capacitor on VDDPLL?  Why not directly connect the capacitor?


texts: Draw a small amount (30mA, burst to 300mA) of DC (~5v) power from 2-wire wall switch?

texts:
My question:
I'm installing an arduino behind a wall switch. The light switch only contains two wires. the hot/live wire and the wire going to the light fixture. There is no neutral in the wall socket.

Is there any way of powering the arduino off the cables present in the light switch?

I was hoping a transformer exists that can be powered by a single hot wire, perhaps with a capacitor at the neutral end? As it is AC, I imagine the capacitor would collect a charge during half the AC cycle, then be drained during the second half, resulting in a flow of charge through the transformer.

Or maybe some kind of induction from the hot wire? (I may be able to sleep the arduino for most of the time, bringing the normal current requirement down to a couple of mA.

Does such a thing exist? I don't want to build it myself, but was hoping such a thing existed that I could just connect to the hot wire in the switch, and get a low volt, low current supply for my electronics.

To summarize: I need a DC 5v, low amp supply in a location where there is one 220v wire with no neutral (just another wire going to the bulb).

Edit: I had a longer question explaining the scenario in more detail, but I have edited it.
The following caveats exist:

Its a rented apartment. I can't drill holes in the wall to run a 5v DC line to the arduino.
The arduino will not be interacting/switching the AC power
The arduino needs to go behind the wall switch, I cannot put it elsewhere.

Edit 2: Attaching image

Edit 3:
Background info

This just explains why the arduino needs to be located at the light switch. Only read if you are interested in the reason for this.

I'm purchasing Lifx bulbs. They are smart bulbs that are placed in the regular light socket and can be controlled by an iPhone app.

For situations where I just want to quickly turn a light on/off (e.g.: running into a room to grab something) I would like to be able to use the light switch. You can do this with Lifx, but turning off the light switch will stop power to the smart bulb, which defeats the purpose of having these bulbs.

My solution to this is smart switches. I plan to install an arduino behind each light switch. On the back of the light switch cover I will use conductive paint to paint two squares, at the top and bottom of the switch. A small wire will then connect the conductive paint patches to pins on the arduino. I will use a capacitive sensing library for arduino to measure when the top or bottom of the light switch is tapped.

When the arduino detects a tap, it will send a signal, via WiFi to the smart bulb to change its configuration (brightness/colour).

This allows the light switches to remain intact and look exactly as they did before, without any destructive changes. This...

Keeps the girlfriend happy
Ensures the old light switches are still available in case of network outage
Does not damage or clutter the wall by adding another controller (eg: sticking an RF remote  of some kind to send signals to the bulbs via a control box)
Ensures no problem with yearly apartment inspections, as there is no visible change
Can be completely removed with no evidence of the installation when I move out in a few years. (except the paint on the back side of the light switch plate, which is not visible under normal circumstances).
Allows gestures to be easily coded into the switch. For example, tap the top of the switch to turn on/off. Tap bottom of switch to turn light at 50% brightness, double tap for a soft yellow light, etc...


texts:
I am looking at purchasing this 24V 110RPM 1amp DC motor with a speed controller like this one that the listing recommends.

I have been doing some research into controlling linear actuators via wireless, and some people are doing that with a simple garage door wireless controller being modified.

My question is, how do I wirelessly control the speed of a DC motor in a similar "easy" fashion? All I've been able to come up with is perhaps controlling a servo wirelessly, but that starts to get a bit complicated when they are talking about XBee wireless and programming PIC chips (which I have never done).

Any help pushing me in the right direction would be appreciated.


texts:
Considering a OpAmp in inverting configuration with a gain <1 what maximum input rating do I need to respect?

single 3.3V supply, rail-to-rail OpAmp
gain of 0.66 via negative feedback resistor ratio of 330k/500k Ohms
bias voltage on non-inverting input of approx 1.9V via resistor divider
input signal swing of GND to 5V

The OpAmp is rated for 0.3V above/below rails which should be fine when I can assume that the device will keep the inverting input equal to the bias voltage of 1.9V when in operation. Is this reasoning correct, or does the 5V input violate the maximum rating.

I am designing a anti-aliasing filter with cut-off around 150Hz. I am not currently referring to a specific device but think that the MCP6001/2/4 could be suitable.


texts: Battery Packs not showing any voltage on multimeter

texts:
I made 4 battery packs with 10 batteries in series each using a spot welder. Each of the batteries in each pack are 1.37V, but when they are connected, the voltage is shown at zero. I took the batteries in one battery pack apart after I measured this and tested each one separately, and they each read 1.37V, but when I test them when they are connected via the metal ribbon, they read 0v.
I tested the nickel strips I spot-welded them on and they are conductive. So I don't understand why they aren't reading anything. I couldn't even get a 3v LED to light up, and just to check to make sure the LED did light up but just blew, I tested it on a 3v power supply and it lit.
I do know, however that there is current in the battery packs. I was mounting the batteries wires thru a hole in my robot, and somehow there was a very brief short-circuit and I got burned. (I'm pretty sure the batteries are just fine).


texts: What causes oscillators to sync up with each other?

texts:
Messing around with simple Theremin circuits, the variable oscillator would get "stuck" in sync with the reference oscillator, and not move until disturbed significantly (like "snap to grid" in a GUI).  This happened even when I used separate ICs with decoupling caps on their power rails.  I've seen the same thing with a stereo FM modulator, too, the two oscillators' frequencies would get stuck on each other when they were supposed to move around independently.  In these cases, they are both square wave relaxation oscillators.

What couples oscillators together?  What specific mechanisms cause them to change state sooner or later than they otherwise would, and how can it be prevented?


texts: How is "braking power" controlled with a regenerative braking set up?

texts:
As noted in the following question (How are current and voltage related to torque and speed of a brushless motor?) :

  Considering a 1000W motor:

  providing 100V/10A you'll be able to reach high speed but you won't be able to raise much slope.

  providing 10V/100A you'll move very slowly but you'll be able to climb high-grade slopes (assuming the motor can tolerate 100A).

in motors it seems that torque is controlled by the amount of current fed into it. However for generators (i.e. in regen braking), what is the analog? How is the amount of braking power controlled? In teslas, for example, light braking results in light regen while heavy braking can result in a great amount of regen. Given that there is no gearbox or clutch pack, how is the amount of regen controlled in the generator?


texts: Why does the voltage drop across an LED matter when determining an appropriate resistor value?

texts: In determining the voltage dropping resistor, why is the forward voltage of an LED deducted from the supply voltage instead of considering the supply voltage alone?


texts: Should I indicate that beryllium compounds exist in a device?

texts:
Many years ago I built a power supply (an Elektor design) which used a 78HGKC voltage regulator. The data sheet explicitly said not to open the TO3 package as beryllium oxide (BeO) was used for thermal transfer.

Today I learnt that BeO ceramic can be used as an insulator in magnetrons in domestic microwave ovens, e.g. YouTube: DIY How To Disassemble A Magnetron.

Beryllium copper alloy is used in high-quality connectors for test equipment.

Berylliosis is currently incurable.

If I were to make something containing beryllium compounds, even though it does not come under RoHS regulations, should I only say so in the product datasheet, put a notice in the equipment, or just say nothing?


texts: Noise figure of a passive network at a temperature different from room temperature

texts:
Given a passive network at room temperature, the noise figure is the ratio between the output noise power density pw and and the output noise power density due to the source pwS

F = pw/pwS = 0.5*k*T/0.5*k* T*g= 1/g

where g is the network gain. Now I would say that the formula holds also for temperatures T1 different from room temperature T0 but turns out it doesn't. How can I prove the formula becomes F = 1 + T1 *(-1 + 1/g)/T0?


texts:
I’m working on a 4 bit computer/calculator that’s fully NAND (just for the heck of it) and I needed some tri-state buffers for the registers. I think that using an AND works the same, but nowhere online shows a layout like this for a tri state buffer.
Is there a reason we don’t use these, or are they everywhere?


texts: How does MPPT algorithm and 2-stage battery charging go together?

texts:
I understand that for finding the MPP of a solar panel, the PWM of a switching converter needs to be regulated based on an algorithm. And that if a battery is connected to the converter the output voltage will be constant (that of the battery).
How is a battery supposed to be charged in CC and CV mode if I can only change the current.


texts: Price as a function of load on an electric grid(City modeling)

texts:
Thanks for your time. First some context and the actual question is marked further down.

Context:

I am modeling a city as a complex adaptive system and am building a model of an electric grid to run in parallel. The city model is focused on traffic/flow of people and the trade-off between public(bus) and personal(car: gas, electric).

The electric model is very simple and is meant to augment the city model. It has a tree structure where the leaf nodes are buildings and chargers for cars, the root node is a connection to an infinite power source outside the city, and the layers between are just connectors which I call substations.

Each node has a base draw and an extra draw per unit(car charging, person in building, ...) the draw of a parent node is added to by the draw of its children.

Each line will have a capacity and i wish to base the global price of electricity on the total load at the root node(with modifiers for overloads etc). So here is the question:

Question:

Is there a mathematical function used to calculate the price of electric power based on load that is used in the real world that I could use/adapt in my model?

If not, I was thinking the function would be an exponential which is fairly flat until an interval of optimal power load, increase sharply towards the end of the interval and explode after. See image.

The image Depicts an exponential function Price(Load) where there are 3 intervals delineated by 2 values, a and b. The yellow interval (-inf < load < a) is below the optimal load, the green interval (a < load < b) is the optimal load and the red interval (b < load < inf) is above safe capacity

Would this be a reasonable function for the pricing in a grid?
How would such a function look mathematically? I need to have a and b as variables in the equation for experiments and autonomous adaptation during the runs.

Any feedback on the model structure is also welcome.


texts: High Voltage (0-600V) DC Voltage Sensing, Shared Ground with Isolated Converter and HV-

texts:
I'm designing a circuit to detect when the voltage across two DC input lines (HV+ and HV-) is greater than 60V. The voltage will vary from 0-600V. A seperate supply of 12v and 5v is available for use. The output  side of the sensing circuit (and if used the 12v and 5v supply) must be galvanically isolated from the high voltage lines.

Initial Idea

My initial idea was to use a 12v zener diode voltage divider with an opto-isolator as shown in Fig 1. R2 and D2 are modelling the opto-isolator.

The value of R1 is set so that once the input voltage V1 reaches 60V, enough current (5mA) gets through to meet the forward current requirement of the opto-isolator diode. The main issue with this circuit is the large amount of power (~43W) burnt across R1 (be it a single large resistor or several smaller ones) once the input voltage reaches 600V.

Possible Solution?

I was hoping that an isolated DC/DC converter (such as https://uk.rs-online.com/web/p/isolated-dc-dc-converters/1896931/) could be used to supply an IC (such as a comparator) to reduce the current through any voltage divider used between the HV lines, as shown in Fig 2.

My question is whether the converter can share a ground with the HV line (ie HV- connected to converter ground)? And should you have time and/or are willing, suggest alternative solutions to this issue?

Thank you


texts: Can I use an analogue switch with separate circuits?

texts:
I am planning on using 74HCT4066N analogue switch (datasheet) to trigger button presses on two separate gamepads at the same time. The circuit I plan looks something like this:

Can I use this analogue switch to control completely separate circuits? The problem, I suspect, is that these circuits each run off a separate ground, so I can't know what their voltage might end up being relative to the AA battery's ground. Is this a problem?

If I can't use this type of analogue switch for this purpose, then what should I be using to press both buttons at the same time?

Thanks,
Allen

EDIT:
Here is the circuit updated with DrFriedParts's suggestion of connecting the grounds... Please let me know if I got anything wrong here...


texts:
I have two modules that uses I2C and both connected to an Arduino. one of them have two 10K pullup resistors.

The other one is an 16X2 LCD I2C:

I couldn't find an schematic for this module but tracked the connection with DMM.

Connecting the LCD I2C modules causes the first module (ADC) readings get way off.

Those two 4.7K are pullup resistors? if yes can I safely remove them because I have pullups on the ADC module?


texts: How much power is needed to run these speakers?

texts:
I have couple of loudspeakers. Each is rated for:

RMS Power 60 watts
Power 75 watts
vc Imp 16 Ohms

I am going to build an audio amp for those but not sure how much power is needed.

I'm concerned about burning the loudspeakers if using higher power than they can handle.

I will make the amp as simple as possible one channel only
then connect the two loudspeakers in parallel.


texts: How to connect this potentiometer to this PCB?

texts: How am I supposed to connect this potentiometer to the PCB?


texts: Difference between two 12V PWM signals/circuits (PIC and NE555)

texts:
I'm trying to understand the difference between two 12V PWM circuits I've build and tried.

The PWM signal is intended to control the speed of a motor. Only not in the way you would expect. The motor has its own circuitry and accepts the PWM signal as a speed control. So its not driving the motor directly.

To make this work I've tried two PWM control circuits:

I got a PIC to generate a PWM signal. I tried both the build-in ECCP module and software PWM.
I used the following circuit to convert the PWM from 5V to 12V.

simulate this circuit – Schematic created using CircuitLab

Although this produces a very nice 12V signal the motor doesn't react to it all.

So I tried an old fashion NE555 in astable mode to generate the PWM.

Schematic from DPRG

This circuit also puts out a nice 12V PWM signal with the same frequency and duty cycle as the PIC circuit. But this signal actually does have effect on the motor.

So my question is: What is the difference between the PWM signals generated by these two circuits/devices? By knowing this, I hope I can change the PIC circuit in such a way that motor reacts to it aswell .

Since I rather control the motor with the PIC, as this will make for a more compact end result.

ADDITIONAL INFO:
Both signals when connected to the motor.

PIC signal (without R2), 8.2-11.2V:

NE555 signal, varies 0-12.2V for 500ms and 0-1.32v for 780ms:

In both cases the PWM frequency and duty cycle remain intact, disregarding the voltages.


texts: Do I have to provide VCC to every VCC pin on Atmega32u4 MCU?

texts: Atmega32u4 has 7 VCC pins. Can I connect 1 of the 7 VCC pins to the power supply to power the MCU, and use the rest of the VCC pins (6 of them) on the MCU to power other peripherals, such as LEDs?


texts: Arduino in car: capacitor for extra 3 sec of power

texts: I want to install an Arduino Uno in a car, powered by a consumer 12V->5V car voltage regulator plugged into the lighter socket. The socket is switched, i.e, there's no power when the motor's off. When I turn off the engine I'd like to keep the Uno powered for extra ~3 secs. Can I use a capacitor in parallel to the Uno to get the extra 3 secs of power once the motor's off? How would i determine the capacitance? Should the cap be placed before the volt. regulator (i.e. directly on car's 12V) or after volt. regulation (on the regulated 5V)? Would I need some diodes to go with it? I don't want to put the Uno on the car's unswitched circuit, because it seems wasteful to run the Uno 24/7 off the battery just so it can be used for extra 3 secs when the motor's off. Thanks.


texts: Optimal soldering iron specs for lead-free

texts:
I do most of my soldering with/directing children and so we always using lead-free solder (and thru hole and nothing too complicated).

I have a soldering iron station that has two settings, 20W & 40W - the 20W seems a little low to melt the solder and the 40W warms up the handle enough that the children want to stop before finishing the project. The tip also seems to get messed up (one side melts better than the other).

What range of watts would be best for lead free solder usage?

I understand the melting point of my SnAgCu solder is around 217 C, and that power and temperature are completely different pieces of information. My question still stands as is because a) the station I have doesn't list a temperature (and isn't temperature controlled), and b) many lower-end stations do not have a temperature controlled feature, only a listed power output range.

Are there any other specs or features of a station that should be considered specifically for lead-free usage? (e.g. tip size or shape)

Also, is this issue with the handle getting too warm a normal thing or do I just have a cheap iron?


texts:
I'm designing an RGB LED strip driver, and for the MOSFETS for the PWM power switching I'm looking at using the PSMN022-30PL. It has a voltage limit of 30v, and can supply up to 30amps, which is more then enough for the 12v 2-5A the strips will probably be drawing.

My question is, would I be able to get away without using a heatsink on the MOSFET? I know that this information is in the datasheet somewhere, but I'm having a hard time trying to find it in this particular datasheet.

The Digikey part: http://www.digikey.ca/scripts/DkSearch/dksus.dll?Detail&itemSeq=189591108&uq=635906524369115920

The Datasheet: http://www.nxp.com/documents/data_sheet/PSMN022-30PL.pdf


texts: Higher input current than output current in LM317

texts:
I am doing a power supply to a TFT Display that works with 3.3V, my main supply is 12V and TFT current draw is approximately 150mA (A simple schematic of my circuit is below). I put two LM317 because if I put only one of those the power through it would be 1.3W and it would turned very hot.

But something wierd is happening, when I measure the input current, i.e., from 12V power supply to first step-down LM317 I get 250mA, and the output current is still 130-150mA. I don't understand what is happening, knowing that the input and output current in a linear regulator is approximately the same, even considering the adjust resistors we get only 6mA more. Additionally, I tried connecting the 12V directly to 3.3V regulator, and i got the same result.

Any idea of what is happening? or what I'm missing?

Thanks a lot for any reply and help.


texts:
I am building a battery monitoring device and planning on measuring voltage drop across a current shunt, amplifying, and reading into an external (12-bit) ADC chip to get a value of the resolution I desire.

The problem I am requesting help with is finding a low-power ADC that accepts +- voltage for the signal or some kind of workaround of that without losing too much resolution.

I am using a +- 5V linear regulator for power supply and a 0.1m ohm precision shunt, planning to accurately measure +- 200A (charging and discharging) but cannot find an ADC chip that suits my needs.

The TC7109 has dual rail supply and can take both positive and negative voltages into ADC but has quite high power usage (>1W).

Something like the the MCP3201 would be ideal (especially because I am already using planning to use SPI for SD card operations) but its input range doesn't extend into the negative.

Is there a way that I could use a cheaper, more convenient chip like the MCP3201 to measure positive and negative voltages without sacrificing precious resolution?

Below is a (very simple) circuit schematic of the proposed circuit before ADC:


texts: How to find the core temperature of a mosfet

texts:
I’m designing a step up DC/DC converter and I have to find the core temperature of the MOSFET. The MOSFET is the 2N7000.

I’ve been giving the VDS(ON) and the ambient temperature.


texts:
I've done quite a bit of searching here and on Google, but I think I still need help.

Using either of these power supplies: 12V 1A or 5V 2A

How can I build a circuit to drive a laser diode with optimal specs of 3.1 V at 400 mA? I purchased via eBay, and the description specifically says ML101U29 laser diode. I found a data sheet for it. It is inside a casing, inside a heatsink.

I'm an electronics newbie and am still grappling with how electricity works and how to shape it in this manner. What I've learned so far is that the LM317 is a go-to part for power supplies/drivers. In fact, I even have an LM317-based circuit pre-assembled. I can adjust it to get ~3 volts out of it (measured via multimeter), but have no idea how to control or limit the mA to ensure my laser doesn't burn up, and unfortunately it does not provide detailed specs. In my testing, I was able to light the laser, but even after focusing, did not seem to generate much heat.

I also found this power supply kit from Adafruit that will output adjustable or 3.3 volts (very close to target). But, it let's through 1.25 A--way too much for my diode. My understanding is that I should be able to use a resistor to limit the 1.25 A to 400 mA, but I am uncertain if my understanding is accurate.

So, I'm reaching out to experts. What would you suggest? Thank you!

UPDATE: I ended up using a driver board I already had and just turning it up. I don't know what the true voltage going through the laser is, or the current, but it works. I turned it up very slowly to get to burning capability without frying the laser. I use an LM317 Adjustable Module pre-assembled, available from a few online retailers. The most interesting thing so far is that it requires a lot more current to burn light-colored wood. Using a marker to color it black results in a burn at a lower power, but is useless because it's black on black.


texts:
Capacity of the capacitor in circuit below is equal:

What difference is there between the circuits?
Which one is better?
Can i made equal the capacitor with the capacitors in series?
Which one is Effective Cost?why Usually people usage one capacitor Instead some capacitors?


texts: 7.4 Volts DC to 3-4 volts (small application)

texts:
I'm using a 7.4-volt battery, I need to drop the voltage to somewhere between 3 and 4 volts. It is for a relatively small application so the smaller the better. My amperage needs to stay the same.

It's 1500 mah

Battery


texts: Providing a linear adjustable DC voltage from PWM ( 1.5V to 3.3V)

texts:
I'm not an electrical engineer, so a simple task has me baffled for the last week or so.

I am working on project where I am required to feed a blackbox device with a stable adjustable voltage.
The box will be sampling the voltage provided by analog read.

The readings I provide it will be around 1.8 & 3.1V (2 modes of operation) and will be shifting for values of 0.01V to limits of +-0.2 (so in mode1 I need readings of between 1.6 and 2.0 and in mode 2 I need readings between 2.9 and 3.3)
This readings will be changing so Vout must reflect the changes in a timely manner.

I am using an Arduino to obtain the data, calculate it to voltage and push out a PWM.

I am using a pro mini, powered by 5V applied to its raw pin which puts the device into 3.3V mode. Thus my Aref and 100% PWM cycle both equal 3.3V

The frequency of PWM is at about 20kHz (I can slightly modify this if required).

I have slapped together another Arduino to act as my signal analyser (as I lack an oscilloscope), with which I am probing the Vout line
(it implements an LCD and pushes analogRead data to screen, with some added qualifiers I can make it show me the extreme values of Vout).

So now that I can see what is being spit out I can start working on it.
So I read a lot of filters literature, but half of it is not really making sense to me. What I gathered is that I need to implement a lowpass filter to smoothen Vout.

So I tried building a RC filter, selecting C and R values "by luck",
trying different combinations and orders of RC filters I can manage to get the Vout swing (initially 3.3-0) down to 3.3-2.7 when targeting 3V.
Although better, it is still nowhere near the accuracy I require.
(the parts I have on hand just now are a bit limited, so there were a 0.1uC,1/8uC 1uC, a 100uC, a 1500uC, and resistors from 10K down to 0.25K in my tests)
IIRC the combination I have set up currently is 100uC/1K 1st order (adding orders was giving me negligible improvements, so I might be misunderstanding that concept)

Further reading has hinted that I might need a bit more than just a filter to deal with this, so far internet's best suggestion seems to be a combination of LM317 as an adjustable regulator and a MOSFET to convert the PWM to a variable resistance.

Figure 37 in the LM317 tech sheet seems like the regulator part I could use for this, but I can't seem to figure out the variable resistance part of what I need.

So my question is twofold as I am assuming I might have gone a wrong direction with this:

Is this the best way to do this? I am trying to keep parts and cost numbers down, so I   don't want to go down the whole MOSFET regulator road if it turns out I'm just using an incorrect filter.
How do I do solve this challenge?


texts: Should I use a solid connection or thermals?

texts: I am using a component with LGA package. Should I use a solid connection or use thermals between pads and GND plane?


texts: Why maximum power transfer condition is suitable for communication system but not for transmission of electricity?

texts:
A fundamental concept that i have learned from basic electrical circuit study is to receive maximum power by a load of resistance RL from a source the necessary condition is RL = Rin where Rin is the input resistance seen by the load. This is called maximum power transfer theorem. But the efficiency in this condition is 50%.

Then it is said that, the maximum power transfer condition is the best choice to transmit signal in communication system. Since we need the signal with maximum strength at the receiving end.

But in power transmission we target to receive as much higher efficiency as possible. That's why maximum power transfer condition is not a desirable feature in this case.

My question is, whether the above two paragraphs are true or not? If true then, why maximum receiving power wouldn't be a desirable feat for electricity transmission?


texts: KiCad question: how to assign pins to pads when the footprint and device have different numbers of pins?

texts:
I have a vacuum tube that has 9 pins. 3 of the pins are heaters and aren't connected to the PCB I'm designing, meaning only 6 pins need to be connected to the PCB. The Tube itself sits in a panel mounted socket that's not part of the PCB.

I'd like to use a 6 position screw terminal block on the PCB to run wires to the tube socket.

I assigned a 6 position screw terminal block footprint to the tube in the schematic, but only 3 of the pins are showing as being connected in the PCB editor.

How do I assign the tube pins 6,7,8 to the footprint pins 4,5,6?

EDIT

Adding some pictures:

So here is Unit A and Unit B of the tube on my schematic. Notice I only use pins 1,2,3 and 6,7,8. I actually lied in my first post, pins 2 and 7 aren't connected to the PCB either, so really I only need a 4 position terminal block, but the question still is the same...

I assigned a 6 pin terminal block as the footprint. In the PCB editor this is what I see. Instead, I want all the pins of the terminal block being used:

Thank you!!


texts: I am making a small, handheld device powered by a 9V battery. I am using this regulator and the ATtiny104. My question is, do I need to protect against a low voltage battery? The minimum input for the tiny is 1.8 volts so do I need a device to shut off the power when the 9V hits about 6V (and then rapidly drops voltage) or can the tiny handle such a voltage for the brief amount of time before the circuit turns off when the battery fully discharges. If it helps, I estimate the current draw of the circuit to be about 200-250mA.


texts: 2 state converter, from -24VDC [ON] - +5VDC [OFF] to 5VDC [ON] - 0VDC [OFF]

texts: So as the header says, I would like to take a 2 state signal (ON/OFF) where the on state is -24VDC and it's off state is +5VDC and make that/convert to a 0-5VDC 2 state signal, where 0 is the corresponding off state and +5VDC is the corresponding on state.  Need some direction/help with this one, thanks.


texts: Variable band-pass filter for splitting audio signal into separate signals (high and low freqs)

texts: I've been wondering for quite some time how to create a sort of audio splitter. The idea is to get an audio signal (e.g. guitar) at the input, and have two separate outputs, one with the input's low frequency part, and one with the input's hight frequency part. From what I understand, I firstly need to duplicate the input signal with opamps, and then apply a bandpass filter on each signal to extract specific band of frequencies. Now, for fixed bands this is trivial, but I'd like for the circuit to allow for varying both bands independently. Hence, I need to apply separate, variable high-pass filters on both, and then separate low-pass filters, giving a total of 4 variable pass filters. So my question is - is there any way of creating a continuous (not sure if it's the right word, as in not discrete, allowing for smooth variable change instead of choosing from a constant number of options) variable low-pass and high-pass filter? Thanks for any advice.


texts: How to switch between usb host and slave mode on a micro usb programatically?

texts:
Is it possible to program some chip that can switch between USB host and slave mode over an single micro USB cable talking to an Android device?

It would be OK if there was a slight pause between the switch if we have to reconfigure the chip to reconnect to the Android.

I don't need to be connected in both modes at the same time.

Background:

I have a Android device that supports USB file transfer mode so I can pull files from my GNU/Linux laptop, so you connected to it from the PC where the android device is in slave mode. And  you can attach to it with an OTG cable and the device is in master mode so I can attach a external keyboard.
I can switch between it by pulling out the cable and switching between them.

Even better would be to able to have both master and slave connected at the same time via the same cable. Ideally I could connect to a RasPI or some other programmable micro controller like Arduino.  But I am not sure exactly.

Possible Solution

I found this note that uses a  FTDI Vinculum II controller
https://www.ftdichip.com/Support/Documents/AppNotes/AN_323_VNC2_Host_to_Android_Open_Accessory_and_FT232.pdf but I don't understand it all yet. Does this look like a possible solution?

Any simple devices like rasberry pi that could be used?


texts: Quick question about a closed loop control system

texts:
Using above loop, we see that

\$
\dfrac{y(s)}{r(s)} = \dfrac{p(s)c(s)}{1+p(s)c(s)}
\$

and

\$
\dfrac{e(s)}{r(s)} = \dfrac{1}{1+p(s)c(s)}
\$

(well known results)

Why is that:

If the close loop system is stable, then \$1+p(s)c(s) = 0\$ ?

Shouldn't it be if the closed loop poles of \$\dfrac{y(s)}{r(s)}\$ are in open left hand plane?

Thanks


texts:
I recently got a USB controlled relay which is designed to show up as a serial port on a PC, and accept commands. It's recognized just fine by my computer, but I can't seem to get it to actually do anything. This is my first time trying to use this kind of gadget, so I'm assuming I'm just missing something basic, but the unit came without a single scrap of documentation, so I'm hoping one of you fine folks can help me get things sorted out.

The device is an XD-40 LCUS, with a CH340 chip on it, and the nearest thing to documentation I've found is the following, on one of the sites online that sells them:

Data (1) --- start logo (default is 0xA0)
Data (2) --- switch address code (default is 0x01, identifying the first way switch)
Data (3) --- Operating Data (0x00 to "Off", 0x01 "On")
Data (4) --- checksum

Example:
Open the USB switch: A0 01 01 A2
Close USB Switch: A0 01 00 A1

I had hoped to be able to pop open Putty, connect to COM4 (which is what my PC has decided to call the device) and go to town with the commmands listed above, but that's gotten me exactly nowhere, so I'm a bit confounded. Any guidance would be appreciated.


texts:
I was trying to learn something about dimmers for light bulbs. After some reading, I found that most trailing edge dimmers contain some variant of this:

Found for example in this diy-project or this datasheet.

I do understand the general principle: No matter in which half wave we are, when the gate is pulled high, one of the MOSFETs lets current through to the other one which in turn lets the current flow because of its body diode.

But there are a couple of things I actually do not understand:

The signal could come from a µC, so there's no galvanic seperation between low DC and high AC voltage. Or is the insulation of the gate sufficient?
Even more confusing to me is the grounding between the MOSFETs. When the gates get pulled high, why does this not fry everything connected to that.
Why does nobody use an AC-optocoupler instead of this?